@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
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as
|
|
1
|
+
import { B as e, D as t, F as n, Ft as r, I as i, L as a, M as o, Mt as s, P as c, Pt as l, U as u, W as d, _ as f, a as p, c as m, ct as h, d as g, et as _, f as v, g as ee, l as y, r as te, u as b, w as ne, y as x } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
|
+
import { a as re, c as ie, o as ae, t as oe } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
+
import { t as se } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
4
|
+
import { a as ce, n as le, o as ue, r as de, t as fe } from "./editor-modal-BeX6otLk.js";
|
|
5
5
|
// ../media-library/src/composables/useImageCrop.ts
|
|
6
|
-
var
|
|
6
|
+
var pe = {
|
|
7
7
|
free: void 0,
|
|
8
8
|
square: 1,
|
|
9
9
|
landscape43: 4 / 3,
|
|
10
10
|
landscape169: 16 / 9,
|
|
11
11
|
original: void 0
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function me(e) {
|
|
14
14
|
return e === "image/png" || e === "image/gif" ? {
|
|
15
15
|
mimeType: "image/png",
|
|
16
16
|
quality: 1
|
|
@@ -22,7 +22,7 @@ function pe(e) {
|
|
|
22
22
|
quality: .92
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function he(e, t, n) {
|
|
26
26
|
let r = e.width, i = e.height;
|
|
27
27
|
if (!t && !n) return e;
|
|
28
28
|
let a = r, o = i;
|
|
@@ -36,7 +36,7 @@ function me(e, t, n) {
|
|
|
36
36
|
let c = s.getContext("2d");
|
|
37
37
|
return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ge(e, t, n) {
|
|
40
40
|
return new Promise((r, i) => {
|
|
41
41
|
e.toBlob((e) => {
|
|
42
42
|
if (!e) {
|
|
@@ -48,7 +48,7 @@ function he(e, t, n) {
|
|
|
48
48
|
}, n.mimeType, n.quality);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function _e(e, t, n, r) {
|
|
52
52
|
let i = e, a = t;
|
|
53
53
|
if (n && i > n) {
|
|
54
54
|
let e = n / i;
|
|
@@ -64,7 +64,7 @@ function ge(e, t, n, r) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
// ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.44_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
|
|
67
|
-
function
|
|
67
|
+
function ve(e, t) {
|
|
68
68
|
var n = Object.keys(e);
|
|
69
69
|
if (Object.getOwnPropertySymbols) {
|
|
70
70
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -74,18 +74,18 @@ function _e(e, t) {
|
|
|
74
74
|
}
|
|
75
75
|
return n;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function S(e) {
|
|
78
78
|
for (var t = 1; t < arguments.length; t++) {
|
|
79
79
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
80
|
-
t % 2 ?
|
|
81
|
-
|
|
82
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
80
|
+
t % 2 ? ve(Object(n), !0).forEach((function(t) {
|
|
81
|
+
C(e, t, n[t]);
|
|
82
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ve(Object(n)).forEach((function(t) {
|
|
83
83
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function C(e, t, n) {
|
|
89
89
|
return t in e ? Object.defineProperty(e, t, {
|
|
90
90
|
value: n,
|
|
91
91
|
enumerable: !0,
|
|
@@ -93,7 +93,7 @@ function w(e, t, n) {
|
|
|
93
93
|
writable: !0
|
|
94
94
|
}) : e[t] = n, e;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ye(e, t) {
|
|
97
97
|
if (e == null) return {};
|
|
98
98
|
var n, r, i = function(e, t) {
|
|
99
99
|
if (e == null) return {};
|
|
@@ -107,28 +107,28 @@ function ve(e, t) {
|
|
|
107
107
|
}
|
|
108
108
|
return i;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function w(e) {
|
|
111
111
|
return function(e) {
|
|
112
|
-
if (Array.isArray(e)) return
|
|
112
|
+
if (Array.isArray(e)) return T(e);
|
|
113
113
|
}(e) || function(e) {
|
|
114
114
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
115
115
|
}(e) || function(e, t) {
|
|
116
116
|
if (e) {
|
|
117
|
-
if (typeof e == "string") return
|
|
117
|
+
if (typeof e == "string") return T(e, t);
|
|
118
118
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
119
119
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
120
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
120
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return T(e, t);
|
|
121
121
|
}
|
|
122
122
|
}(e) || function() {
|
|
123
123
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
124
124
|
}();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function T(e, t) {
|
|
127
127
|
(t == null || t > e.length) && (t = e.length);
|
|
128
128
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
129
129
|
return r;
|
|
130
130
|
}
|
|
131
|
-
var
|
|
131
|
+
var E = function(e) {
|
|
132
132
|
(function() {
|
|
133
133
|
var t = {}.hasOwnProperty;
|
|
134
134
|
function n() {
|
|
@@ -152,15 +152,15 @@ var D = function(e) {
|
|
|
152
152
|
}
|
|
153
153
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
154
154
|
})();
|
|
155
|
-
}, O, k
|
|
156
|
-
path:
|
|
155
|
+
}, D, O, k = (E(O = {
|
|
156
|
+
path: D,
|
|
157
157
|
exports: {},
|
|
158
158
|
require: function(e, t) {
|
|
159
159
|
return function() {
|
|
160
160
|
throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
|
|
161
|
-
}(t == null &&
|
|
161
|
+
}(t == null && O.path);
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, O.exports), O.exports), A = function(e) {
|
|
164
164
|
return function(t, n) {
|
|
165
165
|
if (!t) return e;
|
|
166
166
|
var r;
|
|
@@ -172,7 +172,7 @@ var D = function(e) {
|
|
|
172
172
|
}), "") : "");
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
|
-
function
|
|
175
|
+
function j(e, t, n) {
|
|
176
176
|
var r, i, a, o, s;
|
|
177
177
|
function c() {
|
|
178
178
|
var l = Date.now() - o;
|
|
@@ -190,65 +190,65 @@ function M(e, t, n) {
|
|
|
190
190
|
r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
|
|
191
191
|
}, l;
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
var
|
|
195
|
-
return
|
|
193
|
+
j.debounce = j;
|
|
194
|
+
var be = j, M = function() {
|
|
195
|
+
return M = Object.assign || function(e) {
|
|
196
196
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
197
197
|
return e;
|
|
198
|
-
},
|
|
198
|
+
}, M.apply(this, arguments);
|
|
199
199
|
};
|
|
200
|
-
function
|
|
200
|
+
function N(e, t) {
|
|
201
201
|
var n, r;
|
|
202
202
|
return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
|
|
203
203
|
name: n,
|
|
204
204
|
classname: r
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function P(e) {
|
|
208
208
|
return /^blob:/.test(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return
|
|
210
|
+
function F(e) {
|
|
211
|
+
return P(e) || function(e) {
|
|
212
212
|
return /^data:/.test(e);
|
|
213
213
|
}(e);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function I(e) {
|
|
216
216
|
return !!(e && e.constructor && e.call && e.apply);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function L(e) {
|
|
219
219
|
return e === void 0;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function xe(e) {
|
|
222
222
|
return typeof e == "object" && !!e;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Se(e, t, n) {
|
|
225
225
|
var r = {};
|
|
226
|
-
return
|
|
227
|
-
r[i] =
|
|
226
|
+
return xe(e) ? (Object.keys(t).forEach((function(i) {
|
|
227
|
+
r[i] = L(e[i]) ? t[i] : xe(t[i]) ? xe(e[i]) ? Se(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
|
|
228
228
|
})), r) : e ? t : n;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function R(e) {
|
|
231
231
|
var t = Number(e);
|
|
232
232
|
return Number.isNaN(t) ? e : t;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ce(e) {
|
|
235
235
|
return typeof (e == "number" || function(e) {
|
|
236
236
|
return typeof e == "object" && !!e;
|
|
237
|
-
}(e) && toString.call(e) == "[object Number]") && !
|
|
237
|
+
}(e) && toString.call(e) == "[object Number]") && !we(e);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function we(e) {
|
|
240
240
|
return e != e;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Te(e, t) {
|
|
243
243
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var z = function(e, t) {
|
|
246
246
|
e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
|
|
247
|
-
},
|
|
247
|
+
}, Ee = function(e, t) {
|
|
248
248
|
t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
|
|
249
|
-
},
|
|
249
|
+
}, De = function(e) {
|
|
250
250
|
this.type = "move", this.directions = e;
|
|
251
|
-
},
|
|
251
|
+
}, Oe = function() {
|
|
252
252
|
function e(e, t, n, r, i) {
|
|
253
253
|
this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
|
|
254
254
|
}
|
|
@@ -266,7 +266,7 @@ var B = function(e, t) {
|
|
|
266
266
|
top: 0
|
|
267
267
|
};
|
|
268
268
|
}, e;
|
|
269
|
-
}(),
|
|
269
|
+
}(), ke = {
|
|
270
270
|
name: "DraggableElement",
|
|
271
271
|
props: { classname: { type: String } },
|
|
272
272
|
beforeMount: function() {
|
|
@@ -287,7 +287,7 @@ var B = function(e, t) {
|
|
|
287
287
|
this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
|
|
288
288
|
},
|
|
289
289
|
onTouchStart: function(e) {
|
|
290
|
-
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches =
|
|
290
|
+
e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = w(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
|
|
291
291
|
return {
|
|
292
292
|
clientX: t.clientX + n.clientX / e.touches.length,
|
|
293
293
|
clientY: t.clientY + n.clientY / e.touches.length
|
|
@@ -333,11 +333,11 @@ var B = function(e, t) {
|
|
|
333
333
|
};
|
|
334
334
|
},
|
|
335
335
|
processMove: function(e, t) {
|
|
336
|
-
var n =
|
|
336
|
+
var n = w(t);
|
|
337
337
|
if (this.touches.length) {
|
|
338
338
|
if (this.touches.length === 1 && n.length === 1) {
|
|
339
339
|
var r = this.$refs.draggable;
|
|
340
|
-
this.$emit("drag", new
|
|
340
|
+
this.$emit("drag", new Oe(e, r, {
|
|
341
341
|
left: n[0].clientX,
|
|
342
342
|
top: n[0].clientY
|
|
343
343
|
}, {
|
|
@@ -359,27 +359,27 @@ var B = function(e, t) {
|
|
|
359
359
|
"enter"
|
|
360
360
|
]
|
|
361
361
|
};
|
|
362
|
-
|
|
363
|
-
return
|
|
362
|
+
ke.render = function(e, t, r, i, a, s) {
|
|
363
|
+
return o(), b("div", {
|
|
364
364
|
ref: "draggable",
|
|
365
|
-
class:
|
|
365
|
+
class: r.classname,
|
|
366
366
|
onTouchstart: t[1] ||= function() {
|
|
367
|
-
return
|
|
367
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
368
368
|
},
|
|
369
369
|
onMousedown: t[2] ||= function() {
|
|
370
|
-
return
|
|
370
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
371
371
|
},
|
|
372
372
|
onMouseover: t[3] ||= function() {
|
|
373
|
-
return
|
|
373
|
+
return s.onMouseOver && s.onMouseOver.apply(s, arguments);
|
|
374
374
|
},
|
|
375
375
|
onMouseleave: t[4] ||= function() {
|
|
376
|
-
return
|
|
376
|
+
return s.onMouseLeave && s.onMouseLeave.apply(s, arguments);
|
|
377
377
|
}
|
|
378
|
-
}, [
|
|
378
|
+
}, [n(e.$slots, "default")], 34);
|
|
379
379
|
};
|
|
380
|
-
var
|
|
380
|
+
var Ae = A("vue-handler-wrapper"), je = {
|
|
381
381
|
name: "HandlerWrapper",
|
|
382
|
-
components: { DraggableElement:
|
|
382
|
+
components: { DraggableElement: ke },
|
|
383
383
|
props: {
|
|
384
384
|
horizontalPosition: { type: String },
|
|
385
385
|
verticalPosition: { type: String },
|
|
@@ -391,12 +391,12 @@ var ke = j("vue-handler-wrapper"), Ae = {
|
|
|
391
391
|
computed: { classes: function() {
|
|
392
392
|
var e;
|
|
393
393
|
if (this.horizontalPosition || this.verticalPosition) {
|
|
394
|
-
var t, n =
|
|
395
|
-
e =
|
|
396
|
-
} else e =
|
|
394
|
+
var t, n = N(this.horizontalPosition, this.verticalPosition);
|
|
395
|
+
e = Ae((C(t = {}, n.classname, !0), C(t, "disabled", this.disabled), t));
|
|
396
|
+
} else e = Ae({ disabled: this.disabled });
|
|
397
397
|
return {
|
|
398
398
|
root: e,
|
|
399
|
-
draggable:
|
|
399
|
+
draggable: Ae("draggable")
|
|
400
400
|
};
|
|
401
401
|
} },
|
|
402
402
|
emits: [
|
|
@@ -406,10 +406,10 @@ var ke = j("vue-handler-wrapper"), Ae = {
|
|
|
406
406
|
"drag-end"
|
|
407
407
|
]
|
|
408
408
|
};
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
return
|
|
412
|
-
class:
|
|
409
|
+
je.render = function(e, t, r, a, s, c) {
|
|
410
|
+
var l = i("DraggableElement");
|
|
411
|
+
return o(), b("div", { class: c.classes.root }, [f(l, {
|
|
412
|
+
class: c.classes.draggable,
|
|
413
413
|
onDrag: t[1] ||= function(t) {
|
|
414
414
|
return e.$emit("drag", t);
|
|
415
415
|
},
|
|
@@ -423,15 +423,15 @@ Ae.render = function(e, t, n, a, o, s) {
|
|
|
423
423
|
return e.$emit("enter");
|
|
424
424
|
}
|
|
425
425
|
}, {
|
|
426
|
-
default:
|
|
427
|
-
return [
|
|
426
|
+
default: u((function() {
|
|
427
|
+
return [n(e.$slots, "default")];
|
|
428
428
|
})),
|
|
429
429
|
_: 3
|
|
430
430
|
}, 8, ["class"])], 2);
|
|
431
431
|
};
|
|
432
|
-
var
|
|
432
|
+
var Me = A("vue-line-wrapper"), Ne = {
|
|
433
433
|
name: "LineWrapper",
|
|
434
|
-
components: { DraggableElement:
|
|
434
|
+
components: { DraggableElement: ke },
|
|
435
435
|
props: {
|
|
436
436
|
position: {
|
|
437
437
|
type: String,
|
|
@@ -444,7 +444,7 @@ var je = j("vue-line-wrapper"), Me = {
|
|
|
444
444
|
},
|
|
445
445
|
computed: { classname: function() {
|
|
446
446
|
var e;
|
|
447
|
-
return
|
|
447
|
+
return Me((C(e = {}, this.position, !0), C(e, "disabled", this.disabled), e));
|
|
448
448
|
} },
|
|
449
449
|
emits: [
|
|
450
450
|
"leave",
|
|
@@ -453,10 +453,10 @@ var je = j("vue-line-wrapper"), Me = {
|
|
|
453
453
|
"drag-end"
|
|
454
454
|
]
|
|
455
455
|
};
|
|
456
|
-
|
|
457
|
-
var
|
|
458
|
-
return
|
|
459
|
-
class:
|
|
456
|
+
Ne.render = function(e, t, r, a, s, c) {
|
|
457
|
+
var l = i("DraggableElement");
|
|
458
|
+
return o(), b(l, {
|
|
459
|
+
class: c.classname,
|
|
460
460
|
onDrag: t[1] ||= function(t) {
|
|
461
461
|
return e.$emit("drag", t);
|
|
462
462
|
},
|
|
@@ -470,29 +470,29 @@ Me.render = function(e, t, n, a, o, s) {
|
|
|
470
470
|
return e.$emit("enter");
|
|
471
471
|
}
|
|
472
472
|
}, {
|
|
473
|
-
default:
|
|
474
|
-
return [
|
|
473
|
+
default: u((function() {
|
|
474
|
+
return [n(e.$slots, "default")];
|
|
475
475
|
})),
|
|
476
476
|
_: 3
|
|
477
477
|
}, 8, ["class"]);
|
|
478
478
|
};
|
|
479
|
-
var
|
|
479
|
+
var B = [
|
|
480
480
|
"left",
|
|
481
481
|
"right",
|
|
482
482
|
"top",
|
|
483
483
|
"bottom"
|
|
484
|
-
],
|
|
484
|
+
], Pe = ["left", "right"], Fe = ["top", "bottom"], Ie = ["left", "top"], Le = [
|
|
485
485
|
"fill-area",
|
|
486
486
|
"fit-area",
|
|
487
487
|
"stencil",
|
|
488
488
|
"none"
|
|
489
|
-
],
|
|
489
|
+
], Re = {
|
|
490
490
|
left: 0,
|
|
491
491
|
top: 0,
|
|
492
492
|
width: 0,
|
|
493
493
|
height: 0
|
|
494
494
|
};
|
|
495
|
-
function
|
|
495
|
+
function ze(e, t, n) {
|
|
496
496
|
return !(n ||= [
|
|
497
497
|
"width",
|
|
498
498
|
"height",
|
|
@@ -502,7 +502,7 @@ function Re(e, t, n) {
|
|
|
502
502
|
return e[n] !== t[n];
|
|
503
503
|
}));
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function V(e) {
|
|
506
506
|
return {
|
|
507
507
|
left: e.left,
|
|
508
508
|
top: e.top,
|
|
@@ -510,31 +510,31 @@ function H(e) {
|
|
|
510
510
|
bottom: e.top + e.height
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function H(e, t) {
|
|
514
514
|
return {
|
|
515
515
|
left: e.left - t.left,
|
|
516
516
|
top: e.top - t.top
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function U(e) {
|
|
520
520
|
return {
|
|
521
521
|
left: e.left + e.width / 2,
|
|
522
522
|
top: e.top + e.height / 2
|
|
523
523
|
};
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function Be(e, t) {
|
|
526
526
|
var n = {
|
|
527
527
|
left: 0,
|
|
528
528
|
top: 0,
|
|
529
529
|
right: 0,
|
|
530
530
|
bottom: 0
|
|
531
531
|
};
|
|
532
|
-
return
|
|
533
|
-
var i = t[r], a =
|
|
532
|
+
return B.forEach((function(r) {
|
|
533
|
+
var i = t[r], a = V(e)[r];
|
|
534
534
|
n[r] = i !== void 0 && a !== void 0 ? r === "left" || r === "top" ? Math.max(0, i - a) : Math.max(0, a - i) : 0;
|
|
535
535
|
})), n;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function W(e, t) {
|
|
538
538
|
return {
|
|
539
539
|
left: e.left - t.left,
|
|
540
540
|
top: e.top - t.top,
|
|
@@ -542,22 +542,22 @@ function G(e, t) {
|
|
|
542
542
|
height: e.height + t.top + t.bottom
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Ve(e) {
|
|
546
546
|
return {
|
|
547
547
|
left: -e.left,
|
|
548
548
|
top: -e.top
|
|
549
549
|
};
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
return
|
|
551
|
+
function G(e, t) {
|
|
552
|
+
return M(M({}, e), {
|
|
553
553
|
left: e.left + t.left,
|
|
554
554
|
top: e.top + t.top
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function K(e, t, n, r) {
|
|
558
558
|
if (t !== 1) {
|
|
559
559
|
if (n) {
|
|
560
|
-
var i =
|
|
560
|
+
var i = U(e);
|
|
561
561
|
return {
|
|
562
562
|
width: e.width * t,
|
|
563
563
|
height: e.height * t,
|
|
@@ -574,17 +574,17 @@ function q(e, t, n, r) {
|
|
|
574
574
|
}
|
|
575
575
|
return e;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function q(e) {
|
|
578
578
|
return e.width / e.height;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function J(e, t) {
|
|
581
581
|
return Math.min(t.right !== void 0 && t.left !== void 0 ? (t.right - t.left) / e.width : 1 / 0, t.bottom !== void 0 && t.top !== void 0 ? (t.bottom - t.top) / e.height : 1 / 0);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Y(e, t) {
|
|
584
584
|
var n = {
|
|
585
585
|
left: 0,
|
|
586
586
|
top: 0
|
|
587
|
-
}, r =
|
|
587
|
+
}, r = Be(e, t);
|
|
588
588
|
return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
|
|
589
589
|
}
|
|
590
590
|
function He(e, t) {
|
|
@@ -592,7 +592,7 @@ function He(e, t) {
|
|
|
592
592
|
return t.minimum && e < t.minimum ? n = t.minimum : t.maximum && e > t.maximum && (n = t.maximum), n;
|
|
593
593
|
}
|
|
594
594
|
function Ue(e, t) {
|
|
595
|
-
var n =
|
|
595
|
+
var n = q(e), r = q(t);
|
|
596
596
|
return t.width < 1 / 0 && t.height < 1 / 0 ? n > r ? {
|
|
597
597
|
width: t.width,
|
|
598
598
|
height: t.width / n
|
|
@@ -622,13 +622,13 @@ function X(e, t) {
|
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
624
|
function Ge(e, t) {
|
|
625
|
-
var n =
|
|
626
|
-
return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width,
|
|
625
|
+
var n = Be(Z(e, t), t);
|
|
626
|
+
return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, J(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, J(e, t)) : 1;
|
|
627
627
|
}
|
|
628
628
|
function Z(e, t, n) {
|
|
629
629
|
n === void 0 && (n = !1);
|
|
630
|
-
var r =
|
|
631
|
-
return
|
|
630
|
+
var r = Y(e, t);
|
|
631
|
+
return G(e, n ? Ve(r) : r);
|
|
632
632
|
}
|
|
633
633
|
function Ke(e) {
|
|
634
634
|
return {
|
|
@@ -637,7 +637,7 @@ function Ke(e) {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
function qe(e, t) {
|
|
640
|
-
return
|
|
640
|
+
return M(M({}, e), {
|
|
641
641
|
minWidth: Math.min(t.width, e.minWidth),
|
|
642
642
|
minHeight: Math.min(t.height, e.minHeight),
|
|
643
643
|
maxWidth: Math.min(t.width, e.maxWidth),
|
|
@@ -647,7 +647,7 @@ function qe(e, t) {
|
|
|
647
647
|
function Je(e, t, n) {
|
|
648
648
|
n === void 0 && (n = !0);
|
|
649
649
|
var r = {};
|
|
650
|
-
return
|
|
650
|
+
return B.forEach((function(i) {
|
|
651
651
|
var a = e[i], o = t[i];
|
|
652
652
|
a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
|
|
653
653
|
})), r;
|
|
@@ -657,7 +657,7 @@ function Ye(e, t) {
|
|
|
657
657
|
}
|
|
658
658
|
function Xe(e) {
|
|
659
659
|
var t = e.size, n = e.aspectRatio, r = e.ignoreMinimum, i = e.sizeRestrictions;
|
|
660
|
-
return !!((t.correctRatio ||
|
|
660
|
+
return !!((t.correctRatio || q(t) >= n.minimum && q(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
|
|
661
661
|
}
|
|
662
662
|
function Ze(e, t) {
|
|
663
663
|
return (e.width - t.width) ** 2 + (e.height - t.height) ** 2;
|
|
@@ -709,28 +709,28 @@ function Q(e) {
|
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
711
|
function Qe(e) {
|
|
712
|
-
var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a =
|
|
713
|
-
return
|
|
712
|
+
var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = G(n, t.directions);
|
|
713
|
+
return G(a, Y(a, i));
|
|
714
714
|
}
|
|
715
715
|
function $e(e) {
|
|
716
716
|
var t = e.coordinates, n = e.transform, r = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, o = e.aspectRatio, s = e.visibleArea, c = function(e, t) {
|
|
717
717
|
return Qe({
|
|
718
718
|
coordinates: e,
|
|
719
719
|
positionRestrictions: a,
|
|
720
|
-
event: new
|
|
720
|
+
event: new De({
|
|
721
721
|
left: t.left - e.left,
|
|
722
722
|
top: t.top - e.top
|
|
723
723
|
})
|
|
724
724
|
});
|
|
725
|
-
}, l =
|
|
725
|
+
}, l = M({}, t);
|
|
726
726
|
return (Array.isArray(n) ? n : [n]).forEach((function(e) {
|
|
727
727
|
var t = {};
|
|
728
|
-
|
|
728
|
+
L((t = typeof e == "function" ? e({
|
|
729
729
|
coordinates: l,
|
|
730
730
|
imageSize: r,
|
|
731
731
|
visibleArea: s
|
|
732
|
-
}) : e).width) &&
|
|
733
|
-
return c(
|
|
732
|
+
}) : e).width) && L(t.height) || (l = function(e, t) {
|
|
733
|
+
return c(M(M(M({}, e), Q({
|
|
734
734
|
width: t.width,
|
|
735
735
|
height: t.height,
|
|
736
736
|
sizeRestrictions: i,
|
|
@@ -742,7 +742,7 @@ function $e(e) {
|
|
|
742
742
|
left: e.left,
|
|
743
743
|
top: e.top
|
|
744
744
|
});
|
|
745
|
-
}(l,
|
|
745
|
+
}(l, M(M({}, l), t))), L(t.left) && L(t.top) || (l = c(l, M(M({}, l), t)));
|
|
746
746
|
})), l;
|
|
747
747
|
}
|
|
748
748
|
function et(e) {
|
|
@@ -751,25 +751,25 @@ function et(e) {
|
|
|
751
751
|
e.aspectRatio;
|
|
752
752
|
var a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions;
|
|
753
753
|
e.stencilReference;
|
|
754
|
-
var c, l, u, d =
|
|
755
|
-
c =
|
|
754
|
+
var c, l, u, d = M({}, r), f = M({}, i), p = M({}, a);
|
|
755
|
+
c = q(p), l = q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = M(M({}, d), Q({
|
|
756
756
|
sizeRestrictions: o,
|
|
757
757
|
width: d.width,
|
|
758
758
|
height: d.height,
|
|
759
759
|
aspectRatio: {
|
|
760
|
-
minimum:
|
|
761
|
-
maximum:
|
|
760
|
+
minimum: q(p),
|
|
761
|
+
maximum: q(p)
|
|
762
762
|
}
|
|
763
763
|
})));
|
|
764
|
-
var m = Ge(f =
|
|
764
|
+
var m = Ge(f = K(f, d.width * n.width / (f.width * p.width)), t({
|
|
765
765
|
visibleArea: f,
|
|
766
766
|
type: "resize"
|
|
767
767
|
}));
|
|
768
|
-
return m !== 1 && (f =
|
|
768
|
+
return m !== 1 && (f = K(f, m), d = K(d, m)), f = Z(f = G(f, H(U(d), U(f))), t({
|
|
769
769
|
visibleArea: f,
|
|
770
770
|
type: "move"
|
|
771
771
|
})), {
|
|
772
|
-
coordinates: d = Z(d, Ye(
|
|
772
|
+
coordinates: d = Z(d, Ye(V(f), s)),
|
|
773
773
|
visibleArea: f
|
|
774
774
|
};
|
|
775
775
|
}
|
|
@@ -778,21 +778,21 @@ function tt(e) {
|
|
|
778
778
|
e.aspectRatio, e.stencilSize, e.sizeRestrictions;
|
|
779
779
|
var o = e.positionRestrictions;
|
|
780
780
|
e.stencilReference;
|
|
781
|
-
var s =
|
|
781
|
+
var s = M({}, i), c = M({}, a);
|
|
782
782
|
if (i && a && t.type !== "manipulateImage") {
|
|
783
783
|
var l = {
|
|
784
784
|
width: 0,
|
|
785
785
|
height: 0
|
|
786
786
|
};
|
|
787
|
-
c.width, r.width,
|
|
788
|
-
var u = Ge(c =
|
|
787
|
+
c.width, r.width, q(r) > q(s) ? (l.height = .8 * r.height, l.width = l.height * q(s)) : (l.width = .8 * r.width, l.height = l.width * q(s));
|
|
788
|
+
var u = Ge(c = K(c, s.width * r.width / (c.width * l.width)), n({
|
|
789
789
|
visibleArea: c,
|
|
790
790
|
type: "resize"
|
|
791
791
|
}));
|
|
792
|
-
c =
|
|
792
|
+
c = K(c, u), u !== 1 && (l.height /= u, l.width /= u), c = Z(c = G(c, H(U(s), U(c))), n({
|
|
793
793
|
visibleArea: c,
|
|
794
794
|
type: "move"
|
|
795
|
-
})), s = Z(s, Ye(
|
|
795
|
+
})), s = Z(s, Ye(V(c), o));
|
|
796
796
|
}
|
|
797
797
|
return {
|
|
798
798
|
coordinates: s,
|
|
@@ -800,16 +800,16 @@ function tt(e) {
|
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
802
|
function nt(e) {
|
|
803
|
-
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a =
|
|
803
|
+
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = M({}, r), o = M({}, n);
|
|
804
804
|
if (t.type === "setCoordinates") {
|
|
805
805
|
var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
|
|
806
|
-
s > c ? a =
|
|
806
|
+
s > c ? a = K(a, Math.min(o.width / a.width, J(a, i({
|
|
807
807
|
visibleArea: a,
|
|
808
808
|
type: "resize"
|
|
809
|
-
})))) : c > s && (a =
|
|
809
|
+
})))) : c > s && (a = K(a, Math.min(o.height / a.height, J(a, i({
|
|
810
810
|
visibleArea: a,
|
|
811
811
|
type: "resize"
|
|
812
|
-
}))))), a = Z(a =
|
|
812
|
+
}))))), a = Z(a = G(a, Ve(Y(o, V(a)))), i({
|
|
813
813
|
visibleArea: a,
|
|
814
814
|
type: "move"
|
|
815
815
|
}));
|
|
@@ -827,21 +827,21 @@ function rt(e) {
|
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
829
|
function it(e) {
|
|
830
|
-
var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0,
|
|
830
|
+
var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0, q(a))), s = a.width < a.height ? {
|
|
831
831
|
width: .8 * a.width,
|
|
832
832
|
height: .8 * a.width / o
|
|
833
833
|
} : {
|
|
834
834
|
height: .8 * a.height,
|
|
835
835
|
width: .8 * a.height * o
|
|
836
836
|
};
|
|
837
|
-
return Q(
|
|
837
|
+
return Q(M(M({}, s), {
|
|
838
838
|
aspectRatio: r,
|
|
839
839
|
sizeRestrictions: i
|
|
840
840
|
}));
|
|
841
841
|
}
|
|
842
842
|
function at(e) {
|
|
843
843
|
var t, n, r = e.imageSize, i = e.visibleArea, a = e.boundaries, o = e.aspectRatio, s = e.sizeRestrictions, c = e.stencilSize, l = i || r;
|
|
844
|
-
return
|
|
844
|
+
return q(l) > q(a) ? n = (t = c.height * l.height / a.height) * q(c) : t = (n = c.width * l.width / a.width) / q(c), Q({
|
|
845
845
|
width: n,
|
|
846
846
|
height: t,
|
|
847
847
|
aspectRatio: o,
|
|
@@ -849,26 +849,26 @@ function at(e) {
|
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
851
|
function ot(e) {
|
|
852
|
-
var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i =
|
|
852
|
+
var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = q(e.boundaries);
|
|
853
853
|
if (n) {
|
|
854
854
|
var a = {
|
|
855
855
|
height: Math.max(n.height, r.height),
|
|
856
856
|
width: Math.max(n.width, r.width)
|
|
857
857
|
}, o = Ue({
|
|
858
|
-
width:
|
|
859
|
-
height:
|
|
858
|
+
width: q(a) > i ? a.width : a.height * i,
|
|
859
|
+
height: q(a) > i ? a.width / i : a.height
|
|
860
860
|
}, Ke(t())), s = {
|
|
861
861
|
left: n.left + n.width / 2 - o.width / 2,
|
|
862
862
|
top: n.top + n.height / 2 - o.height / 2,
|
|
863
863
|
width: o.width,
|
|
864
864
|
height: o.height
|
|
865
|
-
}, c =
|
|
865
|
+
}, c = Be(n, V(M({
|
|
866
866
|
left: 0,
|
|
867
867
|
top: 0
|
|
868
868
|
}, r))), l = {};
|
|
869
869
|
return !c.left && !c.right && s.width <= r.width && (l.left = 0, l.right = r.width), !c.top && !c.bottom && s.height <= r.height && (l.top = 0, l.bottom = r.height), Z(s, l);
|
|
870
870
|
}
|
|
871
|
-
var u =
|
|
871
|
+
var u = q(r);
|
|
872
872
|
return o = {
|
|
873
873
|
height: u > i ? r.height : r.width / i,
|
|
874
874
|
width: u > i ? r.height * i : r.width
|
|
@@ -880,58 +880,58 @@ function ot(e) {
|
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
function st(e, t) {
|
|
883
|
-
return Je(e,
|
|
883
|
+
return Je(e, V(t));
|
|
884
884
|
}
|
|
885
885
|
function ct(e) {
|
|
886
|
-
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u =
|
|
887
|
-
u =
|
|
886
|
+
var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = M({}, r), d = M({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
|
|
887
|
+
u = G(u, {
|
|
888
888
|
left: l.left || 0,
|
|
889
889
|
top: l.top || 0
|
|
890
890
|
});
|
|
891
891
|
var h = {
|
|
892
892
|
stencil: {
|
|
893
893
|
minimum: Math.max(i.minWidth ? i.minWidth / d.width : 0, i.minHeight ? i.minHeight / d.height : 0),
|
|
894
|
-
maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0,
|
|
894
|
+
maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, J(d, o))
|
|
895
895
|
},
|
|
896
|
-
area: { maximum:
|
|
896
|
+
area: { maximum: J(u, a({
|
|
897
897
|
visibleArea: u,
|
|
898
898
|
type: "resize"
|
|
899
899
|
})) }
|
|
900
900
|
};
|
|
901
|
-
c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u =
|
|
902
|
-
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top,
|
|
903
|
-
return u = Z(u =
|
|
901
|
+
c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = K(u, p, c.center));
|
|
902
|
+
var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, ee = r.height + r.top - (n.height + n.top);
|
|
903
|
+
return u = Z(u = G(u, Y(u, {
|
|
904
904
|
left: o.left === void 0 ? void 0 : o.left - g * p,
|
|
905
905
|
top: o.top === void 0 ? void 0 : o.top - v * p,
|
|
906
|
-
bottom: o.bottom === void 0 ? void 0 : o.bottom +
|
|
906
|
+
bottom: o.bottom === void 0 ? void 0 : o.bottom + ee * p,
|
|
907
907
|
right: o.right === void 0 ? void 0 : o.right + _ * p
|
|
908
908
|
})), a({
|
|
909
909
|
visibleArea: u,
|
|
910
910
|
type: "move"
|
|
911
|
-
})), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = Z(d, Ye(
|
|
911
|
+
})), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = Z(d, Ye(V(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = G(u = Z(u = K(u, f, c.factor > 1 ? c.center : U(d)), a({
|
|
912
912
|
visibleArea: u,
|
|
913
913
|
type: "move"
|
|
914
|
-
})),
|
|
914
|
+
})), Ve(Y(d, V(u)))))), {
|
|
915
915
|
coordinates: d,
|
|
916
916
|
visibleArea: u
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
919
|
function lt(e) {
|
|
920
|
-
var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u =
|
|
920
|
+
var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = M({}, r), d = M({}, i), f = X(U(M({
|
|
921
921
|
left: 0,
|
|
922
922
|
top: 0
|
|
923
923
|
}, c)), l);
|
|
924
|
-
return (u =
|
|
924
|
+
return (u = M(M({}, Q({
|
|
925
925
|
sizeRestrictions: a,
|
|
926
926
|
aspectRatio: t,
|
|
927
927
|
width: u.width,
|
|
928
928
|
height: u.height
|
|
929
|
-
})), X(
|
|
929
|
+
})), X(U(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = K(d, Ge(d, n({
|
|
930
930
|
visibleArea: d,
|
|
931
931
|
type: "resize"
|
|
932
932
|
}))), {
|
|
933
933
|
coordinates: u = Z(u, o),
|
|
934
|
-
visibleArea: d = Z(d =
|
|
934
|
+
visibleArea: d = Z(d = G(d, H(U(u), U(r))), n({
|
|
935
935
|
visibleArea: d,
|
|
936
936
|
type: "move"
|
|
937
937
|
}))
|
|
@@ -940,19 +940,19 @@ function lt(e) {
|
|
|
940
940
|
function ut(e) {
|
|
941
941
|
var t = e.flip, n = e.previousFlip, r = e.rotate;
|
|
942
942
|
e.aspectRatio;
|
|
943
|
-
var i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c =
|
|
943
|
+
var i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = M({}, a), l = M({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
|
|
944
944
|
if (u || d) {
|
|
945
945
|
var f = X({
|
|
946
946
|
left: s.width / 2,
|
|
947
947
|
top: s.height / 2
|
|
948
|
-
}, -r), p = X(
|
|
948
|
+
}, -r), p = X(U(c), -r), m = X({
|
|
949
949
|
left: u ? f.left - (p.left - f.left) : p.left,
|
|
950
950
|
top: d ? f.top - (p.top - f.top) : p.top
|
|
951
951
|
}, r);
|
|
952
|
-
c =
|
|
952
|
+
c = G(c, H(m, U(c))), p = X(U(l), -r), l = Z(l = G(l, H(m = X({
|
|
953
953
|
left: u ? f.left - (p.left - f.left) : p.left,
|
|
954
954
|
top: d ? f.top - (p.top - f.top) : p.top
|
|
955
|
-
}, r),
|
|
955
|
+
}, r), U(l))), i({
|
|
956
956
|
visibleArea: l,
|
|
957
957
|
type: "move"
|
|
958
958
|
}));
|
|
@@ -963,10 +963,10 @@ function ut(e) {
|
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
965
|
function dt(e) {
|
|
966
|
-
var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c =
|
|
966
|
+
var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = M({}, t), l = W(n, c).width, u = W(n, c).height;
|
|
967
967
|
l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
|
|
968
|
-
var d =
|
|
969
|
-
s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d =
|
|
968
|
+
var d = Be(W(n, c), i);
|
|
969
|
+
s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = Be(W(n, c), i));
|
|
970
970
|
var f = {
|
|
971
971
|
width: 1 / 0,
|
|
972
972
|
height: 1 / 0,
|
|
@@ -975,27 +975,27 @@ function dt(e) {
|
|
|
975
975
|
top: 1 / 0,
|
|
976
976
|
bottom: 1 / 0
|
|
977
977
|
};
|
|
978
|
-
if (
|
|
978
|
+
if (B.forEach((function(e) {
|
|
979
979
|
var t = d[e];
|
|
980
980
|
t && c[e] && (f[e] = Math.max(0, 1 - t / c[e]));
|
|
981
981
|
})), o) {
|
|
982
|
-
var p = Math.min.apply(null,
|
|
982
|
+
var p = Math.min.apply(null, B.map((function(e) {
|
|
983
983
|
return f[e];
|
|
984
984
|
})));
|
|
985
|
-
p !== 1 / 0 &&
|
|
985
|
+
p !== 1 / 0 && B.forEach((function(e) {
|
|
986
986
|
c[e] *= p;
|
|
987
987
|
}));
|
|
988
|
-
} else
|
|
988
|
+
} else B.forEach((function(e) {
|
|
989
989
|
f[e] !== 1 / 0 && (c[e] *= f[e]);
|
|
990
990
|
}));
|
|
991
|
-
if (l =
|
|
991
|
+
if (l = W(n, c).width, u = W(n, c).height, c.right + c.left && (l > a.maxWidth ? f.width = (a.maxWidth - n.width) / (c.right + c.left) : l < a.minWidth && (f.width = (a.minWidth - n.width) / (c.right + c.left))), c.bottom + c.top && (u > a.maxHeight ? f.height = (a.maxHeight - n.height) / (c.bottom + c.top) : u < a.minHeight && (f.height = (a.minHeight - n.height) / (c.bottom + c.top))), o) {
|
|
992
992
|
var m = Math.min(f.width, f.height);
|
|
993
|
-
m !== 1 / 0 &&
|
|
993
|
+
m !== 1 / 0 && B.forEach((function(e) {
|
|
994
994
|
c[e] *= m;
|
|
995
995
|
}));
|
|
996
|
-
} else f.width !== 1 / 0 &&
|
|
996
|
+
} else f.width !== 1 / 0 && Pe.forEach((function(e) {
|
|
997
997
|
c[e] *= f.width;
|
|
998
|
-
})), f.height !== 1 / 0 &&
|
|
998
|
+
})), f.height !== 1 / 0 && Fe.forEach((function(e) {
|
|
999
999
|
c[e] *= f.height;
|
|
1000
1000
|
}));
|
|
1001
1001
|
return c;
|
|
@@ -1003,9 +1003,9 @@ function dt(e) {
|
|
|
1003
1003
|
function ft(e, t, n) {
|
|
1004
1004
|
return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
|
|
1005
1005
|
}
|
|
1006
|
-
var pt =
|
|
1006
|
+
var pt = A("vue-simple-handler"), mt = A("vue-simple-handler-wrapper"), ht = {
|
|
1007
1007
|
name: "SimpleHandler",
|
|
1008
|
-
components: { HandlerWrapper:
|
|
1008
|
+
components: { HandlerWrapper: je },
|
|
1009
1009
|
props: {
|
|
1010
1010
|
defaultClass: { type: String },
|
|
1011
1011
|
hoverClass: { type: String },
|
|
@@ -1021,10 +1021,10 @@ var pt = j("vue-simple-handler"), mt = j("vue-simple-handler-wrapper"), ht = {
|
|
|
1021
1021
|
return { hover: !1 };
|
|
1022
1022
|
},
|
|
1023
1023
|
computed: { classes: function() {
|
|
1024
|
-
var e, t = (
|
|
1024
|
+
var e, t = (C(e = {}, this.horizontalPosition, !!this.horizontalPosition), C(e, this.verticalPosition, !!this.verticalPosition), C(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), C(e, "hover", this.hover), e);
|
|
1025
1025
|
return {
|
|
1026
|
-
default:
|
|
1027
|
-
wrapper:
|
|
1026
|
+
default: k(pt(t), this.defaultClass, this.hover && this.hoverClass),
|
|
1027
|
+
wrapper: k(mt(t), this.wrapperClass)
|
|
1028
1028
|
};
|
|
1029
1029
|
} },
|
|
1030
1030
|
methods: {
|
|
@@ -1043,9 +1043,9 @@ var pt = j("vue-simple-handler"), mt = j("vue-simple-handler-wrapper"), ht = {
|
|
|
1043
1043
|
},
|
|
1044
1044
|
emits: ["drag", "drag-end"]
|
|
1045
1045
|
};
|
|
1046
|
-
ht.render = function(e, t, n,
|
|
1047
|
-
var c =
|
|
1048
|
-
return
|
|
1046
|
+
ht.render = function(e, t, n, r, a, s) {
|
|
1047
|
+
var c = i("HandlerWrapper");
|
|
1048
|
+
return o(), b(c, {
|
|
1049
1049
|
class: s.classes.wrapper,
|
|
1050
1050
|
"vertical-position": n.verticalPosition,
|
|
1051
1051
|
"horizontal-position": n.horizontalPosition,
|
|
@@ -1055,8 +1055,8 @@ ht.render = function(e, t, n, a, o, s) {
|
|
|
1055
1055
|
onEnter: s.onEnter,
|
|
1056
1056
|
onLeave: s.onLeave
|
|
1057
1057
|
}, {
|
|
1058
|
-
default:
|
|
1059
|
-
return [
|
|
1058
|
+
default: u((function() {
|
|
1059
|
+
return [f("div", { class: s.classes.default }, null, 2)];
|
|
1060
1060
|
})),
|
|
1061
1061
|
_: 1
|
|
1062
1062
|
}, 8, [
|
|
@@ -1070,9 +1070,9 @@ ht.render = function(e, t, n, a, o, s) {
|
|
|
1070
1070
|
"onLeave"
|
|
1071
1071
|
]);
|
|
1072
1072
|
};
|
|
1073
|
-
var gt =
|
|
1073
|
+
var gt = A("vue-simple-line"), _t = A("vue-simple-line-wrapper"), vt = {
|
|
1074
1074
|
name: "SimpleLine",
|
|
1075
|
-
components: { LineWrapper:
|
|
1075
|
+
components: { LineWrapper: Ne },
|
|
1076
1076
|
props: {
|
|
1077
1077
|
defaultClass: { type: String },
|
|
1078
1078
|
hoverClass: { type: String },
|
|
@@ -1088,8 +1088,8 @@ var gt = j("vue-simple-line"), _t = j("vue-simple-line-wrapper"), vt = {
|
|
|
1088
1088
|
},
|
|
1089
1089
|
computed: { classes: function() {
|
|
1090
1090
|
return {
|
|
1091
|
-
root:
|
|
1092
|
-
wrapper:
|
|
1091
|
+
root: k(gt(C({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
|
|
1092
|
+
wrapper: k(_t(C({}, this.position, !0)), this.wrapperClass)
|
|
1093
1093
|
};
|
|
1094
1094
|
} },
|
|
1095
1095
|
methods: {
|
|
@@ -1108,9 +1108,9 @@ var gt = j("vue-simple-line"), _t = j("vue-simple-line-wrapper"), vt = {
|
|
|
1108
1108
|
},
|
|
1109
1109
|
emits: ["drag", "drag-end"]
|
|
1110
1110
|
};
|
|
1111
|
-
vt.render = function(e, t, n,
|
|
1112
|
-
var c =
|
|
1113
|
-
return
|
|
1111
|
+
vt.render = function(e, t, n, r, a, s) {
|
|
1112
|
+
var c = i("LineWrapper");
|
|
1113
|
+
return o(), b(c, {
|
|
1114
1114
|
class: s.classes.wrapper,
|
|
1115
1115
|
position: n.position,
|
|
1116
1116
|
disabled: n.disabled,
|
|
@@ -1119,8 +1119,8 @@ vt.render = function(e, t, n, a, o, s) {
|
|
|
1119
1119
|
onEnter: s.onEnter,
|
|
1120
1120
|
onLeave: s.onLeave
|
|
1121
1121
|
}, {
|
|
1122
|
-
default:
|
|
1123
|
-
return [
|
|
1122
|
+
default: u((function() {
|
|
1123
|
+
return [f("div", { class: s.classes.root }, null, 2)];
|
|
1124
1124
|
})),
|
|
1125
1125
|
_: 1
|
|
1126
1126
|
}, 8, [
|
|
@@ -1133,7 +1133,7 @@ vt.render = function(e, t, n, a, o, s) {
|
|
|
1133
1133
|
"onLeave"
|
|
1134
1134
|
]);
|
|
1135
1135
|
};
|
|
1136
|
-
var yt =
|
|
1136
|
+
var yt = A("vue-bounding-box"), bt = [
|
|
1137
1137
|
"east",
|
|
1138
1138
|
"west",
|
|
1139
1139
|
null
|
|
@@ -1219,7 +1219,7 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1219
1219
|
return bt.forEach((function(t) {
|
|
1220
1220
|
xt.forEach((function(n) {
|
|
1221
1221
|
if (t !== n) {
|
|
1222
|
-
var r =
|
|
1222
|
+
var r = N(t, n), i = r.name, a = r.classname;
|
|
1223
1223
|
e.push({
|
|
1224
1224
|
name: i,
|
|
1225
1225
|
classname: a,
|
|
@@ -1251,8 +1251,8 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1251
1251
|
n.horizontalDirection && n.verticalDirection || !e.lines[n.name] || t.push({
|
|
1252
1252
|
name: n.name,
|
|
1253
1253
|
component: e.linesComponent,
|
|
1254
|
-
class:
|
|
1255
|
-
wrapperClass:
|
|
1254
|
+
class: k(e.classes.lines.default, e.classes.lines[n.name], !e.resizable && e.classes.lines.disabled),
|
|
1255
|
+
wrapperClass: k(e.classes.linesWrappers.default, e.classes.linesWrappers[n.name], !e.resizable && e.classes.linesWrappers.disabled),
|
|
1256
1256
|
hoverClass: e.classes.lines.hover,
|
|
1257
1257
|
verticalDirection: n.verticalDirection,
|
|
1258
1258
|
horizontalDirection: n.horizontalDirection,
|
|
@@ -1267,8 +1267,8 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1267
1267
|
var a = {
|
|
1268
1268
|
name: i.name,
|
|
1269
1269
|
component: e.handlersComponent,
|
|
1270
|
-
class:
|
|
1271
|
-
wrapperClass:
|
|
1270
|
+
class: k(e.classes.handlers.default, e.classes.handlers[i.name]),
|
|
1271
|
+
wrapperClass: k(e.classes.handlersWrappers.default, e.classes.handlersWrappers[i.name]),
|
|
1272
1272
|
hoverClass: e.classes.handlers.hover,
|
|
1273
1273
|
verticalDirection: i.verticalDirection,
|
|
1274
1274
|
horizontalDirection: i.horizontalDirection,
|
|
@@ -1277,7 +1277,7 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1277
1277
|
if (n && r) {
|
|
1278
1278
|
var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
|
|
1279
1279
|
a.wrapperClass = yt("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
|
|
1280
|
-
} else a.wrapperClass = yt("handler",
|
|
1280
|
+
} else a.wrapperClass = yt("handler", C({}, i.classname, !0));
|
|
1281
1281
|
t.push(a);
|
|
1282
1282
|
}
|
|
1283
1283
|
})), t;
|
|
@@ -1303,7 +1303,7 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1303
1303
|
top: 0,
|
|
1304
1304
|
bottom: 0
|
|
1305
1305
|
};
|
|
1306
|
-
t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new
|
|
1306
|
+
t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new Ee(s, {
|
|
1307
1307
|
allowedDirections: {
|
|
1308
1308
|
left: t === "west" || !t,
|
|
1309
1309
|
right: t === "east" || !t,
|
|
@@ -1317,15 +1317,15 @@ var yt = j("vue-bounding-box"), bt = [
|
|
|
1317
1317
|
},
|
|
1318
1318
|
emits: ["resize", "resize-end"]
|
|
1319
1319
|
};
|
|
1320
|
-
St.render = function(e, t,
|
|
1321
|
-
return
|
|
1320
|
+
St.render = function(e, t, r, i, s, l) {
|
|
1321
|
+
return o(), b("div", {
|
|
1322
1322
|
ref: "box",
|
|
1323
|
-
class:
|
|
1324
|
-
style:
|
|
1323
|
+
class: l.classes.root,
|
|
1324
|
+
style: l.style
|
|
1325
1325
|
}, [
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
return
|
|
1326
|
+
n(e.$slots, "default"),
|
|
1327
|
+
f("div", null, [(o(!0), b(te, null, c(l.lineNodes, (function(e) {
|
|
1328
|
+
return o(), b(a(e.component), {
|
|
1329
1329
|
key: e.name,
|
|
1330
1330
|
"default-class": e.class,
|
|
1331
1331
|
"hover-class": e.hoverClass,
|
|
@@ -1333,10 +1333,10 @@ St.render = function(e, t, n, r, i, o) {
|
|
|
1333
1333
|
position: e.name,
|
|
1334
1334
|
disabled: e.disabled,
|
|
1335
1335
|
onDrag: function(t) {
|
|
1336
|
-
return
|
|
1336
|
+
return l.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1337
1337
|
},
|
|
1338
1338
|
onDragEnd: t[1] ||= function(e) {
|
|
1339
|
-
return
|
|
1339
|
+
return l.onEnd();
|
|
1340
1340
|
}
|
|
1341
1341
|
}, null, 8, [
|
|
1342
1342
|
"default-class",
|
|
@@ -1347,12 +1347,12 @@ St.render = function(e, t, n, r, i, o) {
|
|
|
1347
1347
|
"onDrag"
|
|
1348
1348
|
]);
|
|
1349
1349
|
})), 128))]),
|
|
1350
|
-
(
|
|
1351
|
-
return
|
|
1350
|
+
(o(!0), b(te, null, c(l.handlerNodes, (function(e) {
|
|
1351
|
+
return o(), b("div", {
|
|
1352
1352
|
key: e.name,
|
|
1353
1353
|
style: e.wrapperStyle,
|
|
1354
1354
|
class: e.wrapperClass
|
|
1355
|
-
}, [(
|
|
1355
|
+
}, [(o(), b(a(e.component), {
|
|
1356
1356
|
"default-class": e.class,
|
|
1357
1357
|
"hover-class": e.hoverClass,
|
|
1358
1358
|
"wrapper-class": e.wrapperClass,
|
|
@@ -1360,10 +1360,10 @@ St.render = function(e, t, n, r, i, o) {
|
|
|
1360
1360
|
"vertical-position": e.verticalDirection,
|
|
1361
1361
|
disabled: e.disabled,
|
|
1362
1362
|
onDrag: function(t) {
|
|
1363
|
-
return
|
|
1363
|
+
return l.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1364
1364
|
},
|
|
1365
1365
|
onDragEnd: t[2] ||= function(e) {
|
|
1366
|
-
return
|
|
1366
|
+
return l.onEnd();
|
|
1367
1367
|
}
|
|
1368
1368
|
}, null, 8, [
|
|
1369
1369
|
"default-class",
|
|
@@ -1377,7 +1377,7 @@ St.render = function(e, t, n, r, i, o) {
|
|
|
1377
1377
|
})), 128))
|
|
1378
1378
|
], 6);
|
|
1379
1379
|
};
|
|
1380
|
-
var Ct =
|
|
1380
|
+
var Ct = A("vue-draggable-area"), wt = {
|
|
1381
1381
|
name: "DraggableArea",
|
|
1382
1382
|
props: {
|
|
1383
1383
|
movable: {
|
|
@@ -1405,14 +1405,14 @@ var Ct = j("vue-draggable-area"), wt = {
|
|
|
1405
1405
|
onTouchStart: function(e) {
|
|
1406
1406
|
if (e.cancelable) {
|
|
1407
1407
|
var t = this.movable && e.touches.length === 1;
|
|
1408
|
-
t && (this.touches =
|
|
1408
|
+
t && (this.touches = w(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
|
|
1409
1409
|
}
|
|
1410
1410
|
},
|
|
1411
1411
|
onTouchEnd: function() {
|
|
1412
1412
|
this.touchStarted = !1, this.processEnd();
|
|
1413
1413
|
},
|
|
1414
1414
|
onTouchMove: function(e) {
|
|
1415
|
-
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) :
|
|
1415
|
+
this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : Te({
|
|
1416
1416
|
x: this.touches[0].clientX,
|
|
1417
1417
|
y: this.touches[0].clientY
|
|
1418
1418
|
}, {
|
|
@@ -1451,10 +1451,10 @@ var Ct = j("vue-draggable-area"), wt = {
|
|
|
1451
1451
|
};
|
|
1452
1452
|
},
|
|
1453
1453
|
processMove: function(e, t) {
|
|
1454
|
-
var n =
|
|
1454
|
+
var n = w(t);
|
|
1455
1455
|
if (this.touches.length) {
|
|
1456
1456
|
var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
|
|
1457
|
-
this.touches.length === 1 && n.length === 1 && this.$emit("move", new
|
|
1457
|
+
this.touches.length === 1 && n.length === 1 && this.$emit("move", new De({
|
|
1458
1458
|
left: n[0].clientX - (i + this.anchor.x),
|
|
1459
1459
|
top: n[0].clientY - (a + this.anchor.y)
|
|
1460
1460
|
}));
|
|
@@ -1466,16 +1466,16 @@ var Ct = j("vue-draggable-area"), wt = {
|
|
|
1466
1466
|
},
|
|
1467
1467
|
emits: ["move", "move-end"]
|
|
1468
1468
|
};
|
|
1469
|
-
wt.render = function(e, t,
|
|
1470
|
-
return
|
|
1469
|
+
wt.render = function(e, t, r, i, a, s) {
|
|
1470
|
+
return o(), b("div", {
|
|
1471
1471
|
ref: "container",
|
|
1472
1472
|
onTouchstart: t[1] ||= function() {
|
|
1473
|
-
return
|
|
1473
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
1474
1474
|
},
|
|
1475
1475
|
onMousedown: t[2] ||= function() {
|
|
1476
|
-
return
|
|
1476
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
1477
1477
|
}
|
|
1478
|
-
}, [
|
|
1478
|
+
}, [n(e.$slots, "default")], 544);
|
|
1479
1479
|
};
|
|
1480
1480
|
function Tt(e) {
|
|
1481
1481
|
return {
|
|
@@ -1563,7 +1563,7 @@ function kt(e, t) {
|
|
|
1563
1563
|
return e.forEach((function(t) {
|
|
1564
1564
|
a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
|
|
1565
1565
|
})), e.forEach((function(e) {
|
|
1566
|
-
o +=
|
|
1566
|
+
o += Te({
|
|
1567
1567
|
x: a.left,
|
|
1568
1568
|
y: a.top
|
|
1569
1569
|
}, {
|
|
@@ -1606,18 +1606,18 @@ var At = {
|
|
|
1606
1606
|
window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
|
|
1607
1607
|
},
|
|
1608
1608
|
created: function() {
|
|
1609
|
-
this.transforming = !1, this.debouncedProcessEnd =
|
|
1609
|
+
this.transforming = !1, this.debouncedProcessEnd = be(this.processEnd), this.touches = [];
|
|
1610
1610
|
},
|
|
1611
1611
|
methods: {
|
|
1612
1612
|
processMove: function(e, t) {
|
|
1613
1613
|
if (this.touches.length) {
|
|
1614
|
-
if (this.touches.length === 1 && t.length === 1) this.$emit("move", new
|
|
1614
|
+
if (this.touches.length === 1 && t.length === 1) this.$emit("move", new z({
|
|
1615
1615
|
left: this.touches[0].clientX - t[0].clientX,
|
|
1616
1616
|
top: this.touches[0].clientY - t[0].clientY
|
|
1617
1617
|
}));
|
|
1618
1618
|
else if (this.touches.length > 1 && this.touchResize) {
|
|
1619
1619
|
var n = kt(t, this.$refs.container), r = this.oldGeometricProperties;
|
|
1620
|
-
r.count === n.count && r.count > 1 && this.$emit("resize", new
|
|
1620
|
+
r.count === n.count && r.count > 1 && this.$emit("resize", new z({
|
|
1621
1621
|
left: r.centerMass.left - n.centerMass.left,
|
|
1622
1622
|
top: r.centerMass.top - n.centerMass.top
|
|
1623
1623
|
}, {
|
|
@@ -1640,7 +1640,7 @@ var At = {
|
|
|
1640
1640
|
onTouchStart: function(e) {
|
|
1641
1641
|
if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
|
|
1642
1642
|
var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
|
|
1643
|
-
this.touches =
|
|
1643
|
+
this.touches = w(e.touches).filter((function(e) {
|
|
1644
1644
|
return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
|
|
1645
1645
|
})), this.oldGeometricProperties = kt(this.touches, t);
|
|
1646
1646
|
}
|
|
@@ -1651,7 +1651,7 @@ var At = {
|
|
|
1651
1651
|
onTouchMove: function(e) {
|
|
1652
1652
|
var t = this;
|
|
1653
1653
|
if (this.touches.length) {
|
|
1654
|
-
var n =
|
|
1654
|
+
var n = w(e.touches).filter((function(e) {
|
|
1655
1655
|
return !e.identifier || t.touches.find((function(t) {
|
|
1656
1656
|
return t.identifier === e.identifier;
|
|
1657
1657
|
}));
|
|
@@ -1680,11 +1680,11 @@ var At = {
|
|
|
1680
1680
|
},
|
|
1681
1681
|
onWheel: function(e) {
|
|
1682
1682
|
if (this.wheelResize && this.processEvent(e)) {
|
|
1683
|
-
var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 ||
|
|
1683
|
+
var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || we(s) ? s : s > 0 ? 1 : -1), a = {
|
|
1684
1684
|
left: e.clientX - n,
|
|
1685
1685
|
top: e.clientY - r
|
|
1686
1686
|
};
|
|
1687
|
-
this.$emit("resize", new
|
|
1687
|
+
this.$emit("resize", new z({}, {
|
|
1688
1688
|
factor: i,
|
|
1689
1689
|
center: a
|
|
1690
1690
|
})), this.touches.length || this.debouncedProcessEnd();
|
|
@@ -1698,19 +1698,19 @@ var At = {
|
|
|
1698
1698
|
"transform-end"
|
|
1699
1699
|
]
|
|
1700
1700
|
};
|
|
1701
|
-
At.render = function(e, t,
|
|
1702
|
-
return
|
|
1701
|
+
At.render = function(e, t, r, i, a, s) {
|
|
1702
|
+
return o(), b("div", {
|
|
1703
1703
|
ref: "container",
|
|
1704
1704
|
onTouchstart: t[1] ||= function() {
|
|
1705
|
-
return
|
|
1705
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
1706
1706
|
},
|
|
1707
1707
|
onMousedown: t[2] ||= function() {
|
|
1708
|
-
return
|
|
1708
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
1709
1709
|
},
|
|
1710
1710
|
onWheel: t[3] ||= function() {
|
|
1711
|
-
return
|
|
1711
|
+
return s.onWheel && s.onWheel.apply(s, arguments);
|
|
1712
1712
|
}
|
|
1713
|
-
}, [
|
|
1713
|
+
}, [n(e.$slots, "default")], 544);
|
|
1714
1714
|
};
|
|
1715
1715
|
var jt = {
|
|
1716
1716
|
components: { TransformableImage: At },
|
|
@@ -1734,13 +1734,13 @@ var jt = {
|
|
|
1734
1734
|
},
|
|
1735
1735
|
emits: ["resize", "move"]
|
|
1736
1736
|
};
|
|
1737
|
-
jt.render = function(e, t,
|
|
1738
|
-
var
|
|
1739
|
-
return
|
|
1740
|
-
"touch-move":
|
|
1741
|
-
"touch-resize":
|
|
1742
|
-
"mouse-move":
|
|
1743
|
-
"wheel-resize":
|
|
1737
|
+
jt.render = function(e, t, r, a, s, c) {
|
|
1738
|
+
var l = i("transformable-image");
|
|
1739
|
+
return o(), b(l, {
|
|
1740
|
+
"touch-move": r.touchMove,
|
|
1741
|
+
"touch-resize": r.touchResize,
|
|
1742
|
+
"mouse-move": r.mouseMove,
|
|
1743
|
+
"wheel-resize": r.wheelResize,
|
|
1744
1744
|
onMove: t[1] ||= function(t) {
|
|
1745
1745
|
return e.$emit("move", t);
|
|
1746
1746
|
},
|
|
@@ -1748,8 +1748,8 @@ jt.render = function(e, t, n, a, o, s) {
|
|
|
1748
1748
|
return e.$emit("resize", t);
|
|
1749
1749
|
}
|
|
1750
1750
|
}, {
|
|
1751
|
-
default:
|
|
1752
|
-
return [
|
|
1751
|
+
default: u((function() {
|
|
1752
|
+
return [n(e.$slots, "default")];
|
|
1753
1753
|
})),
|
|
1754
1754
|
_: 3
|
|
1755
1755
|
}, 8, [
|
|
@@ -1759,7 +1759,7 @@ jt.render = function(e, t, n, a, o, s) {
|
|
|
1759
1759
|
"wheel-resize"
|
|
1760
1760
|
]);
|
|
1761
1761
|
};
|
|
1762
|
-
var Mt =
|
|
1762
|
+
var Mt = A("vue-preview"), Nt = {
|
|
1763
1763
|
props: {
|
|
1764
1764
|
coordinates: { type: Object },
|
|
1765
1765
|
transitions: { type: Object },
|
|
@@ -1792,7 +1792,7 @@ var Mt = j("vue-preview"), Nt = {
|
|
|
1792
1792
|
root: Mt({ fill: this.fill }),
|
|
1793
1793
|
wrapper: Mt("wrapper"),
|
|
1794
1794
|
imageWrapper: Mt("image-wrapper"),
|
|
1795
|
-
image:
|
|
1795
|
+
image: k(Mt("image"), this.imageClass)
|
|
1796
1796
|
};
|
|
1797
1797
|
},
|
|
1798
1798
|
style: function() {
|
|
@@ -1811,7 +1811,7 @@ var Mt = j("vue-preview"), Nt = {
|
|
|
1811
1811
|
},
|
|
1812
1812
|
imageStyle: function() {
|
|
1813
1813
|
if (this.coordinates && this.image) {
|
|
1814
|
-
var e = this.coordinates.width / this.size.width, t =
|
|
1814
|
+
var e = this.coordinates.width / this.size.width, t = S(S({
|
|
1815
1815
|
rotate: 0,
|
|
1816
1816
|
flip: {
|
|
1817
1817
|
horizontal: !1,
|
|
@@ -1884,30 +1884,30 @@ var Mt = j("vue-preview"), Nt = {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
};
|
|
1886
1886
|
Nt.render = function(e, t, n, r, i, a) {
|
|
1887
|
-
return
|
|
1887
|
+
return o(), b("div", {
|
|
1888
1888
|
ref: "root",
|
|
1889
1889
|
class: a.classes.root,
|
|
1890
1890
|
style: a.style
|
|
1891
|
-
}, [
|
|
1891
|
+
}, [f("div", {
|
|
1892
1892
|
ref: "wrapper",
|
|
1893
1893
|
class: a.classes.wrapper,
|
|
1894
1894
|
style: a.wrapperStyle
|
|
1895
|
-
}, [
|
|
1895
|
+
}, [d(f("img", {
|
|
1896
1896
|
ref: "image",
|
|
1897
1897
|
src: n.image && n.image.src,
|
|
1898
1898
|
class: a.classes.image,
|
|
1899
1899
|
style: a.imageStyle
|
|
1900
|
-
}, null, 14, ["src"]), [[
|
|
1900
|
+
}, null, 14, ["src"]), [[ae, n.image && n.image.src]])], 6)], 6);
|
|
1901
1901
|
};
|
|
1902
1902
|
var Pt = {
|
|
1903
1903
|
components: { Preview: Nt },
|
|
1904
1904
|
inheritAttrs: !1
|
|
1905
1905
|
};
|
|
1906
|
-
Pt.render = function(e,
|
|
1907
|
-
var
|
|
1908
|
-
return
|
|
1906
|
+
Pt.render = function(e, n, r, a, s, c) {
|
|
1907
|
+
var l = i("preview");
|
|
1908
|
+
return o(), b(l, t(e.$attrs, { fill: !0 }), null, 16);
|
|
1909
1909
|
};
|
|
1910
|
-
var Ft =
|
|
1910
|
+
var Ft = A("vue-rectangle-stencil"), It = {
|
|
1911
1911
|
name: "RectangleStencil",
|
|
1912
1912
|
components: {
|
|
1913
1913
|
StencilPreview: Pt,
|
|
@@ -1982,13 +1982,13 @@ var Ft = j("vue-rectangle-stencil"), It = {
|
|
|
1982
1982
|
computed: {
|
|
1983
1983
|
classes: function() {
|
|
1984
1984
|
return {
|
|
1985
|
-
stencil:
|
|
1985
|
+
stencil: k(Ft({
|
|
1986
1986
|
movable: this.movable,
|
|
1987
1987
|
moving: this.moving,
|
|
1988
1988
|
resizing: this.resizing
|
|
1989
1989
|
}), this.moving && this.movingClass, this.resizing && this.resizingClass),
|
|
1990
|
-
preview:
|
|
1991
|
-
boundingBox:
|
|
1990
|
+
preview: k(Ft("preview"), this.previewClass),
|
|
1991
|
+
boundingBox: k(Ft("bounding-box"), this.boundingBoxClass)
|
|
1992
1992
|
};
|
|
1993
1993
|
},
|
|
1994
1994
|
style: function() {
|
|
@@ -2027,12 +2027,12 @@ var Ft = j("vue-rectangle-stencil"), It = {
|
|
|
2027
2027
|
"move-end"
|
|
2028
2028
|
]
|
|
2029
2029
|
};
|
|
2030
|
-
It.render = function(e, t, n,
|
|
2031
|
-
var c =
|
|
2032
|
-
return
|
|
2030
|
+
It.render = function(e, t, n, r, a, s) {
|
|
2031
|
+
var c = i("stencil-preview"), l = i("draggable-area"), d = i("bounding-box");
|
|
2032
|
+
return o(), b("div", {
|
|
2033
2033
|
class: s.classes.stencil,
|
|
2034
2034
|
style: s.style
|
|
2035
|
-
}, [d
|
|
2035
|
+
}, [f(d, {
|
|
2036
2036
|
width: n.stencilCoordinates.width,
|
|
2037
2037
|
height: n.stencilCoordinates.height,
|
|
2038
2038
|
transitions: n.transitions,
|
|
@@ -2049,14 +2049,14 @@ It.render = function(e, t, n, a, o, s) {
|
|
|
2049
2049
|
onResize: s.onResize,
|
|
2050
2050
|
onResizeEnd: s.onResizeEnd
|
|
2051
2051
|
}, {
|
|
2052
|
-
default:
|
|
2053
|
-
return [
|
|
2052
|
+
default: u((function() {
|
|
2053
|
+
return [f(l, {
|
|
2054
2054
|
movable: n.movable,
|
|
2055
2055
|
onMove: s.onMove,
|
|
2056
2056
|
onMoveEnd: s.onMoveEnd
|
|
2057
2057
|
}, {
|
|
2058
|
-
default:
|
|
2059
|
-
return [
|
|
2058
|
+
default: u((function() {
|
|
2059
|
+
return [f(c, {
|
|
2060
2060
|
image: n.image,
|
|
2061
2061
|
coordinates: n.coordinates,
|
|
2062
2062
|
width: n.stencilCoordinates.width,
|
|
@@ -2098,7 +2098,7 @@ It.render = function(e, t, n, a, o, s) {
|
|
|
2098
2098
|
"onResizeEnd"
|
|
2099
2099
|
])], 6);
|
|
2100
2100
|
};
|
|
2101
|
-
var Lt = ["transitions"], $ =
|
|
2101
|
+
var Lt = ["transitions"], $ = A("vue-advanced-cropper"), Rt = {
|
|
2102
2102
|
name: "Cropper",
|
|
2103
2103
|
components: { BackgroundWrapper: jt },
|
|
2104
2104
|
props: {
|
|
@@ -2164,7 +2164,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2164
2164
|
type: String,
|
|
2165
2165
|
default: "fit-area",
|
|
2166
2166
|
validator: function(e) {
|
|
2167
|
-
return
|
|
2167
|
+
return Le.indexOf(e) !== -1;
|
|
2168
2168
|
}
|
|
2169
2169
|
},
|
|
2170
2170
|
roundResult: {
|
|
@@ -2198,24 +2198,24 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2198
2198
|
resizeAlgorithm: {
|
|
2199
2199
|
type: Function,
|
|
2200
2200
|
default: function(e) {
|
|
2201
|
-
var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o =
|
|
2201
|
+
var t = e.event, n = e.coordinates, r = e.aspectRatio, i = e.positionRestrictions, a = e.sizeRestrictions, o = M(M({}, n), {
|
|
2202
2202
|
right: n.left + n.width,
|
|
2203
2203
|
bottom: n.top + n.height
|
|
2204
|
-
}), s = t.params || {}, c =
|
|
2204
|
+
}), s = t.params || {}, c = M({}, t.directions), l = s.allowedDirections || {
|
|
2205
2205
|
left: !0,
|
|
2206
2206
|
right: !0,
|
|
2207
2207
|
bottom: !0,
|
|
2208
2208
|
top: !0
|
|
2209
2209
|
};
|
|
2210
|
-
a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0),
|
|
2210
|
+
a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), B.forEach((function(e) {
|
|
2211
2211
|
l[e] || (c[e] = 0);
|
|
2212
2212
|
}));
|
|
2213
|
-
var u =
|
|
2213
|
+
var u = W(o, c = dt({
|
|
2214
2214
|
coordinates: o,
|
|
2215
2215
|
directions: c,
|
|
2216
2216
|
sizeRestrictions: a,
|
|
2217
2217
|
positionRestrictions: i
|
|
2218
|
-
})).width, d =
|
|
2218
|
+
})).width, d = W(o, c).height, f = s.preserveRatio ? q(o) : He(u / d, r);
|
|
2219
2219
|
if (f) {
|
|
2220
2220
|
var p = s.respectDirection;
|
|
2221
2221
|
if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
|
|
@@ -2227,8 +2227,8 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2227
2227
|
} else if (p === "height") {
|
|
2228
2228
|
var _ = o.width - d * f;
|
|
2229
2229
|
if (l.left && l.right) {
|
|
2230
|
-
var v = c.left,
|
|
2231
|
-
c.left = -ft(_, v,
|
|
2230
|
+
var v = c.left, ee = c.right;
|
|
2231
|
+
c.left = -ft(_, v, ee), c.right = -ft(_, ee, v);
|
|
2232
2232
|
} else l.left ? c.left = -_ : l.right ? c.right = -_ : l.top ? c.top = 0 : l.bottom && (c.bottom = 0);
|
|
2233
2233
|
}
|
|
2234
2234
|
c = dt({
|
|
@@ -2240,10 +2240,10 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2240
2240
|
compensate: s.compensate
|
|
2241
2241
|
});
|
|
2242
2242
|
}
|
|
2243
|
-
return u =
|
|
2243
|
+
return u = W(o, c).width, d = W(o, c).height, (f = s.preserveRatio ? q(o) : He(u / d, r)) && Math.abs(f - u / d) > .001 && B.forEach((function(e) {
|
|
2244
2244
|
l[e] || (c[e] = 0);
|
|
2245
2245
|
})), Qe({
|
|
2246
|
-
event: new
|
|
2246
|
+
event: new De({
|
|
2247
2247
|
left: -c.left,
|
|
2248
2248
|
top: -c.top
|
|
2249
2249
|
}),
|
|
@@ -2264,14 +2264,14 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2264
2264
|
initStretcher: {
|
|
2265
2265
|
type: Function,
|
|
2266
2266
|
default: function(e) {
|
|
2267
|
-
var t = e.stretcher, n = e.imageSize, r =
|
|
2267
|
+
var t = e.stretcher, n = e.imageSize, r = q(n);
|
|
2268
2268
|
t.style.width = n.width + "px", t.style.height = t.clientWidth / r + "px", t.style.width = t.clientWidth + "px";
|
|
2269
2269
|
}
|
|
2270
2270
|
},
|
|
2271
2271
|
fitCoordinates: {
|
|
2272
2272
|
type: Function,
|
|
2273
2273
|
default: function(e) {
|
|
2274
|
-
var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o =
|
|
2274
|
+
var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = M(M({}, n), Q({
|
|
2275
2275
|
width: n.width,
|
|
2276
2276
|
height: n.height,
|
|
2277
2277
|
aspectRatio: r,
|
|
@@ -2282,19 +2282,19 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2282
2282
|
minWidth: Math.min(t.width, i.minWidth)
|
|
2283
2283
|
}
|
|
2284
2284
|
}));
|
|
2285
|
-
return o = Z(o =
|
|
2285
|
+
return o = Z(o = G(o, H(U(n), U(o))), Ye(V(t), a));
|
|
2286
2286
|
}
|
|
2287
2287
|
},
|
|
2288
2288
|
fitVisibleArea: {
|
|
2289
2289
|
type: Function,
|
|
2290
2290
|
default: function(e) {
|
|
2291
|
-
var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a =
|
|
2292
|
-
a.height = a.width /
|
|
2293
|
-
var o =
|
|
2291
|
+
var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = M({}, t);
|
|
2292
|
+
a.height = a.width / q(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = K(a, Math.max(i.height / a.height, i.width / a.width)));
|
|
2293
|
+
var o = Ve(Y(i, V(a = K(a, Ge(a, r({
|
|
2294
2294
|
visibleArea: a,
|
|
2295
2295
|
type: "resize"
|
|
2296
2296
|
}))))));
|
|
2297
|
-
return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = Z(a =
|
|
2297
|
+
return a.width < i.width && (o.left = 0), a.height < i.height && (o.top = 0), a = Z(a = G(a, o), r({
|
|
2298
2298
|
visibleArea: a,
|
|
2299
2299
|
type: "move"
|
|
2300
2300
|
}));
|
|
@@ -2309,7 +2309,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2309
2309
|
top: 0,
|
|
2310
2310
|
right: r.width,
|
|
2311
2311
|
bottom: r.height
|
|
2312
|
-
} : i === "fit-area" && (
|
|
2312
|
+
} : i === "fit-area" && (q(n) > q(r) ? (o = {
|
|
2313
2313
|
top: 0,
|
|
2314
2314
|
bottom: r.height
|
|
2315
2315
|
}, t && a === "move" && (t.width > r.width ? (o.left = -(t.width - r.width) / 2, o.right = r.width - o.left) : (o.left = 0, o.right = r.width))) : (o = {
|
|
@@ -2371,7 +2371,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2371
2371
|
height: 0
|
|
2372
2372
|
},
|
|
2373
2373
|
visibleArea: null,
|
|
2374
|
-
coordinates:
|
|
2374
|
+
coordinates: S({}, Re)
|
|
2375
2375
|
};
|
|
2376
2376
|
},
|
|
2377
2377
|
computed: {
|
|
@@ -2409,7 +2409,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2409
2409
|
return !!(this.visibleArea && this.imageLoaded);
|
|
2410
2410
|
},
|
|
2411
2411
|
settings: function() {
|
|
2412
|
-
var e =
|
|
2412
|
+
var e = Se(this.resizeImage, {
|
|
2413
2413
|
touch: !0,
|
|
2414
2414
|
wheel: { ratio: .1 },
|
|
2415
2415
|
adjustStencil: !0
|
|
@@ -2419,7 +2419,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2419
2419
|
adjustStencil: !1
|
|
2420
2420
|
});
|
|
2421
2421
|
return {
|
|
2422
|
-
moveImage:
|
|
2422
|
+
moveImage: Se(this.moveImage, {
|
|
2423
2423
|
touch: !0,
|
|
2424
2424
|
mouse: !0
|
|
2425
2425
|
}, {
|
|
@@ -2450,17 +2450,17 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2450
2450
|
if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
|
|
2451
2451
|
var e = this.sizeRestrictionsAlgorithm({
|
|
2452
2452
|
imageSize: this.imageSize,
|
|
2453
|
-
minWidth:
|
|
2454
|
-
minHeight:
|
|
2455
|
-
maxWidth:
|
|
2456
|
-
maxHeight:
|
|
2453
|
+
minWidth: L(this.minWidth) ? 0 : R(this.minWidth),
|
|
2454
|
+
minHeight: L(this.minHeight) ? 0 : R(this.minHeight),
|
|
2455
|
+
maxWidth: L(this.maxWidth) ? 1 / 0 : R(this.maxWidth),
|
|
2456
|
+
maxHeight: L(this.maxHeight) ? 1 / 0 : R(this.maxHeight)
|
|
2457
2457
|
});
|
|
2458
2458
|
if (e = function(e) {
|
|
2459
2459
|
var t = e.areaRestrictions, n = e.sizeRestrictions;
|
|
2460
2460
|
e.imageSize;
|
|
2461
2461
|
var r = e.boundaries, i = e.positionRestrictions;
|
|
2462
2462
|
e.imageRestriction;
|
|
2463
|
-
var a =
|
|
2463
|
+
var a = M(M({}, n), {
|
|
2464
2464
|
minWidth: n.minWidth === void 0 ? 0 : n.minWidth,
|
|
2465
2465
|
minHeight: n.minHeight === void 0 ? 0 : n.minHeight,
|
|
2466
2466
|
maxWidth: n.maxWidth === void 0 ? 1 / 0 : n.maxWidth,
|
|
@@ -2506,14 +2506,14 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2506
2506
|
classes: function() {
|
|
2507
2507
|
return {
|
|
2508
2508
|
cropper: $(),
|
|
2509
|
-
image:
|
|
2509
|
+
image: k($("image"), this.imageClass),
|
|
2510
2510
|
stencil: $("stencil"),
|
|
2511
|
-
boundaries:
|
|
2512
|
-
stretcher:
|
|
2513
|
-
background:
|
|
2514
|
-
foreground:
|
|
2515
|
-
imageWrapper:
|
|
2516
|
-
cropperWrapper:
|
|
2511
|
+
boundaries: k($("boundaries"), this.boundariesClass),
|
|
2512
|
+
stretcher: k($("stretcher")),
|
|
2513
|
+
background: k($("background"), this.backgroundClass),
|
|
2514
|
+
foreground: k($("foreground"), this.foregroundClass),
|
|
2515
|
+
imageWrapper: k($("image-wrapper")),
|
|
2516
|
+
cropperWrapper: k($("cropper-wrapper"))
|
|
2517
2517
|
};
|
|
2518
2518
|
},
|
|
2519
2519
|
stencilCoordinates: function() {
|
|
@@ -2550,7 +2550,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2550
2550
|
}, n = {
|
|
2551
2551
|
left: (1 - 1 / this.coefficient) * e.width / 2,
|
|
2552
2552
|
top: (1 - 1 / this.coefficient) * e.height / 2
|
|
2553
|
-
}, r =
|
|
2553
|
+
}, r = S(S({}, this.imageTransforms), {}, {
|
|
2554
2554
|
scaleX: this.imageTransforms.scaleX * (this.imageAttributes.width / e.width),
|
|
2555
2555
|
scaleY: this.imageTransforms.scaleY * (this.imageAttributes.height / e.height)
|
|
2556
2556
|
}), i = {
|
|
@@ -2599,7 +2599,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
},
|
|
2601
2601
|
created: function() {
|
|
2602
|
-
this.debouncedUpdate =
|
|
2602
|
+
this.debouncedUpdate = be(this.update, this.debounce), this.debouncedDisableTransitions = be(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
|
|
2603
2603
|
},
|
|
2604
2604
|
mounted: function() {
|
|
2605
2605
|
this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
|
|
@@ -2609,16 +2609,16 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2609
2609
|
},
|
|
2610
2610
|
methods: {
|
|
2611
2611
|
getResult: function() {
|
|
2612
|
-
var e = this.initialized ? this.prepareResult(
|
|
2612
|
+
var e = this.initialized ? this.prepareResult(S({}, this.coordinates)) : this.defaultCoordinates(), t = {
|
|
2613
2613
|
rotate: this.imageTransforms.rotate % 360,
|
|
2614
|
-
flip:
|
|
2614
|
+
flip: S({}, this.imageTransforms.flip)
|
|
2615
2615
|
};
|
|
2616
2616
|
if (this.src && this.imageLoaded) {
|
|
2617
2617
|
var n = this;
|
|
2618
2618
|
return {
|
|
2619
2619
|
image: this.image,
|
|
2620
2620
|
coordinates: e,
|
|
2621
|
-
visibleArea: this.visibleArea ?
|
|
2621
|
+
visibleArea: this.visibleArea ? S({}, this.visibleArea) : null,
|
|
2622
2622
|
imageTransforms: t,
|
|
2623
2623
|
get canvas() {
|
|
2624
2624
|
return n.canvas ? n.getCanvas() : void 0;
|
|
@@ -2628,14 +2628,14 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2628
2628
|
return {
|
|
2629
2629
|
image: this.image,
|
|
2630
2630
|
coordinates: e,
|
|
2631
|
-
visibleArea: this.visibleArea ?
|
|
2631
|
+
visibleArea: this.visibleArea ? S({}, this.visibleArea) : null,
|
|
2632
2632
|
canvas: void 0,
|
|
2633
2633
|
imageTransforms: t
|
|
2634
2634
|
};
|
|
2635
2635
|
},
|
|
2636
2636
|
zoom: function(e, t) {
|
|
2637
2637
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
2638
|
-
this.onManipulateImage(new
|
|
2638
|
+
this.onManipulateImage(new z({}, {
|
|
2639
2639
|
factor: 1 / e,
|
|
2640
2640
|
center: t
|
|
2641
2641
|
}), {
|
|
@@ -2645,7 +2645,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2645
2645
|
},
|
|
2646
2646
|
move: function(e, t) {
|
|
2647
2647
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
2648
|
-
this.onManipulateImage(new
|
|
2648
|
+
this.onManipulateImage(new z({
|
|
2649
2649
|
left: e || 0,
|
|
2650
2650
|
top: t || 0
|
|
2651
2651
|
}), {
|
|
@@ -2688,7 +2688,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2688
2688
|
top: Math.round(t.top)
|
|
2689
2689
|
};
|
|
2690
2690
|
return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), Z(i, r);
|
|
2691
|
-
}(
|
|
2691
|
+
}(S(S({}, this.getPublicProperties()), {}, {
|
|
2692
2692
|
positionRestrictions: st(this.positionRestrictions, this.visibleArea),
|
|
2693
2693
|
coordinates: e
|
|
2694
2694
|
})) : e;
|
|
@@ -2710,16 +2710,16 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2710
2710
|
sizeRestrictions: this.sizeRestrictions,
|
|
2711
2711
|
stencilSize: this.getStencilSize()
|
|
2712
2712
|
});
|
|
2713
|
-
return
|
|
2713
|
+
return S(S({}, a), {}, { changed: !ze(a.visibleArea, t) || !ze(a.coordinates, n) });
|
|
2714
2714
|
},
|
|
2715
2715
|
runAutoZoom: function(e) {
|
|
2716
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i =
|
|
2716
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = ye(t, Lt), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
|
|
2717
2717
|
r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
|
|
2718
2718
|
},
|
|
2719
2719
|
normalizeEvent: function(e) {
|
|
2720
2720
|
return function(e) {
|
|
2721
2721
|
var t = e.event, n = e.visibleArea, r = e.coefficient;
|
|
2722
|
-
if (t.type === "manipulateImage") return
|
|
2722
|
+
if (t.type === "manipulateImage") return M(M({}, t), {
|
|
2723
2723
|
move: {
|
|
2724
2724
|
left: t.move && t.move.left ? r * t.move.left : 0,
|
|
2725
2725
|
top: t.move && t.move.top ? r * t.move.top : 0
|
|
@@ -2733,19 +2733,19 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2733
2733
|
}
|
|
2734
2734
|
});
|
|
2735
2735
|
if (t.type === "resize") {
|
|
2736
|
-
var i =
|
|
2737
|
-
return
|
|
2736
|
+
var i = M(M({}, t), { directions: M({}, t.directions) });
|
|
2737
|
+
return B.forEach((function(e) {
|
|
2738
2738
|
i.directions[e] *= r;
|
|
2739
2739
|
})), i;
|
|
2740
2740
|
}
|
|
2741
2741
|
if (t.type === "move") {
|
|
2742
|
-
var a =
|
|
2743
|
-
return
|
|
2742
|
+
var a = M(M({}, t), { directions: M({}, t.directions) });
|
|
2743
|
+
return Ie.forEach((function(e) {
|
|
2744
2744
|
a.directions[e] *= r;
|
|
2745
2745
|
})), a;
|
|
2746
2746
|
}
|
|
2747
2747
|
return t;
|
|
2748
|
-
}(
|
|
2748
|
+
}(S(S({}, this.getPublicProperties()), {}, { event: e }));
|
|
2749
2749
|
},
|
|
2750
2750
|
getCanvas: function() {
|
|
2751
2751
|
if (this.$refs.canvas) {
|
|
@@ -2755,12 +2755,12 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2755
2755
|
height: t.naturalHeight
|
|
2756
2756
|
}, o = We(a, r), s = e.getContext("2d");
|
|
2757
2757
|
e.height = o.height, e.width = o.width, s.save();
|
|
2758
|
-
var c = X(
|
|
2758
|
+
var c = X(U(M({
|
|
2759
2759
|
left: 0,
|
|
2760
2760
|
top: 0
|
|
2761
2761
|
}, a)), r);
|
|
2762
2762
|
return s.translate(-(c.left - o.width / 2), -(c.top - o.height / 2)), s.rotate(r * Math.PI / 180), s.translate(i.horizontal ? a.width : 0, i.vertical ? a.height : 0), s.scale(i.horizontal ? -1 : 1, i.vertical ? -1 : 1), s.drawImage(t, 0, 0, a.width, a.height), s.restore(), e;
|
|
2763
|
-
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r =
|
|
2763
|
+
}(this.$refs.sourceCanvas, t, this.imageTransforms) : t, r = S({
|
|
2764
2764
|
minWidth: 0,
|
|
2765
2765
|
minHeight: 0,
|
|
2766
2766
|
maxWidth: 1 / 0,
|
|
@@ -2827,7 +2827,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2827
2827
|
t ||= this.stencilSize ? at : it;
|
|
2828
2828
|
var n = this.sizeRestrictions;
|
|
2829
2829
|
n.minWidth, n.minHeight, n.maxWidth, n.maxHeight;
|
|
2830
|
-
var r =
|
|
2830
|
+
var r = I(t) ? t({
|
|
2831
2831
|
boundaries: this.boundaries,
|
|
2832
2832
|
imageSize: this.imageSize,
|
|
2833
2833
|
aspectRatio: this.getAspectRatio(),
|
|
@@ -2836,13 +2836,13 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2836
2836
|
visibleArea: this.visibleArea
|
|
2837
2837
|
}) : t, i = this.defaultPosition || rt, a = [r, function(t) {
|
|
2838
2838
|
var n = t.coordinates;
|
|
2839
|
-
return
|
|
2839
|
+
return S({}, I(i) ? i({
|
|
2840
2840
|
coordinates: n,
|
|
2841
2841
|
imageSize: e.imageSize,
|
|
2842
2842
|
visibleArea: e.visibleArea
|
|
2843
2843
|
}) : e.defaultPosition);
|
|
2844
2844
|
}];
|
|
2845
|
-
this.delayedTransforms && a.push.apply(a,
|
|
2845
|
+
this.delayedTransforms && a.push.apply(a, w(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(a, !0), this.delayedTransforms = null;
|
|
2846
2846
|
}
|
|
2847
2847
|
},
|
|
2848
2848
|
clearImage: function() {
|
|
@@ -2872,7 +2872,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2872
2872
|
cropper: n,
|
|
2873
2873
|
imageSize: e.imageSize
|
|
2874
2874
|
};
|
|
2875
|
-
if (e.boundaries =
|
|
2875
|
+
if (e.boundaries = I(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
|
|
2876
2876
|
var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
|
|
2877
2877
|
return o > i && (o = i, a = n.height * i / n.width), {
|
|
2878
2878
|
width: o,
|
|
@@ -2889,10 +2889,10 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2889
2889
|
},
|
|
2890
2890
|
resetVisibleArea: function() {
|
|
2891
2891
|
var e = this;
|
|
2892
|
-
return this.appliedImageTransforms =
|
|
2892
|
+
return this.appliedImageTransforms = S(S({}, this.defaultImageTransforms), {}, { flip: S({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
|
|
2893
2893
|
e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
|
|
2894
2894
|
var t, n, r, i, a, o, s = e.defaultVisibleArea || ot;
|
|
2895
|
-
e.visibleArea =
|
|
2895
|
+
e.visibleArea = I(s) ? s({
|
|
2896
2896
|
imageSize: e.imageSize,
|
|
2897
2897
|
boundaries: e.boundaries,
|
|
2898
2898
|
coordinates: e.priority === "visible-area" ? null : e.coordinates,
|
|
@@ -2902,7 +2902,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2902
2902
|
visibleArea: e.visibleArea,
|
|
2903
2903
|
boundaries: e.boundaries,
|
|
2904
2904
|
getAreaRestrictions: e.getAreaRestrictions
|
|
2905
|
-
}, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a =
|
|
2905
|
+
}, n = t.visibleArea, r = t.boundaries, i = t.getAreaRestrictions, a = M({}, n), o = q(r), a.width / a.height !== o && (a.height = a.width / o), Z(a, i({
|
|
2906
2906
|
visibleArea: a,
|
|
2907
2907
|
type: "move"
|
|
2908
2908
|
}))), e.priority === "visible-area" ? e.resetCoordinates() : e.coordinates = e.fitCoordinates({
|
|
@@ -2943,7 +2943,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2943
2943
|
var e, t = this;
|
|
2944
2944
|
if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
|
|
2945
2945
|
if (function(e) {
|
|
2946
|
-
if (
|
|
2946
|
+
if (F(e)) return !1;
|
|
2947
2947
|
var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
|
|
2948
2948
|
protocol: n[1] || "",
|
|
2949
2949
|
host: n[2] || "",
|
|
@@ -2953,7 +2953,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2953
2953
|
};
|
|
2954
2954
|
return !(!r.protocol && !r.host && !r.port || r.protocol && r.protocol == t.protocol && r.host && r.host == t.host && r.host && i(r) == i(t));
|
|
2955
2955
|
}(this.src)) {
|
|
2956
|
-
var n =
|
|
2956
|
+
var n = L(this.crossOrigin) ? this.canvas : this.crossOrigin;
|
|
2957
2957
|
!0 === n && (n = "anonymous"), this.imageAttributes.crossOrigin = n || null;
|
|
2958
2958
|
}
|
|
2959
2959
|
if (this.checkOrientation) {
|
|
@@ -2996,13 +2996,13 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
2996
2996
|
},
|
|
2997
2997
|
onParseImage: function(e) {
|
|
2998
2998
|
var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
|
|
2999
|
-
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ?
|
|
2999
|
+
this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? P(n) || !F(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
|
|
3000
3000
|
for (var t = [], n = new Uint8Array(e); n.length > 0;) {
|
|
3001
3001
|
var r = n.subarray(0, 8192);
|
|
3002
3002
|
t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
|
|
3003
3003
|
}
|
|
3004
3004
|
return "data:image/jpeg;base64," + btoa(t.join(""));
|
|
3005
|
-
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms =
|
|
3005
|
+
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms = I(this.defaultTransforms) ? Tt(this.defaultTransforms()) : xe(this.defaultTransforms) ? Tt(this.defaultTransforms) : function(e) {
|
|
3006
3006
|
var t = Tt({});
|
|
3007
3007
|
if (e) switch (e) {
|
|
3008
3008
|
case 2:
|
|
@@ -3026,7 +3026,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3026
3026
|
case 8: t.rotate = -90;
|
|
3027
3027
|
}
|
|
3028
3028
|
return t;
|
|
3029
|
-
}(i), this.defaultImageTransforms =
|
|
3029
|
+
}(i), this.defaultImageTransforms = S(S({}, this.appliedImageTransforms), {}, { flip: S({}, this.appliedImageTransforms.flip) }), this.$nextTick((function() {
|
|
3030
3030
|
var e = t.$refs.image;
|
|
3031
3031
|
e && e.complete && (function(e) {
|
|
3032
3032
|
return !!e.naturalWidth;
|
|
@@ -3042,7 +3042,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3042
3042
|
onMove: function(e) {
|
|
3043
3043
|
var t = this;
|
|
3044
3044
|
this.transitionsOptions.enabled || this.awaitRender((function() {
|
|
3045
|
-
t.coordinates = t.moveAlgorithm(
|
|
3045
|
+
t.coordinates = t.moveAlgorithm(S(S({}, t.getPublicProperties()), {}, {
|
|
3046
3046
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3047
3047
|
coordinates: t.coordinates,
|
|
3048
3048
|
event: t.normalizeEvent(e)
|
|
@@ -3053,7 +3053,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3053
3053
|
var t = this;
|
|
3054
3054
|
this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
|
|
3055
3055
|
var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
|
|
3056
|
-
t.coordinates = t.resizeAlgorithm(
|
|
3056
|
+
t.coordinates = t.resizeAlgorithm(S(S({}, t.getPublicProperties()), {}, {
|
|
3057
3057
|
positionRestrictions: st(t.positionRestrictions, t.visibleArea),
|
|
3058
3058
|
sizeRestrictions: {
|
|
3059
3059
|
maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
|
|
@@ -3070,7 +3070,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3070
3070
|
if (!this.transitionsOptions.enabled) {
|
|
3071
3071
|
var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
|
|
3072
3072
|
r && this.enableTransitions();
|
|
3073
|
-
var o = ct(
|
|
3073
|
+
var o = ct(S(S({}, this.getPublicProperties()), {}, {
|
|
3074
3074
|
event: a ? this.normalizeEvent(e) : e,
|
|
3075
3075
|
getAreaRestrictions: this.getAreaRestrictions,
|
|
3076
3076
|
imageRestriction: this.imageRestriction,
|
|
@@ -3098,9 +3098,9 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3098
3098
|
var s = this.$refs.stencil.aspectRatios();
|
|
3099
3099
|
t = s.minimum, n = s.maximum;
|
|
3100
3100
|
}
|
|
3101
|
-
if (
|
|
3102
|
-
var c = this.getStencilSize(), l = c ?
|
|
3103
|
-
|
|
3101
|
+
if (L(t) && (t = L(i) ? a : i), L(n) && (n = L(i) ? o : i), !e && (L(t) || L(n))) {
|
|
3102
|
+
var c = this.getStencilSize(), l = c ? q(c) : null;
|
|
3103
|
+
L(t) && (t = Ce(l) ? l : void 0), L(n) && (n = Ce(l) ? l : void 0);
|
|
3104
3104
|
}
|
|
3105
3105
|
return {
|
|
3106
3106
|
minimum: t,
|
|
@@ -3118,7 +3118,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3118
3118
|
coefficient: this.coefficient,
|
|
3119
3119
|
coordinates: this.coordinates,
|
|
3120
3120
|
aspectRatio: this.getAspectRatio(!0)
|
|
3121
|
-
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(
|
|
3121
|
+
}, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, He(q(i = I(n) ? n({
|
|
3122
3122
|
boundaries: t,
|
|
3123
3123
|
aspectRatio: r
|
|
3124
3124
|
}) : n), r) && (i = Q({
|
|
@@ -3144,8 +3144,8 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3144
3144
|
width: i.width,
|
|
3145
3145
|
height: i.height,
|
|
3146
3146
|
aspectRatio: {
|
|
3147
|
-
minimum:
|
|
3148
|
-
maximum:
|
|
3147
|
+
minimum: q(i),
|
|
3148
|
+
maximum: q(i)
|
|
3149
3149
|
}
|
|
3150
3150
|
})), i;
|
|
3151
3151
|
var e, t, n, r, i;
|
|
@@ -3163,13 +3163,13 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3163
3163
|
};
|
|
3164
3164
|
},
|
|
3165
3165
|
defaultCoordinates: function() {
|
|
3166
|
-
return
|
|
3166
|
+
return S({}, Re);
|
|
3167
3167
|
},
|
|
3168
3168
|
flip: function(e, t) {
|
|
3169
3169
|
var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
|
|
3170
3170
|
if (!this.transitionsActive) {
|
|
3171
3171
|
r && this.enableTransitions();
|
|
3172
|
-
var i =
|
|
3172
|
+
var i = S({}, this.imageTransforms.flip), a = ut({
|
|
3173
3173
|
flip: {
|
|
3174
3174
|
horizontal: e ? !i.horizontal : i.horizontal,
|
|
3175
3175
|
vertical: t ? !i.vertical : i.vertical
|
|
@@ -3191,7 +3191,7 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3191
3191
|
var t = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).transitions, n = t === void 0 || t;
|
|
3192
3192
|
if (!this.transitionsActive) {
|
|
3193
3193
|
n && this.enableTransitions();
|
|
3194
|
-
var r =
|
|
3194
|
+
var r = S({}, this.imageSize);
|
|
3195
3195
|
this.appliedImageTransforms.rotate += e;
|
|
3196
3196
|
var i = lt({
|
|
3197
3197
|
visibleArea: this.visibleArea,
|
|
@@ -3222,17 +3222,17 @@ var Lt = ["transitions"], $ = j("vue-advanced-cropper"), Rt = {
|
|
|
3222
3222
|
ref: "sourceCanvas",
|
|
3223
3223
|
style: { display: "none" }
|
|
3224
3224
|
};
|
|
3225
|
-
Rt.render = function(e,
|
|
3226
|
-
return
|
|
3225
|
+
Rt.render = function(e, n, r, i, s, c) {
|
|
3226
|
+
return o(), b("div", {
|
|
3227
3227
|
ref: "cropper",
|
|
3228
3228
|
class: c.classes.cropper
|
|
3229
|
-
}, [
|
|
3229
|
+
}, [f("div", {
|
|
3230
3230
|
ref: "stretcher",
|
|
3231
3231
|
class: c.classes.stretcher
|
|
3232
|
-
}, null, 2),
|
|
3232
|
+
}, null, 2), f("div", {
|
|
3233
3233
|
class: c.classes.boundaries,
|
|
3234
3234
|
style: c.boundariesStyle
|
|
3235
|
-
}, [(
|
|
3235
|
+
}, [(o(), b(a(r.backgroundWrapperComponent), {
|
|
3236
3236
|
class: c.classes.cropperWrapper,
|
|
3237
3237
|
"wheel-resize": c.settings.resizeImage.wheel,
|
|
3238
3238
|
"touch-resize": c.settings.resizeImage.touch,
|
|
@@ -3241,25 +3241,25 @@ Rt.render = function(e, t, r, o, s, c) {
|
|
|
3241
3241
|
onMove: c.onManipulateImage,
|
|
3242
3242
|
onResize: c.onManipulateImage
|
|
3243
3243
|
}, {
|
|
3244
|
-
default:
|
|
3244
|
+
default: u((function() {
|
|
3245
3245
|
return [
|
|
3246
|
-
|
|
3246
|
+
f("div", {
|
|
3247
3247
|
class: c.classes.background,
|
|
3248
3248
|
style: c.boundariesStyle
|
|
3249
3249
|
}, null, 6),
|
|
3250
|
-
|
|
3250
|
+
f("div", { class: c.classes.imageWrapper }, [f("img", {
|
|
3251
3251
|
ref: "image",
|
|
3252
3252
|
crossorigin: s.imageAttributes.crossOrigin,
|
|
3253
3253
|
src: s.imageAttributes.src,
|
|
3254
3254
|
class: c.classes.image,
|
|
3255
3255
|
style: c.imageStyle,
|
|
3256
|
-
onMousedown:
|
|
3256
|
+
onMousedown: n[1] ||= ie((function() {}), ["prevent"])
|
|
3257
3257
|
}, null, 46, ["crossorigin", "src"])], 2),
|
|
3258
|
-
|
|
3258
|
+
f("div", {
|
|
3259
3259
|
class: c.classes.foreground,
|
|
3260
3260
|
style: c.boundariesStyle
|
|
3261
3261
|
}, null, 6),
|
|
3262
|
-
|
|
3262
|
+
d((o(), b(a(r.stencilComponent), t({
|
|
3263
3263
|
ref: "stencil",
|
|
3264
3264
|
image: c.image,
|
|
3265
3265
|
coordinates: s.coordinates,
|
|
@@ -3279,9 +3279,9 @@ Rt.render = function(e, t, r, o, s, c) {
|
|
|
3279
3279
|
"onResizeEnd",
|
|
3280
3280
|
"onMove",
|
|
3281
3281
|
"onMoveEnd"
|
|
3282
|
-
])), [[
|
|
3283
|
-
r.canvas ? (
|
|
3284
|
-
r.canvas ? (
|
|
3282
|
+
])), [[ae, s.imageLoaded]]),
|
|
3283
|
+
r.canvas ? (o(), b("canvas", zt, null, 512)) : g("", !0),
|
|
3284
|
+
r.canvas ? (o(), b("canvas", Bt, null, 512)) : g("", !0)
|
|
3285
3285
|
];
|
|
3286
3286
|
})),
|
|
3287
3287
|
_: 1
|
|
@@ -3355,7 +3355,7 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3355
3355
|
role: "alert",
|
|
3356
3356
|
class: "tpl:shrink-0 tpl:px-5 tpl:pt-3 tpl:text-xs",
|
|
3357
3357
|
style: { color: "var(--tpl-danger)" }
|
|
3358
|
-
}, bn = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, xn = ["disabled"], Sn = ["disabled"], Cn = /*#__PURE__*/
|
|
3358
|
+
}, bn = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, xn = ["disabled"], Sn = ["disabled"], Cn = /*#__PURE__*/ se(/* @__PURE__ */ x({
|
|
3359
3359
|
__name: "MediaEditModal",
|
|
3360
3360
|
props: {
|
|
3361
3361
|
visible: { type: Boolean },
|
|
@@ -3364,16 +3364,16 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3364
3364
|
canCrop: { type: Boolean }
|
|
3365
3365
|
},
|
|
3366
3366
|
emits: ["close"],
|
|
3367
|
-
setup(
|
|
3368
|
-
let
|
|
3367
|
+
setup(t, { emit: n }) {
|
|
3368
|
+
let i = t, a = n, { t: x } = de(), ae = ne(ue, null), se = ne(ce, _(null)), ve = x.mediaLibrary, { isImageMimeType: S } = le(), C = _(""), ye = _(""), w = _(null), T = _("free"), E = _(void 0), D = _(void 0), O = _(""), k = _(""), A = _(void 0), j = _(null), be = _(!1), M = _(!1), N = _(!1), P = _(null), F = null, I = [
|
|
3369
3369
|
"image/jpeg",
|
|
3370
3370
|
"image/png",
|
|
3371
3371
|
"image/webp"
|
|
3372
|
-
],
|
|
3373
|
-
|
|
3374
|
-
e &&
|
|
3372
|
+
], L = m(() => !i.item || !i.canCrop ? !1 : I.includes(i.item.mimeType ?? "")), xe = m(() => E.value !== void 0 || D.value !== void 0), Se = m(() => T.value === "original" ? A.value : pe[T.value]), R = m(() => j.value ? _e(j.value.width, j.value.height, E.value, D.value) : null);
|
|
3373
|
+
e(() => i.visible, (e) => {
|
|
3374
|
+
e && i.item && (C.value = i.item.filename ?? "", ye.value = i.item.alt ?? "", T.value = "free", E.value = void 0, D.value = void 0, O.value = "", k.value = "", A.value = void 0, j.value = null, be.value = !1, N.value = !1, P.value = null, F = null, i.item.width && i.item.height && (A.value = i.item.width / i.item.height));
|
|
3375
3375
|
}, { immediate: !0 });
|
|
3376
|
-
function
|
|
3376
|
+
function Ce(e) {
|
|
3377
3377
|
return {
|
|
3378
3378
|
left: Math.round(e.left),
|
|
3379
3379
|
top: Math.round(e.top),
|
|
@@ -3381,67 +3381,67 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3381
3381
|
height: Math.round(e.height)
|
|
3382
3382
|
};
|
|
3383
3383
|
}
|
|
3384
|
-
function
|
|
3384
|
+
function we(e, t) {
|
|
3385
3385
|
return e.left === t.left && e.top === t.top && e.width === t.width && e.height === t.height;
|
|
3386
3386
|
}
|
|
3387
|
-
function
|
|
3387
|
+
function Te(e) {
|
|
3388
3388
|
if (!e.coordinates) return;
|
|
3389
|
-
let t =
|
|
3390
|
-
|
|
3389
|
+
let t = Ce(e.coordinates);
|
|
3390
|
+
j.value = {
|
|
3391
3391
|
width: t.width,
|
|
3392
3392
|
height: t.height
|
|
3393
|
-
},
|
|
3393
|
+
}, F ? N.value = !we(t, F) : F = t;
|
|
3394
3394
|
}
|
|
3395
|
-
function
|
|
3395
|
+
function z({ imageSize: e }) {
|
|
3396
3396
|
return {
|
|
3397
3397
|
width: e.width,
|
|
3398
3398
|
height: e.height
|
|
3399
3399
|
};
|
|
3400
3400
|
}
|
|
3401
|
-
function
|
|
3402
|
-
|
|
3401
|
+
function Ee() {
|
|
3402
|
+
be.value = !0, !A.value && i.item?.width && i.item?.height && (A.value = i.item.width / i.item.height);
|
|
3403
3403
|
}
|
|
3404
|
-
function
|
|
3404
|
+
function De(e) {
|
|
3405
3405
|
let t = e.target.value;
|
|
3406
|
-
|
|
3406
|
+
O.value = t, E.value = t && parseInt(t, 10) || void 0;
|
|
3407
3407
|
}
|
|
3408
|
-
function
|
|
3408
|
+
function Oe(e) {
|
|
3409
3409
|
let t = e.target.value;
|
|
3410
|
-
|
|
3410
|
+
k.value = t, D.value = t && parseInt(t, 10) || void 0;
|
|
3411
3411
|
}
|
|
3412
|
-
async function
|
|
3413
|
-
let e =
|
|
3414
|
-
if (!e || !
|
|
3415
|
-
let t =
|
|
3416
|
-
if (
|
|
3417
|
-
let { canvas: e } =
|
|
3412
|
+
async function ke() {
|
|
3413
|
+
let e = C.value.trim();
|
|
3414
|
+
if (!e || !i.item || M.value) return;
|
|
3415
|
+
let t = i.item, n = S(t.mimeType ?? ""), r;
|
|
3416
|
+
if (M.value = !0, P.value = null, L.value && w.value && (N.value || xe.value)) try {
|
|
3417
|
+
let { canvas: e } = w.value.getResult();
|
|
3418
3418
|
if (!e) throw Error("The cropper returned no canvas");
|
|
3419
|
-
let n =
|
|
3420
|
-
(
|
|
3419
|
+
let n = he(e, E.value, D.value);
|
|
3420
|
+
(N.value || n !== e) && (r = { file: await ge(n, t.filename ?? "image", me(t.mimeType ?? "")) });
|
|
3421
3421
|
} catch {
|
|
3422
|
-
|
|
3422
|
+
P.value = "crop", M.value = !1;
|
|
3423
3423
|
return;
|
|
3424
3424
|
}
|
|
3425
|
-
let
|
|
3426
|
-
|
|
3427
|
-
}
|
|
3428
|
-
function ke() {
|
|
3429
|
-
let e = T.value?.getResult().coordinates;
|
|
3430
|
-
e && (I = Se(e)), P.value = !1, D.value = void 0, O.value = void 0, k.value = "", A.value = "";
|
|
3425
|
+
let o = await i.save(t.id, e, n ? ye.value : void 0, r);
|
|
3426
|
+
M.value = !1, o === "saved" ? a("close") : (o === "replaced" && Ae(), P.value = "save");
|
|
3431
3427
|
}
|
|
3432
3428
|
function Ae() {
|
|
3433
|
-
|
|
3429
|
+
let e = w.value?.getResult().coordinates;
|
|
3430
|
+
e && (F = Ce(e)), N.value = !1, E.value = void 0, D.value = void 0, O.value = "", k.value = "";
|
|
3434
3431
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3432
|
+
function je() {
|
|
3433
|
+
M.value || a("close");
|
|
3434
|
+
}
|
|
3435
|
+
let Me = _(null), Ne = m(() => i.visible && i.item !== null);
|
|
3436
|
+
fe(Me, Ne);
|
|
3437
|
+
function B(e) {
|
|
3438
|
+
if (e.stopPropagation(), e.key === "Enter" && !M.value) {
|
|
3439
3439
|
if (e.target?.closest("textarea, [contenteditable]")) return;
|
|
3440
|
-
e.preventDefault(),
|
|
3440
|
+
e.preventDefault(), ke();
|
|
3441
3441
|
}
|
|
3442
|
-
e.key === "Escape" &&
|
|
3442
|
+
e.key === "Escape" && je();
|
|
3443
3443
|
}
|
|
3444
|
-
return (e,
|
|
3444
|
+
return (e, n) => (o(), b(p, { to: h(se) || "body" }, [f(oe, {
|
|
3445
3445
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
3446
3446
|
"enter-from-class": "tpl:opacity-0",
|
|
3447
3447
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -3449,36 +3449,36 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3449
3449
|
"leave-from-class": "tpl:opacity-100",
|
|
3450
3450
|
"leave-to-class": "tpl:opacity-0"
|
|
3451
3451
|
}, {
|
|
3452
|
-
default:
|
|
3452
|
+
default: u(() => [t.visible && t.item ? (o(), v("div", {
|
|
3453
3453
|
key: 0,
|
|
3454
|
-
"data-tpl-theme":
|
|
3455
|
-
class:
|
|
3454
|
+
"data-tpl-theme": h(ae),
|
|
3455
|
+
class: s([h(se) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
3456
3456
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
3457
|
-
onClick:
|
|
3458
|
-
onKeydown:
|
|
3457
|
+
onClick: ie(je, ["self"]),
|
|
3458
|
+
onKeydown: B
|
|
3459
3459
|
}, [y("div", {
|
|
3460
3460
|
ref_key: "dialogRef",
|
|
3461
|
-
ref:
|
|
3461
|
+
ref: Me,
|
|
3462
3462
|
role: "dialog",
|
|
3463
3463
|
"aria-modal": "true",
|
|
3464
3464
|
"aria-labelledby": "tpl-media-edit-title",
|
|
3465
|
-
class:
|
|
3465
|
+
class: s(["tpl:flex tpl:max-h-[90%] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", L.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
|
|
3466
3466
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
3467
3467
|
}, [
|
|
3468
|
-
y("div", Ht, [y("h3", Ut,
|
|
3468
|
+
y("div", Ht, [y("h3", Ut, r(h(x).mediaLibrary.editFile), 1)]),
|
|
3469
3469
|
y("div", Wt, [
|
|
3470
|
-
|
|
3470
|
+
L.value ? (o(), v("div", Gt, [y("div", Kt, [f(h(Rt), {
|
|
3471
3471
|
ref_key: "cropperRef",
|
|
3472
|
-
ref:
|
|
3473
|
-
src:
|
|
3474
|
-
"stencil-props": { aspectRatio:
|
|
3472
|
+
ref: w,
|
|
3473
|
+
src: t.item.url,
|
|
3474
|
+
"stencil-props": { aspectRatio: Se.value },
|
|
3475
3475
|
class: "tpl:h-full tpl:w-full",
|
|
3476
3476
|
"background-class": "tpl-cropper-background",
|
|
3477
|
-
"default-size":
|
|
3478
|
-
onChange:
|
|
3479
|
-
onReady:
|
|
3477
|
+
"default-size": z,
|
|
3478
|
+
onChange: Te,
|
|
3479
|
+
onReady: Ee
|
|
3480
3480
|
}, null, 8, ["src", "stencil-props"])]), y("div", qt, [
|
|
3481
|
-
y("div", null, [y("label", Jt,
|
|
3481
|
+
y("div", null, [y("label", Jt, r(h(x).mediaLibrary.cropAspectRatio), 1), y("div", Yt, [(o(), v(te, null, c([
|
|
3482
3482
|
"free",
|
|
3483
3483
|
"square",
|
|
3484
3484
|
"landscape43",
|
|
@@ -3488,15 +3488,15 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3488
3488
|
key: e,
|
|
3489
3489
|
type: "button",
|
|
3490
3490
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
3491
|
-
style:
|
|
3492
|
-
borderColor:
|
|
3493
|
-
backgroundColor:
|
|
3494
|
-
color:
|
|
3491
|
+
style: l({
|
|
3492
|
+
borderColor: T.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
3493
|
+
backgroundColor: T.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
|
|
3494
|
+
color: T.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
3495
3495
|
}),
|
|
3496
|
-
onClick: (t) =>
|
|
3497
|
-
},
|
|
3498
|
-
y("div", Zt, [y("div", Qt, [y("label", $t, [
|
|
3499
|
-
value:
|
|
3496
|
+
onClick: (t) => T.value = e
|
|
3497
|
+
}, r(h(ve)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Xt)), 64))])]),
|
|
3498
|
+
y("div", Zt, [y("div", Qt, [y("label", $t, [ee(r(h(x).mediaLibrary.cropMaxWidth) + " ", 1), y("span", en, r(h(x).mediaLibrary.cropOptional), 1)]), y("div", tn, [y("input", {
|
|
3499
|
+
value: O.value,
|
|
3500
3500
|
type: "number",
|
|
3501
3501
|
min: "1",
|
|
3502
3502
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -3505,10 +3505,10 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3505
3505
|
"background-color": "var(--tpl-bg)",
|
|
3506
3506
|
color: "var(--tpl-text)"
|
|
3507
3507
|
},
|
|
3508
|
-
placeholder:
|
|
3509
|
-
onInput:
|
|
3510
|
-
}, null, 40, nn), y("span", rn,
|
|
3511
|
-
value:
|
|
3508
|
+
placeholder: j.value?.width?.toString() || "",
|
|
3509
|
+
onInput: De
|
|
3510
|
+
}, null, 40, nn), y("span", rn, r(h(x).mediaLibrary.cropPixels), 1)])]), y("div", an, [y("label", on, [ee(r(h(x).mediaLibrary.cropMaxHeight) + " ", 1), y("span", sn, r(h(x).mediaLibrary.cropOptional), 1)]), y("div", cn, [y("input", {
|
|
3511
|
+
value: k.value,
|
|
3512
3512
|
type: "number",
|
|
3513
3513
|
min: "1",
|
|
3514
3514
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -3517,14 +3517,14 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3517
3517
|
"background-color": "var(--tpl-bg)",
|
|
3518
3518
|
color: "var(--tpl-text)"
|
|
3519
3519
|
},
|
|
3520
|
-
placeholder:
|
|
3521
|
-
onInput:
|
|
3522
|
-
}, null, 40, ln), y("span", un,
|
|
3523
|
-
|
|
3524
|
-
])])) :
|
|
3525
|
-
y("div", pn, [y("label", mn,
|
|
3520
|
+
placeholder: j.value?.height?.toString() || "",
|
|
3521
|
+
onInput: Oe
|
|
3522
|
+
}, null, 40, ln), y("span", un, r(h(x).mediaLibrary.cropPixels), 1)])])]),
|
|
3523
|
+
R.value ? (o(), v("div", dn, [y("span", null, r(h(x).mediaLibrary.cropOutputSize) + ": ", 1), y("span", fn, r(R.value.width) + " x " + r(R.value.height) + " " + r(h(x).mediaLibrary.cropPixels), 1)])) : g("", !0)
|
|
3524
|
+
])])) : g("", !0),
|
|
3525
|
+
y("div", pn, [y("label", mn, r(h(x).mediaLibrary.fileName), 1), d(y("input", {
|
|
3526
3526
|
id: "tpl-media-filename",
|
|
3527
|
-
"onUpdate:modelValue":
|
|
3527
|
+
"onUpdate:modelValue": n[0] ||= (e) => C.value = e,
|
|
3528
3528
|
type: "text",
|
|
3529
3529
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3530
3530
|
style: {
|
|
@@ -3532,11 +3532,11 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3532
3532
|
"background-color": "var(--tpl-bg)",
|
|
3533
3533
|
color: "var(--tpl-text)"
|
|
3534
3534
|
},
|
|
3535
|
-
autofocus: !
|
|
3536
|
-
}, null, 8, hn), [[
|
|
3537
|
-
|
|
3535
|
+
autofocus: !L.value
|
|
3536
|
+
}, null, 8, hn), [[re, C.value]])]),
|
|
3537
|
+
h(S)(t.item.mimeType ?? "") ? (o(), v("div", gn, [y("label", _n, r(h(x).mediaLibrary.altText), 1), d(y("input", {
|
|
3538
3538
|
id: "tpl-media-alt",
|
|
3539
|
-
"onUpdate:modelValue":
|
|
3539
|
+
"onUpdate:modelValue": n[1] ||= (e) => ye.value = e,
|
|
3540
3540
|
type: "text",
|
|
3541
3541
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
3542
3542
|
style: {
|
|
@@ -3544,10 +3544,10 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3544
3544
|
"background-color": "var(--tpl-bg)",
|
|
3545
3545
|
color: "var(--tpl-text)"
|
|
3546
3546
|
},
|
|
3547
|
-
placeholder:
|
|
3548
|
-
}, null, 8, vn), [[
|
|
3547
|
+
placeholder: h(x).mediaLibrary.altTextPlaceholder
|
|
3548
|
+
}, null, 8, vn), [[re, ye.value]])])) : g("", !0)
|
|
3549
3549
|
]),
|
|
3550
|
-
|
|
3550
|
+
P.value ? (o(), v("p", yn, r(P.value === "crop" ? h(x).mediaLibrary.editCropError : h(x).mediaLibrary.editSaveError), 1)) : g("", !0),
|
|
3551
3551
|
y("div", bn, [y("button", {
|
|
3552
3552
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
3553
3553
|
style: {
|
|
@@ -3555,18 +3555,18 @@ var Vt = ["data-tpl-theme"], Ht = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Ut
|
|
|
3555
3555
|
color: "var(--tpl-text)",
|
|
3556
3556
|
"background-color": "var(--tpl-bg)"
|
|
3557
3557
|
},
|
|
3558
|
-
disabled:
|
|
3559
|
-
onClick:
|
|
3560
|
-
},
|
|
3558
|
+
disabled: M.value,
|
|
3559
|
+
onClick: je
|
|
3560
|
+
}, r(h(x).mediaLibrary.cancel), 9, xn), y("button", {
|
|
3561
3561
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
3562
3562
|
style: {
|
|
3563
3563
|
"background-color": "var(--tpl-primary)",
|
|
3564
3564
|
color: "var(--tpl-on-primary)"
|
|
3565
3565
|
},
|
|
3566
|
-
disabled:
|
|
3567
|
-
onClick:
|
|
3568
|
-
},
|
|
3569
|
-
], 2)], 42, Vt)) :
|
|
3566
|
+
disabled: M.value,
|
|
3567
|
+
onClick: ke
|
|
3568
|
+
}, r(M.value ? h(x).mediaLibrary.saving : h(x).mediaLibrary.saveChanges), 9, Sn)])
|
|
3569
|
+
], 2)], 42, Vt)) : g("", !0)]),
|
|
3570
3570
|
_: 1
|
|
3571
3571
|
})], 8, ["to"]));
|
|
3572
3572
|
}
|