(function(){var e={4408:function(e,t,l){"use strict";var a,n=l(9963),o=l(9876),i=(l(7658),l(6252)),s=l(2262),r=l(3416);(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"})(a||(a={}));var u=l(5804);const c=e=>{const{empty:t}=e.state.selection;t&&(0,u.td)(e.state,e.dispatch)},d=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,a.pos,t))}},p=(e,t,l,a)=>{let n=t;const o=e=>e.type===a;let i=null,s=null,r=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(i&&l!==i)return null;s=s||t,i=i||l,r=t,n++}let u=t,c=l,d=0;n=t-1;while(n>d){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==i)break;u=n,s=t,n--}n=l+1,d=e.nodeSize-2;while(nArray.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,m=(e,t)=>{for(let l=e.depth;l>0;l--){const a=e.node(l);if(t(a))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:a}}},h=e=>t=>m(t.$from,e),f=e=>t=>h((t=>v(e,t)))(t),g=(e,t)=>{const l=t.schema.nodes[e];return!!f(l)(t.selection)},y=e=>{const{selection:t,doc:l}=e.state,{from:a}=t;let n=l.nodeAt(a)||l.nodeAt(a-1);return n?.lastChild&&(n=n.lastChild),n?.marks||[]},w=(e,t,l)=>{for(const a of e)if(a.type.name===t&&a.attrs[l])return a.attrs[l];return null},x=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},k=(e,t)=>{const{from:l,$from:a,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||a.marks()):e.doc.rangeHasMark(l,n,t)},b=(e,t)=>{const{selection:l,doc:a}=e.state,{from:n,to:o}=l;let i=!0,s="";return a.nodesBetween(n,o,(e=>(i&&e.attrs[t]&&(i=!1,s=e.attrs[t]),i))),s},_={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},I=(e,t={})=>{const l={..._,...t},a=y(e),n=x(a,"strong"),o=x(a,"em"),i=x(a,"underline"),s=x(a,"strikethrough"),r=x(a,"superscript"),u=x(a,"subscript"),c=x(a,"code"),d=w(a,"forecolor","color")||l.color,p=w(a,"backcolor","backcolor")||l.backcolor,v=w(a,"fontsize","fontsize")||l.fontsize,m=w(a,"fontname","fontname")||l.fontname,h=w(a,"link","href")||"",f=b(e,"align")||l.align,k=g("bullet_list",e.state),I=g("ordered_list",e.state),S=g("blockquote",e.state);return{bold:n,em:o,underline:i,strikethrough:s,superscript:r,subscript:u,code:c,color:d,backcolor:p,fontsize:v,fontname:m,link:h,align:f,bulletList:k,orderedList:I,blockquote:S}},S=e=>{const t=y(e),l=w(t,"fontsize","fontsize")||_.fontsize;return parseInt(l)},C={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},L=[{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"}],E=[{label:"得意黑",value:"得意黑"},{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}],T=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,a=100,n=100,o="a",i=document.createElement("canvas"),s=i.getContext("2d",{willReadFrequently:!0});if(!s)return!1;i.width=a,i.height=n,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";const r=e=>{s.clearRect(0,0,a,n),s.font=`${l}px ${e}, ${t}`,s.fillText(o,a/2,n/2);const i=s.getImageData(0,0,a,n).data;return[].slice.call(i).filter((e=>0!==e))};return r(t).join("")!==r(e).join("")};var M=l(7234),U=l(6486);const W=[{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:"

PPTIST

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

基于 Vue 3.x + TypeScript 的在线演示文稿应用

",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:"

在此处添加标题

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",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:"

感谢观看

",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],D={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},H=[{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:"

输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"

请在此处输入副标题

",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:"

在此处添加标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"

在此处添加副标题

",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:"

感谢观看

",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:"

01

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"

在此处输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"
  1. 在此处输入内容

  2. 在此处输入内容

  3. 在此处输入内容

  4. 在此处输入内容

  5. 在此处输入内容

  6. 在此处输入内容

",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:"

1

",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:"

4

",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:"

3

",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:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"

在此输入内容

",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:"

01

",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:"

在此处添加标题

",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:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

1.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

2.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

3.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

4.请输入标题

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"

在此处输入内容

在此处输入内容

在此处输入内容

",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:"

请在此处输入标题

",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:"

请在此处输入内容1

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"

请在此处输入内容2

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"

请在此处输入内容3

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"

请在此处输入内容4

",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:"

1

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",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:"

2

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",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:"

3

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",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:"

4

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",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:"

5

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",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:"

6

",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"

在此输入内容

在此输入内容

在此输入内容

",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],F=(0,o.Q_)("slides",{state:()=>({title:"未命名演示文稿",theme:D,slides:W,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id));return t.animations.filter((e=>a.includes(e.elId)))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const l=t.elements,a=l.map((e=>e.id)),n=t.animations.filter((e=>a.includes(e.elId))),o=[];for(const i of n)if("click"!==i.trigger&&o.length){if("meantime"===i.trigger){const e=o[o.length-1];e.animations=e.animations.filter((e=>e.elId!==i.elId)),e.animations.push(i),o[o.length-1]=e}else if("auto"===i.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[i],autoNext:!1})}}else o.push({animations:[i],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:a,backgroundColor:n}=e.theme,o=(0,M.Z)(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",i=JSON.stringify(H).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",a).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(i)}},actions:{setTitle(e){this.title=e||"未命名演示文稿"},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 o=0;oe.id===t[o]));l.push(e)}let a=Math.min(...l);const n=this.slides.length-t.length-1;a>n&&(a=n),this.slideIndex=a,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,a=[...l,...t];this.slides[this.slideIndex].elements=a},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,a=l.filter((e=>!t.includes(e.id)));this.slides[this.slideIndex].elements=a},updateElement(e){const{id:t,props:l,slideId:a}=e,n="string"===typeof t?[t]:t,o=a?this.slides.findIndex((e=>e.id===a)):this.slideIndex,i=this.slides[o],s=i.elements.map((e=>n.includes(e.id)?{...e,...l}:e));this.slides[o].elements=s},removeElementProps(e){const{id:t,propName:l}=e,a="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],i=o.elements.map((e=>e.id===t?(0,U.omit)(e,a):e));this.slides[n].elements=i}}}),A=(0,r.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),Z=A(10),$=(0,o.Q_)("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,creatingCustomShape:!1,availableFonts:L,toolbarState:a.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:C,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:Z,textFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1}),getters:{activeElementList(e){const t=F(),l=t.currentSlide;return l&&l.elements?l.elements.filter((t=>e.activeElementIdList.includes(t.id))):[]},handleElement(e){const t=F(),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},setHiddenElementIdList(e){this.hiddenElementIdList=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},setCreatingCustomShapeState(e){this.creatingCustomShape=e},setAvailableFonts(){this.availableFonts=L.filter((e=>T(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},setTextFormatPainter(e){this.textFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e}}});var O=l(7327),z=l(8134);const R="PPTIST_DISCARDED_DB",B="PPTist",P=async()=>{const e=(new Date).getTime(),t=localStorage.getItem(R),l=t?JSON.parse(t):[],a=await z.Z.getDatabaseNames(),n=a.filter((t=>{if(-1===t.indexOf(B))return!1;const[a,n,o]=t.split("_");return a!==B||!n||!o||(!!l.includes(n)||e-+o>=432e5)}));for(const o of n)z.Z.delete(o);localStorage.removeItem(R)};class N extends z.Z{constructor(){super(`${B}_${Z}_${(new Date).getTime()}`),(0,O.Z)(this,"snapshots",void 0),(0,O.Z)(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const j=new N,Y=(0,o.Q_)("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor=0&&this.snapshotCursoro&&(l.push(t[0]),n--),n>=2&&j.snapshots.update(t[n-2],{index:e.slideIndex}),await j.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=F(),t=$(),l=this.snapshotCursor-1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=F(),t=$(),l=this.snapshotCursor+1,a=await j.snapshots.orderBy("id").toArray(),n=a[l],{index:o,slides:i}=n,s=o>i.length-1?i.length-1:o;e.setSlides(i),e.updateSlideIndex(s),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),V=(0,o.Q_)("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}}}),J=(0,o.Q_)("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),q=(e,t)=>(0,U.padStart)(""+e,t,"0"),X=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);var G,K,Q,ee,te,le,ae=l(3577);(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(G||(G={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(K||(K={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(Q||(Q={})),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"}(ee||(ee={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(te||(te={})),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"}(le||(le={}));const ne=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"粘贴为纯文本",value:"Ctrl + Shift + 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 + F"},{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"}]},{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 + E"},{label:"上角标",value:"Ctrl + ;"},{label:"下角标",value:"Ctrl + '"},{label:"选中段落",value:"ESC"}]}];var oe=l(2152),ie=l.n(oe),se=l(1354),re=l.n(se);const ue="pptist",ce=e=>re().AES.encrypt(e,ue).toString(),de=e=>{const t=re().AES.decrypt(e,ue);return t.toString(re().enc.Utf8)},pe=e=>new Promise(((t,l)=>{const a=document.createElement("button"),n=new(ie())(a,{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(a),a.click(),document.body.removeChild(a)})),ve=()=>new Promise(((e,t)=>{navigator.clipboard?.readText?navigator.clipboard.readText().then((l=>(l||t("剪贴板为空或者不包含文本"),e(l)))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")})),me=e=>{let t;try{t=JSON.parse(de(e))}catch{t=e}return t},he=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const a=[];for(const n in t){if(a[n]=t[n].split("\t"),1===a[n].length)return null;if(-1===l)l=a[n].length;else if(l!==a[n].length)return null}return a},fe=e=>{const{left:t,top:l,width:a,height:n,rotate:o=0}=e,i=Math.sqrt(Math.pow(a,2)+Math.pow(n,2))/2,s=180*Math.atan(n/a)/Math.PI,r=(180-o-s)*Math.PI/180,u=(s-o)*Math.PI/180,c=t+a/2,d=l+n/2,p=[c+i*Math.cos(r),c+i*Math.cos(u),c-i*Math.cos(r),c-i*Math.cos(u)],v=[d-i*Math.sin(r),d-i*Math.sin(u),d+i*Math.sin(r),d+i*Math.sin(u)];return{xRange:[Math.min(...p),Math.max(...p)],yRange:[Math.min(...v),Math.max(...v)]}},ge=e=>{const{xRange:t,yRange:l}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:a,yRange:n}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:a[0]-t[0],offsetY:n[0]-l[0]}},ye=e=>{let t,l,a,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),a=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:i,width:s,height:r,rotate:u}=e,{xRange:c,yRange:d}=fe({left:o,top:i,width:s,height:r,rotate:u});t=c[0],l=c[1],a=d[0],n=d[1]}else t=e.left,l=e.left+e.width,a=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:a,maxY:n}},we=e=>{const t=[],l=[],a=[],n=[];e.forEach((e=>{const{minX:o,maxX:i,minY:s,maxY:r}=ye(e);t.push(o),l.push(s),a.push(i),n.push(r)}));const o=Math.min(...t),i=Math.max(...a),s=Math.min(...l),r=Math.max(...n);return{minX:o,maxX:i,minY:s,maxY:r}},xe=e=>{const t=[];return e.forEach((e=>{const l=t.findIndex((t=>t.value===e.value));if(-1===l)t.push(e);else{const a=t[l],n=Math.min(a.range[0],e.range[0]),o=Math.max(a.range[1],e.range[1]),i=[n,o],s={value:e.value,range:i};t[l]=s}})),t},ke=e=>{const t={};for(const l of e)t[l.id]=(0,r.x0)(10);return t},be=e=>{const t={},l={};for(const a of e){const e=a.groupId;e&&!t[e]&&(t[e]=(0,r.x0)(10)),l[a.id]=(0,r.x0)(10)}return{groupIdMap:t,elIdMap:l}},_e=e=>{const t=(0,M.Z)(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ie=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const a=e.broken.join(",");return`M${t} L${a} L${l}`}if(e.curve){const a=e.curve.join(",");return`M${t} Q${a} ${l}`}if(e.cubic){const[a,n]=e.cubic,o=a.join(","),i=n.join(",");return`M${t} C${o} ${i} ${l}`}return`M${t} L${l}`};var Se=l(6108),Ce=l(1061),Le=l(8261),Ee=l(9512),Te=l(2025),Me=l(9872),Ue=l(1321),We=l(2696),De=l(3271),He=l(9015),Fe=l(5761),Ae=l(7559),Ze=l(4023),$e=l(4141),Oe=l(5010),ze=l(6492),Re=l(1094),Be=l(2677),Pe=l(683),Ne=l(7259),je=l(1258),Ye=l(9978),Ve=l(597),Je=l(85),qe=l(6071),Xe=l(2489),Ge=l(9925),Ke=l(5361),Qe=l(3185),et=l(139),tt=l(8461),lt=l(2882),at=l(3862),nt=l(3764),ot=l(9371),it=l(9912),st=l(3935),rt=l(3735),ut=l(3542),ct=l(7537),dt=l(5314),pt=l(3325),vt=l(3275),mt=l(3317),ht=l(7712),ft=l(9370),gt=l(2778),yt=l(4422),wt=l(4957),xt=l(7872),kt=l(5356),bt=l(8684),_t=l(9577),It=l(887),St=l(6866),Ct=l(509),Lt=l(7606),Et=l(4412),Tt=l(8814),Mt=l(2057),Ut=l(6048),Wt=l(5114),Dt=l(9917),Ht=l(7747),Ft=l(7425),At=l(6717),Zt=l(6302),$t=l(3060),Ot=l(7107),zt=l(2100),Rt=l(5460),Bt=l(5268),Pt=l(1432),Nt=l(5193),jt=l(4566),Yt=l(7091),Vt=l(9602),Jt=l(4891),qt=l(4012),Xt=l(3681),Gt=l(1440),Kt=l(3482),Qt=l(646),el=l(8e3),tl=l(4628),ll=l(9141),al=l(1060),nl=l(8389),ol=l(3467),il=l(6935),sl=l(3590),rl=l(6453),ul=l(5957),cl=l(4467),dl=l(5547),pl=l(5650),vl=l(2790),ml=l(5620),hl=l(3339),fl=l(4666),gl=l(5215),yl=l(904),wl=l(3650),xl=l(4296),kl=l(6519),bl=l(4790),_l=l(3260),Il=l(2146),Sl=l(6755),Cl=l(2849),Ll=l(6940),El=l(6116),Tl=l(5741),Ml=l(2939),Ul=l(9524),Wl=l(6135),Dl=l(6821),Hl=l(6149);const Fl={IconPlayOne:Hl.Z,IconFullScreenPlay:Dl.Z,IconLock:Wl.Z,IconUnlock:Ul.Z,IconPpt:Ml.Z,IconFormat:Tl.Z,IconPicture:El.Z,IconFullScreen:Ll.Z,IconList:Cl.Z,IconOrderedList:Sl.Z,IconFlipVertically:Il.Z,IconFlipHorizontally:_l.Z,IconFontSize:bl.Z,IconCode:kl.Z,IconTextBold:xl.Z,IconTextItalic:wl.Z,IconTextUnderline:yl.Z,IconStrikethrough:gl.Z,IconEdit:fl.Z,IconQuote:hl.Z,IconBackgroundColor:ml.Z,IconGroup:vl.Z,IconUngroup:pl.Z,IconBack:dl.Z,IconNext:cl.Z,IconFullwidth:ul.Z,IconAlignTop:rl.Z,IconAlignLeft:sl.Z,IconAlignRight:il.Z,IconAlignBottom:ol.Z,IconAlignVertically:nl.Z,IconAlignHorizontally:al.Z,IconBringToFront:ll.Z,IconSendToBack:tl.Z,IconAlignTextLeft:el.Z,IconAlignTextRight:Qt.Z,IconAlignTextCenter:Kt.Z,IconAlignTextBoth:Gt.Z,IconRowHeight:Xt.Z,IconWrite:qt.Z,IconInsertTable:Jt.Z,IconAddText:Vt.Z,IconFill:Yt.Z,IconTailoring:jt.Z,IconEffects:Nt.Z,IconColorFilter:Pt.Z,IconUp:Bt.Z,IconDown:Rt.Z,IconPlus:zt.Z,IconMinus:Ot.Z,IconConnection:$t.Z,IconBringToFrontOne:Zt.Z,IconSentToBack:At.Z,IconGithub:Ft.Z,IconChartProportion:Ht.Z,IconChartHistogram:Dt.Z,IconChartHistogramOne:Wt.Z,IconChartLineArea:Ut.Z,IconChartRing:Mt.Z,IconChartScatter:Tt.Z,IconChartLine:Et.Z,IconChartPie:Lt.Z,IconText:Ct.Z,IconRotate:St.Z,IconLeftTwo:It.Z,IconRightTwo:_t.Z,IconPlatte:bt.Z,IconClose:kt.Z,IconCloseSmall:xt.Z,IconUndo:wt.Z,IconTransform:yt.Z,IconClick:gt.Z,IconTheme:ft.Z,IconArrowCircleLeft:ht.Z,IconGraphicDesign:mt.Z,IconLogout:vt.Z,IconErase:pt.Z,IconClear:dt.Z,IconAlignTextTopOne:ct.Z,IconAlignTextBottomOne:ut.Z,IconAlignTextMiddleOne:rt.Z,IconPause:st.Z,IconVolumeMute:it.Z,IconVolumeNotice:ot.Z,IconVolumeSmall:nt.Z,IconVideoTwo:at.Z,IconFormula:lt.Z,IconLinkOne:tt.Z,IconFullScreenOne:et.Z,IconOffScreenOne:Qe.Z,IconPower:Ke.Z,IconListView:Ge.Z,IconMagic:Xe.Z,IconHighLight:qe.Z,IconDownload:Je.Z,IconIndentLeft:Ve.Z,IconIndentRight:Ye.Z,IconVerticalSpacingBetweenItems:je.Z,IconCopy:Ne.Z,IconDelete:Pe.Z,IconSquare:Be.Z,IconRound:Re.Z,IconNeedle:ze.Z,IconTextRotationNone:Oe.Z,IconTextRotationDown:$e.Z,IconFormatBrush:Ze.Z,IconPreviewOpen:Ae.Z,IconPreviewClose:Fe.Z,IconStopwatchStart:He.Z,IconSearch:De.Z,IconLeft:We.Z,IconRight:Ue.Z,IconMoveOne:Me.Z,IconHamburgerButton:Te.Z,IconAttention:Ee.Z,IconCheckOne:Le.Z,IconCloseOne:Ce.Z,IconInfo:Se.Z};var Al={install(e){for(const t of Object.keys(Fl))e.component(t,Fl[t])}};const Zl=["id"],$l={class:"icons"},Ol={class:"content"},zl={key:0,class:"title"},Rl={class:"description"},Bl={key:0,class:"control"};var Pl=(0,i.aZ)({__name:"Message",props:{id:{},message:{},type:{default:"success"},title:{default:""},duration:{default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:l}){const a=e,{IconAttention:o,IconCheckOne:r,IconCloseOne:u,IconInfo:c,IconCloseSmall:d}=Fl,p=(0,s.iH)(!0),v=(0,s.iH)(null),m=()=>{a.duration<=0||(v.value=setTimeout(f,a.duration))},h=()=>{v.value&&clearTimeout(v.value)},f=()=>p.value=!1;return(0,i.wF)((()=>{h()})),(0,i.bv)((()=>{m()})),t({close:f}),(e,t)=>((0,i.wg)(),(0,i.j4)(n.uT,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:t[3]||(t[3]=e=>l("close")),onAfterLeave:t[4]||(t[4]=e=>l("destroy"))},{default:(0,i.w5)((()=>[p.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"message",id:e.id},[(0,i._)("div",{class:"message-container",onMouseenter:t[1]||(t[1]=e=>h()),onMouseleave:t[2]||(t[2]=e=>m())},[(0,i._)("div",$l,["warning"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(o),{key:0,theme:"filled",size:"18",fill:"#faad14"})):(0,i.kq)("",!0),"success"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(r),{key:1,theme:"filled",size:"18",fill:"#52c41a"})):(0,i.kq)("",!0),"error"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(u),{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):(0,i.kq)("",!0),"info"===e.type?((0,i.wg)(),(0,i.j4)((0,s.SU)(c),{key:3,theme:"filled",size:"18",fill:"#1677ff"})):(0,i.kq)("",!0)]),(0,i._)("div",Ol,[e.title?((0,i.wg)(),(0,i.iD)("div",zl,(0,ae.zw)(e.title),1)):(0,i.kq)("",!0),(0,i._)("div",Rl,(0,ae.zw)(e.message),1)]),e.closable?((0,i.wg)(),(0,i.iD)("div",Bl,[(0,i._)("span",{class:"close-btn",onClick:t[0]||(t[0]=e=>f())},[(0,i.Wm)((0,s.SU)(d))])])):(0,i.kq)("",!0)],32)],8,Zl)):(0,i.kq)("",!0)])),_:1}))}}),Nl=l(3744);const jl=(0,Nl.Z)(Pl,[["__scopeId","data-v-2231702e"]]);var Yl=jl;const Vl=[];let Jl=null,ql=0;const Xl={duration:3e3},Gl=e=>{const t="message-"+ql++,l={...Xl,...e,id:t};Jl||(Jl=document.createElement("div"),Jl.className="message-wrap",Jl.style.cssText="\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 6000;\n pointer-events: none;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 15px;\n background-color: rgba(255, 255, 255, 0);\n transition: all 1s ease-in-out;\n align-items: center;\n ",document.body.appendChild(Jl));const a=(0,i.Wm)(Yl,l,null),o=document.createElement("div");a.appContext=e.ctx||Gl._context||null,a.props.onClose=e.onClose,a.props.onDestroy=()=>{Jl&&Jl.childNodes.length<=1&&(Jl.remove(),Jl=null),(0,n.sY)(null,o)},(0,n.sY)(a,o),Jl.appendChild(o.firstElementChild);const s={id:t,close:()=>a?.component?.exposed?.close()};return Vl.push(s),s};Gl.success=(e,t)=>Gl({...t,type:"success",message:e}),Gl.info=(e,t)=>Gl({...t,type:"info",message:e}),Gl.warning=(e,t)=>Gl({...t,type:"warning",message:e}),Gl.error=(e,t)=>Gl({...t,type:"error",message:e}),Gl.closeAll=function(){for(let e=Vl.length-1;e>=0;e--)Vl[e].close()};var Kl=Gl;const Ql=e=>{const t=e.replace(/[\n\r]+/g,"
"),l=t.split("
");let a="";for(const n of l)n&&(a+=`
${n}
`);return a},ea=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,a=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:a})},l.onerror=()=>{l.onload=null,l.onerror=null}})),ta=e=>new Promise((t=>{const l=new FileReader;l.addEventListener("load",(()=>{t(l.result)})),l.readAsDataURL(e)})),la=1e3;var aa,na;(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["CUT_ROUND_RECT"]="cutRoundRect",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"})(aa||(aa={})),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"}(na||(na={}));const oa={[aa.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L ${a} ${t} Q 0 ${t} 0 ${t-a} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t-a} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L ${a} ${t} Z`}},[aa.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} Z`}},[aa.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} L ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e} 0 L ${e} ${t-a} Q ${e} ${t} ${e-a} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[aa.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 ${a} Q 0 0 ${a} 0 L ${e-a} 0 Q ${e} 0 ${e} ${a} L ${e} ${t} L 0 ${t} Z`}},[aa.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${a} L ${e} ${t} L 0 ${t} L 0 ${a} Q 0 0 ${a} 0 Z`}},[aa.MESSAGE]:{formula:(e,t)=>{const l=.2*e,a=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-a} L ${e/2} ${t-a} L ${e/2-l} ${t} L ${e/2-l} ${t-a} L 0 ${t-a} Z`}},[aa.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),a=.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-a} ${t} L ${e/2-a} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[aa.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-a} L ${a} ${t-a} L ${a} 0 Z`}},[aa.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${a} ${a} L ${a} ${t-a} L ${e-a} ${t-a} L ${e-a} ${a} Z`}},[aa.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const a=Math.min(e,t)*l;return`M ${e/2-a/2} 0 L ${e/2-a/2} ${t/2-a/2} L 0 ${t/2-a/2} L 0 ${t/2+a/2} L ${e/2-a/2} ${t/2+a/2} L ${e/2-a/2} ${t} L ${e/2+a/2} ${t} L ${e/2+a/2} ${t/2+a/2} L ${e} ${t/2+a/2} L ${e} ${t/2-a/2} L ${e/2+a/2} ${t/2-a/2} L ${e/2+a/2} 0 Z`}},[aa.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L 0 ${t} L ${e} ${t} Z`}},[aa.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e} 0 L ${e-a} ${t} L 0 ${t} Z`}},[aa.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M 0 0 L ${e-a} 0 L ${e} ${t} L ${a} ${t} Z`}},[aa.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${a} 0 L ${e-a} 0 L ${e} ${t} L 0 ${t} Z`}},[aa.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const a=t*l;return`M ${e/2} 0 L 0 ${a} L 0 ${t} L ${e} ${t} L ${e} ${a} Z`}},[aa.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:e=>e,formula:(e,t,l)=>{const a=e*l;return`M ${e} ${t/2} L ${e-a} 0 L 0 0 L ${a} ${t/2} L 0 ${t} L ${e-a} ${t} Z`}}},ia=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",pptxShapeType:"rect"},{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:aa.ROUND_RECT,pptxShapeType:"roundRect"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:aa.CUT_RECT_SINGLE,pptxShapeType:"snip1Rect"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:aa.CUT_RECT_SAMESIDE,pptxShapeType:"snip2SameRect"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:aa.CUT_RECT_DIAGONAL,pptxShapeType:"snip2DiagRect"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.CUT_ROUND_RECT,pptxShapeType:"snipRoundRect"},{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:aa.ROUND_RECT_SINGLE,pptxShapeType:"round1Rect"},{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:aa.ROUND_RECT_SAMESIDE,pptxShapeType:"round2SameRect"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:aa.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"},{viewBox:[200,200],path:"M 0 80 L 60 0 L 100 40 L 180 20 L 200 120 L 160 200 L 0 200 L 60 140 Z",title:"任意多边形"}]},{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",pptxShapeType:"ellipse"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:aa.TRIANGLE,pptxShapeType:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:aa.PARALLELOGRAM_LEFT,pptxShapeType:"parallelogram"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:aa.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:aa.TRAPEZOID,pptxShapeType:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z",pptxShapeType:"diamond"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:aa.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:aa.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{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",pptxShapeType:"pie"},{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",pptxShapeType:"chord"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z",pptxShapeType:"teardrop"},{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",pptxShapeType:"pentagon"},{viewBox:[200,200],path:"M 40 0 L 160 0 L 200 100 L 160 200 L 40 200 L 0 100 Z",pptxShapeType:"hexagon"},{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",pptxShapeType:"octagon"},{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:aa.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:aa.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:aa.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:aa.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:aa.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 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z",pptxShapeType:"star4"},{viewBox:[1024,1024],path:"M1018.67652554 400.05983681l-382.95318779-5.89158658L512 34.78141155 388.27666225 394.16825023l-382.95318779 5.89158658L311.68602415 629.83174977l-117.83174978 365.27842665 312.25413766-223.88032637 312.25413904 223.88032637-117.83175116-365.27842665 318.14572563-229.77191296z",pptxShapeType:"star5",special:!0},{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 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z",pptxShapeType:"star6"},{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"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 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",pptxShapeType:"upArrow"},{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",pptxShapeType:"downArrow"},{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",pptxShapeType:"leftArrow"},{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",pptxShapeType:"rightArrow"},{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",pptxShapeType:"upDownArrow"},{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",pptxShapeType:"leftRightArrow"},{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",pptxShapeType:"notchedRightArrow"},{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",pptxShapeType:"chevron"},{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",pptxShapeType:"homePlate"},{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},{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 m220.16 343.26755556l-239.616 332.23111111c-14.44977778 20.13866667-44.37333333 20.13866667-58.82311111 0L291.84 481.16622222c-4.32355555-6.03022222 0-14.44977778 7.39555555-14.44977777h53.36177778c11.60533333 0 22.64177778 5.57511111 29.46844445 15.13244444l81.00977777 112.41244444 178.85866667-248.03555555c6.82666667-9.44355555 17.74933333-15.13244445 29.46844445-15.13244445H724.76444445c7.39555555 0 11.71911111 8.41955555 7.39555555 14.44977778z",special:!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 m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h418.70222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!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 m188.18844445 703.37422223l-75.09333334-0.34133333L512 570.48177778l-112.98133333 134.71288889-75.20711112 0.34133333c-5.00622222 0-9.10222222-3.98222222-9.10222222-9.10222222 0-2.16177778 0.79644445-4.20977778 2.16177778-5.91644445l148.02488889-176.35555555L316.87111111 337.92c-1.36533333-1.70666667-2.16177778-3.75466667-2.16177778-5.91644445 0-5.00622222 4.096-9.10222222 9.10222222-9.10222222l75.20711112 0.34133334L512 458.06933333l112.98133333-134.71288888 75.09333334-0.34133334c5.00622222 0 9.10222222 3.98222222 9.10222222 9.10222222 0 2.16177778-0.79644445 4.20977778-2.16177778 5.91644445L559.21777778 514.27555555l147.91111111 176.35555556c1.36533333 1.70666667 2.16177778 3.75466667 2.16177778 5.91644444 0 5.00622222-4.096 9.10222222-9.10222222 9.10222223z",special:!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 m218.45333333 537.03111112c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222H548.40888889v172.94222222c0 5.00622222-4.096 9.10222222-9.10222222 9.10222222h-54.61333334c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V548.40888889H302.64888889c-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222v-54.61333334c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h172.94222222V302.64888889c0-5.00622222 4.096-9.10222222 9.10222222-9.10222222h54.61333334c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v172.94222222h172.94222222c5.00622222 0 9.10222222 4.096 9.10222222 9.10222222v54.61333334z",special:!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 m163.95377778 517.57511112L427.46311111 700.64355555c-1.59288889 1.13777778-3.41333333 1.70666667-5.34755556 1.70666667-5.00622222 0-9.10222222-4.096-9.10222222-9.10222222V331.88977778c0-1.93422222 0.56888889-3.75466667 1.70666667-5.34755556 2.95822222-4.096 8.64711111-5.00622222 12.74311111-2.048L675.95377778 505.17333333c0.79644445 0.56888889 1.47911111 1.25155555 2.048 2.048 2.95822222 3.98222222 2.048 9.67111111-2.048 12.62933334z",special:!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 m200.81777778 666.39644445l-32.54044445 44.37333333c-2.95822222 4.096-8.64711111 4.89244445-12.74311111 1.93422222L479.34577778 577.76355555c-2.38933333-1.70666667-3.75466667-4.43733333-3.75466667-7.39555555V257.13777778c0-5.00622222 4.096-9.10222222 9.10222222-9.10222223h54.72711112c5.00622222 0 9.10222222 4.096 9.10222222 9.10222223v281.6l162.24711111 117.30488889c4.096 2.84444445 5.00622222 8.53333333 2.048 12.62933333z",special:!0},{viewBox:[1024,1024],path:"M981.10577778 314.48177778c-25.6-61.09866667-62.464-115.93955555-109.34044445-163.04355556-46.87644445-46.99022222-101.60355555-83.968-162.70222222-109.568C646.59911111 15.58755555 580.38044445 2.27555555 512 2.27555555h-2.27555555c-68.83555555 0.34133333-135.39555555 13.99466667-198.08711112 40.84622223-60.52977778 25.94133333-114.80177778 62.80533333-161.22311111 109.79555555-46.42133333 46.99022222-82.83022222 101.60355555-108.08888889 162.47466667C16.27022222 378.42488889 3.072 445.44 3.41333333 514.38933333c0.34133333 78.96177778 19.22844445 157.35466667 54.49955556 227.44177778v172.94222222c0 28.89955555 23.43822222 52.33777778 52.224 52.33777778h172.71466666c69.97333333 35.38488889 148.13866667 54.272 226.98666667 54.61333334h2.38933333c68.03911111 0 133.91644445-13.19822222 196.03911112-39.02577778 60.75733333-25.37244445 115.37066667-61.78133333 162.13333333-108.31644445 46.87644445-46.53511111 83.74044445-100.92088889 109.568-161.56444444 26.73777778-62.80533333 40.39111111-129.59288889 40.73244445-198.54222223 0.22755555-69.29066667-13.19822222-136.53333333-39.59466667-199.79377777zM284.89955555 566.61333333c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955556 54.61333333-24.34844445 54.61333333-54.49955556 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955555-54.61333333s24.46222222-54.61333333 54.49955555-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z m227.10044445 0c-30.03733333 0-54.49955555-24.46222222-54.49955556-54.61333333s24.46222222-54.61333333 54.49955556-54.61333333 54.49955555 24.46222222 54.49955555 54.61333333-24.46222222 54.61333333-54.49955555 54.61333333z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM745.4750693 325.8561164l-267.95558363 371.52436096c-16.15876501 22.52048353-49.62140436 22.52048353-65.78016939 0L253.07805667 477.51948567c-4.83490607-6.74342161 0-16.15876501 8.27023406-16.15876499h59.67291961c12.97790576 0 25.31963967 6.23448413 32.95370188 16.92217123l90.59087157 125.70755774 200.01242995-277.37092701c7.63406221-10.56045272 19.84856175-16.92217125 32.95370189-16.92217124H737.20483524c8.27023407 0 13.10514012 9.41534338 8.27023406 16.158765z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h468.2224823c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM720.79160148 697.63494611c5.59831228 6.61618726 0.8906406 16.6677025-7.76129658 16.66770249h-74.94104404c-5.98001539 0-11.70556205-2.67192177-15.64982754-7.25235911L512 575.36271635l-110.43943332 131.68757314c-3.81703111 4.58043732-9.54257777 7.25235911-15.64982754 7.25235911H310.9696951c-8.65193717 0-13.35960887-10.05151525-7.76129658-16.66770249L458.81603326 512 303.20839852 326.36505389c-5.59831228-6.61618726-0.8906406-16.6677025 7.76129658-16.66770249h74.94104404c5.98001539 0 11.70556205 2.67192177 15.64982754 7.25235911L512 448.63728365l110.43943332-131.68757314c3.81703111-4.58043732 9.54257777-7.25235911 15.64982754-7.25235911H713.0303049c8.65193717 0 13.35960887 10.05151525 7.76129658 16.66770249L565.18396674 512l155.60763474 185.63494611z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM677.02297814 523.19662459L423.31764398 722.70011704c-9.41534338 7.37959347-23.28388974 0.76340622-23.28388975-11.19662459V312.62374191c0-11.9600308 13.86854636-18.70345241 23.28388975-11.19662457l253.70533416 199.37625807c7.25235911 5.72554666 7.25235911 16.6677025 0 22.39324918z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 3.06251924H43.7775177c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499846v936.4449646c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h936.4449646c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V43.7775177c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846zM756.28999077 542.53624885c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962H552.71499847v193.39624268c0 5.59831228-4.58043732 10.17874961-10.17874962 10.17874962h-61.0724977c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962V552.71499847H277.88875885c-5.59831228 0-10.17874961-4.58043732-10.17874962-10.17874962v-61.0724977c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h193.39624268V277.88875885c0-5.59831228 4.58043732-10.17874961 10.17874962-10.17874962h61.0724977c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v193.39624268h193.39624268c5.59831228 0 10.17874961 4.58043732 10.17874962 10.17874962v61.0724977z",special:!0},{viewBox:[1024,1024],path:"M902.67315697 135.41705551L528.62204754 7.94466448C524.10877635 6.40354749 518.05438818 5.63298899 512 5.63298899s-12.10877635 0.7705585-16.62204754 2.31167549L121.32684303 135.41705551c-9.13662215 3.08223399-16.62204754 13.64989334-16.62204753 23.33691443v531.02488283c0 9.68702108 6.27454775 22.45627614 13.87005291 28.51066431L498.0198673 1013.9638196c3.85279247 2.9721542 8.8063828 4.51327118 13.87005291 4.51327118s10.12734022-1.54111698 13.87005291-4.51327118l379.4450189-295.67430252c7.59550517-5.94430839 13.87005291-18.71356345 13.87005291-28.51066431V158.75396994c0.22015956-9.68702108-7.26526581-20.14460066-16.40188796-23.33691443zM712.89560763 323.43332829L478.86598471 645.63685899c-7.04510625 9.68702108-21.57563786 9.68702108-28.6207441 0l-139.14084824-191.5388259c-4.18303182-5.8342286 0-13.9801327 7.15518603-13.9801327h60.76404132c5.61406904 0 11.0079785 2.75199463 14.31037204 7.26526582l71.22162091 97.97100864 166.11039557-228.74579323c3.30239355-4.51327118 8.58622323-7.26526581 14.31037204-7.26526581H705.7404216c7.15518602 0.11007979 11.33821785 8.25598388 7.15518603 14.09021248z",special:!0},{viewBox:[1024,1024],path:"M959.86498307 186.28001231H797.00498922v-101.78749614c0-44.91373267-36.51626425-81.42999692-81.42999691-81.42999693H308.42500769c-44.91373267 0-81.42999692 36.51626425-81.42999691 81.42999693v101.78749614H64.13501693c-22.52048353 0-40.71499847 18.19451494-40.71499846 40.71499847v40.71499845c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874962h76.8495596l31.42688945 665.43575611c2.03574992 43.38692024 37.91584233 77.61296581 81.30276254 77.6129658h577.64404066c43.5141546 0 79.26701262-34.09881122 81.30276254-77.6129658l31.42688945-665.43575611H990.40123192c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874962v-40.71499845c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499847z m-254.46874039 0H318.60375732v-91.60874653h386.79248536v91.60874653z",special:!0},{viewBox:[1024,1024],path:"M980.2224823 248.62485371H654.50249462V104.85001539c0-22.52048353-18.19451494-40.71499847-40.71499847-40.71499846H94.67126578v-50.89374808c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-71.25124732c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v997.5174623c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h71.25124732c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961V674.85999383h315.54123807v143.77483833c0 22.52048353 18.19451494 40.71499847 40.71499846 40.71499846h529.29497999c22.52048353 0 40.71499847-18.19451494 40.71499846-40.71499846V289.33985217c0-22.52048353-18.19451494-40.71499847-40.71499846-40.71499846z",special:!0},{viewBox:[1024,1024],path:"M804.63905145 265.16532183V94.67126578h109.42155836c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961H109.93939019c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h109.42155836v170.49405605c0 103.6960117 53.94737296 194.92305513 135.3773699 246.83467817-81.42999692 51.91162303-135.37736988 143.13866646-135.3773699 246.83467817v170.49405605h-109.42155836c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v71.25124732c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h804.12121962c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-71.25124732c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961h-109.42155836V758.83467817c0-103.6960117-53.94737296-194.92305513-135.3773699-246.83467817 81.42999692-51.91162303 135.37736988-143.13866646 135.3773699-246.83467817z",special:!0},{viewBox:[1024,1024],path:"M1020.928 448.44373333l-35.36213334-373.4528c-1.79200001-19.3536-17.2032-34.64533332-36.55679999-36.55679999L575.55626667 3.072h-0.47786666c-3.82293334 0-6.8096 1.19466667-9.07946669 3.46453333L6.53653333 565.99893332c-4.65919999 4.65919999-4.65919999 12.1856 0 16.84480001l434.61973334 434.61973334c2.26986667 2.26986667 5.25653333 3.46453333 8.48213333 3.46453333s6.21226667-1.19466667 8.48213333-3.46453333l559.46239999-559.46239999c2.38933332-2.5088 3.584-5.97333334 3.34506668-9.55733335zM735.40266668 362.66666667c-42.17173333 0-76.45866667-34.28693333-76.45866667-76.45866667s34.28693333-76.45866667 76.45866667-76.45866667 76.45866667 34.28693333 76.45866665 76.45866667-34.28693333 76.45866667-76.45866665 76.45866667z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M1009.55537674 75.96950982l-61.38012212-61.38012214c-4.48769762-4.48769762-11.870684-4.48769762-16.3583816 0L14.44462326 931.67210859c-4.48769762 4.48769762-4.48769762 11.870684 0 16.35838159l61.38012212 61.38012214c4.48769762 4.48769762 11.870684 4.48769762 16.3583816 0L1009.41061232 92.18312698c4.63246205-4.34293316 4.63246205-11.72591956 0.14476442-16.21361716zM210.88996692 419.35075905c114.94296453 0 208.46079213-93.51782759 208.46079213-208.46079213s-93.51782759-208.46079213-208.46079213-208.4607921-208.46079213 93.51782759-208.4607921 208.4607921 93.51782759 208.46079213 208.4607921 208.46079213z m0-312.69118816c57.47148228 0 104.23039605 46.75891379 104.23039607 104.23039603s-46.75891379 104.23039605-104.23039607 104.23039607-104.23039605-46.75891379-104.23039603-104.23039607 46.75891379-104.23039605 104.23039603-104.23039603zM813.11003308 604.64924095c-114.94296453 0-208.46079213 93.51782759-208.46079213 208.46079213s93.51782759 208.46079213 208.46079213 208.4607921 208.46079213-93.51782759 208.4607921-208.4607921-93.51782759-208.46079213-208.4607921-208.46079213z m0 312.69118816c-57.47148228 0-104.23039605-46.75891379-104.23039607-104.23039603s46.75891379-104.23039605 104.23039607-104.23039607 104.23039605 46.75891379 104.23039603 104.23039607-46.75891379 104.23039605-104.23039603 104.23039603z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1004.96017383 478.58365209L483.27851088 25.80594621c-4.00443838-3.45210207-9.11354943-5.3852792-14.49882864-5.38527921h-122.20441284c-10.21822208 0-14.91308089 12.70373557-7.18037228 19.33177152l483.57045622 419.77561022H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672657v82.85044938c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672657h807.92996557L339.25681303 984.24756148c-7.7327086 6.76612003-3.0378498 19.33177153 7.18037229 19.33177152h126.34693531c2.62359757 0 5.24719513-0.96658859 7.18037228-2.76168164L1004.96017383 545.41634791c20.2983601-17.67476253 20.2983601-49.1579333 0-66.83269582z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1011.38217956 558.9924242L545.80649025 22.43713295c-17.81503843-20.62055629-49.79794206-20.62055629-67.75325638 0L12.61782044 558.9924242c-6.31241519 7.29434645-1.12220714 18.51641789 8.41655359 18.51641789h113.62347344c6.45269109 0 12.62483038-2.80551785 16.97338308-7.71517411L458.69516062 215.87758959V1005.77114384c0 6.1721393 5.04993216 11.22207145 11.22207144 11.22207145h84.16553588c6.1721393 0 11.22207145-5.04993216 11.22207144-11.22207145V215.87758959l307.06393007 353.91607839c4.20827679 4.90965626 10.38041608 7.71517413 16.97338308 7.71517411h113.62347344c9.53876074 0 14.72896878-11.22207145 8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1009.1026963 459.52804874H201.17273073l483.57045624-419.77561022c7.7327086-6.76612003 3.0378498-19.33177153-7.18037229-19.33177152h-122.20441283c-5.3852792 0-10.49439025 1.93317715-14.49882866 5.38527921L19.03982617 478.58365209c-20.2983601 17.67476253-20.2983601 49.1579333 0 66.69461175L543.89742302 1000.81765136c2.07126124 1.79509307 4.55677472 2.76168163 7.18037228 2.76168164h126.3469353c10.21822208 0 14.91308089-12.70373557 7.18037228-19.33177152L201.17273073 564.47195126H1009.1026963c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672657v-82.85044938c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672657z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1002.96562597 446.49115791h-113.62347344c-6.45269109 0-12.62483038 2.80551785-16.97338308 7.71517411L565.30483938 808.12241041V18.22885616c0-6.1721393-5.04993216-11.22207145-11.22207144-11.22207145h-84.16553588c-6.1721393 0-11.22207145 5.04993216-11.22207144 11.22207145v789.89355425L151.63123055 454.20633202c-4.20827679-4.90965626-10.38041608-7.71517413-16.97338308-7.71517411h-113.62347344c-9.53876074 0-14.72896878 11.36234735-8.41655359 18.51641789L478.19350975 1001.56286705c17.81503843 20.62055629 49.79794206 20.62055629 67.75325638 0L1011.38217956 465.0075758c6.31241519-7.29434645 1.12220714-18.51641789-8.41655359-18.51641789z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M975.82443246 622.46726585H14.8973037c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672658v82.85044937c0 6.07569962 4.97102697 11.04672658 11.04672658 11.04672659h835.6848661L651.32683905 980.10503902c-5.66144737 7.18037229-0.55233633 17.9509307 8.69929718 17.9509307h100.11095967c6.76612003 0 13.11798782-3.0378498 17.39859437-8.42312903l233.08593092-295.63802022c22.78387358-28.99765728 2.20934532-71.52755463-34.79718873-71.52755462zM1009.1026963 296.58883161H173.4178302l199.25533075-252.69387063c5.66144737-7.18037229 0.55233633-17.9509307-8.69929718-17.9509307h-100.11095967c-6.76612003 0-13.11798782 3.0378498-17.39859437 8.42312903L13.37837881 330.00517953c-22.78387358 28.99765728-2.20934532 71.52755463 34.65910466 71.52755462h961.06521283c6.07569962 0 11.04672658-4.97102697 11.04672658-11.04672658v-82.85044937c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M1010.75873115 64.13501693H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874961v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874964h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874964v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874961zM1010.75873115 858.07748691H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874964v81.42999691c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874961h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874961v-81.42999691c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874964zM1010.75873115 461.10625194H13.24126885c-5.59831228 0-10.17874961 4.58043732-10.17874961 10.17874959v81.42999694c0 5.59831228 4.58043732 10.17874961 10.17874961 10.17874959h997.5174623c5.59831228 0 10.17874961-4.58043732 10.17874961-10.17874959v-81.42999694c0-5.59831228-4.58043732-10.17874961-10.17874961-10.17874959z",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},{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}]}],sa={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var ra=()=>{const e=Y(),t=(0,U.debounce)((function(){e.addSnapshot()}),300,{trailing:!0}),l=(0,U.throttle)((function(){e.reDo()}),100,{leading:!0,trailing:!1}),a=(0,U.throttle)((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:a}},ua=()=>{const e=$(),t=F(),{creatingElement:l}=(0,o.Jk)(e),{theme:a,viewportRatio:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=(a,n)=>{t.addElement(a),e.setActiveElementIdList([a.id]),l.value&&e.setCreatingElement(null),setTimeout((()=>{e.setEditorareaFocus(!0)}),0),n&&n(),i()},u=e=>{ea(e).then((({width:t,height:l})=>{const a=l/t;ala?(t=la,l=t*a):l>la*n.value&&(l=la*n.value,t=l/a),s({type:"image",id:(0,r.x0)(10),src:e,width:t,height:l,left:(la-t)/2,top:(la*n.value-l)/2,fixedRatio:!0,rotate:0})}))},c=e=>{const t={type:"chart",id:(0,r.x0)(10),chartType:sa[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[a.value.themeColor],gridColor:a.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}},l={..."bar"===e?{horizontalBars:!1,stackBars:!1}:{},..."horizontalBar"===e?{horizontalBars:!0,stackBars:!1}:{},..."line"===e?{showLine:!0,lineSmooth:!0,showArea:!1}:{},..."area"===e?{showLine:!0,lineSmooth:!0,showArea:!0}:{},..."scatter"===e?{showLine:!1,lineSmooth:!0,showArea:!1}:{},..."pie"===e?{donut:!1}:{},..."ring"===e?{donut:!0}:{}};s({...t,options:l})},d=(e,t)=>{const l={fontname:a.value.fontName,color:a.value.fontColor},o=[];for(let a=0;a{const{left:l,top:n,width:o,height:i}=e,u=t?.content||"",c=t?.vertical||!1,d=(0,r.x0)(10);s({type:"text",id:d,left:l,top:n,width:o,height:i,content:u,rotate:0,defaultFontName:a.value.fontName,defaultColor:a.value.fontColor,vertical:c},(()=>{setTimeout((()=>{const e=document.querySelector(`#editable-element-${d} .ProseMirror`);e&&e.focus()}),0)}))},v=(e,t)=>{const{left:l,top:n,width:o,height:i}=e,u={type:"shape",id:(0,r.x0)(10),left:l,top:n,width:o,height:i,viewBox:t.viewBox,path:t.path,fill:a.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(u.special=!0),t.pathFormula){u.pathFormula=t.pathFormula,u.viewBox=[o,i];const e=oa[t.pathFormula];"editable"in e?(u.path=e.formula(o,i,e.defaultValue),u.keypoint=e.defaultValue):u.path=e.formula(o,i)}s(u)},m=(e,t)=>{const{left:l,top:n,start:o,end:i}=e,u={type:"line",id:(0,r.x0)(10),left:l,top:n,start:o,end:i,points:t.points,color:a.value.themeColor,style:t.style,width:2};t.isBroken&&(u.broken=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCurve&&(u.curve=[(o[0]+i[0])/2,(o[1]+i[1])/2]),t.isCubic&&(u.cubic=[[(o[0]+i[0])/2,(o[1]+i[1])/2],[(o[0]+i[0])/2,(o[1]+i[1])/2]]),s(u)},h=e=>{s({type:"latex",id:(0,r.x0)(10),width:e.w,height:e.h,rotate:0,left:(la-e.w)/2,top:(la*n.value-e.h)/2,path:e.path,latex:e.latex,color:a.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{s({type:"video",id:(0,r.x0)(10),width:500,height:300,rotate:0,left:(la-500)/2,top:(la*n.value-300)/2,src:e})},g=e=>{s({type:"audio",id:(0,r.x0)(10),width:50,height:50,rotate:0,left:(la-50)/2,top:(la*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:a.value.themeColor,src:e})};return{createImageElement:u,createChartElement:c,createTableElement:d,createTextElement:p,createShapeElement:v,createLineElement:m,createLatexElement:h,createVideoElement:f,createAudioElement:g}},ca=()=>{const e=$(),t=F(),{currentSlide:l,slides:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),s=a=>{const{groupIdMap:o,elIdMap:i}=be(a),s=a[0];let r,u=0;do{r=l.value.elements.find((e=>{if(e.type!==s.type)return!1;const{minX:t,maxX:l,minY:a,maxY:n}=ye(e),{minX:o,maxX:i,minY:r,maxY:c}=ye({...s,left:s.left+u,top:s.top+u});return t===o&&l===i&&a===r&&n===c})),r&&(u+=10)}while(r);for(const e of a)e.id=i[e.id],e.left=e.left+u,e.top=e.top+u,e.groupId&&(e.groupId=o[e.groupId]);t.addElement(a),e.setActiveElementIdList(Object.values(i)),n()},u=e=>{const l=ke(e),a=e.map((e=>{const{groupIdMap:t,elIdMap:a}=be(e.elements);for(const n of e.elements)n.id=a[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=(0,r.x0)(10),l.elId=a[l.elId];return{...e,id:l[e.id]}}));t.addSlide(a),n()},c=(0,i.Fl)((()=>!(a.value.length>1)&&!(a.value[0].elements.length>0)));return{addElementsFromData:s,addSlidesFromData:u,isEmptySlide:c}},da=()=>{const{createTextElement:e}=ua(),{addElementsFromData:t,addSlidesFromData:l}=ca(),a=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=n?.onlySlide||!1,i=n?.onlyElements||!1,s=me(e);if("object"===typeof s){const{type:e,data:a}=s;"elements"!==e||o?"slides"!==e||i||l(a):t(a)}else if(!i&&!o){const e=Ql(s);a(e)}};return{pasteTextClipboardData:n}},pa=()=>{const e=$(),t=F(),{selectedSlidesIndex:l,activeElementIdList:a}=(0,o.Jk)(e),{currentSlide:n,slides:s,theme:u,slideIndex:c}=(0,o.Jk)(t),d=(0,i.Fl)((()=>[...l.value,c.value])),p=(0,i.Fl)((()=>s.value.filter(((e,t)=>d.value.includes(t))))),v=(0,i.Fl)((()=>p.value.map((e=>e.id)))),{pasteTextClipboardData:m}=da(),{addSlidesFromData:h}=ca(),{addHistorySnapshot:f}=ra(),g=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},y=l=>{l===le.UP&&c.value>0?(a.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(c.value-1)):l===le.DOWN&&c.value{const t=ce(JSON.stringify({type:"slides",data:p.value}));pe(t).then((()=>{e.setThumbnailsFocus(!0)}))},x=()=>{ve().then((e=>{m(e,{onlySlide:!0})})).catch((e=>Kl.warning(e)))},k=()=>{const l={id:(0,r.x0)(10),elements:[],background:{type:"solid",color:u.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},b=l=>{const{groupIdMap:a,elIdMap:n}=be(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=a[e.groupId]);const o={...l,id:(0,r.x0)(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},_=()=>{const e=JSON.parse(JSON.stringify(n.value));h([e])},I=(l=v.value)=>{s.value.length===l.length?g():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},S=()=>{const e=[...v.value];w(),I(e)},C=()=>{const t=Array.from(Array(s.value.length),((e,t)=>t));e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},L=(e,l)=>{if(l===e)return;const a=JSON.parse(JSON.stringify(s.value)),n=a[l];a.splice(l,1),a.splice(e,0,n),t.setSlides(a),t.updateSlideIndex(e)};return{resetSlides:g,updateSlideIndex:y,copySlide:w,pasteSlide:x,createSlide:k,createSlideByTemplate:b,copyAndPasteSlide:_,deleteSlide:I,cutSlide:S,selectAllSlide:C,sortSlides:L}},va=()=>{const e=$(),t=F(),{activeElementIdList:l}=(0,o.Jk)(e),{currentSlide:a}=(0,o.Jk)(t),{addHistorySnapshot:n}=ra(),i=()=>{const o=JSON.parse(JSON.stringify(a.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},s=l=>{const o=JSON.parse(JSON.stringify(a.value.elements));if(l.groupId){const a=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,a.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(a)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:i,unlockElement:s}},ma=()=>{const e=$(),t=F(),{activeElementIdList:l,activeGroupElementId:a}=(0,o.Jk)(e),{currentSlide:n}=(0,o.Jk)(t),{addHistorySnapshot:i}=ra(),s=()=>{if(!l.value.length)return;let o=[];o=a.value?n.value.elements.filter((e=>e.id!==a.value)):n.value.elements.filter((e=>!l.value.includes(e.id))),e.setActiveElementIdList([]),t.updateSlide({elements:o}),i()},r=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())};return{deleteElement:s,deleteAllElements:r}},ha=()=>{const e=$(),t=F(),{activeElementIdList:l,activeElementList:a,handleElementId:n}=(0,o.Jk)(e),{currentSlide:s}=(0,o.Jk)(t),{addHistorySnapshot:u}=ra(),c=(0,i.Fl)((()=>{if(a.value.length<2)return!1;const e=a.value[0].groupId;if(!e)return!0;const t=a.value.every((t=>(t.groupId&&t.groupId)===e));return!t})),d=()=>{if(!a.value.length)return;let e=JSON.parse(JSON.stringify(s.value.elements));const n=(0,r.x0)(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const i=e.findIndex((e=>e.id===o[o.length-1].id)),c=o.map((e=>e.id));e=e.filter((e=>!c.includes(e.id)));const d=i-o.length+1;e.splice(d,0,...o),t.updateSlide({elements:e}),u()},p=()=>{if(!a.value.length)return;const o=a.value.some((e=>e.groupId));if(!o)return;const i=JSON.parse(JSON.stringify(s.value.elements));for(const e of i)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:i});const r=n.value?[n.value]:[];e.setActiveElementIdList(r),u()};return{canCombine:c,combineElements:d,uncombineElements:p}},fa=()=>{const e=$(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)(e),{pasteTextClipboardData:a}=da(),{deleteElement:n}=ma(),i=()=>{if(!t.value.length)return;const a=ce(JSON.stringify({type:"elements",data:l.value}));pe(a).then((()=>{e.setEditorareaFocus(!0)}))},s=()=>{i(),n()},r=()=>{ve().then((e=>{a(e)})).catch((e=>Kl.warning(e)))},u=()=>{i(),r()};return{copyElement:i,cutElement:s,pasteElement:r,quickCopyElement:u}},ga=()=>{const e=$(),{currentSlide:t}=(0,o.Jk)(F()),{hiddenElementIdList:l}=(0,o.Jk)(e),a=()=>{const a=t.value.elements.filter((e=>!e.lock&&!l.value.includes(e.id))),n=a.map((e=>e.id));e.setActiveElementIdList(n)};return{selectAllElement:a}},ya=()=>{const e=F(),{activeElementIdList:t,activeGroupElementId:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=(o,i=1)=>{let s=[];const r=e=>{let{left:t,top:l}=e;switch(o){case le.LEFT:t-=i;break;case le.RIGHT:t+=i;break;case le.UP:l-=i;break;case le.DOWN:l+=i;break;default:break}return{...e,left:t,top:l}};s=l.value?a.value.elements.map((e=>l.value===e.id?r(e):e)):a.value.elements.map((e=>t.value.includes(e.id)?r(e):e)),e.updateSlide({elements:s}),n()};return{moveElement:i}},wa=(l(541),()=>{const e=F(),{currentSlide:t}=(0,o.Jk)(e),{addHistorySnapshot:l}=ra(),a=(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:o,maxLevel:i}=a(e,n);if(i===e.length-1)return;const s=l[i+1],r=l.splice(o,n.length);if(s.groupId){const e=l.filter((e=>e.groupId===s.groupId));l.splice(o+e.length,0,...r)}else l.splice(o+1,0,...r)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return;const n=l[a+1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a+e.length,0,o)}else l.splice(a+1,0,o)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o}=a(e,n);if(0===o)return;const i=l[o-1],s=l.splice(o,n.length);if(i.groupId){const e=l.filter((e=>e.groupId===i.groupId));l.splice(o-e.length,0,...s)}else l.splice(o-1,0,...s)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;const n=l[a-1],o=l.splice(a,1)[0];if(n.groupId){const e=l.filter((e=>e.groupId===n.groupId));l.splice(a-e.length,0,o)}else l.splice(a-1,0,o)}return l},s=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter((e=>e.groupId===t.groupId)),{minLevel:o,maxLevel:i}=a(e,n);if(i===e.length-1)return null;const s=l.splice(o,n.length);l.push(...s)}else{const a=e.findIndex((e=>e.id===t.id));if(a===e.length-1)return null;l.splice(a,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:o}=a(e,n);if(0===o)return;const i=l.splice(o,n.length);l.unshift(...i)}else{const a=e.findIndex((e=>e.id===t.id));if(0===a)return;l.splice(a,1),l.unshift(t)}return l},u=(a,o)=>{let u;o===G.UP?u=n(t.value.elements,a):o===G.DOWN?u=i(t.value.elements,a):o===G.TOP?u=s(t.value.elements,a):o===G.BOTTOM&&(u=r(t.value.elements,a)),u&&(e.updateSlide({elements:u}),l())};return{orderElement:u}});const xa=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},ka=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ba=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var _a=()=>{const e=J(),t=F(),l=()=>{xa(),e.setScreening(!0)},a=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),ba()&&ka()};return{enterScreening:l,enterScreeningFromStart:a,exitScreening:n}},Ia=()=>{const e=$(),{canvasPercentage:t,canvasScale:l,canvasDragged:a}=(0,o.Jk)(e),n=(0,i.Fl)((()=>Math.round(100*l.value)+"%")),s=l=>{let a=t.value;const n=5,o=200,i=30;"+"===l&&a<=o&&(a+=n),"-"===l&&a>=i&&(a-=n),e.setCanvasPercentage(a)},r=a=>{const n=Math.round(a/l.value*t.value)/100;e.setCanvasPercentage(n)},u=()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)};return{canvasScalePercentage:n,setCanvasScalePercentage:r,scaleCanvas:s,resetCanvas:u}},Sa=()=>{const e=$(),t=V(),{activeElementIdList:l,disableHotkeys:a,handleElement:n,handleElementId:s,editorAreaFocus:r,thumbnailsFocus:u,showSearchPanel:c}=(0,o.Jk)(e),{currentSlide:d}=(0,o.Jk)(F()),{ctrlKeyState:p,shiftKeyState:v,spaceKeyState:m}=(0,o.Jk)(t),{updateSlideIndex:h,copySlide:f,createSlide:g,deleteSlide:y,cutSlide:w,copyAndPasteSlide:x,selectAllSlide:k}=pa(),{combineElements:b,uncombineElements:_}=ha(),{deleteElement:I}=ma(),{lockElement:S}=va(),{copyElement:C,cutElement:L,quickCopyElement:E}=fa(),{selectAllElement:T}=ga(),{moveElement:M}=ya(),{orderElement:U}=wa(),{redo:W,undo:D}=ra(),{enterScreening:H,enterScreeningFromStart:A}=_a(),{scaleCanvas:Z,resetCanvas:O}=Ia(),z=()=>{l.value.length?C():u.value&&f()},R=()=>{l.value.length?L():u.value&&w()},B=()=>{l.value.length?E():u.value&&x()},P=()=>{r.value&&T(),u.value&&k()},N=()=>{r.value&&S()},j=()=>{r.value&&b()},Y=()=>{r.value&&_()},J=()=>{l.value.length?I():u.value&&y()},q=e=>{l.value.length?M(e):e!==le.UP&&e!==le.DOWN||h(e)},X=e=>{e===le.PAGEUP?h(le.UP):e===le.PAGEDOWN&&h(le.DOWN)},K=e=>{n.value&&U(n.value,e)},Q=()=>{u.value&&g()},ee=()=>{if(!d.value.elements.length)return;if(!s.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex((e=>e.id===s.value)),l=t>=d.value.elements.length-1?0:t+1,a=d.value.elements[l].id;e.setActiveElementIdList([a])},te=l=>{const{ctrlKey:n,shiftKey:o,altKey:i,metaKey:s}=l,d=n||s,m=l.key.toUpperCase();if(d&&!p.value&&t.setCtrlKeyState(!0),o&&!v.value&&t.setShiftKeyState(!0),a.value||m!==le.SPACE||t.setSpaceKeyState(!0),d&&m===le.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&m===le.F5)return l.preventDefault(),H(),void t.setShiftKeyState(!1);if(m===le.F5)return l.preventDefault(),void A();if(m===le.F)return l.preventDefault(),void e.setSearchPanelState(!c.value);if(r.value||u.value){if(d&&m===le.C){if(a.value)return;l.preventDefault(),z()}if(d&&m===le.X){if(a.value)return;l.preventDefault(),R()}if(d&&m===le.D){if(a.value)return;l.preventDefault(),B()}if(d&&m===le.Z){if(a.value)return;l.preventDefault(),D()}if(d&&m===le.Y){if(a.value)return;l.preventDefault(),W()}if(d&&m===le.A){if(a.value)return;l.preventDefault(),P()}if(d&&m===le.L){if(a.value)return;l.preventDefault(),N()}if(!o&&d&&m===le.G){if(a.value)return;l.preventDefault(),j()}if(o&&d&&m===le.G){if(a.value)return;l.preventDefault(),Y()}if(i&&m===le.F){if(a.value)return;l.preventDefault(),K(G.TOP)}if(i&&m===le.B){if(a.value)return;l.preventDefault(),K(G.BOTTOM)}if(m===le.DELETE||m===le.BACKSPACE){if(a.value)return;l.preventDefault(),J()}if(m===le.UP){if(a.value)return;l.preventDefault(),q(le.UP)}if(m===le.DOWN){if(a.value)return;l.preventDefault(),q(le.DOWN)}if(m===le.LEFT){if(a.value)return;l.preventDefault(),q(le.LEFT)}if(m===le.RIGHT){if(a.value)return;l.preventDefault(),q(le.RIGHT)}if(m===le.PAGEUP){if(a.value)return;l.preventDefault(),X(le.PAGEUP)}if(m===le.PAGEDOWN){if(a.value)return;l.preventDefault(),X(le.PAGEDOWN)}if(m===le.ENTER){if(a.value)return;l.preventDefault(),Q()}if(m===le.MINUS){if(a.value)return;l.preventDefault(),Z("-")}if(m===le.EQUAL){if(a.value)return;l.preventDefault(),Z("+")}if(m===le.DIGIT_0){if(a.value)return;l.preventDefault(),O()}if(m===le.TAB){if(a.value)return;l.preventDefault(),ee()}}},ae=()=>{p.value&&t.setCtrlKeyState(!1),v.value&&t.setShiftKeyState(!1),m.value&&t.setSpaceKeyState(!1)};(0,i.bv)((()=>{document.addEventListener("keydown",te),document.addEventListener("keyup",ae),window.addEventListener("blur",ae)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",te),document.removeEventListener("keyup",ae),window.removeEventListener("blur",ae)}))},Ca=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=(0,o.Jk)($()),{pasteTextClipboardData:a}=da(),{createImageElement:n}=ua(),s=e=>{ta(e).then((e=>n(e)))},r=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,i=o[0];if(i){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&s(t))}"string"===i.kind&&"text/plain"===i.type&&i.getAsString((e=>a(e)))}};(0,i.bv)((()=>{document.addEventListener("paste",r)})),(0,i.Ah)((()=>{document.removeEventListener("paste",r)}))},La=l(7536),Ea=()=>{const e=F(),{theme:t}=(0,o.Jk)(F()),{addSlidesFromData:l,isEmptySlide:a}=ca(),n=(0,s.iH)(!1),i=(t,n=!1)=>{const o=t[0],i=new FileReader;i.addEventListener("load",(()=>{try{const t=JSON.parse(de(i.result));n||a.value?e.setSlides(t):l(t)}catch{Kl.error("无法正确读取 / 解析该文件")}})),i.readAsText(o)},u=e=>{let t=[0,0],l=[0,0];return e.isFlipV||e.isFlipH?e.isFlipV&&e.isFlipH?(t=[e.width,e.height],l=[0,0]):e.isFlipV&&!e.isFlipH?(t=[0,e.height],l=[e.width,0]):(t=[e.width,0],l=[0,e.height]):(t=[0,0],l=[e.width,e.height]),{type:"line",id:(0,r.x0)(10),width:e.borderWidth||1,left:e.left,top:e.top,start:t,end:l,style:e.borderType,color:e.borderColor,points:["","straightConnector1"===e.shapType?"arrow":""]}},c=o=>{const i=o[0];if(!i)return;n.value=!0;const s=[];for(const e of ia)s.push(...e.children);const c=new FileReader;c.onload=async o=>{const i=await(0,La.Q)(o.target.result),c=i.size.width,d=la/c,p=[];for(const e of i.slides){const{type:l,value:a}=e.fill;let n;n="image"===l?{type:"image",image:a.picBase64,imageSize:"cover"}:"gradient"===l?{type:"gradient",gradientType:"linear",gradientColor:[a.colors[0],a.colors[1]],gradientRotate:a.rot}:{type:"solid",color:a};const o={id:(0,r.x0)(10),elements:[],background:n},i=e=>{for(const l of e)if(l.width=l.width*d,l.height=l.height*d,l.left=l.left*d,l.top=l.top*d,"text"===l.type)o.elements.push({type:"text",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,rotate:l.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:l.content,lineHeight:1,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},fill:l.fillColor});else if("image"===l.type)o.elements.push({type:"image",id:(0,r.x0)(10),src:l.src,width:l.width,height:l.height,left:l.left,top:l.top,fixedRatio:!0,rotate:l.rotate});else if("shape"===l.type)if("line"===l.shapType||"straightConnector1"===l.shapType){const e=u(l);o.elements.push(e)}else{const e=s.find((e=>e.pptxShapeType===l.shapType)),a={type:"shape",id:(0,r.x0)(10),width:l.width,height:l.height,left:l.left,top:l.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:l.fillColor||"none",fixedRatio:!1,rotate:l.rotate,outline:{color:l.borderColor,width:l.borderWidth,style:l.borderType},text:{content:l.content,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:"middle"}};if(e&&(a.path=e.path,a.viewBox=e.viewBox,e.pathFormula)){a.pathFormula=e.pathFormula,a.viewBox=[l.width,l.height];const t=oa[e.pathFormula];"editable"in t?(a.path=t.formula(l.width,l.height,t.defaultValue),a.keypoint=t.defaultValue):a.path=t.formula(l.width,l.height)}o.elements.push(a)}else if("table"===l.type){const e=l.data.length,a=l.data[0].length,n={fontname:t.value.fontName,color:t.value.fontColor},i=[];for(let t=0;te+"")),a=["系列1"],n=[l.data[1]]):(e=Object.values(l.data[0].xlabels),a=l.data.map((e=>e.key)),n=l.data.map((e=>e.values.map((e=>e.y)))));let i={},s="bar";"barChart"===l.chartType&&(s="bar"),"stackedBarChart"===l.chartType?(s="bar",i={stackBars:!0}):"lineChart"===l.chartType?s="line":"areaChart"===l.chartType?(s="line",i={showArea:!0}):"scatterChart"===l.chartType?(s="line",i={showLine:!1}):"pieChart"!==l.chartType&&"pie3DChart"!==l.chartType||(s="pie"),o.elements.push({type:"chart",id:(0,r.x0)(10),chartType:s,width:l.width,height:l.height,left:l.left,top:l.top,rotate:0,themeColor:[t.value.themeColor],gridColor:t.value.fontColor,data:{labels:e,legends:a,series:n},options:i})}else if("group"===l.type){const e=l.elements.map((e=>({...e,left:e.left+l.left,top:e.top+l.top})));i(e)}};i(e.elements),p.push(o)}a.value?e.setSlides(p):l(p),n.value=!1},c.readAsArrayBuffer(i)};return{importSpecificFile:i,importPPTXFile:c,exporting:n}};const Ta={class:"hotkey-doc"},Ma={class:"title"},Ua={class:"label"},Wa={class:"value"};var Da=(0,i.aZ)({__name:"HotkeyDoc",setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ta,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ne),(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.type},[(0,i._)("div",Ma,(0,ae.zw)(e.type),1),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"hotkey-item",key:e.label},[(0,i._)("div",Ua,(0,ae.zw)(e.label),1),(0,i._)("div",Wa,(0,ae.zw)(e.value),1)])))),128))],64)))),128))]))}});const Ha=(0,Nl.Z)(Da,[["__scopeId","data-v-a0322054"]]);var Fa=Ha;const Aa=["accept"];var Za=(0,i.aZ)({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=(0,s.iH)(),a=()=>{l.value&&(l.value.value="",l.value.click())},n=e=>{const l=e.target.files;l&&t("change",l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"file-input",onClick:t[1]||(t[1]=e=>a())},[(0,i.WI)(e.$slots,"default"),(0,i._)("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:t[0]||(t[0]=e=>n(e))},null,40,Aa)]))}});const $a=(0,Nl.Z)(Za,[["__scopeId","data-v-64bedb34"]]);var Oa=$a;const za=e=>((0,i.dD)("data-v-1f6d021c"),e=e(),(0,i.Cn)(),e),Ra={key:0,class:"fullscreen-spin"},Ba={class:"spin"},Pa=za((()=>(0,i._)("div",{class:"spinner"},null,-1))),Na={class:"text"};var ja=(0,i.aZ)({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(e,t)=>e.loading?((0,i.wg)(),(0,i.iD)("div",Ra,[(0,i._)("div",Ba,[Pa,(0,i._)("div",Na,(0,ae.zw)(e.tip),1)])])):(0,i.kq)("",!0)}});const Ya=(0,Nl.Z)(ja,[["__scopeId","data-v-1f6d021c"]]);var Va=Ya;const Ja={class:"header"};var qa=(0,i.aZ)({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(!1),o=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));return(e,s)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=e=>a.value=!1),onBeforeEnter:s[2]||(s[2]=e=>a.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:(0,ae.C_)(["drawer",e.placement]),style:(0,ae.j5)({width:l.width+"px"})},[(0,i._)("div",Ja,[(0,i.WI)(e.$slots,"title"),(0,i._)("span",{class:"close-btn",onClick:s[0]||(s[0]=e=>t("update:visible",!1))},[(0,i.Wm)(r)])]),a.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"content",style:(0,ae.j5)(o.value)},[(0,i.WI)(e.$slots,"default")],4)):(0,i.kq)("",!0)],6),[[n.F8,e.visible]])])),_:3},8,["name"])])}}});const Xa=(0,Nl.Z)(qa,[["__scopeId","data-v-749dadac"]]);var Ga=Xa;const Ka={class:"prefix"},Qa=["disabled","value","placeholder"],en={class:"suffix"};var tn=(0,i.aZ)({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{expose:t,emit:l}){const a=(0,s.iH)(!1),o=e=>{l("update:value",e.target.value)},r=e=>{a.value=!1,l("blur",e)},u=e=>{a.value=!0,l("focus",e)},c=(0,s.iH)(),d=()=>{c.value&&c.value.focus()};return t({focus:d}),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["input",{disabled:e.disabled,focused:a.value}])},[(0,i._)("span",Ka,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("input",{type:"text",ref_key:"inputRef",ref:c,disabled:e.disabled,value:e.value,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>o(e)),onFocus:t[1]||(t[1]=e=>u(e)),onBlur:t[2]||(t[2]=e=>r(e)),onChange:t[3]||(t[3]=e=>l("change",e)),onKeydown:t[4]||(t[4]=(0,n.D2)((e=>l("enter",e)),["enter"]))},null,40,Qa),(0,i._)("span",en,[(0,i.WI)(e.$slots,"suffix")])],2))}});const ln=(0,Nl.Z)(tn,[["__scopeId","data-v-a97ba0dc"]]);var an=ln,nn=l(6488),on=(l(8627),(0,i.aZ)({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>l.contentStyle||{}));return(0,i.YP)((()=>l.value),(()=>{a.value&&(l.value?a.value.show():a.value.hide())})),(0,i.bv)((()=>{a.value=(0,nn.ZP)(n.value,{content:o.value,allowHTML:!0,trigger:l.trigger,placement:l.placement,interactive:!0,appendTo:l.appendTo||document.body,maxWidth:"none",offset:[0,8],duration:200,animation:"scale",theme:"popover",onShow(){r.value=!0},onShown(){l.value||t("update:value",!0)},onHidden(){l.value&&t("update:value",!1),r.value=!1}})})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover",{center:e.center}]),ref_key:"triggerRef",ref:n},[(0,i._)("div",{class:"popover-content",style:(0,ae.j5)(u.value),ref_key:"contentRef",ref:o},[r.value?(0,i.WI)(e.$slots,"content",{key:0}):(0,i.kq)("",!0)],4),(0,i.WI)(e.$slots,"default")],2))}}));const sn=(0,Nl.Z)(on,[["__scopeId","data-v-c6d2b7aa"]]);var rn=sn,un=(0,i.aZ)({__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["popover-menu-item",{center:e.center}]),onClick:l[0]||(l[0]=e=>t("click"))},[(0,i.WI)(e.$slots,"default")],2))}});const cn=(0,Nl.Z)(un,[["__scopeId","data-v-7c8c4947"]]);var dn=cn;const pn={class:"editor-header"},vn={class:"left"},mn={class:"menu-item"},hn={class:"title"},fn=["title"],gn={class:"right"},yn={class:"group-menu-item"},wn={class:"arrow-btn"},xn={class:"github-link",href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},kn={class:"menu-item"};var bn=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),{title:a}=(0,o.Jk)(l),{enterScreening:n,enterScreeningFromStart:r}=_a(),{importSpecificFile:u,importPPTXFile:c,exporting:d}=Ea(),{resetSlides:p}=pa(),v=(0,s.iH)(!1),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(),g=(0,s.iH)(""),y=()=>{g.value=a.value,h.value=!0,(0,i.Y3)((()=>f.value?.focus()))},w=()=>{l.setTitle(g.value),h.value=!1},x=e=>{window.open(e),v.value=!1},k=e=>{t.setDialogForExport(e),v.value=!1};return(e,t)=>{const l=(0,i.up)("IconHamburgerButton"),o=(0,i.up)("IconPpt"),b=(0,i.up)("IconDown"),_=(0,i.up)("IconDownload"),I=(0,i.up)("IconGithub"),S=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",pn,[(0,i._)("div",vn,[(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:v.value,"onUpdate:value":t[7]||(t[7]=e=>v.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Oa,{accept:".pptist",onChange:t[0]||(t[0]=e=>{(0,s.SU)(u)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptist 文件")])),_:1})])),_:1}),(0,i.Wm)(Oa,{accept:"application/vnd.openxmlformats-officedocument.presentationml.presentation",onChange:t[1]||(t[1]=e=>{(0,s.SU)(c)(e),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(dn,null,{default:(0,i.w5)((()=>[(0,i.Uk)("导入 pptx 文件(测试版)")])),_:1})])),_:1}),(0,i.Wm)(dn,{onClick:t[2]||(t[2]=e=>k("pptx"))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出文件")])),_:1}),(0,i.Wm)(dn,{onClick:t[3]||(t[3]=e=>{(0,s.SU)(p)(),v.value=!1})},{default:(0,i.w5)((()=>[(0,i.Uk)("重置幻灯片")])),_:1}),(0,i.Wm)(dn,{onClick:t[4]||(t[4]=e=>x("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:(0,i.w5)((()=>[(0,i.Uk)("意见反馈")])),_:1}),(0,i.Wm)(dn,{onClick:t[5]||(t[5]=e=>x("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:(0,i.w5)((()=>[(0,i.Uk)("常见问题")])),_:1}),(0,i.Wm)(dn,{onClick:t[6]||(t[6]=e=>{v.value=!1,m.value=!0})},{default:(0,i.w5)((()=>[(0,i.Uk)("快捷键")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",mn,[(0,i.Wm)(l,{class:"icon"})])])),_:1},8,["value"]),(0,i._)("div",hn,[h.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"title-input",ref_key:"titleInputRef",ref:f,value:g.value,"onUpdate:value":t[8]||(t[8]=e=>g.value=e),onBlur:t[9]||(t[9]=e=>w())},null,8,["value"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"title-text",onClick:t[10]||(t[10]=e=>y()),title:(0,s.SU)(a)},(0,ae.zw)((0,s.SU)(a)),9,fn))])]),(0,i._)("div",gn,[(0,i._)("div",yn,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[11]||(t[11]=e=>(0,s.SU)(n)())},[(0,i.Wm)(o,{class:"icon"})])),[[S,"幻灯片放映"]]),(0,i.Wm)(rn,{trigger:"click",center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:t[12]||(t[12]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从头开始")])),_:1}),(0,i.Wm)(dn,{onClick:t[13]||(t[13]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Uk)("从当前页开始")])),_:1})])),default:(0,i.w5)((()=>[(0,i._)("div",wn,[(0,i.Wm)(b,{class:"arrow"})])])),_:1})]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"menu-item",onClick:t[14]||(t[14]=e=>k("pptx"))},[(0,i.Wm)(_,{class:"icon"})])),[[S,"导出"]]),(0,i._)("a",xn,[(0,i._)("div",kn,[(0,i.Wm)(I,{class:"icon"})])])]),(0,i.Wm)(Ga,{width:320,visible:m.value,"onUpdate:visible":t[15]||(t[15]=e=>m.value=e),placement:"right"},{default:(0,i.w5)((()=>[(0,i.Wm)(Fa)])),_:1},8,["visible"]),(0,i.Wm)(Va,{loading:(0,s.SU)(d),tip:"正在导入..."},null,8,["loading"])])}}});const _n=(0,Nl.Z)(bn,[["__scopeId","data-v-741cd9cc"]]);var In=_n;const Sn=Symbol(),Cn=Symbol(),Ln=Symbol(),En=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var Tn=e=>{const t=(0,s.iH)(0),l=(0,s.iH)(0),a=$(),{canvasPercentage:n,canvasDragged:r}=(0,o.Jk)(a),{viewportRatio:u}=(0,o.Jk)(F()),c=()=>{if(!e.value)return;const o=e.value.clientWidth,i=e.value.clientHeight;if(i/o>u.value){const e=o*(n.value/100);a.setCanvasScale(e/la),t.value=(o-e)/2,l.value=(i-e*u.value)/2}else{const e=i*(n.value/100);a.setCanvasScale(e/(la*u.value)),t.value=(o-e/u.value)/2,l.value=(i-e)/2}},d=(n,o)=>{if(!e.value)return;const i=e.value.clientWidth,s=e.value.clientHeight,r=i*(n/100),c=i*(o/100),d=s*(n/100),p=s*(o/100);s/i>u.value?a.setCanvasScale(r/la):a.setCanvasScale(d/(la*u.value)),t.value=t.value-(r-c)/2,l.value=l.value-(d-p)/2};(0,i.YP)(n,d),(0,i.YP)(u,c),(0,i.YP)(r,(()=>{r.value||c()}));const p=(0,i.Fl)((()=>({width:la,height:la*u.value,left:t.value,top:l.value}))),v=new ResizeObserver(c);(0,i.bv)((()=>{e.value&&v.observe(e.value)})),(0,i.Ah)((()=>{e.value&&v.unobserve(e.value)}));const m=e=>{let n=!0;const o=e.pageX,i=e.pageY,s=t.value,r=l.value;document.onmousemove=e=>{if(!n)return;const a=e.pageX,u=e.pageY;t.value=s+(a-o),l.value=r+(u-i)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,a.setCanvasDragged(!0)}};return{viewportStyles:p,dragViewport:m}},Mn=(e,t)=>{const l=$(),{canvasScale:a,hiddenElementIdList:n}=(0,o.Jk)(l),i=(0,s.iH)(!1),r=(0,s.iH)(1),u=(0,s.iH)({top:0,left:0,width:0,height:0}),c=o=>{if(!t.value)return;let s=!0;const c=t.value.getBoundingClientRect(),d=5,p=o.pageX,v=o.pageY,m=(p-c.x)/a.value,h=(v-c.y)/a.value;u.value={top:h,left:m,width:0,height:0},i.value=!1,r.value=4,document.onmousemove=e=>{if(!s)return;const t=e.pageX,l=e.pageY,n=(t-p)/a.value,o=(l-v)/a.value,c=Math.abs(n),m=Math.abs(o);if(c0&&o>0?h=4:n<0&&o<0?h=2:n>0&&o<0?h=1:n<0&&o>0&&(h=3),u.value={...u.value,width:c,height:m},i.value=!0,r.value=h},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,s=!1;let t=[];for(let l=0;lo&&pi&&mo-s&&pi-c&&mo&&pi-c&&mo-s&&pi&&m{if(l.groupId){const a=t.map((e=>e.id)),n=e.value.filter((e=>e.groupId===l.groupId));return n.every((e=>a.includes(e.id)))}return!0}));const a=t.map((e=>e.id));l.setActiveElementIdList(a),i.value=!1}};return{mouseSelection:u,mouseSelectionVisible:i,mouseSelectionQuadrant:r,updateMouseSelection:c}},Un=e=>{const{disableHotkeys:t}=(0,o.Jk)($()),{createImageElement:l,createTextElement:a}=ua(),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&&ta(e).then((e=>l(e)))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString((e=>{if(t.value)return;const l=Ql(e);a({left:0,top:0,width:600,height:50},{content:l})}))};(0,i.bv)((()=>{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()})),(0,i.Ah)((()=>{e.value&&e.value.removeEventListener("drop",n),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null}))};const Wn=(e,t)=>{const l=Math.atan2(e,t),a=180/Math.PI*l;return a};var Dn=(e,t,l)=>{const a=F(),{addHistorySnapshot:n}=ra(),o=(o,i)=>{const s=!(o instanceof MouseEvent);if(s&&(!o.changedTouches||!o.changedTouches[0]))return;let r=!0,u=0;const c=i.rotate||0,d=i.left,p=i.top,v=i.width,m=i.height,h=d+v/2,f=p+m/2;if(!t.value)return;const g=t.value.getBoundingClientRect(),y=t=>{if(!r)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=(a-g.left)/l.value,s=(n-g.top)/l.value,c=o-h,d=f-s;u=Wn(c,d);const p=5;Math.abs(u)<=p?u=0:u>0&&Math.abs(u-45)<=p?u-=u-45:u<0&&Math.abs(u+45)<=p?u-=u+45:u>0&&Math.abs(u-90)<=p?u-=u-90:u<0&&Math.abs(u+90)<=p?u-=u+90:u>0&&Math.abs(u-135)<=p?u-=u-135:u<0&&Math.abs(u+135)<=p?u-=u+135:u>0&&Math.abs(u-180)<=p?u-=u-180:u<0&&Math.abs(u+180)<=p&&(u-=u+180),e.value=e.value.map((e=>i.id===e.id?{...e,rotate:u}:e))},w=()=>{r=!1,document.onmousemove=null,document.onmouseup=null,c!==u&&(a.updateSlide({elements:e.value}),n())};s?(document.ontouchmove=y,document.ontouchend=w):(document.onmousemove=y,document.onmouseup=w)};return{rotateElement:o}};const Hn={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},Fn={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},An=(e,t)=>{const{left:l,top:a,width:n,height:o}=e,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,s=180*Math.atan(o/n)/Math.PI,r=(180-t-s)*Math.PI/180,u=(s-t)*Math.PI/180,c=(90-t)*Math.PI/180,d=t*Math.PI/180,p=n/2,v=o/2,m=l+p,h=a+v,f={left:m+i*Math.cos(r),top:h-i*Math.sin(r)},g={left:m+v*Math.cos(c),top:h-v*Math.sin(c)},y={left:m+i*Math.cos(u),top:h-i*Math.sin(u)},w={left:m+p*Math.cos(d),top:h+p*Math.sin(d)},x={left:m-i*Math.cos(r),top:h+i*Math.sin(r)},k={left:m-v*Math.sin(d),top:h+v*Math.cos(d)},b={left:m-i*Math.cos(u),top:h+i*Math.sin(u)},_={left:m-p*Math.cos(d),top:h-p*Math.sin(d)};return{leftTopPoint:f,topPoint:g,rightTopPoint:y,rightPoint:w,rightBottomPoint:x,bottomPoint:k,leftBottomPoint:b,leftPoint:_}},Zn=(e,t)=>{const l={[ee.RIGHT_BOTTOM]:t.leftTopPoint,[ee.LEFT_BOTTOM]:t.rightTopPoint,[ee.LEFT_TOP]:t.rightBottomPoint,[ee.RIGHT_TOP]:t.leftBottomPoint,[ee.TOP]:t.bottomPoint,[ee.BOTTOM]:t.topPoint,[ee.LEFT]:t.rightPoint,[ee.RIGHT]:t.leftPoint};return l[e]};var $n,On,zn=(e,t,l)=>{const a=$(),n=F(),{activeElementIdList:i,activeGroupElementId:s}=(0,o.Jk)(a),{viewportRatio:r}=(0,o.Jk)(n),{ctrlOrShiftKeyActive:u}=(0,o.Jk)(V()),{addHistorySnapshot:c}=ra(),d=(o,d,p)=>{const v=!(o instanceof MouseEvent);if(v&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;a.setScalingState(!0);const h=d.left,f=d.top,g=d.width,y=d.height,w="table"===d.type?d.cellMinHeight:0,x="rotate"in d&&d.rotate?d.rotate:0,k=Math.PI*x/180,b=u.value||"fixedRatio"in d&&d.fixedRatio,_=g/y,I=v?o.changedTouches[0].pageX:o.pageX,S=v?o.changedTouches[0].pageY:o.pageY,C=Fn[d.type]||20,L=e=>e{const a=5,n=[];let o=!1,i=!1;const s={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t{if(!m)return;const a=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=a-I,i=n-S;let s=g,r=y,u=h,c=f;if(x){const e=(Math.cos(k)*o+Math.sin(k)*i)/l.value;let t=(Math.cos(k)*i-Math.sin(k)*o)/l.value;b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM?(s=L(g+e),r=L(y+t)):p===ee.LEFT_BOTTOM?(s=L(g-e),r=L(y+t),u=h-(s-g)):p===ee.LEFT_TOP?(s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)):p===ee.RIGHT_TOP?(s=L(g+e),r=L(y-t),c=f-(r-y)):p===ee.TOP?(r=L(y-t),c=f-(r-y)):p===ee.BOTTOM?r=L(y+t):p===ee.LEFT?(s=L(g-e),u=h-(s-g)):p===ee.RIGHT&&(s=L(g+e));const a=An({width:s,height:r,left:u,top:c},x),n=Zn(p,a),d=n.left,v=n.top,m=d-T,w=v-M;u-=m,c-=w}else{let e=o/l.value,t=i/l.value;if(b&&(p!==ee.RIGHT_BOTTOM&&p!==ee.LEFT_TOP||(t=e/_),p!==ee.LEFT_BOTTOM&&p!==ee.RIGHT_TOP||(t=-e/_)),p===ee.RIGHT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+g+e,f+y+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g+e),r=L(y+t)}else if(p===ee.LEFT_BOTTOM){const{offsetX:l,offsetY:a}=D(h+e,f+y+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g-e),r=L(y+t),u=h-(s-g)}else if(p===ee.LEFT_TOP){const{offsetX:l,offsetY:a}=D(h+e,f+t);e-=l,t-=a,b&&(a?e=t*_:t=e/_),s=L(g-e),r=L(y-t),u=h-(s-g),c=f-(r-y)}else if(p===ee.RIGHT_TOP){const{offsetX:l,offsetY:a}=D(h+g+e,f+t);e-=l,t-=a,b&&(a?e=-t*_:t=-e/_),s=L(g+e),r=L(y-t),c=f-(r-y)}else if(p===ee.LEFT){const{offsetX:t}=D(h+e,null);e-=t,s=L(g-e),u=h-(s-g)}else if(p===ee.RIGHT){const{offsetX:t}=D(h+g+e,null);e-=t,s=L(g+e)}else if(p===ee.TOP){const{offsetY:e}=D(null,f+t);t-=e,r=L(y-t),c=f-(r-y)}else if(p===ee.BOTTOM){const{offsetY:e}=D(null,f+y+t);t-=e,r=L(y+t)}}e.value=e.value.map((e=>{if(d.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=oa[e.pathFormula];let l="";return l="editable"in t?t.formula(s,r,e.keypoint):t.formula(s,r),{...e,left:u,top:c,width:s,height:r,viewBox:[s,r],path:l}}if("table"===e.type){let t=w+(r-y)/e.data.length;return t=t<36?36:t,t===w?{...e,left:u,width:s}:{...e,left:u,top:c,width:s,height:r,cellMinHeight:t<36?36:t}}return{...e,left:u,top:c,width:s,height:r}}))},F=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,i=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;I===o&&S===i||(n.updateSlide({elements:e.value}),a.setScalingState(!1),c())};v?(document.ontouchmove=H,document.ontouchend=F):(document.onmousemove=H,document.onmouseup=F)},p=(t,a,o)=>{let s=!0;const{minX:r,maxX:d,minY:p,maxY:v}=a,m=d-r,h=v-p,f=m/h,g=t.pageX,y=t.pageY,w=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!s)return;const a=t.pageX,n=t.pageY,c=(a-g)/l.value;let x=(n-y)/l.value;u.value&&(o!==ee.RIGHT_BOTTOM&&o!==ee.LEFT_TOP||(x=c/f),o!==ee.LEFT_BOTTOM&&o!==ee.RIGHT_TOP||(x=-c/f));let k=r,b=d,_=p,I=v;o===ee.RIGHT_BOTTOM?(b=d+c,I=v+x):o===ee.LEFT_BOTTOM?(k=r+c,I=v+x):o===ee.LEFT_TOP?(k=r+c,_=p+x):o===ee.RIGHT_TOP?(b=d+c,_=p+x):o===ee.TOP?_=p+x:o===ee.BOTTOM?I=v+x:o===ee.LEFT?k=r+c:o===ee.RIGHT&&(b=d+c);const S=b-k,C=I-_;let L=S/m,E=C/h;L<=0&&(L=0),E<=0&&(E=0),e.value=e.value.map((e=>{if(("image"===e.type||"shape"===e.type)&&i.value.includes(e.id)){const t=w.find((t=>t.id===e.id));return{...e,width:t.width*L,height:t.height*E,left:k+(t.left-r)*L,top:_+(t.top-p)*E}}return e}))},document.onmouseup=t=>{s=!1,document.onmousemove=null,document.onmouseup=null,g===t.pageX&&y===t.pageY||(n.updateSlide({elements:e.value}),c())}};return{scaleElement:d,scaleMultiElement:p}},Rn=(e,t)=>{const l=$(),{activeElementIdList:a,activeGroupElementId:n,handleElementId:i,editorAreaFocus:s}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(o,u,c=!0)=>{if(s.value||l.setEditorareaFocus(!0),a.value.includes(u.id)){if(r.value){let t=[];if(u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=a.value.filter((e=>!l.includes(e)))}else t=a.value.filter((e=>e!==u.id));t.length>0&&l.setActiveElementIdList(t)}else if(i.value!==u.id)l.setHandleElementId(u.id);else if(n.value!==u.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=a=>{const n=a.pageX,o=a.pageY;e===n&&t===o&&(l.setActiveGroupElementId(u.id),a.target.onmouseup=null)}}}else{let t=[];if(t=r.value?[...a.value,u.id]:[u.id],u.groupId){const l=[];e.value.forEach((e=>{e.groupId===u.groupId&&l.push(e.id)})),t=[...t,...l]}l.setActiveElementIdList((0,U.uniq)(t)),l.setHandleElementId(u.id)}c&&t(o,u)};return{selectElement:u}},Bn=(e,t,l)=>{const a=F(),{activeElementIdList:n,activeGroupElementId:i}=(0,o.Jk)($()),{shiftKeyState:s}=(0,o.Jk)(V()),{viewportRatio:r}=(0,o.Jk)(a),{addHistorySnapshot:u}=ra(),c=(o,c)=>{const d=!(o instanceof MouseEvent);if(d&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(c.id))return;let p=!0;const v=la,m=la*r.value,h=5,f=JSON.parse(JSON.stringify(e.value)),g=f.filter((e=>n.value.includes(e.id))),y=c.left,w=c.top,x=c.width,k="height"in c&&c.height?c.height:0,b="rotate"in c&&c.rotate?c.rotate:0,_=d?o.changedTouches[0].pageX:o.pageX,I=d?o.changedTouches[0].pageY:o.pageY;let S=null;const C=c.id===i.value;let L=[],E=[];for(const t of e.value){if("line"===t.type)continue;if(C&&t.id===c.id)continue;if(!C&&n.value.includes(t.id))continue;let e,l,a,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:i}=fe({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=i[0],a=n[1]-n[0],o=i[1]-i[0]}else e=t.left,l=t.top,a=t.width,o=t.height;const i=e+a,s=l+o,r=l+o/2,u=e+a/2,d={value:l,range:[e,i]},p={value:s,range:[e,i]},v={value:r,range:[e,i]},m={value:e,range:[l,s]},h={value:i,range:[l,s]},f={value:u,range:[l,s]};L.push(d,p,v),E.push(m,h,f)}const T={value:0,range:[0,v]},M={value:m,range:[0,v]},U={value:m/2,range:[0,v]},W={value:0,range:[0,m]},D={value:v,range:[0,m]},H={value:v/2,range:[0,m]};L.push(T,M,U),E.push(W,D,H),L=xe(L),E=xe(E);const F=a=>{const o=a instanceof MouseEvent?a.pageX:a.changedTouches[0].pageX,i=a instanceof MouseEvent?a.pageY:a.changedTouches[0].pageY;if(!1!==S&&(S=Math.abs(_-o)Math.abs(u)&&(u=0),Math.abs(r)e.id===c.id?{...e,left:T,top:M}:e));else{const t=e.value.find((e=>e.id===c.id));if(!t)return;e.value=e.value.map((e=>n.value.includes(e.id)?e.id===c.id?{...e,left:T,top:M}:{...e,left:e.left+(T-t.left),top:e.top+(M-t.top)}:e))}},A=l=>{p=!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,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;_===n&&I===o||(a.updateSlide({elements:e.value}),u())};d?(document.ontouchmove=F,document.ontouchend=A):(document.onmousemove=F,document.onmouseup=A)};return{dragElement:c}},Pn=e=>{const t=F(),{canvasScale:l}=(0,o.Jk)($()),{addHistorySnapshot:a}=ra(),n=(n,o,i)=>{let s=!0;const r=8,u=n.pageX,c=n.pageY,d=[];for(let t=0;t{if(!s)return;const a=t.pageX,n=t.pageY,p=(a-u)/l.value,v=(n-c)/l.value;let m=o.left+o.start[0],h=o.top+o.start[1],f=o.left+o.end[0],g=o.top+o.end[1];const y=o.broken||o.curve||[0,0];let w=o.left+y[0],x=o.top+y[1];const[k,b]=o.cubic||[[0,0],[0,0]];let _=o.left+k[0],I=o.top+k[1],S=o.left+b[0],C=o.top+b[1];if(i===te.START){m+=p,h+=v,Math.abs(m-f)f&&(U[0]=T-L,W[0]=0),h>g&&(U[1]=M-E,W[1]=0),e.value=e.value.map((e=>{if(e.id===o.id){const t={...e,left:L,top:E,start:U,end:W};return i===te.START||i===te.END?(o.broken&&(t.broken=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.curve&&(t.curve=[(U[0]+W[0])/2,(U[1]+W[1])/2]),o.cubic&&(t.cubic=[[(U[0]+W[0])/2,(U[1]+W[1])/2],[(U[0]+W[0])/2,(U[1]+W[1])/2]])):i===te.C?(o.broken&&(t.broken=[w-L,x-E]),o.curve&&(t.curve=[w-L,x-E])):o.cubic&&(t.cubic=[[_-L,I-E],[S-L,C-E]]),t}return e}))},document.onmouseup=l=>{s=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,o=l.pageY;u===n&&c===o||(t.updateSlide({elements:e.value}),a())}};return{dragLineElement:n}},Nn=(e,t)=>{const l=F(),{addHistorySnapshot:a}=ra(),n=(n,o)=>{const i=!(n instanceof MouseEvent);if(i&&(!n.changedTouches||!n.changedTouches[0]))return;let s=!0;const r=i?n.changedTouches[0].pageX:n.pageX,u=i?n.changedTouches[0].pageY:n.pageY,c=oa[o.pathFormula];let d=null;if("editable"in c){const e=c.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,a]=c.range,n=c.relative;d={baseSize:e,originPos:t,min:l,max:a,relative:n}}const p=l=>{if(!s)return;const a=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,i=(a-r)/t.value,p=(n-u)/t.value;e.value=e.value.map((e=>{if(e.id===o.id&&d){const{baseSize:t,originPos:l,min:a,max:n,relative:o}=d,s=e;let r=0;return"left"===o&&(r=(l+i)/t),"right"===o&&(r=(l-i)/t),"center"===o&&(r=(l-2*i)/t),"top"===o&&(r=(l+p)/t),"bottom"===o&&(r=(l-p)/t),rn&&(r=n),{...e,keypoint:r,path:c.formula(s.width,s.height,r)}}return e}))},v=t=>{s=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;r===n&&u===o||(l.updateSlide({elements:e.value}),a())};i?(document.ontouchmove=p,document.ontouchend=v):(document.onmousemove=p,document.onmouseup=v)};return{moveShapeKeypoint:n}},jn=e=>{const t=$(),{canvasScale:l,creatingElement:a}=(0,o.Jk)(t),n=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value;return{left:m,top:h,width:f,height:g}},i=t=>{const{start:a,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[i,s]=a,[r,u]=n,c=Math.min(i,r),d=Math.max(i,r),p=Math.min(s,u),v=Math.max(s,u),m=(c-o.x)/l.value,h=(p-o.y)/l.value,f=(d-c)/l.value,g=(v-p)/l.value,y=[i===c?0:f,s===p?0:g],w=[r===c?0:f,u===p?0:g];return{left:m,top:h,start:y,end:w}},{createTextElement:s,createShapeElement:r,createLineElement:u}=ua(),c=e=>{if(!a.value)return;const l=a.value.type;if("text"===l){const t=n(e);t&&s(t,{vertical:a.value.vertical})}else if("shape"===l){const t=n(e);t&&r(t,a.value.data)}else if("line"===l){const t=i(e);t&&u(t,a.value.data)}t.setCreatingElement(null)};return{formatCreateSelection:n,insertElementFromCreateSelection:c}},Yn=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(e),{addHistorySnapshot:i}=ra(),s=o=>{const s=la,r=la*n.value,{minX:u,maxX:c,minY:d,maxY:p}=we(l.value),v=JSON.parse(JSON.stringify(a.value.elements));for(const e of v)if(t.value.includes(e.id)){if(o===K.CENTER){const t=d+(p-d)/2-r/2,l=u+(c-u)/2-s/2;e.top=e.top-t,e.left=e.left-l}if(o===K.TOP){const t=d-0;e.top=e.top-t}else if(o===K.VERTICAL){const t=d+(p-d)/2-r/2;e.top=e.top-t}else if(o===K.BOTTOM){const t=p-r;e.top=e.top-t}else if(o===K.LEFT){const t=u-0;e.left=e.left-t}else if(o===K.HORIZONTAL){const t=u+(c-u)/2-s/2;e.left=e.left-t}else if(o===K.RIGHT){const t=c-s;e.left=e.left-t}}e.updateSlide({elements:v}),i()};return{alignElementToCanvas:s}},Vn=e=>{const t=(0,i.Fl)((()=>{if(e.value){const{h:t,v:l,blur:a,color:n}=e.value;return`${t}px ${l}px ${a}px ${n}`}return""}));return{shadowStyle:t}},Jn=(e,t)=>{const l=(0,i.Fl)((()=>{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"})($n||($n={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(On||(On={}));const qn={rect:{name:"矩形",type:$n.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:$n.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:$n.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:$n.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:$n.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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:$n.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 Xn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return qn.rect;const t=e.value.shape||$n.RECT;return qn[t]})),l=(0,i.Fl)((()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,a=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/a,i=t[1]/n;return{left:-o+"%",top:-i+"%",width:100/a+"%",height:100/n+"%"}}));return{clipShape:t,imgPosition:l}},Gn=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return"";let t="";const l=Object.keys(e.value);for(const a of l)t+=`${a}(${e.value[a]}) `;return t}));return{filter:t}},Kn=e=>{const t=(0,i.Fl)((()=>e.value?.width??0)),l=(0,i.Fl)((()=>e.value?.style||"solid")),a=(0,i.Fl)((()=>e.value?.color||"#d14424")),n=(0,i.Fl)((()=>{if("dashed"!==l.value)return"0 0";const e=t.value;return e<=6?`${4.5*e} ${2*e}`:`${4*e} ${1.5*e}`}));return{outlineWidth:t,outlineStyle:l,outlineColor:a,strokeDashArray:n}};const Qn=["width","height"],eo=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var to=(0,i.aZ)({__name:"ImageRectOutline",props:{width:{},height:{},outline:{},radius:{default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,eo)],8,Qn)):(0,i.kq)("",!0)}});const lo=(0,Nl.Z)(to,[["__scopeId","data-v-35e36256"]]);var ao=lo;const no=["width","height"],oo=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var io=(0,i.aZ)({__name:"ImageEllipseOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,oo)],8,no)):(0,i.kq)("",!0)}});const so=(0,Nl.Z)(io,[["__scopeId","data-v-11836cf8"]]);var ro=so;const uo=["width","height"],co=["d","stroke","stroke-width","stroke-dasharray"];var po=(0,i.aZ)({__name:"ImagePolygonOutline",props:{width:{},height:{},createPath:{type:Function},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,co)],8,uo)):(0,i.kq)("",!0)}});const vo=(0,Nl.Z)(po,[["__scopeId","data-v-6e021ee2"]]);var mo=vo;const ho={class:"image-outline"};var fo=(0,i.aZ)({__name:"index",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:a}=Xn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",ho,["rect"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ao,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:(0,s.SU)(a).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(ro,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===(0,s.SU)(a).type?((0,i.wg)(),(0,i.j4)(mo,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:(0,s.SU)(a).createPath},null,8,["width","height","outline","createPath"])):(0,i.kq)("",!0)]))}});const go=fo;var yo=go;const wo=e=>((0,i.dD)("data-v-5984406b"),e=e(),(0,i.Cn)(),e),xo=["src"],ko=["src"],bo=["onMousedown"],_o=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("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))),Io=[_o],So=["onMousedown"],Co=wo((()=>(0,i._)("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[(0,i._)("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1))),Lo=[Co];var Eo=(0,i.aZ)({__name:"ImageClipHandler",props:{src:{},clipPath:{},width:{},height:{},top:{},left:{},rotate:{},clipData:{}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)({top:"0",left:"0"}),c=(0,s.iH)(!1),d=(0,s.iH)(null),p=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],a=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/a,i=e[1]/n;return{widthScale:a,heightScale:n,left:o,top:i}},v=(0,i.Fl)((()=>{const{widthScale:e,heightScale:t,left:l,top:a}=p();return{left:-l,top:-a,width:100/e,height:100/t}})),m=(0,i.Fl)((()=>({top:v.value.top+"%",left:v.value.left+"%",width:v.value.width+"%",height:v.value.height+"%"}))),h=(0,s.iH)({top:0,left:0,width:0,height:0}),f=(0,i.Fl)((()=>{const{top:e,left:t,width:l,height:a}=h.value;return{top:e+"%",left:t+"%",width:l+"%",height:a+"%"}})),g=(0,i.Fl)((()=>{const e=v.value.width,t=v.value.height,{top:l,left:a,width:n,height:o}=h.value;return{left:100/n*-a+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}})),y=()=>{const{left:e,top:t}=p();h.value={left:e,top:t,width:100,height:100},u.value={top:-t+"%",left:-e+"%"}},w=()=>{if(c.value)return;if(!d.value)return void t("clip",null);const{left:e,top:a}=p(),n={left:(h.value.left-e)/100*l.width,top:(h.value.top-a)/100*l.height,width:(h.value.width-100)/100*l.width,height:(h.value.height-100)/100*l.height},o={range:d.value,position:n};t("clip",o)},x=e=>{const t=e.key.toUpperCase();t===le.ENTER&&w()};(0,i.bv)((()=>{y(),document.addEventListener("keydown",x)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",x)}));const k=()=>{const e={left:parseInt(g.value.left),top:parseInt(g.value.top),width:parseInt(g.value.width),height:parseInt(g.value.height)},t=100/e.width,l=100/e.height,a=[-e.left*t,-e.top*l],n=[100*t+a[0],100*l+a[1]];d.value=[a,n]},b=e=>{c.value=!0;let t=!0;const n=e.pageX,o=e.pageY,i=v.value,s={...h.value};document.onmousemove=e=>{if(!t)return;const r=e.pageX,u=e.pageY;let c=(r-n)/a.value/l.width*100,d=(u-o)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(c=(u-o)/a.value/l.width*100,d=-(r-n)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(c=-c,d=-d),l.rotate>-135&&l.rotate<-45&&(c=-(u-o)/a.value/l.width*100,d=(r-n)/a.value/l.height*100);let p=s.left+c,v=s.top+d;p<0?p=0:p+s.width>i.width&&(p=i.width-s.width),v<0?v=0:v+s.height>i.height&&(v=i.height-s.height),h.value={...h.value,left:p,top:v}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>{c.value=!1}),0)}},_=(e,t)=>{c.value=!0;let n=!0;const o=50/l.width*100,i=50/l.height*100,s=e.pageX,u=e.pageY,d=v.value,p={...h.value},m=h.value.width/h.value.height;document.onmousemove=e=>{if(!n)return;const c=e.pageX,v=e.pageY;let f,g,y,w,x=(c-s)/a.value/l.width*100,k=(v-u)/a.value/l.height*100;l.rotate>45&&l.rotate<135&&(x=(v-u)/a.value/l.width*100,k=-(c-s)/a.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(x=-x,k=-k),l.rotate>-135&&l.rotate<-45&&(x=-(v-u)/a.value/l.width*100,k=(c-s)/a.value/l.height*100),r.value&&(t!==ee.RIGHT_BOTTOM&&t!==ee.LEFT_TOP||(k=x/m),t!==ee.LEFT_BOTTOM&&t!==ee.RIGHT_TOP||(k=-x/m)),t===ee.LEFT_TOP?(p.left+x<0&&(x=-p.left),p.top+k<0&&(k=-p.top),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+k<0&&(k=-p.top),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.width-xd.width&&(x=d.width-(p.left+p.width)),p.top+p.height+k>d.height&&(k=d.height-(p.top+p.height)),p.width+xd.height&&(k=d.height-(p.top+p.height)),p.height+kd.width&&(x=d.width-(p.left+p.width)),p.width+x{n=!1,document.onmousemove=null,document.onmouseup=null,k(),setTimeout((()=>c.value=!1),0)}},I=(0,i.Fl)((()=>{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})),S=[ee.LEFT_TOP,ee.RIGHT_TOP,ee.LEFT_BOTTOM,ee.RIGHT_BOTTOM],C=[ee.TOP,ee.BOTTOM,ee.LEFT,ee.RIGHT];return(e,t)=>{const l=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"image-clip-handler",style:(0,ae.j5)(u.value)},[(0,i._)("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(m.value)},null,12,xo),(0,i._)("div",{class:"top-image-content",style:(0,ae.j5)({...f.value,clipPath:e.clipPath})},[(0,i._)("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:(0,ae.j5)(g.value)},null,12,ko)],4),(0,i._)("div",{class:"operate",style:(0,ae.j5)(f.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>b(e)),["stop"]))},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(S,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Io,42,bo))),64)),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["clip-point",e,I.value]),key:e,onMousedown:(0,n.iM)((t=>_(t,e)),["stop"])},Lo,42,So))),64))],36)],4)),[[l,w]])}}});const To=(0,Nl.Z)(Eo,[["__scopeId","data-v-5984406b"]]);var Mo=To;const Uo=["src"];var Wo=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{clipingImageElementId:r}=(0,o.Jk)(l),u=(0,i.Fl)((()=>r.value===t.elementInfo.id)),{addHistorySnapshot:c}=ra(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(0,i.Fl)((()=>t.elementInfo.flipH)),m=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:h}=Jn(v,m),f=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:g,imgPosition:y}=Xn(f),w=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:x}=Gn(w),k=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,i=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},s=t.elementInfo.left+o.left,r=t.elementInfo.top+o.top,u=t.elementInfo.width+o.width,d=t.elementInfo.height+o.height;let p=0,v=0;if(t.elementInfo.rotate){const e=s+u/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(r+d/2-(t.elementInfo.top+t.elementInfo.height/2)),a=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(a)-l*Math.sin(a),o=e*Math.sin(a)+l*Math.cos(a);p=n-e,v=-(o-l)}const m={clip:{...i,range:n},left:s+p,top:r+v,width:u,height:d};a.updateElement({id:t.elementInfo.id,props:m}),c()};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-image",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[u.value?((0,i.wg)(),(0,i.j4)(Mo,{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:(0,s.SU)(g).style,onClip:t[0]||(t[0]=e=>b(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:1,class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(p)?`drop-shadow(${(0,s.SU)(p)})`:"",transform:(0,s.SU)(h)}),onMousedown:t[2]||(t[2]=e=>k(e)),onTouchstart:t[3]||(t[3]=e=>k(e))},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(g).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(y).top,left:(0,s.SU)(y).left,width:(0,s.SU)(y).width,height:(0,s.SU)(y).height,filter:(0,s.SU)(x)}),onDragstart:t[1]||(t[1]=(0,n.iM)((()=>{}),["prevent"])),alt:""},null,44,Uo),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],36)),[[l,e.contextmenus]])],4)],6)}}});const Do=(0,Nl.Z)(Wo,[["__scopeId","data-v-1156b3e1"]]);var Ho=Do;const Fo=["width","height"],Ao=["d","stroke","stroke-width","stroke-dasharray"];var Zo=(0,i.aZ)({__name:"ElementOutline",props:{width:{},height:{},outline:{}},setup(e){const t=e,{outlineWidth:l,outlineColor:a,strokeDashArray:n}=Kn((0,s.Vh)(t,"outline"));return(e,t)=>e.outline?((0,i.wg)(),(0,i.iD)("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[(0,i._)("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:(0,s.SU)(a),"stroke-width":(0,s.SU)(l),"stroke-dasharray":(0,s.SU)(n)},null,8,Ao)],8,Fo)):(0,i.kq)("",!0)}});const $o=(0,Nl.Z)(Zo,[["__scopeId","data-v-efb76626"]]);var Oo=$o,zo=l(2376),Ro=l(4348),Bo=l(2806),Po=l(728),No=l(8463),jo=l(4251),Yo=l(915),Vo=l(3833),Jo=l(6912);const qo=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",u.MI),l("Alt-ArrowDown",u.Ig),l("Mod-z",No.Yw),l("Mod-y",No.KX),l("Backspace",Jo.dU),l("Escape",u.N0),l("Mod-b",(0,u.w9)(e.marks.strong)),l("Mod-i",(0,u.w9)(e.marks.em)),l("Mod-u",(0,u.w9)(e.marks.underline)),l("Mod-d",(0,u.w9)(e.marks.strikethrough)),l("Mod-e",(0,u.w9)(e.marks.code)),l("Mod-;",(0,u.w9)(e.marks.superscript)),l("Mod-'",(0,u.w9)(e.marks.subscript)),l("Enter",(0,u.QF)((0,Vo.s6)(e.nodes.list_item),u.QK,u.mD,u.X0,u.$j)),l("Mod-[",(0,Vo.IB)(e.nodes.list_item)),l("Mod-]",(0,Vo.bw)(e.nodes.list_item)),l("Tab",(0,Vo.bw)(e.nodes.list_item)),t},Xo=e=>(0,Jo.S0)(/^\s*>\s$/,e),Go=e=>(0,Jo.S0)(/^(\d+)\.\s$/,e,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),Ko=e=>(0,Jo.S0)(/^\s*([-+*])\s$/,e),Qo=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(`${t[2]} `,l,a),i=n.marks.code.create();return o.addMark(l,l+t[2].length,i)}))},ei=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Jo.VK(e,((e,t,l,a)=>{const{schema:n}=e,o=e.tr.insertText(t[0],l,a),i=n.marks.link.create({href:t[0],title:t[0]});return o.addMark(l,l+t[0].length,i)}))},ti=e=>{const t=[...Jo.yR,Jo.LH,Jo.pR];return t.push(Xo(e.nodes.blockquote)),t.push(Go(e.nodes.ordered_list)),t.push(Ko(e.nodes.bullet_list)),t.push(Qo()),t.push(ei()),(0,Jo.Hw)({rules:t})},li=e=>[ti(e),(0,Po.h)(qo(e)),(0,Po.h)(u.YR),(0,jo.q)(),(0,Yo.d)(),(0,No.m8)()];var ai=l(4073);const ni={attrs:{order:{default:1},listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:a}=e.style;return a&&(l["listStyleType"]=a),l}}],toDOM:e=>{const{order:t,listStyleType:l}=e.attrs;let a="";l&&(a+=`list-style-type: ${l};`);const n={style:a};return 1!==t&&(n["start"]=t),["ol",n,0]}},oi={attrs:{listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const{listStyleType:t}=e.style;return t?{listStyleType:t}:{}}}],toDOM:e=>{const{listStyleType:t}=e.attrs;let l="";return t&&(l+=`list-style-type: ${t};`),["ul",{style:l},0]}},ii={...Vo.qb,content:"paragraph block*",group:"block"},si={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:l}=e.style;let a=e.getAttribute("align")||t||"";a=/(left|right|center|justify)/.test(a)?a:"";let n=0;l&&(/em/.test(l)?n=parseInt(l):/px/.test(l)&&(n=Math.floor(parseInt(l)/20),n||(n=1)));const o=+(e.getAttribute("data-indent")||0);return{align:a,indent:o,textIndent:n}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:l,textIndent:a}=e.attrs;let n="";t&&"left"!==t&&(n+=`text-align: ${t};`),a&&(n+=`text-indent: ${20*a}px;`);const o={style:n};return l&&(o["data-indent"]=l),["p",o,0]}},{doc:ri,blockquote:ui,text:ci}=ai.nodes;var di={doc:ri,paragraph:si,blockquote:ui,text:ci,ordered_list:ni,bullet_list:oi,list_item:ii};const pi={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},vi={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},mi={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]},hi={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]},fi={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]}},gi={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]}},yi={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]}},wi={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]}},xi={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]},ki={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>{const t=e.dataset.index;return{index:t}}}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:bi,strong:_i,code:Ii}=ai.marks;var Si={em:bi,strong:_i,fontsize:yi,fontname:wi,code:Ii,forecolor:fi,backcolor:gi,subscript:pi,superscript:vi,strikethrough:mi,underline:hi,link:xi,mark:ki};const Ci=di,Li=Si,Ei=new Bo.V_({nodes:Ci,marks:Li}),Ti=e=>{const t=`
${e}
`,l=new window.DOMParser,a=l.parseFromString(t,"text/html").body.firstElementChild;return Bo.aw.fromSchema(Ei).parse(a)},Mi=(e,t,l={})=>new Ro.tk(e,{state:zo.yy.create({doc:Ti(t),plugins:li(Ei)}),...l});var Ui,Wi=l(9391);(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"})(Ui||(Ui={}));const Di=(0,Wi.Z)();var Hi=Di;const Fi=(e,t,l)=>{const{selection:a,doc:n}=e;if(!a||!n)return e;const{from:o,to:i}=a,{nodes:s}=t,r=s.blockquote,u=s.list_item,c=s.paragraph,d=[];l=l||"";const p=new Set([r,u,c]);return n.nodesBetween(o,i,((e,t)=>{const a=e.type,n=e.attrs.align||"";return n!==l&&p.has(a)&&d.push({node:e,pos:t,nodeType:a}),!0})),d.length?(d.forEach((t=>{const{node:a,pos:n,nodeType:o}=t;let{attrs:i}=a;i=l?{...i,align:l}:{...i,align:null},e=e.setNodeMarkup(n,o,i,a.marks)})),e):e},Ai=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=Fi(l.tr.setSelection(n),a,t);e.dispatch(o)},Zi=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,$i=(e,t,l)=>(a,n)=>{const{schema:o,selection:i}=a,{$from:s,$to:r}=i,u=s.blockRange(r);if(!u)return!1;const c=h((e=>Zi(e,o)))(i);if(u.depth>=1&&c&&u.depth-c.depth<=1){if(c.node.type===e&&!l)return(0,Vo.IB)(t)(a,n);if(Zi(c.node,o)&&e.validContent(c.node.content)){const{tr:t}=a;if(l){const a={...c.node.attrs,listStyleType:l};t.setNodeMarkup(c.pos,e,a)}else t.setNodeMarkup(c.pos,e);return n&&n(t),!1}}return l?(0,Vo.KI)(e,{listStyleType:l})(a,n):(0,Vo.KI)(e)(a,n)};function Oi(e,t,l,a){if(!e.doc)return e;const n=e.doc.nodeAt(t);if(!n)return e;const o=0,i=8;let s=(n.attrs[a]||0)+l;if(si&&(s=i),s===n.attrs[a])return e;const r={...n.attrs,[a]:s};return e.setNodeMarkup(t,n.type,r,n.marks)}const zi=(e,t,l,a)=>{const{selection:n,doc:o}=e;if(!n||!o)return e;if(!(n instanceof zo.Bs||n instanceof zo.C1))return e;const{from:i,to:s}=n;return o.nodesBetween(i,s,((n,o)=>{const i=n.type;return"paragraph"===i.name||"blockquote"===i.name?(e=Oi(e,o,l,a),!1):!Zi(n,t)})),e},Ri=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"indent");return!!o.docChanged&&(e.dispatch(o),!0)},Bi=(e,t)=>{const{state:l}=e,{schema:a,selection:n}=l,o=zi(l.tr.setSelection(n),a,t,"textIndent");return!!o.docChanged&&(e.dispatch(o),!0)};var Pi=(0,i.aZ)({__name:"ProsemirrorEditor",props:{elementId:{},defaultColor:{},defaultFontName:{},value:{},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const a=e,n=$(),{handleElementId:r,textFormatPainter:v}=(0,o.Jk)(n),m=(0,s.iH)();let h;const f=(0,U.debounce)((function(){l("update",h.dom.innerHTML)}),300,{trailing:!0}),y=()=>{n.setDisableHotkeysState(!0),l("focus")},w=()=>{n.setDisableHotkeysState(!1),l("blur")},x=(0,U.debounce)((function(){const e=I(h,{color:a.defaultColor,fontname:a.defaultFontName});n.setRichtextAttrs(e)}),30,{trailing:!0}),b=()=>{f(),x()},_=(0,i.Fl)((()=>a.value));(0,i.YP)(_,(()=>{if(!h)return;if(h.hasFocus())return;const{doc:e,tr:t}=h.state;h.dispatch(t.replaceRangeWith(0,e.content.size,Ti(_.value)))})),(0,i.YP)((()=>a.editable),(()=>{h.setProps({editable:()=>a.editable})}));const C=()=>h.focus();t({focus:C});const L=({target:e,action:t})=>{if(!e&&r.value!==a.elementId)return;if(e&&e!==a.elementId)return;const l="command"in t?[t]:t;for(const a of l)if("fontname"===a.command&&a.value){const e=h.state.schema.marks.fontname.create({fontname:a.value});c(h),d(h,e)}else if("fontsize"===a.command&&a.value){const e=h.state.schema.marks.fontsize.create({fontsize:a.value});c(h),d(h,e)}else if("fontsize-add"===a.command){const e=a.value?+a.value:2;c(h);const t=S(h)+e+"px",l=h.state.schema.marks.fontsize.create({fontsize:t});d(h,l)}else if("fontsize-reduce"===a.command){const e=a.value?+a.value:2;c(h);let t=S(h)-e;t<12&&(t=12);const l=h.state.schema.marks.fontsize.create({fontsize:t+"px"});d(h,l)}else if("color"===a.command&&a.value){const e=h.state.schema.marks.forecolor.create({color:a.value});c(h),d(h,e)}else if("backcolor"===a.command&&a.value){const e=h.state.schema.marks.backcolor.create({backcolor:a.value});c(h),d(h,e)}else if("bold"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strong)(h.state,h.dispatch);else if("em"===a.command)c(h),(0,u.w9)(h.state.schema.marks.em)(h.state,h.dispatch);else if("underline"===a.command)c(h),(0,u.w9)(h.state.schema.marks.underline)(h.state,h.dispatch);else if("strikethrough"===a.command)c(h),(0,u.w9)(h.state.schema.marks.strikethrough)(h.state,h.dispatch);else if("subscript"===a.command)(0,u.w9)(h.state.schema.marks.subscript)(h.state,h.dispatch);else if("superscript"===a.command)(0,u.w9)(h.state.schema.marks.superscript)(h.state,h.dispatch);else if("blockquote"===a.command){const e=g("blockquote",h.state);e?(0,u.xb)(h.state,h.dispatch):(0,u.ym)(h.state.schema.nodes.blockquote)(h.state,h.dispatch)}else if("code"===a.command)(0,u.w9)(h.state.schema.marks.code)(h.state,h.dispatch);else if("align"===a.command&&a.value)Ai(h,a.value);else if("indent"===a.command&&a.value)Ri(h,+a.value);else if("textIndent"===a.command&&a.value)Bi(h,+a.value);else if("bulletList"===a.command){const e=a.value||"",{bullet_list:t,list_item:l}=h.state.schema.nodes;$i(t,l,e)(h.state,h.dispatch)}else if("orderedList"===a.command){const e=a.value||"",{ordered_list:t,list_item:l}=h.state.schema.nodes;$i(t,l,e)(h.state,h.dispatch)}else if("clear"===a.command){c(h);const{$from:e,$to:t}=h.state.selection;h.dispatch(h.state.tr.removeMark(e.pos,t.pos))}else if("link"===a.command){const e=h.state.schema.marks.link,{from:t,to:l}=h.state.selection,n=p(h.state.doc,t,l,e);if(n)if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e,{from:n.from.pos,to:n.to.pos+1})}else h.dispatch(h.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(k(h.state,e))if(a.value){const e=h.state.schema.marks.link.create({href:a.value,title:a.value});d(h,e)}else(0,u.w9)(e)(h.state,h.dispatch);else a.value&&(c(h),(0,u.w9)(e,{href:a.value,title:a.value})(h.state,h.dispatch))}else"insert"===a.command&&a.value&&h.dispatch(h.state.tr.insertText(a.value));h.focus(),f(),x()},E=()=>{if(!v.value)return;const e=[{command:"clear"}];for(const t of Object.keys(v.value)){const l=t,a=v.value[t];!0===a?e.push({command:l}):a&&e.push({command:l,value:a})}L({action:e}),n.setTextFormatPainter(null)};return(0,i.bv)((()=>{h=Mi(m.value,_.value,{handleDOMEvents:{focus:y,blur:w,keydown:b,click:x,mouseup:E},editable:()=>a.editable}),a.autoFocus&&h.focus()})),(0,i.Ah)((()=>{h&&h.destroy()})),Hi.on(Ui.RICH_TEXT_COMMAND,L),(0,i.Ah)((()=>{Hi.off(Ui.RICH_TEXT_COMMAND,L)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["prosemirror-editor",{"format-painter":(0,s.SU)(v)}]),ref_key:"editorViewRef",ref:m,onMousedown:t[0]||(t[0]=e=>l("mousedown",e))},null,34))}});const Ni=(0,Nl.Z)(Pi,[["__scopeId","data-v-66fb0036"]]);var ji=Ni;const Yi=e=>((0,i.dD)("data-v-2a1e49ba"),e=e(),(0,i.Cn)(),e),Vi=Yi((()=>(0,i._)("div",{class:"drag-handler top"},null,-1))),Ji=Yi((()=>(0,i._)("div",{class:"drag-handler bottom"},null,-1)));var qi=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n,isScaling:r}=(0,o.Jk)(l),{addHistorySnapshot:u}=ra(),c=(0,s.iH)(),d=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:p}=Vn(d),v=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},m=(0,s.iH)(-1),h=(0,s.iH)(-1);(0,i.YP)(r,(()=>{n.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===m.value||(a.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1),t.elementInfo.vertical&&-1!==h.value&&(a.updateElement({id:t.elementInfo.id,props:{width:h.value}}),h.value=-1)))}));const f=e=>{const l=e[0].contentRect;if(!c.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?m.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?h.value=o:a.updateElement({id:t.elementInfo.id,props:{width:o}}))},g=new ResizeObserver(f);(0,i.bv)((()=>{c.value&&g.observe(c.value)})),(0,i.Ah)((()=>{c.value&&g.unobserve(c.value)}));const y=e=>{a.updateElement({id:t.elementInfo.id,props:{content:e}}),u()},w=(0,U.debounce)((function(){const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||a.deleteElement(t.elementInfo.id)}),300,{trailing:!0}),x=(0,i.Fl)((()=>n.value===t.elementInfo.id));return(0,i.YP)(x,(()=>{x.value||w()})),(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-text",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",ref_key:"elementRef",ref:c,style:(0,ae.j5)({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:(0,s.SU)(p),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:t[2]||(t[2]=e=>v(e)),onTouchstart:t[3]||(t[3]=e=>v(e))},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(ji,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),onUpdate:t[0]||(t[0]=e=>y(e)),onMousedown:t[1]||(t[1]=e=>v(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Vi,Ji],36)),[[l,e.contextmenus]])],4)],6)}}});const Xi=(0,Nl.Z)(qi,[["__scopeId","data-v-2a1e49ba"]]);var Gi=Xi;const Ki=["id","gradientTransform"],Qi=["stop-color"],es=["stop-color"],ts=["id"],ls=["stop-color"],as=["stop-color"];var ns=(0,i.aZ)({__name:"GradientDefs",props:{id:{},type:{},color1:{},color2:{},rotate:{default:0}},setup(e){return(e,t)=>"linear"===e.type?((0,i.wg)(),(0,i.iD)("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,Qi),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,es)],8,Ki)):((0,i.wg)(),(0,i.iD)("radialGradient",{key:1,id:e.id},[(0,i._)("stop",{offset:"0%","stop-color":e.color1},null,8,ls),(0,i._)("stop",{offset:"100%","stop-color":e.color2},null,8,as)],8,ts))}});const os=ns;var is=os;const ss=["width","height"],rs={key:0},us=["transform"],cs=["d","fill","stroke","stroke-width","stroke-dasharray"];var ds=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{handleElementId:n}=(0,o.Jk)(l),{addHistorySnapshot:r}=ra(),u=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},c=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:d,outlineColor:p,strokeDashArray:v}=Kn(c),m=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:h}=Vn(m),f=(0,i.Fl)((()=>t.elementInfo.flipH)),g=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:y}=Jn(f,g),w=(0,s.iH)(!1);(0,i.YP)(n,(()=>{n.value!==t.elementInfo.id&&w.value&&(w.value=!1)}));const x=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e})),k=e=>{const l={...x.value,content:e};a.updateElement({id:t.elementInfo.id,props:{text:l}}),r()},b=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(a.removeElementProps({id:t.elementInfo.id,propName:"text"}),r())},_=(0,s.iH)(),I=()=>{w.value=!0,(0,i.Y3)((()=>_.value&&_.value.focus()))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(h)?`drop-shadow(${(0,s.SU)(h)})`:"",transform:(0,s.SU)(y),color:x.value.defaultColor,fontFamily:x.value.defaultFontName}),onMousedown:t[3]||(t[3]=e=>u(e)),onTouchstart:t[4]||(t[4]=e=>u(e)),onDblclick:t[5]||(t[5]=e=>I())},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",rs,[(0,i.Wm)(is,{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"])])):(0,i.kq)("",!0),(0,i._)("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)`},[(0,i._)("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:(0,s.SU)(p),"stroke-width":(0,s.SU)(d),"stroke-dasharray":(0,s.SU)(v)},null,8,cs)],8,us)],8,ss)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",[x.value.align,{editable:w.value||x.value.content}]])},[w.value||x.value.content?((0,i.wg)(),(0,i.j4)(ji,{key:0,ref_key:"prosemirrorEditorRef",ref:_,elementId:e.elementInfo.id,defaultColor:x.value.defaultColor,defaultFontName:x.value.defaultFontName,editable:!e.elementInfo.lock,value:x.value.content,onUpdate:t[0]||(t[0]=e=>k(e)),onBlur:t[1]||(t[1]=e=>b()),onMousedown:t[2]||(t[2]=e=>u(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):(0,i.kq)("",!0)],2)],36)),[[l,e.contextmenus]])],4)],6)}}});const ps=(0,Nl.Z)(ds,[["__scopeId","data-v-ec70f76a"]]);var vs=ps;const ms=["id","markerWidth","markerHeight","refX","refY"],hs=["d","fill","transform"];var fs=(0,i.aZ)({__name:"LinePointMarker",props:{id:{},position:{},type:{},baseSize:{},color:{}},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"},a={"arrow-start":180,"arrow-end":0},n=(0,i.Fl)((()=>l[t.type])),o=(0,i.Fl)((()=>a[`${t.type}-${t.position}`]||0)),s=(0,i.Fl)((()=>t.baseSize<2?2:t.baseSize));return(e,t)=>((0,i.wg)(),(0,i.iD)("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*s.value,markerHeight:3*s.value,refX:1.5*s.value,refY:1.5*s.value},[(0,i._)("path",{d:n.value,fill:e.color,transform:`scale(${.3*s.value}, ${.3*s.value}) rotate(${o.value}, 5, 5)`},null,8,hs)],8,ms))}});const gs=fs;var ys=gs;const ws=["width","height"],xs=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],ks=["d"];var bs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:n}=Vn(a),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),r=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),u=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),c=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>{const a=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-shape",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(n)?`drop-shadow(${(0,s.SU)(n)})`:""}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e))},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:o.value,height:r.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(ys,{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"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(ys,{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"])):(0,i.kq)("",!0)]),(0,i._)("path",{class:"line-point",d:c.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":u.value,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,xs),(0,i.wy)((0,i._)("path",{class:"line-path",d:c.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,ks),[[a,e.contextmenus]])],8,ws))],36)],6)}}});const _s=(0,Nl.Z)(bs,[["__scopeId","data-v-16512454"]]);var Is=_s,Ss=l(7678),Cs=(l(4991),(0,i.aZ)({__name:"Chart",props:{width:{},height:{},type:{},data:{},themeColor:{},legends:{},options:{},gridColor:{},legend:{}},setup(e){const t=e,l=(0,s.iH)(),a=(0,i.f3)(Sn)||(0,s.iH)(1);let n;const o=(0,i.Fl)((()=>t.legend?t.height-20:t.height)),r=()=>({...t.data,series:t.data.series[0]}),u=()=>{const e=t.options||{};return{...e,width:t.width*a.value,height:o.value*a.value}},c=()=>{if(!l.value)return;const e=u();"bar"===t.type&&(n=new Ss.vz(l.value,t.data,e)),"line"===t.type&&(n=new Ss.wW(l.value,t.data,e)),"pie"===t.type&&(n=new Ss.uc(l.value,r(),e))},d=()=>{if(!n)return void c();const e=u(),l="pie"===t.type?r():t.data;n.update(l,e)};(0,i.YP)([()=>t.width,()=>t.height,()=>t.data,()=>t.options,a],d),(0,i.bv)(c);const p=(0,i.Fl)((()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>e.toRgbString()));else{const l=t.themeColor.length,a=(0,M.Z)(t.themeColor[l-1]).analogous(11-l).map((e=>e.toRgbString()));e=[...t.themeColor.slice(0,l-1),...a]}return e})),v=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty(`--theme-color-${e+1}`,p.value[e])};(0,i.YP)(p,v),(0,i.bv)(v);const m=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return(0,i.YP)((()=>t.gridColor),m),(0,i.bv)(m),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"chart",style:(0,ae.j5)({flexDirection:"top"===e.legend?"column-reverse":"column"})},[(0,i._)("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:(0,ae.j5)({width:e.width+"px",height:o.value+"px",transform:`scale(${1/(0,s.SU)(a)})`})},null,4),e.legend?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"legends",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(a)})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.legends,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"legend",key:l,style:(0,ae.j5)({color:e.gridColor})},[(0,i._)("div",{class:"block",style:(0,ae.j5)({backgroundColor:p.value[l]})},null,4),(0,i.Uk)(" "+(0,ae.zw)(t),1)],4)))),128))],4)):(0,i.kq)("",!0)],4))}}));const Ls=(0,Nl.Z)(Cs,[["__scopeId","data-v-ae2a96a6"]]);var Es=Ls,Ts=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Hi.emit(Ui.OPEN_CHART_DATA_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-chart",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill}),onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Es,{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)),[[n,e.contextmenus]])],4)],6)}}});const Ms=(0,Nl.Z)(Ts,[["__scopeId","data-v-6fc3de39"]]);var Us=Ms;const Ws=e=>{if(!e)return{};const{bold:t,em:l,underline:a,strikethrough:n,color:o,backcolor:i,fontsize:s,fontname:r,align:u}=e;let c=`${a?"underline":""} ${n?"line-through":""}`;return" "===c&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:c,color:o||"#000",backgroundColor:i||"",fontSize:s||"14px",fontFamily:r||"微软雅黑",textAlign:u||"left"}},Ds=e=>e.replace(/\n/g,"
").replace(/ /g," ");var Hs=e=>{const t=(0,i.Fl)((()=>{const t=[];for(let l=0;l1||n.rowspan>1)for(let a=l;a{const t=(0,s.iH)(["",""]);return(0,i.YP)((()=>e.value),(()=>{e.value&&(t.value=_e(e.value.color))}),{immediate:!0}),{subThemeColor:t}};const As=["innerHTML"];var Zs=(0,i.aZ)({__name:"CustomTextarea",props:{value:{default:""}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(),n=(0,s.iH)(""),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{o.value||(n.value=l.value,a.value&&(a.value.innerHTML=l.value))}),{immediate:!0});const r=()=>{if(!a.value)return;const e=a.value.innerHTML;t("updateValue",e)},u=()=>{o.value=!0,a.value&&(a.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=me(e);if("object"===typeof l)return;const n=he(e);if(n)return t("insertExcelData",n),void(a.value&&(a.value.innerHTML=n[0][0]));document.execCommand("insertText",!1,e)}))})},c=()=>{o.value=!1,a.value&&(a.value.onpaste=null)};return(0,i.Jd)((()=>{a.value&&(a.value.onpaste=null)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"custom-textarea",ref_key:"textareaRef",ref:a,contenteditable:!0,onFocus:t[0]||(t[0]=e=>u()),onBlur:t[1]||(t[1]=e=>c()),onInput:t[2]||(t[2]=e=>r()),innerHTML:n.value},null,40,As))}});const $s=(0,Nl.Z)(Zs,[["__scopeId","data-v-7a7222ac"]]);var Os=$s;const zs={key:0,class:"handler"},Rs=["onMousedown"],Bs=["width"],Ps=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],Ns=["innerHTML"];var js=(0,i.aZ)({__name:"EditableTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:a}=(0,o.Jk)($()),u=(0,s.iH)(!1),c=(0,s.iH)([]),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return l.data},set(e){t("change",e)}}),v=(0,i.Fl)((()=>l.theme)),{subThemeColor:m}=Fs(v),h=(0,s.iH)([]),f=(0,i.Fl)((()=>h.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>l.colWidths,()=>l.width],(()=>{h.value=l.colWidths.map((e=>e*l.width))}),{immediate:!0});const g=()=>{c.value=[],d.value=[]};(0,i.YP)((()=>l.editable),(()=>{l.editable||g()}));const y=(0,i.Fl)((()=>{const e=[];for(let t=1;te+t));e.push(l)}return e})),w=(0,i.Fl)((()=>l.data)),{hideCells:x}=Hs(w),k=(0,i.Fl)((()=>{if(!c.value.length)return[];const[e,t]=c.value;if(!d.value.length)return[`${e}_${t}`];const[l,a]=d.value;if(e===l&&t===a)return[`${e}_${t}`];const n=[],o=Math.min(e,l),i=Math.min(t,a),s=Math.max(e,l),r=Math.max(t,a);for(let u=0;u=o&&u<=s&&t>=i&&t<=r&&n.push(`${u}_${t}`)}return n}));(0,i.YP)(k,((e,l)=>{(0,U.isEqual)(e,l)||t("changeSelectedCells",k.value)}));const b=(0,i.Fl)((()=>k.value.length>1?null:k.value[0])),_=()=>u.value=!1,I=(e,t,l)=>{0===e.button&&(d.value=[],u.value=!0,c.value=[t,l])},S=(e,t)=>{u.value&&(d.value=[e,t])};(0,i.bv)((()=>{document.addEventListener("mouseup",_)})),(0,i.Ah)((()=>{document.removeEventListener("mouseup",_)}));const C=(e,t)=>x.value.includes(`${e}_${t}`),L=e=>{const t=p.value.length-1;c.value=[0,e],d.value=[t,e]},E=e=>{const t=p.value[e].length-1;c.value=[e,0],d.value=[e,t]},T=()=>{const e=p.value.length-1,t=p.value[e].length-1;c.value=[0,0],d.value=[e,t]},M=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=p.value[e],a=[];for(let n=0;n=0;l--)if(!C(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),p.value=t},W=e=>{const l=JSON.parse(JSON.stringify(p.value)),a=[];for(let t=0;t=0;a--)if(!C(t,a)){l[t][a].colspan=l[t][a].colspan-1;break}p.value=l.map((t=>(t.splice(e,1),t))),h.value.splice(e,1),t("changeColWidths",h.value)},D=e=>{const t=JSON.parse(JSON.stringify(p.value)),l=[];for(let a=0;a{p.value=p.value.map((t=>{const l={colspan:1,rowspan:1,text:"",id:(0,r.x0)(10)};return t.splice(e,0,l),t})),h.value.splice(e,0,100),t("changeColWidths",h.value)},F=(e,l)=>{let a=JSON.parse(JSON.stringify(p.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l{const t=[];for(let a=0;a{const[e,t]=c.value,[l,a]=d.value,n=Math.min(e,l),o=Math.min(t,a),i=Math.max(e,l),s=Math.max(t,a),r=JSON.parse(JSON.stringify(p.value));r[n][o].rowspan=i-n+1,r[n][o].colspan=s-o+1,p.value=r,g()},Z=(e,t)=>{const l=JSON.parse(JSON.stringify(p.value));l[e][t].rowspan=1,l[e][t].colspan=1,p.value=l,g()},O=(e,l)=>{g();let n=!0;const o=h.value[l],i=e.pageX,s=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-i)/a.value,r=o+t{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",h.value)}},z=()=>{const e=JSON.parse(JSON.stringify(p.value));for(let t=0;t{const e=(t,l)=>p.value[t]?p.value[t][l]?C(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;d.value=[];const t=c.value[0],l=c.value[1]+1,a=e(t,l);a?c.value=a:(D(t+1),c.value=[t+1,0]),(0,i.Y3)((()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()}))},B=e=>{if(!l.editable||!k.value.length)return;const t=e.key.toUpperCase();if(k.value.length<2){if(t===le.TAB&&(e.preventDefault(),R()),e.ctrlKey&&t===le.UP){e.preventDefault();const t=+k.value[0].split("_")[0];D(t)}if(e.ctrlKey&&t===le.DOWN){e.preventDefault();const t=+k.value[0].split("_")[0];D(t+1)}if(e.ctrlKey&&t===le.LEFT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t)}if(e.ctrlKey&&t===le.RIGHT){e.preventDefault();const t=+k.value[0].split("_")[1];H(t+1)}}else t===le.DELETE&&z()};(0,i.bv)((()=>{document.addEventListener("keydown",B)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",B)}));const P=(0,U.debounce)((function(e,l,a){p.value[l][a].text=e,t("change",p.value)}),300,{trailing:!0}),N=(e,l,a)=>{const n=e.length,o=e[0].length;let s=0,r=0;l+n>p.value.length&&(s=l+n-p.value.length),a+o>p.value[0].length&&(r=a+o-p.value[0].length),(s||r)&&F(s,r),(0,i.Y3)((()=>{for(let t=0;t{const e=[];for(let t=0;t{const e=j(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},V=(e,t)=>{const l=k.value.length>1,a=p.value[e][t],n=l,o=!l&&(a.rowspan>1||a.colspan>1);return{canMerge:n,canSplit:o}},J=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],a=+t.split("_")[1];k.value.includes(`${l}_${a}`)||(c.value=[l,a],d.value=[]);const{canMerge:n,canSplit:o}=V(l,a),{canDeleteRow:i,canDeleteCol:s}=Y();return[{text:"插入列",children:[{text:"到左侧",handler:()=>H(a)},{text:"到右侧",handler:()=>H(a+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>D(l)},{text:"到下方",handler:()=>D(l+1)}]},{text:"删除列",disable:!s,handler:()=>W(a)},{text:"删除行",disable:!i,handler:()=>M(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:A},{text:"取消合并单元格",disable:!o,handler:()=>Z(l,a)},{divider:!0},{text:"选中当前列",handler:()=>L(a)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:T}]};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:"editable-table",style:(0,ae.j5)({width:f.value+"px"})},[e.editable?((0,i.wg)(),(0,i.iD)("div",zs,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"drag-line",key:t,style:(0,ae.j5)({left:e+"px"}),onMousedown:e=>O(e,t)},null,44,Rs)))),128))])):(0,i.kq)("",!0),(0,i._)("table",{class:(0,ae.C_)({theme:v.value,"row-header":v.value?.rowHeader,"row-footer":v.value?.rowFooter,"col-header":v.value?.colHeader,"col-footer":v.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${v.value?.color}; --subThemeColor1: ${(0,s.SU)(m)[0]}; --subThemeColor2: ${(0,s.SU)(m)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(h.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,Bs)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,((t,a)=>((0,i.wg)(),(0,i.iD)("tr",{key:a,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,o)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:(0,ae.C_)(["cell",{selected:k.value.includes(`${a}_${o}`)&&k.value.length>1,active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Ws)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${a}_${o}`,onMousedown:e=>I(e,a,o),onMouseenter:e=>S(a,o)},[b.value===`${a}_${o}`?((0,i.wg)(),(0,i.j4)(Os,{key:0,class:(0,ae.C_)(["cell-text",{active:b.value===`${a}_${o}`}]),style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>(0,s.SU)(P)(e,a,o),onInsertExcelData:e=>N(e,a,o)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Ds)(t.text)},null,12,Ns))],46,Ps)),[[n.F8,!(0,s.SU)(x).includes(`${a}_${o}`)],[l,e=>J(e)]]))),128))],4)))),128))])],6)],4)}}});const Ys=(0,Nl.Z)(js,[["__scopeId","data-v-0236a619"]]);var Vs=Ys;const Js={class:"element-content"};var qs=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:r,handleElementId:u,isScaling:c}=(0,o.Jk)(l),d=(0,s.iH)(),{addHistorySnapshot:p}=ra(),v=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},m=(0,s.iH)(!1);(0,i.YP)(u,(()=>{u.value!==t.elementInfo.id&&(m.value=!1)})),(0,i.YP)(m,(()=>{l.setDisableHotkeysState(m.value)}));const h=()=>{t.elementInfo.lock||(m.value=!0)},f=(0,s.iH)(-1);(0,i.YP)(c,(()=>{u.value===t.elementInfo.id&&(c.value&&(m.value=!1),c.value||-1===f.value||(a.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1))}));const g=e=>{const l=e[0].contentRect;if(!d.value)return;const n=l.height;t.elementInfo.height!==n&&(c.value?f.value=n:a.updateElement({id:t.elementInfo.id,props:{height:n}}))},y=new ResizeObserver(g);(0,i.bv)((()=>{d.value&&y.observe(d.value)})),(0,i.Ah)((()=>{d.value&&y.unobserve(d.value)}));const w=e=>{a.updateElement({id:t.elementInfo.id,props:{data:e}}),p()},x=e=>{const l=e.reduce(((e,t)=>e+t)),n=e.map((e=>e/l));a.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),p()},k=e=>{(0,i.Y3)((()=>l.setSelectedTableCells(e)))};return(e,t)=>{const l=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:d,style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",Js,[(0,i.Wm)(Vs,{onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:m.value,onChange:t[1]||(t[1]=e=>w(e)),onChangeColWidths:t[2]||(t[2]=e=>x(e)),onChangeSelectedCells:t[3]||(t[3]=e=>k(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!m.value||e.elementInfo.lock?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:t[4]||(t[4]=e=>h()),onMousedown:t[5]||(t[5]=e=>v(e)),onTouchstart:t[6]||(t[6]=e=>v(e))},[(0,s.SU)(u)===e.elementInfo.id?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"mask-tip",style:(0,ae.j5)({transform:`scale(${1/(0,s.SU)(r)})`})},"双击编辑",4)):(0,i.kq)("",!0)],34)):(0,i.kq)("",!0)])),[[l,e.contextmenus]])],4)],6)}}});const Xs=(0,Nl.Z)(qs,[["__scopeId","data-v-742a731e"]]);var Gs=Xs;const Ks=["width","height","stroke","stroke-width"],Qs=["transform"],er=["d"];var tr=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},a=()=>{Hi.emit(Ui.OPEN_LATEX_EDITOR)};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-latex",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[0]||(t[0]=e=>l(e)),onTouchstart:t[1]||(t[1]=e=>l(e)),onDblclick:t[2]||(t[2]=e=>a())},[((0,i.wg)(),(0,i.iD)("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"},[(0,i._)("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)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,er)],8,Qs)],8,Ks))],32)),[[n,e.contextmenus]])],4)],6)}}});const lr=(0,Nl.Z)(tr,[["__scopeId","data-v-35c33b80"]]);var ar=lr,nr=(e,t)=>{(0,i.bv)((()=>{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 a=new l;a.loadSource(e),a.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const a=l.createPlayer({type:"flv",url:e});a.attachMediaElement(t.value),a.load()}}}))};const or=e=>((0,i.dD)("data-v-6021c14b"),e=e(),(0,i.Cn)(),e),ir={key:0,class:"load-error"},sr=["src","poster"],rr={class:"bezel"},ur=or((()=>(0,i._)("div",{class:"controller-mask"},null,-1))),cr={class:"controller"},dr={class:"icons icons-left"},pr={class:"icon-content"},vr={class:"volume"},mr={class:"icon-content"},hr=or((()=>(0,i._)("span",{class:"thumb"},null,-1))),fr=[hr],gr={class:"time"},yr={class:"ptime"},wr={class:"dtime"},xr={class:"icons icons-right"},kr={class:"speed"},br={class:"icon speed-icon"},_r=["onClick"],Ir={class:"icon-content"},Sr={class:"bar"},Cr=or((()=>(0,i._)("span",{class:"thumb"},null,-1))),Lr=[Cr];var Er=(0,i.aZ)({__name:"index",props:{width:{},height:{},src:{},poster:{default:""},scale:{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),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(.5),c=(0,s.iH)(!0),d=(0,s.iH)(0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(!1),h=(0,s.iH)(!1),f=(0,s.iH)(1),g=(0,s.iH)(!1),y=(0,s.iH)("00:00"),w=(0,s.iH)("0"),x=(0,i.Fl)((()=>l(d.value))),k=(0,i.Fl)((()=>l(p.value))),b=(0,i.Fl)((()=>d.value/p.value*100+"%")),_=(0,i.Fl)((()=>v.value/p.value*100+"%")),I=(0,i.Fl)((()=>100*u.value+"%")),S=(0,s.iH)(!1),C=[{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}],L=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,p.value),n.value.currentTime=e,d.value=e)},E=()=>{n.value&&(c.value=!1,n.value.play(),h.value=!0)},T=()=>{n.value&&(c.value=!0,n.value.pause(),h.value=!0)},M=()=>{c.value?E():T()},U=e=>{n.value&&(e=Math.max(e,0),e=Math.min(e,1),n.value.volume=e,u.value=e,n.value.muted&&0!==e&&(n.value.muted=!1))},W=e=>{n.value&&(n.value.playbackRate=e),f.value=e},D=()=>{p.value=n.value?.duration||0},H=()=>{d.value=n.value?.currentTime||0},F=()=>{m.value?(L(0),E()):T()},A=()=>{v.value=n.value?.buffered.length?n.value.buffered.end(n.value.buffered.length-1):0},Z=(0,s.iH)(!1),$=()=>Z.value=!0,O=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i},z=e=>{if(!n.value||!o.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-a(o.value))/o.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const i=l*p.value;n.value.currentTime=i,d.value=i,document.removeEventListener("mousemove",O),document.removeEventListener("touchmove",O),document.removeEventListener("mouseup",z),document.removeEventListener("touchend",z)},R=()=>{document.addEventListener("mousemove",O),document.addEventListener("touchmove",O),document.addEventListener("mouseup",z),document.addEventListener("touchend",z)},B=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-a(r.value))/45;U(l)},P=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("touchmove",B),document.removeEventListener("mouseup",P),document.removeEventListener("touchend",P)},N=()=>{document.addEventListener("mousemove",B),document.addEventListener("touchmove",B),document.addEventListener("mouseup",P),document.addEventListener("touchend",P)},j=e=>{if(!r.value)return;const t=(e.clientX-a(r.value))/45;U(t)},Y=e=>{if(p.value&&o.value){const t=o.value.getBoundingClientRect().left,a=e.clientX-t;if(a<0||a>o.value.offsetWidth)return;const n=p.value*(a/o.value.offsetWidth);w.value=a-(n>=3600?25:20)+"px",y.value=l(n),g.value=!0}},V=()=>{n.value&&(n.value.muted?(n.value.muted=!1,U(.5)):(n.value.muted=!0,U(0)))},J=()=>{m.value=!m.value},q=(0,s.iH)(-1),X=(0,s.iH)(!1),G=()=>{X.value=!1,clearTimeout(q.value),q.value=setTimeout((()=>{n.value?.played.length&&(X.value=!0)}),3e3)};return nr(t.src,n),(e,t)=>{const l=(0,i.up)("IconPause"),a=(0,i.up)("IconPlayOne"),s=(0,i.up)("IconVolumeMute"),d=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["video-player",{"hide-controller":X.value}]),style:(0,ae.j5)({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:t[22]||(t[22]=e=>G()),onClick:t[23]||(t[23]=e=>G())},[(0,i._)("div",{class:"video-wrap",onClick:t[8]||(t[8]=e=>M())},[Z.value?((0,i.wg)(),(0,i.iD)("div",ir,"视频加载失败")):(0,i.kq)("",!0),(0,i._)("video",{class:"video",ref_key:"videoRef",ref:n,src:e.src,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:t[0]||(t[0]=e=>D()),onTimeupdate:t[1]||(t[1]=e=>H()),onEnded:t[2]||(t[2]=e=>F()),onProgress:t[3]||(t[3]=e=>A()),onPlay:t[4]||(t[4]=e=>G()),onPause:t[5]||(t[5]=e=>G()),onError:t[6]||(t[6]=e=>$())},null,40,sr),(0,i._)("div",rr,[(0,i._)("span",{class:(0,ae.C_)(["bezel-icon",{"bezel-transition":h.value}]),onAnimationend:t[7]||(t[7]=e=>h.value=!1)},[c.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))],34)])]),ur,(0,i._)("div",cr,[(0,i._)("div",dr,[(0,i._)("div",{class:"icon play-icon",onClick:t[9]||(t[9]=e=>M())},[(0,i._)("span",pr,[c.value?((0,i.wg)(),(0,i.j4)(a,{key:0})):((0,i.wg)(),(0,i.j4)(l,{key:1}))])]),(0,i._)("div",vr,[(0,i._)("div",{class:"icon volume-icon",onClick:t[10]||(t[10]=e=>V())},[(0,i._)("span",mr,[0===u.value?((0,i.wg)(),(0,i.j4)(s,{key:0})):1===u.value?((0,i.wg)(),(0,i.j4)(d,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[11]||(t[11]=e=>N()),onTouchstart:t[12]||(t[12]=e=>N()),onClick:t[13]||(t[13]=e=>j(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:I.value})},fr,4)],512)],32)]),(0,i._)("span",gr,[(0,i._)("span",yr,(0,ae.zw)(x.value),1),(0,i.Uk)(" / "),(0,i._)("span",wr,(0,ae.zw)(k.value),1)])]),(0,i._)("div",xr,[(0,i._)("div",kr,[(0,i._)("div",br,[(0,i._)("span",{class:"icon-content",onClick:t[14]||(t[14]=e=>S.value=!S.value)},(0,ae.zw)(1===f.value?"倍速":f.value+"x"),1),S.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"speed-menu",onMouseleave:t[15]||(t[15]=e=>S.value=!1)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(C,(e=>(0,i._)("div",{class:(0,ae.C_)(["speed-menu-item",{active:e.value===f.value}]),key:e.label,onClick:t=>W(e.value)},(0,ae.zw)(e.label),11,_r))),64))],32)):(0,i.kq)("",!0)])]),(0,i._)("div",{class:"loop",onClick:t[16]||(t[16]=e=>J())},[(0,i._)("div",{class:(0,ae.C_)(["icon loop-icon",{active:m.value}])},[(0,i._)("span",Ir,"循环"+(0,ae.zw)(m.value?"开":"关"),1)],2)])]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:o,onMousedown:t[17]||(t[17]=e=>R()),onTouchstart:t[18]||(t[18]=e=>R()),onMousemove:t[19]||(t[19]=e=>Y(e)),onMouseenter:t[20]||(t[20]=e=>g.value=!0),onMouseleave:t[21]||(t[21]=e=>g.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!g.value}]),style:(0,ae.j5)({left:w.value})},(0,ae.zw)(y.value),7),(0,i._)("div",Sr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:_.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:b.value})},Lr,4)])],544)])],38)}}});const Tr=(0,Nl.Z)(Er,[["__scopeId","data-v-6021c14b"]]);var Mr=Tr,Ur=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(e,t)=>{const n=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-video",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[2]||(t[2]=e=>a(e,!1)),onTouchstart:t[3]||(t[3]=e=>a(e,!1))},[(0,i.Wm)(Mr,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(["t","b","l","r"],(e=>(0,i._)("div",{class:(0,ae.C_)(["handler-border",e]),key:e,onMousedown:t[0]||(t[0]=e=>a(e)),onTouchstart:t[1]||(t[1]=e=>a(e))},null,34))),64))],32)),[[n,e.contextmenus]])],4)],6)}}});const Wr=(0,Nl.Z)(Ur,[["__scopeId","data-v-5dc89f2a"]]);var Dr=Wr;const Hr=e=>((0,i.dD)("data-v-44037f56"),e=e(),(0,i.Cn)(),e),Fr=["src","autoplay"],Ar={class:"controller"},Zr={class:"icons"},$r={class:"icon-content"},Or={class:"volume"},zr={class:"icon-content"},Rr=Hr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Br=[Rr],Pr={class:"time"},Nr={class:"ptime"},jr={class:"dtime"},Yr={class:"bar"},Vr=Hr((()=>(0,i._)("span",{class:"thumb"},null,-1))),Jr=[Vr];var qr=(0,i.aZ)({__name:"AudioPlayer",props:{src:{},loop:{type:Boolean},autoplay:{type:Boolean,default:!1},scale:{default:1}},setup(e,{expose:t}){const l=e,a=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),a=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*a);return(l>0?[l,a,n]:[a,n]).map(t).join(":")},n=e=>e.getBoundingClientRect().left,o=(0,s.iH)(),r=(0,s.iH)(),u=(0,s.iH)(),c=(0,s.iH)(.5),d=(0,s.iH)(!0),p=(0,s.iH)(0),v=(0,s.iH)(0),m=(0,s.iH)(0),h=(0,s.iH)(!1),f=(0,s.iH)("00:00"),g=(0,s.iH)("0"),y=(0,i.Fl)((()=>a(p.value))),w=(0,i.Fl)((()=>a(v.value))),x=(0,i.Fl)((()=>p.value/v.value*100+"%")),k=(0,i.Fl)((()=>m.value/v.value*100+"%")),b=(0,i.Fl)((()=>100*c.value+"%")),_=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,v.value),o.value.currentTime=e,p.value=e)},I=()=>{o.value&&(d.value=!1,o.value.play())},S=()=>{o.value&&(d.value=!0,o.value.pause())},C=()=>{d.value?I():S()},L=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,c.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},E=()=>{v.value=o.value?.duration||0},T=()=>{p.value=o.value?.currentTime||0},M=()=>{d.value=!1},U=()=>{l.loop?(_(0),I()):S()},W=()=>{m.value=o.value?.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=()=>Kl.error("视频加载失败"),H=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a},F=e=>{if(!o.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-n(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const a=l*v.value;o.value.currentTime=a,p.value=a,document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",H),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},A=()=>{document.addEventListener("mousemove",H),document.addEventListener("touchmove",H),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},Z=e=>{if(!u.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-n(u.value))/45;L(l)},$=()=>{document.removeEventListener("mousemove",Z),document.removeEventListener("touchmove",Z),document.removeEventListener("mouseup",$),document.removeEventListener("touchend",$)},O=()=>{document.addEventListener("mousemove",Z),document.addEventListener("touchmove",Z),document.addEventListener("mouseup",$),document.addEventListener("touchend",$)},z=e=>{if(!u.value)return;const t=(e.clientX-n(u.value))/45;L(t)},R=e=>{if(v.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=v.value*(l/r.value.offsetWidth);g.value=l-(n>=3600?25:20)+"px",f.value=a(n),h.value=!0}},B=()=>{o.value&&(o.value.muted?(o.value.muted=!1,L(.5)):(o.value.muted=!0,L(0)))};return t({toggle:C}),(e,t)=>{const l=(0,i.up)("IconPlayOne"),a=(0,i.up)("IconPause"),n=(0,i.up)("IconVolumeMute"),s=(0,i.up)("IconVolumeNotice"),p=(0,i.up)("IconVolumeSmall");return(0,i.wg)(),(0,i.iD)("div",{class:"audio-player",style:(0,ae.j5)({transform:`scale(${1/e.scale})`})},[(0,i._)("audio",{class:"audio",ref_key:"audioRef",ref:o,src:e.src,autoplay:e.autoplay,onDurationchange:t[0]||(t[0]=e=>E()),onTimeupdate:t[1]||(t[1]=e=>T()),onPlay:t[2]||(t[2]=e=>M()),onEnded:t[3]||(t[3]=e=>U()),onProgress:t[4]||(t[4]=e=>W()),onError:t[5]||(t[5]=e=>D())},null,40,Fr),(0,i._)("div",Ar,[(0,i._)("div",Zr,[(0,i._)("div",{class:"icon play-icon",onClick:t[6]||(t[6]=e=>C())},[(0,i._)("span",$r,[d.value?((0,i.wg)(),(0,i.j4)(l,{key:0})):((0,i.wg)(),(0,i.j4)(a,{key:1}))])]),(0,i._)("div",Or,[(0,i._)("div",{class:"icon volume-icon",onClick:t[7]||(t[7]=e=>B())},[(0,i._)("span",zr,[0===c.value?((0,i.wg)(),(0,i.j4)(n,{key:0})):1===c.value?((0,i.wg)(),(0,i.j4)(s,{key:1})):((0,i.wg)(),(0,i.j4)(p,{key:2}))])]),(0,i._)("div",{class:"volume-bar-wrap",onMousedown:t[8]||(t[8]=e=>O()),onTouchstart:t[9]||(t[9]=e=>O()),onClick:t[10]||(t[10]=e=>z(e))},[(0,i._)("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:u},[(0,i._)("div",{class:"volume-bar-inner",style:(0,ae.j5)({width:b.value})},Br,4)],512)],32)])]),(0,i._)("span",Pr,[(0,i._)("span",Nr,(0,ae.zw)(y.value),1),(0,i.Uk)(" / "),(0,i._)("span",jr,(0,ae.zw)(w.value),1)]),(0,i._)("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:t[11]||(t[11]=e=>A()),onTouchstart:t[12]||(t[12]=e=>A()),onMousemove:t[13]||(t[13]=e=>R(e)),onMouseenter:t[14]||(t[14]=e=>h.value=!0),onMouseleave:t[15]||(t[15]=e=>h.value=!1)},[(0,i._)("div",{class:(0,ae.C_)(["bar-time",{hidden:!h.value}]),style:(0,ae.j5)({left:g.value})},(0,ae.zw)(f.value),7),(0,i._)("div",Yr,[(0,i._)("div",{class:"loaded",style:(0,ae.j5)({width:k.value})},null,4),(0,i._)("div",{class:"played",style:(0,ae.j5)({width:x.value})},Jr,4)])],544)])],4)}}});const Xr=(0,Nl.Z)(qr,[["__scopeId","data-v-44037f56"]]);var Gr=Xr,Kr=(0,i.aZ)({__name:"index",props:{elementInfo:{},selectElement:{type:Function},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:a}=(0,o.Jk)($()),{viewportRatio:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),c=(0,i.Fl)((()=>{const e=la,a=la*r.value,n=280/l.value,o=50/l.value,i=t.elementInfo.width,s=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=s;return u+n>=e&&(d=i-n),c+s+o>=a&&(p=-o),{left:d+"px",top:p+"px"}})),d=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(e,t)=>{const o=(0,i.up)("IconVolumeNotice"),r=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["editable-element-audio",{lock:e.elementInfo.lock}]),style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"element-content",onMousedown:t[1]||(t[1]=e=>d(e)),onTouchstart:t[2]||(t[2]=e=>d(e))},[(0,i.Wm)(o,{class:"audio-icon",style:(0,ae.j5)({fontSize:u.value,color:e.elementInfo.color})},null,8,["style"]),(0,s.SU)(a)===e.elementInfo.id?((0,i.wg)(),(0,i.j4)(Gr,{key:0,class:"audio-player",style:(0,ae.j5)({...c.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:(0,s.SU)(l),onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["style","src","loop","scale"])):(0,i.kq)("",!0)],32)),[[r,e.contextmenus]])],4)],6)}}});const Qr=(0,Nl.Z)(Kr,[["__scopeId","data-v-53bdc956"]]);var eu=Qr;const tu=["id"];var lu=(0,i.aZ)({__name:"EditableElement",props:{elementInfo:{},elementIndex:{},isMultiSelect:{type:Boolean},selectElement:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Gi,[na.SHAPE]:vs,[na.LINE]:Is,[na.CHART]:Us,[na.TABLE]:Gs,[na.LATEX]:ar,[na.VIDEO]:Dr,[na.AUDIO]:eu};return e[t.elementInfo.type]||null})),{orderElement:a}=wa(),{alignElementToCanvas:n}=Yn(),{combineElements:o,uncombineElements:s}=ha(),{deleteElement:r}=ma(),{lockElement:u,unlockElement:c}=va(),{copyElement:d,pasteElement:p,cutElement:v}=fa(),{selectAllElement:m}=ga(),h=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>c(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:v},{text:"复制",subText:"Ctrl + C",handler:d},{text:"粘贴",subText:"Ctrl + V",handler:p},{divider:!0},{text:"水平居中",handler:()=>n(K.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"水平居中",handler:()=>n(K.HORIZONTAL)},{text:"左对齐",handler:()=>n(K.LEFT)},{text:"右对齐",handler:()=>n(K.RIGHT)}]},{text:"垂直居中",handler:()=>n(K.VERTICAL),children:[{text:"水平垂直居中",handler:()=>n(K.CENTER)},{text:"垂直居中",handler:()=>n(K.VERTICAL)},{text:"顶部对齐",handler:()=>n(K.TOP)},{text:"底部对齐",handler:()=>n(K.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.TOP),children:[{text:"置于顶层",handler:()=>a(t.elementInfo,G.TOP)},{text:"上移一层",handler:()=>a(t.elementInfo,G.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>a(t.elementInfo,G.BOTTOM),children:[{text:"置于底层",handler:()=>a(t.elementInfo,G.BOTTOM)},{text:"下移一层",handler:()=>a(t.elementInfo,G.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?s:o,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:r}];return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,tu))}});const au=lu;var nu=au,ou=(0,i.aZ)({__name:"MouseSelection",props:{top:{},left:{},width:{},height:{},quadrant:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(`mouse-selection quadrant-${e.quadrant}`),style:(0,ae.j5)({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});const iu=(0,Nl.Z)(ou,[["__scopeId","data-v-2c5e1d42"]]);var su=iu;const ru={class:"grid-lines"},uu=["d","stroke"];var cu=(0,i.aZ)({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=(0,o.Jk)($()),{currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>a.value?.background)),u=(0,i.Fl)((()=>{const e=r.value?.color||"#fff",t=["#000","#fff"];return M.Z.mostReadable(e,t,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()})),c=(0,i.Fl)((()=>{const e=la,t=la*n.value;let a="";for(let n=0;n<=Math.floor(t/l.value);n++)a+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)a+=`M${n*l.value} 0 L${n*l.value} ${t} `;return a}));return(e,l)=>((0,i.wg)(),(0,i.iD)("svg",ru,[(0,i._)("path",{style:(0,ae.j5)({transform:`scale(${(0,s.SU)(t)})`}),d:c.value,fill:"none",stroke:u.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,uu)]))}});const du=(0,Nl.Z)(cu,[["__scopeId","data-v-05484a24"]]);var pu=du,vu=e=>{const t=(0,i.Fl)((()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:a,imageSize:n,gradientColor:o,gradientRotate:i,gradientType:s}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return a?"repeat"===n?{backgroundImage:`url(${a}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${a}`,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=i||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===s?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}}));return{backgroundStyle:t}},mu=(0,i.aZ)({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=(0,o.Jk)($()),{currentSlide:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>l.value?.background)),{backgroundStyle:n}=vu(a);return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:"viewport-background",style:(0,ae.j5)((0,s.SU)(n))},[(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(pu,{key:0})):(0,i.kq)("",!0)],4))}});const hu=(0,Nl.Z)(mu,[["__scopeId","data-v-b6b18502"]]);var fu=hu,gu=(0,i.aZ)({__name:"AlignmentLine",props:{type:{},axis:{},length:{},canvasScale:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.axis.x*t.canvasScale+"px")),a=(0,i.Fl)((()=>t.axis.y*t.canvasScale+"px")),n=(0,i.Fl)((()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"alignment-line",style:(0,ae.j5)({left:l.value,top:a.value})},[(0,i._)("div",{class:(0,ae.C_)(["line",e.type]),style:(0,ae.j5)(n.value)},null,6)],4))}});const yu=(0,Nl.Z)(gu,[["__scopeId","data-v-ed6fc00a"]]);var wu=yu;const xu={class:"ruler"};var ku=(0,i.aZ)({__name:"Ruler",props:{viewportStyles:{}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.viewportStyles.width*l.value/10));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xu,[(0,i._)("div",{class:"h",style:(0,ae.j5)({width:e.viewportStyles.width*(0,s.SU)(l)+"px",left:e.viewportStyles.left+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:`marker-100-${e}`},[(0,i._)("span",null,(0,ae.zw)(e),1)],2))),64))],4),(0,i._)("div",{class:"v",style:(0,ae.j5)({height:e.viewportStyles.height*(0,s.SU)(l)+"px",top:e.viewportStyles.top+"px"})},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(20,(e=>(0,i._)("div",{class:(0,ae.C_)(["ruler-marker-100",{hide:a.value<36,omit:a.value<72}]),key:e,style:(0,ae.j5)({height:a.value+"px"})},[(0,i._)("span",null,(0,ae.zw)(e),1)],6))),64))],4)]))}});const bu=(0,Nl.Z)(ku,[["__scopeId","data-v-2963c74c"]]);var _u=bu;const Iu=["width","height"],Su=["d"];var Cu=(0,i.aZ)({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=$(),{creatingElement:a}=(0,o.Jk)(l),{ctrlOrShiftKeyActive:r}=(0,o.Jk)(V()),u=(0,s.iH)(),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!d.value)return;const{x:e,y:t}=d.value.getBoundingClientRect();p.value={x:e,y:t}}));const v=e=>{let n=!0;const o=e.pageX,i=e.pageY;u.value=[o,i],document.onmousemove=e=>{if(!a.value||!n)return;let t=e.pageX,l=e.pageY;if(r.value){const e=t-o,n=l-i,s=Math.abs(e),r=Math.abs(n);if("shape"===a.value.type){const a=n>0&&e<0||n<0&&e>0;s>r?l=a?i-e:i+e:t=a?o-n:o+n}else"line"===a.value.type&&(s>r?l=i:t=o)}c.value=[t,l]},document.onmouseup=e=>{if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout((()=>l.setCreatingElement(null)),0);n=!1;const s=e.pageX,r=e.pageY,d=30;if("line"===a.value?.type&&(Math.abs(s-o)>=d||Math.abs(r-i)>=d))t("created",{start:u.value,end:c.value});else if("line"!==a.value?.type&&Math.abs(s-o)>=d&&Math.abs(r-i)>=d)t("created",{start:u.value,end:c.value});else{const e=200,l=Math.min(s,o),a=Math.min(r,i),n=Math.max(s,o),u=Math.max(r,i),c=n-l>=d?n-l:e,p=u-a>=d?u-a:e;t("created",{start:[l,a],end:[l+c,a+p]})}}},m=(0,i.Fl)((()=>{if(!u.value||!c.value)return null;if(!a.value||"line"!==a.value.type)return null;const[e,t]=u.value,[l,n]=c.value,o=Math.min(e,l),i=Math.max(e,l),s=Math.min(t,n),r=Math.max(t,n),d=i-o>=24?i-o:24,p=r-s>=24?r-s:24,v=e===o?0:i-o,m=t===s?0:r-s,h=l===o?0:i-o,f=n===s?0:r-s,g=`M${v}, ${m} L${h}, ${f}`;return{svgWidth:d,svgHeight:p,startX:v,startY:m,endX:h,endY:f,path:g}})),h=(0,i.Fl)((()=>{if(!u.value||!c.value)return{};const[e,t]=u.value,[l,a]=c.value,n=Math.min(e,l),o=Math.max(e,l),i=Math.min(t,a),s=Math.max(t,a),r=o-n,d=s-i;return{left:n-p.value.x+"px",top:i-p.value.y+"px",width:r+"px",height:d+"px"}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"element-create-selection",ref_key:"selectionRef",ref:d,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>v(e)),["stop"])),onContextmenu:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop","prevent"]))},[u.value&&c.value?((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["selection",(0,s.SU)(a)?.type]),style:(0,ae.j5)(h.value)},["line"===(0,s.SU)(a)?.type&&m.value?((0,i.wg)(),(0,i.iD)("svg",{key:0,overflow:"visible",width:m.value.svgWidth,height:m.value.svgHeight},[(0,i._)("path",{d:m.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,Su)],8,Iu)):(0,i.kq)("",!0)],6)):(0,i.kq)("",!0)],544))}});const Lu=(0,Nl.Z)(Cu,[["__scopeId","data-v-85b0bbaa"]]);var Eu=Lu;const Tu={overflow:"visible"},Mu=["d","fill"];var Uu=(0,i.aZ)({__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const l=$(),{ctrlOrShiftKeyActive:a}=(0,o.Jk)(V()),r=(0,s.iH)(),u=(0,s.iH)({x:0,y:0});(0,i.bv)((()=>{if(!r.value)return;const{x:e,y:t}=r.value.getBoundingClientRect();u.value={x:e,y:t}}));const c=(0,s.iH)(),d=(0,s.iH)([]),p=(0,s.iH)(!1),v=e=>{let t=e.pageX-u.value.x,l=e.pageY-u.value.y;if(a.value&&d.value.length){const[e,a]=d.value[d.value.length-1];Math.abs(e-t)-Math.abs(a-l)>0?l=a:t=e}return{pageX:t,pageY:l}},m=e=>{const{pageX:t,pageY:l}=v(e);if(c.value=[t,l],d.value.length>=2){const[e,a]=d.value[0];Math.abs(e-t)<5&&Math.abs(a-l)<5?p.value=!0:p.value=!1}else p.value=!1},h=(0,i.Fl)((()=>{let e="";for(let t=0;t{const{pageX:l,pageY:a}=v(e);if(p.value){const e=d.value.map((e=>e[0])),l=d.value.map((e=>e[1])),a=Math.min(...e),n=Math.min(...l),o=Math.max(...e),i=Math.max(...l),s=d.value.map((e=>[e[0]-a,e[1]-n]));let r="";for(let t=0;t{l.setCreatingCustomShapeState(!1)},y=e=>{const t=e.key.toUpperCase();t===le.ESC&&g()};return(0,i.bv)((()=>{Kl.success("点击开始绘制任意多边形,首尾闭合完成绘制,按 ESC 键或鼠标右键关闭"),document.addEventListener("keydown",y)})),(0,i.Ah)((()=>document.removeEventListener("keydown",y))),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:r,onMousedown:t[0]||(t[0]=(0,n.iM)((e=>f(e)),["stop"])),onMousemove:t[1]||(t[1]=e=>m(e)),onContextmenu:t[2]||(t[2]=(0,n.iM)((e=>g()),["stop","prevent"]))},[((0,i.wg)(),(0,i.iD)("svg",Tu,[(0,i._)("path",{d:h.value,stroke:"#d14424",fill:p.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,Mu)]))],544))}});const Wu=(0,Nl.Z)(Uu,[["__scopeId","data-v-224f36be"]]);var Du=Wu,Hu=(e,t)=>{const l=(0,i.Fl)((()=>[{direction:ee.LEFT_TOP,style:{}},{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.RIGHT_TOP,style:{left:e.value+"px"}},{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:ee.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:ee.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}])),a=(0,i.Fl)((()=>[{direction:ee.LEFT,style:{top:t.value/2+"px"}},{direction:ee.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}])),n=(0,i.Fl)((()=>[{direction:ee.TOP,style:{left:e.value/2+"px"}},{direction:ee.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}])),o=(0,i.Fl)((()=>[{type:Q.T,style:{width:e.value+"px"}},{type:Q.B,style:{top:t.value+"px",width:e.value+"px"}},{type:Q.L,style:{height:t.value+"px"}},{type:Q.R,style:{left:e.value+"px",height:t.value+"px"}}]));return{resizeHandlers:l,textElementResizeHandlers:a,verticalTextElementResizeHandlers:n,borderLines:o}},Fu=(0,i.aZ)({__name:"ResizeHandler",props:{type:{},rotate:{default:0}},setup(e){const t=e,l=(0,i.Fl)((()=>{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(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["resize-handler",l.value,e.type])},null,2))}});const Au=(0,Nl.Z)(Fu,[["__scopeId","data-v-1e66197f"]]);var Zu=Au,$u=(0,i.aZ)({__name:"BorderLine",props:{type:{},isWide:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["border-line",e.type,{wide:e.isWide}])},null,2))}});const Ou=(0,Nl.Z)($u,[["__scopeId","data-v-8346cf6c"]]);var zu=Ou,Ru=(0,i.aZ)({__name:"MultiSelectOperate",props:{elementList:{},scaleMultiElement:{type:Function}},setup(e){const t=e,{activeElementIdList:l,canvasScale:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>t.elementList.filter((e=>l.value.includes(e.id))))),u=(0,s.iH)({minX:0,maxX:0,minY:0,maxY:0}),c=(0,i.Fl)((()=>(u.value.maxX-u.value.minX)*a.value)),d=(0,i.Fl)((()=>(u.value.maxY-u.value.minY)*a.value)),{resizeHandlers:p,borderLines:v}=Hu(c,d),m=()=>{const{minX:e,maxX:t,minY:l,maxY:a}=we(r.value);u.value={minX:e,maxX:t,minY:l,maxY:a}};(0,i.m0)(m);const h=(0,i.Fl)((()=>r.value.some((e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)))));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"multi-select-operate",style:(0,ae.j5)({left:u.value.minX*(0,s.SU)(a)+"px",top:u.value.minY*(0,s.SU)(a)+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),(e=>((0,i.wg)(),(0,i.j4)(zu,{key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),h.value?(0,i.kq)("",!0):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:0},(0,i.Ko)((0,s.SU)(p),(t=>((0,i.wg)(),(0,i.j4)(Zu,{key:t.direction,type:t.direction,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleMultiElement(l,u.value,t.direction)),["stop"])},null,8,["type","style","onMousedown"])))),128))],4))}});const Bu=(0,Nl.Z)(Ru,[["__scopeId","data-v-97dc9b9a"]]);var Pu=Bu;const Nu={class:"rotate-handler"};function ju(e,t){return(0,i.wg)(),(0,i.iD)("div",Nu)}const Yu={},Vu=(0,Nl.Z)(Yu,[["render",ju],["__scopeId","data-v-b99d8dae"]]);var Ju=Vu;const qu={inheritAttrs:!1};var Xu=(0,i.aZ)({...qu,__name:"ImageElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:a}=(0,o.Jk)($()),r=(0,i.Fl)((()=>a.value===t.elementInfo.id)),u=(0,i.Fl)((()=>t.elementInfo.width*l.value)),c=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:d,borderLines:p}=Hu(u,c);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["image-element-operate",{cliping:r.value}])},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(p),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:u.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)],2))}});const Gu=(0,Nl.Z)(Xu,[["__scopeId","data-v-7bcad5a9"]]);var Ku=Gu;const Qu={class:"text-element-operate"},ec={inheritAttrs:!1};var tc=(0,i.aZ)({...ec,__name:"TextElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{textElementResizeHandlers:u,verticalTextElementResizeHandlers:c,borderLines:d}=Hu(a,r),p=(0,i.Fl)((()=>t.elementInfo.vertical?c.value:u.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Qu,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const lc=tc;var ac=lc;const nc={class:"shape-element-operate"},oc={inheritAttrs:!1};var ic=(0,i.aZ)({...oc,__name:"ShapeElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},moveShapeKeypoint:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Hu(a,r),d=(0,i.Fl)((()=>{if(!t.elementInfo.pathFormula||!t.elementInfo.keypoint)return{};const e=oa[t.elementInfo.pathFormula];if("editable"in e){const a=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:a*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-a)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-a)/2*l.value+"px"};if("top"===e.relative)return{top:a*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-a)*l.value+"px"}}return{}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",nc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"operate-keypoint-handler",style:(0,ae.j5)(d.value),onMousedown:t[1]||(t[1]=(0,n.iM)((t=>e.moveShapeKeypoint(t,e.elementInfo)),["stop"]))},null,36)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)]))}});const sc=(0,Nl.Z)(ic,[["__scopeId","data-v-d1eb5d90"]]);var rc=sc;const uc={class:"line-element-operate"},cc=["width","height","stroke"],dc={key:0},pc=["x1","y1","x2","y2"],vc=["x1","y1","x2","y2"],mc=["x1","y1","x2","y2"],hc=["x1","y1","x2","y2"],fc={inheritAttrs:!1};var gc=(0,i.aZ)({...fc,__name:"LineElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},dragLineElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0]))),r=(0,i.Fl)((()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1]))),u=(0,i.Fl)((()=>{const e=[{handler:te.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:te.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 a=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:te.C,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[a,n]=t.elementInfo.cubic;e.push({handler:te.C1,style:{left:a[0]*l.value+"px",top:a[1]*l.value+"px"}}),e.push({handler:te.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uc,[e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.handler,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.dragLineElement(l,e.elementInfo,t.handler)),["stop"])},null,8,["style","onMousedown"])))),128)),((0,i.wg)(),(0,i.iD)("svg",{width:a.value||1,height:r.value||1,stroke:e.elementInfo.color,overflow:"visible",style:(0,ae.j5)({transform:`scale(${(0,s.SU)(l)})`})},[e.elementInfo.curve?((0,i.wg)(),(0,i.iD)("g",dc,[(0,i._)("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,pc),(0,i._)("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,vc)])):(0,i.kq)("",!0),e.elementInfo.cubic?((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)(e.elementInfo.cubic,((t,l)=>((0,i.wg)(),(0,i.iD)("g",{key:l},[0===l?((0,i.wg)(),(0,i.iD)("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,mc)):(0,i.kq)("",!0),1===l?((0,i.wg)(),(0,i.iD)("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,hc)):(0,i.kq)("",!0)])))),128)):(0,i.kq)("",!0)],12,cc))],64)):(0,i.kq)("",!0)]))}});const yc=(0,Nl.Z)(gc,[["__scopeId","data-v-3aa5cc44"]]);var wc=yc;const xc={class:"table-element-operate"},kc={inheritAttrs:!1};var bc=(0,i.aZ)({...kc,__name:"TableElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.outline.width||1)),r=(0,i.Fl)((()=>(t.elementInfo.width+a.value)*l.value)),u=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:c,borderLines:d}=Hu(r,u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),(0,i.Wm)(Ju,{class:"operate-rotate-handler",style:(0,ae.j5)({left:r.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"])],64)):(0,i.kq)("",!0)]))}});const _c=bc;var Ic=_c;const Sc={class:"common-element-operate"},Cc={inheritAttrs:!1};var Lc=(0,i.aZ)({...Cc,__name:"CommonElementOperate",props:{elementInfo:{},handlerVisible:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function}},setup(e){const t=e,{canvasScale:l}=(0,o.Jk)($()),a=(0,i.Fl)((()=>t.elementInfo.width*l.value)),r=(0,i.Fl)((()=>t.elementInfo.height*l.value)),{resizeHandlers:u,borderLines:c}=Hu(a,r),d=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Sc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(c),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),e.handlerVisible?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(u),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onMousedown:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onMousedown"])))),128)),d.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Ju,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onMousedown:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)]))}});const Ec=Lc;var Tc=Ec,Mc=()=>{const e=F(),{addHistorySnapshot:t}=ra(),l=(l,a)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===a.type&&!n.test(a.target))return Kl.error("不是正确的网页链接地址"),!1;if("slide"===a.type&&!a.target)return Kl.error("请先选择链接目标"),!1;const o={link:a};return e.updateElement({id:l.id,props:o}),t(),!0},a=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:a}},Uc=(0,i.aZ)({__name:"Divider",props:{type:{default:"horizontal"},margin:{default:0}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["divider",e.type]),style:(0,ae.j5)({margin:"horizontal"===e.type?`${e.margin||24}px 0`:`0 ${e.margin||8}px`})},null,6))}});const Wc=(0,Nl.Z)(Uc,[["__scopeId","data-v-6b66cde8"]]);var Dc=Wc;const Hc=["href"],Fc={class:"btns"};var Ac=(0,i.aZ)({__name:"LinkHandler",props:{elementInfo:{},link:{},openLinkDialog:{type:Function}},setup(e){const t=e,l=$(),a=F(),{canvasScale:n}=(0,o.Jk)(l),{slides:r}=(0,o.Jk)(a),{removeLink:u}=Mc(),c=(0,i.Fl)((()=>"line"===t.elementInfo.type?0:t.elementInfo.height)),d=e=>{const t=r.value.findIndex((t=>t.id===e));-1!==t&&(l.setActiveElementIdList([]),a.updateSlideIndex(t))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"link-handler",style:(0,ae.j5)({top:c.value*(0,s.SU)(n)+10+"px"})},["web"===e.link.type?((0,i.wg)(),(0,i.iD)("a",{key:0,class:"link",href:e.link.target,target:"_blank"},(0,ae.zw)(e.link.target),9,Hc)):((0,i.wg)(),(0,i.iD)("a",{key:1,class:"link",onClick:t[0]||(t[0]=t=>d(e.link.target))},"幻灯片页面 "+(0,ae.zw)(e.link.target),1)),(0,i._)("div",Fc,[(0,i._)("div",{class:"btn",onClick:t[1]||(t[1]=t=>e.openLinkDialog())},"更换"),(0,i.Wm)(Dc,{type:"vertical"}),(0,i._)("div",{class:"btn",onClick:t[2]||(t[2]=t=>(0,s.SU)(u)(e.elementInfo))},"移除")])],4))}});const Zc=(0,Nl.Z)(Ac,[["__scopeId","data-v-316c4664"]]);var $c=Zc;const Oc={key:1,class:"animation-index"};var zc=(0,i.aZ)({__name:"index",props:{elementInfo:{},isSelected:{type:Boolean},isActive:{type:Boolean},isActiveGroupElement:{type:Boolean},isMultiSelect:{type:Boolean},rotateElement:{type:Function},scaleElement:{type:Function},dragLineElement:{type:Function},moveShapeKeypoint:{type:Function},openLinkDialog:{type:Function}},setup(e){const t=e,{canvasScale:l,toolbarState:a}=(0,o.Jk)($()),{formatedAnimations:r}=(0,o.Jk)(F()),u=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ku,[na.TEXT]:ac,[na.SHAPE]:rc,[na.LINE]:wc,[na.TABLE]:Ic,[na.CHART]:Tc,[na.LATEX]:Tc,[na.VIDEO]:Tc,[na.AUDIO]:Tc};return e[t.elementInfo.type]||null})),c=(0,i.Fl)((()=>{const e=[];for(let l=0;le.elId));a.includes(t.elementInfo.id)&&e.push(l)}return e})),d=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),p=(0,i.Fl)((()=>"height"in t.elementInfo?t.elementInfo.height:0));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:(0,ae.j5)({top:e.elementInfo.top*(0,s.SU)(l)+"px",left:e.elementInfo.left*(0,s.SU)(l)+"px",transform:`rotate(${d.value}deg)`,transformOrigin:`${e.elementInfo.width*(0,s.SU)(l)/2}px ${p.value*(0,s.SU)(l)/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.j4)((0,i.LL)(u.value),{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"])):(0,i.kq)("",!0),"elAnimation"===(0,s.SU)(a)&&c.value.length?((0,i.wg)(),(0,i.iD)("div",Oc,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(c.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"index-item",key:e},(0,ae.zw)(e+1),1)))),128))])):(0,i.kq)("",!0),e.isActive&&e.elementInfo.link?((0,i.wg)(),(0,i.j4)($c,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:t[0]||(t[0]=(0,n.iM)((()=>{}),["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):(0,i.kq)("",!0)],6))}});const Rc=(0,Nl.Z)(zc,[["__scopeId","data-v-5ec1ff35"]]);var Bc=Rc;const Pc=["src"];var Nc=(0,i.aZ)({__name:"BaseImageElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>t.elementInfo.flipH)),o=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:r}=Jn(n,o),u=(0,i.Fl)((()=>t.elementInfo.clip)),{clipShape:c,imgPosition:d}=Xn(u),p=(0,i.Fl)((()=>t.elementInfo.filters)),{filter:v}=Gn(p);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-image",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:"",transform:(0,s.SU)(r)})},[(0,i.Wm)(yo,{elementInfo:e.elementInfo},null,8,["elementInfo"]),(0,i._)("div",{class:"image-content",style:(0,ae.j5)({clipPath:(0,s.SU)(c).style})},[(0,i._)("img",{src:e.elementInfo.src,draggable:!1,style:(0,ae.j5)({top:(0,s.SU)(d).top,left:(0,s.SU)(d).left,width:(0,s.SU)(d).width,height:(0,s.SU)(d).height,filter:(0,s.SU)(v)}),alt:""},null,12,Pc),e.elementInfo.colorMask?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"color-mask",style:(0,ae.j5)({backgroundColor:e.elementInfo.colorMask})},null,4)):(0,i.kq)("",!0)],4)],4)],4)],4))}});const jc=(0,Nl.Z)(Nc,[["__scopeId","data-v-24fef706"]]);var Yc=jc;const Vc=["innerHTML"];var Jc=(0,i.aZ)({__name:"BaseTextElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-text",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({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:(0,s.SU)(a),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"})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i._)("div",{class:"text ProseMirror-static",style:(0,ae.j5)({"--paragraphSpace":`${void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,12,Vc)],4)],4)],4))}});const qc=(0,Nl.Z)(Jc,[["__scopeId","data-v-52a206f2"]]);var Xc=qc;const Gc=["width","height"],Kc={key:0},Qc=["transform"],ed=["d","fill","stroke","stroke-width","stroke-dasharray"],td=["innerHTML"];var ld=(0,i.aZ)({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.outline)),{outlineWidth:a,outlineColor:n,strokeDashArray:o}=Kn(l),r=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:u}=Vn(r),c=(0,i.Fl)((()=>t.elementInfo.flipH)),d=(0,i.Fl)((()=>t.elementInfo.flipV)),{flipStyle:p}=Jn(c,d),v=(0,i.Fl)((()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-shape",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({opacity:e.elementInfo.opacity,filter:(0,s.SU)(u)?`drop-shadow(${(0,s.SU)(u)})`:"",transform:(0,s.SU)(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?((0,i.wg)(),(0,i.iD)("defs",Kc,[(0,i.Wm)(is,{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"])])):(0,i.kq)("",!0),(0,i._)("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)`},[(0,i._)("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:(0,s.SU)(n),"stroke-width":(0,s.SU)(a),"stroke-dasharray":(0,s.SU)(o)},null,8,ed)],8,Qc)],8,Gc)),(0,i._)("div",{class:(0,ae.C_)(["shape-text",v.value.align])},[(0,i._)("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,td)],2)],4)],4)],4))}});const ad=(0,Nl.Z)(ld,[["__scopeId","data-v-b13f8fa8"]]);var nd=ad;const od=["width","height"],id=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var sd=(0,i.aZ)({__name:"BaseLineElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>t.elementInfo.shadow)),{shadowStyle:a}=Vn(l),n=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e})),o=(0,i.Fl)((()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e})),r=(0,i.Fl)((()=>{if("dashed"!==t.elementInfo.style)return"0 0";const e=t.elementInfo.width;return e<=8?`${5*e} ${2.5*e}`:`${5*e} ${1.5*e}`})),u=(0,i.Fl)((()=>Ie(t.elementInfo)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-line",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({filter:(0,s.SU)(a)?`drop-shadow(${(0,s.SU)(a)})`:""})},[((0,i.wg)(),(0,i.iD)("svg",{overflow:"visible",width:n.value,height:o.value},[(0,i._)("defs",null,[e.elementInfo.points[0]?((0,i.wg)(),(0,i.j4)(ys,{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"])):(0,i.kq)("",!0),e.elementInfo.points[1]?((0,i.wg)(),(0,i.j4)(ys,{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"])):(0,i.kq)("",!0)]),(0,i._)("path",{d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":r.value,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,id)],8,od))],4)],4))}});const rd=(0,Nl.Z)(sd,[["__scopeId","data-v-443e2f82"]]);var ud=rd,cd=(0,i.aZ)({__name:"BaseChartElement",props:{elementInfo:{}},setup(e){const t=(0,i.f3)(Sn)||(0,s.iH)(1),l=(0,i.Fl)((()=>t.value<1)),a=(0,i.Fl)((()=>l.value?1/t.value:1));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-chart",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundColor:e.elementInfo.fill})},[(0,i.Wm)(Oo,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),(0,i.Wm)(Es,{width:e.elementInfo.width*a.value,height:e.elementInfo.height*a.value,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:(0,ae.j5)({zoom:1/a.value})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});const dd=(0,Nl.Z)(cd,[["__scopeId","data-v-7c03d68d"]]);var pd=dd;const vd=["width"],md=["rowspan","colspan"],hd=["innerHTML"];var fd=(0,i.aZ)({__name:"StaticTable",props:{data:{},width:{},cellMinHeight:{},colWidths:{},outline:{},theme:{},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=(0,s.iH)([]),a=(0,i.Fl)((()=>l.value.reduce(((e,t)=>e+t))));(0,i.YP)([()=>t.colWidths,()=>t.width],(()=>{l.value=t.colWidths.map((e=>e*t.width))}),{immediate:!0});const o=(0,i.Fl)((()=>t.data)),{hideCells:r}=Hs(o),u=(0,i.Fl)((()=>t.theme)),{subThemeColor:c}=Fs(u);return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"static-table",style:(0,ae.j5)({width:a.value+"px"})},[(0,i._)("table",{class:(0,ae.C_)({theme:u.value,"row-header":u.value?.rowHeader,"row-footer":u.value?.rowFooter,"col-header":u.value?.colHeader,"col-footer":u.value?.colFooter}),style:(0,ae.j5)(`--themeColor: ${u.value?.color}; --subThemeColor1: ${(0,s.SU)(c)[0]}; --subThemeColor2: ${(0,s.SU)(c)[1]}`)},[(0,i._)("colgroup",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("col",{span:"1",key:t,width:e},null,8,vd)))),128))]),(0,i._)("tbody",null,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.data,((t,l)=>((0,i.wg)(),(0,i.iD)("tr",{key:l,style:(0,ae.j5)({height:e.cellMinHeight+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((t,a)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("td",{class:"cell",style:(0,ae.j5)({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...(0,s.SU)(Ws)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[(0,i._)("div",{class:"cell-text",style:(0,ae.j5)({minHeight:e.cellMinHeight-4+"px"}),innerHTML:(0,s.SU)(Ds)(t.text)},null,12,hd)],12,md)),[[n.F8,!(0,s.SU)(r).includes(`${l}_${a}`)]]))),128))],4)))),128))])],6)],4))}});const gd=(0,Nl.Z)(fd,[["__scopeId","data-v-5d949d4d"]]);var yd=gd;const wd={class:"element-content"};var xd=(0,i.aZ)({__name:"BaseTableElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-table",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",wd,[(0,i.Wm)(yd,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});const kd=(0,Nl.Z)(xd,[["__scopeId","data-v-3eff7eba"]]);var bd=kd;const _d={class:"element-content"},Id=["width","height","stroke","stroke-width"],Sd=["transform"],Cd=["d"];var Ld=(0,i.aZ)({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"base-element-latex",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",_d,[((0,i.wg)(),(0,i.iD)("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"},[(0,i._)("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)`},[(0,i._)("path",{d:e.elementInfo.path},null,8,Cd)],8,Sd)],8,Id))])],4)],4))}});const Ed=(0,Nl.Z)(Ld,[["__scopeId","data-v-1587280d"]]);var Td=Ed,Md=(0,i.aZ)({__name:"BaseVideoElement",props:{elementInfo:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlayOne");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",{class:"element-content",style:(0,ae.j5)({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[(0,i.Wm)(l,{class:"icon"})],4)],4)],4)}}});const Ud=(0,Nl.Z)(Md,[["__scopeId","data-v-09436dde"]]);var Wd=Ud;const Dd={class:"element-content"};var Hd=(0,i.aZ)({__name:"BaseAudioElement",props:{elementInfo:{}},setup(e){const t=e,l=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"));return(e,t)=>{const a=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"base-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",Dd,[(0,i.Wm)(a,{class:"audio-icon",style:(0,ae.j5)({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});const Fd=(0,Nl.Z)(Hd,[["__scopeId","data-v-5da834d7"]]);var Ad=Fd,Zd=(0,i.aZ)({__name:"ThumbnailElement",props:{elementInfo:{},elementIndex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Yc,[na.TEXT]:Xc,[na.SHAPE]:nd,[na.LINE]:ud,[na.CHART]:pd,[na.TABLE]:bd,[na.LATEX]:Td,[na.VIDEO]:Wd,[na.AUDIO]:Ad};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-element",`base-element-${e.elementInfo.id}`]),style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const $d=Zd;var Od=$d;const zd={key:1,class:"placeholder"};var Rd=(0,i.aZ)({__name:"index",props:{slide:{},size:{},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=vu(a),r=(0,i.Fl)((()=>t.size/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-slide",style:(0,ae.j5)({width:e.size+"px",height:e.size*(0,s.SU)(l)+"px"})},[e.visible?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"elements",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${r.value})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(n))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((e,t)=>((0,i.wg)(),(0,i.j4)(Od,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"])))),128))],4)):((0,i.wg)(),(0,i.iD)("div",zd,"加载中 ..."))],4))}});const Bd=(0,Nl.Z)(Rd,[["__scopeId","data-v-43dcaa52"]]);var Pd=Bd;const Nd=["onClick"];var jd=(0,i.aZ)({__name:"Tabs",props:{value:{},tabs:{},card:{type:Boolean,default:!1},tabsStyle:{},tabStyle:{},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:(0,ae.j5)(e.tabsStyle||{})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.tabs,(l=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["tab",{active:l.key===e.value}]),key:l.key,style:(0,ae.j5)({...e.tabStyle||{},"--color":l.color}),onClick:e=>t("update:value",l.key)},(0,ae.zw)(l.label),15,Nd)))),128))],6))}});const Yd=(0,Nl.Z)(jd,[["__scopeId","data-v-5e3d7626"]]);var Vd=Yd,Jd=(0,i.aZ)({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"}},emits:["click"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("click")};return(e,t)=>((0,i.wg)(),(0,i.iD)("button",{class:(0,ae.C_)(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&"default"===e.type,primary:!e.disabled&&"primary"===e.type,checkbox:!e.disabled&&"checkbox"===e.type,radio:!e.disabled&&"radio"===e.type,small:"small"===e.size}]),onClick:t[0]||(t[0]=e=>a())},[(0,i.WI)(e.$slots,"default")],2))}});const qd=(0,Nl.Z)(Jd,[["__scopeId","data-v-c1e90bcc"]]);var Xd=qd;const Gd={key:0,class:"select-wrap"},Kd={class:"selector"},Qd={class:"icon"},ep=["onClick"],tp={class:"selector"},lp={class:"icon"};var ap=(0,i.aZ)({__name:"Select",props:{value:{},options:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.options.find((e=>e.value===l.value))?.label||l.value)),n=(0,s.iH)(!1),o=(0,s.iH)(),r=(0,s.iH)(0),u=()=>{o.value&&(r.value=o.value.clientWidth)},c=new ResizeObserver(u);(0,i.bv)((()=>{o.value&&c.observe(o.value)})),(0,i.Ah)((()=>{o.value&&c.unobserve(o.value)}));const d=e=>{e.disabled||(t("update:value",e.value),n.value=!1)};return(e,t)=>{const l=(0,i.up)("IconDown");return e.disabled?((0,i.wg)(),(0,i.iD)("div",Gd,[(0,i._)("div",{class:"select disabled",ref_key:"selectRef",ref:o},[(0,i._)("div",Kd,(0,ae.zw)(e.value),1),(0,i._)("div",Qd,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])):((0,i.wg)(),(0,i.j4)(rn,{key:1,class:"select-wrap",trigger:"click",value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:(0,i.w5)((()=>[(0,i._)("div",{class:"options",style:(0,ae.j5)({width:r.value+2+"px"})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["option",{disabled:t.disabled,selected:t.value===e.value}]),key:t.value,onClick:e=>d(t)},(0,ae.zw)(t.label),11,ep)))),128))],4)])),default:(0,i.w5)((()=>[(0,i._)("div",{class:"select",ref_key:"selectRef",ref:o},[(0,i._)("div",tp,(0,ae.zw)(a.value),1),(0,i._)("div",lp,[(0,i.WI)(e.$slots,"icon",{},(()=>[(0,i.Wm)(l,{size:14})]))])],512)])),_:3},8,["value","contentStyle"]))}}});const np=(0,Nl.Z)(ap,[["__scopeId","data-v-6e2a1b69"]]);var op=np;const ip=e=>((0,i.dD)("data-v-cc39ee16"),e=e(),(0,i.Cn)(),e),sp={class:"link-dialog"},rp={key:2,class:"preview"},up=ip((()=>(0,i._)("div",null,"预览:",-1))),cp={class:"btns"};var dp=(0,i.aZ)({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){const{handleElement:l}=(0,o.Jk)($()),{slides:a,currentSlide:n}=(0,o.Jk)(F()),r=(0,s.iH)("web"),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,i.Fl)((()=>a.value.map(((e,t)=>({label:`幻灯片 ${t+1}`,value:e.id,disabled:n.value.id===e.id})))));c.value=a.value.find((e=>e.id!==n.value.id))?.id||"";const p=(0,i.Fl)((()=>c.value&&a.value.find((e=>e.id===c.value))||null)),v=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:m}=Mc();(0,i.bv)((()=>{l.value?.link&&("web"===l.value.link.type?u.value=l.value.link.target:"slide"===l.value.link.type&&(c.value=l.value.link.target),r.value=l.value.link.type)}));const h=()=>{const e={type:r.value,target:"web"===r.value?u.value:c.value};if(l.value){const a=m(l.value,e);a?t("close"):u.value=""}};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",sp,[(0,i.Wm)(Vd,{tabs:v,value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),"web"===r.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):(0,i.kq)("",!0),"slide"===r.value?((0,i.wg)(),(0,i.j4)(op,{key:1,class:"input",value:c.value,"onUpdate:value":l[2]||(l[2]=e=>c.value=e),options:d.value},null,8,["value","options"])):(0,i.kq)("",!0),"slide"===r.value&&p.value?((0,i.wg)(),(0,i.iD)("div",rp,[up,(0,i.Wm)(Pd,{class:"thumbnail",slide:p.value,size:500},null,8,["slide"])])):(0,i.kq)("",!0),(0,i._)("div",cp,[(0,i.Wm)(Xd,{onClick:l[3]||(l[3]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:l[4]||(l[4]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])]))}});const pp=(0,Nl.Z)(dp,[["__scopeId","data-v-cc39ee16"]]);var vp=pp,mp=(0,i.aZ)({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(e,{emit:t}){const l=e,{IconClose:a}=Fl,o=(0,s.iH)(),r=(0,s.iH)(!1),u=(0,i.Fl)((()=>({width:l.width+"px",...l.contentStyle||{}})));(0,i.YP)((()=>l.visible),(()=>{l.visible&&(0,i.Y3)((()=>o.value.focus()))}));const c=()=>{t("update:visible",!1),t("closed")},d=()=>{l.visible&&l.closeOnEsc&&c()},p=()=>{l.closeOnClickMask&&c()};return(e,t)=>((0,i.wg)(),(0,i.j4)(i.lR,{to:"body"},[(0,i.Wm)(n.uT,{name:"modal-fade"},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal",ref_key:"modalRef",ref:o,tabindex:"-1",onKeyup:t[4]||(t[4]=(0,n.D2)((e=>d()),["esc"]))},[(0,i._)("div",{class:"mask",onClick:t[0]||(t[0]=e=>p())}),(0,i.Wm)(n.uT,{name:"modal-zoom",onAfterLeave:t[2]||(t[2]=e=>r.value=!1),onBeforeEnter:t[3]||(t[3]=e=>r.value=!0)},{default:(0,i.w5)((()=>[(0,i.wy)((0,i._)("div",{class:"modal-content",style:(0,ae.j5)(u.value)},[e.closeButton?((0,i.wg)(),(0,i.iD)("span",{key:0,class:"close-btn",onClick:t[1]||(t[1]=e=>c())},[(0,i.Wm)((0,s.SU)(a))])):(0,i.kq)("",!0),r.value?(0,i.WI)(e.$slots,"default",{key:1}):(0,i.kq)("",!0)],4),[[n.F8,e.visible]])])),_:3})],544),[[n.F8,e.visible]])])),_:3})]))}});const hp=(0,Nl.Z)(mp,[["__scopeId","data-v-5d43bffb"]]);var fp=hp;const gp={class:"operates"},yp={key:2,class:"drag-mask"};var wp=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,activeGroupElementId:a,handleElementId:r,hiddenElementIdList:u,editorAreaFocus:c,gridLineSize:d,showRuler:p,creatingElement:v,creatingCustomShape:m,canvasScale:h,textFormatPainter:f}=(0,o.Jk)(t),{currentSlide:g}=(0,o.Jk)(F()),{ctrlKeyState:y,spaceKeyState:w}=(0,o.Jk)(V()),x=(0,s.iH)(),k=(0,s.iH)([]),b=(0,s.iH)(!1),_=()=>b.value=!0;(0,i.YP)(r,(()=>{t.setActiveGroupElementId("")}));const I=(0,s.iH)([]),S=()=>{I.value=g.value?JSON.parse(JSON.stringify(g.value.elements)):[]};(0,i.m0)(S);const C=(0,s.iH)(),{dragViewport:L,viewportStyles:E}=Tn(C);Un(C);const{mouseSelection:T,mouseSelectionVisible:M,mouseSelectionQuadrant:W,updateMouseSelection:D}=Mn(I,x),{dragElement:H}=Bn(I,k,h),{dragLineElement:A}=Pn(I),{selectElement:Z}=Rn(I,H),{scaleElement:O,scaleMultiElement:z}=zn(I,k,h),{rotateElement:R}=Dn(I,x,h),{moveShapeKeypoint:B}=Nn(I,h),{selectAllElement:P}=ga(),{deleteAllElements:N}=ma(),{pasteElement:j}=fa(),{enterScreeningFromStart:Y}=_a(),{updateSlideIndex:J}=pa(),{createTextElement:q,createShapeElement:X}=ua();(0,i.bv)((()=>{l.value.length&&(0,i.Y3)((()=>t.setActiveElementIdList([])))}));const G=e=>{l.value.length&&t.setActiveElementIdList([]),w.value?L(e):D(e),c.value||t.setEditorareaFocus(!0),f.value&&t.setTextFormatPainter(null),En()},K=e=>{if(l.value.length||v.value||m.value)return;if(!x.value)return;const t=x.value.getBoundingClientRect(),a=(e.pageX-t.x)/h.value,n=(e.pageY-t.y)/h.value;q({left:a,top:n,width:200/h.value,height:0})};(0,i.Ah)((()=>{f.value&&t.setTextFormatPainter(null)}));const Q=()=>{c.value&&t.setEditorareaFocus(!1)},{scaleCanvas:ee}=Ia(),te=(0,U.throttle)(ee,100,{leading:!0,trailing:!1}),ne=(0,U.throttle)(J,300,{leading:!0,trailing:!1}),oe=e=>{e.preventDefault(),y.value?e.deltaY>0?te("-"):e.deltaY<0&&te("+"):e.deltaY>0?ne(le.DOWN):e.deltaY<0&&ne(le.UP)},ie=()=>{t.setRulerState(!p.value)},{insertElementFromCreateSelection:se,formatCreateSelection:re}=jn(x),ue=e=>{const{start:l,end:a,path:n,viewBox:o}=e,i=re({start:l,end:a});i&&X(i,{path:n,viewBox:o}),t.setCreatingCustomShapeState(!1)},ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:j},{text:"全选",subText:"Ctrl + A",handler:P},{text:"标尺",subText:p.value?"√":"",handler:ie},{text:"网格线",handler:()=>t.setGridLineSize(d.value?0:50),children:[{text:"无",subText:0===d.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===d.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===d.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===d.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:N},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:Y}];return(0,i.JJ)(Sn,h),(e,t)=>{const o=(0,i.Q2)("contextmenu"),c=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[4]||(t[4]=e=>oe(e)),onMousedown:t[5]||(t[5]=e=>G(e)),onDblclick:t[6]||(t[6]=e=>K(e))},[(0,s.SU)(v)?((0,i.wg)(),(0,i.j4)(Eu,{key:0,onCreated:t[0]||(t[0]=e=>(0,s.SU)(se)(e))})):(0,i.kq)("",!0),(0,s.SU)(m)?((0,i.wg)(),(0,i.j4)(Du,{key:1,onCreated:t[1]||(t[1]=e=>ue(e))})):(0,i.kq)("",!0),(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)({width:(0,s.SU)(E).width*(0,s.SU)(h)+"px",height:(0,s.SU)(E).height*(0,s.SU)(h)+"px",left:(0,s.SU)(E).left+"px",top:(0,s.SU)(E).top+"px"})},[(0,i._)("div",gp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(k.value,((e,t)=>((0,i.wg)(),(0,i.j4)(wu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:(0,s.SU)(h)},null,8,["type","axis","length","canvasScale"])))),128)),(0,s.SU)(l).length>1?((0,i.wg)(),(0,i.j4)(Pu,{key:0,elementList:I.value,scaleMultiElement:(0,s.SU)(z)},null,8,["elementList","scaleMultiElement"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,(e=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(Bc,{key:e.id,elementInfo:e,isSelected:(0,s.SU)(l).includes(e.id),isActive:(0,s.SU)(r)===e.id,isActiveGroupElement:(0,s.SU)(a)===e.id,isMultiSelect:(0,s.SU)(l).length>1,rotateElement:(0,s.SU)(R),scaleElement:(0,s.SU)(O),openLinkDialog:_,dragLineElement:(0,s.SU)(A),moveShapeKeypoint:(0,s.SU)(B)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128)),(0,i.Wm)(fu)]),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:x,style:(0,ae.j5)({transform:`scale(${(0,s.SU)(h)})`})},[(0,s.SU)(M)?((0,i.wg)(),(0,i.j4)(su,{key:0,top:(0,s.SU)(T).top,left:(0,s.SU)(T).left,width:(0,s.SU)(T).width,height:(0,s.SU)(T).height,quadrant:(0,s.SU)(W)},null,8,["top","left","width","height","quadrant"])):(0,i.kq)("",!0),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(I.value,((e,t)=>(0,i.wy)(((0,i.wg)(),(0,i.j4)(nu,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:(0,s.SU)(l).length>1,selectElement:(0,s.SU)(Z),openLinkDialog:_},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n.F8,!(0,s.SU)(u).includes(e.id)]]))),128))],4)],4),(0,s.SU)(w)?((0,i.wg)(),(0,i.iD)("div",yp)):(0,i.kq)("",!0),(0,s.SU)(p)?((0,i.wg)(),(0,i.j4)(_u,{key:3,viewportStyles:(0,s.SU)(E)},null,8,["viewportStyles"])):(0,i.kq)("",!0),(0,i.Wm)(fp,{visible:b.value,"onUpdate:visible":t[3]||(t[3]=e=>b.value=e),width:540},{default:(0,i.w5)((()=>[(0,i.Wm)(vp,{onClose:t[2]||(t[2]=e=>b.value=!1)})])),_:1},8,["visible"])],32)),[[o,ce],[c,Q]])}}});const xp=(0,Nl.Z)(wp,[["__scopeId","data-v-ce64755c"]]);var kp=xp;const bp={class:"shape-item-thumbnail"},_p={class:"shape-content"},Ip={overflow:"visible",width:"18",height:"18"},Sp=["transform"],Cp=["fill","stroke","d"];var Lp=(0,i.aZ)({__name:"ShapeItemThumbnail",props:{shape:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bp,[(0,i._)("div",_p,[((0,i.wg)(),(0,i.iD)("svg",Ip,[(0,i._)("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[(0,i._)("path",{class:(0,ae.C_)(["shape-path",{outlined:e.shape.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.shape.outlined?"#999":"transparent",stroke:e.shape.outlined?"transparent":"#999","stroke-width":"2",d:e.shape.path},null,10,Cp)],8,Sp)]))])]))}});const Ep=(0,Nl.Z)(Lp,[["__scopeId","data-v-8603ad34"]]);var Tp=Ep;const Mp={class:"shape-pool"},Up={class:"category-name"},Wp={class:"shape-list"};var Dp=(0,i.aZ)({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Mp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",Up,(0,ae.zw)(e.type),1),(0,i._)("div",Wp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.j4)(Tp,{class:"shape-item",key:t,shape:e,onClick:t=>l(e)},null,8,["shape","onClick"])))),128))])])))),128))]))}});const Hp=(0,Nl.Z)(Dp,[["__scopeId","data-v-8b994b42"]]);var Fp=Hp;const Ap=[{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}]}],Zp={class:"line-pool"},$p={class:"category-name"},Op={class:"line-list"},zp=["onClick"],Rp={overflow:"visible",width:"20",height:"20"},Bp=["d","stroke-dasharray","marker-start","marker-end"];var Pp=(0,i.aZ)({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Zp,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Ap),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",$p,(0,ae.zw)(e.type),1),(0,i._)("div",Op,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,a)=>((0,i.wg)(),(0,i.iD)("div",{class:"line-item",key:a},[(0,i._)("div",{class:"line-content",onClick:t=>l(e)},[((0,i.wg)(),(0,i.iD)("svg",Rp,[(0,i._)("defs",null,[e.points[0]?((0,i.wg)(),(0,i.j4)(ys,{key:0,class:"line-marker",id:`preset-line-${t}-${a}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0),e.points[1]?((0,i.wg)(),(0,i.j4)(ys,{key:1,class:"line-marker",id:`preset-line-${t}-${a}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):(0,i.kq)("",!0)]),(0,i._)("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}-${a}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${a}-${e.points[1]}-end)`:""},null,8,Bp)]))],8,zp)])))),128))])])))),128))]))}});const Np=(0,Nl.Z)(Pp,[["__scopeId","data-v-554824b6"]]);var jp=Np;const Yp={class:"chart-pool"},Vp=["onClick"];var Jp=(0,i.aZ)({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],a=e=>{t("select",e)};return(e,t)=>{const n=(0,i.up)("IconChartLine"),o=(0,i.up)("IconChartHistogram"),s=(0,i.up)("IconChartPie"),r=(0,i.up)("IconChartHistogramOne"),u=(0,i.up)("IconChartLineArea"),c=(0,i.up)("IconChartRing"),d=(0,i.up)("IconChartScatter");return(0,i.wg)(),(0,i.iD)("ul",Yp,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,((e,t)=>(0,i._)("li",{class:"chart-item",key:t},[(0,i._)("div",{class:"chart-content",onClick:t=>a(e)},["line"===e?((0,i.wg)(),(0,i.j4)(n,{key:0,size:"24"})):"bar"===e?((0,i.wg)(),(0,i.j4)(o,{key:1,size:"24"})):"pie"===e?((0,i.wg)(),(0,i.j4)(s,{key:2,size:"24"})):"horizontalBar"===e?((0,i.wg)(),(0,i.j4)(r,{key:3,size:"24"})):"area"===e?((0,i.wg)(),(0,i.j4)(u,{key:4,size:"24"})):"ring"===e?((0,i.wg)(),(0,i.j4)(c,{key:5,size:"24"})):"scatter"===e?((0,i.wg)(),(0,i.j4)(d,{key:6,size:"24"})):(0,i.kq)("",!0)],8,Vp)]))),64))])}}});const qp=(0,Nl.Z)(Jp,[["__scopeId","data-v-398f5699"]]);var Xp=qp;const Gp=e=>((0,i.dD)("data-v-268948c2"),e=e(),(0,i.Cn)(),e),Kp={class:"prefix"},Qp={class:"input-wrap"},ev=["disabled","placeholder"],tv={class:"handlers"},lv=Gp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"})],-1))),av=[lv],nv=Gp((()=>(0,i._)("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[(0,i._)("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})],-1))),ov=[nv],iv={class:"suffix"};var sv=(0,i.aZ)({__name:"NumberInput",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},min:{default:0},max:{default:1/0},step:{default:1}},emits:["update:value","input","change","blur","focus","enter"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),o=(0,s.iH)(!1);(0,i.YP)((()=>l.value),(()=>{l.value!==a.value&&(a.value=l.value)}),{immediate:!0}),(0,i.YP)(a,(()=>{let e=+a.value;isNaN(e)?e=l.min:e>l.max?e=l.max:e{o.value=!1,t("blur",e)},u=e=>{o.value=!0,t("focus",e)};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["number-input",{disabled:e.disabled,focused:o.value}])},[(0,i._)("span",Kp,[(0,i.WI)(e.$slots,"prefix")]),(0,i._)("div",Qp,[(0,i.wy)((0,i._)("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),placeholder:e.placeholder,onInput:l[1]||(l[1]=e=>t("input",e)),onFocus:l[2]||(l[2]=e=>u(e)),onBlur:l[3]||(l[3]=e=>r(e)),onChange:l[4]||(l[4]=e=>t("change",e)),onKeydown:l[5]||(l[5]=(0,n.D2)((e=>t("enter",e)),["enter"]))},null,40,ev),[[n.nr,a.value]]),(0,i._)("div",tv,[(0,i._)("span",{class:"handler",onClick:l[6]||(l[6]=t=>a.value+=e.step)},av),(0,i._)("span",{class:"handler",onClick:l[7]||(l[7]=t=>a.value-=e.step)},ov)])]),(0,i._)("span",iv,[(0,i.WI)(e.$slots,"suffix")])],2))}});const rv=(0,Nl.Z)(sv,[["__scopeId","data-v-268948c2"]]);var uv=rv;const cv=e=>((0,i.dD)("data-v-372c6730"),e=e(),(0,i.Cn)(),e),dv={class:"table-generator"},pv={class:"title"},vv={class:"lef"},mv=["onMouseenter"],hv={key:1,class:"custom"},fv={class:"row"},gv=cv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"行数:",-1))),yv={class:"row"},wv=cv((()=>(0,i._)("div",{class:"label",style:{width:"25%"}},"列数:",-1))),xv={class:"btns"};var kv=(0,i.aZ)({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=(0,s.iH)([]),a=(0,s.iH)(3),n=(0,s.iH)(3),o=(0,s.iH)(!1),r=()=>{if(!l.value.length)return;const[e,a]=l.value;t("insert",{row:e,col:a})},u=()=>a.value<1||a.value>20||n.value<1||n.value>20?Kl.warning("行数/列数必须在0~20之间!"):(t("insert",{row:a.value,col:n.value}),void(o.value=!1)),c=()=>{t("close"),o.value=!1};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",dv,[(0,i._)("div",pv,[(0,i._)("div",vv,"表格 "+(0,ae.zw)(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),(0,i._)("div",{class:"right",onClick:t[0]||(t[0]=e=>o.value=!o.value)},(0,ae.zw)(o.value?"返回":"自定义"),1)]),o.value?((0,i.wg)(),(0,i.iD)("div",hv,[(0,i._)("div",fv,[gv,(0,i.Wm)(uv,{min:1,max:20,value:a.value,"onUpdate:value":t[3]||(t[3]=e=>a.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",yv,[wv,(0,i.Wm)(uv,{min:1,max:20,value:n.value,"onUpdate:value":t[4]||(t[4]=e=>n.value=e),style:{width:"75%"}},null,8,["value"])]),(0,i._)("div",xv,[(0,i.Wm)(Xd,{class:"btn",onClick:t[5]||(t[5]=e=>c())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])):((0,i.wg)(),(0,i.iD)("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>r())},[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(10,(t=>(0,i._)("td",{onMouseenter:a=>l.value=[e,t],key:t},[(0,i._)("div",{class:(0,ae.C_)(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,mv))),64))]))),64))])],32))]))}});const bv=(0,Nl.Z)(kv,[["__scopeId","data-v-372c6730"]]);var _v=bv;const Iv={class:"media-input"},Sv={class:"btns"},Cv={class:"btns"};var Lv=(0,i.aZ)({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=(0,s.iH)("video"),a=(0,s.iH)("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),n=(0,s.iH)("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),o=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],r=()=>{if(!a.value)return Kl.error("请先输入正确的视频地址");t("insertVideo",a.value)},u=()=>{if(!n.value)return Kl.error("请先输入正确的音频地址");t("insertAudio",n.value)};return(e,s)=>((0,i.wg)(),(0,i.iD)("div",Iv,[(0,i.Wm)(Vd,{tabs:o,value:l.value,"onUpdate:value":s[0]||(s[0]=e=>l.value=e),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),"video"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i.Wm)(an,{value:a.value,"onUpdate:value":s[1]||(s[1]=e=>a.value=e),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),(0,i._)("div",Sv,[(0,i.Wm)(Xd,{onClick:s[2]||(s[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:s[3]||(s[3]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0),"audio"===l.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(an,{value:n.value,"onUpdate:value":s[4]||(s[4]=e=>n.value=e),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),(0,i._)("div",Cv,[(0,i.Wm)(Xd,{onClick:s[5]||(s[5]=e=>t("close")),style:{"margin-right":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",onClick:s[6]||(s[6]=e=>u())},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Ev=(0,Nl.Z)(Lv,[["__scopeId","data-v-35a1214c"]]);var Tv=Ev,Mv=l(3576);Mv.kh.SUB_SUP_SCALE=.5;const Uv=[{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"}],Wv=[{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"}]}],Dv=["width","height"],Hv=["transform"],Fv=["d"];var Av=(0,i.aZ)({__name:"FormulaContent",props:{latex:{},width:{},height:{}},setup(e){const t=e,l=(0,s.iH)({x:0,y:0,w:0,h:0}),a=(0,s.iH)("");(0,i.YP)((()=>t.latex),(()=>{const e=new Mv._q(t.latex);a.value=e.pathd({}),l.value=e.box({})}),{immediate:!0});const n=(0,i.Fl)((()=>{const e=l.value.w+32,a=l.value.h+32;return e>t.width||a>t.height?e/a>t.width/t.height?t.width/e:t.height/a:1}));return(e,t)=>((0,i.wg)(),(0,i.iD)("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"},[(0,i._)("g",{transform:`scale(${n.value}, ${n.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[(0,i._)("path",{d:a.value},null,8,Fv)],8,Hv)],8,Dv))}});const Zv=(0,Nl.Z)(Av,[["__scopeId","data-v-567417d3"]]);var $v=Zv;const Ov=["innerHTML"];var zv=(0,i.aZ)({__name:"SymbolContent",props:{latex:{}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=new Mv._q(t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-content",innerHTML:l.value},null,8,Ov))}});const Rv=zv;var Bv=Rv;const Pv=["disabled","value","rows","placeholder"];var Nv=(0,i.aZ)({__name:"TextArea",props:{value:{},rows:{default:4},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{default:""}},emits:["update:value"],setup(e,{emit:t}){const l=e=>{t("update:value",e.target.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("textarea",{class:(0,ae.C_)(["textarea",{disabled:e.disabled,resizable:e.resizable}]),disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,onInput:t[0]||(t[0]=e=>l(e))},null,42,Pv))}});const jv=(0,Nl.Z)(Nv,[["__scopeId","data-v-326ac8a0"]]);var Yv=jv;const Vv={class:"latex-editor"},Jv={class:"container"},qv={class:"left"},Xv={class:"input-area"},Gv={class:"preview"},Kv={key:0,class:"placeholder"},Qv={key:1,class:"preview-content"},em={class:"right"},tm={class:"content"},lm={key:0,class:"symbol"},am={class:"symbol-pool"},nm=["onClick"],om={key:1,class:"formula"},im={class:"formula-title"},sm=["onClick"],rm={class:"footer"};var um=(0,i.aZ)({__name:"index",props:{value:{default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,a=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],n=Uv,o=Wv.map((e=>({label:e.label,key:e.type}))),r=(0,s.iH)(""),u=(0,s.iH)("symbol"),c=(0,s.iH)(),d=(0,s.iH)(Wv[0].type),p=(0,i.Fl)((()=>{const e=Wv.find((e=>e.type===d.value));return e?.children||[]}));(0,i.bv)((()=>{l.value&&(r.value=l.value)}));const v=()=>{if(!r.value)return Kl.error("公式不能为空");const e=new Mv._q(r.value),l=e.pathd({}),a=e.box({});t("update",{latex:r.value,path:l,w:a.w+32,h:a.h+32})},m=e=>{c.value&&(c.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>((0,i.wg)(),(0,i.iD)("div",Vv,[(0,i._)("div",Jv,[(0,i._)("div",qv,[(0,i._)("div",Xv,[(0,i.Wm)(Yv,{value:r.value,"onUpdate:value":l[0]||(l[0]=e=>r.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:c},null,8,["value"])]),(0,i._)("div",Gv,[r.value?((0,i.wg)(),(0,i.iD)("div",Qv,[(0,i.Wm)($v,{width:518,height:138,latex:r.value},null,8,["latex"])])):((0,i.wg)(),(0,i.iD)("div",Kv,"公式预览"))])]),(0,i._)("div",em,[(0,i.Wm)(Vd,{tabs:a,value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e),card:""},null,8,["value"]),(0,i._)("div",tm,["symbol"===u.value?((0,i.wg)(),(0,i.iD)("div",lm,[(0,i.Wm)(Vd,{tabs:(0,s.SU)(o),value:d.value,"onUpdate:value":l[2]||(l[2]=e=>d.value=e),spaceBetween:"",tabsStyle:{margin:"10px 10px 0"}},null,8,["tabs","value"]),(0,i._)("div",am,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(p.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:e.latex,onClick:t=>m(e.latex)},[(0,i.Wm)(Bv,{latex:e.latex},null,8,["latex"])],8,nm)))),128))])])):((0,i.wg)(),(0,i.iD)("div",om,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(n),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"formula-item",key:e.label},[(0,i._)("div",im,(0,ae.zw)(e.label),1),(0,i._)("div",{class:"formula-item-content",onClick:t=>r.value=e.latex},[(0,i.Wm)($v,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,sm)])))),128))]))])])]),(0,i._)("div",rm,[(0,i.Wm)(Xd,{class:"btn",onClick:l[3]||(l[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{class:"btn",type:"primary",onClick:l[4]||(l[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Uk)("确定")])),_:1})])]))}});const cm=(0,Nl.Z)(um,[["__scopeId","data-v-46e48b5e"]]);var dm=cm;const pm={class:"canvas-tool"},vm={class:"left-handler"},mm={class:"add-element-handler"},hm={class:"handler-item group-btn"},fm={class:"right-handler"},gm={class:"text"};var ym=(0,i.aZ)({__name:"index",setup(e){const t=$(),{creatingElement:l,creatingCustomShape:a}=(0,o.Jk)(t),{canUndo:n,canRedo:r}=(0,o.Jk)(Y()),{redo:u,undo:c}=ra(),{scaleCanvas:d,setCanvasScalePercentage:p,resetCanvas:v,canvasScalePercentage:m}=Ia(),h=[200,150,100,80,50],f=(0,s.iH)(!1),g=e=>{p(e),f.value=!1},{createImageElement:y,createChartElement:w,createTableElement:x,createLatexElement:k,createVideoElement:b,createAudioElement:_}=ua(),I=e=>{const t=e[0];t&&ta(t).then((e=>y(e)))},S=(0,s.iH)(!1),C=(0,s.iH)(!1),L=(0,s.iH)(!1),E=(0,s.iH)(!1),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},D=e=>{"任意多边形"===e.title?t.setCreatingCustomShapeState(!0):t.setCreatingElement({type:"shape",data:e}),S.value=!1},H=e=>{t.setCreatingElement({type:"line",data:e}),C.value=!1},F=()=>{t.setSelectPanelState(!0)},A=()=>{t.setSearchPanelState(!0)};return(e,t)=>{const o=(0,i.up)("IconBack"),p=(0,i.up)("IconNext"),y=(0,i.up)("IconMoveOne"),Z=(0,i.up)("IconSearch"),$=(0,i.up)("IconFontSize"),O=(0,i.up)("IconTextRotationNone"),z=(0,i.up)("IconTextRotationDown"),R=(0,i.up)("IconDown"),B=(0,i.up)("IconPicture"),P=(0,i.up)("IconGraphicDesign"),N=(0,i.up)("IconConnection"),j=(0,i.up)("IconChartProportion"),Y=(0,i.up)("IconInsertTable"),V=(0,i.up)("IconFormula"),J=(0,i.up)("IconVideoTwo"),q=(0,i.up)("IconMinus"),X=(0,i.up)("IconPlus"),G=(0,i.up)("IconFullScreen"),K=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",pm,[(0,i._)("div",vm,[(0,i.wy)((0,i.Wm)(o,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(n)}]),onClick:t[0]||(t[0]=e=>(0,s.SU)(c)())},null,8,["class"]),[[K,"撤销"]]),(0,i.wy)((0,i.Wm)(p,{class:(0,ae.C_)(["handler-item",{disable:!(0,s.SU)(r)}]),onClick:t[1]||(t[1]=e=>(0,s.SU)(u)())},null,8,["class"]),[[K,"重做"]]),(0,i.Wm)(Dc,{type:"vertical",style:{height:"20px"}}),(0,i.wy)((0,i.Wm)(y,{class:"handler-item",onClick:t[2]||(t[2]=e=>F())},null,512),[[K,"选择窗格"]]),(0,i.wy)((0,i.Wm)(Z,{class:"handler-item",onClick:t[3]||(t[3]=e=>A())},null,512),[[K,"查找/替换"]])]),(0,i._)("div",mm,[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",hm,[(0,i.Wm)($,{class:(0,ae.C_)(["icon",{active:"text"===(0,s.SU)(l)?.type}]),onClick:t[4]||(t[4]=e=>W())},null,8,["class"]),(0,i.Wm)(rn,{trigger:"click",value:U.value,"onUpdate:value":t[7]||(t[7]=e=>U.value=e),style:{height:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{center:"",onClick:t[5]||(t[5]=()=>{W(),U.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(O),(0,i.Uk)(" 横向文本框")])),_:1}),(0,i.Wm)(dn,{center:"",onClick:t[6]||(t[6]=()=>{W(!0),U.value=!1})},{default:(0,i.w5)((()=>[(0,i.Wm)(z),(0,i.Uk)(" 竖向文本框")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(R,{class:"arrow"})])),_:1},8,["value"])])),[[K,"插入文字"]]),(0,i.Wm)(Oa,{onChange:t[8]||(t[8]=e=>I(e))},{default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(B,{class:"handler-item"},null,512),[[K,"插入图片"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:S.value,"onUpdate:value":t[10]||(t[10]=e=>S.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Fp,{onSelect:t[9]||(t[9]=e=>D(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(P,{class:(0,ae.C_)(["handler-item",{active:(0,s.SU)(a)||"shape"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[K,"插入形状"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:C.value,"onUpdate:value":t[12]||(t[12]=e=>C.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(jp,{onSelect:t[11]||(t[11]=e=>H(e))})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(N,{class:(0,ae.C_)(["handler-item",{active:"line"===(0,s.SU)(l)?.type}])},null,8,["class"]),[[K,"插入线条"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:L.value,"onUpdate:value":t[14]||(t[14]=e=>L.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Xp,{onSelect:t[13]||(t[13]=e=>{(0,s.SU)(w)(e),L.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(j,{class:"handler-item"},null,512),[[K,"插入图表"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"click",value:E.value,"onUpdate:value":t[17]||(t[17]=e=>E.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(_v,{onClose:t[15]||(t[15]=e=>E.value=!1),onInsert:t[16]||(t[16]=({row:e,col:t})=>{(0,s.SU)(x)(e,t),E.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(Y,{class:"handler-item"},null,512),[[K,"插入表格"]])])),_:1},8,["value"]),(0,i.wy)((0,i.Wm)(V,{class:"handler-item",onClick:t[18]||(t[18]=e=>M.value=!0)},null,512),[[K,"插入公式"]]),(0,i.Wm)(rn,{trigger:"click",value:T.value,"onUpdate:value":t[22]||(t[22]=e=>T.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(Tv,{onClose:t[19]||(t[19]=e=>T.value=!1),onInsertVideo:t[20]||(t[20]=e=>{(0,s.SU)(b)(e),T.value=!1}),onInsertAudio:t[21]||(t[21]=e=>{(0,s.SU)(_)(e),T.value=!1})})])),default:(0,i.w5)((()=>[(0,i.wy)((0,i.Wm)(J,{class:"handler-item"},null,512),[[K,"插入音视频"]])])),_:1},8,["value"])]),(0,i._)("div",fm,[(0,i.Wm)(q,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>(0,s.SU)(d)("-"))}),(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":t[24]||(t[24]=e=>f.value=e)},{content:(0,i.w5)((()=>[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(h,(e=>(0,i.Wm)(dn,{center:"",key:e,onClick:t=>g(e)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e)+"%",1)])),_:2},1032,["onClick"]))),64))])),default:(0,i.w5)((()=>[(0,i._)("span",gm,(0,ae.zw)((0,s.SU)(m)),1)])),_:1},8,["value"]),(0,i.Wm)(X,{class:"handler-item viewport-size",onClick:t[25]||(t[25]=e=>(0,s.SU)(d)("+"))}),(0,i.wy)((0,i.Wm)(G,{class:"handler-item viewport-size-adaptation",onClick:t[26]||(t[26]=e=>(0,s.SU)(v)())},null,512),[[K,"适应屏幕"]])]),(0,i.Wm)(fp,{visible:M.value,"onUpdate:visible":t[29]||(t[29]=e=>M.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(dm,{onClose:t[27]||(t[27]=e=>M.value=!1),onUpdate:t[28]||(t[28]=e=>{(0,s.SU)(k)(e),M.value=!1})})])),_:1},8,["visible"])])}}});const wm=(0,Nl.Z)(ym,[["__scopeId","data-v-75f4dda6"]]);var xm=wm,km=()=>{const{slides:e}=(0,o.Jk)(F()),t=(0,s.iH)(null),l=(0,s.iH)(50),a=()=>{e.value.length>l.value?t.value=setTimeout((()=>{l.value=l.value+20,a()}),600):l.value=9999};return(0,i.bv)(a),(0,i.Ah)((()=>{t.value&&clearTimeout(t.value)})),{slidesLoadLimit:l}};const bm={class:"layout-pool"},_m=["onClick"];var Im=(0,i.aZ)({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=(0,o.Jk)(F()),a=e=>{t("select",e)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",bm,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"layout-item",key:e.id,onClick:t=>a(e)},[(0,i.Wm)(Pd,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,_m)))),128))]))}});const Sm=(0,Nl.Z)(Im,[["__scopeId","data-v-8ee3e590"]]);var Cm=Sm,Lm=l(9980),Em=l.n(Lm);const Tm={class:"add-slide"},Mm={class:"select-btn"},Um=["onMousedown"],Wm={class:"page-number"};var Dm=(0,i.aZ)({__name:"index",setup(e){const t=$(),l=F(),a=V(),{selectedSlidesIndex:n,thumbnailsFocus:r}=(0,o.Jk)(t),{slides:u,slideIndex:c}=(0,o.Jk)(l),{ctrlKeyState:d,shiftKeyState:p}=(0,o.Jk)(a),{slidesLoadLimit:v}=km(),m=(0,i.Fl)((()=>[...n.value,c.value])),h=(0,s.iH)(!1),{copySlide:f,pasteSlide:g,createSlide:y,createSlideByTemplate:w,copyAndPasteSlide:x,deleteSlide:k,cutSlide:b,selectAllSlide:_,sortSlides:I}=pa(),S=e=>{t.setActiveElementIdList([]),c.value!==e&&l.updateSlideIndex(e)},C=(e,l)=>{const a=m.value.length>1;if(!a||!m.value.includes(l)||0===e.button)if(d.value)if(c.value===l){if(!a)return;const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e),S(m.value[0])}else if(m.value.includes(l)){const e=m.value.filter((e=>e!==l));t.updateSelectedSlidesIndex(e)}else{const e=[...m.value,l];t.updateSelectedSlidesIndex(e),S(l)}else if(p.value){if(c.value===l&&!a)return;let e=Math.min(...m.value),n=l;l{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},E=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&I(t,l)},{enterScreening:T,enterScreeningFromStart:M}=_a(),U=()=>[{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{text:"新建页面",subText:"Enter",handler:y},{text:"幻灯片放映",subText:"F5",handler:M}],W=()=>[{text:"剪切",subText:"Ctrl + X",handler:b},{text:"复制",subText:"Ctrl + C",handler:f},{text:"粘贴",subText:"Ctrl + V",handler:g},{text:"全选",subText:"Ctrl + A",handler:_},{divider:!0},{text:"新建页面",subText:"Enter",handler:y},{text:"复制页面",subText:"Ctrl + D",handler:x},{text:"删除页面",subText:"Delete",handler:()=>k()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:T}];return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconDown"),n=(0,i.Q2)("contextmenu"),o=(0,i.Q2)("click-outside");return(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"thumbnails",onMousedown:t[4]||(t[4]=()=>L(!0))},[(0,i._)("div",Tm,[(0,i._)("div",{class:"btn",onClick:t[0]||(t[0]=e=>(0,s.SU)(y)())},[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)("添加幻灯片")]),(0,i.Wm)(rn,{trigger:"click",placement:"bottom-start",value:h.value,"onUpdate:value":t[2]||(t[2]=e=>h.value=e),center:""},{content:(0,i.w5)((()=>[(0,i.Wm)(Cm,{onSelect:t[1]||(t[1]=e=>{(0,s.SU)(w)(e),h.value=!1})})])),default:(0,i.w5)((()=>[(0,i._)("div",Mm,[(0,i.Wm)(a)])])),_:1},8,["value"])]),(0,i.Wm)((0,s.SU)(Em()),{class:"thumbnail-list",modelValue:(0,s.SU)(u),animation:200,scroll:!0,scrollSensitivity:50,onEnd:E,itemKey:"id"},{item:(0,i.w5)((({element:e,index:l})=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(c)===l,selected:m.value.includes(l)}]),onMousedown:e=>C(e,l),onDblclick:t[3]||(t[3]=e=>(0,s.SU)(T)())},[(0,i._)("div",{class:(0,ae.C_)(["label",{"offset-left":l>=99}])},(0,ae.zw)((0,s.SU)(q)(l+1,2)),3),(0,i.Wm)(Pd,{class:"thumbnail",slide:e,size:120,visible:l<(0,s.SU)(v)},null,8,["slide","visible"])],42,Um)),[[n,W]])])),_:1},8,["modelValue"]),(0,i._)("div",Wm,"幻灯片 "+(0,ae.zw)((0,s.SU)(c)+1)+" / "+(0,ae.zw)((0,s.SU)(u).length),1)],32)),[[o,()=>L(!1)],[n,U]])}}});const Hm=(0,Nl.Z)(Dm,[["__scopeId","data-v-d525da14"]]);var Fm=Hm,Am=()=>{const e=$(),{richTextAttrs:t,textFormatPainter:l}=(0,o.Jk)(e),a=()=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleFormatPainter:a}},Zm=l(8374);const $m={class:"bar"},Om=["data-tooltip"],zm=["data-tooltip"],Rm=["data-tooltip"];var Bm=(0,i.aZ)({__name:"Slider",props:{value:{},disabled:{type:Boolean,default:!1},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>e.getBoundingClientRect().left,n=(0,s.iH)(),o=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)("end"),d=e=>{let t=e/100*(l.max-l.min);if(l.step>=1)t=Math.fround(t);else{const e=l.step.toString(),a=e.match(/^[0.]*([1-9])/);if(a){const l=a[1],n=e.indexOf(l)-1;if(n>0){const e=Math.pow(10,n);t=Math.fround(t*e)/e}}}return Zm.ZP.plus(t,l.min)},p=(0,i.Fl)((()=>d(o.value))),v=(0,i.Fl)((()=>d(r.value))),m=(0,i.Fl)((()=>d(u.value)));(0,i.YP)((()=>l.value),(()=>{l.max!==l.min&&("number"===typeof l.value?o.value=(l.value-l.min)/(l.max-l.min)*100:(r.value=(l.value[0]-l.min)/(l.max-l.min)*100,u.value=(l.value[1]-l.min)/(l.max-l.min)*100))}),{immediate:!0});const h=e=>{if(!n.value)return 0;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let o=(t-a(n.value))/n.value.clientWidth;o=Math.max(o,0),o=Math.min(o,1);let i=100*o;const s=l.step/(l.max-l.min)*100,r=i%s;return r>0&&(r<=s/2?i-=r:i=i-r+s),i},f=e=>{const t=h(e);"start"===c.value?r.value=t:u.value=t},g=e=>{y(e);const a=d(o.value),n=l.value,i="start"===c.value?[a,n[1]]:[n[0],a];i[0]>i[1]&&([i[0],i[1]]=[i[1],i[0]]),t("update:value",i),document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},y=e=>{o.value=h(e)},w=e=>{y(e);const l=d(o.value);t("update:value",l),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w)},x=e=>{if(!l.disabled)if(l.range){const t=h(e);Math.abs(t-r.value)((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:n,onMousedown:t[0]||(t[0]=e=>x(e))},[(0,i._)("div",$m,[e.range?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:u.value-r.value+"%",left:`${r.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${r.value}%`}),"data-tooltip":v.value},null,12,zm),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${u.value}%`}),"data-tooltip":m.value},null,12,Rm)],64)):((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"track",style:(0,ae.j5)({width:`${o.value}%`})},null,4),(0,i._)("div",{class:"thumb",style:(0,ae.j5)({left:`${o.value}%`}),"data-tooltip":p.value},null,12,Om)],64))])],34))}});const Pm=(0,Nl.Z)(Bm,[["__scopeId","data-v-21819dd0"]]);var Nm=Pm;const jm=e=>((0,i.dD)("data-v-03715c20"),e=e(),(0,i.Cn)(),e),Ym={class:"element-opacity"},Vm={class:"row"},Jm=jm((()=>(0,i._)("div",{style:{width:"40%"}},"不透明度:",-1)));var qm=(0,i.aZ)({__name:"ElementOpacity",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(1);(0,i.YP)(l,(()=>{l.value&&(a.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)}),{deep:!0,immediate:!0});const{addHistorySnapshot:n}=ra(),r=e=>{if(!l.value)return;const a={opacity:e};t.updateElement({id:l.value.id,props:a}),n()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Ym,[(0,i._)("div",Vm,[Jm,(0,i.Wm)(Nm,{min:0,max:1,step:.1,value:a.value,"onUpdate:value":t[0]||(t[0]=e=>r(e)),style:{width:"60%"}},null,8,["value"])])]))}});const Xm=(0,Nl.Z)(qm,[["__scopeId","data-v-03715c20"]]);var Gm=Xm;const Km={class:"color-block"};var Qm=(0,i.aZ)({__name:"ColorButton",props:{color:{}},setup(e){return(e,t)=>{const l=(0,i.up)("IconPlatte");return(0,i.wg)(),(0,i.j4)(Xd,{class:"color-btn"},{default:(0,i.w5)((()=>[(0,i._)("div",Km,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)]),(0,i.Wm)(l,{class:"color-btn-icon"})])),_:1})}}});const eh=(0,Nl.Z)(Qm,[["__scopeId","data-v-7fa73bdc"]]);var th=eh,lh=l(6459),ah=(0,i.aZ)({__name:"Checkboard",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e,l={},a=(e,t,l)=>{const a=document.createElement("canvas");a.width=a.height=2*l;const n=a.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,a.width,a.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),a.toDataURL()):null},n=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const i=a(e,t,n);return l[o]=i,i},o=(0,i.Fl)((()=>{const e=n(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"checkerboard",style:(0,ae.j5)(o.value)},null,4))}});const nh=(0,Nl.Z)(ah,[["__scopeId","data-v-fa191ace"]]);var oh=nh;const ih=e=>((0,i.dD)("data-v-84628bc8"),e=e(),(0,i.Cn)(),e),sh={class:"alpha"},rh={class:"alpha-checkboard-wrap"},uh=ih((()=>(0,i._)("div",{class:"alpha-picker"},null,-1))),ch=[uh];var dh=(0,i.aZ)({__name:"Alpha",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>l.value)),n=(0,i.Fl)((()=>{const e=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`})),o=(0,s.iH)(),r=e=>{if(e.preventDefault(),!o.value)return;const l=o.value.clientWidth,n=o.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s;s=i<0?0:i>l?1:Math.round(100*i/l)/100,a.value.a!==s&&t("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:s})},u=()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",u)},c=e=>{r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",u)};return(0,i.Ah)(u),(e,t)=>((0,i.wg)(),(0,i.iD)("div",sh,[(0,i._)("div",rh,[(0,i.Wm)(oh)]),(0,i._)("div",{class:"alpha-gradient",style:(0,ae.j5)({background:n.value})},null,4),(0,i._)("div",{class:"alpha-container",ref_key:"alphaRef",ref:o,onMousedown:t[0]||(t[0]=e=>c(e))},[(0,i._)("div",{class:"alpha-pointer",style:(0,ae.j5)({left:100*a.value.a+"%"})},ch,4)],544)]))}});const ph=(0,Nl.Z)(dh,[["__scopeId","data-v-84628bc8"]]);var vh=ph;const mh=e=>((0,i.dD)("data-v-5711e710"),e=e(),(0,i.Cn)(),e),hh={class:"hue"},fh=mh((()=>(0,i._)("div",{class:"hue-picker"},null,-1))),gh=[fh];var yh=(0,i.aZ)({__name:"Hue",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(""),o=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e})),r=(0,i.Fl)((()=>0===o.value.h&&"right"===n.value?"100%":100*o.value.h/360+"%"));(0,i.YP)((()=>l.value),(()=>{const e=(0,M.Z)(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-a.value>0&&(n.value="right"),0!==t&&t-a.value<0&&(n.value="left"),a.value=t}));const u=(0,s.iH)(),c=e=>{if(e.preventDefault(),!u.value)return;const a=u.value.clientWidth,n=u.value.getBoundingClientRect().left+window.pageXOffset,i=e.pageX-n;let s,r;i<0?s=0:i>a?s=360:(r=100*i/a,s=360*r/100),-1!==l.hue&&o.value.h===s||t("colorChange",{h:s,l:o.value.l,s:o.value.s,a:o.value.a})},d=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},p=e=>{c(e),window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)};return(0,i.Ah)(d),(e,t)=>((0,i.wg)(),(0,i.iD)("div",hh,[(0,i._)("div",{class:"hue-container",ref_key:"hueRef",ref:u,onMousedown:t[0]||(t[0]=e=>p(e))},[(0,i._)("div",{class:"hue-pointer",style:(0,ae.j5)({left:r.value})},gh,4)],544)]))}});const wh=(0,Nl.Z)(yh,[["__scopeId","data-v-5711e710"]]);var xh=wh;const kh=e=>((0,i.dD)("data-v-c79c0446"),e=e(),(0,i.Cn)(),e),bh=kh((()=>(0,i._)("div",{class:"saturation-white"},null,-1))),_h=kh((()=>(0,i._)("div",{class:"saturation-black"},null,-1))),Ih=kh((()=>(0,i._)("div",{class:"saturation-circle"},null,-1))),Sh=[Ih];var Ch=(0,i.aZ)({__name:"Saturation",props:{value:{},hue:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{const e=(0,M.Z)(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e})),n=(0,i.Fl)((()=>`hsl(${a.value.h}, 100%, 50%)`)),o=(0,i.Fl)((()=>-100*a.value.v+1+100+"%")),r=(0,i.Fl)((()=>100*a.value.s+"%")),u=(0,U.throttle)((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),c=(0,s.iH)(),d=e=>{if(e.preventDefault(),!c.value)return;const t=c.value.clientWidth,l=c.value.clientHeight,n=c.value.getBoundingClientRect().left+window.pageXOffset,o=c.value.getBoundingClientRect().top+window.pageYOffset,i=(0,U.clamp)(e.pageX-n,0,t),s=(0,U.clamp)(e.pageY-o,0,l),r=i/t,d=(0,U.clamp)(-s/l+1,0,1);u({h:a.value.h,s:r,v:d,a:a.value.a})},p=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p)},v=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",p)};return(0,i.Ah)(p),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"saturation",ref_key:"saturationRef",ref:c,style:(0,ae.j5)({background:n.value}),onMousedown:t[0]||(t[0]=e=>v(e))},[bh,_h,(0,i._)("div",{class:"saturation-pointer",style:(0,ae.j5)({top:o.value,left:r.value})},Sh,4)],36))}});const Lh=(0,Nl.Z)(Ch,[["__scopeId","data-v-c79c0446"]]);var Eh=Lh;const Th={class:"editable-input"},Mh=["value"];var Uh=(0,i.aZ)({__name:"EditableInput",props:{value:{}},emits:["colorChange"],setup(e,{emit:t}){const l=e,a=(0,i.Fl)((()=>{let e="";return e=l.value.a<1?(0,M.Z)(l.value).toHex8String().toUpperCase():(0,M.Z)(l.value).toHexString().toUpperCase(),e.replace("#","")})),n=e=>{const l=e.target.value;l.length>=6&&t("colorChange",(0,M.Z)(l).toRgb())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Th,[(0,i._)("input",{class:"input-content",value:a.value,onInput:t[0]||(t[0]=e=>n(e))},null,40,Mh)]))}});const Wh=(0,Nl.Z)(Uh,[["__scopeId","data-v-eb50f8e8"]]);var Dh=Wh;const Hh={class:"color-picker"},Fh={class:"picker-saturation-wrap"},Ah={class:"picker-controls"},Zh={class:"picker-color-wrap"},$h={class:"picker-sliders"},Oh={class:"picker-hue-wrap"},zh={class:"picker-alpha-wrap"},Rh={class:"picker-field"},Bh={class:"picker-presets"},Ph=["onClick"],Nh={class:"picker-gradient-presets"},jh=["onClick"],Yh={class:"picker-presets"},Vh=["onClick"],Jh={key:0,class:"recent-colors-title"},qh={class:"picker-presets"},Xh=["onClick"],Gh="RECENT_COLORS";var Kh=(0,i.aZ)({__name:"index",props:{modelValue:{default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,a=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],n=(e,t,l)=>{const a=(0,M.Z)(e).toRgb(),n=(0,M.Z)(t).toRgb(),o=(n.r-a.r)/l,i=(n.g-a.g)/l,s=(n.b-a.b)/l,r=[];for(let u=0;u{const e=[];for(const t of a)e.push(n(t[1],t[0],5));return e},r=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],c=(0,s.iH)(-1),d=(0,s.iH)([]),p=(0,i.Fl)({get(){return(0,M.Z)(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),v=o(),m=(0,i.Fl)((()=>`rgba(${[p.value.r,p.value.g,p.value.b,p.value.a].join(",")})`)),h=e=>{c.value=(0,M.Z)(e).toHsl().h,t("update:modelValue",e)},f=(0,U.debounce)((function(){const e=(0,M.Z)(p.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});(0,i.bv)((()=>{const e=localStorage.getItem(Gh);e&&(d.value=JSON.parse(e))})),(0,i.YP)(d,(()=>{const e=JSON.stringify(d.value);localStorage.setItem(Gh,e)}));const g=e=>{"h"in e?(c.value=e.h,p.value=(0,M.Z)(e).toRgb()):(c.value=(0,M.Z)(e).toHsl().h,p.value=e),f()},y=()=>{const e="EyeDropper"in window;e?w():x()},w=()=>{Kl.success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then((e=>{const t=(0,M.Z)(e.sRGBHex);c.value=t.toHsl().h,p.value=t.toRgb(),f()})).catch((()=>{Kl.success("关闭取色吸管")}))},x=()=>{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:a,top:n,width:o,height:i}=e.getBoundingClientRect(),s=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));(0,lh.rT)(e,{filter:s,fontEmbedCSS:"",width:o,height:i,canvasWidth:o,canvasHeight:i,pixelRatio:1}).then((e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${a}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let i="";const s=e=>{const t=e.x,s=e.y,r=t-a,u=s-n,[c,d,p,v]=o.getImageData(r,u,1,1).data;i=`rgba(${c}, ${d}, ${p}, ${(v/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=s+10+"px",l.style.backgroundColor=i},r=()=>{i="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},u=l=>{if(i&&0===l.button){const e=(0,M.Z)(i);c.value=e.toHsl().h,p.value=e.toRgb(),f()}document.body.removeChild(t),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",r),window.removeEventListener("mousedown",u)};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",r),window.addEventListener("mousedown",u)})).catch((()=>{Kl.error("取色吸管初始化失败"),document.body.removeChild(t)}))};return(e,t)=>{const l=(0,i.up)("IconNeedle");return(0,i.wg)(),(0,i.iD)("div",Hh,[(0,i._)("div",Fh,[(0,i.Wm)(Eh,{value:p.value,hue:c.value,onColorChange:t[0]||(t[0]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",Ah,[(0,i._)("div",Zh,[(0,i._)("div",{class:"picker-current-color",style:(0,ae.j5)({background:m.value})},null,4),(0,i.Wm)(oh)]),(0,i._)("div",$h,[(0,i._)("div",Oh,[(0,i.Wm)(xh,{value:p.value,hue:c.value,onColorChange:t[1]||(t[1]=e=>g(e))},null,8,["value","hue"])]),(0,i._)("div",zh,[(0,i.Wm)(vh,{value:p.value,onColorChange:t[2]||(t[2]=e=>g(e))},null,8,["value"])])])]),(0,i._)("div",Rh,[(0,i.Wm)(Dh,{class:"input",value:p.value,onColorChange:t[3]||(t[3]=e=>g(e))},null,8,["value"]),(0,i._)("div",{class:"straw",onClick:t[4]||(t[4]=e=>y())},[(0,i.Wm)(l)]),(0,i._)("div",{class:"transparent",onClick:t[5]||(t[5]=e=>h("#00000000"))},[(0,i.Wm)(oh)])]),(0,i._)("div",Bh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(r,(e=>(0,i._)("div",{class:"picker-presets-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,Ph))),64))]),(0,i._)("div",Nh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(v),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-col",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"picker-gradient-color",key:e,style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,jh)))),128))])))),128))]),(0,i._)("div",Yh,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(u,(e=>(0,i._)("div",{key:e,class:"picker-presets-color",style:(0,ae.j5)({background:e}),onClick:t=>h(e)},null,12,Vh))),64))]),d.value.length?((0,i.wg)(),(0,i.iD)("div",Jh,"最近使用:")):(0,i.kq)("",!0),(0,i._)("div",qh,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(d.value,(e=>((0,i.wg)(),(0,i.iD)("div",{key:e,class:"picker-presets-color alpha",onClick:t=>h(e)},[(0,i._)("div",{class:"picker-presets-color-content",style:(0,ae.j5)({background:e})},null,4)],8,Xh)))),128))])])}}});const Qh=(0,Nl.Z)(Kh,[["__scopeId","data-v-fec0b01a"]]);var ef=Qh;const tf=e=>((0,i.dD)("data-v-0566b060"),e=e(),(0,i.Cn)(),e),lf=tf((()=>(0,i._)("span",{class:"switch-core"},null,-1))),af=[lf];var nf=(0,i.aZ)({__name:"Switch",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=()=>{l.disabled||t("update:value",!l.value)};return(e,t)=>((0,i.wg)(),(0,i.iD)("span",{class:(0,ae.C_)(["switch",{active:e.value,disabled:e.disabled}]),onClick:t[0]||(t[0]=e=>a())},af,2))}});const of=(0,Nl.Z)(nf,[["__scopeId","data-v-0566b060"]]);var sf=of;const rf=e=>((0,i.dD)("data-v-36e0c182"),e=e(),(0,i.Cn)(),e),uf={class:"element-outline"},cf={key:0,class:"row"},df=rf((()=>(0,i._)("div",{style:{width:"40%"}},"启用边框:",-1))),pf={class:"switch-wrapper",style:{width:"60%"}},vf={class:"row"},mf=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),hf={class:"row"},ff=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),gf={class:"row"},yf=rf((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var wf=(0,i.aZ)({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="outline"in l.value?l.value.outline:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value)return;const n={outline:{...a.value,...e}};t.updateElement({id:l.value.id,props:n}),r()},c=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"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",uf,[e.fixed?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",cf,[df,(0,i._)("div",pf,[(0,i.Wm)(sf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])])),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i._)("div",vf,[mf,(0,i.Wm)(op,{style:{width:"60%"},value:a.value.style||"","onUpdate:value":t[1]||(t[1]=e=>u({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",hf,[ff,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:a.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:a.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",gf,[yf,(0,i.Wm)(uv,{value:a.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>u({width:e})),style:{width:"60%"}},null,8,["value"])])],64)):(0,i.kq)("",!0)]))}});const xf=(0,Nl.Z)(wf,[["__scopeId","data-v-36e0c182"]]);var kf=xf;const bf=e=>((0,i.dD)("data-v-5507f822"),e=e(),(0,i.Cn)(),e),_f={class:"element-shadow"},If={class:"row"},Sf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"启用阴影:",-1))),Cf={class:"switch-wrapper",style:{width:"60%"}},Lf={class:"row"},Ef=bf((()=>(0,i._)("div",{style:{width:"40%"}},"水平阴影:",-1))),Tf={class:"row"},Mf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"垂直阴影:",-1))),Uf={class:"row"},Wf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"模糊距离:",-1))),Df={class:"row"},Hf=bf((()=>(0,i._)("div",{style:{width:"40%"}},"阴影颜色:",-1)));var Ff=(0,i.aZ)({__name:"ElementShadow",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{l.value&&(a.value="shadow"in l.value?l.value.shadow:void 0,n.value=!!a.value)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{if(!l.value||!a.value)return;const n={...a.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),r()},c=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"});r()}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",_f,[(0,i._)("div",If,[Sf,(0,i._)("div",Cf,[(0,i.Wm)(sf,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),n.value&&a.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Lf,[Ef,(0,i.Wm)(Nm,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.h,"onUpdate:value":t[1]||(t[1]=e=>u({h:e}))},null,8,["value"])]),(0,i._)("div",Tf,[Mf,(0,i.Wm)(Nm,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.v,"onUpdate:value":t[2]||(t[2]=e=>u({v:e}))},null,8,["value"])]),(0,i._)("div",Uf,[Wf,(0,i.Wm)(Nm,{style:{width:"60%"},min:1,max:20,step:1,value:a.value.blur,"onUpdate:value":t[3]||(t[3]=e=>u({blur:e}))},null,8,["value"])]),(0,i._)("div",Df,[Hf,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:a.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:a.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)]))}});const Af=(0,Nl.Z)(Ff,[["__scopeId","data-v-5507f822"]]);var Zf=Af;const $f={class:"text-color-block"};var Of=(0,i.aZ)({__name:"TextColorButton",props:{color:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Xd,{class:"text-color-btn"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default"),(0,i._)("div",$f,[(0,i._)("div",{class:"text-color-block-content",style:(0,ae.j5)({backgroundColor:e.color})},null,4)])])),_:3}))}});const zf=(0,Nl.Z)(Of,[["__scopeId","data-v-37449800"]]);var Rf=zf,Bf=(0,i.aZ)({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(Xd,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Pf=Bf;var Nf=Pf;const jf={class:"button-group"};function Yf(e,t){return(0,i.wg)(),(0,i.iD)("div",jf,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const Vf={},Jf=(0,Nl.Z)(Vf,[["render",Yf],["__scopeId","data-v-03c883a7"]]);var qf=Jf,Xf=(0,i.aZ)({__name:"RadioButton",props:{value:{},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:l}=(0,i.f3)(Ln);return(e,a)=>((0,i.wg)(),(0,i.j4)(Xd,{checked:!e.disabled&&(0,s.SU)(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=t=>!e.disabled&&(0,s.SU)(l)(e.value))},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3},8,["checked","disabled"]))}});const Gf=Xf;var Kf=Gf,Qf=(0,i.aZ)({__name:"RadioGroup",props:{value:{},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e)},n=(0,i.Fl)((()=>l.value));return(0,i.JJ)(Ln,{value:n,updateValue:a}),(e,t)=>((0,i.wg)(),(0,i.j4)(qf,{class:"radio-group"},{default:(0,i.w5)((()=>[(0,i.WI)(e.$slots,"default")])),_:3}))}});const eg=Qf;var tg=eg;const lg={class:"select-group"};function ag(e,t){return(0,i.wg)(),(0,i.iD)("div",lg,[(0,i.WI)(e.$slots,"default",{},void 0,!0)])}const ng={},og=(0,Nl.Z)(ng,[["render",ag],["__scopeId","data-v-d2acb09c"]]);var ig=og;const sg=e=>((0,i.dD)("data-v-52bee260"),e=e(),(0,i.Cn)(),e),rg={class:"text-style-panel"},ug={class:"preset-style"},cg=["onClick"],dg={class:"link-popover"},pg={class:"btns"},vg={class:"row"},mg={class:"list-wrap"},hg=["onClick"],fg=sg((()=>(0,i._)("span",null,null,-1))),gg=[fg],yg=sg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),wg={class:"list-wrap"},xg=["onClick"],kg=sg((()=>(0,i._)("span",null,null,-1))),bg=[kg],_g={class:"row"},Ig=sg((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Sg={class:"row"},Cg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"行间距:",-1))),Lg={class:"row"},Eg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"段间距:",-1))),Tg={class:"row"},Mg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"字间距:",-1))),Ug={class:"row"},Wg=sg((()=>(0,i._)("div",{style:{width:"40%"}},"文本框填充:",-1)));var Dg=(0,i.aZ)({__name:"TextStylePanel",setup(e){const t=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"66px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"40px"},{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=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u,availableFonts:c,textFormatPainter:d}=(0,o.Jk)(l),{addHistorySnapshot:p}=ra(),{toggleFormatPainter:v}=Am(),m=e=>{a.updateElement({id:r.value,props:e}),p()},h=(0,s.iH)(!1),f=(0,s.iH)(!1),g=(0,s.iH)(!1),y=(0,s.iH)(!1),w=(0,s.iH)(["disc","circle","square"]),x=(0,s.iH)(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),k=(0,s.iH)("#000"),b=(0,s.iH)(),_=(0,s.iH)(),I=(0,s.iH)();(0,i.YP)(n,(()=>{n.value&&"text"===n.value.type&&(k.value=n.value.fill||"#fff",b.value=n.value.lineHeight||1.5,_.value=n.value.wordSpace||0,I.value=void 0===n.value.paragraphSpace?5:n.value.paragraphSpace)}),{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],C=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],L=[0,1,2,3,4,5,6,8,10],T=[0,5,10,15,20,25,30,40,50,80],M=e=>{m({lineHeight:e})},U=e=>{m({paragraphSpace:e})},W=e=>{m({wordSpace:e})},D=e=>{m({fill:e})},H=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},A=e=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:e})},Z=(0,s.iH)(""),O=(0,s.iH)(!1);(0,i.YP)(u,(()=>O.value=!1));const z=()=>{Z.value=u.value.link},R=e=>{const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!e||!t.test(e))return Kl.error("不是正确的网页链接地址");H("link",e),O.value=!1};return(e,l)=>{const a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),r=(0,i.up)("IconHighLight"),p=(0,i.up)("IconTextBold"),m=(0,i.up)("IconTextItalic"),F=(0,i.up)("IconTextUnderline"),$=(0,i.up)("IconStrikethrough"),B=(0,i.up)("IconCode"),P=(0,i.up)("IconQuote"),N=(0,i.up)("IconFormat"),j=(0,i.up)("IconFormatBrush"),Y=(0,i.up)("IconLinkOne"),V=(0,i.up)("IconAlignTextLeft"),J=(0,i.up)("IconAlignTextCenter"),q=(0,i.up)("IconAlignTextRight"),X=(0,i.up)("IconAlignTextBoth"),G=(0,i.up)("IconList"),K=(0,i.up)("IconDown"),Q=(0,i.up)("IconOrderedList"),ee=(0,i.up)("IconIndentLeft"),te=(0,i.up)("IconIndentRight"),le=(0,i.up)("IconRowHeight"),ne=(0,i.up)("IconVerticalSpacingBetweenItems"),oe=(0,i.up)("IconFullwidth"),ie=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",rg,[(0,i._)("div",ug,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"preset-style-item",key:e.label,style:(0,ae.j5)(e.style),onClick:t=>A(e.cmd)},(0,ae.zw)(e.label),13,cg))),64))]),(0,i.Wm)(Dc),(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(u).fontname,"onUpdate:value":l[0]||(l[0]=e=>H("fontname",e)),options:[...(0,s.SU)(c),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(u).fontsize,"onUpdate:value":l[1]||(l[1]=e=>H("fontsize",e)),options:S.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).color,"onUpdate:modelValue":l[2]||(l[2]=e=>H("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(u).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[ie,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).backcolor,"onUpdate:modelValue":l[3]||(l[3]=e=>H("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(u).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[ie,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:l[4]||(l[4]=e=>H("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[ie,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:l[5]||(l[5]=e=>H("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[ie,"减小字号"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[6]||(l[6]=e=>H("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1},8,["checked"])),[[ie,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[7]||(l[7]=e=>H("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1},8,["checked"])),[[ie,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[8]||(l[8]=e=>H("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1},8,["checked"])),[[ie,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[9]||(l[9]=e=>H("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)($)])),_:1},8,["checked"])),[[ie,"删除线"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).superscript,onClick:l[10]||(l[10]=e=>H("superscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A²")])),_:1},8,["checked"])),[[ie,"上标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).subscript,onClick:l[11]||(l[11]=e=>H("subscript"))},{default:(0,i.w5)((()=>[(0,i.Uk)("A₂")])),_:1},8,["checked"])),[[ie,"下标"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).code,onClick:l[12]||(l[12]=e=>H("code"))},{default:(0,i.w5)((()=>[(0,i.Wm)(B)])),_:1},8,["checked"])),[[ie,"行内代码"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).blockquote,onClick:l[13]||(l[13]=e=>H("blockquote"))},{default:(0,i.w5)((()=>[(0,i.Wm)(P)])),_:1},8,["checked"])),[[ie,"引用"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>H("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(N)])),_:1})),[[ie,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:!!(0,s.SU)(d),onClick:l[15]||(l[15]=e=>(0,s.SU)(v)())},{default:(0,i.w5)((()=>[(0,i.Wm)(j)])),_:1},8,["checked"])),[[ie,"格式刷"]]),(0,i.Wm)(rn,{placement:"bottom-end",trigger:"click",value:O.value,"onUpdate:value":l[20]||(l[20]=e=>O.value=e),style:{width:"33.33%"}},{content:(0,i.w5)((()=>[(0,i._)("div",dg,[(0,i.Wm)(an,{value:Z.value,"onUpdate:value":l[16]||(l[16]=e=>Z.value=e),placeholder:"请输入超链接"},null,8,["value"]),(0,i._)("div",pg,[(0,i.Wm)(Xd,{size:"small",disabled:!(0,s.SU)(u).link,onClick:l[17]||(l[17]=e=>R()),style:{"margin-right":"5px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("移除")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{size:"small",type:"primary",onClick:l[18]||(l[18]=e=>R(Z.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{width:"100%"},checked:!!(0,s.SU)(u).link,onClick:l[19]||(l[19]=e=>z())},{default:(0,i.w5)((()=>[(0,i.Wm)(Y)])),_:1},8,["checked"])),[[ie,"超链接"]])])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[21]||(l[21]=e=>H("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(V)])),_:1})),[[ie,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(J)])),_:1})),[[ie,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(q)])),_:1})),[[ie,"右对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"justify",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(X)])),_:1})),[[ie,"两端对齐"]])])),_:1},8,["value"]),(0,i._)("div",vg,[(0,i.Wm)(qf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{type:(0,s.SU)(u).bulletList?"primary":"default",style:{flex:"1"},onClick:l[22]||(l[22]=e=>H("bulletList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(G)])),_:1},8,["type"])),[[ie,"项目符号"]]),(0,i.Wm)(rn,{trigger:"click",value:h.value,"onUpdate:value":l[23]||(l[23]=e=>h.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",mg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(w.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("bulletList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},gg))),64))],12,hg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),yg,(0,i.Wm)(qf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{type:(0,s.SU)(u).orderedList?"primary":"default",style:{flex:"1"},onClick:l[24]||(l[24]=e=>H("orderedList"))},{default:(0,i.w5)((()=>[(0,i.Wm)(Q)])),_:1},8,["type"])),[[ie,"编号"]]),(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":l[25]||(l[25]=e=>f.value=e)},{content:(0,i.w5)((()=>[(0,i._)("div",wg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(x.value,(e=>((0,i.wg)(),(0,i.iD)("ul",{class:"list",key:e,style:(0,ae.j5)({listStyleType:e}),onClick:t=>H("orderedList",e)},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(3,(e=>(0,i._)("li",{class:"list-item",key:e},bg))),64))],12,xg)))),128))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i._)("div",_g,[(0,i.Wm)(qf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:l[26]||(l[26]=e=>H("indent","-1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(ee)])),_:1})),[[ie,"减小段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:g.value,"onUpdate:value":l[28]||(l[28]=e=>g.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[27]||(l[27]=e=>H("textIndent","-1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("减小首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1}),Ig,(0,i.Wm)(qf,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:l[29]||(l[29]=e=>H("indent","+1"))},{default:(0,i.w5)((()=>[(0,i.Wm)(te)])),_:1})),[[ie,"增大段落缩进"]]),(0,i.Wm)(rn,{trigger:"click",value:y.value,"onUpdate:value":l[31]||(l[31]=e=>y.value=e)},{content:(0,i.w5)((()=>[(0,i.Wm)(dn,{onClick:l[30]||(l[30]=e=>H("textIndent","+1"))},{default:(0,i.w5)((()=>[(0,i.Uk)("增大首行缩进")])),_:1})])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"popover-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(K)])),_:1})])),_:1},8,["value"])])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",Sg,[Cg,(0,i.Wm)(op,{style:{width:"60%"},value:b.value||1,"onUpdate:value":l[32]||(l[32]=e=>M(e)),options:C.map((e=>({label:e+"倍",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(le)])),_:1},8,["value","options"])]),(0,i._)("div",Lg,[Eg,(0,i.Wm)(op,{style:{width:"60%"},value:I.value||0,"onUpdate:value":l[33]||(l[33]=e=>U(e)),options:T.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(ne)])),_:1},8,["value","options"])]),(0,i._)("div",Tg,[Mg,(0,i.Wm)(op,{style:{width:"60%"},value:_.value||0,"onUpdate:value":l[34]||(l[34]=e=>W(e)),options:L.map((e=>({label:e+"px",value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(oe)])),_:1},8,["value","options"])]),(0,i._)("div",Ug,[Wg,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:k.value,"onUpdate:modelValue":l[35]||(l[35]=e=>D(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:k.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Gm)])}}});const Hg=(0,Nl.Z)(Dg,[["__scopeId","data-v-52bee260"]]);var Fg=Hg;const Ag={class:"element-flip"};var Zg=(0,i.aZ)({__name:"ElementFlip",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=(0,s.iH)(!1),n=(0,s.iH)(!1);(0,i.YP)(l,(()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(a.value=!!l.value.flipH,n.value=!!l.value.flipV)}),{deep:!0,immediate:!0});const{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=(0,i.up)("IconFlipVertically"),o=(0,i.up)("IconFlipHorizontally");return(0,i.wg)(),(0,i.iD)("div",Ag,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Nf,{style:{flex:"1"},checked:n.value,onClick:t[0]||(t[0]=e=>u({flipV:!n.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(l),(0,i.Uk)(" 垂直翻转")])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:a.value,onClick:t[1]||(t[1]=e=>u({flipH:!a.value}))},{default:(0,i.w5)((()=>[(0,i.Wm)(o),(0,i.Uk)(" 水平翻转")])),_:1},8,["checked"])])),_:1})])}}});const $g=(0,Nl.Z)(Zg,[["__scopeId","data-v-7571b056"]]);var Og=$g;const zg=e=>((0,i.dD)("data-v-2c8acf3c"),e=e(),(0,i.Cn)(),e),Rg={class:"element-filter"},Bg={class:"row"},Pg=zg((()=>(0,i._)("div",{style:{flex:"2"}},"启用滤镜:",-1))),Ng={class:"switch-wrapper",style:{flex:"3"}},jg={key:0,class:"filter"},Yg={class:"name"};var Vg=(0,i.aZ)({__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=F(),{handleElement:a,handleElementId:n}=(0,o.Jk)($()),r=(0,s.iH)(JSON.parse(JSON.stringify(t))),u=(0,s.iH)(!1),{addHistorySnapshot:c}=ra();(0,i.YP)(a,(()=>{if(!a.value||"image"!==a.value.type)return;const e=a.value.filters;e?(r.value=t.map((t=>{const l=e[t.key];return l?{...t,value:parseInt(l)}:t})),u.value=!0):(r.value=JSON.parse(JSON.stringify(t)),u.value=!1)}),{deep:!0,immediate:!0});const d=(e,t)=>{const o=a.value,i=o.filters||{},s={...i,[e.key]:`${t}${e.unit}`};l.updateElement({id:n.value,props:{filters:s}}),c()},p=e=>{a.value&&(e?l.updateElement({id:a.value.id,props:{filters:{}}}):l.removeElementProps({id:a.value.id,propName:"filters"}),c())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Rg,[(0,i._)("div",Bg,[Pg,(0,i._)("div",Ng,[(0,i.Wm)(sf,{value:u.value,"onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["value"])])]),u.value?((0,i.wg)(),(0,i.iD)("div",jg,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(r.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:"filter-item",key:e.key},[(0,i._)("div",Yg,(0,ae.zw)(e.label),1),(0,i.Wm)(Nm,{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,"onUpdate:value":t=>d(e,t)},null,8,["max","step","value","onUpdate:value"])])))),128))])):(0,i.kq)("",!0)]))}});const Jg=(0,Nl.Z)(Vg,[["__scopeId","data-v-2c8acf3c"]]);var qg=Jg;const Xg=e=>((0,i.dD)("data-v-0ae0ff99"),e=e(),(0,i.Cn)(),e),Gg={class:"element-color-mask"},Kg={class:"row"},Qg=Xg((()=>(0,i._)("div",{style:{width:"40%"}},"着色(蒙版):",-1))),ey={class:"switch-wrapper",style:{width:"60%"}},ty={key:0,class:"row",style:{"margin-top":"15px"}},ly=Xg((()=>(0,i._)("div",{style:{width:"40%"}},"蒙版颜色:",-1))),ay="rgba(226, 83, 77, 0.5)";var ny=(0,i.aZ)({__name:"ElementColorMask",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(ay),r=(0,s.iH)(!1),{addHistorySnapshot:u}=ra();(0,i.YP)(l,(()=>{l.value&&"image"===l.value.type&&(l.value.colorMask?(n.value=l.value.colorMask,r.value=!0):r.value=!1)}),{deep:!0,immediate:!0});const c=e=>{l.value&&(e?t.updateElement({id:l.value.id,props:{colorMask:ay}}):t.removeElementProps({id:l.value.id,propName:"colorMask"}),u())},d=e=>{t.updateElement({id:a.value,props:{colorMask:e}}),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Gg,[(0,i._)("div",Kg,[Qg,(0,i._)("div",ey,[(0,i.Wm)(sf,{value:r.value,"onUpdate:value":t[0]||(t[0]=e=>c(e))},null,8,["value"])])]),r.value?((0,i.wg)(),(0,i.iD)("div",ty,[ly,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>d(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:n.value},null,8,["color"])])),_:1})])):(0,i.kq)("",!0)]))}});const oy=(0,Nl.Z)(ny,[["__scopeId","data-v-0ae0ff99"]]);var iy=oy;const sy=e=>((0,i.dD)("data-v-3f3be0ee"),e=e(),(0,i.Cn)(),e),ry={class:"image-style-panel"},uy={class:"clip"},cy=sy((()=>(0,i._)("div",{class:"title"},"按形状:",-1))),dy={class:"shape-clip"},py=["onClick"],vy={key:0,class:"title"};var my=(0,i.aZ)({__name:"ImageStylePanel",setup(e){const t=qn,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}]}],a=$(),n=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(a),{currentSlide:c}=(0,o.Jk)(n),d=r,p=(0,s.iH)(!1),{addHistorySnapshot:v}=ra(),m=()=>{a.setClipingImageElementId(u.value),p.value=!1},h=()=>{const e=r.value,t=e.width,l=e.height,a=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],i=t/((o[1][0]-o[0][0])/100),s=l/((o[1][1]-o[0][1])/100),u=a-i*(o[0][0]/100),c=n-s*(o[0][1]/100);return{originClipRange:o,originWidth:i,originHeight:s,originLeft:u,originTop:c}},f=(e,t=0)=>{const l=r.value,{originClipRange:a,originWidth:o,originHeight:i,originLeft:s,originTop:c}=h();if(t){const a=i/o,r=0,d=100;let p;if(a>t){const e=(1-t/a)/2*100;p=[[r,e],[d,d-e]]}else{const e=(1-a/t)/2*100;p=[[e,r],[d-e,d]]}n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:p},left:s+o*(p[0][0]/100),top:c+i*(p[0][1]/100),width:o*(p[1][0]-p[0][0])/100,height:i*(p[1][1]-p[0][1])/100}})}else n.updateElement({id:u.value,props:{clip:{...l.clip,shape:e,range:a}}});m(),v()},g=e=>{const t=e[0];t&&(ta(t).then((e=>{const t={src:e};n.updateElement({id:u.value,props:t})})),v())},y=()=>{const e=r.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:a}=h();n.updateElement({id:u.value,props:{left:l,top:a,width:e,height:t}})}n.removeElementProps({id:u.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),v()},w=()=>{const e=r.value,t={...c.value.background,type:"image",image:e.src,imageSize:"cover"};n.updateSlide({background:t}),v()};return(e,a)=>{const n=(0,i.up)("IconTailoring"),o=(0,i.up)("IconDown"),r=(0,i.up)("IconTransform"),u=(0,i.up)("IconUndo"),c=(0,i.up)("IconTheme");return(0,i.wg)(),(0,i.iD)("div",ry,[(0,i._)("div",{class:"origin-image",style:(0,ae.j5)({backgroundImage:`url(${(0,s.SU)(d).src})`})},null,4),(0,i.Wm)(Og),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{width:"calc(100% / 6 * 5)"},onClick:a[0]||(a[0]=e=>m())},{default:(0,i.w5)((()=>[(0,i.Wm)(n,{class:"btn-icon"}),(0,i.Uk)(" 裁剪图片")])),_:1}),(0,i.Wm)(rn,{trigger:"click",value:p.value,"onUpdate:value":a[1]||(a[1]=e=>p.value=e),style:{width:"calc(100% / 6)"}},{content:(0,i.w5)((()=>[(0,i._)("div",uy,[cy,(0,i._)("div",dy,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[(0,i._)("div",{class:"shape",style:(0,ae.j5)({clipPath:e.style})},null,4)],8,py)))),128))]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.label},[e.label?((0,i.wg)(),(0,i.iD)("div",vy,"按"+(0,ae.zw)(e.label)+":",1)):(0,i.kq)("",!0),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,(e=>((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:(0,i.w5)((()=>[(0,i.Uk)((0,ae.zw)(e.key),1)])),_:2},1032,["onClick"])))),128))])),_:2},1024)],64)))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"popover-btn",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})])),_:1},8,["value"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(iy),(0,i.Wm)(Dc),(0,i.Wm)(qg),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Oa,{onChange:a[2]||(a[2]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"full-width-btn"},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 替换图片")])),_:1})])),_:1}),(0,i.Wm)(Xd,{class:"full-width-btn",onClick:a[3]||(a[3]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(u,{class:"btn-icon"}),(0,i.Uk)(" 重置样式")])),_:1}),(0,i.Wm)(Xd,{class:"full-width-btn",onClick:a[4]||(a[4]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"btn-icon"}),(0,i.Uk)(" 设为背景")])),_:1})])}}});const hy=(0,Nl.Z)(my,[["__scopeId","data-v-3f3be0ee"]]);var fy=hy;const gy=e=>((0,i.dD)("data-v-291bd4e3"),e=e(),(0,i.Cn)(),e),yy={class:"shape-style-panel"},wy={class:"title"},xy=gy((()=>(0,i._)("span",null,"点击替换形状",-1))),ky={class:"shape-pool"},by={class:"shape-list"},_y={class:"row"},Iy=gy((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Sy={class:"row"},Cy=gy((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Ly={class:"row"},Ey=gy((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Ty={key:0,class:"row"},My=gy((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1)));var Uy=(0,i.aZ)({__name:"ShapeStylePanel",setup(e){const t=$(),l=F(),{handleElement:a,handleElementId:n,richTextAttrs:r,availableFonts:u,textFormatPainter:c}=(0,o.Jk)(t),d=a,p=(0,s.iH)("#000"),v=(0,s.iH)({type:"linear",rotate:0,color:["#fff","#fff"]}),m=(0,s.iH)("fill"),h=(0,s.iH)("middle");(0,i.YP)(a,(()=>{a.value&&"shape"===a.value.type&&(p.value=a.value.fill||"#fff",v.value=a.value.gradient||{type:"linear",rotate:0,color:[p.value,"#fff"]},m.value=a.value.gradient?"gradient":"fill",h.value=a.value?.text?.align||"middle")}),{deep:!0,immediate:!0});const{addHistorySnapshot:f}=ra(),{toggleFormatPainter:g}=Am(),y=e=>{l.updateElement({id:n.value,props:e}),f()},w=e=>{"fill"===e?(l.removeElementProps({id:n.value,propName:"gradient"}),f()):y({gradient:v.value})},x=e=>{if(!v.value)return;const t={...v.value,...e};y({gradient:t})},k=e=>{y({fill:e})},b=e=>{const{width:t,height:l}=a.value,n={viewBox:e.viewBox,path:e.path,special:e.special};if(e.pathFormula){n.pathFormula=e.pathFormula,n.viewBox=[t,l];const a=oa[e.pathFormula];"editable"in a?(n.path=a.formula(t,l,a.defaultValue),n.keypoint=a.defaultValue):n.path=a.formula(t,l)}else n.pathFormula=void 0,n.keypoint=void 0;y(n)},_=e=>{const t=a.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},n=t.text||l;y({text:{...n,align:e}})},I=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],S=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,t)=>{const l=(0,i.up)("IconDown"),a=(0,i.up)("IconFontSize"),n=(0,i.up)("IconAddText"),o=(0,i.up)("IconText"),f=(0,i.up)("IconHighLight"),y=(0,i.up)("IconTextBold"),C=(0,i.up)("IconTextItalic"),L=(0,i.up)("IconTextUnderline"),T=(0,i.up)("IconStrikethrough"),M=(0,i.up)("IconFormat"),U=(0,i.up)("IconFormatBrush"),W=(0,i.up)("IconAlignTextLeft"),D=(0,i.up)("IconAlignTextCenter"),H=(0,i.up)("IconAlignTextRight"),F=(0,i.up)("IconAlignTextTopOne"),A=(0,i.up)("IconAlignTextMiddleOne"),Z=(0,i.up)("IconAlignTextBottomOne"),$=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",yy,[(0,i._)("div",wy,[xy,(0,i.Wm)(l)]),(0,i._)("div",ky,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(ia),(e=>((0,i.wg)(),(0,i.iD)("div",{class:"category",key:e.type},[(0,i._)("div",by,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.children,((e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,["任意多边形"!==e.title?((0,i.wg)(),(0,i.j4)(Tp,{class:"shape-item",key:t,shape:e,onClick:t=>b(e)},null,8,["shape","onClick"])):(0,i.kq)("",!0)],64)))),256))])])))),128))]),(0,i._)("div",_y,[(0,i.Wm)(op,{style:{flex:"1"},value:m.value,"onUpdate:value":t[0]||(t[0]=e=>w(e)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Iy,"fill"===m.value?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value,"onUpdate:modelValue":t[1]||(t[1]=e=>k(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:p.value},null,8,["color"])])),_:1})):((0,i.wg)(),(0,i.j4)(op,{key:1,style:{flex:"1"},value:v.value.type,"onUpdate:value":t[2]||(t[2]=e=>x({type:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"gradient"===m.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Sy,[Cy,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:v.value.color[0],"onUpdate:modelValue":t[3]||(t[3]=e=>x({color:[e,v.value.color[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:v.value.color[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Ly,[Ey,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:v.value.color[1],"onUpdate:modelValue":t[4]||(t[4]=e=>x({color:[v.value.color[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:v.value.color[1]},null,8,["color"])])),_:1})]),"linear"===v.value.type?((0,i.wg)(),(0,i.iD)("div",Ty,[My,(0,i.Wm)(Nm,{style:{width:"60%"},min:0,max:360,step:15,value:v.value.rotate,"onUpdate:value":t[5]||(t[5]=e=>x({rotate:e}))},null,8,["value"])])):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0),(0,i.Wm)(Og),(0,i.Wm)(Dc),(0,s.SU)(d).text?.content?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{class:"font-select",style:{width:"60%"},value:(0,s.SU)(r).fontname,"onUpdate:value":t[6]||(t[6]=e=>S("fontname",e)),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(r).fontsize,"onUpdate:value":t[7]||(t[7]=e=>S("fontsize",e)),options:I.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(r).color,"onUpdate:modelValue":t[8]||(t[8]=e=>S("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(r).color},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[$,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(r).backcolor,"onUpdate:modelValue":t[9]||(t[9]=e=>S("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(r).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1},8,["color"])),[[$,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[10]||(t[10]=e=>S("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("+")])),_:1})),[[$,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[11]||(t[11]=e=>S("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a),(0,i.Uk)("-")])),_:1})),[[$,"减小字号"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).bold,onClick:t[12]||(t[12]=e=>S("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[$,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).em,onClick:t[13]||(t[13]=e=>S("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(C)])),_:1},8,["checked"])),[[$,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).underline,onClick:t[14]||(t[14]=e=>S("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["checked"])),[[$,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:(0,s.SU)(r).strikethrough,onClick:t[15]||(t[15]=e=>S("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["checked"])),[[$,"删除线"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},onClick:t[16]||(t[16]=e=>S("clear"))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[$,"清除格式"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:!!(0,s.SU)(c),onClick:t[17]||(t[17]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1},8,["checked"])),[[$,"格式刷"]])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(r).align,"onUpdate:value":t[18]||(t[18]=e=>S("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[$,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(D)])),_:1})),[[$,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(H)])),_:1})),[[$,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:h.value,"onUpdate:value":t[19]||(t[19]=e=>_(e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"top",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(F)])),_:1})),[[$,"顶对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"middle",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(A)])),_:1})),[[$,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"bottom",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Z)])),_:1})),[[$,"底对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Dc)],64)):(0,i.kq)("",!0),(0,i.Wm)(kf),(0,i.Wm)(Dc),(0,i.Wm)(Zf),(0,i.Wm)(Dc),(0,i.Wm)(Gm)])}}});const Wy=(0,Nl.Z)(Uy,[["__scopeId","data-v-291bd4e3"]]);var Dy=Wy;const Hy=e=>((0,i.dD)("data-v-ae80032c"),e=e(),(0,i.Cn)(),e),Fy={class:"line-style-panel"},Ay={class:"row"},Zy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条样式:",-1))),$y={class:"row"},Oy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条颜色:",-1))),zy={class:"row"},Ry=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"线条宽度:",-1))),By={class:"row"},Py=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"起点样式:",-1))),Ny={class:"row"},jy=Hy((()=>(0,i._)("div",{style:{width:"40%"}},"终点样式:",-1)));var Yy=(0,i.aZ)({__name:"LineStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Fy,[(0,i._)("div",Ay,[Zy,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).style,"onUpdate:value":t[0]||(t[0]=e=>r({style:e})),options:[{label:"实线",value:"solid"},{label:"虚线",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",$y,[Oy,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",zy,[Ry,(0,i.Wm)(uv,{value:(0,s.SU)(a).width,"onUpdate:value":t[2]||(t[2]=e=>r({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i._)("div",By,[Py,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).points[0],"onUpdate:value":t[3]||(t[3]=e=>r({points:[e,(0,s.SU)(a).points[1]]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i._)("div",Ny,[jy,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(a).points[1],"onUpdate:value":t[4]||(t[4]=e=>r({points:[(0,s.SU)(a).points[0],e]})),options:[{label:"无",value:""},{label:"箭头",value:"arrow"},{label:"圆点",value:"dot"}]},null,8,["value"])]),(0,i.Wm)(Dc),(0,i.Wm)(Zf)]))}});const Vy=(0,Nl.Z)(Yy,[["__scopeId","data-v-ae80032c"]]);var Jy=Vy;const qy={class:"chart-data-editor"},Xy={class:"editor-content"},Gy={class:"range-box"},Ky=["id","onFocus","onPaste"],Qy={class:"btns"},ew={class:"left"},tw={class:"right"},lw=100,aw=32;var nw=(0,i.aZ)({__name:"ChartDataEditor",props:{data:{}},emits:["save","close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)([0,0]),o=(0,s.iH)({width:0,height:0}),r=(0,s.iH)(null),u=(0,i.Fl)((()=>{const e=a.value[0]*lw,t=a.value[1]*aw;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"}}]})),c=(0,i.Fl)((()=>{const e=a.value[0]*lw,t=a.value[1]*aw;return{left:e+"px",top:t+"px"}})),d=()=>{const e=[],{labels:t,legends:n,series:o}=l.data,i=t.length,s=o.length;e.push(["",...n]);for(let l=0;l{if(!r.value)return;const[e,t]=r.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},v=e=>{const t=e.key.toUpperCase();t===le.ENTER&&p()};(0,i.bv)((()=>{document.addEventListener("keydown",v)})),(0,i.Ah)((()=>{document.removeEventListener("keydown",v)}));const m=()=>{const[e,l]=a.value,n=[],o=[],i=[];for(let t=1;t{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},f=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const a=e.clipboardData.items[0];a&&"string"===a.kind&&"text/plain"===a.type&&a.getAsString((e=>{const a=me(e);if("object"===typeof a)return;const n=he(e);if(n){const e=t+n.length,a=l+n[0].length;for(let o=t;ot("close"),y=e=>{let t=!0;const l=e.pageX,n=e.pageY,i=a.value[0]*lw,s=a.value[1]*aw;document.onmousemove=e=>{if(!t)return;const a=e.pageX,r=e.pageY,u=a-l,c=r-n,d=i+u,p=s+c;o.value={width:d,height:p}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&n===s)return;let r=o.value.width,u=o.value.height;r%lw>.5*lw&&(r+=lw-r%lw),u%aw>.5*aw&&(u+=aw-u%aw);let c=Math.round(u/aw),d=Math.round(r/lw);c<3&&(c=3),d<2&&(d=2),a.value=[d,c],o.value={width:0,height:0}}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",qy,[(0,i._)("div",Xy,[(0,i._)("div",Gy,[(0,i._)("div",{class:"temp-range",style:(0,ae.j5)({width:o.value.width+"px",height:o.value.height+"px"})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(u.value,(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["range-line",e.type]),key:e.type,style:(0,ae.j5)(e.style)},null,6)))),128)),(0,i._)("div",{class:"resizable",style:(0,ae.j5)(c.value),onMousedown:t[0]||(t[0]=(0,n.iM)((e=>y(e)),["stop"]))},null,36)]),(0,i._)("table",null,[(0,i._)("tbody",null,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(31,(e=>(0,i._)("tr",{key:e},[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(7,(t=>(0,i._)("td",{key:t,class:(0,ae.C_)({head:1===t&&e<=a.value[1]||1===e&&t<=a.value[0]})},[(0,i._)("input",{class:(0,ae.C_)(["item",{selected:e<=a.value[1]&&t<=a.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>r.value=[e-1,t-1],onPaste:l=>f(l,e-1,t-1)},null,42,Ky)],2))),64))]))),64))])])]),(0,i._)("div",Qy,[(0,i._)("div",ew,[(0,i.Wm)(Xd,{class:"btn",onClick:t[1]||(t[1]=e=>h())},{default:(0,i.w5)((()=>[(0,i.Uk)("清空")])),_:1})]),(0,i._)("div",tw,[(0,i.Wm)(Xd,{class:"btn",onClick:t[2]||(t[2]=e=>g())},{default:(0,i.w5)((()=>[(0,i.Uk)("取消")])),_:1}),(0,i.Wm)(Xd,{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>m()),style:{"margin-left":"10px"}},{default:(0,i.w5)((()=>[(0,i.Uk)("确认")])),_:1})])])]))}});const ow=(0,Nl.Z)(nw,[["__scopeId","data-v-f7b59928"]]);var iw=ow;const sw=e=>((0,i.dD)("data-v-26bf4835"),e=e(),(0,i.Cn)(),e),rw=sw((()=>(0,i._)("span",{class:"checkbox-input"},null,-1))),uw=sw((()=>(0,i._)("input",{class:"checkbox-original",type:"checkbox"},null,-1))),cw={class:"checkbox-label"};var dw=(0,i.aZ)({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const l=e,a=e=>{l.disabled||t("update:value",e.target.checked)};return(e,t)=>((0,i.wg)(),(0,i.iD)("label",{class:(0,ae.C_)(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:t[0]||(t[0]=e=>a(e))},[rw,uw,(0,i._)("span",cw,[(0,i.WI)(e.$slots,"default")])],34))}});const pw=(0,Nl.Z)(dw,[["__scopeId","data-v-26bf4835"]]);var vw=pw;const mw=e=>((0,i.dD)("data-v-08b362db"),e=e(),(0,i.Cn)(),e),hw={class:"chart-style-panel"},fw={class:"row"},gw={class:"row"},yw={key:1,class:"row"},ww={key:2,class:"row"},xw={class:"row"},kw=mw((()=>(0,i._)("div",{style:{width:"40%"}},"图例:",-1))),bw={class:"row"},_w=mw((()=>(0,i._)("div",{style:{width:"40%"}},"背景填充:",-1))),Iw={class:"row"},Sw=mw((()=>(0,i._)("div",{style:{width:"40%"}},"网格颜色:",-1))),Cw={style:{width:"40%"}},Lw={class:"color-btn-wrap",style:{width:"100%"}},Ew=["onClick"],Tw={class:"preset-themes"},Mw=["onClick","onMouseenter"];var Uw=(0,i.aZ)({__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=$(),a=F(),{handleElement:r,handleElementId:u}=(0,o.Jk)(l),{theme:c}=(0,o.Jk)(a),d=r,p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)([-1,-1]),{addHistorySnapshot:h}=ra(),f=(0,s.iH)("#000"),g=(0,s.iH)([]),y=(0,s.iH)(""),w=(0,s.iH)(""),x=(0,s.iH)(!0),k=(0,s.iH)(!0),b=(0,s.iH)(!1),_=(0,s.iH)(!1),I=(0,s.iH)(!1),S=(0,s.iH)(!1);(0,i.YP)(r,(()=>{if(r.value&&"chart"===r.value.type){if(f.value=r.value.fill||"#fff",r.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:a,donut:n,stackBars:o}=r.value.options;x.value=!!e,k.value=!!t,b.value=!!l,_.value=!!a,I.value=!!n,S.value=!!o}g.value=r.value.themeColor,y.value=r.value.gridColor||"#333",w.value=r.value.legend||""}}),{deep:!0,immediate:!0});const C=e=>{a.updateElement({id:u.value,props:e}),h()},L=e=>{p.value=!1,C({data:e})},E=e=>{C({fill:e})},T=e=>{const t=r.value,l={...t.options,...e};C({options:l})},M=(e,t)=>{const l={themeColor:g.value.map(((l,a)=>a===t?e:l))};C(l)},U=()=>{const e={themeColor:[...g.value,c.value.themeColor]};C(e)},W=(e,t)=>{const l=e.slice(0,t+1);C({themeColor:l}),v.value=!1},D=e=>{const t={themeColor:g.value.filter(((t,l)=>l!==e))};C(t)},H=e=>{C({gridColor:e})},A=e=>{C({legend:e})},Z=()=>p.value=!0;return Hi.on(Ui.OPEN_CHART_DATA_EDITOR,Z),(0,i.Ah)((()=>{Hi.off(Ui.OPEN_CHART_DATA_EDITOR,Z)})),(e,l)=>{const a=(0,i.up)("IconEdit"),o=(0,i.up)("IconCloseSmall"),r=(0,i.up)("IconPlus"),u=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",hw,[(0,i.Wm)(Xd,{class:"full-width-btn",onClick:l[0]||(l[0]=e=>p.value=!0)},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 编辑图表数据 ")])),_:1}),(0,i.Wm)(Dc),"line"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",fw,[(0,i.Wm)(vw,{"onUpdate:value":l[1]||(l[1]=e=>T({showArea:e})),value:b.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("面积图样式")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":l[2]||(l[2]=e=>T({showLine:e})),value:!k.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("散点图样式")])),_:1},8,["value"])]),(0,i._)("div",gw,[(0,i.Wm)(vw,{"onUpdate:value":l[3]||(l[3]=e=>T({lineSmooth:e})),value:x.value},{default:(0,i.w5)((()=>[(0,i.Uk)("使用平滑曲线")])),_:1},8,["value"])])],64)):(0,i.kq)("",!0),"bar"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",yw,[(0,i.Wm)(vw,{"onUpdate:value":l[4]||(l[4]=e=>T({horizontalBars:e})),value:_.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("条形图样式")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":l[5]||(l[5]=e=>T({stackBars:e})),value:S.value,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("堆叠样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),"pie"===(0,s.SU)(d).chartType?((0,i.wg)(),(0,i.iD)("div",ww,[(0,i.Wm)(vw,{"onUpdate:value":l[6]||(l[6]=e=>T({donut:e})),value:I.value},{default:(0,i.w5)((()=>[(0,i.Uk)("环形图样式")])),_:1},8,["value"])])):(0,i.kq)("",!0),(0,i.Wm)(Dc),(0,i._)("div",xw,[kw,(0,i.Wm)(op,{style:{width:"60%"},value:w.value,"onUpdate:value":l[7]||(l[7]=e=>A(e)),options:[{label:"不显示",value:""},{label:"显示在上方",value:"top"},{label:"显示在下方",value:"bottom"}]},null,8,["value"])]),(0,i.Wm)(Dc),(0,i._)("div",bw,[_w,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>E(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:f.value},null,8,["color"])])),_:1})]),(0,i._)("div",Iw,[Sw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=e=>H(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:y.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(g.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"row",key:t},[(0,i._)("div",Cw,(0,ae.zw)(0===t?"主题配色:":""),1),(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:e,"onUpdate:modelValue":e=>M(e,t)},null,8,["modelValue","onUpdate:modelValue"])])),default:(0,i.w5)((()=>[(0,i._)("div",Lw,[(0,i.Wm)(th,{color:e},null,8,["color"]),0!==t?(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{key:0,class:"delete-color-btn",onClick:(0,n.iM)((e=>D(t)),["stop"])},[(0,i.Wm)(o)],8,Ew)),[[u,"删除"]]):(0,i.kq)("",!0)])])),_:2},1024)])))),128)),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",open:v.value,"onUpdate:open":l[11]||(l[11]=e=>v.value=e),style:{width:"40%"}},{content:(0,i.w5)((()=>[(0,i._)("div",Tw,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,((e,t)=>(0,i._)("div",{class:"preset-theme",key:t},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e,((a,n)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["preset-theme-color",{select:m.value[0]===t&&n<=m.value[1]}]),key:a,style:(0,ae.j5)({backgroundColor:a}),onClick:t=>W(e,n),onMouseenter:e=>m.value=[t,n],onMouseleave:l[10]||(l[10]=e=>m.value=[-1,-1])},null,46,Mw)))),128))]))),64))])])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"no-padding",style:{width:"100%"}},{default:(0,i.w5)((()=>[(0,i.Uk)("推荐主题")])),_:1})])),_:1},8,["open"]),(0,i.Wm)(Xd,{class:"no-padding",disabled:g.value.length>=10,style:{width:"60%"},onClick:l[12]||(l[12]=e=>U())},{default:(0,i.w5)((()=>[(0,i.Wm)(r,{class:"btn-icon"}),(0,i.Uk)(" 添加主题色 ")])),_:1},8,["disabled"])])),_:1}),(0,i.Wm)(Dc),(0,i.Wm)(kf),(0,i.Wm)(fp,{visible:p.value,"onUpdate:visible":l[15]||(l[15]=e=>p.value=e),width:640},{default:(0,i.w5)((()=>[(0,i.Wm)(iw,{data:(0,s.SU)(d).data,onClose:l[13]||(l[13]=e=>p.value=!1),onSave:l[14]||(l[14]=e=>L(e))},null,8,["data"])])),_:1},8,["visible"])])}}});const Ww=(0,Nl.Z)(Uw,[["__scopeId","data-v-08b362db"]]);var Dw=Ww;const Hw=e=>((0,i.dD)("data-v-e03199d6"),e=e(),(0,i.Cn)(),e),Fw={class:"table-style-panel"},Aw={class:"row"},Zw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"行数:",-1))),$w={class:"set-count",style:{width:"60%"}},Ow={class:"count-text"},zw={class:"row"},Rw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"列数:",-1))),Bw={class:"set-count",style:{width:"60%"}},Pw={class:"count-text"},Nw={class:"row theme-switch"},jw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"启用主题表格:",-1))),Yw={class:"switch-wrapper",style:{width:"60%"}},Vw={class:"row"},Jw={class:"row"},qw={class:"row"},Xw=Hw((()=>(0,i._)("div",{style:{width:"40%"}},"主题颜色:",-1)));var Gw=(0,i.aZ)({__name:"TableStylePanel",setup(e){const t=F(),{handleElement:l,handleElementId:a,selectedTableCells:n,availableFonts:u}=(0,o.Jk)($()),c=(0,i.Fl)((()=>t.theme.themeColor)),d=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],p=(0,s.iH)({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),v=(0,s.iH)(),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,s.iH)(0),y=(0,s.iH)(0);(0,i.YP)(l,(()=>{l.value&&"table"===l.value.type&&(v.value=l.value.theme,m.value=!!v.value,h.value=l.value.data.length,f.value=l.value.data[0].length,g.value=l.value.data.length,y.value=l.value.data[0].length)}),{deep:!0,immediate:!0});const{addHistorySnapshot:w}=ra(),x=()=>{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 a=l.value.data[e][t].style;p.value=a?{bold:!!a.bold,em:!!a.em,underline:!!a.underline,strikethrough:!!a.strikethrough,color:a.color||"#000",backcolor:a.backcolor||"",fontsize:a.fontsize||"12px",fontname:a.fontname||"微软雅黑",align:a.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};(0,i.bv)((()=>{n.value.length&&x()})),(0,i.YP)(n,x);const k=e=>{t.updateElement({id:a.value,props:e}),w()},b=e=>{const t=l.value,a=JSON.parse(JSON.stringify(t.data));for(let l=0;l{if(!v.value)return;const t={...v.value,...e};k({theme:t})},I=e=>{if(e){const e={theme:{color:c.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};k(e)}else t.removeElementProps({id:a.value,propName:"theme"}),w()},S=e=>{const t=l.value,a=t.data.length;if(e>a){const l=new Array(f.value).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""}),n=new Array(e-a).fill(l),o=JSON.parse(JSON.stringify(t.data));o.push(...n),k({data:o})}else{const l=t.data.slice(0,e);k({data:l})}},C=e=>{const t=l.value,a=t.data[0].length;let n=t.data,o=t.colWidths.map((e=>e*t.width));if(e>a){n=n.map((t=>{const l=new Array(e-a).fill({id:(0,r.x0)(10),colspan:1,rowspan:1,text:""});return t.push(...l),t}));const t=new Array(e-a).fill(100);o.push(...t)}else n=n.map((t=>t.slice(0,e))),o=o.slice(0,e);const i=o.reduce(((e,t)=>e+t)),s=o.map((e=>e/i)),u={width:i,data:n,colWidths:s};k(u)};return(e,t)=>{const l=(0,i.up)("IconFontSize"),a=(0,i.up)("IconAddText"),n=(0,i.up)("IconText"),o=(0,i.up)("IconFill"),r=(0,i.up)("IconTextBold"),c=(0,i.up)("IconTextItalic"),g=(0,i.up)("IconTextUnderline"),y=(0,i.up)("IconStrikethrough"),w=(0,i.up)("IconAlignTextLeft"),x=(0,i.up)("IconAlignTextCenter"),k=(0,i.up)("IconAlignTextRight"),L=(0,i.up)("IconMinus"),T=(0,i.up)("IconPlus"),M=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Fw,[(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{style:{width:"50%"},value:p.value.fontname,"onUpdate:value":t[0]||(t[0]=e=>b({fontname:e})),options:[...(0,s.SU)(u),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(l)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"50%"},value:p.value.fontsize,"onUpdate:value":t[1]||(t[1]=e=>b({fontsize:e})),options:d.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>b({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:p.value.color},{default:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["color"])),[[M,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"50%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.backcolor,"onUpdate:modelValue":t[3]||(t[3]=e=>b({backcolor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:p.value.backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["color"])),[[M,"单元格填充"]])])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.bold,onClick:t[4]||(t[4]=e=>b({bold:!p.value.bold}))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"])),[[M,"加粗"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.em,onClick:t[5]||(t[5]=e=>b({em:!p.value.em}))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])),[[M,"斜体"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.underline,onClick:t[6]||(t[6]=e=>b({underline:!p.value.underline}))},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1},8,["checked"])),[[M,"下划线"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Nf,{style:{flex:"1"},checked:p.value.strikethrough,onClick:t[7]||(t[7]=e=>b({strikethrough:!p.value.strikethrough}))},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1},8,["checked"])),[[M,"删除线"]])])),_:1}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:p.value.align,"onUpdate:value":t[8]||(t[8]=e=>b({align:e}))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(w)])),_:1})),[[M,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(x)])),_:1})),[[M,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(k)])),_:1})),[[M,"右对齐"]])])),_:1},8,["value"]),(0,i.Wm)(Dc),(0,i.Wm)(kf,{fixed:!0}),(0,i.Wm)(Dc),(0,i._)("div",Aw,[Zw,(0,i._)("div",$w,[(0,i.Wm)(Xd,{class:"btn",disabled:h.value<=1,onClick:t[9]||(t[9]=e=>S(h.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Ow,(0,ae.zw)(h.value),1),(0,i.Wm)(Xd,{class:"btn",disabled:h.value>=30,onClick:t[10]||(t[10]=e=>S(h.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i._)("div",zw,[Rw,(0,i._)("div",Bw,[(0,i.Wm)(Xd,{class:"btn",disabled:f.value<=1,onClick:t[11]||(t[11]=e=>C(f.value-1))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1},8,["disabled"]),(0,i._)("div",Pw,(0,ae.zw)(f.value),1),(0,i.Wm)(Xd,{class:"btn",disabled:f.value>=30,onClick:t[12]||(t[12]=e=>C(f.value+1))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1},8,["disabled"])])]),(0,i.Wm)(Dc),(0,i._)("div",Nw,[jw,(0,i._)("div",Yw,[(0,i.Wm)(sf,{value:m.value,"onUpdate:value":t[13]||(t[13]=e=>I(e))},null,8,["value"])])]),v.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",Vw,[(0,i.Wm)(vw,{"onUpdate:value":t[14]||(t[14]=e=>_({rowHeader:e})),value:v.value.rowHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("标题行")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":t[15]||(t[15]=e=>_({rowFooter:e})),value:v.value.rowFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("汇总行")])),_:1},8,["value"])]),(0,i._)("div",Jw,[(0,i.Wm)(vw,{"onUpdate:value":t[16]||(t[16]=e=>_({colHeader:e})),value:v.value.colHeader,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("第一列")])),_:1},8,["value"]),(0,i.Wm)(vw,{"onUpdate:value":t[17]||(t[17]=e=>_({colFooter:e})),value:v.value.colFooter,style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Uk)("最后一列")])),_:1},8,["value"])]),(0,i._)("div",qw,[Xw,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:v.value.color,"onUpdate:modelValue":t[18]||(t[18]=e=>_({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:v.value.color},null,8,["color"])])),_:1})])],64)):(0,i.kq)("",!0)])}}});const Kw=(0,Nl.Z)(Gw,[["__scopeId","data-v-e03199d6"]]);var Qw=Kw;const ex=e=>((0,i.dD)("data-v-3a5ca316"),e=e(),(0,i.Cn)(),e),tx={class:"latex-style-panel"},lx={class:"row"},ax={class:"row"},nx=ex((()=>(0,i._)("div",{style:{width:"40%"}},"颜色:",-1))),ox={class:"row"},ix=ex((()=>(0,i._)("div",{style:{width:"40%"}},"粗细:",-1)));var sx=(0,i.aZ)({__name:"LatexStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,n=(0,s.iH)(!1),{addHistorySnapshot:r}=ra(),u=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},c=e=>{u({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>n.value=!0;return Hi.on(Ui.OPEN_LATEX_EDITOR,d),(0,i.Ah)((()=>{Hi.off(Ui.OPEN_LATEX_EDITOR,d)})),(e,t)=>((0,i.wg)(),(0,i.iD)("div",tx,[(0,i._)("div",lx,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>n.value=!0)},{default:(0,i.w5)((()=>[(0,i.Uk)("编辑 LaTeX")])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",ax,[nx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",ox,[ix,(0,i.Wm)(uv,{min:1,max:3,value:(0,s.SU)(a).strokeWidth,"onUpdate:value":t[2]||(t[2]=e=>u({strokeWidth:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(fp,{visible:n.value,"onUpdate:visible":t[5]||(t[5]=e=>n.value=e),width:880},{default:(0,i.w5)((()=>[(0,i.Wm)(dm,{value:(0,s.SU)(a).latex,onClose:t[3]||(t[3]=e=>n.value=!1),onUpdate:t[4]||(t[4]=e=>{c(e),n.value=!1})},null,8,["value"])])),_:1},8,["visible"])]))}});const rx=(0,Nl.Z)(sx,[["__scopeId","data-v-3a5ca316"]]);var ux=rx;const cx=e=>((0,i.dD)("data-v-7fcf2dfa"),e=e(),(0,i.Cn)(),e),dx={class:"video-style-panel"},px=cx((()=>(0,i._)("div",{class:"title"},"视频预览封面",-1))),vx={class:"background-image-wrapper"},mx={class:"background-image"},hx={class:"row"};var fx=(0,i.aZ)({__name:"VideoStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())},u=e=>{const t=e[0];t&&ta(t).then((e=>r({poster:e})))};return(e,t)=>{const l=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",dx,[px,(0,i._)("div",vx,[(0,i.Wm)(Oa,{onChange:t[0]||(t[0]=e=>u(e))},{default:(0,i.w5)((()=>[(0,i._)("div",mx,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:(0,s.SU)(a).poster?`url(${(0,s.SU)(a).poster})`:""})},[(0,i.Wm)(l)],4)])])),_:1})]),(0,i._)("div",hx,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:(0,i.w5)((()=>[(0,i.Uk)("重置封面")])),_:1})])])}}});const gx=(0,Nl.Z)(fx,[["__scopeId","data-v-7fcf2dfa"]]);var yx=gx;const wx=e=>((0,i.dD)("data-v-32517bcf"),e=e(),(0,i.Cn)(),e),xx={class:"audio-style-panel"},kx={class:"row"},bx=wx((()=>(0,i._)("div",{style:{width:"40%"}},"图标颜色:",-1))),_x={class:"row switch-row"},Ix=wx((()=>(0,i._)("div",{style:{width:"40%"}},"自动播放:",-1))),Sx={class:"switch-wrapper",style:{width:"60%"}},Cx={class:"row switch-row"},Lx=wx((()=>(0,i._)("div",{style:{width:"40%"}},"循环播放:",-1))),Ex={class:"switch-wrapper",style:{width:"60%"}};var Tx=(0,i.aZ)({__name:"AudioStylePanel",setup(e){const t=F(),{handleElement:l}=(0,o.Jk)($()),a=l,{addHistorySnapshot:n}=ra(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),n())};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",xx,[(0,i._)("div",kx,[bx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(a).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(a).color},null,8,["color"])])),_:1})]),(0,i._)("div",_x,[Ix,(0,i._)("div",Sx,[(0,i.Wm)(sf,{value:(0,s.SU)(a).autoplay,"onUpdate:value":t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["value"])])]),(0,i._)("div",Cx,[Lx,(0,i._)("div",Ex,[(0,i.Wm)(sf,{value:(0,s.SU)(a).loop,"onUpdate:value":t[2]||(t[2]=e=>r({loop:e}))},null,8,["value"])])])]))}});const Mx=(0,Nl.Z)(Tx,[["__scopeId","data-v-32517bcf"]]);var Ux=Mx;const Wx=e=>((0,i.dD)("data-v-b098ce7c"),e=e(),(0,i.Cn)(),e),Dx={class:"multi-style-panel"},Hx={class:"row"},Fx=Wx((()=>(0,i._)("div",{style:{width:"40%"}},"填充颜色:",-1))),Ax={class:"row"},Zx=Wx((()=>(0,i._)("div",{style:{width:"40%"}},"边框样式:",-1))),$x={class:"row"},Ox=Wx((()=>(0,i._)("div",{style:{width:"40%"}},"边框颜色:",-1))),zx={class:"row"},Rx=Wx((()=>(0,i._)("div",{style:{width:"40%"}},"边框粗细:",-1)));var Bx=(0,i.aZ)({__name:"MultiStylePanel",setup(e){const t=F(),{richTextAttrs:l,availableFonts:a,activeElementList:n}=(0,o.Jk)($()),{addHistorySnapshot:r}=ra(),u=(e,l)=>{t.updateElement({id:e,props:l}),r()},c=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],d=(0,s.iH)("#fff"),p=(0,s.iH)({width:0,color:"#fff",style:"solid"}),v=e=>{for(const t of n.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||u(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t{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"},a={outline:{...l,...e}};u(t.id,a)}"line"===t.type&&u(t.id,e)}p.value={...p.value,...e}},h=(e,t)=>{for(const l of n.value){if(("text"===l.type||"shape"===l.type&&l.text?.content)&&Hi.emit(Ui.RICH_TEXT_COMMAND,{target:l.id,action:{command:e,value:t}}),"table"===l.type){const a=JSON.parse(JSON.stringify(l.data));for(let l=0;l{const n=(0,i.up)("IconFontSize"),o=(0,i.up)("IconAddText"),r=(0,i.up)("IconText"),u=(0,i.up)("IconHighLight"),f=(0,i.up)("IconAlignTextLeft"),g=(0,i.up)("IconAlignTextCenter"),y=(0,i.up)("IconAlignTextRight"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Dx,[(0,i._)("div",Hx,[Fx,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>v(e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:d.value},null,8,["color"])])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",Ax,[Zx,(0,i.Wm)(op,{style:{width:"60%"},value:p.value.style||"","onUpdate:value":t[1]||(t[1]=e=>m({style:e})),options:[{label:"实线边框",value:"solid"},{label:"虚线边框",value:"dashed"}]},null,8,["value"])]),(0,i._)("div",$x,[Ox,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:p.value.color,"onUpdate:modelValue":t[2]||(t[2]=e=>m({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:p.value.color||"#000"},null,8,["color"])])),_:1})]),(0,i._)("div",zx,[Rx,(0,i.Wm)(uv,{value:p.value.width||0,"onUpdate:value":t[3]||(t[3]=e=>m({width:e})),style:{width:"60%"}},null,8,["value"])]),(0,i.Wm)(Dc),(0,i.Wm)(ig,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(l).fontname,"onUpdate:value":t[4]||(t[4]=e=>h("fontname",e)),options:[...(0,s.SU)(a),...(0,s.SU)(E)]},{icon:(0,i.w5)((()=>[(0,i.Wm)(n)])),_:1},8,["value","options"]),(0,i.Wm)(op,{style:{width:"40%"},value:(0,s.SU)(l).fontsize,"onUpdate:value":t[5]||(t[5]=e=>h("fontsize",e)),options:c.map((e=>({label:e,value:e})))},{icon:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["value","options"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(l).color,"onUpdate:modelValue":t[6]||(t[6]=e=>h("color",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(l).color},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["color"])),[[w,"文字颜色"]])])),_:1}),(0,i.Wm)(rn,{trigger:"click",style:{width:"30%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(l).backcolor,"onUpdate:modelValue":t[7]||(t[7]=e=>h("backcolor",e))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Rf,{color:(0,s.SU)(l).backcolor},{default:(0,i.w5)((()=>[(0,i.Wm)(u)])),_:1},8,["color"])),[[w,"文字高亮"]])])),_:1}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[8]||(t[8]=e=>h("fontsize-add","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("+")])),_:1})),[[w,"增大字号"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{class:"font-size-btn",style:{width:"20%"},onClick:t[9]||(t[9]=e=>h("fontsize-reduce","2"))},{default:(0,i.w5)((()=>[(0,i.Wm)(n),(0,i.Uk)("-")])),_:1})),[[w,"减小字号"]])])),_:1}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(l).align,"onUpdate:value":t[10]||(t[10]=e=>h("align",e))},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g)])),_:1})),[[w,"居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y)])),_:1})),[[w,"右对齐"]])])),_:1},8,["value"])])}}});const Px=(0,Nl.Z)(Bx,[["__scopeId","data-v-b098ce7c"]]);var Nx=Px;const jx={class:"element-style-panel"};var Yx=(0,i.aZ)({__name:"index",setup(e){const t={[na.TEXT]:Fg,[na.IMAGE]:fy,[na.SHAPE]:Dy,[na.LINE]:Jy,[na.CHART]:Dw,[na.TABLE]:Qw,[na.LATEX]:ux,[na.VIDEO]:yx,[na.AUDIO]:Ux},{activeElementIdList:l,activeElementList:a,handleElement:n,activeGroupElementId:s}=(0,o.Jk)($()),r=(0,i.Fl)((()=>{if(l.value.length>1){if(!s.value)return Nx;const e=a.value.find((e=>e.id===s.value));return e&&t[e.type]||null}return n.value&&t[n.value.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",jx,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value)))]))}});const Vx=Yx;var Jx=Vx;const qx=e=>((0,i.dD)("data-v-a2bcea28"),e=e(),(0,i.Cn)(),e),Xx={class:"element-positopn-panel"},Gx=qx((()=>(0,i._)("div",{class:"title"},"层级:",-1))),Kx=qx((()=>(0,i._)("div",{class:"title"},"对齐:",-1))),Qx={class:"row"},ek=qx((()=>(0,i._)("div",{style:{width:"10%"}},null,-1))),tk={key:0,class:"row"},lk={key:1,style:{width:"10%"}},ak={class:"row"},nk=qx((()=>(0,i._)("div",{style:{width:"7%"}},null,-1)));var ok=(0,i.aZ)({__name:"ElementPositionPanel",setup(e){const t=F(),{handleElement:l,handleElementId:a}=(0,o.Jk)($()),n=(0,s.iH)(0),r=(0,s.iH)(0),u=(0,s.iH)(0),c=(0,s.iH)(0),d=(0,s.iH)(0),p=(0,s.iH)(!1),v=(0,i.Fl)((()=>l.value&&Fn[l.value.type]||20)),m=(0,i.Fl)((()=>"text"===l.value?.type&&!l.value.vertical)),h=(0,i.Fl)((()=>"text"===l.value?.type&&l.value.vertical));(0,i.YP)(l,(()=>{l.value&&(n.value=(0,U.round)(l.value.left,1),r.value=(0,U.round)(l.value.top,1),p.value="fixedRatio"in l.value&&!!l.value.fixedRatio,"line"!==l.value.type&&(u.value=(0,U.round)(l.value.width,1),c.value=(0,U.round)(l.value.height,1),d.value="rotate"in l.value&&void 0!==l.value.rotate?(0,U.round)(l.value.rotate,1):0))}),{deep:!0,immediate:!0});const{orderElement:f}=wa(),{alignElementToCanvas:g}=Yn(),{addHistorySnapshot:y}=ra(),w=e=>{const l={left:e};t.updateElement({id:a.value,props:l}),y()},x=e=>{const l={top:e};t.updateElement({id:a.value,props:l}),y()},k=(e,t)=>{if(l.value&&"shape"===l.value.type&&"pathFormula"in l.value&&l.value.pathFormula){const a=oa[l.value.pathFormula];let n="";return n="editable"in a?a.formula(e,t,l.value.keypoint):a.formula(e,t),{viewBox:[e,t],path:n}}return null},b=e=>{let l={width:e};const n=k(e,c.value);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},_=e=>{let l={height:e};const n=k(u.value,e);n&&(l={...l,...n}),t.updateElement({id:a.value,props:l}),y()},I=e=>{const l={rotate:e};t.updateElement({id:a.value,props:l}),y()},S=e=>{const l={fixedRatio:e};t.updateElement({id:a.value,props:l}),y()},C=e=>{let l=45*Math.floor(d.value/45);"+"===e?l+=45:"-"===e&&(l-=45),l<-180&&(l=-180),l>180&&(l=180);const n={rotate:l};t.updateElement({id:a.value,props:n}),y()};return(e,t)=>{const a=(0,i.up)("IconSendToBack"),o=(0,i.up)("IconBringToFrontOne"),y=(0,i.up)("IconBringToFront"),k=(0,i.up)("IconSentToBack"),L=(0,i.up)("IconAlignLeft"),E=(0,i.up)("IconAlignVertically"),T=(0,i.up)("IconAlignRight"),M=(0,i.up)("IconAlignTop"),U=(0,i.up)("IconAlignHorizontally"),W=(0,i.up)("IconAlignBottom"),D=(0,i.up)("IconLock"),H=(0,i.up)("IconUnlock"),F=(0,i.up)("IconRotate"),A=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Xx,[Gx,(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[0]||(t[0]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"btn-icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"btn-icon"}),(0,i.Uk)(" 置底")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"btn-icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(f)((0,s.SU)(l),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(k,{class:"btn-icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Dc),Kx,(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>(0,s.SU)(g)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(L)])),_:1})),[[A,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[5]||(t[5]=e=>(0,s.SU)(g)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(E)])),_:1})),[[A,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>(0,s.SU)(g)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(T)])),_:1})),[[A,"右对齐"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>(0,s.SU)(g)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(M)])),_:1})),[[A,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>(0,s.SU)(g)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U)])),_:1})),[[A,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:t[9]||(t[9]=e=>(0,s.SU)(g)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(W)])),_:1})),[[A,"下对齐"]])])),_:1}),(0,i.Wm)(Dc),(0,i._)("div",Qx,[(0,i.Wm)(uv,{step:5,value:n.value,"onUpdate:value":t[10]||(t[10]=e=>w(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 水平: ")])),_:1},8,["value"]),ek,(0,i.Wm)(uv,{step:5,value:r.value,"onUpdate:value":t[11]||(t[11]=e=>x(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 垂直: ")])),_:1},8,["value"])]),"line"!==(0,s.SU)(l).type?((0,i.wg)(),(0,i.iD)("div",tk,[(0,i.Wm)(uv,{min:v.value,max:1500,step:5,disabled:h.value,value:u.value,"onUpdate:value":t[12]||(t[12]=e=>b(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 宽度: ")])),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes((0,s.SU)(l).type)?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[p.value?(0,i.wy)(((0,i.wg)(),(0,i.j4)(D,{key:0,style:{width:"10%"},class:"icon-btn",onClick:t[13]||(t[13]=e=>S(!1))},null,512)),[[A,"解除宽高比锁定"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(H,{key:1,style:{width:"10%"},class:"icon-btn",onClick:t[14]||(t[14]=e=>S(!0))},null,512)),[[A,"宽高比锁定"]])],64)):((0,i.wg)(),(0,i.iD)("div",lk)),(0,i.Wm)(uv,{min:v.value,max:800,step:5,disabled:m.value||"table"===(0,s.SU)(l).type,value:c.value,"onUpdate:value":t[15]||(t[15]=e=>_(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 高度: ")])),_:1},8,["min","disabled","value"])])):(0,i.kq)("",!0),["line","video","audio"].includes((0,s.SU)(l).type)?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)(i.HY,{key:1},[(0,i.Wm)(Dc),(0,i._)("div",ak,[(0,i.Wm)(uv,{min:-180,max:180,step:5,value:d.value,"onUpdate:value":t[16]||(t[16]=e=>I(e)),style:{width:"45%"}},{prefix:(0,i.w5)((()=>[(0,i.Uk)(" 旋转: ")])),_:1},8,["value"]),nk,(0,i._)("div",{class:"text-btn",onClick:t[17]||(t[17]=e=>C("-")),style:{width:"24%"}},[(0,i.Wm)(F),(0,i.Uk)(" -45°")]),(0,i._)("div",{class:"text-btn",onClick:t[18]||(t[18]=e=>C("+")),style:{width:"24%"}},[(0,i.Wm)(F,{style:(0,ae.j5)({transform:"rotateY(180deg)"})},null,8,["style"]),(0,i.Uk)(" +45°")])])],64))])}}});const ik=(0,Nl.Z)(ok,[["__scopeId","data-v-a2bcea28"]]);var sk=ik;const rk=1e3,uk="click",ck="animate__",dk=[{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"}]}],pk=[{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"}]}],vk=[{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"}]}],mk=[{label:"无",value:"no"},{label:"随机",value:"random"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"},{label:"左右推移(3D)",value:"slideX3D"},{label:"上下推移(3D)",value:"slideY3D"},{label:"淡入淡出",value:"fade"},{label:"旋转",value:"rotate"},{label:"上下展开",value:"scaleY"},{label:"左右展开",value:"scaleX"},{label:"放大",value:"scale"},{label:"缩小",value:"scaleReverse"}],hk=e=>((0,i.dD)("data-v-7fb0b0ec"),e=e(),(0,i.Cn)(),e),fk={class:"element-animation-panel"},gk={key:0,class:"element-animation"},yk={class:"type-title"},wk={class:"pool-item-wrapper"},xk=["onMouseenter","onClick"],kk={key:0,class:"mask"},bk={key:1,class:"tip"},_k={class:"sequence-content"},Ik={class:"index"},Sk={class:"text"},Ck={class:"handler"},Lk={key:0,class:"configs"},Ek={class:"config-item"},Tk=hk((()=>(0,i._)("div",{style:{width:"35%"}},"持续时长:",-1))),Mk={class:"config-item"},Uk=hk((()=>(0,i._)("div",{style:{width:"35%"}},"触发方式:",-1))),Wk={class:"config-item"};var Dk=(0,i.aZ)({__name:"ElementAnimationPanel",setup(e){const t={};for(const o of dk)for(const e of o.children)t[e.value]=e.name;for(const o of pk)for(const e of o.children)t[e.value]=e.name;for(const o of vk)for(const e of o.children)t[e.value]=e.name;const l=["in","out","attention"],a=F(),{handleElement:n,handleElementId:u}=(0,o.Jk)($()),{currentSlide:c,formatedAnimations:d,currentSlideAnimations:p}=(0,o.Jk)(a),v=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],m=(0,s.iH)("in");(0,i.YP)((()=>u.value),(()=>{f.value=!1}));const h=(0,s.iH)(""),f=(0,s.iH)(!1),{addHistorySnapshot:g}=ra(),y=(0,i.Fl)((()=>{const e=[];for(let l=0;le.id===o.elId));if(!i)continue;const s=Hn[i.type],r=t[o.effect];e.push({...o,index:0===n?l+1:"",elType:s,animationEffect:r})}}return e})),w=(0,i.Fl)((()=>{const e=p.value,t=e.filter((e=>e.elId===u.value));return t||[]})),x=e=>{const t=p.value.filter((t=>t.id!==e));a.updateSlide({animations:t}),g()},k=e=>{const{newIndex:t,oldIndex:l}=e;if(void 0===t||void 0===l||t===l)return;const n=JSON.parse(JSON.stringify(p.value)),o=n[l];n.splice(l,1),n.splice(t,0,o),a.updateSlide({animations:n}),g()},b=(e,t,l)=>{const a=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(a){const e=`${ck}${t}`;document.documentElement.style.setProperty("--animate-duration",`${l}ms`),a.classList.add(`${ck}animated`,e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),a.classList.remove(`${ck}animated`,e)};a.addEventListener("animationend",n,{once:!0})}},_=(e,t)=>{if(t<100||t>5e3)return;const l=p.value.map((l=>l.id===e?{...l,duration:t}:l));a.updateSlide({animations:l}),g()},I=(e,t)=>{const l=p.value.map((l=>l.id===e?{...l,trigger:t}:l));a.updateSlide({animations:l}),g()},S=(e,t)=>{const l=p.value.map((l=>l.id===C.value?{...l,type:e,effect:t}:l));a.updateSlide({animations:l}),f.value=!1,g();const n=p.value.find((e=>e.elId===u.value)),o=n?.duration||rk;b(u.value,t,o)},C=(0,s.iH)(""),L=(e,t)=>{if(C.value)return void S(e,t);const l=JSON.parse(JSON.stringify(p.value));l.push({id:(0,r.x0)(10),elId:u.value,type:e,effect:t,duration:rk,trigger:uk}),a.updateSlide({animations:l}),f.value=!1,g(),b(u.value,t,rk)},E=(0,s.iH)(!1),T=e=>{e?setTimeout((()=>E.value=!0),600):E.value=!1},M=e=>{f.value=!0,C.value=e,T(!0)},U={in:dk,out:pk,attention:vk};return(e,t)=>{const a=(0,i.up)("IconEffects"),o=(0,i.up)("IconClick"),r=(0,i.up)("IconPlayOne"),u=(0,i.up)("IconCloseSmall"),c=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",fk,[(0,s.SU)(n)?((0,i.wg)(),(0,i.iD)("div",gk,[(0,i.Wm)(rn,{trigger:"click",value:f.value,"onUpdate:value":[t[3]||(t[3]=e=>f.value=e),t[4]||(t[4]=e=>T(e))],style:{width:"100%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(Vd,{tabs:v,value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>((0,i.wg)(),(0,i.iD)(i.HY,null,[m.value===e?((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-pool",e]),key:e},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(U[e],(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-type",key:l.name},[(0,i._)("div",yk,(0,ae.zw)(l.name)+":",1),(0,i._)("div",wk,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.children,(l=>((0,i.wg)(),(0,i.iD)("div",{class:"pool-item",key:l.name,onMouseenter:e=>h.value=l.value,onMouseleave:t[1]||(t[1]=e=>h.value=""),onClick:t=>L(e,l.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-box",[`${(0,s.SU)(ck)}animated`,`${(0,s.SU)(ck)}fast`,h.value===l.value&&`${(0,s.SU)(ck)}${l.value}`]])},(0,ae.zw)(l.name),3)],40,xk)))),128))])])))),128)),E.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",kk))],2)):(0,i.kq)("",!0)],64)))),64))])),default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{class:"element-animation-btn",onClick:t[2]||(t[2]=e=>C.value="")},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 添加动画 ")])),_:1})])),_:1},8,["value"])])):((0,i.wg)(),(0,i.iD)("div",bk,[(0,i.Wm)(o,{style:{"margin-right":"5px"}}),(0,i.Uk)(" 选中画布中的元素添加动画")])),(0,i.Wm)(Dc),(0,i.Wm)((0,s.SU)(Em()),{class:"animation-sequence",modelValue:y.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:k},{item:(0,i.w5)((({element:e})=>[(0,i._)("div",{class:(0,ae.C_)(["sequence-item",[e.type,{active:(0,s.SU)(n)?.id===e.elId}]])},[(0,i._)("div",_k,[(0,i._)("div",Ik,(0,ae.zw)(e.index),1),(0,i._)("div",Sk,"【"+(0,ae.zw)(e.elType)+"】"+(0,ae.zw)(e.animationEffect),1),(0,i._)("div",Ck,[(0,i.wy)((0,i.Wm)(r,{class:"handler-btn",onClick:t=>b(e.elId,e.effect,e.duration)},null,8,["onClick"]),[[c,"预览"]]),(0,i.wy)((0,i.Wm)(u,{class:"handler-btn",onClick:t=>x(e.id)},null,8,["onClick"]),[[c,"删除"]])])]),w.value[0]?.elId===e.elId?((0,i.wg)(),(0,i.iD)("div",Lk,[(0,i.Wm)(Dc,{style:{margin:"16px 0"}}),(0,i._)("div",Ek,[Tk,(0,i.Wm)(uv,{min:500,max:3e3,step:500,value:e.duration,"onUpdate:value":t=>_(e.id,t),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),(0,i._)("div",Mk,[Uk,(0,i.Wm)(op,{value:e.trigger,"onUpdate:value":t=>I(e.id,t),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),(0,i._)("div",Wk,[(0,i.Wm)(Xd,{style:{width:"100%"},onClick:t=>M(e.id)},{default:(0,i.w5)((()=>[(0,i.Uk)("更换动画")])),_:2},1032,["onClick"])])])):(0,i.kq)("",!0)],2)])),_:1},8,["modelValue"])])}}});const Hk=(0,Nl.Z)(Dk,[["__scopeId","data-v-7fb0b0ec"]]);var Fk=Hk;const Ak=[{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 Zk=()=>{const e=F(),{slides:t,currentSlide:l,theme:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==(0,M.Z)(l.theme.color).getAlpha()){const e=(0,M.Z)(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==(0,M.Z)(l.fill).getAlpha()){const e=(0,M.Z)(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==(0,M.Z)(l.color).getAlpha()){const e=(0,M.Z)(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},s=(e,t)=>{const l=i(e),a={};if(l.length>t.length){const e=(0,M.Z)(t[0]).analogous(l.length-t.length+10),a=e.map((e=>e.toHexString())).slice(1);t.push(...a)}for(let n=0;n{const l=s(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const a of e.elements){if("shape"===a.type&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill,a.gradient&&delete a.gradient),"text"===a.type&&(a.fill&&(a.fill=l[(0,M.Z)(a.fill).toRgbString()]||a.fill),a.defaultColor=t.fontColor,a.defaultFontName=t.fontname),"table"===a.type){a.theme&&(a.theme.color=l[(0,M.Z)(a.theme.color).toRgbString()]||a.theme.color);for(const e of a.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===a.type&&(a.themeColor=[l[(0,M.Z)(a.themeColor[0]).toRgbString()]]||0,a.gridColor=t.fontColor),"line"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"audio"===a.type&&(a.color=l[(0,M.Z)(a.color).toRgbString()]||a.color),"latex"===a.type&&(a.color=t.fontColor)}},u=t=>{const a=JSON.parse(JSON.stringify(l.value));r(a,t),e.updateSlide({background:a.background,elements:a.elements}),n()},c=l=>{const a=JSON.parse(JSON.stringify(t.value));for(const e of a)r(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(a),n()},d=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:o,backgroundColor:i,fontColor:s,fontName:r}=a.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:i});for(const t of e.elements)if("shape"===t.type)t.fill=o;else if("line"===t.type)t.color=o;else if("text"===t.type)t.defaultColor=s,t.defaultFontName=r,t.fill&&(t.fill=o);else if("table"===t.type){t.theme&&(t.theme.color=o);for(const e of t.data)for(const t of e)t.style&&(t.style.color=s,t.style.fontname=r)}else"chart"===t.type?(t.themeColor=[o],t.gridColor=s):"latex"===t.type?t.color=s:"audio"===t.type&&(t.color=o)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:u,applyPresetThemeToAllSlides:c,applyThemeToAllSlides:d}};const $k=e=>((0,i.dD)("data-v-5b08a508"),e=e(),(0,i.Cn)(),e),Ok={class:"slide-design-panel"},zk=$k((()=>(0,i._)("div",{class:"title"},"背景填充",-1))),Rk={class:"row"},Bk=$k((()=>(0,i._)("div",{style:{width:"10px"}},null,-1))),Pk={key:0,class:"background-image-wrapper"},Nk={class:"background-image"},jk={key:1,class:"background-gradient-wrapper"},Yk={class:"row"},Vk=$k((()=>(0,i._)("div",{style:{width:"40%"}},"起点颜色:",-1))),Jk={class:"row"},qk=$k((()=>(0,i._)("div",{style:{width:"40%"}},"终点颜色:",-1))),Xk={key:0,class:"row"},Gk=$k((()=>(0,i._)("div",{style:{width:"40%"}},"渐变角度:",-1))),Kk={class:"row"},Qk={class:"row"},eb=$k((()=>(0,i._)("div",{style:{width:"40%"}},"画布尺寸:",-1))),tb=$k((()=>(0,i._)("div",{class:"title"},"全局主题",-1))),lb={class:"row"},ab=$k((()=>(0,i._)("div",{style:{width:"40%"}},"字体:",-1))),nb={class:"row"},ob=$k((()=>(0,i._)("div",{style:{width:"40%"}},"字体颜色:",-1))),ib={class:"row"},sb=$k((()=>(0,i._)("div",{style:{width:"40%"}},"背景颜色:",-1))),rb={class:"row"},ub=$k((()=>(0,i._)("div",{style:{width:"40%"}},"主题色:",-1))),cb={class:"row"},db=$k((()=>(0,i._)("div",{class:"title"},"预置主题",-1))),pb={class:"theme-list"},vb={class:"theme-item-content"},mb={class:"colors"},hb={class:"btns"},fb=["onClick"],gb=["onClick"];var yb=(0,i.aZ)({__name:"SlideDesignPanel",setup(e){const t=F(),{availableFonts:l}=(0,o.Jk)($()),{slides:a,currentSlide:n,viewportRatio:r,theme:u}=(0,o.Jk)(t),c=(0,i.Fl)((()=>n.value.background?n.value.background:{type:"solid",value:"#fff"})),{addHistorySnapshot:d}=ra(),{applyPresetThemeToSingleSlide:p,applyPresetThemeToAllSlides:v,applyThemeToAllSlides:m}=Zk(),h=e=>{if("solid"===e){const e={...c.value,type:"solid",color:c.value.color||"#fff"};t.updateSlide({background:e})}else if("image"===e){const e={...c.value,type:"image",image:c.value.image||"",imageSize:c.value.imageSize||"cover"};t.updateSlide({background:e})}else{const e={...c.value,type:"gradient",gradientType:c.value.gradientType||"linear",gradientColor:c.value.gradientColor||["#fff","#fff"],gradientRotate:c.value.gradientRotate||0};t.updateSlide({background:e})}d()},f=e=>{t.updateSlide({background:{...c.value,...e}}),d()},g=e=>{const t=e[0];t&&ta(t).then((e=>f({image:e})))},y=()=>{const e=a.value.map((e=>({...e,background:n.value.background})));t.setSlides(e),d()},w=e=>{t.setTheme(e)},x=e=>{t.setViewportRatio(e)};return(e,t)=>{const a=(0,i.up)("IconPlus");return(0,i.wg)(),(0,i.iD)("div",Ok,[zk,(0,i._)("div",Rk,[(0,i.Wm)(op,{style:{flex:"1"},value:c.value.type,"onUpdate:value":t[0]||(t[0]=e=>h(e)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),Bk,"solid"===c.value.type?((0,i.wg)(),(0,i.j4)(rn,{key:0,trigger:"click",style:{flex:"1"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>f({color:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.color||"#fff"},null,8,["color"])])),_:1})):"image"===c.value.type?((0,i.wg)(),(0,i.j4)(op,{key:1,style:{flex:"1"},value:c.value.imageSize||"cover","onUpdate:value":t[2]||(t[2]=e=>f({imageSize:e})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):((0,i.wg)(),(0,i.j4)(op,{key:2,style:{flex:"1"},value:c.value.gradientType||"","onUpdate:value":t[3]||(t[3]=e=>f({gradientType:e})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),"image"===c.value.type?((0,i.wg)(),(0,i.iD)("div",Pk,[(0,i.Wm)(Oa,{onChange:t[4]||(t[4]=e=>g(e))},{default:(0,i.w5)((()=>[(0,i._)("div",Nk,[(0,i._)("div",{class:"content",style:(0,ae.j5)({backgroundImage:`url(${c.value.image})`})},[(0,i.Wm)(a)],4)])])),_:1})])):(0,i.kq)("",!0),"gradient"===c.value.type?((0,i.wg)(),(0,i.iD)("div",jk,[(0,i._)("div",Yk,[Vk,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.gradientColor[0],"onUpdate:modelValue":t[5]||(t[5]=e=>f({gradientColor:[e,c.value.gradientColor[1]]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.gradientColor[0]},null,8,["color"])])),_:1})]),(0,i._)("div",Jk,[qk,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:c.value.gradientColor[1],"onUpdate:modelValue":t[6]||(t[6]=e=>f({gradientColor:[c.value.gradientColor[0],e]}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:c.value.gradientColor[1]},null,8,["color"])])),_:1})]),"linear"===c.value.gradientType?((0,i.wg)(),(0,i.iD)("div",Xk,[Gk,(0,i.Wm)(Nm,{min:0,max:360,step:15,value:c.value.gradientRotate||0,"onUpdate:value":t[7]||(t[7]=e=>f({gradientRotate:e})),style:{width:"60%"}},null,8,["value"])])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",Kk,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[8]||(t[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用背景到全部")])),_:1})]),(0,i.Wm)(Dc),(0,i._)("div",Qk,[eb,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(r),"onUpdate:value":t[9]||(t[9]=e=>x(e)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678}]},null,8,["value"])]),(0,i.Wm)(Dc),tb,(0,i._)("div",lb,[ab,(0,i.Wm)(op,{style:{width:"60%"},value:(0,s.SU)(u).fontName,"onUpdate:value":t[10]||(t[10]=e=>w({fontName:e})),options:[...(0,s.SU)(l),...(0,s.SU)(E)]},null,8,["value","options"])]),(0,i._)("div",nb,[ob,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).fontColor,"onUpdate:modelValue":t[11]||(t[11]=e=>w({fontColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).fontColor},null,8,["color"])])),_:1})]),(0,i._)("div",ib,[sb,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).backgroundColor,"onUpdate:modelValue":t[12]||(t[12]=e=>w({backgroundColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).backgroundColor},null,8,["color"])])),_:1})]),(0,i._)("div",rb,[ub,(0,i.Wm)(rn,{trigger:"click",style:{width:"60%"}},{content:(0,i.w5)((()=>[(0,i.Wm)(ef,{modelValue:(0,s.SU)(u).themeColor,"onUpdate:modelValue":t[13]||(t[13]=e=>w({themeColor:e}))},null,8,["modelValue"])])),default:(0,i.w5)((()=>[(0,i.Wm)(th,{color:(0,s.SU)(u).themeColor},null,8,["color"])])),_:1})]),(0,i._)("div",cb,[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[14]||(t[14]=e=>(0,s.SU)(m)())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用主题到全部")])),_:1})]),(0,i.Wm)(Dc),db,(0,i._)("div",pb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(Ak),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"theme-item",key:t,style:(0,ae.j5)({backgroundColor:e.background,fontFamily:e.fontname})},[(0,i._)("div",vb,[(0,i._)("div",{class:"text",style:(0,ae.j5)({color:e.fontColor})},"文字 Aa",4),(0,i._)("div",mb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.colors,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"color-block",key:t,style:(0,ae.j5)({backgroundColor:e})},null,4)))),128))]),(0,i._)("div",hb,[(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(p)(e)},"应用",8,fb),(0,i._)("div",{class:"btn",onClick:t=>(0,s.SU)(v)(e)},"应用全局",8,gb)])])],4)))),128))])])}}});const wb=(0,Nl.Z)(yb,[["__scopeId","data-v-5b08a508"]]);var xb=wb;const kb={class:"slide-animation-panel"},bb={class:"animation-pool"},_b=["onClick"],Ib={class:"animation-text"};var Sb=(0,i.aZ)({__name:"SlideAnimationPanel",setup(e){const t=F(),{slides:l,currentSlide:a}=(0,o.Jk)(t),n=(0,i.Fl)((()=>a.value.turningMode||"slideY")),r=mk,{addHistorySnapshot:u}=ra(),c=e=>{e!==n.value&&(t.updateSlide({turningMode:e}),u())},d=()=>{const e=l.value.map((e=>({...e,turningMode:a.value.turningMode})));t.setSlides(e),Kl.success("已应用到全部"),u()};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",kb,[(0,i._)("div",bb,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["animation-item",{active:n.value===e.value}]),key:e.label,onClick:t=>c(e.value)},[(0,i._)("div",{class:(0,ae.C_)(["animation-block",e.value])},null,2),(0,i._)("div",Ib,(0,ae.zw)(e.label),1)],10,_b)))),128))]),(0,i.Wm)(Xd,{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:(0,i.w5)((()=>[(0,i.Uk)("应用到全部")])),_:1})]))}});const Cb=(0,Nl.Z)(Sb,[["__scopeId","data-v-da618e26"]]);var Lb=Cb,Eb=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),i=o=>{const{minX:i,maxX:s,minY:r,maxY:u}=we(l.value),c=JSON.parse(JSON.stringify(a.value.elements)),d={};for(const e of l.value)if(e.groupId&&!d[e.groupId]){const t=l.value.filter((t=>t.groupId===e.groupId));d[e.groupId]=we(t)}if(o===K.LEFT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minX-i;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=i-t}else e.left=i}));else if(o===K.RIGHT)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxX-s;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}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=s-t+l}else e.left=s-t}}));else if(o===K.TOP)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.minY-r;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=r-t}else e.top=r}));else if(o===K.BOTTOM)c.forEach((e=>{if(t.value.includes(e.id))if(e.groupId){const t=d[e.groupId],l=t.maxY-u;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}=ge({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=u-t+l}else e.top=u-t}}));else if(o===K.HORIZONTAL){const e=(i+s)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxX+t.minX)/2,n=a-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(o===K.VERTICAL){const e=(r+u)/2;c.forEach((l=>{if(t.value.includes(l.id))if(l.groupId){const t=d[l.groupId],a=(t.maxY+t.minY)/2,n=a-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:c}),n()};return{alignActiveElement:i}},Tb=()=>{const e=F(),{activeElementIdList:t,activeElementList:l}=(0,o.Jk)($()),{currentSlide:a}=(0,o.Jk)(e),{addHistorySnapshot:n}=ra(),s=(0,i.Fl)((()=>{let e=0;const t=[];for(const a of l.value)a.groupId?t.includes(a.groupId)||(t.push(a.groupId),e+=1):e+=1;return e})),r=()=>{const{minX:o,maxX:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minX:t,maxX:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{const{minY:o,maxY:i}=we(l.value),s=JSON.parse(JSON.stringify(l.value)),r=JSON.parse(JSON.stringify(a.value.elements)),u=[];let c=[];for(const e of s)if(e.groupId){const t=c.find((t=>t.groupId===e.groupId));t?c=c.map((t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t)):c.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=ye(e);u.push({min:t,max:l,el:e})}const d=[];for(const e of c){const{minY:t,maxY:l}=we(e.els);d.push({min:t,max:l,els:e.els})}const p=[...u,...d];p.sort(((e,t)=>e.min-t.min));let v=0;for(const e of p){const t=e.max-e.min;v+=t}const m=(i-o-v)/(p.length-1),h=[],f=p[0];let g={min:f.min,max:f.max};if("el"in f)h.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=ye(e);h.push({pos:t,el:e})}for(let e=1;e{t.value?n(e):o(e)};return(e,n)=>{const o=(0,i.up)("IconAlignLeft"),p=(0,i.up)("IconAlignHorizontally"),v=(0,i.up)("IconAlignRight"),m=(0,i.up)("IconAlignTop"),h=(0,i.up)("IconAlignVertically"),f=(0,i.up)("IconAlignBottom"),g=(0,i.up)("IconGroup"),y=(0,i.up)("IconUngroup"),w=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Mb,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[0]||(n[0]=e=>d((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1})),[[w,"左对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[1]||(n[1]=e=>d((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(p)])),_:1})),[[w,"水平居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[2]||(n[2]=e=>d((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(v)])),_:1})),[[w,"右对齐"]])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[3]||(n[3]=e=>d((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(m)])),_:1})),[[w,"上对齐"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[4]||(n[4]=e=>d((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(h)])),_:1})),[[w,"垂直居中"]]),(0,i.wy)(((0,i.wg)(),(0,i.j4)(Xd,{style:{flex:"1"},onClick:n[5]||(n[5]=e=>d((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1})),[[w,"下对齐"]])])),_:1}),(0,s.SU)(r)>2?((0,i.wg)(),(0,i.j4)(qf,{key:0,class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:n[6]||(n[6]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Uk)("水平均匀分布")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:n[7]||(n[7]=e=>(0,s.SU)(c)())},{default:(0,i.w5)((()=>[(0,i.Uk)("垂直均匀分布")])),_:1})])),_:1})):(0,i.kq)("",!0),(0,i.Wm)(Dc),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{disabled:!(0,s.SU)(t),onClick:n[8]||(n[8]=e=>(0,s.SU)(l)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(g,{style:{"margin-right":"3px"}}),(0,i.Uk)("组合")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{disabled:(0,s.SU)(t),onClick:n[9]||(n[9]=e=>(0,s.SU)(a)()),style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{style:{"margin-right":"3px"}}),(0,i.Uk)("取消组合")])),_:1},8,["disabled"])])),_:1})])}}});const Wb=(0,Nl.Z)(Ub,[["__scopeId","data-v-e95a4c6c"]]);var Db=Wb;const Hb=[{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:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],Fb={class:"symbol-panel"},Ab={class:"pool"},Zb=["onClick"],$b={class:"symbol"};var Ob=(0,i.aZ)({__name:"SymbolPanel",setup(e){const t=(0,s.iH)(Hb[0].key),l=(0,i.Fl)((()=>{const e=Hb.find((e=>e.key===t.value));return e?.children||[]})),a=Hb.map((e=>({key:e.key,label:e.label}))),n=e=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>((0,i.wg)(),(0,i.iD)("div",Fb,[(0,i.Wm)(Vd,{tabs:(0,s.SU)(a),value:t.value,"onUpdate:value":o[0]||(o[0]=e=>t.value=e),tabsStyle:{marginBottom:"8px"},spaceBetween:""},null,8,["tabs","value"]),(0,i._)("div",Ab,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(l.value,((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"symbol-item",key:t,onClick:t=>n(e)},[(0,i._)("div",$b,(0,ae.zw)(e),1)],8,Zb)))),128))])]))}});const zb=(0,Nl.Z)(Ob,[["__scopeId","data-v-2bb5f257"]]);var Rb=zb;const Bb={class:"toolbar"},Pb={class:"content"};var Nb=(0,i.aZ)({__name:"index",setup(e){const t=$(),{activeElementIdList:l,handleElement:n,toolbarState:r}=(0,o.Jk)(t),u=(0,i.Fl)((()=>"text"===n.value?.type?[{label:"样式",key:a.EL_STYLE},{label:"符号",key:a.SYMBOL},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}]:[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.EL_POSITION},{label:"动画",key:a.EL_ANIMATION}])),c=[{label:"设计",key:a.SLIDE_DESIGN},{label:"切换",key:a.SLIDE_ANIMATION},{label:"动画",key:a.EL_ANIMATION}],d=[{label:"样式",key:a.EL_STYLE},{label:"位置",key:a.MULTI_POSITION}],p=e=>{t.setToolbarState(e)},v=(0,i.Fl)((()=>l.value.length?l.value.length>1?d:u.value:c));(0,i.YP)(v,(()=>{const e=v.value.map((e=>e.key));e.includes(r.value)||t.setToolbarState(e[0])}));const m=(0,i.Fl)((()=>{const e={[a.EL_STYLE]:Jx,[a.EL_POSITION]:sk,[a.EL_ANIMATION]:Fk,[a.SLIDE_DESIGN]:xb,[a.SLIDE_ANIMATION]:Lb,[a.MULTI_POSITION]:Db,[a.SYMBOL]:Rb};return e[r.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Bb,[(0,i.Wm)(Vd,{tabs:v.value,value:(0,s.SU)(r),card:"","onUpdate:value":t[0]||(t[0]=e=>p(e))},null,8,["tabs","value"]),(0,i._)("div",Pb,[((0,i.wg)(),(0,i.j4)((0,i.LL)(m.value)))])]))}});const jb=(0,Nl.Z)(Nb,[["__scopeId","data-v-6c9ece83"]]);var Yb=jb;const Vb={class:"remark"},Jb=["value"];var qb=(0,i.aZ)({__name:"index",props:{height:{}},emits:["update:height"],setup(e,{emit:t}){const l=e,a=F(),{currentSlide:n}=(0,o.Jk)(a),s=(0,i.Fl)((()=>n.value?.remark||"")),r=e=>{const t=e.target.value;a.updateSlide({remark:t})},u=e=>{let a=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!a)return;const l=e.pageY,i=l-n;let s=-i+o;s<40&&(s=40),s>120&&(s=120),t("update:height",s)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",Vb,[(0,i._)("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>u(e))},null,32),(0,i._)("textarea",{value:s.value,placeholder:"点击输入演讲者备注",onInput:t[1]||(t[1]=e=>r(e))},null,40,Jb)]))}});const Xb=(0,Nl.Z)(qb,[["__scopeId","data-v-2f77a2f6"]]);var Gb=Xb,Kb=l(3162),Qb=l(3907);const e_=["style","script","template"],t_=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],l_={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},a_=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n_=(e,t)=>{const l=t-e.position;o_(e,l)},o_=(e,t)=>{e.position=e.position+t},i_=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const a=e.charAt(l+1);if("/"===a||"!"===a||/[A-Za-z0-9]/.test(a))return l;t=l+1}return-1},s_=e=>{const{str:t}=e;let l=i_(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const a=t.slice(e.position,l);n_(e,l),e.tokens.push({type:"text",content:a})},r_=e=>{const{str:t}=e;o_(e,4);let l=t.indexOf("--\x3e",e.position),a=l+3;-1===l&&(l=a=t.length);const n=t.slice(e.position,l);n_(e,a),e.tokens.push({type:"comment",content:n})},u_=e=>{const{str:t}=e,l=t.length;let a=e.position;while(a"===e);if(l)break;a++}let n=a+1;while(n"===e);if(!l)break;n++}n_(e,n);const o=t.slice(a,n);return e.tokens.push({type:"tag",content:o}),o},c_=e=>{const{str:t,tokens:l}=e;let a=e.position,n=null,o=a;const i=[],s=t.length;while(a"===e;if(l){a!==o&&i.push(t.slice(o,a));break}const s=/\s/.test(e);if(s){a!==o&&i.push(t.slice(o,a)),o=a+1,a++;continue}const r="'"===e||'"'===e;r?(n=e,a++):a++}n_(e,a);const r="attribute";for(let u=0;u1){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=i[u+2];if(u+=1,a){const t=e+"="+a;l.push({type:r,content:t}),u+=1;continue}}}if((0,U.endsWith)(e,"=")){const t=i[u+1];if(t&&-1===t.indexOf("=")){const a=e+t;l.push({type:r,content:a}),u+=1;continue}const a=e.slice(0,-1);l.push({type:r,content:a})}else l.push({type:r,content:e})}},d_=(e,t)=>{const{str:l,tokens:a}=t,n=e.toLowerCase(),o=l.length;let i=t.position;while(i{const{str:t}=e,l=t.charAt(e.position+1),a="/"===l;o_(e,a?2:1),e.tokens.push({type:"tag-start",close:a});const n=u_(e);c_(e);const o=t.charAt(e.position),i="/"===o;return o_(e,i?2:1),e.tokens.push({type:"tag-end",close:i}),n},v_=e=>{const t=e.str,l=t.length;while(e.position{const t={str:e,position:0,tokens:[]};return v_(t),t.tokens},h_=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return y_(l),t.children},f_=(e,t)=>{const l=l_[e];if(l){let a=t.length-1;while(a>=0){const n=t[a].tagName;if(n===e)break;if(n&&l.includes(n))return!0;a--}}return!1},g_=(e,t)=>{e.splice(t)},y_=e=>{const{stack:t,tokens:l}=e;let{cursor:a}=e,n=t[t.length-1].children;const o=l.length;while(a-1)if(t[e].tagName===s){n=!0;break}while(a0){if(s===t[e].tagName){g_(t,e);const l=e-1;n=t[l].children;break}e-=1}}const c=[];let d;while(a{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},x_=e=>{const t=e.charAt(0),l=e.length-1,a='"'===t||"'"===t;return a&&t===e.charAt(l)?e.slice(1,l):e},k_=e=>e.map((e=>{const t=w_(e.trim(),"="),l=t[0],a="string"===typeof t[1]?x_(t[1]):null;return{key:l,value:a}})),b_=e=>e.map((e=>{if("element"===e.type){const t=b_(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:k_(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t})),__=e=>{const t=m_(e),l=h_(t);return b_(l)};var I_=l(5851),S_=l(7943);const C_={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},L_=e=>{const t=new I_.OU(e),l=[];for(const a of t.commands){const e=C_[a.type];if(2!==a.type&&16!==a.type||l.push({x:a.x,y:a.y,relative:a.relative,type:e}),32===a.type)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:a.relative,type:e});else if(128===a.type)l.push({x:a.x,y:a.y,curve:{type:"quadratic",x1:a.x1,y1:a.y1},relative:a.relative,type:e});else if(512===a.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=(0,S_.Z)({px:e.x,py:e.y,cx:a.x,cy:a.y,rx:a.rX,ry:a.rY,xAxisRotation:a.xRot,largeArcFlag:a.lArcFlag,sweepFlag:a.sweepFlag});for(const a of t)l.push({x:a.x,y:a.y,curve:{type:"cubic",x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},relative:!1,type:"C"})}else{if(1!==a.type)continue;l.push({close:!0,type:e})}}return l},E_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",T_="data:image/svg+xml;base64,",M_=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},U_=e=>{let t,l,a,n,o,i,s,r="",u=0;e=M_(e);while(u>2,o=(3&t)<<4|l>>4,i=(15&l)<<2|a>>6,s=63&a,isNaN(l)?i=s=64:isNaN(a)&&(s=64),r=r+E_.charAt(n)+E_.charAt(o)+E_.charAt(i)+E_.charAt(s);return r},W_=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return T_+U_(l)},D_=100,H_=.75;var F_=()=>{const e=F(),{slides:t,theme:l,viewportRatio:a,title:n}=(0,o.Jk)(e),i=(0,s.iH)(!1),r=(e,t,l,a=!0)=>{i.value=!0;const o="png"===t?lh.YM:lh.hi,s=e.querySelectorAll("foreignObject [xmlns]");s.forEach((e=>e.removeAttribute("xmlns"))),setTimeout((()=>{const s={quality:l,width:1600};a&&(s.fontEmbedCSS=""),o(e,s).then((e=>{i.value=!1,(0,Kb.saveAs)(e,`${n.value}.${t}`)})).catch((()=>{i.value=!1,Kl.error("导出图片失败")}))}),200)},u=e=>{const t=new Blob([ce(JSON.stringify(e))],{type:""});(0,Kb.saveAs)(t,`${n.value}.pptist`)},c=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});(0,Kb.saveAs)(e,`${n.value}.json`)},d=e=>{const t=(0,M.Z)(e),l=t.getAlpha(),a=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:a}},p=e=>{const t=__(e);let l=!1,a=0;const n=[],o=(e,t={})=>{for(const i of e){const e="tagName"in i&&["div","li","p"].includes(i.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const s={...t},r="attributes"in i?i.attributes.find((e=>"style"===e.key)):null;if(r&&r.value){const e=r.value.split(";");for(const t of e){const[e,l]=t.split(": "),[a,n]=[(0,U.trim)(e),(0,U.trim)(l)];a&&n&&(s[a]=n)}}if("tagName"in i){if("em"===i.tagName&&(s["font-style"]="italic"),"strong"===i.tagName&&(s["font-weight"]="bold"),"sup"===i.tagName&&(s["vertical-align"]="super"),"sub"===i.tagName&&(s["vertical-align"]="sub"),"a"===i.tagName){const e=i.attributes.find((e=>"href"===e.key));s["href"]=e?.value||""}if("ul"===i.tagName&&(s["list-type"]="ul"),"ol"===i.tagName&&(s["list-type"]="ol"),"li"===i.tagName&&(l=!0),"p"===i.tagName&&"attributes"in i){const e=i.attributes.find((e=>"data-indent"===e.key));e&&e.value&&(a=+e.value)}}if("tagName"in i&&"br"===i.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in i){const e=i.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),t={};s["font-size"]&&(t.fontSize=parseInt(s["font-size"])*H_),s["color"]&&(t.color=d(s["color"]).color),s["background-color"]&&(t.highlight=d(s["background-color"]).color),s["text-decoration-line"]&&(-1!==s["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),s["text-decoration"]&&(-1!==s["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==s["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),s["vertical-align"]&&("super"===s["vertical-align"]&&(t.superscript=!0),"sub"===s["vertical-align"]&&(t.subscript=!0)),s["text-align"]&&(t.align=s["text-align"]),s["font-weight"]&&(t.bold="bold"===s["font-weight"]),s["font-style"]&&(t.italic="italic"===s["font-style"]),s["font-family"]&&(t.fontFace=s["font-family"]),s["href"]&&(t.hyperlink={url:s["href"]}),l&&"ol"===s["list-type"]&&(t.bullet={type:"number",indent:20*H_},t.paraSpaceBefore=.1,l=!1),l&&"ul"===s["list-type"]&&(t.bullet={indent:20*H_},t.paraSpaceBefore=.1,l=!1),a&&(t.indentLevel=a,a=0),n.push({text:e,options:t})}else"children"in i&&o(i.children,s)}};return o(t),n},v=(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/D_*t.x,y:e.y/D_*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/D_*t.x,y:e.y/D_*t.y,curve:{type:"cubic",x1:e.curve.x1/D_*t.x,y1:e.curve.y1/D_*t.y,x2:e.curve.x2/D_*t.x,y2:e.curve.y2/D_*t.y}};if("quadratic"===e.curve.type)return{x:e.x/D_*t.x,y:e.y/D_*t.y,curve:{type:"quadratic",x1:e.curve.x1/D_*t.x,y1:e.curve.y1/D_*t.y}}}return{x:e.x/D_*t.x,y:e.y/D_*t.y}})),m=e=>{const t=d(e.color),{h:l,v:a}=e;let n=4,o=45;return 0===l&&0===a?(n=4,o=45):0===l?a>0?(n=a,o=90):(n=-a,o=270):0===a?l>0?(n=l,o=1):(n=-l,o=180):l>0&&a>0?(n=Math.max(l,a),o=45):l>0&&a<0?(n=Math.max(l,-a),o=315):l<0&&a>0?(n=Math.max(-l,a),o=135):l<0&&a<0&&(n=Math.max(-l,-a),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*H_,offset:n,angle:o}},h=e=>{const t=d(e?.color||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*H_,dashType:"solid"===e.style?"solid":"dash"}},f=e=>{const{type:l,target:a}=e;if("web"===l)return{url:a};if("slide"===l){const e=t.value.findIndex((e=>e.id===a));if(-1!==e)return{slide:e+1}}return null},g=(e,t,o)=>{i.value=!0;const s=new Qb.Z;if(.625===a.value?s.layout="LAYOUT_16x10":.75===a.value?s.layout="LAYOUT_4x3":.70710678===a.value?(s.defineLayout({name:"A3",width:10,height:7.0710678}),s.layout="A3"):s.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=d(l.value.backgroundColor);s.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=s.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,a]=t.gradientColor,n=M.Z.mix(l,a).toHexString(),o=d(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){const l=p(t.content),a={x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_,fontSize:20*H_,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*H_,paraSpaceBefore:5*H_,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(a.rotate=t.rotate),t.wordSpace&&(a.charSpacing=t.wordSpace*H_),t.lineHeight&&(a.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=d(t.fill),l=void 0===t.opacity?1:t.opacity;a.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(a.color=d(t.defaultColor).color),t.defaultFontName&&(a.fontFace=t.defaultFontName),t.shadow&&(a.shadow=m(t.shadow)),t.outline?.width&&(a.line=h(t.outline)),void 0!==t.opacity&&(a.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(a.paraSpaceBefore=t.paragraphSpace*H_),t.vertical&&(a.vert="eaVert"),e.addText(l,a)}else if("image"===t.type){const l={path:t.src,x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=f(t.link);e&&(l.hyperlink=e)}if(t.filters?.opacity&&(l.transparency=100-parseInt(t.filters?.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,a]=t.clip.range,[n,o]=e,[i,s]=a,r=t.width/((i-n)/D_),u=t.height/((s-o)/D_);l.w=r/D_,l.h=u/D_,l.sizing={type:"crop",x:n/D_*r/D_,y:o/D_*u/D_,w:(i-n)/D_*r/D_,h:(s-o)/D_*u/D_}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=W_(l),n={data:a,x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},a=v(L_(t.path),l),n=d(t.fill),o=void 0===t.opacity?1:t.opacity,i={x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:a};if(t.flipH&&(i.flipH=t.flipH),t.flipV&&(i.flipV=t.flipV),t.shadow&&(i.shadow=m(t.shadow)),t.outline?.width&&(i.line=h(t.outline)),t.rotate&&(i.rotate=t.rotate),t.link){const e=f(t.link);e&&(i.hyperlink=e)}e.addShape("custGeom",i)}if(t.text){const l=p(t.text.content),a={x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_,fontSize:20*H_,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*H_,valign:t.text.align};t.rotate&&(a.rotate=t.rotate),t.text.defaultColor&&(a.color=d(t.text.defaultColor).color),t.text.defaultFontName&&(a.fontFace=t.text.defaultFontName),e.addText(l,a)}}else if("line"===t.type){const l=Ie(t),a=v(L_(l)),{minX:n,maxX:o,minY:i,maxY:s}=ye(t),r=d(t.color),u={x:t.left/D_,y:t.top/D_,w:(o-n)/D_,h:(s-i)/D_,line:{color:r.color,transparency:100*(1-r.alpha),width:t.width*H_,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:a};t.shadow&&(u.shadow=m(t.shadow)),e.addShape("custGeom",u)}else if("chart"===t.type){const l=[];for(let e=0;ed(e).color));else if(1===t.themeColor.length)a=(0,M.Z)(t.themeColor[0]).analogous(10).map((e=>d(e.toHexString()).color));else{const e=t.themeColor.length,l=(0,M.Z)(t.themeColor[e-1]).analogous(11-e).map((e=>e.toHexString()));a=[...t.themeColor.slice(0,e-1),...l].map((e=>d(e).color))}const n={x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_,chartColors:"pie"===t.chartType?a:a.slice(0,t.data.series.length)};t.fill&&(n.plotArea={fill:{color:d(t.fill).color}}),t.legend&&(n.showLegend=!0,n.legendPos="top"===t.legend?"t":"b",n.legendColor=d(t.gridColor||"#000000").color,n.legendFontSize=14*H_);let o=s.ChartType.bar;"bar"===t.chartType?(o=s.ChartType.bar,n.barDir=t.options?.horizontalBars?"bar":"col"):"line"===t.chartType?(t.options?.showArea?o=s.ChartType.area:!1===t.options?.showLine?(o=s.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map(((e,t)=>t))}),n.lineSize=0):o=s.ChartType.line,t.options?.lineSmooth&&(n.lineSmooth=!0)):"pie"===t.chartType&&(t.options?.donut?(o=s.ChartType.doughnut,n.holeSize=75):o=s.ChartType.pie),e.addChart(o,l,n)}else if("table"===t.type){const l=[];for(let e=0;e1||n.rowspan>1)for(let a=e;ad(e))));for(let e=0;et.width*e/D_))};t.theme&&(s.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(s.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*H_,color:d(t.outline.color).color}),e.addTable(a,s)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),a=W_(l),n={data:a,x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_};if(t.link){const e=f(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else if(!o&&("video"===t.type||"audio"===t.type)){const l={x:t.left/D_,y:t.top/D_,w:t.width/D_,h:t.height/D_,path:t.src,type:t.type};"video"===t.type&&t.poster&&(l.cover=t.poster);const a=t.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);a&&a[1]?l.extn=a[1]:t.ext&&(l.extn=t.ext);const n=["avi","mp4","m4v","mov","wmv"],o=["mp3","m4a","mp4","wav","wma"];l.extn&&[...n,...o].includes(l.extn)&&e.addMedia(l)}}setTimeout((()=>{s.writeFile({fileName:`${n.value}.pptx`}).then((()=>i.value=!1)).catch((()=>{i.value=!1,Kl.error("导出失败")}))}),200)};return{exporting:i,exportImage:r,exportJSON:c,exportSpecificFile:u,exportPPTX:g}};const A_=e=>((0,i.dD)("data-v-1df3f398"),e=e(),(0,i.Cn)(),e),Z_={class:"export-img-dialog"},$_={class:"thumbnails-view"},O_={class:"configs"},z_={class:"row"},R_=A_((()=>(0,i._)("div",{class:"title"},"导出格式:",-1))),B_={class:"row"},P_=A_((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),N_={key:0,class:"row"},j_=["data-range"],Y_={class:"row"},V_=A_((()=>(0,i._)("div",{class:"title"},"图片质量:",-1))),J_={class:"row"},q_=A_((()=>(0,i._)("div",{class:"title"},"忽略在线字体:",-1))),X_={class:"config-item"},G_={class:"btns"};var K_=(0,i.aZ)({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,s.iH)(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,s.iH)("jpeg"),d=(0,s.iH)(1),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1})))),{exportImage:m,exporting:h}=F_(),f=()=>{n.value&&m(n.value,c.value,d.value,p.value)};return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",Z_,[(0,i._)("div",$_,[(0,i._)("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:n},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,(e=>((0,i.wg)(),(0,i.j4)(Pd,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"])))),128))],512)]),(0,i._)("div",O_,[(0,i._)("div",z_,[R_,(0,i.Wm)(tg,{class:"config-item",value:c.value,"onUpdate:value":a[0]||(a[0]=e=>c.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"50%"},value:"jpeg"},{default:(0,i.w5)((()=>[(0,i.Uk)("JPEG")])),_:1}),(0,i.Wm)(Kf,{style:{width:"50%"},value:"png"},{default:(0,i.w5)((()=>[(0,i.Uk)("PNG")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",B_,[P_,(0,i.Wm)(tg,{class:"config-item",value:r.value,"onUpdate:value":a[1]||(a[1]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",N_,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,j_),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[2]||(a[2]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",Y_,[V_,(0,i.Wm)(Nm,{class:"config-item",min:0,max:1,step:.1,value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])]),(0,i._)("div",J_,[q_,(0,i._)("div",X_,[(0,i.wy)((0,i.Wm)(sf,{value:p.value,"onUpdate:value":a[4]||(a[4]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),(0,i._)("div",G_,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[5]||(a[5]=e=>f())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出图片")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[6]||(a[6]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(h),tip:"正在导出..."},null,8,["loading"])])}}});const Q_=(0,Nl.Z)(K_,[["__scopeId","data-v-1df3f398"]]);var eI=Q_;const tI={class:"export-json-dialog"},lI={class:"preview"},aI={class:"btns"};var nI=(0,i.aZ)({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=(0,o.Jk)(F()),{exportJSON:a}=F_();return(e,n)=>((0,i.wg)(),(0,i.iD)("div",tI,[(0,i._)("div",lI,[(0,i._)("pre",null,(0,ae.zw)((0,s.SU)(l)),1)]),(0,i._)("div",aI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:n[0]||(n[0]=e=>(0,s.SU)(a)())},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 JSON")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:n[1]||(n[1]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const oI=(0,Nl.Z)(nI,[["__scopeId","data-v-6a7223ca"]]);var iI=oI;const sI=()=>{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},rI=(e,t,l)=>{const a="";let n="";const o=document.styleSheets;if(o)for(const d of o)if(d.cssRules)for(const e of d.cssRules)n+=e.cssText;const{width:i,height:s,margin:r}=l,u=`\n \n \n \n `,c=""+t.innerHTML+"";e.open(),e.write(`\n ${a}\n \n ${u}\n ${c}\n \n `),e.close()},uI=(e,t)=>{const l=sI(),a=l.contentWindow;if(!l.contentDocument||!a)return;rI(l.contentDocument,e,t);const n=()=>{a.focus(),a.print()},o=()=>{l.removeEventListener("load",n),a.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),a.addEventListener("afterprint",o)},cI=e=>((0,i.dD)("data-v-1668f898"),e=e(),(0,i.Cn)(),e),dI={class:"export-pdf-dialog"},pI={class:"thumbnails-view"},vI={class:"configs"},mI={class:"row"},hI=cI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),fI={class:"row"},gI=cI((()=>(0,i._)("div",{class:"title"},"每页数量:",-1))),yI={class:"row"},wI=cI((()=>(0,i._)("div",{class:"title"},"边缘留白:",-1))),xI={class:"config-item"},kI=cI((()=>(0,i._)("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))),bI={class:"btns"};var _I=(0,i.aZ)({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a,viewportRatio:n}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("all"),c=(0,s.iH)(1),d=(0,s.iH)(!0),p=()=>{if(!r.value)return;const e={width:1600,height:"all"===u.value?1600*n.value*c.value:1600*n.value,margin:d.value?50:0};uI(r.value,e)};return(e,n)=>((0,i.wg)(),(0,i.iD)("div",dI,[(0,i._)("div",pI,[(0,i._)("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:r},["current"===u.value?((0,i.wg)(),(0,i.j4)(Pd,{key:0,class:"thumbnail",slide:(0,s.SU)(a),size:1600},null,8,["slide"])):((0,i.wg)(!0),(0,i.iD)(i.HY,{key:1},(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.j4)(Pd,{class:(0,ae.C_)(["thumbnail",{"break-page":(t+1)%c.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"])))),128))],512)]),(0,i._)("div",vI,[(0,i._)("div",mI,[hI,(0,i.Wm)(tg,{class:"config-item",value:u.value,"onUpdate:value":n[0]||(n[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"50%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"50%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1})])),_:1},8,["value"])]),(0,i._)("div",fI,[gI,(0,i.Wm)(op,{class:"config-item",value:c.value,"onUpdate:value":n[1]||(n[1]=e=>c.value=e),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),(0,i._)("div",yI,[wI,(0,i._)("div",xI,[(0,i.Wm)(sf,{value:d.value,"onUpdate:value":n[2]||(n[2]=e=>d.value=e)},null,8,["value"])])]),kI]),(0,i._)("div",bI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:n[3]||(n[3]=e=>p())},{default:(0,i.w5)((()=>[(0,i.Uk)("打印 / 导出 PDF")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:n[4]||(n[4]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const II=(0,Nl.Z)(_I,[["__scopeId","data-v-1668f898"]]);var SI=II;const CI=e=>((0,i.dD)("data-v-265d4b60"),e=e(),(0,i.Cn)(),e),LI={class:"export-pptx-dialog"},EI={class:"configs"},TI={class:"row"},MI=CI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),UI={key:0,class:"row"},WI=["data-range"],DI={class:"row"},HI=CI((()=>(0,i._)("div",{class:"title"},"忽略音频/视频:",-1))),FI={class:"config-item"},AI={class:"row"},ZI=CI((()=>(0,i._)("div",{class:"title"},"覆盖默认母版:",-1))),$I={class:"config-item"},OI={key:1,class:"tip"},zI={class:"btns"};var RI=(0,i.aZ)({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportPPTX:n,exporting:r}=F_(),u=(0,s.iH)("all"),c=(0,s.iH)([1,l.value.length]),d=(0,s.iH)(!0),p=(0,s.iH)(!0),v=(0,i.Fl)((()=>"all"===u.value?l.value:"current"===u.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=c.value;return t>=l-1&&t<=a-1}))));return(e,a)=>{const o=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",LI,[(0,i._)("div",EI,[(0,i._)("div",TI,[MI,(0,i.Wm)(tg,{class:"config-item",value:u.value,"onUpdate:value":a[0]||(a[0]=e=>u.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===u.value?((0,i.wg)(),(0,i.iD)("div",UI,[(0,i._)("div",{class:"title","data-range":`(${c.value[0]} ~ ${c.value[1]})`},"自定义范围:",8,WI),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:c.value,"onUpdate:value":a[1]||(a[1]=e=>c.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),(0,i._)("div",DI,[HI,(0,i._)("div",FI,[(0,i.wy)((0,i.Wm)(sf,{value:p.value,"onUpdate:value":a[2]||(a[2]=e=>p.value=e)},null,8,["value"]),[[o,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),(0,i._)("div",AI,[ZI,(0,i._)("div",$I,[(0,i.Wm)(sf,{value:d.value,"onUpdate:value":a[3]||(a[3]=e=>d.value=e)},null,8,["value"])])]),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",OI," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),(0,i._)("div",zI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[4]||(a[4]=e=>(0,s.SU)(n)(v.value,d.value,p.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 PPTX")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[5]||(a[5]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})]),(0,i.Wm)(Va,{loading:(0,s.SU)(r),tip:"正在导出..."},null,8,["loading"])])}}});const BI=(0,Nl.Z)(RI,[["__scopeId","data-v-265d4b60"]]);var PI=BI;const NI=e=>((0,i.dD)("data-v-26422ed7"),e=e(),(0,i.Cn)(),e),jI={class:"export-pptist-dialog"},YI={class:"configs"},VI={class:"row"},JI=NI((()=>(0,i._)("div",{class:"title"},"导出范围:",-1))),qI={key:0,class:"row"},XI=["data-range"],GI=NI((()=>(0,i._)("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))),KI={class:"btns"};var QI=(0,i.aZ)({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{slides:l,currentSlide:a}=(0,o.Jk)(F()),{exportSpecificFile:n}=F_(),r=(0,s.iH)("all"),u=(0,s.iH)([1,l.value.length]),c=(0,i.Fl)((()=>"all"===r.value?l.value:"current"===r.value?[a.value]:l.value.filter(((e,t)=>{const[l,a]=u.value;return t>=l-1&&t<=a-1}))));return(e,a)=>((0,i.wg)(),(0,i.iD)("div",jI,[(0,i._)("div",YI,[(0,i._)("div",VI,[JI,(0,i.Wm)(tg,{class:"config-item",value:r.value,"onUpdate:value":a[0]||(a[0]=e=>r.value=e)},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"all"},{default:(0,i.w5)((()=>[(0,i.Uk)("全部")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"current"},{default:(0,i.w5)((()=>[(0,i.Uk)("当前页")])),_:1}),(0,i.Wm)(Kf,{style:{width:"33.33%"},value:"custom"},{default:(0,i.w5)((()=>[(0,i.Uk)("自定义")])),_:1})])),_:1},8,["value"])]),"custom"===r.value?((0,i.wg)(),(0,i.iD)("div",qI,[(0,i._)("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,XI),(0,i.Wm)(Nm,{class:"config-item",range:"",min:1,max:(0,s.SU)(l).length,step:1,value:u.value,"onUpdate:value":a[1]||(a[1]=e=>u.value=e)},null,8,["max","value"])])):(0,i.kq)("",!0),GI]),(0,i._)("div",KI,[(0,i.Wm)(Xd,{class:"btn export",type:"primary",onClick:a[2]||(a[2]=e=>(0,s.SU)(n)(c.value))},{default:(0,i.w5)((()=>[(0,i.Uk)("导出 .pptist 文件")])),_:1}),(0,i.Wm)(Xd,{class:"btn close",onClick:a[3]||(a[3]=e=>t("close"))},{default:(0,i.w5)((()=>[(0,i.Uk)("关闭")])),_:1})])]))}});const eS=(0,Nl.Z)(QI,[["__scopeId","data-v-26422ed7"]]);var tS=eS;const lS={class:"export-dialog"},aS={class:"content"};var nS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l}=(0,o.Jk)(t),a=t.setDialogForExport,n=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=(0,i.Fl)((()=>{const e={image:eI,json:iI,pdf:SI,pptx:PI,pptist:tS};return l.value&&e[l.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",lS,[(0,i.Wm)(Vd,{tabs:n,value:(0,s.SU)(l),card:"","onUpdate:value":t[0]||(t[0]=e=>(0,s.SU)(a)(e))},null,8,["value"]),(0,i._)("div",aS,[((0,i.wg)(),(0,i.j4)((0,i.LL)(r.value),{onClose:t[1]||(t[1]=e=>(0,s.SU)(a)(""))},null,32))])]))}});const oS=(0,Nl.Z)(nS,[["__scopeId","data-v-b20137f0"]]);var iS=oS;const sS={class:"title"},rS={class:"content"};var uS=(0,i.aZ)({__name:"MoveablePanel",props:{width:{},height:{},left:{default:10},top:{default:10},title:{default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,a=(0,s.iH)(0),n=(0,s.iH)(0),o=(0,s.iH)(),r=(0,i.Fl)((()=>l.height?l.height:o.value?.clientHeight||0));(0,i.bv)((()=>{l.left>=0?a.value=l.left:a.value=document.body.clientWidth+l.left-l.width,l.top>=0?n.value=l.top:n.value=document.body.clientHeight+l.top-r.value}));const u=e=>{if(!l.moveable)return;let t=!0;const o=document.body.clientWidth,i=document.body.clientHeight,s=e.pageX,u=e.pageY,c=a.value,d=n.value;document.onmousemove=e=>{if(!t)return;const p=e.pageX-s,v=e.pageY-u;let m=c+p,h=d+v;m<0&&(m=0),h<0&&(h=0),m+l.width>o&&(m=o-l.width),h+r.value>i&&(h=i-r.value),a.value=m,n.value=h},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(e,l)=>{const s=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.iD)("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:o,style:(0,ae.j5)({width:e.width+"px",height:e.height?e.height+"px":"auto",left:a.value+"px",top:n.value+"px"})},[e.title?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",{class:"header",onMousedown:l[1]||(l[1]=e=>u(e))},[(0,i._)("div",sS,(0,ae.zw)(e.title),1),(0,i._)("div",{class:"close-btn",onClick:l[0]||(l[0]=e=>t("close"))},[(0,i.Wm)(s)])],32),(0,i._)("div",rS,[(0,i.WI)(e.$slots,"default")])],64)):((0,i.wg)(),(0,i.iD)("div",{key:1,class:"content",onMousedown:l[2]||(l[2]=e=>u(e))},[(0,i.WI)(e.$slots,"default")],32))],4)}}});const cS=(0,Nl.Z)(uS,[["__scopeId","data-v-fc791e00"]]);var dS=cS;const pS=e=>((0,i.dD)("data-v-15470598"),e=e(),(0,i.Cn)(),e),vS={key:0,class:"handler"},mS={class:"btns"},hS={key:0,class:"icon-btns"},fS={class:"element-list"},gS={key:0,class:"group-els"},yS=pS((()=>(0,i._)("div",{class:"group-title"},"组合",-1))),wS=["onClick","onDblclick"],xS=["id","value","onBlur","onKeydown"],kS={key:1,class:"name"},bS={class:"icons"},_S=["onClick","onDblclick"],IS=["id","value","onBlur","onKeydown"],SS={key:1,class:"name"},CS={class:"icons"};var LS=(0,i.aZ)({__name:"SelectPanel",setup(e){const t=F(),l=$(),{currentSlide:a}=(0,o.Jk)(t),{handleElement:r,handleElementId:u,activeElementIdList:c,activeGroupElementId:d,hiddenElementIdList:p}=(0,o.Jk)(l),{orderElement:v}=wa(),m=(0,i.Fl)((()=>{const e=[];for(const t of a.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e})),h=(e,t)=>{if(u.value===t)return;if(p.value.includes(t))return;const a=e.elements.map((e=>e.id));l.setActiveElementIdList(a),l.setHandleElementId(t),(0,i.Y3)((()=>l.setActiveGroupElementId(t)))},f=e=>{u.value!==e&&(p.value.includes(e)||l.setActiveElementIdList([e]))},g=e=>{p.value.includes(e)?l.setHiddenElementIdList(p.value.filter((t=>t!==e))):l.setHiddenElementIdList([...p.value,e]),c.value.includes(e)&&l.setActiveElementIdList([])},y=()=>{const e=a.value.elements.map((e=>e.id)),t=p.value.filter((t=>!e.includes(t)));l.setHiddenElementIdList(t)},w=()=>{const e=a.value.elements.map((e=>e.id));l.setHiddenElementIdList([...p.value,...e]),c.value.length&&l.setActiveElementIdList([])},x=(0,s.iH)(""),k=(e,l)=>{const a=e.target.value;t.updateElement({id:l,props:{name:a}}),x.value=""},b=e=>{x.value=e,(0,i.Y3)((()=>{const t=document.querySelector(`#input-${e}`);t.focus()}))},_=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=(0,i.up)("IconDown"),o=(0,i.up)("IconUp"),u=(0,i.up)("IconPreviewClose"),I=(0,i.up)("IconPreviewOpen");return(0,i.wg)(),(0,i.j4)(dS,{class:"select-panel",width:200,height:360,title:`选择(${(0,s.SU)(c).length}/${(0,s.SU)(a).elements.length})`,left:-270,top:90,onClose:t[4]||(t[4]=e=>_())},{default:(0,i.w5)((()=>[m.value.length?((0,i.wg)(),(0,i.iD)("div",vS,[(0,i._)("div",mS,[(0,i.Wm)(Xd,{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部显示")])),_:1}),(0,i.Wm)(Xd,{size:"small",onClick:t[1]||(t[1]=e=>w())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部隐藏")])),_:1})]),(0,s.SU)(r)?((0,i.wg)(),(0,i.iD)("div",hS,[(0,i.Wm)(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).UP))}),(0,i.Wm)(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>(0,s.SU)(v)((0,s.SU)(r),(0,s.SU)(G).DOWN))})])):(0,i.kq)("",!0)])):(0,i.kq)("",!0),(0,i._)("div",fS,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(m.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["group"===e.type?((0,i.wg)(),(0,i.iD)("div",gS,[yS,((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.elements,(t=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(t.id),"group-active":(0,s.SU)(d).includes(t.id)}]),key:t.id,onClick:l=>h(e,t.id),onDblclick:e=>b(t.id)},[x.value===t.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${t.id}`,value:t.name||(0,s.SU)(Hn)[t.type],class:"input",type:"text",onBlur:e=>k(e,t.id),onKeydown:(0,n.D2)((e=>k(e,t.id)),["enter"])},null,40,xS)):((0,i.wg)(),(0,i.iD)("div",kS,(0,ae.zw)(t.name||(0,s.SU)(Hn)[t.type]),1)),(0,i._)("div",bS,[(0,s.SU)(p).includes(t.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((e=>g(t.id)),["stop"])},null,8,["onClick"]))])],42,wS)))),128))])):((0,i.wg)(),(0,i.iD)("div",{key:1,class:(0,ae.C_)(["item",{active:(0,s.SU)(c).includes(e.id)}]),onClick:t=>f(e.id),onDblclick:t=>b(e.id)},[x.value===e.id?((0,i.wg)(),(0,i.iD)("input",{key:0,id:`input-${e.id}`,value:e.name||(0,s.SU)(Hn)[e.type],class:"input",type:"text",onBlur:t=>k(t,e.id),onKeydown:(0,n.D2)((t=>k(t,e.id)),["enter"])},null,40,IS)):((0,i.wg)(),(0,i.iD)("div",SS,(0,ae.zw)(e.name||(0,s.SU)(Hn)[e.type]),1)),(0,i._)("div",CS,[(0,s.SU)(p).includes(e.id)?((0,i.wg)(),(0,i.j4)(u,{key:0,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"])):((0,i.wg)(),(0,i.j4)(I,{key:1,style:{"font-size":"17px"},onClick:(0,n.iM)((t=>g(e.id)),["stop"])},null,8,["onClick"]))])],42,_S))],64)))),128))])])),_:1},8,["title"])}}});const ES=(0,Nl.Z)(LS,[["__scopeId","data-v-15470598"]]);var TS=ES,MS=()=>{const e=$(),t=F(),{handleElement:l}=(0,o.Jk)(e),{slides:a,slideIndex:n,currentSlide:r}=(0,o.Jk)(t),u=(0,s.iH)(""),c=(0,s.iH)(""),d=(0,s.iH)([]),p=(0,s.iH)(-1),v=()=>{const e=[],t=new RegExp(u.value,"g"),l=/(<([^>]+)>)/g;for(const n of a.value)for(const a of n.elements)if("text"===a.type){const o=a.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("shape"===a.type&&a.text&&a.text.content){const o=a.text.content.replace(l,""),i=o.match(t);i&&e.push(...new Array(i.length).fill({slideId:n.id,elId:a.id,elType:a.type}))}else if("table"===a.type)for(let o=0;o{const t=[...e.childNodes],l=[];while(t.length){const e=t.shift();e.nodeType===e.TEXT_NODE?e.wholeText&&l.push(e):t.unshift(...e.childNodes)}return l},h=e=>{let t=0;const l=e.map((e=>{const l=t,a=t+e.wholeText.length;return t=a,{text:e.wholeText,startIdx:l,endIdx:a}}));return l},f=(e,t)=>{const l=new RegExp(t,"g"),a=[];let n=l.exec(e);while(n)a.push(n),n=l.exec(e);return a},g=(e,t,l,a)=>{for(let n=l.length-1;n>=0;n--){const o=l[n],i=o.index,s=i+o[0].length;for(let l=0;l=s)break;let c=e[l];const d=Math.max(0,i-r),p=Math.min(u,s)-r-d;d>0&&(c=c.splitText(d)),p{for(const l of e)l.innerHTML=l.innerHTML.replace(new RegExp(u.value,"g"),(()=>`${u.value}`))},w=()=>{const e=document.querySelectorAll(".editable-element mark");for(const t of e)setTimeout((()=>{const e=t.parentNode,l=t.textContent;e.replaceChild(document.createTextNode(l),t)}),0)},x=()=>{w(),setTimeout((()=>{for(let e=0;ee)).join(""),o=f(n,u.value);g(t,l,o,e)}}}),0)},k=()=>{const e=document.querySelectorAll("mark[data-index]");for(const t of e)setTimeout((()=>{const e=t.dataset.index;void 0!==e&&+e===p.value?t.classList.add("active"):t.classList.remove("active")}),0)},b=()=>{if(-1===p.value)return;const e=d.value[p.value];if(e.slideId===r.value.id)setTimeout(k,0);else{const l=a.value.findIndex((t=>t.id===e.slideId));-1!==l&&t.updateSlideIndex(l)}},_=()=>{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?v():p.value{if(!u.value)return Kl.warning("请先输入查找内容");e.setActiveElementIdList([]),-1===p.value?v():p.value>0?p.value-=1:p.value=d.value.length-1,b()},S=()=>{if(!u.value)return;if(-1===p.value)return void _();const e=d.value[p.value];let l=null;if("table"===e.elType){const[t,a]=e.cellIndex;l=document.querySelector(`#editable-element-${e.elId} .cell[data-cell-index="${t}_${a}"] .cell-text`)}else l=document.querySelector(`#editable-element-${e.elId} .ProseMirror`);if(!l)return;const a=document.createElement("div");a.innerHTML=l.innerHTML;let n=!1;const o=a.querySelectorAll("mark[data-index]");for(const t of o){const e=t.parentNode;if(t.classList.contains("active"))n?e.removeChild(t):(e.replaceChild(document.createTextNode(c.value),t),n=!0);else{const l=t.textContent;e.replaceChild(document.createTextNode(l),t)}}if("text"===e.elType){const l={content:a.innerHTML};t.updateElement({id:e.elId,props:l})}else if("shape"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"shape"===l.type&&l.text){const n={text:{...l.text,content:a.innerHTML}};t.updateElement({id:e.elId,props:n})}}else if("table"===e.elType){const l=r.value.elements.find((t=>t.id===e.elId));if(l&&"table"===l.type){const n=l.data.map(((t,l)=>l===e.cellIndex[0]?t.map(((t,l)=>l===e.cellIndex[1]?{...t,text:a.innerHTML}:t)):t)),o={data:n};t.updateElement({id:e.elId,props:o})}}d.value.splice(p.value,1),d.value.length?(p.value>d.value.length-1&&(p.value=0),(0,i.Y3)((()=>{x(),b()}))):p.value=-1},C=()=>{if(u.value)if(-1!==p.value){for(let e=0;ee.id===n.slideId));if(!o)continue;const i=o.elements.find((e=>e.id===n.elId));if(!i)continue;const s=document.createElement("div");if("text"===i.type?s.innerHTML=i.content:"shape"===i.type&&(s.innerHTML=i.text?.content||""),"table"===n.elType){const e=i.data.map((e=>e.map((e=>e.text?{...e,text:e.text.replaceAll(u.value,c.value)}:e)))),l={data:e};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}else{const l=m(s),a=h(l),o=a.map((({text:e})=>e)).join(""),i=f(o,u.value);g(l,a,i,e);const d=s.querySelectorAll("mark[data-index]");let p=-1;for(const e of d){const t=+e.dataset.index,l=e.parentNode;t===p?l.removeChild(e):(l.replaceChild(document.createTextNode(c.value),e),p=t)}if("text"===n.elType){const e={content:s.innerHTML};t.updateElement({id:n.elId,slideId:n.slideId,props:e})}else if("shape"===n.elType){const e=r.value.elements.find((e=>e.id===n.elId));if(e&&"shape"===e.type&&e.text){const l={text:{...e.text,content:s.innerHTML}};t.updateElement({id:n.elId,slideId:n.slideId,props:l})}}}}d.value=[],p.value=-1}else _()};return(0,i.YP)(u,(()=>{p.value=-1,d.value=[],u.value||w()})),(0,i.YP)(n,(()=>{(0,i.Y3)((()=>{x(),setTimeout(k,0)}))})),(0,i.YP)(l,(()=>{l.value&&(p.value=-1,d.value=[],w())})),(0,i.Jd)(w),{searchWord:u,replaceWord:c,searchResults:d,searchIndex:p,searchNext:_,searchPrev:I,replace:S,replaceAll:C}};const US={class:"count"},WS={key:1,class:"footer"};var DS=(0,i.aZ)({__name:"SearchPanel",setup(e){const t=$(),{searchWord:l,replaceWord:a,searchResults:o,searchIndex:r,searchNext:u,searchPrev:c,replace:d,replaceAll:p}=MS(),v=(0,s.iH)("search"),m=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],h=()=>{t.setSearchPanelState(!1)},f=(0,s.iH)();return(0,i.bv)((()=>{f.value.focus()})),(0,i.YP)(v,(()=>{(0,i.Y3)((()=>{f.value.focus()}))})),(e,t)=>{const g=(0,i.up)("IconClose"),y=(0,i.up)("IconLeft"),w=(0,i.up)("IconRight");return(0,i.wg)(),(0,i.j4)(dS,{class:"search-panel",width:300,height:0,left:-270,top:90},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"close-btn",onClick:t[0]||(t[0]=e=>h()),onMousedown:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(g)],32),(0,i.Wm)(Vd,{tabs:m,value:v.value,"onUpdate:value":t[2]||(t[2]=e=>v.value=e)},null,8,["value"]),(0,i._)("div",{class:(0,ae.C_)(["content",v.value]),onMousedown:t[11]||(t[11]=(0,n.iM)((()=>{}),["stop"]))},[(0,i.Wm)(an,{class:"input",value:(0,s.SU)(l),"onUpdate:value":t[5]||(t[5]=e=>(0,s.dq)(l)?l.value=e:null),placeholder:"输入查找内容",onEnter:t[6]||(t[6]=e=>(0,s.SU)(u)()),ref_key:"searchInpRef",ref:f},{suffix:(0,i.w5)((()=>[(0,i._)("span",US,(0,ae.zw)((0,s.SU)(r)+1)+"/"+(0,ae.zw)((0,s.SU)(o).length),1),(0,i.Wm)(Dc,{type:"vertical"}),(0,i.Wm)(y,{class:"next-btn left",onClick:t[3]||(t[3]=e=>(0,s.SU)(c)())}),(0,i.Wm)(w,{class:"next-btn right",onClick:t[4]||(t[4]=e=>(0,s.SU)(u)())})])),_:1},8,["value"]),"replace"===v.value?((0,i.wg)(),(0,i.j4)(an,{key:0,class:"input",value:(0,s.SU)(a),"onUpdate:value":t[7]||(t[7]=e=>(0,s.dq)(a)?a.value=e:null),placeholder:"输入替换内容",onEnter:t[8]||(t[8]=e=>(0,s.SU)(d)())},null,8,["value"])):(0,i.kq)("",!0),"replace"===v.value?((0,i.wg)(),(0,i.iD)("div",WS,[(0,i.Wm)(Xd,{disabled:!(0,s.SU)(l),style:{"margin-left":"5px"},onClick:t[9]||(t[9]=e=>(0,s.SU)(d)())},{default:(0,i.w5)((()=>[(0,i.Uk)("替换")])),_:1},8,["disabled"]),(0,i.Wm)(Xd,{disabled:!(0,s.SU)(l),type:"primary",style:{"margin-left":"5px"},onClick:t[10]||(t[10]=e=>(0,s.SU)(p)())},{default:(0,i.w5)((()=>[(0,i.Uk)("全部替换")])),_:1},8,["disabled"])])):(0,i.kq)("",!0)],34)])),_:1})}}});const HS=(0,Nl.Z)(DS,[["__scopeId","data-v-43ff4a2e"]]);var FS=HS;const AS={class:"pptist-editor"},ZS={class:"layout-content"},$S={class:"layout-content-center"};var OS=(0,i.aZ)({__name:"index",setup(e){const t=$(),{dialogForExport:l,showSelectPanel:a,showSearchPanel:n}=(0,o.Jk)(t),r=()=>t.setDialogForExport(""),u=(0,s.iH)(40);return Sa(),Ca(),(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",AS,[(0,i.Wm)(In,{class:"layout-header"}),(0,i._)("div",ZS,[(0,i.Wm)(Fm,{class:"layout-content-left"}),(0,i._)("div",$S,[(0,i.Wm)(xm,{class:"center-top"}),(0,i.Wm)(kp,{class:"center-body",style:(0,ae.j5)({height:`calc(100% - ${u.value+40}px)`})},null,8,["style"]),(0,i.Wm)(Gb,{class:"center-bottom",height:u.value,"onUpdate:height":t[0]||(t[0]=e=>u.value=e),style:(0,ae.j5)({height:`${u.value}px`})},null,8,["height","style"])]),(0,i.Wm)(Yb,{class:"layout-content-right"})])]),(0,s.SU)(a)?((0,i.wg)(),(0,i.j4)(TS,{key:0})):(0,i.kq)("",!0),(0,s.SU)(n)?((0,i.wg)(),(0,i.j4)(FS,{key:1})):(0,i.kq)("",!0),(0,i.Wm)(fp,{visible:!!(0,s.SU)(l),width:680,onClosed:t[1]||(t[1]=e=>r())},{default:(0,i.w5)((()=>[(0,i.Wm)(iS)])),_:1},8,["visible"])],64))}});const zS=(0,Nl.Z)(OS,[["__scopeId","data-v-1e00f97b"]]);var RS=zS,BS=()=>{const e=F(),{slides:t,slideIndex:l,formatedAnimations:a}=(0,o.Jk)(e),n=(0,s.iH)(0),r=(0,s.iH)(!1),u=(0,s.iH)(l.value),c=()=>{if(r.value)return;const{animations:e,autoNext:t}=a.value[n.value];n.value+=1,r.value=!0;let l=0;for(const a of e){const n=document.querySelector(`#screen-element-${a.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${ck}${a.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(ck)&&n.classList.remove(e,`${ck}animated`);n.style.setProperty("--animate-duration",`${a.duration}ms`),n.classList.add(o,`${ck}animated`);const i=()=>{"out"!==a.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,`${ck}animated`)),l+=1,l===e.length&&(r.value=!1,t&&c())};n.addEventListener("animationend",i,{once:!0})}},d=()=>{n.value-=1;const{animations:e}=a.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(ck)&&e.classList.remove(t,`${ck}animated`)}}e.every((e=>"attention"===e.type))&&g()},p=(0,s.iH)(0),v=()=>{p.value&&(clearInterval(p.value),p.value=0)};(0,i.Ah)(v);const m=(0,s.iH)(!1),h=e=>{m.value=e},f=(0,U.throttle)((function(e){Kl.success(e)}),1e3,{leading:!0,trailing:!1}),g=()=>{a.value.length&&n.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value{a.value.length&&n.value{v(),Kl.success("开始自动放映"),p.value=setInterval(y,w.value)},k=e=>{v(),w.value=e,x()},b=(0,U.throttle)((function(e){e.deltaY<0?g():e.deltaY>0&&y()}),500,{leading:!0,trailing:!1}),_=(0,s.iH)(null),I=e=>{_.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},S=e=>{if(!_.value)return;const t=Math.abs(_.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-_.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(_.value=null,l>0?g():y())},C=e=>{const t=e.key.toUpperCase();t===le.UP||t===le.LEFT||t===le.PAGEUP?g():t!==le.DOWN&&t!==le.RIGHT&&t!==le.SPACE&&t!==le.ENTER&&t!==le.PAGEDOWN||y()};(0,i.bv)((()=>document.addEventListener("keydown",C))),(0,i.Ah)((()=>document.removeEventListener("keydown",C)));const L=()=>{e.updateSlideIndex(l.value-1),n.value=0},E=()=>{e.updateSlideIndex(l.value+1),n.value=0},T=t=>{e.updateSlideIndex(t),n.value=0},M=l=>{const a=t.value.findIndex((e=>e.id===l));-1!==a&&(e.updateSlideIndex(a),n.value=0)};return{autoPlayTimer:p,autoPlayInterval:w,setAutoPlayInterval:k,autoPlay:x,closeAutoPlay:v,loopPlay:m,setLoopPlay:h,mousewheelListener:b,touchStartListener:I,touchEndListener:S,turnPrevSlide:L,turnNextSlide:E,turnSlideToIndex:T,turnSlideToId:M,execPrev:g,execNext:y,animationIndex:n}},PS=e=>{const t=F(),{viewportRatio:l}=(0,o.Jk)(t),a=(0,s.iH)(0),n=(0,s.iH)(0),r=()=>{const t=e?.value||document.body,o=t.clientWidth,i=t.clientHeight;let s,r;i/o===l.value?(s=o,r=i):i/o>l.value?(s=o,r=o*l.value):(s=i/l.value,r=i),a.value=s,n.value=r};return(0,i.bv)((()=>{r(),window.addEventListener("resize",r)})),(0,i.Ah)((()=>{window.removeEventListener("resize",r)})),{slideWidth:a,slideHeight:n}},NS=()=>{const e=(0,s.iH)(!0),t=(0,s.iH)(!0),{exitScreening:l}=_a(),a=()=>{e.value=ba(),!e.value&&t.value&&l(),t.value=!0};(0,i.bv)((()=>{e.value=ba(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)})),(0,i.Ah)((()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}));const n=()=>{e.value&&(t.value=!1,ka())};return{fullscreenState:e,manualExitFullscreen:n}},jS=(0,i.aZ)({__name:"ScreenChartElement",props:{elementInfo:{}},setup(e){return(e,t)=>((0,i.wg)(),(0,i.j4)(pd,{class:"screen-element-chart",elementInfo:e.elementInfo},null,8,["elementInfo"]))}});const YS=jS;var VS=YS;const JS={class:"element-content"};var qS=(0,i.aZ)({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=(0,o.Jk)(F()),l=(0,i.f3)(Sn)||(0,s.iH)(1),a=(0,i.f3)(Cn)||(0,s.iH)(""),n=(0,i.Fl)((()=>t.value.id===a.value));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-element-video",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",JS,[n.value?((0,i.wg)(),(0,i.j4)(Mr,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:(0,s.SU)(l)},null,8,["width","height","src","poster","scale"])):(0,i.kq)("",!0)])],4)],4))}});const XS=(0,Nl.Z)(qS,[["__scopeId","data-v-b427b02c"]]);var GS=XS;const KS={class:"element-content"};var QS=(0,i.aZ)({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:l,currentSlide:a}=(0,o.Jk)(F()),n=(0,i.f3)(Sn)||(0,s.iH)(1),r=(0,i.f3)(Cn)||(0,s.iH)(""),u=(0,i.Fl)((()=>a.value.id===r.value)),c=(0,i.Fl)((()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px")),d=(0,i.Fl)((()=>{const e=la,a=la*l.value,o=280/n.value,i=50/n.value,s=t.elementInfo.width,r=t.elementInfo.height,u=t.elementInfo.left,c=t.elementInfo.top;let d=0,p=r;return u+o>=e&&(d=s-o),c+r+i>=a&&(p=-i),{left:d+"px",top:p+"px"}})),p=(0,s.iH)(),v=()=>{p.value&&p.value.toggle()};return(e,t)=>{const l=(0,i.up)("IconVolumeNotice");return(0,i.wg)(),(0,i.iD)("div",{class:"screen-element-audio",style:(0,ae.j5)({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[(0,i._)("div",{class:"rotate-wrapper",style:(0,ae.j5)({transform:`rotate(${e.elementInfo.rotate}deg)`})},[(0,i._)("div",KS,[(0,i.Wm)(l,{class:"audio-icon",style:(0,ae.j5)({fontSize:c.value,color:e.elementInfo.color}),onClick:t[0]||(t[0]=e=>v())},null,8,["style"]),u.value?((0,i.wg)(),(0,i.j4)(Gr,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:p,style:(0,ae.j5)({...d.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:(0,s.SU)(n)},null,8,["style","src","loop","autoplay","scale"])):(0,i.kq)("",!0)])],4)],4)}}});const eC=(0,Nl.Z)(QS,[["__scopeId","data-v-7a9a13d6"]]);var tC=eC;const lC=["id","title"];var aC=(0,i.aZ)({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Yc,[na.TEXT]:Xc,[na.SHAPE]:nd,[na.LINE]:ud,[na.CHART]:VS,[na.TABLE]:bd,[na.LATEX]:Td,[na.VIDEO]:GS,[na.AUDIO]:tC};return e[t.elementInfo.type]||null})),{formatedAnimations:a,theme:n}=(0,o.Jk)(F()),r=(0,i.Fl)((()=>{const e=a.value.findIndex((e=>{const l=e.animations.map((e=>e.elId));return l.includes(t.elementInfo.id)}));if(-1===e)return!1;if(ee.elId===t.elementInfo.id));return"in"===l?.type})),u=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:(0,ae.j5)({zIndex:e.elementIndex,color:(0,s.SU)(n).fontColor,fontFamily:(0,s.SU)(n).fontName,visibility:r.value?"hidden":"visible"}),title:e.elementInfo.link?.target||"",onClick:t[0]||(t[0]=e=>u())},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,lC))}});const nC=(0,Nl.Z)(aC,[["__scopeId","data-v-69b7fb9e"]]);var oC=nC,iC=(0,i.aZ)({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:l}=(0,o.Jk)(F()),a=(0,i.Fl)((()=>t.slide.background)),{backgroundStyle:n}=vu(a),r=(0,i.Fl)((()=>t.slide.id));return(0,i.JJ)(Cn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"screen-slide",style:(0,ae.j5)({width:(0,s.SU)(la)+"px",height:(0,s.SU)(la)*(0,s.SU)(l)+"px",transform:`scale(${e.scale})`})},[(0,i._)("div",{class:"background",style:(0,ae.j5)({...(0,s.SU)(n)})},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.slide.elements,((t,l)=>((0,i.wg)(),(0,i.j4)(oC,{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))}});const sC=(0,Nl.Z)(iC,[["__scopeId","data-v-016af5da"]]);var rC=sC;const uC={class:"screen-slide-list"};var cC=(0,i.aZ)({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),n=(0,i.Fl)((()=>l.value.map((e=>{let t=e.turningMode;if(t||(t="slideY"),"random"===t){const e=mk.filter((e=>!["random","no"].includes(e.value))).map((e=>e.value));t=e[Math.floor(Math.random()*e.length)]}return{...e,turningMode:t}})))),r=(0,i.Fl)((()=>t.slideWidth/la));return(0,i.JJ)(Sn,r),(e,t)=>((0,i.wg)(),(0,i.iD)("div",uC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.value,((t,l)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${t.turningMode}`,{current:l===(0,s.SU)(a),before:l<(0,s.SU)(a),after:l>(0,s.SU)(a),hide:(l===(0,s.SU)(a)-1||l===(0,s.SU)(a)+1)&&t.turningMode!==n.value[(0,s.SU)(a)].turningMode}]),key:t.id},[Math.abs((0,s.SU)(a)-l)<2||t.animations?.length?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(rC,{slide:t,scale:r.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):(0,i.kq)("",!0)],2)))),128))]))}});const dC=(0,Nl.Z)(cC,[["__scopeId","data-v-552b63d2"]]);var pC=dC;const vC={class:"slide-thumbnails"},mC={class:"return-button"},hC={class:"slide-thumbnails-content"},fC=["onClick"];var gC=(0,i.aZ)({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:a,slideIndex:n}=(0,o.Jk)(F()),{slidesLoadLimit:r}=km(),u=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const o=(0,i.up)("IconArrowCircleLeft");return(0,i.wg)(),(0,i.iD)("div",vC,[(0,i._)("div",mC,[(0,i.Wm)(o,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),(0,i._)("div",hC,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(a),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(n)}]),key:e.id,onClick:e=>u(t)},[(0,i.Wm)(Pd,{slide:e,size:150,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,fC)))),128))])])}}});const yC=(0,Nl.Z)(gC,[["__scopeId","data-v-15912b32"]]);var wC=yC;const xC={key:0,class:"blackboard"};var kC=(0,i.aZ)({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const a=e;let n=null;const o=(0,s.iH)(),r=(0,s.iH)();let u={x:0,y:0},c=!1,d=0,p=-1;const v=(0,s.iH)({x:0,y:0}),m=(0,s.iH)(!1),h=(0,s.iH)(0),f=(0,s.iH)(0),g=(0,i.Fl)((()=>r.value?h.value/r.value.width:1)),y=(0,i.Fl)((()=>r.value?f.value/r.value.height:1)),w=()=>{o.value&&(h.value=o.value.clientWidth,f.value=o.value.clientHeight)},x=new ResizeObserver(w);(0,i.bv)((()=>{o.value&&x.observe(o.value)})),(0,i.Ah)((()=>{o.value&&x.unobserve(o.value)}));const k=()=>{r.value&&o.value&&(n=r.value.getContext("2d"),n&&(r.value.width=o.value.clientWidth,r.value.height=o.value.clientHeight,n.lineCap="round",n.lineJoin="round"))};(0,i.bv)(k);const b=()=>{n&&("mark"===a.model?(n.globalCompositeOperation="xor",n.globalAlpha=.5):"pen"===a.model&&(n.globalCompositeOperation="source-over",n.globalAlpha=1))};(0,i.YP)((()=>a.model),b);const _=(e,t,l)=>{if(!n)return;const o=u.x,i=u.y;n.lineWidth=l,n.strokeStyle=a.color,n.beginPath(),n.moveTo(o,i),n.lineTo(e,t),n.stroke(),n.closePath()},I=(e,t)=>{if(!n||!r.value)return;const l=u.x,o=u.y,i=a.rubberSize/2,s=i*Math.sin(Math.atan((t-o)/(e-l))),c=i*Math.cos(Math.atan((t-o)/(e-l))),d=[l+s,o-c],p=[l-s,o+c],v=[e+s,t-c],m=[e-s,t+c];n.save(),n.beginPath(),n.arc(e,t,i,0,2*Math.PI),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore(),n.save(),n.beginPath(),n.moveTo(...d),n.lineTo(...v),n.lineTo(...m),n.lineTo(...p),n.closePath(),n.clip(),n.clearRect(0,0,r.value.width,r.value.height),n.restore()},S=(e,t)=>{const l=u.x,a=u.y;return Math.sqrt((e-l)*(e-l)+(t-a)*(t-a))},C=(e,t)=>{const l=10,n=.1,o=a.penSize,i=3,s=e/t;let r;return r=s<=n?o:s>=l?i:o-s/l*o,-1===p?r:1*r/3+2*p/3},L=(e,t)=>{const l=(new Date).getTime();if("pen"===a.model){const a=S(e,t),n=l-d,o=C(a,n);_(e,t,o),p=o}else"mark"===a.model?_(e,t,a.markSize):I(e,t);u={x:e,y:t},d=(new Date).getTime()},E=e=>{if(!r.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=r.value.getBoundingClientRect(),a=t.pageX-l.x,n=t.pageY-l.y;return[a,n]},T=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;c=!0,u={x:a,y:n},d=(new Date).getTime(),e instanceof MouseEvent||(v.value={x:t,y:l},m.value=!0)},M=e=>{const[t,l]=E(e),a=t/g.value,n=l/y.value;v.value={x:t,y:l},c&&L(a,n)},U=()=>{c&&(c=!1,l("end"))},W=()=>{n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),l("end"))},D=()=>r.value?.toDataURL(),H=e=>{if(n&&r.value&&(n.clearRect(0,0,r.value.width,r.value.height),e)){n.globalCompositeOperation="source-over",n.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{n.drawImage(t,0,0),b()}}};return t({clearCanvas:W,getImageDataURL:D,setImageDataURL:H}),(e,t)=>{const l=(0,i.up)("IconWrite"),a=(0,i.up)("IconHighLight");return(0,i.wg)(),(0,i.iD)("div",{class:"writing-board",ref_key:"writingBoardRef",ref:o},[e.blackboard?((0,i.wg)(),(0,i.iD)("div",xC)):(0,i.kq)("",!0),(0,i._)("canvas",{class:"canvas",ref_key:"canvasRef",ref:r,style:(0,ae.j5)({width:h.value+"px",height:f.value+"px"}),onMousedown:t[0]||(t[0]=e=>T(e)),onMousemove:t[1]||(t[1]=e=>M(e)),onMouseup:t[2]||(t[2]=e=>U()),onTouchstart:t[3]||(t[3]=e=>T(e)),onTouchmove:t[4]||(t[4]=e=>M(e)),onTouchend:t[5]||(t[5]=e=>{U(),m.value=!1}),onMouseleave:t[6]||(t[6]=e=>{U(),m.value=!1}),onMouseenter:t[7]||(t[7]=e=>m.value=!0)},null,36),m.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:1},["eraser"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"eraser",style:(0,ae.j5)({left:v.value.x-e.rubberSize/2+"px",top:v.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):(0,i.kq)("",!0),"pen"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:1,class:"pen",style:(0,ae.j5)({left:v.value.x-e.penSize/2+"px",top:v.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?((0,i.wg)(),(0,i.j4)(l,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0),"mark"===e.model?((0,i.wg)(),(0,i.iD)("div",{key:2,class:"pen",style:(0,ae.j5)({left:v.value.x-e.markSize/2+"px",top:v.value.y+"px",color:e.color})},["mark"===e.model?((0,i.wg)(),(0,i.j4)(a,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):(0,i.kq)("",!0)],4)):(0,i.kq)("",!0)],64)):(0,i.kq)("",!0)],512)}}});const bC=(0,Nl.Z)(kC,[["__scopeId","data-v-d8027742"]]);var _C=bC;const IC=e=>((0,i.dD)("data-v-fc2e4b2c"),e=e(),(0,i.Cn)(),e),SC={class:"writing-board-tool"},CC={class:"tool-content"},LC={class:"size"},EC=IC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),TC={class:"size"},MC=IC((()=>(0,i._)("div",{class:"label"},"墨迹粗细:",-1))),UC={class:"size"},WC=IC((()=>(0,i._)("div",{class:"label"},"橡皮大小:",-1))),DC={class:"colors"},HC=["onClick"];var FC=(0,i.aZ)({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],{currentSlide:a}=(0,o.Jk)(F()),r=(0,s.iH)(),u=(0,s.iH)("#e2534d"),c=(0,s.iH)("pen"),d=(0,s.iH)(!1),p=(0,s.iH)(""),v=(0,s.iH)(6),m=(0,s.iH)(24),h=(0,s.iH)(80),f=e=>{c.value===e?p.value=p.value===e?"":e:(p.value&&(p.value=""),c.value=e)},g=()=>{r.value.clearCanvas()},y=e=>{"eraser"===c.value&&(c.value="pen"),u.value=e},w=()=>{t("close")};(0,i.YP)(a,(()=>{j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((e=>{const t=e[0];r.value.setImageDataURL(t?.dataURL||"")}))}),{immediate:!0});const x=()=>{const e=r.value.getImageDataURL();j.writingBoardImgs.where("id").equals(a.value.id).toArray().then((t=>{const l=t[0];l?j.writingBoardImgs.update(l,{dataURL:e}):j.writingBoardImgs.add({id:a.value.id,dataURL:e})}))};return(e,t)=>{const a=(0,i.up)("IconWrite"),o=(0,i.up)("IconHighLight"),s=(0,i.up)("IconErase"),k=(0,i.up)("IconClear"),b=(0,i.up)("IconFill"),_=(0,i.up)("IconClose"),I=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",SC,[(0,i._)("div",{class:"writing-board-wrap",style:(0,ae.j5)({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[(0,i.Wm)(_C,{ref_key:"writingBoardRef",ref:r,color:u.value,blackboard:d.value,model:c.value,penSize:v.value,markSize:m.value,rubberSize:h.value,onEnd:t[0]||(t[0]=e=>x())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),(0,i.Wm)(dS,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===p.value},{default:(0,i.w5)((()=>[(0,i._)("div",{class:"tools",onMousedown:t[10]||(t[10]=(0,n.iM)((()=>{}),["stop"]))},[(0,i._)("div",CC,[(0,i.Wm)(rn,{trigger:"manual",value:"pen"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",LC,[EC,(0,i.Wm)(Nm,{class:"size-slider",min:4,max:10,step:2,value:v.value,"onUpdate:value":t[1]||(t[1]=e=>v.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"pen"===c.value}]),onClick:t[2]||(t[2]=e=>f("pen"))},[(0,i.Wm)(a,{class:"icon"})],2)),[[I,"画笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"mark"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",TC,[MC,(0,i.Wm)(Nm,{class:"size-slider",min:16,max:40,step:4,value:m.value,"onUpdate:value":t[3]||(t[3]=e=>m.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"mark"===c.value}]),onClick:t[4]||(t[4]=e=>f("mark"))},[(0,i.Wm)(o,{class:"icon"})],2)),[[I,"荧光笔"]])])),_:1},8,["value"]),(0,i.Wm)(rn,{trigger:"manual",value:"eraser"===p.value},{content:(0,i.w5)((()=>[(0,i._)("div",UC,[WC,(0,i.Wm)(Nm,{class:"size-slider",min:20,max:200,step:20,value:h.value,"onUpdate:value":t[5]||(t[5]=e=>h.value=e)},null,8,["value"])])])),default:(0,i.w5)((()=>[(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:"eraser"===c.value}]),onClick:t[6]||(t[6]=e=>f("eraser"))},[(0,i.Wm)(s,{class:"icon"})],2)),[[I,"橡皮擦"]])])),_:1},8,["value"]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[7]||(t[7]=e=>g())},[(0,i.Wm)(k,{class:"icon"})])),[[I,"清除墨迹"]]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["btn",{active:d.value}]),onClick:t[8]||(t[8]=e=>d.value=!d.value)},[(0,i.Wm)(b,{class:"icon"})],2)),[[I,"黑板"]]),(0,i._)("div",DC,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(l,(e=>(0,i._)("div",{class:(0,ae.C_)(["color",{active:e===u.value}]),key:e,style:(0,ae.j5)({backgroundColor:e}),onClick:t=>y(e)},null,14,HC))),64))])]),(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{class:"btn",onClick:t[9]||(t[9]=e=>w())},[(0,i.Wm)(_,{class:"icon"})])),[[I,"关闭画笔"]])],32)])),_:1},8,["left","top","moveable"])])}}});const AC=(0,Nl.Z)(FC,[["__scopeId","data-v-fc2e4b2c"]]);var ZC=AC;const $C=e=>((0,i.dD)("data-v-83a589f0"),e=e(),(0,i.Cn)(),e),OC={class:"header"},zC={class:"content"},RC={class:"timer"},BC=["value","disabled"],PC=$C((()=>(0,i._)("div",{class:"colon"},":",-1))),NC={class:"timer"},jC=["value","disabled"];var YC=(0,i.aZ)({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const l=(0,s.iH)(null),a=(0,s.iH)(!1),o=(0,s.iH)(!1),r=(0,s.iH)(0),u=(0,i.Fl)((()=>Math.floor(r.value/60))),c=(0,i.Fl)((()=>r.value%60)),d=(0,i.Fl)((()=>!o.value||a.value)),p=()=>{l.value&&clearInterval(l.value)};(0,i.Ah)(p);const v=()=>{p(),a.value=!1},m=()=>{p(),a.value=!1,o.value?r.value=600:r.value=0},h=()=>{p(),o.value?l.value=setInterval((()=>{r.value=r.value-1,r.value<=0&&m()}),1e3):l.value=setInterval((()=>{r.value=r.value+1,r.value>36e3&&v()}),1e3),a.value=!0},f=()=>{a.value?v():h()},g=()=>{o.value=!o.value,m()},y=(e,t)=>{const l=e.target;let a=l.value;const n=/^(\d)+$/.test(a);n?("second"===t&&+a>=60&&(a="59"),r.value="minute"===t?60*+a+c.value:+a+60*u.value):l.value=q("minute"===t?u.value:c.value,2)};return(e,l)=>{const r=(0,i.up)("IconClose");return(0,i.wg)(),(0,i.j4)(dS,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:(0,i.w5)((()=>[(0,i._)("div",OC,[(0,i._)("span",{class:"text-btn",onClick:l[0]||(l[0]=e=>f())},(0,ae.zw)(a.value?"暂停":"开始"),1),(0,i._)("span",{class:"text-btn",onClick:l[1]||(l[1]=e=>m())},"重置"),(0,i._)("span",{class:(0,ae.C_)(["text-btn",{active:o.value}]),onClick:l[2]||(l[2]=e=>g())},"倒计时",2)]),(0,i._)("div",zC,[(0,i._)("div",RC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(u.value,2),maxlength:3,disabled:d.value,onMousedown:l[3]||(l[3]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[4]||(l[4]=e=>y(e,"minute")),onKeydown:[l[5]||(l[5]=(0,n.iM)((()=>{}),["stop"])),l[6]||(l[6]=(0,n.D2)((0,n.iM)((e=>y(e,"minute")),["stop"]),["enter"]))]},null,40,BC)]),PC,(0,i._)("div",NC,[(0,i._)("input",{type:"text",value:(0,s.SU)(q)(c.value,2),maxlength:3,disabled:d.value,onMousedown:l[7]||(l[7]=(0,n.iM)((()=>{}),["stop"])),onBlur:l[8]||(l[8]=e=>y(e,"second")),onKeydown:[l[9]||(l[9]=(0,n.iM)((()=>{}),["stop"])),l[10]||(l[10]=(0,n.D2)((0,n.iM)((e=>y(e,"second")),["stop"]),["enter"]))]},null,40,jC)])]),(0,i._)("div",{class:"close-btn",onClick:l[11]||(l[11]=e=>t("close"))},[(0,i.Wm)(r,{class:"icon"})])])),_:1},8,["left","top"])}}});const VC=(0,Nl.Z)(YC,[["__scopeId","data-v-83a589f0"]]);var JC=VC;const qC={class:"tools-left"},XC={class:"content"};var GC=(0,i.aZ)({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a}=(0,o.Jk)(F()),{autoPlayTimer:n,autoPlay:r,closeAutoPlay:u,autoPlayInterval:c,setAutoPlayInterval:d,loopPlay:p,setLoopPlay:v,mousewheelListener:m,touchStartListener:h,touchEndListener:f,turnPrevSlide:g,turnNextSlide:y,turnSlideToIndex:w,turnSlideToId:x,execPrev:k,execNext:b,animationIndex:_}=BS(),{slideWidth:I,slideHeight:S}=PS(),{exitScreening:C}=_a(),{fullscreenState:L,manualExitFullscreen:E}=NS(),T=(0,s.iH)(!1),M=(0,s.iH)(!1),U=(0,s.iH)(!1),W=(0,s.iH)(!1),D=(0,s.iH)(!1),H=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>g()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>y()},{text:"第一页",disable:0===a.value,handler:()=>w(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>w(l.value.length-1)},{divider:!0},{text:n.value?"取消自动放映":"自动放映",handler:n.value?u:r,children:[{text:"2.5秒",subText:2500===c.value?"√":"",handler:()=>d(2500)},{text:"5秒",subText:5e3===c.value?"√":"",handler:()=>d(5e3)},{text:"7.5秒",subText:7500===c.value?"√":"",handler:()=>d(7500)},{text:"10秒",subText:1e4===c.value?"√":"",handler:()=>d(1e4)}]},{text:"循环放映",subText:p.value?"√":"",handler:()=>v(!p.value)},{divider:!0},{text:"显示工具栏",handler:()=>T.value=!0},{text:"查看所有幻灯片",handler:()=>W.value=!0},{text:"画笔工具",handler:()=>M.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:"结束放映",subText:"ESC",handler:C}];return(e,t)=>{const n=(0,i.up)("IconLeftTwo"),o=(0,i.up)("IconRightTwo"),r=(0,i.up)("IconWrite"),u=(0,i.up)("IconMagic"),c=(0,i.up)("IconStopwatchStart"),d=(0,i.up)("IconListView"),p=(0,i.up)("IconOffScreenOne"),v=(0,i.up)("IconFullScreenOne"),g=(0,i.up)("IconPower"),y=(0,i.Q2)("contextmenu"),F=(0,i.Q2)("tooltip");return(0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["base-view",{"laser-pen":D.value}])},[(0,i.wy)((0,i.Wm)(pC,{slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),animationIndex:(0,s.SU)(_),turnSlideToId:(0,s.SU)(x),manualExitFullscreen:(0,s.SU)(E),onWheel:t[0]||(t[0]=e=>(0,s.SU)(m)(e)),onTouchstart:t[1]||(t[1]=e=>(0,s.SU)(h)(e)),onTouchend:t[2]||(t[2]=e=>(0,s.SU)(f)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[y,H]]),W.value?((0,i.wg)(),(0,i.j4)(wC,{key:0,turnSlideToIndex:(0,s.SU)(w),onClose:t[3]||(t[3]=e=>W.value=!1)},null,8,["turnSlideToIndex"])):(0,i.kq)("",!0),M.value?((0,i.wg)(),(0,i.j4)(ZC,{key:1,slideWidth:(0,s.SU)(I),slideHeight:(0,s.SU)(S),onClose:t[4]||(t[4]=e=>M.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),U.value?((0,i.wg)(),(0,i.j4)(JC,{key:2,onClose:t[5]||(t[5]=e=>U.value=!1)})):(0,i.kq)("",!0),(0,i._)("div",qC,[(0,i.Wm)(n,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[6]||(t[6]=e=>(0,s.SU)(k)())}),(0,i.Wm)(o,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:t[7]||(t[7]=e=>(0,s.SU)(b)())})]),(0,i._)("div",{class:(0,ae.C_)(["tools-right",{visible:T.value}]),onMouseleave:t[16]||(t[16]=e=>T.value=!1),onMouseenter:t[17]||(t[17]=e=>T.value=!0)},[(0,i._)("div",XC,[(0,i._)("div",{class:"tool-btn page-number",onClick:t[8]||(t[8]=e=>W.value=!0)},"幻灯片 "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1),(0,i.wy)((0,i.Wm)(r,{class:"tool-btn",onClick:t[9]||(t[9]=e=>M.value=!0)},null,512),[[F,"画笔工具"]]),(0,i.wy)((0,i.Wm)(u,{class:(0,ae.C_)(["tool-btn",{active:D.value}]),onClick:t[10]||(t[10]=e=>D.value=!D.value)},null,8,["class"]),[[F,"激光笔"]]),(0,i.wy)((0,i.Wm)(c,{class:(0,ae.C_)(["tool-btn",{active:U.value}]),onClick:t[11]||(t[11]=e=>U.value=!U.value)},null,8,["class"]),[[F,"计时器"]]),(0,i.wy)((0,i.Wm)(d,{class:"tool-btn",onClick:t[12]||(t[12]=t=>e.changeViewMode("presenter"))},null,512),[[F,"演讲者视图"]]),(0,s.SU)(L)?(0,i.wy)(((0,i.wg)(),(0,i.j4)(p,{key:0,class:"tool-btn",onClick:t[13]||(t[13]=e=>(0,s.SU)(E)())},null,512)),[[F,"退出全屏"]]):(0,i.wy)(((0,i.wg)(),(0,i.j4)(v,{key:1,class:"tool-btn",onClick:t[14]||(t[14]=e=>(0,s.SU)(xa)())},null,512)),[[F,"进入全屏"]]),(0,i.wy)((0,i.Wm)(g,{class:"tool-btn",onClick:t[15]||(t[15]=e=>(0,s.SU)(C)())},null,512),[[F,"结束放映"]])])],34)],2)}}});const KC=(0,Nl.Z)(GC,[["__scopeId","data-v-e9c1efea"]]);var QC=KC;const eL=e=>((0,i.dD)("data-v-0fc2d7b2"),e=e(),(0,i.Cn)(),e),tL={class:"presenter-view"},lL={class:"toolbar"},aL=eL((()=>(0,i._)("span",null,"普通视图",-1))),nL=eL((()=>(0,i._)("span",null,"画笔",-1))),oL=eL((()=>(0,i._)("span",null,"激光笔",-1))),iL=eL((()=>(0,i._)("span",null,"计时器",-1))),sL=eL((()=>(0,i._)("span",null,"结束放映",-1))),rL={class:"content"},uL=["onClick"],cL={class:"remark"},dL={class:"header"},pL=eL((()=>(0,i._)("span",null,"演讲者备注",-1))),vL=["innerHTML"],mL={class:"remark-scale"};var hL=(0,i.aZ)({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:l,slideIndex:a,viewportRatio:r,currentSlide:u}=(0,o.Jk)(F()),c=(0,s.iH)(),d=(0,s.iH)(),p=(0,s.iH)(!1),v=(0,s.iH)(!1),m=(0,s.iH)(!1),{mousewheelListener:h,touchStartListener:f,touchEndListener:g,turnPrevSlide:y,turnNextSlide:w,turnSlideToIndex:x,turnSlideToId:k,animationIndex:b}=BS(),{slideWidth:_,slideHeight:I}=PS(c),{exitScreening:S}=_a(),{slidesLoadLimit:C}=km(),{fullscreenState:L,manualExitFullscreen:E}=NS(),T=(0,s.iH)(16),M=(0,i.Fl)((()=>Ql(u.value.remark||"无备注"))),U=e=>{d.value&&d.value.scrollBy(e.deltaY,0)},W=e=>{e<12||e>40||(T.value=e)};(0,i.YP)(a,(()=>{(0,i.Y3)((()=>{if(!d.value)return;const e=d.value.querySelector(".thumbnail.active");if(!e)return;const t=d.value.offsetWidth,l=e.offsetLeft;d.value.scrollTo({left:l-t/2,behavior:"smooth"})}))}));const D=()=>[{text:"上一页",subText:"↑ ←",disable:a.value<=0,handler:()=>y()},{text:"下一页",subText:"↓ →",disable:a.value>=l.value.length-1,handler:()=>w()},{text:"第一页",disable:0===a.value,handler:()=>x(0)},{text:"最后一页",disable:a.value===l.value.length-1,handler:()=>x(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>p.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:S}];return(e,t)=>{const o=(0,i.up)("IconListView"),u=(0,i.up)("IconWrite"),y=(0,i.up)("IconMagic"),w=(0,i.up)("IconStopwatchStart"),H=(0,i.up)("IconOffScreenOne"),F=(0,i.up)("IconPower"),A=(0,i.up)("IconMinus"),Z=(0,i.up)("IconPlus"),$=(0,i.Q2)("contextmenu");return(0,i.wg)(),(0,i.iD)("div",tL,[(0,i._)("div",lL,[(0,i._)("div",{class:"tool-btn",onClick:t[0]||(t[0]=t=>e.changeViewMode("base"))},[(0,i.Wm)(o,{class:"tool-icon"}),aL]),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:p.value}]),onClick:t[1]||(t[1]=e=>p.value=!p.value)},[(0,i.Wm)(u,{class:"tool-icon"}),nL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:m.value}]),onClick:t[2]||(t[2]=e=>m.value=!m.value)},[(0,i.Wm)(y,{class:"tool-icon"}),oL],2),(0,i._)("div",{class:(0,ae.C_)(["tool-btn",{active:v.value}]),onClick:t[3]||(t[3]=e=>v.value=!v.value)},[(0,i.Wm)(w,{class:"tool-icon"}),iL],2),(0,i._)("div",{class:"tool-btn",onClick:t[4]||(t[4]=()=>(0,s.SU)(L)?(0,s.SU)(E)():(0,s.SU)(xa)())},[(0,s.SU)(L)?((0,i.wg)(),(0,i.j4)(H,{key:0,class:"tool-icon"})):((0,i.wg)(),(0,i.j4)(H,{key:1,class:"tool-icon"})),(0,i._)("span",null,(0,ae.zw)((0,s.SU)(L)?"退出全屏":"全屏"),1)]),(0,i.Wm)(Dc,{class:"divider"}),(0,i._)("div",{class:"tool-btn",onClick:t[5]||(t[5]=e=>(0,s.SU)(S)())},[(0,i.Wm)(F,{class:"tool-icon"}),sL])]),(0,i._)("div",rL,[(0,i._)("div",{class:(0,ae.C_)(["slide-list-wrap",{"laser-pen":m.value}]),ref_key:"slideListWrapRef",ref:c},[(0,i.wy)((0,i.Wm)(pC,{slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),animationIndex:(0,s.SU)(b),turnSlideToId:(0,s.SU)(k),manualExitFullscreen:(0,s.SU)(E),onWheel:t[6]||(t[6]=e=>(0,s.SU)(h)(e)),onTouchstart:t[7]||(t[7]=e=>(0,s.SU)(f)(e)),onTouchend:t[8]||(t[8]=e=>(0,s.SU)(g)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[$,D]]),p.value?((0,i.wg)(),(0,i.j4)(ZC,{key:0,slideWidth:(0,s.SU)(_),slideHeight:(0,s.SU)(I),left:-365,top:-155,onClose:t[9]||(t[9]=e=>p.value=!1)},null,8,["slideWidth","slideHeight"])):(0,i.kq)("",!0),v.value?((0,i.wg)(),(0,i.j4)(JC,{key:1,left:75,onClose:t[10]||(t[10]=e=>v.value=!1)})):(0,i.kq)("",!0)],2),(0,i._)("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:d,onWheel:t[11]||(t[11]=(0,n.iM)((e=>U(e)),["prevent"]))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["thumbnail",{active:t===(0,s.SU)(a)}]),key:e.id,onClick:e=>(0,s.SU)(x)(t)},[(0,i.Wm)(Pd,{slide:e,size:120/(0,s.SU)(r),visible:t<(0,s.SU)(C)},null,8,["slide","size","visible"])],10,uL)))),128))],544)]),(0,i._)("div",cL,[(0,i._)("div",dL,[pL,(0,i._)("span",null,"P "+(0,ae.zw)((0,s.SU)(a)+1)+" / "+(0,ae.zw)((0,s.SU)(l).length),1)]),(0,i._)("div",{class:"remark-content",style:(0,ae.j5)({fontSize:T.value+"px"}),innerHTML:M.value},null,12,vL),(0,i._)("div",mL,[(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:12===T.value}]),onClick:t[12]||(t[12]=e=>W(T.value-2))},[(0,i.Wm)(A)],2),(0,i._)("div",{class:(0,ae.C_)(["scale-btn",{disable:40===T.value}]),onClick:t[13]||(t[13]=e=>W(T.value+2))},[(0,i.Wm)(Z)],2)])])])}}});const fL=(0,Nl.Z)(hL,[["__scopeId","data-v-0fc2d7b2"]]);var gL=fL;const yL={class:"pptist-screen"};var wL=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("base"),l=e=>{t.value=e},{exitScreening:a}=_a(),n=e=>{const t=e.key.toUpperCase();t===le.ESC&&a()};return(0,i.bv)((()=>document.addEventListener("keydown",n))),(0,i.Ah)((()=>document.removeEventListener("keydown",n))),(e,a)=>((0,i.wg)(),(0,i.iD)("div",yL,["base"===t.value?((0,i.wg)(),(0,i.j4)(QC,{key:0,changeViewMode:l})):"presenter"===t.value?((0,i.wg)(),(0,i.j4)(gL,{key:1,changeViewMode:l})):(0,i.kq)("",!0)]))}});const xL=(0,Nl.Z)(wL,[["__scopeId","data-v-6bf3d190"]]);var kL=xL,bL=(0,i.aZ)({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e={[na.IMAGE]:Ho,[na.TEXT]:Gi,[na.SHAPE]:vs,[na.LINE]:Is,[na.CHART]:Us,[na.TABLE]:Gs,[na.LATEX]:ar,[na.VIDEO]:Dr,[na.AUDIO]:eu};return e[t.elementInfo.type]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-editable-element",style:(0,ae.j5)({zIndex:e.elementIndex})},[((0,i.wg)(),(0,i.j4)((0,i.LL)(l.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}});const _L=bL;var IL=_L,SL=(0,i.aZ)({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0)),a=(0,i.Fl)((()=>t.elementInfo.width*t.canvasScale)),o=(0,i.Fl)((()=>t.elementInfo.height*t.canvasScale)),{borderLines:r,resizeHandlers:u,textElementResizeHandlers:c}=Hu(a,o),d="text"===t.elementInfo.type||"table"===t.elementInfo.type?c:u,p=(0,i.Fl)((()=>["chart","video","audio"].includes(t.elementInfo.type)));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"mobile-operate",style:(0,ae.j5)({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${l.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(r),(e=>((0,i.wg)(),(0,i.j4)(zu,{class:"operate-border-line",key:e.type,type:e.type,style:(0,ae.j5)(e.style)},null,8,["type","style"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(d),(t=>((0,i.wg)(),(0,i.j4)(Zu,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:(0,ae.j5)(t.style),onTouchstart:(0,n.iM)((l=>e.scaleElement(l,e.elementInfo,t.direction)),["stop"])},null,8,["type","rotate","style","onTouchstart"])))),128)),p.value?(0,i.kq)("",!0):((0,i.wg)(),(0,i.j4)(Ju,{key:0,class:"operate-rotate-handler",style:(0,ae.j5)({left:a.value/2+"px"}),onTouchstart:t[0]||(t[0]=(0,n.iM)((t=>e.rotateElement(t,e.elementInfo)),["stop"]))},null,8,["style"]))],64)):(0,i.kq)("",!0)],4))}});const CL=(0,Nl.Z)(SL,[["__scopeId","data-v-fd451ff6"]]);var LL=CL;const EL={class:"mobile-thumbnails"},TL=["onClick"],ML={class:"label"};var UL=(0,i.aZ)({__name:"MobileThumbnails",setup(e){const t=F(),{slides:l,slideIndex:a}=(0,o.Jk)(t),{sortSlides:n}=pa(),{slidesLoadLimit:r}=km(),u=e=>{t.updateSlideIndex(e)},c=e=>{const{newIndex:t,oldIndex:l}=e;void 0!==t&&void 0!==l&&t!==l&&n(t,l)};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",EL,[(0,i.Wm)((0,s.SU)(Em()),{class:"thumbnail-list",modelValue:(0,s.SU)(l),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:c},{item:(0,i.w5)((({element:e,index:t})=>[(0,i._)("div",{class:(0,ae.C_)(["thumbnail-item",{active:(0,s.SU)(a)===t}]),onClick:e=>u(t)},[(0,i._)("div",ML,(0,ae.zw)(t+1),1),(0,i.Wm)(Pd,{class:"thumbnail",slide:e,size:120,visible:t<(0,s.SU)(r)},null,8,["slide","visible"])],10,TL)])),_:1},8,["modelValue"])]))}});const WL=(0,Nl.Z)(UL,[["__scopeId","data-v-2c80920e"]]);var DL=WL;const HL={class:"slide-toolbar"},FL={class:"remark"},AL=["value"],ZL={class:"toolbar"};var $L=(0,i.aZ)({__name:"SlideToolbar",setup(e){const t=F(),{viewportRatio:l,currentSlide:a}=(0,o.Jk)(t),{createSlide:n,copyAndPasteSlide:r,deleteSlide:u}=pa(),{createTextElement:c,createImageElement:d,createShapeElement:p}=ua(),v=()=>{const e=400,t=56;c({left:(la-e)/2,top:(la*l.value-t)/2,width:e,height:t},{content:"

新添加文本

"})},m=e=>{e&&e[0]&&ta(e[0]).then((e=>d(e)))},h=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},a={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:a},o=200;p({left:(la-o)/2,top:(la*l.value-o)/2,width:o,height:o},n[e])},f=(0,i.Fl)((()=>a.value?.remark||"")),g=e=>{const l=e.target.value;t.updateSlide({remark:l})};return(e,t)=>{const l=(0,i.up)("IconPlus"),a=(0,i.up)("IconCopy"),o=(0,i.up)("IconDelete"),c=(0,i.up)("IconFontSize"),d=(0,i.up)("IconPicture"),p=(0,i.up)("IconSquare"),y=(0,i.up)("IconRound");return(0,i.wg)(),(0,i.iD)("div",HL,[(0,i._)("div",FL,[(0,i._)("textarea",{value:f.value,placeholder:"点击输入演讲者备注",onInput:t[0]||(t[0]=e=>g(e))},null,40,AL)]),(0,i._)("div",ZL,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[1]||(t[1]=e=>(0,s.SU)(n)())},{default:(0,i.w5)((()=>[(0,i.Wm)(l,{class:"icon"}),(0,i.Uk)(" 新幻灯片")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[2]||(t[2]=e=>(0,s.SU)(r)())},{default:(0,i.w5)((()=>[(0,i.Wm)(a,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[3]||(t[3]=e=>(0,s.SU)(u)())},{default:(0,i.w5)((()=>[(0,i.Wm)(o,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[4]||(t[4]=e=>v())},{default:(0,i.w5)((()=>[(0,i.Wm)(c,{class:"icon"}),(0,i.Uk)(" 文字")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(Oa,{onChange:t[5]||(t[5]=e=>m(e))},{default:(0,i.w5)((()=>[(0,i.Wm)(d,{class:"icon"}),(0,i.Uk)("图片 ")])),_:1})])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[6]||(t[6]=e=>h("square"))},{default:(0,i.w5)((()=>[(0,i.Wm)(p,{class:"icon"}),(0,i.Uk)(" 矩形")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:t[7]||(t[7]=e=>h("round"))},{default:(0,i.w5)((()=>[(0,i.Wm)(y,{class:"icon"}),(0,i.Uk)(" 圆形")])),_:1})])),_:1})]),(0,i.Wm)(DL)])}}});const OL=(0,Nl.Z)($L,[["__scopeId","data-v-24150aba"]]);var zL=OL;const RL=e=>((0,i.dD)("data-v-f3d1ac70"),e=e(),(0,i.Cn)(),e),BL={class:"element-toolbar"},PL={class:"content"},NL={key:0,class:"style"},jL={class:"row-block"},YL=RL((()=>(0,i._)("div",{class:"label"},"文字颜色:",-1))),VL={class:"colors"},JL=["onClick"],qL={class:"row-block"},XL=RL((()=>(0,i._)("div",{class:"label"},"填充色:",-1))),GL={class:"colors"},KL=["onClick"],QL={key:1,class:"common"};var eE=(0,i.aZ)({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],l=$(),a=F(),{handleElement:n,handleElementId:r,richTextAttrs:u}=(0,o.Jk)(l),{addHistorySnapshot:c}=ra(),d=(e,t)=>{a.updateElement({id:e,props:t}),c()},p=[{key:"style",label:"样式"},{key:"common",label:"布局"}],v=(0,s.iH)("common"),{orderElement:m}=wa(),{alignElementToCanvas:h}=Yn(),{addElementsFromData:f}=ca(),{deleteElement:g}=ma(),y=()=>{const e=JSON.parse(JSON.stringify(n.value));f([e])},w=(e,t)=>{Hi.emit(Ui.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{if(n.value){if(("text"===n.value.type||"shape"===n.value.type&&n.value.text?.content)&&Hi.emit(Ui.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{if(n.value){if("text"!==n.value.type&&"shape"!==n.value.type&&"chart"!==n.value.type||d(r.value,{fill:e}),"table"===n.value.type){const t=JSON.parse(JSON.stringify(n.value.data));for(let l=0;l{const a=(0,i.up)("IconTextBold"),o=(0,i.up)("IconTextItalic"),r=(0,i.up)("IconTextUnderline"),c=(0,i.up)("IconStrikethrough"),d=(0,i.up)("IconFontSize"),f=(0,i.up)("IconAlignTextLeft"),b=(0,i.up)("IconAlignTextCenter"),_=(0,i.up)("IconAlignTextRight"),I=(0,i.up)("IconCopy"),S=(0,i.up)("IconDelete"),C=(0,i.up)("IconSendToBack"),L=(0,i.up)("IconBringToFrontOne"),E=(0,i.up)("IconBringToFront"),T=(0,i.up)("IconSentToBack"),M=(0,i.up)("IconAlignLeft"),U=(0,i.up)("IconAlignVertically"),W=(0,i.up)("IconAlignRight"),D=(0,i.up)("IconAlignTop"),H=(0,i.up)("IconAlignHorizontally"),F=(0,i.up)("IconAlignBottom");return(0,i.wg)(),(0,i.iD)("div",BL,[(0,i.Wm)(Vd,{tabs:p,value:v.value,"onUpdate:value":l[0]||(l[0]=e=>v.value=e),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["value"]),(0,i._)("div",PL,["style"===v.value?((0,i.wg)(),(0,i.iD)("div",NL,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).bold,onClick:l[1]||(l[1]=e=>w("bold"))},{default:(0,i.w5)((()=>[(0,i.Wm)(a)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).em,onClick:l[2]||(l[2]=e=>w("em"))},{default:(0,i.w5)((()=>[(0,i.Wm)(o)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).underline,onClick:l[3]||(l[3]=e=>w("underline"))},{default:(0,i.w5)((()=>[(0,i.Wm)(r)])),_:1},8,["checked"]),(0,i.Wm)(Nf,{style:{flex:"1"},checked:(0,s.SU)(u).strikethrough,onClick:l[4]||(l[4]=e=>w("strikethrough"))},{default:(0,i.w5)((()=>[(0,i.Wm)(c)])),_:1},8,["checked"])])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[5]||(l[5]=e=>w("fontsize-add"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("+")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[6]||(l[6]=e=>w("fontsize-reduce"))},{default:(0,i.w5)((()=>[(0,i.Wm)(d),(0,i.Uk)("-")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(tg,{class:"row","button-style":"solid",value:(0,s.SU)(u).align,"onUpdate:value":l[7]||(l[7]=e=>w("align",e))},{default:(0,i.w5)((()=>[(0,i.Wm)(Kf,{value:"left",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(f)])),_:1}),(0,i.Wm)(Kf,{value:"center",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(b)])),_:1}),(0,i.Wm)(Kf,{value:"right",style:{flex:"1"}},{default:(0,i.w5)((()=>[(0,i.Wm)(_)])),_:1})])),_:1},8,["value"]),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i._)("div",jL,[YL,(0,i._)("div",VL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>x(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,JL))),64))])]),(0,i._)("div",qL,[XL,(0,i._)("div",GL,[((0,i.wg)(),(0,i.iD)(i.HY,null,(0,i.Ko)(t,(e=>(0,i._)("div",{class:"color",key:e,onClick:t=>k(e)},[(0,i._)("div",{class:"color-block",style:(0,ae.j5)({backgroundColor:e})},null,4)],8,KL))),64))])])])):(0,i.kq)("",!0),"common"===v.value?((0,i.wg)(),(0,i.iD)("div",QL,[(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[8]||(l[8]=e=>y())},{default:(0,i.w5)((()=>[(0,i.Wm)(I,{class:"icon"}),(0,i.Uk)(" 复制")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[9]||(l[9]=e=>(0,s.SU)(g)())},{default:(0,i.w5)((()=>[(0,i.Wm)(S,{class:"icon"}),(0,i.Uk)(" 删除")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[10]||(l[10]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(C,{class:"icon"}),(0,i.Uk)(" 置顶")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[11]||(l[11]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(L,{class:"icon"}),(0,i.Uk)(" 置底")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[12]||(l[12]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).UP))},{default:(0,i.w5)((()=>[(0,i.Wm)(E,{class:"icon"}),(0,i.Uk)(" 上移")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[13]||(l[13]=e=>(0,s.SU)(m)((0,s.SU)(n),(0,s.SU)(G).DOWN))},{default:(0,i.w5)((()=>[(0,i.Wm)(T,{class:"icon"}),(0,i.Uk)(" 下移")])),_:1})])),_:1}),(0,i.Wm)(Dc,{style:{margin:"20px 0"}}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[14]||(l[14]=e=>(0,s.SU)(h)((0,s.SU)(K).LEFT))},{default:(0,i.w5)((()=>[(0,i.Wm)(M,{class:"icon"}),(0,i.Uk)(" 左对齐")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[15]||(l[15]=e=>(0,s.SU)(h)((0,s.SU)(K).HORIZONTAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(U,{class:"icon"}),(0,i.Uk)(" 水平居中")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[16]||(l[16]=e=>(0,s.SU)(h)((0,s.SU)(K).RIGHT))},{default:(0,i.w5)((()=>[(0,i.Wm)(W,{class:"icon"}),(0,i.Uk)(" 右对齐")])),_:1})])),_:1}),(0,i.Wm)(qf,{class:"row"},{default:(0,i.w5)((()=>[(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[17]||(l[17]=e=>(0,s.SU)(h)((0,s.SU)(K).TOP))},{default:(0,i.w5)((()=>[(0,i.Wm)(D,{class:"icon"}),(0,i.Uk)(" 上对齐")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[18]||(l[18]=e=>(0,s.SU)(h)((0,s.SU)(K).VERTICAL))},{default:(0,i.w5)((()=>[(0,i.Wm)(H,{class:"icon"}),(0,i.Uk)(" 垂直居中")])),_:1}),(0,i.Wm)(Xd,{style:{flex:"1"},onClick:l[19]||(l[19]=e=>(0,s.SU)(h)((0,s.SU)(K).BOTTOM))},{default:(0,i.w5)((()=>[(0,i.Wm)(F,{class:"icon"}),(0,i.Uk)(" 下对齐")])),_:1})])),_:1})])):(0,i.kq)("",!0)])])}}});const tE=(0,Nl.Z)(eE,[["__scopeId","data-v-f3d1ac70"]]);var lE=tE;const aE={class:"mobile-editor-header"},nE={class:"history"};var oE=(0,i.aZ)({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:l}=(0,o.Jk)(Y()),{redo:a,undo:r}=ra();return(e,o)=>{const u=(0,i.up)("IconBack"),c=(0,i.up)("IconNext"),d=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",aE,[(0,i._)("div",nE,[(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(t)}]),onClick:o[0]||(o[0]=(0,n.iM)((e=>(0,s.SU)(r)()),["stop"]))},[(0,i.Wm)(u),(0,i.Uk)(" 撤销")],2),(0,i._)("div",{class:(0,ae.C_)(["history-item",{disable:!(0,s.SU)(l)}]),onClick:o[1]||(o[1]=(0,n.iM)((e=>(0,s.SU)(a)()),["stop"]))},[(0,i.Wm)(c),(0,i.Uk)(" 重做")],2)]),(0,i._)("div",{class:"back",onClick:o[2]||(o[2]=t=>e.changeMode("preview"))},[(0,i.Wm)(d),(0,i.Uk)(" 退出编辑")])])}}});const iE=(0,Nl.Z)(oE,[["__scopeId","data-v-5c34ab81"]]);var sE=iE;const rE={class:"mobile-editor"};var uE=(0,i.aZ)({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=F(),l=$(),{slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),{activeElementIdList:u,handleElement:c}=(0,o.Jk)(l),d=(0,s.iH)(),p=(0,s.iH)(),v=(0,s.iH)([]),m=(0,i.Fl)((()=>n.value.background)),{backgroundStyle:h}=vu(m),f=(0,i.Fl)((()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/la:(t-20)/r.value/la}));(0,i.bv)((()=>{u.value.length&&l.setActiveElementIdList([]),0!==a.value&&t.updateSlideIndex(0)}));const g=(0,i.Fl)((()=>({width:la*f.value+"px",height:la*r.value*f.value+"px"}))),y=(0,s.iH)([]),w=()=>{y.value=n.value?JSON.parse(JSON.stringify(n.value.elements)):[]};(0,i.m0)(w);const{dragElement:x}=Bn(y,v,f),{scaleElement:k}=zn(y,v,f),{rotateElement:b}=Dn(y,p,f),_=(e,t,a=!0)=>{u.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),a&&x(e,t)},I=()=>{l.setActiveElementIdList([])};return(e,t)=>((0,i.wg)(),(0,i.iD)("div",rE,[(0,i.Wm)(sE,{changeMode:e.changeMode},null,8,["changeMode"]),(0,i._)("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:t[0]||(t[0]=e=>I())},[(0,i._)("div",{class:"viewport-wrapper",style:(0,ae.j5)(g.value)},[(0,i._)("div",{class:"background",style:(0,ae.j5)((0,s.SU)(h))},null,4),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(v.value,((e,t)=>((0,i.wg)(),(0,i.j4)(wu,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:f.value},null,8,["type","axis","length","canvasScale"])))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,(e=>((0,i.wg)(),(0,i.iD)(i.HY,{key:e.id},["line"!==e.type?((0,i.wg)(),(0,i.j4)(LL,{key:0,elementInfo:e,isSelected:(0,s.SU)(u).includes(e.id),canvasScale:f.value,scaleElement:(0,s.SU)(k),rotateElement:(0,s.SU)(b)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):(0,i.kq)("",!0)],64)))),128)),(0,i._)("div",{class:"viewport",ref_key:"viewportRef",ref:p,style:(0,ae.j5)({transform:`scale(${f.value})`})},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(y.value,((e,t)=>((0,i.wg)(),(0,i.j4)(IL,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:_},null,8,["elementInfo","elementIndex"])))),128))],4)],4)],544),(0,i.Wm)(zL),(0,s.SU)(c)?((0,i.wg)(),(0,i.j4)(lE,{key:0})):(0,i.kq)("",!0)]))}});const cE=(0,Nl.Z)(uE,[["__scopeId","data-v-3756d058"]]);var dE=cE;const pE={class:"header"};var vE=(0,i.aZ)({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=F(),{slides:l,slideIndex:a,currentSlide:n,viewportRatio:r}=(0,o.Jk)(t),u=(0,s.iH)(!1),c=(0,s.iH)({width:0,height:0});(0,i.bv)((()=>{0!==a.value&&t.updateSlideIndex(0),c.value={width:document.body.clientHeight,height:document.body.clientWidth}}));const d=(0,i.Fl)((()=>{const e=c.value.height/c.value.width;let t=0,l=0;return e>=r.value?(t=c.value.width,l=t*r.value):(l=c.value.height,t=l/r.value),{width:t,height:l}})),p=(0,s.iH)(null),v=e=>{p.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},m=e=>{if(!p.value)return;const n=Math.abs(p.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-p.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(p.value=null,o<0&&a.value>0&&t.updateSlideIndex(a.value-1),o>0&&a.value{const o=(0,i.up)("IconLogout");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-player",style:(0,ae.j5)({width:c.value.width+"px",height:c.value.height+"px",transform:`rotate(90deg) translateY(-${c.value.height}px)`})},[(0,i._)("div",{class:"screen-slide-list",onClick:t[0]||(t[0]=e=>u.value=!u.value),onTouchstart:t[1]||(t[1]=e=>v(e)),onTouchend:t[2]||(t[2]=e=>m(e))},[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(l),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:(0,ae.C_)(["slide-item",`turning-mode-${e.turningMode||"slideY"}`,{current:t===(0,s.SU)(a),before:t<(0,s.SU)(a),after:t>(0,s.SU)(a),hide:(t===(0,s.SU)(a)-1||t===(0,s.SU)(a)+1)&&e.turningMode!==(0,s.SU)(n).turningMode}]),key:e.id},[Math.abs((0,s.SU)(a)-t)<2?((0,i.wg)(),(0,i.iD)("div",{key:0,class:"slide-content",style:(0,ae.j5)({width:d.value.width+"px",height:d.value.height+"px"})},[(0,i.Wm)(Pd,{slide:e,size:d.value.width},null,8,["slide","size"])],4)):(0,i.kq)("",!0)],2)))),128))],32),u.value?((0,i.wg)(),(0,i.iD)(i.HY,{key:0},[(0,i._)("div",pE,[(0,i._)("div",{class:"back",onClick:t[3]||(t[3]=t=>e.changeMode("preview"))},[(0,i.Wm)(o),(0,i.Uk)(" 退出播放")])]),(0,i.Wm)(DL,{class:"thumbnails"})],64)):(0,i.kq)("",!0)],4)}}});const mE=(0,Nl.Z)(vE,[["__scopeId","data-v-62f26eba"]]);var hE=mE;const fE={class:"thumbnail-list"},gE={class:"menu"};var yE=(0,i.aZ)({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=(0,o.Jk)(F()),{slidesLoadLimit:l}=km(),a=(0,s.iH)(),n=(0,s.iH)(0);return(0,i.bv)((()=>{a.value&&(n.value=a.value.clientWidth)})),(e,o)=>{const r=(0,i.up)("IconEdit"),u=(0,i.up)("IconFullScreenPlay");return(0,i.wg)(),(0,i.iD)("div",{class:"mobile-preview",ref_key:"mobileRef",ref:a},[(0,i._)("div",fE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)((0,s.SU)(t),((e,t)=>((0,i.wg)(),(0,i.iD)("div",{class:"thumbnail-item",key:e.id},[(0,i.Wm)(Pd,{slide:e,size:n.value-20,visible:t<(0,s.SU)(l)},null,8,["slide","size","visible"])])))),128))]),(0,i._)("div",gE,[(0,i._)("div",{class:"menu-item",onClick:o[0]||(o[0]=t=>e.changeMode("editor"))},[(0,i.Wm)(r,{class:"icon"}),(0,i.Uk)(" 编辑")]),(0,i.Wm)(Dc,{type:"vertical",style:{height:"30px"}}),(0,i._)("div",{class:"menu-item",onClick:o[1]||(o[1]=t=>e.changeMode("player"))},[(0,i.Wm)(u,{class:"icon"}),(0,i.Uk)(" 播放")])])],512)}}});const wE=(0,Nl.Z)(yE,[["__scopeId","data-v-53dd42dc"]]);var xE=wE;const kE={class:"mobile"};var bE=(0,i.aZ)({__name:"index",setup(e){const t=(0,s.iH)("preview"),l=e=>t.value=e,a=(0,i.Fl)((()=>{const e={editor:dE,player:hE,preview:xE};return e[t.value]||null}));return(e,t)=>((0,i.wg)(),(0,i.iD)("div",kE,[((0,i.wg)(),(0,i.j4)((0,i.LL)(a.value),{changeMode:l}))]))}});const _E=(0,Nl.Z)(bE,[["__scopeId","data-v-9826ff08"]]);var IE=_E,SE=(0,i.aZ)({__name:"App",setup(e){const t=X(),l=$(),a=Y(),{databaseId:n}=(0,o.Jk)(l),{screening:r}=(0,o.Jk)(J());return window.onbeforeunload=()=>!1,(0,i.bv)((async()=>{await P(),a.initSnapshotDatabase(),l.setAvailableFonts()})),window.addEventListener("unload",(()=>{const e=localStorage.getItem(R),t=e?JSON.parse(e):[];t.push(n.value);const l=JSON.stringify(t);localStorage.setItem(R,l)})),(e,l)=>(0,s.SU)(r)?((0,i.wg)(),(0,i.j4)(kL,{key:0})):(0,s.SU)(t)?((0,i.wg)(),(0,i.j4)(RS,{key:1})):((0,i.wg)(),(0,i.j4)(IE,{key:2}))}});const CE=SE;var LE=CE,EE=l(5205);(0,EE.z)("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(9744),l(9091);const TE={class:"menu-content"},ME=["onClick"],UE={class:"text"},WE={key:0,class:"sub-text"};var DE=(0,i.aZ)({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(e,t)=>{const l=(0,i.up)("menu-content",!0);return(0,i.wg)(),(0,i.iD)("ul",TE,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.menus,((t,a)=>((0,i.wg)(),(0,i.iD)(i.HY,{key:t.text||a},[t.hide?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("li",{key:0,class:(0,ae.C_)(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:(0,n.iM)((l=>e.handleClickMenuItem(t)),["stop"])},[t.divider?(0,i.kq)("",!0):((0,i.wg)(),(0,i.iD)("div",{key:0,class:(0,ae.C_)(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[(0,i._)("span",UE,(0,ae.zw)(t.text),1),t.subText&&!t.children?((0,i.wg)(),(0,i.iD)("span",WE,(0,ae.zw)(t.subText),1)):(0,i.kq)("",!0),t.children&&t.children.length?((0,i.wg)(),(0,i.j4)(l,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):(0,i.kq)("",!0)],2))],10,ME))],64)))),128))])}}});const HE=(0,Nl.Z)(DE,[["__scopeId","data-v-cd59e16a"]]);var FE=HE,AE=(0,i.aZ)({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,l=(0,i.Fl)((()=>{const e=170,l=30,a=11,n=5,{x:o,y:i}=t.axis,s=t.menus.filter((e=>!(e.divider||e.hide))).length,r=t.menus.filter((e=>e.divider)).length,u=e,c=s*l+r*a+2*n,d=document.body.clientWidth,p=document.body.clientHeight;return{left:d<=o+u?o-u:o,top:p<=i+c?i-c:i}})),a=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(e,t)=>((0,i.wg)(),(0,i.iD)(i.HY,null,[(0,i._)("div",{class:"mask",onContextmenu:t[0]||(t[0]=(0,n.iM)((t=>e.removeContextmenu()),["prevent"])),onMousedown:t[1]||(t[1]=t=>e.removeContextmenu())},null,32),(0,i._)("div",{class:"contextmenu",style:(0,ae.j5)({left:l.value.left+"px",top:l.value.top+"px"}),onContextmenu:t[2]||(t[2]=(0,n.iM)((()=>{}),["prevent"]))},[(0,i.Wm)(FE,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}});const ZE=AE;var $E=ZE;const OE="CTX_CONTEXTMENU_HANDLER",zE=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const a=l.value(e);if(!a)return;let o=null;const s=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",s),window.removeEventListener("resize",s)},r={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:s};o=document.createElement("div");const u=(0,i.Wm)($E,r,null);(0,n.sY)(u,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",s),window.addEventListener("resize",s)},RE={mounted(e,t){e[OE]=l=>zE(e,l,t),e.addEventListener("contextmenu",e[OE])},unmounted(e){e&&e[OE]&&(e.removeEventListener("contextmenu",e[OE]),delete e[OE])}};var BE=RE;const PE="CTX_CLICK_OUTSIDE_HANDLER",NE=(e,t,l)=>{const a=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&a(t)},jE={mounted(e,t){e[PE]=l=>NE(e,l,t),setTimeout((()=>{document.addEventListener("click",e[PE])}),0)},unmounted(e){e[PE]&&(document.removeEventListener("click",e[PE]),delete e[PE])}};var YE=jE;const VE="TOOLTIP_INSTANCE",JE={mounted(e,t){let l="",a="top",n=[300,0];"string"===typeof t.value?l=t.value:(l=t.value.content,void 0!==t.value.placement&&(a=t.value.placement),void 0!==t.value.delay&&(n=t.value.delay)),e[VE]=(0,nn.ZP)(e,{content:l,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:n})},updated(e,t){let l="";l="string"===typeof t.value?t.value:t.value.content,e[VE]&&e[VE].setContent(l)},unmounted(e){e[VE]&&e[VE].destroy()}};var qE=JE,XE={install(e){e.directive("contextmenu",BE),e.directive("click-outside",YE),e.directive("tooltip",qE)}};const GE=(0,n.ri)(LE);GE.use(Al),GE.use(XE),GE.use((0,o.WB)()),GE.mount("#app")},2480:function(){},3180:function(){},7687:function(){}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.m=e,function(){var e=[];l.O=function(t,a,n,o){if(!a){var i=1/0;for(c=0;c=o)&&Object.keys(l.O).every((function(e){return l.O[e](a[r])}))?a.splice(r--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,n,o]}}(),function(){l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,{a:t}),t}}(),function(){l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){l.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){l.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};l.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,o,i=a[0],s=a[1],r=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(r)var c=r(l)}for(t&&t(a);u