2 lines
362 KiB
JavaScript
2 lines
362 KiB
JavaScript
(function(e){function t(t){for(var o,r,l=t[0],i=t[1],u=t[2],s=0,f=[];s<l.length;s++)r=l[s],Object.prototype.hasOwnProperty.call(c,r)&&c[r]&&f.push(c[r][0]),c[r]=0;for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);d&&d(t);while(f.length)f.shift()();return a.push.apply(a,u||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],o=!0,l=1;l<n.length;l++){var i=n[l];0!==c[i]&&(o=!1)}o&&(a.splice(t--,1),e=r(r.s=n[0]))}return e}var o={},c={app:0},a=[];function r(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var u=0;u<l.length;u++)t(l[u]);var d=i;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("cd49")},"01f7":function(e,t,n){"use strict";n("ce7f")},"032d":function(e,t,n){"use strict";n("31ed")},"037d":function(e,t,n){"use strict";n("4206")},"04ae":function(e,t,n){"use strict";n("8bd9")},"050c":function(e,t,n){"use strict";n("56fb")},"0536":function(e,t,n){},"070f":function(e,t,n){},"0741":function(e,t,n){"use strict";n("0536")},"08f9":function(e,t,n){"use strict";n("0dc5")},"0a79":function(e,t,n){"use strict";n("f3c8")},"0aef":function(e,t,n){},"0b56":function(e,t,n){},"0dc5":function(e,t,n){},1:function(e,t){},10:function(e,t){},11:function(e,t){},"11f6":function(e,t,n){},12:function(e,t){},13:function(e,t){},"134b":function(e,t,n){},"13c8":function(e,t,n){},"13cb":function(e,t,n){},"13cd":function(e,t,n){"use strict";n("ebcd")},14:function(e,t){},1401:function(e,t,n){"use strict";n("7932")},1539:function(e,t,n){"use strict";n("134b")},"17dc":function(e,t,n){},"192c":function(e,t,n){},"1bf3":function(e,t,n){"use strict";n("61af")},"1c60":function(e,t,n){"use strict";n("e562")},"1c62":function(e,t,n){"use strict";n("45c6")},"1cb0":function(e,t,n){},2:function(e,t){},2007:function(e,t,n){"use strict";n("ec3f")},2023:function(e,t,n){},2056:function(e,t,n){},"21a0":function(e,t,n){},"232e":function(e,t,n){},2806:function(e,t,n){},"2a31":function(e,t,n){"use strict";n("0b56")},"2bc7":function(e,t,n){},"2bdd":function(e,t,n){},"2bf7":function(e,t,n){},"2c96":function(e,t,n){"use strict";n("ab9c")},3:function(e,t){},3179:function(e,t,n){"use strict";n("8e5a")},"31ed":function(e,t,n){},3639:function(e,t,n){"use strict";n("368d")},"368d":function(e,t,n){},"379a":function(e,t,n){},"380f8":function(e,t,n){"use strict";n("6164")},"3bec":function(e,t,n){},"3deb":function(e,t,n){"use strict";n("992b")},"3eac":function(e,t,n){"use strict";n("2023")},"3f04":function(e,t,n){"use strict";n("17dc")},"3f3b":function(e,t,n){},4:function(e,t){},4206:function(e,t,n){},"45ac":function(e,t,n){"use strict";n("2bf7")},"45c6":function(e,t,n){},4678:function(e,t,n){var o={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function c(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}c.keys=function(){return Object.keys(o)},c.resolve=a,e.exports=c,c.id="4678"},"4d85":function(e,t,n){"use strict";n("21a0")},"4e78":function(e,t,n){"use strict";n("0aef")},5:function(e,t){},"50dd":function(e,t,n){"use strict";n("070f")},"52a4":function(e,t,n){},"558e":function(e,t,n){},"56fb":function(e,t,n){},"591e":function(e,t,n){},5952:function(e,t,n){},"5c02":function(e,t,n){"use strict";n("a62b")},"5ec9":function(e,t,n){"use strict";n("cce3")},6:function(e,t){},"606f":function(e,t,n){"use strict";n("c92a")},6164:function(e,t,n){},"61af":function(e,t,n){},"63fc":function(e,t,n){},6836:function(e,t,n){"use strict";n("a83c")},"685a":function(e,t,n){},"69b0":function(e,t,n){"use strict";n("192c")},"69d58":function(e,t,n){"use strict";n("b42f")},"69d7":function(e,t,n){},"6a17":function(e,t,n){"use strict";n("11f6")},"6a22":function(e,t,n){},"6aa3":function(e,t,n){"use strict";n("13cb")},"6d86":function(e,t,n){},"6fbe":function(e,t,n){},7:function(e,t){},"70bd":function(e,t,n){},"72de":function(e,t,n){},"770e":function(e,t,n){},"77af":function(e,t,n){},"782e":function(e,t,n){"use strict";n("cc63")},7932:function(e,t,n){},"79cb":function(e,t,n){"use strict";n("63fc")},"7b5e":function(e,t,n){},"7dcf":function(e,t,n){"use strict";n("2bc7")},"7e16":function(e,t,n){"use strict";n("770e")},8:function(e,t){},8523:function(e,t,n){},"874d":function(e,t,n){"use strict";n("97e5")},8754:function(e,t,n){"use strict";n("13c8")},"89f6":function(e,t,n){"use strict";n("70bd")},"8a4a":function(e,t,n){"use strict";n("52a4")},"8b13":function(e,t,n){"use strict";n("591e")},"8bd9":function(e,t,n){},"8c56":function(e,t,n){},"8df8e":function(e,t,n){"use strict";n("3bec")},"8e5a":function(e,t,n){},9:function(e,t){},"923f":function(e,t,n){"use strict";n("ad32")},"97cd":function(e,t,n){"use strict";n("72de")},"97e5":function(e,t,n){},9884:function(e,t,n){"use strict";n("c7d1")},"992b":function(e,t,n){},"993a":function(e,t,n){"use strict";n("6d86")},"9cc3":function(e,t,n){},a2a2:function(e,t,n){"use strict";n("dac3")},a2af:function(e,t,n){"use strict";n("6fbe")},a347:function(e,t,n){"use strict";n("af24")},a62b:function(e,t,n){},a6cc:function(e,t,n){"use strict";n("232e")},a73d:function(e,t,n){"use strict";n("da1a")},a83c:function(e,t,n){},a933:function(e,t,n){"use strict";n("3f3b")},ab3a:function(e,t,n){"use strict";n("558e")},ab9c:function(e,t,n){},ad32:function(e,t,n){},add0:function(e,t,n){"use strict";n("8523")},ae3c:function(e,t,n){"use strict";n("1cb0")},ae3f:function(e,t,n){},af24:function(e,t,n){},b19e:function(e,t,n){"use strict";n("dda4")},b295:function(e,t,n){"use strict";n("6a22")},b42f:function(e,t,n){},b640:function(e,t,n){"use strict";n("685a")},b6e8:function(e,t,n){"use strict";n("b942")},b7d6:function(e,t,n){"use strict";n("2bdd")},b942:function(e,t,n){},ba04:function(e,t,n){"use strict";n("c758")},beaa:function(e,t,n){"use strict";n("7b5e")},c758:function(e,t,n){},c7d1:function(e,t,n){},c808:function(e,t,n){},c860:function(e,t,n){},c92a:function(e,t,n){},ca67:function(e,t,n){},cba1:function(e,t,n){"use strict";n("2806")},cbb0:function(e,t,n){"use strict";n("eb34")},cc63:function(e,t,n){},cce3:function(e,t,n){},cd49:function(e,t,n){"use strict";n.r(t);n("6d2a");var o=n("9571"),c=(n("ee00"),n("bb76")),a=(n("fbd8"),n("55f1")),r=(n("9d5c"),n("a600")),l=(n("cd17"),n("ed3b")),i=(n("5704"),n("b558")),u=(n("5783"),n("59a5")),d=(n("fbd6"),n("160c")),s=(n("2ef0"),n("9839")),f=(n("438c"),n("fbdf")),p=(n("5136"),n("681b")),b=(n("9a33"),n("f933")),m=(n("6ba6"),n("5efb")),v=(n("55ec"),n("a79d")),O=(n("922d"),n("09d9")),h=(n("e260"),n("e6cf"),n("cca6"),n("a79df"),n("7a23"));function j(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Editor"),l=Object(h["resolveComponent"])("Screen");return e.screening?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:1})):(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0}))}n("a4d3"),n("e01a"),n("d3b7");var g,y,k=n("5502"),E=[{id:"test123456",elements:[]}],I={activeElementIdList:[],handleElementId:"",canvasPercentage:90,canvasScale:1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,showGridLines:!1,creatingElement:null,availableFonts:[],toolbarState:"slideStyle",theme:{themeColor:"#d14424",fontColor:"#333",fontName:"微软雅黑",backgroundColor:"#fff"},slides:E,slideIndex:0,snapshotCursor:-1,snapshotLength:0,ctrlKeyState:!1,shiftKeyState:!1,screening:!1,clipingImageElementId:""},S=(n("4de4"),n("7db0"),n("caad"),n("d81d"),n("2532"),{currentSlide:function(e){return e.slides[e.slideIndex]||null},currentSlideAnimations:function(e){var t=e.slides[e.slideIndex];if(!t)return null;var n=t.animations;if(!n)return null;var o=t.elements,c=o.map((function(e){return e.id}));return n.filter((function(e){return c.includes(e.elId)}))},activeElementList:function(e){var t=e.slides[e.slideIndex];return t&&t.elements?t.elements.filter((function(t){return e.activeElementIdList.includes(t.id)})):[]},handleElement:function(e){var t=e.slides[e.slideIndex];return t&&t.elements&&t.elements.find((function(t){return e.handleElementId===t.id}))||null},canUndo:function(e){return e.snapshotCursor>0},canRedo:function(e){return e.snapshotCursor<e.snapshotLength-1},ctrlOrShiftKeyActive:function(e){return e.ctrlKeyState||e.shiftKeyState}}),C=(n("fb6a"),n("ddb0"),n("ade3")),N=(n("96cf"),n("1da1"));(function(e){e["SET_ACTIVE_ELEMENT_ID_LIST"]="setActiveElementIdList",e["SET_HANDLE_ELEMENT_ID"]="setHandleElementId",e["SET_CANVAS_PERCENTAGE"]="setCanvasPercentage",e["SET_CANVAS_SCALE"]="setCanvasScale",e["SET_THUMBNAILS_FOCUS"]="setThumbnailsFocus",e["SET_EDITORAREA_FOCUS"]="setEditorAreaFocus",e["SET_DISABLE_HOTKEYS_STATE"]="setDisableHotkeysState",e["SET_GRID_LINES_STATE"]="setGridLinesState",e["SET_CREATING_ELEMENT"]="setCreatingElement",e["SET_AVAILABLE_FONTS"]="setAvailableFonts",e["SET_TOOLBAR_STATE"]="setToolbarState",e["SET_CLIPING_IMAGE_ELEMENT_ID"]="setClipingImageElementId",e["SET_THEME"]="setTheme",e["SET_SLIDES"]="setSlides",e["ADD_SLIDE"]="addSlide",e["UPDATE_SLIDE"]="updateSlide",e["DELETE_SLIDE"]="deleteSlide",e["UPDATE_SLIDE_INDEX"]="updateSlideIndex",e["ADD_ELEMENT"]="addElement",e["UPDATE_ELEMENT"]="updateElement",e["REMOVE_ELEMENT_PROPS"]="removeElementProps",e["SET_SNAPSHOT_CURSOR"]="setSnapshotCursor",e["SET_SNAPSHOT_LENGTH"]="setSnapshotLength",e["SET_CTRL_KEY_STATE"]="setCtrlKeyState",e["SET_SHIFT_KEY_STATE"]="setShiftKeyState",e["SET_SCREENING"]="setScreening"})(g||(g={})),function(e){e["INIT_SNAPSHOT_DATABASE"]="initSnapshotDatabase",e["ADD_SNAPSHOT"]="addSnapshot",e["UN_DO"]="undo",e["RE_DO"]="redo"}(y||(y={}));var x,T,L=n("d4ec"),w=n("262e"),V=n("2caf"),_=n("4dec"),B=function(e){Object(w["a"])(n,e);var t=Object(V["a"])(n);function n(){var e;return Object(L["a"])(this,n),e=t.call(this,"SnapshotDatabase"),e.version(1).stores({snapshots:"++id"}),e.snapshots=e.table("snapshots"),e}return n}(_["a"]),M=new B,D=(x={},Object(C["a"])(x,y.INIT_SNAPSHOT_DATABASE,(function(e){return Object(N["a"])(regeneratorRuntime.mark((function t(){var n,o,c,a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,o=e.state,t.next=3,M.snapshots.orderBy("id").toArray();case 3:return c=t.sent,a=c.slice(-1)[0],a&&M.snapshots.clear(),r={index:o.slideIndex,slides:o.slides},t.next=9,M.snapshots.add(r);case 9:n(g.SET_SNAPSHOT_CURSOR,0),n(g.SET_SNAPSHOT_LENGTH,1);case 11:case"end":return t.stop()}}),t)})))()})),Object(C["a"])(x,y.ADD_SNAPSHOT,(function(e){return Object(N["a"])(regeneratorRuntime.mark((function t(){var n,o,c,a,r,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.state,o=e.commit,t.next=3,M.snapshots.orderBy("id").keys();case 3:return c=t.sent,a=[],n.snapshotCursor>=0&&n.snapshotCursor<c.length-1&&(a=c.slice(n.snapshotCursor+1)),r={index:n.slideIndex,slides:n.slides},t.next=9,M.snapshots.add(r);case 9:return l=c.length-a.length+1,l>20&&(a.push(c[0]),l--),l>=2&&M.snapshots.update(c[l-2],{index:n.slideIndex}),t.next=14,M.snapshots.bulkDelete(a);case 14:o(g.SET_SNAPSHOT_CURSOR,l-1),o(g.SET_SNAPSHOT_LENGTH,l);case 16:case"end":return t.stop()}}),t)})))()})),Object(C["a"])(x,y.UN_DO,(function(e){return Object(N["a"])(regeneratorRuntime.mark((function t(){var n,o,c,a,r,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.state,o=e.commit,!(n.snapshotCursor<=0)){t.next=3;break}return t.abrupt("return");case 3:return c=n.snapshotCursor-1,t.next=6,M.snapshots.orderBy("id").toArray();case 6:a=t.sent,r=a[c],l=r.index,i=r.slides,o(g.SET_SLIDES,i),o(g.UPDATE_SLIDE_INDEX,l),o(g.SET_SNAPSHOT_CURSOR,c),o(g.SET_ACTIVE_ELEMENT_ID_LIST,[]);case 13:case"end":return t.stop()}}),t)})))()})),Object(C["a"])(x,y.RE_DO,(function(e){return Object(N["a"])(regeneratorRuntime.mark((function t(){var n,o,c,a,r,l,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.state,o=e.commit,!(n.snapshotCursor>=n.snapshotLength-1)){t.next=3;break}return t.abrupt("return");case 3:return c=n.snapshotCursor+1,t.next=6,M.snapshots.orderBy("id").toArray();case 6:a=t.sent,r=a[c],l=r.index,i=r.slides,o(g.SET_SLIDES,i),o(g.UPDATE_SLIDE_INDEX,l),o(g.SET_SNAPSHOT_CURSOR,c),o(g.SET_ACTIVE_ELEMENT_ID_LIST,[]);case 13:case"end":return t.stop()}}),t)})))()})),x),A=(n("99af"),n("c740"),n("a434"),n("2909")),P=n("5530"),R=n("3eea"),F=n.n(R),z=[{zh:"微软雅黑",en:"Microsoft Yahei"},{zh:"宋体",en:"SimSun"},{zh:"黑体",en:"SimHei"},{zh:"楷体",en:"KaiTi"},{zh:"新宋体",en:"NSimSun"},{zh:"仿宋",en:"FangSong"},{zh:"苹方",en:"PingFang SC"},{zh:"华文黑体",en:"STHeiti"},{zh:"华文楷体",en:"STKaiti"},{zh:"华文宋体",en:"STSong"},{zh:"华文仿宋",en:"STFangSong"},{zh:"华文中宋",en:"STZhongSong"},{zh:"华文琥珀",en:"STHupo"},{zh:"华文新魏",en:"STXinwei"},{zh:"华文隶书",en:"STLiti"},{zh:"华文行楷",en:"STXingkai"},{zh:"冬青黑体简",en:"Hiragino Sans GB"},{zh:"兰亭黑-简",en:"Lantinghei SC"},{zh:"偏偏体-简",en:"Hanzipen SC"},{zh:"手札体-简",en:"Hannotate SC"},{zh:"宋体-简",en:"Songti SC"},{zh:"娃娃体-简",en:"Wawati SC"},{zh:"行楷-简",en:"Xingkai SC"},{zh:"圆体-简",en:"Yuanti SC"},{zh:"华文细黑",en:"STXihei"},{zh:"幼圆",en:"YouYuan"},{zh:"隶书",en:"LiSu"},{zh:"Arial",en:"Arial"}],H=[{name:"仓耳小丸子"},{name:"优设标题黑"},{name:"峰广明锐体"},{name:"摄图摩登小方体"},{name:"站酷快乐体"},{name:"站酷酷黑体"},{name:"素材集市康康体"},{name:"联盟起艺卢帅正锐黑体"},{name:"谦度手写楷体"},{name:"途牛类圆体"},{name:"锐字真言体"},{name:"问藏书房"}],U=(n("a15b"),function(e){if("string"!==typeof e)return!1;var t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;var n="a",o=100,c=100,a=100,r=document.createElement("canvas"),l=r.getContext("2d");if(!l)return!1;r.width=c,r.height=a,l.textAlign="center",l.fillStyle="black",l.textBaseline="middle";var i=function(e){l.clearRect(0,0,c,a),l.font="".concat(o,"px ").concat(e,", ").concat(t),l.fillText(n,c/2,a/2);var r=l.getImageData(0,0,c,a).data;return[].slice.call(r).filter((function(e){return 0!==e}))};return i(t).join("")!==i(e).join("")}),G=(T={},Object(C["a"])(T,g.SET_ACTIVE_ELEMENT_ID_LIST,(function(e,t){1===t.length?e.handleElementId=t[0]:e.handleElementId="",e.activeElementIdList=t})),Object(C["a"])(T,g.SET_HANDLE_ELEMENT_ID,(function(e,t){e.handleElementId=t})),Object(C["a"])(T,g.SET_CANVAS_PERCENTAGE,(function(e,t){e.canvasPercentage=t})),Object(C["a"])(T,g.SET_CANVAS_SCALE,(function(e,t){e.canvasScale=t})),Object(C["a"])(T,g.SET_THUMBNAILS_FOCUS,(function(e,t){e.thumbnailsFocus=t})),Object(C["a"])(T,g.SET_EDITORAREA_FOCUS,(function(e,t){e.editorAreaFocus=t})),Object(C["a"])(T,g.SET_DISABLE_HOTKEYS_STATE,(function(e,t){e.disableHotkeys=t})),Object(C["a"])(T,g.SET_GRID_LINES_STATE,(function(e,t){e.showGridLines=t})),Object(C["a"])(T,g.SET_CREATING_ELEMENT,(function(e,t){e.creatingElement=t})),Object(C["a"])(T,g.SET_AVAILABLE_FONTS,(function(e){e.availableFonts=z.filter((function(e){return U(e.en)}))})),Object(C["a"])(T,g.SET_TOOLBAR_STATE,(function(e,t){e.toolbarState=t})),Object(C["a"])(T,g.SET_CLIPING_IMAGE_ELEMENT_ID,(function(e,t){e.clipingImageElementId=t})),Object(C["a"])(T,g.SET_THEME,(function(e,t){e.theme=Object(P["a"])(Object(P["a"])({},e.theme),t)})),Object(C["a"])(T,g.SET_SLIDES,(function(e,t){e.slides=t})),Object(C["a"])(T,g.ADD_SLIDE,(function(e,t){var n=e.slideIndex+1;e.slides.splice(n,0,t),e.slideIndex=n})),Object(C["a"])(T,g.UPDATE_SLIDE,(function(e,t){var n=e.slideIndex;e.slides[n]=Object(P["a"])(Object(P["a"])({},e.slides[n]),t)})),Object(C["a"])(T,g.DELETE_SLIDE,(function(e,t){var n=e.slides.findIndex((function(e){return e.id===t}));n===e.slides.length-1&&(e.slideIndex=n-1),e.slides.splice(n,1)})),Object(C["a"])(T,g.UPDATE_SLIDE_INDEX,(function(e,t){e.slideIndex=t})),Object(C["a"])(T,g.ADD_ELEMENT,(function(e,t){var n=Array.isArray(t)?t:[t],o=e.slides[e.slideIndex].elements,c=[].concat(Object(A["a"])(o),Object(A["a"])(n));e.slides[e.slideIndex].elements=c})),Object(C["a"])(T,g.UPDATE_ELEMENT,(function(e,t){var n=t.id,o=t.props,c="string"===typeof n?[n]:n,a=e.slideIndex,r=e.slides[a],l=r.elements.map((function(e){return c.includes(e.id)?Object(P["a"])(Object(P["a"])({},e),o):e}));e.slides[a].elements=l})),Object(C["a"])(T,g.REMOVE_ELEMENT_PROPS,(function(e,t){var n=t.id,o=t.propName,c="string"===typeof o?[o]:o,a=e.slideIndex,r=e.slides[a],l=r.elements.map((function(e){return e.id===n?F()(e,c):e}));e.slides[a].elements=l})),Object(C["a"])(T,g.SET_SNAPSHOT_CURSOR,(function(e,t){e.snapshotCursor=t})),Object(C["a"])(T,g.SET_SNAPSHOT_LENGTH,(function(e,t){e.snapshotLength=t})),Object(C["a"])(T,g.SET_CTRL_KEY_STATE,(function(e,t){e.ctrlKeyState=t})),Object(C["a"])(T,g.SET_SHIFT_KEY_STATE,(function(e,t){e.shiftKeyState=t})),Object(C["a"])(T,g.SET_SCREENING,(function(e,t){e.screening=t})),T),q=Symbol(),W=Object(k["a"])({state:I,getters:S,mutations:G,actions:D}),X=function(){return Object(k["b"])(q)},Y=Object(h["withScopeId"])("data-v-d5c6b448");Object(h["pushScopeId"])("data-v-d5c6b448");var Z={class:"hamster-ppt-editor"},J={class:"layout-content"},K={class:"layout-content-center"};Object(h["popScopeId"])();var $,Q,ee,te,ne,oe,ce=Y((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("EditorHeader"),l=Object(h["resolveComponent"])("Thumbnails"),i=Object(h["resolveComponent"])("CanvasTool"),u=Object(h["resolveComponent"])("Canvas"),d=Object(h["resolveComponent"])("Toolbar");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Z,[Object(h["createVNode"])(r,{class:"layout-header"}),Object(h["createVNode"])("div",J,[Object(h["createVNode"])(l,{class:"layout-content-left"}),Object(h["createVNode"])("div",K,[Object(h["createVNode"])(i,{class:"center-top"}),Object(h["createVNode"])(u,{class:"center-body"})]),Object(h["createVNode"])(d,{class:"layout-content-right"})])])}));(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})($||($={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal"}(Q||(Q={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(ee||(ee={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(te||(te={})),function(e){e["START"]="start",e["END"]="end,"}(ne||(ne={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB"}(oe||(oe={}));n("3b18");var ae=n("f64c"),re=n("4106"),le=n.n(re),ie=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6,t="_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",n=t.length,o="",c=0;c<e;c++){var a=Math.floor(Math.random()*n);o+=t[a]}return o},ue=function(e,t){return le()(""+e,t,"0")},de=n("b311"),se=n.n(de),fe=function(e){return new Promise((function(t,n){var o=document.createElement("button"),c=new se.a(o,{text:function(){return e},action:function(){return"copy"},container:document.body});c.on("success",(function(e){c.destroy(),t(e)})),c.on("error",(function(e){c.destroy(),n(e)})),document.body.appendChild(o),o.click(),document.body.removeChild(o)}))},pe=function(){return new Promise((function(e,t){navigator.clipboard?navigator.clipboard.readText().then((function(n){return n||t("剪贴板为空或者不包含文本"),e(n)})):t("浏览器不支持或禁止访问剪贴板")}))},be=(n("25f0"),n("3452")),me=n.n(be),ve="pptist",Oe=function(e){return me.a.AES.encrypt(e,ve).toString()},he=function(e){var t=me.a.AES.decrypt(e,ve);return t.toString(me.a.enc.Utf8)},je=(n("07ac"),n("53ca")),ge=n("b85c"),ye=n("b047"),ke=n.n(ye),Ee=n("0f32"),Ie=n.n(Ee),Se=function(){var e=X(),t=ke()((function(){e.dispatch(y.ADD_SNAPSHOT)}),300,{trailing:!0}),n=Ie()((function(){e.dispatch(y.RE_DO)}),100,{leading:!0,trailing:!1}),o=Ie()((function(){e.dispatch(y.UN_DO)}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:n,undo:o}},Ce=(n("cb29"),function(e){return new Promise((function(t){var n=document.createElement("img");n.src=e,n.style.opacity="0",document.body.appendChild(n),n.onload=function(){var e=n.clientWidth,o=n.clientHeight;n.onload=null,n.onerror=null,document.body.removeChild(n),t({width:e,height:o})},n.onerror=function(){n.onload=null,n.onerror=null}}))}),Ne=function(e){return new Promise((function(t){var n=new FileReader;n.addEventListener("load",(function(){t(n.result)})),n.readAsDataURL(e)}))},xe=1e3,Te=.5625,Le=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.theme.themeColor})),n=Object(h["computed"])((function(){return e.state.theme.fontColor})),o=Se(),c=o.addHistorySnapshot,a=function(t){e.commit(g.ADD_ELEMENT,t),e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[t.id]),c()},r=function(e){Ce(e).then((function(t){var n=t.width,o=t.height,c=o/n;c<Te&&n>xe?(n=xe,o=n*c):o>xe*Te&&(o=xe*Te,n=o/c),a({type:"image",id:ie(),src:e,width:n,height:o,left:(xe-n)/2,top:(xe*Te-o)/2,fixedRatio:!0})}))},l=function(e){a({type:"chart",id:ie(),chartType:e,left:300,top:81.25,width:400,height:400,themeColor:t.value,gridColor:n.value,data:{labels:["类别1","类别2","类别3","类别4","类别5"],series:[[12,19,5,2,18]]}})},i=function(e,n){var o=new Array(n).fill({id:ie(),colspan:1,rowspan:1,text:""}),c=new Array(e).fill(o),r=100,l=36,i=new Array(n).fill(1/n),u=n*r,d=e*l;a({type:"table",id:ie(),width:u,height:d,colWidths:i,data:c,left:(xe-u)/2,top:(xe*Te-d)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:t.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}})},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"请输入内容",n=e.left,o=e.top,c=e.width,r=e.height;a({type:"text",id:ie(),left:n,top:o,width:c,height:r,content:t})},d=function(e,n){var o=e.left,c=e.top,r=e.width,l=e.height;a({type:"shape",id:ie(),left:o,top:c,width:r,height:l,viewBox:n.viewBox,path:n.path,fill:t.value,fixedRatio:!1})},s=function(e,n){var o=e.left,c=e.top,r=e.start,l=e.end;a({type:"line",id:ie(),left:o,top:c,start:r,end:l,points:n.points,color:t.value,style:"solid",width:2})};return{createImageElement:r,createChartElement:l,createTableElement:i,createTextElement:u,createShapeElement:d,createLineElement:s}},we=function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.currentSlide})),n=Se(),o=n.addHistorySnapshot,c=Le(),a=c.createTextElement,r=function(n){var c,a={},r={},l=Object(ge["a"])(n);try{for(l.s();!(c=l.n()).done;){var i=c.value,u=i.groupId;u&&!a[u]&&(a[u]=ie()),r[i.id]=ie()}}catch(m){l.e(m)}finally{l.f()}var d,s=t.value.elements.map((function(e){return e.id})),f=Object(ge["a"])(n);try{for(f.s();!(d=f.n()).done;){var p=d.value,b=s.includes(p.id);p.id=r[p.id],b&&(p.left=p.left+10,p.top=p.top+10),p.groupId&&(p.groupId=a[p.groupId])}}catch(m){f.e(m)}finally{f.f()}e.commit(g.ADD_ELEMENT,n),e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,Object.values(r)),o()},l=function(t){e.commit(g.ADD_SLIDE,Object(P["a"])(Object(P["a"])({},t),{},{id:ie(8)})),o()},i=function(e){a({left:0,top:0,width:600,height:50},e)},u=function(e,t){var n,o=(null===t||void 0===t?void 0:t.onlySlide)||!1,c=(null===t||void 0===t?void 0:t.onlyElements)||!1;try{n=JSON.parse(he(e))}catch(s){n=e}if("object"===Object(je["a"])(n)){var a=n,u=a.type,d=a.data;"elements"!==u||o?"slide"!==u||c||l(d):r(d)}else c||o||i(n)};return{pasteTextClipboardData:u}},Ve=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slideIndex})),n=Object(h["computed"])((function(){return e.state.theme})),o=Object(h["computed"])((function(){return e.state.slides.length})),c=Object(h["computed"])((function(){return e.getters.currentSlide})),a=we(),r=a.pasteTextClipboardData,l=Se(),i=l.addHistorySnapshot,u=function(n){var c=0;n===oe.UP&&t.value>0?c=t.value-1:n===oe.DOWN&&t.value<o.value-1&&(c=t.value+1),e.commit(g.UPDATE_SLIDE_INDEX,c)},d=function(){var t=Oe(JSON.stringify({type:"slide",data:c.value}));fe(t).then((function(){e.commit(g.SET_THUMBNAILS_FOCUS,!0)}))},s=function(){pe().then((function(e){r(e,{onlySlide:!0})})).catch((function(e){return ae["a"].warning(e)}))},f=function(){var t={id:ie(8),elements:[],background:{type:"solid",color:n.value.backgroundColor}};e.commit(g.ADD_SLIDE,t),i()},p=function(){e.commit(g.ADD_SLIDE,Object(P["a"])(Object(P["a"])({},c.value),{},{id:ie(8)})),i()},b=function(){if(1===o.value)return ae["a"].warning("无法继续删除");e.commit(g.DELETE_SLIDE,c.value.id),i()},m=function(){d(),b()};return{updateSlideIndex:u,copySlide:d,pasteSlide:s,createSlide:f,copyAndPasteSlide:p,deleteSlide:b,cutSlide:m}},_e=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.currentSlide})),o=Se(),c=o.addHistorySnapshot,a=function(){var o,a=JSON.parse(JSON.stringify(n.value.elements)),r=Object(ge["a"])(a);try{for(r.s();!(o=r.n()).done;){var l=o.value;t.value.includes(l.id)&&(l.lock=!0)}}catch(i){r.e(i)}finally{r.f()}e.commit(g.UPDATE_SLIDE,{elements:a}),e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),c()},r=function(t){var o=JSON.parse(JSON.stringify(n.value.elements));if(t.groupId){var a,r=Object(ge["a"])(o);try{for(r.s();!(a=r.n()).done;){var l=a.value;l.groupId===t.groupId&&(l.lock=!1)}}catch(s){r.e(s)}finally{r.f()}return o}var i,u=Object(ge["a"])(o);try{for(u.s();!(i=u.n()).done;){var d=i.value;if(d.id===t.id){d.lock=!1;break}}}catch(s){u.e(s)}finally{u.f()}e.commit(g.UPDATE_SLIDE,{elements:o}),e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[t.id]),c()};return{lockElement:a,unlockElement:r}},Be=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.currentSlide})),o=Se(),c=o.addHistorySnapshot,a=function(){if(t.value.length){var o=n.value.elements.filter((function(e){return!t.value.includes(e.id)}));e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),e.commit(g.UPDATE_SLIDE,{elements:o}),c()}},r=function(){n.value.elements.length&&(e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),e.commit(g.UPDATE_SLIDE,{elements:[]}),c())};return{deleteElement:a,deleteAllElements:r}},Me=(n("45fc"),function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.activeElementList})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=Se(),a=c.addHistorySnapshot,r=function(){var c;if(n.value.length){var r,l=JSON.parse(JSON.stringify(o.value.elements)),i=ie(),u=[],d=Object(ge["a"])(l);try{for(d.s();!(r=d.n()).done;){var s=r.value;t.value.includes(s.id)&&(s.groupId=i,u.push(s))}}catch(m){d.e(m)}finally{d.f()}var f=l.findIndex((function(e){return e.id===u[u.length-1].id})),p=u.map((function(e){return e.id}));l=l.filter((function(e){return!p.includes(e.id)}));var b=f-u.length+1;(c=l).splice.apply(c,[b,0].concat(u)),e.commit(g.UPDATE_SLIDE,{elements:l}),a()}},l=function(){if(n.value.length){var c=n.value.some((function(e){return e.groupId}));if(c){var r,l=JSON.parse(JSON.stringify(o.value.elements)),i=Object(ge["a"])(l);try{for(i.s();!(r=i.n()).done;){var u=r.value;t.value.includes(u.id)&&u.groupId&&delete u.groupId}}catch(d){i.e(d)}finally{i.f()}e.commit(g.UPDATE_SLIDE,{elements:l}),a()}}};return{combineElements:r,uncombineElements:l}}),De=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.activeElementList})),o=we(),c=o.pasteTextClipboardData,a=Be(),r=a.deleteElement,l=function(){if(t.value.length){var o=Oe(JSON.stringify({type:"elements",data:n.value}));fe(o).then((function(){e.commit(g.SET_EDITORAREA_FOCUS,!0)}))}},i=function(){l(),r()},u=function(){pe().then((function(e){c(e)})).catch((function(e){return ae["a"].warning(e)}))},d=function(){l(),u()};return{copyElement:l,cutElement:i,pasteElement:u,quickCopyElement:d}},Ae=function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.currentSlide})),n=function(){var n=t.value.elements.filter((function(e){return!e.lock})),o=n.map((function(e){return e.id}));e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,o)};return{selectAllElement:n}},Pe=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.currentSlide})),o=Se(),c=o.addHistorySnapshot,a=function(o){var a=n.value.elements.map((function(e){if(t.value.includes(e.id)){var n=e.left,c=e.top;switch(o){case oe.LEFT:n-=1;break;case oe.RIGHT:n+=1;break;case oe.UP:c-=1;break;case oe.DOWN:c+=1;break;default:break}return Object(P["a"])(Object(P["a"])({},e),{},{left:n,top:c})}return e}));e.commit(g.UPDATE_SLIDE,{elements:a}),c()};return{moveElement:a}},Re=function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.currentSlide})),n=Se(),o=n.addHistorySnapshot,c=function(e,t){var n=e.findIndex((function(e){return e.id===t[0].id})),o=e.findIndex((function(e){return e.id===t[t.length-1].id}));return{minIndex:n,maxIndex:o}},a=function(e,t){var n=JSON.parse(JSON.stringify(e));if(t.groupId){var o=n.filter((function(e){return e.groupId===t.groupId})),a=c(e,o),r=a.minIndex,l=a.maxIndex;if(l===e.length-1)return null;var i=n[l+1],u=n.splice(r,o.length);if(i.groupId){var d=n.filter((function(e){return e.groupId===i.groupId}));n.splice.apply(n,[r+d.length,0].concat(Object(A["a"])(u)))}else n.splice.apply(n,[r+1,0].concat(Object(A["a"])(u)))}else{var s=e.findIndex((function(e){return e.id===t.id}));if(s===e.length-1)return null;var f=n[s+1],p=n.splice(s,1)[0];if(f.groupId){var b=n.filter((function(e){return e.groupId===f.groupId}));n.splice(s+b.length,0,p)}else n.splice(s+1,0,p)}return n},r=function(e,t){var n=JSON.parse(JSON.stringify(e));if(t.groupId){var o=n.filter((function(e){return e.groupId===t.groupId})),a=c(e,o),r=a.minIndex;if(0===r)return null;var l=n[r-1],i=n.splice(r,o.length);if(l.groupId){var u=n.filter((function(e){return e.groupId===l.groupId}));n.splice.apply(n,[r-u.length,0].concat(Object(A["a"])(i)))}else n.splice.apply(n,[r-1,0].concat(Object(A["a"])(i)))}else{var d=e.findIndex((function(e){return e.id===t.id}));if(0===d)return null;var s=n[d-1],f=n.splice(d,1)[0];if(s.groupId){var p=n.filter((function(e){return e.groupId===s.groupId}));n.splice(d-p.length,0,f)}else n.splice(d-1,0,f)}return n},l=function(e,t){var n=JSON.parse(JSON.stringify(e));if(t.groupId){var o=n.filter((function(e){return e.groupId===t.groupId})),a=c(e,o),r=a.minIndex,l=a.maxIndex;if(l===e.length-1)return null;var i=n.splice(r,o.length);n.push.apply(n,Object(A["a"])(i))}else{var u=e.findIndex((function(e){return e.id===t.id}));if(u===e.length-1)return null;n.splice(u,1),n.push(t)}return n},i=function(e,t){var n=JSON.parse(JSON.stringify(e));if(t.groupId){var o=n.filter((function(e){return e.groupId===t.groupId})),a=c(e,o),r=a.minIndex;if(0===r)return null;var l=n.splice(r,o.length);n.unshift.apply(n,Object(A["a"])(l))}else{var i=e.findIndex((function(e){return e.id===t.id}));if(0===i)return null;n.splice(i,1),n.unshift(t)}return n},u=function(n,c){var u=null;c===$.UP?u=a(t.value.elements,n):c===$.DOWN?u=r(t.value.elements,n):c===$.TOP?u=l(t.value.elements,n):c===$.BOTTOM&&(u=i(t.value.elements,n)),u&&(e.commit(g.UPDATE_SLIDE,{elements:u}),o())};return{orderElement:u}},Fe=function(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()},ze=function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},He=function(){return document.mozFullScreen||document.webkitIsFullScreen||document.webkitFullScreen},Ue=function(){var e=X(),t=function(){Fe(),e.commit(g.SET_SCREENING,!0)},n=function(){e.commit(g.UPDATE_SLIDE_INDEX,0),t()},o=function(){e.commit(g.SET_SCREENING,!1),He()&&ze()};return{enterScreening:t,enterScreeningFromStart:n,exitScreening:o}},Ge=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.canvasPercentage})),n=function(n){var o=t.value,c=5,a=120,r=60;"+"===n&&o<=a&&(o+=c),"-"===n&&o>=r&&(o-=c),e.commit(g.SET_CANVAS_PERCENTAGE,o)},o=function(t){e.commit(g.SET_CANVAS_PERCENTAGE,t)};return{scaleCanvas:n,setCanvasPercentage:o}},qe=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.ctrlKeyState})),n=Object(h["computed"])((function(){return e.state.shiftKeyState})),o=Object(h["computed"])((function(){return e.state.disableHotkeys})),c=Object(h["computed"])((function(){return e.state.activeElementIdList})),a=Object(h["computed"])((function(){return e.getters.handleElement})),r=Object(h["computed"])((function(){return e.state.editorAreaFocus})),l=Object(h["computed"])((function(){return e.state.thumbnailsFocus})),i=Ve(),u=i.updateSlideIndex,d=i.copySlide,s=i.createSlide,f=i.deleteSlide,p=i.cutSlide,b=i.copyAndPasteSlide,m=Me(),v=m.combineElements,O=m.uncombineElements,j=Be(),y=j.deleteElement,k=_e(),E=k.lockElement,I=De(),S=I.copyElement,C=I.cutElement,N=I.quickCopyElement,x=Ae(),T=x.selectAllElement,L=Pe(),w=L.moveElement,V=Re(),_=V.orderElement,B=Se(),M=B.redo,D=B.undo,A=Ue(),P=A.enterScreening,R=Ge(),F=R.scaleCanvas,z=R.setCanvasPercentage,H=function(){c.value.length?S():l.value&&d()},U=function(){c.value.length?C():l.value&&p()},G=function(){c.value.length?N():l.value&&b()},q=function(){r.value&&T()},W=function(){r.value&&E()},Y=function(){r.value&&v()},Z=function(){r.value&&O()},J=function(){c.value.length?y():l.value&&f()},K=function(e){c.value.length?w(e):e!==oe.UP&&e!==oe.DOWN||u(e)},Q=function(e){a.value&&_(a.value,e)},ee=function(){l.value&&s()},te=function(c){var a=c.ctrlKey,i=c.shiftKey,u=c.altKey,d=c.metaKey,s=c.key.toUpperCase();if(a&&!t.value&&e.commit(g.SET_CTRL_KEY_STATE,!0),i&&!n.value&&e.commit(g.SET_SHIFT_KEY_STATE,!0),a&&s===oe.F&&(c.preventDefault(),P(),e.commit(g.SET_CTRL_KEY_STATE,!1)),r.value||l.value){if((a||d)&&s===oe.C){if(o.value)return;c.preventDefault(),H()}if(a&&s===oe.X){if(o.value)return;c.preventDefault(),U()}if(a&&s===oe.D){if(o.value)return;c.preventDefault(),G()}if(a&&s===oe.Z){if(o.value)return;c.preventDefault(),D()}if(a&&s===oe.Y){if(o.value)return;c.preventDefault(),M()}if(a&&s===oe.A){if(o.value)return;c.preventDefault(),q()}if(a&&s===oe.L){if(o.value)return;c.preventDefault(),W()}if(!i&&a&&s===oe.G){if(o.value)return;c.preventDefault(),Y()}if(i&&a&&s===oe.G){if(o.value)return;c.preventDefault(),Z()}if(u&&s===oe.F){if(o.value)return;c.preventDefault(),Q($.TOP)}if(u&&s===oe.B){if(o.value)return;c.preventDefault(),Q($.BOTTOM)}if(s===oe.DELETE){if(o.value)return;c.preventDefault(),J()}if(s===oe.UP){if(o.value)return;c.preventDefault(),K(oe.UP)}if(s===oe.DOWN){if(o.value)return;c.preventDefault(),K(oe.DOWN)}if(s===oe.LEFT){if(o.value)return;c.preventDefault(),K(oe.LEFT)}if(s===oe.RIGHT){if(o.value)return;c.preventDefault(),K(oe.RIGHT)}if(s===oe.ENTER){if(o.value)return;c.preventDefault(),ee()}if(s===oe.MINUS){if(o.value)return;c.preventDefault(),F("-")}if(s===oe.EQUAL){if(o.value)return;c.preventDefault(),F("+")}if(s===oe.DIGIT_0){if(o.value)return;c.preventDefault(),z(90)}}},ne=function(){t.value&&e.commit(g.SET_CTRL_KEY_STATE,!1),n.value&&e.commit(g.SET_SHIFT_KEY_STATE,!1)};Object(h["onMounted"])((function(){document.addEventListener("keydown",te),document.addEventListener("keyup",ne),window.addEventListener("blur",ne)})),Object(h["onUnmounted"])((function(){document.removeEventListener("keydown",te),document.removeEventListener("keyup",ne),window.removeEventListener("blur",ne)}))},We=(n("c975"),function(){var e=X(),t=Object(h["computed"])((function(){return e.state.editorAreaFocus})),n=Object(h["computed"])((function(){return e.state.thumbnailsFocus})),o=Object(h["computed"])((function(){return e.state.disableHotkeys})),c=we(),a=c.pasteTextClipboardData,r=Le(),l=r.createImageElement,i=function(e){Ne(e).then((function(e){return l(e)}))},u=function(e){if((t.value||n.value)&&!o.value&&e.clipboardData){var c=e.clipboardData.items,r=c[0];if(r){var l,u=Object(ge["a"])(c);try{for(u.s();!(l=u.n()).done;){var d=l.value;if("file"===d.kind&&-1!==d.type.indexOf("image")){var s=d.getAsFile();return void(s&&i(s))}}}catch(f){u.e(f)}finally{u.f()}"string"===r.kind&&"text/plain"===r.type&&r.getAsString((function(e){return a(e)}))}}};Object(h["onMounted"])((function(){document.addEventListener("paste",u)})),Object(h["onUnmounted"])((function(){document.removeEventListener("paste",u)}))}),Xe=Object(h["withScopeId"])("data-v-eaa43198");Object(h["pushScopeId"])("data-v-eaa43198");var Ye={class:"editor-header"},Ze={class:"left"},Je={class:"menu-item"},Ke=Object(h["createTextVNode"])(" 编辑"),$e=Object(h["createTextVNode"])("撤销"),Qe=Object(h["createTextVNode"])("重做"),et=Object(h["createTextVNode"])("添加页面"),tt=Object(h["createTextVNode"])("删除页面"),nt=Object(h["createTextVNode"])("重置幻灯片"),ot={class:"menu-item"},ct=Object(h["createTextVNode"])(" 演示"),at=Object(h["createTextVNode"])("从头开始"),rt=Object(h["createTextVNode"])("从当前页开始"),lt={class:"menu-item"},it=Object(h["createTextVNode"])(" 帮助"),ut=Object(h["createTextVNode"])("开发文档"),dt=Object(h["createTextVNode"])("快捷键"),st={class:"right"},ft={class:"menu-item"},pt={class:"hotkeys"},bt={class:"title"},mt={class:"label"},vt={class:"value"};Object(h["popScopeId"])();var Ot=Xe((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconEdit"),l=Object(h["resolveComponent"])("MenuItem"),i=Object(h["resolveComponent"])("Menu"),u=Object(h["resolveComponent"])("Dropdown"),d=Object(h["resolveComponent"])("IconPpt"),s=Object(h["resolveComponent"])("IconHelpcenter"),f=Object(h["resolveComponent"])("Tooltip"),p=Object(h["resolveComponent"])("IconGithub"),b=Object(h["resolveComponent"])("Drawer");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Ye,[Object(h["createVNode"])("div",Ze,[Object(h["createVNode"])(u,{trigger:["click"]},{overlay:Xe((function(){return[Object(h["createVNode"])(i,null,{default:Xe((function(){return[Object(h["createVNode"])(l,{onClick:t[1]||(t[1]=function(t){return e.undo()})},{default:Xe((function(){return[$e]})),_:1}),Object(h["createVNode"])(l,{onClick:t[2]||(t[2]=function(t){return e.redo()})},{default:Xe((function(){return[Qe]})),_:1}),Object(h["createVNode"])(l,{onClick:t[3]||(t[3]=function(t){return e.createSlide()})},{default:Xe((function(){return[et]})),_:1}),Object(h["createVNode"])(l,{onClick:t[4]||(t[4]=function(t){return e.deleteSlide()})},{default:Xe((function(){return[tt]})),_:1}),Object(h["createVNode"])(l,{onClick:t[5]||(t[5]=function(t){return e.toggleGridLines()})},{default:Xe((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(e.showGridLines?"关闭网格线":"打开网格线"),1)]})),_:1}),Object(h["createVNode"])(l,{onClick:t[6]||(t[6]=function(t){return e.resetSlides()})},{default:Xe((function(){return[nt]})),_:1})]})),_:1})]})),default:Xe((function(){return[Object(h["createVNode"])("div",Je,[Object(h["createVNode"])(r),Ke])]})),_:1}),Object(h["createVNode"])(u,{trigger:["click"]},{overlay:Xe((function(){return[Object(h["createVNode"])(i,null,{default:Xe((function(){return[Object(h["createVNode"])(l,{onClick:t[7]||(t[7]=function(t){return e.enterScreeningFromStart()})},{default:Xe((function(){return[at]})),_:1}),Object(h["createVNode"])(l,{onClick:t[8]||(t[8]=function(t){return e.enterScreening()})},{default:Xe((function(){return[rt]})),_:1})]})),_:1})]})),default:Xe((function(){return[Object(h["createVNode"])("div",ot,[Object(h["createVNode"])(d),ct])]})),_:1}),Object(h["createVNode"])(u,{trigger:["click"]},{overlay:Xe((function(){return[Object(h["createVNode"])(i,null,{default:Xe((function(){return[Object(h["createVNode"])(l,{onClick:t[9]||(t[9]=function(t){return e.openDoc()})},{default:Xe((function(){return[ut]})),_:1}),Object(h["createVNode"])(l,{onClick:t[10]||(t[10]=function(t){return e.hotkeyDrawerVisible=!0})},{default:Xe((function(){return[dt]})),_:1})]})),_:1})]})),default:Xe((function(){return[Object(h["createVNode"])("div",lt,[Object(h["createVNode"])(s),it])]})),_:1})]),Object(h["createVNode"])("div",st,[Object(h["createVNode"])(f,{mouseLeaveDelay:0,title:"幻灯片放映"},{default:Xe((function(){return[Object(h["createVNode"])("div",{class:"menu-item",onClick:t[11]||(t[11]=function(t){return e.enterScreening()})},[Object(h["createVNode"])(d,{size:"18",fill:"#666",style:{"margin-top":"2px"}})])]})),_:1}),Object(h["createVNode"])(f,{mouseLeaveDelay:0,title:"Github 仓库"},{default:Xe((function(){return[Object(h["createVNode"])("div",ft,[Object(h["createVNode"])(p,{size:"18",fill:"#666"})])]})),_:1})]),Object(h["createVNode"])(b,{width:"320",placement:"right",visible:e.hotkeyDrawerVisible,onClose:t[12]||(t[12]=function(t){return e.hotkeyDrawerVisible=!1})},{default:Xe((function(){return[Object(h["createVNode"])("div",pt,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.hotkeys,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:e.type},[Object(h["createVNode"])("div",bt,Object(h["toDisplayString"])(e.type),1),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.children,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"hotkey-item",key:e.label},[Object(h["createVNode"])("div",mt,Object(h["toDisplayString"])(e.label),1),Object(h["createVNode"])("div",vt,Object(h["toDisplayString"])(e.value),1)])})),128))],64)})),128))])]})),_:1},8,["visible"])])})),ht=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete"}]},{type:"幻灯片放映",children:[{label:"开始放映幻灯片",value:"Ctrl + F"},{label:"切换上一页",value:"↑ / ←"},{label:"切换下一页",value:"↓ / → / Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"缩放画布",value:"Ctrl + 鼠标滚动"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"缩放画布到合适大小",value:"Ctrl + 0"},{label:"编辑上一页",value:"↑ / ←"},{label:"编辑下一页",value:"↓ / →"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"删除线",value:"Ctrl + D"}]}],jt=Object(h["defineComponent"])({name:"editor-header",setup:function(){var e=X(),t=Ue(),n=t.enterScreening,o=t.enterScreeningFromStart,c=Ve(),a=c.createSlide,r=c.deleteSlide,l=Se(),i=l.redo,u=l.undo,d=Object(h["computed"])((function(){return e.state.showGridLines})),s=function(){e.commit(g.SET_GRID_LINES_STATE,!d.value)},f=function(){e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),e.commit(g.SET_SLIDES,[{id:ie(),elements:[]}])},p=function(){ae["a"].warning("作者努力编写中...")},b=Object(h["ref"])(!1);return{enterScreening:n,enterScreeningFromStart:o,createSlide:a,deleteSlide:r,redo:i,undo:u,toggleGridLines:s,showGridLines:d,resetSlides:f,openDoc:p,hotkeyDrawerVisible:b,hotkeys:ht}}});n("0a79");jt.render=Ot,jt.__scopeId="data-v-eaa43198";var gt=jt,yt=Object(h["withScopeId"])("data-v-75c486b2");Object(h["pushScopeId"])("data-v-75c486b2");var kt={class:"operates"};Object(h["popScopeId"])();var Et,It=yt((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementCreateSelection"),l=Object(h["resolveComponent"])("AlignmentLine"),i=Object(h["resolveComponent"])("MultiSelectOperate"),u=Object(h["resolveComponent"])("Operate"),d=Object(h["resolveComponent"])("SlideBackground"),s=Object(h["resolveComponent"])("MouseSelection"),f=Object(h["resolveComponent"])("EditableElement"),p=Object(h["resolveDirective"])("contextmenu"),b=Object(h["resolveDirective"])("click-outside");return Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"canvas",ref:"canvasRef",onMousewheel:t[2]||(t[2]=function(t){return e.mousewheelScaleCanvas(t)}),onMousedown:t[3]||(t[3]=function(t){return e.handleClickBlankArea(t)})},[e.creatingElement?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,onCreated:t[1]||(t[1]=function(t){return e.insertElementFromCreateSelection(t)})})):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("div",{class:"viewport-wrapper",style:{width:e.viewportStyles.width*e.canvasScale+"px",height:e.viewportStyles.height*e.canvasScale+"px",left:e.viewportStyles.left+"px",top:e.viewportStyles.top+"px"}},[Object(h["createVNode"])("div",kt,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.alignmentLines,(function(e,t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:t,type:e.type,axis:e.axis,length:e.length},null,8,["type","axis","length"])})),128)),e.activeElementIdList.length>1?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:0,elementList:e.elementList,scaleMultiElement:e.scaleMultiElement},null,8,["elementList","scaleMultiElement"])):Object(h["createCommentVNode"])("",!0),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.elementList,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(u,{key:t.id,elementInfo:t,isSelected:e.activeElementIdList.includes(t.id),isActive:e.handleElementId===t.id,isActiveGroupElement:e.activeGroupElementId===t.id,isMultiSelect:e.activeElementIdList.length>1,rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement"])})),128)),Object(h["createVNode"])(d)]),Object(h["createVNode"])("div",{class:"viewport",ref:"viewportRef",style:{transform:"scale(".concat(e.canvasScale,")")}},[e.mouseSelectionState.isShow?(Object(h["openBlock"])(),Object(h["createBlock"])(s,{key:0,top:e.mouseSelectionState.top,left:e.mouseSelectionState.left,width:e.mouseSelectionState.width,height:e.mouseSelectionState.height,quadrant:e.mouseSelectionState.quadrant},null,8,["top","left","width","height","quadrant"])):Object(h["createCommentVNode"])("",!0),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.elementList,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])(f,{key:t.id,elementInfo:t,elementIndex:n+1,isMultiSelect:e.activeElementIdList.length>1,selectElement:e.selectElement},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])})),128))],4)],4)],544)),[[p,e.contextmenus],[b,e.removeEditorAreaFocus]])})),St=function(){var e=window.getSelection();e&&e.removeAllRanges()},Ct=function(e){var t=Object(h["ref"])(0),n=Object(h["ref"])(0),o=X(),c=Object(h["computed"])((function(){return o.state.canvasPercentage})),a=function(){if(e.value){var a=e.value.clientWidth,r=e.value.clientHeight;if(r/a>Te){var l=a*(c.value/100);o.commit(g.SET_CANVAS_SCALE,l/xe),t.value=(a-l)/2,n.value=(r-l*Te)/2}else{var i=r*(c.value/100);o.commit(g.SET_CANVAS_SCALE,i/(xe*Te)),t.value=(a-i/Te)/2,n.value=(r-i)/2}}};Object(h["watch"])(c,a);var r=Object(h["computed"])((function(){return{width:xe,height:xe*Te,left:t.value,top:n.value}})),l=new ResizeObserver(a);return Object(h["onMounted"])((function(){e.value&&l.observe(e.value)})),Object(h["onUnmounted"])((function(){e.value&&l.unobserve(e.value)})),{viewportStyles:r}},Nt=(n("a623"),n("4160"),n("159b"),function(e){var t=e.left,n=e.top,o=e.width,c=e.height,a=e.rotate,r=void 0===a?0:a,l=Math.sqrt(Math.pow(o,2)+Math.pow(c,2))/2,i=180*Math.atan(c/o)/Math.PI,u=(180-r-i)*Math.PI/180,d=(i-r)*Math.PI/180,s=o/2,f=c/2,p=t+s,b=n+f,m=[p+l*Math.cos(u),p+l*Math.cos(d),p-l*Math.cos(u),p-l*Math.cos(d)],v=[b-l*Math.sin(u),b-l*Math.sin(d),b+l*Math.sin(u),b+l*Math.sin(d)];return{xRange:[Math.min.apply(Math,m),Math.max.apply(Math,m)],yRange:[Math.min.apply(Math,v),Math.max.apply(Math,v)]}}),xt=function(e){var t,n,o,c;if("line"===e.type)t=e.left,n=e.left+Math.max(e.start[0],e.end[0]),o=e.top,c=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){var a=e.left,r=e.top,l=e.width,i=e.height,u=e.rotate,d=Nt({left:a,top:r,width:l,height:i,rotate:u}),s=d.xRange,f=d.yRange;t=s[0],n=s[1],o=f[0],c=f[1]}else t=e.left,n=e.left+e.width,o=e.top,c=e.top+e.height;return{minX:t,maxX:n,minY:o,maxY:c}},Tt=function(e){var t=[],n=[],o=[],c=[];e.forEach((function(e){var a=xt(e),r=a.minX,l=a.maxX,i=a.minY,u=a.maxY;t.push(r),n.push(i),o.push(l),c.push(u)}));var a=Math.min.apply(Math,t),r=Math.max.apply(Math,o),l=Math.min.apply(Math,n),i=Math.max.apply(Math,c);return{minX:a,maxX:r,minY:l,maxY:i}},Lt=function(e){var t=[];return e.forEach((function(e){var n=t.findIndex((function(t){return t.value===e.value}));if(-1===n)t.push(e);else{var o=t[n],c=Math.min(o.range[0],e.range[0]),a=Math.max(o.range[1],e.range[1]),r=[c,a],l={value:e.value,range:r};t[n]=l}})),t},wt=function(e,t){var n=X(),o=Object(h["computed"])((function(){return n.state.canvasScale})),c=Object(h["reactive"])({isShow:!1,top:0,left:0,width:0,height:0,quadrant:1}),a=function(a){if(t.value){var r=!0,l=t.value.getBoundingClientRect(),i=5,u=a.pageX,d=a.pageY,s=(u-l.x)/o.value,f=(d-l.y)/o.value;c.isShow=!1,c.quadrant=4,c.top=f,c.left=s,c.width=0,c.height=0,document.onmousemove=function(e){if(r){var t=e.pageX,n=e.pageY,a=(t-u)/o.value,l=(n-d)/o.value,s=Math.abs(a),f=Math.abs(l);if(!(s<i||f<i)){var p=0;a>0&&l>0?p=4:a<0&&l<0?p=1:a>0&&l<0?p=2:a<0&&l>0&&(p=3),c.isShow=!0,c.quadrant=p,c.width=s,c.height=f}}},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,r=!1;for(var t=[],o=0;o<e.value.length;o++){var a=e.value[o],l=c.left,i=c.top,u=c.width,d=c.height,s=c.quadrant,f=xt(a),p=f.minX,b=f.maxX,m=f.minY,v=f.maxY,O=!1;4===s?O=p>l&&b<l+u&&m>i&&v<i+d:1===s?O=p>l-u&&b<l-u+u&&m>i-d&&v<i-d+d:2===s?O=p>l&&b<l+u&&m>i-d&&v<i-d+d:3===s&&(O=p>l-u&&b<l-u+u&&m>i&&v<i+d),O&&!a.lock&&t.push(a)}t=t.filter((function(n){if(n.groupId){var o=t.map((function(e){return e.id})),c=e.value.filter((function(e){return e.groupId===n.groupId}));return c.every((function(e){return o.includes(e.id)}))}return!0}));var h=t.map((function(e){return e.id}));h.length&&n.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,h),c.isShow=!1}}};return{mouseSelectionState:c,updateMouseSelection:a}},Vt=function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.disableHotkeys})),o=Le(),c=o.createImageElement,a=o.createTextElement,r=function(e){if(e.dataTransfer){var t=e.dataTransfer.items[0];if("file"===t.kind&&-1!==t.type.indexOf("image")){var o=t.getAsFile();o&&Ne(o).then((function(e){return c(e)}))}else"string"===t.kind&&"text/plain"===t.type&&t.getAsString((function(e){n.value||a({left:0,top:0,width:600,height:50},e)}))}};Object(h["onMounted"])((function(){e.value&&e.value.addEventListener("drop",r),document.ondragleave=function(e){return e.preventDefault()},document.ondrop=function(e){return e.preventDefault()},document.ondragenter=function(e){return e.preventDefault()},document.ondragover=function(e){return e.preventDefault()}})),Object(h["onUnmounted"])((function(){e.value&&e.value.removeEventListener("drop",r),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))},_t=function(e,t){var n=Math.atan2(e,t),o=180/Math.PI*n;return o},Bt=function(e,t){var n=X(),o=Object(h["computed"])((function(){return n.state.canvasScale})),c=Se(),a=c.addHistorySnapshot,r=function(c){var r=!0,l=0,i=c.rotate||0,u=c.left,d=c.top,s=c.width,f=c.height,p=u+s/2,b=d+f/2;if(t.value){var m=t.value.getBoundingClientRect();document.onmousemove=function(t){if(r){var n=(t.pageX-m.left)/o.value,a=(t.pageY-m.top)/o.value,i=n-p,u=b-a;l=_t(i,u);var d=5;Math.abs(l)<=d?l=0:l>0&&Math.abs(l-45)<=d?l-=l-45:l<0&&Math.abs(l+45)<=d?l-=l+45:l>0&&Math.abs(l-90)<=d?l-=l-90:l<0&&Math.abs(l+90)<=d?l-=l+90:l>0&&Math.abs(l-135)<=d?l-=l-135:l<0&&Math.abs(l+135)<=d?l-=l+135:l>0&&Math.abs(l-180)<=d?l-=l-180:l<0&&Math.abs(l+180)<=d&&(l-=l+180),e.value=e.value.map((function(e){return c.id===e.id?Object(P["a"])(Object(P["a"])({},e),{},{rotate:l}):e}))}},document.onmouseup=function(){r=!1,document.onmousemove=null,document.onmouseup=null,i!==l&&(n.commit(g.UPDATE_SLIDE,{elements:e.value}),a())}}};return{rotateElement:r}},Mt=n("14b7");(function(e){e["UPDATE_TEXT_STATE"]="UPDATE_TEXT_STATE",e["EXEC_TEXT_COMMAND"]="EXEC_TEXT_COMMAND",e["UPDATE_TABLE_SELECTED_CELL"]="UPDATE_TABLE_SELECTED_CELL",e["SCALE_ELEMENT_STATE"]="SCALE_ELEMENT_STATE"})(Et||(Et={}));var Dt=Object(Mt["a"])(),At=Dt,Pt={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格"},Rt={text:20,image:20,shape:15,chart:200,table:20},Ft=function(e,t){var n=e.left,o=e.top,c=e.width,a=e.height,r=Math.sqrt(Math.pow(c,2)+Math.pow(a,2))/2,l=180*Math.atan(a/c)/Math.PI,i=(180-t-l)*Math.PI/180,u=(l-t)*Math.PI/180,d=(90-t)*Math.PI/180,s=t*Math.PI/180,f=c/2,p=a/2,b=n+f,m=o+p,v={left:b+r*Math.cos(i),top:m-r*Math.sin(i)},O={left:b+p*Math.cos(d),top:m-p*Math.sin(d)},h={left:b+r*Math.cos(u),top:m-r*Math.sin(u)},j={left:b+f*Math.cos(s),top:m+f*Math.sin(s)},g={left:b-r*Math.cos(i),top:m+r*Math.sin(i)},y={left:b-p*Math.sin(s),top:m+p*Math.cos(s)},k={left:b-r*Math.cos(u),top:m+r*Math.sin(u)},E={left:b-f*Math.cos(s),top:m-f*Math.sin(s)};return{leftTopPoint:v,topPoint:O,rightTopPoint:h,rightPoint:j,rightBottomPoint:g,bottomPoint:y,leftBottomPoint:k,leftPoint:E}},zt=function(e,t){var n,o=(n={},Object(C["a"])(n,te.RIGHT_BOTTOM,t.leftTopPoint),Object(C["a"])(n,te.LEFT_BOTTOM,t.rightTopPoint),Object(C["a"])(n,te.LEFT_TOP,t.rightBottomPoint),Object(C["a"])(n,te.RIGHT_TOP,t.leftBottomPoint),Object(C["a"])(n,te.TOP,t.bottomPoint),Object(C["a"])(n,te.BOTTOM,t.topPoint),Object(C["a"])(n,te.LEFT,t.rightPoint),Object(C["a"])(n,te.RIGHT,t.leftPoint),n);return o[e]},Ht=function(e,t,n){var o=X(),c=Object(h["computed"])((function(){return o.state.activeElementIdList})),a=Object(h["computed"])((function(){return o.getters.ctrlOrShiftKeyActive})),r=Object(h["computed"])((function(){return o.state.canvasScale})),l=Se(),i=l.addHistorySnapshot,u=function(l,u,d){var s=!0;At.emit(Et.SCALE_ELEMENT_STATE,!0);var f,p=u.left,b=u.top,m=u.width,v=u.height,O=a.value||"fixedRatio"in u&&u.fixedRatio,h=m/v,j="rotate"in u&&u.rotate?u.rotate:0,y=Math.PI*j/180,k=l.pageX,E=l.pageY,I=Rt[u.type]||20,S=function(e){return e<I?I:e},C=0,N=0,x=[],T=[];if("rotate"in u&&u.rotate){var L=u.left,w=u.top,V=u.width,_=u.height;f=Ft({left:L,top:w,width:V,height:_},j);var B=zt(d,f);C=B.left,N=B.top}else{var M,D=xe,R=xe*Te,F=u.id===t.value,z=Object(ge["a"])(e.value);try{for(z.s();!(M=z.n()).done;){var H=M.value;if((!("rotate"in H)||!H.rotate)&&("line"!==H.type&&(!F||H.id!==u.id)&&(F||!c.value.includes(H.id)))){var U=H.left,G=H.top,q=H.width,W=H.height,X=U+q,Y=G+W,Z={value:G,range:[U,X]},J={value:Y,range:[U,X]},K={value:U,range:[G,Y]},$={value:X,range:[G,Y]};x.push(Z,J),T.push(K,$)}}}catch(le){z.e(le)}finally{z.f()}var Q={value:0,range:[0,D]},ee={value:R,range:[0,D]},ne={value:R/2,range:[0,D]},oe={value:0,range:[0,R]},ce={value:D,range:[0,R]},ae={value:D/2,range:[0,R]};x.push(Q,ee,ne),T.push(oe,ce,ae),x=Lt(x),T=Lt(T)}var re=function(e,t){var o=5,c=[],a=!1,r=!1,l={offsetX:0,offsetY:0};if(t||0===t)for(var i=0;i<x.length;i++){var u=x[i],d=u.value,s=u.range,f=Math.min.apply(Math,Object(A["a"])(s).concat([e||0])),p=Math.max.apply(Math,Object(A["a"])(s).concat([e||0]));Math.abs(t-d)<o&&!r&&(l.offsetY=t-d,r=!0,c.push({type:"horizontal",axis:{x:f-50,y:d},length:p-f+100}))}if(e||0===e)for(var b=0;b<T.length;b++){var m=T[b],v=m.value,O=m.range,h=Math.min.apply(Math,Object(A["a"])(O).concat([t||0])),j=Math.max.apply(Math,Object(A["a"])(O).concat([t||0]));Math.abs(e-v)<o&&!a&&(l.offsetX=e-v,a=!0,c.push({type:"vertical",axis:{x:v,y:h-50},length:j-h+100}))}return n.value=c,l};document.onmousemove=function(t){if(s){var n=t.pageX,o=t.pageY,c=n-k,a=o-E,l=m,i=v,f=p,g=b;if(j){var I=(Math.cos(y)*c+Math.sin(y)*a)/r.value,x=(Math.cos(y)*a-Math.sin(y)*c)/r.value;O&&(d!==te.RIGHT_BOTTOM&&d!==te.LEFT_TOP||(x=I/h),d!==te.LEFT_BOTTOM&&d!==te.RIGHT_TOP||(x=-I/h)),d===te.RIGHT_BOTTOM?(l=S(m+I),i=S(v+x)):d===te.LEFT_BOTTOM?(l=S(m-I),i=S(v+x),f=p-(l-m)):d===te.LEFT_TOP?(l=S(m-I),i=S(v-x),f=p-(l-m),g=b-(i-v)):d===te.RIGHT_TOP?(l=S(m+I),i=S(v-x),g=b-(i-v)):d===te.TOP?(i=S(v-x),g=b-(i-v)):d===te.BOTTOM?i=S(v+x):d===te.LEFT?(l=S(m-I),f=p-(l-m)):d===te.RIGHT&&(l=S(m+I));var T=Ft({width:l,height:i,left:f,top:g},j),L=zt(d,T),w=L.left,V=L.top,_=w-C,B=V-N;f-=_,g-=B}else{var M=c/r.value,D=a/r.value;if(O&&(d!==te.RIGHT_BOTTOM&&d!==te.LEFT_TOP||(D=M/h),d!==te.LEFT_BOTTOM&&d!==te.RIGHT_TOP||(D=-M/h)),d===te.RIGHT_BOTTOM){var A=re(p+m+M,b+v+D),R=A.offsetX,F=A.offsetY;M-=R,D-=F,O&&(F?M=D*h:D=M/h),l=S(m+M),i=S(v+D)}else if(d===te.LEFT_BOTTOM){var z=re(p+M,b+v+D),H=z.offsetX,U=z.offsetY;M-=H,D-=U,O&&(U?M=-D*h:D=-M/h),l=S(m-M),i=S(v+D),f=p-(l-m)}else if(d===te.LEFT_TOP){var G=re(p+M,b+D),q=G.offsetX,W=G.offsetY;M-=q,D-=W,O&&(W?M=D*h:D=M/h),l=S(m-M),i=S(v-D),f=p-(l-m),g=b-(i-v)}else if(d===te.RIGHT_TOP){var X=re(p+m+M,b+D),Y=X.offsetX,Z=X.offsetY;M-=Y,D-=Z,O&&(Z?M=-D*h:D=-M/h),l=S(m+M),i=S(v-D),g=b-(i-v)}else if(d===te.LEFT){var J=re(p+M,null),K=J.offsetX;M-=K,l=S(m-M),f=p-(l-m)}else if(d===te.RIGHT){var $=re(p+m+M,null),Q=$.offsetX;M-=Q,l=S(m+M)}else if(d===te.TOP){var ee=re(null,b+D),ne=ee.offsetY;D-=ne,i=S(v-D),g=b-(i-v)}else if(d===te.BOTTOM){var oe=re(null,b+v+D),ce=oe.offsetY;D-=ce,i=S(v+D)}}e.value=e.value.map((function(e){return u.id===e.id?Object(P["a"])(Object(P["a"])({},e),{},{left:f,top:g,width:l,height:i}):e}))}},document.onmouseup=function(t){s=!1,document.onmousemove=null,document.onmouseup=null,n.value=[],k===t.pageX&&E===t.pageY||(o.commit(g.UPDATE_SLIDE,{elements:e.value}),At.emit(Et.SCALE_ELEMENT_STATE,!1),i())}},d=function(t,n,l){var u=!0,d=n.minX,s=n.maxX,f=n.minY,p=n.maxY,b=s-d,m=p-f,v=b/m,O=t.pageX,h=t.pageY,j=JSON.parse(JSON.stringify(e.value));document.onmousemove=function(t){if(u){var n=t.pageX,o=t.pageY,i=(n-O)/r.value,g=(o-h)/r.value;a.value&&(l!==te.RIGHT_BOTTOM&&l!==te.LEFT_TOP||(g=i/v),l!==te.LEFT_BOTTOM&&l!==te.RIGHT_TOP||(g=-i/v));var y=d,k=s,E=f,I=p;l===te.RIGHT_BOTTOM?(k=s+i,I=p+g):l===te.LEFT_BOTTOM?(y=d+i,I=p+g):l===te.LEFT_TOP?(y=d+i,E=f+g):l===te.RIGHT_TOP?(k=s+i,E=f+g):l===te.TOP?E=f+g:l===te.BOTTOM?I=p+g:l===te.LEFT?y=d+i:l===te.RIGHT&&(k=s+i);var S=k-y,C=I-E,N=S/b,x=C/m;N<=0&&(N=0),x<=0&&(x=0),e.value=e.value.map((function(e){if(("image"===e.type||"shape"===e.type)&&c.value.includes(e.id)){var t=j.find((function(t){return t.id===e.id}));return Object(P["a"])(Object(P["a"])({},e),{},{width:t.width*N,height:t.height*x,left:y+(t.left-d)*N,top:E+(t.top-f)*x})}return e}))}},document.onmouseup=function(t){u=!1,document.onmousemove=null,document.onmouseup=null,O===t.pageX&&h===t.pageY||(o.commit(g.UPDATE_SLIDE,{elements:e.value}),i())}};return{scaleElement:u,scaleMultiElement:d}},Ut=n("eed6"),Gt=n.n(Ut),qt=function(e,t,n){var o=X(),c=Object(h["computed"])((function(){return o.state.activeElementIdList})),a=Object(h["computed"])((function(){return o.state.handleElementId})),r=Object(h["computed"])((function(){return o.state.editorAreaFocus})),l=Object(h["computed"])((function(){return o.getters.ctrlOrShiftKeyActive})),i=function(i,u){var d=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(r.value||o.commit(g.SET_EDITORAREA_FOCUS,!0),c.value.includes(u.id)){if(l.value){var s=[];if(u.groupId){var f=[];e.value.forEach((function(e){e.groupId===u.groupId&&f.push(e.id)})),s=c.value.filter((function(e){return!f.includes(e)}))}else s=c.value.filter((function(e){return e!==u.id}));s.length>0&&o.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,s)}else if(a.value!==u.id)o.commit(g.SET_HANDLE_ELEMENT_ID,u.id);else if(t.value!==u.id){var p=i.pageX,b=i.pageY;i.target.onmouseup=function(e){var n=e.pageX,o=e.pageY;p===n&&b===o&&(t.value=u.id,e.target.onmouseup=null)}}}else{var m=[];if(m=l.value?[].concat(Object(A["a"])(c.value),[u.id]):[u.id],u.groupId){var v=[];e.value.forEach((function(e){e.groupId===u.groupId&&v.push(e.id)})),m=[].concat(Object(A["a"])(m),v)}o.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,Gt()(m)),o.commit(g.SET_HANDLE_ELEMENT_ID,u.id)}d&&n(i,u)},u=function(){var t=e.value.filter((function(e){return!e.lock})),n=t.map((function(e){return e.id}));o.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,n)};return{selectElement:i,selectAllElement:u}},Wt=function(e,t,n){var o=X(),c=Object(h["computed"])((function(){return o.state.activeElementIdList})),a=Object(h["computed"])((function(){return o.state.canvasScale})),r=Se(),l=r.addHistorySnapshot,i=function(r,i){if(c.value.includes(i.id)){var u,d=!0,s=xe,f=xe*Te,p=JSON.parse(JSON.stringify(e.value)),b=p.filter((function(e){return c.value.includes(e.id)})),m=5,v=i.left,O=i.top,h=i.width,j="height"in i&&i.height?i.height:0,y="rotate"in i&&i.rotate?i.rotate:0,k=r.pageX,E=r.pageY,I=null,S=i.id===t.value,C=[],N=[],x=Object(ge["a"])(e.value);try{for(x.s();!(u=x.n()).done;){var T=u.value;if("line"!==T.type&&((!S||T.id!==i.id)&&(S||!c.value.includes(T.id)))){var L=void 0,w=void 0,V=void 0,_=void 0;if("rotate"in T&&T.rotate){var B=Nt({left:T.left,top:T.top,width:T.width,height:T.height,rotate:T.rotate}),M=B.xRange,D=B.yRange;L=M[0],w=D[0],V=M[1]-M[0],_=D[1]-D[0]}else L=T.left,w=T.top,V=T.width,_=T.height;var R=L+V,F=w+_,z=w+_/2,H=L+V/2,U={value:w,range:[L,R]},G={value:F,range:[L,R]},q={value:z,range:[L,R]},W={value:L,range:[w,F]},X={value:R,range:[w,F]},Y={value:H,range:[w,F]};C.push(U,G,q),N.push(W,X,Y)}}}catch(te){x.e(te)}finally{x.f()}var Z={value:0,range:[0,s]},J={value:f,range:[0,s]},K={value:f/2,range:[0,s]},$={value:0,range:[0,f]},Q={value:s,range:[0,f]},ee={value:s/2,range:[0,f]};C.push(Z,J,K),N.push($,Q,ee),C=Lt(C),N=Lt(N),document.onmousemove=function(t){var o=t.pageX,r=t.pageY;if(!1!==I&&(I=Math.abs(k-o)<m&&Math.abs(E-r)<m),d&&!I){var l,u,s,f,p=(o-k)/a.value,g=(r-E)/a.value,x=v+p,T=O+g;if(1===c.value.length||S)if(y){var L=Nt({left:x,top:T,width:h,height:j,rotate:y}),w=L.xRange,V=L.yRange;l=w[0],u=w[1],s=V[0],f=V[1]}else"line"===i.type?(l=x,u=x+Math.max(i.start[0],i.end[0]),s=T,f=T+Math.max(i.start[1],i.end[1])):(l=x,u=x+h,s=T,f=T+j);else{for(var _=[],B=[],M=[],D=[],R=0;R<b.length;R++){var F=b[R],z=F.left+p,H=F.top+g,U=F.width,G="height"in F&&F.height?F.height:0,q="rotate"in F&&F.rotate?F.rotate:0;if("rotate"in F&&F.rotate){var W=Nt({left:z,top:H,width:U,height:G,rotate:q}),X=W.xRange,Y=W.yRange;_.push(X[0]),B.push(Y[0]),M.push(X[1]),D.push(Y[1])}else"line"===F.type?(_.push(z),B.push(H),M.push(z+Math.max(F.start[0],F.end[0])),D.push(H+Math.max(F.start[1],F.end[1]))):(_.push(z),B.push(H),M.push(z+U),D.push(H+G))}l=Math.min.apply(Math,_),u=Math.max.apply(Math,M),s=Math.min.apply(Math,B),f=Math.max.apply(Math,D)}for(var Z=l+(u-l)/2,J=s+(f-s)/2,K=[],$=!1,Q=!1,ee=0;ee<C.length;ee++){var te=C[ee],ne=te.value,oe=te.range,ce=Math.min.apply(Math,Object(A["a"])(oe).concat([l,u])),ae=Math.max.apply(Math,Object(A["a"])(oe).concat([l,u]));Math.abs(s-ne)<m&&!Q&&(T-=s-ne,Q=!0,K.push({type:"horizontal",axis:{x:ce-50,y:ne},length:ae-ce+100})),Math.abs(f-ne)<m&&!Q&&(T-=f-ne,Q=!0,K.push({type:"horizontal",axis:{x:ce-50,y:ne},length:ae-ce+100})),Math.abs(J-ne)<m&&!Q&&(T-=J-ne,Q=!0,K.push({type:"horizontal",axis:{x:ce-50,y:ne},length:ae-ce+100}))}for(var re=0;re<N.length;re++){var le=N[re],ie=le.value,ue=le.range,de=Math.min.apply(Math,Object(A["a"])(ue).concat([s,f])),se=Math.max.apply(Math,Object(A["a"])(ue).concat([s,f]));Math.abs(l-ie)<m&&!$&&(x-=l-ie,$=!0,K.push({type:"vertical",axis:{x:ie,y:de-50},length:se-de+100})),Math.abs(u-ie)<m&&!$&&(x-=u-ie,$=!0,K.push({type:"vertical",axis:{x:ie,y:de-50},length:se-de+100})),Math.abs(Z-ie)<m&&!$&&(x-=Z-ie,$=!0,K.push({type:"vertical",axis:{x:ie,y:de-50},length:se-de+100}))}if(n.value=K,1===c.value.length||S)e.value=e.value.map((function(e){return e.id===i.id?Object(P["a"])(Object(P["a"])({},e),{},{left:x,top:T}):e}));else{var fe=e.value.find((function(e){return e.id===i.id}));if(!fe)return;e.value=e.value.map((function(e){return c.value.includes(e.id)?e.id===i.id?Object(P["a"])(Object(P["a"])({},e),{},{left:x,top:T}):Object(P["a"])(Object(P["a"])({},e),{},{left:e.left+(x-fe.left),top:e.top+(T-fe.top)}):e}))}}},document.onmouseup=function(t){d=!1,document.onmousemove=null,document.onmouseup=null,n.value=[];var c=t.pageX,a=t.pageY;k===c&&E===a||(o.commit(g.UPDATE_SLIDE,{elements:e.value}),l())}}};return{dragElement:i}},Xt=function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Se(),c=o.addHistorySnapshot,a=function(o,a,r){for(var l=!0,i=8,u=o.pageX,d=o.pageY,s=[],f=0;f<e.value.length;f++){var p=e.value[f];if(!("line"===p.type||"rotate"in p&&p.rotate)){var b=p.left,m=p.top,v=p.width,O=p.height,h=b+v,j=m+O,y=m+O/2,k=b+v/2,E={x:k,y:m},I={x:k,y:j},S={x:b,y:y},C={x:h,y:y},N={x:b,y:m},x={x:h,y:m},T={x:b,y:j},L={x:h,y:j};s.push(E,I,S,C,N,x,T,L)}}document.onmousemove=function(t){if(l){var o=t.pageX,c=t.pageY,f=(o-u)/n.value,p=(c-d)/n.value,b=a.left+a.start[0],m=a.top+a.start[1],v=a.left+a.end[0],O=a.top+a.end[1];if(r===ne.START){b+=f,m+=p,Math.abs(b-v)<i&&(b=v),Math.abs(m-O)<i&&(m=O);var h,j=Object(ge["a"])(s);try{for(j.s();!(h=j.n()).done;){var g=h.value,y=g.x,k=g.y;if(Math.abs(y-b)<i&&Math.abs(k-m)<i){b=y,m=k;break}}}catch(B){j.e(B)}finally{j.f()}}else{v+=f,O+=p,Math.abs(b-v)<i&&(v=b),Math.abs(m-O)<i&&(O=m);var E,I=Object(ge["a"])(s);try{for(I.s();!(E=I.n()).done;){var S=E.value,C=S.x,N=S.y;if(Math.abs(C-v)<i&&Math.abs(N-O)<i){v=C,O=N;break}}}catch(B){I.e(B)}finally{I.f()}}var x=Math.min(b,v),T=Math.min(m,O),L=Math.max(b,v),w=Math.max(m,O),V=[0,0],_=[L-x,w-T];b>v&&(V[0]=L-x,_[0]=0),m>O&&(V[1]=w-T,_[1]=0),e.value=e.value.map((function(e){return e.id===a.id?Object(P["a"])(Object(P["a"])({},e),{},{left:x,top:T,start:V,end:_}):e}))}},document.onmouseup=function(n){l=!1,document.onmousemove=null,document.onmouseup=null;var o=n.pageX,a=n.pageY;u===o&&d===a||(t.commit(g.UPDATE_SLIDE,{elements:e.value}),c())}};return{dragLineElement:a}},Yt=n("3835"),Zt=function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return t.state.creatingElement})),c=function(t){var o=t.start,c=t.end;if(e.value){var a=e.value.getBoundingClientRect(),r=Object(Yt["a"])(o,2),l=r[0],i=r[1],u=Object(Yt["a"])(c,2),d=u[0],s=u[1],f=Math.min(l,d),p=Math.max(l,d),b=Math.min(i,s),m=Math.max(i,s),v=(f-a.x)/n.value,O=(b-a.y)/n.value,h=(p-f)/n.value,j=(m-b)/n.value;return{left:v,top:O,width:h,height:j}}},a=function(t){var o=t.start,c=t.end;if(e.value){var a=e.value.getBoundingClientRect(),r=Object(Yt["a"])(o,2),l=r[0],i=r[1],u=Object(Yt["a"])(c,2),d=u[0],s=u[1],f=Math.min(l,d),p=Math.max(l,d),b=Math.min(i,s),m=Math.max(i,s),v=(f-a.x)/n.value,O=(b-a.y)/n.value,h=(p-f)/n.value,j=(m-b)/n.value,g=[l===f?0:h,i===b?0:j],y=[d===f?0:h,s===b?0:j];return{left:v,top:O,start:g,end:y}}},r=Le(),l=r.createTextElement,i=r.createShapeElement,u=r.createLineElement,d=function(e){if(o.value){var n=o.value.type;if("text"===n){var r=c(e);r&&l(r)}else if("shape"===n){var d=c(e);d&&i(d,o.value.data)}else if("line"===n){var s=a(e);s&&u(s,o.value.data)}t.commit(g.SET_CREATING_ELEMENT,null)}};return{insertElementFromCreateSelection:d}};function Jt(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"editable-element",ref:"elementRef",id:"editable-element-"+e.elementInfo.id,style:{zIndex:e.elementIndex,color:e.theme.fontColor,fontFamily:e.theme.fontName}},[(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentElementComponent),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:e.contextmenus},null,8,["elementInfo","selectElement","contextmenus"]))],12,["id"])}var Kt;n("a9e3");(function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table"})(Kt||(Kt={}));var $t,Qt,en=function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.activeElementList})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=function(c){var a,r=xe,l=xe*Te,i=Tt(n.value),u=i.minX,d=i.maxX,s=i.minY,f=i.maxY,p=JSON.parse(JSON.stringify(o.value.elements)),b=Object(ge["a"])(p);try{for(b.s();!(a=b.n()).done;){var m=a.value;if(t.value.includes(m.id))if(c===Q.TOP){var v=s-0;m.top=m.top-v}else if(c===Q.VERTICAL){var O=s+(f-s)/2-l/2;m.top=m.top-O}else if(c===Q.BOTTOM){var h=f-l;m.top=m.top-h}else if(c===Q.LEFT){var j=u-0;m.left=m.left-j}else if(c===Q.HORIZONTAL){var y=u+(d-u)/2-r/2;m.left=m.left-y}else if(c===Q.RIGHT){var k=d-r;m.left=m.left-k}}}catch(E){b.e(E)}finally{b.f()}e.commit(g.UPDATE_SLIDE,{elements:p})};return{alignElementToCanvas:c}},tn=Object(h["withScopeId"])("data-v-c9d8ae3c"),nn=tn((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ImageClipHandler"),l=Object(h["resolveComponent"])("ImageRectOutline"),i=Object(h["resolveComponent"])("ImageEllipseOutline"),u=Object(h["resolveComponent"])("ImagePolygonOutline"),d=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-image",{lock:e.elementInfo.lock}],style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")},onMousedown:t[2]||(t[2]=function(t){return e.handleSelectElement(t)})},[e.isCliping?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,clipPath:e.clipShape.style,onClip:t[1]||(t[1]=function(t){return e.clip(t)})},null,8,["src","clipData","width","height","top","left","clipPath"])):Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:1,class:"element-content",style:{filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):"",transform:e.flip}},["rect"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:e.clipShape.radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(u,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:e.clipShape.createPath},null,8,["width","height","outline","createPath"])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("div",{class:"image-content",style:{clipPath:e.clipShape.style}},[Object(h["createVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:{top:e.imgPosition.top,left:e.imgPosition.left,width:e.imgPosition.width,height:e.imgPosition.height,filter:e.filter},alt:""},null,12,["src"])],4)],4)),[[d,e.contextmenus]])],38)}));n("b64b");(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})($t||($t={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Qt||(Qt={}));var on={rect:{name:"矩形",type:$t.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:$t.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:function(e,t){return"M 0 0 L ".concat(.8*e," 0 L ").concat(e," ").concat(.2*t," L ").concat(e," ").concat(t," L 0 ").concat(t," Z")}},rect3:{name:"矩形3",type:$t.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:function(e,t){return"M 0 0 L ".concat(.8*e," 0 L ").concat(e," ").concat(.2*t," L ").concat(e," ").concat(t," L ").concat(.2*e," ").concat(t," L 0 ").concat(.8*t," Z")}},roundRect:{name:"圆角矩形",type:$t.RECT,radius:"10%",style:"inset(0 0 0 0 round 10% 10% 10% 10%)"},ellipse:{name:"圆形",type:$t.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:$t.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:function(e,t){return"M ".concat(.5*e," 0 L 0 ").concat(t," L ").concat(e," ").concat(t," Z")}},triangle2:{name:"三角形2",type:$t.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:function(e,t){return"M ".concat(.5*e," ").concat(t," L 0 0 L ").concat(e," 0 Z")}},triangle3:{name:"三角形3",type:$t.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:function(e,t){return"M 0 0 L 0 ".concat(t," L ").concat(e," ").concat(t," Z")}},rhombus:{name:"菱形",type:$t.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:function(e,t){return"M ".concat(.5*e," 0 L ").concat(e," ").concat(.5*t," L ").concat(.5*e," ").concat(t," L 0 ").concat(.5*t," Z")}},hexagon:{name:"六边形",type:$t.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:function(e,t){return"M ".concat(.2*e," 0 L ").concat(.8*e," 0 L ").concat(e," ").concat(.5*t," L ").concat(.8*e," ").concat(t," L ").concat(.2*e," ").concat(t," L 0 ").concat(.5*t," Z")}},pentagon:{name:"五边形",type:$t.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:function(e,t){return"M ".concat(.5*e," 0 L ").concat(e," ").concat(.38*t," L ").concat(.82*e," ").concat(t," L ").concat(.18*e," ").concat(t," L 0 ").concat(.38*t," Z")}},parallelogram:{name:"平行四边形",type:$t.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:function(e,t){return"M ".concat(.3*e," 0 L ").concat(e," 0 L ").concat(.7*e," ").concat(t," L 0 ").concat(t," Z")}},parallelogram2:{name:"平行四边形2",type:$t.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:function(e,t){return"M ".concat(.3*e," ").concat(t," L ").concat(e," ").concat(t," L ").concat(.7*e," 0 L 0 0 Z")}},trapezoid:{name:"梯形",type:$t.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:function(e,t){return"M ".concat(.25*e," 0 L ").concat(.75*e," 0 L ").concat(e," ").concat(t," L 0 ").concat(t," Z")}},trapezoid2:{name:"梯形2",type:$t.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:function(e,t){return"M 0 0 L ".concat(e," 0 L ").concat(.75*e," ").concat(t," L ").concat(.25*e," ").concat(t," Z")}}},cn=function(e){var t=Object(h["ref"])("");return Object(h["watchEffect"])((function(){if(e.value){var n=e.value,o=n.h,c=n.v,a=n.blur,r=n.color;t.value="".concat(o,"px ").concat(c,"px ").concat(a,"px ").concat(r)}else t.value=""})),{shadowStyle:t}},an=Object(h["withScopeId"])("data-v-4efc595a"),rn=an((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return e.outline?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},{default:an((function(){return[Object(h["createVNode"])("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"12 9":"0 0"},null,8,["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"])]})),_:1},8,["width","height"])):Object(h["createCommentVNode"])("",!0)})),ln=function(e){var t=Object(h["computed"])((function(){return e.value&&void 0!==e.value.width?e.value.width:0})),n=Object(h["computed"])((function(){return e.value&&void 0!==e.value.style?e.value.style:"solid"})),o=Object(h["computed"])((function(){return e.value&&void 0!==e.value.color?e.value.color:"#d14424"}));return{outlineWidth:t,outlineStyle:n,outlineColor:o}},un=Object(h["defineComponent"])({name:"image-rect-outline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup:function(e){var t=ln(Object(h["toRef"])(e,"outline")),n=t.outlineWidth,o=t.outlineStyle,c=t.outlineColor;return{outlineWidth:n,outlineStyle:o,outlineColor:c}}});n("b640");un.render=rn,un.__scopeId="data-v-4efc595a";var dn=un,sn=Object(h["withScopeId"])("data-v-4a286c0d"),fn=sn((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return e.outline?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},{default:sn((function(){return[Object(h["createVNode"])("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"12 9":"0 0"},null,8,["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"])]})),_:1},8,["width","height"])):Object(h["createCommentVNode"])("",!0)})),pn=Object(h["defineComponent"])({name:"image-ellipse-outline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup:function(e){var t=ln(Object(h["toRef"])(e,"outline")),n=t.outlineWidth,o=t.outlineStyle,c=t.outlineColor;return{outlineWidth:n,outlineStyle:o,outlineColor:c}}});n("0741");pn.render=fn,pn.__scopeId="data-v-4a286c0d";var bn=pn,mn=Object(h["withScopeId"])("data-v-0a37b709"),vn=mn((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return e.outline?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},{default:mn((function(){return[Object(h["createVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",fill:"transparent",d:e.createPath(e.width,e.height),stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"12 9":"0 0"},null,8,["d","stroke","stroke-width","stroke-dasharray"])]})),_:1},8,["width","height"])):Object(h["createCommentVNode"])("",!0)})),On=Object(h["defineComponent"])({name:"image-polygon-outline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},createPath:{type:Function,required:!0}},setup:function(e){var t=ln(Object(h["toRef"])(e,"outline")),n=t.outlineWidth,o=t.outlineStyle,c=t.outlineColor;return{outlineWidth:n,outlineStyle:o,outlineColor:c}}});n("b19e");On.render=vn,On.__scopeId="data-v-0a37b709";var hn=On,jn=Object(h["withScopeId"])("data-v-1e41275c");Object(h["pushScopeId"])("data-v-1e41275c");var gn=Object(h["createVNode"])("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"},null,-1);Object(h["popScopeId"])();var yn=jn((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper"),l=Object(h["resolveDirective"])("click-outside");return Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"image-clip-handler",style:e.clipWrapperPositionStyle},[Object(h["createVNode"])("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:e.bottomImgPositionStyle},null,12,["src"]),Object(h["createVNode"])("div",{class:"top-image-content",style:Object(P["a"])(Object(P["a"])({},e.topImgWrapperPositionStyle),{},{clipPath:e.clipPath})},[Object(h["createVNode"])("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:e.topImgPositionStyle},null,12,["src"])],4),Object(h["createVNode"])("div",{class:"operate",style:e.topImgWrapperPositionStyle,onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.moveClipRange(t)}),["stop"]))},[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(["t-l","t-r","b-l","b-r"],(function(t){return Object(h["createVNode"])("div",{class:["clip-point",t],key:t,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleClipRange(n,t)}),["stop"])},[Object(h["createVNode"])(r,{width:"12",height:"12",fill:"#fff",stroke:"#333"},{default:jn((function(){return[gn]})),_:1})],42,["onMousedown"])})),64))],36)],4)),[[l,e.handleClip]])})),kn=Object(h["defineComponent"])({name:"image-clip-handler",props:{src:{type:String,required:!0},clipData:{type:Object},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0}},setup:function(e,t){var n=t.emit,o=X(),c=Object(h["computed"])((function(){return o.state.canvasScale})),a=Object(h["reactive"])({top:0,left:0,width:0,height:0}),r=Object(h["reactive"])({top:"0",left:"0"}),l=Object(h["ref"])(!1),i=Object(h["ref"])(null),u=function(){var t=e.clipData?e.clipData.range:[[0,0],[100,100]],n=Object(Yt["a"])(t,2),o=n[0],c=n[1],a=(c[0]-o[0])/100,r=(c[1]-o[1])/100,l=o[0]/a,i=o[1]/r;return{widthScale:a,heightScale:r,left:l,top:i}},d=Object(h["computed"])((function(){var e=u(),t=e.widthScale,n=e.heightScale,o=e.left,c=e.top;return{left:-o,top:-c,width:100/t,height:100/n}})),s=Object(h["computed"])((function(){return{top:d.value.top+"%",left:d.value.left+"%",width:d.value.width+"%",height:d.value.height+"%"}})),f=Object(h["computed"])((function(){return{top:a.top+"%",left:a.left+"%",width:a.width+"%",height:a.height+"%"}})),p=Object(h["computed"])((function(){var e=d.value.width,t=d.value.height,n=a.left,o=a.top,c=a.width,r=a.height;return{left:100/c*-n+"%",top:100/r*-o+"%",width:e/c*100+"%",height:t/r*100+"%"}})),b=function(){var e=u(),t=e.left,n=e.top;a.left=t,a.top=n,a.width=100,a.height=100,r.top=-n+"%",r.left=-t+"%"},m=function(){if(!l.value)if(i.value){var t=u(),o=t.left,c=t.top,r={left:(a.left-o)/100*e.width,top:(a.top-c)/100*e.height,width:(a.width-100)/100*e.width,height:(a.height-100)/100*e.height},d={range:i.value,position:r};n("clip",d)}else n("clip",null)},v=function(e){var t=e.key.toUpperCase();t===oe.ENTER&&m()};Object(h["onMounted"])((function(){b(),document.addEventListener("keydown",v)})),Object(h["onUnmounted"])((function(){document.removeEventListener("keydown",v)}));var O=function(){var e={left:parseInt(p.value.left),top:parseInt(p.value.top),width:parseInt(p.value.width),height:parseInt(p.value.height)},t=100/e.width,n=100/e.height,o=[-e.left*t,-e.top*n],c=[100*t+o[0],100*n+o[1]];i.value=[o,c]},j=function(t){l.value=!0;var n=!0,o=t.pageX,r=t.pageY,i=d.value,u={left:a.left,top:a.top,width:a.width,height:a.height};document.onmousemove=function(t){if(n){var l=t.pageX,d=t.pageY,s=(l-o)/c.value/e.width*100,f=(d-r)/c.value/e.height*100,p=u.left+s,b=u.top+f;p<0?p=0:p+u.width>i.width&&(p=i.width-u.width),b<0?b=0:b+u.height>i.height&&(b=i.height-u.height),a.left=p,a.top=b}},document.onmouseup=function(){n=!1,document.onmousemove=null,document.onmouseup=null,O(),setTimeout((function(){l.value=!1}),0)}},g=function(t,n){l.value=!0;var o=!0,r=50/e.width*100,i=50/e.height*100,u=t.pageX,s=t.pageY,f=d.value,p={left:a.left,top:a.top,width:a.width,height:a.height};document.onmousemove=function(t){if(o){var l,d,b,m,v=t.pageX,O=t.pageY,h=(v-u)/c.value/e.width*100,j=(O-s)/c.value/e.height*100;"t-l"===n?(p.left+h<0&&(h=-p.left),p.top+j<0&&(j=-p.top),p.width-h<r&&(h=p.width-r),p.height-j<i&&(j=p.height-i),b=p.width-h,m=p.height-j,l=p.left+h,d=p.top+j):"t-r"===n?(p.left+p.width+h>f.width&&(h=f.width-(p.left+p.width)),p.top+j<0&&(j=-p.top),p.width+h<r&&(h=r-p.width),p.height-j<i&&(j=p.height-i),b=p.width+h,m=p.height-j,l=p.left,d=p.top+j):"b-l"===n?(p.left+h<0&&(h=-p.left),p.top+p.height+j>f.height&&(j=f.height-(p.top+p.height)),p.width-h<r&&(h=p.width-r),p.height+j<i&&(j=i-p.height),b=p.width-h,m=p.height+j,l=p.left+h,d=p.top):(p.left+p.width+h>f.width&&(h=f.width-(p.left+p.width)),p.top+p.height+j>f.height&&(j=f.height-(p.top+p.height)),p.width+h<r&&(h=r-p.width),p.height+j<i&&(j=i-p.height),b=p.width+h,m=p.height+j,l=p.left,d=p.top),a.left=l,a.top=d,a.width=b,a.height=m}},document.onmouseup=function(){o=!1,document.onmousemove=null,document.onmouseup=null,O(),setTimeout((function(){return l.value=!1}),0)}};return{clipWrapperPositionStyle:r,bottomImgPositionStyle:s,topImgWrapperPositionStyle:f,topImgPositionStyle:p,handleClip:m,moveClipRange:j,scaleClipRange:g}}});n("1bf3");kn.render=yn,kn.__scopeId="data-v-1e41275c";var En=kn,In=Object(h["defineComponent"])({name:"editable-element-image",components:{ImageRectOutline:dn,ImageEllipseOutline:bn,ImagePolygonOutline:hn,ImageClipHandler:En},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.clipingImageElementId})),o=Object(h["computed"])((function(){return n.value===e.elementInfo.id})),c=Object(h["computed"])((function(){return e.elementInfo.shadow})),a=cn(c),r=a.shadowStyle,l=function(t){e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo))},i=Object(h["computed"])((function(){if(!e.elementInfo||!e.elementInfo.clip)return on.rect;var t=e.elementInfo.clip.shape||$t.RECT;return on[t]})),u=Object(h["computed"])((function(){if(!e.elementInfo||!e.elementInfo.clip)return{top:"0",left:"0",width:"100%",height:"100%"};var t=Object(Yt["a"])(e.elementInfo.clip.range,2),n=t[0],o=t[1],c=(o[0]-n[0])/100,a=(o[1]-n[1])/100,r=n[0]/c,l=n[1]/a;return{left:-r+"%",top:-l+"%",width:100/c+"%",height:100/a+"%"}})),d=Object(h["computed"])((function(){if(!e.elementInfo.filters)return"";for(var t="",n=0,o=Object.keys(e.elementInfo.filters);n<o.length;n++){var c=o[n];t+="".concat(c,"(").concat(e.elementInfo.filters[c],") ")}return t})),s=Object(h["computed"])((function(){if(!e.elementInfo.flip)return"";var t=e.elementInfo.flip,n=t.x,o=t.y;return n&&o?"rotateX(".concat(n,"deg) rotateY(").concat(o,"deg)"):n?"rotateX(".concat(n,"deg)"):o?"rotateY(".concat(o,"deg)"):""})),f=function(n){if(t.commit(g.SET_CLIPING_IMAGE_ELEMENT_ID,""),n){var o=n.range,c=n.position,a=e.elementInfo.clip||{},r={clip:Object(P["a"])(Object(P["a"])({},a),{},{range:o}),left:e.elementInfo.left+c.left,top:e.elementInfo.top+c.top,width:e.elementInfo.width+c.width,height:e.elementInfo.height+c.height};t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:r})}};return{isCliping:o,clip:f,clipingImageElementId:n,shadowStyle:r,handleSelectElement:l,clipShape:i,imgPosition:u,filter:d,flip:s}}});n("cbb0");In.render=nn,In.__scopeId="data-v-c9d8ae3c";var Sn=In,Cn=Object(h["withScopeId"])("data-v-092f3d4e"),Nn=Cn((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementOutline"),l=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-text",{lock:e.elementInfo.lock}],ref:"elementRef",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")},onMousedown:t[2]||(t[2]=function(t){return e.handleSelectElement(t)})},[Object(h["withDirectives"])(Object(h["createVNode"])("div",{class:"element-content",style:{backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:e.shadowStyle,lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px"}},[Object(h["createVNode"])(r,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(h["createVNode"])("div",{class:"text",ref:"editorViewRef",onMousedown:t[1]||(t[1]=function(t){return e.handleSelectElement(t,!1)})},null,544)],4),[[l,e.contextmenus]])],38)})),xn=(n("1913"),n("0010")),Tn=n("5313"),Ln=n("576a"),wn=n("304a"),Vn=n("7f06"),_n=n("8726"),Bn=n("23f1"),Mn=n("1a16"),Dn=n("665f"),An=n("f95e"),Pn=function(e){var t={},n=function(e,n){return t[e]=n};return n("Alt-ArrowUp",xn["c"]),n("Alt-ArrowDown",xn["b"]),n("Ctrl-z",_n["c"]),n("Ctrl-y",_n["b"]),n("Backspace",An["f"]),n("Escape",xn["e"]),n("Ctrl-b",Object(xn["f"])(e.marks.strong)),n("Ctrl-i",Object(xn["f"])(e.marks.em)),n("Ctrl-u",Object(xn["f"])(e.marks.underline)),n("Ctrl-d",Object(xn["f"])(e.marks.strikethrough)),n("Enter",Object(Dn["f"])(e.nodes.list_item)),n("Mod-[",Object(Dn["b"])(e.nodes.list_item)),n("Mod-]",Object(Dn["e"])(e.nodes.list_item)),t},Rn=function(e){return Object(An["g"])(/^\s*>\s$/,e)},Fn=function(e){return Object(An["g"])(/^(\d+)\.\s$/,e,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))},zn=function(e){return Object(An["g"])(/^\s*([-+*])\s$/,e)},Hn=function(e){return Object(An["e"])(/^```$/,e)},Un=function(e){var t=[].concat(Object(A["a"])(An["d"]),[An["a"],An["b"]]);return t.push(Rn(e.nodes.blockquote)),t.push(Fn(e.nodes.ordered_list)),t.push(zn(e.nodes.bullet_list)),t.push(Hn(e.nodes.code_block)),Object(An["c"])({rules:t})},Gn=function(e){return[Un(e),Object(Vn["b"])(Pn(e)),Object(Vn["b"])(xn["a"]),Object(Bn["a"])(),Object(Mn["a"])(),Object(_n["a"])()]},qn=n("2210"),Wn=Object(P["a"])(Object(P["a"])({},Dn["d"]),{},{content:"list_item+",group:"block"}),Xn=Object(P["a"])(Object(P["a"])({},Dn["a"]),{},{content:"list_item+",group:"block"}),Yn=Object(P["a"])(Object(P["a"])({},Dn["c"]),{},{content:"paragraph block*",group:"block"}),Zn={attrs:{align:{default:""}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:function(e){var t=e.style.textAlign,n=e.getAttribute("align")||t||"";return n=/(left|right|center|justify)/.test(n)?n:"",{align:n}}}],toDOM:function(e){var t=e.attrs.align,n="";return t&&"left"!==t&&(n+="text-align: ".concat(t,";")),["p",{style:n},0]}},Jn=Object(P["a"])(Object(P["a"])({},qn["b"]),{},{ordered_list:Wn,bullet_list:Xn,list_item:Yn,paragraph:Zn}),Kn=(n("ac1f"),n("5319"),{excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:function(e){return"sub"===e&&null}}],toDOM:function(){return["sub",0]}}),$n={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:function(e){return"super"===e&&null}}],toDOM:function(){return["sup",0]}},Qn={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:function(e){return"line-through"===e&&null}},{style:"text-decoration-line",getAttrs:function(e){return"line-through"===e&&null}}],toDOM:function(){return["span",{style:"text-decoration-line: line-through"},0]}},eo={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:function(e){return"underline"===e&&null}},{style:"text-decoration-line",getAttrs:function(e){return"underline"===e&&null}}],toDOM:function(){return["span",{style:"text-decoration: underline"},0]}},to={attrs:{color:{}},parseDOM:[{style:"color",getAttrs:function(e){return e?{color:e}:{}}}],toDOM:function(e){var t=e.attrs.color,n="";return t&&(n+="color: ".concat(t,";")),["span",{style:n},0]}},no={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{tag:"span[style*=background-color]",getAttrs:function(e){return e?{backcolor:e}:{}}}],toDOM:function(e){var t=e.attrs.backcolor,n="";return t&&(n+="background-color: ".concat(t,";")),["span",{style:n},0]}},oo={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:function(e){return e?{fontsize:e}:{}}}],toDOM:function(e){var t=e.attrs.fontsize,n="";return t&&(n+="font-size: ".concat(t)),["span",{style:n},0]}},co={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:function(e){return{fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""}}}],toDOM:function(e){var t=e.attrs.fontname,n="";return t&&(n+="font-family: ".concat(t)),["span",{style:n},0]}},ao=Object(P["a"])(Object(P["a"])({},qn["a"]),{},{subscript:Kn,superscript:$n,strikethrough:Qn,underline:eo,forecolor:to,backcolor:no,fontsize:oo,fontname:co}),ro=Jn,lo=ao,io=new wn["i"]({nodes:ro,marks:lo}),uo=function(e){var t="<div>".concat(e,"</div>"),n=new window.DOMParser,o=n.parseFromString(t,"text/html").body.firstElementChild;return wn["a"].fromSchema(io).parse(o)},so=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Ln["c"](e,Object(P["a"])({state:Tn["b"].create({doc:uo(t),plugins:Gn(io)})},n))},fo=(n("b0c0"),function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e}),po=function(e,t){for(var n=e.depth;n>0;n--){var o=e.node(n);if(t(o))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:o}}},bo=function(e){return function(t){return po(t.$from,e)}},mo=function(e){return function(t){return bo((function(t){return fo(e,t)}))(t)}},vo=function(e,t){var n=t.schema.nodes[e];return!!mo(n)(t.selection)},Oo=function(e){var t=e.state,n=t.selection,o=t.doc,c=n.from,a=o.nodeAt(c);return(null===a||void 0===a?void 0:a.marks)||[]},ho=function(e,t,n){var o,c=Oo(e),a=Object(ge["a"])(c);try{for(a.s();!(o=a.n()).done;){var r=o.value;if(r.type.name===t&&r.attrs[n])return r.attrs[n]}}catch(l){a.e(l)}finally{a.f()}return null},jo=function(e,t){var n,o=Oo(e),c=Object(ge["a"])(o);try{for(c.s();!(n=c.n()).done;){var a=n.value;if(a.type.name===t)return!0}}catch(r){c.e(r)}finally{c.f()}return!1},go=function(e,t){var n=e.state,o=n.selection,c=n.doc,a=o.from,r=o.to,l=!0,i="";return c.nodesBetween(a,r,(function(e){return l&&e.attrs[t]&&(l=!1,i=e.attrs[t]),l})),i},yo=function(e){var t=jo(e,"strong"),n=jo(e,"em"),o=jo(e,"underline"),c=jo(e,"strikethrough"),a=jo(e,"superscript"),r=jo(e,"subscript"),l=jo(e,"code"),i=ho(e,"forecolor","color")||"#000",u=ho(e,"backcolor","backcolor")||"#000",d=ho(e,"fontsize","fontsize")||"20px",s=ho(e,"fontname","fontname")||"微软雅黑",f=go(e,"align")||"left",p=vo("bullet_list",e.state),b=vo("ordered_list",e.state),m=vo("blockquote",e.state);return{bold:t,em:n,underline:o,strikethrough:c,superscript:a,subscript:r,code:l,color:i,backcolor:u,fontsize:d,fontname:s,align:f,bulletList:p,orderedList:b,blockquote:m}},ko=(n("6062"),n("3ca3"),function(e,t,n){var o=e,c=o.selection,a=o.doc;if(!c||!a)return e;var r=c.from,l=c.to,i=t.nodes,u=i.blockquote,d=i.list_item,s=i.paragraph,f=[];n=n||"";var p=new Set([u,d,s]);return a.nodesBetween(r,l,(function(e,t){var o=e.type,c=e.attrs.align||"";return c!==n&&p.has(o)&&f.push({node:e,pos:t,nodeType:o}),!0})),f.length?(f.forEach((function(t){var o=t.node,c=t.pos,a=t.nodeType,r=o.attrs;r=n?Object(P["a"])(Object(P["a"])({},r),{},{align:n}):Object(P["a"])(Object(P["a"])({},r),{},{align:null}),e=e.setNodeMarkup(c,a,r,o.marks)})),e):e}),Eo=function(e,t){var n=e.state,o=n.schema,c=n.selection,a=ko(n.tr.setSelection(c),o,t);e.dispatch(a)},Io=function(e,t){return e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list},So=function(e,t){return function(n,o){var c=n.schema,a=n.selection,r=a.$from,l=a.$to,i=r.blockRange(l);if(!i)return!1;var u=bo((function(e){return Io(e,c)}))(a);if(i.depth>=1&&u&&i.depth-u.depth<=1){if(u.node.type===e)return Object(Dn["b"])(t)(n,o);if(Io(u.node,c)&&e.validContent(u.node.content)){var d=n.tr;return d.setNodeMarkup(u.pos,e),o&&o(d),!1}}return Object(Dn["g"])(e)(n,o)}},Co=Object(h["withScopeId"])("data-v-59365834"),No=Co((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return e.outline?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},{default:Co((function(){return[Object(h["createVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",fill:"transparent",d:"M0,0 L".concat(e.width,",0 L").concat(e.width,",").concat(e.height," L0,").concat(e.height," Z"),stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"12 9":"0 0"},null,8,["d","stroke","stroke-width","stroke-dasharray"])]})),_:1},8,["width","height"])):Object(h["createCommentVNode"])("",!0)})),xo=Object(h["defineComponent"])({name:"element-outline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup:function(e){var t=ln(Object(h["toRef"])(e,"outline")),n=t.outlineWidth,o=t.outlineStyle,c=t.outlineColor;return{outlineWidth:n,outlineStyle:o,outlineColor:c}}});n("606f");xo.render=No,xo.__scopeId="data-v-59365834";var To=xo,Lo=Object(h["defineComponent"])({name:"editable-element-text",components:{ElementOutline:To},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=X(),n=Se(),o=n.addHistorySnapshot,c=Object(h["ref"])(),a=Object(h["ref"])(!1),r=Object(h["ref"])(-1),l=function(n){a.value=n,n||-1===r.value||(t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{height:r.value}}),r.value=-1)};At.on(Et.SCALE_ELEMENT_STATE,(function(e){return l(e)})),Object(h["onUnmounted"])((function(){At.off(Et.SCALE_ELEMENT_STATE,(function(e){return l(e)}))}));var i=function(n){var o=n[0].contentRect;if(c.value){var l=o.height;e.elementInfo.height!==l&&(a.value?r.value=l:t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{height:l}}))}},u=new ResizeObserver(i);Object(h["onMounted"])((function(){c.value&&u.observe(c.value)})),Object(h["onUnmounted"])((function(){c.value&&u.unobserve(c.value)}));var d,s=Object(h["ref"])(),f=function(){t.commit(g.SET_DISABLE_HOTKEYS_STATE,!0)},p=function(){t.commit(g.SET_DISABLE_HOTKEYS_STATE,!1)},b=ke()((function(){t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{content:d.dom.innerHTML}}),o()}),300,{trailing:!0}),m=ke()((function(){var e=yo(d);At.emit(Et.UPDATE_TEXT_STATE,e)}),30,{trailing:!0}),v=function(){b(),m()},O=Object(h["computed"])((function(){return e.elementInfo.content}));Object(h["watch"])(O,(function(){d&&(d.hasFocus()||(d.dom.innerHTML=O.value))}));var j=Object(h["computed"])((function(){return!e.elementInfo.lock}));Object(h["watch"])(j,(function(){d.setProps({editable:function(){return j.value}})})),Object(h["onMounted"])((function(){d=so(s.value,O.value,{handleDOMEvents:{focus:f,blur:p,keydown:v,click:m},editable:function(){return j.value}})})),Object(h["onUnmounted"])((function(){d&&d.destroy()}));var y=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo,n))},k=Object(h["computed"])((function(){return e.elementInfo.shadow})),E=cn(k),I=E.shadowStyle,S=Object(h["computed"])((function(){return t.state.handleElementId})),C=function(t){if(S.value===e.elementInfo.id){var n,o="command"in t?[t]:t,c=Object(ge["a"])(o);try{for(c.s();!(n=c.n()).done;){var a=n.value;if("fontname"===a.command&&a.value){var r=d.state.schema.marks.fontname.create({fontname:a.value}),l=d.state.selection.empty;l&&Object(xn["d"])(d.state,d.dispatch);var i=d.state.selection,u=i.$from,s=i.$to;d.dispatch(d.state.tr.addMark(u.pos,s.pos,r))}else if("fontsize"===a.command&&a.value){var f=d.state.schema.marks.fontsize.create({fontsize:a.value}),p=d.state.selection.empty;p&&Object(xn["d"])(d.state,d.dispatch);var v=d.state.selection,O=v.$from,h=v.$to;d.dispatch(d.state.tr.addMark(O.pos,h.pos,f))}else if("color"===a.command&&a.value){var j=d.state.schema.marks.forecolor.create({color:a.value}),g=d.state.selection.empty;g&&Object(xn["d"])(d.state,d.dispatch);var y=d.state.selection,k=y.$from,E=y.$to;d.dispatch(d.state.tr.addMark(k.pos,E.pos,j))}else if("backcolor"===a.command&&a.value){var I=d.state.schema.marks.backcolor.create({backcolor:a.value}),C=d.state.selection.empty;C&&Object(xn["d"])(d.state,d.dispatch);var N=d.state.selection,x=N.$from,T=N.$to;d.dispatch(d.state.tr.addMark(x.pos,T.pos,I))}else if("bold"===a.command){var L=d.state.selection.empty;L&&Object(xn["d"])(d.state,d.dispatch),Object(xn["f"])(d.state.schema.marks.strong)(d.state,d.dispatch)}else if("em"===a.command){var w=d.state.selection.empty;w&&Object(xn["d"])(d.state,d.dispatch),Object(xn["f"])(d.state.schema.marks.em)(d.state,d.dispatch)}else if("underline"===a.command){var V=d.state.selection.empty;V&&Object(xn["d"])(d.state,d.dispatch),Object(xn["f"])(d.state.schema.marks.underline)(d.state,d.dispatch)}else if("strikethrough"===a.command){var _=d.state.selection.empty;_&&Object(xn["d"])(d.state,d.dispatch),Object(xn["f"])(d.state.schema.marks.strikethrough)(d.state,d.dispatch)}else if("subscript"===a.command)Object(xn["f"])(d.state.schema.marks.subscript)(d.state,d.dispatch);else if("superscript"===a.command)Object(xn["f"])(d.state.schema.marks.superscript)(d.state,d.dispatch);else if("blockquote"===a.command)Object(xn["g"])(d.state.schema.nodes.blockquote)(d.state,d.dispatch);else if("code"===a.command)Object(xn["f"])(d.state.schema.marks.code)(d.state,d.dispatch);else if("align"===a.command&&a.value)Eo(d,a.value);else if("bulletList"===a.command){var B=d.state.schema.nodes,M=B.bullet_list,D=B.list_item;So(M,D)(d.state,d.dispatch)}else if("orderedList"===a.command){var A=d.state.schema.nodes,P=A.ordered_list,R=A.list_item;So(P,R)(d.state,d.dispatch)}else if("clear"===a.command){var F=d.state.selection.empty;F&&Object(xn["d"])(d.state,d.dispatch);var z=d.state.selection,H=z.$from,U=z.$to;d.dispatch(d.state.tr.removeMark(H.pos,U.pos))}}}catch(G){c.e(G)}finally{c.f()}d.focus(),b(),m()}};return At.on(Et.EXEC_TEXT_COMMAND,(function(e){return C(e)})),Object(h["onUnmounted"])((function(){At.off(Et.EXEC_TEXT_COMMAND,(function(e){return C(e)}))})),{elementRef:c,editorViewRef:s,handleSelectElement:y,shadowStyle:I}}});n("01f7");Lo.render=Nn,Lo.__scopeId="data-v-092f3d4e";var wo=Lo,Vo=Object(h["withScopeId"])("data-v-6a9228f2");Object(h["pushScopeId"])("data-v-6a9228f2");var _o={key:0};Object(h["popScopeId"])();var Bo=Vo((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("GradientDefs"),l=Object(h["resolveComponent"])("SvgWrapper"),i=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-shape",{lock:e.elementInfo.lock}],style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")},onMousedown:t[1]||(t[1]=function(t){return e.handleSelectElement(t)})},[Object(h["withDirectives"])(Object(h["createVNode"])("div",{class:"element-content",style:{opacity:e.elementInfo.opacity,filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):""}},[Object(h["createVNode"])(l,{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},{default:Vo((function(){return[e.elementInfo.gradient?(Object(h["openBlock"])(),Object(h["createBlock"])("defs",_o,[Object(h["createVNode"])(r,{id:"editabel-gradient-".concat(e.elementInfo.id),type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("g",{transform:"scale(".concat(e.elementInfo.width/e.elementInfo.viewBox,", ").concat(e.elementInfo.height/e.elementInfo.viewBox,") translate(0,0) matrix(1,0,0,1,0,0)")},[Object(h["createVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",d:e.elementInfo.path,fill:e.elementInfo.gradient?"url(#editabel-gradient-".concat(e.elementInfo.id,")"):e.elementInfo.fill,stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"10 5":"0 0"},null,8,["d","fill","stroke","stroke-width","stroke-dasharray"])],8,["transform"])]})),_:1},8,["width","height"])],4),[[i,e.contextmenus]])],38)}));function Mo(e,t,n,o,c,a){return"linear"===e.type?(Object(h["openBlock"])(),Object(h["createBlock"])("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:"rotate(".concat(e.rotate,",0.5,0.5)")},[Object(h["createVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,["stop-color"]),Object(h["createVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,["stop-color"])],8,["id","gradientTransform"])):(Object(h["openBlock"])(),Object(h["createBlock"])("radialGradient",{key:1,id:e.id},[Object(h["createVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,["stop-color"]),Object(h["createVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,["stop-color"])],8,["id"]))}var Do=Object(h["defineComponent"])({name:"gradient-defs",props:{id:{type:String,required:!0},type:{type:String},color1:{type:String,required:!0},color2:{type:String,required:!0},rotate:{type:Number,default:0}}});Do.render=Mo;var Ao=Do,Po=Object(h["defineComponent"])({name:"editable-element-shape",components:{GradientDefs:Ao},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=function(t){e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo))},n=Object(h["computed"])((function(){return e.elementInfo.outline})),o=ln(n),c=o.outlineWidth,a=o.outlineStyle,r=o.outlineColor,l=Object(h["computed"])((function(){return e.elementInfo.shadow})),i=cn(l),u=i.shadowStyle;return{handleSelectElement:t,shadowStyle:u,outlineWidth:c,outlineStyle:a,outlineColor:r}}});n("2a31");Po.render=Bo,Po.__scopeId="data-v-6a9228f2";var Ro=Po,Fo=Object(h["withScopeId"])("data-v-d93ab0c4"),zo=Fo((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("LinePointMarker"),l=Object(h["resolveComponent"])("SvgWrapper"),i=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-shape",{lock:e.elementInfo.lock}],style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"}},[Object(h["createVNode"])("div",{class:"element-content",style:{filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):""}},[Object(h["createVNode"])(l,{overflow:"visible",width:e.svgWidth,height:e.svgHeight},{default:Fo((function(){return[Object(h["createVNode"])("defs",null,[e.elementInfo.points[0]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(h["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(h["createCommentVNode"])("",!0)]),Object(h["createVNode"])("path",{d:e.path,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":e.lineDashArray,fill:"none","stroke-linecap":"","stroke-linejoin":"","stroke-miterlimit":"","marker-start":e.elementInfo.points[0]?"url(#".concat(e.elementInfo.id,"-").concat(e.elementInfo.points[0],"-start)"):"","marker-end":e.elementInfo.points[1]?"url(#".concat(e.elementInfo.id,"-").concat(e.elementInfo.points[1],"-end)"):""},null,8,["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"]),Object(h["withDirectives"])(Object(h["createVNode"])("path",{class:"line-path",d:e.path,stroke:"transparent","stroke-width":"20",fill:"none",onMousedown:t[1]||(t[1]=function(t){return e.handleSelectElement(t)})},null,40,["d"]),[[i,e.contextmenus]])]})),_:1},8,["width","height"])],4)],6)}));function Ho(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("marker",{id:"".concat(e.id,"-").concat(e.type,"-").concat(e.position),markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*e.size,markerHeight:3*e.size,refX:1.5*e.size,refY:1.5*e.size},[Object(h["createVNode"])("path",{d:e.path,fill:e.color,transform:"scale(".concat(.3*e.size,", ").concat(.3*e.size,") rotate(").concat(e.rotate,", 5, 5)")},null,8,["d","fill","transform"])],8,["id","markerWidth","markerHeight","refX","refY"])}var Uo={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},Go={"arrow-start":180,"arrow-end":0},qo=Object(h["defineComponent"])({name:"line-point-marker",props:{id:{type:String,required:!0},position:{type:String,required:!0},type:{type:String,required:!0},color:{type:String},baseSize:{type:Number,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return Uo[e.type]})),n=Object(h["computed"])((function(){return Go["".concat(e.type,"-").concat(e.position)]||0})),o=Object(h["computed"])((function(){return e.baseSize<2?2:e.baseSize}));return{path:t,rotate:n,size:o}}});qo.render=Ho;var Wo=qo,Xo=Object(h["defineComponent"])({name:"editable-element-shape",components:{LinePointMarker:Wo},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=function(t){e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo))},n=Object(h["computed"])((function(){return e.elementInfo.shadow})),o=cn(n),c=o.shadowStyle,a=Object(h["computed"])((function(){var t=Math.abs(e.elementInfo.start[0]-e.elementInfo.end[0]);return t<24?24:t})),r=Object(h["computed"])((function(){var t=Math.abs(e.elementInfo.start[1]-e.elementInfo.end[1]);return t<24?24:t})),l=Object(h["computed"])((function(){return"dashed"===e.elementInfo.style?"10, 5":"0, 0"})),i=Object(h["computed"])((function(){var t=e.elementInfo.start.join(","),n=e.elementInfo.end.join(",");return"M".concat(t," L").concat(n)}));return{handleSelectElement:t,shadowStyle:c,svgWidth:a,svgHeight:r,lineDashArray:l,path:i}}});n("1c60");Xo.render=zo,Xo.__scopeId="data-v-d93ab0c4";var Yo=Xo,Zo=Object(h["withScopeId"])("data-v-7550799e"),Jo=Zo((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementOutline"),l=Object(h["resolveComponent"])("Chart"),i=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-chart",{lock:e.elementInfo.lock}],style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"},onMousedown:t[1]||(t[1]=function(t){return e.handleSelectElement(t)})},[Object(h["withDirectives"])(Object(h["createVNode"])("div",{class:"element-content",style:{backgroundColor:e.elementInfo.fill}},[Object(h["createVNode"])(r,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(h["createVNode"])(l,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor},null,8,["width","height","type","data","options","themeColor","gridColor"])],4),[[i,e.contextmenus]])],38)})),Ko=Object(h["withScopeId"])("data-v-5f401eca");Object(h["pushScopeId"])("data-v-5f401eca");var $o={class:"chart"};Object(h["popScopeId"])();var Qo=Ko((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",$o,[Object(h["createVNode"])("div",{class:"chart-content",ref:"chartRef",style:{width:e.width+"px",height:e.height+"px",transform:"scale(".concat(1/e.slideScale,")")}},null,4)])})),ec=n("8103"),tc=n.n(ec),nc=n("66cb"),oc=n.n(nc),cc=n("ba48"),ac=n.n(cc),rc=(n("aa97"),Object(h["defineComponent"])({name:"chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:String,required:!0},data:{type:Object,required:!0},options:{type:Object},themeColor:{type:String,required:!0},gridColor:{type:String}},setup:function(e){var t,n=Object(h["ref"])(),o=Object(h["inject"])("slideScale")||Object(h["ref"])(1),c=function(){var t=e.options||{},n=Object(P["a"])(Object(P["a"])({},t),{},{width:e.width*o.value,height:e.height*o.value}),c="pie"===e.type?Object(P["a"])(Object(P["a"])({},e.data),{},{series:e.data.series[0]}):e.data;return{data:c,options:n}},a=function(){if(n.value){var o=tc()(e.type),a=c(),r=a.data,l=a.options;t=new ac.a[o](n.value,r,l)}},r=function(){if(t){var e=c(),n=e.data,o=e.options;t.update(n,o)}else a()};Object(h["watch"])([function(){return e.width},function(){return e.height},function(){return e.data},o],r),Object(h["onMounted"])(a);var l=function(){if(n.value){for(var t=oc()(e.themeColor).toHsl(),o=0;o<10;o++){var c=t.h+36*o;c>360&&(c-=360);var a=Object(P["a"])(Object(P["a"])({},t),{},{h:c});n.value.style.setProperty("--theme-color-".concat(o+1),oc()(a).toRgbString())}e.gridColor&&n.value.style.setProperty("--grid-color",e.gridColor)}};return Object(h["watch"])([function(){return e.themeColor},function(){return e.gridColor}],l),Object(h["onMounted"])(l),{slideScale:o,chartRef:n}}}));n("380f8"),n("d85b");rc.render=Qo,rc.__scopeId="data-v-5f401eca";var lc=rc,ic=Object(h["defineComponent"])({name:"editable-element-chart",components:{ElementOutline:To,Chart:lc},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=function(t){e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo))};return{handleSelectElement:t}}});n("fba1");ic.render=Jo,ic.__scopeId="data-v-7550799e";var uc=ic,dc=Object(h["withScopeId"])("data-v-045f7664");Object(h["pushScopeId"])("data-v-045f7664");var sc={class:"element-content"};Object(h["popScopeId"])();var fc=dc((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("EditableTable"),l=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["editable-element-table",{lock:e.elementInfo.lock}],ref:"elementRef",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"}},[Object(h["withDirectives"])(Object(h["createVNode"])("div",sc,[Object(h["createVNode"])(r,{onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(){}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:e.editable,onChange:t[2]||(t[2]=function(t){return e.updateTableCells(t)}),onChangeColWidths:t[3]||(t[3]=function(t){return e.updateColWidths(t)}),onChangeSelectedCells:t[4]||(t[4]=function(t){return e.updateSelectedCells(t)})},null,8,["data","width","colWidths","outline","theme","editable"]),!e.editable||e.elementInfo.lock?(Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:0,class:["table-mask",{lock:e.elementInfo.lock}],onDblclick:t[5]||(t[5]=function(t){return e.startEdit()}),onMousedown:t[6]||(t[6]=function(t){return e.handleSelectElement(t)})},[Object(h["createVNode"])("div",{class:"mask-tip",style:{transform:"scale(".concat(1/e.canvasScale,")")}},"双击编辑",4)],34)):Object(h["createCommentVNode"])("",!0)],512),[[l,e.contextmenus]])],6)})),pc=(n("13d5"),Object(h["withScopeId"])("data-v-5b5b61a8"));Object(h["pushScopeId"])("data-v-5b5b61a8");var bc={key:0,class:"handler"};Object(h["popScopeId"])();var mc=pc((function(e,t,n,o,c,a){var r,l,i,u,d,s=Object(h["resolveComponent"])("CustomTextarea"),f=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"editable-table",style:{width:e.totalWidth+"px"}},[e.editable?(Object(h["openBlock"])(),Object(h["createBlock"])("div",bc,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.dragLinePosition,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"drag-line",key:n,style:{left:t+"px"},onMousedown:function(t){return e.handleMousedownColHandler(t,n)}},null,44,["onMousedown"])})),128))])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("table",{class:{theme:e.theme,"row-header":null===(r=e.theme)||void 0===r?void 0:r.rowHeader,"row-footer":null===(l=e.theme)||void 0===l?void 0:l.rowFooter,"col-header":null===(i=e.theme)||void 0===i?void 0:i.colHeader,"col-footer":null===(u=e.theme)||void 0===u?void 0:u.colFooter},style:"--themeColor: ".concat(null===(d=e.theme)||void 0===d?void 0:d.color,"; --subThemeColor1: ").concat(e.subThemeColor[0],"; --subThemeColor2: ").concat(e.subThemeColor[1])},[Object(h["createVNode"])("colgroup",null,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.colSizeList,(function(e,t){return Object(h["openBlock"])(),Object(h["createBlock"])("col",{span:"1",key:t,width:e},null,8,["width"])})),128))]),Object(h["createVNode"])("tbody",null,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.tableCells,(function(n,o){return Object(h["openBlock"])(),Object(h["createBlock"])("tr",{key:o},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(n,(function(n,c){return Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("td",{class:["cell",{selected:e.selectedCells.includes("".concat(o,"_").concat(c))&&e.selectedCells.length>1,active:e.activedCell==="".concat(o,"_").concat(c)}],style:Object(P["a"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px"},e.getTextStyle(n.style)),key:n.id,rowspan:n.rowspan,colspan:n.colspan,"data-cell-index":"".concat(o,"_").concat(c),onMousedown:function(t){return e.handleCellMousedown(t,o,c)},onMouseenter:function(t){return e.handleCellMouseenter(o,c)}},[Object(h["createVNode"])(s,{class:["cell-text",{active:e.activedCell==="".concat(o,"_").concat(c)}],contenteditable:e.activedCell==="".concat(o,"_").concat(c)&&"plaintext-only",modelValue:n.text,"onUpdate:modelValue":[function(e){return n.text=e},t[1]||(t[1]=function(t){return e.handleInput()})]},null,8,["class","contenteditable","modelValue","onUpdate:modelValue"])],46,["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"])),[[h["vShow"],!e.hideCells.includes("".concat(o,"_").concat(c))],[f,function(t){return e.contextmenus(t)}]])})),128))])})),128))])],6)],4)}));n("1276"),n("cc71");function vc(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"custom-textarea",ref:"textareaRef",contenteditable:e.contenteditable,onFocus:t[1]||(t[1]=function(){return e.handleFocus&&e.handleFocus.apply(e,arguments)}),onBlur:t[2]||(t[2]=function(){return e.handleBlur&&e.handleBlur.apply(e,arguments)}),onInput:t[3]||(t[3]=function(t){return e.handleInput(t)}),innerHTML:e.text},null,40,["contenteditable","innerHTML"])}var Oc=Object(h["defineComponent"])({name:"custom-textarea",props:{modelValue:{type:String,default:""},contenteditable:{type:[Boolean,String],default:!1}},setup:function(e,t){var n=t.emit,o=Object(h["ref"])(),c=Object(h["ref"])(""),a=Object(h["ref"])(!1);Object(h["watch"])((function(){return e.modelValue}),(function(){a.value||(c.value=e.modelValue,o.value&&(o.value.innerHTML=e.modelValue))}),{immediate:!0});var r=function(){if(o.value){var e=o.value.innerHTML;n("update:modelValue",e)}},l=function(){a.value=!0,o.value&&(o.value.onpaste=function(e){if(e.preventDefault(),e.clipboardData){var t=e.clipboardData.items[0];t&&"string"===t.kind&&"text/plain"===t.type&&t.getAsString((function(e){return n("update:modelValue",e)}))}})},i=function(){a.value=!1,o.value&&(o.value.onpaste=null)};return Object(h["onUnmounted"])((function(){o.value&&(o.value.onpaste=null)})),{textareaRef:o,handleFocus:l,handleInput:r,handleBlur:i,text:c}}});Oc.render=vc;var hc=Oc,jc=Object(h["defineComponent"])({name:"editable-table",components:{CustomTextarea:hc},props:{data:{type:Array,required:!0},width:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup:function(e,t){var n=t.emit,o=X(),c=Object(h["computed"])((function(){return o.state.canvasScale})),a=Object(h["ref"])(["",""]);Object(h["watch"])((function(){return e.theme}),(function(){if(e.theme){var t=oc()(e.theme.color).toRgb(),n={r:t.r,g:t.g,b:t.b,a:.3*t.a},o={r:t.r,g:t.g,b:t.b,a:.1*t.a};a.value=["rgba(".concat([n.r,n.g,n.b,n.a].join(","),")"),"rgba(".concat([o.r,o.g,o.b,o.a].join(","),")")]}}),{immediate:!0});var r=Object(h["computed"])({get:function(){return e.data},set:function(e){n("change",e)}}),l=Object(h["ref"])([]),i=Object(h["computed"])((function(){return l.value.reduce((function(e,t){return e+t}))}));Object(h["watch"])([function(){return e.colWidths},function(){return e.width}],(function(){l.value=e.colWidths.map((function(t){return t*e.width}))}),{immediate:!0});var u=Object(h["ref"])(!1),d=Object(h["ref"])([]),s=Object(h["ref"])([]),f=function(){d.value=[],s.value=[]};Object(h["watch"])((function(){return e.editable}),(function(){e.editable||f()}));var p=Object(h["computed"])((function(){for(var e=[],t=1;t<l.value.length+1;t++){var n=l.value.slice(0,t).reduce((function(e,t){return e+t}));e.push(n)}return e})),b=Object(h["computed"])((function(){for(var e=[],t=0;t<r.value.length;t++)for(var n=r.value[t],o=0;o<n.length;o++){var c=n[o];if(c.colspan>1||c.rowspan>1)for(var a=t;a<t+c.rowspan;a++)for(var l=a===t?o+1:o;l<o+c.colspan;l++)e.push("".concat(a,"_").concat(l))}return e})),m=Object(h["computed"])((function(){if(!d.value.length)return[];var e=Object(Yt["a"])(d.value,2),t=e[0],n=e[1];if(!s.value.length)return["".concat(t,"_").concat(n)];var o=Object(Yt["a"])(s.value,2),c=o[0],a=o[1];if(t===c&&n===a)return["".concat(t,"_").concat(n)];for(var l=[],i=Math.min(t,c),u=Math.min(n,a),f=Math.max(t,c),p=Math.max(n,a),b=0;b<r.value.length;b++)for(var m=r.value[b],v=0;v<m.length;v++)b>=i&&b<=f&&v>=u&&v<=p&&l.push("".concat(b,"_").concat(v));return l}));Object(h["watch"])(m,(function(){n("changeSelectedCells",m.value)}));var v=Object(h["computed"])((function(){return m.value.length>1?null:m.value[0]})),O=Object(h["computed"])((function(){if(!d.value.length)return null;var e=Object(Yt["a"])(d.value,2),t=e[0],n=e[1];if(!s.value.length)return{row:[t,t],col:[n,n]};var o=Object(Yt["a"])(s.value,2),c=o[0],a=o[1];if(t===c&&n===a)return{row:[t,t],col:[n,n]};var r=Math.min(t,c),l=Math.min(n,a),i=Math.max(t,c),u=Math.max(n,a);return{row:[r,i],col:[l,u]}})),j=function(){return u.value=!1},g=function(e,t,n){0===e.button&&(s.value=[],u.value=!0,d.value=[t,n])},y=function(e,t){u.value&&(s.value=[e,t])};Object(h["onMounted"])((function(){document.addEventListener("mouseup",j)})),Object(h["onUnmounted"])((function(){document.removeEventListener("mouseup",j)}));var k=function(e,t){return b.value.includes("".concat(e,"_").concat(t))},E=function(e){var t=r.value.length-1;d.value=[0,e],s.value=[t,e]},I=function(e){var t=r.value[e].length-1;d.value=[e,0],s.value=[e,t]},S=function(){var e=r.value.length-1,t=r.value[e].length-1;d.value=[0,0],s.value=[e,t]},C=function(e){for(var t=JSON.parse(JSON.stringify(r.value)),n=r.value[e],o=[],c=0;c<n.length;c++)k(e,c)&&o.push(c);for(var a=0,l=o;a<l.length;a++)for(var i=l[a],u=e;u>=0;u--)if(!k(u,i)){t[u][i].rowspan=t[u][i].rowspan-1;break}t.splice(e,1),r.value=t},N=function(e){for(var t=JSON.parse(JSON.stringify(r.value)),o=[],c=0;c<r.value.length;c++)k(c,e)&&o.push(c);for(var a=0,i=o;a<i.length;a++)for(var u=i[a],d=e;d>=0;d--)if(!k(u,d)){t[u][d].colspan=t[u][d].colspan-1;break}r.value=t.map((function(t){return t.splice(e,1),t})),l.value.splice(e,1),n("changeColWidths",l.value)},x=function(e){for(var t=JSON.parse(JSON.stringify(r.value)),n=[],o=0;o<t[0].length;o++)n.push({colspan:1,rowspan:1,text:"",id:ie()});t.splice(e,0,n),r.value=t},T=function(e){r.value=r.value.map((function(t){var n={colspan:1,rowspan:1,text:"",id:ie()};return t.splice(e,0,n),t})),l.value.splice(e,0,100),n("changeColWidths",l.value)},L=function(){var e=Object(Yt["a"])(d.value,2),t=e[0],n=e[1],o=Object(Yt["a"])(s.value,2),c=o[0],a=o[1],l=Math.min(t,c),i=Math.min(n,a),u=Math.max(t,c),p=Math.max(n,a),b=JSON.parse(JSON.stringify(r.value));b[l][i].rowspan=u-l+1,b[l][i].colspan=p-i+1,r.value=b,f()},w=function(e,t){var n=JSON.parse(JSON.stringify(r.value));n[e][t].rowspan=1,n[e][t].colspan=1,r.value=n,f()},V=function(e,t){f();var o=!0,a=l.value[t],r=e.pageX,i=50;document.onmousemove=function(e){if(o){var n=(e.pageX-r)/c.value,u=a+n<i?i:Math.round(a+n);l.value[t]=u}},document.onmouseup=function(){o=!1,document.onmousemove=null,document.onmouseup=null,n("changeColWidths",l.value)}},_=function(){for(var e=JSON.parse(JSON.stringify(r.value)),t=0;t<e.length;t++)for(var n=0;n<e[t].length;n++)m.value.includes("".concat(t,"_").concat(n))&&(e[t][n].text="");r.value=e},B=function(){var e=function e(t,n){return r.value[t]?r.value[t][n]?k(t,n)?e(t,n+1):[t,n]:e(t+1,0):null};s.value=[];var t=d.value[0],n=d.value[1]+1,o=e(t,n);o?d.value=o:(x(t+1),d.value=[t+1,0]),Object(h["nextTick"])((function(){var e=document.querySelector(".cell-text.active");e&&e.focus()}))},M=function(t){if(e.editable&&m.value.length){var n=t.key.toUpperCase();if(m.value.length<2){if(n===oe.TAB&&(t.preventDefault(),B()),t.ctrlKey&&n===oe.UP){t.preventDefault();var o=+m.value[0].split("_")[0];x(o)}if(t.ctrlKey&&n===oe.DOWN){t.preventDefault();var c=+m.value[0].split("_")[0];x(c+1)}if(t.ctrlKey&&n===oe.LEFT){t.preventDefault();var a=+m.value[0].split("_")[1];T(a)}if(t.ctrlKey&&n===oe.RIGHT){t.preventDefault();var r=+m.value[0].split("_")[1];T(r+1)}}else n===oe.DELETE&&_()}};Object(h["onMounted"])((function(){document.addEventListener("keydown",M)})),Object(h["onUnmounted"])((function(){document.removeEventListener("keydown",M)}));var D=function(e){if(!e)return{};var t=e.bold,n=e.em,o=e.underline,c=e.strikethrough,a=e.color,r=e.backcolor,l=e.fontsize,i=e.fontname,u=e.align;return{fontWeight:t?"bold":"normal",fontStyle:n?"italic":"normal",textDecoration:"".concat(o?"underline":""," ").concat(c?"line-through":""),color:a||"#000",backgroundColor:r||"",fontSize:l||"14px",fontFamily:i||"微软雅黑",textAlign:u||"left"}},A=ke()((function(){n("change",r.value)}),300,{trailing:!0}),P=function(){for(var e=[],t=0;t<r.value.length;t++){for(var n=r.value[t],o=[],c=0;c<n.length;c++)k(t,c)||o.push(n[c]);o.length&&e.push(o)}return e},R=function(){var e=P(),t=e.length>1,n=e[0].length>1;return{canDeleteRow:t,canDeleteCol:n}},F=function(e,t){var n=m.value.length>1,o=r.value[e][t],c=n,a=!n&&(o.rowspan>1||o.colspan>1);return{canMerge:c,canSplit:a}},z=function(e){var t=e.dataset.cellIndex,n=+t.split("_")[0],o=+t.split("_")[1];m.value.includes("".concat(n,"_").concat(o))||(d.value=[n,o],s.value=[]);var c=F(n,o),a=c.canMerge,r=c.canSplit,l=R(),i=l.canDeleteRow,u=l.canDeleteCol;return[{text:"插入列",children:[{text:"到左侧",handler:function(){return T(o)}},{text:"到右侧",handler:function(){return T(o+1)}}]},{text:"插入行",children:[{text:"到上方",handler:function(){return x(n)}},{text:"到下方",handler:function(){return x(n+1)}}]},{text:"删除列",disable:!u,handler:function(){return N(o)}},{text:"删除行",disable:!i,handler:function(){return C(n)}},{divider:!0},{text:"合并单元格",disable:!a,handler:L},{text:"取消合并单元格",disable:!r,handler:function(){return w(n,o)}},{divider:!0},{text:"选中当前列",handler:function(){return E(o)}},{text:"选中当前行",handler:function(){return I(n)}},{text:"选中全部单元格",handler:S}]};return{getTextStyle:D,dragLinePosition:p,tableCells:r,colSizeList:l,totalWidth:i,hideCells:b,selectedCells:m,activedCell:v,selectedRange:O,handleCellMousedown:g,handleCellMouseenter:y,selectCol:E,selectRow:I,handleMousedownColHandler:V,contextmenus:z,handleInput:A,subThemeColor:a}}});n("04ae");jc.render=mc,jc.__scopeId="data-v-5b5b61a8";var gc=jc,yc=Object(h["defineComponent"])({name:"editable-element-table",components:{EditableTable:gc},props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Se(),c=o.addHistorySnapshot,a=function(t){e.elementInfo.lock||(t.stopPropagation(),e.selectElement(t,e.elementInfo))},r=Object(h["ref"])(!1),l=Object(h["computed"])((function(){return t.state.handleElementId}));Object(h["watch"])(l,(function(){l.value!==e.elementInfo.id&&(r.value=!1)})),Object(h["watch"])(r,(function(){t.commit(g.SET_DISABLE_HOTKEYS_STATE,r.value)}));var i=Object(h["ref"])(),u=Object(h["ref"])(!1),d=Object(h["ref"])(-1),s=function(n){u.value=n,n&&(r.value=!1),n||-1===d.value||(t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{height:d.value}}),d.value=-1)};At.on(Et.SCALE_ELEMENT_STATE,(function(e){return s(e)})),Object(h["onUnmounted"])((function(){At.off(Et.SCALE_ELEMENT_STATE,(function(e){return s(e)}))}));var f=function(n){var o=n[0].contentRect;if(i.value){var c=o.height;e.elementInfo.height!==c&&(u.value?d.value=c:t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{height:c}}))}},p=new ResizeObserver(f);Object(h["onMounted"])((function(){i.value&&p.observe(i.value)})),Object(h["onUnmounted"])((function(){i.value&&p.unobserve(i.value)}));var b=function(n){t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{data:n}}),c()},m=function(n){var o=n.reduce((function(e,t){return e+t})),a=n.map((function(e){return e/o}));t.commit(g.UPDATE_ELEMENT,{id:e.elementInfo.id,props:{width:o,colWidths:a}}),c()},v=function(e){Object(h["nextTick"])((function(){return At.emit(Et.UPDATE_TABLE_SELECTED_CELL,e)}))},O=function(){e.elementInfo.lock||(r.value=!0)};return{elementRef:i,canvasScale:n,handleSelectElement:a,updateTableCells:b,updateColWidths:m,editable:r,startEdit:O,updateSelectedCells:v}}});n("7e16");yc.render=fc,yc.__scopeId="data-v-045f7664";var kc=yc,Ec=Object(h["defineComponent"])({name:"editable-element",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.theme})),o=Object(h["computed"])((function(){var t,n=(t={},Object(C["a"])(t,Kt.IMAGE,Sn),Object(C["a"])(t,Kt.TEXT,wo),Object(C["a"])(t,Kt.SHAPE,Ro),Object(C["a"])(t,Kt.LINE,Yo),Object(C["a"])(t,Kt.CHART,uc),Object(C["a"])(t,Kt.TABLE,kc),t);return n[e.elementInfo.type]||null})),c=Re(),a=c.orderElement,r=en(),l=r.alignElementToCanvas,i=Me(),u=i.combineElements,d=i.uncombineElements,s=Be(),f=s.deleteElement,p=_e(),b=p.lockElement,m=p.unlockElement,v=De(),O=v.copyElement,j=v.cutElement,g=function(){return e.elementInfo.lock?[{text:"解锁",handler:function(){return m(e.elementInfo)}}]:[{text:"剪切",subText:"Ctrl + X",handler:j},{text:"复制",subText:"Ctrl + C",handler:O},{divider:!0},{text:"层级排序",disable:e.isMultiSelect&&!e.elementInfo.groupId,children:[{text:"置顶层",handler:function(){return a(e.elementInfo,$.TOP)}},{text:"置底层",handler:function(){return a(e.elementInfo,$.BOTTOM)}},{divider:!0},{text:"上移一层",handler:function(){return a(e.elementInfo,$.UP)}},{text:"下移一层",handler:function(){return a(e.elementInfo,$.DOWN)}}]},{text:"水平对齐",children:[{text:"水平居中",handler:function(){return l(Q.HORIZONTAL)}},{text:"左对齐",handler:function(){return l(Q.LEFT)}},{text:"右对齐",handler:function(){return l(Q.RIGHT)}}]},{text:"垂直对齐",children:[{text:"垂直居中",handler:function(){return l(Q.VERTICAL)}},{text:"上对齐",handler:function(){return l(Q.TOP)}},{text:"下对齐",handler:function(){return l(Q.BOTTOM)}}]},{divider:!0},{text:e.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:e.elementInfo.groupId?d:u,hide:!e.isMultiSelect},{text:"锁定",subText:"Ctrl + L",handler:b},{text:"删除",subText:"Delete",handler:f}]};return{currentElementComponent:o,contextmenus:g,theme:n}}});Ec.render=Jt;var Ic=Ec,Sc=Object(h["withScopeId"])("data-v-1619c258"),Cc=Sc((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"mouse-selection quadrant-".concat(n.quadrant),style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"}},null,6)})),Nc={name:"mouse-selection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0,validator:function(e){return[1,2,3,4].includes(e)}}}};n("2007");Nc.render=Cc,Nc.__scopeId="data-v-1619c258";var xc=Nc,Tc=Object(h["withScopeId"])("data-v-a1052b6c"),Lc=Tc((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("GridLines");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"slide-background",style:e.backgroundStyle},[e.showGridLines?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0})):Object(h["createCommentVNode"])("",!0)],4)})),wc=Object(h["withScopeId"])("data-v-46354c2e"),Vc=wc((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"grid-lines"},{default:wc((function(){return[Object(h["createVNode"])("path",{style:{transform:"scale(".concat(e.canvasScale,")")},d:e.path,fill:"none",stroke:e.gridColor,"stroke-width":"0.3","shape-rendering":"crispEdges","stroke-dasharray":"5"},null,12,["d","stroke"])]})),_:1})})),_c=Object(h["defineComponent"])({name:"grid-lines",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.canvasScale})),n=Object(h["computed"])((function(){var t;return null===(t=e.getters.currentSlide)||void 0===t?void 0:t.background})),o=Object(h["computed"])((function(){if(!n.value||"image"===n.value.type)return"rgba(100, 100, 100, 0.5)";var e=n.value.color,t=oc()(e).toRgb(),o={r:t.r>128?t.r-128:t.r+127,g:t.g>128?t.g-128:t.g+127,b:t.b>128?t.b-128:t.b+127,a:.5};return"rgba(".concat([o.r,o.g,o.b,o.a].join(","),")")})),c=50,a=function(){for(var e=xe,t=xe*Te,n="",o=0;o<=Math.floor(t/c);o++)n+="M0 ".concat(o*c,", L").concat(e," ").concat(o*c);for(var a=0;a<=Math.floor(e/c);a++)n+="M".concat(a*c," 0, L").concat(a*c," ").concat(t);return n};return{canvasScale:t,gridColor:o,width:xe,height:xe*Te,path:a()}}});n("874d");_c.render=Vc,_c.__scopeId="data-v-46354c2e";var Bc=_c,Mc=function(e){var t=Object(h["computed"])((function(){if(!e.value)return{backgroundColor:"#fff"};var t=e.value,n=t.type,o=t.color,c=t.image,a=t.imageSize,r=t.gradientColor,l=t.gradientRotate,i=t.gradientType;if("solid"===n)return{backgroundColor:o};if("image"===n)return c?"repeat"===a?{backgroundImage:"url(".concat(c),backgroundRepeat:"repeat",backgroundSize:"initial"}:{backgroundImage:"url(".concat(c),backgroundRepeat:"no-repeat",backgroundSize:a||"cover"}:{backgroundColor:"#fff"};if("gradient"===n){var u=l||0,d=r?r[0]:"#fff",s=r?r[1]:"#fff";return"radial"===i?{backgroundImage:"radial-gradient(".concat(d,", ").concat(s)}:{backgroundImage:"linear-gradient(".concat(u,"deg, ").concat(d,", ").concat(s)}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},Dc=Object(h["defineComponent"])({name:"slide-background",components:{GridLines:Bc},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.showGridLines})),n=Object(h["computed"])((function(){var t;return null===(t=e.getters.currentSlide)||void 0===t?void 0:t.background})),o=Mc(n),c=o.backgroundStyle;return{showGridLines:t,backgroundStyle:c}}});n("b7d6");Dc.render=Lc,Dc.__scopeId="data-v-a1052b6c";var Ac=Dc,Pc=Object(h["withScopeId"])("data-v-520a7023"),Rc=Pc((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"alignment-line",style:{left:e.left,top:e.top}},[Object(h["createVNode"])("div",{class:["line",e.type],style:e.sizeStyle},null,6)],4)})),Fc=Object(h["defineComponent"])({name:"alignment-line",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return e.axis.x*n.value+"px"})),c=Object(h["computed"])((function(){return e.axis.y*n.value+"px"})),a=Object(h["computed"])((function(){return"vertical"===e.type?{height:e.length*n.value+"px"}:{width:e.length*n.value+"px"}}));return{left:o,top:c,sizeStyle:a}}});n("032d");Fc.render=Rc,Fc.__scopeId="data-v-520a7023";var zc=Fc,Hc=Object(h["withScopeId"])("data-v-eea668f4"),Uc=Hc((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"element-create-selection",ref:"selectionRef",onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.createSelection(t)}),["stop"]))},[e.start&&e.end?(Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:0,class:["selection",e.creatingElement.type],style:e.position},["line"===e.creatingElement.type&&e.lineData?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,overflow:"visible",width:e.lineData.svgWidth,height:e.lineData.svgHeight},{default:Hc((function(){return[Object(h["createVNode"])("path",{d:e.lineData.path,stroke:"#888",fill:"none","stroke-width":"1","stroke-linecap":"","stroke-linejoin":"","stroke-miterlimit":""},null,8,["d"])]})),_:1},8,["width","height"])):Object(h["createCommentVNode"])("",!0)],6)):Object(h["createCommentVNode"])("",!0)],544)})),Gc=Object(h["defineComponent"])({name:"element-create-selection",setup:function(e,t){var n=t.emit,o=X(),c=Object(h["computed"])((function(){return o.getters.ctrlOrShiftKeyActive})),a=Object(h["computed"])((function(){return o.state.creatingElement})),r=Object(h["ref"])(null),l=Object(h["ref"])(null),i=Object(h["ref"])(),u=Object(h["reactive"])({x:0,y:0});Object(h["onMounted"])((function(){if(i.value){var e=i.value.getBoundingClientRect(),t=e.x,n=e.y;u.x=t,u.y=n}}));var d=function(e){var t=!0,i=e.pageX,u=e.pageY;r.value=[i,u],document.onmousemove=function(e){if(a.value&&t){var n=e.pageX,o=e.pageY;if(c.value){var r=n-i,d=o-u,s=Math.abs(r),f=Math.abs(d);if("shape"===a.value.type){var p=d>0&&r<0||d<0&&r>0;s>f?o=p?u-r:u+r:n=p?i-d:i+d}else"line"===a.value.type&&(s>f?o=u:n=i)}l.value=[n,o]}},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null,t=!1;var c=e.pageX,a=e.pageY,d=30;Math.abs(c-i)>=d||Math.abs(a-u)>=d?n("created",{start:r.value,end:l.value}):o.commit(g.SET_CREATING_ELEMENT,null)}},s=Object(h["computed"])((function(){if(!r.value||!l.value)return null;if(!a.value||"line"!==a.value.type)return null;var e=Object(Yt["a"])(r.value,2),t=e[0],n=e[1],o=Object(Yt["a"])(l.value,2),c=o[0],i=o[1],u=Math.min(t,c),d=Math.max(t,c),s=Math.min(n,i),f=Math.max(n,i),p=d-u>=24?d-u:24,b=f-s>=24?f-s:24,m=t===u?0:d-u,v=n===s?0:f-s,O=c===u?0:d-u,h=i===s?0:f-s,j="M".concat(m,", ").concat(v," L").concat(O,", ").concat(h);return{svgWidth:p,svgHeight:b,startX:m,startY:v,endX:O,endY:h,path:j}})),f=Object(h["computed"])((function(){if(!r.value||!l.value)return{};var e=Object(Yt["a"])(r.value,2),t=e[0],n=e[1],o=Object(Yt["a"])(l.value,2),c=o[0],a=o[1],i=Math.min(t,c),d=Math.max(t,c),s=Math.min(n,a),f=Math.max(n,a),p=d-i,b=f-s;return{left:i-u.x+"px",top:s-u.y+"px",width:p+"px",height:b+"px"}}));return{selectionRef:i,start:r,end:l,creatingElement:a,createSelection:d,lineData:s,position:f}}});n("4e78");Gc.render=Uc,Gc.__scopeId="data-v-eea668f4";var qc=Gc,Wc=Object(h["withScopeId"])("data-v-66dfa39d"),Xc=Wc((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"multi-select-operate",style:{left:e.minX*e.canvasScale+"px",top:e.minY*e.canvasScale+"px"}},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.disableResize?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],{key:0},Object(h["renderList"])(e.resizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleMultiElement(n,{minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY},t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128))],4)})),Yc=function(e,t){var n=Object(h["computed"])((function(){return[{direction:te.LEFT_TOP,style:{}},{direction:te.TOP,style:{left:e.value/2+"px"}},{direction:te.RIGHT_TOP,style:{left:e.value+"px"}},{direction:te.LEFT,style:{top:t.value/2+"px"}},{direction:te.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:te.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:te.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:te.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]})),o=Object(h["computed"])((function(){return[{direction:te.LEFT,style:{top:t.value/2+"px"}},{direction:te.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]})),c=Object(h["computed"])((function(){return[{type:ee.T,style:{width:e.value+"px"}},{type:ee.B,style:{top:t.value+"px",width:e.value+"px"}},{type:ee.L,style:{height:t.value+"px"}},{type:ee.R,style:{left:e.value+"px",height:t.value+"px"}}]}));return{resizeHandlers:n,textElementResizeHandlers:o,borderLines:c}},Zc=Object(h["withScopeId"])("data-v-1c2a68d0"),Jc=Zc((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["resize-handler",n.type]},null,2)})),Kc={name:"resize-handler",props:{type:{type:String,default:""}}};n("a933");Kc.render=Jc,Kc.__scopeId="data-v-1c2a68d0";var $c=Kc,Qc=Object(h["withScopeId"])("data-v-630e246b"),ea=Qc((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["border-line",n.type,{wide:n.isWide}]},null,2)})),ta={name:"border-line",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}}};n("fb1d");ta.render=ea,ta.__scopeId="data-v-630e246b";var na=ta,oa=Object(h["defineComponent"])({name:"multi-select-operate",components:{ResizeHandler:$c,BorderLine:na},props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.activeElementIdList})),o=Object(h["computed"])((function(){return t.state.canvasScale})),c=Object(h["computed"])((function(){return e.elementList.filter((function(e){return n.value.includes(e.id)}))})),a=Object(h["reactive"])({minX:0,maxX:0,minY:0,maxY:0}),r=Object(h["computed"])((function(){return(a.maxX-a.minX)*o.value})),l=Object(h["computed"])((function(){return(a.maxY-a.minY)*o.value})),i=Yc(r,l),u=i.resizeHandlers,d=i.borderLines,s=Object(h["computed"])((function(){return c.value.some((function(e){return!!("image"!==e.type&&"shape"!==e.type||e.rotate)}))})),f=function(){var e=Tt(c.value),t=e.minX,n=e.maxX,o=e.minY,r=e.maxY;a.minX=t,a.maxX=n,a.minY=o,a.maxY=r};return Object(h["watchEffect"])(f),Object(P["a"])(Object(P["a"])({},Object(h["toRefs"])(a)),{},{canvasScale:o,borderLines:d,disableResize:s,resizeHandlers:u})}});n("6aa3");oa.render=Xc,oa.__scopeId="data-v-66dfa39d";var ca=oa,aa=Object(h["withScopeId"])("data-v-558a94fe");Object(h["pushScopeId"])("data-v-558a94fe");var ra={key:1,class:"animation-index"};Object(h["popScopeId"])();var la=aa((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["operate",{"multi-select":e.isMultiSelect&&!e.isActive}],style:{top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)"),transformOrigin:"".concat(e.elementInfo.width*e.canvasScale/2,"px ").concat(e.elementInfo.height*e.canvasScale/2,"px")}},[e.isSelected?(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentOperateComponent),{key:0,elementInfo:e.elementInfo,isActiveGroupElement:e.isActiveGroupElement,isMultiSelect:e.isMultiSelect,rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement},null,8,["elementInfo","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement"])):Object(h["createCommentVNode"])("",!0),"elAnimation"===e.toolbarState&&-1!==e.elementIndexInAnimation?(Object(h["openBlock"])(),Object(h["createBlock"])("div",ra,Object(h["toDisplayString"])(e.elementIndexInAnimation+1),1)):Object(h["createCommentVNode"])("",!0)],6)})),ia=Object(h["withScopeId"])("data-v-5b0628aa"),ua=ia((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler"),i=Object(h["resolveComponent"])("RotateHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["image-element-operate",{cliping:e.isCliping}]},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-border-line",key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.resizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleElement(n,e.elementInfo,t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128)),Object(h["createVNode"])(i,{class:"operate-rotate-handler",style:{left:e.scaleWidth/2+"px"},onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.rotateElement(e.elementInfo)}),["stop"]))},null,8,["style"])],64))],2)})),da=Object(h["withScopeId"])("data-v-9a549510");Object(h["pushScopeId"])("data-v-9a549510");var sa={class:"rotate-handler"};Object(h["popScopeId"])();var fa=da((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",sa)})),pa={name:"rotate-handler"};n("8754");pa.render=fa,pa.__scopeId="data-v-9a549510";var ba=pa,ma=Object(h["defineComponent"])({name:"image-element-operate",inheritAttrs:!1,components:{RotateHandler:ba,ResizeHandler:$c,BorderLine:na},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return t.state.clipingImageElementId})),c=Object(h["computed"])((function(){return o.value===e.elementInfo.id})),a=Object(h["computed"])((function(){return e.elementInfo.width*n.value})),r=Object(h["computed"])((function(){return e.elementInfo.height*n.value})),l=Yc(a,r),i=l.resizeHandlers,u=l.borderLines;return{isCliping:c,scaleWidth:a,resizeHandlers:i,borderLines:u}}});n("5c02");ma.render=ua,ma.__scopeId="data-v-5b0628aa";var va=ma,Oa={class:"text-element-operate"};function ha(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler"),i=Object(h["resolveComponent"])("RotateHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Oa,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-border-line",key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.textElementResizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleElement(n,e.elementInfo,t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128)),Object(h["createVNode"])(i,{class:"operate-rotate-handler",style:{left:e.scaleWidth/2+"px"},onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.rotateElement(e.elementInfo)}),["stop"]))},null,8,["style"])],64))])}var ja=Object(h["defineComponent"])({name:"text-element-operate",inheritAttrs:!1,components:{RotateHandler:ba,ResizeHandler:$c,BorderLine:na},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return e.elementInfo.width*n.value})),c=Object(h["computed"])((function(){return e.elementInfo.height*n.value})),a=Yc(o,c),r=a.textElementResizeHandlers,l=a.borderLines;return{scaleWidth:o,textElementResizeHandlers:r,borderLines:l}}});ja.render=ha;var ga=ja,ya={class:"shape-element-operate"};function ka(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler"),i=Object(h["resolveComponent"])("RotateHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",ya,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-border-line",key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.resizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleElement(n,e.elementInfo,t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128)),Object(h["createVNode"])(i,{class:"operate-rotate-handler",style:{left:e.scaleWidth/2+"px"},onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.rotateElement(e.elementInfo)}),["stop"]))},null,8,["style"])],64))])}var Ea=Object(h["defineComponent"])({name:"shape-element-operate",inheritAttrs:!1,components:{RotateHandler:ba,ResizeHandler:$c,BorderLine:na},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return e.elementInfo.width*n.value})),c=Object(h["computed"])((function(){return e.elementInfo.height*n.value})),a=Yc(o,c),r=a.resizeHandlers,l=a.borderLines;return{scaleWidth:o,resizeHandlers:r,borderLines:l}}});Ea.render=ka;var Ia=Ea,Sa={class:"text-element-operate"};function Ca(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ResizeHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Sa,[e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],{key:0},Object(h["renderList"])(e.resizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.dragLineElement(n,e.elementInfo,t.handler)}),["stop"])},null,8,["type","style","onMousedown"])})),128))])}var Na=Object(h["defineComponent"])({name:"text-element-operate",inheritAttrs:!1,components:{ResizeHandler:$c},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return[{handler:ne.START,style:{left:e.elementInfo.start[0]*n.value+"px",top:e.elementInfo.start[1]*n.value+"px"}},{handler:ne.END,style:{left:e.elementInfo.end[0]*n.value+"px",top:e.elementInfo.end[1]*n.value+"px"}}]}));return{resizeHandlers:o}}});Na.render=Ca;var xa=Na,Ta={class:"chart-element-operate"};function La(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Ta,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-border-line",key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],{key:0},Object(h["renderList"])(e.resizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleElement(n,e.elementInfo,t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128))])}var wa=Object(h["defineComponent"])({name:"chart-element-operate",inheritAttrs:!1,components:{ResizeHandler:$c,BorderLine:na},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},scaleElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return e.elementInfo.width*n.value})),c=Object(h["computed"])((function(){return e.elementInfo.height*n.value})),a=Yc(o,c),r=a.resizeHandlers,l=a.borderLines;return{scaleWidth:o,resizeHandlers:r,borderLines:l}}});wa.render=La;var Va=wa,_a={class:"table-element-operate"};function Ba(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("BorderLine"),l=Object(h["resolveComponent"])("ResizeHandler");return Object(h["openBlock"])(),Object(h["createBlock"])("div",_a,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.borderLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{class:"operate-border-line",key:e.type,type:e.type,style:e.style},null,8,["type","style"])})),128)),e.elementInfo.lock||!e.isActiveGroupElement&&e.isMultiSelect?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],{key:0},Object(h["renderList"])(e.textElementResizeHandlers,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"operate-resize-handler",key:t.direction,type:t.direction,style:t.style,onMousedown:Object(h["withModifiers"])((function(n){return e.scaleElement(n,e.elementInfo,t.direction)}),["stop"])},null,8,["type","style","onMousedown"])})),128))])}var Ma=Object(h["defineComponent"])({name:"table-element-operate",inheritAttrs:!1,components:{ResizeHandler:$c,BorderLine:na},props:{elementInfo:{type:Object,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},scaleElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return e.elementInfo.outline.width||1})),c=Object(h["computed"])((function(){return(e.elementInfo.width+o.value)*n.value})),a=Object(h["computed"])((function(){return e.elementInfo.height*n.value})),r=Yc(c,a),l=r.textElementResizeHandlers,i=r.borderLines;return{scaleWidth:c,textElementResizeHandlers:l,borderLines:i}}});Ma.render=Ba;var Da=Ma,Aa=Object(h["defineComponent"])({name:"operate",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.canvasScale})),o=Object(h["computed"])((function(){return t.state.toolbarState})),c=Object(h["computed"])((function(){return t.getters.currentSlide})),a=Object(h["computed"])((function(){var t,n=(t={},Object(C["a"])(t,Kt.IMAGE,va),Object(C["a"])(t,Kt.TEXT,ga),Object(C["a"])(t,Kt.SHAPE,Ia),Object(C["a"])(t,Kt.LINE,xa),Object(C["a"])(t,Kt.CHART,Va),Object(C["a"])(t,Kt.TABLE,Da),t);return n[e.elementInfo.type]||null})),r=Object(h["computed"])((function(){var t=c.value.animations||[];return t.findIndex((function(t){return t.elId===e.elementInfo.id}))}));return{currentOperateComponent:a,canvasScale:n,toolbarState:o,elementIndexInAnimation:r}}});n("9884");Aa.render=la,Aa.__scopeId="data-v-558a94fe";var Pa=Aa,Ra=Object(h["defineComponent"])({name:"editor-canvas",components:{EditableElement:Ic,MouseSelection:xc,SlideBackground:Ac,AlignmentLine:zc,ElementCreateSelection:qc,MultiSelectOperate:ca,Operate:Pa},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.state.handleElementId})),o=Object(h["computed"])((function(){return e.state.editorAreaFocus})),c=Object(h["computed"])((function(){return e.state.ctrlKeyState})),a=Object(h["computed"])((function(){return e.getters.ctrlOrShiftKeyActive})),r=Object(h["ref"])(),l=Object(h["ref"])([]),i=Object(h["ref"])("");Object(h["watch"])(n,(function(){return i.value=""}));var u=Object(h["computed"])((function(){return e.getters.currentSlide})),d=Object(h["ref"])([]),s=function(){d.value=u.value?JSON.parse(JSON.stringify(u.value.elements)):[]};Object(h["watchEffect"])(s);var f=Object(h["ref"])(),p=Object(h["computed"])((function(){return e.state.canvasScale})),b=Ct(f),m=b.viewportStyles;Vt(f);var v=wt(d,r),O=v.mouseSelectionState,j=v.updateMouseSelection,y=Wt(d,i,l),k=y.dragElement,E=Xt(d),I=E.dragLineElement,S=qt(d,i,k),C=S.selectElement,N=Ht(d,i,l),x=N.scaleElement,T=N.scaleMultiElement,L=Bt(d,r),w=L.rotateElement,V=Ae(),_=V.selectAllElement,B=Be(),M=B.deleteAllElements,D=De(),A=D.pasteElement,P=function(t){e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),a.value||j(t),o.value||e.commit(g.SET_EDITORAREA_FOCUS,!0),St()},R=function(){o.value&&e.commit(g.SET_EDITORAREA_FOCUS,!1)},F=Ge(),z=F.scaleCanvas,H=Ie()(z,100,{leading:!0,trailing:!1}),U=function(e){c.value&&(e.preventDefault(),e.deltaY>0?H("-"):e.deltaY<0&&H("+"))},G=Object(h["computed"])((function(){return e.state.showGridLines})),q=function(){e.commit(g.SET_GRID_LINES_STATE,!G.value)},W=Object(h["computed"])((function(){return e.state.creatingElement})),Y=Zt(r),Z=Y.insertElementFromCreateSelection,J=function(){return[{text:"全选",subText:"Ctrl + A",handler:_},{text:"粘贴",subText:"Ctrl + V",handler:A},{text:G.value?"关闭网格线":"打开网格线",handler:q},{text:"清空本页",handler:M}]};return Object(h["provide"])("slideScale",p),{elementList:d,activeElementIdList:t,handleElementId:n,activeGroupElementId:i,canvasRef:f,viewportRef:r,viewportStyles:m,canvasScale:p,mouseSelectionState:O,handleClickBlankArea:P,removeEditorAreaFocus:R,currentSlide:u,creatingElement:W,insertElementFromCreateSelection:Z,alignmentLines:l,selectElement:C,rotateElement:w,scaleElement:x,dragLineElement:I,scaleMultiElement:T,mousewheelScaleCanvas:U,contextmenus:J}}});n("923f");Ra.render=It,Ra.__scopeId="data-v-75c486b2";var Fa=Ra,za=Object(h["withScopeId"])("data-v-1a2df855");Object(h["pushScopeId"])("data-v-1a2df855");var Ha={class:"canvas-tool"},Ua={class:"left-handler"},Ga={class:"add-element-handler"},qa={class:"right-handler"},Wa={class:"text"};Object(h["popScopeId"])();var Xa=za((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconBack"),l=Object(h["resolveComponent"])("Tooltip"),i=Object(h["resolveComponent"])("IconNext"),u=Object(h["resolveComponent"])("IconFontSize"),d=Object(h["resolveComponent"])("IconPicture"),s=Object(h["resolveComponent"])("FileInput"),f=Object(h["resolveComponent"])("ShapePool"),p=Object(h["resolveComponent"])("IconPentagonOne"),b=Object(h["resolveComponent"])("Popover"),m=Object(h["resolveComponent"])("LinePool"),v=Object(h["resolveComponent"])("IconConnection"),O=Object(h["resolveComponent"])("ChartPool"),j=Object(h["resolveComponent"])("IconChartProportion"),g=Object(h["resolveComponent"])("TableGenerator"),y=Object(h["resolveComponent"])("IconInsertTable"),k=Object(h["resolveComponent"])("IconMinus"),E=Object(h["resolveComponent"])("IconPlus"),I=Object(h["resolveComponent"])("IconFullScreen");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Ha,[Object(h["createVNode"])("div",Ua,[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"撤销"},{default:za((function(){return[Object(h["createVNode"])(r,{class:["handler-item",{disable:!e.canUndo}],onClick:t[1]||(t[1]=function(t){return e.undo()})},null,8,["class"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"重做"},{default:za((function(){return[Object(h["createVNode"])(i,{class:["handler-item",{disable:!e.canRedo}],onClick:t[2]||(t[2]=function(t){return e.redo()})},null,8,["class"])]})),_:1},8,["mouseEnterDelay"])]),Object(h["createVNode"])("div",Ga,[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入文字"},{default:za((function(){return[Object(h["createVNode"])(u,{class:"handler-item",onClick:t[3]||(t[3]=function(t){return e.drawText()})})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(s,{onChange:t[4]||(t[4]=function(t){return e.insertImageElement(t)})},{default:za((function(){return[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图片"},{default:za((function(){return[Object(h["createVNode"])(d,{class:"handler-item"})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(b,{trigger:"click",visible:e.shapePoolVisible,"onUpdate:visible":t[6]||(t[6]=function(t){return e.shapePoolVisible=t})},{content:za((function(){return[Object(h["createVNode"])(f,{onSelect:t[5]||(t[5]=function(t){return e.drawShape(t)})})]})),default:za((function(){return[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入形状"},{default:za((function(){return[Object(h["createVNode"])(p,{class:"handler-item"})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["visible"]),Object(h["createVNode"])(b,{trigger:"click",visible:e.linePoolVisible,"onUpdate:visible":t[8]||(t[8]=function(t){return e.linePoolVisible=t})},{content:za((function(){return[Object(h["createVNode"])(m,{onSelect:t[7]||(t[7]=function(t){return e.drawLine(t)})})]})),default:za((function(){return[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入线条"},{default:za((function(){return[Object(h["createVNode"])(v,{class:"handler-item"})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["visible"]),Object(h["createVNode"])(b,{trigger:"click",visible:e.chartPoolVisible,"onUpdate:visible":t[10]||(t[10]=function(t){return e.chartPoolVisible=t})},{content:za((function(){return[Object(h["createVNode"])(O,{onSelect:t[9]||(t[9]=function(t){e.createChartElement(t),e.chartPoolVisible=!1})})]})),default:za((function(){return[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图表"},{default:za((function(){return[Object(h["createVNode"])(j,{class:"handler-item"})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["visible"]),Object(h["createVNode"])(b,{trigger:"click",visible:e.tableGeneratorVisible,"onUpdate:visible":t[13]||(t[13]=function(t){return e.tableGeneratorVisible=t})},{content:za((function(){return[Object(h["createVNode"])(g,{onClose:t[11]||(t[11]=function(t){return e.tableGeneratorVisible=!1}),onInsert:t[12]||(t[12]=function(t){var n=t.row,o=t.col;e.createTableElement(n,o),e.tableGeneratorVisible=!1})})]})),default:za((function(){return[Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入表格"},{default:za((function(){return[Object(h["createVNode"])(y,{class:"handler-item"})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["visible"])]),Object(h["createVNode"])("div",qa,[Object(h["createVNode"])(k,{class:"handler-item viewport-size",onClick:t[14]||(t[14]=function(t){return e.scaleCanvas("-")})}),Object(h["createVNode"])("span",Wa,Object(h["toDisplayString"])(e.canvasScalePercentage),1),Object(h["createVNode"])(E,{class:"handler-item viewport-size",onClick:t[15]||(t[15]=function(t){return e.scaleCanvas("+")})}),Object(h["createVNode"])(l,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"适配屏幕"},{default:za((function(){return[Object(h["createVNode"])(I,{class:"handler-item viewport-size-adaptation",onClick:t[16]||(t[16]=function(t){return e.setCanvasPercentage(90)})})]})),_:1},8,["mouseEnterDelay"])])])})),Ya=Object(h["withScopeId"])("data-v-e95c032e");Object(h["pushScopeId"])("data-v-e95c032e");var Za={class:"shape-pool"},Ja={class:"category-name"},Ka={class:"shape-list"};Object(h["popScopeId"])();var $a=Ya((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Za,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.shapeList,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"category",key:t.type},[Object(h["createVNode"])("div",Ja,Object(h["toDisplayString"])(t.type),1),Object(h["createVNode"])("div",Ka,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(t.children,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"shape-item",key:n},[Object(h["createVNode"])("div",{class:"shape-content",onClick:function(n){return e.selectShape(t)}},[Object(h["createVNode"])(r,{overflow:"visible",width:"20",height:"20"},{default:Ya((function(){return[Object(h["createVNode"])("g",{transform:"scale(".concat(20/t.viewBox,", ").concat(20/t.viewBox,") translate(0,0) matrix(1,0,0,1,0,0)")},[Object(h["createVNode"])("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",fill:"transparent",stroke:"#999","stroke-width":"2",d:t.path},null,8,["d"])],8,["transform"])]})),_:2},1024)],8,["onClick"])])})),128))])])})),128))])})),Qa=[{type:"矩形",children:[{viewBox:200,path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},{viewBox:200,path:"M 20 0 L 180 0 Q 200 0 200 20 L 200 180 Q 200 200 180 200 L 20 200 Q 0 200 0 180 L 0 20 Q 0 0 20 0 Z"},{viewBox:200,path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 L 0 150 Z"},{viewBox:200,path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 L 0 200"},{viewBox:200,path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Z"},{viewBox:200,path:"M 0 0 L 140 0 Q 200 0 200 60 L 200 200 L 60 200 Q 0 200 0 140 L 0 0 Z"},{viewBox:200,path:"M 0 0 L 140 0 Q 200 0 200 60 L 200 200 L 0 200 L 0 0 Z"},{viewBox:200,path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 50 Z"}]},{type:"常用形状",children:[{viewBox:200,path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},{viewBox:200,path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z"},{viewBox:200,path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z"},{viewBox:200,path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z"},{viewBox:200,path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:200,path:"M 100 0 L 0 200 L 200 200 L 100 0 Z"},{viewBox:200,path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:200,path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z"},{viewBox:200,path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z"},{viewBox:200,path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z"},{viewBox:200,path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z"},{viewBox:200,path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z"},{viewBox:200,path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:200,path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z"},{viewBox:200,path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:200,path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z"},{viewBox:200,path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:200,path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:200,path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z"},{viewBox:200,path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:200,path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:200,path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:200,path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z"},{viewBox:200,path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z"},{viewBox:200,path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:200,path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z"},{viewBox:200,path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:200,path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 L 0 0 Z"},{viewBox:200,path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z"}]},{type:"箭头",children:[{viewBox:200,path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z"},{viewBox:200,path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z"},{viewBox:200,path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:200,path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z"},{viewBox:200,path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z"},{viewBox:200,path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z"},{viewBox:200,path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:200,path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:200,path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z"},{viewBox:200,path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:200,path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:200,path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z"},{viewBox:200,path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:200,path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z"},{viewBox:200,path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"}]},{type:"其他形状",children:[{viewBox:1024,path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z"},{viewBox:1024,path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z"},{viewBox:1024,path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z"},{viewBox:1024,path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z"},{viewBox:1024,path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z"},{viewBox:1024,path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z"},{viewBox:1024,path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z"},{viewBox:1024,path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z"},{viewBox:1024,path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z"},{viewBox:1024,path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z"}]}],er=Object(h["defineComponent"])({name:"shape-pool",setup:function(e,t){var n=t.emit,o=Qa,c=function(e){n("select",e)};return{shapeList:o,selectShape:c}}});n("a2a2");er.render=$a,er.__scopeId="data-v-e95c032e";var tr=er,nr=Object(h["withScopeId"])("data-v-a0f5af54");Object(h["pushScopeId"])("data-v-a0f5af54");var or={class:"line-pool"};Object(h["popScopeId"])();var cr=nr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("LinePointMarker"),l=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])("div",or,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.lineList,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"line-item",key:n},[Object(h["createVNode"])("div",{class:"line-content",onClick:function(n){return e.selectLine(t)}},[Object(h["createVNode"])(l,{overflow:"visible",width:"20",height:"20"},{default:nr((function(){return[Object(h["createVNode"])("defs",null,[t.points[0]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,class:"line-marker",id:"preset-line-".concat(n),position:"start",type:t.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(h["createCommentVNode"])("",!0),t.points[1]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:1,class:"line-marker",id:"preset-line-".concat(n),position:"end",type:t.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(h["createCommentVNode"])("",!0)]),Object(h["createVNode"])("path",{class:"line-path",d:t.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===t.style?"0, 0":"4, 1","stroke-linecap":"","stroke-linejoin":"","stroke-miterlimit":"","marker-start":t.points[0]?"url(#".concat("preset-line-".concat(n),"-",t.points[0],"-start)"):"","marker-end":t.points[1]?"url(#".concat("preset-line-".concat(n),"-",t.points[1],"-end)"):""},null,8,["d","stroke-dasharray","marker-start","marker-end"])]})),_:2},1024)],8,["onClick"])])})),128))])})),ar=[{path:"M0,0 L20,20",style:"solid",points:["",""]},{path:"M0,0 L20,20",style:"dashed",points:["",""]},{path:"M0,0 L20,20",style:"solid",points:["","arrow"]},{path:"M0,0 L20,20",style:"dashed",points:["","arrow"]},{path:"M0,0 L20,20",style:"solid",points:["","dot"]}],rr=Object(h["defineComponent"])({name:"line-pool",components:{LinePointMarker:Wo},setup:function(e,t){var n=t.emit,o=ar,c=function(e){n("select",e)};return{lineList:o,selectLine:c}}});n("69b0");rr.render=cr,rr.__scopeId="data-v-a0f5af54";var lr=rr,ir=Object(h["withScopeId"])("data-v-28a1a821");Object(h["pushScopeId"])("data-v-28a1a821");var ur={class:"chart-pool"};Object(h["popScopeId"])();var dr=ir((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconChartLine"),l=Object(h["resolveComponent"])("IconChartHistogram"),i=Object(h["resolveComponent"])("IconChartProportion");return Object(h["openBlock"])(),Object(h["createBlock"])("ul",ur,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.chartList,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("li",{class:"chart-item",key:n},[Object(h["createVNode"])("div",{class:"chart-content",onClick:function(n){return e.selectChart(t)}},["line"===t?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,size:"24"})):"bar"===t?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:1,size:"24"})):"pie"===t?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:2,size:"24"})):Object(h["createCommentVNode"])("",!0)],8,["onClick"])])})),128))])})),sr=Object(h["defineComponent"])({name:"chart-pool",setup:function(e,t){var n=t.emit,o=["bar","line","pie"],c=function(e){n("select",e)};return{chartList:o,selectChart:c}}});n("4d85");sr.render=dr,sr.__scopeId="data-v-28a1a821";var fr=sr,pr=Object(h["withScopeId"])("data-v-0239b43b");Object(h["pushScopeId"])("data-v-0239b43b");var br={class:"table-generator"},mr={class:"title"},vr={class:"lef"},Or={key:1,class:"custom"},hr={class:"row"},jr=Object(h["createVNode"])("div",{class:"label",style:{flex:"1"}},"行数:",-1),gr={class:"row"},yr=Object(h["createVNode"])("div",{class:"label",style:{flex:"1"}},"列数:",-1),kr={class:"btns"},Er=Object(h["createTextVNode"])("取消"),Ir=Object(h["createTextVNode"])("确认");Object(h["popScopeId"])();var Sr=pr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("InputNumber"),l=Object(h["resolveComponent"])("Button");return Object(h["openBlock"])(),Object(h["createBlock"])("div",br,[Object(h["createVNode"])("div",mr,[Object(h["createVNode"])("div",vr,"插入表格 "+Object(h["toDisplayString"])(e.endCell.length?"".concat(e.endCell[0]," x ").concat(e.endCell[1]):""),1),Object(h["createVNode"])("div",{class:"right",onClick:t[1]||(t[1]=function(t){return e.isCustom=!e.isCustom})},Object(h["toDisplayString"])(e.isCustom?"返回":"自定义"),1)]),e.isCustom?(Object(h["openBlock"])(),Object(h["createBlock"])("div",Or,[Object(h["createVNode"])("div",hr,[jr,Object(h["createVNode"])(r,{min:1,max:20,value:e.customRow,"onUpdate:value":t[4]||(t[4]=function(t){return e.customRow=t}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",gr,[yr,Object(h["createVNode"])(r,{min:1,max:20,value:e.customCol,"onUpdate:value":t[5]||(t[5]=function(t){return e.customCol=t}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",kr,[Object(h["createVNode"])(l,{class:"btn",onClick:t[6]||(t[6]=function(t){return e.close()})},{default:pr((function(){return[Er]})),_:1}),Object(h["createVNode"])(l,{class:"btn",type:"primary",onClick:t[7]||(t[7]=function(t){return e.insertCustomTable()})},{default:pr((function(){return[Ir]})),_:1})])])):(Object(h["openBlock"])(),Object(h["createBlock"])("table",{key:0,onMouseleave:t[2]||(t[2]=function(t){return e.endCell=[]}),onClick:t[3]||(t[3]=function(t){return e.handleClickTable()})},[Object(h["createVNode"])("tbody",null,[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(10,(function(t){return Object(h["createVNode"])("tr",{key:t},[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(10,(function(n){return Object(h["createVNode"])("td",{onMouseenter:function(o){return e.endCell=[t,n]},key:n},[Object(h["createVNode"])("div",{class:["cell",{active:e.endCell.length&&t<=e.endCell[0]&&n<=e.endCell[1]}]},null,2)],40,["onMouseenter"])})),64))])})),64))])],32))])})),Cr=Object(h["defineComponent"])({name:"table-generator",setup:function(e,t){var n=t.emit,o=Object(h["ref"])([]),c=Object(h["ref"])(3),a=Object(h["ref"])(3),r=Object(h["ref"])(!1),l=function(){if(o.value.length){var e=Object(Yt["a"])(o.value,2),t=e[0],c=e[1];n("insert",{row:t,col:c})}},i=function(){return c.value<1||c.value>20||a.value<1||a.value>20?ae["a"].warning("行数/列数必须在0~20之间!"):(n("insert",{row:c.value,col:a.value}),void(r.value=!1))},u=function(){n("close"),r.value=!1};return{endCell:o,customRow:c,customCol:a,handleClickTable:l,insertCustomTable:i,isCustom:r,close:u}}});n("da1a7");Cr.render=Sr,Cr.__scopeId="data-v-0239b43b";var Nr=Cr,xr=Object(h["defineComponent"])({name:"canvas-tool",components:{ShapePool:tr,LinePool:lr,ChartPool:fr,TableGenerator:Nr},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.canvasScale})),n=Object(h["computed"])((function(){return e.getters.canUndo})),o=Object(h["computed"])((function(){return e.getters.canRedo})),c=Object(h["computed"])((function(){return parseInt(100*t.value+"")+"%"})),a=Ge(),r=a.scaleCanvas,l=a.setCanvasPercentage,i=Se(),u=i.redo,d=i.undo,s=Le(),f=s.createImageElement,p=s.createChartElement,b=s.createTableElement,m=function(e){var t=e[0];t&&Ne(t).then((function(e){return f(e)}))},v=Object(h["ref"])(!1),O=Object(h["ref"])(!1),j=Object(h["ref"])(!1),y=Object(h["ref"])(!1),k=function(){e.commit(g.SET_CREATING_ELEMENT,{type:"text",data:null})},E=function(t){e.commit(g.SET_CREATING_ELEMENT,{type:"shape",data:t}),v.value=!1},I=function(t){e.commit(g.SET_CREATING_ELEMENT,{type:"line",data:t}),O.value=!1};return{scaleCanvas:r,setCanvasPercentage:l,canvasScalePercentage:c,canUndo:n,canRedo:o,redo:u,undo:d,insertImageElement:m,shapePoolVisible:v,linePoolVisible:O,chartPoolVisible:j,tableGeneratorVisible:y,drawText:k,drawShape:E,drawLine:I,createChartElement:p,createTableElement:b}}});n("ae3c");xr.render=Xa,xr.__scopeId="data-v-1a2df855";var Tr=xr,Lr=Object(h["withScopeId"])("data-v-6821a1b4");Object(h["pushScopeId"])("data-v-6821a1b4");var wr=Object(h["createTextVNode"])(" 添加幻灯片"),Vr={class:"slide-index"},_r={class:"thumbnail"};Object(h["popScopeId"])();var Br=Lr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconPlus"),l=Object(h["resolveComponent"])("ThumbnailSlide"),i=Object(h["resolveComponent"])("Draggable"),u=Object(h["resolveDirective"])("contextmenu"),d=Object(h["resolveDirective"])("click-outside");return Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"thumbnails",onMousedown:t[2]||(t[2]=function(){return e.setThumbnailsFocus(!0)})},[Object(h["createVNode"])("div",{class:"add-slide",onClick:t[1]||(t[1]=function(t){return e.createSlide()})},[Object(h["createVNode"])(r),wr]),Object(h["createVNode"])(i,{class:"thumbnail-list",modelValue:e.slides,animation:300,scroll:!0,scrollSensitivity:50,onEnd:e.handleDragEnd,itemKey:"id"},{item:Lr((function(t){var n=t.element,o=t.index;return[Object(h["withDirectives"])(Object(h["createVNode"])("div",{class:["thumbnail-wrapper",{active:e.slideIndex===o}],onMousedown:function(t){return e.changSlideIndex(o)}},[Object(h["createVNode"])("div",Vr,Object(h["toDisplayString"])(e.fillDigit(o+1,2)),1),Object(h["createVNode"])("div",_r,[Object(h["createVNode"])(l,{slide:n,size:120},null,8,["slide"])])],42,["onMousedown"]),[[u,e.contextmenusThumbnailItem]])]})),_:1},8,["modelValue","onEnd"])],544)),[[d,function(){return e.setThumbnailsFocus(!1)}],[u,e.contextmenusThumbnails]])})),Mr=n("b76a"),Dr=n.n(Mr),Ar=Object(h["withScopeId"])("data-v-1debfb1c"),Pr=Ar((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ThumbnailElement");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"thumbnail-slide",style:{width:e.size+"px",height:e.size*e.VIEWPORT_ASPECT_RATIO+"px"}},[Object(h["createVNode"])("div",{class:"elements-wrapper",style:{width:e.VIEWPORT_SIZE+"px",height:e.VIEWPORT_SIZE*e.VIEWPORT_ASPECT_RATIO+"px",transform:"scale(".concat(e.scale,")")}},[Object(h["createVNode"])("div",{class:"background",style:Object(P["a"])({},e.backgroundStyle)},null,4),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.slide.elements,(function(e,t){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])})),128))],4)],4)}));function Rr(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element",style:{zIndex:e.elementIndex,color:e.theme.fontColor,fontFamily:e.theme.fontName}},[(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentElementComponent),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],4)}var Fr=Object(h["withScopeId"])("data-v-008489be"),zr=Fr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ImageRectOutline"),l=Object(h["resolveComponent"])("ImageEllipseOutline"),i=Object(h["resolveComponent"])("ImagePolygonOutline");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element-image",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")}},[Object(h["createVNode"])("div",{class:"element-content",style:{filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):"",transform:e.flip}},["rect"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:e.clipShape.radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===e.clipShape.type?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,createPath:e.clipShape.createPath,outline:e.elementInfo.outline},null,8,["width","height","createPath","outline"])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("div",{class:"image-content",style:{clipPath:e.clipShape.style}},[Object(h["createVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:{top:e.imgPosition.top,left:e.imgPosition.left,width:e.imgPosition.width,height:e.imgPosition.height,filter:e.filter},alt:""},null,12,["src"])],4)],4)],4)})),Hr=Object(h["defineComponent"])({name:"base-element-image",components:{ImageRectOutline:dn,ImageEllipseOutline:bn,ImagePolygonOutline:hn},props:{elementInfo:{type:Object,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){if(!e.elementInfo||!e.elementInfo.clip)return{top:"0",left:"0",width:"100%",height:"100%"};var t=Object(Yt["a"])(e.elementInfo.clip.range,2),n=t[0],o=t[1],c=(o[0]-n[0])/100,a=(o[1]-n[1])/100,r=n[0]/c,l=n[1]/a;return{left:-r+"%",top:-l+"%",width:100/c+"%",height:100/a+"%"}})),n=Object(h["computed"])((function(){if(!e.elementInfo||!e.elementInfo.clip)return on.rect;var t=e.elementInfo.clip.shape||$t.RECT;return on[t]})),o=Object(h["computed"])((function(){if(!e.elementInfo.filters)return"";for(var t="",n=0,o=Object.keys(e.elementInfo.filters);n<o.length;n++){var c=o[n];t+="".concat(c,"(").concat(e.elementInfo.filters[c],") ")}return t})),c=Object(h["computed"])((function(){if(!e.elementInfo.flip)return"";var t=e.elementInfo.flip,n=t.x,o=t.y;return n&&o?"rotateX(".concat(n,"deg) rotateY(").concat(o,"deg)"):n?"rotateX(".concat(n,"deg)"):o?"rotateY(".concat(o,"deg)"):""})),a=Object(h["computed"])((function(){return e.elementInfo.shadow})),r=cn(a),l=r.shadowStyle;return{imgPosition:t,clipShape:n,filter:o,flip:c,shadowStyle:l}}});n("5ec9");Hr.render=zr,Hr.__scopeId="data-v-008489be";var Ur=Hr,Gr=Object(h["withScopeId"])("data-v-fc2d45e0"),qr=Gr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementOutline");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element-text",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")}},[Object(h["createVNode"])("div",{class:"element-content",style:{backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:e.shadowStyle,lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px"}},[Object(h["createVNode"])(r,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(h["createVNode"])("div",{class:"text ProseMirror-static",innerHTML:e.elementInfo.content},null,8,["innerHTML"])],4)],4)})),Wr=Object(h["defineComponent"])({name:"base-element-text",components:{ElementOutline:To},props:{elementInfo:{type:Object,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return e.elementInfo.shadow})),n=cn(t),o=n.shadowStyle;return{shadowStyle:o}}});n("beaa");Wr.render=qr,Wr.__scopeId="data-v-fc2d45e0";var Xr=Wr,Yr=Object(h["withScopeId"])("data-v-a34ea4ec");Object(h["pushScopeId"])("data-v-a34ea4ec");var Zr={key:0};Object(h["popScopeId"])();var Jr=Yr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("GradientDefs"),l=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element-shape",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px",transform:"rotate(".concat(e.elementInfo.rotate,"deg)")}},[Object(h["createVNode"])("div",{class:"element-content",style:{opacity:e.elementInfo.opacity,filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):""}},[Object(h["createVNode"])(l,{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},{default:Yr((function(){return[e.elementInfo.gradient?(Object(h["openBlock"])(),Object(h["createBlock"])("defs",Zr,[Object(h["createVNode"])(r,{id:"base-gradient-".concat(e.elementInfo.id),type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("g",{transform:"scale(".concat(e.elementInfo.width/e.elementInfo.viewBox,", ").concat(e.elementInfo.height/e.elementInfo.viewBox,") translate(0,0) matrix(1,0,0,1,0,0)")},[Object(h["createVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8","stroke-linejoin":"",d:e.elementInfo.path,fill:e.elementInfo.gradient?"url(#base-gradient-".concat(e.elementInfo.id,")"):e.elementInfo.fill,stroke:e.outlineColor,"stroke-width":e.outlineWidth,"stroke-dasharray":"dashed"===e.outlineStyle?"10 5":"0 0"},null,8,["d","fill","stroke","stroke-width","stroke-dasharray"])],8,["transform"])]})),_:1},8,["width","height"])],4)],4)})),Kr=Object(h["defineComponent"])({name:"base-element-shape",components:{GradientDefs:Ao},props:{elementInfo:{type:Object,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return e.elementInfo.outline})),n=ln(t),o=n.outlineWidth,c=n.outlineStyle,a=n.outlineColor,r=Object(h["computed"])((function(){return e.elementInfo.shadow})),l=cn(r),i=l.shadowStyle;return{shadowStyle:i,outlineWidth:o,outlineStyle:c,outlineColor:a}}});n("ab3a");Kr.render=Jr,Kr.__scopeId="data-v-a34ea4ec";var $r=Kr,Qr=Object(h["withScopeId"])("data-v-103a3e59"),el=Qr((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("LinePointMarker"),l=Object(h["resolveComponent"])("SvgWrapper");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"editable-element-shape",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"}},[Object(h["createVNode"])("div",{class:"element-content",style:{filter:e.shadowStyle?"drop-shadow(".concat(e.shadowStyle,")"):""}},[Object(h["createVNode"])(l,{overflow:"visible",width:e.svgWidth,height:e.svgHeight},{default:Qr((function(){return[Object(h["createVNode"])("defs",null,[e.elementInfo.points[0]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(h["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(h["createCommentVNode"])("",!0)]),Object(h["createVNode"])("path",{d:e.path,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":e.lineDashArray,fill:"none","stroke-linecap":"","stroke-linejoin":"","stroke-miterlimit":"","marker-start":e.elementInfo.points[0]?"url(#".concat(e.elementInfo.id,"-").concat(e.elementInfo.points[0],"-start)"):"","marker-end":e.elementInfo.points[1]?"url(#".concat(e.elementInfo.id,"-").concat(e.elementInfo.points[1],"-end)"):""},null,8,["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"])]})),_:1},8,["width","height"])],4)],4)})),tl=Object(h["defineComponent"])({name:"editable-element-shape",components:{LinePointMarker:Wo},props:{elementInfo:{type:Object,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return e.elementInfo.shadow})),n=cn(t),o=n.shadowStyle,c=Object(h["computed"])((function(){var t=Math.abs(e.elementInfo.start[0]-e.elementInfo.end[0]);return t<24?24:t})),a=Object(h["computed"])((function(){var t=Math.abs(e.elementInfo.start[1]-e.elementInfo.end[1]);return t<24?24:t})),r=Object(h["computed"])((function(){return"dashed"===e.elementInfo.style?"10, 5":"0, 0"})),l=Object(h["computed"])((function(){var t=e.elementInfo.start.join(","),n=e.elementInfo.end.join(",");return"M".concat(t," L").concat(n)}));return{shadowStyle:o,svgWidth:c,svgHeight:a,lineDashArray:r,path:l}}});n("8b13");tl.render=el,tl.__scopeId="data-v-103a3e59";var nl=tl,ol=Object(h["withScopeId"])("data-v-b4562eca"),cl=ol((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementOutline"),l=Object(h["resolveComponent"])("IconChartLine"),i=Object(h["resolveComponent"])("IconChartHistogram"),u=Object(h["resolveComponent"])("IconChartProportion");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element-chart",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"}},[Object(h["createVNode"])("div",{class:"element-content",style:{backgroundColor:e.elementInfo.fill}},[Object(h["createVNode"])(r,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),"line"===e.elementInfo.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:0,fill:e.elementInfo.themeColor,strokeWidth:"2",size:e.size},null,8,["fill","size"])):"bar"===e.elementInfo.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:1,fill:e.elementInfo.themeColor,strokeWidth:"2",size:e.size},null,8,["fill","size"])):"pie"===e.elementInfo.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])(u,{key:2,fill:e.elementInfo.themeColor,strokeWidth:"2",size:e.size},null,8,["fill","size"])):Object(h["createCommentVNode"])("",!0)],4)],4)})),al=Object(h["defineComponent"])({name:"base-element-chart",components:{ElementOutline:To},props:{elementInfo:{type:Object,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return Math.min(e.elementInfo.width,e.elementInfo.height)}));return{size:t}}});n("3deb");al.render=cl,al.__scopeId="data-v-b4562eca";var rl=al,ll=Object(h["withScopeId"])("data-v-dea016ac");Object(h["pushScopeId"])("data-v-dea016ac");var il={class:"element-content"};Object(h["popScopeId"])();var ul=ll((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("StaticTable");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"base-element-table",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"}},[Object(h["createVNode"])("div",il,[Object(h["createVNode"])(r,{data:e.elementInfo.data,width:e.elementInfo.width,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","colWidths","outline","theme"])])],4)})),dl=Object(h["withScopeId"])("data-v-12bfa92e"),sl=dl((function(e,t,n,o,c,a){var r,l,i,u,d;return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"static-table",style:{width:e.totalWidth+"px"}},[Object(h["createVNode"])("table",{class:{theme:e.theme,"row-header":null===(r=e.theme)||void 0===r?void 0:r.rowHeader,"row-footer":null===(l=e.theme)||void 0===l?void 0:l.rowFooter,"col-header":null===(i=e.theme)||void 0===i?void 0:i.colHeader,"col-footer":null===(u=e.theme)||void 0===u?void 0:u.colFooter},style:"--themeColor: ".concat(null===(d=e.theme)||void 0===d?void 0:d.color,"; --subThemeColor1: ").concat(e.subThemeColor[0],"; --subThemeColor2: ").concat(e.subThemeColor[1])},[Object(h["createVNode"])("colgroup",null,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.colSizeList,(function(e,t){return Object(h["openBlock"])(),Object(h["createBlock"])("col",{span:"1",key:t,width:e},null,8,["width"])})),128))]),Object(h["createVNode"])("tbody",null,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.data,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("tr",{key:n},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(t,(function(t,o){return Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])("td",{class:"cell",style:Object(P["a"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px"},e.getTextStyle(t.style)),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[Object(h["createVNode"])("div",{class:"cell-text",innerHTML:t.text},null,8,["innerHTML"])],12,["rowspan","colspan"])),[[h["vShow"],!e.hideCells.includes("".concat(n,"_").concat(o))]])})),128))])})),128))])],6)],4)})),fl=Object(h["defineComponent"])({name:"static-table",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup:function(e){var t=Object(h["ref"])([]),n=Object(h["computed"])((function(){return t.value.reduce((function(e,t){return e+t}))}));Object(h["watch"])([function(){return e.colWidths},function(){return e.width}],(function(){t.value=e.colWidths.map((function(t){return t*e.width}))}),{immediate:!0});var o=Object(h["computed"])((function(){for(var t=[],n=0;n<e.data.length;n++)for(var o=e.data[n],c=0;c<o.length;c++){var a=o[c];if(a.colspan>1||a.rowspan>1)for(var r=n;r<n+a.rowspan;r++)for(var l=r===n?c+1:c;l<c+a.colspan;l++)t.push("".concat(r,"_").concat(l))}return t})),c=Object(h["ref"])(["",""]);Object(h["watch"])((function(){return e.theme}),(function(){if(e.theme){var t=oc()(e.theme.color).toRgb(),n={r:t.r,g:t.g,b:t.b,a:.3*t.a},o={r:t.r,g:t.g,b:t.b,a:.1*t.a};c.value=["rgba(".concat([n.r,n.g,n.b,n.a].join(","),")"),"rgba(".concat([o.r,o.g,o.b,o.a].join(","),")")]}}),{immediate:!0});var a=function(e){if(!e)return{};var t=e.bold,n=e.em,o=e.underline,c=e.strikethrough,a=e.color,r=e.backcolor,l=e.fontsize,i=e.fontname,u=e.align;return{fontWeight:t?"bold":"normal",fontStyle:n?"italic":"normal",textDecoration:"".concat(o?"underline":""," ").concat(c?"line-through":""),color:a||"#000",backgroundColor:r||"",fontSize:l||"14px",fontFamily:i||"微软雅黑",textAlign:u||"left"}};return{colSizeList:t,totalWidth:n,hideCells:o,getTextStyle:a,subThemeColor:c}}});n("3eac");fl.render=sl,fl.__scopeId="data-v-12bfa92e";var pl=fl,bl=Object(h["defineComponent"])({name:"base-element-table",components:{StaticTable:pl},props:{elementInfo:{type:Object,required:!0}}});n("ba04");bl.render=ul,bl.__scopeId="data-v-dea016ac";var ml=bl,vl=Object(h["defineComponent"])({name:"base-element",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0}},setup:function(e){var t=X(),n=Object(h["computed"])((function(){return t.state.theme})),o=Object(h["computed"])((function(){var t,n=(t={},Object(C["a"])(t,Kt.IMAGE,Ur),Object(C["a"])(t,Kt.TEXT,Xr),Object(C["a"])(t,Kt.SHAPE,$r),Object(C["a"])(t,Kt.LINE,nl),Object(C["a"])(t,Kt.CHART,rl),Object(C["a"])(t,Kt.TABLE,ml),t);return n[e.elementInfo.type]||null}));return{currentElementComponent:o,theme:n}}});vl.render=Rr;var Ol=vl,hl=Object(h["defineComponent"])({name:"thumbnail-slide",components:{ThumbnailElement:Ol},props:{slide:{type:Object,required:!0},size:{type:Number,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){return e.slide.background})),n=Mc(t),o=n.backgroundStyle,c=Object(h["computed"])((function(){return e.size/xe}));return{scale:c,backgroundStyle:o,VIEWPORT_SIZE:xe,VIEWPORT_ASPECT_RATIO:Te}}});n("08f9");hl.render=Pr,hl.__scopeId="data-v-1debfb1c";var jl=hl,gl=Object(h["defineComponent"])({name:"thumbnails",components:{Draggable:Dr.a,ThumbnailSlide:jl},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slides})),n=Object(h["computed"])((function(){return e.state.slideIndex})),o=Ve(),c=o.copySlide,a=o.pasteSlide,r=o.createSlide,l=o.copyAndPasteSlide,i=o.deleteSlide,u=o.cutSlide,d=function(t){e.commit(g.SET_ACTIVE_ELEMENT_ID_LIST,[]),n.value!==t&&e.commit(g.UPDATE_SLIDE_INDEX,t)},s=Object(h["computed"])((function(){return e.state.thumbnailsFocus})),f=function(t){s.value!==t&&e.commit(g.SET_THUMBNAILS_FOCUS,t)},p=function(n){var o=n.newIndex,c=n.oldIndex;if(c!==o){var a=JSON.parse(JSON.stringify(t.value)),r=a[c];a.splice(c,1),a.splice(o,0,r),e.commit(g.SET_SLIDES,a),e.commit(g.UPDATE_SLIDE_INDEX,o)}},b=Ue(),m=b.enterScreening,v=function(){return[{text:"粘贴",subText:"Ctrl + V",handler:a},{text:"新建页面",subText:"Enter",handler:r}]},O=function(){return[{text:"剪切",subText:"Ctrl + X",handler:u},{text:"复制",subText:"Ctrl + C",handler:c},{text:"粘贴",subText:"Ctrl + V",handler:a},{divider:!0},{text:"新建页面",subText:"Enter",handler:r},{text:"复制页面",handler:l},{text:"删除页面",subText:"Delete",handler:i},{divider:!0},{text:"从本页演示",subText:"Ctrl+F",handler:m}]};return{setThumbnailsFocus:f,slides:t,slideIndex:n,createSlide:r,changSlideIndex:d,contextmenusThumbnails:v,contextmenusThumbnailItem:O,fillDigit:ue,handleDragEnd:p}}});n("cba1");gl.render=Br,gl.__scopeId="data-v-6821a1b4";var yl=gl,kl=Object(h["withScopeId"])("data-v-8468ba32");Object(h["pushScopeId"])("data-v-8468ba32");var El={class:"toolbar"},Il={class:"tabs"},Sl={class:"content"};Object(h["popScopeId"])();var Cl=kl((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",El,[Object(h["createVNode"])("div",Il,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.currentTabs,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["tab",{active:t.value===e.toolbarState}],key:t.value,onClick:function(n){return e.setToolbarState(t.value)}},Object(h["toDisplayString"])(t.label),11,["onClick"])})),128))]),Object(h["createVNode"])("div",Sl,[(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentPanelComponent)))])])})),Nl={EL_ANIMATION:"elAnimation",EL_STYLE:"elStyle",EL_POSITION:"elPosition",SLIDE_STYLE:"slideStyle",SLIDE_ANIMATION:"slideAnimation",MULTI_POSITION:"multiPosition"},xl={class:"element-style-panel"},Tl={key:0};function Ll(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",xl,[e.currentPanelComponent?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])("div",Tl," 请先选中要编辑的元素 ")),e.handleElement?(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentPanelComponent),{key:1})):Object(h["createCommentVNode"])("",!0)])}var wl=Object(h["withScopeId"])("data-v-7197d1f3");Object(h["pushScopeId"])("data-v-7197d1f3");var Vl={class:"text-style-panel"},_l={class:"preset-style"},Bl={class:"row"},Ml=Object(h["createVNode"])("div",{style:{flex:"2"}},"行间距:",-1),Dl={class:"row"},Al=Object(h["createVNode"])("div",{style:{flex:"2"}},"字间距:",-1);Object(h["popScopeId"])();var Pl=wl((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Divider"),l=Object(h["resolveComponent"])("IconFontSize"),i=Object(h["resolveComponent"])("SelectOption"),u=Object(h["resolveComponent"])("SelectOptGroup"),d=Object(h["resolveComponent"])("Select"),s=Object(h["resolveComponent"])("IconAddText"),f=Object(h["resolveComponent"])("InputGroup"),p=Object(h["resolveComponent"])("ColorPicker"),b=Object(h["resolveComponent"])("IconText"),m=Object(h["resolveComponent"])("Button"),v=Object(h["resolveComponent"])("Tooltip"),O=Object(h["resolveComponent"])("Popover"),j=Object(h["resolveComponent"])("IconBackgroundColor"),g=Object(h["resolveComponent"])("IconFill"),y=Object(h["resolveComponent"])("ButtonGroup"),k=Object(h["resolveComponent"])("IconTextBold"),E=Object(h["resolveComponent"])("CheckboxButton"),I=Object(h["resolveComponent"])("IconTextItalic"),S=Object(h["resolveComponent"])("IconTextUnderline"),C=Object(h["resolveComponent"])("IconStrikethrough"),N=Object(h["resolveComponent"])("CheckboxButtonGroup"),x=Object(h["resolveComponent"])("IconUpOne"),T=Object(h["resolveComponent"])("IconDownOne"),L=Object(h["resolveComponent"])("IconCode"),w=Object(h["resolveComponent"])("IconQuote"),V=Object(h["resolveComponent"])("IconFormat"),_=Object(h["resolveComponent"])("IconAlignTextLeft"),B=Object(h["resolveComponent"])("RadioButton"),M=Object(h["resolveComponent"])("IconAlignTextCenter"),D=Object(h["resolveComponent"])("IconAlignTextRight"),A=Object(h["resolveComponent"])("RadioGroup"),P=Object(h["resolveComponent"])("IconList"),R=Object(h["resolveComponent"])("IconOrderedList"),F=Object(h["resolveComponent"])("IconRowHeight"),z=Object(h["resolveComponent"])("IconFullwidth"),H=Object(h["resolveComponent"])("ElementOutline"),U=Object(h["resolveComponent"])("ElementShadow"),G=Object(h["resolveComponent"])("ElementOpacity");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Vl,[Object(h["createVNode"])("div",_l,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.presetStyles,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"preset-style-item",key:t.label,style:t.style,onClick:function(n){return e.emitBatchRichTextCommand(t.cmd)}},Object(h["toDisplayString"])(t.label),13,["onClick"])})),128))]),Object(h["createVNode"])(r),Object(h["createVNode"])(f,{compact:"",class:"row"},{default:wl((function(){return[Object(h["createVNode"])(d,{style:{flex:"3"},value:e.richTextAttrs.fontname,onChange:t[1]||(t[1]=function(t){return e.emitRichTextCommand("fontname",t)})},{suffixIcon:wl((function(){return[Object(h["createVNode"])(l)]})),default:wl((function(){return[Object(h["createVNode"])(u,{label:"系统字体"},{default:wl((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.availableFonts,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:e.en,value:e.en},{default:wl((function(){return[Object(h["createVNode"])("span",{style:{fontFamily:e.en}},Object(h["toDisplayString"])(e.zh),5)]})),_:2},1032,["value"])})),128))]})),_:1}),Object(h["createVNode"])(u,{label:"在线字体"},{default:wl((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.webFonts,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:e.name,value:e.name},{default:wl((function(){return[Object(h["createVNode"])("span",null,Object(h["toDisplayString"])(e.name),1)]})),_:2},1032,["value"])})),128))]})),_:1})]})),_:1},8,["value"]),Object(h["createVNode"])(d,{style:{flex:"2"},value:e.richTextAttrs.fontsize,onChange:t[2]||(t[2]=function(t){return e.emitRichTextCommand("fontsize",t)})},{suffixIcon:wl((function(){return[Object(h["createVNode"])(s)]})),default:wl((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.fontSizeOptions,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:e,value:e},{default:wl((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(e),1)]})),_:2},1032,["value"])})),128))]})),_:1},8,["value"])]})),_:1}),Object(h["createVNode"])(y,{class:"row"},{default:wl((function(){return[Object(h["createVNode"])(O,{trigger:"click"},{content:wl((function(){return[Object(h["createVNode"])(p,{modelValue:e.richTextAttrs.color,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.emitRichTextCommand("color",t)})},null,8,["modelValue"])]})),default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:wl((function(){return[Object(h["createVNode"])(m,{class:"text-color-btn",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(b),Object(h["createVNode"])("div",{class:"text-color-block",style:{backgroundColor:e.richTextAttrs.color}},null,4)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(O,{trigger:"click"},{content:wl((function(){return[Object(h["createVNode"])(p,{modelValue:e.richTextAttrs.backcolor,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.emitRichTextCommand("backcolor",t)})},null,8,["modelValue"])]})),default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:wl((function(){return[Object(h["createVNode"])(m,{class:"text-color-btn",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(j),Object(h["createVNode"])("div",{class:"text-color-block",style:{backgroundColor:e.richTextAttrs.backcolor}},null,4)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(O,{trigger:"click"},{content:wl((function(){return[Object(h["createVNode"])(p,{modelValue:e.fill,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.updateFill(t)})},null,8,["modelValue"])]})),default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文本框填充"},{default:wl((function(){return[Object(h["createVNode"])(m,{class:"text-color-btn",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(g),Object(h["createVNode"])("div",{class:"text-color-block",style:{backgroundColor:e.fill}},null,4)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1})]})),_:1}),Object(h["createVNode"])(N,{class:"row"},{default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.bold,onClick:t[6]||(t[6]=function(t){return e.emitRichTextCommand("bold")})},{default:wl((function(){return[Object(h["createVNode"])(k)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.em,onClick:t[7]||(t[7]=function(t){return e.emitRichTextCommand("em")})},{default:wl((function(){return[Object(h["createVNode"])(I)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.underline,onClick:t[8]||(t[8]=function(t){return e.emitRichTextCommand("underline")})},{default:wl((function(){return[Object(h["createVNode"])(S)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.strikethrough,onClick:t[9]||(t[9]=function(t){return e.emitRichTextCommand("strikethrough")})},{default:wl((function(){return[Object(h["createVNode"])(C)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(N,{class:"row"},{default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上标"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.superscript,onClick:t[10]||(t[10]=function(t){return e.emitRichTextCommand("superscript")})},{default:wl((function(){return[Object(h["createVNode"])(x)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下标"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.subscript,onClick:t[11]||(t[11]=function(t){return e.emitRichTextCommand("subscript")})},{default:wl((function(){return[Object(h["createVNode"])(T)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"行内代码"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.code,onClick:t[12]||(t[12]=function(t){return e.emitRichTextCommand("code")})},{default:wl((function(){return[Object(h["createVNode"])(L)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"引用"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.blockquote,onClick:t[13]||(t[13]=function(t){return e.emitRichTextCommand("blockquote")})},{default:wl((function(){return[Object(h["createVNode"])(w)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},onClick:t[14]||(t[14]=function(t){return e.emitRichTextCommand("clear")})},{default:wl((function(){return[Object(h["createVNode"])(V)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(r),Object(h["createVNode"])(A,{class:"row","button-style":"solid",value:e.richTextAttrs.align,onChange:t[15]||(t[15]=function(t){return e.emitRichTextCommand("align",t.target.value)})},{default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:wl((function(){return[Object(h["createVNode"])(B,{value:"left",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(_)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:wl((function(){return[Object(h["createVNode"])(B,{value:"center",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(M)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:wl((function(){return[Object(h["createVNode"])(B,{value:"right",style:{flex:"1"}},{default:wl((function(){return[Object(h["createVNode"])(D)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["value"]),Object(h["createVNode"])(N,{class:"row"},{default:wl((function(){return[Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"项目符号"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.bulletList,onClick:t[16]||(t[16]=function(t){return e.emitRichTextCommand("bulletList")})},{default:wl((function(){return[Object(h["createVNode"])(P)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(v,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"编号"},{default:wl((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},checked:e.richTextAttrs.orderedList,onClick:t[17]||(t[17]=function(t){return e.emitRichTextCommand("orderedList")})},{default:wl((function(){return[Object(h["createVNode"])(R)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(r),Object(h["createVNode"])("div",Bl,[Ml,Object(h["createVNode"])(d,{style:{flex:"3"},value:e.lineHeight,onChange:t[18]||(t[18]=function(t){return e.updateLineHeight(t)})},{suffixIcon:wl((function(){return[Object(h["createVNode"])(F)]})),default:wl((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.lineHeightOptions,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:e,value:e},{default:wl((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(e)+"倍",1)]})),_:2},1032,["value"])})),128))]})),_:1},8,["value"])]),Object(h["createVNode"])("div",Dl,[Al,Object(h["createVNode"])(d,{style:{flex:"3"},value:e.wordSpace,onChange:t[19]||(t[19]=function(t){return e.updateWordSpace(t)})},{suffixIcon:wl((function(){return[Object(h["createVNode"])(z)]})),default:wl((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.wordSpaceOptions,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:e,value:e},{default:wl((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(e)+"px",1)]})),_:2},1032,["value"])})),128))]})),_:1},8,["value"])]),Object(h["createVNode"])(r),Object(h["createVNode"])(H),Object(h["createVNode"])(r),Object(h["createVNode"])(U),Object(h["createVNode"])(r),Object(h["createVNode"])(G)])})),Rl=Object(h["withScopeId"])("data-v-4b901be6");Object(h["pushScopeId"])("data-v-4b901be6");var Fl={class:"element-opacity"},zl={class:"row"},Hl=Object(h["createVNode"])("div",{style:{flex:"2"}},"不透明度:",-1);Object(h["popScopeId"])();var Ul=Rl((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Slider");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Fl,[Object(h["createVNode"])("div",zl,[Hl,Object(h["createVNode"])(r,{min:0,max:1,step:.1,value:e.opacity,style:{flex:"3"},onChange:t[1]||(t[1]=function(t){return e.updateOpacity(t)})},null,8,["step","value"])])])})),Gl=Object(h["defineComponent"])({name:"element-opacity",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])();Object(h["watch"])(t,(function(){t.value&&(n.value="opacity"in t.value&&void 0!==t.value.opacity?t.value.opacity:1)}),{deep:!0,immediate:!0});var o=Se(),c=o.addHistorySnapshot,a=function(n){var o={opacity:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),c()};return{opacity:n,updateOpacity:a}}});n("79cb");Gl.render=Ul,Gl.__scopeId="data-v-4b901be6";var ql=Gl,Wl=(n("c7cd"),Object(h["withScopeId"])("data-v-38e2f880"));Object(h["pushScopeId"])("data-v-38e2f880");var Xl={class:"element-outline"},Yl={key:0,class:"row"},Zl=Object(h["createVNode"])("div",{style:{flex:"2"}},"启用边框:",-1),Jl={class:"switch-wrapper",style:{flex:"3"}},Kl={class:"row"},$l=Object(h["createVNode"])("div",{style:{flex:"2"}},"边框样式:",-1),Ql=Object(h["createTextVNode"])("实线边框"),ei=Object(h["createTextVNode"])("虚线边框"),ti={class:"row"},ni=Object(h["createVNode"])("div",{style:{flex:"2"}},"边框颜色:",-1),oi={class:"row"},ci=Object(h["createVNode"])("div",{style:{flex:"2"}},"边框粗细:",-1);Object(h["popScopeId"])();var ai=Wl((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Switch"),l=Object(h["resolveComponent"])("SelectOption"),i=Object(h["resolveComponent"])("Select"),u=Object(h["resolveComponent"])("ColorPicker"),d=Object(h["resolveComponent"])("ColorButton"),s=Object(h["resolveComponent"])("Popover"),f=Object(h["resolveComponent"])("InputNumber");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Xl,[e.fixed?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])("div",Yl,[Zl,Object(h["createVNode"])("div",Jl,[Object(h["createVNode"])(r,{checked:e.hasOutline,onChange:t[1]||(t[1]=function(t){return e.toggleOutline(t)})},null,8,["checked"])])])),e.hasOutline?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:1},[Object(h["createVNode"])("div",Kl,[$l,Object(h["createVNode"])(i,{style:{flex:"3"},value:e.outline.style,onChange:t[2]||(t[2]=function(t){return e.updateOutline({style:t})})},{default:Wl((function(){return[Object(h["createVNode"])(l,{value:"solid"},{default:Wl((function(){return[Ql]})),_:1}),Object(h["createVNode"])(l,{value:"dashed"},{default:Wl((function(){return[ei]})),_:1})]})),_:1},8,["value"])]),Object(h["createVNode"])("div",ti,[ni,Object(h["createVNode"])(s,{trigger:"click"},{content:Wl((function(){return[Object(h["createVNode"])(u,{modelValue:e.outline.color,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.updateOutline({color:t})})},null,8,["modelValue"])]})),default:Wl((function(){return[Object(h["createVNode"])(d,{color:e.outline.color,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",oi,[ci,Object(h["createVNode"])(f,{value:e.outline.width,onChange:t[4]||(t[4]=function(t){return e.updateOutline({width:t})}),style:{flex:"3"}},null,8,["value"])])],64)):Object(h["createCommentVNode"])("",!0)])})),ri=Object(h["withScopeId"])("data-v-39016b60"),li=ri((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconPlatte"),l=Object(h["resolveComponent"])("Button");return Object(h["openBlock"])(),Object(h["createBlock"])(l,{class:"color-btn"},{default:ri((function(){return[Object(h["createVNode"])("div",{class:"color-block",style:{backgroundColor:n.color}},null,4),Object(h["createVNode"])(r,{class:"color-btn-icon"})]})),_:1})})),ii={name:"color-button",props:{color:{type:String,required:!0}}};n("1401");ii.render=li,ii.__scopeId="data-v-39016b60";var ui=ii,di=Object(h["defineComponent"])({name:"element-outline",components:{ColorButton:ui},props:{fixed:{type:Boolean,default:!1}},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(),o=Object(h["ref"])(!1);Object(h["watch"])(t,(function(){t.value&&(n.value="outline"in t.value?t.value.outline:void 0,o.value=!!n.value)}),{deep:!0,immediate:!0});var c=Se(),a=c.addHistorySnapshot,r=function(o){var c={outline:Object(P["a"])(Object(P["a"])({},n.value),o)};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:c}),a()},l=function(n){if(n){var o={outline:{width:2,color:"#000",style:"solid"}};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o})}else e.commit(g.REMOVE_ELEMENT_PROPS,{id:t.value.id,propName:"outline"});a()};return{outline:n,hasOutline:o,toggleOutline:l,updateOutline:r}}});n("e1ba");di.render=ai,di.__scopeId="data-v-38e2f880";var si=di,fi=Object(h["withScopeId"])("data-v-02448be4");Object(h["pushScopeId"])("data-v-02448be4");var pi={class:"element-shadow"},bi={class:"row"},mi=Object(h["createVNode"])("div",{style:{flex:"2"}},"启用阴影:",-1),vi={class:"switch-wrapper",style:{flex:"3"}},Oi={class:"row"},hi=Object(h["createVNode"])("div",{style:{flex:"2"}},"水平阴影:",-1),ji={class:"row"},gi=Object(h["createVNode"])("div",{style:{flex:"2"}},"垂直阴影:",-1),yi={class:"row"},ki=Object(h["createVNode"])("div",{style:{flex:"2"}},"模糊距离:",-1),Ei={class:"row"},Ii=Object(h["createVNode"])("div",{style:{flex:"2"}},"阴影颜色:",-1);Object(h["popScopeId"])();var Si=fi((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Switch"),l=Object(h["resolveComponent"])("Slider"),i=Object(h["resolveComponent"])("ColorPicker"),u=Object(h["resolveComponent"])("ColorButton"),d=Object(h["resolveComponent"])("Popover");return Object(h["openBlock"])(),Object(h["createBlock"])("div",pi,[Object(h["createVNode"])("div",bi,[mi,Object(h["createVNode"])("div",vi,[Object(h["createVNode"])(r,{checked:e.hasShadow,onChange:t[1]||(t[1]=function(t){return e.toggleShadow(t)})},null,8,["checked"])])]),e.hasShadow?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[Object(h["createVNode"])("div",Oi,[hi,Object(h["createVNode"])(l,{min:0,max:10,step:1,value:e.shadow.h,onChange:t[2]||(t[2]=function(t){return e.updateShadow({h:t})}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",ji,[gi,Object(h["createVNode"])(l,{min:0,max:10,step:1,value:e.shadow.v,onChange:t[3]||(t[3]=function(t){return e.updateShadow({v:t})}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",yi,[ki,Object(h["createVNode"])(l,{min:1,max:20,step:1,value:e.shadow.blur,onChange:t[4]||(t[4]=function(t){return e.updateShadow({blur:t})}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",Ei,[Ii,Object(h["createVNode"])(d,{trigger:"click"},{content:fi((function(){return[Object(h["createVNode"])(i,{modelValue:e.shadow.color,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.updateShadow({color:t})})},null,8,["modelValue"])]})),default:fi((function(){return[Object(h["createVNode"])(u,{color:e.shadow.color,style:{flex:"3"}},null,8,["color"])]})),_:1})])],64)):Object(h["createCommentVNode"])("",!0)])})),Ci=Object(h["defineComponent"])({name:"element-shadow",components:{ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(),o=Object(h["ref"])(!1);Object(h["watch"])(t,(function(){t.value&&(n.value="shadow"in t.value?t.value.shadow:void 0,o.value=!!n.value)}),{deep:!0,immediate:!0});var c=Se(),a=c.addHistorySnapshot,r=function(o){var c={shadow:Object(P["a"])(Object(P["a"])({},n.value),o)};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:c}),a()},l=function(n){if(n){var o={shadow:{h:1,v:1,blur:2,color:"#000"}};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o})}else e.commit(g.REMOVE_ELEMENT_PROPS,{id:t.value.id,propName:"shadow"});a()};return{shadow:n,hasShadow:o,toggleShadow:l,updateShadow:r}}});n("b6e8");Ci.render=Si,Ci.__scopeId="data-v-02448be4";var Ni=Ci,xi=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"fontsize",value:"48px"},{command:"align",value:"center"},{command:"bold"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"fontsize",value:"36px"},{command:"align",value:"center"},{command:"bold"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],Ti=H,Li=Object(h["defineComponent"])({name:"text-style-panel",components:{ElementOpacity:ql,ElementOutline:si,ElementShadow:Ni},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(),o=Object(h["ref"])(),c=Object(h["ref"])();Object(h["watch"])(t,(function(){t.value&&"text"===t.value.type&&(n.value=t.value.fill||"#000",o.value=t.value.lineHeight||1.5,c.value=t.value.wordSpace||0)}),{deep:!0,immediate:!0});var a=Object(h["ref"])({bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"#000",fontsize:"20px",fontname:"微软雅黑",align:"left",bulletList:!1,orderedList:!1,blockquote:!1}),r=Object(h["computed"])((function(){return e.state.availableFonts})),l=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],i=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],u=[0,1,2,3,4,5,6,8,10],d=function(e){return a.value=e};At.on(Et.UPDATE_TEXT_STATE,(function(e){return d(e)})),Object(h["onUnmounted"])((function(){At.off(Et.UPDATE_TEXT_STATE,(function(e){return d(e)}))}));var s=function(e,t){At.emit(Et.EXEC_TEXT_COMMAND,{command:e,value:t})},f=function(e){At.emit(Et.EXEC_TEXT_COMMAND,e)},p=Se(),b=p.addHistorySnapshot,m=function(n){var o={lineHeight:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},v=function(n){var o={wordSpace:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},O=function(n){var o={fill:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()};return{fill:n,lineHeight:o,wordSpace:c,richTextAttrs:a,availableFonts:r,webFonts:Ti,fontSizeOptions:l,lineHeightOptions:i,wordSpaceOptions:u,updateLineHeight:m,updateWordSpace:v,updateFill:O,emitRichTextCommand:s,emitBatchRichTextCommand:f,presetStyles:xi}}});n("050c");Li.render=Pl,Li.__scopeId="data-v-7197d1f3";var wi=Li,Vi=Object(h["withScopeId"])("data-v-af9fc43e");Object(h["pushScopeId"])("data-v-af9fc43e");var _i={class:"image-style-panel"},Bi=Object(h["createTextVNode"])(" 裁剪图片"),Mi={class:"clip"},Di=Object(h["createVNode"])("div",{class:"title"},"按形状裁剪:",-1),Ai={class:"shape-clip"},Pi={key:0,class:"title"},Ri={class:"filter"},Fi={class:"name"},zi={class:"value"},Hi=Object(h["createTextVNode"])(" 设置滤镜"),Ui={class:"row"},Gi=Object(h["createVNode"])("div",{style:{flex:"2"}},"水平翻转:",-1),qi={class:"switch-wrapper",style:{flex:"3"}},Wi={class:"row"},Xi=Object(h["createVNode"])("div",{style:{flex:"2"}},"垂直翻转:",-1),Yi={class:"switch-wrapper",style:{flex:"3"}},Zi=Object(h["createTextVNode"])(" 替换图片"),Ji=Object(h["createTextVNode"])(" 重置样式"),Ki=Object(h["createTextVNode"])(" 设为背景");Object(h["popScopeId"])();var $i=Vi((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconTailoring"),l=Object(h["resolveComponent"])("Button"),i=Object(h["resolveComponent"])("ButtonGroup"),u=Object(h["resolveComponent"])("IconDown"),d=Object(h["resolveComponent"])("Popover"),s=Object(h["resolveComponent"])("Slider"),f=Object(h["resolveComponent"])("IconColorFilter"),p=Object(h["resolveComponent"])("Switch"),b=Object(h["resolveComponent"])("Divider"),m=Object(h["resolveComponent"])("ElementOutline"),v=Object(h["resolveComponent"])("ElementShadow"),O=Object(h["resolveComponent"])("IconTransform"),j=Object(h["resolveComponent"])("FileInput"),g=Object(h["resolveComponent"])("IconUndo"),y=Object(h["resolveComponent"])("IconTheme");return Object(h["openBlock"])(),Object(h["createBlock"])("div",_i,[Object(h["createVNode"])("div",{class:"origin-image",style:{backgroundImage:"url(".concat(e.handleElement.src,")")}},null,4),Object(h["createVNode"])(i,{class:"row"},{default:Vi((function(){return[Object(h["createVNode"])(l,{style:{flex:"5"},onClick:t[1]||(t[1]=function(t){return e.clipImage()})},{default:Vi((function(){return[Object(h["createVNode"])(r,{class:"btn-icon"}),Bi]})),_:1}),Object(h["createVNode"])(d,{trigger:"click",visible:e.clipPanelVisible,"onUpdate:visible":t[2]||(t[2]=function(t){return e.clipPanelVisible=t})},{content:Vi((function(){return[Object(h["createVNode"])("div",Mi,[Di,Object(h["createVNode"])("div",Ai,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.shapeClipPathOptions,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"shape-clip-item",key:n,onClick:function(t){return e.presetImageClip(n)}},[Object(h["createVNode"])("div",{class:"shape",style:{backgroundImage:"url(".concat(e.handleElement.src,")"),clipPath:t.style}},null,4)],8,["onClick"])})),128))]),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.ratioClipOptions,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:t.label},[t.label?(Object(h["openBlock"])(),Object(h["createBlock"])("div",Pi,Object(h["toDisplayString"])(t.label)+":",1)):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])(i,{class:"row"},{default:Vi((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(t.children,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{style:{flex:"1"},key:t.key,onClick:function(n){return e.presetImageClip("rect",t.ratio)}},{default:Vi((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(t.key),1)]})),_:2},1032,["onClick"])})),128))]})),_:2},1024)],64)})),128))])]})),default:Vi((function(){return[Object(h["createVNode"])(l,{class:"no-padding",style:{flex:"1"}},{default:Vi((function(){return[Object(h["createVNode"])(u)]})),_:1})]})),_:1},8,["visible"])]})),_:1}),Object(h["createVNode"])(d,{trigger:"click"},{content:Vi((function(){return[Object(h["createVNode"])("div",Ri,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.filterOptions,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"filter-item",key:t.key},[Object(h["createVNode"])("div",Fi,Object(h["toDisplayString"])(t.label),1),Object(h["createVNode"])(s,{class:"filter-slider",max:t.max,min:t.min,step:t.step,value:t.value,onChange:function(n){return e.updateFilter(t,n)}},null,8,["max","min","step","value","onChange"]),Object(h["createVNode"])("div",zi,Object(h["toDisplayString"])("".concat(t.value).concat(t.unit)),1)])})),128))])]})),default:Vi((function(){return[Object(h["createVNode"])(l,{class:"full-width-btn"},{default:Vi((function(){return[Object(h["createVNode"])(f,{class:"btn-icon"}),Hi]})),_:1})]})),_:1}),Object(h["createVNode"])("div",Ui,[Gi,Object(h["createVNode"])("div",qi,[Object(h["createVNode"])(p,{checked:180===e.flip.x,onChange:t[3]||(t[3]=function(t){return e.updateImage({flip:{x:t?180:0,y:e.flip.y}})})},null,8,["checked"])])]),Object(h["createVNode"])("div",Wi,[Xi,Object(h["createVNode"])("div",Yi,[Object(h["createVNode"])(p,{checked:180===e.flip.y,onChange:t[4]||(t[4]=function(t){return e.updateImage({flip:{x:e.flip.x,y:t?180:0}})})},null,8,["checked"])])]),Object(h["createVNode"])(b),Object(h["createVNode"])(m),Object(h["createVNode"])(b),Object(h["createVNode"])(v),Object(h["createVNode"])(b),Object(h["createVNode"])(j,{onChange:t[5]||(t[5]=function(t){return e.replaceImage(t)})},{default:Vi((function(){return[Object(h["createVNode"])(l,{class:"full-width-btn"},{default:Vi((function(){return[Object(h["createVNode"])(O,{class:"btn-icon"}),Zi]})),_:1})]})),_:1}),Object(h["createVNode"])(l,{class:"full-width-btn",onClick:t[6]||(t[6]=function(t){return e.resetImage()})},{default:Vi((function(){return[Object(h["createVNode"])(g,{class:"btn-icon"}),Ji]})),_:1}),Object(h["createVNode"])(l,{class:"full-width-btn",onClick:t[7]||(t[7]=function(t){return e.setBackgroundImage()})},{default:Vi((function(){return[Object(h["createVNode"])(y,{class:"btn-icon"}),Ki]})),_:1})])})),Qi=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],eu=on,tu=[{label:"纵横比(方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],nu=Object(h["defineComponent"])({name:"image-style-panel",components:{ElementOutline:si,ElementShadow:Ni},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["computed"])((function(){return e.getters.currentSlide})),o=Object(h["ref"])(!1),c=Object(h["ref"])({x:0,y:0}),a=Object(h["ref"])(JSON.parse(JSON.stringify(Qi)));Object(h["watch"])(t,(function(){if(t.value&&"image"===t.value.type){t.value.flip?c.value={x:t.value.flip.x||0,y:t.value.flip.y||0}:c.value={x:0,y:0};var e=t.value.filters;a.value=e?Qi.map((function(t){return void 0!==e[t.key]?Object(P["a"])(Object(P["a"])({},t),{},{value:parseInt(e[t.key])}):t})):JSON.parse(JSON.stringify(Qi))}}),{deep:!0,immediate:!0});var r=Se(),l=r.addHistorySnapshot,i=function(n){e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:n}),l()},u=function(n,o){var c=t.value.filters||{},a=Object(P["a"])(Object(P["a"])({},c),{},Object(C["a"])({},n.key,"".concat(o).concat(n.unit))),r={filters:a};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:r}),l()},d=function(){e.commit(g.SET_CLIPING_IMAGE_ELEMENT_ID,t.value.id),o.value=!1},s=function(){var e=t.value.width,n=t.value.height,o=t.value.left,c=t.value.top,a=t.value.clip?t.value.clip.range:[[0,0],[100,100]],r=e/((a[1][0]-a[0][0])/100),l=n/((a[1][1]-a[0][1])/100),i=o-r*(a[0][0]/100),u=c-l*(a[0][1]/100);return{originClipRange:a,originWidth:r,originHeight:l,originLeft:i,originTop:u}},f=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=s(),a=c.originClipRange,r=c.originWidth,i=c.originHeight,u=c.originLeft,f=c.originTop;if(o){var p,b=i/r,m=0,v=100;if(b>o){var O=(1-o/b)/2*100;p=[[m,O],[v,v-O]]}else{var h=(1-b/o)/2*100;p=[[h,m],[v-h,v]]}e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:{clip:Object(P["a"])(Object(P["a"])({},t.value.clip),{},{shape:n,range:p}),left:u+r*(p[0][0]/100),top:f+i*(p[0][1]/100),width:r*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:{clip:Object(P["a"])(Object(P["a"])({},t.value.clip),{},{shape:n,range:a})}});d(),l()},p=function(n){var o=n[0];o&&(Ne(o).then((function(n){var o={src:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o})})),l())},b=function(){if(t.value.clip){var n=s(),o=n.originWidth,c=n.originHeight,a=n.originLeft,r=n.originTop;e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:{left:a,top:r,width:o,height:c}})}e.commit(g.REMOVE_ELEMENT_PROPS,{id:t.value.id,propName:["clip","outline","flip","shadow","filters"]}),l()},m=function(){var o=Object(P["a"])(Object(P["a"])({},n.value.background),{},{type:"image",image:t.value.src,imageSize:"cover"});e.commit(g.UPDATE_SLIDE,{background:o}),l()};return{clipPanelVisible:o,shapeClipPathOptions:eu,ratioClipOptions:tu,filterOptions:a,flip:c,handleElement:t,updateImage:i,updateFilter:u,clipImage:d,presetImageClip:f,replaceImage:p,resetImage:b,setBackgroundImage:m}}});n("a347");nu.render=$i,nu.__scopeId="data-v-af9fc43e";var ou=nu,cu=Object(h["withScopeId"])("data-v-d415c6bc");Object(h["pushScopeId"])("data-v-d415c6bc");var au={class:"shape-style-panel"},ru={class:"row"},lu=Object(h["createTextVNode"])("纯色填充"),iu=Object(h["createTextVNode"])("渐变填充"),uu=Object(h["createVNode"])("div",{style:{flex:"1"}},null,-1),du=Object(h["createTextVNode"])("线性渐变"),su=Object(h["createTextVNode"])("径向渐变"),fu={class:"row"},pu=Object(h["createVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1),bu={class:"row"},mu=Object(h["createVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1),vu={key:0,class:"row"},Ou=Object(h["createVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1);Object(h["popScopeId"])();var hu=cu((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SelectOption"),l=Object(h["resolveComponent"])("Select"),i=Object(h["resolveComponent"])("ColorPicker"),u=Object(h["resolveComponent"])("ColorButton"),d=Object(h["resolveComponent"])("Popover"),s=Object(h["resolveComponent"])("Slider"),f=Object(h["resolveComponent"])("Divider"),p=Object(h["resolveComponent"])("ElementOutline"),b=Object(h["resolveComponent"])("ElementShadow"),m=Object(h["resolveComponent"])("ElementOpacity");return Object(h["openBlock"])(),Object(h["createBlock"])("div",au,[Object(h["createVNode"])("div",ru,[Object(h["createVNode"])(l,{style:{flex:"10"},value:e.fillType,onChange:t[1]||(t[1]=function(t){return e.updateFillType(t)})},{default:cu((function(){return[Object(h["createVNode"])(r,{value:"fill"},{default:cu((function(){return[lu]})),_:1}),Object(h["createVNode"])(r,{value:"gradient"},{default:cu((function(){return[iu]})),_:1})]})),_:1},8,["value"]),uu,"fill"===e.fillType?(Object(h["openBlock"])(),Object(h["createBlock"])(d,{key:0,trigger:"click"},{content:cu((function(){return[Object(h["createVNode"])(i,{modelValue:e.fill,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.updateFill(t)})},null,8,["modelValue"])]})),default:cu((function(){return[Object(h["createVNode"])(u,{color:e.fill,style:{flex:"10"}},null,8,["color"])]})),_:1})):(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:1,style:{flex:"10"},value:e.gradient.type,onChange:t[3]||(t[3]=function(t){return e.updateGradient({type:t})})},{default:cu((function(){return[Object(h["createVNode"])(r,{value:"linear"},{default:cu((function(){return[du]})),_:1}),Object(h["createVNode"])(r,{value:"radial"},{default:cu((function(){return[su]})),_:1})]})),_:1},8,["value"]))]),"gradient"===e.fillType?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[Object(h["createVNode"])("div",fu,[pu,Object(h["createVNode"])(d,{trigger:"click"},{content:cu((function(){return[Object(h["createVNode"])(i,{modelValue:e.gradient.color[0],"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updateGradient({color:[t,e.gradient.color[1]]})})},null,8,["modelValue"])]})),default:cu((function(){return[Object(h["createVNode"])(u,{color:e.gradient.color[0],style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",bu,[mu,Object(h["createVNode"])(d,{trigger:"click"},{content:cu((function(){return[Object(h["createVNode"])(i,{modelValue:e.gradient.color[1],"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.updateGradient({color:[e.gradient.color[0],t]})})},null,8,["modelValue"])]})),default:cu((function(){return[Object(h["createVNode"])(u,{color:e.gradient.color[1],style:{flex:"3"}},null,8,["color"])]})),_:1})]),"linear"===e.gradient.type?(Object(h["openBlock"])(),Object(h["createBlock"])("div",vu,[Ou,Object(h["createVNode"])(s,{min:0,max:360,step:15,value:e.gradient.rotate,style:{flex:"3"},onChange:t[6]||(t[6]=function(t){return e.updateGradient({rotate:t})})},null,8,["value"])])):Object(h["createCommentVNode"])("",!0)],64)):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])(f),Object(h["createVNode"])(p),Object(h["createVNode"])(f),Object(h["createVNode"])(b),Object(h["createVNode"])(f),Object(h["createVNode"])(m)])})),ju=Object(h["defineComponent"])({name:"shape-style-panel",components:{ElementOpacity:ql,ElementOutline:si,ElementShadow:Ni,ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(),o=Object(h["ref"])(),c=Object(h["ref"])("fill");Object(h["watch"])(t,(function(){t.value&&"shape"===t.value.type&&(n.value=t.value.fill||"#000",o.value=t.value.gradient||{type:"linear",rotate:0,color:[n.value,"#fff"]},c.value=t.value.gradient?"gradient":"fill")}),{deep:!0,immediate:!0});var a=Se(),r=a.addHistorySnapshot,l=function(n){if("fill"===n)e.commit(g.REMOVE_ELEMENT_PROPS,{id:t.value.id,propName:"gradient"});else{var c={gradient:o.value};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:c})}r()},i=function(n){var c={gradient:Object(P["a"])(Object(P["a"])({},o.value),n)};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:c}),r()},u=function(n){var o={fill:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),r()};return{fill:n,gradient:o,fillType:c,updateFillType:l,updateFill:u,updateGradient:i}}});n("ff3e");ju.render=hu,ju.__scopeId="data-v-d415c6bc";var gu=ju,yu=Object(h["withScopeId"])("data-v-65b24fb3");Object(h["pushScopeId"])("data-v-65b24fb3");var ku={class:"line-style-panel"},Eu={class:"row"},Iu=Object(h["createVNode"])("div",{style:{flex:"2"}},"线条样式:",-1),Su=Object(h["createTextVNode"])("实线"),Cu=Object(h["createTextVNode"])("虚线"),Nu={class:"row"},xu=Object(h["createVNode"])("div",{style:{flex:"2"}},"线条颜色:",-1),Tu={class:"row"},Lu=Object(h["createVNode"])("div",{style:{flex:"2"}},"线条宽度:",-1),wu={class:"row"},Vu=Object(h["createVNode"])("div",{style:{flex:"2"}},"起点样式:",-1),_u=Object(h["createTextVNode"])("无"),Bu=Object(h["createTextVNode"])("箭头"),Mu=Object(h["createTextVNode"])("圆点"),Du={class:"row"},Au=Object(h["createVNode"])("div",{style:{flex:"2"}},"终点样式:",-1),Pu=Object(h["createTextVNode"])("无"),Ru=Object(h["createTextVNode"])("箭头"),Fu=Object(h["createTextVNode"])("圆点");Object(h["popScopeId"])();var zu=yu((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SelectOption"),l=Object(h["resolveComponent"])("Select"),i=Object(h["resolveComponent"])("ColorPicker"),u=Object(h["resolveComponent"])("ColorButton"),d=Object(h["resolveComponent"])("Popover"),s=Object(h["resolveComponent"])("InputNumber"),f=Object(h["resolveComponent"])("Divider"),p=Object(h["resolveComponent"])("ElementShadow");return Object(h["openBlock"])(),Object(h["createBlock"])("div",ku,[Object(h["createVNode"])("div",Eu,[Iu,Object(h["createVNode"])(l,{style:{flex:"3"},value:e.handleElement.style,onChange:t[1]||(t[1]=function(t){return e.updateLine({style:t})})},{default:yu((function(){return[Object(h["createVNode"])(r,{value:"solid"},{default:yu((function(){return[Su]})),_:1}),Object(h["createVNode"])(r,{value:"dashed"},{default:yu((function(){return[Cu]})),_:1})]})),_:1},8,["value"])]),Object(h["createVNode"])("div",Nu,[xu,Object(h["createVNode"])(d,{trigger:"click"},{content:yu((function(){return[Object(h["createVNode"])(i,{modelValue:e.handleElement.color,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.updateLine({color:t})})},null,8,["modelValue"])]})),default:yu((function(){return[Object(h["createVNode"])(u,{color:e.handleElement.color,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",Tu,[Lu,Object(h["createVNode"])(s,{value:e.handleElement.width,onChange:t[3]||(t[3]=function(t){return e.updateLine({width:t})}),style:{flex:"3"}},null,8,["value"])]),Object(h["createVNode"])("div",wu,[Vu,Object(h["createVNode"])(l,{style:{flex:"3"},value:e.handleElement.points[0],onChange:t[4]||(t[4]=function(t){return e.updateLine({points:[t,e.handleElement.points[1]]})})},{default:yu((function(){return[Object(h["createVNode"])(r,{value:""},{default:yu((function(){return[_u]})),_:1}),Object(h["createVNode"])(r,{value:"arrow"},{default:yu((function(){return[Bu]})),_:1}),Object(h["createVNode"])(r,{value:"dot"},{default:yu((function(){return[Mu]})),_:1})]})),_:1},8,["value"])]),Object(h["createVNode"])("div",Du,[Au,Object(h["createVNode"])(l,{style:{flex:"3"},value:e.handleElement.points[1],onChange:t[5]||(t[5]=function(t){return e.updateLine({points:[e.handleElement.points[0],t]})})},{default:yu((function(){return[Object(h["createVNode"])(r,{value:""},{default:yu((function(){return[Pu]})),_:1}),Object(h["createVNode"])(r,{value:"arrow"},{default:yu((function(){return[Ru]})),_:1}),Object(h["createVNode"])(r,{value:"dot"},{default:yu((function(){return[Fu]})),_:1})]})),_:1},8,["value"])]),Object(h["createVNode"])(f),Object(h["createVNode"])(p)])})),Hu=Object(h["defineComponent"])({name:"line-style-panel",components:{ElementShadow:Ni,ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Se(),o=n.addHistorySnapshot,c=function(n){e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:n}),o()};return{handleElement:t,updateLine:c}}});n("8df8e");Hu.render=zu,Hu.__scopeId="data-v-65b24fb3";var Uu=Hu,Gu=Object(h["withScopeId"])("data-v-0bd1ca02");Object(h["pushScopeId"])("data-v-0bd1ca02");var qu={class:"chart-style-panel"},Wu=Object(h["createTextVNode"])(" 编辑图表数据 "),Xu={class:"row"},Yu=Object(h["createTextVNode"])("面积图样式"),Zu=Object(h["createTextVNode"])("散点图样式"),Ju={class:"row"},Ku=Object(h["createTextVNode"])("使用平滑曲线"),$u={key:1,class:"row"},Qu=Object(h["createTextVNode"])("条形图样式"),ed={key:2,class:"row"},td=Object(h["createTextVNode"])("环形图样式"),nd={class:"row"},od=Object(h["createVNode"])("div",{style:{flex:"2"}},"背景填充:",-1),cd={class:"row"},ad=Object(h["createVNode"])("div",{style:{flex:"2"}},"主题配色:",-1),rd={class:"row"},ld=Object(h["createVNode"])("div",{style:{flex:"2"}},"网格颜色:",-1);Object(h["popScopeId"])();var id=Gu((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconEdit"),l=Object(h["resolveComponent"])("Button"),i=Object(h["resolveComponent"])("Divider"),u=Object(h["resolveComponent"])("Checkbox"),d=Object(h["resolveComponent"])("ColorPicker"),s=Object(h["resolveComponent"])("ColorButton"),f=Object(h["resolveComponent"])("Popover"),p=Object(h["resolveComponent"])("ElementOutline"),b=Object(h["resolveComponent"])("ChartDataEditor"),m=Object(h["resolveComponent"])("Modal");return Object(h["openBlock"])(),Object(h["createBlock"])("div",qu,[Object(h["createVNode"])(l,{class:"full-width-btn",onClick:t[1]||(t[1]=function(t){return e.chartDataEditorVisible=!0})},{default:Gu((function(){return[Object(h["createVNode"])(r,{class:"btn-icon"}),Wu]})),_:1}),Object(h["createVNode"])(i),"line"===e.handleElement.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[Object(h["createVNode"])("div",Xu,[Object(h["createVNode"])(u,{onChange:t[2]||(t[2]=function(t){return e.updateOptions({showArea:t.target.checked})}),checked:e.showArea,style:{flex:"1"}},{default:Gu((function(){return[Yu]})),_:1},8,["checked"]),Object(h["createVNode"])(u,{onChange:t[3]||(t[3]=function(t){return e.updateOptions({showLine:!t.target.checked})}),checked:!e.showLine,style:{flex:"1"}},{default:Gu((function(){return[Zu]})),_:1},8,["checked"])]),Object(h["createVNode"])("div",Ju,[Object(h["createVNode"])(u,{onChange:t[4]||(t[4]=function(t){return e.updateOptions({lineSmooth:t.target.checked})}),checked:e.lineSmooth},{default:Gu((function(){return[Ku]})),_:1},8,["checked"])])],64)):Object(h["createCommentVNode"])("",!0),"bar"===e.handleElement.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])("div",$u,[Object(h["createVNode"])(u,{onChange:t[5]||(t[5]=function(t){return e.updateOptions({horizontalBars:t.target.checked})}),checked:e.horizontalBars},{default:Gu((function(){return[Qu]})),_:1},8,["checked"])])):Object(h["createCommentVNode"])("",!0),"pie"===e.handleElement.chartType?(Object(h["openBlock"])(),Object(h["createBlock"])("div",ed,[Object(h["createVNode"])(u,{onChange:t[6]||(t[6]=function(t){return e.updateOptions({donut:t.target.checked})}),checked:e.donut},{default:Gu((function(){return[td]})),_:1},8,["checked"])])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])(i),Object(h["createVNode"])("div",nd,[od,Object(h["createVNode"])(f,{trigger:"click"},{content:Gu((function(){return[Object(h["createVNode"])(d,{modelValue:e.fill,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.updateFill(t)})},null,8,["modelValue"])]})),default:Gu((function(){return[Object(h["createVNode"])(s,{color:e.fill,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",cd,[ad,Object(h["createVNode"])(f,{trigger:"click"},{content:Gu((function(){return[Object(h["createVNode"])(d,{modelValue:e.themeColor,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.updateTheme(t)})},null,8,["modelValue"])]})),default:Gu((function(){return[Object(h["createVNode"])(s,{color:e.themeColor,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",rd,[ld,Object(h["createVNode"])(f,{trigger:"click"},{content:Gu((function(){return[Object(h["createVNode"])(d,{modelValue:e.gridColor,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.updateGridColor(t)})},null,8,["modelValue"])]})),default:Gu((function(){return[Object(h["createVNode"])(s,{color:e.gridColor,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])(i),Object(h["createVNode"])(p),Object(h["createVNode"])(m,{visible:e.chartDataEditorVisible,"onUpdate:visible":t[12]||(t[12]=function(t){return e.chartDataEditorVisible=t}),footer:null,centered:"",closable:!1,width:648,destroyOnClose:""},{default:Gu((function(){return[Object(h["createVNode"])(b,{data:e.handleElement.data,onClose:t[10]||(t[10]=function(t){return e.chartDataEditorVisible=!1}),onSave:t[11]||(t[11]=function(t){return e.updateData(t)})},null,8,["data"])]})),_:1},8,["visible"])])})),ud=Object(h["withScopeId"])("data-v-73892bc6");Object(h["pushScopeId"])("data-v-73892bc6");var dd={class:"chart-data-editor"},sd={class:"editor-content"},fd={class:"range-box"},pd={class:"btns"},bd=Object(h["createTextVNode"])("取消"),md=Object(h["createTextVNode"])("确认");Object(h["popScopeId"])();var vd=ud((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Button");return Object(h["openBlock"])(),Object(h["createBlock"])("div",dd,[Object(h["createVNode"])("div",sd,[Object(h["createVNode"])("div",fd,[Object(h["createVNode"])("div",{class:"temp-range",style:{width:e.tempRangeSize.width+"px",height:e.tempRangeSize.height+"px"}},null,4),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.rangeLines,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["range-line",e.type],key:e.type,style:e.style},null,6)})),128)),Object(h["createVNode"])("div",{class:"resizable",style:e.resizablePointStyle,onMousedown:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.changeSelectRange(t)}),["stop"]))},null,36)]),Object(h["createVNode"])("table",null,[Object(h["createVNode"])("tbody",null,[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(30,(function(t){return Object(h["createVNode"])("tr",{key:t},[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(7,(function(n){return Object(h["createVNode"])("td",{key:n,class:{head:1===n&&t<=e.selectedRange[1]}},[Object(h["createVNode"])("input",{class:["item",{selected:t<=e.selectedRange[1]&&n<=e.selectedRange[0]}],id:"cell-".concat(t-1,"-").concat(n-1),autocomplete:"off"},null,10,["id"])],2)})),64))])})),64))])])]),Object(h["createVNode"])("div",pd,[Object(h["createVNode"])(r,{class:"btn",onClick:t[2]||(t[2]=function(t){return e.closeEditor()})},{default:ud((function(){return[bd]})),_:1}),Object(h["createVNode"])(r,{type:"primary",class:"btn",onClick:t[3]||(t[3]=function(t){return e.getTableData()})},{default:ud((function(){return[md]})),_:1})])])})),Od=100,hd=32,jd=Object(h["defineComponent"])({name:"chart-data-editor",props:{data:{type:Object,required:!0}},setup:function(e,t){var n=t.emit,o=Object(h["ref"])([0,0]),c=Object(h["ref"])({width:0,height:0}),a=Object(h["computed"])((function(){var e=o.value[0]*Od,t=o.value[1]*hd;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]})),r=Object(h["computed"])((function(){var e=o.value[0]*Od,t=o.value[1]*hd;return{left:e+"px",top:t+"px"}})),l=function(){for(var t=[],n=e.data,c=n.labels,a=n.series,r=c.length,l=a.length,i=0;i<r;i++){for(var u=[c[i]],d=0;d<l;d++)u.push(a[d][i]+"");t.push(u)}for(var s=0;s<r;s++)for(var f=0;f<l+1;f++){var p=document.querySelector("#cell-".concat(s,"-").concat(f));p&&(p.value=t[s][f]+"")}o.value=[l+1,r]};Object(h["onMounted"])(l);var i=function(){for(var e=Object(Yt["a"])(o.value,2),t=e[0],c=e[1],a=[],r=[],l=0;l<c;l++){var i="类别".concat(l+1),u=document.querySelector("#cell-".concat(l,"-0"));u&&u.value&&(i=u.value),a.push(i)}for(var d=1;d<t;d++){for(var s=[],f=0;f<c;f++){var p=document.querySelector("#cell-".concat(f,"-").concat(d)),b=0;p&&p.value&&+p.value&&(b=+p.value),s.push(b)}r.push(s)}var m={labels:a,series:r};n("save",m)},u=function(){return n("close")},d=function(e){var t=!0,n=e.pageX,a=e.pageY,r=o.value[0]*Od,l=o.value[1]*hd;document.onmousemove=function(e){if(t){var o=e.pageX,i=e.pageY,u=o-n,d=i-a,s=r+u,f=l+d;c.value={width:s,height:f}}},document.onmouseup=function(e){t=!1,document.onmousemove=null,document.onmouseup=null;var r=e.pageX,l=e.pageY;if(n!==r||a!==l){var i=c.value.width,u=c.value.height;i%Od>.5*Od&&(i+=Od-i%Od),u%hd>.5*hd&&(u+=hd-u%hd);var d=Math.round(u/hd),s=Math.round(i/Od);d<3&&(d=3),s<2&&(s=2),o.value=[s,d],c.value={width:0,height:0}}}};return{tempRangeSize:c,rangeLines:a,resizablePointStyle:r,changeSelectRange:d,selectedRange:o,getTableData:i,closeEditor:u}}});n("7dcf");jd.render=vd,jd.__scopeId="data-v-73892bc6";var gd=jd,yd=Object(h["defineComponent"])({name:"chart-style-panel",components:{ElementOutline:si,ChartDataEditor:gd,ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(!1),o=Se(),c=o.addHistorySnapshot,a=Object(h["ref"])(),r=Object(h["ref"])(""),l=Object(h["ref"])(""),i=Object(h["ref"])(!0),u=Object(h["ref"])(!0),d=Object(h["ref"])(!1),s=Object(h["ref"])(!1),f=Object(h["ref"])(!1);Object(h["watch"])(t,(function(){if(t.value&&"chart"===t.value.type){if(a.value=t.value.fill||"#000",t.value.options){var e=t.value.options,n=e.lineSmooth,o=e.showLine,c=e.showArea,p=e.horizontalBars,b=e.donut;void 0!==n&&(i.value=n),void 0!==o&&(u.value=o),void 0!==c&&(d.value=c),void 0!==p&&(s.value=p),void 0!==b&&(f.value=b)}r.value=t.value.themeColor,l.value=t.value.gridColor||"rgba(0, 0, 0, 0.4)"}}),{deep:!0,immediate:!0});var p=function(o){n.value=!1;var a={data:o};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:a}),c()},b=function(n){var o={fill:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),c()},m=function(n){var o=t.value.options||{},a=Object(P["a"])(Object(P["a"])({},o),n),r={options:a};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:r}),c()},v=function(n){var o={themeColor:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),c()},O=function(n){var o={gridColor:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),c()};return{chartDataEditorVisible:n,handleElement:t,updateData:p,fill:a,updateFill:b,lineSmooth:i,showLine:u,showArea:d,horizontalBars:s,donut:f,updateOptions:m,themeColor:r,gridColor:l,updateTheme:v,updateGridColor:O}}});n("d1ba");yd.render=id,yd.__scopeId="data-v-0bd1ca02";var kd=yd,Ed=Object(h["withScopeId"])("data-v-63aedd01");Object(h["pushScopeId"])("data-v-63aedd01");var Id={class:"table-style-panel"},Sd={class:"row"},Cd=Object(h["createVNode"])("div",{style:{flex:"2"}},"行数:",-1),Nd={class:"row"},xd=Object(h["createVNode"])("div",{style:{flex:"2"}},"列数:",-1),Td={class:"row theme-switch"},Ld=Object(h["createVNode"])("div",{style:{flex:"2"}},"启用主题表格:",-1),wd={class:"switch-wrapper",style:{flex:"3"}},Vd={class:"row"},_d=Object(h["createTextVNode"])("标题行"),Bd=Object(h["createTextVNode"])("汇总行"),Md={class:"row"},Dd=Object(h["createTextVNode"])("第一列"),Ad=Object(h["createTextVNode"])("最后一列"),Pd={class:"row"},Rd=Object(h["createVNode"])("div",{style:{flex:"2"}},"主题颜色:",-1);Object(h["popScopeId"])();var Fd=Ed((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconFontSize"),l=Object(h["resolveComponent"])("SelectOption"),i=Object(h["resolveComponent"])("Select"),u=Object(h["resolveComponent"])("IconAddText"),d=Object(h["resolveComponent"])("InputGroup"),s=Object(h["resolveComponent"])("ColorPicker"),f=Object(h["resolveComponent"])("IconText"),p=Object(h["resolveComponent"])("Button"),b=Object(h["resolveComponent"])("Tooltip"),m=Object(h["resolveComponent"])("Popover"),v=Object(h["resolveComponent"])("IconFill"),O=Object(h["resolveComponent"])("ButtonGroup"),j=Object(h["resolveComponent"])("IconTextBold"),g=Object(h["resolveComponent"])("CheckboxButton"),y=Object(h["resolveComponent"])("IconTextItalic"),k=Object(h["resolveComponent"])("IconTextUnderline"),E=Object(h["resolveComponent"])("IconStrikethrough"),I=Object(h["resolveComponent"])("CheckboxButtonGroup"),S=Object(h["resolveComponent"])("IconAlignTextLeft"),C=Object(h["resolveComponent"])("RadioButton"),N=Object(h["resolveComponent"])("IconAlignTextCenter"),x=Object(h["resolveComponent"])("IconAlignTextRight"),T=Object(h["resolveComponent"])("RadioGroup"),L=Object(h["resolveComponent"])("Divider"),w=Object(h["resolveComponent"])("ElementOutline"),V=Object(h["resolveComponent"])("InputNumber"),_=Object(h["resolveComponent"])("Switch"),B=Object(h["resolveComponent"])("Checkbox"),M=Object(h["resolveComponent"])("ColorButton");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Id,[Object(h["createVNode"])(d,{compact:"",class:"row"},{default:Ed((function(){return[Object(h["createVNode"])(i,{style:{flex:"3"},value:e.textAttrs.fontname,onChange:t[1]||(t[1]=function(t){return e.updateTextAttrs({fontname:t})})},{suffixIcon:Ed((function(){return[Object(h["createVNode"])(r)]})),default:Ed((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.availableFonts,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:e.en,value:e.en},{default:Ed((function(){return[Object(h["createVNode"])("span",{style:{fontFamily:e.en}},Object(h["toDisplayString"])(e.zh),5)]})),_:2},1032,["value"])})),128))]})),_:1},8,["value"]),Object(h["createVNode"])(i,{style:{flex:"2"},value:e.textAttrs.fontsize,onChange:t[2]||(t[2]=function(t){return e.updateTextAttrs({fontsize:t})})},{suffixIcon:Ed((function(){return[Object(h["createVNode"])(u)]})),default:Ed((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.fontSizeOptions,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:e,value:e},{default:Ed((function(){return[Object(h["createTextVNode"])(Object(h["toDisplayString"])(e),1)]})),_:2},1032,["value"])})),128))]})),_:1},8,["value"])]})),_:1}),Object(h["createVNode"])(O,{class:"row"},{default:Ed((function(){return[Object(h["createVNode"])(m,{trigger:"click"},{content:Ed((function(){return[Object(h["createVNode"])(s,{modelValue:e.textAttrs.color,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.updateTextAttrs({color:t})})},null,8,["modelValue"])]})),default:Ed((function(){return[Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Ed((function(){return[Object(h["createVNode"])(p,{class:"text-color-btn",style:{flex:"1"}},{default:Ed((function(){return[Object(h["createVNode"])(f),Object(h["createVNode"])("div",{class:"text-color-block",style:{backgroundColor:e.textAttrs.color}},null,4)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(m,{trigger:"click"},{content:Ed((function(){return[Object(h["createVNode"])(s,{modelValue:e.textAttrs.backcolor,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.updateTextAttrs({backcolor:t})})},null,8,["modelValue"])]})),default:Ed((function(){return[Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"单元格填充"},{default:Ed((function(){return[Object(h["createVNode"])(p,{class:"text-color-btn",style:{flex:"1"}},{default:Ed((function(){return[Object(h["createVNode"])(v),Object(h["createVNode"])("div",{class:"text-color-block",style:{backgroundColor:e.textAttrs.backcolor}},null,4)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1})]})),_:1}),Object(h["createVNode"])(I,{class:"row"},{default:Ed((function(){return[Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Ed((function(){return[Object(h["createVNode"])(g,{style:{flex:"1"},checked:e.textAttrs.bold,onClick:t[5]||(t[5]=function(t){return e.updateTextAttrs({bold:!e.textAttrs.bold})})},{default:Ed((function(){return[Object(h["createVNode"])(j)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Ed((function(){return[Object(h["createVNode"])(g,{style:{flex:"1"},checked:e.textAttrs.em,onClick:t[6]||(t[6]=function(t){return e.updateTextAttrs({em:!e.textAttrs.em})})},{default:Ed((function(){return[Object(h["createVNode"])(y)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Ed((function(){return[Object(h["createVNode"])(g,{style:{flex:"1"},checked:e.textAttrs.underline,onClick:t[7]||(t[7]=function(t){return e.updateTextAttrs({underline:!e.textAttrs.underline})})},{default:Ed((function(){return[Object(h["createVNode"])(k)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Ed((function(){return[Object(h["createVNode"])(g,{style:{flex:"1"},checked:e.textAttrs.strikethrough,onClick:t[8]||(t[8]=function(t){return e.updateTextAttrs({strikethrough:!e.textAttrs.strikethrough})})},{default:Ed((function(){return[Object(h["createVNode"])(E)]})),_:1},8,["checked"])]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(T,{class:"row","button-style":"solid",value:e.textAttrs.align,onChange:t[9]||(t[9]=function(t){return e.updateTextAttrs({align:t.target.value})})},{default:Ed((function(){return[Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Ed((function(){return[Object(h["createVNode"])(C,{value:"left",style:{flex:"1"}},{default:Ed((function(){return[Object(h["createVNode"])(S)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Ed((function(){return[Object(h["createVNode"])(C,{value:"center",style:{flex:"1"}},{default:Ed((function(){return[Object(h["createVNode"])(N)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(b,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Ed((function(){return[Object(h["createVNode"])(C,{value:"right",style:{flex:"1"}},{default:Ed((function(){return[Object(h["createVNode"])(x)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1},8,["value"]),Object(h["createVNode"])(L),Object(h["createVNode"])(w,{fixed:!0}),Object(h["createVNode"])(L),Object(h["createVNode"])("div",Sd,[Cd,Object(h["createVNode"])(V,{min:e.minRowCount,max:20,value:e.rowCount,"onUpdate:value":t[10]||(t[10]=function(t){return e.rowCount=t}),onPressEnter:t[11]||(t[11]=function(t){return e.setTableRow(t)}),onBlur:t[12]||(t[12]=function(t){return e.setTableRow(t)}),style:{flex:"3"}},null,8,["min","value"])]),Object(h["createVNode"])("div",Nd,[xd,Object(h["createVNode"])(V,{min:e.minColCount,max:20,value:e.colCount,"onUpdate:value":t[13]||(t[13]=function(t){return e.colCount=t}),onPressEnter:t[14]||(t[14]=function(t){return e.setTableCol(t)}),onBlur:t[15]||(t[15]=function(t){return e.setTableCol(t)}),style:{flex:"3"}},null,8,["min","value"])]),Object(h["createVNode"])(L),Object(h["createVNode"])("div",Td,[Ld,Object(h["createVNode"])("div",wd,[Object(h["createVNode"])(_,{checked:e.hasTheme,onChange:t[16]||(t[16]=function(t){return e.toggleTheme(t)})},null,8,["checked"])])]),e.hasTheme?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[Object(h["createVNode"])("div",Vd,[Object(h["createVNode"])(B,{onChange:t[17]||(t[17]=function(t){return e.updateTheme({rowHeader:t.target.checked})}),checked:e.theme.rowHeader,style:{flex:"1"}},{default:Ed((function(){return[_d]})),_:1},8,["checked"]),Object(h["createVNode"])(B,{onChange:t[18]||(t[18]=function(t){return e.updateTheme({rowFooter:t.target.checked})}),checked:e.theme.rowFooter,style:{flex:"1"}},{default:Ed((function(){return[Bd]})),_:1},8,["checked"])]),Object(h["createVNode"])("div",Md,[Object(h["createVNode"])(B,{onChange:t[19]||(t[19]=function(t){return e.updateTheme({colHeader:t.target.checked})}),checked:e.theme.colHeader,style:{flex:"1"}},{default:Ed((function(){return[Dd]})),_:1},8,["checked"]),Object(h["createVNode"])(B,{onChange:t[20]||(t[20]=function(t){return e.updateTheme({colFooter:t.target.checked})}),checked:e.theme.colFooter,style:{flex:"1"}},{default:Ed((function(){return[Ad]})),_:1},8,["checked"])]),Object(h["createVNode"])("div",Pd,[Rd,Object(h["createVNode"])(m,{trigger:"click"},{content:Ed((function(){return[Object(h["createVNode"])(s,{modelValue:e.theme.color,"onUpdate:modelValue":t[21]||(t[21]=function(t){return e.updateTheme({color:t})})},null,8,["modelValue"])]})),default:Ed((function(){return[Object(h["createVNode"])(M,{color:e.theme.color,style:{flex:"3"}},null,8,["color"])]})),_:1})])],64)):Object(h["createCommentVNode"])("",!0)])})),zd=Object(h["defineComponent"])({name:"table-style-panel",components:{ElementOutline:si,ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"#000",fontsize:"12px",fontname:"微软雅黑",align:"left"}),o=Object(h["ref"])(),c=Object(h["ref"])(!1),a=Object(h["ref"])(0),r=Object(h["ref"])(0),l=Object(h["ref"])(0),i=Object(h["ref"])(0);Object(h["watch"])(t,(function(){t.value&&"table"===t.value.type&&(o.value=t.value.theme,c.value=!!o.value,a.value=t.value.data.length,r.value=t.value.data[0].length,l.value=t.value.data.length,i.value=t.value.data[0].length)}),{deep:!0,immediate:!0});var u=Object(h["ref"])([]),d=function(){if(t.value){var e=0,o=0;if(u.value.length){var c=u.value[0];e=+c.split("_")[0],o=+c.split("_")[1]}var a=t.value.data[e][o].style;n.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"#000",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"#000",fontsize:"12px",fontname:"微软雅黑",align:"left"}}},s=function(e){u.value=e,d()};At.on(Et.UPDATE_TABLE_SELECTED_CELL,(function(e){return s(e)})),Object(h["onUnmounted"])((function(){At.off(Et.UPDATE_TABLE_SELECTED_CELL,(function(e){return s(e)}))}));var f=Object(h["computed"])((function(){return e.state.availableFonts})),p=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],b=Se(),m=b.addHistorySnapshot,v=function(n){for(var o=JSON.parse(JSON.stringify(t.value.data)),c=0;c<o.length;c++)for(var a=0;a<o[c].length;a++)if(!u.value.length||u.value.includes("".concat(c,"_").concat(a))){var r=o[c][a].style||{};o[c][a].style=Object(P["a"])(Object(P["a"])({},r),n)}var l={data:o};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:l}),m(),d()},O=function(n){var c=o.value||{},a={theme:Object(P["a"])(Object(P["a"])({},c),n)};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:a}),m()},j=function(n){if(n){var o={theme:{color:"#d14424",rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o})}else e.commit(g.REMOVE_ELEMENT_PROPS,{id:t.value.id,propName:"theme"});m()},y=function(n){var o=+n.target.value,c=t.value.data.length;if(o!==c){if(o<c)return ae["a"].warning("设置行数不能少于当前值");var a=new Array(r.value).fill({id:ie(),colspan:1,rowspan:1,text:""}),l=new Array(o-c).fill(a),i=JSON.parse(JSON.stringify(t.value.data));i.push.apply(i,Object(A["a"])(l));var u={data:i};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:u}),m()}},k=function(n){var o=+n.target.value,c=t.value.data[0].length;if(o!==c){if(o<c)return ae["a"].warning("设置列数不能少于当前值");var a=t.value.data.map((function(e){var t=new Array(o-c).fill({id:ie(),colspan:1,rowspan:1,text:""});return e.push.apply(e,Object(A["a"])(t)),e})),r=t.value.colWidths.map((function(e){return e*t.value.width})),l=new Array(o-c).fill(100);r.push.apply(r,Object(A["a"])(l));var i=t.value.width+100*(o-c),u=r.map((function(e){return e/i})),d={width:i,data:a,colWidths:u};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:d}),m()}};return{handleElement:t,availableFonts:f,fontSizeOptions:p,textAttrs:n,updateTextAttrs:v,theme:o,rowCount:a,colCount:r,minRowCount:l,minColCount:i,hasTheme:c,toggleTheme:j,updateTheme:O,setTableRow:y,setTableCol:k}}});n("89f6");zd.render=Fd,zd.__scopeId="data-v-63aedd01";var Hd=zd,Ud=Object(h["defineComponent"])({name:"element-style-panel",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["computed"])((function(){var e;if(!t.value)return null;var n=(e={},Object(C["a"])(e,Kt.TEXT,wi),Object(C["a"])(e,Kt.IMAGE,ou),Object(C["a"])(e,Kt.SHAPE,gu),Object(C["a"])(e,Kt.LINE,Uu),Object(C["a"])(e,Kt.CHART,kd),Object(C["a"])(e,Kt.TABLE,Hd),e);return n[t.value.type]||null}));return{handleElement:t,currentPanelComponent:n}}});Ud.render=Ll;var Gd=Ud,qd=Object(h["withScopeId"])("data-v-1a79147f");Object(h["pushScopeId"])("data-v-1a79147f");var Wd={class:"element-positopn-panel"},Xd={class:"row"},Yd=Object(h["createVNode"])("div",{style:{flex:"3"}},"位置:",-1),Zd=Object(h["createVNode"])("div",{style:{flex:"1"}},null,-1),Jd=Object(h["createStaticVNode"])('<div class="row" data-v-1a79147f><div style="flex:3;" data-v-1a79147f></div><div style="flex:4;" class="label" data-v-1a79147f>X</div><div style="flex:1;" data-v-1a79147f></div><div style="flex:4;" class="label" data-v-1a79147f>Y</div></div>',1),Kd={class:"row"},$d=Object(h["createVNode"])("div",{style:{flex:"3"}},"大小:",-1),Qd={key:1,style:{flex:"1"}},es=Object(h["createStaticVNode"])('<div class="row" data-v-1a79147f><div style="flex:3;" data-v-1a79147f></div><div style="flex:4;" class="label" data-v-1a79147f>宽</div><div style="flex:1;" data-v-1a79147f></div><div style="flex:4;" class="label" data-v-1a79147f>高</div></div>',1),ts={class:"row"},ns=Object(h["createVNode"])("div",{style:{flex:"3"}},"旋转:",-1),os=Object(h["createVNode"])("div",{style:{flex:"1"}},null,-1);Object(h["popScopeId"])();var cs=qd((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconSendToBack"),l=Object(h["resolveComponent"])("Button"),i=Object(h["resolveComponent"])("Tooltip"),u=Object(h["resolveComponent"])("IconBringToFrontOne"),d=Object(h["resolveComponent"])("IconBringToFront"),s=Object(h["resolveComponent"])("IconSentToBack"),f=Object(h["resolveComponent"])("ButtonGroup"),p=Object(h["resolveComponent"])("IconAlignLeft"),b=Object(h["resolveComponent"])("IconAlignVertically"),m=Object(h["resolveComponent"])("IconAlignRight"),v=Object(h["resolveComponent"])("IconAlignTop"),O=Object(h["resolveComponent"])("IconAlignHorizontally"),j=Object(h["resolveComponent"])("IconAlignBottom"),g=Object(h["resolveComponent"])("Divider"),y=Object(h["resolveComponent"])("InputNumber"),k=Object(h["resolveComponent"])("IconLock"),E=Object(h["resolveComponent"])("IconUnlock"),I=Object(h["resolveComponent"])("IconRotate");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Wd,[Object(h["createVNode"])(f,{class:"row"},{default:qd((function(){return[Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"置顶层"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[1]||(t[1]=function(t){return e.orderElement(e.handleElement,"top")})},{default:qd((function(){return[Object(h["createVNode"])(r)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"置底层"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[2]||(t[2]=function(t){return e.orderElement(e.handleElement,"bottom")})},{default:qd((function(){return[Object(h["createVNode"])(u)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上移一层"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[3]||(t[3]=function(t){return e.orderElement(e.handleElement,"up")})},{default:qd((function(){return[Object(h["createVNode"])(d)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下移一层"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[4]||(t[4]=function(t){return e.orderElement(e.handleElement,"down")})},{default:qd((function(){return[Object(h["createVNode"])(s)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(f,{class:"row"},{default:qd((function(){return[Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[5]||(t[5]=function(t){return e.alignElementToCanvas("left")})},{default:qd((function(){return[Object(h["createVNode"])(p)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[6]||(t[6]=function(t){return e.alignElementToCanvas("horizontal")})},{default:qd((function(){return[Object(h["createVNode"])(b)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[7]||(t[7]=function(t){return e.alignElementToCanvas("right")})},{default:qd((function(){return[Object(h["createVNode"])(m)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(f,{class:"row"},{default:qd((function(){return[Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[8]||(t[8]=function(t){return e.alignElementToCanvas("top")})},{default:qd((function(){return[Object(h["createVNode"])(v)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[9]||(t[9]=function(t){return e.alignElementToCanvas("vertical")})},{default:qd((function(){return[Object(h["createVNode"])(O)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:qd((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[10]||(t[10]=function(t){return e.alignElementToCanvas("bottom")})},{default:qd((function(){return[Object(h["createVNode"])(j)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(g),Object(h["createVNode"])("div",Xd,[Yd,Object(h["createVNode"])(y,{step:5,value:e.left,onChange:t[11]||(t[11]=function(t){return e.updateLeft(t)}),style:{flex:"4"}},null,8,["value"]),Zd,Object(h["createVNode"])(y,{step:5,value:e.top,onChange:t[12]||(t[12]=function(t){return e.updateTop(t)}),style:{flex:"4"}},null,8,["value"])]),Jd,"line"!==e.handleElement.type?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[Object(h["createVNode"])("div",Kd,[$d,Object(h["createVNode"])(y,{min:e.minSize,max:1500,step:5,value:e.width,onChange:t[13]||(t[13]=function(t){return e.updateWidth(t)}),style:{flex:"4"}},null,8,["min","value"]),["image","shape"].includes(e.handleElement.type)?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:0},[e.fixedRatio?(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:0,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"解除宽高比锁定"},{default:qd((function(){return[Object(h["createVNode"])(k,{style:{flex:"1"},class:"icon-btn",onClick:t[14]||(t[14]=function(t){return e.updateFixedRatio(!1)})})]})),_:1},8,["mouseEnterDelay"])):(Object(h["openBlock"])(),Object(h["createBlock"])(i,{key:1,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"宽高比锁定"},{default:qd((function(){return[Object(h["createVNode"])(E,{style:{flex:"1"},class:"icon-btn",onClick:t[15]||(t[15]=function(t){return e.updateFixedRatio(!0)})})]})),_:1},8,["mouseEnterDelay"]))],64)):(Object(h["openBlock"])(),Object(h["createBlock"])("div",Qd)),Object(h["createVNode"])(y,{min:e.minSize,max:800,step:5,disabled:"text"===e.handleElement.type,value:e.height,onChange:t[16]||(t[16]=function(t){return e.updateHeight(t)}),style:{flex:"4"}},null,8,["min","disabled","value"])]),es],64)):Object(h["createCommentVNode"])("",!0),["text","image","shape"].includes(e.handleElement.type)?(Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],{key:1},[Object(h["createVNode"])(g),Object(h["createVNode"])("div",ts,[ns,Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"逆时针旋转"},{default:qd((function(){return[Object(h["createVNode"])(I,{class:"icon-btn",onClick:t[17]||(t[17]=function(t){return e.updateRotate45("-")}),style:{flex:"2"}})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"顺时针旋转"},{default:qd((function(){return[Object(h["createVNode"])(I,{class:"icon-btn",onClick:t[18]||(t[18]=function(t){return e.updateRotate45("+")}),style:{flex:2,transform:"rotateY(180deg)"}},null,8,["style"])]})),_:1},8,["mouseEnterDelay"]),os,Object(h["createVNode"])(y,{min:-180,max:180,step:5,value:e.rotate,onChange:t[19]||(t[19]=function(t){return e.updateRotate(t)}),style:{flex:"4"}},null,8,["value"])])],64)):Object(h["createCommentVNode"])("",!0)])})),as=n("b69c"),rs=n.n(as),ls=Object(h["defineComponent"])({name:"element-positopn-panel",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["ref"])(0),o=Object(h["ref"])(0),c=Object(h["ref"])(0),a=Object(h["ref"])(0),r=Object(h["ref"])(0),l=Object(h["ref"])(!1),i=Object(h["computed"])((function(){return t.value&&Rt[t.value.type]||20}));Object(h["watch"])(t,(function(){t.value&&(n.value=rs()(t.value.left,1),o.value=rs()(t.value.top,1),l.value="fixedRatio"in t.value&&!!t.value.fixedRatio,"line"!==t.value.type&&(c.value=rs()(t.value.width,1),a.value=rs()(t.value.height,1),r.value="rotate"in t.value&&void 0!==t.value.rotate?rs()(t.value.rotate,1):0))}),{deep:!0,immediate:!0});var u=Re(),d=u.orderElement,s=en(),f=s.alignElementToCanvas,p=Se(),b=p.addHistorySnapshot,m=function(n){var o={left:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},v=function(n){var o={top:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},O=function(n){var o={width:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},j=function(n){var o={height:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},y=function(n){var o={rotate:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},k=function(n){var o={fixedRatio:n};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:o}),b()},E=function(n){var o=45*Math.floor(r.value/45);"+"===n?o+=45:"-"===n&&(o-=45),o<-180&&(o=-180),o>180&&(o=180);var c={rotate:o};e.commit(g.UPDATE_ELEMENT,{id:t.value.id,props:c}),b()};return{handleElement:t,orderElement:d,alignElementToCanvas:f,left:n,top:o,width:c,height:a,rotate:r,fixedRatio:l,minSize:i,updateLeft:m,updateTop:v,updateWidth:O,updateHeight:j,updateRotate:y,updateFixedRatio:k,updateRotate45:E}}});n("e407");ls.render=cs,ls.__scopeId="data-v-1a79147f";var is=ls,us=Object(h["withScopeId"])("data-v-3483fbf2");Object(h["pushScopeId"])("data-v-3483fbf2");var ds={class:"element-animation-panel"},ss={key:0,class:"element-animation"},fs={class:"animation-pool"},ps={class:"type-title"},bs={class:"pool-item-wrapper"},ms={key:1,class:"tip"},vs=Object(h["createTextVNode"])(" 选中画布中的元素添加动画"),Os={class:"index"},hs={class:"text"},js={class:"handler"};Object(h["popScopeId"])();var gs,ys=us((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconEffects"),l=Object(h["resolveComponent"])("Button"),i=Object(h["resolveComponent"])("Popover"),u=Object(h["resolveComponent"])("IconClick"),d=Object(h["resolveComponent"])("Divider"),s=Object(h["resolveComponent"])("IconPlayOne"),f=Object(h["resolveComponent"])("Tooltip"),p=Object(h["resolveComponent"])("IconCloseSmall"),b=Object(h["resolveComponent"])("Draggable");return Object(h["openBlock"])(),Object(h["createBlock"])("div",ds,[e.handleElement?(Object(h["openBlock"])(),Object(h["createBlock"])("div",ss,[Object(h["createVNode"])(i,{trigger:"click",visible:e.animationPoolVisible,"onUpdate:visible":t[2]||(t[2]=function(t){return e.animationPoolVisible=t})},{content:us((function(){return[Object(h["createVNode"])("div",fs,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.animations,(function(n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"pool-type",key:n.name},[Object(h["createVNode"])("div",ps,Object(h["toDisplayString"])(n.name)+":",1),Object(h["createVNode"])("div",bs,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(n.children,(function(n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"pool-item",key:n.name,onMouseenter:function(t){return e.hoverPreviewAnimation=n.value},onMouseleave:t[1]||(t[1]=function(t){return e.hoverPreviewAnimation=""}),onClick:function(t){return e.addAnimation(n.value)}},[Object(h["createVNode"])("div",{class:["animation-box",["animate__animated","animate__faster",e.hoverPreviewAnimation===n.value&&"animate__".concat(n.value)]]},Object(h["toDisplayString"])(n.name),3)],40,["onMouseenter","onClick"])})),128))])])})),128))])]})),default:us((function(){return[Object(h["createVNode"])(l,{class:"element-animation-btn"},{default:us((function(){return[Object(h["createVNode"])(r,{style:{"margin-right":"5px"}}),Object(h["createTextVNode"])(" "+Object(h["toDisplayString"])(e.handleElementAnimation||"点击选择动画"),1)]})),_:1})]})),_:1},8,["visible"])])):(Object(h["openBlock"])(),Object(h["createBlock"])("div",ms,[Object(h["createVNode"])(u),vs])),Object(h["createVNode"])(d),Object(h["createVNode"])(b,{class:"animation-sequence",modelValue:e.animationSequence,animation:300,scroll:!0,scrollSensitivity:50,onEnd:e.handleDragEnd,itemKey:"id"},{item:us((function(t){var n,o=t.element,c=t.index;return[Object(h["createVNode"])("div",{class:["sequence-item",{active:(null===(n=e.handleElement)||void 0===n?void 0:n.id)===o.elId}]},[Object(h["createVNode"])("div",Os,Object(h["toDisplayString"])(c+1),1),Object(h["createVNode"])("div",hs,"【"+Object(h["toDisplayString"])(o.elType)+"】"+Object(h["toDisplayString"])(o.animationType),1),Object(h["createVNode"])("div",js,[Object(h["createVNode"])(f,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"预览"},{default:us((function(){return[Object(h["createVNode"])(s,{class:"handler-btn",onClick:function(t){return e.runAnimation(o.elId,o.type)}},null,8,["onClick"])]})),_:2},1032,["mouseEnterDelay"]),Object(h["createVNode"])(f,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:us((function(){return[Object(h["createVNode"])(p,{class:"handler-btn",onClick:function(t){return e.deleteAnimation(o.elId)}},null,8,["onClick"])]})),_:2},1032,["mouseEnterDelay"])])],2)]})),_:1},8,["modelValue","onEnd"])])})),ks=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下旋转进入",value:"rotateInDownLeft"},{name:"绕右下旋转进入",value:"rotateInDownRight"},{name:"绕左上旋转进入",value:"rotateInUpLeft"},{name:"绕右上旋转进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],Es={},Is=Object(ge["a"])(ks);try{for(Is.s();!(gs=Is.n()).done;){var Ss,Cs=gs.value,Ns=Object(ge["a"])(Cs.children);try{for(Ns.s();!(Ss=Ns.n()).done;){var xs=Ss.value;Es[xs.value]=xs.name}}catch(cO){Ns.e(cO)}finally{Ns.f()}}}catch(cO){Is.e(cO)}finally{Is.f()}var Ts=Object(h["defineComponent"])({name:"element-animation-panel",components:{Draggable:Dr.a},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.getters.handleElement})),n=Object(h["computed"])((function(){return e.getters.currentSlideAnimations})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=Object(h["ref"])(""),a=Object(h["ref"])(!1),r=Se(),l=r.addHistorySnapshot,i=ks,u=Object(h["computed"])((function(){if(!n.value)return[];var e,t=[],c=Object(ge["a"])(n.value);try{var a=function(){var n=e.value,c=o.value.elements.find((function(e){return e.id===n.elId}));if(!c)return"continue";var a=Pt[c.type],r=Es[n.type];t.push(Object(P["a"])(Object(P["a"])({},n),{},{elType:a,animationType:r}))};for(c.s();!(e=c.n()).done;)a()}catch(cO){c.e(cO)}finally{c.f()}return t})),d=Object(h["computed"])((function(){if(!t.value)return null;var e=n.value||[],o=e.find((function(e){return e.elId===t.value.id}));return o?Es[o.type]:null})),s=function(o){var c=n.value.map((function(e){return e.elId===t.value.id?Object(P["a"])(Object(P["a"])({},e),{},{type:o}):e}));e.commit(g.UPDATE_SLIDE,{animations:c}),a.value=!1,l()},f=function(o){if(d.value)s(o);else{var c=n.value?JSON.parse(JSON.stringify(n.value)):[];c.push({elId:t.value.id,type:o,duration:1e3}),e.commit(g.UPDATE_SLIDE,{animations:c}),a.value=!1,l()}},p=function(t){var o=n.value.filter((function(e){return e.elId!==t}));e.commit(g.UPDATE_SLIDE,{animations:o}),l()},b=function(t){var o=t.newIndex,c=t.oldIndex;if(c!==o){var a=JSON.parse(JSON.stringify(n.value)),r=a[c];a.splice(c,1),a.splice(o,0,r),e.commit(g.UPDATE_SLIDE,{animations:a}),l()}},m=function(e,t){var n="animate__",o=document.querySelector("#editable-element-".concat(e," [class^=editable-element-]"));if(o){var c="".concat(n).concat(t);o.classList.add("".concat(n,"animated"),c);var a=function(){o.classList.remove("".concat(n,"animated"),c)};o.addEventListener("animationend",a,{once:!0})}};return{handleElement:t,animationPoolVisible:a,animations:i,animationSequence:u,hoverPreviewAnimation:c,handleElementAnimation:d,addAnimation:f,deleteAnimation:p,handleDragEnd:b,runAnimation:m}}});n("6836");Ts.render=ys,Ts.__scopeId="data-v-3483fbf2";var Ls=Ts,ws=Object(h["withScopeId"])("data-v-52253a56");Object(h["pushScopeId"])("data-v-52253a56");var Vs={class:"slide-style-panel"},_s=Object(h["createVNode"])("div",{class:"title"},"背景填充",-1),Bs={class:"row"},Ms=Object(h["createTextVNode"])("纯色填充"),Ds=Object(h["createTextVNode"])("图片填充"),As=Object(h["createTextVNode"])("渐变填充"),Ps=Object(h["createVNode"])("div",{style:{flex:"1"}},null,-1),Rs=Object(h["createTextVNode"])("原始大小"),Fs=Object(h["createTextVNode"])("缩放"),zs=Object(h["createTextVNode"])("拼贴"),Hs=Object(h["createTextVNode"])("缩放铺满"),Us=Object(h["createTextVNode"])("线性渐变"),Gs=Object(h["createTextVNode"])("径向渐变"),qs={key:0,class:"background-image-wrapper"},Ws={class:"background-image"},Xs={key:1,class:"background-gradient-wrapper"},Ys={class:"row"},Zs=Object(h["createVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1),Js={class:"row"},Ks=Object(h["createVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1),$s={key:0,class:"row"},Qs=Object(h["createVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1),ef={class:"row"},tf=Object(h["createTextVNode"])("应用背景到全部"),nf=Object(h["createVNode"])("div",{class:"title"},"全局主题",-1),of={class:"row"},cf=Object(h["createVNode"])("div",{style:{flex:"2"}},"字体:",-1),af={class:"row"},rf=Object(h["createVNode"])("div",{style:{flex:"2"}},"字体颜色:",-1),lf={class:"row"},uf=Object(h["createVNode"])("div",{style:{flex:"2"}},"背景颜色:",-1),df={class:"row"},sf=Object(h["createVNode"])("div",{style:{flex:"2"}},"主题色:",-1),ff=Object(h["createVNode"])("div",{class:"title",style:{"margin-top":"20px"}},"应用预置主题:",-1),pf={class:"theme-list"},bf={class:"theme-item-content"},mf={class:"row"},vf=Object(h["createTextVNode"])("应用主题到全部");Object(h["popScopeId"])();var Of=ws((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("SelectOption"),l=Object(h["resolveComponent"])("Select"),i=Object(h["resolveComponent"])("ColorPicker"),u=Object(h["resolveComponent"])("ColorButton"),d=Object(h["resolveComponent"])("Popover"),s=Object(h["resolveComponent"])("IconPlus"),f=Object(h["resolveComponent"])("FileInput"),p=Object(h["resolveComponent"])("Slider"),b=Object(h["resolveComponent"])("Button"),m=Object(h["resolveComponent"])("Divider"),v=Object(h["resolveComponent"])("SelectOptGroup");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Vs,[_s,Object(h["createVNode"])("div",Bs,[Object(h["createVNode"])(l,{style:{flex:"10"},value:e.background.type,onChange:t[1]||(t[1]=function(t){return e.updateBackgroundType(t)})},{default:ws((function(){return[Object(h["createVNode"])(r,{value:"solid"},{default:ws((function(){return[Ms]})),_:1}),Object(h["createVNode"])(r,{value:"image"},{default:ws((function(){return[Ds]})),_:1}),Object(h["createVNode"])(r,{value:"gradient"},{default:ws((function(){return[As]})),_:1})]})),_:1},8,["value"]),Ps,"solid"===e.background.type?(Object(h["openBlock"])(),Object(h["createBlock"])(d,{key:0,trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.background.color,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.updateBackground({color:t})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.background.color||"#fff",style:{flex:"10"}},null,8,["color"])]})),_:1})):"image"===e.background.type?(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:1,style:{flex:"10"},value:e.background.size||"cover",onChange:t[3]||(t[3]=function(t){return e.updateBackground({imageSize:t})})},{default:ws((function(){return[Object(h["createVNode"])(r,{value:"initial"},{default:ws((function(){return[Rs]})),_:1}),Object(h["createVNode"])(r,{value:"contain"},{default:ws((function(){return[Fs]})),_:1}),Object(h["createVNode"])(r,{value:"repeat"},{default:ws((function(){return[zs]})),_:1}),Object(h["createVNode"])(r,{value:"cover"},{default:ws((function(){return[Hs]})),_:1})]})),_:1},8,["value"])):(Object(h["openBlock"])(),Object(h["createBlock"])(l,{key:2,style:{flex:"10"},value:e.background.gradientType,onChange:t[4]||(t[4]=function(t){return e.updateBackground({gradientType:t})})},{default:ws((function(){return[Object(h["createVNode"])(r,{value:"linear"},{default:ws((function(){return[Us]})),_:1}),Object(h["createVNode"])(r,{value:"radial"},{default:ws((function(){return[Gs]})),_:1})]})),_:1},8,["value"]))]),"image"===e.background.type?(Object(h["openBlock"])(),Object(h["createBlock"])("div",qs,[Object(h["createVNode"])(f,{onChange:t[5]||(t[5]=function(t){return e.uploadBackgroundImage(t)})},{default:ws((function(){return[Object(h["createVNode"])("div",Ws,[Object(h["createVNode"])("div",{class:"content",style:{backgroundImage:"url(".concat(e.background.image,")")}},[Object(h["createVNode"])(s)],4)])]})),_:1})])):Object(h["createCommentVNode"])("",!0),"gradient"===e.background.type?(Object(h["openBlock"])(),Object(h["createBlock"])("div",Xs,[Object(h["createVNode"])("div",Ys,[Zs,Object(h["createVNode"])(d,{trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.background.gradientColor[0],"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.updateBackground({gradientColor:[t,e.background.gradientColor[1]]})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.background.gradientColor[0],style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",Js,[Ks,Object(h["createVNode"])(d,{trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.background.gradientColor[1],"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.updateBackground({gradientColor:[e.background.gradientColor[0],t]})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.background.gradientColor[1],style:{flex:"3"}},null,8,["color"])]})),_:1})]),"linear"===e.background.gradientType?(Object(h["openBlock"])(),Object(h["createBlock"])("div",$s,[Qs,Object(h["createVNode"])(p,{min:0,max:360,step:15,value:e.background.gradientRotate,style:{flex:"3"},onChange:t[8]||(t[8]=function(t){return e.updateBackground({gradientRotate:t})})},null,8,["value"])])):Object(h["createCommentVNode"])("",!0)])):Object(h["createCommentVNode"])("",!0),Object(h["createVNode"])("div",ef,[Object(h["createVNode"])(b,{style:{flex:"1"},onClick:t[9]||(t[9]=function(t){return e.applyBackgroundAllSlide()})},{default:ws((function(){return[tf]})),_:1})]),Object(h["createVNode"])(m),nf,Object(h["createVNode"])("div",of,[cf,Object(h["createVNode"])(l,{style:{flex:"3"},value:e.theme.fontName,onChange:t[10]||(t[10]=function(t){return e.updateTheme({fontName:t})})},{default:ws((function(){return[Object(h["createVNode"])(v,{label:"系统字体"},{default:ws((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.availableFonts,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:e.en,value:e.en},{default:ws((function(){return[Object(h["createVNode"])("span",{style:{fontFamily:e.en}},Object(h["toDisplayString"])(e.zh),5)]})),_:2},1032,["value"])})),128))]})),_:1}),Object(h["createVNode"])(v,{label:"在线字体"},{default:ws((function(){return[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.webFonts,(function(e){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:e.name,value:e.name},{default:ws((function(){return[Object(h["createVNode"])("span",null,Object(h["toDisplayString"])(e.name),1)]})),_:2},1032,["value"])})),128))]})),_:1})]})),_:1},8,["value"])]),Object(h["createVNode"])("div",af,[rf,Object(h["createVNode"])(d,{trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.theme.fontColor,"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.updateTheme({fontColor:t})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.theme.fontColor,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",lf,[uf,Object(h["createVNode"])(d,{trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.theme.backgroundColor,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.updateTheme({backgroundColor:t})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.theme.backgroundColor,style:{flex:"3"}},null,8,["color"])]})),_:1})]),Object(h["createVNode"])("div",df,[sf,Object(h["createVNode"])(d,{trigger:"click"},{content:ws((function(){return[Object(h["createVNode"])(i,{modelValue:e.theme.themeColor,"onUpdate:modelValue":t[13]||(t[13]=function(t){return e.updateTheme({themeColor:t})})},null,8,["modelValue"])]})),default:ws((function(){return[Object(h["createVNode"])(u,{color:e.theme.themeColor,style:{flex:"3"}},null,8,["color"])]})),_:1})]),ff,Object(h["createVNode"])("div",pf,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.themes,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"theme-item",key:n,style:{backgroundColor:t.background},onClick:function(n){return e.updateTheme({fontColor:t.text,backgroundColor:t.background,themeColor:t.color})}},[Object(h["createVNode"])("div",bf,[Object(h["createVNode"])("div",{class:"text",style:{color:t.text}},"Aa",4),Object(h["createVNode"])("div",{class:"color-block",style:{backgroundColor:t.color}},null,4)])],12,["onClick"])})),128))]),Object(h["createVNode"])("div",mf,[Object(h["createVNode"])(b,{style:{flex:"1"},onClick:t[14]||(t[14]=function(t){return e.applyThemeAllSlide()})},{default:ws((function(){return[vf]})),_:1})])])})),hf=[{color:"#d14424",background:"#ffffff",text:"#333"},{color:"#42464b",background:"#ffffff",text:"#333"},{color:"#5d82ba",background:"#ffffff",text:"#333"},{color:"#005a6f",background:"#ffffff",text:"#333"},{color:"#d0614c",background:"#dfb044",text:"#333"},{color:"#86a1ad",background:"#dfdbd4",text:"#333"},{color:"#697586",background:"#d5c4a4",text:"#333"},{color:"#333333",background:"#7acfa6",text:"#333"},{color:"#42464b",background:"#415065",text:"#fff"},{color:"#0c5999",background:"#35a2cd",text:"#fff"},{color:"#c49a41",background:"#8c4357",text:"#fff"},{color:"#dfaa00",background:"#2e4e7d",text:"#fff"},{color:"#d1ad88",background:"#f99070",text:"#fff"},{color:"#464d52",background:"#657984",text:"#fff"},{color:"#ffcfb6",background:"#1e4c6f",text:"#fff"},{color:"#c3a043",background:"#43292a",text:"#fff"},{color:"#ffffff",background:"#171925",text:"#fff"},{color:"#df9636",background:"#5b89a0",text:"#fff"},{color:"#b898a4",background:"#93716b",text:"#fff"},{color:"#c47a11",background:"#187db1",text:"#fff"},{color:"#333333",background:"#759564",text:"#fff"},{color:"#355b5e",background:"#424b50",text:"#fff"},{color:"#d29090",background:"#942a32",text:"#fff"},{color:"#00cfdf",background:"#3b434d",text:"#fff"},{color:"#424246",background:"#c70042",text:"#fff"},{color:"#2e4155",background:"#b35d44",text:"#fff"},{color:"#11bfce",background:"#8f98aa",text:"#fff"},{color:"#333333",background:"#549688",text:"#fff"}],jf=hf,gf=H,yf=Object(h["defineComponent"])({name:"slide-style-panel",components:{ColorButton:ui},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slides})),n=Object(h["computed"])((function(){return e.state.theme})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=Object(h["computed"])((function(){return e.state.availableFonts})),a=Object(h["computed"])((function(){return o.value.background?o.value.background:{type:"solid",value:"#fff"}})),r=Se(),l=r.addHistorySnapshot,i=function(t){if("solid"===t){var n=Object(P["a"])(Object(P["a"])({},a.value),{},{type:"solid",color:a.value.color||"#fff"});e.commit(g.UPDATE_SLIDE,{background:n})}else if("image"===t){var o=Object(P["a"])(Object(P["a"])({},a.value),{},{type:"image",image:a.value.image||"",imageSize:a.value.imageSize||"cover"});e.commit(g.UPDATE_SLIDE,{background:o})}else{var c=Object(P["a"])(Object(P["a"])({},a.value),{},{type:"gradient",gradientType:a.value.gradientType||"linear",gradientColor:a.value.gradientColor||["#fff","#fff"],gradientRotate:a.value.gradientRotate||0});e.commit(g.UPDATE_SLIDE,{background:c})}l()},u=function(t){e.commit(g.UPDATE_SLIDE,{background:Object(P["a"])(Object(P["a"])({},a.value),t)}),l()},d=function(e){var t=e[0];t&&Ne(t).then((function(e){return u({image:e})}))},s=function(){var n=t.value.map((function(e){return Object(P["a"])(Object(P["a"])({},e),{},{background:o.value.background})}));e.commit(g.SET_SLIDES,n),l()},f=function(t){e.commit(g.SET_THEME,t)},p=function(){var o,c=JSON.parse(JSON.stringify(t.value)),a=n.value,r=a.themeColor,i=a.backgroundColor,u=a.fontColor,d=Object(ge["a"])(c);try{for(d.s();!(o=d.n()).done;){var s=o.value;s.background&&"image"===s.background.type||(s.background=Object(P["a"])(Object(P["a"])({},s.background),{},{type:"solid",color:i}));var f,p=s.elements,b=Object(ge["a"])(p);try{for(b.s();!(f=b.n()).done;){var m=f.value;"shape"===m.type?m.fill=r:"line"===m.type?m.color=r:"text"===m.type?m.fill&&(m.fill=r):"table"===m.type?m.theme&&(m.theme.color=r):"chart"===m.type&&(m.themeColor=r,m.gridColor=u)}}catch(cO){b.e(cO)}finally{b.f()}}}catch(cO){d.e(cO)}finally{d.f()}e.commit(g.SET_SLIDES,c),l()};return{availableFonts:c,background:a,updateBackgroundType:i,updateBackground:u,uploadBackgroundImage:d,applyBackgroundAllSlide:s,themes:jf,theme:n,webFonts:gf,updateTheme:f,applyThemeAllSlide:p}}});n("3639");yf.render=Of,yf.__scopeId="data-v-52253a56";var kf=yf,Ef=Object(h["withScopeId"])("data-v-a3bc22da");Object(h["pushScopeId"])("data-v-a3bc22da");var If={class:"slide-animation-panel"},Sf={class:"animation-pool"},Cf={class:"animation-text"},Nf=Object(h["createTextVNode"])("应用到全部");Object(h["popScopeId"])();var xf=Ef((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Button");return Object(h["openBlock"])(),Object(h["createBlock"])("div",If,[Object(h["createVNode"])("div",Sf,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.animations,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["animation-item",{active:e.currentTurningMode===t.value}],key:t.label,onClick:function(n){return e.updateTurningMode(t.value)}},[Object(h["createVNode"])("div",{class:["animation-block",t.value]},null,2),Object(h["createVNode"])("div",Cf,Object(h["toDisplayString"])(t.label),1)],10,["onClick"])})),128))]),Object(h["createVNode"])(r,{style:{width:"100%"},onClick:t[1]||(t[1]=function(t){return e.applyAllSlide()})},{default:Ef((function(){return[Nf]})),_:1})])})),Tf=Object(h["defineComponent"])({name:"slide-animation-panel",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slides})),n=Object(h["computed"])((function(){return e.getters.currentSlide})),o=Object(h["computed"])((function(){return n.value.turningMode||"slideY"})),c=[{label:"无",value:"no"},{label:"淡入淡出",value:"fade"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"}],a=Se(),r=a.addHistorySnapshot,l=function(t){t!==o.value&&(e.commit(g.UPDATE_SLIDE,{turningMode:t}),r())},i=function(){var o=t.value.map((function(e){return Object(P["a"])(Object(P["a"])({},e),{},{turningMode:n.value.turningMode})}));e.commit(g.SET_SLIDES,o),r()};return{currentTurningMode:o,animations:c,updateTurningMode:l,applyAllSlide:i}}});n("3f04");Tf.render=xf,Tf.__scopeId="data-v-a3bc22da";var Lf=Tf,wf=Object(h["withScopeId"])("data-v-1040b5b1");Object(h["pushScopeId"])("data-v-1040b5b1");var Vf={class:"multi-position-panel"},_f=Object(h["createTextVNode"])("组合"),Bf=Object(h["createTextVNode"])("取消组合");Object(h["popScopeId"])();var Mf=wf((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconAlignLeft"),l=Object(h["resolveComponent"])("Button"),i=Object(h["resolveComponent"])("Tooltip"),u=Object(h["resolveComponent"])("IconAlignVertically"),d=Object(h["resolveComponent"])("IconAlignRight"),s=Object(h["resolveComponent"])("ButtonGroup"),f=Object(h["resolveComponent"])("IconAlignTop"),p=Object(h["resolveComponent"])("IconAlignHorizontally"),b=Object(h["resolveComponent"])("IconAlignBottom"),m=Object(h["resolveComponent"])("Divider"),v=Object(h["resolveComponent"])("IconGroup"),O=Object(h["resolveComponent"])("IconUngroup");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Vf,[Object(h["createVNode"])(s,{class:"row"},{default:wf((function(){return[Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[1]||(t[1]=function(t){return e.alignActiveElement("left")})},{default:wf((function(){return[Object(h["createVNode"])(r)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[2]||(t[2]=function(t){return e.alignActiveElement("horizontal")})},{default:wf((function(){return[Object(h["createVNode"])(u)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[3]||(t[3]=function(t){return e.alignActiveElement("right")})},{default:wf((function(){return[Object(h["createVNode"])(d)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(s,{class:"row"},{default:wf((function(){return[Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[4]||(t[4]=function(t){return e.alignActiveElement("top")})},{default:wf((function(){return[Object(h["createVNode"])(f)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[5]||(t[5]=function(t){return e.alignActiveElement("vertical")})},{default:wf((function(){return[Object(h["createVNode"])(p)]})),_:1})]})),_:1},8,["mouseEnterDelay"]),Object(h["createVNode"])(i,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:wf((function(){return[Object(h["createVNode"])(l,{style:{flex:"1"},onClick:t[6]||(t[6]=function(t){return e.alignActiveElement("bottom")})},{default:wf((function(){return[Object(h["createVNode"])(b)]})),_:1})]})),_:1},8,["mouseEnterDelay"])]})),_:1}),Object(h["createVNode"])(m),Object(h["createVNode"])(s,{class:"row"},{default:wf((function(){return[Object(h["createVNode"])(l,{disabled:!e.canCombine,onClick:t[7]||(t[7]=function(t){return e.combineElements()}),style:{flex:"1"}},{default:wf((function(){return[Object(h["createVNode"])(v,{style:{"margin-right":"3px"}}),_f]})),_:1},8,["disabled"]),Object(h["createVNode"])(l,{disabled:e.canCombine,onClick:t[8]||(t[8]=function(t){return e.uncombineElements()}),style:{flex:"1"}},{default:wf((function(){return[Object(h["createVNode"])(O,{style:{"margin-right":"3px"}}),Bf]})),_:1},8,["disabled"])]})),_:1})])})),Df=Object(h["defineComponent"])({name:"multi-position-panel",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.activeElementIdList})),n=Object(h["computed"])((function(){return e.getters.activeElementList})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=Se(),a=c.addHistorySnapshot,r=Me(),l=r.combineElements,i=r.uncombineElements,u=Object(h["computed"])((function(){var e=n.value[0].groupId;if(!e)return!0;var t=n.value.every((function(t){return(t.groupId&&t.groupId)===e}));return!t})),d=function(c){var r,l=Tt(n.value),i=l.minX,u=l.maxX,d=l.minY,s=l.maxY,f=JSON.parse(JSON.stringify(o.value.elements)),p={},b=Object(ge["a"])(n.value);try{var m=function(){var e=r.value;if(e.groupId&&!p[e.groupId]){var t=n.value.filter((function(t){return t.groupId===e.groupId}));p[e.groupId]=Tt(t)}};for(b.s();!(r=b.n()).done;)m()}catch(cO){b.e(cO)}finally{b.f()}if(c===Q.LEFT)f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=n.minX-i;e.left=e.left-o}else e.left=i}));else if(c===Q.RIGHT)f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=n.maxX-u;e.left=e.left-o}else{var c="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;e.left=u-c}}));else if(c===Q.TOP)f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=n.minY-d;e.top=e.top-o}else e.top=d}));else if(c===Q.BOTTOM)f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=n.maxY-s;e.top=e.top-o}else{var c="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;e.top=s-c}}));else if(c===Q.HORIZONTAL){var v=(i+u)/2;f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=(n.maxX+n.minX)/2,c=o-v;e.left=e.left-c}else{var a="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;e.left=v-a/2}}))}else if(c===Q.VERTICAL){var O=(d+s)/2;f.forEach((function(e){if(t.value.includes(e.id))if(e.groupId){var n=p[e.groupId],o=(n.maxY+n.minY)/2,c=o-O;e.top=e.top-c}else{var a="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;e.top=O-a/2}}))}e.commit(g.UPDATE_SLIDE,{elements:f}),a()};return{canCombine:u,combineElements:l,uncombineElements:i,alignActiveElement:d}}});n("50dd");Df.render=Mf,Df.__scopeId="data-v-1040b5b1";var Af=Df,Pf=Object(h["defineComponent"])({name:"toolbar",setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.toolbarState})),n=[{label:"样式",value:Nl.EL_STYLE},{label:"位置",value:Nl.EL_POSITION},{label:"动画",value:Nl.EL_ANIMATION}],o=[{label:"页面样式",value:Nl.SLIDE_STYLE},{label:"切换",value:Nl.SLIDE_ANIMATION},{label:"动画",value:Nl.EL_ANIMATION}],c=[{label:"位置",value:Nl.MULTI_POSITION},{label:"样式",value:Nl.EL_STYLE}],a=function(t){e.commit(g.SET_TOOLBAR_STATE,t)},r=Object(h["computed"])((function(){return e.state.activeElementIdList})),l=Object(h["computed"])((function(){return r.value.length?r.value.length>1?c:n:o}));Object(h["watch"])(l,(function(){var n=l.value.map((function(e){return e.value}));n.includes(t.value)||e.commit(g.SET_TOOLBAR_STATE,n[0])}));var i=Object(h["computed"])((function(){var e,n=(e={},Object(C["a"])(e,Nl.EL_STYLE,Gd),Object(C["a"])(e,Nl.EL_POSITION,is),Object(C["a"])(e,Nl.EL_ANIMATION,Ls),Object(C["a"])(e,Nl.SLIDE_STYLE,kf),Object(C["a"])(e,Nl.SLIDE_ANIMATION,Lf),Object(C["a"])(e,Nl.MULTI_POSITION,Af),e);return n[t.value]||null}));return{toolbarState:t,currentTabs:l,setToolbarState:a,currentPanelComponent:i}}});n("3179");Pf.render=Cl,Pf.__scopeId="data-v-8468ba32";var Rf=Pf,Ff=Object(h["defineComponent"])({name:"editor",components:{EditorHeader:gt,Canvas:Fa,CanvasTool:Tr,Thumbnails:yl,Toolbar:Rf},setup:function(){qe(),We()}});n("a6cc");Ff.render=ce,Ff.__scopeId="data-v-d5c6b448";var zf=Ff,Hf=Object(h["withScopeId"])("data-v-048f6280");Object(h["pushScopeId"])("data-v-048f6280");var Uf={class:"hamster-ppt-screen"},Gf={class:"tools"};Object(h["popScopeId"])();var qf=Hf((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ScreenSlide"),l=Object(h["resolveComponent"])("SlideThumbnails"),i=Object(h["resolveComponent"])("Modal"),u=Object(h["resolveComponent"])("IconLeftC"),d=Object(h["resolveComponent"])("IconRightC"),s=Object(h["resolveComponent"])("IconSearch"),f=Object(h["resolveComponent"])("WritingBoardTool"),p=Object(h["resolveComponent"])("IconWrite"),b=Object(h["resolveComponent"])("Popover"),m=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",Uf,[Object(h["withDirectives"])(Object(h["createVNode"])("div",{class:"slide-list",onMousewheel:t[1]||(t[1]=function(t){return e.mousewheelListener(t)})},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.slides,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["slide-item","turning-mode-".concat(t.turningMode||"slideY"),{current:n===e.slideIndex,before:n<e.slideIndex,after:n>e.slideIndex,hide:(n===e.slideIndex-1||n===e.slideIndex+1)&&t.turningMode!==e.currentSlide.turningMode}],key:t.id},[Object(h["createVNode"])("div",{class:"slide-content",style:{width:e.slideWidth+"px",height:e.slideHeight+"px"}},[Object(h["createVNode"])(r,{slide:t,scale:e.scale,animationIndex:e.animationIndex},null,8,["slide","scale","animationIndex"])],4)],2)})),128))],544),[[m,e.contextmenus]]),Object(h["createVNode"])(i,{visible:e.slideThumbnailModelVisible,"onUpdate:visible":t[2]||(t[2]=function(t){return e.slideThumbnailModelVisible=t}),footer:null,centered:"",width:1020,bodyStyle:{padding:"50px 20px 20px 20px"}},{default:Hf((function(){return[Object(h["createVNode"])(l,{turnSlideToIndex:e.turnSlideToIndex},null,8,["turnSlideToIndex"])]})),_:1},8,["visible"]),Object(h["createVNode"])("div",Gf,[Object(h["createVNode"])(u,{class:"tool-btn",onClick:t[3]||(t[3]=function(t){return e.execPrev()})}),Object(h["createVNode"])(d,{class:"tool-btn",onClick:t[4]||(t[4]=function(t){return e.execNext()})}),Object(h["createVNode"])(s,{class:"tool-btn",onClick:t[5]||(t[5]=function(t){return e.slideThumbnailModelVisible=!0})}),Object(h["createVNode"])(b,{trigger:"click",visible:e.writingBoardToolVisible,"onUpdate:visible":t[7]||(t[7]=function(t){return e.writingBoardToolVisible=t})},{content:Hf((function(){return[Object(h["createVNode"])(f,{onClose:t[6]||(t[6]=function(t){return e.writingBoardToolVisible=!1})})]})),default:Hf((function(){return[Object(h["createVNode"])(p,{class:"tool-btn"})]})),_:1},8,["visible"])])])})),Wf=Object(h["withScopeId"])("data-v-5e193d56"),Xf=Wf((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ScreenElement");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"screen-slide",style:{width:e.VIEWPORT_SIZE+"px",height:e.VIEWPORT_SIZE*e.VIEWPORT_ASPECT_RATIO+"px",transform:"scale(".concat(e.scale,")")}},[Object(h["createVNode"])("div",{class:"background",style:Object(P["a"])({},e.backgroundStyle)},null,4),(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.slide.elements,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])(r,{id:"screen-element-".concat(t.id),key:t.id,elementInfo:t,elementIndex:n+1,animationIndex:e.animationIndex},null,8,["id","elementInfo","elementIndex","animationIndex"])})),128))],4)}));function Yf(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"screen-element",style:{zIndex:e.elementIndex,color:e.theme.fontColor,fontFamily:e.theme.fontName,visibility:e.needWaitAnimation?"hidden":"visible"}},[(Object(h["openBlock"])(),Object(h["createBlock"])(Object(h["resolveDynamicComponent"])(e.currentElementComponent),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],4)}var Zf=Object(h["withScopeId"])("data-v-1423f8c2"),Jf=Zf((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ElementOutline"),l=Object(h["resolveComponent"])("Chart");return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"screen-element-chart",style:{top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"}},[Object(h["createVNode"])("div",{class:"element-content",style:{backgroundColor:e.elementInfo.fill}},[Object(h["createVNode"])(r,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(h["createVNode"])(l,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor},null,8,["width","height","type","data","options","themeColor","gridColor"])],4)],4)})),Kf=Object(h["defineComponent"])({name:"screen-element-chart",components:{ElementOutline:To,Chart:lc},props:{elementInfo:{type:Object,required:!0}}});n("1539");Kf.render=Jf,Kf.__scopeId="data-v-1423f8c2";var $f=Kf,Qf=Object(h["defineComponent"])({name:"screen-element",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},animationIndex:{type:Number,default:-1}},setup:function(e){var t=Object(h["computed"])((function(){var t,n=(t={},Object(C["a"])(t,Kt.IMAGE,Ur),Object(C["a"])(t,Kt.TEXT,Xr),Object(C["a"])(t,Kt.SHAPE,$r),Object(C["a"])(t,Kt.LINE,nl),Object(C["a"])(t,Kt.CHART,$f),Object(C["a"])(t,Kt.TABLE,ml),t);return n[e.elementInfo.type]||null})),n=X(),o=Object(h["computed"])((function(){return n.state.theme})),c=Object(h["computed"])((function(){return n.getters.currentSlide})),a=Object(h["computed"])((function(){var t=c.value.animations||[],n=t.findIndex((function(t){return t.elId===e.elementInfo.id}));return-1!==n&&n>=e.animationIndex}));return{currentElementComponent:t,needWaitAnimation:a,theme:o}}});Qf.render=Yf;var ep=Qf,tp=Object(h["defineComponent"])({name:"screen-slide",components:{ScreenElement:ep},props:{slide:{type:Object,required:!0},scale:{type:Number,required:!0},animationIndex:{type:Number,default:-1}},setup:function(e){var t=Object(h["computed"])((function(){return e.slide.background})),n=Mc(t),o=n.backgroundStyle;return{backgroundStyle:o,VIEWPORT_SIZE:xe,VIEWPORT_ASPECT_RATIO:Te}}});n("993a");tp.render=Xf,tp.__scopeId="data-v-5e193d56";var np=tp,op=Object(h["withScopeId"])("data-v-5b8ebe1d");Object(h["pushScopeId"])("data-v-5b8ebe1d");var cp={class:"slide-thumbnails"};Object(h["popScopeId"])();var ap=op((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("ThumbnailSlide");return Object(h["openBlock"])(),Object(h["createBlock"])("div",cp,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.slides,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["thumbnail",{active:n===e.slideIndex}],key:t.id,onClick:function(t){return e.turnSlideToIndex(n)}},[Object(h["createVNode"])(r,{slide:t,size:150},null,8,["slide"])],10,["onClick"])})),128))])})),rp=Object(h["defineComponent"])({name:"slide-thumbnails",components:{ThumbnailSlide:jl},props:{turnSlideToIndex:{type:Function}},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slides})),n=Object(h["computed"])((function(){return e.state.slideIndex}));return{slides:t,slideIndex:n}}});n("add0");rp.render=ap,rp.__scopeId="data-v-5b8ebe1d";var lp=rp,ip=Object(h["withScopeId"])("data-v-0ecab351");Object(h["pushScopeId"])("data-v-0ecab351");var up={class:"writing-board-tool"},dp={class:"tools"},sp={class:"colors"};Object(h["popScopeId"])();var fp=ip((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("WritingBoard"),l=Object(h["resolveDirective"])("contextmenu");return Object(h["openBlock"])(),Object(h["createBlock"])("div",up,[(Object(h["openBlock"])(),Object(h["createBlock"])(h["Teleport"],{to:"body"},[e.writingBoardVisible?Object(h["withDirectives"])((Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:0,ref:"writingBoardRef",color:e.writingBoardColor,model:e.writingBoardModel},null,8,["color","model"])),[[l,e.contextmenus]]):Object(h["createCommentVNode"])("",!0)])),Object(h["createVNode"])("div",dp,[Object(h["createVNode"])("div",{class:"btn",onClick:t[1]||(t[1]=function(t){return e.changePen()})},"画笔"),Object(h["createVNode"])("div",{class:"btn",onClick:t[2]||(t[2]=function(t){return e.changeEraser()})},"橡皮擦"),Object(h["createVNode"])("div",{class:"btn",onClick:t[3]||(t[3]=function(t){return e.clearCanvas()})},"擦除所有墨迹"),Object(h["createVNode"])("div",{class:"btn",onClick:t[4]||(t[4]=function(t){return e.closeWritingBoard()})},"退出画笔"),Object(h["createVNode"])("div",sp,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.writingBoardColors,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:["color",{active:t===e.writingBoardColor}],key:t,style:{backgroundColor:t},onClick:function(n){return e.changeColor(t)}},null,14,["onClick"])})),128))])])])})),pp=Object(h["withScopeId"])("data-v-5b8a1ac6");Object(h["pushScopeId"])("data-v-5b8a1ac6");var bp={class:"writing-board",ref:"writingBoardRef"};Object(h["popScopeId"])();var mp=pp((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("IconWrite"),l=Object(h["resolveComponent"])("IconClearFormat");return Object(h["openBlock"])(),Object(h["createBlock"])("div",bp,[Object(h["createVNode"])("canvas",{class:"canvas",ref:"canvasRef",onMousedown:t[1]||(t[1]=function(t){return e.handleMousedown(t)}),onMousemove:t[2]||(t[2]=function(t){return e.handleMousemove(t)}),onMouseup:t[3]||(t[3]=function(t){return e.handleMouseup()}),onMouseleave:t[4]||(t[4]=function(t){e.handleMouseup(),e.mouseInCanvas=!1}),onMouseenter:t[5]||(t[5]=function(t){return e.mouseInCanvas=!0})},null,544),e.mouseInCanvas&&"pen"===e.model?(Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:0,class:"pen",style:{left:e.mouse.x-e.penSize/2+"px",top:e.mouse.y-36+e.penSize/2+"px",color:e.color}},[Object(h["createVNode"])(r,{class:"icon",size:"36"})],4)):Object(h["createCommentVNode"])("",!0),e.mouseInCanvas&&"eraser"===e.model?(Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:1,class:"eraser",style:{left:e.mouse.x-e.rubberSize/2+"px",top:e.mouse.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"}},[Object(h["createVNode"])(l,{class:"icon",size:.6*e.rubberSize},null,8,["size"])],4)):Object(h["createCommentVNode"])("",!0)],512)})),vp=6,Op=80,hp=Object(h["defineComponent"])({name:"writing-board",props:{color:{type:String,default:"#ffcc00"},model:{type:String,default:"pen"}},setup:function(e){var t=null,n=Object(h["ref"])(),o=Object(h["ref"])(),c={x:0,y:0},a=!1,r=0,l=-1,i=Object(h["reactive"])({x:0,y:0}),u=Object(h["ref"])(!1),d=function(){o.value&&n.value&&(t=o.value.getContext("2d"),t&&(o.value.width=n.value.clientWidth,o.value.height=n.value.clientHeight,o.value.style.width=n.value.clientWidth+"px",o.value.style.height=n.value.clientHeight+"px",t.lineCap="round",t.lineJoin="round"))},s=function(e,t){var n=c.x,o=c.y;return Math.sqrt((e-n)*(e-n)+(t-o)*(t-o))},f=function(e,t){var n,o=10,c=.1,a=vp,r=3,i=e/t;return n=i<=c?a:i>=o?r:a-i/o*a,-1===l?n:1*n/3+2*l/3},p=function(n,o,a){if(t){var r=c.x,l=c.y;t.lineWidth=a,t.strokeStyle=e.color,t.beginPath(),t.moveTo(r,l),t.lineTo(n,o),t.stroke(),t.closePath()}},b=function(e,n){var a,r,l,i;if(t&&o.value){var u=c.x,d=c.y,s=Op/2,f=s*Math.sin(Math.atan((n-d)/(e-u))),p=s*Math.cos(Math.atan((n-d)/(e-u))),b=[u+f,d-p],m=[u-f,d+p],v=[e+f,n-p],O=[e-f,n+p];t.save(),t.beginPath(),t.arc(e,n,s,0,2*Math.PI),t.clip(),t.clearRect(0,0,o.value.width,o.value.height),t.restore(),t.save(),t.beginPath(),(a=t).moveTo.apply(a,b),(r=t).lineTo.apply(r,v),(l=t).lineTo.apply(l,O),(i=t).lineTo.apply(i,m),t.closePath(),t.clip(),t.clearRect(0,0,o.value.width,o.value.height),t.restore()}},m=function(e,t){c={x:e,y:t},r=(new Date).getTime()},v=function(t,n){var o=(new Date).getTime();if("pen"===e.model){var a=s(t,n),i=o-r,u=f(a,i);p(t,n,u),l=u}else b(t,n);c={x:t,y:n},r=(new Date).getTime()},O=function(e){a=!0,m(e.offsetX,e.offsetY)},j=function(e){i.x=e.pageX,i.y=e.pageY},g=function(e){j(e),a&&v(e.offsetX,e.offsetY)},y=function(){a&&(a=!1)},k=function(){t&&o.value&&t.clearRect(0,0,o.value.width,o.value.height)};return Object(h["onMounted"])(d),{mouse:i,mouseInCanvas:u,penSize:vp,rubberSize:Op,writingBoardRef:n,canvasRef:o,handleMousedown:O,handleMousemove:g,handleMouseup:y,clearCanvas:k}}});n("45ac");hp.render=mp,hp.__scopeId="data-v-5b8a1ac6";var jp=hp,gp=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],yp=Object(h["defineComponent"])({name:"writing-board-tool",components:{WritingBoard:jp},setup:function(e,t){var n=t.emit,o=Object(h["ref"])(),c=Object(h["ref"])(!1),a=Object(h["ref"])("#e2534d"),r=Object(h["ref"])("pen"),l=function(){c.value||(c.value=!0),r.value="pen",n("close")},i=function(){r.value="eraser",n("close")},u=function(){o.value.clearCanvas(),n("close")},d=function(e){"pen"!==r.value&&(r.value="pen"),a.value=e,n("close")},s=function(){c.value=!1,n("close")},f=function(){return[{text:"画笔",handler:l,disable:"pen"===r.value},{text:"橡皮擦",handler:i,disable:"eraser"===r.value},{text:"擦除所有墨迹",handler:u},{text:"退出画笔",handler:s}]};return{writingBoardRef:o,writingBoardVisible:c,writingBoardColors:gp,writingBoardColor:a,writingBoardModel:r,changePen:l,changeEraser:i,clearCanvas:u,changeColor:d,closeWritingBoard:s,contextmenus:f}}});n("8a4a");yp.render=fp,yp.__scopeId="data-v-0ecab351";var kp=yp,Ep=Object(h["defineComponent"])({name:"screen",components:{ScreenSlide:np,SlideThumbnails:lp,WritingBoardTool:kp},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.slides})),n=Object(h["computed"])((function(){return e.state.slideIndex})),o=Object(h["computed"])((function(){return e.getters.currentSlide})),c=Object(h["ref"])(0),a=Object(h["ref"])(0),r=Object(h["computed"])((function(){return c.value/xe})),l=Object(h["ref"])(!1),i=Object(h["ref"])(!1),u=function(){var e,t,n=document.body.clientWidth,o=document.body.clientHeight;o/n===Te?(e=n,t=o):o/n>Te?(e=n,t=n*Te):(e=o/Te,t=o),c.value=e,a.value=t},d=Ue(),s=d.exitScreening,f=function(){u(),He()||s()},p=Object(h["ref"])(0),b=Object(h["computed"])((function(){return o.value.animations||[]})),m=function(){var e="animate__",t=b.value[p.value];p.value+=1;var n=document.querySelector("#screen-element-".concat(t.elId," [class^=base-element-]"));if(n){var o="".concat(e).concat(t.type);n.classList.add("".concat(e,"animated"),o);var c=function(){n.classList.remove("".concat(e,"animated"),o)};n.addEventListener("animationend",c,{once:!0})}},v=function(){if(b.value.length&&p.value>0)p.value-=1;else if(n.value>0){e.commit(g.UPDATE_SLIDE_INDEX,n.value-1);var t=b.value?b.value.length:0;p.value=t}},O=function(){b.value.length&&p.value<b.value.length?m():n.value<t.value.length-1&&(e.commit(g.UPDATE_SLIDE_INDEX,n.value+1),p.value=0)},j=function(e){var t=e.key.toUpperCase();t===oe.UP||t===oe.LEFT?v():t!==oe.DOWN&&t!==oe.RIGHT&&t!==oe.SPACE&&t!==oe.ENTER||O()},y=Ie()((function(e){e.deltaY<0?v():e.deltaY>0&&O()}),500,{leading:!0,trailing:!1});Object(h["onMounted"])((function(){window.addEventListener("resize",f),document.addEventListener("keydown",j)})),Object(h["onUnmounted"])((function(){window.removeEventListener("resize",f),document.removeEventListener("keydown",j)}));var k=function(){e.commit(g.UPDATE_SLIDE_INDEX,n.value-1),p.value=0},E=function(){e.commit(g.UPDATE_SLIDE_INDEX,n.value+1),p.value=0},I=function(t){l.value=!1,e.commit(g.UPDATE_SLIDE_INDEX,t),p.value=0},S=function(){return[{text:"上一页",disable:n.value<=0,handler:function(){return k()}},{text:"下一页",disable:n.value>=t.value.length-1,handler:function(){return E()}},{text:"结束放映",subText:"ESC",handler:s}]};return Object(h["provide"])("slideScale",r),{slides:t,slideIndex:n,currentSlide:o,slideWidth:c,slideHeight:a,scale:r,mousewheelListener:y,animationIndex:p,contextmenus:S,execPrev:v,execNext:O,slideThumbnailModelVisible:l,turnSlideToIndex:I,writingBoardToolVisible:i}}});n("2c96");Ep.render=qf,Ep.__scopeId="data-v-048f6280";var Ip=Ep,Sp=Object(h["defineComponent"])({name:"app",components:{Editor:zf,Screen:Ip},setup:function(){var e=X(),t=Object(h["computed"])((function(){return e.state.screening}));return Object(h["onMounted"])((function(){e.commit(g.SET_AVAILABLE_FONTS),e.dispatch(y.INIT_SNAPSHOT_DATABASE)})),{screening:t}}});n("a2af");Sp.render=j;var Cp=Sp;n("793f"),n("41ed"),n("5952"),n("c860"),n("ae3f"),n("8c56"),n("77ed");function Np(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("MenuContent");return Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,[Object(h["createVNode"])("div",{class:"mask",onContextmenu:t[1]||(t[1]=Object(h["withModifiers"])((function(t){return e.removeContextMenu()}),["prevent"])),onMousedown:t[2]||(t[2]=function(t){return e.removeContextMenu()})},null,32),Object(h["createVNode"])("div",{class:"contextmenu",style:{left:e.style.left,top:e.style.top},onContextmenu:t[3]||(t[3]=Object(h["withModifiers"])((function(){}),["prevent"]))},[Object(h["createVNode"])(r,{menus:e.menus,subMenuPosition:e.style.subMenuPosition,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","subMenuPosition","handleClickMenuItem"])],36)],64)}var xp=Object(h["withScopeId"])("data-v-3cad6828");Object(h["pushScopeId"])("data-v-3cad6828");var Tp={class:"menu-content"},Lp={class:"text"},wp={key:0,class:"sub-text"};Object(h["popScopeId"])();var Vp=xp((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("_self");return Object(h["openBlock"])(),Object(h["createBlock"])("ul",Tp,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.menus,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])(h["Fragment"],null,[t.hide?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])("li",{class:["menu-item",{divider:t.divider,disable:t.disable}],key:t.text||n,onClick:Object(h["withModifiers"])((function(n){return e.handleClickMenuItem(t)}),["stop"])},[t.divider?Object(h["createCommentVNode"])("",!0):(Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:0,class:["menu-item-content",{"has-sub-menu":t.children}]},[Object(h["createVNode"])("span",Lp,Object(h["toDisplayString"])(t.text),1),t.subText&&!t.children?(Object(h["openBlock"])(),Object(h["createBlock"])("span",wp,Object(h["toDisplayString"])(t.subText),1)):Object(h["createCommentVNode"])("",!0),t.children&&t.children.length?(Object(h["openBlock"])(),Object(h["createBlock"])(r,{key:1,class:"sub-menu",style:Object(C["a"])({},e.subMenuPosition,"112.5%"),menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["style","menus","handleClickMenuItem"])):Object(h["createCommentVNode"])("",!0)],2))],10,["onClick"]))],64)})),256))])})),_p=Object(h["defineComponent"])({name:"menu-content",props:{menus:{type:Array,required:!0},subMenuPosition:{type:String,default:"left"},handleClickMenuItem:{type:Function,required:!0}}});n("e344");_p.render=Vp,_p.__scopeId="data-v-3cad6828";var Bp=_p,Mp=160,Dp=30,Ap=11,Pp=120,Rp=Object(h["defineComponent"])({name:"contextmenu",components:{MenuContent:Bp},props:{axis:{type:Object,required:!0},el:{type:Object,required:!0},menus:{type:Array,required:!0},removeContextMenu:{type:Function,required:!0}},setup:function(e){var t=Object(h["computed"])((function(){var t=e.axis,n=t.x,o=t.y,c=e.menus.filter((function(e){return!e.divider&&!e.hide})).length,a=e.menus.filter((function(e){return e.divider})).length,r=10,l=Mp,i=c*Dp+a*Ap+r,u=Mp+Pp-10,d=document.body.clientWidth,s=document.body.clientHeight,f=d<=n+l?n-l:n,p=s<=o+i?o-i:o,b=d<=f+u?"right":"left";return{left:f+"px",top:p+"px",subMenuPosition:b}})),n=function(t){t.disable||t.children||(t.handler&&t.handler(e.el),e.removeContextMenu())};return{style:t,handleClickMenuItem:n}}});n("1c62");Rp.render=Np;var Fp=Rp,zp="CTX_CONTEXTMENU_HANDLER",Hp=function(e,t,n){t.stopPropagation(),t.preventDefault();var o=n.value(e);if(o){var c=null,a=function t(){c&&(document.body.removeChild(c),c=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",t),window.removeEventListener("resize",t)},r={axis:{x:t.x,y:t.y},el:e,menus:o,removeContextMenu:a};c=document.createElement("div");var l=Object(h["createVNode"])(Fp,r,null);Object(h["render"])(l,c),document.body.appendChild(c),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",a),window.addEventListener("resize",a)}},Up={mounted:function(e,t){e[zp]=function(n){return Hp(e,n,t)},e.addEventListener("contextmenu",e[zp])},unmounted:function(e){e&&e[zp]&&(e.removeEventListener("contextmenu",e[zp]),delete e[zp])}},Gp=Up,qp="CTX_CLICK_OUTSIDE_HANDLER",Wp=function(e,t,n){var o=n.value,c=t.composedPath(),a=c?c.indexOf(e)<0:!e.contains(t.target);a&&o(t)},Xp={mounted:function(e,t){e[qp]=function(n){return Wp(e,n,t)},setTimeout((function(){document.addEventListener("click",e[qp])}),0)},unmounted:function(e){e[qp]&&(document.removeEventListener("click",e[qp]),delete e[qp])}},Yp=Xp,Zp=n("a3ef"),Jp=n("8331"),Kp=n("4040"),$p=n("f745"),Qp=n("5d58"),eb=n("2e2d"),tb=n("6010"),nb=n("1fcb"),ob=n("6b77"),cb=n("8db9"),ab=n("0996"),rb=n("a26d"),lb=n("1646"),ib=n("9c0a"),ub=n("622c"),db=n("e5ce"),sb=n("3f19"),fb=n("2dba"),pb=n("10de"),bb=n("fbe7"),mb=n("460f"),vb=n("cfe0"),Ob=n("84e7"),hb=n("1b42"),jb=n("b8af"),gb=n("f59e"),yb=n("bdf8"),kb=n("bf2c"),Eb=n("5168"),Ib=n("1b1c"),Sb=n("e970"),Cb=n("c53e"),Nb=n("5a28"),xb=n("23fa"),Tb=n("fd52"),Lb=n("8377"),wb=n("246f"),Vb=n("4be2"),_b=n("33a2"),Bb=n("fdbcb"),Mb=n("031f"),Db=n("d26b"),Ab=n("a17d"),Pb=n("0ad3"),Rb=n("3a3e"),Fb=n("500e"),zb=n("eac59"),Hb=n("694b"),Ub=n("e9ec"),Gb=n("ea01"),qb=n("74f3"),Wb=n("4bad"),Xb=n("e7f4"),Yb=n("eb50"),Zb=n("0be2"),Jb=n("a90c"),Kb=n("c90a"),$b=n("d41d6"),Qb=n("2c06"),em=n("a5dc"),tm=n("8678"),nm=n("d7fb"),om=n("ce42"),cm=n("7abc"),am=n("5b20"),rm=n("69de"),lm=n("d0c6"),im=n("dcc2"),um=n("5683"),dm=n("69f5"),sm=n("f1d2"),fm=n("d16b"),pm=n("a5f1"),bm=n("df0d"),mm=n("70f2"),vm=n("b7c8"),Om=n("f99d"),hm=n("40bb"),jm=n("ae33"),gm=n("8c1a"),ym=n("b7b3"),km=n("96be"),Em=n("5a69"),Im=n("f9e5"),Sm=n("bbce"),Cm=n("77ad"),Nm=n("46cd"),xm=n("c4a8"),Tm=n("3ee3"),Lm=n("dde4"),wm=n("cead"),Vm=n("a7ac"),_m=n("45b9"),Bm=n("5a81"),Mm=n("0aba"),Dm=n("fa00"),Am=n("f3c2"),Pm=n("c8bf"),Rm=n("5294b"),Fm=n("9fbc"),zm={install:function(e){e.component("IconFontSize",Fm["a"]),e.component("IconPicture",Rm["a"]),e.component("IconPentagonOne",Pm["a"]),e.component("IconConnection",Am["a"]),e.component("IconInsertTable",Dm["a"]),e.component("IconSymbol",Mm["a"]),e.component("IconCopy",Bm["a"]),e.component("IconClipboard",_m["a"]),e.component("IconCuttingOne",Vm["a"]),e.component("IconLock",wm["a"]),e.component("IconUnlock",Lm["a"]),e.component("IconFullScreen",Tm["a"]),e.component("IconOffScreen",xm["a"]),e.component("IconBack",Nm["a"]),e.component("IconNext",Cm["a"]),e.component("IconAlignTop",Sm["a"]),e.component("IconAlignLeft",Im["a"]),e.component("IconAlignRight",Em["a"]),e.component("IconAlignBottom",km["a"]),e.component("IconAlignVertically",ym["a"]),e.component("IconAlignHorizontally",gm["a"]),e.component("IconBringToFront",jm["a"]),e.component("IconSentToBack",hm["a"]),e.component("IconBringToFrontOne",Om["a"]),e.component("IconSendToBack",vm["a"]),e.component("IconGroup",mm["a"]),e.component("IconUngroup",bm["a"]),e.component("IconFill",pm["a"]),e.component("IconBackgroundColor",fm["a"]),e.component("IconPlatte",sm["a"]),e.component("IconSplitCells",dm["a"]),e.component("IconMergeCells",um["a"]),e.component("IconTailoring",im["a"]),e.component("IconColorFilter",lm["a"]),e.component("IconFlipVertically",rm["a"]),e.component("IconFlipHorizontally",am["a"]),e.component("IconText",cm["a"]),e.component("IconAddText",om["a"]),e.component("IconAlignTextLeft",nm["a"]),e.component("IconAlignTextRight",tm["a"]),e.component("IconAlignTextCenter",em["a"]),e.component("IconRowHeight",Qb["a"]),e.component("IconFullwidth",$b["a"]),e.component("IconCode",Kb["a"]),e.component("IconTextBold",Jb["a"]),e.component("IconTextItalic",Zb["a"]),e.component("IconTextUnderline",Yb["a"]),e.component("IconStrikethrough",Xb["a"]),e.component("IconQuote",Wb["a"]),e.component("IconList",qb["a"]),e.component("IconOrderedList",Gb["a"]),e.component("IconUpOne",Ub["a"]),e.component("IconDownOne",Hb["a"]),e.component("IconFormat",zb["a"]),e.component("IconUp",Fb["a"]),e.component("IconDown",Rb["a"]),e.component("IconLeft",Pb["a"]),e.component("IconRight",Ab["a"]),e.component("IconLeftC",Db["a"]),e.component("IconRightC",Mb["a"]),e.component("IconPlus",Bb["a"]),e.component("IconMinus",_b["a"]),e.component("IconCheck",Vb["a"]),e.component("IconClose",wb["a"]),e.component("IconCloseSmall",Lb["a"]),e.component("IconChartRing",Tb["a"]),e.component("IconChartLine",xb["a"]),e.component("IconChartHistogramOne",Nb["a"]),e.component("IconChartHistogram",Cb["a"]),e.component("IconChartProportion",Sb["a"]),e.component("IconChartScatter",Ib["a"]),e.component("IconHome",Eb["a"]),e.component("IconPlayOne",kb["a"]),e.component("IconSearch",yb["a"]),e.component("IconDelete",gb["a"]),e.component("IconPpt",jb["a"]),e.component("IconSettingOne",hb["a"]),e.component("IconClear",Ob["a"]),e.component("IconLinkOne",vb["a"]),e.component("IconDrag",mb["a"]),e.component("IconHelpcenter",bb["a"]),e.component("IconEnterTheKeyboard",pb["a"]),e.component("IconFind",fb["a"]),e.component("IconFullSelection",sb["a"]),e.component("IconClearFormat",db["a"]),e.component("IconGridFour",ub["a"]),e.component("IconPageTemplate",ib["a"]),e.component("IconGithub",lb["a"]),e.component("IconMore",rb["a"]),e.component("IconWrite",ab["a"]),e.component("IconAddThree",cb["a"]),e.component("IconNewlybuild",ob["a"]),e.component("IconEffects",nb["a"]),e.component("IconRotate",tb["a"]),e.component("IconEdit",eb["a"]),e.component("IconSeoFolder",Qp["a"]),e.component("IconUndo",$p["a"]),e.component("IconTransform",Kp["a"]),e.component("IconClick",Jp["a"]),e.component("IconTheme",Zp["a"])}},Hm=Object(h["withScopeId"])("data-v-59732924"),Um=Hm((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"file-input",onClick:t[2]||(t[2]=function(t){return e.handleClick()})},[Object(h["renderSlot"])(e.$slots,"default"),Object(h["createVNode"])("input",{class:"input",type:"file",name:"upload",ref:"inputRef",accept:e.accept,onChange:t[1]||(t[1]=function(t){return e.handleChange(t)})},null,40,["accept"])])})),Gm=Object(h["defineComponent"])({name:"file-input",props:{accept:{type:String,default:"image/*"}},setup:function(e,t){var n=t.emit,o=Object(h["ref"])(),c=function(){o.value&&(o.value.value="",o.value.click())},a=function(e){var t=e.target.files;t&&n("change",t)};return{handleClick:c,handleChange:a,inputRef:o}}});n("6a17");Gm.render=Um,Gm.__scopeId="data-v-59732924";var qm=Gm,Wm={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1"};function Xm(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("svg",Wm,[Object(h["renderSlot"])(e.$slots,"default")])}var Ym={name:"svg-wrapper"};Ym.render=Xm;var Zm=Ym,Jm=Object(h["withScopeId"])("data-v-7cae2b90"),Km=Jm((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("button",{class:["checkbox-button",{checked:n.checked}]},[Object(h["renderSlot"])(e.$slots,"default")],2)})),$m={name:"checkbox-button",props:{checked:{type:Boolean,default:!1}}};n("782e");$m.render=Km,$m.__scopeId="data-v-7cae2b90";var Qm=$m,ev=Object(h["withScopeId"])("data-v-7dafd0a9");Object(h["pushScopeId"])("data-v-7dafd0a9");var tv={class:"checkbox-button-group"};Object(h["popScopeId"])();var nv=ev((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",tv,[Object(h["renderSlot"])(e.$slots,"default")])})),ov={name:"checkbox-button-group"};n("69d58");ov.render=nv,ov.__scopeId="data-v-7dafd0a9";var cv=ov,av=Object(h["withScopeId"])("data-v-dc0cf132");Object(h["pushScopeId"])("data-v-dc0cf132");var rv={class:"color-picker"},lv={class:"picker-saturation-wrap"},iv={class:"picker-controls"},uv={class:"picker-color-wrap"},dv={class:"picker-sliders"},sv={class:"picker-hue-wrap"},fv={class:"picker-alpha-wrap"},pv={class:"picker-field"},bv={class:"picker-presets"},mv={class:"picker-gradient-presets"},vv={class:"picker-presets"};Object(h["popScopeId"])();var Ov=av((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Saturation"),l=Object(h["resolveComponent"])("Checkboard"),i=Object(h["resolveComponent"])("Hue"),u=Object(h["resolveComponent"])("Alpha"),d=Object(h["resolveComponent"])("EditableInput");return Object(h["openBlock"])(),Object(h["createBlock"])("div",rv,[Object(h["createVNode"])("div",lv,[Object(h["createVNode"])(r,{value:e.color,hue:e.hue,onColorChange:t[1]||(t[1]=function(t){return e.changeColor(t)})},null,8,["value","hue"])]),Object(h["createVNode"])("div",iv,[Object(h["createVNode"])("div",uv,[Object(h["createVNode"])("div",{class:"picker-current-color",style:{background:e.currentColor}},null,4),Object(h["createVNode"])(l)]),Object(h["createVNode"])("div",dv,[Object(h["createVNode"])("div",sv,[Object(h["createVNode"])(i,{value:e.color,hue:e.hue,onColorChange:t[2]||(t[2]=function(t){return e.changeColor(t)})},null,8,["value","hue"])]),Object(h["createVNode"])("div",fv,[Object(h["createVNode"])(u,{value:e.color,onColorChange:t[3]||(t[3]=function(t){return e.changeColor(t)})},null,8,["value"])])])]),Object(h["createVNode"])("div",pv,[Object(h["createVNode"])(d,{value:e.color,onColorChange:t[4]||(t[4]=function(t){return e.changeColor(t)})},null,8,["value"])]),Object(h["createVNode"])("div",bv,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.themeColors,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"picker-presets-color",key:t,style:{background:t},onClick:function(n){return e.selectPresetColor(t)}},null,12,["onClick"])})),128))]),Object(h["createVNode"])("div",mv,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.presetColors,(function(t,n){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"picker-gradient-col",key:n},[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(t,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"picker-gradient-color",key:t,style:{background:t},onClick:function(n){return e.selectPresetColor(t)}},null,12,["onClick"])})),128))])})),128))]),Object(h["createVNode"])("div",vv,[(Object(h["openBlock"])(!0),Object(h["createBlock"])(h["Fragment"],null,Object(h["renderList"])(e.standardColors,(function(t){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{key:t,class:"picker-presets-color",style:{background:t},onClick:function(n){return e.selectPresetColor(t)}},null,12,["onClick"])})),128))])])})),hv=Object(h["withScopeId"])("data-v-40ed15f5");Object(h["pushScopeId"])("data-v-40ed15f5");var jv={class:"alpha"},gv={class:"alpha-checkboard-wrap"},yv=Object(h["createVNode"])("div",{class:"alpha-picker"},null,-1);Object(h["popScopeId"])();var kv=hv((function(e,t,n,o,c,a){var r=Object(h["resolveComponent"])("Checkboard");return Object(h["openBlock"])(),Object(h["createBlock"])("div",jv,[Object(h["createVNode"])("div",gv,[Object(h["createVNode"])(r)]),Object(h["createVNode"])("div",{class:"alpha-gradient",style:{background:e.gradientColor}},null,4),Object(h["createVNode"])("div",{class:"alpha-container",ref:"alphaRef",onMousedown:t[1]||(t[1]=function(t){return e.handleMouseDown(t)})},[Object(h["createVNode"])("div",{class:"alpha-pointer",style:{left:100*e.color.a+"%"}},[yv],4)],544)])})),Ev=Object(h["withScopeId"])("data-v-2352ea60"),Iv=Ev((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"checkerboard",style:e.bgStyle},null,4)})),Sv={},Cv=function(e,t,n){var o=document.createElement("canvas");o.width=o.height=2*n;var c=o.getContext("2d");return c?(c.fillStyle=e,c.fillRect(0,0,o.width,o.height),c.fillStyle=t,c.fillRect(0,0,n,n),c.translate(n,n),c.fillRect(0,0,n,n),o.toDataURL()):null},Nv=function(e,t,n){var o=e+","+t+","+n;if(Sv[o])return Sv[o];var c=Cv(e,t,n);return Sv[o]=c,c},xv=Object(h["defineComponent"])({name:"checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup:function(e){var t=Object(h["computed"])((function(){var t=Nv(e.white,e.grey,e.size);return{backgroundImage:"url(".concat(t,")")}}));return{bgStyle:t}}});n("13cd");xv.render=Iv,xv.__scopeId="data-v-2352ea60";var Tv=xv,Lv=Object(h["defineComponent"])({name:"alpha",components:{Checkboard:Tv},props:{value:{type:Object,required:!0}},setup:function(e,t){var n=t.emit,o=Object(h["computed"])((function(){return e.value})),c=Object(h["computed"])((function(){var e=[o.value.r,o.value.g,o.value.b].join(",");return"linear-gradient(to right, rgba(".concat(e,", 0) 0%, rgba(").concat(e,", 1) 100%)")})),a=Object(h["ref"])(),r=function(e){if(e.preventDefault(),a.value){var t,c=a.value.clientWidth,r=a.value.getBoundingClientRect().left+window.pageXOffset,l=e.pageX-r;t=l<0?0:l>c?1:Math.round(100*l/c)/100,o.value.a!==t&&n("colorChange",{r:o.value.r,g:o.value.g,b:o.value.b,a:t})}},l=function e(){window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",e)},i=function(e){r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",l)};return Object(h["onUnmounted"])(l),{alphaRef:a,gradientColor:c,handleMouseDown:i,color:o}}});n("b295");Lv.render=kv,Lv.__scopeId="data-v-40ed15f5";var wv=Lv,Vv=Object(h["withScopeId"])("data-v-0cb6d507");Object(h["pushScopeId"])("data-v-0cb6d507");var _v={class:"hue"},Bv=Object(h["createVNode"])("div",{class:"hue-picker"},null,-1);Object(h["popScopeId"])();var Mv=Vv((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",_v,[Object(h["createVNode"])("div",{class:"hue-container",ref:"hueRef",onMousedown:t[1]||(t[1]=function(t){return e.handleMouseDown(t)})},[Object(h["createVNode"])("div",{class:"hue-pointer",style:{left:e.pointerLeft}},[Bv],4)],544)])})),Dv=Object(h["defineComponent"])({name:"hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},setup:function(e,t){var n=t.emit,o=Object(h["ref"])(0),c=Object(h["ref"])(""),a=Object(h["computed"])((function(){var t=oc()(e.value).toHsl();return 0===t.s&&(t.h=e.hue),t})),r=Object(h["computed"])((function(){return 0===a.value.h&&"right"===c.value?"100%":100*a.value.h/360+"%"}));Object(h["watch"])((function(){return e.value}),(function(){var t=oc()(e.value).toHsl(),n=0===t.s?e.hue:t.h;0!==n&&n-o.value>0&&(c.value="right"),0!==n&&n-o.value<0&&(c.value="left"),o.value=n}));var l=Object(h["ref"])(),i=function(e){if(e.preventDefault(),l.value){var t,o,c=l.value.clientWidth,r=l.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-r;i<0?t=0:i>c?t=360:(o=100*i/c,t=360*o/100),a.value.h!==t&&n("colorChange",{h:t,l:a.value.l,s:a.value.s,a:a.value.a})}},u=function e(){window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",e)},d=function(e){i(e),window.addEventListener("mousemove",i),window.addEventListener("mouseup",u)};return Object(h["onUnmounted"])(u),{hueRef:l,handleMouseDown:d,pointerLeft:r}}});n("dc91");Dv.render=Mv,Dv.__scopeId="data-v-0cb6d507";var Av=Dv,Pv=Object(h["withScopeId"])("data-v-792755a0");Object(h["pushScopeId"])("data-v-792755a0");var Rv=Object(h["createVNode"])("div",{class:"saturation-white"},null,-1),Fv=Object(h["createVNode"])("div",{class:"saturation-black"},null,-1),zv=Object(h["createVNode"])("div",{class:"saturation-circle"},null,-1);Object(h["popScopeId"])();var Hv=Pv((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",{class:"saturation",ref:"saturationRef",style:{background:e.bgColor},onMousedown:t[1]||(t[1]=function(t){return e.handleMouseDown(t)})},[Rv,Fv,Object(h["createVNode"])("div",{class:"saturation-pointer",style:{top:e.pointerTop,left:e.pointerLeft}},[zv],4)],36)})),Uv=n("f678"),Gv=n.n(Uv),qv=Object(h["defineComponent"])({name:"saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},setup:function(e,t){var n=t.emit,o=Object(h["computed"])((function(){var t=oc()(e.value).toHsv();return 0===t.s&&(t.h=e.hue),t})),c=Object(h["computed"])((function(){return"hsl(".concat(o.value.h,", 100%, 50%)")})),a=Object(h["computed"])((function(){return-100*o.value.v+1+100+"%"})),r=Object(h["computed"])((function(){return 100*o.value.s+"%"})),l=Ie()((function(e){n("colorChange",e)}),20,{leading:!0,trailing:!1}),i=Object(h["ref"])(),u=function(e){if(e.preventDefault(),i.value){var t=i.value.clientWidth,n=i.value.clientHeight,c=i.value.getBoundingClientRect().left+window.pageXOffset,a=i.value.getBoundingClientRect().top+window.pageYOffset,r=Gv()(e.pageX-c,0,t),u=Gv()(e.pageY-a,0,n),d=r/t,s=Gv()(-u/n+1,0,1);l({h:o.value.h,s:d,v:s,a:o.value.a})}},d=function e(){window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",e)},s=function(e){u(e),window.addEventListener("mousemove",u),window.addEventListener("mouseup",d)};return Object(h["onUnmounted"])(d),{saturationRef:i,bgColor:c,handleMouseDown:s,pointerTop:a,pointerLeft:r}}});n("97cd");qv.render=Hv,qv.__scopeId="data-v-792755a0";var Wv=qv,Xv=Object(h["withScopeId"])("data-v-67f94aae");Object(h["pushScopeId"])("data-v-67f94aae");var Yv={class:"editable-input"};Object(h["popScopeId"])();var Zv=Xv((function(e,t,n,o,c,a){return Object(h["openBlock"])(),Object(h["createBlock"])("div",Yv,[Object(h["createVNode"])("input",{class:"input-content",value:e.val,onInput:t[1]||(t[1]=function(t){return e.handleInput(t)})},null,40,["value"])])})),Jv=Object(h["defineComponent"])({name:"editable-input",props:{value:{type:Object,required:!0}},setup:function(e,t){var n=t.emit,o=Object(h["computed"])((function(){var t="";return t=e.value.a<1?oc()(e.value).toHex8String().toUpperCase():oc()(e.value).toHexString().toUpperCase(),t.replace("#","")})),c=function(e){var t=e.target.value;t.length>=6&&n("colorChange",oc()(t).toRgb())};return{val:o,handleInput:c}}});n("a73d");Jv.render=Zv,Jv.__scopeId="data-v-67f94aae";var Kv=Jv,$v=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],Qv=function(e,t,n){for(var o=oc()(e).toRgb(),c=oc()(t).toRgb(),a=(c.r-o.r)/n,r=(c.g-o.g)/n,l=(c.b-o.b)/n,i=[],u=0;u<n;u++){var d=oc()({r:o.r+a*u,g:o.g+r*u,b:o.b+l*u}).toRgbString();i.push(d)}return i},eO=function(){var e,t=[],n=Object(ge["a"])($v);try{for(n.s();!(e=n.n()).done;){var o=e.value;t.push(Qv(o[1],o[0],5))}}catch(cO){n.e(cO)}finally{n.f()}return t},tO=Object(h["defineComponent"])({name:"color-picker",components:{Alpha:wv,Checkboard:Tv,Hue:Av,Saturation:Wv,EditableInput:Kv},props:{modelValue:{type:String,default:"#e86b99"}},setup:function(e,t){var n=t.emit,o=Object(h["ref"])(0),c=Object(h["computed"])({get:function(){return oc()(e.modelValue).toRgb()},set:function(e){var t="rgba(".concat([e.r,e.g,e.b,e.a].join(","),")");n("update:modelValue",t)}}),a=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],r=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],l=eO(),i=Object(h["computed"])((function(){return"rgba(".concat([c.value.r,c.value.g,c.value.b,c.value.a].join(","),")")})),u=function(e){n("update:modelValue",e)},d=function(e){"h"in e?(o.value=e.h,c.value=oc()(e).toRgb()):c.value=e};return{themeColors:a,standardColors:r,presetColors:l,color:c,hue:o,currentColor:i,changeColor:d,selectPresetColor:u}}});n("037d");tO.render=Ov,tO.__scopeId="data-v-dc0cf132";var nO=tO,oO=Object(h["createApp"])(Cp);oO.component("InputNumber",O["a"]),oO.component("Divider",v["a"]),oO.component("Button",m["a"]),oO.component("ButtonGroup",m["a"].Group),oO.component("Tooltip",b["a"]),oO.component("Popover",p["a"]),oO.component("Slider",f["a"]),oO.component("Select",s["a"]),oO.component("SelectOption",s["a"].Option),oO.component("SelectOptGroup",s["a"].OptGroup),oO.component("Switch",d["a"]),oO.component("Radio",u["a"]),oO.component("RadioGroup",u["a"].Group),oO.component("RadioButton",u["a"].Button),oO.component("Input",i["a"]),oO.component("InputGroup",i["a"].Group),oO.component("Modal",l["a"]),oO.component("Dropdown",r["a"]),oO.component("Menu",a["a"]),oO.component("MenuItem",a["a"].Item),oO.component("Checkbox",c["a"]),oO.component("Drawer",o["a"]),oO.directive("contextmenu",Gp),oO.directive("click-outside",Yp),oO.use(zm),oO.component("FileInput",qm),oO.component("SvgWrapper",Zm),oO.component("CheckboxButton",Qm),oO.component("CheckboxButtonGroup",cv),oO.component("ColorPicker",nO),oO.use(W,q),oO.mount("#app")},ce32:function(e,t,n){},ce7f:function(e,t,n){},d1ba:function(e,t,n){"use strict";n("77af")},d2b6:function(e,t,n){},d572:function(e,t,n){},d85b:function(e,t,n){"use strict";n("c808")},da1a:function(e,t,n){},da1a7:function(e,t,n){"use strict";n("2056")},dac3:function(e,t,n){},dc91:function(e,t,n){"use strict";n("d2b6")},dda4:function(e,t,n){},e1ba:function(e,t,n){"use strict";n("69d7")},e344:function(e,t,n){"use strict";n("ce32")},e407:function(e,t,n){"use strict";n("379a")},e562:function(e,t,n){},eb34:function(e,t,n){},ebcd:function(e,t,n){},ec3f:function(e,t,n){},f3c8:function(e,t,n){},fb1d:function(e,t,n){"use strict";n("d572")},fba1:function(e,t,n){"use strict";n("ca67")},ff3e:function(e,t,n){"use strict";n("9cc3")}});
|
||
//# sourceMappingURL=app.279afd3b.js.map
|