PPTist/js/app.9ac938f1.js

2 lines
603 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(e){function t(t){for(var o,a,r=t[0],i=t[1],s=t[2],u=0,b=[];u<r.length;u++)a=r[u],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&b.push(n[a][0]),n[a]=0;for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);d&&d(t);while(b.length)b.shift()();return c.push.apply(c,s||[]),l()}function l(){for(var e,t=0;t<c.length;t++){for(var l=c[t],o=!0,r=1;r<l.length;r++){var i=l[r];0!==n[i]&&(o=!1)}o&&(c.splice(t--,1),e=a(a.s=l[0]))}return e}var o={},n={app:0},c=[];function a(t){if(o[t])return o[t].exports;var l=o[t]={i:t,l:!1,exports:{}};return e[t].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=e,a.c=o,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(l,o,function(t){return e[t]}.bind(null,o));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],i=r.push.bind(r);r.push=t,r=r.slice();for(var s=0;s<r.length;s++)t(r[s]);var d=i;c.push([1,"chunk-vendors"]),l()})({0:function(e,t){},"0073":function(e,t,l){},"01bc":function(e,t,l){},"0239":function(e,t,l){"use strict";l("b881")},"024f":function(e,t,l){},"02bd":function(e,t,l){"use strict";l("2956")},"02ca":function(e,t,l){"use strict";l("28c1")},"0491":function(e,t,l){"use strict";l("729c")},"0516":function(e,t,l){"use strict";l("b854")},"0585":function(e,t,l){},"084d":function(e,t,l){},"0be5":function(e,t,l){"use strict";l("5c62")},"0e5d":function(e,t,l){},"0f64":function(e,t,l){"use strict";l("17bf")},"0f92":function(e,t,l){},1:function(e,t,l){e.exports=l("cd49")},1126:function(e,t,l){"use strict";l("72c0")},1222:function(e,t,l){"use strict";l("a8fb")},1247:function(e,t,l){},1441:function(e,t,l){},1485:function(e,t,l){},"14a3":function(e,t,l){},"152b":function(e,t,l){},1549:function(e,t,l){},"154d":function(e,t,l){},"15c3":function(e,t,l){},"179a":function(e,t,l){"use strict";l("cb4f")},"17bf":function(e,t,l){},"180d":function(e,t,l){"use strict";l("2797")},1855:function(e,t,l){"use strict";l("e16b")},1933:function(e,t,l){"use strict";l("3565")},"1a9f":function(e,t,l){},"1ba1":function(e,t,l){"use strict";l("c0d0")},"1bd7":function(e,t,l){},"1bde":function(e,t,l){"use strict";l("0073")},"1c65":function(e,t,l){"use strict";l("446f")},"1ce9":function(e,t,l){},"1ebd":function(e,t,l){"use strict";l("1549")},"1f63":function(e,t,l){},2:function(e,t){},"217f":function(e,t,l){},"22e8":function(e,t,l){},"231f":function(e,t,l){},2460:function(e,t,l){"use strict";l("ccb8")},"24bc":function(e,t,l){"use strict";l("77cb")},2797:function(e,t,l){},2803:function(e,t,l){"use strict";l("ea69")},"28c1":function(e,t,l){},"28eb":function(e,t,l){"use strict";l("cd4f")},2956:function(e,t,l){},"295a":function(e,t,l){},"2a2b":function(e,t,l){},"2b33":function(e,t,l){},"2c0d":function(e,t,l){},"2d86":function(e,t,l){"use strict";l("c756")},"2e8e":function(e,t,l){},3:function(e,t){},3010:function(e,t,l){"use strict";l("d2a4")},"307a":function(e,t,l){"use strict";l("d1ee")},3328:function(e,t,l){"use strict";l("9ce5")},"335c":function(e,t,l){"use strict";l("1a9f")},"34f1":function(e,t,l){"use strict";l("e739")},3565:function(e,t,l){},"35ec":function(e,t,l){},3696:function(e,t,l){"use strict";l("35ec")},"36ac":function(e,t,l){},3836:function(e,t,l){"use strict";l("77f0")},3929:function(e,t,l){"use strict";l("9f9d")},"3b6a":function(e,t,l){},"3c08":function(e,t,l){},"3c3b":function(e,t,l){},"3f3b":function(e,t,l){"use strict";l("0f92")},4278:function(e,t,l){},"444c":function(e,t,l){},"446f":function(e,t,l){},4591:function(e,t,l){},"45c1":function(e,t,l){},"45c15":function(e,t,l){"use strict";l("b614")},4672:function(e,t,l){},4675:function(e,t,l){"use strict";l("af80")},"46fe":function(e,t,l){"use strict";l("4591")},4731:function(e,t,l){"use strict";l("231f")},4764:function(e,t,l){"use strict";l("b2e0")},"48ac":function(e,t,l){},"4a2e":function(e,t,l){"use strict";l("1ce9")},"4b9a":function(e,t,l){"use strict";l("fa09")},"4c0e":function(e,t,l){"use strict";l("3c08")},"4f60":function(e,t,l){"use strict";l("295a")},"4f8b":function(e,t,l){"use strict";l("dcba")},"501a":function(e,t,l){},5140:function(e,t,l){"use strict";l("2a2b")},"51eb":function(e,t,l){},"51f9":function(e,t,l){},5314:function(e,t,l){},"553d":function(e,t,l){},5634:function(e,t,l){"use strict";l("96aa")},5688:function(e,t,l){"use strict";l("2b33")},"573c":function(e,t,l){"use strict";l("0e5d")},"58de":function(e,t,l){"use strict";l("c9ec")},"58e2":function(e,t,l){},"58eb":function(e,t,l){"use strict";l("6b80")},5952:function(e,t,l){},5970:function(e,t,l){"use strict";l("553d")},5977:function(e,t,l){"use strict";l("d2a1")},"5a58":function(e,t,l){"use strict";l("48ac")},"5c62":function(e,t,l){},"5c9a":function(e,t,l){},"5d4b":function(e,t,l){"use strict";l("501a")},"5ed8":function(e,t,l){},"5fa4":function(e,t,l){"use strict";l("01bc")},"601c":function(e,t,l){"use strict";l("ec31")},"60d3":function(e,t,l){},6116:function(e,t,l){"use strict";l("eae7")},"614e":function(e,t,l){"use strict";l("51f9")},"63e4":function(e,t,l){},6429:function(e,t,l){},6520:function(e,t,l){},"679c":function(e,t,l){"use strict";l("92d1")},"68b8":function(e,t,l){"use strict";l("abab")},"68bd":function(e,t,l){},"6a9f":function(e,t,l){},"6b65":function(e,t,l){},"6b80":function(e,t,l){},"6e11":function(e,t,l){"use strict";l("15c3")},"722f":function(e,t,l){},7239:function(e,t,l){"use strict";l("b676")},"729c":function(e,t,l){},"72c0":function(e,t,l){},7434:function(e,t,l){},"74ba":function(e,t,l){},"75e6":function(e,t,l){"use strict";l("60d3")},"76c1":function(e,t,l){"use strict";l("444c")},"77cb":function(e,t,l){},"77f0":function(e,t,l){},7832:function(e,t,l){"use strict";l("82df")},7851:function(e,t,l){"use strict";l("6520")},7958:function(e,t,l){"use strict";l("eba5")},"795e":function(e,t,l){"use strict";l("722f")},"7a60":function(e,t,l){"use strict";l("be2d")},"7a78":function(e,t,l){"use strict";l("4672")},"7aed":function(e,t,l){"use strict";l("bb78")},"80dc":function(e,t,l){"use strict";l("e611")},8216:function(e,t,l){"use strict";l("eb5e")},"82df":function(e,t,l){},8628:function(e,t,l){"use strict";l("3b6a")},8683:function(e,t,l){"use strict";l("d422")},"876e":function(e,t,l){},"889b":function(e,t,l){},"8bc3":function(e,t,l){},"8c56":function(e,t,l){},"8c61":function(e,t,l){"use strict";l("d739")},"8cab":function(e,t,l){},"92d1":function(e,t,l){},9300:function(e,t,l){"use strict";l("b8f7")},9557:function(e,t,l){"use strict";l("154d")},9670:function(e,t,l){"use strict";l("58e2")},"96aa":function(e,t,l){},"97ba":function(e,t,l){},9854:function(e,t,l){"use strict";l("d594")},"990c":function(e,t,l){"use strict";l("5314")},"9b4d":function(e,t,l){"use strict";l("14a3")},"9ce5":function(e,t,l){},"9f9d":function(e,t,l){},a060:function(e,t,l){"use strict";l("68bd")},a320:function(e,t,l){"use strict";l("1247")},a330:function(e,t,l){"use strict";l("eea7")},a511:function(e,t,l){"use strict";l("4278")},a669:function(e,t,l){"use strict";l("152b")},a81a:function(e,t,l){"use strict";l("024f")},a832:function(e,t,l){},a8d7:function(e,t,l){"use strict";l("217f")},a8fb:function(e,t,l){},a9b0:function(e,t,l){"use strict";l("ca3e")},ab80:function(e,t,l){},abab:function(e,t,l){},ae3f:function(e,t,l){},ae9f:function(e,t,l){"use strict";l("c6f0")},af80:function(e,t,l){},b096:function(e,t,l){"use strict";l("51eb")},b2e0:function(e,t,l){},b3b9:function(e,t,l){},b510:function(e,t,l){"use strict";l("6429")},b614:function(e,t,l){},b676:function(e,t,l){},b854:function(e,t,l){},b881:function(e,t,l){},b897:function(e,t,l){"use strict";l("d73b")},b8f7:function(e,t,l){},bb78:function(e,t,l){},bc8c:function(e,t,l){"use strict";l("876e")},bcf0:function(e,t,l){"use strict";l("f191")},bde5:function(e,t,l){"use strict";l("74ba")},be01:function(e,t,l){"use strict";l("22e8")},be2d:function(e,t,l){},bee0:function(e,t,l){"use strict";l("1485")},bf43:function(e,t,l){"use strict";l("6a9f")},c031:function(e,t,l){},c041:function(e,t,l){"use strict";l("2e8e")},c0d0:function(e,t,l){},c24c9:function(e,t,l){"use strict";l("b3b9")},c6f0:function(e,t,l){},c756:function(e,t,l){},c860:function(e,t,l){},c9ec:function(e,t,l){},ca17:function(e,t,l){"use strict";l("2c0d")},ca3c:function(e,t,l){"use strict";l("63e4")},ca3e:function(e,t,l){},cb45:function(e,t,l){"use strict";l("5ed8")},cb4f:function(e,t,l){},cc39:function(e,t,l){"use strict";l("c031")},cc76:function(e,t,l){"use strict";l("1f63")},ccb8:function(e,t,l){},cd49:function(e,t,l){"use strict";l.r(t);l("7f6b");var o,n=l("8592"),c=(l("6d2a"),l("9571")),a=(l("ee00"),l("bb76")),r=(l("fbd8"),l("55f1")),i=(l("9d5c"),l("a600")),s=(l("cd17"),l("ed3b")),d=(l("5704"),l("b558")),u=(l("5783"),l("59a5")),b=(l("fbd6"),l("160c")),p=(l("2ef0f"),l("9839")),m=(l("438c"),l("fbdf")),O=(l("5136"),l("681b")),f=(l("9a33"),l("f933")),j=(l("6ba6"),l("5efb")),v=(l("55ec"),l("a79d")),h=(l("922d"),l("09d9")),y=l("7a23"),g=l("be92"),x=l("e1bd");(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(o||(o={}));const k=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],C=[{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}];var N=l("442c");const E=e=>{const{empty:t}=e.state.selection;t&&Object(N["d"])(e.state,e.dispatch)},w=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:o}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,o.pos,t))}},V=(e,t,l,o)=>{let n=t;const c=e=>e.type===o;let a=null,r=null,i=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(c);if(!l)return null;if(a&&l!==a)return null;r=r||t,a=a||l,i=t,n++}let s=t,d=l,u=0;n=t-1;while(n>u){const t=e.nodeAt(n),l=t&&t.marks.find(c);if(!l||l!==a)break;s=n,r=t,n--}n=l+1,u=e.nodeSize-2;while(n<u){const t=e.nodeAt(n),l=t&&t.marks.find(c);if(!l||l!==a)break;d=n,i=t,n++}return{mark:a,from:{node:r,pos:s},to:{node:i,pos:d}}},I=(e,t)=>Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,S=(e,t)=>{for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:o}}},B=e=>t=>S(t.$from,e),L=e=>t=>B(t=>I(e,t))(t),_=(e,t)=>{const l=t.schema.nodes[e];return!!L(l)(t.selection)},T=e=>{var t,l;const{selection:o,doc:n}=e.state,{from:c}=o;let a=n.nodeAt(c)||n.nodeAt(c-1);return null!==(t=a)&&void 0!==t&&t.lastChild&&(a=a.lastChild),(null===(l=a)||void 0===l?void 0:l.marks)||[]},M=(e,t,l)=>{for(const o of e)if(o.type.name===t&&o.attrs[l])return o.attrs[l];return null},D=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},z=(e,t)=>{const{from:l,$from:o,to:n,empty:c}=e.selection;return c?t.isInSet(e.storedMarks||o.marks()):e.doc.rangeHasMark(l,n,t)},A=(e,t)=>{const{selection:l,doc:o}=e.state,{from:n,to:c}=l;let a=!0,r="";return o.nodesBetween(n,c,e=>(a&&e.attrs[t]&&(a=!1,r=e.attrs[t]),a)),r},F={color:"#000",backcolor:"#000",fontsize:"20px",fontname:"微软雅黑",align:"left"},$=(e,t={})=>{t={...F,...t};const l=T(e),o=D(l,"strong"),n=D(l,"em"),c=D(l,"underline"),a=D(l,"strikethrough"),r=D(l,"superscript"),i=D(l,"subscript"),s=D(l,"code"),d=M(l,"forecolor","color")||t.color,u=M(l,"backcolor","backcolor")||t.backcolor,b=M(l,"fontsize","fontsize")||t.fontsize,p=M(l,"fontname","fontname")||t.fontname,m=M(l,"link","href")||"",O=A(e,"align")||t.align,f=_("bullet_list",e.state),j=_("ordered_list",e.state),v=_("blockquote",e.state);return{bold:o,em:n,underline:c,strikethrough:a,superscript:r,subscript:i,code:s,color:d,backcolor:u,fontsize:b,fontname:p,link:m,align:O,bulletList:f,orderedList:j,blockquote:v}},R=e=>{const t=T(e),l=M(t,"fontsize","fontsize")||F.fontsize;return parseInt(l)},P={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"#000",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},H=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,o=100,n=100,c="a",a=document.createElement("canvas"),r=a.getContext("2d");if(!r)return!1;a.width=o,a.height=n,r.textAlign="center",r.fillStyle="black",r.textBaseline="middle";const i=e=>{r.clearRect(0,0,o,n),r.font=`${l}px ${e}, ${t}`,r.fillText(c,o/2,n/2);const a=r.getImageData(0,0,o,n).data;return[].slice.call(a).filter(e=>0!==e)};return i(t).join("")!==i(e).join("")};l("5b81");var q=l("66cb"),U=l.n(q),G=l("2ef0");const X=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"<p><strong><span style='font-size: 112px'>PPTIST</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>基于 Vue 3.x + TypeScript 的在线演示文稿应用</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],Y={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},Z=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"<p style=''><strong><span style='font-size: 80px'>输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>请在此处输入副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='font-size: 80px'>01</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"<p style=''><strong><span style='font-size: 40px'>在此处输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"<ol><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li></ol>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'><span style='font-size: 60px'>01</span></span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"<p style=''><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>3.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>4.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 40px'>请在此处输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容1</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容2</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容3</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容4</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>5</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>6</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],W=Object(g["b"])("slides",{state:()=>({theme:Y,slides:X,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(null===t||void 0===t||!t.animations)return[];const l=t.elements,o=l.map(e=>e.id);return t.animations.filter(e=>o.includes(e.elId))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(null===t||void 0===t||!t.animations)return[];const l=t.elements,o=l.map(e=>e.id),n=t.animations.filter(e=>o.includes(e.elId)),c=[];for(const a of n)if("click"!==a.trigger&&c.length){if("meantime"===a.trigger){const e=c[c.length-1];e.animations=e.animations.filter(e=>e.elId!==a.elId),e.animations.push(a),c[c.length-1]=e}else if("auto"===a.trigger){const e=c[c.length-1];e.autoNext=!0,c[c.length-1]=e,c.push({animations:[a],autoNext:!1})}}else c.push({animations:[a],autoNext:!1});return c},layouts(e){const{themeColor:t,fontColor:l,fontName:o,backgroundColor:n}=e.theme,c=U()(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",a=JSON.stringify(Z).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",o).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",c);return JSON.parse(a)}},actions:{setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let c=0;c<t.length;c++){const e=this.slides.findIndex(e=>e.id===t[c]);l.push(e)}let o=Math.min(...l);const n=this.slides.length-t.length-1;o>n&&(o=n),this.slideIndex=o,this.slides=this.slides.filter(e=>!t.includes(e.id))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,o=[...l,...t];this.slides[this.slideIndex].elements=o},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,o=l.filter(e=>!t.includes(e.id));this.slides[this.slideIndex].elements=o},updateElement(e){const{id:t,props:l}=e,o="string"===typeof t?[t]:t,n=this.slideIndex,c=this.slides[n],a=c.elements.map(e=>o.includes(e.id)?{...e,...l}:e);this.slides[n].elements=a},removeElementProps(e){const{id:t,propName:l}=e,o="string"===typeof l?[l]:l,n=this.slideIndex,c=this.slides[n],a=c.elements.map(e=>e.id===t?Object(G["omit"])(e,o):e);this.slides[n].elements=a}}}),J=Object(x["a"])("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),K=J(10),Q=Object(g["b"])("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,availableFonts:k,toolbarState:o.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:P,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:K}),getters:{activeElementList(e){const t=W(),l=t.currentSlide;return l&&l.elements?l.elements.filter(t=>e.activeElementIdList.includes(t.id)):[]},handleElement(e){const t=W(),l=t.currentSlide;return l&&l.elements&&l.elements.find(t=>e.handleElementId===t.id)||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setAvailableFonts(){this.availableFonts=k.filter(e=>H(e.value))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e}}});var ee=l("fc11"),te=l("4dec");const le="PPTIST_DISCARDED_DB",oe="PPTist",ne=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(le),l=t?JSON.parse(t):[],o=await te["a"].getDatabaseNames(),n=o.filter(t=>{if(-1===t.indexOf(oe))return!1;const[o,n,c]=t.split("_");return o!==oe||!n||!c||(!!l.includes(n)||e-+c>=432e5)});for(const c of n)te["a"].delete(c);localStorage.removeItem(le)};class ce extends te["a"]{constructor(){super(`${oe}_${K}_${(new Date).getTime()}`),Object(ee["a"])(this,"snapshots",void 0),this.version(1).stores({snapshots:"++id"}),this.snapshots=this.table("snapshots")}}const ae=new ce,re=Object(g["b"])("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){const e=W();await ne();const t={index:e.slideIndex,slides:e.slides};await ae.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=W(),t=await ae.snapshots.orderBy("id").keys();let l=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(l=t.slice(this.snapshotCursor+1));const o={index:e.slideIndex,slides:e.slides};await ae.snapshots.add(o);let n=t.length-l.length+1;const c=20;n>c&&(l.push(t[0]),n--),n>=2&&ae.snapshots.update(t[n-2],{index:e.slideIndex}),await ae.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=W(),t=Q(),l=this.snapshotCursor-1,o=await ae.snapshots.orderBy("id").toArray(),n=o[l],{index:c,slides:a}=n,r=c>a.length-1?a.length-1:c;e.setSlides(a),e.updateSlideIndex(r),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=W(),t=Q(),l=this.snapshotCursor+1,o=await ae.snapshots.orderBy("id").toArray(),n=o[l],{index:c,slides:a}=n,r=c>a.length-1?a.length-1:c;e.setSlides(a),e.updateSlideIndex(r),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),ie=Object(g["b"])("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),se=Object(g["b"])("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),de=(e,t)=>Object(G["padStart"])(""+e,t,"0"),ue=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var be,pe,me,Oe,fe,je;(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(be||(be={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(pe||(pe={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(me||(me={})),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"}(Oe||(Oe={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(fe||(fe={})),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["P"]="P",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",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(je||(je={}));const ve=[{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 / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"},{label:"调整画笔笔触大小",value:"鼠标滚轮"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{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:"Tab"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"删除线",value:"Ctrl + D"}]}];l("3b18");var he=l("f64c"),ye=l("b311"),ge=l.n(ye),xe=l("3452"),ke=l.n(xe);const Ce="pptist",Ne=e=>ke.a.AES.encrypt(e,Ce).toString(),Ee=e=>{const t=ke.a.AES.decrypt(e,Ce);return t.toString(ke.a.enc.Utf8)},we=e=>new Promise((t,l)=>{const o=document.createElement("button"),n=new ge.a(o,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",e=>{n.destroy(),t(e)}),n.on("error",e=>{n.destroy(),l(e)}),document.body.appendChild(o),o.click(),document.body.removeChild(o)}),Ve=()=>new Promise((e,t)=>{var l;null!==(l=navigator.clipboard)&&void 0!==l&&l.readText?navigator.clipboard.readText().then(l=>(l||t("剪贴板为空或者不包含文本"),e(l))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),Ie=e=>{let t;try{t=JSON.parse(Ee(e))}catch{t=e}return t},Se=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const o=[];for(const n in t){if(o[n]=t[n].split("\t"),1===o[n].length)return null;if(-1===l)l=o[n].length;else if(l!==o[n].length)return null}return o},Be=e=>{const{left:t,top:l,width:o,height:n,rotate:c=0}=e,a=Math.sqrt(Math.pow(o,2)+Math.pow(n,2))/2,r=180*Math.atan(n/o)/Math.PI,i=(180-c-r)*Math.PI/180,s=(r-c)*Math.PI/180,d=t+o/2,u=l+n/2,b=[d+a*Math.cos(i),d+a*Math.cos(s),d-a*Math.cos(i),d-a*Math.cos(s)],p=[u-a*Math.sin(i),u-a*Math.sin(s),u+a*Math.sin(i),u+a*Math.sin(s)];return{xRange:[Math.min(...b),Math.max(...b)],yRange:[Math.min(...p),Math.max(...p)]}},Le=e=>{const{xRange:t,yRange:l}=Be({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:o,yRange:n}=Be({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:o[0]-t[0],offsetY:n[0]-l[0]}},_e=e=>{let t,l,o,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),o=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:c,top:a,width:r,height:i,rotate:s}=e,{xRange:d,yRange:u}=Be({left:c,top:a,width:r,height:i,rotate:s});t=d[0],l=d[1],o=u[0],n=u[1]}else t=e.left,l=e.left+e.width,o=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:o,maxY:n}},Te=e=>{const t=[],l=[],o=[],n=[];e.forEach(e=>{const{minX:c,maxX:a,minY:r,maxY:i}=_e(e);t.push(c),l.push(r),o.push(a),n.push(i)});const c=Math.min(...t),a=Math.max(...o),r=Math.min(...l),i=Math.max(...n);return{minX:c,maxX:a,minY:r,maxY:i}},Me=e=>{const t=[];return e.forEach(e=>{const l=t.findIndex(t=>t.value===e.value);if(-1===l)t.push(e);else{const o=t[l],n=Math.min(o.range[0],e.range[0]),c=Math.max(o.range[1],e.range[1]),a=[n,c],r={value:e.value,range:a};t[l]=r}}),t},De=e=>{const t={};for(const l of e)t[l.id]=Object(x["b"])(10);return t},ze=e=>{const t={},l={};for(const o of e){const e=o.groupId;e&&!t[e]&&(t[e]=Object(x["b"])(10)),l[o.id]=Object(x["b"])(10)}return{groupIdMap:t,elIdMap:l}},Ae=e=>{const t=U()(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Fe=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const o=e.broken.join(",");return`M${t} L${o} L${l}`}if(e.curve){const o=e.curve.join(",");return`M${t} Q${o} ${l}`}if(e.cubic){const[o,n]=e.cubic,c=o.join(","),a=n.join(",");return`M${t} C${c} ${a} ${l}`}return`M${t} L${l}`},$e=e=>{const t=e.replace(/[\n\r]+/g,"<br>"),l=t.split("<br>");let o="";for(const n of l)n&&(o+=`<div>${n}</div>`);return o},Re=e=>new Promise(t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,o=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:o})},l.onerror=()=>{l.onload=null,l.onerror=null}}),Pe=e=>new Promise(t=>{const l=new FileReader;l.addEventListener("load",()=>{t(l.result)}),l.readAsDataURL(e)}),He=1e3;var qe,Ue;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(qe||(qe={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(Ue||(Ue={}));const Ge={[qe.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M ${o} 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t-o} Q ${e} ${t} ${e-o} ${t} L ${o} ${t} Q 0 ${t} 0 ${t-o} L 0 ${o} Q 0 0 ${o} 0 Z`}},[qe.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 ${t-o} L 0 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} L ${o} ${t} Z`}},[qe.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} Z`}},[qe.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 ${o} L ${o} 0 L ${e-o} 0 L ${e} ${o} L ${e} ${t} L 0 ${t} Z`}},[qe.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t} L ${o} ${t} Q 0 ${t} 0 ${t-o} L 0 0 Z`}},[qe.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[qe.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 ${o} Q 0 0 ${o} 0 L ${e-o} 0 Q ${e} 0 ${e} ${o} L ${e} ${t} L 0 ${t} Z`}},[qe.MESSAGE]:{formula:(e,t)=>{const l=.2*e,o=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-o} L ${e/2} ${t-o} L ${e/2-l} ${t} L ${e/2-l} ${t-o} L 0 ${t-o} Z`}},[qe.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),o=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-o} ${t} L ${e/2-o} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[qe.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-o} L ${o} ${t-o} L ${o} 0 Z`}},[qe.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${o} ${o} L ${o} ${t-o} L ${e-o} ${t-o} L ${e-o} ${o} Z`}},[qe.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const o=Math.min(e,t)*l;return`M ${e/2-o/2} 0 L ${e/2-o/2} ${t/2-o/2} L 0 ${t/2-o/2} L 0 ${t/2+o/2} L ${e/2-o/2} ${t/2+o/2} L ${e/2-o/2} ${t} L ${e/2+o/2} ${t} L ${e/2+o/2} ${t/2+o/2} L ${e} ${t/2+o/2} L ${e} ${t/2-o/2} L ${e/2+o/2} ${t/2-o/2} L ${e/2+o/2} 0 Z`}},[qe.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const o=e*l;return`M ${o} 0 L 0 ${t} L ${e} ${t} Z`}},[qe.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const o=e*l;return`M ${o} 0 L ${e} 0 L ${e-o} ${t} L 0 ${t} Z`}},[qe.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const o=e*l;return`M 0 0 L ${e-o} 0 L ${e} ${t} L ${o} ${t} Z`}},[qe.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const o=e*l;return`M ${o} 0 L ${e-o} 0 L ${e} ${t} L 0 ${t} Z`}},[qe.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const o=t*l;return`M ${e/2} 0 L 0 ${o} L 0 ${t} L ${e} ${t} L ${e} ${o} Z`}},[qe.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const o=e*l;return`M ${e} ${t/2} L ${e-o} 0 L 0 0 L ${o} ${t/2} L 0 ${t} L ${e-o} ${t} Z`}}},Xe=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:qe.ROUND_RECT},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:qe.CUT_RECT_DIAGONAL},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:qe.CUT_RECT_SINGLE},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:qe.CUT_RECT_SAMESIDE},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 50 200 Q 0 200 0 150 L 0 0 Z",pathFormula:qe.ROUND_RECT_DIAGONAL},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:qe.ROUND_RECT_SINGLE},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:qe.ROUND_RECT_SAMESIDE}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:qe.TRIANGLE},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:qe.PARALLELOGRAM_LEFT},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:qe.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:qe.TRAPEZOID},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:qe.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:qe.INDICATOR},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z"},{viewBox:[200,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,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,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,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,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,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,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,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,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:qe.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:qe.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,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",pathFormula:qe.PLUS},{viewBox:[200,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,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:qe.MESSAGE},{viewBox:[200,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",pathFormula:qe.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"}]},{type:"箭头",children:[{viewBox:[200,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,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,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,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,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,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,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,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,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,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,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,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,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,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,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,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",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0}]}],Ye={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var Ze=()=>{const e=re(),t=Object(G["debounce"])((function(){e.addSnapshot()}),300,{trailing:!0}),l=Object(G["throttle"])((function(){e.reDo()}),100,{leading:!0,trailing:!1}),o=Object(G["throttle"])((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:o}},We=()=>{const e=Q(),t=W(),{creatingElement:l}=Object(g["c"])(e),{theme:o,viewportRatio:n}=Object(g["c"])(t),{addHistorySnapshot:c}=Ze(),a=(o,n)=>{t.addElement(o),e.setActiveElementIdList([o.id]),l.value&&e.setCreatingElement(null),setTimeout(()=>{e.setEditorareaFocus(!0)},0),n&&n(),c()},r=e=>{Re(e).then(({width:t,height:l})=>{const o=l/t;o<n.value&&t>He?(t=He,l=t*o):l>He*n.value&&(l=He*n.value,t=l/o),a({type:"image",id:Object(x["b"])(10),src:e,width:t,height:l,left:(He-t)/2,top:(He*n.value-l)/2,fixedRatio:!0,rotate:0})})},i=e=>{const t={type:"chart",id:Object(x["b"])(10),chartType:Ye[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[o.value.themeColor],gridColor:o.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}};let l={};"horizontalBar"===e?l={horizontalBars:!0}:"area"===e?l={showArea:!0}:"scatter"===e?l={showLine:!1}:"ring"===e&&(l={donut:!0}),a({...t,options:l})},s=(e,t)=>{const l={fontname:o.value.fontName,color:o.value.fontColor},c=[];for(let o=0;o<e;o++){const e=[];for(let o=0;o<t;o++)e.push({id:Object(x["b"])(10),colspan:1,rowspan:1,text:"",style:l});c.push(e)}const r=100,i=36,s=new Array(t).fill(1/t),d=t*r,u=e*i;a({type:"table",id:Object(x["b"])(10),width:d,height:u,colWidths:s,rotate:0,data:c,left:(He-d)/2,top:(He*n.value-u)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:o.value.themeColor,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}})},d=(e,t)=>{const{left:l,top:n,width:c,height:r}=e,i=(null===t||void 0===t?void 0:t.content)||"",s=(null===t||void 0===t?void 0:t.vertical)||!1,d=Object(x["b"])(10);a({type:"text",id:d,left:l,top:n,width:c,height:r,content:i,rotate:0,defaultFontName:o.value.fontName,defaultColor:o.value.fontColor,vertical:s},()=>{setTimeout(()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()},0)})},u=(e,t)=>{const{left:l,top:n,width:c,height:r}=e,i={type:"shape",id:Object(x["b"])(10),left:l,top:n,width:c,height:r,viewBox:t.viewBox,path:t.path,fill:o.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(i.special=!0),t.pathFormula){i.pathFormula=t.pathFormula,i.viewBox=[c,r];const e=Ge[t.pathFormula];"editable"in e?(i.path=e.formula(c,r,e.defaultValue),i.keypoint=e.defaultValue):i.path=e.formula(c,r)}a(i)},b=(e,t)=>{const{left:l,top:n,start:c,end:r}=e,i={type:"line",id:Object(x["b"])(10),left:l,top:n,start:c,end:r,points:t.points,color:o.value.themeColor,style:t.style,width:2};t.isBroken&&(i.broken=[(c[0]+r[0])/2,(c[1]+r[1])/2]),t.isCurve&&(i.curve=[(c[0]+r[0])/2,(c[1]+r[1])/2]),t.isCubic&&(i.cubic=[[(c[0]+r[0])/2,(c[1]+r[1])/2],[(c[0]+r[0])/2,(c[1]+r[1])/2]]),a(i)},p=e=>{a({type:"latex",id:Object(x["b"])(10),width:e.w,height:e.h,rotate:0,left:(He-e.w)/2,top:(He*n.value-e.h)/2,path:e.path,latex:e.latex,color:o.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},m=e=>{a({type:"video",id:Object(x["b"])(10),width:500,height:300,rotate:0,left:(He-500)/2,top:(He*n.value-300)/2,src:e})},O=e=>{a({type:"audio",id:Object(x["b"])(10),width:50,height:50,rotate:0,left:(He-50)/2,top:(He*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:o.value.themeColor,src:e})};return{createImageElement:r,createChartElement:i,createTableElement:s,createTextElement:d,createShapeElement:u,createLineElement:b,createLatexElement:p,createVideoElement:m,createAudioElement:O}},Je=()=>{const e=Q(),t=W(),{currentSlide:l}=Object(g["c"])(t),{addHistorySnapshot:o}=Ze(),n=n=>{const{groupIdMap:c,elIdMap:a}=ze(n),r=l.value.elements.map(e=>e.id);for(const e of n){const t=r.includes(e.id);e.id=a[e.id],t&&(e.left=e.left+10,e.top=e.top+10),e.groupId&&(e.groupId=c[e.groupId])}t.addElement(n),e.setActiveElementIdList(Object.values(a)),o()},c=e=>{const l=De(e),n=e.map(e=>{const{groupIdMap:t,elIdMap:o}=ze(e.elements);for(const n of e.elements)n.id=o[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=Object(x["b"])(10),l.elId=o[l.elId];return{...e,id:l[e.id]}});t.addSlide(n),o()};return{addElementsFromData:n,addSlidesFromData:c}},Ke=()=>{const{createTextElement:e}=We(),{addElementsFromData:t,addSlidesFromData:l}=Je(),o=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const c=(null===n||void 0===n?void 0:n.onlySlide)||!1,a=(null===n||void 0===n?void 0:n.onlyElements)||!1,r=Ie(e);if("object"===typeof r){const{type:e,data:o}=r;"elements"!==e||c?"slides"!==e||a||l(o):t(o)}else if(!a&&!c){const e=$e(r);o(e)}};return{pasteTextClipboardData:n}},Qe=()=>{const e=Q(),t=W(),{selectedSlidesIndex:l,activeElementIdList:o}=Object(g["c"])(e),{currentSlide:n,slides:c,theme:a,slideIndex:r}=Object(g["c"])(t),i=Object(y["computed"])(()=>[...l.value,r.value]),s=Object(y["computed"])(()=>c.value.filter((e,t)=>i.value.includes(t))),d=Object(y["computed"])(()=>s.value.map(e=>e.id)),{pasteTextClipboardData:u}=Ke(),{addSlidesFromData:b}=Je(),{addHistorySnapshot:p}=Ze(),m=()=>{const l={id:Object(x["b"])(10),elements:[],background:{type:"solid",color:a.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},O=l=>{l===je.UP&&r.value>0?(o.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(r.value-1)):l===je.DOWN&&r.value<c.value.length-1&&(o.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(r.value+1))},f=()=>{const t=Ne(JSON.stringify({type:"slides",data:s.value}));we(t).then(()=>{e.setThumbnailsFocus(!0)})},j=()=>{Ve().then(e=>{u(e,{onlySlide:!0})}).catch(e=>he["a"].warning(e))},v=()=>{const l={id:Object(x["b"])(10),elements:[],background:{type:"solid",color:a.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),p()},h=l=>{const{groupIdMap:o,elIdMap:n}=ze(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=o[e.groupId]);const c={...l,id:Object(x["b"])(10)};e.setActiveElementIdList([]),t.addSlide(c),p()},k=()=>{const e=JSON.parse(JSON.stringify(n.value));b([e])},C=(l=d.value)=>{c.value.length===l.length?m():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),p()},N=()=>{const e=[...d.value];f(),C(e)},E=()=>{const t=Array.from(Array(c.value.length),(e,t)=>t);e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},w=(e,l)=>{if(l===e)return;const o=JSON.parse(JSON.stringify(c.value)),n=o[l];o.splice(l,1),o.splice(e,0,n),t.setSlides(o),t.updateSlideIndex(e)};return{resetSlides:m,updateSlideIndex:O,copySlide:f,pasteSlide:j,createSlide:v,createSlideByTemplate:h,copyAndPasteSlide:k,deleteSlide:C,cutSlide:N,selectAllSlide:E,sortSlides:w}},et=()=>{const e=Q(),t=W(),{activeElementIdList:l}=Object(g["c"])(e),{currentSlide:o}=Object(g["c"])(t),{addHistorySnapshot:n}=Ze(),c=()=>{const c=JSON.parse(JSON.stringify(o.value.elements));for(const e of c)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:c}),e.setActiveElementIdList([]),n()},a=l=>{const c=JSON.parse(JSON.stringify(o.value.elements));if(l.groupId){const o=[];for(const e of c)e.groupId===l.groupId&&(e.lock=!1,o.push(e.id));t.updateSlide({elements:c}),e.setActiveElementIdList(o)}else{for(const e of c)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:c}),e.setActiveElementIdList([l.id])}n()};return{lockElement:c,unlockElement:a}},tt=()=>{const e=Q(),t=W(),{activeElementIdList:l,activeGroupElementId:o}=Object(g["c"])(e),{currentSlide:n}=Object(g["c"])(t),{addHistorySnapshot:c}=Ze(),a=()=>{if(!l.value.length)return;let a=[];a=o.value?n.value.elements.filter(e=>e.id!==o.value):n.value.elements.filter(e=>!l.value.includes(e.id)),e.setActiveElementIdList([]),t.updateSlide({elements:a}),c()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),c())};return{deleteElement:a,deleteAllElements:r}},lt=()=>{const e=Q(),t=W(),{activeElementIdList:l,activeElementList:o,handleElementId:n}=Object(g["c"])(e),{currentSlide:c}=Object(g["c"])(t),{addHistorySnapshot:a}=Ze(),r=Object(y["computed"])(()=>{if(o.value.length<2)return!1;const e=o.value[0].groupId;if(!e)return!0;const t=o.value.every(t=>(t.groupId&&t.groupId)===e);return!t}),i=()=>{if(!o.value.length)return;let e=JSON.parse(JSON.stringify(c.value.elements));const n=Object(x["b"])(10),r=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,r.push(t));const i=e.findIndex(e=>e.id===r[r.length-1].id),s=r.map(e=>e.id);e=e.filter(e=>!s.includes(e.id));const d=i-r.length+1;e.splice(d,0,...r),t.updateSlide({elements:e}),a()},s=()=>{if(!o.value.length)return;const r=o.value.some(e=>e.groupId);if(!r)return;const i=JSON.parse(JSON.stringify(c.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const s=n.value?[n.value]:[];e.setActiveElementIdList(s),a()};return{canCombine:r,combineElements:i,uncombineElements:s}},ot=()=>{const e=Q(),{activeElementIdList:t,activeElementList:l}=Object(g["c"])(e),{pasteTextClipboardData:o}=Ke(),{deleteElement:n}=tt(),c=()=>{if(!t.value.length)return;const o=Ne(JSON.stringify({type:"elements",data:l.value}));we(o).then(()=>{e.setEditorareaFocus(!0)})},a=()=>{c(),n()},r=()=>{Ve().then(e=>{o(e)}).catch(e=>he["a"].warning(e))},i=()=>{c(),r()};return{copyElement:c,cutElement:a,pasteElement:r,quickCopyElement:i}},nt=()=>{const e=Q(),{currentSlide:t}=Object(g["c"])(W()),l=()=>{const l=t.value.elements.filter(e=>!e.lock),o=l.map(e=>e.id);e.setActiveElementIdList(o)};return{selectAllElement:l}},ct=()=>{const e=W(),{activeElementIdList:t,activeGroupElementId:l}=Object(g["c"])(Q()),{currentSlide:o}=Object(g["c"])(e),{addHistorySnapshot:n}=Ze(),c=(c,a=1)=>{let r=[];const i=e=>{let{left:t,top:l}=e;switch(c){case je.LEFT:t-=a;break;case je.RIGHT:t+=a;break;case je.UP:l-=a;break;case je.DOWN:l+=a;break;default:break}return{...e,left:t,top:l}};r=l.value?o.value.elements.map(e=>l.value===e.id?i(e):e):o.value.elements.map(e=>t.value.includes(e.id)?i(e):e),e.updateSlide({elements:r}),n()};return{moveElement:c}},at=()=>{const e=W(),{currentSlide:t}=Object(g["c"])(e),{addHistorySnapshot:l}=Ze(),o=(e,t)=>({minLevel:e.findIndex(e=>e.id===t[0].id),maxLevel:e.findIndex(e=>e.id===t[t.length-1].id)}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:c,maxLevel:a}=o(e,n);if(a===e.length-1)return;const r=l[a+1],i=l.splice(c,n.length);if(r.groupId){const e=l.filter(e=>e.groupId===r.groupId);l.splice(c+e.length,0,...i)}else l.splice(c+1,0,...i)}else{const o=e.findIndex(e=>e.id===t.id);if(o===e.length-1)return;const n=l[o+1],c=l.splice(o,1)[0];if(n.groupId){const e=l.filter(e=>e.groupId===n.groupId);l.splice(o+e.length,0,c)}else l.splice(o+1,0,c)}return l},c=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:c}=o(e,n);if(0===c)return;const a=l[c-1],r=l.splice(c,n.length);if(a.groupId){const e=l.filter(e=>e.groupId===a.groupId);l.splice(c-e.length,0,...r)}else l.splice(c-1,0,...r)}else{const o=e.findIndex(e=>e.id===t.id);if(0===o)return;const n=l[o-1],c=l.splice(o,1)[0];if(n.groupId){const e=l.filter(e=>e.groupId===n.groupId);l.splice(o-e.length,0,c)}else l.splice(o-1,0,c)}return l},a=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:c,maxLevel:a}=o(e,n);if(a===e.length-1)return null;const r=l.splice(c,n.length);l.push(...r)}else{const o=e.findIndex(e=>e.id===t.id);if(o===e.length-1)return null;l.splice(o,1),l.push(t)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:c}=o(e,n);if(0===c)return;const a=l.splice(c,n.length);l.unshift(...a)}else{const o=e.findIndex(e=>e.id===t.id);if(0===o)return;l.splice(o,1),l.unshift(t)}return l},i=(o,i)=>{let s;i===be.UP?s=n(t.value.elements,o):i===be.DOWN?s=c(t.value.elements,o):i===be.TOP?s=a(t.value.elements,o):i===be.BOTTOM&&(s=r(t.value.elements,o)),s&&(e.updateSlide({elements:s}),l())};return{orderElement:i}};const rt=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},it=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},st=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var dt=()=>{const e=se(),t=W(),l=()=>{rt(),e.setScreening(!0)},o=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),st()&&it()};return{enterScreening:l,enterScreeningFromStart:o,exitScreening:n}},ut=()=>{const e=Q(),{canvasPercentage:t,canvasScale:l,canvasDragged:o}=Object(g["c"])(e),n=Object(y["computed"])(()=>Math.round(100*l.value)+"%"),c=l=>{let o=t.value;const n=5,c=200,a=30;"+"===l&&o<=c&&(o+=n),"-"===l&&o>=a&&(o-=n),e.setCanvasPercentage(o)},a=o=>{const n=Math.round(o/l.value*t.value)/100;e.setCanvasPercentage(n)},r=()=>{e.setCanvasPercentage(90),o&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:a,scaleCanvas:c,resetCanvas:r}},bt=()=>{const e=Q(),t=ie(),{activeElementIdList:l,disableHotkeys:o,handleElement:n,handleElementId:c,editorAreaFocus:a,thumbnailsFocus:r}=Object(g["c"])(e),{currentSlide:i}=Object(g["c"])(W()),{ctrlKeyState:s,shiftKeyState:d,spaceKeyState:u}=Object(g["c"])(t),{updateSlideIndex:b,copySlide:p,createSlide:m,deleteSlide:O,cutSlide:f,copyAndPasteSlide:j,selectAllSlide:v}=Qe(),{combineElements:h,uncombineElements:x}=lt(),{deleteElement:k}=tt(),{lockElement:C}=et(),{copyElement:N,cutElement:E,quickCopyElement:w}=ot(),{selectAllElement:V}=nt(),{moveElement:I}=ct(),{orderElement:S}=at(),{redo:B,undo:L}=Ze(),{enterScreening:_,enterScreeningFromStart:T}=dt(),{scaleCanvas:M,resetCanvas:D}=ut(),z=()=>{l.value.length?N():r.value&&p()},A=()=>{l.value.length?E():r.value&&f()},F=()=>{l.value.length?w():r.value&&j()},$=()=>{a.value&&V(),r.value&&v()},R=()=>{a.value&&C()},P=()=>{a.value&&h()},H=()=>{a.value&&x()},q=()=>{l.value.length?k():r.value&&O()},U=e=>{l.value.length?I(e):e!==je.UP&&e!==je.DOWN||b(e)},G=e=>{e===je.PAGEUP?b(je.UP):e===je.PAGEDOWN&&b(je.DOWN)},X=e=>{n.value&&S(n.value,e)},Y=()=>{r.value&&m()},Z=()=>{if(!i.value.elements.length)return;if(!c.value){const t=i.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=i.value.elements.findIndex(e=>e.id===c.value),l=t>=i.value.elements.length-1?0:t+1,o=i.value.elements[l].id;e.setActiveElementIdList([o])},J=l=>{const{ctrlKey:n,shiftKey:c,altKey:i,metaKey:u}=l,b=n||u,p=l.key.toUpperCase();if(b&&!s.value&&t.setCtrlKeyState(!0),c&&!d.value&&t.setShiftKeyState(!0),o.value||p!==je.SPACE||t.setSpaceKeyState(!0),b&&p===je.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(c&&p===je.F5)return l.preventDefault(),_(),void t.setShiftKeyState(!1);if(p===je.F5)return l.preventDefault(),void T();if(a.value||r.value){if(b&&p===je.C){if(o.value)return;l.preventDefault(),z()}if(b&&p===je.X){if(o.value)return;l.preventDefault(),A()}if(b&&p===je.D){if(o.value)return;l.preventDefault(),F()}if(b&&p===je.Z){if(o.value)return;l.preventDefault(),L()}if(b&&p===je.Y){if(o.value)return;l.preventDefault(),B()}if(b&&p===je.A){if(o.value)return;l.preventDefault(),$()}if(b&&p===je.L){if(o.value)return;l.preventDefault(),R()}if(!c&&b&&p===je.G){if(o.value)return;l.preventDefault(),P()}if(c&&b&&p===je.G){if(o.value)return;l.preventDefault(),H()}if(i&&p===je.F){if(o.value)return;l.preventDefault(),X(be.TOP)}if(i&&p===je.B){if(o.value)return;l.preventDefault(),X(be.BOTTOM)}if(p===je.DELETE||p===je.BACKSPACE){if(o.value)return;l.preventDefault(),q()}if(p===je.UP){if(o.value)return;l.preventDefault(),U(je.UP)}if(p===je.DOWN){if(o.value)return;l.preventDefault(),U(je.DOWN)}if(p===je.LEFT){if(o.value)return;l.preventDefault(),U(je.LEFT)}if(p===je.RIGHT){if(o.value)return;l.preventDefault(),U(je.RIGHT)}if(p===je.PAGEUP){if(o.value)return;l.preventDefault(),G(je.PAGEUP)}if(p===je.PAGEDOWN){if(o.value)return;l.preventDefault(),G(je.PAGEDOWN)}if(p===je.ENTER){if(o.value)return;l.preventDefault(),Y()}if(p===je.MINUS){if(o.value)return;l.preventDefault(),M("-")}if(p===je.EQUAL){if(o.value)return;l.preventDefault(),M("+")}if(p===je.DIGIT_0){if(o.value)return;l.preventDefault(),D()}if(p===je.TAB){if(o.value)return;l.preventDefault(),Z()}}},K=()=>{s.value&&t.setCtrlKeyState(!1),d.value&&t.setShiftKeyState(!1),u.value&&t.setSpaceKeyState(!1)};Object(y["onMounted"])(()=>{document.addEventListener("keydown",J),document.addEventListener("keyup",K),window.addEventListener("blur",K)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("keydown",J),document.removeEventListener("keyup",K),window.removeEventListener("blur",K)})},pt=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=Object(g["c"])(Q()),{pasteTextClipboardData:o}=Ke(),{createImageElement:n}=We(),c=e=>{Pe(e).then(e=>n(e))},a=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const a=n.clipboardData.items,r=a[0];if(r){for(const e of a)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&c(t))}"string"===r.kind&&"text/plain"===r.type&&r.getAsString(e=>o(e))}};Object(y["onMounted"])(()=>{document.addEventListener("paste",a)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("paste",a)})},mt=l("21a6"),Ot=l("8f74"),ft=l("e774");const jt=["style","script","template"],vt=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],ht={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},yt=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],gt=(e,t)=>{const l=t-e.position;xt(e,l)},xt=(e,t)=>{e.position=e.position+t},kt=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const o=e.charAt(l+1);if("/"===o||"!"===o||/[A-Za-z0-9]/.test(o))return l;t=l+1}return-1},Ct=e=>{const{str:t}=e;let l=kt(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const o=t.slice(e.position,l);gt(e,l),e.tokens.push({type:"text",content:o})},Nt=e=>{const{str:t}=e;xt(e,4);let l=t.indexOf("--\x3e",e.position),o=l+3;-1===l&&(l=o=t.length);const n=t.slice(e.position,l);gt(e,o),e.tokens.push({type:"comment",content:n})},Et=e=>{const{str:t}=e,l=t.length;let o=e.position;while(o<l){const e=t.charAt(o),l=!(/\s/.test(e)||"/"===e||">"===e);if(l)break;o++}let n=o+1;while(n<l){const e=t.charAt(n),l=!(/\s/.test(e)||"/"===e||">"===e);if(!l)break;n++}gt(e,n);const c=t.slice(o,n);return e.tokens.push({type:"tag",content:c}),c},wt=e=>{const{str:t,tokens:l}=e;let o=e.position,n=null,c=o;const a=[],r=t.length;while(o<r){const e=t.charAt(o);if(n){const t=e===n;t&&(n=null),o++;continue}const l="/"===e||">"===e;if(l){o!==c&&a.push(t.slice(c,o));break}const r=/\s/.test(e);if(r){o!==c&&a.push(t.slice(c,o)),c=o+1,o++;continue}const i="'"===e||'"'===e;i?(n=e,o++):o++}gt(e,o);const i="attribute";for(let s=0;s<a.length;s++){const e=a[s],t=-1===e.indexOf("=");if(t){const t=a[s+1];if(t&&Object(G["startsWith"])(t,"=")){if(t.length>1){const o=e+t;l.push({type:i,content:o}),s+=1;continue}const o=a[s+2];if(s+=1,o){const t=e+"="+o;l.push({type:i,content:t}),s+=1;continue}}}if(Object(G["endsWith"])(e,"=")){const t=a[s+1];if(t&&-1===t.indexOf("=")){const o=e+t;l.push({type:i,content:o}),s+=1;continue}const o=e.slice(0,-1);l.push({type:i,content:o})}else l.push({type:i,content:e})}},Vt=(e,t)=>{const{str:l,tokens:o}=t,n=e.toLowerCase(),c=l.length;let a=t.position;while(a<c){const e=l.indexOf("</",a);if(-1===e){Ct(t);break}const c={str:l,position:t.position,tokens:[]};gt(c,e);const r=It(c);if(n===r.toLowerCase()){if(e!==t.position){const n=t.position;gt(t,e),o.push({type:"text",content:l.slice(n,e)})}o.push(...c.tokens),gt(t,c.position);break}a=c.position}},It=e=>{const{str:t}=e,l=t.charAt(e.position+1),o="/"===l;xt(e,o?2:1),e.tokens.push({type:"tag-start",close:o});const n=Et(e);wt(e);const c=t.charAt(e.position),a="/"===c;return xt(e,a?2:1),e.tokens.push({type:"tag-end",close:a}),n},St=e=>{const t=e.str,l=t.length;while(e.position<l){const l=e.position;if(Ct(e),e.position===l){const o=Object(G["startsWith"])(t,"!--",l+1);if(o)Nt(e);else{const t=It(e),l=t.toLowerCase();jt.includes(l)&&Vt(t,e)}}}},Bt=e=>{const t={str:e,position:0,tokens:[]};return St(t),t.tokens},Lt=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return Mt(l),t.children},_t=(e,t)=>{const l=ht[e];if(l){let o=t.length-1;while(o>=0){const n=t[o].tagName;if(n===e)break;if(l.includes(n))return!0;o--}}return!1},Tt=(e,t)=>{e.splice(t)},Mt=e=>{const{stack:t,tokens:l}=e;let{cursor:o}=e,n=t[t.length-1].children;const c=l.length;while(o<c){const e=l[o];if("tag-start"!==e.type){n.push(e),o++;continue}const a=l[++o];o++;const r=a.content.toLowerCase();if(e.close){let e=t.length,n=!1;while(--e>-1)if(t[e].tagName===r){n=!0;break}while(o<c){if("tag-end"!==l[o].type)break;o++}if(n){Tt(t,e);break}continue}const i=vt.includes(r);let s=i;if(s&&(s=!_t(r,t)),s){let e=t.length-1;while(e>0){if(r===t[e].tagName){Tt(t,e);const l=e-1;n=t[l].children;break}e-=1}}const d=[];let u;while(o<c){const e=l[o];if("tag-end"===e.type){u=e;break}d.push(e.content),o++}if(!u)break;o++;const b=[],p={type:"element",tagName:a.content,attributes:d,children:b};n.push(p);const m=!(u.close||yt.includes(r));if(m){t.push({tagName:r,children:b});const e={tokens:l,cursor:o,stack:t};Mt(e),o=e.cursor}}e.cursor=o},Dt=(e,t)=>{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},zt=e=>{const t=e.charAt(0),l=e.length-1,o='"'===t||"'"===t;return o&&t===e.charAt(l)?e.slice(1,l):e},At=e=>e.map(e=>{const t=Dt(e.trim(),"="),l=t[0],o="string"===typeof t[1]?zt(t[1]):null;return{key:l,value:o}}),Ft=e=>e.map(e=>{if("element"===e.type){const t=Ft(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:At(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t});l("13d5");const $t=e=>{const t=Bt(e),l=Lt(t);return Ft(l)};var Rt=l("d01f"),Pt=l("0b89");const Ht={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},qt=e=>{const t=new Rt["a"](e),l=[];for(const o of t.commands){const e=Ht[o.type];if(2!==o.type&&16!==o.type||l.push({x:o.x,y:o.y,relative:o.relative,type:e}),32===o.type)l.push({x:o.x,y:o.y,curve:{type:"cubic",x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2},relative:o.relative,type:e});else if(128===o.type)l.push({x:o.x,y:o.y,curve:{type:"quadratic",x1:o.x1,y1:o.y1},relative:o.relative,type:e});else if(512===o.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=Object(Pt["a"])({px:e.x,py:e.y,cx:o.x,cy:o.y,rx:o.rX,ry:o.rY,xAxisRotation:o.xRot,largeArcFlag:o.lArcFlag,sweepFlag:o.sweepFlag});for(const o of t)l.push({x:o.x,y:o.y,curve:{type:"cubic",x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2},relative:!1,type:"C"})}else{if(1!==o.type)continue;l.push({close:!0,type:e})}}return l},Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Gt="data:image/svg+xml;base64,",Xt=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l<e.length;l++){const o=e.charCodeAt(l);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},Yt=e=>{let t,l,o,n,c,a,r,i="",s=0;e=Xt(e);while(s<e.length)t=e.charCodeAt(s++),l=e.charCodeAt(s++),o=e.charCodeAt(s++),n=t>>2,c=(3&t)<<4|l>>4,a=(15&l)<<2|o>>6,r=63&o,isNaN(l)?a=r=64:isNaN(o)&&(r=64),i=i+Ut.charAt(n)+Ut.charAt(c)+Ut.charAt(a)+Ut.charAt(r);return i},Zt=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return Gt+Yt(l)};var Wt=()=>{const e=W(),{slides:t,theme:l,viewportRatio:o}=Object(g["c"])(e),{addSlidesFromData:n}=Je(),c=Object(y["ref"])(!1),a=(e,t,l,o=!0)=>{c.value=!0;const n="png"===t?ft["c"]:ft["b"],a=e.querySelectorAll("foreignObject [xmlns]");a.forEach(e=>e.removeAttribute("xmlns")),setTimeout(()=>{const a={quality:l,width:1600};o&&(a.fontEmbedCSS=""),n(e,a).then(e=>{c.value=!1,Object(mt["saveAs"])(e,"pptist_slides."+t)}).catch(()=>{c.value=!1,he["a"].error("导出图片失败")})},200)},r=e=>{const t=new Blob([Ne(JSON.stringify(e))],{type:""});Object(mt["saveAs"])(t,"pptist_slides.pptist")},i=(t,l=!1)=>{const o=t[0],c=new FileReader;c.addEventListener("load",()=>{try{const t=JSON.parse(Ee(c.result));l?e.setSlides(t):n(t)}catch{he["a"].error("无法正确读取 / 解析该文件")}}),c.readAsText(o)},s=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});Object(mt["saveAs"])(e,"pptist_slides.json")},d=e=>{const t=U()(e),l=t.getAlpha(),o=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:o}},u=e=>{const t=$t(e);let l=!1,o=0;const n=[],c=(e,t={})=>{for(const a of e){const e="tagName"in a&&["div","li","p"].includes(a.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const r={...t},i="attributes"in a?a.attributes.find(e=>"style"===e.key):null;if(i&&i.value){const e=i.value.split(";");for(const t of e){const[e,l]=t.split(": "),[o,n]=[Object(G["trim"])(e),Object(G["trim"])(l)];o&&n&&(r[o]=n)}}if("tagName"in a){if("em"===a.tagName&&(r["font-style"]="italic"),"strong"===a.tagName&&(r["font-weight"]="bold"),"sup"===a.tagName&&(r["vertical-align"]="super"),"sub"===a.tagName&&(r["vertical-align"]="sub"),"a"===a.tagName){const e=a.attributes.find(e=>"href"===e.key);r["href"]=(null===e||void 0===e?void 0:e.value)||""}if("ul"===a.tagName&&(r["list-type"]="ul"),"ol"===a.tagName&&(r["list-type"]="ol"),"li"===a.tagName&&(l=!0),"p"===a.tagName&&"attributes"in a){const e=a.attributes.find(e=>"data-indent"===e.key);e&&e.value&&(o=+e.value)}}if("tagName"in a&&"br"===a.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in a){const e=a.content.replace(/&nbsp;/g," ").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\n/g,""),t={};r["font-size"]&&(t.fontSize=.75*parseInt(r["font-size"])),r["color"]&&(t.color=d(r["color"]).color),r["background-color"]&&(t.highlight=d(r["background-color"]).color),r["text-decoration-line"]&&(-1!==r["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==r["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),r["text-decoration"]&&(-1!==r["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==r["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),r["vertical-align"]&&("super"===r["vertical-align"]&&(t.superscript=!0),"sub"===r["vertical-align"]&&(t.subscript=!0)),r["text-align"]&&(t.align=r["text-align"]),r["font-weight"]&&(t.bold="bold"===r["font-weight"]),r["font-style"]&&(t.italic="italic"===r["font-style"]),r["font-family"]&&(t.fontFace=r["font-family"]),r["href"]&&(t.hyperlink={url:r["href"]}),l&&"ol"===r["list-type"]&&(t.bullet={type:"number",indent:15},t.paraSpaceBefore=.1,l=!1),l&&"ul"===r["list-type"]&&(t.bullet={indent:15},t.paraSpaceBefore=.1,l=!1),o&&(t.indentLevel=o,o=0),n.push({text:e,options:t})}else"children"in a&&c(a.children,r)}};return c(t),n},b=(e,t={x:1,y:1})=>e.map(e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/100*t.x,y:e.y/100*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/100*t.x,y:e.y/100*t.y,curve:{type:"cubic",x1:e.curve.x1/100*t.x,y1:e.curve.y1/100*t.y,x2:e.curve.x2/100*t.x,y2:e.curve.y2/100*t.y}};if("quadratic"===e.curve.type)return{x:e.x/100*t.x,y:e.y/100*t.y,curve:{type:"quadratic",x1:e.curve.x1/100*t.x,y1:e.curve.y1/100*t.y}}}return{x:e.x/100*t.x,y:e.y/100*t.y}}),p=e=>{const t=d(e.color),{h:l,v:o}=e;let n=4,c=45;return 0===l&&0===o?(n=4,c=45):0===l?o>0?(n=o,c=90):(n=-o,c=270):0===o?l>0?(n=l,c=1):(n=-l,c=180):l>0&&o>0?(n=Math.max(l,o),c=45):l>0&&o<0?(n=Math.max(l,-o),c=315):l<0&&o>0?(n=Math.max(-l,o),c=135):l<0&&o<0&&(n=Math.max(-l,-o),c=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:.75*e.blur,offset:n,angle:c}},m=e=>{const t=d((null===e||void 0===e?void 0:e.color)||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:.75*(e.width||1),dashType:"solid"===e.style?"solid":"dash"}},O=e=>{const{type:l,target:o}=e;if("web"===l)return{url:o};if("slide"===l){const e=t.value.findIndex(e=>e.id===o);if(-1!==e)return{slide:e+1}}return null},f=(e,t)=>{c.value=!0;const n=new Ot["a"];if(.625===o.value?n.layout="LAYOUT_16x10":.75===o.value?n.layout="LAYOUT_4x3":n.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);n.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=n.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=d(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,o]=t.gradientColor,n=U.a.mix(l,o).toHexString(),c=d(n);e.background={color:c.color,transparency:100*(1-c.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){var a;const l=u(t.content),o={x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100,fontSize:15,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:7.5,paraSpaceBefore:3.75,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(o.rotate=t.rotate),t.wordSpace&&(o.charSpacing=.75*t.wordSpace),t.lineHeight&&(o.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;o.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(o.color=d(t.defaultColor).color),t.defaultFontName&&(o.fontFace=t.defaultFontName),t.shadow&&(o.shadow=p(t.shadow)),null!==(a=t.outline)&&void 0!==a&&a.width&&(o.line=m(t.outline)),void 0!==t.opacity&&(o.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(o.paraSpaceBefore=.75*t.paragraphSpace),t.vertical&&(o.vert="eaVert"),e.addText(l,o)}else if("image"===t.type){var r,i;const l={path:t.src,x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=O(t.link);e&&(l.hyperlink=e)}if(null!==(r=t.filters)&&void 0!==r&&r.opacity&&(l.transparency=100-parseInt(null===(i=t.filters)||void 0===i?void 0:i.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,o]=t.clip.range,[n,c]=e,[a,r]=o,i=t.width/((a-n)/100),s=t.height/((r-c)/100);l.w=i/100,l.h=s/100,l.sizing={type:"crop",x:n/100*i/100,y:c/100*s/100,w:(a-n)/100*i/100,h:(r-c)/100*s/100}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),o=Zt(l),n={data:o,x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=O(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{var s;const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},o=b(qt(t.path),l),n=d(t.fill),c=void 0===t.opacity?1:t.opacity,a={x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100,fill:{color:n.color,transparency:100*(1-n.alpha*c)},points:o};if(t.flipH&&(a.flipH=t.flipH),t.flipV&&(a.flipV=t.flipV),t.shadow&&(a.shadow=p(t.shadow)),null!==(s=t.outline)&&void 0!==s&&s.width&&(a.line=m(t.outline)),t.link){const e=O(t.link);e&&(a.hyperlink=e)}e.addShape("custGeom",a)}if(t.text){const l=u(t.text.content),o={x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100,fontSize:15,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:3.75,valign:t.text.align};t.rotate&&(o.rotate=t.rotate),t.text.defaultColor&&(o.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(o.fontFace=t.text.defaultFontName),e.addText(l,o)}}else if("line"===t.type){const l=Fe(t),o=b(qt(l)),{minX:n,maxX:c,minY:a,maxY:r}=_e(t),i=d(t.color),s={x:t.left/100,y:t.top/100,w:(c-n)/100,h:(r-a)/100,line:{color:i.color,transparency:100*(1-i.alpha),width:.75*t.width,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:o};t.shadow&&(s.shadow=p(t.shadow)),e.addShape("custGeom",s)}else if("chart"===t.type){const l=[];for(let e=0;e<t.data.series.length;e++){const o=t.data.series[e];l.push({name:"系列"+(e+1),labels:t.data.labels,values:o})}let o=[];if(10===t.themeColor.length)o=t.themeColor.map(e=>d(e).color);else if(1===t.themeColor.length)o=U()(t.themeColor[0]).analogous(10).map(e=>d(e.toHexString()).color);else{const e=t.themeColor.length,l=U()(t.themeColor[e-1]).analogous(11-e).map(e=>e.toHexString());o=[...t.themeColor.slice(0,e-1),...l].map(e=>d(e).color)}const c={x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100,chartColors:"pie"===t.chartType?o:o.slice(0,t.data.series.length)};t.fill&&(c.fill=d(t.fill).color),t.legend&&(c.showLegend=!0,c.legendPos="top"===t.legend?"t":"b",c.legendColor=d(t.gridColor||"#000000").color,c.legendFontSize=10.5);let a=n.ChartType.bar;var f;if("bar"===t.chartType)a=n.ChartType.bar,c.barDir=null!==(f=t.options)&&void 0!==f&&f.horizontalBars?"bar":"col";else if("line"===t.chartType){var j,v,h;null!==(j=t.options)&&void 0!==j&&j.showArea?a=n.ChartType.area:!1===(null===(v=t.options)||void 0===v?void 0:v.showLine)?(a=n.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map((e,t)=>t)}),c.lineSize=0):a=n.ChartType.line,null!==(h=t.options)&&void 0!==h&&h.lineSmooth&&(c.lineSmooth=!0)}else if("pie"===t.chartType){var y;null!==(y=t.options)&&void 0!==y&&y.donut?(a=n.ChartType.doughnut,c.holeSize=75):a=n.ChartType.pie}e.addChart(a,l,c)}else if("table"===t.type){const l=[];for(let e=0;e<t.data.length;e++){const o=t.data[e];for(let t=0;t<o.length;t++){const n=o[t];if(n.colspan>1||n.rowspan>1)for(let o=e;o<e+n.rowspan;o++)for(let c=o===e?t+1:t;c<t+n.colspan;c++)l.push(`${o}_${c}`)}}const o=[],n=t.theme;let c=null,a=[];n&&(c=d(n.color),a=Ae(n.color).map(e=>d(e)));for(let e=0;e<t.data.length;e++){const r=t.data[e],i=[];for(let o=0;o<r.length;o++){var g,x,k,C,N,E,w,V,I;const s=r[o],u={colspan:s.colspan,rowspan:s.rowspan,bold:(null===(g=s.style)||void 0===g?void 0:g.bold)||!1,italic:(null===(x=s.style)||void 0===x?void 0:x.em)||!1,underline:{style:null!==(k=s.style)&&void 0!==k&&k.underline?"sng":"none"},align:(null===(C=s.style)||void 0===C?void 0:C.align)||"left",valign:"middle",fontFace:(null===(N=s.style)||void 0===N?void 0:N.fontname)||"微软雅黑",fontSize:.75*(null!==(E=s.style)&&void 0!==E&&E.fontsize?parseInt(null===(w=s.style)||void 0===w?void 0:w.fontsize):14)};if(n&&c){let l;l=e%2===0?a[1]:a[0],(n.rowHeader&&0===e||n.rowFooter&&e===t.data.length-1||n.colHeader&&0===o||n.colFooter&&o===r.length-1)&&(l=c),u.fill={color:l.color,transparency:100*(1-l.alpha)}}if(null!==(V=s.style)&&void 0!==V&&V.backcolor){const e=d(s.style.backcolor);u.fill={color:e.color,transparency:100*(1-e.alpha)}}null!==(I=s.style)&&void 0!==I&&I.color&&(u.color=d(s.style.color).color),l.includes(`${e}_${o}`)||i.push({text:s.text,options:u})}i.length&&o.push(i)}const r={x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100,colW:t.colWidths.map(e=>t.width*e/100)};t.theme&&(r.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(r.border={type:"solid"===t.outline.style?"solid":"dash",pt:.75*t.outline.width,color:d(t.outline.color).color}),e.addTable(o,r)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),o=Zt(l),n={data:o,x:t.left/100,y:t.top/100,w:t.width/100,h:t.height/100};if(t.link){const e=O(t.link);e&&(n.hyperlink=e)}e.addImage(n)}}n.writeFile({fileName:"pptist.pptx"}).then(()=>c.value=!1).catch(()=>{c.value=!1,he["a"].error("导出失败")})};return{exporting:c,exportImage:a,exportJSON:s,importSpecificFile:i,exportSpecificFile:r,exportPPTX:f}};const Jt={class:"hotkey-doc"},Kt={class:"title"},Qt={class:"label"},el={class:"value"};var tl=Object(y["defineComponent"])({__name:"HotkeyDoc",setup(e){return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Jt,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(ve),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:e.type},[Object(y["createElementVNode"])("div",Kt,Object(y["toDisplayString"])(e.type),1),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.children,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"hotkey-item",key:e.label},[Object(y["createElementVNode"])("div",Qt,Object(y["toDisplayString"])(e.label),1),Object(y["createElementVNode"])("div",el,Object(y["toDisplayString"])(e.value),1)]))),128))],64))),128))]))}}),ll=(l("28eb"),l("d959")),ol=l.n(ll);const nl=ol()(tl,[["__scopeId","data-v-4b1afc5f"]]);var cl=nl;const al=e=>(Object(y["pushScopeId"])("data-v-3b56c50c"),e=e(),Object(y["popScopeId"])(),e),rl={class:"editor-header"},il={class:"left"},sl={class:"menu-item"},dl=Object(y["createTextVNode"])(),ul=al(()=>Object(y["createElementVNode"])("span",{class:"text"},"文件",-1)),bl=Object(y["createTextVNode"])("导入 pptist 文件"),pl=Object(y["createTextVNode"])("导出 pptist 文件"),ml=Object(y["createTextVNode"])("导出 PPTX"),Ol=Object(y["createTextVNode"])("导出图片"),fl=Object(y["createTextVNode"])("导出 JSON"),jl=Object(y["createTextVNode"])("打印 / 导出 PDF"),vl={class:"menu-item"},hl=Object(y["createTextVNode"])(),yl=al(()=>Object(y["createElementVNode"])("span",{class:"text"},"编辑",-1)),gl=Object(y["createTextVNode"])("撤销"),xl=Object(y["createTextVNode"])("重做"),kl=Object(y["createTextVNode"])("添加页面"),Cl=Object(y["createTextVNode"])("删除页面"),Nl=Object(y["createTextVNode"])("重置幻灯片"),El={class:"menu-item"},wl=Object(y["createTextVNode"])(),Vl=al(()=>Object(y["createElementVNode"])("span",{class:"text"},"演示",-1)),Il=Object(y["createTextVNode"])("从头开始"),Sl=Object(y["createTextVNode"])("从当前页开始"),Bl={class:"menu-item"},Ll=Object(y["createTextVNode"])(),_l=al(()=>Object(y["createElementVNode"])("span",{class:"text"},"帮助",-1)),Tl=Object(y["createTextVNode"])("意见反馈"),Ml=Object(y["createTextVNode"])("快捷键"),Dl={class:"right"},zl={href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},Al={class:"menu-item"};var Fl=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{gridLineSize:l,showRuler:o}=Object(g["c"])(t),{enterScreening:n,enterScreeningFromStart:c}=dt(),{createSlide:a,deleteSlide:r,resetSlides:i}=Qe(),{redo:s,undo:d}=Ze(),{importSpecificFile:u}=Wt(),b=t.setDialogForExport,p=()=>{t.setGridLineSize(l.value?0:50)},m=()=>{t.setRulerState(!o.value)},O=Object(y["ref"])(!1),f=()=>{window.open("https://github.com/pipipi-pikachu/PPTist/issues")};return(e,t)=>{const j=Object(y["resolveComponent"])("IconFolderClose"),v=Object(y["resolveComponent"])("MenuItem"),h=Object(y["resolveComponent"])("FileInput"),g=Object(y["resolveComponent"])("Menu"),x=Object(y["resolveComponent"])("Dropdown"),k=Object(y["resolveComponent"])("IconEdit"),C=Object(y["resolveComponent"])("IconPpt"),N=Object(y["resolveComponent"])("IconHelpcenter"),E=Object(y["resolveComponent"])("IconShare"),w=Object(y["resolveComponent"])("Tooltip"),V=Object(y["resolveComponent"])("IconGithub"),I=Object(y["resolveComponent"])("Drawer");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",rl,[Object(y["createElementVNode"])("div",il,[Object(y["createVNode"])(x,{trigger:["click"]},{overlay:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,null,{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(h,{accept:".pptist",onChange:t[0]||(t[0]=e=>Object(y["unref"])(u)(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v,null,{default:Object(y["withCtx"])(()=>[bl]),_:1})]),_:1}),Object(y["createVNode"])(v,{onClick:t[1]||(t[1]=e=>Object(y["unref"])(b)("pptist"))},{default:Object(y["withCtx"])(()=>[pl]),_:1}),Object(y["createVNode"])(v,{onClick:t[2]||(t[2]=e=>Object(y["unref"])(b)("pptx"))},{default:Object(y["withCtx"])(()=>[ml]),_:1}),Object(y["createVNode"])(v,{onClick:t[3]||(t[3]=e=>Object(y["unref"])(b)("image"))},{default:Object(y["withCtx"])(()=>[Ol]),_:1}),Object(y["createVNode"])(v,{onClick:t[4]||(t[4]=e=>Object(y["unref"])(b)("json"))},{default:Object(y["withCtx"])(()=>[fl]),_:1}),Object(y["createVNode"])(v,{onClick:t[5]||(t[5]=e=>Object(y["unref"])(b)("pdf"))},{default:Object(y["withCtx"])(()=>[jl]),_:1})]),_:1})]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",sl,[Object(y["createVNode"])(j),dl,ul])]),_:1}),Object(y["createVNode"])(x,{trigger:["click"]},{overlay:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,null,{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v,{onClick:t[6]||(t[6]=e=>Object(y["unref"])(d)())},{default:Object(y["withCtx"])(()=>[gl]),_:1}),Object(y["createVNode"])(v,{onClick:t[7]||(t[7]=e=>Object(y["unref"])(s)())},{default:Object(y["withCtx"])(()=>[xl]),_:1}),Object(y["createVNode"])(v,{onClick:t[8]||(t[8]=e=>Object(y["unref"])(a)())},{default:Object(y["withCtx"])(()=>[kl]),_:1}),Object(y["createVNode"])(v,{onClick:t[9]||(t[9]=e=>Object(y["unref"])(r)())},{default:Object(y["withCtx"])(()=>[Cl]),_:1}),Object(y["createVNode"])(v,{onClick:t[10]||(t[10]=e=>p())},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(Object(y["unref"])(l)?"关闭网格线":"打开网格线"),1)]),_:1}),Object(y["createVNode"])(v,{onClick:t[11]||(t[11]=e=>m())},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(Object(y["unref"])(o)?"关闭标尺":"打开标尺"),1)]),_:1}),Object(y["createVNode"])(v,{onClick:t[12]||(t[12]=e=>Object(y["unref"])(i)())},{default:Object(y["withCtx"])(()=>[Nl]),_:1})]),_:1})]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",vl,[Object(y["createVNode"])(k),hl,yl])]),_:1}),Object(y["createVNode"])(x,{trigger:["click"]},{overlay:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,null,{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v,{onClick:t[13]||(t[13]=e=>Object(y["unref"])(c)())},{default:Object(y["withCtx"])(()=>[Il]),_:1}),Object(y["createVNode"])(v,{onClick:t[14]||(t[14]=e=>Object(y["unref"])(n)())},{default:Object(y["withCtx"])(()=>[Sl]),_:1})]),_:1})]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",El,[Object(y["createVNode"])(C),wl,Vl])]),_:1}),Object(y["createVNode"])(x,{trigger:["click"]},{overlay:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,null,{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v,{onClick:t[15]||(t[15]=e=>f())},{default:Object(y["withCtx"])(()=>[Tl]),_:1}),Object(y["createVNode"])(v,{onClick:t[16]||(t[16]=e=>O.value=!0)},{default:Object(y["withCtx"])(()=>[Ml]),_:1})]),_:1})]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",Bl,[Object(y["createVNode"])(N),Ll,_l])]),_:1})]),Object(y["createElementVNode"])("div",Dl,[Object(y["createVNode"])(w,{mouseLeaveDelay:0,title:"导出"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:"menu-item",onClick:t[17]||(t[17]=e=>Object(y["unref"])(b)("pptx"))},[Object(y["createVNode"])(E,{size:"18",fill:"#666"})])]),_:1}),Object(y["createVNode"])(w,{mouseLeaveDelay:0,title:"幻灯片放映"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:"menu-item",onClick:t[18]||(t[18]=e=>Object(y["unref"])(n)())},[Object(y["createVNode"])(C,{size:"19",fill:"#666",style:{"margin-top":"1px"}})])]),_:1}),Object(y["createElementVNode"])("a",zl,[Object(y["createElementVNode"])("div",Al,[Object(y["createVNode"])(V,{size:"18",fill:"#666"})])])]),Object(y["createVNode"])(I,{width:"320",placement:"right",closable:!1,visible:O.value,onClose:t[19]||(t[19]=e=>O.value=!1)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(cl)]),_:1},8,["visible"])])}}});l("3f3b");const $l=ol()(Fl,[["__scopeId","data-v-3b56c50c"]]);var Rl=$l;const Pl=Symbol(),Hl=Symbol(),ql=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Ul=e=>{const t=Object(y["ref"])(0),l=Object(y["ref"])(0),o=Q(),{canvasPercentage:n,canvasDragged:c}=Object(g["c"])(o),{viewportRatio:a}=Object(g["c"])(W()),r=()=>{if(!e.value)return;const c=e.value.clientWidth,r=e.value.clientHeight;if(r/c>a.value){const e=c*(n.value/100);o.setCanvasScale(e/He),t.value=(c-e)/2,l.value=(r-e*a.value)/2}else{const e=r*(n.value/100);o.setCanvasScale(e/(He*a.value)),t.value=(c-e/a.value)/2,l.value=(r-e)/2}};Object(y["watch"])([n,a],r),Object(y["watch"])(c,()=>{c.value||r()});const i=Object(y["computed"])(()=>({width:He,height:He*a.value,left:t.value,top:l.value})),s=new ResizeObserver(r);Object(y["onMounted"])(()=>{e.value&&s.observe(e.value)}),Object(y["onUnmounted"])(()=>{e.value&&s.unobserve(e.value)});const d=e=>{let n=!0;const c=e.pageX,a=e.pageY,r=t.value,i=l.value;document.onmousemove=e=>{if(!n)return;const o=e.pageX,s=e.pageY;t.value=r+(o-c),l.value=i+(s-a)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,o.setCanvasDragged(!0)}};return{viewportStyles:i,dragViewport:d}},Gl=(e,t)=>{const l=Q(),{canvasScale:o}=Object(g["c"])(l),n=Object(y["ref"])(!1),c=Object(y["ref"])(1),a=Object(y["ref"])({top:0,left:0,width:0,height:0}),r=r=>{if(!t.value)return;let i=!0;const s=t.value.getBoundingClientRect(),d=5,u=r.pageX,b=r.pageY,p=(u-s.x)/o.value,m=(b-s.y)/o.value;a.value={top:m,left:p,width:0,height:0},n.value=!1,c.value=4,document.onmousemove=e=>{if(!i)return;const t=e.pageX,l=e.pageY,r=(t-u)/o.value,s=(l-b)/o.value,p=Math.abs(r),m=Math.abs(s);if(p<d||m<d)return;let O=0;r>0&&s>0?O=4:r<0&&s<0?O=1:r>0&&s<0?O=2:r<0&&s>0&&(O=3),a.value={...a.value,width:p,height:m},n.value=!0,c.value=O},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,i=!1;let t=[];for(let l=0;l<e.value.length;l++){const o=e.value[l],n=a.value.left,r=a.value.top,i=a.value.width,s=a.value.height,{minX:d,maxX:u,minY:b,maxY:p}=_e(o);let m=!1;4===c.value?m=d>n&&u<n+i&&b>r&&p<r+s:1===c.value?m=d>n-i&&u<n-i+i&&b>r-s&&p<r-s+s:2===c.value?m=d>n&&u<n+i&&b>r-s&&p<r-s+s:3===c.value&&(m=d>n-i&&u<n-i+i&&b>r&&p<r+s),m&&!o.lock&&t.push(o)}t=t.filter(l=>{if(l.groupId){const o=t.map(e=>e.id),n=e.value.filter(e=>e.groupId===l.groupId);return n.every(e=>o.includes(e.id))}return!0});const o=t.map(e=>e.id);l.setActiveElementIdList(o),n.value=!1}};return{mouseSelection:a,mouseSelectionVisible:n,mouseSelectionQuadrant:c,updateMouseSelection:r}},Xl=e=>{const{disableHotkeys:t}=Object(g["c"])(Q()),{createImageElement:l,createTextElement:o}=We(),n=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&Pe(e).then(e=>l(e))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString(e=>{if(t.value)return;const l=$e(e);o({left:0,top:0,width:600,height:50},{content:l})})};Object(y["onMounted"])(()=>{e.value&&e.value.addEventListener("drop",n),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()}),Object(y["onUnmounted"])(()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null})};const Yl=(e,t)=>{const l=Math.atan2(e,t),o=180/Math.PI*l;return o};var Zl=(e,t)=>{const l=W(),{canvasScale:o}=Object(g["c"])(Q()),{addHistorySnapshot:n}=Ze(),c=c=>{let a=!0,r=0;const i=c.rotate||0,s=c.left,d=c.top,u=c.width,b=c.height,p=s+u/2,m=d+b/2;if(!t.value)return;const O=t.value.getBoundingClientRect();document.onmousemove=t=>{if(!a)return;const l=(t.pageX-O.left)/o.value,n=(t.pageY-O.top)/o.value,i=l-p,s=m-n;r=Yl(i,s);const d=5;Math.abs(r)<=d?r=0:r>0&&Math.abs(r-45)<=d?r-=r-45:r<0&&Math.abs(r+45)<=d?r-=r+45:r>0&&Math.abs(r-90)<=d?r-=r-90:r<0&&Math.abs(r+90)<=d?r-=r+90:r>0&&Math.abs(r-135)<=d?r-=r-135:r<0&&Math.abs(r+135)<=d?r-=r+135:r>0&&Math.abs(r-180)<=d?r-=r-180:r<0&&Math.abs(r+180)<=d&&(r-=r+180),e.value=e.value.map(e=>c.id===e.id?{...e,rotate:r}:e)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null,i!==r&&(l.updateSlide({elements:e.value}),n())}};return{rotateElement:c}};const Wl={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频"},Jl={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20},Kl=(e,t)=>{const{left:l,top:o,width:n,height:c}=e,a=Math.sqrt(Math.pow(n,2)+Math.pow(c,2))/2,r=180*Math.atan(c/n)/Math.PI,i=(180-t-r)*Math.PI/180,s=(r-t)*Math.PI/180,d=(90-t)*Math.PI/180,u=t*Math.PI/180,b=n/2,p=c/2,m=l+b,O=o+p,f={left:m+a*Math.cos(i),top:O-a*Math.sin(i)},j={left:m+p*Math.cos(d),top:O-p*Math.sin(d)},v={left:m+a*Math.cos(s),top:O-a*Math.sin(s)},h={left:m+b*Math.cos(u),top:O+b*Math.sin(u)},y={left:m-a*Math.cos(i),top:O+a*Math.sin(i)},g={left:m-p*Math.sin(u),top:O+p*Math.cos(u)},x={left:m-a*Math.cos(s),top:O+a*Math.sin(s)},k={left:m-b*Math.cos(u),top:O-b*Math.sin(u)};return{leftTopPoint:f,topPoint:j,rightTopPoint:v,rightPoint:h,rightBottomPoint:y,bottomPoint:g,leftBottomPoint:x,leftPoint:k}},Ql=(e,t)=>{const l={[Oe.RIGHT_BOTTOM]:t.leftTopPoint,[Oe.LEFT_BOTTOM]:t.rightTopPoint,[Oe.LEFT_TOP]:t.rightBottomPoint,[Oe.RIGHT_TOP]:t.leftBottomPoint,[Oe.TOP]:t.bottomPoint,[Oe.BOTTOM]:t.topPoint,[Oe.LEFT]:t.rightPoint,[Oe.RIGHT]:t.leftPoint};return l[e]};var eo,to,lo=(e,t,l)=>{const o=Q(),n=W(),{activeElementIdList:c,activeGroupElementId:a}=Object(g["c"])(o),{viewportRatio:r}=Object(g["c"])(n),{ctrlOrShiftKeyActive:i}=Object(g["c"])(ie()),{addHistorySnapshot:s}=Ze(),d=(d,u,b)=>{const p=!(d instanceof MouseEvent);if(p&&(!d.changedTouches||!d.changedTouches[0]))return;let m=!0;o.setScalingState(!0);const O=u.left,f=u.top,j=u.width,v=u.height,h="rotate"in u&&u.rotate?u.rotate:0,y=Math.PI*h/180,g=i.value||"fixedRatio"in u&&u.fixedRatio,x=j/v,k=p?d.changedTouches[0].pageX:d.pageX,C=p?d.changedTouches[0].pageY:d.pageY,N=Jl[u.type]||20,E=e=>e<N?N:e;let w,V=0,I=0,S=[],B=[];if("rotate"in u&&u.rotate){const{left:e,top:t,width:l,height:o}=u;w=Kl({left:e,top:t,width:l,height:o},h);const n=Ql(b,w);V=n.left,I=n.top}else{const t=He,l=He*r.value,o=u.id===a.value;for(const a of e.value){if("rotate"in a&&a.rotate)continue;if("line"===a.type)continue;if(o&&a.id===u.id)continue;if(!o&&c.value.includes(a.id))continue;const e=a.left,t=a.top,l=a.width,n=a.height,r=e+l,i=t+n,s={value:t,range:[e,r]},d={value:i,range:[e,r]},b={value:e,range:[t,i]},p={value:r,range:[t,i]};S.push(s,d),B.push(b,p)}const n={value:0,range:[0,t]},i={value:l,range:[0,t]},s={value:l/2,range:[0,t]},d={value:0,range:[0,l]},b={value:t,range:[0,l]},p={value:t/2,range:[0,l]};S.push(n,i,s),B.push(d,b,p),S=Me(S),B=Me(B)}const L=(e,l)=>{const o=5,n=[];let c=!1,a=!1;const r={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t<S.length;t++){const{value:c,range:i}=S[t],s=Math.min(...i,e||0),d=Math.max(...i,e||0);Math.abs(l-c)<o&&!a&&(r.offsetY=l-c,a=!0,n.push({type:"horizontal",axis:{x:s-50,y:c},length:d-s+100}))}if(e||0===e)for(let t=0;t<B.length;t++){const{value:a,range:i}=B[t],s=Math.min(...i,l||0),d=Math.max(...i,l||0);Math.abs(e-a)<o&&!c&&(r.offsetX=e-a,c=!0,n.push({type:"vertical",axis:{x:a,y:s-50},length:d-s+100}))}return t.value=n,r},_=t=>{if(!m)return;const o=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,c=o-k,a=n-C;let r=j,i=v,s=O,d=f;if(h){const e=(Math.cos(y)*c+Math.sin(y)*a)/l.value;let t=(Math.cos(y)*a-Math.sin(y)*c)/l.value;g&&(b!==Oe.RIGHT_BOTTOM&&b!==Oe.LEFT_TOP||(t=e/x),b!==Oe.LEFT_BOTTOM&&b!==Oe.RIGHT_TOP||(t=-e/x)),b===Oe.RIGHT_BOTTOM?(r=E(j+e),i=E(v+t)):b===Oe.LEFT_BOTTOM?(r=E(j-e),i=E(v+t),s=O-(r-j)):b===Oe.LEFT_TOP?(r=E(j-e),i=E(v-t),s=O-(r-j),d=f-(i-v)):b===Oe.RIGHT_TOP?(r=E(j+e),i=E(v-t),d=f-(i-v)):b===Oe.TOP?(i=E(v-t),d=f-(i-v)):b===Oe.BOTTOM?i=E(v+t):b===Oe.LEFT?(r=E(j-e),s=O-(r-j)):b===Oe.RIGHT&&(r=E(j+e));const o=Kl({width:r,height:i,left:s,top:d},h),n=Ql(b,o),u=n.left,p=n.top,m=u-V,k=p-I;s-=m,d-=k}else{let e=c/l.value,t=a/l.value;if(g&&(b!==Oe.RIGHT_BOTTOM&&b!==Oe.LEFT_TOP||(t=e/x),b!==Oe.LEFT_BOTTOM&&b!==Oe.RIGHT_TOP||(t=-e/x)),b===Oe.RIGHT_BOTTOM){const{offsetX:l,offsetY:o}=L(O+j+e,f+v+t);e-=l,t-=o,g&&(o?e=t*x:t=e/x),r=E(j+e),i=E(v+t)}else if(b===Oe.LEFT_BOTTOM){const{offsetX:l,offsetY:o}=L(O+e,f+v+t);e-=l,t-=o,g&&(o?e=-t*x:t=-e/x),r=E(j-e),i=E(v+t),s=O-(r-j)}else if(b===Oe.LEFT_TOP){const{offsetX:l,offsetY:o}=L(O+e,f+t);e-=l,t-=o,g&&(o?e=t*x:t=e/x),r=E(j-e),i=E(v-t),s=O-(r-j),d=f-(i-v)}else if(b===Oe.RIGHT_TOP){const{offsetX:l,offsetY:o}=L(O+j+e,f+t);e-=l,t-=o,g&&(o?e=-t*x:t=-e/x),r=E(j+e),i=E(v-t),d=f-(i-v)}else if(b===Oe.LEFT){const{offsetX:t}=L(O+e,null);e-=t,r=E(j-e),s=O-(r-j)}else if(b===Oe.RIGHT){const{offsetX:t}=L(O+j+e,null);e-=t,r=E(j+e)}else if(b===Oe.TOP){const{offsetY:e}=L(null,f+t);t-=e,i=E(v-t),d=f-(i-v)}else if(b===Oe.BOTTOM){const{offsetY:e}=L(null,f+v+t);t-=e,i=E(v+t)}}e.value=e.value.map(e=>{if(u.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=Ge[e.pathFormula];let l="";return l="editable"in t?t.formula(r,i,e.keypoint):t.formula(r,i),{...e,left:s,top:d,width:r,height:i,viewBox:[r,i],path:l}}return{...e,left:s,top:d,width:r,height:i}})},T=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const c=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,a=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;k===c&&C===a||(n.updateSlide({elements:e.value}),o.setScalingState(!1),s())};p?(document.ontouchmove=_,document.ontouchend=T):(document.onmousemove=_,document.onmouseup=T)},u=(t,o,a)=>{let r=!0;const{minX:d,maxX:u,minY:b,maxY:p}=o,m=u-d,O=p-b,f=m/O,j=t.pageX,v=t.pageY,h=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!r)return;const o=t.pageX,n=t.pageY,s=(o-j)/l.value;let y=(n-v)/l.value;i.value&&(a!==Oe.RIGHT_BOTTOM&&a!==Oe.LEFT_TOP||(y=s/f),a!==Oe.LEFT_BOTTOM&&a!==Oe.RIGHT_TOP||(y=-s/f));let g=d,x=u,k=b,C=p;a===Oe.RIGHT_BOTTOM?(x=u+s,C=p+y):a===Oe.LEFT_BOTTOM?(g=d+s,C=p+y):a===Oe.LEFT_TOP?(g=d+s,k=b+y):a===Oe.RIGHT_TOP?(x=u+s,k=b+y):a===Oe.TOP?k=b+y:a===Oe.BOTTOM?C=p+y:a===Oe.LEFT?g=d+s:a===Oe.RIGHT&&(x=u+s);const N=x-g,E=C-k;let w=N/m,V=E/O;w<=0&&(w=0),V<=0&&(V=0),e.value=e.value.map(e=>{if(("image"===e.type||"shape"===e.type)&&c.value.includes(e.id)){const t=h.find(t=>t.id===e.id);return{...e,width:t.width*w,height:t.height*V,left:g+(t.left-d)*w,top:k+(t.top-b)*V}}return e})},document.onmouseup=t=>{r=!1,document.onmousemove=null,document.onmouseup=null,j===t.pageX&&v===t.pageY||(n.updateSlide({elements:e.value}),s())}};return{scaleElement:d,scaleMultiElement:u}},oo=(e,t)=>{const l=Q(),{activeElementIdList:o,activeGroupElementId:n,handleElementId:c,editorAreaFocus:a}=Object(g["c"])(l),{ctrlOrShiftKeyActive:r}=Object(g["c"])(ie()),i=(i,s,d=!0)=>{if(a.value||l.setEditorareaFocus(!0),o.value.includes(s.id)){if(r.value){let t=[];if(s.groupId){const l=[];e.value.forEach(e=>{e.groupId===s.groupId&&l.push(e.id)}),t=o.value.filter(e=>!l.includes(e))}else t=o.value.filter(e=>e!==s.id);t.length>0&&l.setActiveElementIdList(t)}else if(c.value!==s.id)l.setHandleElementId(s.id);else if(n.value!==s.id){const e=i instanceof MouseEvent?i.pageX:i.changedTouches[0].pageX,t=i instanceof MouseEvent?i.pageY:i.changedTouches[0].pageY;i.target.onmouseup=o=>{const n=o.pageX,c=o.pageY;e===n&&t===c&&(l.setActiveGroupElementId(s.id),o.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...o.value,s.id]:[s.id],s.groupId){const l=[];e.value.forEach(e=>{e.groupId===s.groupId&&l.push(e.id)}),t=[...t,...l]}l.setActiveElementIdList(Object(G["uniq"])(t)),l.setHandleElementId(s.id)}d&&t(i,s)},s=()=>{const t=e.value.filter(e=>!e.lock),o=t.map(e=>e.id);l.setActiveElementIdList(o)};return{selectElement:i,selectAllElement:s}},no=(e,t,l)=>{const o=W(),{activeElementIdList:n,activeGroupElementId:c}=Object(g["c"])(Q()),{viewportRatio:a}=Object(g["c"])(o),{addHistorySnapshot:r}=Ze(),i=(i,s)=>{const d=!(i instanceof MouseEvent);if(d&&(!i.changedTouches||!i.changedTouches[0]))return;if(!n.value.includes(s.id))return;let u=!0;const b=He,p=He*a.value,m=5,O=JSON.parse(JSON.stringify(e.value)),f=O.filter(e=>n.value.includes(e.id)),j=s.left,v=s.top,h=s.width,y="height"in s&&s.height?s.height:0,g="rotate"in s&&s.rotate?s.rotate:0,x=d?i.changedTouches[0].pageX:i.pageX,k=d?i.changedTouches[0].pageY:i.pageY;let C=null;const N=s.id===c.value;let E=[],w=[];for(const t of e.value){if("line"===t.type)continue;if(N&&t.id===s.id)continue;if(!N&&n.value.includes(t.id))continue;let e,l,o,c;if("rotate"in t&&t.rotate){const{xRange:n,yRange:a}=Be({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=a[0],o=n[1]-n[0],c=a[1]-a[0]}else e=t.left,l=t.top,o=t.width,c=t.height;const a=e+o,r=l+c,i=l+c/2,d=e+o/2,u={value:l,range:[e,a]},b={value:r,range:[e,a]},p={value:i,range:[e,a]},m={value:e,range:[l,r]},O={value:a,range:[l,r]},f={value:d,range:[l,r]};E.push(u,b,p),w.push(m,O,f)}const V={value:0,range:[0,b]},I={value:p,range:[0,b]},S={value:p/2,range:[0,b]},B={value:0,range:[0,p]},L={value:b,range:[0,p]},_={value:b/2,range:[0,p]};E.push(V,I,S),w.push(B,L,_),E=Me(E),w=Me(w);const T=o=>{const c=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,a=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;if(!1!==C&&(C=Math.abs(x-c)<m&&Math.abs(k-a)<m),!u||C)return;const r=(c-x)/l.value,i=(a-k)/l.value;let d,b,p,O,V=j+r,I=v+i;if(1===n.value.length||N)if(g){const{xRange:e,yRange:t}=Be({left:V,top:I,width:h,height:y,rotate:g});d=e[0],b=e[1],p=t[0],O=t[1]}else"line"===s.type?(d=V,b=V+Math.max(s.start[0],s.end[0]),p=I,O=I+Math.max(s.start[1],s.end[1])):(d=V,b=V+h,p=I,O=I+y);else{const e=[],t=[],l=[],o=[];for(let n=0;n<f.length;n++){const c=f[n],a=c.left+r,s=c.top+i,d=c.width,u="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0;if("rotate"in c&&c.rotate){const{xRange:n,yRange:c}=Be({left:a,top:s,width:d,height:u,rotate:b});e.push(n[0]),t.push(c[0]),l.push(n[1]),o.push(c[1])}else"line"===c.type?(e.push(a),t.push(s),l.push(a+Math.max(c.start[0],c.end[0])),o.push(s+Math.max(c.start[1],c.end[1]))):(e.push(a),t.push(s),l.push(a+d),o.push(s+u))}d=Math.min(...e),b=Math.max(...l),p=Math.min(...t),O=Math.max(...o)}const S=d+(b-d)/2,B=p+(O-p)/2,L=[];let _=!1,T=!1;for(let e=0;e<E.length;e++){const{value:t,range:l}=E[e],o=Math.min(...l,d,b),n=Math.max(...l,d,b);Math.abs(p-t)<m&&!T&&(I-=p-t,T=!0,L.push({type:"horizontal",axis:{x:o-50,y:t},length:n-o+100})),Math.abs(O-t)<m&&!T&&(I-=O-t,T=!0,L.push({type:"horizontal",axis:{x:o-50,y:t},length:n-o+100})),Math.abs(B-t)<m&&!T&&(I-=B-t,T=!0,L.push({type:"horizontal",axis:{x:o-50,y:t},length:n-o+100}))}for(let e=0;e<w.length;e++){const{value:t,range:l}=w[e],o=Math.min(...l,p,O),n=Math.max(...l,p,O);Math.abs(d-t)<m&&!_&&(V-=d-t,_=!0,L.push({type:"vertical",axis:{x:t,y:o-50},length:n-o+100})),Math.abs(b-t)<m&&!_&&(V-=b-t,_=!0,L.push({type:"vertical",axis:{x:t,y:o-50},length:n-o+100})),Math.abs(S-t)<m&&!_&&(V-=S-t,_=!0,L.push({type:"vertical",axis:{x:t,y:o-50},length:n-o+100}))}if(t.value=L,1===n.value.length||N)e.value=e.value.map(e=>e.id===s.id?{...e,left:V,top:I}:e);else{const t=e.value.find(e=>e.id===s.id);if(!t)return;e.value=e.value.map(e=>n.value.includes(e.id)?e.id===s.id?{...e,left:V,top:I}:{...e,left:e.left+(V-t.left),top:e.top+(I-t.top)}:e)}},M=l=>{u=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,c=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;x===n&&k===c||(o.updateSlide({elements:e.value}),r())};d?(document.ontouchmove=T,document.ontouchend=M):(document.onmousemove=T,document.onmouseup=M)};return{dragElement:i}},co=e=>{const t=W(),{canvasScale:l}=Object(g["c"])(Q()),{addHistorySnapshot:o}=Ze(),n=(n,c,a)=>{let r=!0;const i=8,s=n.pageX,d=n.pageY,u=[];for(let t=0;t<e.value.length;t++){const l=e.value[t];if("line"===l.type||l.rotate)continue;const o=l.left,n=l.top,c=l.width,a=l.height,r=o+c,i=n+a,s=n+a/2,d=o+c/2,b={x:d,y:n},p={x:d,y:i},m={x:o,y:s},O={x:r,y:s},f={x:o,y:n},j={x:r,y:n},v={x:o,y:i},h={x:r,y:i};u.push(b,p,m,O,f,j,v,h)}document.onmousemove=t=>{if(!r)return;const o=t.pageX,n=t.pageY,b=(o-s)/l.value,p=(n-d)/l.value;let m=c.left+c.start[0],O=c.top+c.start[1],f=c.left+c.end[0],j=c.top+c.end[1];const v=c.broken||c.curve||[0,0];let h=c.left+v[0],y=c.top+v[1];const[g,x]=c.cubic||[[0,0],[0,0]];let k=c.left+g[0],C=c.top+g[1],N=c.left+x[0],E=c.top+x[1];if(a===fe.START){m+=b,O+=p,Math.abs(m-f)<i&&(m=f),Math.abs(O-j)<i&&(O=j);for(const e of u){const{x:t,y:l}=e;if(Math.abs(t-m)<i&&Math.abs(l-O)<i){m=t,O=l;break}}}else if(a===fe.END){f+=b,j+=p,Math.abs(m-f)<i&&(f=m),Math.abs(O-j)<i&&(j=O);for(const e of u){const{x:t,y:l}=e;if(Math.abs(t-f)<i&&Math.abs(l-j)<i){f=t,j=l;break}}}else a===fe.C?(h+=b,y+=p,Math.abs(h-m)<i&&(h=m),Math.abs(y-O)<i&&(y=O),Math.abs(h-f)<i&&(h=f),Math.abs(y-j)<i&&(y=j),Math.abs(h-(m+f)/2)<i&&Math.abs(y-(O+j)/2)<i&&(h=(m+f)/2,y=(O+j)/2)):a===fe.C1?(k+=b,C+=p,Math.abs(k-m)<i&&(k=m),Math.abs(C-O)<i&&(C=O),Math.abs(k-f)<i&&(k=f),Math.abs(C-j)<i&&(C=j)):a===fe.C2&&(N+=b,E+=p,Math.abs(N-m)<i&&(N=m),Math.abs(E-O)<i&&(E=O),Math.abs(N-f)<i&&(N=f),Math.abs(E-j)<i&&(E=j));const w=Math.min(m,f),V=Math.min(O,j),I=Math.max(m,f),S=Math.max(O,j),B=[0,0],L=[I-w,S-V];m>f&&(B[0]=I-w,L[0]=0),O>j&&(B[1]=S-V,L[1]=0),e.value=e.value.map(e=>{if(e.id===c.id){const t={...e,left:w,top:V,start:B,end:L};return a===fe.START||a===fe.END?(c.broken&&(t.broken=[(B[0]+L[0])/2,(B[1]+L[1])/2]),c.curve&&(t.curve=[(B[0]+L[0])/2,(B[1]+L[1])/2]),c.cubic&&(t.cubic=[[(B[0]+L[0])/2,(B[1]+L[1])/2],[(B[0]+L[0])/2,(B[1]+L[1])/2]])):a===fe.C?(c.broken&&(t.broken=[h-w,y-V]),c.curve&&(t.curve=[h-w,y-V])):c.cubic&&(t.cubic=[[k-w,C-V],[N-w,E-V]]),t}return e})},document.onmouseup=l=>{r=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,c=l.pageY;s===n&&d===c||(t.updateSlide({elements:e.value}),o())}};return{dragLineElement:n}},ao=(e,t)=>{const l=W(),{addHistorySnapshot:o}=Ze(),n=(n,c)=>{const a=!(n instanceof MouseEvent);if(a&&(!n.changedTouches||!n.changedTouches[0]))return;let r=!0;const i=a?n.changedTouches[0].pageX:n.pageX,s=a?n.changedTouches[0].pageY:n.pageY,d=Ge[c.pathFormula];let u=null;if("editable"in d){const e=d.getBaseSize(c.width,c.height),t=e*c.keypoint,[l,o]=d.range,n=d.relative;u={baseSize:e,originPos:t,min:l,max:o,relative:n}}const b=l=>{if(!r)return;const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,a=(o-i)/t.value,b=(n-s)/t.value;e.value=e.value.map(e=>{if(e.id===c.id&&u){const{baseSize:t,originPos:l,min:o,max:n,relative:c}=u,r=e;let i=0;return"left"===c&&(i=(l+a)/t),"right"===c&&(i=(l-a)/t),"center"===c&&(i=(l-2*a)/t),"top"===c&&(i=(l+b)/t),"bottom"===c&&(i=(l-b)/t),i<o&&(i=o),i>n&&(i=n),{...e,keypoint:i,path:d.formula(r.width,r.height,i)}}return e})},p=t=>{r=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,c=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;i===n&&s===c||(l.updateSlide({elements:e.value}),o())};a?(document.ontouchmove=b,document.ontouchend=p):(document.onmousemove=b,document.onmouseup=p)};return{moveShapeKeypoint:n}},ro=e=>{const t=Q(),{canvasScale:l,creatingElement:o}=Object(g["c"])(t),n=t=>{const{start:o,end:n}=t;if(!e.value)return;const c=e.value.getBoundingClientRect(),[a,r]=o,[i,s]=n,d=Math.min(a,i),u=Math.max(a,i),b=Math.min(r,s),p=Math.max(r,s),m=(d-c.x)/l.value,O=(b-c.y)/l.value,f=(u-d)/l.value,j=(p-b)/l.value;return{left:m,top:O,width:f,height:j}},c=t=>{const{start:o,end:n}=t;if(!e.value)return;const c=e.value.getBoundingClientRect(),[a,r]=o,[i,s]=n,d=Math.min(a,i),u=Math.max(a,i),b=Math.min(r,s),p=Math.max(r,s),m=(d-c.x)/l.value,O=(b-c.y)/l.value,f=(u-d)/l.value,j=(p-b)/l.value,v=[a===d?0:f,r===b?0:j],h=[i===d?0:f,s===b?0:j];return{left:m,top:O,start:v,end:h}},{createTextElement:a,createShapeElement:r,createLineElement:i}=We(),s=e=>{if(!o.value)return;const l=o.value.type;if("text"===l){const t=n(e);t&&a(t,{vertical:o.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,o.value.data)}else if("line"===l){const t=c(e);t&&i(t,o.value.data)}t.setCreatingElement(null)};return{insertElementFromCreateSelection:s}},io=()=>{const e=W(),{activeElementIdList:t,activeElementList:l}=Object(g["c"])(Q()),{currentSlide:o,viewportRatio:n}=Object(g["c"])(e),{addHistorySnapshot:c}=Ze(),a=a=>{const r=He,i=He*n.value,{minX:s,maxX:d,minY:u,maxY:b}=Te(l.value),p=JSON.parse(JSON.stringify(o.value.elements));for(const e of p)if(t.value.includes(e.id)){if(a===pe.CENTER){const t=u+(b-u)/2-i/2,l=s+(d-s)/2-r/2;e.top=e.top-t,e.left=e.left-l}if(a===pe.TOP){const t=u-0;e.top=e.top-t}else if(a===pe.VERTICAL){const t=u+(b-u)/2-i/2;e.top=e.top-t}else if(a===pe.BOTTOM){const t=b-i;e.top=e.top-t}else if(a===pe.LEFT){const t=s-0;e.left=e.left-t}else if(a===pe.HORIZONTAL){const t=s+(d-s)/2-r/2;e.left=e.left-t}else if(a===pe.RIGHT){const t=d-r;e.left=e.left-t}}e.updateSlide({elements:p}),c()};return{alignElementToCanvas:a}},so=e=>{const t=Object(y["computed"])(()=>{if(e.value){const{h:t,v:l,blur:o,color:n}=e.value;return`${t}px ${l}px ${o}px ${n}`}return""});return{shadowStyle:t}},uo=(e,t)=>{const l=Object(y["computed"])(()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l});return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})(eo||(eo={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(to||(to={}));const bo={rect:{name:"矩形",type:eo.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:eo.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:eo.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:eo.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:eo.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:eo.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:eo.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:eo.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:eo.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:eo.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:eo.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:eo.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:eo.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:eo.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:eo.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:eo.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:eo.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:eo.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:eo.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:eo.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var po=e=>{const t=Object(y["computed"])(()=>{if(!e.value)return bo.rect;const t=e.value.shape||eo.RECT;return bo[t]}),l=Object(y["computed"])(()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,o=(l[0]-t[0])/100,n=(l[1]-t[1])/100,c=t[0]/o,a=t[1]/n;return{left:-c+"%",top:-a+"%",width:100/o+"%",height:100/n+"%"}});return{clipShape:t,imgPosition:l}},mo=e=>{const t=Object(y["computed"])(()=>{if(!e.value)return"";let t="";for(const l of Object.keys(e.value))t+=`${l}(${e.value[l]}) `;return t});return{filter:t}},Oo=e=>{const t=Object(y["computed"])(()=>{var t,l;return null!==(t=null===(l=e.value)||void 0===l?void 0:l.width)&&void 0!==t?t:0}),l=Object(y["computed"])(()=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.style)||"solid"}),o=Object(y["computed"])(()=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.color)||"#d14424"});return{outlineWidth:t,outlineStyle:l,outlineColor:o}};const fo=["width","height"],jo=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var vo=Object(y["defineComponent"])({__name:"ImageRectOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineStyle:o,outlineColor:n}=Oo(Object(y["toRef"])(t,"outline"));return(t,c)=>e.outline?(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[Object(y["createElementVNode"])("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:Object(y["unref"])(n),"stroke-width":Object(y["unref"])(l),"stroke-dasharray":"dashed"===Object(y["unref"])(o)?"10 6":"0 0"},null,8,jo)],8,fo)):Object(y["createCommentVNode"])("",!0)}});l("fef7");const ho=ol()(vo,[["__scopeId","data-v-b5bace06"]]);var yo=ho;const go=["width","height"],xo=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var ko=Object(y["defineComponent"])({__name:"ImageEllipseOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:o,outlineColor:n}=Oo(Object(y["toRef"])(t,"outline"));return(t,c)=>e.outline?(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[Object(y["createElementVNode"])("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:Object(y["unref"])(n),"stroke-width":Object(y["unref"])(l),"stroke-dasharray":"dashed"===Object(y["unref"])(o)?"10 6":"0 0"},null,8,xo)],8,go)):Object(y["createCommentVNode"])("",!0)}});l("45c15");const Co=ol()(ko,[["__scopeId","data-v-71b17928"]]);var No=Co;const Eo=["width","height"],wo=["d","stroke","stroke-width","stroke-dasharray"];var Vo=Object(y["defineComponent"])({__name:"ImagePolygonOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},createPath:{type:Function,required:!0}},setup(e){const t=e,{outlineWidth:l,outlineStyle:o,outlineColor:n}=Oo(Object(y["toRef"])(t,"outline"));return(t,c)=>e.outline?(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[Object(y["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:Object(y["unref"])(n),"stroke-width":Object(y["unref"])(l),"stroke-dasharray":"dashed"===Object(y["unref"])(o)?"10 6":"0 0"},null,8,wo)],8,Eo)):Object(y["createCommentVNode"])("",!0)}});l("180d");const Io=ol()(Vo,[["__scopeId","data-v-41071294"]]);var So=Io;const Bo={class:"image-outline"};var Lo=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.elementInfo.clip),{clipShape:o}=po(l);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Bo,["rect"===Object(y["unref"])(o).type?(Object(y["openBlock"])(),Object(y["createBlock"])(yo,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:Object(y["unref"])(o).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===Object(y["unref"])(o).type?(Object(y["openBlock"])(),Object(y["createBlock"])(No,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===Object(y["unref"])(o).type?(Object(y["openBlock"])(),Object(y["createBlock"])(So,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:Object(y["unref"])(o).createPath},null,8,["width","height","outline","createPath"])):Object(y["createCommentVNode"])("",!0)]))}});const _o=Lo;var To=_o;const Mo=e=>(Object(y["pushScopeId"])("data-v-3e0199ec"),e=e(),Object(y["popScopeId"])(),e),Do=["src"],zo=["src"],Ao=["onMousedown"],Fo=Mo(()=>Object(y["createElementVNode"])("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[Object(y["createElementVNode"])("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"})],-1)),$o=[Fo],Ro=["onMousedown"],Po=Mo(()=>Object(y["createElementVNode"])("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[Object(y["createElementVNode"])("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1)),Ho=[Po];var qo=Object(y["defineComponent"])({__name:"ImageClipHandler",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},rotate:{type:Number,required:!0}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:o}=Object(g["c"])(Q()),{ctrlOrShiftKeyActive:n}=Object(g["c"])(ie()),c=Object(y["ref"])({top:"0",left:"0"}),a=Object(y["ref"])(!1),r=Object(y["ref"])(null),i=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],o=(t[0]-e[0])/100,n=(t[1]-e[1])/100,c=e[0]/o,a=e[1]/n;return{widthScale:o,heightScale:n,left:c,top:a}},s=Object(y["computed"])(()=>{const{widthScale:e,heightScale:t,left:l,top:o}=i();return{left:-l,top:-o,width:100/e,height:100/t}}),d=Object(y["computed"])(()=>({top:s.value.top+"%",left:s.value.left+"%",width:s.value.width+"%",height:s.value.height+"%"})),u=Object(y["ref"])({top:0,left:0,width:0,height:0}),b=Object(y["computed"])(()=>{const{top:e,left:t,width:l,height:o}=u.value;return{top:e+"%",left:t+"%",width:l+"%",height:o+"%"}}),p=Object(y["computed"])(()=>{const e=s.value.width,t=s.value.height,{top:l,left:o,width:n,height:c}=u.value;return{left:100/n*-o+"%",top:100/c*-l+"%",width:e/n*100+"%",height:t/c*100+"%"}}),m=()=>{const{left:e,top:t}=i();u.value={left:e,top:t,width:100,height:100},c.value={top:-t+"%",left:-e+"%"}},O=()=>{if(a.value)return;if(!r.value)return void t("clip",null);const{left:e,top:o}=i(),n={left:(u.value.left-e)/100*l.width,top:(u.value.top-o)/100*l.height,width:(u.value.width-100)/100*l.width,height:(u.value.height-100)/100*l.height},c={range:r.value,position:n};t("clip",c)},f=e=>{const t=e.key.toUpperCase();t===je.ENTER&&O()};Object(y["onMounted"])(()=>{m(),document.addEventListener("keydown",f)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("keydown",f)});const j=()=>{const 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,l=100/e.height,o=[-e.left*t,-e.top*l],n=[100*t+o[0],100*l+o[1]];r.value=[o,n]},v=e=>{a.value=!0;let t=!0;const n=e.pageX,c=e.pageY,r=s.value,i={...u.value};document.onmousemove=e=>{if(!t)return;const a=e.pageX,s=e.pageY;let d=(a-n)/o.value/l.width*100,b=(s-c)/o.value/l.height*100;l.rotate>45&&l.rotate<135&&(d=(s-c)/o.value/l.width*100,b=-(a-n)/o.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(d=-d,b=-b),l.rotate>-135&&l.rotate<-45&&(d=-(s-c)/o.value/l.width*100,b=(a-n)/o.value/l.height*100);let p=i.left+d,m=i.top+b;p<0?p=0:p+i.width>r.width&&(p=r.width-i.width),m<0?m=0:m+i.height>r.height&&(m=r.height-i.height),u.value={...u.value,left:p,top:m}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,j(),setTimeout(()=>{a.value=!1},0)}},h=(e,t)=>{a.value=!0;let c=!0;const r=50/l.width*100,i=50/l.height*100,d=e.pageX,b=e.pageY,p=s.value,m={...u.value},O=u.value.width/u.value.height;document.onmousemove=e=>{if(!c)return;const a=e.pageX,s=e.pageY;let f,j,v,h,y=(a-d)/o.value/l.width*100,g=(s-b)/o.value/l.height*100;l.rotate>45&&l.rotate<135&&(y=(s-b)/o.value/l.width*100,g=-(a-d)/o.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(y=-y,g=-g),l.rotate>-135&&l.rotate<-45&&(y=-(s-b)/o.value/l.width*100,g=(a-d)/o.value/l.height*100),n.value&&(t!==Oe.RIGHT_BOTTOM&&t!==Oe.LEFT_TOP||(g=y/O),t!==Oe.LEFT_BOTTOM&&t!==Oe.RIGHT_TOP||(g=-y/O)),t===Oe.LEFT_TOP?(m.left+y<0&&(y=-m.left),m.top+g<0&&(g=-m.top),m.width-y<r&&(y=m.width-r),m.height-g<i&&(g=m.height-i),v=m.width-y,h=m.height-g,f=m.left+y,j=m.top+g):t===Oe.RIGHT_TOP?(m.left+m.width+y>p.width&&(y=p.width-(m.left+m.width)),m.top+g<0&&(g=-m.top),m.width+y<r&&(y=r-m.width),m.height-g<i&&(g=m.height-i),v=m.width+y,h=m.height-g,f=m.left,j=m.top+g):t===Oe.LEFT_BOTTOM?(m.left+y<0&&(y=-m.left),m.top+m.height+g>p.height&&(g=p.height-(m.top+m.height)),m.width-y<r&&(y=m.width-r),m.height+g<i&&(g=i-m.height),v=m.width-y,h=m.height+g,f=m.left+y,j=m.top):t===Oe.RIGHT_BOTTOM?(m.left+m.width+y>p.width&&(y=p.width-(m.left+m.width)),m.top+m.height+g>p.height&&(g=p.height-(m.top+m.height)),m.width+y<r&&(y=r-m.width),m.height+g<i&&(g=i-m.height),v=m.width+y,h=m.height+g,f=m.left,j=m.top):t===Oe.TOP?(m.top+g<0&&(g=-m.top),m.height-g<i&&(g=m.height-i),v=m.width,h=m.height-g,f=m.left,j=m.top+g):t===Oe.BOTTOM?(m.top+m.height+g>p.height&&(g=p.height-(m.top+m.height)),m.height+g<i&&(g=i-m.height),v=m.width,h=m.height+g,f=m.left,j=m.top):t===Oe.LEFT?(m.left+y<0&&(y=-m.left),m.width-y<r&&(y=m.width-r),v=m.width-y,h=m.height,f=m.left+y,j=m.top):(m.left+m.width+y>p.width&&(y=p.width-(m.left+m.width)),m.width+y<r&&(y=r-m.width),h=m.height,v=m.width+y,f=m.left,j=m.top),u.value={left:f,top:j,width:v,height:h}},document.onmouseup=()=>{c=!1,document.onmousemove=null,document.onmouseup=null,j(),setTimeout(()=>a.value=!1,0)}},x=Object(y["computed"])(()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0}),k=[Oe.LEFT_TOP,Oe.RIGHT_TOP,Oe.LEFT_BOTTOM,Oe.RIGHT_BOTTOM],C=[Oe.TOP,Oe.BOTTOM,Oe.LEFT,Oe.RIGHT];return(t,l)=>{const o=Object(y["resolveDirective"])("click-outside");return Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"image-clip-handler",style:Object(y["normalizeStyle"])(c.value)},[Object(y["createElementVNode"])("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:Object(y["normalizeStyle"])(Object(y["unref"])(d))},null,12,Do),Object(y["createElementVNode"])("div",{class:"top-image-content",style:Object(y["normalizeStyle"])({...Object(y["unref"])(b),clipPath:e.clipPath})},[Object(y["createElementVNode"])("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:Object(y["normalizeStyle"])(Object(y["unref"])(p))},null,12,zo)],4),Object(y["createElementVNode"])("div",{class:"operate",style:Object(y["normalizeStyle"])(Object(y["unref"])(b)),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(e=>v(e),["stop"]))},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(k,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["clip-point",e,Object(y["unref"])(x)]),key:e,onMousedown:Object(y["withModifiers"])(t=>h(t,e),["stop"])},$o,42,Ao)),64)),(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(C,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["clip-point",e,Object(y["unref"])(x)]),key:e,onMousedown:Object(y["withModifiers"])(t=>h(t,e),["stop"])},Ho,42,Ro)),64))],36)],4)),[[o,O]])}}});l("5970");const Uo=ol()(qo,[["__scopeId","data-v-3e0199ec"]]);var Go=Uo;const Xo=["src"];var Yo=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=Q(),o=W(),{clipingImageElementId:n}=Object(g["c"])(l),c=Object(y["computed"])(()=>n.value===t.elementInfo.id),{addHistorySnapshot:a}=Ze(),r=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:i}=so(r),s=Object(y["computed"])(()=>t.elementInfo.flipH),d=Object(y["computed"])(()=>t.elementInfo.flipV),{flipStyle:u}=uo(s,d),b=Object(y["computed"])(()=>t.elementInfo.clip),{clipShape:p,imgPosition:m}=po(b),O=Object(y["computed"])(()=>t.elementInfo.filters),{filter:f}=mo(O),j=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},v=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:c}=e,r=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},i=t.elementInfo.left+c.left,s=t.elementInfo.top+c.top,d=t.elementInfo.width+c.width,u=t.elementInfo.height+c.height;let b=0,p=0;if(t.elementInfo.rotate){const e=i+d/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(s+u/2-(t.elementInfo.top+t.elementInfo.height/2)),o=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(o)-l*Math.sin(o),c=e*Math.sin(o)+l*Math.cos(o);b=n-e,p=-(c-l)}const m={clip:{...r,range:n},left:i+b,top:s+p,width:d,height:u};o.updateElement({id:t.elementInfo.id,props:m}),a()};return(t,l)=>{const o=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-image",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["unref"])(c)?(Object(y["openBlock"])(),Object(y["createBlock"])(Go,{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,rotate:e.elementInfo.rotate,clipPath:Object(y["unref"])(p).style,onClip:l[0]||(l[0]=e=>v(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:1,class:"element-content",style:Object(y["normalizeStyle"])({filter:Object(y["unref"])(i)?`drop-shadow(${Object(y["unref"])(i)})`:"",transform:Object(y["unref"])(u)}),onMousedown:l[2]||(l[2]=e=>j(e)),onTouchstart:l[3]||(l[3]=e=>j(e))},[Object(y["createVNode"])(To,{elementInfo:e.elementInfo},null,8,["elementInfo"]),Object(y["createElementVNode"])("div",{class:"image-content",style:Object(y["normalizeStyle"])({clipPath:Object(y["unref"])(p).style})},[Object(y["createElementVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:Object(y["normalizeStyle"])({top:Object(y["unref"])(m).top,left:Object(y["unref"])(m).left,width:Object(y["unref"])(m).width,height:Object(y["unref"])(m).height,filter:Object(y["unref"])(f)}),onDragstart:l[1]||(l[1]=Object(y["withModifiers"])(()=>{},["prevent"])),alt:""},null,44,Xo),e.elementInfo.colorMask?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"color-mask",style:Object(y["normalizeStyle"])({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):Object(y["createCommentVNode"])("",!0)],4)],36)),[[o,e.contextmenus]])],4)],6)}}});l("bcf0");const Zo=ol()(Yo,[["__scopeId","data-v-963e3dfc"]]);var Wo=Zo;const Jo=["width","height"],Ko=["d","stroke","stroke-width","stroke-dasharray"];var Qo=Object(y["defineComponent"])({__name:"ElementOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:o,outlineColor:n}=Oo(Object(y["toRef"])(t,"outline"));return(t,c)=>e.outline?(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[Object(y["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:Object(y["unref"])(n),"stroke-width":Object(y["unref"])(l),"stroke-dasharray":"dashed"===Object(y["unref"])(o)?"10 6":"0 0"},null,8,Ko)],8,Jo)):Object(y["createCommentVNode"])("",!0)}});l("4731");const en=ol()(Qo,[["__scopeId","data-v-61b7d06a"]]);var tn=en,ln=l("6ffb"),on=l("703f"),nn=l("6f27"),cn=l("e3da"),an=l("f201"),rn=l("a59f"),sn=l("224d"),dn=l("838c"),un=l("72a8");const bn=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",N["c"]),l("Alt-ArrowDown",N["b"]),l("Ctrl-z",an["c"]),l("Ctrl-y",an["b"]),l("Backspace",un["f"]),l("Escape",N["e"]),l("Ctrl-b",Object(N["f"])(e.marks.strong)),l("Ctrl-i",Object(N["f"])(e.marks.em)),l("Ctrl-u",Object(N["f"])(e.marks.underline)),l("Ctrl-d",Object(N["f"])(e.marks.strikethrough)),l("Enter",Object(dn["f"])(e.nodes.list_item)),l("Mod-[",Object(dn["b"])(e.nodes.list_item)),l("Mod-]",Object(dn["e"])(e.nodes.list_item)),t},pn=e=>Object(un["g"])(/^\s*>\s$/,e),mn=e=>Object(un["g"])(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order===+e[1]),On=e=>Object(un["g"])(/^\s*([-+*])\s$/,e),fn=e=>Object(un["e"])(/^```$/,e),jn=e=>{const t=[...un["d"],un["a"],un["b"]];return t.push(pn(e.nodes.blockquote)),t.push(mn(e.nodes.ordered_list)),t.push(On(e.nodes.bullet_list)),t.push(fn(e.nodes.code_block)),Object(un["c"])({rules:t})},vn=e=>[jn(e),Object(cn["b"])(bn(e)),Object(cn["b"])(N["a"]),Object(rn["a"])(),Object(sn["a"])(),Object(an["a"])()];var hn=l("f899");const yn={...dn["d"],content:"list_item+",group:"block"},gn={...dn["a"],content:"list_item+",group:"block"},xn={...dn["c"],content:"paragraph block*",group:"block"},kn={attrs:{align:{default:""},indent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t}=e.style;let l=e.getAttribute("align")||t||"";l=/(left|right|center|justify)/.test(l)?l:"";const o=+(e.getAttribute("data-indent")||0);return{align:l,indent:o}}}],toDOM:e=>{const{align:t,indent:l}=e.attrs;let o="";t&&"left"!==t&&(o+=`text-align: ${t};`);const n={style:o};return l&&(n["data-indent"]=l),["p",n,0]}},{hard_break:Cn,...Nn}=hn["b"];var En={...Nn,ordered_list:yn,bullet_list:gn,list_item:xn,paragraph:kn};const wn={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},Vn={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},In={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through"},0]},Sn={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline"},0]},Bn={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},Ln={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},_n={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+="font-size: "+t),["span",{style:l},0]}},Tn={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+="font-family: "+t),["span",{style:l},0]}},Mn={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]};var Dn={...hn["a"],subscript:wn,superscript:Vn,strikethrough:In,underline:Sn,forecolor:Bn,backcolor:Ln,fontsize:_n,fontname:Tn,link:Mn};const zn=En,An=Dn,Fn=new nn["i"]({nodes:zn,marks:An}),$n=e=>{const t=`<div>${e}</div>`,l=new window.DOMParser,o=l.parseFromString(t,"text/html").body.firstElementChild;return nn["a"].fromSchema(Fn).parse(o)},Rn=(e,t,l={})=>new on["c"](e,{state:ln["b"].create({doc:$n(t),plugins:vn(Fn)}),...l});var Pn,Hn=l("1344");(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(Pn||(Pn={}));const qn=Object(Hn["a"])();var Un=qn;const Gn=(e,t,l)=>{const{selection:o,doc:n}=e;if(!o||!n)return e;const{from:c,to:a}=o,{nodes:r}=t,i=r.blockquote,s=r.list_item,d=r.paragraph,u=[];l=l||"";const b=new Set([i,s,d]);return n.nodesBetween(c,a,(e,t)=>{const o=e.type,n=e.attrs.align||"";return n!==l&&b.has(o)&&u.push({node:e,pos:t,nodeType:o}),!0}),u.length?(u.forEach(t=>{const{node:o,pos:n,nodeType:c}=t;let{attrs:a}=o;a=l?{...a,align:l}:{...a,align:null},e=e.setNodeMarkup(n,c,a,o.marks)}),e):e},Xn=(e,t)=>{const{state:l}=e,{schema:o,selection:n}=l,c=Gn(l.tr.setSelection(n),o,t);e.dispatch(c)},Yn=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,Zn=(e,t)=>(l,o)=>{const{schema:n,selection:c}=l,{$from:a,$to:r}=c,i=a.blockRange(r);if(!i)return!1;const s=B(e=>Yn(e,n))(c);if(i.depth>=1&&s&&i.depth-s.depth<=1){if(s.node.type===e)return Object(dn["b"])(t)(l,o);if(Yn(s.node,n)&&e.validContent(s.node.content)){const{tr:t}=l;return t.setNodeMarkup(s.pos,e),o&&o(t),!1}}return Object(dn["g"])(e)(l,o)};function Wn(e,t,l){if(!e.doc)return e;const o=e.doc.nodeAt(t);if(!o)return e;const n=0,c=7;let a=(o.attrs.indent||0)+l;if(a<n&&(a=n),a>c&&(a=c),a===o.attrs.indent)return e;const r={...o.attrs,indent:a};return e.setNodeMarkup(t,o.type,r,o.marks)}const Jn=(e,t,l)=>{const{selection:o,doc:n}=e;if(!o||!n)return e;if(!(o instanceof ln["g"]||o instanceof ln["a"]))return e;const{from:c,to:a}=o;return n.nodesBetween(c,a,(o,n)=>{const c=o.type;return"paragraph"===c.name||"blockquote"===c.name?(e=Wn(e,n,l),!1):!Yn(o,t)}),e},Kn=(e,t)=>{const{state:l}=e,{schema:o,selection:n}=l,c=Jn(l.tr.setSelection(n),o,t);return!!c.docChanged&&(e.dispatch(c),!0)};var Qn=Object(y["defineComponent"])({__name:"ProsemirrorEditor",props:{elementId:{type:String,required:!0},defaultColor:{type:String,required:!0},defaultFontName:{type:String,required:!0},editable:{type:Boolean,default:!1},value:{type:String,required:!0},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur"],setup(e,{expose:t,emit:l}){const o=e,n=Q(),{handleElementId:c}=Object(g["c"])(n),a=Object(y["ref"])();let r;const i=Object(G["debounce"])((function(){l("update",r.dom.innerHTML)}),300,{trailing:!0}),s=()=>{n.setDisableHotkeysState(!0),l("focus")},d=()=>{n.setDisableHotkeysState(!1),l("blur")},u=Object(G["debounce"])((function(){const e=$(r,{color:o.defaultColor,fontname:o.defaultFontName});n.setRichtextAttrs(e)}),30,{trailing:!0}),b=()=>{i(),u()},p=Object(y["computed"])(()=>o.value);Object(y["watch"])(p,()=>{if(!r)return;if(r.hasFocus())return;const{doc:e,tr:t}=r.state;r.dispatch(t.replaceRangeWith(0,e.content.size,$n(p.value)))}),Object(y["watch"])(()=>o.editable,()=>{r.setProps({editable:()=>o.editable})}),Object(y["onMounted"])(()=>{r=Rn(a.value,p.value,{handleDOMEvents:{focus:s,blur:d,keydown:b,click:u},editable:()=>o.editable}),o.autoFocus&&r.focus()}),Object(y["onUnmounted"])(()=>{r&&r.destroy()});const m=()=>r.focus();t({focus:m});const O=({target:e,action:t})=>{if(!e&&c.value!==o.elementId)return;if(e&&e!==o.elementId)return;const l="command"in t?[t]:t;for(const o of l)if("fontname"===o.command&&o.value){const e=r.state.schema.marks.fontname.create({fontname:o.value});E(r),w(r,e)}else if("fontsize"===o.command&&o.value){const e=r.state.schema.marks.fontsize.create({fontsize:o.value});E(r),w(r,e)}else if("fontsize-add"===o.command){const e=o.value?+o.value:2;E(r);const t=R(r)+e+"px",l=r.state.schema.marks.fontsize.create({fontsize:t});w(r,l)}else if("fontsize-reduce"===o.command){const e=o.value?+o.value:2;E(r);let t=R(r)-e;t<12&&(t=12);const l=r.state.schema.marks.fontsize.create({fontsize:t+"px"});w(r,l)}else if("color"===o.command&&o.value){const e=r.state.schema.marks.forecolor.create({color:o.value});E(r),w(r,e)}else if("backcolor"===o.command&&o.value){const e=r.state.schema.marks.backcolor.create({backcolor:o.value});E(r),w(r,e)}else if("bold"===o.command)E(r),Object(N["f"])(r.state.schema.marks.strong)(r.state,r.dispatch);else if("em"===o.command)E(r),Object(N["f"])(r.state.schema.marks.em)(r.state,r.dispatch);else if("underline"===o.command)E(r),Object(N["f"])(r.state.schema.marks.underline)(r.state,r.dispatch);else if("strikethrough"===o.command)E(r),Object(N["f"])(r.state.schema.marks.strikethrough)(r.state,r.dispatch);else if("subscript"===o.command)Object(N["f"])(r.state.schema.marks.subscript)(r.state,r.dispatch);else if("superscript"===o.command)Object(N["f"])(r.state.schema.marks.superscript)(r.state,r.dispatch);else if("blockquote"===o.command)Object(N["g"])(r.state.schema.nodes.blockquote)(r.state,r.dispatch);else if("code"===o.command)Object(N["f"])(r.state.schema.marks.code)(r.state,r.dispatch);else if("align"===o.command&&o.value)Xn(r,o.value);else if("indent"===o.command&&o.value)Kn(r,+o.value);else if("bulletList"===o.command){const{bullet_list:e,list_item:t}=r.state.schema.nodes;Zn(e,t)(r.state,r.dispatch)}else if("orderedList"===o.command){const{ordered_list:e,list_item:t}=r.state.schema.nodes;Zn(e,t)(r.state,r.dispatch)}else if("clear"===o.command){E(r);const{$from:e,$to:t}=r.state.selection;r.dispatch(r.state.tr.removeMark(e.pos,t.pos))}else if("link"===o.command){const e=r.state.schema.marks.link,{from:t,to:l}=r.state.selection,n=V(r.state.doc,t,l,e);if(n)if(o.value){const e=r.state.schema.marks.link.create({href:o.value,title:o.value});w(r,e,{from:n.from.pos,to:n.to.pos+1})}else r.dispatch(r.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(z(r.state,e))if(o.value){const e=r.state.schema.marks.link.create({href:o.value,title:o.value});w(r,e)}else Object(N["f"])(e)(r.state,r.dispatch);else o.value&&(E(r),Object(N["f"])(e,{href:o.value,title:o.value})(r.state,r.dispatch))}else"insert"===o.command&&o.value&&r.dispatch(r.state.tr.insertText(o.value));r.focus(),i(),u()};return Un.on(Pn.RICH_TEXT_COMMAND,O),Object(y["onUnmounted"])(()=>{Un.off(Pn.RICH_TEXT_COMMAND,O)}),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:a},null,512))}});l("a511");const ec=ol()(Qn,[["__scopeId","data-v-1debd6ff"]]);var tc=ec;const lc=e=>(Object(y["pushScopeId"])("data-v-e2312e2e"),e=e(),Object(y["popScopeId"])(),e),oc=lc(()=>Object(y["createElementVNode"])("div",{class:"drag-handler top"},null,-1)),nc=lc(()=>Object(y["createElementVNode"])("div",{class:"drag-handler bottom"},null,-1));var cc=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=Q(),o=W(),{handleElementId:n,isScaling:c}=Object(g["c"])(l),{addHistorySnapshot:a}=Ze(),r=Object(y["ref"])(),i=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:s}=so(i),d=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},u=Object(y["ref"])(-1),b=Object(y["ref"])(-1);Object(y["watch"])(c,()=>{n.value===t.elementInfo.id&&(c.value||(t.elementInfo.vertical||-1===u.value||(o.updateElement({id:t.elementInfo.id,props:{height:u.value}}),u.value=-1),t.elementInfo.vertical&&-1!==b.value&&(o.updateElement({id:t.elementInfo.id,props:{width:b.value}}),b.value=-1)))});const p=e=>{const l=e[0].contentRect;if(!r.value)return;const n=l.height+20,a=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(c.value?u.value=n:o.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==a&&(c.value?b.value=a:o.updateElement({id:t.elementInfo.id,props:{width:a}}))},m=new ResizeObserver(p);Object(y["onMounted"])(()=>{r.value&&m.observe(r.value)}),Object(y["onUnmounted"])(()=>{r.value&&m.unobserve(r.value)});const O=e=>{o.updateElement({id:t.elementInfo.id,props:{content:e}}),a()},f=()=>{const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||o.deleteElement(t.elementInfo.id)},j=Object(y["computed"])(()=>n.value===t.elementInfo.id);return Object(y["watch"])(j,()=>{j.value||f()}),(t,l)=>{const o=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-text",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",ref_key:"elementRef",ref:r,style:Object(y["normalizeStyle"])({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:Object(y["unref"])(s),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:l[3]||(l[3]=e=>d(e)),onTouchstart:l[4]||(l[4]=e=>d(e))},[Object(y["createVNode"])(tn,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(y["createVNode"])(tc,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:Object(y["normalizeStyle"])({"--textIndent":(e.elementInfo.textIndent||0)+"px","--paragraphSpace":(void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace)+"px"}),onUpdate:l[0]||(l[0]=e=>O(e)),onMousedown:l[1]||(l[1]=e=>d(e,!1)),onTouchstart:l[2]||(l[2]=e=>d(e))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),oc,nc],36)),[[o,e.contextmenus]])],4)],6)}}});l("7832");const ac=ol()(cc,[["__scopeId","data-v-e2312e2e"]]);var rc=ac;const ic=["id","gradientTransform"],sc=["stop-color"],dc=["stop-color"],uc=["id"],bc=["stop-color"],pc=["stop-color"];var mc=Object(y["defineComponent"])({__name:"GradientDefs",props:{id:{type:String,required:!0},type:{type:String},color1:{type:String,required:!0},color2:{type:String,required:!0},rotate:{type:Number,default:0}},setup(e){return(t,l)=>"linear"===e.type?(Object(y["openBlock"])(),Object(y["createElementBlock"])("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[Object(y["createElementVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,sc),Object(y["createElementVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,dc)],8,ic)):(Object(y["openBlock"])(),Object(y["createElementBlock"])("radialGradient",{key:1,id:e.id},[Object(y["createElementVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,bc),Object(y["createElementVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,pc)],8,uc))}});const Oc=mc;var fc=Oc;const jc=["width","height"],vc={key:0},hc=["transform"],yc=["d","fill","stroke","stroke-width","stroke-dasharray"];var gc=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=Q(),o=W(),{handleElementId:n}=Object(g["c"])(l),{addHistorySnapshot:c}=Ze(),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},r=Object(y["computed"])(()=>t.elementInfo.outline),{outlineWidth:i,outlineStyle:s,outlineColor:d}=Oo(r),u=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:b}=so(u),p=Object(y["computed"])(()=>t.elementInfo.flipH),m=Object(y["computed"])(()=>t.elementInfo.flipV),{flipStyle:O}=uo(p,m),f=Object(y["ref"])(!1);Object(y["watch"])(n,()=>{n.value!==t.elementInfo.id&&f.value&&(f.value=!1)});const j=Object(y["computed"])(()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}),v=e=>{const l={...j.value,content:e};o.updateElement({id:t.elementInfo.id,props:{text:l}}),c()},h=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(o.removeElementProps({id:t.elementInfo.id,propName:"text"}),c())},x=Object(y["ref"])(),k=()=>{f.value=!0,Object(y["nextTick"])(()=>x.value&&x.value.focus())};return(t,l)=>{const o=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-shape",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({opacity:e.elementInfo.opacity,filter:Object(y["unref"])(b)?`drop-shadow(${Object(y["unref"])(b)})`:"",transform:Object(y["unref"])(O),color:Object(y["unref"])(j).defaultColor,fontFamily:Object(y["unref"])(j).defaultFontName}),onMousedown:l[4]||(l[4]=e=>a(e)),onTouchstart:l[5]||(l[5]=e=>a(e)),onDblclick:l[6]||(l[6]=e=>k())},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?(Object(y["openBlock"])(),Object(y["createElementBlock"])("defs",vc,[Object(y["createVNode"])(fc,{id:"editabel-gradient-"+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(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(y["createElementVNode"])("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:Object(y["unref"])(d),"stroke-width":Object(y["unref"])(i),"stroke-dasharray":"dashed"===Object(y["unref"])(s)?"10 6":"0 0"},null,8,yc)],8,hc)],8,jc)),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["shape-text",[Object(y["unref"])(j).align,{editable:f.value||Object(y["unref"])(j).content}]])},[f.value||Object(y["unref"])(j).content?(Object(y["openBlock"])(),Object(y["createBlock"])(tc,{key:0,ref_key:"prosemirrorEditorRef",ref:x,elementId:e.elementInfo.id,defaultColor:Object(y["unref"])(j).defaultColor,defaultFontName:Object(y["unref"])(j).defaultFontName,editable:!e.elementInfo.lock,value:Object(y["unref"])(j).content,onUpdate:l[0]||(l[0]=e=>v(e)),onBlur:l[1]||(l[1]=e=>h()),onMousedown:l[2]||(l[2]=e=>a(e,!1)),onTouchstart:l[3]||(l[3]=e=>a(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):Object(y["createCommentVNode"])("",!0)],2)],36)),[[o,e.contextmenus]])],4)],6)}}});l("990c");const xc=ol()(gc,[["__scopeId","data-v-d4c718fa"]]);var kc=xc;const Cc=["id","markerWidth","markerHeight","refX","refY"],Nc=["d","fill","transform"];var Ec=Object(y["defineComponent"])({__name:"LinePointMarker",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(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},o={"arrow-start":180,"arrow-end":0},n=Object(y["computed"])(()=>l[t.type]),c=Object(y["computed"])(()=>o[`${t.type}-${t.position}`]||0),a=Object(y["computed"])(()=>t.baseSize<2?2:t.baseSize);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*Object(y["unref"])(a),markerHeight:3*Object(y["unref"])(a),refX:1.5*Object(y["unref"])(a),refY:1.5*Object(y["unref"])(a)},[Object(y["createElementVNode"])("path",{d:Object(y["unref"])(n),fill:e.color,transform:`scale(${.3*Object(y["unref"])(a)}, ${.3*Object(y["unref"])(a)}) rotate(${Object(y["unref"])(c)}, 5, 5)`},null,8,Nc)],8,Cc))}});const wc=Ec;var Vc=wc;const Ic=["width","height"],Sc=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Bc=["d"];var Lc=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},o=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:n}=so(o),c=Object(y["computed"])(()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e}),a=Object(y["computed"])(()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e}),r=Object(y["computed"])(()=>"dashed"===t.elementInfo.style?"10 6":"0 0"),i=Object(y["computed"])(()=>Fe(t.elementInfo));return(t,o)=>{const s=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-shape",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({filter:Object(y["unref"])(n)?`drop-shadow(${Object(y["unref"])(n)})`:""}),onMousedown:o[0]||(o[0]=e=>l(e)),onTouchstart:o[1]||(o[1]=e=>l(e))},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:Object(y["unref"])(c),height:Object(y["unref"])(a)},[Object(y["createElementVNode"])("defs",null,[e.elementInfo.points[0]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{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(y["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{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(y["createCommentVNode"])("",!0)]),Object(y["createElementVNode"])("path",{class:"line-point",d:Object(y["unref"])(i),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":Object(y["unref"])(r),fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,Sc),Object(y["withDirectives"])(Object(y["createElementVNode"])("path",{class:"line-path",d:Object(y["unref"])(i),stroke:"transparent","stroke-width":"20",fill:"none"},null,8,Bc),[[s,e.contextmenus]])],8,Ic))],36)],6)}}});l("bde5");const _c=ol()(Lc,[["__scopeId","data-v-6550e504"]]);var Tc=_c,Mc=l("b239"),Dc=(l("21d9"),Object(y["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:Array,required:!0},legends:{type:Array,required:!0},gridColor:{type:String},legend:{type:String}},setup(e){const t=e,l=Object(y["ref"])(),o=Object(y["inject"])(Pl)||Object(y["ref"])(1);let n;const c=Object(y["computed"])(()=>t.legend?t.height-20:t.height),a=()=>({...t.data,series:t.data.series[0]}),r=()=>{const e=t.options||{};return{...e,width:t.width*o.value,height:c.value*o.value}},i=()=>{if(!l.value)return;const e=r();"bar"===t.type&&(n=new Mc["a"](l.value,t.data,e)),"line"===t.type&&(n=new Mc["b"](l.value,t.data,e)),"pie"===t.type&&(n=new Mc["c"](l.value,a(),e))},s=()=>{if(!n)return void i();const e=r(),l="pie"===t.type?a():t.data;n.update(l,e)};Object(y["watch"])([()=>t.width,()=>t.height,()=>t.data,()=>t.options,o],s),Object(y["onMounted"])(i);const d=Object(y["computed"])(()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=U()(t.themeColor[0]).analogous(10).map(e=>e.toHexString());else{const l=t.themeColor.length,o=U()(t.themeColor[l-1]).analogous(11-l).map(e=>e.toHexString());e=[...t.themeColor.slice(0,l-1),...o]}return e}),u=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty("--theme-color-"+(e+1),d.value[e])};Object(y["watch"])(d,u),Object(y["onMounted"])(u);const b=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return Object(y["watch"])(()=>t.gridColor,b),Object(y["onMounted"])(b),(t,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"chart",style:Object(y["normalizeStyle"])({flexDirection:"top"===e.legend?"column-reverse":"column"})},[Object(y["createElementVNode"])("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:Object(y["normalizeStyle"])({width:e.width+"px",height:Object(y["unref"])(c)+"px",transform:`scale(${1/Object(y["unref"])(o)})`})},null,4),e.legend?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"legends",style:Object(y["normalizeStyle"])({transform:`scale(${1/Object(y["unref"])(o)})`})},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.legends,(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"legend",key:l,style:Object(y["normalizeStyle"])({color:e.gridColor})},[Object(y["createElementVNode"])("div",{class:"block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(d)[l]})},null,4),Object(y["createTextVNode"])(" "+Object(y["toDisplayString"])(t),1)],4))),128))],4)):Object(y["createCommentVNode"])("",!0)],4))}}));l("6116"),l("68b8");const zc=ol()(Dc,[["__scopeId","data-v-1f8d633e"]]);var Ac=zc,Fc=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},o=()=>{Un.emit(Pn.OPEN_CHART_DATA_EDITOR)};return(t,n)=>{const c=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-chart",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({backgroundColor:e.elementInfo.fill}),onMousedown:n[0]||(n[0]=e=>l(e)),onTouchstart:n[1]||(n[1]=e=>l(e)),onDblclick:n[2]||(n[2]=e=>o())},[Object(y["createVNode"])(tn,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(y["createVNode"])(Ac,{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,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[c,e.contextmenus]])],4)],6)}}});l("8216");const $c=ol()(Fc,[["__scopeId","data-v-f3c03862"]]);var Rc=$c;const Pc=e=>{if(!e)return{};const{bold:t,em:l,underline:o,strikethrough:n,color:c,backcolor:a,fontsize:r,fontname:i,align:s}=e;let d=`${o?"underline":""} ${n?"line-through":""}`;return" "===d&&(d="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:d,color:c||"#000",backgroundColor:a||"",fontSize:r||"14px",fontFamily:i||"微软雅黑",textAlign:s||"left"}},Hc=e=>e.replace(/\n/g,"</br>").replace(/ /g,"&nbsp;");var qc=e=>{const t=Object(y["computed"])(()=>{const t=[];for(let l=0;l<e.value.length;l++){const o=e.value[l];for(let e=0;e<o.length;e++){const n=o[e];if(n.colspan>1||n.rowspan>1)for(let o=l;o<l+n.rowspan;o++)for(let c=o===l?e+1:e;c<e+n.colspan;c++)t.push(`${o}_${c}`)}}return t});return{hideCells:t}},Uc=e=>{const t=Object(y["ref"])(["",""]);return Object(y["watch"])(()=>e.value,()=>{e.value&&(t.value=Ae(e.value.color))},{immediate:!0}),{subThemeColor:t}};const Gc=["innerHTML"];var Xc=Object(y["defineComponent"])({__name:"CustomTextarea",props:{value:{type:String,default:""},contenteditable:{type:[Boolean,String],default:!1}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,o=Object(y["ref"])(),n=Object(y["ref"])(""),c=Object(y["ref"])(!1);Object(y["watch"])(()=>l.value,()=>{c.value||(n.value=l.value,o.value&&(o.value.innerHTML=l.value))},{immediate:!0});const a=()=>{if(!o.value)return;const e=o.value.innerHTML;t("updateValue",e)},r=()=>{c.value=!0,o.value&&(o.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const l=e.clipboardData.items[0];l&&"string"===l.kind&&"text/plain"===l.type&&l.getAsString(e=>{const l=Ie(e);if("object"===typeof l)return;const n=Se(e);if(n)return t("insertExcelData",n),void(o.value&&(o.value.innerHTML=n[0][0]));t("updateValue",e),document.execCommand("insertText",!1,e)})})},i=()=>{c.value=!1,o.value&&(o.value.onpaste=null)};return Object(y["onUnmounted"])(()=>{o.value&&(o.value.onpaste=null)}),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"custom-textarea",ref_key:"textareaRef",ref:o,onFocus:r,onBlur:i,onInput:t[0]||(t[0]=e=>a()),innerHTML:n.value},null,40,Gc))}});l("80dc");const Yc=ol()(Xc,[["__scopeId","data-v-cdb58a1e"]]);var Zc=Yc;const Wc={key:0,class:"handler"},Jc=["onMousedown"],Kc=["width"],Qc=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],ea=["innerHTML"];var ta=Object(y["defineComponent"])({__name:"EditableTable",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}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:o}=Object(g["c"])(Q()),n=Object(y["ref"])(!1),c=Object(y["ref"])([]),a=Object(y["ref"])([]),r=Object(y["computed"])({get(){return l.data},set(e){t("change",e)}}),i=Object(y["computed"])(()=>l.theme),{subThemeColor:s}=Uc(i),d=Object(y["ref"])([]),u=Object(y["computed"])(()=>d.value.reduce((e,t)=>e+t));Object(y["watch"])([()=>l.colWidths,()=>l.width],()=>{d.value=l.colWidths.map(e=>e*l.width)},{immediate:!0});const b=()=>{c.value=[],a.value=[]};Object(y["watch"])(()=>l.editable,()=>{l.editable||b()});const p=Object(y["computed"])(()=>{const e=[];for(let t=1;t<d.value.length+1;t++){const l=d.value.slice(0,t).reduce((e,t)=>e+t);e.push(l)}return e}),m=Object(y["computed"])(()=>l.data),{hideCells:O}=qc(m),f=Object(y["computed"])(()=>{if(!c.value.length)return[];const[e,t]=c.value;if(!a.value.length)return[`${e}_${t}`];const[l,o]=a.value;if(e===l&&t===o)return[`${e}_${t}`];const n=[],i=Math.min(e,l),s=Math.min(t,o),d=Math.max(e,l),u=Math.max(t,o);for(let c=0;c<r.value.length;c++){const e=r.value[c];for(let t=0;t<e.length;t++)c>=i&&c<=d&&t>=s&&t<=u&&n.push(`${c}_${t}`)}return n});Object(y["watch"])(f,(e,l)=>{Object(G["isEqual"])(e,l)||t("changeSelectedCells",f.value)});const j=Object(y["computed"])(()=>f.value.length>1?null:f.value[0]),v=(Object(y["computed"])(()=>{if(!c.value.length)return null;const[e,t]=c.value;if(!a.value.length)return{row:[e,e],col:[t,t]};const[l,o]=a.value;if(e===l&&t===o)return{row:[e,e],col:[t,t]};const n=Math.min(e,l),r=Math.min(t,o),i=Math.max(e,l),s=Math.max(t,o);return{row:[n,i],col:[r,s]}}),()=>n.value=!1),h=(e,t,l)=>{0===e.button&&(a.value=[],n.value=!0,c.value=[t,l])},k=(e,t)=>{n.value&&(a.value=[e,t])};Object(y["onMounted"])(()=>{document.addEventListener("mouseup",v)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("mouseup",v)});const C=(e,t)=>O.value.includes(`${e}_${t}`),N=e=>{const t=r.value.length-1;c.value=[0,e],a.value=[t,e]},E=e=>{const t=r.value[e].length-1;c.value=[e,0],a.value=[e,t]},w=()=>{const e=r.value.length-1,t=r.value[e].length-1;c.value=[0,0],a.value=[e,t]},V=e=>{const t=JSON.parse(JSON.stringify(r.value)),l=r.value[e],o=[];for(let n=0;n<l.length;n++)C(e,n)&&o.push(n);for(const n of o)for(let l=e;l>=0;l--)if(!C(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),r.value=t},I=e=>{const l=JSON.parse(JSON.stringify(r.value)),o=[];for(let t=0;t<r.value.length;t++)C(t,e)&&o.push(t);for(const t of o)for(let o=e;o>=0;o--)if(!C(t,o)){l[t][o].colspan=l[t][o].colspan-1;break}r.value=l.map(t=>(t.splice(e,1),t)),d.value.splice(e,1),t("changeColWidths",d.value)},S=e=>{const t=JSON.parse(JSON.stringify(r.value)),l=[];for(let o=0;o<t[0].length;o++)l.push({colspan:1,rowspan:1,text:"",id:Object(x["b"])(10)});t.splice(e,0,l),r.value=t},B=e=>{r.value=r.value.map(t=>{const l={colspan:1,rowspan:1,text:"",id:Object(x["b"])(10)};return t.splice(e,0,l),t}),d.value.splice(e,0,100),t("changeColWidths",d.value)},L=(e,l)=>{let o=JSON.parse(JSON.stringify(r.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l<e;l++){const e=[];for(let t=0;t<o[0].length;t++)e.push({...n,id:Object(x["b"])(10)});t.push(e)}o=[...o,...t]}l&&(o=o.map(e=>{const t=[];for(let o=0;o<l;o++){const e={...n,id:Object(x["b"])(10)};t.push(e)}return[...e,...t]}),d.value=[...d.value,...new Array(l).fill(100)],t("changeColWidths",d.value)),r.value=o},_=()=>{const[e,t]=c.value,[l,o]=a.value,n=Math.min(e,l),i=Math.min(t,o),s=Math.max(e,l),d=Math.max(t,o),u=JSON.parse(JSON.stringify(r.value));u[n][i].rowspan=s-n+1,u[n][i].colspan=d-i+1,r.value=u,b()},T=(e,t)=>{const l=JSON.parse(JSON.stringify(r.value));l[e][t].rowspan=1,l[e][t].colspan=1,r.value=l,b()},M=(e,l)=>{b();let n=!0;const c=d.value[l],a=e.pageX,r=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-a)/o.value,i=c+t<r?r:Math.round(c+t);d.value[l]=i},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",d.value)}},D=()=>{const e=JSON.parse(JSON.stringify(r.value));for(let t=0;t<e.length;t++)for(let l=0;l<e[t].length;l++)f.value.includes(`${t}_${l}`)&&(e[t][l].text="");r.value=e},z=()=>{const e=(t,l)=>r.value[t]?r.value[t][l]?C(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;a.value=[];const t=c.value[0],l=c.value[1]+1,o=e(t,l);o?c.value=o:(S(t+1),c.value=[t+1,0]),Object(y["nextTick"])(()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()})},A=e=>{if(!l.editable||!f.value.length)return;const t=e.key.toUpperCase();if(f.value.length<2){if(t===je.TAB&&(e.preventDefault(),z()),e.ctrlKey&&t===je.UP){e.preventDefault();const t=+f.value[0].split("_")[0];S(t)}if(e.ctrlKey&&t===je.DOWN){e.preventDefault();const t=+f.value[0].split("_")[0];S(t+1)}if(e.ctrlKey&&t===je.LEFT){e.preventDefault();const t=+f.value[0].split("_")[1];B(t)}if(e.ctrlKey&&t===je.RIGHT){e.preventDefault();const t=+f.value[0].split("_")[1];B(t+1)}}else t===je.DELETE&&D()};Object(y["onMounted"])(()=>{document.addEventListener("keydown",A)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("keydown",A)});const F=Object(G["debounce"])((function(e,l,o){r.value[l][o].text=e,t("change",r.value)}),300,{trailing:!0}),$=(e,l,o)=>{const n=e.length,c=e[0].length;let a=0,i=0;l+n>r.value.length&&(a=l+n-r.value.length),o+c>r.value[0].length&&(i=o+c-r.value[0].length),(a||i)&&L(a,i),Object(y["nextTick"])(()=>{for(let t=0;t<n;t++)for(let n=0;n<c;n++)r.value[l+t][o+n]&&(r.value[l+t][o+n].text=e[t][n]);t("change",r.value)})},R=()=>{const e=[];for(let t=0;t<r.value.length;t++){const l=r.value[t],o=[];for(let e=0;e<l.length;e++)C(t,e)||o.push(l[e]);o.length&&e.push(o)}return e},P=()=>{const e=R(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},H=(e,t)=>{const l=f.value.length>1,o=r.value[e][t],n=l,c=!l&&(o.rowspan>1||o.colspan>1);return{canMerge:n,canSplit:c}},q=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],o=+t.split("_")[1];f.value.includes(`${l}_${o}`)||(c.value=[l,o],a.value=[]);const{canMerge:n,canSplit:r}=H(l,o),{canDeleteRow:i,canDeleteCol:s}=P();return[{text:"插入列",children:[{text:"到左侧",handler:()=>B(o)},{text:"到右侧",handler:()=>B(o+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>S(l)},{text:"到下方",handler:()=>S(l+1)}]},{text:"删除列",disable:!s,handler:()=>I(o)},{text:"删除行",disable:!i,handler:()=>V(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:_},{text:"取消合并单元格",disable:!r,handler:()=>T(l,o)},{divider:!0},{text:"选中当前列",handler:()=>N(o)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:w}]};return(t,l)=>{var o,n,c,a,b;const m=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"editable-table",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(u)+"px"})},[e.editable?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Wc,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(p),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"drag-line",key:t,style:Object(y["normalizeStyle"])({left:e+"px"}),onMousedown:e=>M(e,t)},null,44,Jc))),128))])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("table",{class:Object(y["normalizeClass"])({theme:Object(y["unref"])(i),"row-header":null===(o=Object(y["unref"])(i))||void 0===o?void 0:o.rowHeader,"row-footer":null===(n=Object(y["unref"])(i))||void 0===n?void 0:n.rowFooter,"col-header":null===(c=Object(y["unref"])(i))||void 0===c?void 0:c.colHeader,"col-footer":null===(a=Object(y["unref"])(i))||void 0===a?void 0:a.colFooter}),style:Object(y["normalizeStyle"])(`--themeColor: ${null===(b=Object(y["unref"])(i))||void 0===b?void 0:b.color}; --subThemeColor1: ${Object(y["unref"])(s)[0]}; --subThemeColor2: ${Object(y["unref"])(s)[1]}`)},[Object(y["createElementVNode"])("colgroup",null,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(d.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("col",{span:"1",key:t,width:e},null,8,Kc))),128))]),Object(y["createElementVNode"])("tbody",null,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(r),(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("tr",{key:l},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,(t,o)=>Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("td",{class:Object(y["normalizeClass"])(["cell",{selected:Object(y["unref"])(f).includes(`${l}_${o}`)&&Object(y["unref"])(f).length>1,active:Object(y["unref"])(j)===`${l}_${o}`}]),style:Object(y["normalizeStyle"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...Object(y["unref"])(Pc)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${l}_${o}`,onMousedown:e=>h(e,l,o),onMouseenter:e=>k(l,o)},[Object(y["unref"])(j)===`${l}_${o}`?(Object(y["openBlock"])(),Object(y["createBlock"])(Zc,{key:0,class:Object(y["normalizeClass"])(["cell-text",{active:Object(y["unref"])(j)===`${l}_${o}`}]),value:t.text,onUpdateValue:e=>Object(y["unref"])(F)(e,l,o),onInsertExcelData:e=>$(e,l,o)},null,8,["class","value","onUpdateValue","onInsertExcelData"])):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:1,class:"cell-text",innerHTML:Object(y["unref"])(Hc)(t.text)},null,8,ea))],46,Qc)),[[y["vShow"],!Object(y["unref"])(O).includes(`${l}_${o}`)],[m,e=>q(e)]])),128))]))),128))])],6)],4)}}});l("bc8c");const la=ol()(ta,[["__scopeId","data-v-bae8c794"]]);var oa=la;const na={class:"element-content"};var ca=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=Q(),o=W(),{canvasScale:n,handleElementId:c,isScaling:a}=Object(g["c"])(l),r=Object(y["ref"])(),{addHistorySnapshot:i}=Ze(),s=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},d=Object(y["ref"])(!1);Object(y["watch"])(c,()=>{c.value!==t.elementInfo.id&&(d.value=!1)}),Object(y["watch"])(d,()=>{l.setDisableHotkeysState(d.value)});const u=()=>{t.elementInfo.lock||(d.value=!0)},b=Object(y["ref"])(-1);Object(y["watch"])(a,()=>{c.value===t.elementInfo.id&&(a.value&&(d.value=!1),a.value||-1===b.value||(o.updateElement({id:t.elementInfo.id,props:{height:b.value}}),b.value=-1))});const p=e=>{const l=e[0].contentRect;if(!r.value)return;const n=l.height;t.elementInfo.height!==n&&(a.value?b.value=n:o.updateElement({id:t.elementInfo.id,props:{height:n}}))},m=new ResizeObserver(p);Object(y["onMounted"])(()=>{r.value&&m.observe(r.value)}),Object(y["onUnmounted"])(()=>{r.value&&m.unobserve(r.value)});const O=e=>{o.updateElement({id:t.elementInfo.id,props:{data:e}}),i()},f=e=>{const l=e.reduce((e,t)=>e+t),n=e.map(e=>e/l);o.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),i()},j=e=>{Object(y["nextTick"])(()=>l.setSelectedTableCells(e))};return(t,l)=>{const o=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:r,style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",na,[Object(y["createVNode"])(oa,{onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(()=>{},["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:d.value,onChange:l[1]||(l[1]=e=>O(e)),onChangeColWidths:l[2]||(l[2]=e=>f(e)),onChangeSelectedCells:l[3]||(l[3]=e=>j(e))},null,8,["data","width","colWidths","outline","theme","editable"]),!d.value||e.elementInfo.lock?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:Object(y["normalizeClass"])(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:l[4]||(l[4]=e=>u()),onMousedown:l[5]||(l[5]=e=>s(e)),onTouchstart:l[6]||(l[6]=e=>s(e))},[Object(y["createElementVNode"])("div",{class:"mask-tip",style:Object(y["normalizeStyle"])({transform:`scale(${1/Object(y["unref"])(n)})`})},"双击编辑",4)],34)):Object(y["createCommentVNode"])("",!0)])),[[o,e.contextmenus]])],4)],6)}}});l("76c1");const aa=ol()(ca,[["__scopeId","data-v-6391c486"]]);var ra=aa;const ia=["width","height","stroke","stroke-width"],sa=["transform"],da=["d"];var ua=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},o=()=>{Un.emit(Pn.OPEN_LATEX_EDITOR)};return(t,n)=>{const c=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-latex",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",onMousedown:n[0]||(n[0]=e=>l(e)),onTouchstart:n[1]||(n[1]=e=>l(e)),onDblclick:n[2]||(n[2]=e=>o())},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(y["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(y["createElementVNode"])("path",{d:e.elementInfo.path},null,8,da)],8,sa)],8,ia))],32)),[[c,e.contextmenus]])],4)],6)}}});l("0f64");const ba=ol()(ua,[["__scopeId","data-v-31390388"]]);var pa=ba,ma=(e,t)=>{Object(y["onMounted"])(()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const o=new l;o.loadSource(e),o.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const o=l.createPlayer({type:"flv",url:e});o.attachMediaElement(t.value),o.load()}}})};const Oa=e=>(Object(y["pushScopeId"])("data-v-2fc4c202"),e=e(),Object(y["popScopeId"])(),e),fa=["src","poster"],ja={class:"bezel"},va=Oa(()=>Object(y["createElementVNode"])("div",{class:"controller-mask"},null,-1)),ha={class:"controller"},ya={class:"icons icons-left"},ga={class:"icon-content"},xa={class:"volume"},ka={class:"icon-content"},Ca=Oa(()=>Object(y["createElementVNode"])("span",{class:"thumb"},null,-1)),Na=[Ca],Ea={class:"time"},wa={class:"ptime"},Va=Object(y["createTextVNode"])(" / "),Ia={class:"dtime"},Sa={class:"icons icons-right"},Ba={class:"speed"},La={class:"icon speed-icon"},_a=["onClick"],Ta=Oa(()=>Object(y["createElementVNode"])("span",{class:"icon-content"},"循环",-1)),Ma=[Ta],Da={class:"bar"},za=Oa(()=>Object(y["createElementVNode"])("span",{class:"thumb"},null,-1)),Aa=[za];var Fa=Object(y["defineComponent"])({__name:"index",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},src:{type:String,required:!0},poster:{type:String,default:""},scale:{type:Number,default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),o=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*o);return(l>0?[l,o,n]:[o,n]).map(t).join(":")},o=e=>e.getBoundingClientRect().left,n=Object(y["ref"])(),c=Object(y["ref"])(),a=Object(y["ref"])(),r=Object(y["ref"])(.5),i=Object(y["ref"])(!0),s=Object(y["ref"])(0),d=Object(y["ref"])(0),u=Object(y["ref"])(0),b=Object(y["ref"])(!1),p=Object(y["ref"])(!1),m=Object(y["ref"])(1),O=Object(y["ref"])(!1),f=Object(y["ref"])("00:00"),j=Object(y["ref"])("0"),v=Object(y["computed"])(()=>l(s.value)),h=Object(y["computed"])(()=>l(d.value)),g=Object(y["computed"])(()=>s.value/d.value*100+"%"),x=Object(y["computed"])(()=>u.value/d.value*100+"%"),k=Object(y["computed"])(()=>100*r.value+"%"),C=Object(y["ref"])(!1),N=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],E=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,d.value),n.value.currentTime=e,s.value=e)},w=()=>{n.value&&(i.value=!1,n.value.play(),p.value=!0)},V=()=>{n.value&&(i.value=!0,n.value.pause(),p.value=!0)},I=()=>{i.value?w():V()},S=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,r.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},B=e=>{n.value&&(n.value.playbackRate=e),m.value=e},L=()=>{var e;d.value=(null===(e=n.value)||void 0===e?void 0:e.duration)||0},_=()=>{var e;s.value=(null===(e=n.value)||void 0===e?void 0:e.currentTime)||0},T=()=>{b.value?(E(0),w()):V()},M=()=>{var e;u.value=null!==(e=n.value)&&void 0!==e&&e.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},D=()=>he["a"].error("视频加载失败"),z=e=>{if(!n.value||!c.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-o(c.value))/c.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*d.value;n.value.currentTime=a,s.value=a},A=e=>{if(!n.value||!c.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-o(c.value))/c.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*d.value;n.value.currentTime=a,s.value=a,document.removeEventListener("mousemove",z),document.removeEventListener("touchmove",z),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A)},F=()=>{document.addEventListener("mousemove",z),document.addEventListener("touchmove",z),document.addEventListener("mouseup",A),document.addEventListener("touchend",A)},$=e=>{if(!a.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-o(a.value))/45;S(l)},R=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("touchmove",$),document.removeEventListener("mouseup",R),document.removeEventListener("touchend",R)},P=()=>{document.addEventListener("mousemove",$),document.addEventListener("touchmove",$),document.addEventListener("mouseup",R),document.addEventListener("touchend",R)},H=e=>{if(!a.value)return;const t=(e.clientX-o(a.value))/45;S(t)},q=e=>{if(d.value&&c.value){const t=c.value.getBoundingClientRect().left,o=e.clientX-t;if(o<0||o>c.value.offsetWidth)return;const n=d.value*(o/c.value.offsetWidth);j.value=o-(n>=3600?25:20)+"px",f.value=l(n),O.value=!0}},U=()=>{n.value&&(n.value.muted?(n.value.muted=!1,S(.5)):(n.value.muted=!0,S(0)))},G=()=>{b.value=!b.value},X=Object(y["ref"])(-1),Y=Object(y["ref"])(!1),Z=()=>{Y.value=!1,clearTimeout(X.value),X.value=setTimeout(()=>{var e;null!==(e=n.value)&&void 0!==e&&e.played.length&&(Y.value=!0)},3e3)};return ma(t.src,n),(t,l)=>{const o=Object(y["resolveComponent"])("IconPause"),s=Object(y["resolveComponent"])("IconPlayOne"),d=Object(y["resolveComponent"])("IconVolumeMute"),u=Object(y["resolveComponent"])("IconVolumeNotice"),E=Object(y["resolveComponent"])("IconVolumeSmall");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["video-player",{"hide-controller":Y.value}]),style:Object(y["normalizeStyle"])({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:l[22]||(l[22]=e=>Z()),onClick:l[23]||(l[23]=e=>Z())},[Object(y["createElementVNode"])("div",{class:"video-wrap",onClick:l[8]||(l[8]=e=>I())},[Object(y["createElementVNode"])("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:l[0]||(l[0]=e=>L()),onTimeupdate:l[1]||(l[1]=e=>_()),onEnded:l[2]||(l[2]=e=>T()),onProgress:l[3]||(l[3]=e=>M()),onPlay:l[4]||(l[4]=e=>Z()),onPause:l[5]||(l[5]=e=>Z()),onError:l[6]||(l[6]=e=>D())},null,40,fa),Object(y["createElementVNode"])("div",ja,[Object(y["createElementVNode"])("span",{class:Object(y["normalizeClass"])(["bezel-icon",{"bezel-transition":p.value}]),onAnimationend:l[7]||(l[7]=e=>p.value=!1)},[i.value?(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:0})):(Object(y["openBlock"])(),Object(y["createBlock"])(s,{key:1}))],34)])]),va,Object(y["createElementVNode"])("div",ha,[Object(y["createElementVNode"])("div",ya,[Object(y["createElementVNode"])("div",{class:"icon play-icon",onClick:l[9]||(l[9]=e=>I())},[Object(y["createElementVNode"])("span",ga,[i.value?(Object(y["openBlock"])(),Object(y["createBlock"])(s,{key:0})):(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:1}))])]),Object(y["createElementVNode"])("div",xa,[Object(y["createElementVNode"])("div",{class:"icon volume-icon",onClick:l[10]||(l[10]=e=>U())},[Object(y["createElementVNode"])("span",ka,[0===r.value?(Object(y["openBlock"])(),Object(y["createBlock"])(d,{key:0})):1===r.value?(Object(y["openBlock"])(),Object(y["createBlock"])(u,{key:1})):(Object(y["openBlock"])(),Object(y["createBlock"])(E,{key:2}))])]),Object(y["createElementVNode"])("div",{class:"volume-bar-wrap",onMousedown:l[11]||(l[11]=e=>P()),onTouchstart:l[12]||(l[12]=e=>P()),onClick:l[13]||(l[13]=e=>H(e))},[Object(y["createElementVNode"])("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:a},[Object(y["createElementVNode"])("div",{class:"volume-bar-inner",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(k)})},Na,4)],512)],32)]),Object(y["createElementVNode"])("span",Ea,[Object(y["createElementVNode"])("span",wa,Object(y["toDisplayString"])(Object(y["unref"])(v)),1),Va,Object(y["createElementVNode"])("span",Ia,Object(y["toDisplayString"])(Object(y["unref"])(h)),1)])]),Object(y["createElementVNode"])("div",Sa,[Object(y["createElementVNode"])("div",Ba,[Object(y["createElementVNode"])("div",La,[Object(y["createElementVNode"])("span",{class:"icon-content",onClick:l[14]||(l[14]=e=>C.value=!C.value)},"倍速"),C.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"speed-menu",onMouseleave:l[15]||(l[15]=e=>C.value=!1)},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(N,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["speed-menu-item",{active:e.value===m.value}]),key:e.label,onClick:t=>B(e.value)},Object(y["toDisplayString"])(e.label),11,_a)),64))],32)):Object(y["createCommentVNode"])("",!0)])]),Object(y["createElementVNode"])("div",{class:"loop",onClick:l[16]||(l[16]=e=>G())},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["icon loop-icon",{active:b.value}])},Ma,2)])]),Object(y["createElementVNode"])("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:c,onMousedown:l[17]||(l[17]=e=>F()),onTouchstart:l[18]||(l[18]=e=>F()),onMousemove:l[19]||(l[19]=e=>q(e)),onMouseenter:l[20]||(l[20]=e=>O.value=!0),onMouseleave:l[21]||(l[21]=e=>O.value=!1)},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["bar-time",{hidden:!O.value}]),style:Object(y["normalizeStyle"])({left:j.value})},Object(y["toDisplayString"])(f.value),7),Object(y["createElementVNode"])("div",Da,[Object(y["createElementVNode"])("div",{class:"loaded",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(x)})},null,4),Object(y["createElementVNode"])("div",{class:"played",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(g)})},Aa,4)])],544)])],38)}}});l("3696");const $a=ol()(Fa,[["__scopeId","data-v-2fc4c202"]]);var Ra=$a,Pa=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(t,n)=>{const c=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-video",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",onMousedown:n[2]||(n[2]=e=>o(e,!1)),onTouchstart:n[3]||(n[3]=e=>o(e,!1))},[Object(y["createVNode"])(Ra,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:Object(y["unref"])(l)},null,8,["width","height","src","poster","scale"]),(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(["t","b","l","r"],e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["handler-border",e]),key:e,onMousedown:n[0]||(n[0]=e=>o(e)),onTouchstart:n[1]||(n[1]=e=>o(e))},null,34)),64))],32)),[[c,e.contextmenus]])],4)],6)}}});l("679c");const Ha=ol()(Pa,[["__scopeId","data-v-9d5469c6"]]);var qa=Ha;const Ua=e=>(Object(y["pushScopeId"])("data-v-121f3d11"),e=e(),Object(y["popScopeId"])(),e),Ga=["src","autoplay"],Xa={class:"controller"},Ya={class:"icons"},Za={class:"icon-content"},Wa={class:"volume"},Ja={class:"icon-content"},Ka=Ua(()=>Object(y["createElementVNode"])("span",{class:"thumb"},null,-1)),Qa=[Ka],er={class:"time"},tr={class:"ptime"},lr=Object(y["createTextVNode"])(" / "),or={class:"dtime"},nr={class:"bar"},cr=Ua(()=>Object(y["createElementVNode"])("span",{class:"thumb"},null,-1)),ar=[cr];var rr=Object(y["defineComponent"])({__name:"AudioPlayer",props:{src:{type:String,required:!0},loop:{type:Boolean,required:!0},autoplay:{type:Boolean,default:!1},scale:{type:Number,default:1}},setup(e,{expose:t}){const l=e,o=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),o=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*o);return(l>0?[l,o,n]:[o,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,c=Object(y["ref"])(),a=Object(y["ref"])(),r=Object(y["ref"])(),i=Object(y["ref"])(.5),s=Object(y["ref"])(!0),d=Object(y["ref"])(0),u=Object(y["ref"])(0),b=Object(y["ref"])(0),p=Object(y["ref"])(!1),m=Object(y["ref"])("00:00"),O=Object(y["ref"])("0"),f=Object(y["computed"])(()=>o(d.value)),j=Object(y["computed"])(()=>o(u.value)),v=Object(y["computed"])(()=>d.value/u.value*100+"%"),h=Object(y["computed"])(()=>b.value/u.value*100+"%"),g=Object(y["computed"])(()=>100*i.value+"%"),x=e=>{c.value&&(e=Math.max(e,0),e=Math.min(e,u.value),c.value.currentTime=e,d.value=e)},k=()=>{c.value&&(s.value=!1,c.value.play())},C=()=>{c.value&&(s.value=!0,c.value.pause())},N=()=>{s.value?k():C()},E=e=>{c.value&&(e=Math.max(e,0),e=Math.min(e,1),c.value.volume=e,i.value=e,c.value.muted&&0!==e&&(c.value.muted=!1))},w=()=>{var e;u.value=(null===(e=c.value)||void 0===e?void 0:e.duration)||0},V=()=>{var e;d.value=(null===(e=c.value)||void 0===e?void 0:e.currentTime)||0},I=()=>{s.value=!1},S=()=>{l.loop?(x(0),k()):C()},B=()=>{var e;b.value=null!==(e=c.value)&&void 0!==e&&e.buffered.length?c.value.buffered.end(c.value.buffered.length-1):0},L=()=>he["a"].error("视频加载失败"),_=e=>{if(!c.value||!a.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(a.value))/a.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const o=l*u.value;c.value.currentTime=o,d.value=o},T=e=>{if(!c.value||!a.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(a.value))/a.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const o=l*u.value;c.value.currentTime=o,d.value=o,document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T)},M=()=>{document.addEventListener("mousemove",_),document.addEventListener("touchmove",_),document.addEventListener("mouseup",T),document.addEventListener("touchend",T)},D=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(r.value))/45;E(l)},z=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("touchmove",D),document.removeEventListener("mouseup",z),document.removeEventListener("touchend",z)},A=()=>{document.addEventListener("mousemove",D),document.addEventListener("touchmove",D),document.addEventListener("mouseup",z),document.addEventListener("touchend",z)},F=e=>{if(!r.value)return;const t=(e.clientX-n(r.value))/45;E(t)},$=e=>{if(u.value&&a.value){const t=a.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>a.value.offsetWidth)return;const n=u.value*(l/a.value.offsetWidth);O.value=l-(n>=3600?25:20)+"px",m.value=o(n),p.value=!0}},R=()=>{c.value&&(c.value.muted?(c.value.muted=!1,E(.5)):(c.value.muted=!0,E(0)))};return t({toggle:N}),(t,l)=>{const o=Object(y["resolveComponent"])("IconPlayOne"),n=Object(y["resolveComponent"])("IconPause"),d=Object(y["resolveComponent"])("IconVolumeMute"),u=Object(y["resolveComponent"])("IconVolumeNotice"),b=Object(y["resolveComponent"])("IconVolumeSmall");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"audio-player",style:Object(y["normalizeStyle"])({transform:`scale(${1/e.scale})`})},[Object(y["createElementVNode"])("audio",{class:"audio",ref_key:"audioRef",ref:c,src:e.src,autoplay:e.autoplay,onDurationchange:l[0]||(l[0]=e=>w()),onTimeupdate:l[1]||(l[1]=e=>V()),onPlay:l[2]||(l[2]=e=>I()),onEnded:l[3]||(l[3]=e=>S()),onProgress:l[4]||(l[4]=e=>B()),onError:l[5]||(l[5]=e=>L())},null,40,Ga),Object(y["createElementVNode"])("div",Xa,[Object(y["createElementVNode"])("div",Ya,[Object(y["createElementVNode"])("div",{class:"icon play-icon",onClick:l[6]||(l[6]=e=>N())},[Object(y["createElementVNode"])("span",Za,[s.value?(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:0})):(Object(y["openBlock"])(),Object(y["createBlock"])(n,{key:1}))])]),Object(y["createElementVNode"])("div",Wa,[Object(y["createElementVNode"])("div",{class:"icon volume-icon",onClick:l[7]||(l[7]=e=>R())},[Object(y["createElementVNode"])("span",Ja,[0===i.value?(Object(y["openBlock"])(),Object(y["createBlock"])(d,{key:0})):1===i.value?(Object(y["openBlock"])(),Object(y["createBlock"])(u,{key:1})):(Object(y["openBlock"])(),Object(y["createBlock"])(b,{key:2}))])]),Object(y["createElementVNode"])("div",{class:"volume-bar-wrap",onMousedown:l[8]||(l[8]=e=>A()),onTouchstart:l[9]||(l[9]=e=>A()),onClick:l[10]||(l[10]=e=>F(e))},[Object(y["createElementVNode"])("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[Object(y["createElementVNode"])("div",{class:"volume-bar-inner",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(g)})},Qa,4)],512)],32)])]),Object(y["createElementVNode"])("span",er,[Object(y["createElementVNode"])("span",tr,Object(y["toDisplayString"])(Object(y["unref"])(f)),1),lr,Object(y["createElementVNode"])("span",or,Object(y["toDisplayString"])(Object(y["unref"])(j)),1)]),Object(y["createElementVNode"])("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:a,onMousedown:l[11]||(l[11]=e=>M()),onTouchstart:l[12]||(l[12]=e=>M()),onMousemove:l[13]||(l[13]=e=>$(e)),onMouseenter:l[14]||(l[14]=e=>p.value=!0),onMouseleave:l[15]||(l[15]=e=>p.value=!1)},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["bar-time",{hidden:!p.value}]),style:Object(y["normalizeStyle"])({left:O.value})},Object(y["toDisplayString"])(m.value),7),Object(y["createElementVNode"])("div",nr,[Object(y["createElementVNode"])("div",{class:"loaded",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(h)})},null,4),Object(y["createElementVNode"])("div",{class:"played",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(v)})},ar,4)])],544)])],4)}}});l("3929");const ir=ol()(rr,[["__scopeId","data-v-121f3d11"]]);var sr=ir,dr=Object(y["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:o}=Object(g["c"])(Q()),{viewportRatio:n}=Object(g["c"])(W()),c=Object(y["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),a=Object(y["computed"])(()=>{const e=He,o=He*n.value,c=280/l.value,a=50/l.value,r=t.elementInfo.width,i=t.elementInfo.height,s=t.elementInfo.left,d=t.elementInfo.top;let u=0,b=i;return s+c>=e&&(u=r-c),d+i+a>=o&&(b=-a),{left:u+"px",top:b+"px"}}),r=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(t,n)=>{const i=Object(y["resolveComponent"])("IconVolumeNotice"),s=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["editable-element-audio",{lock:e.elementInfo.lock}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-content",onMousedown:n[1]||(n[1]=e=>r(e)),onTouchstart:n[2]||(n[2]=e=>r(e))},[Object(y["createVNode"])(i,{class:"audio-icon",style:Object(y["normalizeStyle"])({fontSize:Object(y["unref"])(c),color:e.elementInfo.color})},null,8,["style"]),Object(y["unref"])(o)===e.elementInfo.id?(Object(y["openBlock"])(),Object(y["createBlock"])(sr,{key:0,class:"audio-player",style:Object(y["normalizeStyle"])({...Object(y["unref"])(a)}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:Object(y["unref"])(l),onMousedown:n[0]||(n[0]=Object(y["withModifiers"])(()=>{},["stop"]))},null,8,["style","src","loop","scale"])):Object(y["createCommentVNode"])("",!0)],32)),[[s,e.contextmenus]])],4)],6)}}});l("75e6");const ur=ol()(dr,[["__scopeId","data-v-001bfbc4"]]);var br=ur;const pr=["id"];var mr=Object(y["defineComponent"])({__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e={[Ue.IMAGE]:Wo,[Ue.TEXT]:rc,[Ue.SHAPE]:kc,[Ue.LINE]:Tc,[Ue.CHART]:Rc,[Ue.TABLE]:ra,[Ue.LATEX]:pa,[Ue.VIDEO]:qa,[Ue.AUDIO]:br};return e[t.elementInfo.type]||null}),{orderElement:o}=at(),{alignElementToCanvas:n}=io(),{combineElements:c,uncombineElements:a}=lt(),{deleteElement:r}=tt(),{lockElement:i,unlockElement:s}=et(),{copyElement:d,pasteElement:u,cutElement:b}=ot(),{selectAllElement:p}=nt(),m=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>s(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:u},{divider:!0},{text:"水平居中",handler:()=>n(pe.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(pe.CENTER)},{text:"水平居中",handler:()=>n(pe.HORIZONTAL)},{text:"左对齐",handler:()=>n(pe.LEFT)},{text:"右对齐",handler:()=>n(pe.RIGHT)}]},{text:"垂直居中",handler:()=>n(pe.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(pe.CENTER)},{text:"垂直居中",handler:()=>n(pe.VERTICAL)},{text:"顶部对齐",handler:()=>n(pe.TOP)},{text:"底部对齐",handler:()=>n(pe.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>o(t.elementInfo,be.TOP),children:[{text:"置于顶层",handler:()=>o(t.elementInfo,be.TOP)},{text:"上移一层",handler:()=>o(t.elementInfo,be.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>o(t.elementInfo,be.BOTTOM),children:[{text:"置于底层",handler:()=>o(t.elementInfo,be.BOTTOM)},{text:"下移一层",handler:()=>o(t.elementInfo,be.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?a:c,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:p},{text:"锁定",subText:"Ctrl + L",handler:i},{text:"删除",subText:"Delete",handler:r}];return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"editable-element",ref:"elementRef",id:"editable-element-"+e.elementInfo.id,style:Object(y["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:m},null,8,["elementInfo","selectElement"]))],12,pr))}});const Or=mr;var fr=Or,jr=Object(y["defineComponent"])({__name:"MouseSelection",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(e){return[1,2,3,4].includes(e)}}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])("mouse-selection quadrant-"+e.quadrant),style:Object(y["normalizeStyle"])({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});l("4b9a");const vr=ol()(jr,[["__scopeId","data-v-0d6c0f73"]]);var hr=vr;const yr={class:"grid-lines"},gr=["d","stroke"];var xr=Object(y["defineComponent"])({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=Object(g["c"])(Q()),{currentSlide:o,viewportRatio:n}=Object(g["c"])(W()),c=Object(y["computed"])(()=>{var e;return null===(e=o.value)||void 0===e?void 0:e.background}),a=Object(y["computed"])(()=>{var e;const t=(null===(e=c.value)||void 0===e?void 0:e.color)||"#fff",l=["#000","#fff"];return U.a.mostReadable(t,l,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()}),r=Object(y["computed"])(()=>{const e=He,t=He*n.value;let o="";for(let n=0;n<=Math.floor(t/l.value);n++)o+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)o+=`M${n*l.value} 0 L${n*l.value} ${t} `;return o});return(e,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",yr,[Object(y["createElementVNode"])("path",{style:Object(y["normalizeStyle"])({transform:`scale(${Object(y["unref"])(t)})`}),d:Object(y["unref"])(r),fill:"none",stroke:Object(y["unref"])(a),"stroke-width":"0.3","stroke-dasharray":"5"},null,12,gr)]))}});l("dd7b");const kr=ol()(xr,[["__scopeId","data-v-aebac580"]]);var Cr=kr,Nr=e=>{const t=Object(y["computed"])(()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:o,imageSize:n,gradientColor:c,gradientRotate:a,gradientType:r}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return o?"repeat"===n?{backgroundImage:"url("+o,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:"url("+o,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=a||0,t=c?c[0]:"#fff",l=c?c[1]:"#fff";return"radial"===r?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}});return{backgroundStyle:t}},Er=Object(y["defineComponent"])({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=Object(g["c"])(Q()),{currentSlide:l}=Object(g["c"])(W()),o=Object(y["computed"])(()=>{var e;return null===(e=l.value)||void 0===e?void 0:e.background}),{backgroundStyle:n}=Nr(o);return(e,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"viewport-background",style:Object(y["normalizeStyle"])(Object(y["unref"])(n))},[Object(y["unref"])(t)?(Object(y["openBlock"])(),Object(y["createBlock"])(Cr,{key:0})):Object(y["createCommentVNode"])("",!0)],4))}});l("5977");const wr=ol()(Er,[["__scopeId","data-v-61c4db4a"]]);var Vr=wr,Ir=Object(y["defineComponent"])({__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.axis.x*t.canvasScale+"px"),o=Object(y["computed"])(()=>t.axis.y*t.canvasScale+"px"),n=Object(y["computed"])(()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"});return(t,c)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"alignment-line",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(l),top:Object(y["unref"])(o)})},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["line",e.type]),style:Object(y["normalizeStyle"])(Object(y["unref"])(n))},null,6)],4))}});l("5688");const Sr=ol()(Ir,[["__scopeId","data-v-37fa6068"]]);var Br=Sr;const Lr={class:"ruler"};var _r=Object(y["defineComponent"])({__name:"Ruler",props:{viewportStyles:{type:Object,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>t.viewportStyles.width*l.value/10);return(t,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Lr,[Object(y["createElementVNode"])("div",{class:"h",style:Object(y["normalizeStyle"])({width:e.viewportStyles.width*Object(y["unref"])(l)+"px",left:e.viewportStyles.left+"px"})},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(10,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["ruler-marker-100",{hide:Object(y["unref"])(o)<36,omit:Object(y["unref"])(o)<72}]),key:"marker-100-"+e},[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(100*e),1)],2)),64))],4),Object(y["createElementVNode"])("div",{class:"v",style:Object(y["normalizeStyle"])({height:e.viewportStyles.height*Object(y["unref"])(l)+"px",top:e.viewportStyles.top+"px"})},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(10,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["ruler-marker-100",{hide:Object(y["unref"])(o)<36,omit:Object(y["unref"])(o)<72}]),key:e,style:Object(y["normalizeStyle"])({height:Object(y["unref"])(o)+"px"})},[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(100*e),1)],6)),64))],4)]))}});l("9854");const Tr=ol()(_r,[["__scopeId","data-v-60e06332"]]);var Mr=Tr;const Dr=["width","height"],zr=["d"];var Ar=Object(y["defineComponent"])({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=Q(),{creatingElement:o}=Object(g["c"])(l),{ctrlOrShiftKeyActive:n}=Object(g["c"])(ie()),c=Object(y["ref"])(),a=Object(y["ref"])(),r=Object(y["ref"])(),i=Object(y["ref"])({x:0,y:0});Object(y["onMounted"])(()=>{if(!r.value)return;const{x:e,y:t}=r.value.getBoundingClientRect();i.value={x:e,y:t}});const s=e=>{let r=!0;const i=e.pageX,s=e.pageY;c.value=[i,s],document.onmousemove=e=>{if(!o.value||!r)return;let t=e.pageX,l=e.pageY;if(n.value){const e=t-i,n=l-s,c=Math.abs(e),a=Math.abs(n);if("shape"===o.value.type){const o=n>0&&e<0||n<0&&e>0;c>a?l=o?s-e:s+e:t=o?i-n:i+n}else"line"===o.value.type&&(c>a?l=s:t=i)}a.value=[t,l]},document.onmouseup=e=>{var n,d;if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout(()=>l.setCreatingElement(null),0);r=!1;const u=e.pageX,b=e.pageY,p=30;if("line"===(null===(n=o.value)||void 0===n?void 0:n.type)&&(Math.abs(u-i)>=p||Math.abs(b-s)>=p))t("created",{start:c.value,end:a.value});else if("line"!==(null===(d=o.value)||void 0===d?void 0:d.type)&&Math.abs(u-i)>=p&&Math.abs(b-s)>=p)t("created",{start:c.value,end:a.value});else{const e=200,l=Math.min(u,i),o=Math.min(b,s),n=Math.max(u,i),c=Math.max(b,s),a=n-l>=p?n-l:e,r=c-o>=p?c-o:e;t("created",{start:[l,o],end:[l+a,o+r]})}}},d=Object(y["computed"])(()=>{if(!c.value||!a.value)return null;if(!o.value||"line"!==o.value.type)return null;const[e,t]=c.value,[l,n]=a.value,r=Math.min(e,l),i=Math.max(e,l),s=Math.min(t,n),d=Math.max(t,n),u=i-r>=24?i-r:24,b=d-s>=24?d-s:24,p=e===r?0:i-r,m=t===s?0:d-s,O=l===r?0:i-r,f=n===s?0:d-s,j=`M${p}, ${m} L${O}, ${f}`;return{svgWidth:u,svgHeight:b,startX:p,startY:m,endX:O,endY:f,path:j}}),u=Object(y["computed"])(()=>{if(!c.value||!a.value)return{};const[e,t]=c.value,[l,o]=a.value,n=Math.min(e,l),r=Math.max(e,l),s=Math.min(t,o),d=Math.max(t,o),u=r-n,b=d-s;return{left:n-i.value.x+"px",top:s-i.value.y+"px",width:u+"px",height:b+"px"}});return(e,t)=>{var l,n;return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"element-create-selection",ref_key:"selectionRef",ref:r,onMousedown:t[0]||(t[0]=Object(y["withModifiers"])(e=>s(e),["stop"])),onContextmenu:t[1]||(t[1]=Object(y["withModifiers"])(()=>{},["stop","prevent"]))},[c.value&&a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:Object(y["normalizeClass"])(["selection",null===(l=Object(y["unref"])(o))||void 0===l?void 0:l.type]),style:Object(y["normalizeStyle"])(Object(y["unref"])(u))},["line"===(null===(n=Object(y["unref"])(o))||void 0===n?void 0:n.type)&&Object(y["unref"])(d)?(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{key:0,overflow:"visible",width:Object(y["unref"])(d).svgWidth,height:Object(y["unref"])(d).svgHeight},[Object(y["createElementVNode"])("path",{d:Object(y["unref"])(d).path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,zr)],8,Dr)):Object(y["createCommentVNode"])("",!0)],6)):Object(y["createCommentVNode"])("",!0)],544)}}});l("7aed");const Fr=ol()(Ar,[["__scopeId","data-v-5a941f07"]]);var $r=Fr,Rr=(e,t)=>{const l=Object(y["computed"])(()=>[{direction:Oe.LEFT_TOP,style:{}},{direction:Oe.TOP,style:{left:e.value/2+"px"}},{direction:Oe.RIGHT_TOP,style:{left:e.value+"px"}},{direction:Oe.LEFT,style:{top:t.value/2+"px"}},{direction:Oe.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:Oe.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:Oe.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:Oe.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]),o=Object(y["computed"])(()=>[{direction:Oe.LEFT,style:{top:t.value/2+"px"}},{direction:Oe.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]),n=Object(y["computed"])(()=>[{direction:Oe.TOP,style:{left:e.value/2+"px"}},{direction:Oe.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}]),c=Object(y["computed"])(()=>[{type:me.T,style:{width:e.value+"px"}},{type:me.B,style:{top:t.value+"px",width:e.value+"px"}},{type:me.L,style:{height:t.value+"px"}},{type:me.R,style:{left:e.value+"px",height:t.value+"px"}}]);return{resizeHandlers:l,textElementResizeHandlers:o,verticalTextElementResizeHandlers:n,borderLines:c}},Pr=Object(y["defineComponent"])({__name:"ResizeHandler",props:{type:{type:String,default:""},rotate:{type:Number,default:0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0});return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["resize-handler",Object(y["unref"])(l),e.type])},null,2))}});l("b510");const Hr=ol()(Pr,[["__scopeId","data-v-881ee3f8"]]);var qr=Hr,Ur=Object(y["defineComponent"])({__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["border-line",e.type,{wide:e.isWide}])},null,2))}});l("2460");const Gr=ol()(Ur,[["__scopeId","data-v-7170d1be"]]);var Xr=Gr,Yr=Object(y["defineComponent"])({__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:l,canvasScale:o}=Object(g["c"])(Q()),n=Object(y["computed"])(()=>t.elementList.filter(e=>l.value.includes(e.id))),c=Object(y["ref"])({minX:0,maxX:0,minY:0,maxY:0}),a=Object(y["computed"])(()=>(c.value.maxX-c.value.minX)*o.value),r=Object(y["computed"])(()=>(c.value.maxY-c.value.minY)*o.value),{resizeHandlers:i,borderLines:s}=Rr(a,r),d=()=>{const{minX:e,maxX:t,minY:l,maxY:o}=Te(n.value);c.value={minX:e,maxX:t,minY:l,maxY:o}};Object(y["watchEffect"])(d);const u=Object(y["computed"])(()=>n.value.some(e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)));return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"multi-select-operate",style:Object(y["normalizeStyle"])({left:c.value.minX*Object(y["unref"])(o)+"px",top:c.value.minY*Object(y["unref"])(o)+"px"})},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(s),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),Object(y["unref"])(u)?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],{key:0},Object(y["renderList"])(Object(y["unref"])(i),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{key:t.direction,type:t.direction,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleMultiElement(l,c.value,t.direction),["stop"])},null,8,["type","style","onMousedown"]))),128))],4))}});l("a669");const Zr=ol()(Yr,[["__scopeId","data-v-defbd922"]]);var Wr=Zr;const Jr={class:"rotate-handler"};function Kr(e,t){return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Jr)}l("1ebd");const Qr={},ei=ol()(Qr,[["render",Kr],["__scopeId","data-v-b99d8dae"]]);var ti=ei;const li={inheritAttrs:!1};var oi=Object(y["defineComponent"])({...li,__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:o}=Object(g["c"])(Q()),n=Object(y["computed"])(()=>o.value===t.elementInfo.id),c=Object(y["computed"])(()=>t.elementInfo.width*l.value),a=Object(y["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:r,borderLines:i}=Rr(c,a);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["image-element-operate",{cliping:Object(y["unref"])(n)}])},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(i),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(r),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(y["createVNode"])(ti,{class:"operate-rotate-handler",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(c)/2+"px"}),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(y["createCommentVNode"])("",!0)],2))}});l("ae9f");const ni=ol()(oi,[["__scopeId","data-v-46b250c2"]]);var ci=ni;const ai={class:"text-element-operate"},ri={inheritAttrs:!1};var ii=Object(y["defineComponent"])({...ri,__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>t.elementInfo.width*l.value),n=Object(y["computed"])(()=>t.elementInfo.height*l.value),{textElementResizeHandlers:c,verticalTextElementResizeHandlers:a,borderLines:r}=Rr(o,n),i=Object(y["computed"])(()=>t.elementInfo.vertical?a.value:c.value);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",ai,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(r),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(i),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(y["createVNode"])(ti,{class:"operate-rotate-handler",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(o)/2+"px"}),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(y["createCommentVNode"])("",!0)]))}});const si=ii;var di=si;const ui={class:"shape-element-operate"},bi={inheritAttrs:!1};var pi=Object(y["defineComponent"])({...bi,__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>t.elementInfo.width*l.value),n=Object(y["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:c,borderLines:a}=Rr(o,n),r=Object(y["computed"])(()=>{if(!t.elementInfo.pathFormula||!t.elementInfo.keypoint)return{};const e=Ge[t.elementInfo.pathFormula];if("editable"in e){const o=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:o*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-o)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-o)/2*l.value+"px"};if("top"===e.relative)return{top:o*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-o)*l.value+"px"}}return{}});return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",ui,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(y["createVNode"])(ti,{class:"operate-rotate-handler",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(o)/2+"px"}),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"operate-keypoint-handler",style:Object(y["normalizeStyle"])(Object(y["unref"])(r)),onMousedown:l[1]||(l[1]=Object(y["withModifiers"])(t=>e.moveShapeKeypoint(t,e.elementInfo),["stop"]))},null,36)):Object(y["createCommentVNode"])("",!0)],64)):Object(y["createCommentVNode"])("",!0)]))}});l("614e");const mi=ol()(pi,[["__scopeId","data-v-fd38df18"]]);var Oi=mi;const fi={class:"line-element-operate"},ji=["width","height","stroke"],vi={key:0},hi=["x1","y1","x2","y2"],yi=["x1","y1","x2","y2"],gi=["x1","y1","x2","y2"],xi=["x1","y1","x2","y2"],ki={inheritAttrs:!1};var Ci=Object(y["defineComponent"])({...ki,__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0])),n=Object(y["computed"])(()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1])),c=Object(y["computed"])(()=>{const e=[{handler:fe.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:fe.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const o=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:fe.C,style:{left:o[0]*l.value+"px",top:o[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[o,n]=t.elementInfo.cubic;e.push({handler:fe.C1,style:{left:o[0]*l.value+"px",top:o[1]*l.value+"px"}}),e.push({handler:fe.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e});return(t,a)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",fi,[e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.handler,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.dragLineElement(l,e.elementInfo,t.handler),["stop"])},null,8,["style","onMousedown"]))),128)),(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{width:Object(y["unref"])(o)||1,height:Object(y["unref"])(n)||1,stroke:e.elementInfo.color,overflow:"visible",style:Object(y["normalizeStyle"])({transform:`scale(${Object(y["unref"])(l)})`})},[e.elementInfo.curve?(Object(y["openBlock"])(),Object(y["createElementBlock"])("g",vi,[Object(y["createElementVNode"])("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,hi),Object(y["createElementVNode"])("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,yi)])):Object(y["createCommentVNode"])("",!0),e.elementInfo.cubic?(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],{key:1},Object(y["renderList"])(e.elementInfo.cubic,(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("g",{key:l},[0===l?(Object(y["openBlock"])(),Object(y["createElementBlock"])("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,gi)):Object(y["createCommentVNode"])("",!0),1===l?(Object(y["openBlock"])(),Object(y["createElementBlock"])("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,xi)):Object(y["createCommentVNode"])("",!0)]))),128)):Object(y["createCommentVNode"])("",!0)],12,ji))],64)):Object(y["createCommentVNode"])("",!0)]))}});l("fac9");const Ni=ol()(Ci,[["__scopeId","data-v-4659f395"]]);var Ei=Ni;const wi={class:"table-element-operate"},Vi={inheritAttrs:!1};var Ii=Object(y["defineComponent"])({...Vi,__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>t.elementInfo.outline.width||1),n=Object(y["computed"])(()=>(t.elementInfo.width+o.value)*l.value),c=Object(y["computed"])(()=>t.elementInfo.height*l.value),{textElementResizeHandlers:a,borderLines:r}=Rr(n,c);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",wi,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(r),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(y["createVNode"])(ti,{class:"operate-rotate-handler",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(n)/2+"px"}),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(y["createCommentVNode"])("",!0)]))}});const Si=Ii;var Bi=Si;const Li={class:"common-element-operate"},_i={inheritAttrs:!1};var Ti=Object(y["defineComponent"])({..._i,__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),o=Object(y["computed"])(()=>t.elementInfo.width*l.value),n=Object(y["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:c,borderLines:a}=Rr(o,n),r=Object(y["computed"])(()=>["video","audio"].includes(t.elementInfo.type));return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Li,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onMousedown:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(y["unref"])(r)?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createBlock"])(ti,{key:0,class:"operate-rotate-handler",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(o)/2+"px"}),onMousedown:l[0]||(l[0]=Object(y["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"]))],64)):Object(y["createCommentVNode"])("",!0)]))}});const Mi=Ti;var Di=Mi,zi=()=>{const e=W(),{addHistorySnapshot:t}=Ze(),l=(l,o)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===o.type&&!n.test(o.target))return he["a"].error("不是正确的网页链接地址"),!1;const c={link:o};return e.updateElement({id:l.id,props:c}),t(),!0},o=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:o}};const Ai=["href"],Fi={key:1,class:"link"},$i={class:"btns"};var Ri=Object(y["defineComponent"])({__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(g["c"])(Q()),{removeLink:o}=zi(),n=Object(y["computed"])(()=>"line"===t.elementInfo.type?0:t.elementInfo.height);return(t,c)=>{const a=Object(y["resolveComponent"])("Divider");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"link-handler",style:Object(y["normalizeStyle"])({top:Object(y["unref"])(n)*Object(y["unref"])(l)+10+"px"})},["web"===e.link.type?(Object(y["openBlock"])(),Object(y["createElementBlock"])("a",{key:0,class:"link",href:e.link.target,target:"_blank"},Object(y["toDisplayString"])(e.link.target),9,Ai)):(Object(y["openBlock"])(),Object(y["createElementBlock"])("a",Fi,"幻灯片页面 "+Object(y["toDisplayString"])(e.link.target),1)),Object(y["createElementVNode"])("div",$i,[Object(y["createElementVNode"])("div",{class:"btn",onClick:c[0]||(c[0]=t=>e.openLinkDialog())},"更换"),Object(y["createVNode"])(a,{type:"vertical"}),Object(y["createElementVNode"])("div",{class:"btn",onClick:c[1]||(c[1]=t=>Object(y["unref"])(o)(e.elementInfo))},"移除")])],4)}}});l("7851");const Pi=ol()(Ri,[["__scopeId","data-v-bb722fc0"]]);var Hi=Pi;const qi={key:1,class:"animation-index"};var Ui=Object(y["defineComponent"])({__name:"index",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},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,toolbarState:o}=Object(g["c"])(Q()),{formatedAnimations:n}=Object(g["c"])(W()),c=Object(y["computed"])(()=>{const e={[Ue.IMAGE]:ci,[Ue.TEXT]:di,[Ue.SHAPE]:Oi,[Ue.LINE]:Ei,[Ue.TABLE]:Bi,[Ue.CHART]:Di,[Ue.LATEX]:Di,[Ue.VIDEO]:Di,[Ue.AUDIO]:Di};return e[t.elementInfo.type]||null}),a=Object(y["computed"])(()=>{const e=[];for(let l=0;l<n.value.length;l++){const o=n.value[l].animations.map(e=>e.elId);o.includes(t.elementInfo.id)&&e.push(l)}return e}),r=Object(y["computed"])(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),i=Object(y["computed"])(()=>"height"in t.elementInfo?t.elementInfo.height:0);return(t,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:Object(y["normalizeStyle"])({top:e.elementInfo.top*Object(y["unref"])(l)+"px",left:e.elementInfo.left*Object(y["unref"])(l)+"px",transform:`rotate(${Object(y["unref"])(r)}deg)`,transformOrigin:`${e.elementInfo.width*Object(y["unref"])(l)/2}px ${Object(y["unref"])(i)*Object(y["unref"])(l)/2}px`})},[e.isSelected?(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(c)),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):Object(y["createCommentVNode"])("",!0),"elAnimation"===Object(y["unref"])(o)&&Object(y["unref"])(a).length?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",qi,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"index-item",key:e},Object(y["toDisplayString"])(e+1),1))),128))])):Object(y["createCommentVNode"])("",!0),e.isActive&&e.elementInfo.link?(Object(y["openBlock"])(),Object(y["createBlock"])(Hi,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:n[0]||(n[0]=Object(y["withModifiers"])(()=>{},["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):Object(y["createCommentVNode"])("",!0)],6))}});l("d2f3");const Gi=ol()(Ui,[["__scopeId","data-v-27793fbf"]]);var Xi=Gi;const Yi=["src"];var Zi=Object(y["defineComponent"])({__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:o}=so(l),n=Object(y["computed"])(()=>t.elementInfo.flipH),c=Object(y["computed"])(()=>t.elementInfo.flipV),{flipStyle:a}=uo(n,c),r=Object(y["computed"])(()=>t.elementInfo.clip),{clipShape:i,imgPosition:s}=po(r),d=Object(y["computed"])(()=>t.elementInfo.filters),{filter:u}=mo(d);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-image",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({filter:Object(y["unref"])(o)?`drop-shadow(${Object(y["unref"])(o)})`:"",transform:Object(y["unref"])(a)})},[Object(y["createVNode"])(To,{elementInfo:e.elementInfo},null,8,["elementInfo"]),Object(y["createElementVNode"])("div",{class:"image-content",style:Object(y["normalizeStyle"])({clipPath:Object(y["unref"])(i).style})},[Object(y["createElementVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:Object(y["normalizeStyle"])({top:Object(y["unref"])(s).top,left:Object(y["unref"])(s).left,width:Object(y["unref"])(s).width,height:Object(y["unref"])(s).height,filter:Object(y["unref"])(u)}),alt:""},null,12,Yi),e.elementInfo.colorMask?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"color-mask",style:Object(y["normalizeStyle"])({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):Object(y["createCommentVNode"])("",!0)],4)],4)],4)],4))}});l("4c0e");const Wi=ol()(Zi,[["__scopeId","data-v-c874e65e"]]);var Ji=Wi;const Ki=["innerHTML"];var Qi=Object(y["defineComponent"])({__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:o}=so(l),n=Object(y["computed"])(()=>({"--textIndent":(t.elementInfo.textIndent||0)+"px","--paragraphSpace":(void 0===t.elementInfo.paragraphSpace?5:t.elementInfo.paragraphSpace)+"px"}));return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-text",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:Object(y["unref"])(o),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[Object(y["createVNode"])(tn,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(y["createElementVNode"])("div",{class:"text ProseMirror-static",style:Object(y["normalizeStyle"])(Object(y["unref"])(n)),innerHTML:e.elementInfo.content},null,12,Ki)],4)],4)],4))}});l("5140");const es=ol()(Qi,[["__scopeId","data-v-18d84242"]]);var ts=es;const ls=["width","height"],os={key:0},ns=["transform"],cs=["d","fill","stroke","stroke-width","stroke-dasharray"],as=["innerHTML"];var rs=Object(y["defineComponent"])({__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.elementInfo.outline),{outlineWidth:o,outlineStyle:n,outlineColor:c}=Oo(l),a=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:r}=so(a),i=Object(y["computed"])(()=>t.elementInfo.flipH),s=Object(y["computed"])(()=>t.elementInfo.flipV),{flipStyle:d}=uo(i,s),u=Object(y["computed"])(()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e});return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-shape",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({opacity:e.elementInfo.opacity,filter:Object(y["unref"])(r)?`drop-shadow(${Object(y["unref"])(r)})`:"",transform:Object(y["unref"])(d),color:Object(y["unref"])(u).defaultColor,fontFamily:Object(y["unref"])(u).defaultFontName})},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?(Object(y["openBlock"])(),Object(y["createElementBlock"])("defs",os,[Object(y["createVNode"])(fc,{id:"base-gradient-"+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(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(y["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:Object(y["unref"])(c),"stroke-width":Object(y["unref"])(o),"stroke-dasharray":"dashed"===Object(y["unref"])(n)?"10 5":"0 0"},null,8,cs)],8,ns)],8,ls)),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["shape-text",Object(y["unref"])(u).align])},[Object(y["createElementVNode"])("div",{class:"ProseMirror-static",innerHTML:Object(y["unref"])(u).content},null,8,as)],2)],4)],4)],4))}});l("8683");const is=ol()(rs,[["__scopeId","data-v-073084bf"]]);var ss=is;const ds=["width","height"],us=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var bs=Object(y["defineComponent"])({__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>t.elementInfo.shadow),{shadowStyle:o}=so(l),n=Object(y["computed"])(()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e}),c=Object(y["computed"])(()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e}),a=Object(y["computed"])(()=>"dashed"===t.elementInfo.style?"10, 5":"0, 0"),r=Object(y["computed"])(()=>Fe(t.elementInfo));return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-line",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({filter:Object(y["unref"])(o)?`drop-shadow(${Object(y["unref"])(o)})`:""})},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:Object(y["unref"])(n),height:Object(y["unref"])(c)},[Object(y["createElementVNode"])("defs",null,[e.elementInfo.points[0]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{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(y["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{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(y["createCommentVNode"])("",!0)]),Object(y["createElementVNode"])("path",{d:Object(y["unref"])(r),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":Object(y["unref"])(a),fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,us)],8,ds))],4)],4))}});l("fbfe");const ps=ol()(bs,[["__scopeId","data-v-340cdee8"]]);var ms=ps,Os=Object(y["defineComponent"])({__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=Object(y["inject"])(Pl)||Object(y["ref"])(1),l=Object(y["computed"])(()=>t.value<1),o=Object(y["computed"])(()=>l.value?1/t.value:1);return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-chart",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({backgroundColor:e.elementInfo.fill})},[Object(y["createVNode"])(tn,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(y["createVNode"])(Ac,{width:e.elementInfo.width*Object(y["unref"])(o),height:e.elementInfo.height*Object(y["unref"])(o),type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:Object(y["normalizeStyle"])({zoom:1/Object(y["unref"])(o)})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});l("9b4d");const fs=ol()(Os,[["__scopeId","data-v-7d2e5c4e"]]);var js=fs;const vs=["width"],hs=["rowspan","colspan"],ys=["innerHTML"];var gs=Object(y["defineComponent"])({__name:"StaticTable",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(e){const t=e,l=Object(y["ref"])([]),o=Object(y["computed"])(()=>l.value.reduce((e,t)=>e+t));Object(y["watch"])([()=>t.colWidths,()=>t.width],()=>{l.value=t.colWidths.map(e=>e*t.width)},{immediate:!0});const n=Object(y["computed"])(()=>t.data),{hideCells:c}=qc(n),a=Object(y["computed"])(()=>t.theme),{subThemeColor:r}=Uc(a);return(t,n)=>{var i,s,d,u,b;return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"static-table",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(o)+"px"})},[Object(y["createElementVNode"])("table",{class:Object(y["normalizeClass"])({theme:Object(y["unref"])(a),"row-header":null===(i=Object(y["unref"])(a))||void 0===i?void 0:i.rowHeader,"row-footer":null===(s=Object(y["unref"])(a))||void 0===s?void 0:s.rowFooter,"col-header":null===(d=Object(y["unref"])(a))||void 0===d?void 0:d.colHeader,"col-footer":null===(u=Object(y["unref"])(a))||void 0===u?void 0:u.colFooter}),style:Object(y["normalizeStyle"])(`--themeColor: ${null===(b=Object(y["unref"])(a))||void 0===b?void 0:b.color}; --subThemeColor1: ${Object(y["unref"])(r)[0]}; --subThemeColor2: ${Object(y["unref"])(r)[1]}`)},[Object(y["createElementVNode"])("colgroup",null,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("col",{span:"1",key:t,width:e},null,8,vs))),128))]),Object(y["createElementVNode"])("tbody",null,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.data,(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("tr",{key:l},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,(t,o)=>Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("td",{class:"cell",style:Object(y["normalizeStyle"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...Object(y["unref"])(Pc)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[Object(y["createElementVNode"])("div",{class:"cell-text",innerHTML:Object(y["unref"])(Hc)(t.text)},null,8,ys)],12,hs)),[[y["vShow"],!Object(y["unref"])(c).includes(`${l}_${o}`)]])),128))]))),128))])],6)],4)}}});l("8628");const xs=ol()(gs,[["__scopeId","data-v-00712fa4"]]);var ks=xs;const Cs={class:"element-content"};var Ns=Object(y["defineComponent"])({__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-table",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",Cs,[Object(y["createVNode"])(ks,{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)],4))}});l("a320");const Es=ol()(Ns,[["__scopeId","data-v-53e0f1ba"]]);var ws=Es;const Vs={class:"element-content"},Is=["width","height","stroke","stroke-width"],Ss=["transform"],Bs=["d"];var Ls=Object(y["defineComponent"])({__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-latex",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",Vs,[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(y["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(y["createElementVNode"])("path",{d:e.elementInfo.path},null,8,Bs)],8,Ss)],8,Is))])],4)],4))}});l("58eb");const _s=ol()(Ls,[["__scopeId","data-v-9a47b5f4"]]);var Ts=_s,Ms=Object(y["defineComponent"])({__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>{const o=Object(y["resolveComponent"])("IconPlayOne");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-video",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",{class:"element-content",style:Object(y["normalizeStyle"])({backgroundImage:`url(${e.elementInfo.poster})`})},[Object(y["createVNode"])(o,{class:"icon"})],4)],4)],4)}}});l("5a58");const Ds=ol()(Ms,[["__scopeId","data-v-56b7f716"]]);var zs=Ds;const As={class:"element-content"};var Fs=Object(y["defineComponent"])({__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px");return(t,o)=>{const n=Object(y["resolveComponent"])("IconVolumeNotice");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"base-element-audio",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",As,[Object(y["createVNode"])(n,{class:"audio-icon",style:Object(y["normalizeStyle"])({fontSize:Object(y["unref"])(l),color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});l("0491");const $s=ol()(Fs,[["__scopeId","data-v-5258e03b"]]);var Rs=$s,Ps=Object(y["defineComponent"])({__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e={[Ue.IMAGE]:Ji,[Ue.TEXT]:ts,[Ue.SHAPE]:ss,[Ue.LINE]:ms,[Ue.CHART]:js,[Ue.TABLE]:ws,[Ue.LATEX]:Ts,[Ue.VIDEO]:zs,[Ue.AUDIO]:Rs};return e[t.elementInfo.type]||null});return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["base-element","base-element-"+e.elementInfo.id]),style:Object(y["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(l)),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const Hs=Ps;var qs=Hs;const Us={key:1,class:"placeholder"};var Gs=Object(y["defineComponent"])({__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=Object(g["c"])(W()),o=Object(y["computed"])(()=>t.slide.background),{backgroundStyle:n}=Nr(o),c=Object(y["computed"])(()=>t.size/He);return Object(y["provide"])(Pl,c),(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"thumbnail-slide",style:Object(y["normalizeStyle"])({width:e.size+"px",height:e.size*Object(y["unref"])(l)+"px"})},[e.visible?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"elements",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(He)+"px",height:Object(y["unref"])(He)*Object(y["unref"])(l)+"px",transform:`scale(${Object(y["unref"])(c)})`})},[Object(y["createElementVNode"])("div",{class:"background",style:Object(y["normalizeStyle"])(Object(y["unref"])(n))},null,4),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.slide.elements,(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(qs,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Us,"加载中 ..."))],4))}});l("b897");const Xs=ol()(Gs,[["__scopeId","data-v-f69fb5b2"]]);var Ys=Xs;const Zs=e=>(Object(y["pushScopeId"])("data-v-dfb654e8"),e=e(),Object(y["popScopeId"])(),e),Ws={class:"link-dialog"},Js={class:"tabs"},Ks=["onClick"],Qs={key:2,class:"preview"},ed=Zs(()=>Object(y["createElementVNode"])("div",null,"预览:",-1)),td={class:"btns"},ld=Object(y["createTextVNode"])("取消"),od=Object(y["createTextVNode"])("确认");var nd=Object(y["defineComponent"])({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const{handleElement:l}=Object(g["c"])(Q()),{slides:o}=Object(g["c"])(W()),n=Object(y["ref"])("web"),c=Object(y["ref"])(""),a=Object(y["ref"])("");a.value=o.value[0].id;const r=Object(y["computed"])(()=>a.value&&o.value.find(e=>e.id===a.value)||null),i=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:s}=zi();Object(y["onMounted"])(()=>{var e;null!==(e=l.value)&&void 0!==e&&e.link&&("web"===l.value.link.type?c.value=l.value.link.target:"slide"===l.value.link.type&&(a.value=l.value.link.target),n.value=l.value.link.type)});const d=()=>{const e={type:n.value,target:"web"===n.value?c.value:a.value};if(l.value){const o=s(l.value,e);o?t("close"):c.value=""}};return(e,l)=>{const s=Object(y["resolveComponent"])("Input"),u=Object(y["resolveComponent"])("SelectOption"),b=Object(y["resolveComponent"])("Select"),p=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Ws,[Object(y["createElementVNode"])("div",Js,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(i,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",{active:n.value===e.key}]),key:e.key,onClick:t=>n.value=e.key},Object(y["toDisplayString"])(e.label),11,Ks)),64))]),"web"===n.value?(Object(y["openBlock"])(),Object(y["createBlock"])(s,{key:0,class:"input",value:c.value,"onUpdate:value":l[0]||(l[0]=e=>c.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):Object(y["createCommentVNode"])("",!0),"slide"===n.value?(Object(y["openBlock"])(),Object(y["createBlock"])(b,{key:1,class:"input",value:a.value,"onUpdate:value":l[1]||(l[1]=e=>a.value=e)},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(o),(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(u,{key:e.id,value:e.id},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])("幻灯片 "+Object(y["toDisplayString"])(t+1),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])):Object(y["createCommentVNode"])("",!0),"slide"===n.value&&Object(y["unref"])(r)?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Qs,[ed,Object(y["createVNode"])(Ys,{class:"thumbnail",slide:Object(y["unref"])(r),size:490},null,8,["slide"])])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",td,[Object(y["createVNode"])(p,{onClick:l[2]||(l[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(y["withCtx"])(()=>[ld]),_:1}),Object(y["createVNode"])(p,{type:"primary",onClick:l[3]||(l[3]=e=>d())},{default:Object(y["withCtx"])(()=>[od]),_:1})])])}}});l("46fe");const cd=ol()(nd,[["__scopeId","data-v-dfb654e8"]]);var ad=cd;const rd={class:"operates"},id={key:1,class:"drag-mask"};var sd=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{activeElementIdList:l,activeGroupElementId:o,handleElementId:n,editorAreaFocus:c,gridLineSize:a,showRuler:r,creatingElement:i,canvasScale:s}=Object(g["c"])(t),{currentSlide:d}=Object(g["c"])(W()),{ctrlKeyState:u,spaceKeyState:b}=Object(g["c"])(ie()),p=Object(y["ref"])(),m=Object(y["ref"])([]),O=Object(y["ref"])(!1),f=()=>O.value=!0;Object(y["watch"])(n,()=>{t.setActiveGroupElementId("")});const j=Object(y["ref"])([]),v=()=>{j.value=d.value?JSON.parse(JSON.stringify(d.value.elements)):[]};Object(y["watchEffect"])(v);const h=Object(y["ref"])(),{dragViewport:x,viewportStyles:k}=Ul(h);Xl(h);const{mouseSelection:C,mouseSelectionVisible:N,mouseSelectionQuadrant:E,updateMouseSelection:w}=Gl(j,p),{dragElement:V}=no(j,m,s),{dragLineElement:I}=co(j),{selectElement:S}=oo(j,V),{scaleElement:B,scaleMultiElement:L}=lo(j,m,s),{rotateElement:_}=Zl(j,p),{moveShapeKeypoint:T}=ao(j,s),{selectAllElement:M}=nt(),{deleteAllElements:D}=tt(),{pasteElement:z}=ot(),{enterScreeningFromStart:A}=dt(),{updateSlideIndex:F}=Qe();Object(y["onMounted"])(()=>{l.value.length&&t.setActiveElementIdList([])});const $=e=>{t.setActiveElementIdList([]),b.value?x(e):w(e),c.value||t.setEditorareaFocus(!0),ql()},R=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:P}=ut(),H=Object(G["throttle"])(P,100,{leading:!0,trailing:!1}),q=Object(G["throttle"])(F,300,{leading:!0,trailing:!1}),U=e=>{e.preventDefault(),u.value?e.deltaY>0?H("-"):e.deltaY<0&&H("+"):e.deltaY>0?q(je.DOWN):e.deltaY<0&&q(je.UP)},X=()=>{t.setRulerState(!r.value)},{insertElementFromCreateSelection:Y}=ro(p),Z=()=>[{text:"粘贴",subText:"Ctrl + V",handler:z},{text:"全选",subText:"Ctrl + A",handler:M},{text:"标尺",subText:r.value?"√":"",handler:X},{text:"网格线",handler:()=>t.setGridLineSize(a.value?0:50),children:[{text:"无",subText:0===a.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===a.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===a.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===a.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:D},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:A}];return Object(y["provide"])(Pl,s),(e,t)=>{const c=Object(y["resolveComponent"])("Modal"),a=Object(y["resolveDirective"])("contextmenu"),d=Object(y["resolveDirective"])("click-outside");return Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"canvas",ref_key:"canvasRef",ref:h,onWheel:t[3]||(t[3]=e=>U(e)),onMousedown:t[4]||(t[4]=e=>$(e))},[Object(y["unref"])(i)?(Object(y["openBlock"])(),Object(y["createBlock"])($r,{key:0,onCreated:t[0]||(t[0]=e=>Object(y["unref"])(Y)(e))})):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",{class:"viewport-wrapper",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(k).width*Object(y["unref"])(s)+"px",height:Object(y["unref"])(k).height*Object(y["unref"])(s)+"px",left:Object(y["unref"])(k).left+"px",top:Object(y["unref"])(k).top+"px"})},[Object(y["createElementVNode"])("div",rd,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(m.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(Br,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:Object(y["unref"])(s)},null,8,["type","axis","length","canvasScale"]))),128)),Object(y["unref"])(l).length>1?(Object(y["openBlock"])(),Object(y["createBlock"])(Wr,{key:0,elementList:j.value,scaleMultiElement:Object(y["unref"])(L)},null,8,["elementList","scaleMultiElement"])):Object(y["createCommentVNode"])("",!0),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(j.value,e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xi,{key:e.id,elementInfo:e,isSelected:Object(y["unref"])(l).includes(e.id),isActive:Object(y["unref"])(n)===e.id,isActiveGroupElement:Object(y["unref"])(o)===e.id,isMultiSelect:Object(y["unref"])(l).length>1,rotateElement:Object(y["unref"])(_),scaleElement:Object(y["unref"])(B),openLinkDialog:f,dragLineElement:Object(y["unref"])(I),moveShapeKeypoint:Object(y["unref"])(T)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"]))),128)),Object(y["createVNode"])(Vr)]),Object(y["createElementVNode"])("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:Object(y["normalizeStyle"])({transform:`scale(${Object(y["unref"])(s)})`})},[Object(y["unref"])(N)?(Object(y["openBlock"])(),Object(y["createBlock"])(hr,{key:0,top:Object(y["unref"])(C).top,left:Object(y["unref"])(C).left,width:Object(y["unref"])(C).width,height:Object(y["unref"])(C).height,quadrant:Object(y["unref"])(E)},null,8,["top","left","width","height","quadrant"])):Object(y["createCommentVNode"])("",!0),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(j.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(fr,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:Object(y["unref"])(l).length>1,selectElement:Object(y["unref"])(S),openLinkDialog:f},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"]))),128))],4)],4),Object(y["unref"])(b)?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",id)):Object(y["createCommentVNode"])("",!0),Object(y["unref"])(r)?(Object(y["openBlock"])(),Object(y["createBlock"])(Mr,{key:2,viewportStyles:Object(y["unref"])(k)},null,8,["viewportStyles"])):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(c,{visible:O.value,"onUpdate:visible":t[2]||(t[2]=e=>O.value=e),footer:null,centered:"",width:540,destroyOnClose:""},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ad,{onClose:t[1]||(t[1]=e=>O.value=!1)})]),_:1},8,["visible"])],32)),[[a,Z],[d,R]])}}});l("0239");const dd=ol()(sd,[["__scopeId","data-v-27676bf3"]]);var ud=dd;const bd={class:"shape-pool"},pd={class:"category-name"},md={class:"shape-list"},Od=["onClick"],fd={overflow:"visible",width:"18",height:"18"},jd=["transform"],vd=["fill","stroke","d"];var hd=Object(y["defineComponent"])({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",bd,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(Xe),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"category",key:e.type},[Object(y["createElementVNode"])("div",pd,Object(y["toDisplayString"])(e.type),1),Object(y["createElementVNode"])("div",md,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.children,(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"shape-item",key:t},[Object(y["createElementVNode"])("div",{class:"shape-content",onClick:t=>l(e)},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",fd,[Object(y["createElementVNode"])("g",{transform:`scale(${18/e.viewBox[0]}, ${18/e.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(y["createElementVNode"])("path",{class:Object(y["normalizeClass"])(["shape-path",{outlined:e.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.outlined?"#999":"transparent",stroke:e.outlined?"transparent":"#999","stroke-width":"2",d:e.path},null,10,vd)],8,jd)]))],8,Od)]))),128))])]))),128))]))}});l("c24c9");const yd=ol()(hd,[["__scopeId","data-v-5788e0d2"]]);var gd=yd;const xd=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],kd={class:"line-pool"},Cd={class:"category-name"},Nd={class:"line-list"},Ed=["onClick"],wd={overflow:"visible",width:"20",height:"20"},Vd=["d","stroke-dasharray","marker-start","marker-end"];var Id=Object(y["defineComponent"])({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",kd,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(xd),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"category",key:e.type},[Object(y["createElementVNode"])("div",Cd,Object(y["toDisplayString"])(e.type),1),Object(y["createElementVNode"])("div",Nd,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.children,(e,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"line-item",key:o},[Object(y["createElementVNode"])("div",{class:"line-content",onClick:t=>l(e)},[(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",wd,[Object(y["createElementVNode"])("defs",null,[e.points[0]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{key:0,class:"line-marker",id:`preset-line-${t}-${o}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(y["createCommentVNode"])("",!0),e.points[1]?(Object(y["openBlock"])(),Object(y["createBlock"])(Vc,{key:1,class:"line-marker",id:`preset-line-${t}-${o}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(y["createCommentVNode"])("",!0)]),Object(y["createElementVNode"])("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${o}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${o}-${e.points[1]}-end)`:""},null,8,Vd)]))],8,Ed)]))),128))])]))),128))]))}});l("3836");const Sd=ol()(Id,[["__scopeId","data-v-bca68faa"]]);var Bd=Sd;const Ld={class:"chart-pool"},_d=["onClick"];var Td=Object(y["defineComponent"])({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],o=e=>{t("select",e)};return(e,t)=>{const n=Object(y["resolveComponent"])("IconChartLine"),c=Object(y["resolveComponent"])("IconChartHistogram"),a=Object(y["resolveComponent"])("IconChartPie"),r=Object(y["resolveComponent"])("IconChartHistogramOne"),i=Object(y["resolveComponent"])("IconChartLineArea"),s=Object(y["resolveComponent"])("IconChartRing"),d=Object(y["resolveComponent"])("IconChartScatter");return Object(y["openBlock"])(),Object(y["createElementBlock"])("ul",Ld,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l,(e,t)=>Object(y["createElementVNode"])("li",{class:"chart-item",key:t},[Object(y["createElementVNode"])("div",{class:"chart-content",onClick:t=>o(e)},["line"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(n,{key:0,size:"24"})):"bar"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(c,{key:1,size:"24"})):"pie"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(a,{key:2,size:"24"})):"horizontalBar"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(r,{key:3,size:"24"})):"area"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(i,{key:4,size:"24"})):"ring"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(s,{key:5,size:"24"})):"scatter"===e?(Object(y["openBlock"])(),Object(y["createBlock"])(d,{key:6,size:"24"})):Object(y["createCommentVNode"])("",!0)],8,_d)])),64))])}}});l("24bc");const Md=ol()(Td,[["__scopeId","data-v-3870b42e"]]);var Dd=Md;const zd=e=>(Object(y["pushScopeId"])("data-v-144fbd05"),e=e(),Object(y["popScopeId"])(),e),Ad={class:"table-generator"},Fd={class:"title"},$d={class:"lef"},Rd=["onMouseenter"],Pd={key:1,class:"custom"},Hd={class:"row"},qd=zd(()=>Object(y["createElementVNode"])("div",{class:"label",style:{flex:"1"}},"行数:",-1)),Ud={class:"row"},Gd=zd(()=>Object(y["createElementVNode"])("div",{class:"label",style:{flex:"1"}},"列数:",-1)),Xd={class:"btns"},Yd=Object(y["createTextVNode"])("取消"),Zd=Object(y["createTextVNode"])("确认");var Wd=Object(y["defineComponent"])({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=Object(y["ref"])([]),o=Object(y["ref"])(3),n=Object(y["ref"])(3),c=Object(y["ref"])(!1),a=()=>{if(!l.value.length)return;const[e,o]=l.value;t("insert",{row:e,col:o})},r=()=>o.value<1||o.value>20||n.value<1||n.value>20?he["a"].warning("行数/列数必须在0~20之间"):(t("insert",{row:o.value,col:n.value}),void(c.value=!1)),i=()=>{t("close"),c.value=!1};return(e,t)=>{const s=Object(y["resolveComponent"])("InputNumber"),d=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Ad,[Object(y["createElementVNode"])("div",Fd,[Object(y["createElementVNode"])("div",$d,"表格 "+Object(y["toDisplayString"])(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),Object(y["createElementVNode"])("div",{class:"right",onClick:t[0]||(t[0]=e=>c.value=!c.value)},Object(y["toDisplayString"])(c.value?"返回":"自定义"),1)]),c.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Pd,[Object(y["createElementVNode"])("div",Hd,[qd,Object(y["createVNode"])(s,{min:1,max:20,value:o.value,"onUpdate:value":t[3]||(t[3]=e=>o.value=e),style:{flex:"3"}},null,8,["value"])]),Object(y["createElementVNode"])("div",Ud,[Gd,Object(y["createVNode"])(s,{min:1,max:20,value:n.value,"onUpdate:value":t[4]||(t[4]=e=>n.value=e),style:{flex:"3"}},null,8,["value"])]),Object(y["createElementVNode"])("div",Xd,[Object(y["createVNode"])(d,{class:"btn",onClick:t[5]||(t[5]=e=>i())},{default:Object(y["withCtx"])(()=>[Yd]),_:1}),Object(y["createVNode"])(d,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>r())},{default:Object(y["withCtx"])(()=>[Zd]),_:1})])])):(Object(y["openBlock"])(),Object(y["createElementBlock"])("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>a())},[Object(y["createElementVNode"])("tbody",null,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(10,e=>Object(y["createElementVNode"])("tr",{key:e},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(10,t=>Object(y["createElementVNode"])("td",{onMouseenter:o=>l.value=[e,t],key:t},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,Rd)),64))])),64))])],32))])}}});l("307a");const Jd=ol()(Wd,[["__scopeId","data-v-144fbd05"]]);var Kd=Jd;const Qd={class:"media-input"},eu={class:"tabs"},tu=["onClick"],lu={class:"btns"},ou=Object(y["createTextVNode"])("取消"),nu=Object(y["createTextVNode"])("确认"),cu={class:"btns"},au=Object(y["createTextVNode"])("取消"),ru=Object(y["createTextVNode"])("确认");var iu=Object(y["defineComponent"])({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=Object(y["ref"])("video"),o=Object(y["ref"])("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),n=Object(y["ref"])("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),c=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],a=()=>{if(!o.value)return he["a"].error("请先输入正确的视频地址");t("insertVideo",o.value)},r=()=>{if(!n.value)return he["a"].error("请先输入正确的音频地址");t("insertAudio",n.value)};return(e,i)=>{const s=Object(y["resolveComponent"])("Input"),d=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Qd,[Object(y["createElementVNode"])("div",eu,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(c,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",{active:l.value===e.key}]),key:e.key,onClick:t=>l.value=e.key},Object(y["toDisplayString"])(e.label),11,tu)),64))]),"video"===l.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createVNode"])(s,{value:o.value,"onUpdate:value":i[0]||(i[0]=e=>o.value=e),placeholder:"请输入视频地址e.g. https://xxx.mp4"},null,8,["value"]),Object(y["createElementVNode"])("div",lu,[Object(y["createVNode"])(d,{onClick:i[1]||(i[1]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(y["withCtx"])(()=>[ou]),_:1}),Object(y["createVNode"])(d,{type:"primary",onClick:i[2]||(i[2]=e=>a())},{default:Object(y["withCtx"])(()=>[nu]),_:1})])],64)):Object(y["createCommentVNode"])("",!0),"audio"===l.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:1},[Object(y["createVNode"])(s,{value:n.value,"onUpdate:value":i[3]||(i[3]=e=>n.value=e),placeholder:"请输入音频地址e.g. https://xxx.mp3"},null,8,["value"]),Object(y["createElementVNode"])("div",cu,[Object(y["createVNode"])(d,{onClick:i[4]||(i[4]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(y["withCtx"])(()=>[au]),_:1}),Object(y["createVNode"])(d,{type:"primary",onClick:i[5]||(i[5]=e=>r())},{default:Object(y["withCtx"])(()=>[ru]),_:1})])],64)):Object(y["createCommentVNode"])("",!0)])}}});l("4675");const su=ol()(iu,[["__scopeId","data-v-b9437110"]]);var du=su,uu=l("e5ca");uu["a"].SUB_SUP_SCALE=.5;const bu=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],pu=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],mu=["width","height"],Ou=["transform"],fu=["d"];var ju=Object(y["defineComponent"])({__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){const t=e,l=Object(y["ref"])({x:0,y:0,w:0,h:0}),o=Object(y["ref"])("");Object(y["watch"])(()=>t.latex,()=>{const e=new uu["b"](t.latex);o.value=e.pathd({}),l.value=e.box({})},{immediate:!0});const n=Object(y["computed"])(()=>{const e=l.value.w+32,o=l.value.h+32;return e>t.width||o>t.height?e/o>t.width/t.height?t.width/e:t.height/o:1});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(y["createElementVNode"])("g",{transform:`scale(${Object(y["unref"])(n)}, ${Object(y["unref"])(n)}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[Object(y["createElementVNode"])("path",{d:o.value},null,8,fu)],8,Ou)],8,mu))}});l("e9df");const vu=ol()(ju,[["__scopeId","data-v-1c41d9fe"]]);var hu=vu;const yu=["innerHTML"];var gu=Object(y["defineComponent"])({__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e=new uu["b"](t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"symbol-content",innerHTML:Object(y["unref"])(l)},null,8,yu))}});const xu=gu;var ku=xu;const Cu={class:"latex-editor"},Nu={class:"container"},Eu={class:"left"},wu={class:"input-area"},Vu={class:"preview"},Iu={key:0,class:"placeholder"},Su={key:1,class:"preview-content"},Bu={class:"right"},Lu={class:"tabs"},_u=["onClick"],Tu={class:"content"},Mu={key:0,class:"symbol"},Du={class:"symbol-tabs"},zu=["onClick"],Au={class:"symbol-pool"},Fu=["onClick"],$u={key:1,class:"formula"},Ru={class:"formula-title"},Pu=["onClick"],Hu={class:"footer"},qu=Object(y["createTextVNode"])("取消"),Uu=Object(y["createTextVNode"])("确定");var Gu=Object(y["defineComponent"])({__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,o=[{label:"常用符号",value:"symbol"},{label:"预置公式",value:"formula"}],n=bu,c=pu,a=Object(y["ref"])(""),r=Object(y["ref"])("symbol"),i=Object(y["ref"])(),s=Object(y["ref"])(pu[0].type),d=Object(y["computed"])(()=>{const e=pu.find(e=>e.type===s.value);return(null===e||void 0===e?void 0:e.children)||[]});Object(y["onMounted"])(()=>{l.value&&(a.value=l.value)});const u=()=>{if(!a.value)return he["a"].error("公式不能为空");const e=new uu["b"](a.value),l=e.pathd({}),o=e.box({});t("update",{latex:a.value,path:l,w:o.w+32,h:o.h+32})},b=e=>{i.value&&(i.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>{const p=Object(y["resolveComponent"])("TextArea"),m=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Cu,[Object(y["createElementVNode"])("div",Nu,[Object(y["createElementVNode"])("div",Eu,[Object(y["createElementVNode"])("div",wu,[Object(y["createVNode"])(p,{value:a.value,"onUpdate:value":l[0]||(l[0]=e=>a.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:i},null,8,["value"])]),Object(y["createElementVNode"])("div",Vu,[a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Su,[Object(y["createVNode"])(hu,{width:518,height:138,latex:a.value},null,8,["latex"])])):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Iu,"公式预览"))])]),Object(y["createElementVNode"])("div",Bu,[Object(y["createElementVNode"])("div",Lu,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(o,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",{active:e.value===r.value}]),key:e.value,onClick:t=>r.value=e.value},Object(y["toDisplayString"])(e.label),11,_u)),64))]),Object(y["createElementVNode"])("div",Tu,["symbol"===r.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Mu,[Object(y["createElementVNode"])("div",Du,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["symbol-tab",{active:s.value===e.type}]),key:e.type,onClick:t=>s.value=e.type},Object(y["toDisplayString"])(e.label),11,zu))),128))]),Object(y["createElementVNode"])("div",Au,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(d),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"symbol-item",key:e.latex,onClick:t=>b(e.latex)},[Object(y["createVNode"])(ku,{latex:e.latex},null,8,["latex"])],8,Fu))),128))])])):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",$u,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(n),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"formula-item",key:e.label},[Object(y["createElementVNode"])("div",Ru,Object(y["toDisplayString"])(e.label),1),Object(y["createElementVNode"])("div",{class:"formula-item-content",onClick:t=>a.value=e.latex},[Object(y["createVNode"])(hu,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,Pu)]))),128))]))])])]),Object(y["createElementVNode"])("div",Hu,[Object(y["createVNode"])(m,{class:"btn",onClick:l[1]||(l[1]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[qu]),_:1}),Object(y["createVNode"])(m,{class:"btn",type:"primary",onClick:l[2]||(l[2]=e=>u())},{default:Object(y["withCtx"])(()=>[Uu]),_:1})])])}}});l("1933");const Xu=ol()(Gu,[["__scopeId","data-v-2d73bf28"]]);var Yu=Xu;const Zu={class:"canvas-tool"},Wu={class:"left-handler"},Ju={class:"add-element-handler"},Ku={class:"handler-item group-btn"},Qu=Object(y["createTextVNode"])(" 横向文本框"),eb=Object(y["createTextVNode"])(" 竖向文本框"),tb={class:"right-handler"},lb={class:"viewport-size-preset"},ob=["onClick"],nb={class:"text"};var cb=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{creatingElement:l}=Object(g["c"])(t),{canUndo:o,canRedo:n}=Object(g["c"])(re()),{redo:c,undo:a}=Ze(),{scaleCanvas:r,setCanvasScalePercentage:i,resetCanvas:s,canvasScalePercentage:d}=ut(),u=[200,150,100,80,50],b=Object(y["ref"])(!1),p=e=>{i(e),b.value=!1},{createImageElement:m,createChartElement:O,createTableElement:f,createLatexElement:j,createVideoElement:v,createAudioElement:h}=We(),x=e=>{const t=e[0];t&&Pe(t).then(e=>m(e))},k=Object(y["ref"])(!1),C=Object(y["ref"])(!1),N=Object(y["ref"])(!1),E=Object(y["ref"])(!1),w=Object(y["ref"])(!1),V=Object(y["ref"])(!1),I=Object(y["ref"])(!1),S=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},B=e=>{t.setCreatingElement({type:"shape",data:e}),k.value=!1},L=e=>{t.setCreatingElement({type:"line",data:e}),C.value=!1};return(e,t)=>{const i=Object(y["resolveComponent"])("IconBack"),m=Object(y["resolveComponent"])("Tooltip"),g=Object(y["resolveComponent"])("IconNext"),_=Object(y["resolveComponent"])("IconFontSize"),T=Object(y["resolveComponent"])("IconTextRotationNone"),M=Object(y["resolveComponent"])("IconTextRotationDown"),D=Object(y["resolveComponent"])("IconDown"),z=Object(y["resolveComponent"])("Popover"),A=Object(y["resolveComponent"])("IconPicture"),F=Object(y["resolveComponent"])("FileInput"),$=Object(y["resolveComponent"])("IconGraphicDesign"),R=Object(y["resolveComponent"])("IconConnection"),P=Object(y["resolveComponent"])("IconChartProportion"),H=Object(y["resolveComponent"])("IconInsertTable"),q=Object(y["resolveComponent"])("IconFormula"),U=Object(y["resolveComponent"])("IconVideoTwo"),G=Object(y["resolveComponent"])("IconMinus"),X=Object(y["resolveComponent"])("IconPlus"),Y=Object(y["resolveComponent"])("IconFullScreen"),Z=Object(y["resolveComponent"])("Modal");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Zu,[Object(y["createElementVNode"])("div",Wu,[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"撤销"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{class:Object(y["normalizeClass"])(["handler-item",{disable:!Object(y["unref"])(o)}]),onClick:t[0]||(t[0]=e=>Object(y["unref"])(a)())},null,8,["class"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"重做"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{class:Object(y["normalizeClass"])(["handler-item",{disable:!Object(y["unref"])(n)}]),onClick:t[1]||(t[1]=e=>Object(y["unref"])(c)())},null,8,["class"])]),_:1},8,["mouseEnterDelay"])]),Object(y["createElementVNode"])("div",Ju,[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入文字"},{default:Object(y["withCtx"])(()=>{var e;return[Object(y["createElementVNode"])("div",Ku,[Object(y["createVNode"])(_,{class:Object(y["normalizeClass"])(["icon",{active:"text"===(null===(e=Object(y["unref"])(l))||void 0===e?void 0:e.type)}]),onClick:t[2]||(t[2]=e=>S())},null,8,["class"]),Object(y["createVNode"])(z,{trigger:"click",visible:I.value,"onUpdate:visible":t[5]||(t[5]=e=>I.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:"text-type-item",onClick:t[3]||(t[3]=()=>{S(),I.value=!1})},[Object(y["createVNode"])(T),Qu]),Object(y["createElementVNode"])("div",{class:"text-type-item",onClick:t[4]||(t[4]=()=>{S(!0),I.value=!1})},[Object(y["createVNode"])(M),eb])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{class:"arrow"})]),_:1},8,["visible"])])]}),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(F,{onChange:t[6]||(t[6]=e=>x(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图片"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(z,{trigger:"click",visible:k.value,"onUpdate:visible":t[8]||(t[8]=e=>k.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(gd,{onSelect:t[7]||(t[7]=e=>B(e))})]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入形状"},{default:Object(y["withCtx"])(()=>{var e;return[Object(y["createVNode"])($,{class:Object(y["normalizeClass"])(["handler-item",{active:"shape"===(null===(e=Object(y["unref"])(l))||void 0===e?void 0:e.type)}])},null,8,["class"])]}),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(y["createVNode"])(z,{trigger:"click",visible:C.value,"onUpdate:visible":t[10]||(t[10]=e=>C.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Bd,{onSelect:t[9]||(t[9]=e=>L(e))})]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入线条"},{default:Object(y["withCtx"])(()=>{var e;return[Object(y["createVNode"])(R,{class:Object(y["normalizeClass"])(["handler-item",{active:"line"===(null===(e=Object(y["unref"])(l))||void 0===e?void 0:e.type)}])},null,8,["class"])]}),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(y["createVNode"])(z,{trigger:"click",visible:N.value,"onUpdate:visible":t[12]||(t[12]=e=>N.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Dd,{onSelect:t[11]||(t[11]=e=>{Object(y["unref"])(O)(e),N.value=!1})})]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图表"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(P,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(y["createVNode"])(z,{trigger:"click",visible:E.value,"onUpdate:visible":t[15]||(t[15]=e=>E.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Kd,{onClose:t[13]||(t[13]=e=>E.value=!1),onInsert:t[14]||(t[14]=({row:e,col:t})=>{Object(y["unref"])(f)(e,t),E.value=!1})})]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入表格"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入公式"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(q,{class:"handler-item",onClick:t[16]||(t[16]=e=>V.value=!0)})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(z,{trigger:"click",visible:w.value,"onUpdate:visible":t[20]||(t[20]=e=>w.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(du,{onClose:t[17]||(t[17]=e=>w.value=!1),onInsertVideo:t[18]||(t[18]=e=>{Object(y["unref"])(v)(e),w.value=!1}),onInsertAudio:t[19]||(t[19]=e=>{Object(y["unref"])(h)(e),w.value=!1})})]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入音视频"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(U,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"])]),Object(y["createElementVNode"])("div",tb,[Object(y["createVNode"])(G,{class:"handler-item viewport-size",onClick:t[21]||(t[21]=e=>Object(y["unref"])(r)("-"))}),Object(y["createVNode"])(z,{trigger:"click",visible:b.value,"onUpdate:visible":t[22]||(t[22]=e=>b.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",lb,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(u,e=>Object(y["createElementVNode"])("div",{class:"preset-item",key:e,onClick:t=>p(e)},Object(y["toDisplayString"])(e)+"%",9,ob)),64))])]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",nb,Object(y["toDisplayString"])(Object(y["unref"])(d)),1)]),_:1},8,["visible"]),Object(y["createVNode"])(X,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>Object(y["unref"])(r)("+"))}),Object(y["createVNode"])(m,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"适应屏幕"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Y,{class:"handler-item viewport-size-adaptation",onClick:t[24]||(t[24]=e=>Object(y["unref"])(s)())})]),_:1},8,["mouseEnterDelay"])]),Object(y["createVNode"])(Z,{visible:V.value,"onUpdate:visible":t[27]||(t[27]=e=>V.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Yu,{onClose:t[25]||(t[25]=e=>V.value=!1),onUpdate:t[26]||(t[26]=e=>{Object(y["unref"])(j)(e),V.value=!1})})]),_:1},8,["visible"])])}}});l("1ba1");const ab=ol()(cb,[["__scopeId","data-v-33091fba"]]);var rb=ab,ib=()=>{const{slides:e}=Object(g["c"])(W()),t=Object(y["ref"])(null),l=Object(y["ref"])(50),o=()=>{e.value.length>l.value?t.value=setTimeout(()=>{l.value=l.value+20,o()},600):l.value=9999};return Object(y["onMounted"])(o),Object(y["onUnmounted"])(()=>{t.value&&clearTimeout(t.value)}),{slidesLoadLimit:l}},sb=l("b76a"),db=l.n(sb);const ub={class:"layout-pool"},bb=["onClick"];var pb=Object(y["defineComponent"])({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=Object(g["c"])(W()),o=e=>{t("select",e)};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",ub,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"layout-item",key:e.id,onClick:t=>o(e)},[Object(y["createVNode"])(Ys,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,bb))),128))]))}});l("3328");const mb=ol()(pb,[["__scopeId","data-v-cc6b7dca"]]);var Ob=mb;const fb={class:"add-slide"},jb=Object(y["createTextVNode"])("添加幻灯片"),vb={class:"select-btn"},hb=["onMousedown"],yb={class:"page-number"};var gb=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),l=W(),o=ie(),{selectedSlidesIndex:n,thumbnailsFocus:c}=Object(g["c"])(t),{slides:a,slideIndex:r}=Object(g["c"])(l),{ctrlKeyState:i,shiftKeyState:s}=Object(g["c"])(o),{slidesLoadLimit:d}=ib(),u=Object(y["computed"])(()=>[...n.value,r.value]),b=Object(y["ref"])(!1),{copySlide:p,pasteSlide:m,createSlide:O,createSlideByTemplate:f,copyAndPasteSlide:j,deleteSlide:v,cutSlide:h,selectAllSlide:x,sortSlides:k}=Qe(),C=e=>{t.setActiveElementIdList([]),r.value!==e&&l.updateSlideIndex(e)},N=(e,l)=>{const o=u.value.length>1;if(!o||!u.value.includes(l)||0===e.button)if(i.value)if(r.value===l){if(!o)return;const e=u.value.filter(e=>e!==l);t.updateSelectedSlidesIndex(e),C(u.value[0])}else if(u.value.includes(l)){const e=u.value.filter(e=>e!==l);t.updateSelectedSlidesIndex(e)}else{const e=[...u.value,l];t.updateSelectedSlidesIndex(e),C(l)}else if(s.value){if(r.value===l&&!o)return;let e=Math.min(...u.value),n=l;l<e&&(n=Math.max(...u.value),e=l);const c=[];for(let t=e;t<=n;t++)c.push(t);t.updateSelectedSlidesIndex(c),C(l)}else t.updateSelectedSlidesIndex([]),C(l)},E=e=>{c.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},w=e=>{const{newIndex:t,oldIndex:l}=e;k(t,l)},{enterScreening:V,enterScreeningFromStart:I}=dt(),S=()=>[{text:"粘贴",subText:"Ctrl + V",handler:m},{text:"全选",subText:"Ctrl + A",handler:x},{text:"新建页面",subText:"Enter",handler:O},{text:"幻灯片放映",subText:"F5",handler:I}],B=()=>[{text:"剪切",subText:"Ctrl + X",handler:h},{text:"复制",subText:"Ctrl + C",handler:p},{text:"粘贴",subText:"Ctrl + V",handler:m},{text:"全选",subText:"Ctrl + A",handler:x},{divider:!0},{text:"新建页面",subText:"Enter",handler:O},{text:"复制页面",subText:"Ctrl + D",handler:j},{text:"删除页面",subText:"Delete",handler:()=>v()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:V}];return(e,t)=>{const l=Object(y["resolveComponent"])("IconPlus"),o=Object(y["resolveComponent"])("IconDown"),n=Object(y["resolveComponent"])("Popover"),c=Object(y["resolveDirective"])("contextmenu"),i=Object(y["resolveDirective"])("click-outside");return Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"thumbnails",onMousedown:t[3]||(t[3]=()=>E(!0))},[Object(y["createElementVNode"])("div",fb,[Object(y["createElementVNode"])("div",{class:"btn",onClick:t[0]||(t[0]=e=>Object(y["unref"])(O)())},[Object(y["createVNode"])(l,{class:"icon"}),jb]),Object(y["createVNode"])(n,{trigger:"click",placement:"bottomLeft",visible:b.value,"onUpdate:visible":t[2]||(t[2]=e=>b.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Ob,{onSelect:t[1]||(t[1]=e=>{Object(y["unref"])(f)(e),b.value=!1})})]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",vb,[Object(y["createVNode"])(o)])]),_:1},8,["visible"])]),Object(y["createVNode"])(Object(y["unref"])(db.a),{class:"thumbnail-list",modelValue:Object(y["unref"])(a),animation:300,scroll:!0,scrollSensitivity:50,setData:null,onEnd:w,itemKey:"id"},{item:Object(y["withCtx"])(({element:e,index:t})=>[Object(y["withDirectives"])((Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["thumbnail-item",{active:Object(y["unref"])(r)===t,selected:Object(y["unref"])(u).includes(t)}]),onMousedown:e=>N(e,t)},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["label",{"offset-left":t>=99}])},Object(y["toDisplayString"])(Object(y["unref"])(de)(t+1,2)),3),Object(y["createVNode"])(Ys,{class:"thumbnail",slide:e,size:120,visible:t<Object(y["unref"])(d)},null,8,["slide","visible"])],42,hb)),[[c,B]])]),_:1},8,["modelValue"]),Object(y["createElementVNode"])("div",yb,"幻灯片 "+Object(y["toDisplayString"])(Object(y["unref"])(r)+1)+" / "+Object(y["toDisplayString"])(Object(y["unref"])(a).length),1)],32)),[[i,()=>E(!1)],[c,S]])}}});l("1bde");const xb=ol()(gb,[["__scopeId","data-v-21f51f54"]]);var kb=xb;const Cb=e=>(Object(y["pushScopeId"])("data-v-22345a51"),e=e(),Object(y["popScopeId"])(),e),Nb={class:"element-opacity"},Eb={class:"row"},wb=Cb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"不透明度:",-1));var Vb=Object(y["defineComponent"])({__name:"ElementOpacity",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=Object(y["ref"])(1);Object(y["watch"])(l,()=>{l.value&&(o.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)},{deep:!0,immediate:!0});const{addHistorySnapshot:n}=Ze(),c=e=>{if(!l.value)return;const o={opacity:e};t.updateElement({id:l.value.id,props:o}),n()};return(e,t)=>{const l=Object(y["resolveComponent"])("Slider");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Nb,[Object(y["createElementVNode"])("div",Eb,[wb,Object(y["createVNode"])(l,{class:"slider",min:0,max:1,step:.1,value:o.value,onChange:t[0]||(t[0]=e=>c(e))},null,8,["step","value"])])])}}});l("335c");const Ib=ol()(Vb,[["__scopeId","data-v-22345a51"]]);var Sb=Ib;const Bb={class:"color-block"};var Lb=Object(y["defineComponent"])({__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,l)=>{const o=Object(y["resolveComponent"])("IconPlatte"),n=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createBlock"])(n,{class:"color-btn"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",Bb,[Object(y["createElementVNode"])("div",{class:"content",style:Object(y["normalizeStyle"])({backgroundColor:e.color})},null,4)]),Object(y["createVNode"])(o,{class:"color-btn-icon"})]),_:1})}}});l("9300");const _b=ol()(Lb,[["__scopeId","data-v-ed8f2044"]]);var Tb=_b;const Mb=e=>(Object(y["pushScopeId"])("data-v-e91e3764"),e=e(),Object(y["popScopeId"])(),e),Db={class:"element-outline"},zb={key:0,class:"row"},Ab=Mb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"启用边框:",-1)),Fb={class:"switch-wrapper",style:{flex:"3"}},$b={class:"row"},Rb=Mb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框样式:",-1)),Pb=Object(y["createTextVNode"])("实线边框"),Hb=Object(y["createTextVNode"])("虚线边框"),qb={class:"row"},Ub=Mb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框颜色:",-1)),Gb={class:"row"},Xb=Mb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框粗细:",-1));var Yb=Object(y["defineComponent"])({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=Object(y["ref"])(),n=Object(y["ref"])(!1);Object(y["watch"])(l,()=>{l.value&&(o.value="outline"in l.value?l.value.outline:void 0,n.value=!!o.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:c}=Ze(),a=e=>{if(!l.value)return;const n={outline:{...o.value,...e}};t.updateElement({id:l.value.id,props:n}),c()},r=e=>{if(l.value){if(e){const e={width:2,color:"#000",style:"solid"};t.updateElement({id:l.value.id,props:{outline:e}})}else t.removeElementProps({id:l.value.id,propName:"outline"});c()}};return(t,l)=>{const c=Object(y["resolveComponent"])("Switch"),i=Object(y["resolveComponent"])("SelectOption"),s=Object(y["resolveComponent"])("Select"),d=Object(y["resolveComponent"])("ColorPicker"),u=Object(y["resolveComponent"])("Popover"),b=Object(y["resolveComponent"])("InputNumber");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Db,[e.fixed?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",zb,[Ab,Object(y["createElementVNode"])("div",Fb,[Object(y["createVNode"])(c,{checked:n.value,onChange:l[0]||(l[0]=e=>r(e))},null,8,["checked"])])])),n.value&&o.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:1},[Object(y["createElementVNode"])("div",$b,[Rb,Object(y["createVNode"])(s,{style:{flex:"3"},value:o.value.style,onChange:l[1]||(l[1]=e=>a({style:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{value:"solid"},{default:Object(y["withCtx"])(()=>[Pb]),_:1}),Object(y["createVNode"])(i,{value:"dashed"},{default:Object(y["withCtx"])(()=>[Hb]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",qb,[Ub,Object(y["createVNode"])(u,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{modelValue:o.value.color,"onUpdate:modelValue":l[2]||(l[2]=e=>a({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:o.value.color||"#000",style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Gb,[Xb,Object(y["createVNode"])(b,{value:o.value.width,onChange:l[3]||(l[3]=e=>a({width:e})),style:{flex:"3"}},null,8,["value"])])],64)):Object(y["createCommentVNode"])("",!0)])}}});l("f40d");const Zb=ol()(Yb,[["__scopeId","data-v-e91e3764"]]);var Wb=Zb;const Jb=e=>(Object(y["pushScopeId"])("data-v-053ed706"),e=e(),Object(y["popScopeId"])(),e),Kb={class:"element-shadow"},Qb={class:"row"},ep=Jb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"启用阴影:",-1)),tp={class:"switch-wrapper",style:{flex:"3"}},lp={class:"row"},op=Jb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"水平阴影:",-1)),np={class:"row"},cp=Jb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"垂直阴影:",-1)),ap={class:"row"},rp=Jb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"模糊距离:",-1)),ip={class:"row"},sp=Jb(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"阴影颜色:",-1));var dp=Object(y["defineComponent"])({__name:"ElementShadow",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=Object(y["ref"])(),n=Object(y["ref"])(!1);Object(y["watch"])(l,()=>{l.value&&(o.value="shadow"in l.value?l.value.shadow:void 0,n.value=!!o.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:c}=Ze(),a=e=>{if(!l.value||!o.value)return;const n={...o.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),c()},r=e=>{if(l.value){if(e){const e={h:1,v:1,blur:2,color:"#000"};t.updateElement({id:l.value.id,props:{shadow:e}})}else t.removeElementProps({id:l.value.id,propName:"shadow"});c()}};return(e,t)=>{const l=Object(y["resolveComponent"])("Switch"),c=Object(y["resolveComponent"])("Slider"),i=Object(y["resolveComponent"])("ColorPicker"),s=Object(y["resolveComponent"])("Popover");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Kb,[Object(y["createElementVNode"])("div",Qb,[ep,Object(y["createElementVNode"])("div",tp,[Object(y["createVNode"])(l,{checked:n.value,onChange:t[0]||(t[0]=e=>r(e))},null,8,["checked"])])]),n.value&&o.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",lp,[op,Object(y["createVNode"])(c,{class:"slider",min:-10,max:10,step:1,value:o.value.h,onChange:t[1]||(t[1]=e=>a({h:e}))},null,8,["value"])]),Object(y["createElementVNode"])("div",np,[cp,Object(y["createVNode"])(c,{class:"slider",min:-10,max:10,step:1,value:o.value.v,onChange:t[2]||(t[2]=e=>a({v:e}))},null,8,["value"])]),Object(y["createElementVNode"])("div",ap,[rp,Object(y["createVNode"])(c,{class:"slider",min:1,max:20,step:1,value:o.value.blur,onChange:t[3]||(t[3]=e=>a({blur:e}))},null,8,["value"])]),Object(y["createElementVNode"])("div",ip,[sp,Object(y["createVNode"])(s,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:o.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>a({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:o.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})])],64)):Object(y["createCommentVNode"])("",!0)])}}});l("34f1");const up=ol()(dp,[["__scopeId","data-v-053ed706"]]);var bp=up;const pp=e=>(Object(y["pushScopeId"])("data-v-aa700594"),e=e(),Object(y["popScopeId"])(),e),mp={class:"text-style-panel"},Op={class:"preset-style"},fp=["onClick"],jp=Object(y["createTextVNode"])("+"),vp=Object(y["createTextVNode"])("-"),hp={class:"link-popover"},yp={class:"btns"},gp=Object(y["createTextVNode"])("移除"),xp=Object(y["createTextVNode"])("确认"),kp={class:"row"},Cp=pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"行间距:",-1)),Np={class:"row"},Ep=pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"段间距:",-1)),wp={class:"row"},Vp=pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"字间距:",-1)),Ip={class:"row"},Sp=pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"首行缩进:",-1)),Bp={class:"row"},Lp=pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"文本框填充:",-1));var _p=Object(y["defineComponent"])({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"48px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"36px"},{command:"align",value:"center"}]},{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"}]}],l=W(),{handleElement:o,handleElementId:n,richTextAttrs:c,availableFonts:a}=Object(g["c"])(Q()),{addHistorySnapshot:r}=Ze(),i=e=>{l.updateElement({id:n.value,props:e}),r()},s=Object(y["ref"])("#000"),d=Object(y["ref"])(),u=Object(y["ref"])(),b=Object(y["ref"])(),p=Object(y["ref"])();Object(y["watch"])(o,()=>{o.value&&"text"===o.value.type&&(s.value=o.value.fill||"#fff",d.value=o.value.lineHeight||1.5,u.value=o.value.wordSpace||0,b.value=o.value.textIndent||0,p.value=void 0===o.value.paragraphSpace?5:o.value.paragraphSpace)},{deep:!0,immediate:!0});const m=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],O=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],f=[0,1,2,3,4,5,6,8,10],j=[0,48,96,144,192,240,288,336],v=[0,5,10,15,20,25,30,40,50,80],h=e=>{i({lineHeight:e})},x=e=>{i({paragraphSpace:e})},k=e=>{i({wordSpace:e})},N=e=>{i({textIndent:e})},E=e=>{i({fill:e})},w=(e,t)=>{Un.emit(Pn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},V=e=>{Un.emit(Pn.RICH_TEXT_COMMAND,{action:e})},I=Object(y["ref"])(""),S=Object(y["ref"])(!1);Object(y["watch"])(c,()=>S.value=!1);const B=()=>{I.value=c.value.link,S.value=!0},L=e=>{if(e){const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!t.test(e))return he["a"].error("不是正确的网页链接地址")}w("link",e),S.value=!1};return(e,l)=>{const o=Object(y["resolveComponent"])("Divider"),n=Object(y["resolveComponent"])("IconFontSize"),r=Object(y["resolveComponent"])("SelectOption"),i=Object(y["resolveComponent"])("SelectOptGroup"),g=Object(y["resolveComponent"])("Select"),_=Object(y["resolveComponent"])("IconAddText"),T=Object(y["resolveComponent"])("InputGroup"),M=Object(y["resolveComponent"])("ColorPicker"),D=Object(y["resolveComponent"])("IconText"),z=Object(y["resolveComponent"])("Button"),A=Object(y["resolveComponent"])("Tooltip"),F=Object(y["resolveComponent"])("Popover"),$=Object(y["resolveComponent"])("IconHighLight"),R=Object(y["resolveComponent"])("ButtonGroup"),P=Object(y["resolveComponent"])("IconTextBold"),H=Object(y["resolveComponent"])("CheckboxButton"),q=Object(y["resolveComponent"])("IconTextItalic"),U=Object(y["resolveComponent"])("IconTextUnderline"),G=Object(y["resolveComponent"])("IconStrikethrough"),X=Object(y["resolveComponent"])("IconFormat"),Y=Object(y["resolveComponent"])("CheckboxButtonGroup"),Z=Object(y["resolveComponent"])("IconUpOne"),W=Object(y["resolveComponent"])("IconDownOne"),J=Object(y["resolveComponent"])("IconCode"),K=Object(y["resolveComponent"])("IconQuote"),Q=Object(y["resolveComponent"])("Input"),ee=Object(y["resolveComponent"])("IconLinkOne"),te=Object(y["resolveComponent"])("IconAlignTextLeft"),le=Object(y["resolveComponent"])("RadioButton"),oe=Object(y["resolveComponent"])("IconAlignTextCenter"),ne=Object(y["resolveComponent"])("IconAlignTextRight"),ce=Object(y["resolveComponent"])("RadioGroup"),ae=Object(y["resolveComponent"])("IconList"),re=Object(y["resolveComponent"])("IconOrderedList"),ie=Object(y["resolveComponent"])("IconIndentLeft"),se=Object(y["resolveComponent"])("IconIndentRight"),de=Object(y["resolveComponent"])("IconRowHeight"),ue=Object(y["resolveComponent"])("IconVerticalSpacingBetweenItems"),be=Object(y["resolveComponent"])("IconFullwidth");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",mp,[Object(y["createElementVNode"])("div",Op,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,e=>Object(y["createElementVNode"])("div",{class:"preset-style-item",key:e.label,style:Object(y["normalizeStyle"])(e.style),onClick:t=>V(e.cmd)},Object(y["toDisplayString"])(e.label),13,fp)),64))]),Object(y["createVNode"])(o),Object(y["createVNode"])(T,{compact:"",class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{style:{flex:"3"},value:Object(y["unref"])(c).fontname,onChange:l[0]||(l[0]=e=>w("fontname",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n)]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{label:"系统字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(r,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",{style:Object(y["normalizeStyle"])({fontFamily:e.value})},Object(y["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(y["createVNode"])(i,{label:"在线字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(C),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(r,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(y["createVNode"])(g,{style:{flex:"2"},value:Object(y["unref"])(c).fontsize,onChange:l[1]||(l[1]=e=>w("fontsize",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(_)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(m,e=>Object(y["createVNode"])(r,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(y["createVNode"])(R,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(F,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M,{modelValue:Object(y["unref"])(c).color,"onUpdate:modelValue":l[2]||(l[2]=e=>w("color",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(c).color})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(F,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M,{modelValue:Object(y["unref"])(c).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>w("backcolor",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(c).backcolor})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"font-size-btn",style:{flex:"2"},onClick:l[4]||(l[4]=e=>w("fontsize-add"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n),jp]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"font-size-btn",style:{flex:"2"},onClick:l[5]||(l[5]=e=>w("fontsize-reduce"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n),vp]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(Y,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).bold,onClick:l[6]||(l[6]=e=>w("bold"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(P)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).em,onClick:l[7]||(l[7]=e=>w("em"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(q)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).underline,onClick:l[8]||(l[8]=e=>w("underline"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(U)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).strikethrough,onClick:l[9]||(l[9]=e=>w("strikethrough"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(G)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>w("clear"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(X)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(Y,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上标"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).superscript,onClick:l[11]||(l[11]=e=>w("superscript"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Z)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下标"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).subscript,onClick:l[12]||(l[12]=e=>w("subscript"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(W)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"行内代码"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).code,onClick:l[13]||(l[13]=e=>w("code"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(J)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"引用"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).blockquote,onClick:l[14]||(l[14]=e=>w("blockquote"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(K)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"超链接"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(F,{placement:"bottomRight",trigger:"click",visible:S.value,"onUpdate:visible":l[19]||(l[19]=e=>S.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",hp,[Object(y["createVNode"])(Q,{value:I.value,"onUpdate:value":l[15]||(l[15]=e=>I.value=e),placeholder:"请输入超链接"},null,8,["value"]),Object(y["createElementVNode"])("div",yp,[Object(y["createVNode"])(z,{size:"small",disabled:!Object(y["unref"])(c).link,onClick:l[16]||(l[16]=e=>L()),style:{"margin-right":"5px"}},{default:Object(y["withCtx"])(()=>[gp]),_:1},8,["disabled"]),Object(y["createVNode"])(z,{size:"small",type:"primary",onClick:l[17]||(l[17]=e=>L(I.value))},{default:Object(y["withCtx"])(()=>[xp]),_:1})])])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:!!Object(y["unref"])(c).link,onClick:l[18]||(l[18]=e=>B())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ee)]),_:1},8,["checked"])]),_:1},8,["visible"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(o),Object(y["createVNode"])(ce,{class:"row","button-style":"solid",value:Object(y["unref"])(c).align,onChange:l[20]||(l[20]=e=>w("align",e.target.value))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(le,{value:"left",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(te)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(le,{value:"center",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(oe)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(le,{value:"right",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ne)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(y["createVNode"])(Y,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"项目符号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).bulletList,onClick:l[21]||(l[21]=e=>w("bulletList"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ae)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"编号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(H,{style:{flex:"1"},checked:Object(y["unref"])(c).orderedList,onClick:l[22]||(l[22]=e=>w("orderedList"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(re)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(R,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小缩进"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{style:{flex:"1"},onClick:l[23]||(l[23]=e=>w("indent","-1"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ie)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(A,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大缩进"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{style:{flex:"1"},onClick:l[24]||(l[24]=e=>w("indent","+1"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(se)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(o),Object(y["createElementVNode"])("div",kp,[Cp,Object(y["createVNode"])(g,{style:{flex:"3"},value:d.value,onChange:l[25]||(l[25]=e=>h(e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(de)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(O,e=>Object(y["createVNode"])(r,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e)+"倍",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",Np,[Ep,Object(y["createVNode"])(g,{style:{flex:"3"},value:p.value,onChange:l[26]||(l[26]=e=>x(e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(ue)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(v,e=>Object(y["createVNode"])(r,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",wp,[Vp,Object(y["createVNode"])(g,{style:{flex:"3"},value:u.value,onChange:l[27]||(l[27]=e=>k(e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(be)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(f,e=>Object(y["createVNode"])(r,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",Ip,[Sp,Object(y["createVNode"])(g,{style:{flex:"3"},value:b.value,onChange:l[28]||(l[28]=e=>N(e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(se)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(j,e=>Object(y["createVNode"])(r,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",Bp,[Lp,Object(y["createVNode"])(F,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M,{modelValue:s.value,"onUpdate:modelValue":l[29]||(l[29]=e=>E(e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:s.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createVNode"])(o),Object(y["createVNode"])(Wb),Object(y["createVNode"])(o),Object(y["createVNode"])(bp),Object(y["createVNode"])(o),Object(y["createVNode"])(Sb)])}}});l("fb85");const Tp=ol()(_p,[["__scopeId","data-v-aa700594"]]);var Mp=Tp;const Dp={class:"element-flip"},zp=Object(y["createTextVNode"])(" 垂直翻转"),Ap=Object(y["createTextVNode"])(" 水平翻转");var Fp=Object(y["defineComponent"])({__name:"ElementFlip",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=Object(y["ref"])(!1),n=Object(y["ref"])(!1);Object(y["watch"])(l,()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(o.value=!!l.value.flipH,n.value=!!l.value.flipV)},{deep:!0,immediate:!0});const{addHistorySnapshot:c}=Ze(),a=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),c())};return(e,t)=>{const l=Object(y["resolveComponent"])("IconFlipVertically"),c=Object(y["resolveComponent"])("CheckboxButton"),r=Object(y["resolveComponent"])("IconFlipHorizontally"),i=Object(y["resolveComponent"])("CheckboxButtonGroup");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Dp,[Object(y["createVNode"])(i,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>a({flipV:!n.value}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l),zp]),_:1},8,["checked"]),Object(y["createVNode"])(c,{style:{flex:"1"},checked:o.value,onClick:t[1]||(t[1]=e=>a({flipH:!o.value}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(r),Ap]),_:1},8,["checked"])]),_:1})])}}});l("02ca");const $p=ol()(Fp,[["__scopeId","data-v-59a1646e"]]);var Rp=$p;const Pp=e=>(Object(y["pushScopeId"])("data-v-37fbdfde"),e=e(),Object(y["popScopeId"])(),e),Hp={class:"element-filter"},qp={class:"row"},Up=Pp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"启用滤镜:",-1)),Gp={class:"switch-wrapper",style:{flex:"3"}},Xp={key:0,class:"filter"},Yp={class:"name"};var Zp=Object(y["defineComponent"])({__name:"ElementFilter",setup(e){const t=[{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}],l=W(),{handleElement:o,handleElementId:n}=Object(g["c"])(Q()),c=Object(y["ref"])(JSON.parse(JSON.stringify(t))),a=Object(y["ref"])(!1),{addHistorySnapshot:r}=Ze();Object(y["watch"])(o,()=>{if(!o.value||"image"!==o.value.type)return;const e=o.value.filters;e?(c.value=t.map(t=>void 0!==e[t.key]?{...t,value:parseInt(e[t.key])}:t),a.value=!0):(c.value=JSON.parse(JSON.stringify(t)),a.value=!1)},{deep:!0,immediate:!0});const i=(e,t)=>{const c=o.value,a=c.filters||{},i={...a,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:i}}),r()},s=e=>{o.value&&(e?l.updateElement({id:o.value.id,props:{filters:{}}}):l.removeElementProps({id:o.value.id,propName:"filters"}),r())};return(e,t)=>{const l=Object(y["resolveComponent"])("Switch"),o=Object(y["resolveComponent"])("Slider");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Hp,[Object(y["createElementVNode"])("div",qp,[Up,Object(y["createElementVNode"])("div",Gp,[Object(y["createVNode"])(l,{checked:a.value,onChange:t[0]||(t[0]=e=>s(e))},null,8,["checked"])])]),a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Xp,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(c.value,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"filter-item",key:e.key},[Object(y["createElementVNode"])("div",Yp,Object(y["toDisplayString"])(e.label),1),Object(y["createVNode"])(o,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,onChange:t=>i(e,t)},null,8,["max","step","value","onChange"])]))),128))])):Object(y["createCommentVNode"])("",!0)])}}});l("58de");const Wp=ol()(Zp,[["__scopeId","data-v-37fbdfde"]]);var Jp=Wp;const Kp=e=>(Object(y["pushScopeId"])("data-v-f466867c"),e=e(),Object(y["popScopeId"])(),e),Qp={class:"element-color-mask"},em={class:"row"},tm=Kp(()=>Object(y["createElementVNode"])("div",{style:{flex:"1"}},"重新着色(蒙版):",-1)),lm={class:"switch-wrapper",style:{flex:"1"}},om={class:"row",style:{"margin-top":"15px"}},nm=Kp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"蒙版颜色:",-1)),cm={class:"row"},am=Kp(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"不透明度:",-1));var rm=Object(y["defineComponent"])({__name:"ElementColorMask",setup(e){const t={color:"transparent",opacity:.3},l=W(),{handleElement:o,handleElementId:n}=Object(g["c"])(Q()),c=Object(y["ref"])(t),a=Object(y["ref"])(!1),{addHistorySnapshot:r}=Ze();Object(y["watch"])(o,()=>{o.value&&"image"===o.value.type&&(o.value.colorMask?(c.value=o.value.colorMask,a.value=!0):a.value=!1)},{deep:!0,immediate:!0});const i=e=>{o.value&&(e?l.updateElement({id:o.value.id,props:{colorMask:t}}):l.removeElementProps({id:o.value.id,propName:"colorMask"}),r())},s=e=>{const t={...c.value,...e};l.updateElement({id:n.value,props:{colorMask:t}}),r()};return(e,t)=>{const l=Object(y["resolveComponent"])("Switch"),o=Object(y["resolveComponent"])("ColorPicker"),n=Object(y["resolveComponent"])("Popover"),r=Object(y["resolveComponent"])("Slider");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Qp,[Object(y["createElementVNode"])("div",em,[tm,Object(y["createElementVNode"])("div",lm,[Object(y["createVNode"])(l,{checked:a.value,onChange:t[0]||(t[0]=e=>i(e))},null,8,["checked"])])]),a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",om,[nm,Object(y["createVNode"])(n,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{modelValue:c.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>s({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:c.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",cm,[am,Object(y["createVNode"])(r,{class:"opacity-slider",max:1,min:0,step:.05,value:c.value.opacity,onChange:t[2]||(t[2]=e=>s({opacity:e}))},null,8,["step","value"])])],64)):Object(y["createCommentVNode"])("",!0)])}}});l("02bd");const im=ol()(rm,[["__scopeId","data-v-f466867c"]]);var sm=im;const dm=e=>(Object(y["pushScopeId"])("data-v-e8d702d2"),e=e(),Object(y["popScopeId"])(),e),um={class:"image-style-panel"},bm=Object(y["createTextVNode"])(" 裁剪图片"),pm={class:"clip"},mm=dm(()=>Object(y["createElementVNode"])("div",{class:"title"},"按形状:",-1)),Om={class:"shape-clip"},fm=["onClick"],jm={key:0,class:"title"},vm=Object(y["createTextVNode"])(" 替换图片"),hm=Object(y["createTextVNode"])(" 重置样式"),ym=Object(y["createTextVNode"])(" 设为背景");var gm=Object(y["defineComponent"])({__name:"ImageStylePanel",setup(e){const t=bo,l=[{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}]}],o=Q(),n=W(),{handleElement:c,handleElementId:a}=Object(g["c"])(o),{currentSlide:r}=Object(g["c"])(n),i=c,s=Object(y["ref"])(!1),{addHistorySnapshot:d}=Ze(),u=()=>{o.setClipingImageElementId(a.value),s.value=!1},b=()=>{const e=c.value,t=e.width,l=e.height,o=e.left,n=e.top,a=e.clip?e.clip.range:[[0,0],[100,100]],r=t/((a[1][0]-a[0][0])/100),i=l/((a[1][1]-a[0][1])/100),s=o-r*(a[0][0]/100),d=n-i*(a[0][1]/100);return{originClipRange:a,originWidth:r,originHeight:i,originLeft:s,originTop:d}},p=(e,t=0)=>{const l=c.value,{originClipRange:o,originWidth:r,originHeight:i,originLeft:s,originTop:p}=b();if(t){const o=i/r,c=0,d=100;let u;if(o>t){const e=(1-t/o)/2*100;u=[[c,e],[d,d-e]]}else{const e=(1-o/t)/2*100;u=[[e,c],[d-e,d]]}n.updateElement({id:a.value,props:{clip:{...l.clip,shape:e,range:u},left:s+r*(u[0][0]/100),top:p+i*(u[0][1]/100),width:r*(u[1][0]-u[0][0])/100,height:i*(u[1][1]-u[0][1])/100}})}else n.updateElement({id:a.value,props:{clip:{...l.clip,shape:e,range:o}}});u(),d()},m=e=>{const t=e[0];t&&(Pe(t).then(e=>{const t={src:e};n.updateElement({id:a.value,props:t})}),d())},O=()=>{const e=c.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:o}=b();n.updateElement({id:a.value,props:{left:l,top:o,width:e,height:t}})}n.removeElementProps({id:a.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),d()},f=()=>{const e=c.value,t={...r.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),d()};return(e,o)=>{const n=Object(y["resolveComponent"])("IconTailoring"),c=Object(y["resolveComponent"])("Button"),a=Object(y["resolveComponent"])("ButtonGroup"),r=Object(y["resolveComponent"])("IconDown"),d=Object(y["resolveComponent"])("Popover"),b=Object(y["resolveComponent"])("Divider"),j=Object(y["resolveComponent"])("IconTransform"),v=Object(y["resolveComponent"])("FileInput"),h=Object(y["resolveComponent"])("IconUndo"),g=Object(y["resolveComponent"])("IconTheme");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",um,[Object(y["createElementVNode"])("div",{class:"origin-image",style:Object(y["normalizeStyle"])({backgroundImage:`url(${Object(y["unref"])(i).src})`})},null,4),Object(y["createVNode"])(Rp),Object(y["createVNode"])(a,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{style:{flex:"5"},onClick:o[0]||(o[0]=e=>u())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{class:"btn-icon"}),bm]),_:1}),Object(y["createVNode"])(d,{trigger:"click",visible:s.value,"onUpdate:visible":o[1]||(o[1]=e=>s.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",pm,[mm,Object(y["createElementVNode"])("div",Om,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(t),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"shape-clip-item",key:t,onClick:e=>p(t)},[Object(y["createElementVNode"])("div",{class:"shape",style:Object(y["normalizeStyle"])({clipPath:e.style})},null,4)],8,fm))),128))]),(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:e.label},[e.label?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",jm,"按"+Object(y["toDisplayString"])(e.label)+"",1)):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(a,{class:"row"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.children,e=>(Object(y["openBlock"])(),Object(y["createBlock"])(c,{style:{flex:"1"},key:e.key,onClick:t=>p("rect",e.ratio)},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e.key),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)],64))),64))])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{class:"no-padding",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(r)]),_:1})]),_:1},8,["visible"])]),_:1}),Object(y["createVNode"])(b),Object(y["createVNode"])(sm),Object(y["createVNode"])(b),Object(y["createVNode"])(Jp),Object(y["createVNode"])(b),Object(y["createVNode"])(Wb),Object(y["createVNode"])(b),Object(y["createVNode"])(bp),Object(y["createVNode"])(b),Object(y["createVNode"])(v,{onChange:o[2]||(o[2]=e=>m(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{class:"full-width-btn"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j,{class:"btn-icon"}),vm]),_:1})]),_:1}),Object(y["createVNode"])(c,{class:"full-width-btn",onClick:o[3]||(o[3]=e=>O())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(h,{class:"btn-icon"}),hm]),_:1}),Object(y["createVNode"])(c,{class:"full-width-btn",onClick:o[4]||(o[4]=e=>f())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{class:"btn-icon"}),ym]),_:1})])}}});l("6e11");const xm=ol()(gm,[["__scopeId","data-v-e8d702d2"]]);var km=xm;const Cm=e=>(Object(y["pushScopeId"])("data-v-02998580"),e=e(),Object(y["popScopeId"])(),e),Nm={class:"shape-style-panel"},Em={class:"row"},wm=Object(y["createTextVNode"])("纯色填充"),Vm=Object(y["createTextVNode"])("渐变填充"),Im=Cm(()=>Object(y["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),Sm=Object(y["createTextVNode"])("线性渐变"),Bm=Object(y["createTextVNode"])("径向渐变"),Lm={class:"row"},_m=Cm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1)),Tm={class:"row"},Mm=Cm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1)),Dm={key:0,class:"row"},zm=Cm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1)),Am=Object(y["createTextVNode"])("+"),Fm=Object(y["createTextVNode"])("-");var $m=Object(y["defineComponent"])({__name:"ShapeStylePanel",setup(e){const t=Q(),l=W(),{handleElement:o,handleElementId:n,richTextAttrs:c,availableFonts:a}=Object(g["c"])(t),r=o,i=Object(y["ref"])("#000"),s=Object(y["ref"])({type:"linear",rotate:0,color:["#fff","#fff"]}),d=Object(y["ref"])("fill"),u=Object(y["ref"])("middle");Object(y["watch"])(o,()=>{var e,t;o.value&&"shape"===o.value.type&&(i.value=o.value.fill||"#fff",s.value=o.value.gradient||{type:"linear",rotate:0,color:[i.value,"#fff"]},d.value=o.value.gradient?"gradient":"fill",u.value=(null===(e=o.value)||void 0===e||null===(t=e.text)||void 0===t?void 0:t.align)||"middle")},{deep:!0,immediate:!0});const{addHistorySnapshot:b}=Ze(),p=e=>{l.updateElement({id:n.value,props:e}),b()},m=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),b()):p({gradient:s.value})},O=e=>{if(!s.value)return;const t={...s.value,...e};p({gradient:t})},f=e=>{p({fill:e})},j=e=>{const t=o.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;p({text:{...n,align:e}})},v=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],h=(e,t)=>{Un.emit(Pn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{var l;const o=Object(y["resolveComponent"])("SelectOption"),n=Object(y["resolveComponent"])("Select"),b=Object(y["resolveComponent"])("ColorPicker"),p=Object(y["resolveComponent"])("Popover"),g=Object(y["resolveComponent"])("Slider"),x=Object(y["resolveComponent"])("Divider"),k=Object(y["resolveComponent"])("IconFontSize"),N=Object(y["resolveComponent"])("SelectOptGroup"),E=Object(y["resolveComponent"])("IconAddText"),w=Object(y["resolveComponent"])("InputGroup"),V=Object(y["resolveComponent"])("IconText"),I=Object(y["resolveComponent"])("Button"),S=Object(y["resolveComponent"])("Tooltip"),B=Object(y["resolveComponent"])("IconHighLight"),L=Object(y["resolveComponent"])("ButtonGroup"),_=Object(y["resolveComponent"])("IconTextBold"),T=Object(y["resolveComponent"])("CheckboxButton"),M=Object(y["resolveComponent"])("IconTextItalic"),D=Object(y["resolveComponent"])("IconTextUnderline"),z=Object(y["resolveComponent"])("IconFormat"),A=Object(y["resolveComponent"])("CheckboxButtonGroup"),F=Object(y["resolveComponent"])("IconAlignTextLeft"),$=Object(y["resolveComponent"])("RadioButton"),R=Object(y["resolveComponent"])("IconAlignTextCenter"),P=Object(y["resolveComponent"])("IconAlignTextRight"),H=Object(y["resolveComponent"])("RadioGroup"),q=Object(y["resolveComponent"])("IconAlignTextTopOne"),U=Object(y["resolveComponent"])("IconAlignTextMiddleOne"),G=Object(y["resolveComponent"])("IconAlignTextBottomOne");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Nm,[Object(y["createElementVNode"])("div",Em,[Object(y["createVNode"])(n,{style:{flex:"10"},value:d.value,onChange:t[0]||(t[0]=e=>m(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:"fill"},{default:Object(y["withCtx"])(()=>[wm]),_:1}),Object(y["createVNode"])(o,{value:"gradient"},{default:Object(y["withCtx"])(()=>[Vm]),_:1})]),_:1},8,["value"]),Im,"fill"===d.value?(Object(y["openBlock"])(),Object(y["createBlock"])(p,{key:0,trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=e=>f(e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:i.value,style:{flex:"10"}},null,8,["color"])]),_:1})):(Object(y["openBlock"])(),Object(y["createBlock"])(n,{key:1,style:{flex:"10"},value:s.value.type,onChange:t[2]||(t[2]=e=>O({type:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:"linear"},{default:Object(y["withCtx"])(()=>[Sm]),_:1}),Object(y["createVNode"])(o,{value:"radial"},{default:Object(y["withCtx"])(()=>[Bm]),_:1})]),_:1},8,["value"]))]),"gradient"===d.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",Lm,[_m,Object(y["createVNode"])(p,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{modelValue:s.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>O({color:[e,s.value.color[1]]}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:s.value.color[0],style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Tm,[Mm,Object(y["createVNode"])(p,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{modelValue:s.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>O({color:[s.value.color[0],e]}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:s.value.color[1],style:{flex:"3"}},null,8,["color"])]),_:1})]),"linear"===s.value.type?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Dm,[zm,Object(y["createVNode"])(g,{class:"slider",min:0,max:360,step:15,value:s.value.rotate,onChange:t[5]||(t[5]=e=>O({rotate:e}))},null,8,["value"])])):Object(y["createCommentVNode"])("",!0)],64)):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(Rp),Object(y["createVNode"])(x),null!==(l=Object(y["unref"])(r).text)&&void 0!==l&&l.content?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:1},[Object(y["createVNode"])(w,{compact:"",class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(c).fontname,onChange:t[6]||(t[6]=e=>h("fontname",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k)]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(N,{label:"系统字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(a),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",{style:Object(y["normalizeStyle"])({fontFamily:e.value})},Object(y["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(y["createVNode"])(N,{label:"在线字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(C),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(y["createVNode"])(n,{style:{flex:"2"},value:Object(y["unref"])(c).fontsize,onChange:t[7]||(t[7]=e=>h("fontsize",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(E)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(v,e=>Object(y["createVNode"])(o,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(y["createVNode"])(L,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{modelValue:Object(y["unref"])(c).color,"onUpdate:modelValue":t[8]||(t[8]=e=>h("color",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(c).color})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(p,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{modelValue:Object(y["unref"])(c).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>h("backcolor",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(B),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(c).backcolor})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I,{class:"font-size-btn",style:{flex:"2"},onClick:t[10]||(t[10]=e=>h("fontsize-add"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k),Am]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I,{class:"font-size-btn",style:{flex:"2"},onClick:t[11]||(t[11]=e=>h("fontsize-reduce"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k),Fm]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(A,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{style:{flex:"1"},checked:Object(y["unref"])(c).bold,onClick:t[12]||(t[12]=e=>h("bold"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(_)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{style:{flex:"1"},checked:Object(y["unref"])(c).em,onClick:t[13]||(t[13]=e=>h("em"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{style:{flex:"1"},checked:Object(y["unref"])(c).underline,onClick:t[14]||(t[14]=e=>h("underline"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{style:{flex:"1"},onClick:t[15]||(t[15]=e=>h("clear"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(H,{class:"row","button-style":"solid",value:Object(y["unref"])(c).align,onChange:t[16]||(t[16]=e=>h("align",e.target.value))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"left",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(F)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"center",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(R)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"right",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(P)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(y["createVNode"])(H,{class:"row","button-style":"solid",value:u.value,onChange:t[17]||(t[17]=e=>j(e.target.value))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"顶对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"top",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(q)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"middle",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(U)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(S,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"底对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{value:"bottom",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(G)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(y["createVNode"])(x)],64)):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(Wb),Object(y["createVNode"])(x),Object(y["createVNode"])(bp),Object(y["createVNode"])(x),Object(y["createVNode"])(Sb)])}}});l("de23");const Rm=ol()($m,[["__scopeId","data-v-02998580"]]);var Pm=Rm;const Hm=e=>(Object(y["pushScopeId"])("data-v-938968a2"),e=e(),Object(y["popScopeId"])(),e),qm={class:"line-style-panel"},Um={class:"row"},Gm=Hm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"线条样式:",-1)),Xm=Object(y["createTextVNode"])("实线"),Ym=Object(y["createTextVNode"])("虚线"),Zm={class:"row"},Wm=Hm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"线条颜色:",-1)),Jm={class:"row"},Km=Hm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"线条宽度:",-1)),Qm={class:"row"},eO=Hm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"起点样式:",-1)),tO=Object(y["createTextVNode"])("无"),lO=Object(y["createTextVNode"])("箭头"),oO=Object(y["createTextVNode"])("圆点"),nO={class:"row"},cO=Hm(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"终点样式:",-1)),aO=Object(y["createTextVNode"])("无"),rO=Object(y["createTextVNode"])("箭头"),iO=Object(y["createTextVNode"])("圆点");var sO=Object(y["defineComponent"])({__name:"LineStylePanel",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=l,{addHistorySnapshot:n}=Ze(),c=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>{const l=Object(y["resolveComponent"])("SelectOption"),n=Object(y["resolveComponent"])("Select"),a=Object(y["resolveComponent"])("ColorPicker"),r=Object(y["resolveComponent"])("Popover"),i=Object(y["resolveComponent"])("InputNumber"),s=Object(y["resolveComponent"])("Divider");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",qm,[Object(y["createElementVNode"])("div",Um,[Gm,Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(o).style,onChange:t[0]||(t[0]=e=>c({style:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l,{value:"solid"},{default:Object(y["withCtx"])(()=>[Xm]),_:1}),Object(y["createVNode"])(l,{value:"dashed"},{default:Object(y["withCtx"])(()=>[Ym]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",Zm,[Wm,Object(y["createVNode"])(r,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(a,{modelValue:Object(y["unref"])(o).color,"onUpdate:modelValue":t[1]||(t[1]=e=>c({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(o).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Jm,[Km,Object(y["createVNode"])(i,{value:Object(y["unref"])(o).width,onChange:t[2]||(t[2]=e=>c({width:e})),style:{flex:"3"}},null,8,["value"])]),Object(y["createElementVNode"])("div",Qm,[eO,Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(o).points[0],onChange:t[3]||(t[3]=e=>c({points:[e,Object(y["unref"])(o).points[1]]}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l,{value:""},{default:Object(y["withCtx"])(()=>[tO]),_:1}),Object(y["createVNode"])(l,{value:"arrow"},{default:Object(y["withCtx"])(()=>[lO]),_:1}),Object(y["createVNode"])(l,{value:"dot"},{default:Object(y["withCtx"])(()=>[oO]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",nO,[cO,Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(o).points[1],onChange:t[4]||(t[4]=e=>c({points:[Object(y["unref"])(o).points[0],e]}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l,{value:""},{default:Object(y["withCtx"])(()=>[aO]),_:1}),Object(y["createVNode"])(l,{value:"arrow"},{default:Object(y["withCtx"])(()=>[rO]),_:1}),Object(y["createVNode"])(l,{value:"dot"},{default:Object(y["withCtx"])(()=>[iO]),_:1})]),_:1},8,["value"])]),Object(y["createVNode"])(s),Object(y["createVNode"])(bp)])}}});l("d806");const dO=ol()(sO,[["__scopeId","data-v-938968a2"]]);var uO=dO;const bO={class:"chart-data-editor"},pO={class:"editor-content"},mO={class:"range-box"},OO=["id","onFocus","onPaste"],fO={class:"btns"},jO={class:"left"},vO=Object(y["createTextVNode"])("清空"),hO={class:"right"},yO=Object(y["createTextVNode"])("取消"),gO=Object(y["createTextVNode"])("确认");var xO=Object(y["defineComponent"])({__name:"ChartDataEditor",props:{data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const l=e,o=100,n=32,c=Object(y["ref"])([0,0]),a=Object(y["ref"])({width:0,height:0}),r=Object(y["ref"])(null),i=Object(y["computed"])(()=>{const e=c.value[0]*o,t=c.value[1]*n;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"}}]}),s=Object(y["computed"])(()=>{const e=c.value[0]*o,t=c.value[1]*n;return{left:e+"px",top:t+"px"}}),d=()=>{const e=[],{labels:t,legends:o,series:n}=l.data,a=t.length,r=n.length;e.push(["",...o]);for(let l=0;l<a;l++){const o=[t[l]];for(let e=0;e<r;e++)o.push(n[e][l]+"");e.push(o)}for(let l=0;l<a+1;l++)for(let t=0;t<r+1;t++){const o=document.querySelector(`#cell-${l}-${t}`);o&&(o.value=e[l][t]+"")}c.value=[r+1,a+1]};Object(y["onMounted"])(d);const u=()=>{if(!r.value)return;const[e,t]=r.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},b=e=>{const t=e.key.toUpperCase();t===je.ENTER&&u()};Object(y["onMounted"])(()=>{document.addEventListener("keydown",b)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("keydown",b)});const p=()=>{const[e,l]=c.value,o=[],n=[],a=[];for(let t=1;t<l;t++){let e="类别"+t;const l=document.querySelector(`#cell-${t}-0`);l&&l.value&&(e=l.value),o.push(e)}for(let t=1;t<e;t++){let e="系列"+t;const l=document.querySelector("#cell-0-"+t);l&&l.value&&(e=l.value),n.push(e)}for(let t=1;t<e;t++){const e=[];for(let o=1;o<l;o++){const l=document.querySelector(`#cell-${o}-${t}`);let n=0;l&&l.value&&+l.value&&(n=+l.value),e.push(n)}a.push(e)}t("save",{labels:o,legends:n,series:a})},m=()=>{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},O=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const o=e.clipboardData.items[0];o&&"string"===o.kind&&"text/plain"===o.type&&o.getAsString(e=>{const o=Ie(e);if("object"===typeof o)return;const n=Se(e);if(n){const e=t+n.length,o=l+n[0].length;for(let c=t;c<e;c++)for(let e=l;e<o;e++){const o=document.querySelector(`#cell-${c}-${e}`);o&&(o.value=n[c-t][e-l])}}})},f=()=>t("close"),j=e=>{let t=!0;const l=e.pageX,r=e.pageY,i=c.value[0]*o,s=c.value[1]*n;document.onmousemove=e=>{if(!t)return;const o=e.pageX,n=e.pageY,c=o-l,d=n-r,u=i+c,b=s+d;a.value={width:u,height:b}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&r===s)return;let d=a.value.width,u=a.value.height;d%o>.5*o&&(d+=o-d%o),u%n>.5*n&&(u+=n-u%n);let b=Math.round(u/n),p=Math.round(d/o);b<3&&(b=3),p<2&&(p=2),c.value=[p,b],a.value={width:0,height:0}}};return(e,t)=>{const l=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",bO,[Object(y["createElementVNode"])("div",pO,[Object(y["createElementVNode"])("div",mO,[Object(y["createElementVNode"])("div",{class:"temp-range",style:Object(y["normalizeStyle"])({width:a.value.width+"px",height:a.value.height+"px"})},null,4),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(i),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["range-line",e.type]),key:e.type,style:Object(y["normalizeStyle"])(e.style)},null,6))),128)),Object(y["createElementVNode"])("div",{class:"resizable",style:Object(y["normalizeStyle"])(Object(y["unref"])(s)),onMousedown:t[0]||(t[0]=Object(y["withModifiers"])(e=>j(e),["stop"]))},null,36)]),Object(y["createElementVNode"])("table",null,[Object(y["createElementVNode"])("tbody",null,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(31,e=>Object(y["createElementVNode"])("tr",{key:e},[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(7,t=>Object(y["createElementVNode"])("td",{key:t,class:Object(y["normalizeClass"])({head:1===t&&e<=c.value[1]||1===e&&t<=c.value[0]})},[Object(y["createElementVNode"])("input",{class:Object(y["normalizeClass"])(["item",{selected:e<=c.value[1]&&t<=c.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>r.value=[e-1,t-1],onPaste:l=>O(l,e-1,t-1)},null,42,OO)],2)),64))])),64))])])]),Object(y["createElementVNode"])("div",fO,[Object(y["createElementVNode"])("div",jO,[Object(y["createVNode"])(l,{class:"btn",onClick:t[1]||(t[1]=e=>m())},{default:Object(y["withCtx"])(()=>[vO]),_:1})]),Object(y["createElementVNode"])("div",hO,[Object(y["createVNode"])(l,{class:"btn",onClick:t[2]||(t[2]=e=>f())},{default:Object(y["withCtx"])(()=>[yO]),_:1}),Object(y["createVNode"])(l,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>p()),style:{"margin-left":"10px"}},{default:Object(y["withCtx"])(()=>[gO]),_:1})])])])}}});l("ca17");const kO=ol()(xO,[["__scopeId","data-v-53b32689"]]);var CO=kO;const NO=e=>(Object(y["pushScopeId"])("data-v-19b2f785"),e=e(),Object(y["popScopeId"])(),e),EO={class:"chart-style-panel"},wO=Object(y["createTextVNode"])(" 编辑图表数据 "),VO={class:"row"},IO=Object(y["createTextVNode"])("面积图样式"),SO=Object(y["createTextVNode"])("散点图样式"),BO={class:"row"},LO=Object(y["createTextVNode"])("使用平滑曲线"),_O={key:1,class:"row"},TO=Object(y["createTextVNode"])("条形图样式"),MO=Object(y["createTextVNode"])("堆叠样式"),DO={key:2,class:"row"},zO=Object(y["createTextVNode"])("环形图样式"),AO={class:"row"},FO=NO(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"图例:",-1)),$O=Object(y["createTextVNode"])("不显示"),RO=Object(y["createTextVNode"])("显示在上方"),PO=Object(y["createTextVNode"])("显示在下方"),HO={class:"row"},qO=NO(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"背景填充:",-1)),UO={class:"row"},GO=NO(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"网格颜色:",-1)),XO={style:{flex:"2"}},YO={class:"color-btn-wrap",style:{flex:"3"}},ZO=["onClick"],WO={class:"preset-themes"},JO=["onClick","onMouseenter"],KO=Object(y["createTextVNode"])("推荐主题"),QO=Object(y["createTextVNode"])(" 添加主题色 ");var ef=Object(y["defineComponent"])({__name:"index",setup(e){const t=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],l=Q(),o=W(),{handleElement:n,handleElementId:c}=Object(g["c"])(l),{theme:a}=Object(g["c"])(o),r=n,i=Object(y["ref"])(!1),s=Object(y["ref"])(!1),d=Object(y["ref"])([-1,-1]),{addHistorySnapshot:u}=Ze(),b=Object(y["ref"])("#000"),p=Object(y["ref"])([]),m=Object(y["ref"])(""),O=Object(y["ref"])(""),f=Object(y["ref"])(!0),j=Object(y["ref"])(!0),v=Object(y["ref"])(!1),h=Object(y["ref"])(!1),x=Object(y["ref"])(!1),k=Object(y["ref"])(!1);Object(y["watch"])(n,()=>{if(n.value&&"chart"===n.value.type){if(b.value=n.value.fill||"#fff",n.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:o,donut:c,stackBars:a}=n.value.options;void 0!==e&&(f.value=e),void 0!==t&&(j.value=t),void 0!==l&&(v.value=l),void 0!==o&&(h.value=o),void 0!==c&&(x.value=c),void 0!==a&&(k.value=a)}p.value=n.value.themeColor,m.value=n.value.gridColor||"#333",O.value=n.value.legend||""}},{deep:!0,immediate:!0});const C=e=>{o.updateElement({id:c.value,props:e}),u()},N=e=>{i.value=!1,C({data:e})},E=e=>{C({fill:e})},w=e=>{const t=n.value,l={...t.options,...e};C({options:l})},V=(e,t)=>{const l={themeColor:p.value.map((l,o)=>o===t?e:l)};C(l)},I=()=>{const e={themeColor:[...p.value,a.value.themeColor]};C(e)},S=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),s.value=!1},B=e=>{const t={themeColor:p.value.filter((t,l)=>l!==e)};C(t)},L=e=>{C({gridColor:e})},_=e=>{C({legend:e})},T=()=>i.value=!0;return Un.on(Pn.OPEN_CHART_DATA_EDITOR,T),Object(y["onUnmounted"])(()=>{Un.off(Pn.OPEN_CHART_DATA_EDITOR,T)}),(e,l)=>{const o=Object(y["resolveComponent"])("IconEdit"),n=Object(y["resolveComponent"])("Button"),c=Object(y["resolveComponent"])("Divider"),a=Object(y["resolveComponent"])("Checkbox"),u=Object(y["resolveComponent"])("SelectOption"),g=Object(y["resolveComponent"])("Select"),C=Object(y["resolveComponent"])("ColorPicker"),T=Object(y["resolveComponent"])("Popover"),M=Object(y["resolveComponent"])("IconCloseSmall"),D=Object(y["resolveComponent"])("Tooltip"),z=Object(y["resolveComponent"])("IconPlus"),A=Object(y["resolveComponent"])("ButtonGroup"),F=Object(y["resolveComponent"])("Modal");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",EO,[Object(y["createVNode"])(n,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>i.value=!0)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{class:"btn-icon"}),wO]),_:1}),Object(y["createVNode"])(c),"line"===Object(y["unref"])(r).chartType?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",VO,[Object(y["createVNode"])(a,{onChange:l[1]||(l[1]=e=>w({showArea:e.target.checked})),checked:v.value,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[IO]),_:1},8,["checked"]),Object(y["createVNode"])(a,{onChange:l[2]||(l[2]=e=>w({showLine:!e.target.checked})),checked:!j.value,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[SO]),_:1},8,["checked"])]),Object(y["createElementVNode"])("div",BO,[Object(y["createVNode"])(a,{onChange:l[3]||(l[3]=e=>w({lineSmooth:e.target.checked})),checked:f.value},{default:Object(y["withCtx"])(()=>[LO]),_:1},8,["checked"])])],64)):Object(y["createCommentVNode"])("",!0),"bar"===Object(y["unref"])(r).chartType?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",_O,[Object(y["createVNode"])(a,{onChange:l[4]||(l[4]=e=>w({horizontalBars:e.target.checked})),checked:h.value},{default:Object(y["withCtx"])(()=>[TO]),_:1},8,["checked"]),Object(y["createVNode"])(a,{onChange:l[5]||(l[5]=e=>w({stackBars:e.target.checked})),checked:k.value},{default:Object(y["withCtx"])(()=>[MO]),_:1},8,["checked"])])):Object(y["createCommentVNode"])("",!0),"pie"===Object(y["unref"])(r).chartType?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",DO,[Object(y["createVNode"])(a,{onChange:l[6]||(l[6]=e=>w({donut:e.target.checked})),checked:x.value},{default:Object(y["withCtx"])(()=>[zO]),_:1},8,["checked"])])):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(c),Object(y["createElementVNode"])("div",AO,[FO,Object(y["createVNode"])(g,{style:{flex:"3"},value:O.value,onChange:l[7]||(l[7]=e=>_(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(u,{value:""},{default:Object(y["withCtx"])(()=>[$O]),_:1}),Object(y["createVNode"])(u,{value:"top"},{default:Object(y["withCtx"])(()=>[RO]),_:1}),Object(y["createVNode"])(u,{value:"bottom"},{default:Object(y["withCtx"])(()=>[PO]),_:1})]),_:1},8,["value"])]),Object(y["createVNode"])(c),Object(y["createElementVNode"])("div",HO,[qO,Object(y["createVNode"])(T,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(C,{modelValue:b.value,"onUpdate:modelValue":l[8]||(l[8]=e=>E(e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:b.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",UO,[GO,Object(y["createVNode"])(T,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(C,{modelValue:m.value,"onUpdate:modelValue":l[9]||(l[9]=e=>L(e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:m.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createVNode"])(c),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(p.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"row",key:t},[Object(y["createElementVNode"])("div",XO,Object(y["toDisplayString"])(0===t?"主题配色:":""),1),Object(y["createVNode"])(T,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(C,{modelValue:e,"onUpdate:modelValue":e=>V(e,t)},null,8,["modelValue","onUpdate:modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",YO,[Object(y["createVNode"])(Tb,{color:e,style:{width:"100%"}},null,8,["color"]),Object(y["createVNode"])(D,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:Object(y["withCtx"])(()=>[0!==t?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"delete-color-btn",onClick:Object(y["withModifiers"])(e=>B(t),["stop"])},[Object(y["createVNode"])(M)],8,ZO)):Object(y["createCommentVNode"])("",!0)]),_:2},1032,["mouseEnterDelay"])])]),_:2},1024)]))),128)),Object(y["createVNode"])(A,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{trigger:"click",visible:s.value,"onUpdate:visible":l[11]||(l[11]=e=>s.value=e)},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",WO,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,(e,t)=>Object(y["createElementVNode"])("div",{class:"preset-theme",key:t},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e,(o,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["preset-theme-color",{select:d.value[0]===t&&n<=d.value[1]}]),key:o,style:Object(y["normalizeStyle"])({backgroundColor:o}),onClick:t=>S(e,n),onMouseenter:e=>d.value=[t,n],onMouseleave:l[10]||(l[10]=e=>d.value=[-1,-1])},null,46,JO))),128))])),64))])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{class:"no-padding",style:{flex:"2"}},{default:Object(y["withCtx"])(()=>[KO]),_:1})]),_:1},8,["visible"]),Object(y["createVNode"])(n,{class:"no-padding",disabled:p.value.length>=10,style:{flex:"3"},onClick:l[12]||(l[12]=e=>I())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"btn-icon"}),QO]),_:1},8,["disabled"])]),_:1}),Object(y["createVNode"])(c),Object(y["createVNode"])(Wb),Object(y["createVNode"])(F,{visible:i.value,"onUpdate:visible":l[15]||(l[15]=e=>i.value=e),footer:null,centered:"",closable:!1,width:648,destroyOnClose:""},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(CO,{data:Object(y["unref"])(r).data,onClose:l[13]||(l[13]=e=>i.value=!1),onSave:l[14]||(l[14]=e=>N(e))},null,8,["data"])]),_:1},8,["visible"])])}}});l("8c61");const tf=ol()(ef,[["__scopeId","data-v-19b2f785"]]);var lf=tf;const of=e=>(Object(y["pushScopeId"])("data-v-7e28e1d8"),e=e(),Object(y["popScopeId"])(),e),nf={class:"table-style-panel"},cf={class:"row"},af=of(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"行数:",-1)),rf={class:"set-count",style:{flex:"3"}},sf={class:"count-text"},df={class:"row"},uf=of(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"列数:",-1)),bf={class:"set-count",style:{flex:"3"}},pf={class:"count-text"},mf={class:"row theme-switch"},Of=of(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"启用主题表格:",-1)),ff={class:"switch-wrapper",style:{flex:"3"}},jf={class:"row"},vf=Object(y["createTextVNode"])("标题行"),hf=Object(y["createTextVNode"])("汇总行"),yf={class:"row"},gf=Object(y["createTextVNode"])("第一列"),xf=Object(y["createTextVNode"])("最后一列"),kf={class:"row"},Cf=of(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"主题颜色:",-1));var Nf=Object(y["defineComponent"])({__name:"TableStylePanel",setup(e){const t=W(),{handleElement:l,handleElementId:o,selectedTableCells:n,availableFonts:c}=Object(g["c"])(Q()),a=Object(y["computed"])(()=>t.theme.themeColor),r=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],i=Object(y["ref"])({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"#000",fontsize:"12px",fontname:"微软雅黑",align:"left"}),s=Object(y["ref"])(),d=Object(y["ref"])(!1),u=Object(y["ref"])(0),b=Object(y["ref"])(0),p=Object(y["ref"])(0),m=Object(y["ref"])(0);Object(y["watch"])(l,()=>{l.value&&"table"===l.value.type&&(s.value=l.value.theme,d.value=!!s.value,u.value=l.value.data.length,b.value=l.value.data[0].length,p.value=l.value.data.length,m.value=l.value.data[0].length)},{deep:!0,immediate:!0});const{addHistorySnapshot:O}=Ze(),f=()=>{if(!l.value||"table"!==l.value.type)return;let e=0,t=0;if(n.value.length){const l=n.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const o=l.value.data[e][t].style;i.value=o?{bold:!!o.bold,em:!!o.em,underline:!!o.underline,strikethrough:!!o.strikethrough,color:o.color||"#000",backcolor:o.backcolor||"#000",fontsize:o.fontsize||"12px",fontname:o.fontname||"微软雅黑",align:o.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"#000",fontsize:"12px",fontname:"微软雅黑",align:"left"}};Object(y["onMounted"])(()=>{n.value.length&&f()}),Object(y["watch"])(n,f);const j=e=>{t.updateElement({id:o.value,props:e}),O()},v=e=>{const t=l.value,o=JSON.parse(JSON.stringify(t.data));for(let l=0;l<o.length;l++)for(let t=0;t<o[l].length;t++)if(!n.value.length||n.value.includes(`${l}_${t}`)){const n=o[l][t].style||{};o[l][t].style={...n,...e}}j({data:o}),f()},h=e=>{if(!s.value)return;const t={...s.value,...e};j({theme:t})},k=e=>{if(e){const e={theme:{color:a.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};j(e)}else t.removeElementProps({id:o.value,propName:"theme"}),O()},N=e=>{const t=l.value,o=t.data.length;if(e>o){const l=new Array(b.value).fill({id:Object(x["b"])(10),colspan:1,rowspan:1,text:""}),n=new Array(e-o).fill(l),c=JSON.parse(JSON.stringify(t.data));c.push(...n),j({data:c})}else{const l=t.data.slice(0,e);j({data:l})}},E=e=>{const t=l.value,o=t.data[0].length;let n=t.data,c=t.colWidths.map(e=>e*t.width);if(e>o){n=n.map(t=>{const l=new Array(e-o).fill({id:Object(x["b"])(10),colspan:1,rowspan:1,text:""});return t.push(...l),t});const t=new Array(e-o).fill(100);c.push(...t)}else n=n.map(t=>t.slice(0,e)),c=c.slice(0,e);const a=c.reduce((e,t)=>e+t),r=c.map(e=>e/a),i={width:a,data:n,colWidths:r};j(i)};return(e,t)=>{const l=Object(y["resolveComponent"])("IconFontSize"),o=Object(y["resolveComponent"])("SelectOption"),n=Object(y["resolveComponent"])("SelectOptGroup"),a=Object(y["resolveComponent"])("Select"),p=Object(y["resolveComponent"])("IconAddText"),m=Object(y["resolveComponent"])("InputGroup"),O=Object(y["resolveComponent"])("ColorPicker"),f=Object(y["resolveComponent"])("IconText"),j=Object(y["resolveComponent"])("Button"),g=Object(y["resolveComponent"])("Tooltip"),x=Object(y["resolveComponent"])("Popover"),w=Object(y["resolveComponent"])("IconFill"),V=Object(y["resolveComponent"])("ButtonGroup"),I=Object(y["resolveComponent"])("IconTextBold"),S=Object(y["resolveComponent"])("CheckboxButton"),B=Object(y["resolveComponent"])("IconTextItalic"),L=Object(y["resolveComponent"])("IconTextUnderline"),_=Object(y["resolveComponent"])("IconStrikethrough"),T=Object(y["resolveComponent"])("CheckboxButtonGroup"),M=Object(y["resolveComponent"])("IconAlignTextLeft"),D=Object(y["resolveComponent"])("RadioButton"),z=Object(y["resolveComponent"])("IconAlignTextCenter"),A=Object(y["resolveComponent"])("IconAlignTextRight"),F=Object(y["resolveComponent"])("RadioGroup"),$=Object(y["resolveComponent"])("Divider"),R=Object(y["resolveComponent"])("IconMinus"),P=Object(y["resolveComponent"])("IconPlus"),H=Object(y["resolveComponent"])("Switch"),q=Object(y["resolveComponent"])("Checkbox");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",nf,[Object(y["createVNode"])(m,{compact:"",class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(a,{style:{flex:"3"},value:i.value.fontname,onChange:t[0]||(t[0]=e=>v({fontname:e}))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l)]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{label:"系统字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",{style:Object(y["normalizeStyle"])({fontFamily:e.value})},Object(y["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(y["createVNode"])(n,{label:"在线字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(C),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(y["createVNode"])(a,{style:{flex:"2"},value:i.value.fontsize,onChange:t[1]||(t[1]=e=>v({fontsize:e}))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(r,e=>Object(y["createVNode"])(o,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(y["createVNode"])(V,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(O,{modelValue:i.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>v({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j,{class:"text-color-btn",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:i.value.color})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(x,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(O,{modelValue:i.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>v({backcolor:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"单元格填充"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j,{class:"text-color-btn",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(w),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:i.value.backcolor})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1})]),_:1}),Object(y["createVNode"])(T,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{style:{flex:"1"},checked:i.value.bold,onClick:t[4]||(t[4]=e=>v({bold:!i.value.bold}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{style:{flex:"1"},checked:i.value.em,onClick:t[5]||(t[5]=e=>v({em:!i.value.em}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(B)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{style:{flex:"1"},checked:i.value.underline,onClick:t[6]||(t[6]=e=>v({underline:!i.value.underline}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(L)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{style:{flex:"1"},checked:i.value.strikethrough,onClick:t[7]||(t[7]=e=>v({strikethrough:!i.value.strikethrough}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(_)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(F,{class:"row","button-style":"solid",value:i.value.align,onChange:t[8]||(t[8]=e=>v({align:e.target.value}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{value:"left",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{value:"center",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{value:"right",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(y["createVNode"])($),Object(y["createVNode"])(Wb,{fixed:!0}),Object(y["createVNode"])($),Object(y["createElementVNode"])("div",cf,[af,Object(y["createElementVNode"])("div",rf,[Object(y["createVNode"])(j,{class:"btn",disabled:u.value<=1,onClick:t[9]||(t[9]=e=>N(u.value-1))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(R)]),_:1},8,["disabled"]),Object(y["createElementVNode"])("div",sf,Object(y["toDisplayString"])(u.value),1),Object(y["createVNode"])(j,{class:"btn",disabled:u.value>=30,onClick:t[10]||(t[10]=e=>N(u.value+1))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(P)]),_:1},8,["disabled"])])]),Object(y["createElementVNode"])("div",df,[uf,Object(y["createElementVNode"])("div",bf,[Object(y["createVNode"])(j,{class:"btn",disabled:b.value<=1,onClick:t[11]||(t[11]=e=>E(b.value-1))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(R)]),_:1},8,["disabled"]),Object(y["createElementVNode"])("div",pf,Object(y["toDisplayString"])(b.value),1),Object(y["createVNode"])(j,{class:"btn",disabled:b.value>=30,onClick:t[12]||(t[12]=e=>E(b.value+1))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(P)]),_:1},8,["disabled"])])]),Object(y["createVNode"])($),Object(y["createElementVNode"])("div",mf,[Of,Object(y["createElementVNode"])("div",ff,[Object(y["createVNode"])(H,{checked:d.value,onChange:t[13]||(t[13]=e=>k(e))},null,8,["checked"])])]),s.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",jf,[Object(y["createVNode"])(q,{onChange:t[14]||(t[14]=e=>h({rowHeader:e.target.checked})),checked:s.value.rowHeader,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[vf]),_:1},8,["checked"]),Object(y["createVNode"])(q,{onChange:t[15]||(t[15]=e=>h({rowFooter:e.target.checked})),checked:s.value.rowFooter,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[hf]),_:1},8,["checked"])]),Object(y["createElementVNode"])("div",yf,[Object(y["createVNode"])(q,{onChange:t[16]||(t[16]=e=>h({colHeader:e.target.checked})),checked:s.value.colHeader,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[gf]),_:1},8,["checked"]),Object(y["createVNode"])(q,{onChange:t[17]||(t[17]=e=>h({colFooter:e.target.checked})),checked:s.value.colFooter,style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[xf]),_:1},8,["checked"])]),Object(y["createElementVNode"])("div",kf,[Cf,Object(y["createVNode"])(x,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(O,{modelValue:s.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>h({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:s.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})])],64)):Object(y["createCommentVNode"])("",!0)])}}});l("dcd4");const Ef=ol()(Nf,[["__scopeId","data-v-7e28e1d8"]]);var wf=Ef;const Vf=e=>(Object(y["pushScopeId"])("data-v-546adf8c"),e=e(),Object(y["popScopeId"])(),e),If={class:"latex-style-panel"},Sf={class:"row"},Bf=Object(y["createTextVNode"])("编辑 LaTeX"),Lf={class:"row"},_f=Vf(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"颜色:",-1)),Tf={class:"row"},Mf=Vf(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"粗细:",-1));var Df=Object(y["defineComponent"])({__name:"LatexStylePanel",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=l,n=Object(y["ref"])(!1),{addHistorySnapshot:c}=Ze(),a=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),c())},r=e=>{a({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},i=()=>n.value=!0;return Un.on(Pn.OPEN_LATEX_EDITOR,i),Object(y["onUnmounted"])(()=>{Un.off(Pn.OPEN_LATEX_EDITOR,i)}),(e,t)=>{const l=Object(y["resolveComponent"])("Button"),c=Object(y["resolveComponent"])("Divider"),i=Object(y["resolveComponent"])("ColorPicker"),s=Object(y["resolveComponent"])("Popover"),d=Object(y["resolveComponent"])("InputNumber"),u=Object(y["resolveComponent"])("Modal");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",If,[Object(y["createElementVNode"])("div",Sf,[Object(y["createVNode"])(l,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:Object(y["withCtx"])(()=>[Bf]),_:1})]),Object(y["createVNode"])(c),Object(y["createElementVNode"])("div",Lf,[_f,Object(y["createVNode"])(s,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(o).color,"onUpdate:modelValue":t[1]||(t[1]=e=>a({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(o).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Tf,[Mf,Object(y["createVNode"])(d,{min:1,max:3,value:Object(y["unref"])(o).strokeWidth,onChange:t[2]||(t[2]=e=>a({strokeWidth:e})),style:{flex:"3"}},null,8,["value"])]),Object(y["createVNode"])(u,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Yu,{value:Object(y["unref"])(o).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{r(e),n.value=!1})},null,8,["value"])]),_:1},8,["visible"])])}}});l("c041");const zf=ol()(Df,[["__scopeId","data-v-546adf8c"]]);var Af=zf;const Ff=e=>(Object(y["pushScopeId"])("data-v-ff7125dc"),e=e(),Object(y["popScopeId"])(),e),$f={class:"video-style-panel"},Rf=Ff(()=>Object(y["createElementVNode"])("div",{class:"title"},"视频预览封面",-1)),Pf={class:"background-image-wrapper"},Hf={class:"background-image"},qf={class:"row"},Uf=Object(y["createTextVNode"])("重置封面");var Gf=Object(y["defineComponent"])({__name:"VideoStylePanel",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=l,{addHistorySnapshot:n}=Ze(),c=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},a=e=>{const t=e[0];t&&Pe(t).then(e=>c({poster:e}))};return(e,t)=>{const l=Object(y["resolveComponent"])("IconPlus"),n=Object(y["resolveComponent"])("FileInput"),r=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",$f,[Rf,Object(y["createElementVNode"])("div",Pf,[Object(y["createVNode"])(n,{onChange:t[0]||(t[0]=e=>a(e))},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",Hf,[Object(y["createElementVNode"])("div",{class:"content",style:Object(y["normalizeStyle"])({backgroundImage:`url(${Object(y["unref"])(o).poster})`})},[Object(y["createVNode"])(l)],4)])]),_:1})]),Object(y["createElementVNode"])("div",qf,[Object(y["createVNode"])(r,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>c({poster:""}))},{default:Object(y["withCtx"])(()=>[Uf]),_:1})])])}}});l("a81a");const Xf=ol()(Gf,[["__scopeId","data-v-ff7125dc"]]);var Yf=Xf;const Zf=e=>(Object(y["pushScopeId"])("data-v-5d723d50"),e=e(),Object(y["popScopeId"])(),e),Wf={class:"audio-style-panel"},Jf={class:"row"},Kf=Zf(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"图标颜色:",-1)),Qf={class:"row switch-row"},ej=Zf(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"自动播放:",-1)),tj={class:"switch-wrapper",style:{flex:"3"}},lj={class:"row switch-row"},oj=Zf(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"循环播放:",-1)),nj={class:"switch-wrapper",style:{flex:"3"}};var cj=Object(y["defineComponent"])({__name:"AudioStylePanel",setup(e){const t=W(),{handleElement:l}=Object(g["c"])(Q()),o=l,{addHistorySnapshot:n}=Ze(),c=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>{const l=Object(y["resolveComponent"])("ColorPicker"),n=Object(y["resolveComponent"])("Popover"),a=Object(y["resolveComponent"])("Switch");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Wf,[Object(y["createElementVNode"])("div",Jf,[Kf,Object(y["createVNode"])(n,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l,{modelValue:Object(y["unref"])(o).color,"onUpdate:modelValue":t[0]||(t[0]=e=>c({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(o).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Qf,[ej,Object(y["createElementVNode"])("div",tj,[Object(y["createVNode"])(a,{checked:Object(y["unref"])(o).autoplay,onChange:t[1]||(t[1]=e=>c({autoplay:e}))},null,8,["checked"])])]),Object(y["createElementVNode"])("div",lj,[oj,Object(y["createElementVNode"])("div",nj,[Object(y["createVNode"])(a,{checked:Object(y["unref"])(o).loop,onChange:t[2]||(t[2]=e=>c({loop:e}))},null,8,["checked"])])])])}}});l("795e");const aj=ol()(cj,[["__scopeId","data-v-5d723d50"]]);var rj=aj;const ij=e=>(Object(y["pushScopeId"])("data-v-71469855"),e=e(),Object(y["popScopeId"])(),e),sj={class:"multi-style-panel"},dj={class:"row"},uj=ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"填充颜色:",-1)),bj={class:"row"},pj=ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框样式:",-1)),mj=Object(y["createTextVNode"])("实线边框"),Oj=Object(y["createTextVNode"])("虚线边框"),fj={class:"row"},jj=ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框颜色:",-1)),vj={class:"row"},hj=ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"边框粗细:",-1)),yj=Object(y["createTextVNode"])("+"),gj=Object(y["createTextVNode"])("-");var xj=Object(y["defineComponent"])({__name:"MultiStylePanel",setup(e){const t=W(),{richTextAttrs:l,availableFonts:o,activeElementList:n}=Object(g["c"])(Q()),{addHistorySnapshot:c}=Ze(),a=(e,l)=>{t.updateElement({id:e,props:l}),c()},r=["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=Object(y["ref"])("#fff"),s=Object(y["ref"])({width:0,color:"#fff",style:"solid"}),d=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||a(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t<l.length;t++)for(let o=0;o<l[t].length;o++){const n=l[t][o].style||{};l[t][o].style={...n,backcolor:e}}a(t.id,{data:l})}"audio"===t.type&&a(t.id,{color:e})}i.value=e},u=e=>{for(const t of n.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},o={outline:{...l,...e}};a(t.id,o)}"line"===t.type&&a(t.id,e)}s.value={...s.value,...e}},b=(e,t)=>{for(const o of n.value){var l;if(("text"===o.type||"shape"===o.type&&null!==(l=o.text)&&void 0!==l&&l.content)&&Un.emit(Pn.RICH_TEXT_COMMAND,{target:o.id,action:{command:e,value:t}}),"table"===o.type){const l=JSON.parse(JSON.stringify(o.data));for(let o=0;o<l.length;o++)for(let n=0;n<l[o].length;n++){const c=l[o][n].style||{};l[o][n].style={...c,[e]:t}}a(o.id,{data:l})}"latex"===o.type&&"color"===e&&a(o.id,{color:t})}};return(e,t)=>{const n=Object(y["resolveComponent"])("ColorPicker"),c=Object(y["resolveComponent"])("Popover"),a=Object(y["resolveComponent"])("Divider"),p=Object(y["resolveComponent"])("SelectOption"),m=Object(y["resolveComponent"])("Select"),O=Object(y["resolveComponent"])("InputNumber"),f=Object(y["resolveComponent"])("IconFontSize"),j=Object(y["resolveComponent"])("SelectOptGroup"),v=Object(y["resolveComponent"])("IconAddText"),h=Object(y["resolveComponent"])("InputGroup"),g=Object(y["resolveComponent"])("IconText"),x=Object(y["resolveComponent"])("Button"),k=Object(y["resolveComponent"])("Tooltip"),N=Object(y["resolveComponent"])("IconHighLight"),E=Object(y["resolveComponent"])("ButtonGroup"),w=Object(y["resolveComponent"])("IconAlignTextLeft"),V=Object(y["resolveComponent"])("RadioButton"),I=Object(y["resolveComponent"])("IconAlignTextCenter"),S=Object(y["resolveComponent"])("IconAlignTextRight"),B=Object(y["resolveComponent"])("RadioGroup");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",sj,[Object(y["createElementVNode"])("div",dj,[uj,Object(y["createVNode"])(c,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>d(e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:i.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createVNode"])(a),Object(y["createElementVNode"])("div",bj,[pj,Object(y["createVNode"])(m,{style:{flex:"3"},value:s.value.style,onChange:t[1]||(t[1]=e=>u({style:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{value:"solid"},{default:Object(y["withCtx"])(()=>[mj]),_:1}),Object(y["createVNode"])(p,{value:"dashed"},{default:Object(y["withCtx"])(()=>[Oj]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",fj,[jj,Object(y["createVNode"])(c,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{modelValue:s.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>u({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:s.value.color||"#000",style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",vj,[hj,Object(y["createVNode"])(O,{value:s.value.width,onChange:t[3]||(t[3]=e=>u({width:e})),style:{flex:"3"}},null,8,["value"])]),Object(y["createVNode"])(a),Object(y["createVNode"])(h,{compact:"",class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(m,{style:{flex:"3"},value:Object(y["unref"])(l).fontname,onChange:t[4]||(t[4]=e=>b("fontname",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f)]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j,{label:"系统字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(o),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(p,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",{style:Object(y["normalizeStyle"])({fontFamily:e.value})},Object(y["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(y["createVNode"])(j,{label:"在线字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(C),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(p,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(y["createVNode"])(m,{style:{flex:"2"},value:Object(y["unref"])(l).fontsize,onChange:t[5]||(t[5]=e=>b("fontsize",e))},{suffixIcon:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v)]),default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(r,e=>Object(y["createVNode"])(p,{key:e,value:e},{default:Object(y["withCtx"])(()=>[Object(y["createTextVNode"])(Object(y["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(y["createVNode"])(E,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{modelValue:Object(y["unref"])(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>b("color",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(l).color})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(c,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(n,{modelValue:Object(y["unref"])(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>b("backcolor",e))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{class:"text-color-btn",style:{flex:"3"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(N),Object(y["createElementVNode"])("div",{class:"text-color-block",style:Object(y["normalizeStyle"])({backgroundColor:Object(y["unref"])(l).backcolor})},null,4)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{class:"font-size-btn",style:{flex:"2"},onClick:t[8]||(t[8]=e=>b("fontsize-add","2"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f),yj]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{class:"font-size-btn",style:{flex:"2"},onClick:t[9]||(t[9]=e=>b("fontsize-reduce","2"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f),gj]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(B,{class:"row","button-style":"solid",value:Object(y["unref"])(l).align,onChange:t[10]||(t[10]=e=>b("align",e.target.value))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V,{value:"left",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(w)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V,{value:"center",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(k,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V,{value:"right",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"])])}}});l("1222");const kj=ol()(xj,[["__scopeId","data-v-71469855"]]);var Cj=kj;const Nj={class:"element-style-panel"};var Ej=Object(y["defineComponent"])({__name:"index",setup(e){const t={[Ue.TEXT]:Mp,[Ue.IMAGE]:km,[Ue.SHAPE]:Pm,[Ue.LINE]:uO,[Ue.CHART]:lf,[Ue.TABLE]:wf,[Ue.LATEX]:Af,[Ue.VIDEO]:Yf,[Ue.AUDIO]:rj},{activeElementIdList:l,activeElementList:o,handleElement:n,activeGroupElementId:c}=Object(g["c"])(Q()),a=Object(y["computed"])(()=>{if(l.value.length>1){if(!c.value)return Cj;const e=o.value.find(e=>e.id===c.value);return e&&t[e.type]||null}return n.value&&t[n.value.type]||null});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Nj,[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(a))))]))}});const wj=Ej;var Vj=wj;const Ij=e=>(Object(y["pushScopeId"])("data-v-43e5f476"),e=e(),Object(y["popScopeId"])(),e),Sj={class:"element-positopn-panel"},Bj=Ij(()=>Object(y["createElementVNode"])("div",{class:"title"},"层级:",-1)),Lj=Object(y["createTextVNode"])(" 置于顶层"),_j=Object(y["createTextVNode"])(" 置于底层"),Tj=Object(y["createTextVNode"])(" 上移一层"),Mj=Object(y["createTextVNode"])(" 下移一层"),Dj=Ij(()=>Object(y["createElementVNode"])("div",{class:"title"},"对齐:",-1)),zj={class:"row"},Aj=Ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"3"}},"位置:",-1)),Fj=Ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),$j=Object(y["createStaticVNode"])('<div class="row" data-v-43e5f476><div style="flex:3;" data-v-43e5f476></div><div style="flex:4;" class="label" data-v-43e5f476>X</div><div style="flex:1;" data-v-43e5f476></div><div style="flex:4;" class="label" data-v-43e5f476>Y</div></div>',1),Rj={class:"row"},Pj=Ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"3"}},"大小:",-1)),Hj={key:1,style:{flex:"1"}},qj=Object(y["createStaticVNode"])('<div class="row" data-v-43e5f476><div style="flex:3;" data-v-43e5f476></div><div style="flex:4;" class="label" data-v-43e5f476>宽</div><div style="flex:1;" data-v-43e5f476></div><div style="flex:4;" class="label" data-v-43e5f476>高</div></div>',1),Uj={class:"row"},Gj=Ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"3"}},"旋转:",-1)),Xj=Ij(()=>Object(y["createElementVNode"])("div",{style:{flex:"1"}},null,-1));var Yj=Object(y["defineComponent"])({__name:"ElementPositionPanel",setup(e){const t=W(),{handleElement:l,handleElementId:o}=Object(g["c"])(Q()),n=Object(y["ref"])(0),c=Object(y["ref"])(0),a=Object(y["ref"])(0),r=Object(y["ref"])(0),i=Object(y["ref"])(0),s=Object(y["ref"])(!1),d=Object(y["computed"])(()=>l.value&&Jl[l.value.type]||20);Object(y["watch"])(l,()=>{l.value&&(n.value=Object(G["round"])(l.value.left,1),c.value=Object(G["round"])(l.value.top,1),s.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(a.value=Object(G["round"])(l.value.width,1),r.value=Object(G["round"])(l.value.height,1),i.value="rotate"in l.value&&void 0!==l.value.rotate?Object(G["round"])(l.value.rotate,1):0))},{deep:!0,immediate:!0});const{orderElement:u}=at(),{alignElementToCanvas:b}=io(),{addHistorySnapshot:p}=Ze(),m=e=>{const l={left:e};t.updateElement({id:o.value,props:l}),p()},O=e=>{const l={top:e};t.updateElement({id:o.value,props:l}),p()},f=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const o=Ge[l.value.pathFormula];let n="";return n="editable"in o?o.formula(e,t,l.value.keypoint):o.formula(e,t),{viewBox:[e,t],path:n}}return null},j=e=>{let l={width:e};const n=f(e,r.value);n&&(l={...l,...n}),t.updateElement({id:o.value,props:l}),p()},v=e=>{let l={height:e};const n=f(a.value,e);n&&(l={...l,...n}),t.updateElement({id:o.value,props:l}),p()},h=e=>{const l={rotate:e};t.updateElement({id:o.value,props:l}),p()},x=e=>{const l={fixedRatio:e};t.updateElement({id:o.value,props:l}),p()},k=e=>{let l=45*Math.floor(i.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:o.value,props:n}),p()};return(e,t)=>{const o=Object(y["resolveComponent"])("IconSendToBack"),p=Object(y["resolveComponent"])("Button"),f=Object(y["resolveComponent"])("IconBringToFrontOne"),g=Object(y["resolveComponent"])("ButtonGroup"),C=Object(y["resolveComponent"])("IconBringToFront"),N=Object(y["resolveComponent"])("IconSentToBack"),E=Object(y["resolveComponent"])("Divider"),w=Object(y["resolveComponent"])("IconAlignLeft"),V=Object(y["resolveComponent"])("Tooltip"),I=Object(y["resolveComponent"])("IconAlignVertically"),S=Object(y["resolveComponent"])("IconAlignRight"),B=Object(y["resolveComponent"])("IconAlignTop"),L=Object(y["resolveComponent"])("IconAlignHorizontally"),_=Object(y["resolveComponent"])("IconAlignBottom"),T=Object(y["resolveComponent"])("InputNumber"),M=Object(y["resolveComponent"])("IconLock"),D=Object(y["resolveComponent"])("IconUnlock"),z=Object(y["resolveComponent"])("IconRotate");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Sj,[Bj,Object(y["createVNode"])(g,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>Object(y["unref"])(u)(Object(y["unref"])(l),Object(y["unref"])(be).TOP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{class:"btn-icon"}),Lj]),_:1}),Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>Object(y["unref"])(u)(Object(y["unref"])(l),Object(y["unref"])(be).BOTTOM))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f,{class:"btn-icon"}),_j]),_:1})]),_:1}),Object(y["createVNode"])(g,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>Object(y["unref"])(u)(Object(y["unref"])(l),Object(y["unref"])(be).UP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(C,{class:"btn-icon"}),Tj]),_:1}),Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>Object(y["unref"])(u)(Object(y["unref"])(l),Object(y["unref"])(be).DOWN))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(N,{class:"btn-icon"}),Mj]),_:1})]),_:1}),Object(y["createVNode"])(E),Dj,Object(y["createVNode"])(g,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).LEFT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(w)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).HORIZONTAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).RIGHT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(g,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).TOP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(B)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).VERTICAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(L)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).BOTTOM))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(_)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(E),Object(y["createElementVNode"])("div",zj,[Aj,Object(y["createVNode"])(T,{step:5,value:n.value,onChange:t[10]||(t[10]=e=>m(e)),style:{flex:"4"}},null,8,["value"]),Fj,Object(y["createVNode"])(T,{step:5,value:c.value,onChange:t[11]||(t[11]=e=>O(e)),style:{flex:"4"}},null,8,["value"])]),$j,"line"!==Object(y["unref"])(l).type?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",Rj,[Pj,Object(y["createVNode"])(T,{min:Object(y["unref"])(d),max:1500,step:5,value:a.value,onChange:t[12]||(t[12]=e=>j(e)),style:{flex:"4"}},null,8,["min","value"]),["image","shape","audio"].includes(Object(y["unref"])(l).type)?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[s.value?(Object(y["openBlock"])(),Object(y["createBlock"])(V,{key:0,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"解除宽高比锁定"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M,{style:{flex:"1"},class:"icon-btn",onClick:t[13]||(t[13]=e=>x(!1))})]),_:1},8,["mouseEnterDelay"])):(Object(y["openBlock"])(),Object(y["createBlock"])(V,{key:1,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"宽高比锁定"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{style:{flex:"1"},class:"icon-btn",onClick:t[14]||(t[14]=e=>x(!0))})]),_:1},8,["mouseEnterDelay"]))],64)):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Hj)),Object(y["createVNode"])(T,{min:Object(y["unref"])(d),max:800,step:5,disabled:"text"===Object(y["unref"])(l).type,value:r.value,onChange:t[15]||(t[15]=e=>v(e)),style:{flex:"4"}},null,8,["min","disabled","value"])]),qj],64)):Object(y["createCommentVNode"])("",!0),["line","video","audio"].includes(Object(y["unref"])(l).type)?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:1},[Object(y["createVNode"])(E),Object(y["createElementVNode"])("div",Uj,[Gj,Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"逆时针旋转"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"icon-btn",onClick:t[16]||(t[16]=e=>k("-")),style:{flex:"2"}})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(V,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"顺时针旋转"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"icon-btn",onClick:t[17]||(t[17]=e=>k("+")),style:Object(y["normalizeStyle"])({flex:2,transform:"rotateY(180deg)"})},null,8,["style"])]),_:1},8,["mouseEnterDelay"]),Xj,Object(y["createVNode"])(T,{min:-180,max:180,step:5,value:i.value,onChange:t[18]||(t[18]=e=>h(e)),style:{flex:"4"}},null,8,["value"])])],64))])}}});l("cb45");const Zj=ol()(Yj,[["__scopeId","data-v-43e5f476"]]);var Wj=Zj;const Jj=1e3,Kj="click",Qj="animate__",ev=[{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"}]}],tv=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],lv=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],ov=e=>(Object(y["pushScopeId"])("data-v-2f69234f"),e=e(),Object(y["popScopeId"])(),e),nv={class:"element-animation-panel"},cv={key:0,class:"element-animation"},av={class:"tabs"},rv=["onClick"],iv={class:"type-title"},sv={class:"pool-item-wrapper"},dv=["onMouseenter","onClick"],uv={key:0,class:"mask"},bv=Object(y["createTextVNode"])(" 添加动画 "),pv={key:1,class:"tip"},mv=Object(y["createTextVNode"])(" 选中画布中的元素添加动画"),Ov={class:"sequence-content"},fv={class:"index"},jv={class:"text"},vv={class:"handler"},hv={key:0,class:"configs"},yv={class:"config-item"},gv=ov(()=>Object(y["createElementVNode"])("div",{style:{flex:"3"}},"持续时长:",-1)),xv={class:"config-item"},kv=ov(()=>Object(y["createElementVNode"])("div",{style:{flex:"3"}},"触发方式:",-1)),Cv=Object(y["createTextVNode"])("主动触发"),Nv=Object(y["createTextVNode"])("与上一动画同时"),Ev=Object(y["createTextVNode"])("上一动画之后"),wv={class:"config-item"},Vv=Object(y["createTextVNode"])("更换动画");var Iv=Object(y["defineComponent"])({__name:"ElementAnimationPanel",setup(e){const t={};for(const y of ev)for(const e of y.children)t[e.value]=e.name;for(const y of tv)for(const e of y.children)t[e.value]=e.name;for(const y of lv)for(const e of y.children)t[e.value]=e.name;const l=["in","out","attention"],o=W(),{handleElement:n,handleElementId:c}=Object(g["c"])(Q()),{currentSlide:a,formatedAnimations:r,currentSlideAnimations:i}=Object(g["c"])(o),s=[{key:"in",label:"入场"},{key:"out",label:"退场"},{key:"attention",label:"强调"}],d=Object(y["ref"])("in");Object(y["watch"])(()=>c.value,()=>{b.value=!1});const u=Object(y["ref"])(""),b=Object(y["ref"])(!1),{addHistorySnapshot:p}=Ze(),m=Object(y["computed"])(()=>{const e=[];for(let l=0;l<r.value.length;l++){const o=r.value[l];for(let n=0;n<o.animations.length;n++){const c=o.animations[n],r=a.value.elements.find(e=>e.id===c.elId);if(!r)continue;const i=Wl[r.type],s=t[c.effect];e.push({...c,index:0===n?l+1:"",elType:i,animationEffect:s})}}return e}),O=Object(y["computed"])(()=>{const e=i.value,t=e.filter(e=>e.elId===c.value);return t||[]}),f=e=>{const t=i.value.filter(t=>t.id!==e);o.updateSlide({animations:t}),p()},j=e=>{const{newIndex:t,oldIndex:l}=e;if(l===t)return;const n=JSON.parse(JSON.stringify(i.value)),c=n[l];n.splice(l,1),n.splice(t,0,c),o.updateSlide({animations:n}),p()},v=(e,t,l)=>{const o=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(o){const e=`${Qj}${t}`;document.documentElement.style.setProperty("--animate-duration",l+"ms"),o.classList.add(Qj+"animated",e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),o.classList.remove(Qj+"animated",e)};o.addEventListener("animationend",n,{once:!0})}},h=(e,t)=>{if(t<100||t>5e3)return;const l=i.value.map(l=>l.id===e?{...l,duration:t}:l);o.updateSlide({animations:l}),p()},k=(e,t)=>{const l=i.value.map(l=>l.id===e?{...l,trigger:t}:l);o.updateSlide({animations:l}),p()},C=(e,t)=>{const l=i.value.map(l=>l.id===N.value?{...l,type:e,effect:t}:l);o.updateSlide({animations:l}),b.value=!1,p();const n=i.value.find(e=>e.elId===c.value),a=(null===n||void 0===n?void 0:n.duration)||Jj;v(c.value,t,a)},N=Object(y["ref"])(""),E=(e,t)=>{if(N.value)return void C(e,t);const l=JSON.parse(JSON.stringify(i.value));l.push({id:Object(x["b"])(10),elId:c.value,type:e,effect:t,duration:Jj,trigger:Kj}),o.updateSlide({animations:l}),b.value=!1,p(),v(c.value,t,Jj)},w=Object(y["ref"])(!1),V=e=>{e?setTimeout(()=>w.value=!0,600):w.value=!1},I=e=>{b.value=!0,N.value=e,V(!0)},S={in:ev,out:tv,attention:lv};return(e,t)=>{const o=Object(y["resolveComponent"])("IconEffects"),c=Object(y["resolveComponent"])("Button"),a=Object(y["resolveComponent"])("Popover"),r=Object(y["resolveComponent"])("IconClick"),i=Object(y["resolveComponent"])("Divider"),p=Object(y["resolveComponent"])("IconPlayOne"),g=Object(y["resolveComponent"])("Tooltip"),x=Object(y["resolveComponent"])("IconCloseSmall"),C=Object(y["resolveComponent"])("InputNumber"),B=Object(y["resolveComponent"])("SelectOption"),L=Object(y["resolveComponent"])("Select");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",nv,[Object(y["unref"])(n)?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",cv,[Object(y["createVNode"])(a,{trigger:"click",visible:b.value,"onUpdate:visible":t[2]||(t[2]=e=>b.value=e),onVisibleChange:t[3]||(t[3]=e=>V(e))},{content:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",av,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(s,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",e.key,{active:d.value===e.key}]),key:e.key,onClick:t=>d.value=e.key},Object(y["toDisplayString"])(e.label),11,rv)),64))]),(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,[d.value===e?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["animation-pool",e]),key:e},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(S[e],l=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"pool-type",key:l.name},[Object(y["createElementVNode"])("div",iv,Object(y["toDisplayString"])(l.name)+"",1),Object(y["createElementVNode"])("div",sv,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l.children,l=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"pool-item",key:l.name,onMouseenter:e=>u.value=l.value,onMouseleave:t[0]||(t[0]=e=>u.value=""),onClick:t=>E(e,l.value)},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["animation-box",[Object(y["unref"])(Qj)+"animated",Object(y["unref"])(Qj)+"fast",u.value===l.value&&`${Object(y["unref"])(Qj)}${l.value}`]])},Object(y["toDisplayString"])(l.name),3)],40,dv))),128))])]))),128)),w.value?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",uv))],2)):Object(y["createCommentVNode"])("",!0)],64))),64))]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{class:"element-animation-btn",onClick:t[1]||(t[1]=e=>N.value="")},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{style:{"margin-right":"5px"}}),bv]),_:1})]),_:1},8,["visible"])])):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",pv,[Object(y["createVNode"])(r,{style:{"margin-right":"5px"}}),mv])),Object(y["createVNode"])(i),Object(y["createVNode"])(Object(y["unref"])(db.a),{class:"animation-sequence",modelValue:Object(y["unref"])(m),animation:300,scroll:!0,scrollSensitivity:50,handle:".sequence-content",onEnd:j,itemKey:"id"},{item:Object(y["withCtx"])(({element:e})=>{var t,l;return[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["sequence-item",[e.type,{active:(null===(t=Object(y["unref"])(n))||void 0===t?void 0:t.id)===e.elId}]])},[Object(y["createElementVNode"])("div",Ov,[Object(y["createElementVNode"])("div",fv,Object(y["toDisplayString"])(e.index),1),Object(y["createElementVNode"])("div",jv,"【"+Object(y["toDisplayString"])(e.elType)+"】"+Object(y["toDisplayString"])(e.animationEffect),1),Object(y["createElementVNode"])("div",vv,[Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"预览"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p,{class:"handler-btn",onClick:t=>v(e.elId,e.effect,e.duration)},null,8,["onClick"])]),_:2},1032,["mouseEnterDelay"]),Object(y["createVNode"])(g,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{class:"handler-btn",onClick:t=>f(e.id)},null,8,["onClick"])]),_:2},1032,["mouseEnterDelay"])])]),(null===(l=Object(y["unref"])(O)[0])||void 0===l?void 0:l.elId)===e.elId?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",hv,[Object(y["createVNode"])(i,{style:{margin:"16px 0"}}),Object(y["createElementVNode"])("div",yv,[gv,Object(y["createVNode"])(C,{min:500,max:3e3,step:500,value:e.duration,onChange:t=>h(e.id,t),style:{flex:"5"}},null,8,["value","onChange"])]),Object(y["createElementVNode"])("div",xv,[kv,Object(y["createVNode"])(L,{value:e.trigger,onChange:t=>k(e.id,t),style:{flex:"5"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(B,{value:"click"},{default:Object(y["withCtx"])(()=>[Cv]),_:1}),Object(y["createVNode"])(B,{value:"meantime"},{default:Object(y["withCtx"])(()=>[Nv]),_:1}),Object(y["createVNode"])(B,{value:"auto"},{default:Object(y["withCtx"])(()=>[Ev]),_:1})]),_:2},1032,["value","onChange"])]),Object(y["createElementVNode"])("div",wv,[Object(y["createVNode"])(c,{style:{flex:"1"},onClick:t=>I(e.id)},{default:Object(y["withCtx"])(()=>[Vv]),_:2},1032,["onClick"])])])):Object(y["createCommentVNode"])("",!0)],2)]}),_:1},8,["modelValue"])])}}});l("cc39");const Sv=ol()(Iv,[["__scopeId","data-v-2f69234f"]]);var Bv=Sv;const Lv=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var _v=()=>{const e=W(),{slides:t,currentSlide:l,theme:o}=Object(g["c"])(e),{addHistorySnapshot:n}=Ze(),c=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==U()(l.fill).getAlpha()){const e=U()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==U()(l.fill).getAlpha()){const e=U()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==U()(l.theme.color).getAlpha()){const e=U()(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==U()(l.fill).getAlpha()){const e=U()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==U()(l.color).getAlpha()){const e=U()(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==U()(l.color).getAlpha()){const e=U()(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},a=(e,t)=>{const l=c(e),o={};if(l.length>t.length){const e=U()(t[0]).analogous(l.length-t.length+10),o=e.map(e=>e.toHexString()).slice(1);t.push(...o)}for(let n=0;n<l.length;n++)o[l[n]]=t[n];return o},r=(e,t)=>{const l=a(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const o of e.elements){if("shape"===o.type&&(o.fill=l[U()(o.fill).toRgbString()]||o.fill,o.gradient&&delete o.gradient),"text"===o.type&&(o.fill&&(o.fill=l[U()(o.fill).toRgbString()]||o.fill),o.defaultColor=t.fontColor,o.defaultFontName=t.fontname),"table"===o.type){o.theme&&(o.theme.color=l[U()(o.theme.color).toRgbString()]||o.theme.color);for(const e of o.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===o.type&&(o.themeColor=[l[U()(o.themeColor[0]).toRgbString()]]||!1,o.gridColor=t.fontColor),"line"===o.type&&(o.color=l[U()(o.color).toRgbString()]||o.color),"audio"===o.type&&(o.color=l[U()(o.color).toRgbString()]||o.color),"latex"===o.type&&(o.color=t.fontColor)}},i=t=>{const o=JSON.parse(JSON.stringify(l.value));r(o,t),e.updateSlide({background:o.background,elements:o.elements}),n()},s=l=>{const o=JSON.parse(JSON.stringify(t.value));for(const e of o)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(o),n()},d=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:c,backgroundColor:a,fontColor:r,fontName:i}=o.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:a});for(const t of e.elements)if("shape"===t.type)t.fill=c;else if("line"===t.type)t.color=c;else if("text"===t.type)t.defaultColor=r,t.defaultFontName=i,t.fill&&(t.fill=c);else if("table"===t.type){t.theme&&(t.theme.color=c);for(const e of t.data)for(const t of e)t.style&&(t.style.color=r,t.style.fontname=i)}else"chart"===t.type?(t.themeColor=[c],t.gridColor=r):"latex"===t.type?t.color=r:"audio"===t.type&&(t.color=c)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:i,applyPresetThemeToAllSlides:s,applyThemeToAllSlides:d}};const Tv=e=>(Object(y["pushScopeId"])("data-v-8c16beae"),e=e(),Object(y["popScopeId"])(),e),Mv={class:"slide-design-panel"},Dv=Tv(()=>Object(y["createElementVNode"])("div",{class:"title"},"背景填充",-1)),zv={class:"row"},Av=Object(y["createTextVNode"])("纯色填充"),Fv=Object(y["createTextVNode"])("图片填充"),$v=Object(y["createTextVNode"])("渐变填充"),Rv=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),Pv=Object(y["createTextVNode"])("缩放"),Hv=Object(y["createTextVNode"])("拼贴"),qv=Object(y["createTextVNode"])("缩放铺满"),Uv=Object(y["createTextVNode"])("线性渐变"),Gv=Object(y["createTextVNode"])("径向渐变"),Xv={key:0,class:"background-image-wrapper"},Yv={class:"background-image"},Zv={key:1,class:"background-gradient-wrapper"},Wv={class:"row"},Jv=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1)),Kv={class:"row"},Qv=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1)),eh={key:0,class:"row"},th=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1)),lh={class:"row"},oh=Object(y["createTextVNode"])("应用背景到全部"),nh={class:"row"},ch=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"画布尺寸:",-1)),ah=Object(y["createTextVNode"])("宽屏 16 : 9"),rh=Object(y["createTextVNode"])("宽屏 16 10"),ih=Object(y["createTextVNode"])("标准 4 3"),sh=Tv(()=>Object(y["createElementVNode"])("div",{class:"title"},"全局主题",-1)),dh={class:"row"},uh=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"字体:",-1)),bh={class:"row"},ph=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"字体颜色:",-1)),mh={class:"row"},Oh=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"背景颜色:",-1)),fh={class:"row"},jh=Tv(()=>Object(y["createElementVNode"])("div",{style:{flex:"2"}},"主题色:",-1)),vh={class:"row"},hh=Object(y["createTextVNode"])("应用主题到全部"),yh=Tv(()=>Object(y["createElementVNode"])("div",{class:"title"},"预置主题",-1)),gh={class:"theme-list"},xh={class:"theme-item-content"},kh={class:"colors"},Ch={class:"btns"},Nh=["onClick"],Eh=["onClick"];var wh=Object(y["defineComponent"])({__name:"SlideDesignPanel",setup(e){const t=W(),{availableFonts:l}=Object(g["c"])(Q()),{slides:o,currentSlide:n,viewportRatio:c,theme:a}=Object(g["c"])(t),r=Object(y["computed"])(()=>n.value.background?n.value.background:{type:"solid",value:"#fff"}),{addHistorySnapshot:i}=Ze(),{applyPresetThemeToSingleSlide:s,applyPresetThemeToAllSlides:d,applyThemeToAllSlides:u}=_v(),b=e=>{if("solid"===e){const e={...r.value,type:"solid",color:r.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...r.value,type:"image",image:r.value.image||"",imageSize:r.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...r.value,type:"gradient",gradientType:r.value.gradientType||"linear",gradientColor:r.value.gradientColor||["#fff","#fff"],gradientRotate:r.value.gradientRotate||0};t.updateSlide({background:e})}i()},p=e=>{t.updateSlide({background:{...r.value,...e}}),i()},m=e=>{const t=e[0];t&&Pe(t).then(e=>p({image:e}))},O=()=>{const e=o.value.map(e=>({...e,background:n.value.background}));t.setSlides(e),i()},f=e=>{t.setTheme(e)},j=e=>{t.setViewportRatio(e)};return(e,t)=>{const o=Object(y["resolveComponent"])("SelectOption"),n=Object(y["resolveComponent"])("Select"),i=Object(y["resolveComponent"])("ColorPicker"),v=Object(y["resolveComponent"])("Popover"),h=Object(y["resolveComponent"])("IconPlus"),g=Object(y["resolveComponent"])("FileInput"),x=Object(y["resolveComponent"])("Slider"),k=Object(y["resolveComponent"])("Button"),N=Object(y["resolveComponent"])("Divider"),E=Object(y["resolveComponent"])("SelectOptGroup");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Mv,[Dv,Object(y["createElementVNode"])("div",zv,[Object(y["createVNode"])(n,{style:{flex:"10"},value:Object(y["unref"])(r).type,onChange:t[0]||(t[0]=e=>b(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:"solid"},{default:Object(y["withCtx"])(()=>[Av]),_:1}),Object(y["createVNode"])(o,{value:"image"},{default:Object(y["withCtx"])(()=>[Fv]),_:1}),Object(y["createVNode"])(o,{value:"gradient"},{default:Object(y["withCtx"])(()=>[$v]),_:1})]),_:1},8,["value"]),Rv,"solid"===Object(y["unref"])(r).type?(Object(y["openBlock"])(),Object(y["createBlock"])(v,{key:0,trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(r).color,"onUpdate:modelValue":t[1]||(t[1]=e=>p({color:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(r).color||"#fff",style:{flex:"10"}},null,8,["color"])]),_:1})):"image"===Object(y["unref"])(r).type?(Object(y["openBlock"])(),Object(y["createBlock"])(n,{key:1,style:{flex:"10"},value:Object(y["unref"])(r).imageSize||"cover",onChange:t[2]||(t[2]=e=>p({imageSize:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:"contain"},{default:Object(y["withCtx"])(()=>[Pv]),_:1}),Object(y["createVNode"])(o,{value:"repeat"},{default:Object(y["withCtx"])(()=>[Hv]),_:1}),Object(y["createVNode"])(o,{value:"cover"},{default:Object(y["withCtx"])(()=>[qv]),_:1})]),_:1},8,["value"])):(Object(y["openBlock"])(),Object(y["createBlock"])(n,{key:2,style:{flex:"10"},value:Object(y["unref"])(r).gradientType,onChange:t[3]||(t[3]=e=>p({gradientType:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:"linear"},{default:Object(y["withCtx"])(()=>[Uv]),_:1}),Object(y["createVNode"])(o,{value:"radial"},{default:Object(y["withCtx"])(()=>[Gv]),_:1})]),_:1},8,["value"]))]),"image"===Object(y["unref"])(r).type?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Xv,[Object(y["createVNode"])(g,{onChange:t[4]||(t[4]=e=>m(e))},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",Yv,[Object(y["createElementVNode"])("div",{class:"content",style:Object(y["normalizeStyle"])({backgroundImage:`url(${Object(y["unref"])(r).image})`})},[Object(y["createVNode"])(h)],4)])]),_:1})])):Object(y["createCommentVNode"])("",!0),"gradient"===Object(y["unref"])(r).type?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Zv,[Object(y["createElementVNode"])("div",Wv,[Jv,Object(y["createVNode"])(v,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(r).gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>p({gradientColor:[e,Object(y["unref"])(r).gradientColor[1]]}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(r).gradientColor[0],style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",Kv,[Qv,Object(y["createVNode"])(v,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(r).gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>p({gradientColor:[Object(y["unref"])(r).gradientColor[0],e]}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(r).gradientColor[1],style:{flex:"3"}},null,8,["color"])]),_:1})]),"linear"===Object(y["unref"])(r).gradientType?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",eh,[th,Object(y["createVNode"])(x,{class:"slider",min:0,max:360,step:15,value:Object(y["unref"])(r).gradientRotate,onChange:t[7]||(t[7]=e=>p({gradientRotate:e}))},null,8,["value"])])):Object(y["createCommentVNode"])("",!0)])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",lh,[Object(y["createVNode"])(k,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>O())},{default:Object(y["withCtx"])(()=>[oh]),_:1})]),Object(y["createVNode"])(N),Object(y["createElementVNode"])("div",nh,[ch,Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(c),onChange:t[9]||(t[9]=e=>j(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{value:.5625},{default:Object(y["withCtx"])(()=>[ah]),_:1},8,["value"]),Object(y["createVNode"])(o,{value:.625},{default:Object(y["withCtx"])(()=>[rh]),_:1},8,["value"]),Object(y["createVNode"])(o,{value:.75},{default:Object(y["withCtx"])(()=>[ih]),_:1},8,["value"])]),_:1},8,["value"])]),Object(y["createVNode"])(N),sh,Object(y["createElementVNode"])("div",dh,[uh,Object(y["createVNode"])(n,{style:{flex:"3"},value:Object(y["unref"])(a).fontName,onChange:t[10]||(t[10]=e=>f({fontName:e}))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(E,{label:"系统字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",{style:Object(y["normalizeStyle"])({fontFamily:e.value})},Object(y["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(y["createVNode"])(E,{label:"在线字体"},{default:Object(y["withCtx"])(()=>[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(C),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:e.value,value:e.value},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",bh,[ph,Object(y["createVNode"])(v,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(a).fontColor,"onUpdate:modelValue":t[11]||(t[11]=e=>f({fontColor:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(a).fontColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",mh,[Oh,Object(y["createVNode"])(v,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(a).backgroundColor,"onUpdate:modelValue":t[12]||(t[12]=e=>f({backgroundColor:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(a).backgroundColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",fh,[jh,Object(y["createVNode"])(v,{trigger:"click"},{content:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{modelValue:Object(y["unref"])(a).themeColor,"onUpdate:modelValue":t[13]||(t[13]=e=>f({themeColor:e}))},null,8,["modelValue"])]),default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(Tb,{color:Object(y["unref"])(a).themeColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(y["createElementVNode"])("div",vh,[Object(y["createVNode"])(k,{style:{flex:"1"},onClick:t[14]||(t[14]=e=>Object(y["unref"])(u)())},{default:Object(y["withCtx"])(()=>[hh]),_:1})]),Object(y["createVNode"])(N),yh,Object(y["createElementVNode"])("div",gh,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(Lv),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"theme-item",key:t,style:Object(y["normalizeStyle"])({backgroundColor:e.background,fontFamily:e.fontname})},[Object(y["createElementVNode"])("div",xh,[Object(y["createElementVNode"])("div",{class:"text",style:Object(y["normalizeStyle"])({color:e.fontColor})},"文字 Aa",4),Object(y["createElementVNode"])("div",kh,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.colors,(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"color-block",key:t,style:Object(y["normalizeStyle"])({backgroundColor:e})},null,4))),128))]),Object(y["createElementVNode"])("div",Ch,[Object(y["createElementVNode"])("div",{class:"btn",onClick:t=>Object(y["unref"])(s)(e)},"应用",8,Nh),Object(y["createElementVNode"])("div",{class:"btn",onClick:t=>Object(y["unref"])(d)(e)},"应用全局",8,Eh)])])],4))),128))])])}}});l("a330");const Vh=ol()(wh,[["__scopeId","data-v-8c16beae"]]);var Ih=Vh;const Sh={class:"slide-animation-panel"},Bh={class:"animation-pool"},Lh=["onClick"],_h={class:"animation-text"},Th=Object(y["createTextVNode"])("应用到全部");var Mh=Object(y["defineComponent"])({__name:"SlideAnimationPanel",setup(e){const t=W(),{slides:l,currentSlide:o}=Object(g["c"])(t),n=Object(y["computed"])(()=>o.value.turningMode||"slideY"),c=[{label:"无",value:"no"},{label:"淡入淡出",value:"fade"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"}],{addHistorySnapshot:a}=Ze(),r=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),a())},i=()=>{const e=l.value.map(e=>({...e,turningMode:o.value.turningMode}));t.setSlides(e),a()};return(e,t)=>{const l=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Sh,[Object(y["createElementVNode"])("div",Bh,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(c,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["animation-item",{active:Object(y["unref"])(n)===e.value}]),key:e.label,onClick:t=>r(e.value)},[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["animation-block",e.value])},null,2),Object(y["createElementVNode"])("div",_h,Object(y["toDisplayString"])(e.label),1)],10,Lh)),64))]),Object(y["createVNode"])(l,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>i())},{default:Object(y["withCtx"])(()=>[Th]),_:1})])}}});l("cc76");const Dh=ol()(Mh,[["__scopeId","data-v-577ae912"]]);var zh=Dh,Ah=()=>{const e=W(),{activeElementIdList:t,activeElementList:l}=Object(g["c"])(Q()),{currentSlide:o}=Object(g["c"])(e),{addHistorySnapshot:n}=Ze(),c=c=>{const{minX:a,maxX:r,minY:i,maxY:s}=Te(l.value),d=JSON.parse(JSON.stringify(o.value.elements)),u={};for(const e of l.value)if(e.groupId&&!u[e.groupId]){const t=l.value.filter(t=>t.groupId===e.groupId);u[e.groupId]=Te(t)}if(c===pe.LEFT)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.minX-a;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=a-t}else e.left=a});else if(c===pe.RIGHT)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.maxX-r;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=r-t+l}else e.left=r-t}});else if(c===pe.TOP)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.minY-i;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=i-t}else e.top=i});else if(c===pe.BOTTOM)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.maxY-s;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=s-t+l}else e.top=s-t}});else if(c===pe.HORIZONTAL){const e=(a+r)/2;d.forEach(l=>{if(t.value.includes(l.id))if(l.groupId){const t=u[l.groupId],o=(t.maxX+t.minX)/2,n=o-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}})}else if(c===pe.VERTICAL){const e=(i+s)/2;d.forEach(l=>{if(t.value.includes(l.id))if(l.groupId){const t=u[l.groupId],o=(t.maxY+t.minY)/2,n=o-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}})}e.updateSlide({elements:d}),n()};return{alignActiveElement:c}},Fh=()=>{const e=W(),{activeElementIdList:t,activeElementList:l}=Object(g["c"])(Q()),{currentSlide:o}=Object(g["c"])(e),{addHistorySnapshot:n}=Ze(),c=Object(y["computed"])(()=>{let e=0;const t=[];for(const o of l.value)o.groupId?t.includes(o.groupId)||(t.push(o.groupId),e+=1):e+=1;return e}),a=()=>{const{minX:c,maxX:a}=Te(l.value),r=JSON.parse(JSON.stringify(l.value)),i=JSON.parse(JSON.stringify(o.value.elements)),s=[];let d=[];for(const e of r)if(e.groupId){const t=d.find(t=>t.groupId===e.groupId);t?d=d.map(t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t):d.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=_e(e);s.push({min:t,max:l,el:e})}const u=[];for(const e of d){const{minX:t,maxX:l}=Te(e.els);u.push({min:t,max:l,els:e.els})}const b=[...s,...u];b.sort((e,t)=>e.min-t.min);let p=0;for(const e of b){const t=e.max-e.min;p+=t}const m=(a-c-p)/(b.length-1),O=[],f=b[0];let j={min:f.min,max:f.max};if("el"in f)O.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=_e(e);O.push({pos:t,el:e})}for(let e=1;e<b.length;e++){const t=b[e],l=j.max-j.min,o=j.min+l+m,n=t.max-t.min;if(j={min:o,max:o+n},"el"in t)O.push({pos:o,el:t.el});else for(const e of t.els){const{minX:l}=_e(e),n=l-t.min;O.push({pos:o+n,el:e})}}for(const e of i)if(t.value.includes(e.id))for(const t of O)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetX:l}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=t.pos-l}else e.left=t.pos;e.updateSlide({elements:i}),n()},r=()=>{const{minY:c,maxY:a}=Te(l.value),r=JSON.parse(JSON.stringify(l.value)),i=JSON.parse(JSON.stringify(o.value.elements)),s=[];let d=[];for(const e of r)if(e.groupId){const t=d.find(t=>t.groupId===e.groupId);t?d=d.map(t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t):d.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=_e(e);s.push({min:t,max:l,el:e})}const u=[];for(const e of d){const{minY:t,maxY:l}=Te(e.els);u.push({min:t,max:l,els:e.els})}const b=[...s,...u];b.sort((e,t)=>e.min-t.min);let p=0;for(const e of b){const t=e.max-e.min;p+=t}const m=(a-c-p)/(b.length-1),O=[],f=b[0];let j={min:f.min,max:f.max};if("el"in f)O.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=_e(e);O.push({pos:t,el:e})}for(let e=1;e<b.length;e++){const t=b[e],l=j.max-j.min,o=j.min+l+m,n=t.max-t.min;if(j={min:o,max:o+n},"el"in t)O.push({pos:o,el:t.el});else for(const e of t.els){const{minY:l}=_e(e),n=l-t.min;O.push({pos:o+n,el:e})}}for(const e of i)if(t.value.includes(e.id))for(const t of O)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetY:l}=Le({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=t.pos-l}else e.top=t.pos;e.updateSlide({elements:i}),n()};return{displayItemCount:c,uniformHorizontalDisplay:a,uniformVerticalDisplay:r}};const $h={class:"multi-position-panel"},Rh=Object(y["createTextVNode"])("水平均匀分布"),Ph=Object(y["createTextVNode"])("垂直均匀分布"),Hh=Object(y["createTextVNode"])("组合"),qh=Object(y["createTextVNode"])("取消组合");var Uh=Object(y["defineComponent"])({__name:"MultiPositionPanel",setup(e){const{canCombine:t,combineElements:l,uncombineElements:o}=lt(),{alignActiveElement:n}=Ah(),{alignElementToCanvas:c}=io(),{displayItemCount:a,uniformHorizontalDisplay:r,uniformVerticalDisplay:i}=Fh(),s=e=>{t.value?n(e):c(e)};return(e,n)=>{const c=Object(y["resolveComponent"])("IconAlignLeft"),d=Object(y["resolveComponent"])("Button"),u=Object(y["resolveComponent"])("Tooltip"),b=Object(y["resolveComponent"])("IconAlignHorizontally"),p=Object(y["resolveComponent"])("IconAlignRight"),m=Object(y["resolveComponent"])("ButtonGroup"),O=Object(y["resolveComponent"])("IconAlignTop"),f=Object(y["resolveComponent"])("IconAlignVertically"),j=Object(y["resolveComponent"])("IconAlignBottom"),v=Object(y["resolveComponent"])("Divider"),h=Object(y["resolveComponent"])("IconGroup"),g=Object(y["resolveComponent"])("IconUngroup");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",$h,[Object(y["createVNode"])(m,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>s(Object(y["unref"])(pe).LEFT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>s(Object(y["unref"])(pe).HORIZONTAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>s(Object(y["unref"])(pe).RIGHT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["createVNode"])(m,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>s(Object(y["unref"])(pe).TOP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(O)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>s(Object(y["unref"])(pe).VERTICAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>s(Object(y["unref"])(pe).BOTTOM))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(y["unref"])(a)>2?(Object(y["openBlock"])(),Object(y["createBlock"])(m,{key:0,class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>Object(y["unref"])(r)())},{default:Object(y["withCtx"])(()=>[Rh]),_:1}),Object(y["createVNode"])(d,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>Object(y["unref"])(i)())},{default:Object(y["withCtx"])(()=>[Ph]),_:1})]),_:1})):Object(y["createCommentVNode"])("",!0),Object(y["createVNode"])(v),Object(y["createVNode"])(m,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{disabled:!Object(y["unref"])(t),onClick:n[8]||(n[8]=e=>Object(y["unref"])(l)()),style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(h,{style:{"margin-right":"3px"}}),Hh]),_:1},8,["disabled"]),Object(y["createVNode"])(d,{disabled:Object(y["unref"])(t),onClick:n[9]||(n[9]=e=>Object(y["unref"])(o)()),style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{style:{"margin-right":"3px"}}),qh]),_:1},8,["disabled"])]),_:1})])}}});l("1855");const Gh=ol()(Uh,[["__scopeId","data-v-0d3881c5"]]);var Xh=Gh;const Yh=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","","Ⅱ","Ⅲ","Ⅳ","","Ⅵ","Ⅶ","Ⅷ","Ⅸ","","Ⅺ","Ⅻ","","","","","","ⅱ","ⅲ","ⅳ","","ⅵ","ⅶ","ⅷ","ⅸ","","ⅺ","ⅻ","","","","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","","∩","","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","","⋂","","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],Zh={class:"symbol-panel"},Wh={class:"tabs"},Jh=["onClick"],Kh={class:"pool"},Qh=["onClick"],ey={class:"symbol"};var ty=Object(y["defineComponent"])({__name:"SymbolPanel",setup(e){const t=Object(y["ref"])(Yh[0].key),l=Object(y["computed"])(()=>{const e=Yh.find(e=>e.key===t.value);return(null===e||void 0===e?void 0:e.children)||[]}),o=e=>{Un.emit(Pn.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Zh,[Object(y["createElementVNode"])("div",Wh,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(Yh),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["tab",{active:t.value===e.key}]),key:e.key,onClick:l=>t.value=e.key},Object(y["toDisplayString"])(e.label),11,Jh))),128))]),Object(y["createElementVNode"])("div",Kh,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"symbol-item",key:t,onClick:t=>o(e)},[Object(y["createElementVNode"])("div",ey,Object(y["toDisplayString"])(e),1)],8,Qh))),128))])]))}});l("1126");const ly=ol()(ty,[["__scopeId","data-v-ba0c96fc"]]);var oy=ly;const ny={class:"toolbar"},cy={class:"tabs"},ay=["onClick"],ry={class:"content"};var iy=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{activeElementIdList:l,handleElement:n,toolbarState:c}=Object(g["c"])(t),a=Object(y["computed"])(()=>{var e;return"text"===(null===(e=n.value)||void 0===e?void 0:e.type)?[{label:"样式",value:o.EL_STYLE},{label:"符号",value:o.SYMBOL},{label:"位置",value:o.EL_POSITION},{label:"动画",value:o.EL_ANIMATION}]:[{label:"样式",value:o.EL_STYLE},{label:"位置",value:o.EL_POSITION},{label:"动画",value:o.EL_ANIMATION}]}),r=[{label:"设计",value:o.SLIDE_DESIGN},{label:"切换",value:o.SLIDE_ANIMATION},{label:"动画",value:o.EL_ANIMATION}],i=[{label:"样式",value:o.EL_STYLE},{label:"位置",value:o.MULTI_POSITION}],s=e=>{t.setToolbarState(e)},d=Object(y["computed"])(()=>l.value.length?l.value.length>1?i:a.value:r);Object(y["watch"])(d,()=>{const e=d.value.map(e=>e.value);e.includes(c.value)||t.setToolbarState(e[0])});const u=Object(y["computed"])(()=>{const e={[o.EL_STYLE]:Vj,[o.EL_POSITION]:Wj,[o.EL_ANIMATION]:Bv,[o.SLIDE_DESIGN]:Ih,[o.SLIDE_ANIMATION]:zh,[o.MULTI_POSITION]:Xh,[o.SYMBOL]:oy};return e[c.value]||null});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",ny,[Object(y["createElementVNode"])("div",cy,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(d),e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["tab",{active:e.value===Object(y["unref"])(c)}]),key:e.value,onClick:t=>s(e.value)},Object(y["toDisplayString"])(e.label),11,ay))),128))]),Object(y["createElementVNode"])("div",ry,[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(u))))])]))}});l("cd7e");const sy=ol()(iy,[["__scopeId","data-v-5303bd17"]]);var dy=sy;const uy={class:"remark"},by=["value"];var py=Object(y["defineComponent"])({__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const l=e,o=W(),{currentSlide:n}=Object(g["c"])(o),c=Object(y["computed"])(()=>{var e;return(null===(e=n.value)||void 0===e?void 0:e.remark)||""}),a=e=>{const t=e.target.value;o.updateSlide({remark:t})},r=e=>{let o=!0;const n=e.pageY,c=l.height;document.onmousemove=e=>{if(!o)return;const l=e.pageY,a=l-n;let r=-a+c;r<40&&(r=40),r>120&&(r=120),t("update:height",r)},document.onmouseup=()=>{o=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",uy,[Object(y["createElementVNode"])("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>r(e))},null,32),Object(y["createElementVNode"])("textarea",{value:Object(y["unref"])(c),placeholder:"点击输入演讲者备注",onInput:t[1]||(t[1]=e=>a(e))},null,40,by)]))}});l("ec27");const my=ol()(py,[["__scopeId","data-v-82b674f6"]]);var Oy=my;const fy=e=>(Object(y["pushScopeId"])("data-v-60a953a0"),e=e(),Object(y["popScopeId"])(),e),jy={class:"export-img-dialog"},vy={class:"thumbnails-view"},hy={class:"configs"},yy={class:"row"},gy=fy(()=>Object(y["createElementVNode"])("div",{class:"title"},"导出格式:",-1)),xy=Object(y["createTextVNode"])("JPEG"),ky=Object(y["createTextVNode"])("PNG"),Cy={class:"row"},Ny=fy(()=>Object(y["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),Ey=Object(y["createTextVNode"])("全部"),wy=Object(y["createTextVNode"])("当前页"),Vy=Object(y["createTextVNode"])("自定义"),Iy={key:0,class:"row"},Sy=["data-range"],By={class:"row"},Ly=fy(()=>Object(y["createElementVNode"])("div",{class:"title"},"图片质量:",-1)),_y={class:"row"},Ty=fy(()=>Object(y["createElementVNode"])("div",{class:"title"},"忽略在线字体:",-1)),My={class:"config-item"},Dy={class:"btns"},zy=Object(y["createTextVNode"])("导出图片"),Ay=Object(y["createTextVNode"])("关闭");var Fy=Object(y["defineComponent"])({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:o}=Object(g["c"])(W()),n=Object(y["ref"])(),c=Object(y["ref"])("all"),a=Object(y["ref"])([1,l.value.length]),r=Object(y["ref"])("jpeg"),i=Object(y["ref"])(1),s=Object(y["ref"])(!0),d=Object(y["computed"])(()=>"all"===c.value?l.value:"current"===c.value?[o.value]:l.value.filter((e,t)=>{const[l,o]=a.value;return t>=l-1&&t<=o-1})),{exportImage:u,exporting:b}=Wt(),p=()=>{n.value&&u(n.value,r.value,i.value,s.value)};return(e,o)=>{const u=Object(y["resolveComponent"])("RadioButton"),m=Object(y["resolveComponent"])("RadioGroup"),O=Object(y["resolveComponent"])("Slider"),f=Object(y["resolveComponent"])("Switch"),j=Object(y["resolveComponent"])("Tooltip"),v=Object(y["resolveComponent"])("Button"),h=Object(y["resolveComponent"])("FullscreenSpin");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",jy,[Object(y["createElementVNode"])("div",vy,[Object(y["createElementVNode"])("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:n},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(d),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Ys,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"]))),128))],512)]),Object(y["createElementVNode"])("div",hy,[Object(y["createElementVNode"])("div",yy,[gy,Object(y["createVNode"])(m,{class:"config-item",value:r.value,"onUpdate:value":o[0]||(o[0]=e=>r.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(u,{style:{width:"50%"},value:"jpeg"},{default:Object(y["withCtx"])(()=>[xy]),_:1}),Object(y["createVNode"])(u,{style:{width:"50%"},value:"png"},{default:Object(y["withCtx"])(()=>[ky]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",Cy,[Ny,Object(y["createVNode"])(m,{class:"config-item",value:c.value,"onUpdate:value":o[1]||(o[1]=e=>c.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(u,{style:{width:"33.33%"},value:"all"},{default:Object(y["withCtx"])(()=>[Ey]),_:1}),Object(y["createVNode"])(u,{style:{width:"33.33%"},value:"current"},{default:Object(y["withCtx"])(()=>[wy]),_:1}),Object(y["createVNode"])(u,{style:{width:"33.33%"},value:"custom"},{default:Object(y["withCtx"])(()=>[Vy]),_:1})]),_:1},8,["value"])]),"custom"===c.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Iy,[Object(y["createElementVNode"])("div",{class:"title","data-range":`${a.value[0]} ~ ${a.value[1]}`},"自定义范围:",8,Sy),Object(y["createVNode"])(O,{class:"config-item",range:"",min:1,max:Object(y["unref"])(l).length,step:1,value:a.value,"onUpdate:value":o[2]||(o[2]=e=>a.value=e)},null,8,["max","value"])])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",By,[Ly,Object(y["createVNode"])(O,{class:"config-item",min:0,max:1,step:.1,value:i.value,"onUpdate:value":o[3]||(o[3]=e=>i.value=e)},null,8,["step","value"])]),Object(y["createElementVNode"])("div",_y,[Ty,Object(y["createElementVNode"])("div",My,[Object(y["createVNode"])(j,{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f,{checked:s.value,"onUpdate:checked":o[4]||(o[4]=e=>s.value=e)},null,8,["checked"])]),_:1},8,["mouseEnterDelay"])])])]),Object(y["createElementVNode"])("div",Dy,[Object(y["createVNode"])(v,{class:"btn export",type:"primary",onClick:o[5]||(o[5]=e=>p())},{default:Object(y["withCtx"])(()=>[zy]),_:1}),Object(y["createVNode"])(v,{class:"btn close",onClick:o[6]||(o[6]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[Ay]),_:1})]),Object(y["createVNode"])(h,{loading:Object(y["unref"])(b),tip:"正在导出..."},null,8,["loading"])])}}});l("e303");const $y=ol()(Fy,[["__scopeId","data-v-60a953a0"]]);var Ry=$y;const Py={class:"export-json-dialog"},Hy={class:"preview"},qy={class:"btns"},Uy=Object(y["createTextVNode"])("导出 JSON"),Gy=Object(y["createTextVNode"])("关闭");var Xy=Object(y["defineComponent"])({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=Object(g["c"])(W()),{exportJSON:o}=Wt();return(e,n)=>{const c=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Py,[Object(y["createElementVNode"])("div",Hy,[Object(y["createElementVNode"])("pre",null,Object(y["toDisplayString"])(Object(y["unref"])(l)),1)]),Object(y["createElementVNode"])("div",qy,[Object(y["createVNode"])(c,{class:"btn export",type:"primary",onClick:n[0]||(n[0]=e=>Object(y["unref"])(o)())},{default:Object(y["withCtx"])(()=>[Uy]),_:1}),Object(y["createVNode"])(c,{class:"btn close",onClick:n[1]||(n[1]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[Gy]),_:1})])])}}});l("eba1");const Yy=ol()(Xy,[["__scopeId","data-v-1bc24666"]]);var Zy=Yy;const Wy=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},Jy=(e,t,l)=>{const o="<!DOCTYPE html>";let n="";const c=document.styleSheets;if(c)for(const u of c)if(u.cssRules)for(const e of u.cssRules)n+=e.cssText;const{width:a,height:r,margin:i}=l,s=`\n <head>\n <style type="text/css">\n ${n} \n html, body {\n height: auto;\n overflow: auto;\n }\n @media print {\n @page {\n size: ${a+2*i}px ${r+2*i}px;\n margin: ${i}px;\n }\n }\n </style>\n </head>\n `,d="<body>"+t.innerHTML+"</body>";e.open(),e.write(`\n ${o}\n <html>\n ${s}\n ${d}\n </html>\n `),e.close()},Ky=(e,t)=>{const l=Wy(),o=l.contentWindow;if(!l.contentDocument||!o)return;Jy(l.contentDocument,e,t);const n=()=>{o.focus(),o.print()},c=()=>{l.removeEventListener("load",n),o.removeEventListener("afterprint",c),document.body.removeChild(l)};l.addEventListener("load",n),o.addEventListener("afterprint",c)},Qy=e=>(Object(y["pushScopeId"])("data-v-15b57798"),e=e(),Object(y["popScopeId"])(),e),eg={class:"export-pdf-dialog"},tg={class:"thumbnails-view"},lg={class:"configs"},og={class:"row"},ng=Qy(()=>Object(y["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),cg=Object(y["createTextVNode"])("全部幻灯片"),ag=Object(y["createTextVNode"])("当前幻灯片"),rg={class:"row"},ig=Qy(()=>Object(y["createElementVNode"])("div",{class:"title"},"每页数量:",-1)),sg=Object(y["createTextVNode"])("1"),dg=Object(y["createTextVNode"])("2"),ug=Object(y["createTextVNode"])("3"),bg={class:"row"},pg=Qy(()=>Object(y["createElementVNode"])("div",{class:"title"},"边缘留白:",-1)),mg={class:"config-item"},Og=Qy(()=>Object(y["createElementVNode"])("div",{class:"tip"}," 注意:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1)),fg={class:"btns"},jg=Object(y["createTextVNode"])("打印 / 导出 PDF"),vg=Object(y["createTextVNode"])("关闭");var hg=Object(y["defineComponent"])({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:o}=Object(g["c"])(W()),n=Object(y["ref"])(),c=Object(y["ref"])("all"),a=Object(y["ref"])(1),r=Object(y["ref"])(!0),i=()=>{if(!n.value)return;const e={width:1600,height:"all"===c.value?900*a.value:900,margin:r.value?50:0};Ky(n.value,e)};return(e,s)=>{const d=Object(y["resolveComponent"])("RadioButton"),u=Object(y["resolveComponent"])("RadioGroup"),b=Object(y["resolveComponent"])("SelectOption"),p=Object(y["resolveComponent"])("Select"),m=Object(y["resolveComponent"])("Switch"),O=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",eg,[Object(y["createElementVNode"])("div",tg,[Object(y["createElementVNode"])("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:n},["current"===c.value?(Object(y["openBlock"])(),Object(y["createBlock"])(Ys,{key:0,class:"thumbnail",slide:Object(y["unref"])(o),size:1600},null,8,["slide"])):(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],{key:1},Object(y["renderList"])(Object(y["unref"])(l),(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(Ys,{class:Object(y["normalizeClass"])(["thumbnail",{"break-page":(t+1)%a.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"]))),128))],512)]),Object(y["createElementVNode"])("div",lg,[Object(y["createElementVNode"])("div",og,[ng,Object(y["createVNode"])(u,{class:"config-item",value:c.value,"onUpdate:value":s[0]||(s[0]=e=>c.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{width:"50%"},value:"all"},{default:Object(y["withCtx"])(()=>[cg]),_:1}),Object(y["createVNode"])(d,{style:{width:"50%"},value:"current"},{default:Object(y["withCtx"])(()=>[ag]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",rg,[ig,Object(y["createVNode"])(p,{class:"config-item",value:a.value,"onUpdate:value":s[1]||(s[1]=e=>a.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(b,{value:1},{default:Object(y["withCtx"])(()=>[sg]),_:1}),Object(y["createVNode"])(b,{value:2},{default:Object(y["withCtx"])(()=>[dg]),_:1}),Object(y["createVNode"])(b,{value:3},{default:Object(y["withCtx"])(()=>[ug]),_:1})]),_:1},8,["value"])]),Object(y["createElementVNode"])("div",bg,[pg,Object(y["createElementVNode"])("div",mg,[Object(y["createVNode"])(m,{checked:r.value,"onUpdate:checked":s[2]||(s[2]=e=>r.value=e)},null,8,["checked"])])]),Og]),Object(y["createElementVNode"])("div",fg,[Object(y["createVNode"])(O,{class:"btn export",type:"primary",onClick:s[3]||(s[3]=e=>i())},{default:Object(y["withCtx"])(()=>[jg]),_:1}),Object(y["createVNode"])(O,{class:"btn close",onClick:s[4]||(s[4]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[vg]),_:1})])])}}});l("7239");const yg=ol()(hg,[["__scopeId","data-v-15b57798"]]);var gg=yg;const xg=e=>(Object(y["pushScopeId"])("data-v-3fef9be0"),e=e(),Object(y["popScopeId"])(),e),kg={class:"export-pptx-dialog"},Cg={class:"configs"},Ng={class:"row"},Eg=xg(()=>Object(y["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),wg=Object(y["createTextVNode"])("全部"),Vg=Object(y["createTextVNode"])("当前页"),Ig=Object(y["createTextVNode"])("自定义"),Sg={key:0,class:"row"},Bg=["data-range"],Lg={class:"row"},_g=xg(()=>Object(y["createElementVNode"])("div",{class:"title"},"覆盖默认母版:",-1)),Tg={class:"config-item"},Mg={class:"btns"},Dg=Object(y["createTextVNode"])("导出 PPTX"),zg=Object(y["createTextVNode"])("关闭");var Ag=Object(y["defineComponent"])({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:o}=Object(g["c"])(W()),{exportPPTX:n,exporting:c}=Wt(),a=Object(y["ref"])("all"),r=Object(y["ref"])([1,l.value.length]),i=Object(y["ref"])(!0),s=Object(y["computed"])(()=>"all"===a.value?l.value:"current"===a.value?[o.value]:l.value.filter((e,t)=>{const[l,o]=r.value;return t>=l-1&&t<=o-1}));return(e,o)=>{const d=Object(y["resolveComponent"])("RadioButton"),u=Object(y["resolveComponent"])("RadioGroup"),b=Object(y["resolveComponent"])("Slider"),p=Object(y["resolveComponent"])("Switch"),m=Object(y["resolveComponent"])("Button"),O=Object(y["resolveComponent"])("FullscreenSpin");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",kg,[Object(y["createElementVNode"])("div",Cg,[Object(y["createElementVNode"])("div",Ng,[Eg,Object(y["createVNode"])(u,{class:"config-item",value:a.value,"onUpdate:value":o[0]||(o[0]=e=>a.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{style:{width:"33.33%"},value:"all"},{default:Object(y["withCtx"])(()=>[wg]),_:1}),Object(y["createVNode"])(d,{style:{width:"33.33%"},value:"current"},{default:Object(y["withCtx"])(()=>[Vg]),_:1}),Object(y["createVNode"])(d,{style:{width:"33.33%"},value:"custom"},{default:Object(y["withCtx"])(()=>[Ig]),_:1})]),_:1},8,["value"])]),"custom"===a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Sg,[Object(y["createElementVNode"])("div",{class:"title","data-range":`${r.value[0]} ~ ${r.value[1]}`},"自定义范围:",8,Bg),Object(y["createVNode"])(b,{class:"config-item",range:"",min:1,max:Object(y["unref"])(l).length,step:1,value:r.value,"onUpdate:value":o[1]||(o[1]=e=>r.value=e)},null,8,["max","value"])])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",Lg,[_g,Object(y["createElementVNode"])("div",Tg,[Object(y["createVNode"])(p,{checked:i.value,"onUpdate:checked":o[2]||(o[2]=e=>i.value=e)},null,8,["checked"])])])]),Object(y["createElementVNode"])("div",Mg,[Object(y["createVNode"])(m,{class:"btn export",type:"primary",onClick:o[3]||(o[3]=e=>Object(y["unref"])(n)(Object(y["unref"])(s),i.value))},{default:Object(y["withCtx"])(()=>[Dg]),_:1}),Object(y["createVNode"])(m,{class:"btn close",onClick:o[4]||(o[4]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[zg]),_:1})]),Object(y["createVNode"])(O,{loading:Object(y["unref"])(c),tip:"正在导出..."},null,8,["loading"])])}}});l("fef8");const Fg=ol()(Ag,[["__scopeId","data-v-3fef9be0"]]);var $g=Fg;const Rg=e=>(Object(y["pushScopeId"])("data-v-e2b465d2"),e=e(),Object(y["popScopeId"])(),e),Pg={class:"export-pptist-dialog"},Hg={class:"configs"},qg={class:"row"},Ug=Rg(()=>Object(y["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),Gg=Object(y["createTextVNode"])("全部"),Xg=Object(y["createTextVNode"])("当前页"),Yg=Object(y["createTextVNode"])("自定义"),Zg={key:0,class:"row"},Wg=["data-range"],Jg=Rg(()=>Object(y["createElementVNode"])("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1)),Kg={class:"btns"},Qg=Object(y["createTextVNode"])("导出 .pptist 文件"),ex=Object(y["createTextVNode"])("关闭");var tx=Object(y["defineComponent"])({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:o}=Object(g["c"])(W()),{exportSpecificFile:n}=Wt(),c=Object(y["ref"])("all"),a=Object(y["ref"])([1,l.value.length]),r=Object(y["computed"])(()=>"all"===c.value?l.value:"current"===c.value?[o.value]:l.value.filter((e,t)=>{const[l,o]=a.value;return t>=l-1&&t<=o-1}));return(e,o)=>{const i=Object(y["resolveComponent"])("RadioButton"),s=Object(y["resolveComponent"])("RadioGroup"),d=Object(y["resolveComponent"])("Slider"),u=Object(y["resolveComponent"])("Button");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Pg,[Object(y["createElementVNode"])("div",Hg,[Object(y["createElementVNode"])("div",qg,[Ug,Object(y["createVNode"])(s,{class:"config-item",value:c.value,"onUpdate:value":o[0]||(o[0]=e=>c.value=e)},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{style:{width:"33.33%"},value:"all"},{default:Object(y["withCtx"])(()=>[Gg]),_:1}),Object(y["createVNode"])(i,{style:{width:"33.33%"},value:"current"},{default:Object(y["withCtx"])(()=>[Xg]),_:1}),Object(y["createVNode"])(i,{style:{width:"33.33%"},value:"custom"},{default:Object(y["withCtx"])(()=>[Yg]),_:1})]),_:1},8,["value"])]),"custom"===c.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Zg,[Object(y["createElementVNode"])("div",{class:"title","data-range":`${a.value[0]} ~ ${a.value[1]}`},"自定义范围:",8,Wg),Object(y["createVNode"])(d,{class:"config-item",range:"",min:1,max:Object(y["unref"])(l).length,step:1,value:a.value,"onUpdate:value":o[1]||(o[1]=e=>a.value=e)},null,8,["max","value"])])):Object(y["createCommentVNode"])("",!0),Jg]),Object(y["createElementVNode"])("div",Kg,[Object(y["createVNode"])(u,{class:"btn export",type:"primary",onClick:o[2]||(o[2]=e=>Object(y["unref"])(n)(Object(y["unref"])(r)))},{default:Object(y["withCtx"])(()=>[Qg]),_:1}),Object(y["createVNode"])(u,{class:"btn close",onClick:o[3]||(o[3]=e=>t("close"))},{default:Object(y["withCtx"])(()=>[ex]),_:1})])])}}});l("bf43");const lx=ol()(tx,[["__scopeId","data-v-e2b465d2"]]);var ox=lx;const nx={class:"export-dialog"},cx={class:"tabs"},ax=["onClick"],rx={class:"content"};var ix=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{dialogForExport:l}=Object(g["c"])(t),o=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],c=Object(y["computed"])(()=>{const e={image:Ry,json:Zy,pdf:gg,pptx:$g,pptist:ox};return e[l.value]||null});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",nx,[Object(y["createElementVNode"])("div",cx,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(n,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",{active:e.key===Object(y["unref"])(l)}]),key:e.key,onClick:t=>Object(y["unref"])(o)(e.key)},Object(y["toDisplayString"])(e.label),11,ax)),64))]),Object(y["createElementVNode"])("div",rx,[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(c)),{onClose:t[0]||(t[0]=e=>Object(y["unref"])(o)(""))},null,32))])]))}});l("d970");const sx=ol()(ix,[["__scopeId","data-v-1f8f1a8b"]]);var dx=sx;const ux={class:"pptist-editor"},bx={class:"layout-content"},px={class:"layout-content-center"};var mx=Object(y["defineComponent"])({__name:"index",setup(e){const t=Q(),{dialogForExport:l}=Object(g["c"])(t),o=()=>t.setDialogForExport(""),n=Object(y["ref"])(40);return bt(),pt(),(e,t)=>{const c=Object(y["resolveComponent"])("Modal");return Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,[Object(y["createElementVNode"])("div",ux,[Object(y["createVNode"])(Rl,{class:"layout-header"}),Object(y["createElementVNode"])("div",bx,[Object(y["createVNode"])(kb,{class:"layout-content-left"}),Object(y["createElementVNode"])("div",px,[Object(y["createVNode"])(rb,{class:"center-top"}),Object(y["createVNode"])(ud,{class:"center-body",style:Object(y["normalizeStyle"])({height:`calc(100% - ${n.value+40}px)`})},null,8,["style"]),Object(y["createVNode"])(Oy,{class:"center-bottom",height:n.value,"onUpdate:height":t[0]||(t[0]=e=>n.value=e),style:Object(y["normalizeStyle"])({height:n.value+"px"})},null,8,["height","style"])]),Object(y["createVNode"])(dy,{class:"layout-content-right"})])]),Object(y["createVNode"])(c,{visible:!!Object(y["unref"])(l),footer:null,centered:"",closable:!1,width:680,destroyOnClose:"",onCancel:t[1]||(t[1]=e=>o())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(dx)]),_:1},8,["visible"])],64)}}});l("0be5");const Ox=ol()(mx,[["__scopeId","data-v-328e1a4e"]]);var fx=Ox,jx=()=>{const e=W(),{slides:t,slideIndex:l,formatedAnimations:o}=Object(g["c"])(e),n=Object(y["ref"])(0),c=Object(y["ref"])(!1),a=Object(y["ref"])(l.value),r=()=>{if(c.value)return;const{animations:e,autoNext:t}=o.value[n.value];n.value+=1,c.value=!0;let l=0;for(const o of e){const n=document.querySelector(`#screen-element-${o.elId} [class^=base-element-]`);if(!n){l+=1;continue}const a=`${Qj}${o.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(Qj)&&n.classList.remove(e,Qj+"animated");n.style.setProperty("--animate-duration",o.duration+"ms"),n.classList.add(a,Qj+"animated");const i=()=>{"out"!==o.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(a,Qj+"animated")),l+=1,l===e.length&&(c.value=!1,t&&r())};n.addEventListener("animationend",i,{once:!0})}},i=()=>{n.value-=1;const{animations:e}=o.value[n.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(Qj)&&e.classList.remove(t,Qj+"animated")}}e.every(e=>"attention"===e.type)&&b()},s=Object(y["ref"])(0),d=()=>{s.value&&(clearInterval(s.value),s.value=0)};Object(y["onUnmounted"])(d);const u=Object(G["throttle"])((function(e){he["a"].success(e)}),1e3,{leading:!0,trailing:!1}),b=()=>{o.value.length&&n.value>0?i():l.value>0?(e.updateSlideIndex(l.value-1),l.value<a.value?(n.value=0,a.value=l.value):n.value=o.value.length):u("已经是第一页了"),c.value=!1},p=()=>{o.value.length&&n.value<o.value.length?r():l.value<t.value.length-1?(e.updateSlideIndex(l.value+1),n.value=0,c.value=!1):(u("已经是最后一页了"),d(),c.value=!1)},m=()=>{d(),he["a"].success("开始自动放映"),s.value=setInterval(p,2500)},O=Object(G["throttle"])((function(e){e.deltaY<0?b():e.deltaY>0&&p()}),500,{leading:!0,trailing:!1}),f=Object(y["ref"])(null),j=e=>{f.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},v=e=>{if(!f.value)return;const t=Math.abs(f.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-f.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(f.value=null,l>0?b():p())},h=e=>{const t=e.key.toUpperCase();t===je.UP||t===je.LEFT||t===je.PAGEUP?b():t!==je.DOWN&&t!==je.RIGHT&&t!==je.SPACE&&t!==je.ENTER&&t!==je.PAGEDOWN||p()};Object(y["onMounted"])(()=>document.addEventListener("keydown",h)),Object(y["onUnmounted"])(()=>document.removeEventListener("keydown",h));const x=()=>{e.updateSlideIndex(l.value-1),n.value=0},k=()=>{e.updateSlideIndex(l.value+1),n.value=0},C=t=>{e.updateSlideIndex(t),n.value=0},N=l=>{const o=t.value.findIndex(e=>e.id===l);-1!==o&&(e.updateSlideIndex(o),n.value=0)};return{autoPlayTimer:s,autoPlay:m,closeAutoPlay:d,mousewheelListener:O,touchStartListener:j,touchEndListener:v,turnPrevSlide:x,turnNextSlide:k,turnSlideToIndex:C,turnSlideToId:N,execPrev:b,execNext:p,animationIndex:n}},vx=e=>{const t=W(),{viewportRatio:l}=Object(g["c"])(t),o=Object(y["ref"])(0),n=Object(y["ref"])(0),c=()=>{const t=(null===e||void 0===e?void 0:e.value)||document.body,c=t.clientWidth,a=t.clientHeight;let r,i;a/c===l.value?(r=c,i=a):a/c>l.value?(r=c,i=c*l.value):(r=a/l.value,i=a),o.value=r,n.value=i};return Object(y["onMounted"])(()=>{c(),window.addEventListener("resize",c)}),Object(y["onUnmounted"])(()=>{window.removeEventListener("resize",c)}),{slideWidth:o,slideHeight:n}},hx=()=>{const e=Object(y["ref"])(!0),t=Object(y["ref"])(!0),{exitScreening:l}=dt(),o=()=>{e.value=st(),!e.value&&t.value&&l(),t.value=!0};Object(y["onMounted"])(()=>{e.value=st(),document.addEventListener("fullscreenchange",o),document.addEventListener("webkitfullscreenchange",o)}),Object(y["onUnmounted"])(()=>{document.removeEventListener("fullscreenchange",o),document.removeEventListener("webkitfullscreenchange",o)});const n=()=>{e.value&&(t.value=!1,it())};return{fullscreenState:e,manualExitFullscreen:n}},yx=Object(y["defineComponent"])({__name:"ScreenChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createBlock"])(js,{class:"screen-element-chart",elementInfo:e.elementInfo},null,8,["elementInfo"]))}});const gx=yx;var xx=gx;const kx={class:"element-content"};var Cx=Object(y["defineComponent"])({__name:"ScreenVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const{currentSlide:t}=Object(g["c"])(W()),l=Object(y["inject"])(Pl)||Object(y["ref"])(1),o=Object(y["inject"])(Hl)||Object(y["ref"])(""),n=Object(y["computed"])(()=>t.value.id===o.value);return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"screen-element-video",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",kx,[Object(y["unref"])(n)?(Object(y["openBlock"])(),Object(y["createBlock"])(Ra,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:Object(y["unref"])(l)},null,8,["width","height","src","poster","scale"])):Object(y["createCommentVNode"])("",!0)])],4)],4))}});l("7a78");const Nx=ol()(Cx,[["__scopeId","data-v-76457308"]]);var Ex=Nx;const wx={class:"element-content"};var Vx=Object(y["defineComponent"])({__name:"ScreenAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{viewportRatio:l,currentSlide:o}=Object(g["c"])(W()),n=Object(y["inject"])(Pl)||Object(y["ref"])(1),c=Object(y["inject"])(Hl)||Object(y["ref"])(""),a=Object(y["computed"])(()=>o.value.id===c.value),r=Object(y["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),i=Object(y["computed"])(()=>{const e=He,o=He*l.value,c=280/n.value,a=50/n.value,r=t.elementInfo.width,i=t.elementInfo.height,s=t.elementInfo.left,d=t.elementInfo.top;let u=0,b=i;return s+c>=e&&(u=r-c),d+i+a>=o&&(b=-a),{left:u+"px",top:b+"px"}}),s=Object(y["ref"])(),d=()=>{s.value&&s.value.toggle()};return(t,l)=>{const o=Object(y["resolveComponent"])("IconVolumeNotice");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"screen-element-audio",style:Object(y["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(y["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(y["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(y["createElementVNode"])("div",wx,[Object(y["createVNode"])(o,{class:"audio-icon",style:Object(y["normalizeStyle"])({fontSize:Object(y["unref"])(r),color:e.elementInfo.color}),onClick:l[0]||(l[0]=e=>d())},null,8,["style"]),Object(y["unref"])(a)?(Object(y["openBlock"])(),Object(y["createBlock"])(sr,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:s,style:Object(y["normalizeStyle"])({...Object(y["unref"])(i)}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:Object(y["unref"])(n)},null,8,["style","src","loop","autoplay","scale"])):Object(y["createCommentVNode"])("",!0)])],4)],4)}}});l("3010");const Ix=ol()(Vx,[["__scopeId","data-v-1172b8ee"]]);var Sx=Ix;const Bx=["id","title"];var Lx=Object(y["defineComponent"])({__name:"ScreenElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e={[Ue.IMAGE]:Ji,[Ue.TEXT]:ts,[Ue.SHAPE]:ss,[Ue.LINE]:ms,[Ue.CHART]:xx,[Ue.TABLE]:ws,[Ue.LATEX]:Ts,[Ue.VIDEO]:Ex,[Ue.AUDIO]:Sx};return e[t.elementInfo.type]||null}),{formatedAnimations:o,theme:n}=Object(g["c"])(W()),c=Object(y["computed"])(()=>{const e=o.value.findIndex(e=>{const l=e.animations.map(e=>e.elId);return l.includes(t.elementInfo.id)});if(-1===e)return!1;if(e<t.animationIndex)return!1;const l=o.value[e].animations.find(e=>e.elId===t.elementInfo.id);return"in"===(null===l||void 0===l?void 0:l.type)}),a=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(t,o)=>{var r;return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["screen-element",{link:e.elementInfo.link}]),id:"screen-element-"+e.elementInfo.id,style:Object(y["normalizeStyle"])({zIndex:e.elementIndex,color:Object(y["unref"])(n).fontColor,fontFamily:Object(y["unref"])(n).fontName,visibility:Object(y["unref"])(c)?"hidden":"visible"}),title:(null===(r=e.elementInfo.link)||void 0===r?void 0:r.target)||"",onClick:o[0]||(o[0]=e=>a())},[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(l)),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,Bx)}}});l("d2ee");const _x=ol()(Lx,[["__scopeId","data-v-a15cc1d8"]]);var Tx=_x,Mx=Object(y["defineComponent"])({__name:"ScreenSlide",props:{slide:{type:Object,required:!0},scale:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{viewportRatio:l}=Object(g["c"])(W()),o=Object(y["computed"])(()=>t.slide.background),{backgroundStyle:n}=Nr(o),c=Object(y["computed"])(()=>t.slide.id);return Object(y["provide"])(Hl,c),(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"screen-slide",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(He)+"px",height:Object(y["unref"])(He)*Object(y["unref"])(l)+"px",transform:`scale(${e.scale})`})},[Object(y["createElementVNode"])("div",{class:"background",style:Object(y["normalizeStyle"])({...Object(y["unref"])(n)})},null,4),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.slide.elements,(t,l)=>(Object(y["openBlock"])(),Object(y["createBlock"])(Tx,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"]))),128))],4))}});l("a060");const Dx=ol()(Mx,[["__scopeId","data-v-7cf7f9e7"]]);var zx=Dx;const Ax={class:"screen-slide-list"};var Fx=Object(y["defineComponent"])({__name:"ScreenSlideList",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:o,currentSlide:n}=Object(g["c"])(W()),c=Object(y["computed"])(()=>t.slideWidth/He);return Object(y["provide"])(Pl,c),(t,a)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Ax,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),(t,l)=>{var a;return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["slide-item","turning-mode-"+(t.turningMode||"slideY"),{current:l===Object(y["unref"])(o),before:l<Object(y["unref"])(o),after:l>Object(y["unref"])(o),hide:(l===Object(y["unref"])(o)-1||l===Object(y["unref"])(o)+1)&&t.turningMode!==Object(y["unref"])(n).turningMode}]),key:t.id},[Math.abs(Object(y["unref"])(o)-l)<2||null!==(a=t.animations)&&void 0!==a&&a.length?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"slide-content",style:Object(y["normalizeStyle"])({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[Object(y["createVNode"])(zx,{slide:t,scale:Object(y["unref"])(c),animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):Object(y["createCommentVNode"])("",!0)],2)}),128))]))}});l("9557");const $x=ol()(Fx,[["__scopeId","data-v-77a3e620"]]);var Rx=$x;const Px={class:"slide-thumbnails"},Hx={class:"return-button"},qx={class:"slide-thumbnails-content"},Ux=["onClick"];var Gx=Object(y["defineComponent"])({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function,required:!0}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:o,slideIndex:n}=Object(g["c"])(W()),{slidesLoadLimit:c}=ib(),a=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const r=Object(y["resolveComponent"])("IconArrowCircleLeft");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Px,[Object(y["createElementVNode"])("div",Hx,[Object(y["createVNode"])(r,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),Object(y["createElementVNode"])("div",qx,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(o),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["thumbnail",{active:t===Object(y["unref"])(n)}]),key:e.id,onClick:e=>a(t)},[Object(y["createVNode"])(Ys,{slide:e,size:150,visible:t<Object(y["unref"])(c)},null,8,["slide","visible"])],10,Ux))),128))])])}}});l("2803");const Xx=ol()(Gx,[["__scopeId","data-v-b7c6c0cc"]]);var Yx=Xx;const Zx={key:0,class:"blackboard"};var Wx=Object(y["defineComponent"])({__name:"WritingBoard",props:{color:{type:String,default:"#ffcc00"},model:{type:String,default:"pen"},blackboard:{type:Boolean,default:!1}},setup(e,{expose:t}){const l=e;let o=null;const n=Object(y["ref"])(),c=Object(y["ref"])(),a=Object(y["ref"])(6),r=Object(y["ref"])(80),i=Object(y["ref"])(24);let s={x:0,y:0},d=!1,u=0,b=-1;const p=Object(y["ref"])({x:0,y:0}),m=Object(y["ref"])(!1),O=Object(y["ref"])(0),f=Object(y["ref"])(0),j=Object(y["computed"])(()=>c.value?O.value/c.value.width:1),v=Object(y["computed"])(()=>c.value?f.value/c.value.height:1),h=()=>{n.value&&(O.value=n.value.clientWidth,f.value=n.value.clientHeight)},g=new ResizeObserver(h);Object(y["onMounted"])(()=>{n.value&&g.observe(n.value)}),Object(y["onUnmounted"])(()=>{n.value&&g.unobserve(n.value)});const x=()=>{c.value&&n.value&&(o=c.value.getContext("2d"),o&&(c.value.width=n.value.clientWidth,c.value.height=n.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};Object(y["onMounted"])(x);const k=()=>{o&&("mark"===l.model?(o.globalCompositeOperation="xor",o.globalAlpha=.5):"pen"===l.model&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};Object(y["watch"])(()=>l.model,k);const C=(e,t,n)=>{if(!o)return;const c=s.x,a=s.y;o.lineWidth=n,o.strokeStyle=l.color,o.beginPath(),o.moveTo(c,a),o.lineTo(e,t),o.stroke(),o.closePath()},N=(e,t)=>{if(!o||!c.value)return;const l=s.x,n=s.y,a=r.value/2,i=a*Math.sin(Math.atan((t-n)/(e-l))),d=a*Math.cos(Math.atan((t-n)/(e-l))),u=[l+i,n-d],b=[l-i,n+d],p=[e+i,t-d],m=[e-i,t+d];o.save(),o.beginPath(),o.arc(e,t,a,0,2*Math.PI),o.clip(),o.clearRect(0,0,c.value.width,c.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...u),o.lineTo(...p),o.lineTo(...m),o.lineTo(...b),o.closePath(),o.clip(),o.clearRect(0,0,c.value.width,c.value.height),o.restore()},E=(e,t)=>{const l=s.x,o=s.y;return Math.sqrt((e-l)*(e-l)+(t-o)*(t-o))},w=(e,t)=>{const l=10,o=.1,n=a.value,c=3,r=e/t;let i;return i=r<=o?n:r>=l?c:n-r/l*n,-1===b?i:1*i/3+2*b/3},V=(e,t)=>{const o=(new Date).getTime();if("pen"===l.model){const l=E(e,t),n=o-u,c=w(l,n);C(e,t,c),b=c}else"mark"===l.model?C(e,t,i.value):N(e,t);s={x:e,y:t},u=(new Date).getTime()},I=e=>{if(!c.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=c.value.getBoundingClientRect(),o=t.pageX-l.x,n=t.pageY-l.y;return[o,n]},S=e=>{const[t,l]=I(e),o=t/j.value,n=l/v.value;d=!0,s={x:o,y:n},u=(new Date).getTime(),e instanceof MouseEvent||(p.value={x:t,y:l},m.value=!0)},B=e=>{const[t,l]=I(e),o=t/j.value,n=l/v.value;p.value={x:t,y:l},d&&V(o,n)},L=()=>{d&&(d=!1)},_=()=>{o&&c.value&&o.clearRect(0,0,c.value.width,c.value.height)},T=()=>{var e;return null===(e=c.value)||void 0===e?void 0:e.toDataURL()},M=e=>{const t=new Image;t.src=e,t.onload=()=>{o&&o.drawImage(t,0,0)}},D=Object(G["throttle"])((function(e){"eraser"===l.model&&(e.deltaY<0&&r.value<200?r.value+=20:e.deltaY>0&&r.value>20&&(r.value-=20)),"pen"===l.model&&(e.deltaY<0&&a.value<10?a.value+=2:e.deltaY>0&&a.value>4&&(a.value-=2)),"mark"===l.model&&(e.deltaY<0&&i.value<40?i.value+=4:e.deltaY>0&&i.value>16&&(i.value-=4))}),300,{leading:!0,trailing:!1});return t({clearCanvas:_,getImageDataURL:T,setImageDataURL:M}),(t,l)=>{const o=Object(y["resolveComponent"])("IconWrite"),s=Object(y["resolveComponent"])("IconHighLight");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"writing-board",ref_key:"writingBoardRef",ref:n},[e.blackboard?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Zx)):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("canvas",{class:"canvas",ref_key:"canvasRef",ref:c,style:Object(y["normalizeStyle"])({width:O.value+"px",height:f.value+"px"}),onMousedown:l[0]||(l[0]=e=>S(e)),onMousemove:l[1]||(l[1]=e=>B(e)),onMouseup:l[2]||(l[2]=e=>L()),onTouchstart:l[3]||(l[3]=e=>S(e)),onTouchmove:l[4]||(l[4]=e=>B(e)),onTouchend:l[5]||(l[5]=e=>{L(),m.value=!1}),onMouseleave:l[6]||(l[6]=e=>{L(),m.value=!1}),onMouseenter:l[7]||(l[7]=e=>m.value=!0),onWheel:l[8]||(l[8]=e=>Object(y["unref"])(D)(e))},null,36),m.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:1},["eraser"===e.model?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"eraser",style:Object(y["normalizeStyle"])({left:p.value.x-r.value/2+"px",top:p.value.y-r.value/2+"px",width:r.value+"px",height:r.value+"px"})},null,4)):Object(y["createCommentVNode"])("",!0),"pen"===e.model?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:1,class:"pen",style:Object(y["normalizeStyle"])({left:p.value.x-a.value/2+"px",top:p.value.y-6*a.value+a.value/2+"px",color:e.color})},["pen"===e.model?(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:0,class:"icon",size:6*a.value},null,8,["size"])):Object(y["createCommentVNode"])("",!0)],4)):Object(y["createCommentVNode"])("",!0),"mark"===e.model?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:2,class:"pen",style:Object(y["normalizeStyle"])({left:p.value.x-i.value/2+"px",top:p.value.y+"px",color:e.color})},["mark"===e.model?(Object(y["openBlock"])(),Object(y["createBlock"])(s,{key:0,class:"icon",size:1.5*i.value},null,8,["size"])):Object(y["createCommentVNode"])("",!0)],4)):Object(y["createCommentVNode"])("",!0)],64)):Object(y["createCommentVNode"])("",!0)],512)}}});l("5fa4");const Jx=ol()(Wx,[["__scopeId","data-v-1d4eb7f0"]]);var Kx=Jx;const Qx={class:"writing-board-tool"},ek={class:"colors"},tk=["onClick"];var lk=Object(y["defineComponent"])({__name:"WritingBoardTool",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},position:{type:Object,default:()=>({right:"5px",bottom:"5px"})}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],o=Object(y["ref"])(),n=Object(y["ref"])("#e2534d"),c=Object(y["ref"])("pen"),a=Object(y["ref"])(!1),r=e=>{c.value=e},i=()=>{o.value.clearCanvas()},s=e=>{"eraser"===c.value&&(c.value="pen"),n.value=e},d=()=>{t("close")};return(t,u)=>{const b=Object(y["resolveComponent"])("IconWrite"),p=Object(y["resolveComponent"])("Tooltip"),m=Object(y["resolveComponent"])("IconHighLight"),O=Object(y["resolveComponent"])("IconErase"),f=Object(y["resolveComponent"])("IconClear"),j=Object(y["resolveComponent"])("IconFill"),v=Object(y["resolveComponent"])("IconClose");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Qx,[Object(y["createElementVNode"])("div",{class:"writing-board-wrap",style:Object(y["normalizeStyle"])({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[Object(y["createVNode"])(Kx,{ref_key:"writingBoardRef",ref:o,color:n.value,blackboard:a.value,model:c.value},null,8,["color","blackboard","model"])],4),Object(y["createElementVNode"])("div",{class:"tools",style:Object(y["normalizeStyle"])(e.position)},[Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["btn",{active:"pen"===c.value}]),onClick:u[0]||(u[0]=e=>r("pen"))},[Object(y["createVNode"])(b,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"荧光笔"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["btn",{active:"mark"===c.value}]),onClick:u[1]||(u[1]=e=>r("mark"))},[Object(y["createVNode"])(m,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"橡皮擦"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["btn",{active:"eraser"===c.value}]),onClick:u[2]||(u[2]=e=>r("eraser"))},[Object(y["createVNode"])(O,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"清除墨迹"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:"btn",onClick:u[3]||(u[3]=e=>i())},[Object(y["createVNode"])(f,{class:"icon"})])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"黑板"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["btn",{active:a.value}]),onClick:u[4]||(u[4]=e=>a.value=!a.value)},[Object(y["createVNode"])(j,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"]),Object(y["createElementVNode"])("div",ek,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(l,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["color",{active:e===n.value}]),key:e,style:Object(y["normalizeStyle"])({backgroundColor:e}),onClick:t=>s(e)},null,14,tk)),64))]),Object(y["createVNode"])(p,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"关闭画笔"},{default:Object(y["withCtx"])(()=>[Object(y["createElementVNode"])("div",{class:"btn",onClick:u[5]||(u[5]=e=>d())},[Object(y["createVNode"])(v,{class:"icon"})])]),_:1},8,["mouseEnterDelay"])],4)])}}});l("4f60");const ok=ol()(lk,[["__scopeId","data-v-876081a6"]]);var nk=ok;const ck={class:"tools-left"},ak={class:"content"};var rk=Object(y["defineComponent"])({__name:"BaseView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:o}=Object(g["c"])(W()),{autoPlayTimer:n,autoPlay:c,closeAutoPlay:a,mousewheelListener:r,touchStartListener:i,touchEndListener:s,turnPrevSlide:d,turnNextSlide:u,turnSlideToIndex:b,turnSlideToId:p,execPrev:m,execNext:O,animationIndex:f}=jx(),{slideWidth:j,slideHeight:v}=vx(),{exitScreening:h}=dt(),{fullscreenState:x,manualExitFullscreen:k}=hx(),C=Object(y["ref"])(!1),N=Object(y["ref"])(!1),E=Object(y["ref"])(!1),w=Object(y["ref"])(!1),V=()=>[{text:"上一页",subText:"↑ ←",disable:o.value<=0,handler:()=>d()},{text:"下一页",subText:"↓ →",disable:o.value>=l.value.length-1,handler:()=>u()},{text:"第一页",disable:0===o.value,handler:()=>b(0)},{text:"最后一页",disable:o.value===l.value.length-1,handler:()=>b(l.value.length-1)},{divider:!0},{text:"显示工具栏",handler:()=>C.value=!0},{text:"查看所有幻灯片",handler:()=>E.value=!0},{text:"画笔工具",handler:()=>N.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?a:c},{text:"结束放映",subText:"ESC",handler:h}];return(t,n)=>{const c=Object(y["resolveComponent"])("IconLeftTwo"),a=Object(y["resolveComponent"])("IconRightTwo"),d=Object(y["resolveComponent"])("IconWrite"),u=Object(y["resolveComponent"])("Tooltip"),g=Object(y["resolveComponent"])("IconMagic"),I=Object(y["resolveComponent"])("IconListView"),S=Object(y["resolveComponent"])("IconOffScreenOne"),B=Object(y["resolveComponent"])("IconFullScreenOne"),L=Object(y["resolveComponent"])("IconPower"),_=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["base-view",{"laser-pen":w.value}])},[Object(y["withDirectives"])(Object(y["createVNode"])(Rx,{slideWidth:Object(y["unref"])(j),slideHeight:Object(y["unref"])(v),animationIndex:Object(y["unref"])(f),turnSlideToId:Object(y["unref"])(p),manualExitFullscreen:Object(y["unref"])(k),onWheel:n[0]||(n[0]=e=>Object(y["unref"])(r)(e)),onTouchstart:n[1]||(n[1]=e=>Object(y["unref"])(i)(e)),onTouchend:n[2]||(n[2]=e=>Object(y["unref"])(s)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[_,V]]),E.value?(Object(y["openBlock"])(),Object(y["createBlock"])(Yx,{key:0,turnSlideToIndex:Object(y["unref"])(b),onClose:n[3]||(n[3]=e=>E.value=!1)},null,8,["turnSlideToIndex"])):Object(y["createCommentVNode"])("",!0),N.value?(Object(y["openBlock"])(),Object(y["createBlock"])(nk,{key:1,slideWidth:Object(y["unref"])(j),slideHeight:Object(y["unref"])(v),onClose:n[4]||(n[4]=e=>N.value=!1)},null,8,["slideWidth","slideHeight"])):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",ck,[Object(y["createVNode"])(c,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:n[5]||(n[5]=e=>Object(y["unref"])(m)())}),Object(y["createVNode"])(a,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:n[6]||(n[6]=e=>Object(y["unref"])(O)())})]),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tools-right",{visible:C.value}]),onMouseleave:n[14]||(n[14]=e=>C.value=!1),onMouseenter:n[15]||(n[15]=e=>C.value=!0)},[Object(y["createElementVNode"])("div",ak,[Object(y["createElementVNode"])("div",{class:"tool-btn page-number",onClick:n[7]||(n[7]=e=>E.value=!0)},"幻灯片 "+Object(y["toDisplayString"])(Object(y["unref"])(o)+1)+" / "+Object(y["toDisplayString"])(Object(y["unref"])(l).length),1),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔工具"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(d,{class:"tool-btn",onClick:n[8]||(n[8]=e=>N.value=!0)})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"激光笔"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g,{class:Object(y["normalizeClass"])(["tool-btn",{active:w.value}]),onClick:n[9]||(n[9]=e=>w.value=!w.value)},null,8,["class"])]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"演讲者视图"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(I,{class:"tool-btn",onClick:n[10]||(n[10]=t=>e.changeViewMode("presenter"))})]),_:1},8,["mouseEnterDelay"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:Object(y["unref"])(x)?"退出全屏":"进入全屏"},{default:Object(y["withCtx"])(()=>[Object(y["unref"])(x)?(Object(y["openBlock"])(),Object(y["createBlock"])(S,{key:0,class:"tool-btn",onClick:n[11]||(n[11]=e=>Object(y["unref"])(k)())})):(Object(y["openBlock"])(),Object(y["createBlock"])(B,{key:1,class:"tool-btn",onClick:n[12]||(n[12]=e=>Object(y["unref"])(rt)())}))]),_:1},8,["mouseEnterDelay","title"]),Object(y["createVNode"])(u,{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"结束放映"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(L,{class:"tool-btn",onClick:n[13]||(n[13]=e=>Object(y["unref"])(h)())})]),_:1},8,["mouseEnterDelay"])])],34)],2)}}});l("4a2e");const ik=ol()(rk,[["__scopeId","data-v-d72d6626"]]);var sk=ik;const dk=e=>(Object(y["pushScopeId"])("data-v-5fba3eec"),e=e(),Object(y["popScopeId"])(),e),uk={class:"presenter-view"},bk={class:"toolbar"},pk=dk(()=>Object(y["createElementVNode"])("span",null,"普通视图",-1)),mk=dk(()=>Object(y["createElementVNode"])("span",null,"画笔",-1)),Ok=dk(()=>Object(y["createElementVNode"])("span",null,"激光笔",-1)),fk=dk(()=>Object(y["createElementVNode"])("span",null,"结束放映",-1)),jk={class:"content"},vk=["onClick"],hk={class:"remark"},yk={class:"header"},gk=dk(()=>Object(y["createElementVNode"])("span",null,"演讲者备注",-1)),xk=["innerHTML"],kk={class:"remark-scale"};var Ck=Object(y["defineComponent"])({__name:"PresenterView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:o,viewportRatio:n,currentSlide:c}=Object(g["c"])(W()),a=Object(y["ref"])(),r=Object(y["ref"])(),i=Object(y["ref"])(!1),s=Object(y["ref"])(!1),{mousewheelListener:d,touchStartListener:u,touchEndListener:b,turnPrevSlide:p,turnNextSlide:m,turnSlideToIndex:O,turnSlideToId:f,animationIndex:j}=jx(),{slideWidth:v,slideHeight:h}=vx(a),{exitScreening:x}=dt(),{slidesLoadLimit:k}=ib(),{fullscreenState:C,manualExitFullscreen:N}=hx(),E=Object(y["ref"])(16),w=Object(y["computed"])(()=>$e(c.value.remark||"无备注")),V=e=>{r.value&&r.value.scrollBy(e.deltaY,0)},I=e=>{e<12||e>40||(E.value=e)};Object(y["watch"])(o,()=>{Object(y["nextTick"])(()=>{if(!r.value)return;const e=r.value.querySelector(".thumbnail.active");if(!e)return;const t=r.value.offsetWidth,l=e.offsetLeft;r.value.scrollTo({left:l-t/2,behavior:"smooth"})})});const S=()=>[{text:"上一页",subText:"↑ ←",disable:o.value<=0,handler:()=>p()},{text:"下一页",subText:"↓ →",disable:o.value>=l.value.length-1,handler:()=>m()},{text:"第一页",disable:0===o.value,handler:()=>O(0)},{text:"最后一页",disable:o.value===l.value.length-1,handler:()=>O(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>i.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:x}];return(t,c)=>{const p=Object(y["resolveComponent"])("IconListView"),m=Object(y["resolveComponent"])("IconWrite"),g=Object(y["resolveComponent"])("IconMagic"),B=Object(y["resolveComponent"])("IconOffScreenOne"),L=Object(y["resolveComponent"])("Divider"),_=Object(y["resolveComponent"])("IconPower"),T=Object(y["resolveComponent"])("IconMinus"),M=Object(y["resolveComponent"])("IconPlus"),D=Object(y["resolveDirective"])("contextmenu");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",uk,[Object(y["createElementVNode"])("div",bk,[Object(y["createElementVNode"])("div",{class:"tool-btn",onClick:c[0]||(c[0]=t=>e.changeViewMode("base"))},[Object(y["createVNode"])(p,{class:"tool-icon"}),pk]),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tool-btn",{active:i.value}]),onClick:c[1]||(c[1]=e=>i.value=!i.value)},[Object(y["createVNode"])(m,{class:"tool-icon"}),mk],2),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tool-btn",{active:s.value}]),onClick:c[2]||(c[2]=e=>s.value=!s.value)},[Object(y["createVNode"])(g,{class:"tool-icon"}),Ok],2),Object(y["createElementVNode"])("div",{class:"tool-btn",onClick:c[3]||(c[3]=()=>Object(y["unref"])(C)?Object(y["unref"])(N)():Object(y["unref"])(rt)())},[Object(y["unref"])(C)?(Object(y["openBlock"])(),Object(y["createBlock"])(B,{key:0,class:"tool-icon"})):(Object(y["openBlock"])(),Object(y["createBlock"])(B,{key:1,class:"tool-icon"})),Object(y["createElementVNode"])("span",null,Object(y["toDisplayString"])(Object(y["unref"])(C)?"退出全屏":"全屏"),1)]),Object(y["createVNode"])(L,{class:"divider"}),Object(y["createElementVNode"])("div",{class:"tool-btn",onClick:c[4]||(c[4]=e=>Object(y["unref"])(x)())},[Object(y["createVNode"])(_,{class:"tool-icon"}),fk])]),Object(y["createElementVNode"])("div",jk,[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["slide-list-wrap",{"laser-pen":s.value}]),ref_key:"slideListWrapRef",ref:a},[Object(y["withDirectives"])(Object(y["createVNode"])(Rx,{slideWidth:Object(y["unref"])(v),slideHeight:Object(y["unref"])(h),animationIndex:Object(y["unref"])(j),turnSlideToId:Object(y["unref"])(f),manualExitFullscreen:Object(y["unref"])(N),onWheel:c[5]||(c[5]=e=>Object(y["unref"])(d)(e)),onTouchstart:c[6]||(c[6]=e=>Object(y["unref"])(u)(e)),onTouchend:c[7]||(c[7]=e=>Object(y["unref"])(b)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[D,S]]),i.value?(Object(y["openBlock"])(),Object(y["createBlock"])(nk,{key:0,slideWidth:Object(y["unref"])(v),slideHeight:Object(y["unref"])(h),position:{left:"75px",top:"5px"},onClose:c[8]||(c[8]=e=>i.value=!1)},null,8,["slideWidth","slideHeight"])):Object(y["createCommentVNode"])("",!0)],2),Object(y["createElementVNode"])("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:r,onWheel:c[9]||(c[9]=Object(y["withModifiers"])(e=>V(e),["prevent"]))},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["thumbnail",{active:t===Object(y["unref"])(o)}]),key:e.id,onClick:e=>Object(y["unref"])(O)(t)},[Object(y["createVNode"])(Ys,{slide:e,size:120/Object(y["unref"])(n),visible:t<Object(y["unref"])(k)},null,8,["slide","size","visible"])],10,vk))),128))],544)]),Object(y["createElementVNode"])("div",hk,[Object(y["createElementVNode"])("div",yk,[gk,Object(y["createElementVNode"])("span",null,"P "+Object(y["toDisplayString"])(Object(y["unref"])(o)+1)+" / "+Object(y["toDisplayString"])(Object(y["unref"])(l).length),1)]),Object(y["createElementVNode"])("div",{class:"remark-content",style:Object(y["normalizeStyle"])({fontSize:E.value+"px"}),innerHTML:Object(y["unref"])(w)},null,12,xk),Object(y["createElementVNode"])("div",kk,[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["scale-btn",{disable:12===E.value}]),onClick:c[10]||(c[10]=e=>I(E.value-2))},[Object(y["createVNode"])(T)],2),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["scale-btn",{disable:40===E.value}]),onClick:c[11]||(c[11]=e=>I(E.value+2))},[Object(y["createVNode"])(M)],2)])])])}}});l("7a60");const Nk=ol()(Ck,[["__scopeId","data-v-5fba3eec"]]);var Ek=Nk;const wk={class:"pptist-screen"};var Vk=Object(y["defineComponent"])({__name:"index",setup(e){const t=Object(y["ref"])("base"),l=e=>{t.value=e},{exitScreening:o}=dt(),n=e=>{const t=e.key.toUpperCase();t===je.ESC&&o()};return Object(y["onMounted"])(()=>document.addEventListener("keydown",n)),Object(y["onUnmounted"])(()=>document.removeEventListener("keydown",n)),(e,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",wk,["base"===t.value?(Object(y["openBlock"])(),Object(y["createBlock"])(sk,{key:0,changeViewMode:l})):"presenter"===t.value?(Object(y["openBlock"])(),Object(y["createBlock"])(Ek,{key:1,changeViewMode:l})):Object(y["createCommentVNode"])("",!0)]))}});l("4764");const Ik=ol()(Vk,[["__scopeId","data-v-6bf3d190"]]);var Sk=Ik,Bk=Object(y["defineComponent"])({__name:"MobileEditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},selectElement:{type:Function,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e={[Ue.IMAGE]:Wo,[Ue.TEXT]:rc,[Ue.SHAPE]:kc,[Ue.LINE]:Tc,[Ue.CHART]:Rc,[Ue.TABLE]:ra,[Ue.LATEX]:pa,[Ue.VIDEO]:qa,[Ue.AUDIO]:br};return e[t.elementInfo.type]||null});return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"mobile-editable-element",style:Object(y["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement","contextmenus"]))],4))}});const Lk=Bk;var _k=Lk,Tk=Object(y["defineComponent"])({__name:"MobileOperate",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},canvasScale:{type:Number,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),o=Object(y["computed"])(()=>t.elementInfo.width*t.canvasScale),n=Object(y["computed"])(()=>t.elementInfo.height*t.canvasScale),{borderLines:c,resizeHandlers:a,textElementResizeHandlers:r}=Rr(o,n),i="text"===t.elementInfo.type||"table"===t.elementInfo.type?r:a;return(t,o)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"mobile-operate",style:Object(y["normalizeStyle"])({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${Object(y["unref"])(l)}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(c),e=>(Object(y["openBlock"])(),Object(y["createBlock"])(Xr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(y["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(i),t=>(Object(y["openBlock"])(),Object(y["createBlock"])(qr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(y["normalizeStyle"])(t.style),onTouchstart:Object(y["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onTouchstart"]))),128))],64)):Object(y["createCommentVNode"])("",!0)],4))}});l("dd03");const Mk=ol()(Tk,[["__scopeId","data-v-7fdc6c04"]]);var Dk=Mk;const zk={class:"mobile-thumbnails"},Ak=["onClick"],Fk={class:"label"};var $k=Object(y["defineComponent"])({__name:"MobileThumbnails",setup(e){const t=W(),{slides:l,slideIndex:o}=Object(g["c"])(t),{sortSlides:n}=Qe(),{slidesLoadLimit:c}=ib(),a=e=>{t.updateSlideIndex(e)},r=e=>{const{newIndex:t,oldIndex:l}=e;n(t,l)};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",zk,[Object(y["createVNode"])(Object(y["unref"])(db.a),{class:"thumbnail-list",modelValue:Object(y["unref"])(l),animation:300,scroll:!0,scrollSensitivity:50,setData:null,itemKey:"id",delayOnTouchOnly:!0,delay:800,onEnd:r},{item:Object(y["withCtx"])(({element:e,index:t})=>[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["thumbnail-item",{active:Object(y["unref"])(o)===t}]),onClick:e=>a(t)},[Object(y["createElementVNode"])("div",Fk,Object(y["toDisplayString"])(t+1),1),Object(y["createVNode"])(Ys,{class:"thumbnail",slide:e,size:120,visible:t<Object(y["unref"])(c)},null,8,["slide","visible"])],10,Ak)]),_:1},8,["modelValue"])]))}});l("bee0");const Rk=ol()($k,[["__scopeId","data-v-e594aa30"]]);var Pk=Rk;const Hk={class:"slide-toolbar"},qk={class:"remark"},Uk=["value"],Gk={class:"toolbar"},Xk=Object(y["createTextVNode"])(" 新幻灯片"),Yk=Object(y["createTextVNode"])(" 复制"),Zk=Object(y["createTextVNode"])(" 删除"),Wk=Object(y["createTextVNode"])(" 文字"),Jk=Object(y["createTextVNode"])("图片 "),Kk=Object(y["createTextVNode"])(" 矩形"),Qk=Object(y["createTextVNode"])(" 圆形");var eC=Object(y["defineComponent"])({__name:"SlideToolbar",setup(e){const t=W(),{viewportRatio:l,currentSlide:o}=Object(g["c"])(t),{createSlide:n,copyAndPasteSlide:c,deleteSlide:a}=Qe(),{createTextElement:r,createImageElement:i,createShapeElement:s}=We(),d=()=>{const e=400,t=56;r({left:(He-e)/2,top:(He*l.value-t)/2,width:e,height:t},{content:"<p>新添加文本</p>"})},u=e=>{e&&e[0]&&Pe(e[0]).then(e=>i(e))},b=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},o={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:o},c=200;s({left:(He-c)/2,top:(He*l.value-c)/2,width:c,height:c},n[e])},p=Object(y["computed"])(()=>{var e;return(null===(e=o.value)||void 0===e?void 0:e.remark)||""}),m=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=Object(y["resolveComponent"])("IconPlus"),o=Object(y["resolveComponent"])("Button"),r=Object(y["resolveComponent"])("IconCopy"),i=Object(y["resolveComponent"])("IconDelete"),s=Object(y["resolveComponent"])("ButtonGroup"),O=Object(y["resolveComponent"])("IconFontSize"),f=Object(y["resolveComponent"])("IconPicture"),j=Object(y["resolveComponent"])("FileInput"),v=Object(y["resolveComponent"])("IconSquare"),h=Object(y["resolveComponent"])("IconRound");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Hk,[Object(y["createElementVNode"])("div",qk,[Object(y["createElementVNode"])("textarea",{value:Object(y["unref"])(p),placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>m(e))},null,40,Uk)]),Object(y["createElementVNode"])("div",Gk,[Object(y["createVNode"])(s,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>Object(y["unref"])(n)())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(l,{class:"icon"}),Xk]),_:1}),Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>Object(y["unref"])(c)())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(r,{class:"icon"}),Yk]),_:1}),Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>Object(y["unref"])(a)())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i,{class:"icon"}),Zk]),_:1})]),_:1}),Object(y["createVNode"])(s,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>d())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(O,{class:"icon"}),Wk]),_:1}),Object(y["createVNode"])(o,{style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(j,{onChange:t[5]||(t[5]=e=>u(e))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(f,{class:"icon"}),Jk]),_:1})]),_:1}),Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>b("square"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(v,{class:"icon"}),Kk]),_:1}),Object(y["createVNode"])(o,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>b("round"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(h,{class:"icon"}),Qk]),_:1})]),_:1})]),Object(y["createVNode"])(Pk)])}}});l("e2d2");const tC=ol()(eC,[["__scopeId","data-v-dcc0171c"]]);var lC=tC;const oC=e=>(Object(y["pushScopeId"])("data-v-446388c6"),e=e(),Object(y["popScopeId"])(),e),nC={class:"element-toolbar"},cC={class:"tabs"},aC=["onClick"],rC={class:"content"},iC={key:0,class:"style"},sC=Object(y["createTextVNode"])("+"),dC=Object(y["createTextVNode"])("-"),uC={class:"row-block"},bC=oC(()=>Object(y["createElementVNode"])("div",{class:"label"},"文字颜色:",-1)),pC={class:"colors"},mC=["onClick"],OC={class:"row-block"},fC=oC(()=>Object(y["createElementVNode"])("div",{class:"label"},"填充色:",-1)),jC={class:"colors"},vC=["onClick"],hC={key:1,class:"common"},yC=Object(y["createTextVNode"])(" 复制"),gC=Object(y["createTextVNode"])(" 删除"),xC=Object(y["createTextVNode"])(" 置顶"),kC=Object(y["createTextVNode"])(" 置底"),CC=Object(y["createTextVNode"])(" 上移"),NC=Object(y["createTextVNode"])(" 下移"),EC=Object(y["createTextVNode"])(" 左对齐"),wC=Object(y["createTextVNode"])(" 水平居中"),VC=Object(y["createTextVNode"])(" 右对齐"),IC=Object(y["createTextVNode"])(" 上对齐"),SC=Object(y["createTextVNode"])(" 垂直居中"),BC=Object(y["createTextVNode"])(" 下对齐");var LC=Object(y["defineComponent"])({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=Q(),o=W(),{handleElement:n,handleElementId:c,richTextAttrs:a}=Object(g["c"])(l),{addHistorySnapshot:r}=Ze(),i=(e,t)=>{o.updateElement({id:e,props:t}),r()},s=[{key:"style",label:"样式"},{key:"common",label:"布局"}],d=Object(y["ref"])("common"),{orderElement:u}=at(),{alignElementToCanvas:b}=io(),{addElementsFromData:p}=Je(),{deleteElement:m}=tt(),O=()=>{const e=JSON.parse(JSON.stringify(n.value));p([e])},f=(e,t)=>{Un.emit(Pn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},j=e=>{var t;if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&null!==(t=n.value.text)&&void 0!==t&&t.content)&&Un.emit(Pn.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l<t.length;l++)for(let o=0;o<t[l].length;o++){const n=t[l][o].style||{};t[l][o].style={...n,color:e}}i(c.value,{data:t})}"latex"===n.value.type&&i(c.value,{color:e})}},v=e=>{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||i(c.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l<t.length;l++)for(let o=0;o<t[l].length;o++){const n=t[l][o].style||{};t[l][o].style={...n,backcolor:e}}i(c.value,{data:t})}"audio"===n.value.type&&i(c.value,{color:e})}};return(e,l)=>{const o=Object(y["resolveComponent"])("IconTextBold"),c=Object(y["resolveComponent"])("CheckboxButton"),r=Object(y["resolveComponent"])("IconTextItalic"),i=Object(y["resolveComponent"])("IconTextUnderline"),p=Object(y["resolveComponent"])("IconStrikethrough"),h=Object(y["resolveComponent"])("CheckboxButtonGroup"),g=Object(y["resolveComponent"])("IconFontSize"),x=Object(y["resolveComponent"])("Button"),k=Object(y["resolveComponent"])("ButtonGroup"),C=Object(y["resolveComponent"])("Divider"),N=Object(y["resolveComponent"])("IconAlignTextLeft"),E=Object(y["resolveComponent"])("RadioButton"),w=Object(y["resolveComponent"])("IconAlignTextCenter"),V=Object(y["resolveComponent"])("IconAlignTextRight"),I=Object(y["resolveComponent"])("RadioGroup"),S=Object(y["resolveComponent"])("IconCopy"),B=Object(y["resolveComponent"])("IconDelete"),L=Object(y["resolveComponent"])("IconSendToBack"),_=Object(y["resolveComponent"])("IconBringToFrontOne"),T=Object(y["resolveComponent"])("IconBringToFront"),M=Object(y["resolveComponent"])("IconSentToBack"),D=Object(y["resolveComponent"])("IconAlignLeft"),z=Object(y["resolveComponent"])("IconAlignVertically"),A=Object(y["resolveComponent"])("IconAlignRight"),F=Object(y["resolveComponent"])("IconAlignTop"),$=Object(y["resolveComponent"])("IconAlignHorizontally"),R=Object(y["resolveComponent"])("IconAlignBottom");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",nC,[Object(y["createElementVNode"])("div",cC,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(s,e=>Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["tab",{active:d.value===e.key}]),key:e.key,onClick:t=>d.value=e.key},Object(y["toDisplayString"])(e.label),11,aC)),64))]),Object(y["createElementVNode"])("div",rC,["style"===d.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",iC,[Object(y["createVNode"])(h,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(c,{style:{flex:"1"},checked:Object(y["unref"])(a).bold,onClick:l[0]||(l[0]=e=>f("bold"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(o)]),_:1},8,["checked"]),Object(y["createVNode"])(c,{style:{flex:"1"},checked:Object(y["unref"])(a).em,onClick:l[1]||(l[1]=e=>f("em"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(r)]),_:1},8,["checked"]),Object(y["createVNode"])(c,{style:{flex:"1"},checked:Object(y["unref"])(a).underline,onClick:l[2]||(l[2]=e=>f("underline"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(i)]),_:1},8,["checked"]),Object(y["createVNode"])(c,{style:{flex:"1"},checked:Object(y["unref"])(a).strikethrough,onClick:l[3]||(l[3]=e=>f("strikethrough"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(p)]),_:1},8,["checked"])]),_:1}),Object(y["createVNode"])(k,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{style:{flex:"2"},onClick:l[4]||(l[4]=e=>f("fontsize-add"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g),sC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"2"},onClick:l[5]||(l[5]=e=>f("fontsize-reduce"))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(g),dC]),_:1})]),_:1}),Object(y["createVNode"])(C,{style:{margin:"20px 0"}}),Object(y["createVNode"])(I,{class:"row","button-style":"solid",value:Object(y["unref"])(a).align,onChange:l[6]||(l[6]=e=>f("align",e.target.value))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(E,{value:"left",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(N)]),_:1}),Object(y["createVNode"])(E,{value:"center",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(w)]),_:1}),Object(y["createVNode"])(E,{value:"right",style:{flex:"1"}},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(V)]),_:1})]),_:1},8,["value"]),Object(y["createVNode"])(C,{style:{margin:"20px 0"}}),Object(y["createElementVNode"])("div",uC,[bC,Object(y["createElementVNode"])("div",pC,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,e=>Object(y["createElementVNode"])("div",{class:"color",key:e,onClick:t=>j(e)},[Object(y["createElementVNode"])("div",{class:"color-block",style:Object(y["normalizeStyle"])({backgroundColor:e})},null,4)],8,mC)),64))])]),Object(y["createElementVNode"])("div",OC,[fC,Object(y["createElementVNode"])("div",jC,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(t,e=>Object(y["createElementVNode"])("div",{class:"color",key:e,onClick:t=>v(e)},[Object(y["createElementVNode"])("div",{class:"color-block",style:Object(y["normalizeStyle"])({backgroundColor:e})},null,4)],8,vC)),64))])])])):Object(y["createCommentVNode"])("",!0),"common"===d.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",hC,[Object(y["createVNode"])(k,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[7]||(l[7]=e=>O())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(S,{class:"icon"}),yC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>Object(y["unref"])(m)())},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(B,{class:"icon"}),gC]),_:1})]),_:1}),Object(y["createVNode"])(C,{style:{margin:"20px 0"}}),Object(y["createVNode"])(k,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>Object(y["unref"])(u)(Object(y["unref"])(n),Object(y["unref"])(be).TOP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(L,{class:"icon"}),xC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>Object(y["unref"])(u)(Object(y["unref"])(n),Object(y["unref"])(be).BOTTOM))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(_,{class:"icon"}),kC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>Object(y["unref"])(u)(Object(y["unref"])(n),Object(y["unref"])(be).UP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(T,{class:"icon"}),CC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>Object(y["unref"])(u)(Object(y["unref"])(n),Object(y["unref"])(be).DOWN))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(M,{class:"icon"}),NC]),_:1})]),_:1}),Object(y["createVNode"])(C,{style:{margin:"20px 0"}}),Object(y["createVNode"])(k,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).LEFT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(D,{class:"icon"}),EC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).HORIZONTAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(z,{class:"icon"}),wC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).RIGHT))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(A,{class:"icon"}),VC]),_:1})]),_:1}),Object(y["createVNode"])(k,{class:"row"},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).TOP))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(F,{class:"icon"}),IC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).VERTICAL))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])($,{class:"icon"}),SC]),_:1}),Object(y["createVNode"])(x,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>Object(y["unref"])(b)(Object(y["unref"])(pe).BOTTOM))},{default:Object(y["withCtx"])(()=>[Object(y["createVNode"])(R,{class:"icon"}),BC]),_:1})]),_:1})])):Object(y["createCommentVNode"])("",!0)])])}}});l("1c65");const _C=ol()(LC,[["__scopeId","data-v-446388c6"]]);var TC=_C;const MC={class:"mobile-editor-header"},DC={class:"history"},zC=Object(y["createTextVNode"])(" 撤销"),AC=Object(y["createTextVNode"])(" 重做"),FC=Object(y["createTextVNode"])(" 退出编辑");var $C=Object(y["defineComponent"])({__name:"Header",props:{changeMode:{type:Function,required:!0}},setup(e){const{canUndo:t,canRedo:l}=Object(g["c"])(re()),{redo:o,undo:n}=Ze();return(c,a)=>{const r=Object(y["resolveComponent"])("IconBack"),i=Object(y["resolveComponent"])("IconNext"),s=Object(y["resolveComponent"])("IconLogout");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",MC,[Object(y["createElementVNode"])("div",DC,[Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["history-item",{disable:!Object(y["unref"])(t)}]),onClick:a[0]||(a[0]=Object(y["withModifiers"])(e=>Object(y["unref"])(n)(),["stop"]))},[Object(y["createVNode"])(r),zC],2),Object(y["createElementVNode"])("div",{class:Object(y["normalizeClass"])(["history-item",{disable:!Object(y["unref"])(l)}]),onClick:a[1]||(a[1]=Object(y["withModifiers"])(e=>Object(y["unref"])(o)(),["stop"]))},[Object(y["createVNode"])(i),AC],2)]),Object(y["createElementVNode"])("div",{class:"back",onClick:a[2]||(a[2]=t=>e.changeMode("preview"))},[Object(y["createVNode"])(s),FC])])}}});l("601c");const RC=ol()($C,[["__scopeId","data-v-8639f30e"]]);var PC=RC;const HC={class:"mobile-editor"};var qC=Object(y["defineComponent"])({__name:"index",props:{changeMode:{type:Function,required:!0}},setup(e){const t=W(),l=Q(),{slideIndex:o,currentSlide:n,viewportRatio:c}=Object(g["c"])(t),{activeElementIdList:a,handleElement:r}=Object(g["c"])(l),i=Object(y["ref"])(),s=Object(y["ref"])([]),d=Object(y["computed"])(()=>n.value.background),{backgroundStyle:u}=Nr(d),b=Object(y["computed"])(()=>{if(!i.value)return 1;const e=i.value.clientWidth,t=i.value.clientHeight,l=t/e;return l>=c.value?(e-20)/He:(t-20)/c.value/He});Object(y["onMounted"])(()=>{a.value.length&&l.setActiveElementIdList([]),0!==o.value&&t.updateSlideIndex(0)});const p=Object(y["computed"])(()=>({width:He*b.value+"px",height:He*c.value*b.value+"px"})),m=Object(y["ref"])([]),O=()=>{m.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};Object(y["watchEffect"])(O);const{dragElement:f}=no(m,s,b),{scaleElement:j}=lo(m,s,b),v=(e,t,o=!0)=>{a.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),o&&f(e,t)},h=()=>{l.setActiveElementIdList([])};return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",HC,[Object(y["createVNode"])(PC,{changeMode:e.changeMode},null,8,["changeMode"]),Object(y["createElementVNode"])("div",{class:"content",ref_key:"contentRef",ref:i,onTouchstart:l[0]||(l[0]=e=>h())},[Object(y["createElementVNode"])("div",{class:"viewport-wrapper",style:Object(y["normalizeStyle"])(Object(y["unref"])(p))},[Object(y["createElementVNode"])("div",{class:"background",style:Object(y["normalizeStyle"])(Object(y["unref"])(u))},null,4),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(s.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(Br,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:Object(y["unref"])(b)},null,8,["type","axis","length","canvasScale"]))),128)),(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(m.value,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:e.id},["line"!==e.type?(Object(y["openBlock"])(),Object(y["createBlock"])(Dk,{key:0,elementInfo:e,isSelected:Object(y["unref"])(a).includes(e.id),canvasScale:Object(y["unref"])(b),scaleElement:Object(y["unref"])(j)},null,8,["elementInfo","isSelected","canvasScale","scaleElement"])):Object(y["createCommentVNode"])("",!0)],64))),128)),Object(y["createElementVNode"])("div",{class:"viewport",style:Object(y["normalizeStyle"])({transform:`scale(${Object(y["unref"])(b)})`})},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(m.value,(e,t)=>(Object(y["openBlock"])(),Object(y["createBlock"])(_k,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:v},null,8,["elementInfo","elementIndex"]))),128))],4)],4)],544),Object(y["createVNode"])(lC),Object(y["unref"])(r)?(Object(y["openBlock"])(),Object(y["createBlock"])(TC,{key:0})):Object(y["createCommentVNode"])("",!0)]))}});l("2d86");const UC=ol()(qC,[["__scopeId","data-v-8cdcde82"]]);var GC=UC;const XC={class:"header"},YC=Object(y["createTextVNode"])(" 退出播放");var ZC=Object(y["defineComponent"])({__name:"MobilePlayer",props:{changeMode:{type:Function,required:!0}},setup(e){const t=W(),{slides:l,slideIndex:o,currentSlide:n,viewportRatio:c}=Object(g["c"])(t),a=Object(y["ref"])(!1),r=Object(y["ref"])({width:0,height:0});Object(y["onMounted"])(()=>{0!==o.value&&t.updateSlideIndex(0),r.value={width:document.body.clientHeight,height:document.body.clientWidth}});const i=Object(y["computed"])(()=>{const e=r.value.height/r.value.width;let t=0,l=0;return e>=c.value?(t=r.value.width,l=t*c.value):(l=r.value.height,t=l/c.value),{width:t,height:l}}),s=Object(y["ref"])(null),d=e=>{s.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},u=e=>{if(!s.value)return;const n=Math.abs(s.value.y-e.changedTouches[0].pageY),c=e.changedTouches[0].pageX-s.value.x;Math.abs(c)>n&&Math.abs(c)>50&&(s.value=null,c<0&&o.value>0&&t.updateSlideIndex(o.value-1),c>0&&o.value<l.value.length-1&&t.updateSlideIndex(o.value+1))};return(t,c)=>{const s=Object(y["resolveComponent"])("IconLogout");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"mobile-player",style:Object(y["normalizeStyle"])({width:r.value.width+"px",height:r.value.height+"px",transform:`rotate(90deg) translateY(-${r.value.height}px)`})},[Object(y["createElementVNode"])("div",{class:"screen-slide-list",onClick:c[0]||(c[0]=e=>a.value=!a.value),onTouchstart:c[1]||(c[1]=e=>d(e)),onTouchend:c[2]||(c[2]=e=>u(e))},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(l),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:Object(y["normalizeClass"])(["slide-item","turning-mode-"+(e.turningMode||"slideY"),{current:t===Object(y["unref"])(o),before:t<Object(y["unref"])(o),after:t>Object(y["unref"])(o),hide:(t===Object(y["unref"])(o)-1||t===Object(y["unref"])(o)+1)&&e.turningMode!==Object(y["unref"])(n).turningMode}]),key:e.id},[Math.abs(Object(y["unref"])(o)-t)<2?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:"slide-content",style:Object(y["normalizeStyle"])({width:Object(y["unref"])(i).width+"px",height:Object(y["unref"])(i).height+"px"})},[Object(y["createVNode"])(Ys,{slide:e,size:Object(y["unref"])(i).width},null,8,["slide","size"])],4)):Object(y["createCommentVNode"])("",!0)],2))),128))],32),a.value?(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:0},[Object(y["createElementVNode"])("div",XC,[Object(y["createElementVNode"])("div",{class:"back",onClick:c[3]||(c[3]=t=>e.changeMode("preview"))},[Object(y["createVNode"])(s),YC])]),Object(y["createVNode"])(Pk,{class:"thumbnails"})],64)):Object(y["createCommentVNode"])("",!0)],4)}}});l("4f8b");const WC=ol()(ZC,[["__scopeId","data-v-5293de3b"]]);var JC=WC;const KC={class:"thumbnail-list"},QC={class:"menu"},eN=Object(y["createTextVNode"])(" 编辑"),tN=Object(y["createTextVNode"])(" 播放");var lN=Object(y["defineComponent"])({__name:"MobilePreview",props:{changeMode:{type:Function,required:!0}},setup(e){const{slides:t}=Object(g["c"])(W()),{slidesLoadLimit:l}=ib(),o=Object(y["ref"])(),n=Object(y["ref"])(0);return Object(y["onMounted"])(()=>{o.value&&(n.value=o.value.clientWidth)}),(c,a)=>{const r=Object(y["resolveComponent"])("IconEdit"),i=Object(y["resolveComponent"])("Divider"),s=Object(y["resolveComponent"])("IconFullScreenPlay");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"mobile-preview",ref_key:"mobileRef",ref:o},[Object(y["createElementVNode"])("div",KC,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(t),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"thumbnail-item",key:e.id},[Object(y["createVNode"])(Ys,{slide:e,size:n.value-20,visible:t<Object(y["unref"])(l)},null,8,["slide","size","visible"])]))),128))]),Object(y["createElementVNode"])("div",QC,[Object(y["createElementVNode"])("div",{class:"menu-item",onClick:a[0]||(a[0]=t=>e.changeMode("editor"))},[Object(y["createVNode"])(r,{class:"icon"}),eN]),Object(y["createVNode"])(i,{type:"vertical",style:{height:"30px"}}),Object(y["createElementVNode"])("div",{class:"menu-item",onClick:a[1]||(a[1]=t=>e.changeMode("player"))},[Object(y["createVNode"])(s,{class:"icon"}),tN])])],512)}}});l("9670");const oN=ol()(lN,[["__scopeId","data-v-6414f8a8"]]);var nN=oN;const cN={class:"mobile"};var aN=Object(y["defineComponent"])({__name:"index",setup(e){const t=Object(y["ref"])("preview"),l=e=>t.value=e,o=Object(y["computed"])(()=>{const e={editor:GC,player:JC,preview:nN};return e[t.value]||null});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",cN,[(Object(y["openBlock"])(),Object(y["createBlock"])(Object(y["resolveDynamicComponent"])(Object(y["unref"])(o)),{changeMode:l}))]))}});l("be01");const rN=ol()(aN,[["__scopeId","data-v-1fb24d48"]]);var iN=rN,sN=Object(y["defineComponent"])({__name:"App",setup(e){const t=ue(),l=Q(),o=re(),{databaseId:n}=Object(g["c"])(l),{screening:c}=Object(g["c"])(se());return window.onbeforeunload=()=>!1,Object(y["onMounted"])(()=>{o.initSnapshotDatabase(),l.setAvailableFonts()}),window.addEventListener("unload",()=>{const e=localStorage.getItem(le),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(le,l)}),(e,l)=>Object(y["unref"])(c)?(Object(y["openBlock"])(),Object(y["createBlock"])(Sk,{key:0})):Object(y["unref"])(t)?(Object(y["openBlock"])(),Object(y["createBlock"])(fx,{key:1})):(Object(y["openBlock"])(),Object(y["createBlock"])(iN,{key:2}))}});l("7958");const dN=sN;var uN=dN,bN=l("9483");Object(bN["a"])("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l("793f"),l("41ed"),l("77ed"),l("5952"),l("c860"),l("ae3f"),l("8c56");var pN=l("3be8"),mN=l("4621"),ON=l("63d0"),fN=l("3962"),jN=l("3bce"),vN=l("f59e"),hN=l("5a81"),yN=l("c24c"),gN=l("0cf2"),xN=l("4a33"),kN=l("b0d0"),CN=l("50f1"),NN=l("7833"),EN=l("f2e7"),wN=l("b9bc"),VN=l("7f4b"),IN=l("36da"),SN=l("cfe0"),BN=l("af8a"),LN=l("d887"),_N=l("b28e"),TN=l("f914"),MN=l("0e0a"),DN=l("f807"),zN=l("2e67"),AN=l("e792"),FN=l("e483"),$N=l("9312"),RN=l("84e7"),PN=l("500e"),HN=l("1e27"),qN=l("7312"),UN=l("8845"),GN=l("a3ef"),XN=l("8331"),YN=l("4040"),ZN=l("f745"),WN=l("8377"),JN=l("246f"),KN=l("694b"),QN=l("e9ec"),eE=l("f1d2"),tE=l("ccc7"),lE=l("e3b9"),oE=l("6010"),nE=l("7abc"),cE=l("f259"),aE=l("23fa"),rE=l("1b1c"),iE=l("fd52"),sE=l("bde2"),dE=l("5a28"),uE=l("c53e"),bE=l("e970"),pE=l("1646"),mE=l("40bb"),OE=l("f99d"),fE=l("f3c2"),jE=l("33a2"),vE=l("fdbc"),hE=l("3a3e"),yE=l("d0c6"),gE=l("1fcb"),xE=l("dcc2"),kE=l("a5f1"),CE=l("ce42"),NE=l("fa00"),EE=l("0996"),wE=l("2c06"),VE=l("a5dc"),IE=l("8678"),SE=l("d7fb"),BE=l("b7c8"),LE=l("ae33"),_E=l("8c1a"),TE=l("b7b3"),ME=l("96be"),DE=l("5a69"),zE=l("f9e5"),AE=l("bbce"),FE=l("d41d"),$E=l("77ad"),RE=l("46cd"),PE=l("df0d"),HE=l("70f2"),qE=l("d16b"),UE=l("4bad"),GE=l("2e2d"),XE=l("e7f4"),YE=l("eb50"),ZE=l("0be2"),WE=l("a90c"),JE=l("c90a"),KE=l("9fbc"),QE=l("5b20"),ew=l("69de"),tw=l("fbe7"),lw=l("ea01"),ow=l("74f3"),nw=l("3ee3"),cw=l("5294"),aw=l("eac5"),rw=l("b8af"),iw=l("dde4"),sw=l("cead"),dw=l("114f"),uw=l("bf2c");const bw={IconPlayOne:uw["a"],IconFullScreenPlay:dw["a"],IconLock:sw["a"],IconUnlock:iw["a"],IconPpt:rw["a"],IconFormat:aw["a"],IconPicture:cw["a"],IconFullScreen:nw["a"],IconList:ow["a"],IconOrderedList:lw["a"],IconHelpcenter:tw["a"],IconFlipVertically:ew["a"],IconFlipHorizontally:QE["a"],IconFontSize:KE["a"],IconCode:JE["a"],IconTextBold:WE["a"],IconTextItalic:ZE["a"],IconTextUnderline:YE["a"],IconStrikethrough:XE["a"],IconEdit:GE["a"],IconQuote:UE["a"],IconBackgroundColor:qE["a"],IconGroup:HE["a"],IconUngroup:PE["a"],IconBack:RE["a"],IconNext:$E["a"],IconFullwidth:FE["a"],IconAlignTop:AE["a"],IconAlignLeft:zE["a"],IconAlignRight:DE["a"],IconAlignBottom:ME["a"],IconAlignVertically:TE["a"],IconAlignHorizontally:_E["a"],IconBringToFront:LE["a"],IconSendToBack:BE["a"],IconAlignTextLeft:SE["a"],IconAlignTextRight:IE["a"],IconAlignTextCenter:VE["a"],IconRowHeight:wE["a"],IconWrite:EE["a"],IconInsertTable:NE["a"],IconAddText:CE["a"],IconFill:kE["a"],IconTailoring:xE["a"],IconEffects:gE["a"],IconColorFilter:yE["a"],IconDown:hE["a"],IconPlus:vE["a"],IconMinus:jE["a"],IconConnection:fE["a"],IconBringToFrontOne:OE["a"],IconSentToBack:mE["a"],IconGithub:pE["a"],IconChartProportion:bE["a"],IconChartHistogram:uE["a"],IconChartHistogramOne:dE["a"],IconChartLineArea:sE["a"],IconChartRing:iE["a"],IconChartScatter:rE["a"],IconChartLine:aE["a"],IconChartPie:cE["a"],IconText:nE["a"],IconRotate:oE["a"],IconLeftTwo:lE["a"],IconRightTwo:tE["a"],IconPlatte:eE["a"],IconUpOne:QN["a"],IconDownOne:KN["a"],IconClose:JN["a"],IconCloseSmall:WN["a"],IconUndo:ZN["a"],IconTransform:YN["a"],IconClick:XN["a"],IconTheme:GN["a"],IconArrowCircleLeft:UN["a"],IconGraphicDesign:qN["a"],IconLogout:HN["a"],IconErase:PN["a"],IconClear:RN["a"],IconFolderClose:$N["a"],IconAlignTextTopOne:FN["a"],IconAlignTextBottomOne:AN["a"],IconAlignTextMiddleOne:zN["a"],IconPause:DN["a"],IconVolumeMute:MN["a"],IconVolumeNotice:TN["a"],IconVolumeSmall:_N["a"],IconVideoTwo:LN["a"],IconFormula:BN["a"],IconLinkOne:SN["a"],IconFullScreenOne:IN["a"],IconOffScreenOne:VN["a"],IconPower:wN["a"],IconListView:EN["a"],IconMagic:NN["a"],IconHighLight:CN["a"],IconShare:kN["a"],IconIndentLeft:xN["a"],IconIndentRight:gN["a"],IconVerticalSpacingBetweenItems:yN["a"],IconCopy:hN["a"],IconDelete:vN["a"],IconSquare:jN["a"],IconRound:fN["a"],IconNeedle:ON["a"],IconTextRotationNone:mN["a"],IconTextRotationDown:pN["a"]};var pw={install(e){for(const t of Object.keys(bw))e.component(t,bw[t])}};const mw=["accept"];var Ow=Object(y["defineComponent"])({__name:"FileInput",props:{accept:{type:String,default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=Object(y["ref"])(),o=()=>{l.value&&(l.value.value="",l.value.click())},n=e=>{const l=e.target.files;l&&t("change",l)};return(t,c)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"file-input",onClick:c[1]||(c[1]=e=>o())},[Object(y["renderSlot"])(t.$slots,"default"),Object(y["createElementVNode"])("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:c[0]||(c[0]=e=>n(e))},null,40,mw)]))}});l("e25c");const fw=ol()(Ow,[["__scopeId","data-v-4727b7ff"]]);var jw=fw,vw=Object(y["defineComponent"])({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1}},setup(e){return(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("button",{class:Object(y["normalizeClass"])(["checkbox-button",{checked:e.checked}])},[Object(y["renderSlot"])(t.$slots,"default")],2))}});l("573c");const hw=ol()(vw,[["__scopeId","data-v-699cf016"]]);var yw=hw;const gw={class:"checkbox-button-group"};function xw(e,t){return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",gw,[Object(y["renderSlot"])(e.$slots,"default",{},void 0,!0)])}l("5634");const kw={},Cw=ol()(kw,[["render",xw],["__scopeId","data-v-b8aa6eac"]]);var Nw=Cw,Ew=Object(y["defineComponent"])({__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup(e){const t=e,l={},o=(e,t,l)=>{const o=document.createElement("canvas");o.width=o.height=2*l;const n=o.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,o.width,o.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),o.toDataURL()):null},n=(e,t,n)=>{const c=e+","+t+","+n;if(l[c])return l[c];const a=o(e,t,n);return l[c]=a,a},c=Object(y["computed"])(()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}});return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"checkerboard",style:Object(y["normalizeStyle"])(Object(y["unref"])(c))},null,4))}});l("a8d7");const ww=ol()(Ew,[["__scopeId","data-v-7494636c"]]);var Vw=ww;const Iw=e=>(Object(y["pushScopeId"])("data-v-246b525c"),e=e(),Object(y["popScopeId"])(),e),Sw={class:"alpha"},Bw={class:"alpha-checkboard-wrap"},Lw=Iw(()=>Object(y["createElementVNode"])("div",{class:"alpha-picker"},null,-1)),_w=[Lw];var Tw=Object(y["defineComponent"])({__name:"Alpha",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,o=Object(y["computed"])(()=>l.value),n=Object(y["computed"])(()=>{const e=[o.value.r,o.value.g,o.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`}),c=Object(y["ref"])(),a=e=>{if(e.preventDefault(),!c.value)return;const l=c.value.clientWidth,n=c.value.getBoundingClientRect().left+window.pageXOffset,a=e.pageX-n;let r;r=a<0?0:a>l?1:Math.round(100*a/l)/100,o.value.a!==r&&t("colorChange",{r:o.value.r,g:o.value.g,b:o.value.b,a:r})},r=()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",r)},i=e=>{a(e),window.addEventListener("mousemove",a),window.addEventListener("mouseup",r)};return Object(y["onUnmounted"])(r),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Sw,[Object(y["createElementVNode"])("div",Bw,[Object(y["createVNode"])(Vw)]),Object(y["createElementVNode"])("div",{class:"alpha-gradient",style:Object(y["normalizeStyle"])({background:Object(y["unref"])(n)})},null,4),Object(y["createElementVNode"])("div",{class:"alpha-container",ref_key:"alphaRef",ref:c,onMousedown:t[0]||(t[0]=e=>i(e))},[Object(y["createElementVNode"])("div",{class:"alpha-pointer",style:Object(y["normalizeStyle"])({left:100*Object(y["unref"])(o).a+"%"})},_w,4)],544)]))}});l("e83e");const Mw=ol()(Tw,[["__scopeId","data-v-246b525c"]]);var Dw=Mw;const zw=e=>(Object(y["pushScopeId"])("data-v-60c3cca1"),e=e(),Object(y["popScopeId"])(),e),Aw={class:"hue"},Fw=zw(()=>Object(y["createElementVNode"])("div",{class:"hue-picker"},null,-1)),$w=[Fw];var Rw=Object(y["defineComponent"])({__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,o=Object(y["ref"])(0),n=Object(y["ref"])(""),c=Object(y["computed"])(()=>{const e=U()(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e}),a=Object(y["computed"])(()=>0===c.value.h&&"right"===n.value?"100%":100*c.value.h/360+"%");Object(y["watch"])(()=>l.value,()=>{const e=U()(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-o.value>0&&(n.value="right"),0!==t&&t-o.value<0&&(n.value="left"),o.value=t});const r=Object(y["ref"])(),i=e=>{if(e.preventDefault(),!r.value)return;const o=r.value.clientWidth,n=r.value.getBoundingClientRect().left+window.pageXOffset,a=e.pageX-n;let i,s;a<0?i=0:a>o?i=360:(s=100*a/o,i=360*s/100),-1!==l.hue&&c.value.h===i||t("colorChange",{h:i,l:c.value.l,s:c.value.s,a:c.value.a})},s=()=>{window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",s)},d=e=>{i(e),window.addEventListener("mousemove",i),window.addEventListener("mouseup",s)};return Object(y["onUnmounted"])(s),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Aw,[Object(y["createElementVNode"])("div",{class:"hue-container",ref_key:"hueRef",ref:r,onMousedown:t[0]||(t[0]=e=>d(e))},[Object(y["createElementVNode"])("div",{class:"hue-pointer",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(a)})},$w,4)],544)]))}});l("179a");const Pw=ol()(Rw,[["__scopeId","data-v-60c3cca1"]]);var Hw=Pw;const qw=e=>(Object(y["pushScopeId"])("data-v-d230faf4"),e=e(),Object(y["popScopeId"])(),e),Uw=qw(()=>Object(y["createElementVNode"])("div",{class:"saturation-white"},null,-1)),Gw=qw(()=>Object(y["createElementVNode"])("div",{class:"saturation-black"},null,-1)),Xw=qw(()=>Object(y["createElementVNode"])("div",{class:"saturation-circle"},null,-1)),Yw=[Xw];var Zw=Object(y["defineComponent"])({__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,o=Object(y["computed"])(()=>{const e=U()(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e}),n=Object(y["computed"])(()=>`hsl(${o.value.h}, 100%, 50%)`),c=Object(y["computed"])(()=>-100*o.value.v+1+100+"%"),a=Object(y["computed"])(()=>100*o.value.s+"%"),r=Object(G["throttle"])((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),i=Object(y["ref"])(),s=e=>{if(e.preventDefault(),!i.value)return;const t=i.value.clientWidth,l=i.value.clientHeight,n=i.value.getBoundingClientRect().left+window.pageXOffset,c=i.value.getBoundingClientRect().top+window.pageYOffset,a=Object(G["clamp"])(e.pageX-n,0,t),s=Object(G["clamp"])(e.pageY-c,0,l),d=a/t,u=Object(G["clamp"])(-s/l+1,0,1);r({h:o.value.h,s:d,v:u,a:o.value.a})},d=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",d)},u=e=>{s(e),window.addEventListener("mousemove",s),window.addEventListener("mouseup",d)};return Object(y["onUnmounted"])(d),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"saturation",ref_key:"saturationRef",ref:i,style:Object(y["normalizeStyle"])({background:Object(y["unref"])(n)}),onMousedown:t[0]||(t[0]=e=>u(e))},[Uw,Gw,Object(y["createElementVNode"])("div",{class:"saturation-pointer",style:Object(y["normalizeStyle"])({top:Object(y["unref"])(c),left:Object(y["unref"])(a)})},Yw,4)],36))}});l("0516");const Ww=ol()(Zw,[["__scopeId","data-v-d230faf4"]]);var Jw=Ww;const Kw={class:"editable-input"},Qw=["value"];var eV=Object(y["defineComponent"])({__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,o=Object(y["computed"])(()=>{let e="";return e=l.value.a<1?U()(l.value).toHex8String().toUpperCase():U()(l.value).toHexString().toUpperCase(),e.replace("#","")}),n=e=>{const l=e.target.value;l.length>=6&&t("colorChange",U()(l).toRgb())};return(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",Kw,[Object(y["createElementVNode"])("input",{class:"input-content",value:Object(y["unref"])(o),onInput:t[0]||(t[0]=e=>n(e))},null,40,Qw)]))}});l("a9b0");const tV=ol()(eV,[["__scopeId","data-v-2f428dde"]]);var lV=tV;const oV={class:"color-picker"},nV={class:"picker-saturation-wrap"},cV={class:"picker-controls"},aV={class:"picker-color-wrap"},rV={class:"picker-sliders"},iV={class:"picker-hue-wrap"},sV={class:"picker-alpha-wrap"},dV={class:"picker-field"},uV={class:"picker-presets"},bV=["onClick"],pV={class:"picker-gradient-presets"},mV=["onClick"],OV={class:"picker-presets"},fV=["onClick"],jV={key:0,class:"recent-colors-title"},vV={class:"picker-presets"},hV=["onClick"];var yV=Object(y["defineComponent"])({__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,o="RECENT_COLORS",n=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],c=(e,t,l)=>{const o=U()(e).toRgb(),n=U()(t).toRgb(),c=(n.r-o.r)/l,a=(n.g-o.g)/l,r=(n.b-o.b)/l,i=[];for(let s=0;s<l;s++){const e=U()({r:o.r+c*s,g:o.g+a*s,b:o.b+r*s}).toRgbString();i.push(e)}return i},a=()=>{const e=[];for(const t of n)e.push(c(t[1],t[0],5));return e},r=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],i=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],s=Object(y["ref"])(-1),d=Object(y["ref"])([]),u=Object(y["computed"])({get(){return U()(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),b=a(),p=Object(y["computed"])(()=>`rgba(${[u.value.r,u.value.g,u.value.b,u.value.a].join(",")})`),m=e=>{s.value=U()(e).toHsl().h,t("update:modelValue",e)},O=Object(G["debounce"])((function(){const e=U()(u.value).toRgbString();if(!d.value.includes(e)){d.value=[e,...d.value];const t=10;d.value.length>t&&(d.value=d.value.slice(0,t))}}),300,{trailing:!0});Object(y["onMounted"])(()=>{const e=localStorage.getItem(o);e&&(d.value=JSON.parse(e))}),Object(y["watch"])(d,()=>{const e=JSON.stringify(d.value);localStorage.setItem(o,e)});const f=e=>{"h"in e?(s.value=e.h,u.value=U()(e).toRgb()):(s.value=U()(e).toHsl().h,u.value=e),O()},j=()=>{const e="EyeDropper"in window;e?v():h()},v=()=>{he["a"].success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then(e=>{const t=U()(e.sRGBHex);s.value=t.toHsl().h,u.value=t.toRgb(),O()}).catch(()=>{he["a"].success("关闭取色吸管")})},h=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:o,top:n,width:c,height:a}=e.getBoundingClientRect(),r=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));Object(ft["a"])(e,{filter:r,fontEmbedCSS:"",width:c,height:a,canvasWidth:c,canvasHeight:a,pixelRatio:1}).then(e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${o}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const c=e.getContext("2d");if(!c)return;let a="";const r=e=>{const t=e.x,r=e.y,i=t-o,s=r-n,[d,u,b,p]=c.getImageData(i,s,1,1).data;a=`rgba(${d}, ${u}, ${b}, ${(p/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=r+10+"px",l.style.backgroundColor=a},i=()=>{a="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},d=l=>{if(a&&0===l.button){const e=U()(a);s.value=e.toHsl().h,u.value=e.toRgb(),O()}document.body.removeChild(t),e.removeEventListener("mousemove",r),e.removeEventListener("mouseleave",i),window.removeEventListener("mousedown",d)};e.addEventListener("mousemove",r),e.addEventListener("mouseleave",i),window.addEventListener("mousedown",d)}).catch(()=>{he["a"].error("取色吸管初始化失败"),document.body.removeChild(t)})};return(e,t)=>{const l=Object(y["resolveComponent"])("IconNeedle");return Object(y["openBlock"])(),Object(y["createElementBlock"])("div",oV,[Object(y["createElementVNode"])("div",nV,[Object(y["createVNode"])(Jw,{value:Object(y["unref"])(u),hue:s.value,onColorChange:t[0]||(t[0]=e=>f(e))},null,8,["value","hue"])]),Object(y["createElementVNode"])("div",cV,[Object(y["createElementVNode"])("div",aV,[Object(y["createElementVNode"])("div",{class:"picker-current-color",style:Object(y["normalizeStyle"])({background:Object(y["unref"])(p)})},null,4),Object(y["createVNode"])(Vw)]),Object(y["createElementVNode"])("div",rV,[Object(y["createElementVNode"])("div",iV,[Object(y["createVNode"])(Hw,{value:Object(y["unref"])(u),hue:s.value,onColorChange:t[1]||(t[1]=e=>f(e))},null,8,["value","hue"])]),Object(y["createElementVNode"])("div",sV,[Object(y["createVNode"])(Dw,{value:Object(y["unref"])(u),onColorChange:t[2]||(t[2]=e=>f(e))},null,8,["value"])])])]),Object(y["createElementVNode"])("div",dV,[Object(y["createVNode"])(lV,{class:"input",value:Object(y["unref"])(u),onColorChange:t[3]||(t[3]=e=>f(e))},null,8,["value"]),Object(y["createElementVNode"])("div",{class:"straw",onClick:t[4]||(t[4]=e=>j())},[Object(y["createVNode"])(l)])]),Object(y["createElementVNode"])("div",uV,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(r,e=>Object(y["createElementVNode"])("div",{class:"picker-presets-color",key:e,style:Object(y["normalizeStyle"])({background:e}),onClick:t=>m(e)},null,12,bV)),64))]),Object(y["createElementVNode"])("div",pV,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(Object(y["unref"])(b),(e,t)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"picker-gradient-col",key:t},[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{class:"picker-gradient-color",key:e,style:Object(y["normalizeStyle"])({background:e}),onClick:t=>m(e)},null,12,mV))),128))]))),128))]),Object(y["createElementVNode"])("div",OV,[(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(i,e=>Object(y["createElementVNode"])("div",{key:e,class:"picker-presets-color",style:Object(y["normalizeStyle"])({background:e}),onClick:t=>m(e)},null,12,fV)),64))]),d.value.length?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",jV,"最近使用:")):Object(y["createCommentVNode"])("",!0),Object(y["createElementVNode"])("div",vV,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(d.value,e=>(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:e,class:"picker-presets-color alpha",onClick:t=>m(e)},[Object(y["createElementVNode"])("div",{class:"picker-presets-color-content",style:Object(y["normalizeStyle"])({background:e})},null,4)],8,hV))),128))])])}}});l("ecf8");const gV=ol()(yV,[["__scopeId","data-v-c46eb110"]]);var xV=gV;const kV={key:0,class:"fullscreen-spin"};var CV=Object(y["defineComponent"])({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{type:String,default:""}},setup(e){return(t,l)=>{const o=Object(y["resolveComponent"])("Spin");return e.loading?(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",kV,[Object(y["createVNode"])(o,{tip:e.tip,size:"large"},null,8,["tip"])])):Object(y["createCommentVNode"])("",!0)}}});l("5d4b");const NV=ol()(CV,[["__scopeId","data-v-16ead44e"]]);var EV=NV;const wV={FileInput:jw,CheckboxButton:yw,CheckboxButtonGroup:Nw,ColorPicker:xV,FullscreenSpin:EV};var VV={install(e){for(const t of Object.keys(wV))e.component(t,wV[t])}};const IV={class:"menu-content"},SV=["onClick"],BV={class:"text"},LV={key:0,class:"sub-text"};var _V=Object(y["defineComponent"])({__name:"MenuContent",props:{menus:{type:Array,required:!0},handleClickMenuItem:{type:Function,required:!0}},setup(e){return(t,l)=>{const o=Object(y["resolveComponent"])("menu-content",!0);return Object(y["openBlock"])(),Object(y["createElementBlock"])("ul",IV,[(Object(y["openBlock"])(!0),Object(y["createElementBlock"])(y["Fragment"],null,Object(y["renderList"])(e.menus,(t,l)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],{key:t.text||l},[t.hide?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createElementBlock"])("li",{key:0,class:Object(y["normalizeClass"])(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:Object(y["withModifiers"])(l=>e.handleClickMenuItem(t),["stop"])},[t.divider?Object(y["createCommentVNode"])("",!0):(Object(y["openBlock"])(),Object(y["createElementBlock"])("div",{key:0,class:Object(y["normalizeClass"])(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[Object(y["createElementVNode"])("span",BV,Object(y["toDisplayString"])(t.text),1),t.subText&&!t.children?(Object(y["openBlock"])(),Object(y["createElementBlock"])("span",LV,Object(y["toDisplayString"])(t.subText),1)):Object(y["createCommentVNode"])("",!0),t.children&&t.children.length?(Object(y["openBlock"])(),Object(y["createBlock"])(o,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):Object(y["createCommentVNode"])("",!0)],2))],10,SV))],64))),128))])}}});l("ca3c");const TV=ol()(_V,[["__scopeId","data-v-e470e712"]]);var MV=TV,DV=Object(y["defineComponent"])({__name:"index",props:{axis:{type:Object,required:!0},el:{type:Object,required:!0},menus:{type:Array,required:!0},removeContextmenu:{type:Function,required:!0}},setup(e){const t=e,l=Object(y["computed"])(()=>{const e=170,l=30,o=11,n=5,{x:c,y:a}=t.axis,r=t.menus.filter(e=>!(e.divider||e.hide)).length,i=t.menus.filter(e=>e.divider).length,s=e,d=r*l+i*o+2*n,u=document.body.clientWidth,b=document.body.clientHeight;return{left:u<=c+s?c-s:c,top:b<=a+d?a-d:a}}),o=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(t,n)=>(Object(y["openBlock"])(),Object(y["createElementBlock"])(y["Fragment"],null,[Object(y["createElementVNode"])("div",{class:"mask",onContextmenu:n[0]||(n[0]=Object(y["withModifiers"])(t=>e.removeContextmenu(),["prevent"])),onMousedown:n[1]||(n[1]=t=>e.removeContextmenu())},null,32),Object(y["createElementVNode"])("div",{class:"contextmenu",style:Object(y["normalizeStyle"])({left:Object(y["unref"])(l).left+"px",top:Object(y["unref"])(l).top+"px"}),onContextmenu:n[2]||(n[2]=Object(y["withModifiers"])(()=>{},["prevent"]))},[Object(y["createVNode"])(MV,{menus:e.menus,handleClickMenuItem:o},null,8,["menus"])],36)],64))}});l("b096");const zV=DV;var AV=zV;const FV="CTX_CONTEXTMENU_HANDLER",$V=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const o=l.value(e);if(!o)return;let n=null;const c=()=>{n&&(document.body.removeChild(n),n=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",c),window.removeEventListener("resize",c)},a={axis:{x:t.x,y:t.y},el:e,menus:o,removeContextmenu:c};n=document.createElement("div");const r=Object(y["createVNode"])(AV,a,null);Object(y["render"])(r,n),document.body.appendChild(n),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",c),window.addEventListener("resize",c)},RV={mounted(e,t){e[FV]=l=>$V(e,l,t),e.addEventListener("contextmenu",e[FV])},unmounted(e){e&&e[FV]&&(e.removeEventListener("contextmenu",e[FV]),delete e[FV])}};var PV=RV;const HV="CTX_CLICK_OUTSIDE_HANDLER",qV=(e,t,l)=>{const o=l.value,n=t.composedPath(),c=n?n.indexOf(e)<0:!e.contains(t.target);c&&o(t)},UV={mounted(e,t){e[HV]=l=>qV(e,l,t),setTimeout(()=>{document.addEventListener("click",e[HV])},0)},unmounted(e){e[HV]&&(document.removeEventListener("click",e[HV]),delete e[HV])}};var GV=UV,XV={install(e){e.directive("contextmenu",PV),e.directive("click-outside",GV)}};const YV=Object(y["createApp"])(uN);YV.component("InputNumber",h["a"]),YV.component("Divider",v["a"]),YV.component("Button",j["a"]),YV.component("ButtonGroup",j["a"].Group),YV.component("Tooltip",f["a"]),YV.component("Popover",O["a"]),YV.component("Slider",m["a"]),YV.component("Select",p["a"]),YV.component("SelectOption",p["a"].Option),YV.component("SelectOptGroup",p["a"].OptGroup),YV.component("Switch",b["a"]),YV.component("Radio",u["a"]),YV.component("RadioGroup",u["a"].Group),YV.component("RadioButton",u["a"].Button),YV.component("Input",d["a"]),YV.component("InputGroup",d["a"].Group),YV.component("TextArea",d["a"].TextArea),YV.component("Modal",s["a"]),YV.component("Dropdown",i["a"]),YV.component("Menu",r["a"]),YV.component("MenuItem",r["a"].Item),YV.component("Checkbox",a["a"]),YV.component("Drawer",c["a"]),YV.component("Spin",n["a"]),YV.use(pw),YV.use(VV),YV.use(XV),YV.use(Object(g["a"])()),YV.mount("#app")},cd4f:function(e,t,l){},cd7e:function(e,t,l){"use strict";l("fb92")},d1ee:function(e,t,l){},d2a1:function(e,t,l){},d2a4:function(e,t,l){},d2ee:function(e,t,l){"use strict";l("36ac")},d2f3:function(e,t,l){"use strict";l("8cab")},d31d:function(e,t,l){},d422:function(e,t,l){},d594:function(e,t,l){},d739:function(e,t,l){},d73b:function(e,t,l){},d806:function(e,t,l){"use strict";l("1441")},d970:function(e,t,l){"use strict";l("97ba")},dcba:function(e,t,l){},dcd4:function(e,t,l){"use strict";l("f567")},dd03:function(e,t,l){"use strict";l("d31d")},dd7b:function(e,t,l){"use strict";l("a832")},de23:function(e,t,l){"use strict";l("1bd7")},e16b:function(e,t,l){},e25c:function(e,t,l){"use strict";l("8bc3")},e2d2:function(e,t,l){"use strict";l("f1ac")},e303:function(e,t,l){"use strict";l("ab80")},e394:function(e,t,l){},e611:function(e,t,l){},e739:function(e,t,l){},e83e:function(e,t,l){"use strict";l("6b65")},e9df:function(e,t,l){"use strict";l("5c9a")},ea69:function(e,t,l){},eae7:function(e,t,l){},eb5e:function(e,t,l){},eba1:function(e,t,l){"use strict";l("889b")},eba5:function(e,t,l){},ec27:function(e,t,l){"use strict";l("e394")},ec31:function(e,t,l){},ecf8:function(e,t,l){"use strict";l("f4fe")},eea7:function(e,t,l){},ef77:function(e,t,l){},f191:function(e,t,l){},f1ac:function(e,t,l){},f40d:function(e,t,l){"use strict";l("0585")},f4fe:function(e,t,l){},f567:function(e,t,l){},fa09:function(e,t,l){},fac9:function(e,t,l){"use strict";l("45c1")},fb85:function(e,t,l){"use strict";l("7434")},fb92:function(e,t,l){},fbfe:function(e,t,l){"use strict";l("ef77")},fef7:function(e,t,l){"use strict";l("084d")},fef8:function(e,t,l){"use strict";l("3c3b")}});
//# sourceMappingURL=app.9ac938f1.js.map