ai-ppt-edit-component 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -0
- package/es/assets/index.css +1 -0
- package/es/assets/index2.css +1 -0
- package/es/index.mjs +43676 -0
- package/index.css +1 -0
- package/lib/assets/index.css +1 -0
- package/lib/assets/index2.css +1 -0
- package/lib/index.js +58 -0
- package/package.json +104 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/index2.css');const o=require("vue"),qe=require("lodash"),te=require("pinia"),Te=require("nanoid"),ze=require("prosemirror-commands"),o4=require("axios"),a4=require("dexie"),Ne=require("tinycolor2"),i4=require("clipboard"),xd=require("crypto-js"),qu=require("file-saver"),l4=require("pptxgenjs"),wd=require("html-to-image"),v1=require("svg-pathdata"),s4=require("svg-arc-to-cubic-bezier"),u4=require("pptxtojson"),zf=require("tippy.js"),Ss=require("prosemirror-state"),bd=require("prosemirror-view"),p1=require("prosemirror-model"),ip=require("prosemirror-keymap"),Sd=require("prosemirror-history"),c4=require("prosemirror-dropcursor"),d4=require("prosemirror-gapcursor"),wo=require("prosemirror-schema-list"),Hn=require("prosemirror-inputrules"),h1=require("prosemirror-schema-basic"),f4=require("mitt"),Hf=require("hfmath"),Gf=require("vuedraggable"),v4=require("number-precision"),re=require("@icon-park/vue-next"),Jt=te.createPinia();var xt;(function(e){e.EL_ANIMATION="elAnimation",e.EL_STYLE="elStyle",e.EL_POSITION="elPosition",e.SLIDE_DESIGN="slideDesign",e.SLIDE_ANIMATION="slideAnimation",e.MULTI_STYLE="multiStyle",e.MULTI_POSITION="multiPosition"})(xt||(xt={}));const _s=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,vt=e=>{const{empty:t}=e.state.selection;t&&ze.selectAll(e.state,e.dispatch)},Rn=(e,t,n)=>{if(n)e.dispatch(e.state.tr.addMark(n.from,n.to,t));else{const{$from:r,$to:a}=e.state.selection;e.dispatch(e.state.tr.addMark(r.pos,a.pos,t))}},p4=(e,t,n,r)=>{let a=t;const i=v=>v.type===r;let l=null,s=null,u=null;for(;a<=n;){const v=e.nodeAt(a);if(!v||!v.marks)return null;const p=v.marks.find(i);if(!p||l&&p!==l)return null;s=s||v,l=l||p,u=v,a++}let c=t,d=n,f=0;for(a=t-1;a>f;){const v=e.nodeAt(a),p=v&&v.marks.find(i);if(!p||p!==l)break;c=a,s=v,a--}for(a=n+1,f=e.nodeSize-2;a<f;){const v=e.nodeAt(a),p=v&&v.marks.find(i);if(!p||p!==l)break;d=a,u=v,a++}return{mark:l,from:{node:s,pos:c},to:{node:u,pos:d}}},h4=(e,t)=>Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,m4=(e,t)=>{for(let n=e.depth;n>0;n--){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},m1=e=>t=>m4(t.$from,e),g4=e=>t=>m1(n=>h4(e,n))(t),us=(e,t)=>{const n=t.schema.nodes[e];return!!g4(n)(t.selection)},g1=e=>e?e.type.name==="text"?e:e.lastChild?g1(e.lastChild):null:null,y1=e=>{const{selection:t,doc:n}=e.state,{from:r}=t;let a=n.nodeAt(r)||n.nodeAt(r-1);return a=g1(a),a?.marks||[]},aa=(e,t,n)=>{for(const r of e)if(r.type.name===t&&r.attrs[n])return r.attrs[n];return null},Yr=(e,t)=>{for(const n of e)if(n.type.name===t)return!0;return!1},y4=(e,t)=>{const{from:n,$from:r,to:a,empty:i}=e.selection;return i?t.isInSet(e.storedMarks||r.marks()):e.doc.rangeHasMark(n,a,t)},x4=(e,t)=>{const{selection:n,doc:r}=e.state,{from:a,to:i}=n;let l=!0,s="";return r.nodesBetween(a,i,u=>(l&&u.attrs[t]&&(l=!1,s=u.attrs[t]),l)),s},x1={color:"#000000",backcolor:"",fontsize:"16px",fontname:"",align:"left"},_d=(e,t={})=>{const n={...x1,...t},r=y1(e),a=Yr(r,"strong"),i=Yr(r,"em"),l=Yr(r,"underline"),s=Yr(r,"strikethrough"),u=Yr(r,"superscript"),c=Yr(r,"subscript"),d=Yr(r,"code"),f=aa(r,"forecolor","color")||n.color,v=aa(r,"backcolor","backcolor")||n.backcolor,p=aa(r,"fontsize","fontsize")||n.fontsize,h=aa(r,"fontname","fontname")||n.fontname,m=aa(r,"link","href")||"",g=x4(e,"align")||n.align,y=us("bullet_list",e.state),x=us("ordered_list",e.state),b=us("blockquote",e.state);return{bold:a,em:i,underline:l,strikethrough:s,superscript:u,subscript:c,code:d,color:f,backcolor:v,fontsize:p,fontname:h,link:m,align:g,bulletList:y,orderedList:x,blockquote:b}},lp=e=>{const t=y1(e),n=aa(t,"fontsize","fontsize")||x1.fontsize;return parseInt(n)},w4={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000000",backcolor:"",fontsize:"16px",fontname:"",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},oe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},b4=["id"],S4={class:"icons"},_4={class:"content"},k4={key:0,class:"title"},C4={class:"description"},E4={key:0,class:"control"},T4={__name:"Message",props:{id:{type:String,required:!0},message:{type:String,required:!0},type:{type:String,default:"success"},title:{type:String,default:""},duration:{type:Number,default:3e3},closable:{type:Boolean,default:!1}},emits:["close","destroy"],setup(e,{expose:t,emit:n}){const r=e,a=n,i=o.ref(!0),l=o.ref(null),s=()=>{r.duration<=0||(l.value=setTimeout(c,r.duration))},u=()=>{l.value&&clearTimeout(l.value)},c=()=>i.value=!1;return o.onBeforeMount(()=>{u()}),o.onMounted(()=>{s()}),t({close:c}),(d,f)=>{const v=o.resolveComponent("AiPptAttention"),p=o.resolveComponent("AiPptCheckOne"),h=o.resolveComponent("AiPptCloseOne"),m=o.resolveComponent("AiPptInfo"),g=o.resolveComponent("AiPptCloseSmall");return o.openBlock(),o.createBlock(o.Transition,{name:"message-fade",appear:"",mode:"in-out",onBeforeLeave:f[3]||(f[3]=y=>a("close")),onAfterLeave:f[4]||(f[4]=y=>a("destroy"))},{default:o.withCtx(()=>[i.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"message",id:e.id},[o.createElementVNode("div",{class:"message-container",onMouseenter:f[1]||(f[1]=y=>u()),onMouseleave:f[2]||(f[2]=y=>s())},[o.createElementVNode("div",S4,[e.type==="warning"?(o.openBlock(),o.createBlock(v,{key:0,theme:"filled",size:"18",fill:"#faad14"})):o.createCommentVNode("",!0),e.type==="success"?(o.openBlock(),o.createBlock(p,{key:1,theme:"filled",size:"18",fill:"#52c41a"})):o.createCommentVNode("",!0),e.type==="error"?(o.openBlock(),o.createBlock(h,{key:2,theme:"filled",size:"18",fill:"#ff4d4f"})):o.createCommentVNode("",!0),e.type==="info"?(o.openBlock(),o.createBlock(m,{key:3,theme:"filled",size:"18",fill:"#1677ff"})):o.createCommentVNode("",!0)]),o.createElementVNode("div",_4,[e.title?(o.openBlock(),o.createElementBlock("div",k4,o.toDisplayString(e.title),1)):o.createCommentVNode("",!0),o.createElementVNode("div",C4,o.toDisplayString(e.message),1)]),e.closable?(o.openBlock(),o.createElementBlock("div",E4,[o.createElementVNode("span",{class:"close-btn",onClick:f[0]||(f[0]=y=>c())},[o.createVNode(g)])])):o.createCommentVNode("",!0)],32)],8,b4)):o.createCommentVNode("",!0)]),_:1})}}},N4=oe(T4,[["__scopeId","data-v-7952c054"]]),kd=[];let Mn=null,I4=0;const L4={duration:3e3},Se=e=>{const t="message-"+I4++,n={...L4,...e,id:t};Mn||(Mn=document.createElement("div"),Mn.className="message-wrap",Mn.style.cssText=`
|
|
2
|
+
width: 100%;
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: 6000;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
padding: 15px;
|
|
12
|
+
background-color: rgba(255, 255, 255, 0);
|
|
13
|
+
transition: all 1s ease-in-out;
|
|
14
|
+
align-items: center;
|
|
15
|
+
`,document.body.appendChild(Mn));const r=o.createVNode(N4,n,null),a=document.createElement("div");r.appContext=e.ctx||Se._context||null,r.props.onClose=e.onClose,r.props.onDestroy=()=>{Mn&&Mn.childNodes.length<=1&&(Mn.remove(),Mn=null),o.render(null,a)},o.render(r,a),Mn.appendChild(a.firstElementChild);const i={id:t,close:()=>{var l,s;return(s=(l=r?.component)===null||l===void 0?void 0:l.exposed)===null||s===void 0?void 0:s.close()}};return kd.push(i),i};Se.success=(e,t)=>Se({...t,type:"success",message:e});Se.info=(e,t)=>Se({...t,type:"info",message:e});Se.warning=(e,t)=>Se({...t,type:"warning",message:e});Se.error=(e,t)=>Se({...t,type:"error",message:e});Se.closeAll=function(){for(let e=kd.length-1;e>=0;e--)kd[e].close()};const A4=(e,t)=>qe.padStart(""+e,t,"0"),M4=e=>/^(https?:\/\/)([\w-]+\.)+[\w-]{2,}(\/[\w-./?%&=]*)?$/i.test(e),V4=e=>new DOMParser().parseFromString(e,"text/html").body.textContent||"",P4=e=>e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()),Cd=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(Cd):Object.keys(e).reduce((t,n)=>{const r=P4(n);return t[r]=Cd(e[n]),t},{}),D4=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),Ed=e=>typeof e!="object"||e===null?e:Array.isArray(e)?e.map(Ed):Object.keys(e).reduce((t,n)=>{const r=D4(n);return t[r]=Ed(e[n]),t},{}),Sr=o4.create({timeout:1e3*300});Sr.interceptors.request.use(e=>(e.kebabToCamel&&e.data&&(e.data=Ed(e.data)),e),e=>Promise.reject(e));Sr.interceptors.response.use(e=>{const t=e.config;return e.data=t.kebabToCamel?Cd(e.data):e.data,e.status>=200&&e.status<400?Promise.resolve(e.data):(Se.error("未知的请求错误!"),Promise.reject(e))},e=>e&&e.response?(e.response.status>=400&&e.response.status<500||e.response.status>=500||Se.error("服务器遇到未知错误!"),Promise.reject(e.message)):(Se.error("连接到服务器失败 或 服务器响应超时!"),Promise.reject(e)));const B4={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Zu=B4&&"/"||"/",R4=Zu.endsWith("/")?Zu:`${Zu}/`,il=e=>{if(!e)return"";const t=e.replace(/^\/+/,"");return`${R4}${t}`},$4=e=>typeof e=="string"&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")),ks=e=>{if(typeof e!="string"||$4(e))return e;let t=e.trim();return t.startsWith("../")&&(t=t.slice(3)),t.startsWith("./")&&(t=t.slice(2)),t.startsWith("/")&&(t=t.slice(1)),t.startsWith("template/images/")?il(t):e},O4={template_6:"jpeg"},F4=e=>e?il(`mocks/${e}.json`):void 0,z4=e=>e?il(`template/${e}.json`):void 0,H4=e=>e?il(`template/images/${e}`):void 0,Fo=e=>{if(!e)return"";const t=O4[e]||"jpg";return il(`template/${e}.${t}`)},G4=e=>{if(!e||!Array.isArray(e.slides))return e;const t=e.slides.map(n=>{const r={...n};if(r.background&&typeof r.background=="object"&&r.background.src){const a=ks(r.background.src);a!==r.background.src&&(r.background={...r.background,src:a})}return Array.isArray(r.elements)&&(r.elements=r.elements.map(a=>{if(a&&a.type==="image"&&a.src){const i=ks(a.src);if(i!==a.src)return{...a,src:i}}return a})),r});return{...e,slides:t}},sp=e=>{if(Array.isArray(e))return e.map(t=>{if(!t||!t.src)return t;const n=ks(t.src);return n===t.src?t:{...t,src:n}});if(e&&typeof e=="object"){const t={};for(const[n,r]of Object.entries(e))t[n]=ks(r);return t}return e},zo="/api",up="/server/aibox",bo={getMockData(e){const t=F4(e)||`./mocks/${e}.json`;return Sr.get(t).then(sp)},getFileData(e){const t=z4(e)||`./template/${e}.json`;return Sr.get(t).then(G4)},getTemplates(){return Sr.get(`${zo}/templates`)},getImageList(e){const t=H4(e)||`./template/images/${e}`;return Sr.get(t).then(sp)},AIPPT_Outline({content:e,language:t,model:n}){return fetch(`${zo}/tools/aippt_outline`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,language:t,model:n,stream:!0})})},AIPPT_Content({content:e,language:t,style:n,model:r,generateFromUploadedFile:a,generateFromWebSearch:i,sessionId:l}){return fetch(`${zo}/tools/aippt`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({content:e,language:t,model:r,style:n,stream:!0,generateFromUploadedFile:a,generateFromWebSearch:i,sessionId:l})})},AIPPTByID({id:e,language:t}){return fetch(`${zo}/tools/aippt_by_id`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,language:t})})},AI_Writing({content:e,command:t}){return fetch(`${zo}/tools/ai_writing`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,command:t,stream:!0})})},AIPPT_Outline_From_File(e,t,n){const r=new FormData;return r.append("file",e),r.append("user_id",t),r.append("language",n),fetch(`${zo}/tools/aippt_outline_from_file`,{method:"POST",body:r})},getAIPPTData(e){return Sr.get(`${up}/api/v1/ppt/data/${e}`,{kebabToCamel:!0})},saveAIPPTData(e){return Sr.put(`${up}/api/v1/ppt/save`,e,{kebabToCamel:!0})}},cp=Te.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",10),So=te.defineStore("slides",{state:()=>({title:"未命名演示文稿",theme:{themeColors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"],fontColor:"#333",fontName:"",backgroundColor:"#fff",shadow:{h:3,v:3,blur:2,color:"#808080"},outline:{width:2,color:"#525252",style:"solid"}},slides:[{id:cp(),elements:[]}],slideIndex:0,viewportSize:1e3,viewportRatio:.5625,templates:[{name:"CMI1",id:"template_5",imageList:"template_5_images/images_info.json",cover:Fo("template_5")},{name:"CMI2",id:"template_6",imageList:"template_6_images/images_info.json",cover:Fo("template_6")},{name:"红色通用",id:"template_1",imageList:"template_1_images/images_info.json",cover:Fo("template_1")},{name:"蓝色通用",id:"template_2",imageList:"template_2_images/images_info.json",cover:Fo("template_2")},{name:"紫色通用",id:"template_3",imageList:"template_3_images/images_info.json",cover:Fo("template_3")},{name:"莫兰迪配色",id:"template_4",imageList:"template_4_images/images_info.json",cover:Fo("template_4")}]}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const r=t.elements.map(a=>a.id);return t.animations.filter(a=>r.includes(a.elId))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(!t?.animations)return[];const r=t.elements.map(l=>l.id),a=t.animations.filter(l=>r.includes(l.elId)),i=[];for(const l of a)if(l.trigger==="click"||!i.length)i.push({animations:[l],autoNext:!1});else if(l.trigger==="meantime"){const s=i[i.length-1];s.animations=s.animations.filter(u=>u.elId!==l.elId),s.animations.push(l),i[i.length-1]=s}else if(l.trigger==="auto"){const s=i[i.length-1];s.autoNext=!0,i[i.length-1]=s,i.push({animations:[l],autoNext:!1})}return i}},actions:{setTitle(e){e?(this.title=e,document.title=e):this.title="未命名演示文稿"},setTheme(e){this.theme={...this.theme,...e}},setViewportSize(e){this.viewportSize=e},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},setTemplates(e){this.templates=e},async fetchTemplates(){const e=await bo.getTemplates();console.log("API result in fetchTemplates:",JSON.stringify(e,null,2)),e&&e.data?(this.templates=e.data,console.log("Templates updated in store:",JSON.stringify(this.templates,null,2))):console.log("Templates not updated, result or result.data is falsy.")},resetSlides(){this.slides=[{id:cp(),elements:[]}],this.slideIndex=0},addSlide(e){const t=Array.isArray(e)?e:[e];for(const r of t)r.sectionTag&&delete r.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}const n=this.slideIndex+1;this.slides.splice(n,0,...t),this.slideIndex=n},addSlideToEnd(e){const t=Array.isArray(e)?e:[e];for(const n of t)n.sectionTag&&delete n.sectionTag;if(this.slides.length===1&&this.slides[0].elements.length===0){this.slides=t,this.slideIndex=0;return}this.slides.push(...t),this.slideIndex=this.slides.length-1},updateSlide(e,t){const n=t?this.slides.findIndex(r=>r.id===t):this.slideIndex;this.slides[n]={...this.slides[n],...e}},removeSlideProps(e){const{id:t,propName:n}=e,r=this.slides.map(a=>a.id===t?qe.omit(a,n):a);this.slides=r},deleteSlide(e){const t=Array.isArray(e)?e:[e],n=JSON.parse(JSON.stringify(this.slides)),r=[];for(const l of t){const s=n.findIndex(c=>c.id===l);r.push(s);const u=n[s].sectionTag;if(u){const c=n[s+1];c&&!c.sectionTag&&(delete n[s].sectionTag,n[s+1].sectionTag=u)}n.splice(s,1)}let a=Math.min(...r);const i=n.length-1;a>i&&(a=i),this.slideIndex=a,this.slides=n},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],r=[...this.slides[this.slideIndex].elements,...t];this.slides[this.slideIndex].elements=r},deleteElement(e){const t=Array.isArray(e)?e:[e],r=this.slides[this.slideIndex].elements.filter(a=>!t.includes(a.id));this.slides[this.slideIndex].elements=r},updateElement(e){const{id:t,props:n,slideId:r}=e,a=typeof t=="string"?[t]:t,i=r?this.slides.findIndex(u=>u.id===r):this.slideIndex,s=this.slides[i].elements.map(u=>a.includes(u.id)?{...u,...n}:u);this.slides[i].elements=s},removeElementProps(e){const{id:t,propName:n}=e,r=typeof n=="string"?[n]:n,a=this.slideIndex,l=this.slides[a].elements.map(s=>s.id===t?qe.omit(s,r):s);this.slides[a].elements=l}}}),w1=Te.customAlphabet("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),b1=w1(10),Td=te.defineStore("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,toolbarState:xt.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:w4,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:b1,textFormatPainter:null,shapeFormatPainter:null,showSelectPanel:!1,showSearchPanel:!1,showNotesPanel:!1,showSymbolPanel:!1,showMarkupPanel:!1,showAIPPTDialog:!1,isGenerating:!1,sessionId:w1(),isOutlineFromFile:!1,generateFromUploadedFile:!1,generateFromWebSearch:!1,disabled:!1}),getters:{activeElementList(e){const n=So(Jt).currentSlide;return!n||!n.elements?[]:n.elements.filter(r=>e.activeElementIdList.includes(r.id))},handleElement(e){const n=So(Jt).currentSlide;return!n||!n.elements?null:n.elements.find(r=>e.handleElementId===r.id)||null}},actions:{setActiveElementIdList(e){e.length===1?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},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},setShapeFormatPainter(e){this.shapeFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e},setSearchPanelState(e){this.showSearchPanel=e},setNotesPanelState(e){this.showNotesPanel=e},setSymbolPanelState(e){this.showSymbolPanel=e},setMarkupPanelState(e){this.showMarkupPanel=e},setAIPPTDialogState(e){this.showAIPPTDialog=e},setGenerating(e){this.isGenerating=e},setOutlineFromFile(e){this.isOutlineFromFile=e},setGenerateFromUploadedFile(e){this.generateFromUploadedFile=e},setGenerateFromWebSearch(e){this.generateFromWebSearch=e},setDisabled(e){this.disabled=e}}}),U4="PPTist",wr=new a4(`${U4}_${b1}_${new Date().getTime()}`);wr.version(1).stores({snapshots:"++id",writingBoardImgs:"id"});const W4=te.defineStore("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){const e=So(Jt),t={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await wr.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=So(Jt),t=await wr.snapshots.orderBy("id").keys();let n=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(n=t.slice(this.snapshotCursor+1));const r={index:e.slideIndex,slides:JSON.parse(JSON.stringify(e.slides))};await wr.snapshots.add(r);let a=t.length-n.length+1;a>20&&(n.push(t[0]),a--),a>=2&&wr.snapshots.update(t[a-2],{index:e.slideIndex}),await wr.snapshots.bulkDelete(n),this.setSnapshotCursor(a-1),this.setSnapshotLength(a)},async unDo(){if(this.snapshotCursor<=0)return;const e=So(Jt),t=Td(Jt),n=this.snapshotCursor-1,a=(await wr.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=So(Jt),t=Td(Jt),n=this.snapshotCursor+1,a=(await wr.snapshots.orderBy("id").toArray())[n],{index:i,slides:l}=a,s=i>l.length-1?l.length-1:i;e.setSlides(l),e.updateSlideIndex(s),this.setSnapshotCursor(n),t.setActiveElementIdList([])}}}),Y4=te.defineStore("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}}}),X4=te.defineStore("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),ve=()=>Td(Jt),pe=()=>So(Jt),S1=()=>W4(Jt),on=()=>Y4(Jt),q4=()=>X4(Jt),ma=e=>{const{left:t,top:n,width:r,height:a,rotate:i=0}=e,l=Math.sqrt(Math.pow(r,2)+Math.pow(a,2))/2,s=Math.atan(a/r)*180/Math.PI,u=(180-i-s)*Math.PI/180,c=(s-i)*Math.PI/180,d=t+r/2,f=n+a/2,v=[d+l*Math.cos(u),d+l*Math.cos(c),d-l*Math.cos(u),d-l*Math.cos(c)],p=[f-l*Math.sin(u),f-l*Math.sin(c),f+l*Math.sin(u),f+l*Math.sin(c)];return{xRange:[Math.min(...v),Math.max(...v)],yRange:[Math.min(...p),Math.max(...p)]}},ua=e=>{const{xRange:t,yRange:n}=ma({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:r,yRange:a}=ma({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:r[0]-t[0],offsetY:a[0]-n[0]}},fn=e=>{let t,n,r,a;if(e.type==="line")t=e.left,n=e.left+Math.max(e.start[0],e.end[0]),r=e.top,a=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:i,top:l,width:s,height:u,rotate:c}=e,{xRange:d,yRange:f}=ma({left:i,top:l,width:s,height:u,rotate:c});t=d[0],n=d[1],r=f[0],a=f[1]}else t=e.left,n=e.left+e.width,r=e.top,a=e.top+e.height;return{minX:t,maxX:n,minY:r,maxY:a}},er=e=>{const t=[],n=[],r=[],a=[];e.forEach(c=>{const{minX:d,maxX:f,minY:v,maxY:p}=fn(c);t.push(d),n.push(v),r.push(f),a.push(p)});const i=Math.min(...t),l=Math.max(...r),s=Math.min(...n),u=Math.max(...a);return{minX:i,maxX:l,minY:s,maxY:u}},Z4=e=>{const t=e.end[0]-e.start[0],n=e.end[1]-e.start[1];return Math.sqrt(t*t+n*n)},Cs=e=>{const t=[];return e.forEach(n=>{const r=t.findIndex(a=>a.value===n.value);if(r===-1)t.push(n);else{const a=t[r],i=Math.min(a.range[0],n.range[0]),l=Math.max(a.range[1],n.range[1]),s=[i,l],u={value:n.value,range:s};t[r]=u}}),t},Nd=e=>{const t={};for(const n of e)t[n.id]=Te.nanoid(10);return t},Ti=e=>{const t={},n={};for(const r of e){const a=r.groupId;a&&!t[a]&&(t[a]=Te.nanoid(10)),n[r.id]=Te.nanoid(10)}return{groupIdMap:t,elIdMap:n}},j4=e=>{const t=Ne(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Uf=e=>{const t=e.start.join(","),n=e.end.join(",");if(e.broken){const r=e.broken.join(",");return`M${t} L${r} L${n}`}else if(e.broken2){const{minX:r,maxX:a,minY:i,maxY:l}=fn(e);return a-r>=l-i?`M${t} L${e.broken2[0]},${e.start[1]} L${e.broken2[0]},${e.end[1]} ${n}`:`M${t} L${e.start[0]},${e.broken2[1]} L${e.end[0]},${e.broken2[1]} ${n}`}else if(e.curve){const r=e.curve.join(",");return`M${t} Q${r} ${n}`}else if(e.cubic){const[r,a]=e.cubic,i=r.join(","),l=a.join(",");return`M${t} C${i} ${l} ${n}`}return`M${t} L${n}`},J4=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>=r.top&&n.bottom<=r.bottom},Ee=()=>{const e=S1(),t=qe.debounce(function(){e.addSnapshot()},300,{trailing:!0}),n=qe.throttle(function(){e.reDo()},100,{leading:!0,trailing:!1}),r=qe.throttle(function(){e.unDo()},100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:n,undo:r}},ll=()=>{const e=ve(),t=pe(),{currentSlide:n}=te.storeToRefs(t),{addHistorySnapshot:r}=Ee();return{addElementsFromData:s=>{const{groupIdMap:u,elIdMap:c}=Ti(s),d=s[0];let f=0,v;do v=n.value.elements.find(p=>{if(p.type!==d.type)return!1;const{minX:h,maxX:m,minY:g,maxY:y}=fn(p),{minX:x,maxX:b,minY:S,maxY:_}=fn({...d,left:d.left+f,top:d.top+f});return h===x&&m===b&&g===S&&y===_}),v&&(f+=10);while(v);for(const p of s)p.id=c[p.id],p.left=p.left+f,p.top=p.top+f,p.groupId&&(p.groupId=u[p.groupId]);t.addElement(s),e.setActiveElementIdList(Object.values(c)),r()},addSlidesFromData:s=>{const u=Nd(s),c=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Ti(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(u[p.link.target]?p.link.target=u[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Te.nanoid(10),p.elId=v[p.elId];return{...d,id:u[d.id]}});t.addSlide(c),r()},addSlidesFromDataToEnd:s=>{const u=Nd(s),c=s.map(d=>{const{groupIdMap:f,elIdMap:v}=Ti(d.elements);for(const p of d.elements)p.id=v[p.id],p.groupId&&(p.groupId=f[p.groupId]),p.link&&p.link.type==="slide"&&(u[p.link.target]?p.link.target=u[p.link.target]:delete p.link);if(d.animations)for(const p of d.animations)p.id=Te.nanoid(10),p.elId=v[p.elId];return{...d,id:u[d.id]}});t.addSlideToEnd(c),r()}}},_1="pptist",Wf=e=>xd.AES.encrypt(e,_1).toString(),k1=e=>xd.AES.decrypt(e,_1).toString(xd.enc.Utf8),C1=e=>new Promise((t,n)=>{const r=document.createElement("button"),a=new i4(r,{text:()=>e,action:()=>"copy",container:document.body});a.on("success",i=>{a.destroy(),t(i)}),a.on("error",i=>{a.destroy(),n(i)}),document.body.appendChild(r),r.click(),document.body.removeChild(r)}),E1=()=>new Promise((e,t)=>{var n;!((n=navigator.clipboard)===null||n===void 0)&&n.readText?navigator.clipboard.readText().then(r=>(r||t("剪贴板为空或者不包含文本"),e(r))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),T1=e=>{let t;try{t=JSON.parse(k1(e))}catch{t=e}return t},K4=e=>{const t=e.split(`\r
|
|
16
|
+
`);t[t.length-1]===""&&t.pop();let n=-1;const r=[];for(const a in t){if(r[a]=t[a].split(" "),r[a].length===1)return null;if(n===-1)n=r[a].length;else if(n!==r[a].length)return null}return r},Q4=e=>{const r=new DOMParser().parseFromString(e,"text/html").querySelector("table"),a=[];if(!r)return a;const i=r.querySelectorAll("tr");for(const l of i){const s=[],u=l.querySelectorAll("td, th");for(const c of u){const d=c.textContent?c.textContent.trim():"",f=parseInt(c.getAttribute("colspan")||"1",10);for(let v=0;v<f;v++)s.push(d)}a.push(s)}return a};var ye;(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.O="O",e.R="R",e.T="T",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"})(ye||(ye={}));const ex=[{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"},{label:"快速创建文本",value:"双击空白处 / T"},{label:"快速创建矩形",value:"R"},{label:"快速创建圆形",value:"O"},{label:"快速创建线条",value:"L"},{label:"退出绘制状态",value:"鼠标右键"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"},{label:"完成自定义形状绘制",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"移动焦点单元格",value:"↑ / ← / ↓ / →"},{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"}]},{type:"其他快捷操作",children:[{label:"添加图片 - 粘贴来自系统剪贴板的图片"},{label:"添加图片 - 将本地图片拖拽到画布中"},{label:"添加图片 - 在画布中粘贴SVG代码"},{label:"添加图片 - 粘贴来自 pexels 的图片链接"},{label:"添加文本 - 粘贴来自系统剪贴板的文字"},{label:"添加文本 - 将外部选中文字拖拽到画布中"},{label:"文本编辑 - 支持 markdown 语法创建列表和引用"}]}],Id=e=>{const n=e.replace(/[\n\r]+/g,"<br>").split("<br>");let r="";for(const a of n)a&&(r+=`<div>${a}</div>`);return r},N1=e=>new Promise(t=>{const n=document.createElement("img");n.src=e,n.style.opacity="0",document.body.appendChild(n),n.onload=()=>{const r=n.clientWidth,a=n.clientHeight;n.onload=null,n.onerror=null,document.body.removeChild(n),t({width:r,height:a})},n.onerror=()=>{n.onload=null,n.onerror=null}}),Gr=e=>new Promise(t=>{const n=new FileReader;n.addEventListener("load",()=>{t(n.result)}),n.readAsDataURL(e)}),tx=e=>{if(!/<svg[\s\S]*?>[\s\S]*?<\/svg>/i.test(e))return!1;try{return new DOMParser().parseFromString(e,"image/svg+xml").documentElement.nodeName==="svg"}catch{return!1}},nx=e=>{const t=new Blob([e],{type:"image/svg+xml"});return new File([t],`${Date.now()}.svg`,{type:"image/svg+xml"})};var Me;(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"})(Me||(Me={}));var Xe;(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"})(Xe||(Xe={}));const Mo={[Me.ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t-r} Q ${e} ${t} ${e-r} ${t} L ${r} ${t} Q 0 ${t} 0 ${t-r} L 0 ${r} Q 0 0 ${r} 0 Z`}},[Me.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 ${t-r} L 0 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L ${r} ${t} Z`}},[Me.CUT_RECT_SINGLE]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 ${t} L 0 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} Z`}},[Me.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:[.2],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 ${r} L ${r} 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L 0 ${t} Z`}},[Me.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e} 0 L ${e} ${t-r} Q ${e} ${t} ${e-r} ${t} L 0 ${t} L 0 ${r} Q 0 0 ${r} 0 Z`}},[Me.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:[.125],range:[[0,1]],relative:["right"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[Me.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 ${r} Q 0 0 ${r} 0 L ${e-r} 0 Q ${e} 0 ${e} ${r} L ${e} ${t} L 0 ${t} Z`}},[Me.CUT_ROUND_RECT]:{editable:!0,defaultValue:[.125],range:[[0,.5]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M ${r} 0 L ${e-r} 0 L ${e} ${r} L ${e} ${t} L 0 ${t} L 0 ${r} Q 0 0 ${r} 0 Z`}},[Me.MESSAGE]:{editable:!0,range:[[0,.8],[.1,.3]],defaultValue:[.3,.2],relative:["left_bottom","bottom"],getBaseSize:[e=>e,(e,t)=>t],formula:(e,t,n)=>{const r=e*n[0],a=e*.2,i=t*n[1];return`M 0 0 L ${e} 0 L ${e} ${t-i} L ${r+a} ${t-i} L ${r} ${t} L ${r} ${t-i} L 0 ${t-i} Z`}},[Me.ROUND_MESSAGE]:{formula:(e,t)=>{const n=Math.min(e,t)*.125,r=Math.min(e,t)*.2,a=Math.min(e,t)*.2;return`M 0 ${n} Q 0 0 ${n} 0 L ${e-n} 0 Q ${e} 0 ${e} ${n} L ${e} ${t-n-a} Q ${e} ${t-a} ${e-n} ${t-a} L ${e/2} ${t-a} L ${e/2-r} ${t} L ${e/2-r} ${t-a} L ${n} ${t-a} Q 0 ${t-a} 0 ${t-n-a} L 0 ${n} Z`}},[Me.L]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-r} L ${r} ${t-r} L ${r} 0 Z`}},[Me.RING_RECT]:{editable:!0,defaultValue:[.25],range:[[.1,.45]],relative:["left"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${r} ${r} L ${r} ${t-r} L ${e-r} ${t-r} L ${e-r} ${r} Z`}},[Me.PLUS]:{editable:!0,defaultValue:[.25],range:[[.1,.9]],relative:["center"],getBaseSize:[(e,t)=>Math.min(e,t)],formula:(e,t,n)=>{const r=Math.min(e,t)*n[0];return`M ${e/2-r/2} 0 L ${e/2-r/2} ${t/2-r/2} L 0 ${t/2-r/2} L 0 ${t/2+r/2} L ${e/2-r/2} ${t/2+r/2} L ${e/2-r/2} ${t} L ${e/2+r/2} ${t} L ${e/2+r/2} ${t/2+r/2} L ${e} ${t/2+r/2} L ${e} ${t/2-r/2} L ${e/2+r/2} ${t/2-r/2} L ${e/2+r/2} 0 Z`}},[Me.TRIANGLE]:{editable:!0,defaultValue:[.5],range:[[0,1]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>`M ${e*n[0]} 0 L 0 ${t} L ${e} ${t} Z`},[Me.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>{const r=e*n[0];return`M ${r} 0 L ${e} 0 L ${e-r} ${t} L 0 ${t} Z`}},[Me.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:[.25],range:[[0,.9]],relative:["right"],getBaseSize:[e=>e],formula:(e,t,n)=>{const r=e*n[0];return`M 0 0 L ${e-r} 0 L ${e} ${t} L ${r} ${t} Z`}},[Me.TRAPEZOID]:{editable:!0,defaultValue:[.25],range:[[0,.5]],relative:["left"],getBaseSize:[e=>e],formula:(e,t,n)=>{const r=e*n[0];return`M ${r} 0 L ${e-r} 0 L ${e} ${t} L 0 ${t} Z`}},[Me.BULLET]:{editable:!0,defaultValue:[.2],range:[[0,1]],relative:["top"],getBaseSize:[(e,t)=>t],formula:(e,t,n)=>{const r=t*n[0];return`M ${e/2} 0 L 0 ${r} L 0 ${t} L ${e} ${t} L ${e} ${r} Z`}},[Me.INDICATOR]:{editable:!0,defaultValue:[.2],range:[[0,.9]],relative:["right"],getBaseSize:[e=>e],formula:(e,t,n)=>{const r=e*n[0];return`M ${e} ${t/2} L ${e-r} 0 L 0 0 L ${r} ${t/2} L 0 ${t} L ${e-r} ${t} Z`}}},Yf=[{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:Me.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:Me.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:Me.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:Me.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:Me.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:Me.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:Me.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:Me.ROUND_RECT_DIAGONAL,pptxShapeType:"round2DiagRect"}]},{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:Me.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:Me.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:Me.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:Me.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:Me.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:Me.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:"M100,0 L200,76.6 L161.8,200 L38.2,200 L0,76.6 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:"M100,0 L170.71,29.29 L200,100 L170.71,170.71 L100,200 L29.29,170.71 L0,100 L29.29,29.29 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",pptxShapeType:"dodecagon"},{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",pptxShapeType:"flowChartManualInput"},{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 0 0 L 200 0 L 200 150 C 110 140 110 240 0 180 Z",pptxShapeType:"flowChartDocument"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z",pptxShapeType:"diagStripe"},{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:Me.L,pptxShapeType:"corner"},{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:Me.RING_RECT,pptxShapeType:"frame"},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z",pptxShapeType:"donut"},{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:Me.PLUS,pptxShapeType:"mathPlus"},{viewBox:[200,200],path:"M 0 70 L 200 70 L 200 130 L 0 130 Z",pptxShapeType:"mathMinus"},{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",pptxShapeType:"mathMultiply"},{viewBox:[200,200],path:"M 0 80 L 200 80 L 200 120 L 0 120 Z M 100 0 A 25 25 0 1 1 100 50 A 25 25 0 1 1 100 0 M 100 200 A 25 25 0 1 1 100 150 A 25 25 0 1 1 100 200",pptxShapeType:"mathDivide"},{viewBox:[200,200],path:"M 0 30 L 200 30 L 200 80 L 0 80 Z M 0 120 L 200 120 L 200 170 L 0 170 Z",pptxShapeType:"mathEqual"},{viewBox:[200,200],path:"M 120 0 L 170 0 L 150 40 L 200 40 L 200 80 L 130 80 L 110 120 L 200 120 L 200 160 L 90 160 L 70 200 L 20 200 L 40 160 L 0 160 L 0 120 L 60 120 L 80 80 L 0 80 L 0 40 L 100 40 Z",pptxShapeType:"mathNotEqual"},{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:Me.MESSAGE,pptxShapeType:"wedgeRectCallout"},{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:Me.ROUND_MESSAGE,pptxShapeType:"wedgeRoundRectCallout"},{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",pptxShapeType:"flowChartMagneticTape"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z",pptxShapeType:"flowChartCollate"},{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",pptxShapeType:"wave"},{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",pptxShapeType:"doubleWave"},{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 130 30 L 170 30 L 170 70 L 200 100 L 170 130 L 170 170 L 130 170 L 100 200 L 70 170 L 30 170 L 30 130 L 0 100 L 30 70 L 30 30 L 70 30 L 100 0",pptxShapeType:"star8"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 0 200 120 A 100 100 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 120 0 L 100 80 L 200 80 L 80 200 L 100 120 L 0 120 L 120 0 Z"},{viewBox:[200,200],path:"M 30 50 Q 40 -20 120 10 Q 180 -10 180 40 Q 210 70 190 100 C 210 140 180 170 160 170 Q 140 210 100 180 C 70 210 20 190 30 150 C -10 140 -10 80 30 50",pptxShapeType:"cloud"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z M 200 100 L 0 100",withborder:!0,pptxShapeType:"flowChartSort"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 30 30 L 170 170",withborder:!0},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 170 30 L 30 170 M 30 30 L 170 170",withborder:!0,pptxShapeType:"flowChartSummingJunction"},{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z M 200 100 L 0 100 M 100 0 L 100 200",withborder:!0,pptxShapeType:"flowChartOr"},{viewBox:[200,200],path:"M 160 0 A 40 100 0 1 1 160 200 L 40 200 A 40 100 0 1 1 40 0 L 160 0 Z M 160 200 A 40 100 0 1 1 160 0",withborder:!0,pptxShapeType:"flowChartMagneticDrum"},{viewBox:[200,200],path:"M 0 40 A 50 20 0 1 1 200 40 L 200 160 A 50 20 0 1 1 0 160 L 0 40 Z M 200 40 A 50 20 0 1 1 0 40",withborder:!0,pptxShapeType:"can"},{viewBox:[200,200],path:"M 200 0 L 50 0 L 0 50 L 0 200 L 150 200 L 200 150 L 200 0 Z M 200 0 L 150 50 M 150 50 L 0 50 M 150 50 L 150 200",withborder:!0,pptxShapeType:"cube"}]},{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",pptxShapeType:"quadArrow"},{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",pptxShapeType:"leftArrowCallout"},{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",pptxShapeType:"rightArrowCallout"},{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",pptxShapeType:"bentUpArrow"},{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",pptxShapeType:"leftUpArrow"},{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}]}],Ld={bar:"柱状图",column:"条形图",line:"折线图",area:"面积图",scatter:"散点图",pie:"饼图",ring:"环形图",radar:"雷达图"},rx={bar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},ring:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},area:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:["坐标1","坐标2","坐标3","坐标4","坐标5"],legends:["X","Y"],series:[[12,19,5,2,18],[7,11,13,21,9]]}},ox=[["#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"]],Vo=()=>{const e=ve(),t=pe(),{creatingElement:n}=te.storeToRefs(e),{theme:r,viewportRatio:a,viewportSize:i}=te.storeToRefs(t),{addHistorySnapshot:l}=Ee(),s=(y,x)=>{t.addElement(y),e.setActiveElementIdList([y.id]),n.value&&e.setCreatingElement(null),setTimeout(()=>{e.setEditorareaFocus(!0)},0),x&&x(),l()};return{createImageElement:y=>{N1(y).then(({width:x,height:b})=>{const S=b/x;S<a.value&&x>i.value?(x=i.value,b=x*S):b>i.value*a.value&&(b=i.value*a.value,x=b/S),s({type:"image",id:Te.nanoid(10),src:y,width:x,height:b,left:(i.value-x)/2,top:(i.value*a.value-b)/2,fixedRatio:!0,rotate:0})})},createChartElement:y=>{s({type:"chart",id:Te.nanoid(10),chartType:y,left:300,top:81.25,width:400,height:400,rotate:0,themeColors:r.value.themeColors,textColor:r.value.fontColor,data:rx[y]})},createTableElement:(y,x)=>{const b={fontname:r.value.fontName,color:r.value.fontColor},S=[];for(let L=0;L<y;L++){const N=[];for(let T=0;T<x;T++)N.push({id:Te.nanoid(10),colspan:1,rowspan:1,text:"",style:b});S.push(N)}const _=100,k=36,w=new Array(x).fill(1/x),C=x*_,E=y*k;s({type:"table",id:Te.nanoid(10),width:C,height:E,colWidths:w,rotate:0,data:S,left:(i.value-C)/2,top:(i.value*a.value-E)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:r.value.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},createTextElement:(y,x)=>{const{left:b,top:S,width:_,height:k}=y,w=x?.content||"",C=x?.vertical||!1,E=Te.nanoid(10);s({type:"text",id:E,left:b,top:S,width:_,height:k,content:w,rotate:0,defaultFontName:r.value.fontName,defaultColor:r.value.fontColor,vertical:C},()=>{setTimeout(()=>{const L=document.querySelector(`#editable-element-${E} .ProseMirror`);L&&L.focus()},0)})},createShapeElement:(y,x,b={})=>{const{left:S,top:_,width:k,height:w}=y,C={type:"shape",id:Te.nanoid(10),left:S,top:_,width:k,height:w,viewBox:x.viewBox,path:x.path,fill:r.value.themeColors[0],fixedRatio:!1,rotate:0,...b};if(x.withborder&&(C.outline=r.value.outline),x.special&&(C.special=!0),x.pathFormula){C.pathFormula=x.pathFormula,C.viewBox=[k,w];const E=Mo[x.pathFormula];"editable"in E&&E.editable?(C.path=E.formula(k,w,E.defaultValue),C.keypoints=E.defaultValue):C.path=E.formula(k,w)}s(C)},createLineElement:(y,x)=>{const{left:b,top:S,start:_,end:k}=y,w={type:"line",id:Te.nanoid(10),left:b,top:S,start:_,end:k,points:x.points,color:r.value.themeColors[0],style:x.style,width:2};x.isBroken&&(w.broken=[(_[0]+k[0])/2,(_[1]+k[1])/2]),x.isBroken2&&(w.broken2=[(_[0]+k[0])/2,(_[1]+k[1])/2]),x.isCurve&&(w.curve=[(_[0]+k[0])/2,(_[1]+k[1])/2]),x.isCubic&&(w.cubic=[[(_[0]+k[0])/2,(_[1]+k[1])/2],[(_[0]+k[0])/2,(_[1]+k[1])/2]]),s(w)},createLatexElement:y=>{s({type:"latex",id:Te.nanoid(10),width:y.w,height:y.h,rotate:0,left:(i.value-y.w)/2,top:(i.value*a.value-y.h)/2,path:y.path,latex:y.latex,color:r.value.fontColor,strokeWidth:2,viewBox:[y.w,y.h],fixedRatio:!0})},createVideoElement:y=>{s({type:"video",id:Te.nanoid(10),width:500,height:300,rotate:0,left:(i.value-500)/2,top:(i.value*a.value-300)/2,src:y,autoplay:!1})},createAudioElement:y=>{s({type:"audio",id:Te.nanoid(10),width:50,height:50,rotate:0,left:(i.value-50)/2,top:(i.value*a.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:r.value.themeColors[0],src:y})}}},ax=e=>{const t=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pexels\.com\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e),n=/^https?:\/\/(?:[a-zA-Z0-9-]+\.)*pptist\.cn\/[^\s]+\.(?:jpg|jpeg|png|svg|webp)(?:\?.*)?$/i.test(e);return t||n},Xf=()=>{const{shiftKeyState:e}=te.storeToRefs(on()),{createTextElement:t,createImageElement:n}=Vo(),{addElementsFromData:r,addSlidesFromData:a}=ll(),i=s=>{t({left:0,top:0,width:600,height:50},{content:s})};return{pasteTextClipboardData:(s,u)=>{const c=u?.onlySlide||!1,d=u?.onlyElements||!1,f=T1(s);if(typeof f=="object"){const{type:v,data:p}=f;v==="elements"&&!c?r(p):v==="slides"&&!d&&a(p)}else if(!d&&!c)if(e.value){const v=Id(f);i(v)}else if(ax(f))n(f);else if(M4(f))i(`<a href="${f}" title="${f}" target="_blank">${f}</a>`);else if(tx(f)){const v=nx(f);Gr(v).then(p=>n(p))}else{const v=Id(f);i(v)}}}},Po=()=>{const e=ve(),t=pe(),{selectedSlidesIndex:n,activeElementIdList:r}=te.storeToRefs(e),{currentSlide:a,slides:i,theme:l,slideIndex:s}=te.storeToRefs(t),u=o.computed(()=>[...n.value,s.value]),c=o.computed(()=>i.value.filter((L,N)=>u.value.includes(N))),d=o.computed(()=>c.value.map(L=>L.id)),{pasteTextClipboardData:f}=Xf(),{addSlidesFromData:v}=ll(),{addHistorySnapshot:p}=Ee(),h=()=>{const L={id:Te.nanoid(10),elements:[],background:{type:"solid",color:l.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([L])},m=L=>{L===ye.UP&&s.value>0?(r.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value-1)):L===ye.DOWN&&s.value<i.value.length-1&&(r.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(s.value+1))},g=()=>{const L=Wf(JSON.stringify({type:"slides",data:c.value}));C1(L).then(()=>{e.setThumbnailsFocus(!0)})},y=()=>{E1().then(L=>{f(L,{onlySlide:!0})}).catch(L=>Se.warning(L))},x=()=>{const L={id:Te.nanoid(10),elements:[],background:{type:"solid",color:l.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(L),p()},b=L=>{const{groupIdMap:N,elIdMap:T}=Ti(L.elements);for(const I of L.elements)I.id=T[I.id],I.groupId&&(I.groupId=N[I.groupId]);const A={...L,id:Te.nanoid(10)};e.setActiveElementIdList([]),t.addSlide(A),p()},S=()=>{const L=JSON.parse(JSON.stringify(a.value));v([L])},_=(L=d.value)=>{i.value.length===L.length?h():t.deleteSlide(L),e.updateSelectedSlidesIndex([]),p()},k=()=>{const L=[...d.value];g(),_(L)},w=()=>{const L=Array.from(Array(i.value.length),(N,T)=>T);e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(L)},C=(L,N)=>{if(N===L)return;const T=JSON.parse(JSON.stringify(i.value)),A=T[N],I=A.sectionTag;if(I){const V=T[N+1];delete A.sectionTag,V&&!V.sectionTag&&(V.sectionTag=I)}if(L===0){const V=T[0].sectionTag;V&&(delete T[0].sectionTag,A.sectionTag=V)}const D=T[N];T.splice(N,1),T.splice(L,0,D),t.setSlides(T),t.updateSlideIndex(L)},E=o.computed(()=>!(i.value.length>1||i.value[0].elements.length>0));return{resetSlides:h,updateSlideIndex:m,copySlide:g,pasteSlide:y,createSlide:x,createSlideByTemplate:b,copyAndPasteSlide:S,deleteSlide:_,cutSlide:k,selectAllSlide:w,sortSlides:C,isEmptySlide:E}},Ya=e=>e&&e.kind==="chart"&&Array.isArray(e.labels)&&Array.isArray(e.series),Xr=e=>e&&e.kind==="text"&&typeof e.title=="string"&&typeof e.text=="string",qr=e=>e&&e.kind===void 0&&typeof e.title=="string"&&typeof e.text=="string",dp=e=>e&&e.kind==="image",I1=()=>{const e=pe(),{addSlidesFromDataToEnd:t}=ll(),{isEmptySlide:n}=Po(),{addHistorySnapshot:r}=Ee(),a=o.ref([]),i=o.ref(0),l=o.ref(null),s=(N,T)=>N.type==="text"&&N.textType===T||N.type==="shape"&&N.text&&N.text.type===T,u=N=>N.type==="chart"&&N.chartMark==="chartItem",c=(N,T)=>N.type==="image"&&N.imageType===T,d=N=>N.elements.filter(T=>c(T,"itemFigure")).length,f=(N,T,A)=>{if(T===1){const V=N.filter(B=>{const R=B.elements.filter(O=>s(O,A)),F=B.elements.filter(O=>s(O,"title")),W=B.elements.filter(O=>s(O,"content"));return!R.length&&F.length===1&&W.length===1});if(V.length)return V}let I=null;const D=N.filter(V=>V.elements.filter(R=>s(R,A)).length>=T);if(D.length===0){const V=N.sort((B,R)=>{const F=B.elements.filter(O=>s(O,A)).length,W=R.elements.filter(O=>s(O,A)).length;return F-W});I=V[V.length-1]}else I=D.reduce((V,B)=>{const R=B.elements.filter(W=>s(W,A)).length,F=V.elements.filter(W=>s(W,A)).length;return R-T<=F-T?B:V});return N.filter(V=>{const B=V.elements.filter(F=>s(F,A)).length,R=I.elements.filter(F=>s(F,A)).length;return B===R})},v=N=>{const T=N.elements.filter(A=>A.type==="chart"&&A.chartMark==="chartItem").length;return T>0?T:N.elements.filter(A=>A.type==="chart").length},p=N=>N.elements.filter(T=>{var A;return T.type==="text"&&T.textType==="item"||T.type==="shape"&&((A=T.text)===null||A===void 0?void 0:A.type)==="item"}).length,h=(N,T)=>{const A=T.filter(Ya).length,I=T.filter(F=>Xr(F)||qr(F)).length,D=T.filter(dp).length;let V=N.filter(F=>v(F)>=A&&p(F)>=I&&(D===0||d(F)>=D));if(V.length===0)if(D>0)V=N.filter(F=>d(F)>0).sort((F,W)=>d(W)-d(F)||v(W)-v(F)||p(W)-p(F));else if(A>0)V=N.filter(F=>v(F)>0).sort((F,W)=>v(W)-v(F)||p(W)-p(F));else return f(N,I,"item");const B=F=>{const W=Math.max(0,v(F)-A),O=Math.max(0,p(F)-I);return Math.max(0,d(F)-D)*1e4+W*100+O},R=Math.min(...V.map(B));return V.filter(F=>B(F)===R)},m=({text:N,fontSize:T,fontFamily:A,width:I,maxLine:D})=>{const B=document.createElement("canvas").getContext("2d");let R=T;const F=10;for(;R>=F;){B.font=`${R}px ${A}`;const W=B.measureText(N).width;if(Math.ceil(W/I)<=D)return R;const P=R<=22?1:2;R=R-P}return F},g=N=>{const T=/font-size:\s*(\d+(?:\.\d+)?)\s*px/i,A=/font-family:\s*['"]?([^'";]+)['"]?\s*(?=;|>|$)/i,I={fontSize:16,fontFamily:"Microsoft Yahei"},D=N.match(T),V=N.match(A);return{fontSize:D?+D[1].trim():I.fontSize,fontFamily:V?V[1].trim():I.fontFamily}},y=({el:N,text:T,maxLine:A,longestText:I,digitPadding:D})=>{const B=N.width-20-2;let R=N.type==="text"?N.content:N.text.content;const F=g(R),W=m({text:I||T,fontSize:F.fontSize,fontFamily:F.fontFamily,width:B,maxLine:A}),P=new DOMParser().parseFromString(R,"text/html"),$=document.createTreeWalker(P.body,NodeFilter.SHOW_TEXT),z=[];let Z;for(;Z=$.nextNode();)Z.nodeType===Node.TEXT_NODE&&z.push(Z);if(z.forEach(Q=>{Q.textContent=""}),z.length>0){const Q=z[0];D&&T.length===1?Q.textContent="0"+T:Q.textContent=T}else{const Q=P.querySelector("p")||P.createElement("p");Q.parentNode||P.body.appendChild(Q),D&&T.length===1?Q.textContent="0"+T:Q.textContent=T}if(P.body.innerHTML.indexOf("font-size")===-1){const Q=P.querySelector("p");Q&&(Q.style.fontSize="16px")}return R=P.body.innerHTML.replace(/font-size:(.+?)px/g,`font-size: ${W}px`),N.type==="text"?{...N,content:R,lineHeight:W<15?1.2:N.lineHeight}:{...N,text:{...N.text,content:R}}},x=(N,T)=>{const A=T.series.map(D=>{var V;return(V=D.name)!==null&&V!==void 0?V:""}),I=T.series.map(D=>D.data);return{...N,chartType:T.chartType,data:{labels:T.labels,series:I,legends:A},options:{...N.options||{},...T.options||{}},themeColors:T.themeColors||N.themeColors,textColor:T.textColor||N.textColor}},b=N=>{let T=null,A=[];return N.width===N.height?A=a.value.filter(I=>I.width===I.height):N.width>N.height?A=a.value.filter(I=>I.width>I.height):A=a.value.filter(I=>I.width<=I.height),A.length||(A=a.value),T=A[Math.floor(Math.random()*A.length)],a.value=a.value.filter(I=>I.id!==T.id),T},S=N=>{const T=b(N);if(!T)return N;N.width/N.height,T.width/T.height;const A=N.width/T.width,I=N.height/T.height,D=Math.min(A,I),V=T.width*D,B=T.height*D,R=(N.width-V)/2,F=(N.height-B)/2;return{...N,src:T.src,width:V,height:B,left:N.left+R,top:N.top+F,clip:void 0}},_=N=>{const T=/```markdown([^```]*)```/,A=N.match(T);return A?A[1].trim():N.replace("```markdown","").replace("```","")},k=N=>{const T=/```json([^```]*)```/,A=N.match(T);return A?A[1].trim():N.replace("```json","").replace("```","")},w=N=>{a.value=N};function*C(N,T,A){A&&(a.value=A);const I=[];for(const O of T)if(O.type==="content"){const P=O.data.items;if(P.length===5||P.length===6){const $=P.slice(0,3),z=P.slice(3);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:3})}else if(P.length===7||P.length===8){const $=P.slice(0,4),z=P.slice(4);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:4})}else if(P.length===9||P.length===10){const $=P.slice(0,3),z=P.slice(3,6),Z=P.slice(6);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:3}),I.push({...O,data:{...O.data,items:Z},offset:6})}else if(P.length>10){const $=P.slice(0,4),z=P.slice(4,8),Z=P.slice(8);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:4}),I.push({...O,data:{...O.data,items:Z},offset:8})}else I.push(O)}else if(O.type==="contents"){const P=O.data.items;if(P.length===11){const $=P.slice(0,6),z=P.slice(6);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:6})}else if(P.length>11){const $=P.slice(0,10),z=P.slice(10);I.push({...O,data:{...O.data,items:$}}),I.push({...O,data:{...O.data,items:z},offset:10})}else I.push(O)}else if(O.type==="reference"){const P=O.data.references,$=P.length;if($<=10)I.push(O);else if($<=20){const z=Math.ceil($/2),Z=P.slice(0,z),Q=P.slice(z);I.push({...O,data:{...O.data,references:Z}}),I.push({...O,data:{...O.data,references:Q},offset:z})}else if($<=30){const z=P.slice(0,10),Z=P.slice(10,20),Q=P.slice(20);I.push({...O,data:{...O.data,references:z}}),I.push({...O,data:{...O.data,references:Z},offset:10}),I.push({...O,data:{...O.data,references:Q},offset:20})}else{let z=0;for(;z<$;){const Z=P.slice(z,z+10);I.push({...O,data:{...O.data,references:Z},offset:z}),z+=10}}}else I.push(O);const D=N.filter(O=>O.type==="cover"),V=N.filter(O=>O.type==="contents"),B=N.filter(O=>O.type==="transition"),R=N.filter(O=>O.type==="content"),F=N.filter(O=>O.type==="reference"),W=N.filter(O=>O.type==="end");if(!l.value){const O=B[Math.floor(Math.random()*B.length)];l.value=O}for(const O of I)if(O.type==="cover"){const P=D[Math.floor(Math.random()*D.length)],$=P.elements.map(z=>z.type==="image"&&z.imageType&&a.value.length?S(z):z.type!=="text"&&z.type!=="shape"?z:s(z,"title")&&O.data.title?y({el:z,text:O.data.title,maxLine:1}):s(z,"content")&&O.data.text?y({el:z,text:O.data.text,maxLine:3}):z);yield{...P,id:Te.nanoid(10),elements:$}}else if(O.type==="contents"){const P=f(V,O.data.items.length,"item"),$=P[Math.floor(Math.random()*P.length)],z=$.elements.filter(M=>s(M,"itemNumber")),Z=z.sort((M,G)=>{if(z.length>6){let ie="",ue="";if(M.type==="text"&&(ie=M.content),M.type==="shape"&&(ie=M.text.content),G.type==="text"&&(ue=G.content),G.type==="shape"&&(ue=G.text.content),ie&&ue){const se=parseInt(ie),ae=parseInt(ue);return se-ae}}const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),Q=$.elements.filter(M=>s(M,"item")),J=Q.sort((M,G)=>{if(Q.length>6){const ie=z.find(se=>se.groupId===M.groupId),ue=z.find(se=>se.groupId===G.groupId);if(ie&&ue){let se="",ae="";if(ie.type==="text"&&(se=ie.content),ie.type==="shape"&&(se=ie.text.content),ue.type==="text"&&(ae=ue.content),ue.type==="shape"&&(ae=ue.text.content),se&&ae){const Y=parseInt(se),ee=parseInt(ae);return Y-ee}}}const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),U=O.data.items.reduce((M,G)=>G.length>M.length?G:M,""),ne=[],K=[],H=$.elements.map(M=>{if(M.type==="image"&&M.imageType&&a.value.length)return S(M);if(M.type!=="text"&&M.type!=="shape")return M;if(s(M,"item")){const G=J.findIndex(j=>j===M.id),X=O.data.items[G];if(X)return y({el:M,text:X,maxLine:1,longestText:U});ne.push(M.id),M.groupId&&K.push(M.groupId)}if(s(M,"itemNumber")){const G=Z.findIndex(j=>j===M.id),X=O.offset||0;return y({el:M,text:G+X+1+"",maxLine:1,digitPadding:!0})}return M}).filter(M=>!ne.includes(M.id)&&!(M.groupId&&K.includes(M.groupId)));yield{...$,id:Te.nanoid(10),elements:H}}else if(O.type==="transition"){i.value=i.value+1;const P=l.value.elements.map($=>$.type==="image"&&$.imageType&&a.value.length?S($):$.type!=="text"&&$.type!=="shape"?$:s($,"title")&&O.data.title?y({el:$,text:O.data.title,maxLine:1}):s($,"content")&&O.data.text?y({el:$,text:O.data.text,maxLine:3}):s($,"partNumber")?y({el:$,text:i.value+"",maxLine:1,digitPadding:!0}):$);yield{...l.value,id:Te.nanoid(10),elements:P}}else if(O.type==="content"){const P=O.data.items,$=h(R,P),z=$[Math.floor(Math.random()*$.length)],Z=z.elements.filter(Y=>s(Y,"itemTitle")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id),Q=z.elements.filter(Y=>s(Y,"subtitle")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id),J=z.elements.filter(Y=>c(Y,"itemFigure")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id),U=z.elements.filter(Y=>s(Y,"item")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id),ne=z.elements.filter(Y=>s(Y,"content")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id);let K=z.elements.filter(Y=>u(Y)).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id);K.length===0&&(K=z.elements.filter(Y=>Y.type==="chart").sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id));const H=z.elements.filter(Y=>s(Y,"itemNumber")).sort((Y,ee)=>Y.left+Y.top*2-(ee.left+ee.top*2)).map(Y=>Y.id),M=[],G=[];P.forEach(Y=>{(Xr(Y)||qr(Y))&&(Y.title&&M.push(Y.title),Y.text&&G.push(Y.text))});const X=M.reduce((Y,ee)=>ee.length>Y.length?ee:Y,""),j=G.reduce((Y,ee)=>ee.length>Y.length?ee:Y,""),ie=P.filter(Ya),ue=P.filter(dp),se=ue.length>0,ae=z.elements.map(Y=>{if(se){if(c(Y,"itemFigure")){const ee=J.findIndex(de=>de===Y.id),ce=ue[ee];return ce&&ce.src?{...Y,src:ce.src}:Y}if(s(Y,"subtitle")){const ee=Q.findIndex(de=>de===Y.id),ce=ue[ee];return ce&&ce.title?y({el:Y,text:ce.title,maxLine:1}):Y}if(s(Y,"content")){const ee=ne.findIndex(de=>de===Y.id),ce=ue[ee];if(ce&&ce.text)return y({el:Y,text:ce.text,maxLine:6})}}if(Y.type==="image"&&Y.imageType&&a.value.length)return S(Y);if(Y.type==="chart"){const ee=K.findIndex(de=>de===Y.id),ce=ie[ee];return ce?x(Y,ce):Y}if(Y.type!=="text"&&Y.type!=="shape")return Y;if(P.length===1){const ee=P[0];if((Xr(ee)||qr(ee))&&s(Y,"content")&&ee.text)return y({el:Y,text:ee.text,maxLine:6});if(Ya(ee)&&s(Y,"content")&&ee.text)return y({el:Y,text:ee.text,maxLine:6});if((Xr(ee)||qr(ee))&&s(Y,"item")&&ee.text)return y({el:Y,text:ee.text,maxLine:4});if(s(Y,"itemTitle")){if((Xr(ee)||qr(ee))&&ee.title)return y({el:Y,text:ee.title,maxLine:1});if(Ya(ee)&&ee.title)return y({el:Y,text:ee.title,maxLine:1})}}else{if(s(Y,"itemTitle")){const ee=Z.findIndex(de=>de===Y.id),ce=P[ee];if(ce){if(Xr(ce)&&ce.title)return y({el:Y,text:ce.title,longestText:X,maxLine:1});if(qr(ce)&&ce.title)return y({el:Y,text:ce.title,longestText:X,maxLine:1});if(Ya(ce)&&ce.title)return y({el:Y,text:ce.title,longestText:X||ce.title,maxLine:1})}}if(s(Y,"item")){const ee=U.findIndex(de=>de===Y.id),ce=P[ee];if(ce){if(Xr(ce)&&ce.text)return y({el:Y,text:ce.text,longestText:j,maxLine:4});if(qr(ce)&&ce.text)return y({el:Y,text:ce.text,longestText:j,maxLine:4})}}if(s(Y,"itemNumber")){const ee=H.findIndex(de=>de===Y.id),ce=O.offset||0;return y({el:Y,text:ee+ce+1+"",maxLine:1,digitPadding:!0})}}return s(Y,"title")&&O.data.title?y({el:Y,text:O.data.title,maxLine:1}):Y});yield{...z,id:Te.nanoid(10),elements:ae}}else if(O.type==="reference"){const P=O.data.references.length;let $=[];$=F.filter(M=>{const G=M.elements.filter(X=>s(X,"referenceNumber")).length;return G>=P&&G<=10}),$.length===0&&($=f(F,P,"referenceNumber"));const z=$[Math.floor(Math.random()*$.length)],Z=z.elements.filter(M=>s(M,"referenceNumber")).sort((M,G)=>{const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),Q=z.elements.filter(M=>s(M,"pmid")).sort((M,G)=>{const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),J=z.elements.filter(M=>s(M,"url")).sort((M,G)=>{const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),U=z.elements.filter(M=>s(M,"doi")).sort((M,G)=>{const X=M.left+M.top*2,j=G.left+G.top*2;return X-j}).map(M=>M.id),ne=[],K=[],H=z.elements.map(M=>{if(M.type==="image"&&M.imageType&&a.value.length)return S(M);if(M.type!=="text"&&M.type!=="shape")return M;if(s(M,"title")&&O.data.title)return y({el:M,text:O.data.title,maxLine:1});if(s(M,"referenceNumber")){const G=Z.findIndex(j=>j===M.id),X=O.data.references[G];if(X){let j="";if(X.number!==void 0){const ie=O.offset||0;j=typeof X.number=="number"?(X.number+ie).toString():X.number}else{const ie=O.offset||0;j=(G+ie+1).toString()}return y({el:M,text:`[${j}]`,maxLine:1})}else ne.push(M.id),M.groupId&&K.push(M.groupId)}if(s(M,"pmid")){const G=Q.findIndex(j=>j===M.id),X=O.data.references[G];if(X&&X.pmid)return y({el:M,text:`PMID: ${X.pmid}`,maxLine:1});ne.push(M.id),M.groupId&&K.push(M.groupId)}if(s(M,"url")){const G=J.findIndex(j=>j===M.id),X=O.data.references[G];if(X&&X.url)return y({el:M,text:X.url,maxLine:2});ne.push(M.id),M.groupId&&K.push(M.groupId)}if(s(M,"doi")){const G=U.findIndex(j=>j===M.id),X=O.data.references[G];if(X&&X.doi)return y({el:M,text:`DOI: ${X.doi}`,maxLine:1});ne.push(M.id),M.groupId&&K.push(M.groupId)}return M}).filter(M=>!ne.includes(M.id)&&!(M.groupId&&K.includes(M.groupId)));yield{...z,id:Te.nanoid(10),elements:H}}else if(O.type==="end"){const P=W[Math.floor(Math.random()*W.length)],$=P.elements.map(z=>z.type==="image"&&z.imageType&&a.value.length?S(z):z);yield{...P,id:Te.nanoid(10),elements:$}}}return{presetImgPool:w,AIPPT:(N,T,A)=>{const I=[...C(N,T,A)];n.value?e.setSlides(I):t(I)},AIPPTStream:async(N,T,A,I=50,D)=>{var V;const B=C(N,T,A),R=[];for(const O of B)R.push(O);const F=R.length,W=O=>new Promise(P=>setTimeout(P,O));for(let O=0;O<R.length;O++){const P=R[O],$=Nd([P]),{groupIdMap:z,elIdMap:Z}=Ti(P.elements),Q=P.elements.map(H=>{const M={...H};return M.id=Z[H.id],H.groupId&&(M.groupId=z[H.groupId]),M.link&&M.link.type==="slide"&&($[M.link.target]?M.link.target=$[M.link.target]:delete M.link),M}),J=(V=P.animations)===null||V===void 0?void 0:V.map(H=>({...H,id:Te.nanoid(10),elId:Z[H.elId]})),U={...P,id:$[P.id],elements:[],animations:J};O===0&&n.value?(e.setSlides([U]),e.updateSlideIndex(0)):(e.addSlideToEnd([U]),e.updateSlideIndex(e.slides.length-1));const ne=U.id,K=Q.length;for(let H=0;H<Q.length;H++){const M=Q[H],G=e.slides.find(X=>X.id===ne);if(G){const X=[...G.elements,M];e.updateSlide({elements:X},ne)}D&&D(O+1,F,H+1,K),(H<Q.length-1||O<R.length-1)&&await W(I)}r()}},getMdContent:_,getJSONContent:k,AIPPTGenerator:C}};var ct;(function(e){e.UP="up",e.DOWN="down",e.TOP="top",e.BOTTOM="bottom"})(ct||(ct={}));var Be;(function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CENTER="center"})(Be||(Be={}));var ca;(function(e){e.T="top",e.B="bottom",e.L="left",e.R="right"})(ca||(ca={}));var he;(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"})(he||(he={}));var Dt;(function(e){e.START="start",e.END="end",e.C="ctrl",e.C1="ctrl1",e.C2="ctrl2"})(Dt||(Dt={}));const L1=()=>{const e=ve(),t=pe(),{activeElementIdList:n}=te.storeToRefs(e),{currentSlide:r}=te.storeToRefs(t),{addHistorySnapshot:a}=Ee();return{lockElement:()=>{const s=JSON.parse(JSON.stringify(r.value.elements));for(const u of s)n.value.includes(u.id)&&(u.lock=!0);t.updateSlide({elements:s}),e.setActiveElementIdList([]),a()},unlockElement:s=>{const u=JSON.parse(JSON.stringify(r.value.elements));if(s.groupId){const c=[];for(const d of u)d.groupId===s.groupId&&(d.lock=!1,c.push(d.id));t.updateSlide({elements:u}),e.setActiveElementIdList(c)}else{for(const c of u)if(c.id===s.id){c.lock=!1;break}t.updateSlide({elements:u}),e.setActiveElementIdList([s.id])}a()}}},ou=()=>{const e=ve(),t=pe(),{activeElementIdList:n,activeGroupElementId:r}=te.storeToRefs(e),{currentSlide:a}=te.storeToRefs(t),{addHistorySnapshot:i}=Ee();return{deleteElement:()=>{if(!n.value.length)return;let u=[];r.value?u=a.value.elements.filter(c=>c.id!==r.value):u=a.value.elements.filter(c=>!n.value.includes(c.id)),e.setActiveElementIdList([]),t.updateSlide({elements:u}),i()},deleteAllElements:()=>{a.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),i())}}},qf=()=>{const e=ve(),t=pe(),{activeElementIdList:n,activeElementList:r,handleElementId:a}=te.storeToRefs(e),{currentSlide:i}=te.storeToRefs(t),{addHistorySnapshot:l}=Ee();return{canCombine:o.computed(()=>{if(r.value.length<2)return!1;const d=r.value[0].groupId;return d?!r.value.every(v=>(v.groupId&&v.groupId)===d):!0}),combineElements:()=>{if(!r.value.length)return;let d=JSON.parse(JSON.stringify(i.value.elements));const f=Te.nanoid(10),v=[];for(const g of d)n.value.includes(g.id)&&(g.groupId=f,v.push(g));const p=d.findIndex(g=>g.id===v[v.length-1].id),h=v.map(g=>g.id);d=d.filter(g=>!h.includes(g.id));const m=p-v.length+1;d.splice(m,0,...v),t.updateSlide({elements:d}),l()},uncombineElements:()=>{if(!r.value.length||!r.value.some(p=>p.groupId))return;const f=JSON.parse(JSON.stringify(i.value.elements));for(const p of f)n.value.includes(p.id)&&p.groupId&&delete p.groupId;t.updateSlide({elements:f});const v=a.value?[a.value]:[];e.setActiveElementIdList(v),l()}}},Zf=()=>{const e=ve(),{activeElementIdList:t,activeElementList:n}=te.storeToRefs(e),{pasteTextClipboardData:r}=Xf(),{deleteElement:a}=ou(),i=()=>{if(!t.value.length)return;const c=Wf(JSON.stringify({type:"elements",data:n.value}));C1(c).then(()=>{e.setEditorareaFocus(!0)})},l=()=>{i(),a()},s=()=>{E1().then(c=>{r(c)}).catch(c=>Se.warning(c))};return{copyElement:i,cutElement:l,pasteElement:s,quickCopyElement:()=>{i(),s()}}},au=()=>{const e=ve(),{currentSlide:t}=te.storeToRefs(pe()),{hiddenElementIdList:n,handleElementId:r}=te.storeToRefs(e);return{selectAllElements:()=>{const s=t.value.elements.filter(u=>!u.lock&&!n.value.includes(u.id)).map(u=>u.id);e.setActiveElementIdList(s)},selectElement:l=>{r.value===l||n.value.includes(l)||t.value.elements.filter(u=>u.lock).some(u=>u.id===l)||e.setActiveElementIdList([l])}}},ix=()=>{const e=pe(),{activeElementIdList:t,activeGroupElementId:n}=te.storeToRefs(ve()),{currentSlide:r}=te.storeToRefs(e),{addHistorySnapshot:a}=Ee();return{moveElement:(l,s=1)=>{let u=[];const c=d=>{let{left:f,top:v}=d;switch(l){case ye.LEFT:f=f-s;break;case ye.RIGHT:f=f+s;break;case ye.UP:v=v-s;break;case ye.DOWN:v=v+s;break}return{...d,left:f,top:v}};n.value?u=r.value.elements.map(d=>n.value===d.id?c(d):d):u=r.value.elements.map(d=>t.value.includes(d.id)?c(d):d),e.updateSlide({elements:u}),a()}}},iu=()=>{const e=pe(),{currentSlide:t}=te.storeToRefs(e),{addHistorySnapshot:n}=Ee(),r=(c,d)=>({minLevel:c.findIndex(f=>f.id===d[0].id),maxLevel:c.findIndex(f=>f.id===d[d.length-1].id)}),a=(c,d)=>{const f=JSON.parse(JSON.stringify(c));if(d.groupId){const v=f.filter(y=>y.groupId===d.groupId),{minLevel:p,maxLevel:h}=r(c,v);if(h===c.length-1)return;const m=f[h+1],g=f.splice(p,v.length);if(m.groupId){const y=f.filter(x=>x.groupId===m.groupId);f.splice(p+y.length,0,...g)}else f.splice(p+1,0,...g)}else{const v=c.findIndex(m=>m.id===d.id);if(v===c.length-1)return;const p=f[v+1],h=f.splice(v,1)[0];if(p.groupId){const m=f.filter(g=>g.groupId===p.groupId);f.splice(v+m.length,0,h)}else f.splice(v+1,0,h)}return f},i=(c,d)=>{const f=JSON.parse(JSON.stringify(c));if(d.groupId){const v=f.filter(g=>g.groupId===d.groupId),{minLevel:p}=r(c,v);if(p===0)return;const h=f[p-1],m=f.splice(p,v.length);if(h.groupId){const g=f.filter(y=>y.groupId===h.groupId);f.splice(p-g.length,0,...m)}else f.splice(p-1,0,...m)}else{const v=c.findIndex(m=>m.id===d.id);if(v===0)return;const p=f[v-1],h=f.splice(v,1)[0];if(p.groupId){const m=f.filter(g=>g.groupId===p.groupId);f.splice(v-m.length,0,h)}else f.splice(v-1,0,h)}return f},l=(c,d)=>{const f=JSON.parse(JSON.stringify(c));if(d.groupId){const v=f.filter(g=>g.groupId===d.groupId),{minLevel:p,maxLevel:h}=r(c,v);if(h===c.length-1)return null;const m=f.splice(p,v.length);f.push(...m)}else{const v=c.findIndex(p=>p.id===d.id);if(v===c.length-1)return null;f.splice(v,1),f.push(d)}return f},s=(c,d)=>{const f=JSON.parse(JSON.stringify(c));if(d.groupId){const v=f.filter(m=>m.groupId===d.groupId),{minLevel:p}=r(c,v);if(p===0)return;const h=f.splice(p,v.length);f.unshift(...h)}else{const v=c.findIndex(p=>p.id===d.id);if(v===0)return;f.splice(v,1),f.unshift(d)}return f};return{orderElement:(c,d)=>{let f;d===ct.UP?f=a(t.value.elements,c):d===ct.DOWN?f=i(t.value.elements,c):d===ct.TOP?f=l(t.value.elements,c):d===ct.BOTTOM&&(f=s(t.value.elements,c)),f&&(e.updateSlide({elements:f}),n())}}},lx=(e=document.documentElement)=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},sx=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ux=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),lu=()=>{const e=q4(),t=pe(),n=()=>{const i=document.querySelector(".center-body");i&&(lx(i),e.setScreening(!0))};return{enterScreening:n,enterScreeningFromStart:()=>{t.updateSlideIndex(0),n()},exitScreening:()=>{e.setScreening(!1),ux()&&sx()}}},jf=()=>{const e=ve(),{canvasPercentage:t,canvasScale:n,canvasDragged:r}=te.storeToRefs(e);return{canvasScalePercentage:o.computed(()=>Math.round(n.value*100)+"%"),setCanvasScalePercentage:u=>{const c=Math.round(u/n.value*t.value)/100;e.setCanvasPercentage(c)},scaleCanvas:u=>{let c=t.value;const d=5,f=200,v=30;u==="+"&&c<=f&&(c+=d),u==="-"&&c>=v&&(c-=d),e.setCanvasPercentage(c)},resetCanvas:()=>{e.setCanvasPercentage(90),r&&e.setCanvasDragged(!1)}}},cx=()=>{const e=ve(),t=on(),{activeElementIdList:n,disableHotkeys:r,handleElement:a,handleElementId:i,editorAreaFocus:l,thumbnailsFocus:s,showSearchPanel:u}=te.storeToRefs(e),{currentSlide:c}=te.storeToRefs(pe()),{ctrlKeyState:d,shiftKeyState:f,spaceKeyState:v}=te.storeToRefs(t),{updateSlideIndex:p,copySlide:h,createSlide:m,deleteSlide:g,cutSlide:y,copyAndPasteSlide:x,selectAllSlide:b}=Po(),{combineElements:S,uncombineElements:_}=qf(),{deleteElement:k}=ou(),{lockElement:w}=L1(),{copyElement:C,cutElement:E,quickCopyElement:L}=Zf(),{selectAllElements:N}=au(),{moveElement:T}=ix(),{orderElement:A}=iu(),{redo:I,undo:D}=Ee(),{enterScreening:V,enterScreeningFromStart:B}=lu(),{scaleCanvas:R,resetCanvas:F}=jf(),W=()=>{n.value.length?C():s.value&&h()},O=()=>{n.value.length?E():s.value&&y()},P=()=>{n.value.length?L():s.value&&x()},$=()=>{l.value&&N(),s.value&&b()},z=()=>{l.value&&w()},Z=()=>{l.value&&S()},Q=()=>{l.value&&_()},J=()=>{n.value.length?k():s.value&&g()},U=j=>{n.value.length?T(j):(j===ye.UP||j===ye.DOWN)&&p(j)},ne=j=>{j===ye.PAGEUP?p(ye.UP):j===ye.PAGEDOWN&&p(ye.DOWN)},K=j=>{a.value&&A(a.value,j)},H=()=>{s.value&&m()},M=()=>{if(!c.value.elements.length)return;if(!i.value){const se=c.value.elements[0];e.setActiveElementIdList([se.id]);return}const j=c.value.elements.findIndex(se=>se.id===i.value),ie=j>=c.value.elements.length-1?0:j+1,ue=c.value.elements[ie].id;e.setActiveElementIdList([ue])},G=j=>{const{ctrlKey:ie,shiftKey:ue,altKey:se,metaKey:ae}=j,Y=ie||ae,ee=j.key.toUpperCase();if(Y&&!d.value&&t.setCtrlKeyState(!0),ue&&!f.value&&t.setShiftKeyState(!0),!r.value&&ee===ye.SPACE&&t.setSpaceKeyState(!0),Y&&ee===ye.P){j.preventDefault(),e.setDialogForExport("pdf");return}if(ue&&ee===ye.F5){j.preventDefault(),V(),t.setShiftKeyState(!1);return}if(ee===ye.F5){j.preventDefault(),B();return}if(ie&&ee===ye.F){j.preventDefault(),e.setSearchPanelState(!u.value);return}if(ie&&ee===ye.MINUS){j.preventDefault(),R("-");return}if(ie&&ee===ye.EQUAL){j.preventDefault(),R("+");return}if(ie&&ee===ye.DIGIT_0){j.preventDefault(),F();return}if(!(!l.value&&!s.value)){if(Y&&ee===ye.C){if(r.value)return;j.preventDefault(),W()}if(Y&&ee===ye.X){if(r.value)return;j.preventDefault(),O()}if(Y&&ee===ye.D){if(r.value)return;j.preventDefault(),P()}if(Y&&ee===ye.Z){if(r.value)return;j.preventDefault(),D()}if(Y&&ee===ye.Y){if(r.value)return;j.preventDefault(),I()}if(Y&&ee===ye.A){if(r.value)return;j.preventDefault(),$()}if(Y&&ee===ye.L){if(r.value)return;j.preventDefault(),z()}if(!ue&&Y&&ee===ye.G){if(r.value)return;j.preventDefault(),Z()}if(ue&&Y&&ee===ye.G){if(r.value)return;j.preventDefault(),Q()}if(se&&ee===ye.F){if(r.value)return;j.preventDefault(),K(ct.TOP)}if(se&&ee===ye.B){if(r.value)return;j.preventDefault(),K(ct.BOTTOM)}if(ee===ye.DELETE||ee===ye.BACKSPACE){if(r.value)return;j.preventDefault(),J()}if(ee===ye.UP){if(r.value)return;j.preventDefault(),U(ye.UP)}if(ee===ye.DOWN){if(r.value)return;j.preventDefault(),U(ye.DOWN)}if(ee===ye.LEFT){if(r.value)return;j.preventDefault(),U(ye.LEFT)}if(ee===ye.RIGHT){if(r.value)return;j.preventDefault(),U(ye.RIGHT)}if(ee===ye.PAGEUP){if(r.value)return;j.preventDefault(),ne(ye.PAGEUP)}if(ee===ye.PAGEDOWN){if(r.value)return;j.preventDefault(),ne(ye.PAGEDOWN)}if(ee===ye.ENTER){if(r.value)return;j.preventDefault(),H()}if(ee===ye.TAB){if(r.value)return;j.preventDefault(),M()}l.value&&!ue&&!Y&&!r.value&&(ee===ye.T?e.setCreatingElement({type:"text"}):ee===ye.R?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"}}):ee===ye.O?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}}):ee===ye.L&&e.setCreatingElement({type:"line",data:{path:"M 0 0 L 20 20",style:"solid",points:["",""]}}))}},X=()=>{d.value&&t.setCtrlKeyState(!1),f.value&&t.setShiftKeyState(!1),v.value&&t.setSpaceKeyState(!1)};o.onMounted(()=>{document.addEventListener("keydown",G),document.addEventListener("keyup",X),window.addEventListener("blur",X)}),o.onUnmounted(()=>{document.removeEventListener("keydown",G),document.removeEventListener("keyup",X),window.removeEventListener("blur",X)})},dx=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:n}=te.storeToRefs(ve()),{pasteTextClipboardData:r}=Xf(),{createImageElement:a}=Vo(),i=s=>{Gr(s).then(u=>a(u))},l=s=>{if(!e.value&&!t.value||n.value||!s.clipboardData)return;const u=s.clipboardData.items,c=u[0];if(!c)return;let d=!1;for(const f of u)if(f.kind==="file"&&f.type.indexOf("image")!==-1){const v=f.getAsFile();v&&i(v),d=!0}d||c.kind==="string"&&c.type==="text/plain"&&c.getAsString(f=>r(f))};o.onMounted(()=>{document.addEventListener("paste",l)}),o.onUnmounted(()=>{document.removeEventListener("paste",l)})},fx=["style","script","template"],vx=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],px={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},hx=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Co=(e,t)=>{const n=t-e.position;Es(e,n)},Es=(e,t)=>{e.position=e.position+t},mx=(e,t)=>{for(;;){const n=e.indexOf("<",t);if(n===-1)return n;const r=e.charAt(n+1);if(r==="/"||r==="!"||/[A-Za-z0-9]/.test(r))return n;t=n+1}return-1},A1=e=>{const{str:t}=e;let n=mx(t,e.position);if(n===e.position)return;n===-1&&(n=t.length);const r=t.slice(e.position,n);Co(e,n),e.tokens.push({type:"text",content:r})},gx=e=>{const{str:t}=e;Es(e,4);let n=t.indexOf("-->",e.position),r=n+3;n===-1&&(n=r=t.length);const a=t.slice(e.position,n);Co(e,r),e.tokens.push({type:"comment",content:a})},yx=e=>{const{str:t}=e,n=t.length;let r=e.position;for(;r<n;){const l=t.charAt(r);if(!(/\s/.test(l)||l==="/"||l===">"))break;r++}let a=r+1;for(;a<n;){const l=t.charAt(a);if(!!(/\s/.test(l)||l==="/"||l===">"))break;a++}Co(e,a);const i=t.slice(r,a);return e.tokens.push({type:"tag",content:i}),i},xx=e=>{const{str:t,tokens:n}=e;let r=e.position,a=null,i=r;const l=[],s=t.length;for(;r<s;){const c=t.charAt(r);if(a){c===a&&(a=null),r++;continue}if(c==="/"||c===">"){r!==i&&l.push(t.slice(i,r));break}if(/\s/.test(c)){r!==i&&l.push(t.slice(i,r)),i=r+1,r++;continue}if(c==="'"||c==='"'){a=c,r++;continue}r++}Co(e,r);const u="attribute";for(let c=0;c<l.length;c++){const d=l[c];if(d.indexOf("=")===-1){const v=l[c+1];if(v&&qe.startsWith(v,"=")){if(v.length>1){const h=d+v;n.push({type:u,content:h}),c+=1;continue}const p=l[c+2];if(c+=1,p){const h=d+"="+p;n.push({type:u,content:h}),c+=1;continue}}}if(qe.endsWith(d,"=")){const v=l[c+1];if(v&&v.indexOf("=")===-1){const h=d+v;n.push({type:u,content:h}),c+=1;continue}const p=d.slice(0,-1);n.push({type:u,content:p});continue}n.push({type:u,content:d})}},bx=(e,t)=>{const{str:n,tokens:r}=t,a=e.toLowerCase(),i=n.length;let l=t.position;for(;l<i;){const s=n.indexOf("</",l);if(s===-1){A1(t);break}const u={str:n,position:t.position,tokens:[]};Co(u,s);const c=M1(u);if(a!==c.toLowerCase()){l=u.position;continue}if(s!==t.position){const d=t.position;Co(t,s),r.push({type:"text",content:n.slice(d,s)})}r.push(...u.tokens),Co(t,u.position);break}},M1=e=>{const{str:t}=e,r=t.charAt(e.position+1)==="/";Es(e,r?2:1),e.tokens.push({type:"tag-start",close:r});const a=yx(e);xx(e);const l=t.charAt(e.position)==="/";return Es(e,l?2:1),e.tokens.push({type:"tag-end",close:l}),a},Sx=e=>{const t=e.str,n=t.length;for(;e.position<n;){const r=e.position;if(A1(e),e.position===r)if(qe.startsWith(t,"!--",r+1))gx(e);else{const i=M1(e),l=i.toLowerCase();fx.includes(l)&&bx(i,e)}}},_x=e=>{const t={str:e,position:0,tokens:[]};return Sx(t),t.tokens},kx=e=>{const t={tagName:null,children:[]};return V1({tokens:e,cursor:0,stack:[t]}),t.children},Cx=(e,t)=>{const n=px[e];if(n){let r=t.length-1;for(;r>=0;){const a=t[r].tagName;if(a===e)break;if(a&&n.includes(a))return!0;r--}}return!1},fp=(e,t)=>{e.splice(t)},V1=e=>{const{stack:t,tokens:n}=e;let{cursor:r}=e,a=t[t.length-1].children;const i=n.length;for(;r<i;){const l=n[r];if(l.type!=="tag-start"){a.push(l),r++;continue}const s=n[++r];r++;const u=s.content.toLowerCase();if(l.close){let g=t.length,y=!1;for(;--g>-1;)if(t[g].tagName===u){y=!0;break}for(;r<i&&n[r].type==="tag-end";)r++;if(y){fp(t,g);break}else continue}let d=vx.includes(u);if(d&&(d=!Cx(u,t)),d){let g=t.length-1;for(;g>0;){if(u===t[g].tagName){fp(t,g);const y=g-1;a=t[y].children;break}g=g-1}}const f=[];let v;for(;r<i;){const g=n[r];if(g.type==="tag-end"){v=g;break}f.push(g.content),r++}if(!v)break;r++;const p=[],h={type:"element",tagName:s.content,attributes:f,children:p};if(a.push(h),!(v.close||hx.includes(u))){t.push({tagName:u,children:p});const g={tokens:n,cursor:r,stack:t};V1(g),r=g.cursor}}e.cursor=r},Ex=(e,t)=>{const n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]},Tx=e=>{const t=e.charAt(0),n=e.length-1;return(t==='"'||t==="'")&&t===e.charAt(n)?e.slice(1,n):e},Nx=e=>e.map(t=>{const n=Ex(t.trim(),"="),r=n[0],a=typeof n[1]=="string"?Tx(n[1]):null;return{key:r,value:a}}),P1=e=>e.map(t=>{if(t.type==="element"){const r=P1(t.children);return{type:"element",tagName:t.tagName.toLowerCase(),attributes:Nx(t.attributes),children:r}}return{type:t.type,content:t.content}}),Ix=e=>{const t=_x(e),n=kx(t);return P1(n)},Lx={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},vp=e=>{const t=new v1.SVGPathData(e),n=[];for(const r of t.commands){const a=Lx[r.type];if((r.type===2||r.type===16)&&n.push({x:r.x,y:r.y,relative:r.relative,type:a}),r.type===32)n.push({x:r.x,y:r.y,curve:{type:"cubic",x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},relative:r.relative,type:a});else if(r.type===128)n.push({x:r.x,y:r.y,curve:{type:"quadratic",x1:r.x1,y1:r.y1},relative:r.relative,type:a});else if(r.type===512){const i=n[n.length-1];if(!["M","L","Q","C"].includes(i.type))continue;const l=s4({px:i.x,py:i.y,cx:r.x,cy:r.y,rx:r.rX,ry:r.rY,xAxisRotation:r.xRot,largeArcFlag:r.lArcFlag,sweepFlag:r.sweepFlag});for(const s of l)n.push({x:s.x,y:s.y,curve:{type:"cubic",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2},relative:!1,type:"C"})}else if(r.type===1)n.push({close:!0,type:a});else continue}return n},pp=e=>{try{const t=new v1.SVGPathData(e),n=[],r=[];for(const a of t.commands){const i="x"in a?a.x:0,l="y"in a?a.y:0;n.push(i),r.push(l)}return{minX:Math.min(...n),minY:Math.min(...r),maxX:Math.max(...n),maxY:Math.max(...r)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},wl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ax="data:image/svg+xml;base64,",Mx=e=>{e=e.replace(/\r\n/g,`
|
|
17
|
+
`);let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},Vx=e=>{let t="",n,r,a,i,l,s,u,c=0;for(e=Mx(e);c<e.length;)n=e.charCodeAt(c++),r=e.charCodeAt(c++),a=e.charCodeAt(c++),i=n>>2,l=(n&3)<<4|r>>4,s=(r&15)<<2|a>>6,u=a&63,isNaN(r)?s=u=64:isNaN(a)&&(u=64),t=t+wl.charAt(i)+wl.charAt(l)+wl.charAt(s)+wl.charAt(u);return t},hp=e=>{const n=new XMLSerializer().serializeToString(e);return Ax+Vx(n)},Px="/api/proxy",sl=()=>{const e=pe(),{slides:t,theme:n,viewportRatio:r,title:a,viewportSize:i}=te.storeToRefs(e),l=16,s=o.computed(()=>96*(i.value/960)),u=o.computed(()=>96/72*(i.value/960)),c=o.ref(!1);function d(T){try{return new URL(T),!0}catch{return!1}}function f(T){return d(T)?`${Px}?url=${encodeURIComponent(T)}`:T}async function v(T){const A=d(T)?f(T):T,I=await fetch(A);if(!I.ok)throw new Error(`Fetch failed: ${I.status}`);const D=await I.blob();return await new Promise((V,B)=>{const R=new FileReader;R.onload=()=>V(String(R.result)),R.onerror=B,R.readAsDataURL(D)})}async function p(T){return E(T)||L(T)?T:await v(T)}const h=(T,A,I,D=!0)=>{c.value=!0;const V=A==="png"?wd.toPng:wd.toJpeg;T.querySelectorAll("foreignObject [xmlns]").forEach(R=>R.removeAttribute("xmlns")),setTimeout(()=>{const R={quality:I,width:1600};D&&(R.fontEmbedCSS=""),V(T,R).then(F=>{c.value=!1,qu.saveAs(F,`${a.value}.${A}`)}).catch(()=>{c.value=!1,Se.error("导出图片失败")})},200)},m=T=>{const A={title:a.value,width:i.value,height:i.value*r.value,theme:n.value,slides:T},I=new Blob([Wf(JSON.stringify(A))],{type:""});qu.saveAs(I,`${a.value}.pptist`)},g=()=>{const T={title:a.value,width:i.value,height:i.value*r.value,theme:n.value,slides:t.value},A=new Blob([JSON.stringify(T)],{type:""});qu.saveAs(A,`${a.value}.json`)},y=()=>{const T={title:a.value,width:i.value,height:i.value*r.value,theme:n.value,slides:t.value};return JSON.stringify(T||"")},x=T=>{if(!T)return{alpha:0,color:"#000000"};const A=Ne(T),I=A.getAlpha(),D=I===0?"#ffffff":A.setAlpha(1).toHexString();return{alpha:I,color:D}},b=T=>{const A=Ix(T);let I=!1,D=0;const V=[],B=(R,F={})=>{for(const W of R){if("tagName"in W&&["div","li","p"].includes(W.tagName)&&V.length){const z=V[V.length-1];z.options||(z.options={}),z.options.breakLine=!0}const P={...F},$="attributes"in W?W.attributes.find(z=>z.key==="style"):null;if($&&$.value){const z=$.value.split(";");for(const Z of z){const[Q,J]=Z.split(": "),[U,ne]=[qe.trim(Q),qe.trim(J)];U&&ne&&(P[U]=ne)}}if("tagName"in W){if(W.tagName==="em"&&(P["font-style"]="italic"),W.tagName==="strong"&&(P["font-weight"]="bold"),W.tagName==="sup"&&(P["vertical-align"]="super"),W.tagName==="sub"&&(P["vertical-align"]="sub"),W.tagName==="a"){const z=W.attributes.find(Z=>Z.key==="href");P.href=z?.value||""}if(W.tagName==="ul"&&(P["list-type"]="ul"),W.tagName==="ol"&&(P["list-type"]="ol"),W.tagName==="li"&&(I=!0),W.tagName==="p"&&"attributes"in W){const z=W.attributes.find(Z=>Z.key==="data-indent");z&&z.value&&(D=+z.value)}}if("tagName"in W&&W.tagName==="br")V.push({text:"",options:{breakLine:!0}});else if("content"in W){const z=W.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),Z={};P["font-size"]&&(Z.fontSize=parseInt(P["font-size"])/u.value),P.color&&(Z.color=x(P.color).color),P["background-color"]&&(Z.highlight=x(P["background-color"]).color),P["text-decoration-line"]&&(P["text-decoration-line"].indexOf("underline")!==-1&&(Z.underline={color:Z.color||"#000000",style:"sng"}),P["text-decoration-line"].indexOf("line-through")!==-1&&(Z.strike="sngStrike")),P["text-decoration"]&&(P["text-decoration"].indexOf("underline")!==-1&&(Z.underline={color:Z.color||"#000000",style:"sng"}),P["text-decoration"].indexOf("line-through")!==-1&&(Z.strike="sngStrike")),P["vertical-align"]&&(P["vertical-align"]==="super"&&(Z.superscript=!0),P["vertical-align"]==="sub"&&(Z.subscript=!0)),P["text-align"]&&(Z.align=P["text-align"]),P["font-weight"]&&(Z.bold=P["font-weight"]==="bold"),P["font-style"]&&(Z.italic=P["font-style"]==="italic"),P["font-family"]&&(Z.fontFace=P["font-family"]),P.href&&(Z.hyperlink={url:P.href}),I&&P["list-type"]==="ol"&&(Z.bullet={type:"number",indent:(Z.fontSize||l)*1.25},Z.paraSpaceBefore=.1,I=!1),I&&P["list-type"]==="ul"&&(Z.bullet={indent:(Z.fontSize||l)*1.25},Z.paraSpaceBefore=.1,I=!1),D&&(Z.indentLevel=D,D=0),V.push({text:z,options:Z})}else"children"in W&&B(W.children,P)}};return B(A),V},S=(T,A={x:1,y:1})=>T.map(I=>{if(I.close!==void 0)return{close:!0};if(I.type==="M")return{x:I.x/s.value*A.x,y:I.y/s.value*A.y,moveTo:!0};if(I.curve){if(I.curve.type==="cubic")return{x:I.x/s.value*A.x,y:I.y/s.value*A.y,curve:{type:"cubic",x1:I.curve.x1/s.value*A.x,y1:I.curve.y1/s.value*A.y,x2:I.curve.x2/s.value*A.x,y2:I.curve.y2/s.value*A.y}};if(I.curve.type==="quadratic")return{x:I.x/s.value*A.x,y:I.y/s.value*A.y,curve:{type:"quadratic",x1:I.curve.x1/s.value*A.x,y1:I.curve.y1/s.value*A.y}}}return{x:I.x/s.value*A.x,y:I.y/s.value*A.y}}),_=T=>{const A=x(T.color),{h:I,v:D}=T;let V=4,B=45;return I===0&&D===0?(V=4,B=45):I===0?D>0?(V=D,B=90):(V=-D,B=270):D===0?I>0?(V=I,B=1):(V=-I,B=180):I>0&&D>0?(V=Math.max(I,D),B=45):I>0&&D<0?(V=Math.max(I,-D),B=315):I<0&&D>0?(V=Math.max(-I,D),B=135):I<0&&D<0&&(V=Math.max(-I,-D),B=225),{type:"outer",color:A.color.replace("#",""),opacity:A.alpha,blur:T.blur/u.value,offset:V,angle:B}},k={solid:"solid",dashed:"dash",dotted:"sysDot"},w=T=>{const A=x(T?.color||"#000000");return{color:A.color,transparency:(1-A.alpha)*100,width:(T.width||1)/u.value,dashType:T.style?k[T.style]:"solid"}},C=T=>{const{type:A,target:I}=T;if(A==="web")return{url:I};if(A==="slide"){const D=t.value.findIndex(V=>V.id===I);if(D!==-1)return{slide:D+1}}return null},E=T=>{const A=/^data:image\/[^;]+;base64,/;return T.match(A)!==null},L=T=>{const A=/^data:image\/svg\+xml;base64,/.test(T),I=/\.svg$/.test(T);return A||I};return{exporting:c,exportImage:h,exportJSON:g,exportSpecificFile:m,exportPPTX:async(T,A,I)=>{var D,V,B,R,F,W,O,P,$,z,Z,Q,J,U;c.value=!0;const ne=new l4;if(r.value===.625?ne.layout="LAYOUT_16x10":r.value===.75?ne.layout="LAYOUT_4x3":r.value===.70710678?(ne.defineLayout({name:"A3",width:10,height:7.0710678}),ne.layout="A3"):r.value===1.41421356?(ne.defineLayout({name:"A3_V",width:10,height:14.1421356}),ne.layout="A3_V"):ne.layout="LAYOUT_16x9",A){const{color:K,alpha:H}=x(n.value.backgroundColor);ne.defineSlideMaster({title:"PPTIST_MASTER",background:{color:K,transparency:(1-H)*100}})}for(const K of T){const H=ne.addSlide();if(K.background){const M=K.background;if(M.type==="image"&&M.image)if(L(M.image.src))H.addImage({data:M.image.src,x:0,y:0,w:i.value/s.value,h:i.value*r.value/s.value});else if(E(M.image.src))H.background={data:M.image.src};else{const G=await p(M.image.src);H.background={data:G}}else if(M.type==="solid"&&M.color){const G=x(M.color);H.background={color:G.color,transparency:(1-G.alpha)*100}}else if(M.type==="gradient"&&M.gradient){const G=M.gradient.colors,X=G[0].color,j=G[G.length-1].color,ie=Ne.mix(X,j).toHexString(),ue=x(ie);H.background={color:ue.color,transparency:(1-ue.alpha)*100}}}if(K.remark){const G=new DOMParser().parseFromString(K.remark,"text/html").body.querySelectorAll("p"),X=[];for(const j of G){const ie=j.textContent;X.push(ie||"")}H.addNotes(X.join(`
|
|
18
|
+
`))}if(K.elements){for(const M of K.elements)if(M.type==="text"){const G=b(M.content),X={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,fontSize:l/u.value,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10/u.value,paraSpaceBefore:5/u.value,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(M.rotate&&(X.rotate=M.rotate),M.wordSpace&&(X.charSpacing=M.wordSpace/u.value),M.lineHeight&&(X.lineSpacingMultiple=M.lineHeight/1.25),M.fill){const j=x(M.fill),ie=M.opacity===void 0?1:M.opacity;X.fill={color:j.color,transparency:(1-j.alpha*ie)*100}}M.defaultColor&&(X.color=x(M.defaultColor).color),M.defaultFontName&&(X.fontFace=M.defaultFontName),M.shadow&&(X.shadow=_(M.shadow)),M.outline&&M.outline.width&&M.outline.width>0&&(X.line=w(M.outline)),M.opacity!==void 0&&(X.transparency=(1-M.opacity)*100),M.paragraphSpace!==void 0&&(X.paraSpaceBefore=M.paragraphSpace/u.value),M.vertical&&(X.vert="eaVert"),H.addText(G,X)}else if(M.type==="image"){const G={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value};if(E(M.src)?G.data=M.src:G.data=await p(M.src),M.flipH&&(G.flipH=M.flipH),M.flipV&&(G.flipV=M.flipV),M.rotate&&(G.rotate=M.rotate),M.link){const X=C(M.link);X&&(G.hyperlink=X)}if(!((D=M.filters)===null||D===void 0)&&D.opacity&&(G.transparency=100-parseInt((V=M.filters)===null||V===void 0?void 0:V.opacity)),M.clip){M.clip.shape==="ellipse"&&(G.rounding=!0);const[X,j]=M.clip.range,[ie,ue]=X,[se,ae]=j,Y=M.width/((se-ie)/s.value),ee=M.height/((ae-ue)/s.value);G.w=Y/s.value,G.h=ee/s.value,G.sizing={type:"crop",x:ie/s.value*Y/s.value,y:ue/s.value*ee/s.value,w:(se-ie)/s.value*Y/s.value,h:(ae-ue)/s.value*ee/s.value}}H.addImage(G)}else if(M.type==="shape"){if(M.special){const G=document.querySelector(`.thumbnail-list .base-element-${M.id} svg`);if(G.clientWidth<1||G.clientHeight<1)continue;const j={data:hp(G),x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value};if(M.rotate&&(j.rotate=M.rotate),M.flipH&&(j.flipH=M.flipH),M.flipV&&(j.flipV=M.flipV),M.fill){const ie=x(M.fill),ue=M.opacity===void 0?1:M.opacity,se=ie.alpha*ue;se<1&&(j.transparency=(1-se)*100)}else M.opacity!==void 0&&M.opacity<1&&(j.transparency=(1-M.opacity)*100);if(M.link){const ie=C(M.link);ie&&(j.hyperlink=ie)}H.addImage(j)}else{const G={x:M.width/M.viewBox[0],y:M.height/M.viewBox[1]},X=S(vp(M.path),G);let j=x(M.fill);if(M.gradient){const se=M.gradient.colors,ae=se[0].color,Y=se[se.length-1].color,ee=Ne.mix(ae,Y).toHexString();j=x(ee)}M.pattern&&(j=x("#00000000"));const ie=M.opacity===void 0?1:M.opacity,ue={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,fill:{color:j.color,transparency:(1-j.alpha*ie)*100},points:X};if(M.flipH&&(ue.flipH=M.flipH),M.flipV&&(ue.flipV=M.flipV),M.shadow&&(ue.shadow=_(M.shadow)),M.outline&&M.outline.width&&M.outline.width>0&&(ue.line=w(M.outline)),M.rotate&&(ue.rotate=M.rotate),M.link){const se=C(M.link);se&&(ue.hyperlink=se)}H.addShape("custGeom",ue)}if(M.text){const G=b(M.text.content),X={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,fontSize:l/u.value,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/u.value,valign:M.text.align};M.rotate&&(X.rotate=M.rotate),M.text.defaultColor&&(X.color=x(M.text.defaultColor).color),M.text.defaultFontName&&(X.fontFace=M.text.defaultFontName),H.addText(G,X)}if(M.pattern){const G={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value};if(E(M.pattern)?G.data=M.pattern:G.data=await p(M.pattern),M.flipH&&(G.flipH=M.flipH),M.flipV&&(G.flipV=M.flipV),M.rotate&&(G.rotate=M.rotate),M.link){const X=C(M.link);X&&(G.hyperlink=X)}H.addImage(G)}}else if(M.type==="line"){const G=Uf(M),X=S(vp(G)),{minX:j,maxX:ie,minY:ue,maxY:se}=fn(M),ae=x(M.color),Y={x:M.left/s.value,y:M.top/s.value,w:(ie-j)/s.value,h:(se-ue)/s.value,line:{color:ae.color,transparency:(1-ae.alpha)*100,width:M.width/u.value,dashType:k[M.style],beginArrowType:M.points[0]?"arrow":"none",endArrowType:M.points[1]?"arrow":"none"},points:X};M.shadow&&(Y.shadow=_(M.shadow)),H.addShape("custGeom",Y)}else if(M.type==="chart"){const G=[];for(let ae=0;ae<M.data.series.length;ae++){const Y=M.data.series[ae];G.push({name:`系列${ae+1}`,labels:M.data.labels,values:Y})}let X=[];if(M.themeColors.length===10)X=M.themeColors.map(ae=>x(ae).color);else if(M.themeColors.length===1)X=Ne(M.themeColors[0]).analogous(10).map(ae=>x(ae.toHexString()).color);else{const ae=M.themeColors.length,Y=Ne(M.themeColors[ae-1]).analogous(11-ae).map(ee=>ee.toHexString());X=[...M.themeColors.slice(0,ae-1),...Y].map(ee=>x(ee).color)}const j={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,chartColors:M.chartType==="pie"||M.chartType==="ring"?X:X.slice(0,M.data.series.length)},ie=x(M.textColor||"#000000").color;j.catAxisLabelColor=ie,j.valAxisLabelColor=ie;const ue=14/u.value;if(j.catAxisLabelFontSize=ue,j.valAxisLabelFontSize=ue,M.fill||M.outline){const ae={};M.fill&&(ae.fill={color:x(M.fill).color}),M.outline&&(ae.border={pt:M.outline.width/u.value,color:x(M.outline.color).color}),j.plotArea=ae}(M.data.series.length>1&&M.chartType!=="scatter"||M.chartType==="pie"||M.chartType==="ring")&&(j.showLegend=!0,j.legendPos="b",j.legendColor=ie,j.legendFontSize=ue);let se=ne.ChartType.bar;M.chartType==="bar"?(se=ne.ChartType.bar,j.barDir="col",!((B=M.options)===null||B===void 0)&&B.stack&&(j.barGrouping="stacked")):M.chartType==="column"?(se=ne.ChartType.bar,j.barDir="bar",!((R=M.options)===null||R===void 0)&&R.stack&&(j.barGrouping="stacked")):M.chartType==="line"?(se=ne.ChartType.line,!((F=M.options)===null||F===void 0)&&F.lineSmooth&&(j.lineSmooth=!0)):M.chartType==="area"?se=ne.ChartType.area:M.chartType==="radar"?se=ne.ChartType.radar:M.chartType==="scatter"?(se=ne.ChartType.scatter,j.lineSize=0):M.chartType==="pie"?se=ne.ChartType.pie:M.chartType==="ring"&&(se=ne.ChartType.doughnut,j.holeSize=60),H.addChart(se,G,j)}else if(M.type==="table"){const G=[];for(let ae=0;ae<M.data.length;ae++){const Y=M.data[ae];for(let ee=0;ee<Y.length;ee++){const ce=Y[ee];if(ce.colspan>1||ce.rowspan>1)for(let de=ae;de<ae+ce.rowspan;de++)for(let De=de===ae?ee+1:ee;De<ee+ce.colspan;De++)G.push(`${de}_${De}`)}}const X=[],j=M.theme;let ie=null,ue=[];j&&(ie=x(j.color),ue=j4(j.color).map(ae=>x(ae)));for(let ae=0;ae<M.data.length;ae++){const Y=M.data[ae],ee=[];for(let ce=0;ce<Y.length;ce++){const de=Y[ce],De={colspan:de.colspan,rowspan:de.rowspan,bold:((W=de.style)===null||W===void 0?void 0:W.bold)||!1,italic:((O=de.style)===null||O===void 0?void 0:O.em)||!1,underline:{style:!((P=de.style)===null||P===void 0)&&P.underline?"sng":"none"},align:(($=de.style)===null||$===void 0?void 0:$.align)||"left",valign:"middle",fontFace:((z=de.style)===null||z===void 0?void 0:z.fontname)||"微软雅黑",fontSize:(!((Z=de.style)===null||Z===void 0)&&Z.fontsize?parseInt((Q=de.style)===null||Q===void 0?void 0:Q.fontsize):14)/u.value};if(j&&ie){let Re;ae%2===0?Re=ue[1]:Re=ue[0],(j.rowHeader&&ae===0||j.rowFooter&&ae===M.data.length-1||j.colHeader&&ce===0||j.colFooter&&ce===Y.length-1)&&(Re=ie),De.fill={color:Re.color,transparency:(1-Re.alpha)*100}}if(!((J=de.style)===null||J===void 0)&&J.backcolor){const Re=x(de.style.backcolor);De.fill={color:Re.color,transparency:(1-Re.alpha)*100}}!((U=de.style)===null||U===void 0)&&U.color&&(De.color=x(de.style.color).color),G.includes(`${ae}_${ce}`)||ee.push({text:de.text,options:De})}ee.length&&X.push(ee)}const se={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,colW:M.colWidths.map(ae=>M.width*ae/s.value)};M.theme&&(se.fill={color:"#ffffff"}),M.outline.width&&M.outline.color&&(se.border={type:M.outline.style==="solid"?"solid":"dash",pt:M.outline.width/u.value,color:x(M.outline.color).color}),H.addTable(X,se)}else if(M.type==="latex"){const G=document.querySelector(`.thumbnail-list .base-element-${M.id} svg`),j={data:hp(G),x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value};if(M.link){const ie=C(M.link);ie&&(j.hyperlink=ie)}H.addImage(j)}else if(!I&&(M.type==="video"||M.type==="audio")){const G={x:M.left/s.value,y:M.top/s.value,w:M.width/s.value,h:M.height/s.value,path:M.src,type:M.type};M.type==="video"&&M.poster&&(G.cover=await p(M.poster));const X=M.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);X&&X[1]?G.extn=X[1]:M.ext&&(G.extn=M.ext);const j=["avi","mp4","m4v","mov","wmv"],ie=["mp3","m4a","mp4","wav","wma"];G.extn&&[...j,...ie].includes(G.extn)&&H.addMedia(G)}}}setTimeout(()=>{ne.writeFile({fileName:`${a.value}.pptx`}).then(()=>c.value=!1).catch(()=>{c.value=!1,Se.error("导出失败")})},200)},getSaveJSON:y}},mp=(e,t)=>e.replace(/font-size:\s*([\d.]+)pt/g,(n,r)=>`font-size: ${(parseFloat(r)*t).toFixed(1)}px`),D1=()=>{const e=pe(),{theme:t}=te.storeToRefs(pe()),{addHistorySnapshot:n}=Ee(),{addSlidesFromData:r}=ll(),{isEmptySlide:a}=Po(),i=o.ref(!1),l=h=>{try{const m=JSON.parse(h),{title:g,width:y,height:x,theme:b,slides:S}=m;g&&e.setTitle(g),y&&e.setViewportSize(y),y&&x&&e.setViewportRatio(x/y),b&&e.setTheme(b),a.value?(e.setSlides(S),n()):r(S)}catch{Se.error("无法正确读取 / 解析该文件")}},s=(h,m=!1)=>{const g=h[0],y=new FileReader;y.addEventListener("load",()=>{try{const{slides:x}=JSON.parse(y.result);m?(e.updateSlideIndex(0),e.setSlides(x),n()):a.value?(e.setSlides(x),n()):r(x)}catch{Se.error("无法正确读取 / 解析该文件")}}),y.readAsText(g)},u=(h,m=!1)=>{const g=h[0],y=new FileReader;y.addEventListener("load",()=>{try{const{slides:x}=JSON.parse(k1(y.result));m?(e.updateSlideIndex(0),e.setSlides(x),n()):a.value?(e.setSlides(x),n()):r(x)}catch{Se.error("无法正确读取 / 解析该文件")}}),y.readAsText(g)},c=(h,m)=>{const{start:g,end:y}=h,x=m*Math.PI/180,b=(g[0]+y[0])/2,S=(g[1]+y[1])/2,_=g[0]-b,k=g[1]-S,w=y[0]-b,C=y[1]-S,E=Math.cos(x),L=Math.sin(x),N=_*E-k*L,T=_*L+k*E,A=w*E-C*L,I=w*L+C*E,D=N+b,V=T+S,B=A+b,R=I+S,F=Math.min(g[0],y[0]),W=Math.min(g[1],y[1]),O=Math.min(D,B),P=Math.min(V,R),$=D-O,z=V-P,Z=B-O,Q=R-P,J=[$,z],U=[Z,Q],ne=[O-F,P-W];return{start:J,end:U,offset:ne}},d=(h,m)=>{let g=[0,0],y=[0,0];!h.isFlipV&&!h.isFlipH?(g=[0,0],y=[h.width,h.height]):h.isFlipV&&h.isFlipH?(g=[h.width,h.height],y=[0,0]):h.isFlipV&&!h.isFlipH?(g=[0,h.height],y=[h.width,0]):(g=[h.width,0],y=[0,h.height]);const x={type:"line",id:Te.nanoid(10),width:+((h.borderWidth||1)*m).toFixed(2),left:h.left,top:h.top,start:g,end:y,style:h.borderType,color:h.borderColor,points:["",/straightConnector/.test(h.shapType)?"arrow":""]};if(h.rotate){const{start:b,end:S,offset:_}=c(x,h.rotate);x.start=b,x.end=S,x.left=x.left+_[0],x.top=x.top+_[1]}if(/bentConnector/.test(h.shapType)&&(x.broken2=[Math.abs(x.start[0]-x.end[0])/2,Math.abs(x.start[1]-x.end[1])/2]),/curvedConnector/.test(h.shapType)){const b=[Math.abs(x.start[0]-x.end[0])/2,Math.abs(x.start[1]-x.end[1])/2];x.cubic=[b,b]}return x},f=(h,m)=>{const g=Math.min(...h.map(k=>k.left)),y=Math.max(...h.map(k=>k.left+k.width)),x=Math.min(...h.map(k=>k.top)),b=Math.max(...h.map(k=>k.top+k.height)),S=(g+y)/2,_=(x+b)/2;return h.map(k=>{const w={...k};return m==="y"&&(w.left=2*S-k.left-k.width),m==="x"&&(w.top=2*_-k.top-k.height),w})},v=(h,m,g,y,x,b,S)=>{const _=S*(Math.PI/180),k=h+g/2,w=m+y/2,C=x-g/2,E=b-y/2,L=C*Math.cos(_)+E*Math.sin(_),N=-C*Math.sin(_)+E*Math.cos(_),T=k+L,A=w+N;return{x:T,y:A}};return{importSpecificFile:u,importJSON:s,importPPTXFile:(h,m)=>{const g={cover:!1,fixedViewport:!1},{cover:y,fixedViewport:x}={...g,...m},b=h[0];if(!b)return;i.value=!0;const S=[];for(const k of Yf)S.push(...k.children);const _=new FileReader;_.onload=async k=>{let w=null;try{w=await u4.parse(k.target.result)}catch{i.value=!1,Se.error("无法正确读取 / 解析该文件");return}let C=96/72;const E=w.size.width;x?C=1e3/E:e.setViewportSize(E*C),e.setTheme({themeColors:w.themeColors});const L=[];for(const N of w.slides){const{type:T,value:A}=N.fill;let I;T==="image"?I={type:"image",image:{src:A.picBase64,size:"cover"}}:T==="gradient"?I={type:"gradient",gradient:{type:A.path==="line"?"linear":"radial",colors:A.colors.map(B=>({...B,pos:parseInt(B.pos)})),rotate:A.rot+90}}:I={type:"solid",color:A||"#fff"};const D={id:Te.nanoid(10),elements:[],background:I,remark:N.note||""},V=B=>{var R,F,W;const O=B.sort((P,$)=>P.order-$.order);for(const P of O){const $=P.width||1,z=P.height||1,Z=P.left,Q=P.top;if(P.width=P.width*C,P.height=P.height*C,P.left=P.left*C,P.top=P.top*C,P.type==="text"){const J={type:"text",id:Te.nanoid(10),width:P.width,height:P.height,left:P.left,top:P.top,rotate:P.rotate,defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,content:mp(P.content,C),lineHeight:1,outline:{color:P.borderColor,width:+(P.borderWidth*C).toFixed(2),style:P.borderType},fill:P.fill.type==="color"?P.fill.value:"",vertical:P.isVertical};P.shadow&&(J.shadow={h:P.shadow.h*C,v:P.shadow.v*C,blur:P.shadow.blur*C,color:P.shadow.color}),D.elements.push(J)}else if(P.type==="image"){const J={type:"image",id:Te.nanoid(10),src:P.src,width:P.width,height:P.height,left:P.left,top:P.top,fixedRatio:!0,rotate:P.rotate,flipH:P.isFlipH,flipV:P.isFlipV};P.borderWidth&&(J.outline={color:P.borderColor,width:+(P.borderWidth*C).toFixed(2),style:P.borderType});const U=["roundRect","ellipse","triangle","rhombus","pentagon","hexagon","heptagon","octagon","parallelogram","trapezoid"];P.rect?J.clip={shape:P.geom&&U.includes(P.geom)?P.geom:"rect",range:[[P.rect.l||0,P.rect.t||0],[100-(P.rect.r||0),100-(P.rect.b||0)]]}:P.geom&&U.includes(P.geom)&&(J.clip={shape:P.geom,range:[[0,0],[100,100]]}),D.elements.push(J)}else if(P.type==="math")D.elements.push({type:"image",id:Te.nanoid(10),src:P.picBase64,width:P.width,height:P.height,left:P.left,top:P.top,fixedRatio:!0,rotate:0});else if(P.type==="audio")D.elements.push({type:"audio",id:Te.nanoid(10),src:P.blob,width:P.width,height:P.height,left:P.left,top:P.top,rotate:0,fixedRatio:!1,color:t.value.themeColors[0],loop:!1,autoplay:!1});else if(P.type==="video")D.elements.push({type:"video",id:Te.nanoid(10),src:P.blob||P.src,width:P.width,height:P.height,left:P.left,top:P.top,rotate:0,autoplay:!1});else if(P.type==="shape")if(P.shapType==="line"||/Connector/.test(P.shapType)){const J=d(P,C);D.elements.push(J)}else{const J=S.find(G=>G.pptxShapeType===P.shapType),U={mid:"middle",down:"bottom",up:"top"},ne=((R=P.fill)===null||R===void 0?void 0:R.type)==="gradient"?{type:P.fill.value.path==="line"?"linear":"radial",colors:P.fill.value.colors.map(G=>({...G,pos:parseInt(G.pos)})),rotate:P.fill.value.rot}:void 0,K=((F=P.fill)===null||F===void 0?void 0:F.type)==="image"?P.fill.value.picBase64:void 0,H=((W=P.fill)===null||W===void 0?void 0:W.type)==="color"?P.fill.value:"",M={type:"shape",id:Te.nanoid(10),width:P.width,height:P.height,left:P.left,top:P.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:H,gradient:ne,pattern:K,fixedRatio:!1,rotate:P.rotate,outline:{color:P.borderColor,width:+(P.borderWidth*C).toFixed(2),style:P.borderType},text:{content:mp(P.content,C),defaultFontName:t.value.fontName,defaultColor:t.value.fontColor,align:U[P.vAlign]||"middle"},flipH:P.isFlipH,flipV:P.isFlipV};if(P.shadow&&(M.shadow={h:P.shadow.h*C,v:P.shadow.v*C,blur:P.shadow.blur*C,color:P.shadow.color}),J){if(M.path=J.path,M.viewBox=J.viewBox,J.pathFormula){M.pathFormula=J.pathFormula,M.viewBox=[P.width,P.height];const G=Mo[J.pathFormula];"editable"in G&&G.editable?(M.path=G.formula(P.width,P.height,G.defaultValue),M.keypoints=G.defaultValue):M.path=G.formula(P.width,P.height)}}else if(P.path&&P.path.indexOf("NaN")===-1){const{maxX:G,maxY:X}=pp(P.path);M.path=P.path,G/X>$/z?M.viewBox=[G,G*z/$]:M.viewBox=[X*$/z,X]}if(P.shapType==="custom"){P.path.indexOf("NaN")!==-1?(M.width===0&&(M.width=.1),M.height===0&&(M.height=.1),M.path=P.path.replace(/NaN/g,"0")):(M.special=!0,M.path=P.path);const{maxX:G,maxY:X}=pp(M.path);G/X>$/z?M.viewBox=[G,G*z/$]:M.viewBox=[X*$/z,X]}M.path&&D.elements.push(M)}else if(P.type==="table"){const J=P.data.length,U=P.data[0].length,ne={fontname:t.value.fontName,color:t.value.fontColor},K=[];for(let se=0;se<J;se++){const ae=[];for(let Y=0;Y<U;Y++){const ee=P.data[se][Y];let ce=document.createElement("div");ce.innerHTML=ee.text;const de=ce.querySelector("p"),De=de?.style.textAlign||"left",Re=ce.querySelector("span"),jn=Re?.style.fontSize?(parseInt(Re?.style.fontSize)*C).toFixed(1)+"px":"",$o=Re?.style.fontFamily||"",Oo=Re?.style.color||ee.fontColor;ae.push({id:Te.nanoid(10),colspan:ee.colSpan||1,rowspan:ee.rowSpan||1,text:ce.innerText,style:{...ne,align:["left","right","center"].includes(De)?De:"left",fontsize:jn,fontname:$o,color:Oo,bold:ee.fontBold,backcolor:ee.fillColor}}),ce=null}K.push(ae)}const H=P.colWidths.reduce((se,ae)=>se+ae,0),M=P.colWidths.map(se=>se/H),G=P.data[0][0],X=G.borders.top||G.borders.bottom||P.borders.top||P.borders.bottom||G.borders.left||G.borders.right||P.borders.left||P.borders.right,j=X?.borderWidth||0,ie=X?.borderType||"solid",ue=X?.borderColor||"#eeece1";D.elements.push({type:"table",id:Te.nanoid(10),width:P.width,height:P.height,left:P.left,top:P.top,colWidths:M,rotate:0,data:K,outline:{width:+(j*C||2).toFixed(2),style:ie,color:ue},cellMinHeight:P.rowHeights[0]?P.rowHeights[0]*C:36})}else if(P.type==="chart"){let J,U,ne;if(P.chartType==="scatterChart"||P.chartType==="bubbleChart")J=P.data[0].map((M,G)=>`坐标${G+1}`),U=["X","Y"],ne=P.data;else{const M=P.data;J=Object.values(M[0].xlabels),U=M.map(G=>G.key),ne=M.map(G=>G.values.map(X=>X.y))}const K={};let H="bar";switch(P.chartType){case"barChart":case"bar3DChart":H="bar",P.barDir==="bar"&&(H="column"),(P.grouping==="stacked"||P.grouping==="percentStacked")&&(K.stack=!0);break;case"lineChart":case"line3DChart":(P.grouping==="stacked"||P.grouping==="percentStacked")&&(K.stack=!0),H="line";break;case"areaChart":case"area3DChart":(P.grouping==="stacked"||P.grouping==="percentStacked")&&(K.stack=!0),H="area";break;case"scatterChart":case"bubbleChart":H="scatter";break;case"pieChart":case"pie3DChart":H="pie";break;case"radarChart":H="radar";break;case"doughnutChart":H="ring";break}D.elements.push({type:"chart",id:Te.nanoid(10),chartType:H,width:P.width,height:P.height,left:P.left,top:P.top,rotate:0,themeColors:P.colors.length?P.colors:t.value.themeColors,textColor:t.value.fontColor,data:{labels:J,legends:U,series:ne},options:K})}else if(P.type==="group"){let J=P.elements.map(U=>{let ne=U.left+Z,K=U.top+Q;if(P.rotate){const{x:M,y:G}=v(Z,Q,$,z,U.left,U.top,P.rotate);ne=M,K=G}const H={...U,left:ne,top:K};return P.isFlipH&&"isFlipH"in H&&(H.isFlipH=!0),P.isFlipV&&"isFlipV"in H&&(H.isFlipV=!0),H});P.isFlipH&&(J=f(J,"y")),P.isFlipV&&(J=f(J,"x")),V(J)}else if(P.type==="diagram"){const J=P.elements.map(U=>({...U,left:U.left+Z,top:U.top+Q}));V(J)}}};V([...N.elements,...N.layoutElements]),L.push(D)}y?(e.updateSlideIndex(0),e.setSlides(L),n()):a.value?(e.setSlides(L),n()):r(L),i.value=!1},_.readAsArrayBuffer(b)},importJSONStr:l,exporting:i}},Dx={class:"hotkey-doc"},Bx={class:"title"},Rx={class:"label"},$x={class:"value"},Ox={key:1,class:"row"},Fx={__name:"HotkeyDoc",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",Dx,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(ex),r=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:r.type},[o.createElementVNode("div",Bx,o.toDisplayString(r.type),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.children,a=>(o.openBlock(),o.createElementBlock("div",{class:"hotkey-item",key:a.label},[a.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",Rx,o.toDisplayString(a.label),1),o.createElementVNode("div",$x,o.toDisplayString(a.value),1)],64)):(o.openBlock(),o.createElementBlock("div",Ox,o.toDisplayString(a.label),1))]))),128))],64))),128))]))}},zx=oe(Fx,[["__scopeId","data-v-f1628749"]]),Hx=["accept"],Gx={__name:"FileInput",props:{accept:{type:String,default:"image/*"}},emits:["change"],setup(e,{emit:t}){const n=t,r=o.useTemplateRef("inputRef"),a=()=>{r.value&&(r.value.value="",r.value.click())},i=l=>{const s=l.target.files;s&&n("change",s)};return(l,s)=>(o.openBlock(),o.createElementBlock("div",{class:"file-input",onClick:s[2]||(s[2]=u=>a())},[o.renderSlot(l.$slots,"default",{},void 0,!0),o.createElementVNode("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:r,accept:e.accept,onChange:s[0]||(s[0]=u=>i(u)),onClick:s[1]||(s[1]=o.withModifiers(()=>{},["stop"]))},null,40,Hx)]))}},ul=oe(Gx,[["__scopeId","data-v-1cbab667"]]),Ux={class:"spin"},Wx={class:"text"},Yx={__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},tip:{type:String,default:""}},setup(e){return(t,n)=>e.loading?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["fullscreen-spin",{mask:e.mask}])},[o.createElementVNode("div",Ux,[n[0]||(n[0]=o.createElementVNode("div",{class:"spinner"},null,-1)),o.createElementVNode("div",Wx,o.toDisplayString(e.tip),1)])],2)):o.createCommentVNode("",!0)}},Ts=oe(Yx,[["__scopeId","data-v-af49b397"]]),Xx={class:"header"},qx={__name:"Drawer",props:{visible:{type:Boolean,required:!0},width:{type:Number,default:320},contentStyle:{type:Object},placement:{type:String,default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(!1),i=o.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));return(l,s)=>{const u=o.resolveComponent("AiPptClose");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=c=>a.value=!1),onBeforeEnter:s[2]||(s[2]=c=>a.value=!0)},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(["drawer",e.placement]),style:o.normalizeStyle({width:n.width+"px"})},[o.createElementVNode("div",Xx,[o.renderSlot(l.$slots,"title",{},void 0,!0),o.createElementVNode("span",{class:"close-btn",onClick:s[0]||(s[0]=c=>r("update:visible",!1))},[o.createVNode(u)])]),a.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"content",style:o.normalizeStyle(i.value)},[o.renderSlot(l.$slots,"default",{},void 0,!0)],4)):o.createCommentVNode("",!0)],6),[[o.vShow,e.visible]])]),_:3},8,["name"])])}}},gp=oe(qx,[["__scopeId","data-v-a54f19b2"]]),Zx={class:"prefix"},jx=["disabled","value","placeholder","maxlength"],Jx={class:"suffix"},Kx={__name:"Input",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},simple:{type:Boolean,default:!1},maxlength:{type:Number}},emits:["update:value","change","enter","backspace","blur","focus"],setup(e,{expose:t,emit:n}){const r=n,a=o.ref(!1),i=d=>{r("update:value",d.target.value)},l=d=>{a.value=!1,r("blur",d)},s=d=>{a.value=!0,r("focus",d)},u=o.useTemplateRef("inputRef");return t({focus:()=>{u.value&&u.value.focus()}}),(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["input",{disabled:e.disabled,focused:a.value,simple:e.simple}])},[o.createElementVNode("span",Zx,[o.renderSlot(d.$slots,"prefix",{},void 0,!0)]),o.createElementVNode("input",{type:"text",ref_key:"inputRef",ref:u,disabled:e.disabled,value:e.value,placeholder:e.placeholder,maxlength:e.maxlength,onInput:f[0]||(f[0]=v=>i(v)),onFocus:f[1]||(f[1]=v=>s(v)),onBlur:f[2]||(f[2]=v=>l(v)),onChange:f[3]||(f[3]=v=>r("change",v)),onKeydown:[f[4]||(f[4]=o.withKeys(v=>r("enter",v),["enter"])),f[5]||(f[5]=o.withKeys(v=>r("backspace",v),["backspace"]))]},null,40,jx),o.createElementVNode("span",Jx,[o.renderSlot(d.$slots,"suffix",{},void 0,!0)])],2))}},Mr=oe(Kx,[["__scopeId","data-v-0e371859"]]),Qx={__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{type:String,default:"click"},placement:{type:[String,Object],default:"bottom"},appendTo:{type:Object},contentStyle:{type:Object},center:{type:Boolean,default:!1},offset:{type:Number,default:8}},emits:["update:value","show","hide"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(),i=o.ref(!1),l=o.useTemplateRef("triggerRef"),s=o.useTemplateRef("contentRef"),u=o.computed(()=>n.contentStyle||{});return o.watch(()=>n.value,()=>{a.value&&(n.value?a.value.show():a.value.hide())}),o.onUnmounted(()=>{a.value&&a.value.destroy()}),o.onMounted(()=>{a.value=zf(l.value,{content:s.value,allowHTML:!0,trigger:n.trigger,placement:n.placement,interactive:!0,appendTo:n.appendTo||document.body,maxWidth:"none",offset:[0,n.offset],duration:200,animation:"scale",theme:"popover",onShow(){i.value=!0},onShown(){n.value||(r("update:value",!0),r("show"))},onHidden(){n.value&&(r("update:value",!1),r("hide")),i.value=!1}})}),(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover",{center:e.center}]),ref_key:"triggerRef",ref:l},[o.createElementVNode("div",{class:"popover-content",style:o.normalizeStyle(u.value),ref_key:"contentRef",ref:s},[i.value?o.renderSlot(c.$slots,"content",{key:0},void 0,!0):o.createCommentVNode("",!0)],4),o.renderSlot(c.$slots,"default",{},void 0,!0)],2))}},be=oe(Qx,[["__scopeId","data-v-58f00058"]]),e3={__name:"PopoverMenuItem",props:{center:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["popover-menu-item",{center:e.center}]),onClick:a[0]||(a[0]=i=>n("click"))},[o.renderSlot(r.$slots,"default",{},void 0,!0)],2))}},ut=oe(e3,[["__scopeId","data-v-4309a206"]]),t3={__name:"Divider",props:{type:{type:String,default:"horizontal"},margin:{type:Number,default:-1}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["divider",e.type]),style:o.normalizeStyle({margin:e.type==="horizontal"?`${e.margin>=0?e.margin:24}px 0`:`0 ${e.margin>=0?e.margin:8}px`})},null,6))}},Ie=oe(t3,[["__scopeId","data-v-3bd51572"]]),n3={class:"editor-header"},r3={class:"left"},o3={class:"menu-item"},a3={class:"title"},i3=["title"],l3={class:"right"},s3={class:"group-menu-item"},u3={class:"arrow-btn"},c3={class:"aippt-form"},d3={class:"tips"},f3={class:"field"},v3={class:"btns"},p3={__name:"index",setup(e){const t=o.getCurrentInstance();t&&t.proxy&&t.proxy.$router;const n=ve(),r=pe(),{title:a}=te.storeToRefs(r),{enterScreening:i,enterScreeningFromStart:l}=lu(),{exporting:s}=D1(),{resetSlides:u}=Po(),{AIPPTGenerator:c}=I1(),{addHistorySnapshot:d}=Ee(),f=o.ref(!1),v=o.ref(!1),p=o.ref(!1),h=o.ref(""),m=o.useTemplateRef("titleInputRef"),g=o.useTemplateRef("tmplPicker"),y=o.ref(!1),x=o.ref(""),b=o.ref(null),S=o.ref(""),_=o.ref(!1),k=V=>{V.length!==0&&(n.setActiveElementIdList([]),r.setSlides(V),r.updateSlideIndex(0),d())},w=()=>{h.value=a.value,p.value=!0,o.nextTick(()=>{var V;return(V=m.value)===null||V===void 0?void 0:V.focus()})},C=()=>{r.setTitle(h.value),p.value=!1},E=V=>{n.setDialogForExport(V),f.value=!1},L=()=>{n.setMarkupPanelState(!0)},N=async V=>{var B;const R=V.target,F=(B=R.files)===null||B===void 0?void 0:B[0];if(F)try{S.value=F.name;const W=await F.text();b.value=JSON.parse(W),x.value="",y.value=!0,Se.success("模板已载入,请粘贴 AIPPT JSON")}catch(W){console.error(W),Se.error("模板读取失败:请确认是有效的 JSON")}finally{R.value=""}},T=V=>{const B=new Set,R=F=>{if(F){if(Array.isArray(F))return F.forEach(R);if(typeof F=="object"){typeof F.type=="string"&&B.add(F.type);for(const W in F)R(F[W])}}};return R(V),Array.isArray(V?.slides)&&V.slides.forEach(F=>typeof F?.type=="string"&&B.add(F.type)),Array.from(B)},A=V=>{const B=[];return V.cover&&B.push({type:"cover",data:{title:V.cover.title||"",text:V.cover.text||""}}),Array.isArray(V.contents)&&V.contents[0]&&B.push({type:"contents",data:{items:V.contents[0].content||[]}}),Array.isArray(V.content)&&V.content.forEach(R=>{R?.title&&B.push({type:"transition",data:{title:R.title,text:""}}),Array.isArray(R?.content)&&R.content.length&&B.push({type:"content",data:{title:R.title||"",items:R.content.map(F=>({title:typeof F=="string"?F:F.title||"",text:typeof F=="string"?"":F.text||F.content||""}))}})}),Array.isArray(V.end)&&V.end.length>0&&B.push({type:"end"}),B},I=(V,B)=>{const R=W=>B.includes(W),F={};return!R("toc")&&R("catalog")&&(F.toc="catalog"),!R("section")&&R("title")&&(F.section="title"),!R("bullets")&&R("list")&&(F.bullets="list"),!R("end")&&R("thankyou")&&(F.end="thankyou"),V.map(W=>({...W,type:F[W.type]||W.type}))},D=()=>{if(!b.value)return Se.error("请先选择模板文件");let V;try{V=JSON.parse(x.value||"{}")}catch{return Se.error("AIPPT JSON 解析失败,请检查格式")}try{_.value=!0;const B=b.value,R=Array.isArray(B?.slides)?B.slides:[],F=B?.theme;if(!R.length)throw new Error("模板缺少 slides 字段或为空");F&&typeof r.setTheme=="function"&&r.setTheme(F);const W=T(B);let O;Array.isArray(V)?(O=V,console.log("使用数组格式的 AIPPT 数据:",O)):(O=A(V),console.log("转换对象格式的 AIPPT 数据:",O));const P=I(O,W),$=Array.from(new Set(P.map(Q=>Q.type).filter(Q=>!W.includes(Q))));if($.length)throw new Error(`以下类型未在当前模板中找到:${$.join("、")};模板支持:${W.join("、")||"未探测到"}`);const z=c(R,P),Z=[];for(const Q of z)Z.push(Q);console.log("Generated slides:",Z),console.log("First slide structure:",Z[0]),k(Z),y.value=!1,Se.success("渲染完成,已载入到画布")}catch(B){console.error(B),Se.error("渲染失败:"+(B?.message||"请检查模板类型标注与 AIPPT 结构是否匹配"))}finally{_.value=!1}};return(V,B)=>{const R=o.resolveComponent("AiPptDownload"),F=o.resolveComponent("AiPptRefresh"),W=o.resolveComponent("AiPptMark"),O=o.resolveComponent("AiPptCommand"),P=o.resolveComponent("AiPptHamburgerButton"),$=o.resolveComponent("AiPptPpt"),z=o.resolveComponent("AiPptSlideTwo"),Z=o.resolveComponent("AiPptDown"),Q=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",n3,[o.createElementVNode("div",r3,[o.createVNode(be,{trigger:"click",placement:"bottom-start",value:f.value,"onUpdate:value":B[4]||(B[4]=J=>f.value=J)},{content:o.withCtx(()=>[o.createVNode(ut,{class:"popover-menu-item",onClick:B[0]||(B[0]=J=>E("pptx"))},{default:o.withCtx(()=>[o.createVNode(R,{class:"icon"}),B[15]||(B[15]=o.createTextVNode(" 导出文件 ",-1))]),_:1}),o.createVNode(Ie,{margin:10}),o.createVNode(ut,{class:"popover-menu-item",onClick:B[1]||(B[1]=J=>{o.unref(u)(),f.value=!1})},{default:o.withCtx(()=>[o.createVNode(F,{class:"icon"}),B[16]||(B[16]=o.createTextVNode(" 重置幻灯片 ",-1))]),_:1}),o.createVNode(ut,{class:"popover-menu-item",onClick:B[2]||(B[2]=J=>{L(),f.value=!1})},{default:o.withCtx(()=>[o.createVNode(W,{class:"icon"}),B[17]||(B[17]=o.createTextVNode(" 幻灯片类型标注 ",-1))]),_:1}),o.createVNode(ut,{class:"popover-menu-item",onClick:B[3]||(B[3]=J=>{f.value=!1,v.value=!0})},{default:o.withCtx(()=>[o.createVNode(O,{class:"icon"}),B[18]||(B[18]=o.createTextVNode(" 快捷操作 ",-1))]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("div",o3,[o.createVNode(P,{class:"icon"})])]),_:1},8,["value"]),o.createElementVNode("div",a3,[p.value?(o.openBlock(),o.createBlock(Mr,{key:0,class:"title-input",ref_key:"titleInputRef",ref:m,value:h.value,"onUpdate:value":B[5]||(B[5]=J=>h.value=J),onBlur:B[6]||(B[6]=J=>C())},null,8,["value"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"title-text",onClick:B[7]||(B[7]=J=>w()),title:o.unref(a)},o.toDisplayString(o.unref(a)),9,i3))])]),o.createElementVNode("div",l3,[o.createElementVNode("div",s3,[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"menu-item",onClick:B[8]||(B[8]=J=>o.unref(i)())},[o.createVNode($,{class:"icon"})])),[[Q,"幻灯片放映(F5)"]]),o.createVNode(be,{trigger:"click",center:""},{content:o.withCtx(()=>[o.createVNode(ut,{class:"popover-menu-item",onClick:B[9]||(B[9]=J=>o.unref(l)())},{default:o.withCtx(()=>[o.createVNode(z,{class:"icon"}),B[19]||(B[19]=o.createTextVNode(" 从头开始 ",-1))]),_:1}),o.createVNode(ut,{class:"popover-menu-item",onClick:B[10]||(B[10]=J=>o.unref(i)())},{default:o.withCtx(()=>[o.createVNode($,{class:"icon"}),B[20]||(B[20]=o.createTextVNode(" 从当前页开始 ",-1))]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("div",u3,[o.createVNode(Z,{class:"arrow"})])]),_:1})]),o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"menu-item",onClick:B[11]||(B[11]=J=>E("pptx"))},[o.createVNode(R,{class:"icon"})])),[[Q,"导出"]])]),o.createVNode(gp,{width:320,visible:v.value,"onUpdate:visible":B[12]||(B[12]=J=>v.value=J),placement:"right"},{title:o.withCtx(()=>[...B[21]||(B[21]=[o.createTextVNode("快捷操作",-1)])]),default:o.withCtx(()=>[o.createVNode(zx)]),_:1},8,["visible"]),o.createElementVNode("input",{ref_key:"tmplPicker",ref:g,type:"file",accept:".json,.pptist",style:{display:"none"},onChange:N},null,544),o.createVNode(gp,{width:560,visible:y.value,"onUpdate:visible":B[14]||(B[14]=J=>y.value=J),placement:"right"},{title:o.withCtx(()=>[...B[22]||(B[22]=[o.createTextVNode("渲染 AIPPT",-1)])]),default:o.withCtx(()=>[o.createElementVNode("div",c3,[o.createElementVNode("div",d3,[B[23]||(B[23]=o.createTextVNode(" 已选择模板:",-1)),o.createElementVNode("strong",null,o.toDisplayString(S.value||"尚未选择"),1)]),o.createElementVNode("div",f3,[B[24]||(B[24]=o.createElementVNode("div",{class:"label"},"AIPPT JSON",-1)),o.withDirectives(o.createElementVNode("textarea",{"onUpdate:modelValue":B[13]||(B[13]=J=>x.value=J),class:"aippt-textarea",placeholder:'在此粘贴 AIPPT.json 内容(如 {"cover": {...}, "contents":[...], "content":[...], "end":[...]})'},null,512),[[o.vModelText,x.value]])]),o.createElementVNode("div",v3,[o.createElementVNode("div",{class:"menu-item",onClick:D},[o.createVNode($,{class:"icon"}),B[25]||(B[25]=o.createElementVNode("span",{style:{"margin-left":"6px"}},"渲染并载入",-1))])])])]),_:1},8,["visible"]),o.createVNode(Ts,{loading:o.unref(s),tip:"正在导入..."},null,8,["loading"]),o.createVNode(Ts,{loading:_.value,tip:"正在渲染 AIPPT..."},null,8,["loading"])])}}},h3=oe(p3,[["__scopeId","data-v-643fe2f7"]]),B1=Symbol(),R1=Symbol(),m3=()=>{const e=window.getSelection();e&&e.removeAllRanges()},g3=e=>{const t=o.ref(0),n=o.ref(0),r=ve(),{canvasPercentage:a,canvasDragged:i}=te.storeToRefs(r),{viewportRatio:l,viewportSize:s}=te.storeToRefs(pe()),u=()=>{if(!e.value)return;const p=e.value.clientWidth,h=e.value.clientHeight;if(h/p>l.value){const m=p*(a.value/100);r.setCanvasScale(m/s.value),t.value=(p-m)/2,n.value=(h-m*l.value)/2}else{const m=h*(a.value/100);r.setCanvasScale(m/(s.value*l.value)),t.value=(p-m/l.value)/2,n.value=(h-m)/2}},c=(p,h)=>{if(!e.value)return;const m=e.value.clientWidth,g=e.value.clientHeight;if(g/m>l.value){const y=m*(p/100),x=m*(h/100),b=y*l.value,S=x*l.value;r.setCanvasScale(y/s.value),t.value=t.value-(y-x)/2,n.value=n.value-(b-S)/2}else{const y=g*(p/100),x=g*(h/100),b=y/l.value,S=x/l.value;r.setCanvasScale(y/(s.value*l.value)),t.value=t.value-(b-S)/2,n.value=n.value-(y-x)/2}};o.watch(a,c),o.watch(l,u),o.watch(s,u),o.watch(i,()=>{i.value||u()});const d=o.computed(()=>({width:s.value,height:s.value*l.value,left:t.value,top:n.value})),f=new ResizeObserver(u);return o.onMounted(()=>{e.value&&f.observe(e.value)}),o.onUnmounted(()=>{e.value&&f.unobserve(e.value)}),{viewportStyles:d,dragViewport:p=>{let h=!0;const m=p.pageX,g=p.pageY,y=t.value,x=n.value;document.onmousemove=b=>{if(!h)return;const S=b.pageX,_=b.pageY;t.value=y+(S-m),n.value=x+(_-g)},document.onmouseup=()=>{h=!1,document.onmousemove=null,document.onmouseup=null,r.setCanvasDragged(!0)}}}},y3=(e,t)=>{const n=ve(),{canvasScale:r,hiddenElementIdList:a}=te.storeToRefs(n),{ctrlOrShiftKeyActive:i}=te.storeToRefs(on()),l=o.ref(!1),s=o.ref(1),u=o.ref({top:0,left:0,width:0,height:0});return{mouseSelection:u,mouseSelectionVisible:l,mouseSelectionQuadrant:s,updateMouseSelection:d=>{if(!t.value)return;let f=!0;const v=t.value.getBoundingClientRect(),p=5,h=d.pageX,m=d.pageY,g=(h-v.x)/r.value,y=(m-v.y)/r.value;u.value={top:y,left:g,width:0,height:0},l.value=!1,s.value=4,document.onmousemove=x=>{if(!f)return;const b=x.pageX,S=x.pageY,_=(b-h)/r.value,k=(S-m)/r.value,w=Math.abs(_),C=Math.abs(k);if(w<p||C<p)return;let E=0;_>0&&k>0?E=4:_<0&&k<0?E=2:_>0&&k<0?E=1:_<0&&k>0&&(E=3),u.value={...u.value,width:w,height:C},l.value=!0,s.value=E},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,f=!1;let x=[];for(let S=0;S<e.value.length;S++){const _=e.value[S],k=u.value.left,w=u.value.top,C=u.value.width,E=u.value.height,{minX:L,maxX:N,minY:T,maxY:A}=fn(_);let I=!1;i.value?s.value===4?I=N>k&&L<k+C&&A>w&&T<w+E:s.value===2?I=N>k-C&&L<k-C+C&&A>w-E&&T<w-E+E:s.value===1?I=N>k&&L<k+C&&A>w-E&&T<w-E+E:s.value===3&&(I=N>k-C&&L<k-C+C&&A>w&&T<w+E):s.value===4?I=L>k&&N<k+C&&T>w&&A<w+E:s.value===2?I=L>k-C&&N<k-C+C&&T>w-E&&A<w-E+E:s.value===1?I=L>k&&N<k+C&&T>w-E&&A<w-E+E:s.value===3&&(I=L>k-C&&N<k-C+C&&T>w&&A<w+E),I&&!_.lock&&!a.value.includes(_.id)&&x.push(_)}x=x.filter(S=>{if(S.groupId){const _=x.map(w=>w.id);return e.value.filter(w=>w.groupId===S.groupId).every(w=>_.includes(w.id))}return!0});const b=x.map(S=>S.id);n.setActiveElementIdList(b),l.value=!1}}}},x3=e=>{const{disableHotkeys:t}=te.storeToRefs(ve()),{createImageElement:n,createTextElement:r}=Vo(),a=i=>{if(!i.dataTransfer||i.dataTransfer.items.length===0)return;const l=i.dataTransfer.items,s=l[0];let u=!1;for(const c of l)if(c.kind==="file"&&c.type.indexOf("image")!==-1){const d=c.getAsFile();d&&Gr(d).then(f=>n(f)),u=!0}u||s.kind==="string"&&s.type==="text/plain"&&s.getAsString(c=>{if(t.value)return;const d=Id(c);r({left:0,top:0,width:600,height:50},{content:d})})};o.onMounted(()=>{e.value&&e.value.addEventListener("drop",a),document.ondragleave=i=>i.preventDefault(),document.ondrop=i=>i.preventDefault(),document.ondragenter=i=>i.preventDefault(),document.ondragover=i=>i.preventDefault()}),o.onUnmounted(()=>{e.value&&e.value.removeEventListener("drop",a),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null})},w3=(e,t)=>{const n=Math.atan2(e,t);return 180/Math.PI*n},b3=(e,t,n)=>{const r=pe(),{addHistorySnapshot:a}=Ee();return{rotateElement:(l,s)=>{const u=!(l instanceof MouseEvent);if(u&&(!l.changedTouches||!l.changedTouches[0]))return;let c=!0,d=0;const f=s.rotate||0,v=s.left,p=s.top,h=s.width,m=s.height,g=v+h/2,y=p+m/2;if(!t.value)return;const x=t.value.getBoundingClientRect(),b=_=>{if(!c)return;const k=_ instanceof MouseEvent?_.pageX:_.changedTouches[0].pageX,w=_ instanceof MouseEvent?_.pageY:_.changedTouches[0].pageY,C=(k-x.left)/n.value,E=(w-x.top)/n.value,L=C-g,N=y-E;d=w3(L,N);const T=5;Math.abs(d)<=T?d=0:d>0&&Math.abs(d-45)<=T?d-=d-45:d<0&&Math.abs(d+45)<=T?d-=d+45:d>0&&Math.abs(d-90)<=T?d-=d-90:d<0&&Math.abs(d+90)<=T?d-=d+90:d>0&&Math.abs(d-135)<=T?d-=d-135:d<0&&Math.abs(d+135)<=T?d-=d+135:d>0&&Math.abs(d-180)<=T?d-=d-180:d<0&&Math.abs(d+180)<=T&&(d-=d+180),e.value=e.value.map(A=>s.id===A.id?{...A,rotate:d}:A)},S=()=>{c=!1,document.onmousemove=null,document.onmouseup=null,f!==d&&(r.updateSlide({elements:e.value}),a())};u?(document.ontouchmove=b,document.ontouchend=S):(document.onmousemove=b,document.onmouseup=S)}}},gi={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},$1={text:40,image:20,shape:20,chart:200,table:30,video:250,audio:20,latex:20},yp=(e,t)=>{const{left:n,top:r,width:a,height:i}=e,l=Math.sqrt(Math.pow(a,2)+Math.pow(i,2))/2,s=Math.atan(i/a)*180/Math.PI,u=(180-t-s)*Math.PI/180,c=(s-t)*Math.PI/180,d=(90-t)*Math.PI/180,f=t*Math.PI/180,v=a/2,p=i/2,h=n+v,m=r+p,g={left:h+l*Math.cos(u),top:m-l*Math.sin(u)},y={left:h+p*Math.cos(d),top:m-p*Math.sin(d)},x={left:h+l*Math.cos(c),top:m-l*Math.sin(c)},b={left:h+v*Math.cos(f),top:m+v*Math.sin(f)},S={left:h-l*Math.cos(u),top:m+l*Math.sin(u)},_={left:h-p*Math.sin(f),top:m+p*Math.cos(f)},k={left:h-l*Math.cos(c),top:m+l*Math.sin(c)},w={left:h-v*Math.cos(f),top:m-v*Math.sin(f)};return{leftTopPoint:g,topPoint:y,rightTopPoint:x,rightPoint:b,rightBottomPoint:S,bottomPoint:_,leftBottomPoint:k,leftPoint:w}},xp=(e,t)=>({[he.RIGHT_BOTTOM]:t.leftTopPoint,[he.LEFT_BOTTOM]:t.rightTopPoint,[he.LEFT_TOP]:t.rightBottomPoint,[he.RIGHT_TOP]:t.leftBottomPoint,[he.TOP]:t.bottomPoint,[he.BOTTOM]:t.topPoint,[he.LEFT]:t.rightPoint,[he.RIGHT]:t.leftPoint})[e],S3=(e,t,n)=>{const r=ve(),a=pe(),{activeElementIdList:i,activeGroupElementId:l}=te.storeToRefs(r),{viewportRatio:s,viewportSize:u}=te.storeToRefs(a),{ctrlOrShiftKeyActive:c}=te.storeToRefs(on()),{addHistorySnapshot:d}=Ee();return{scaleElement:(p,h,m)=>{const g=!(p instanceof MouseEvent);if(g&&(!p.changedTouches||!p.changedTouches[0]))return;let y=!0;r.setScalingState(!0);const x=h.left,b=h.top,S=h.width,_=h.height,k=h.type==="table"?h.cellMinHeight:0,w="rotate"in h&&h.rotate?h.rotate:0,C=Math.PI*w/180,E=c.value||"fixedRatio"in h&&h.fixedRatio,L=S/_,N=g?p.changedTouches[0].pageX:p.pageX,T=g?p.changedTouches[0].pageY:p.pageY,A=$1[h.type]||20,I=($,z)=>{if(!E)return $<A?A:$;let Z=A,Q=A;const J=h.width/h.height;return J<1&&(Q=A/J),J>1&&(Z=A*J),z==="width"?$<Z?Z:$:$<Q?Q:$};let D,V=0,B=0,R=[],F=[];if("rotate"in h&&h.rotate){const{left:$,top:z,width:Z,height:Q}=h;D=yp({left:$,top:z,width:Z,height:Q},w);const J=xp(m,D);V=J.left,B=J.top}else{const $=u.value,z=u.value*s.value,Z=h.id===l.value;for(const M of e.value){if("rotate"in M&&M.rotate||M.type==="line"||Z&&M.id===h.id||!Z&&i.value.includes(M.id))continue;const G=M.left,X=M.top,j=M.width,ie=M.height,ue=G+j,se=X+ie,ae={value:X,range:[G,ue]},Y={value:se,range:[G,ue]},ee={value:G,range:[X,se]},ce={value:ue,range:[X,se]};R.push(ae,Y),F.push(ee,ce)}const Q={value:0,range:[0,$]},J={value:z,range:[0,$]},U={value:z/2,range:[0,$]},ne={value:0,range:[0,z]},K={value:$,range:[0,z]},H={value:$/2,range:[0,z]};R.push(Q,J,U),F.push(ne,K,H),R=Cs(R),F=Cs(F)}const W=($,z)=>{const Q=[];let J=!1,U=!1;const ne={offsetX:0,offsetY:0};if(z||z===0)for(let K=0;K<R.length;K++){const{value:H,range:M}=R[K],G=Math.min(...M,$||0),X=Math.max(...M,$||0);Math.abs(z-H)<5&&!U&&(ne.offsetY=z-H,U=!0,Q.push({type:"horizontal",axis:{x:G-50,y:H},length:X-G+100}))}if($||$===0)for(let K=0;K<F.length;K++){const{value:H,range:M}=F[K],G=Math.min(...M,z||0),X=Math.max(...M,z||0);Math.abs($-H)<5&&!J&&(ne.offsetX=$-H,J=!0,Q.push({type:"vertical",axis:{x:H,y:G-50},length:X-G+100}))}return t.value=Q,ne},O=$=>{if(!y)return;const z=$ instanceof MouseEvent?$.pageX:$.changedTouches[0].pageX,Z=$ instanceof MouseEvent?$.pageY:$.changedTouches[0].pageY,Q=z-N,J=Z-T;let U=S,ne=_,K=x,H=b;if(w){const M=(Math.cos(C)*Q+Math.sin(C)*J)/n.value;let G=(Math.cos(C)*J-Math.sin(C)*Q)/n.value;E&&((m===he.RIGHT_BOTTOM||m===he.LEFT_TOP)&&(G=M/L),(m===he.LEFT_BOTTOM||m===he.RIGHT_TOP)&&(G=-M/L)),m===he.RIGHT_BOTTOM?(U=I(S+M,"width"),ne=I(_+G,"height")):m===he.LEFT_BOTTOM?(U=I(S-M,"width"),ne=I(_+G,"height"),K=x-(U-S)):m===he.LEFT_TOP?(U=I(S-M,"width"),ne=I(_-G,"height"),K=x-(U-S),H=b-(ne-_)):m===he.RIGHT_TOP?(U=I(S+M,"width"),ne=I(_-G,"height"),H=b-(ne-_)):m===he.TOP?(ne=I(_-G,"height"),H=b-(ne-_)):m===he.BOTTOM?ne=I(_+G,"height"):m===he.LEFT?(U=I(S-M,"width"),K=x-(U-S)):m===he.RIGHT&&(U=I(S+M,"width"));const X=yp({width:U,height:ne,left:K,top:H},w),j=xp(m,X),ie=j.left,ue=j.top,se=ie-V,ae=ue-B;K=K-se,H=H-ae}else{let M=Q/n.value,G=J/n.value;if(E&&((m===he.RIGHT_BOTTOM||m===he.LEFT_TOP)&&(G=M/L),(m===he.LEFT_BOTTOM||m===he.RIGHT_TOP)&&(G=-M/L)),m===he.RIGHT_BOTTOM){const{offsetX:X,offsetY:j}=W(x+S+M,b+_+G);M=M-X,G=G-j,E&&(j?M=G*L:G=M/L),U=I(S+M,"width"),ne=I(_+G,"height")}else if(m===he.LEFT_BOTTOM){const{offsetX:X,offsetY:j}=W(x+M,b+_+G);M=M-X,G=G-j,E&&(j?M=-G*L:G=-M/L),U=I(S-M,"width"),ne=I(_+G,"height"),K=x-(U-S)}else if(m===he.LEFT_TOP){const{offsetX:X,offsetY:j}=W(x+M,b+G);M=M-X,G=G-j,E&&(j?M=G*L:G=M/L),U=I(S-M,"width"),ne=I(_-G,"height"),K=x-(U-S),H=b-(ne-_)}else if(m===he.RIGHT_TOP){const{offsetX:X,offsetY:j}=W(x+S+M,b+G);M=M-X,G=G-j,E&&(j?M=-G*L:G=-M/L),U=I(S+M,"width"),ne=I(_-G,"height"),H=b-(ne-_)}else if(m===he.LEFT){const{offsetX:X}=W(x+M,null);M=M-X,U=I(S-M,"width"),K=x-(U-S)}else if(m===he.RIGHT){const{offsetX:X}=W(x+S+M,null);M=M-X,U=I(S+M,"width")}else if(m===he.TOP){const{offsetY:X}=W(null,b+G);G=G-X,ne=I(_-G,"height"),H=b-(ne-_)}else if(m===he.BOTTOM){const{offsetY:X}=W(null,b+_+G);G=G-X,ne=I(_+G,"height")}}e.value=e.value.map(M=>{if(h.id!==M.id)return M;if(M.type==="shape"&&"pathFormula"in M&&M.pathFormula){const G=Mo[M.pathFormula];let X="";return"editable"in G?X=G.formula(U,ne,M.keypoints):X=G.formula(U,ne),{...M,left:K,top:H,width:U,height:ne,viewBox:[U,ne],path:X}}if(M.type==="table"){let G=k+(ne-_)/M.data.length;return G=G<36?36:G,G===k?{...M,left:K,width:U}:{...M,left:K,top:H,width:U,height:ne,cellMinHeight:G<36?36:G}}return{...M,left:K,top:H,width:U,height:ne}})},P=$=>{y=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const z=$ instanceof MouseEvent?$.pageX:$.changedTouches[0].pageX,Z=$ instanceof MouseEvent?$.pageY:$.changedTouches[0].pageY;N===z&&T===Z||(a.updateSlide({elements:e.value}),r.setScalingState(!1),d())};g?(document.ontouchmove=O,document.ontouchend=P):(document.onmousemove=O,document.onmouseup=P)},scaleMultiElement:(p,h,m)=>{let g=!0;const{minX:y,maxX:x,minY:b,maxY:S}=h,_=x-y,k=S-b,w=_/k,C=p.pageX,E=p.pageY,L=JSON.parse(JSON.stringify(e.value));document.onmousemove=N=>{if(!g)return;const T=N.pageX,A=N.pageY,I=(T-C)/n.value;let D=(A-E)/n.value;c.value&&((m===he.RIGHT_BOTTOM||m===he.LEFT_TOP)&&(D=I/w),(m===he.LEFT_BOTTOM||m===he.RIGHT_TOP)&&(D=-I/w));let V=y,B=x,R=b,F=S;m===he.RIGHT_BOTTOM?(B=x+I,F=S+D):m===he.LEFT_BOTTOM?(V=y+I,F=S+D):m===he.LEFT_TOP?(V=y+I,R=b+D):m===he.RIGHT_TOP?(B=x+I,R=b+D):m===he.TOP?R=b+D:m===he.BOTTOM?F=S+D:m===he.LEFT?V=y+I:m===he.RIGHT&&(B=x+I);const W=B-V,O=F-R;let P=W/_,$=O/k;P<=0&&(P=0),$<=0&&($=0),e.value=e.value.map(z=>{if((z.type==="image"||z.type==="shape")&&i.value.includes(z.id)){const Z=L.find(Q=>Q.id===z.id);return{...z,width:Z.width*P,height:Z.height*$,left:V+(Z.left-y)*P,top:R+(Z.top-b)*$}}return z})},document.onmouseup=N=>{g=!1,document.onmousemove=null,document.onmouseup=null,!(C===N.pageX&&E===N.pageY)&&(a.updateSlide({elements:e.value}),d())}}}},_3=(e,t)=>{const n=ve(),{activeElementIdList:r,activeGroupElementId:a,handleElementId:i,editorAreaFocus:l}=te.storeToRefs(n),{ctrlOrShiftKeyActive:s}=te.storeToRefs(on());return{selectElement:(c,d,f=!0)=>{if(l.value||n.setEditorareaFocus(!0),r.value.includes(d.id)){if(s.value){let v=[];if(d.groupId){const p=[];e.value.forEach(h=>{h.groupId===d.groupId&&p.push(h.id)}),v=r.value.filter(h=>!p.includes(h))}else v=r.value.filter(p=>p!==d.id);v.length>0&&n.setActiveElementIdList(v)}else if(i.value!==d.id)n.setHandleElementId(d.id);else if(a.value!==d.id){const v=c instanceof MouseEvent?c.pageX:c.changedTouches[0].pageX,p=c instanceof MouseEvent?c.pageY:c.changedTouches[0].pageY;c.target.onmouseup=h=>{const m=h.pageX,g=h.pageY;v===m&&p===g&&(n.setActiveGroupElementId(d.id),h.target.onmouseup=null)}}}else{let v=[];if(s.value?v=[...r.value,d.id]:v=[d.id],d.groupId){const p=[];e.value.forEach(h=>{h.groupId===d.groupId&&p.push(h.id)}),v=[...v,...p]}n.setActiveElementIdList(qe.uniq(v)),n.setHandleElementId(d.id)}f&&t(c,d)}}},k3=(e,t,n)=>{const r=pe(),{activeElementIdList:a,activeGroupElementId:i}=te.storeToRefs(ve()),{shiftKeyState:l}=te.storeToRefs(on()),{viewportRatio:s,viewportSize:u}=te.storeToRefs(r),{addHistorySnapshot:c}=Ee();return{dragElement:(f,v)=>{const p=!(f instanceof MouseEvent);if(p&&(!f.changedTouches||!f.changedTouches[0])||!a.value.includes(v.id))return;let h=!0;const m=u.value,g=u.value*s.value,y=5,b=JSON.parse(JSON.stringify(e.value)).filter($=>a.value.includes($.id)),S=v.left,_=v.top,k=v.width,w="height"in v&&v.height?v.height:0,C="rotate"in v&&v.rotate?v.rotate:0,E=p?f.changedTouches[0].pageX:f.pageX,L=p?f.changedTouches[0].pageY:f.pageY;let N=null;const T=v.id===i.value;let A=[],I=[];for(const $ of e.value){if($.type==="line"||T&&$.id===v.id||!T&&a.value.includes($.id))continue;let z,Z,Q,J;if("rotate"in $&&$.rotate){const{xRange:se,yRange:ae}=ma({left:$.left,top:$.top,width:$.width,height:$.height,rotate:$.rotate});z=se[0],Z=ae[0],Q=se[1]-se[0],J=ae[1]-ae[0]}else z=$.left,Z=$.top,Q=$.width,J=$.height;const U=z+Q,ne=Z+J,K=Z+J/2,H=z+Q/2,M={value:Z,range:[z,U]},G={value:ne,range:[z,U]},X={value:K,range:[z,U]},j={value:z,range:[Z,ne]},ie={value:U,range:[Z,ne]},ue={value:H,range:[Z,ne]};A.push(M,G,X),I.push(j,ie,ue)}const D={value:0,range:[0,m]},V={value:g,range:[0,m]},B={value:g/2,range:[0,m]},R={value:0,range:[0,g]},F={value:m,range:[0,g]},W={value:m/2,range:[0,g]};A.push(D,V,B),I.push(R,F,W),A=Cs(A),I=Cs(I);const O=$=>{const z=$ instanceof MouseEvent?$.pageX:$.changedTouches[0].pageX,Z=$ instanceof MouseEvent?$.pageY:$.changedTouches[0].pageY;if(N!==!1&&(N=Math.abs(E-z)<y&&Math.abs(L-Z)<y),!h||N)return;let Q=(z-E)/n.value,J=(Z-L)/n.value;l.value&&(Math.abs(Q)>Math.abs(J)&&(J=0),Math.abs(Q)<Math.abs(J)&&(Q=0));let U=S+Q,ne=_+J,K,H,M,G;if(a.value.length===1||T)if(C){const{xRange:ae,yRange:Y}=ma({left:U,top:ne,width:k,height:w,rotate:C});K=ae[0],H=ae[1],M=Y[0],G=Y[1]}else v.type==="line"?(K=U,H=U+Math.max(v.start[0],v.end[0]),M=ne,G=ne+Math.max(v.start[1],v.end[1])):(K=U,H=U+k,M=ne,G=ne+w);else{const ae=[],Y=[],ee=[],ce=[];for(let de=0;de<b.length;de++){const De=b[de],Re=De.left+Q,jn=De.top+J,$o=De.width,Oo="height"in De&&De.height?De.height:0,Xu="rotate"in De&&De.rotate?De.rotate:0;if("rotate"in De&&De.rotate){const{xRange:st,yRange:xe}=ma({left:Re,top:jn,width:$o,height:Oo,rotate:Xu});ae.push(st[0]),Y.push(xe[0]),ee.push(st[1]),ce.push(xe[1])}else De.type==="line"?(ae.push(Re),Y.push(jn),ee.push(Re+Math.max(De.start[0],De.end[0])),ce.push(jn+Math.max(De.start[1],De.end[1]))):(ae.push(Re),Y.push(jn),ee.push(Re+$o),ce.push(jn+Oo))}K=Math.min(...ae),H=Math.max(...ee),M=Math.min(...Y),G=Math.max(...ce)}const X=K+(H-K)/2,j=M+(G-M)/2,ie=[];let ue=!1,se=!1;for(let ae=0;ae<A.length;ae++){const{value:Y,range:ee}=A[ae],ce=Math.min(...ee,K,H),de=Math.max(...ee,K,H);Math.abs(M-Y)<y&&!se&&(ne=ne-(M-Y),se=!0,ie.push({type:"horizontal",axis:{x:ce-50,y:Y},length:de-ce+100})),Math.abs(G-Y)<y&&!se&&(ne=ne-(G-Y),se=!0,ie.push({type:"horizontal",axis:{x:ce-50,y:Y},length:de-ce+100})),Math.abs(j-Y)<y&&!se&&(ne=ne-(j-Y),se=!0,ie.push({type:"horizontal",axis:{x:ce-50,y:Y},length:de-ce+100}))}for(let ae=0;ae<I.length;ae++){const{value:Y,range:ee}=I[ae],ce=Math.min(...ee,M,G),de=Math.max(...ee,M,G);Math.abs(K-Y)<y&&!ue&&(U=U-(K-Y),ue=!0,ie.push({type:"vertical",axis:{x:Y,y:ce-50},length:de-ce+100})),Math.abs(H-Y)<y&&!ue&&(U=U-(H-Y),ue=!0,ie.push({type:"vertical",axis:{x:Y,y:ce-50},length:de-ce+100})),Math.abs(X-Y)<y&&!ue&&(U=U-(X-Y),ue=!0,ie.push({type:"vertical",axis:{x:Y,y:ce-50},length:de-ce+100}))}if(t.value=ie,a.value.length===1||T)e.value=e.value.map(ae=>ae.id===v.id?{...ae,left:U,top:ne}:ae);else{const ae=e.value.find(Y=>Y.id===v.id);if(!ae)return;e.value=e.value.map(Y=>a.value.includes(Y.id)?Y.id===v.id?{...Y,left:U,top:ne}:{...Y,left:Y.left+(U-ae.left),top:Y.top+(ne-ae.top)}:Y)}},P=$=>{h=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const z=$ instanceof MouseEvent?$.pageX:$.changedTouches[0].pageX,Z=$ instanceof MouseEvent?$.pageY:$.changedTouches[0].pageY;E===z&&L===Z||(r.updateSlide({elements:e.value}),c())};p?(document.ontouchmove=O,document.ontouchend=P):(document.onmousemove=O,document.onmouseup=P)}}},C3=e=>{const t=pe(),{canvasScale:n}=te.storeToRefs(ve()),{ctrlOrShiftKeyActive:r}=te.storeToRefs(on()),{addHistorySnapshot:a}=Ee();return{dragLineElement:(l,s,u)=>{let c=!0;const d=8,f=l.pageX,v=l.pageY,p=[];for(let h=0;h<e.value.length;h++){const m=e.value[h];if(m.type==="line"||m.rotate)continue;const g=m.left,y=m.top,x=m.width,b=m.height,S=g+x,_=y+b,k=y+b/2,w=g+x/2,C={x:w,y},E={x:w,y:_},L={x:g,y:k},N={x:S,y:k},T={x:g,y},A={x:S,y},I={x:g,y:_},D={x:S,y:_};p.push(C,E,L,N,T,A,I,D)}document.onmousemove=h=>{if(!c)return;const m=h.pageX,g=h.pageY,y=(m-f)/n.value,x=(g-v)/n.value;let b=s.left+s.start[0],S=s.top+s.start[1],_=s.left+s.end[0],k=s.top+s.end[1];const w=s.broken||s.broken2||s.curve||[0,0];let C=s.left+w[0],E=s.top+w[1];const[L,N]=s.cubic||[[0,0],[0,0]];let T=s.left+L[0],A=s.top+L[1],I=s.left+N[0],D=s.top+N[1];if(u===Dt.START){b=b+y,S=S+x,Math.abs(b-_)<d&&(b=_),Math.abs(S-k)<d&&(S=k);for(const P of p){const{x:$,y:z}=P;if(Math.abs($-b)<d&&Math.abs(z-S)<d){b=$,S=z;break}}}else if(u===Dt.END){_=_+y,k=k+x,Math.abs(b-_)<d&&(_=b),Math.abs(S-k)<d&&(k=S);for(const P of p){const{x:$,y:z}=P;if(Math.abs($-_)<d&&Math.abs(z-k)<d){_=$,k=z;break}}}else u===Dt.C?(C=C+y,E=E+x,Math.abs(C-b)<d&&(C=b),Math.abs(E-S)<d&&(E=S),Math.abs(C-_)<d&&(C=_),Math.abs(E-k)<d&&(E=k),Math.abs(C-(b+_)/2)<d&&Math.abs(E-(S+k)/2)<d&&(C=(b+_)/2,E=(S+k)/2)):u===Dt.C1?(T=T+y,A=A+x,Math.abs(T-b)<d&&(T=b),Math.abs(A-S)<d&&(A=S),Math.abs(T-_)<d&&(T=_),Math.abs(A-k)<d&&(A=k)):u===Dt.C2&&(I=I+y,D=D+x,Math.abs(I-b)<d&&(I=b),Math.abs(D-S)<d&&(D=S),Math.abs(I-_)<d&&(I=_),Math.abs(D-k)<d&&(D=k));const V=Math.min(b,_),B=Math.min(S,k),R=Math.max(b,_),F=Math.max(S,k),W=[0,0],O=[R-V,F-B];b>_&&(W[0]=R-V,O[0]=0),S>k&&(W[1]=F-B,O[1]=0),e.value=e.value.map(P=>{if(P.id===s.id){const $={...P,left:V,top:B,start:W,end:O};return u===Dt.START||u===Dt.END?(r.value?(s.broken&&($.broken=[C-V,E-B]),s.curve&&($.curve=[C-V,E-B]),s.cubic&&($.cubic=[[T-V,A-B],[I-V,D-B]])):(s.broken&&($.broken=[(W[0]+O[0])/2,(W[1]+O[1])/2]),s.curve&&($.curve=[(W[0]+O[0])/2,(W[1]+O[1])/2]),s.cubic&&($.cubic=[[(W[0]+O[0])/2,(W[1]+O[1])/2],[(W[0]+O[0])/2,(W[1]+O[1])/2]])),s.broken2&&($.broken2=[(W[0]+O[0])/2,(W[1]+O[1])/2])):u===Dt.C?(s.broken&&($.broken=[C-V,E-B]),s.curve&&($.curve=[C-V,E-B]),s.broken2&&(R-V>=F-B?$.broken2=[C-V,$.broken2[1]]:$.broken2=[$.broken2[0],E-B])):s.cubic&&($.cubic=[[T-V,A-B],[I-V,D-B]]),$}return P})},document.onmouseup=h=>{c=!1,document.onmousemove=null,document.onmouseup=null;const m=h.pageX,g=h.pageY;f===m&&v===g||(t.updateSlide({elements:e.value}),a())}}}},E3=(e,t)=>{const n=pe(),{addHistorySnapshot:r}=Ee();return{moveShapeKeypoint:(i,l,s=0)=>{const u=!(i instanceof MouseEvent);if(u&&(!i.changedTouches||!i.changedTouches[0]))return;let c=!0;const d=u?i.changedTouches[0].pageX:i.pageX,f=u?i.changedTouches[0].pageY:i.pageY,v=l.keypoints,p=Mo[l.pathFormula];let h=null;if("editable"in p&&p.editable){const y=p.getBaseSize[s],x=p.range[s],b=p.relative[s],S=v[s],_=y(l.width,l.height),k=_*S,[w,C]=x;h={baseSize:_,originPos:k,min:w,max:C,relative:b}}const m=y=>{if(!c)return;const x=y instanceof MouseEvent?y.pageX:y.changedTouches[0].pageX,b=y instanceof MouseEvent?y.pageY:y.changedTouches[0].pageY,S=(x-d)/t.value,_=(b-f)/t.value;e.value=e.value.map(k=>{if(k.id===l.id&&h){const{baseSize:w,originPos:C,min:E,max:L,relative:N}=h,T=k;let A=0;N==="center"?A=(C-S*2)/w:N==="left"?A=(C+S)/w:N==="right"?A=(C-S)/w:N==="top"?A=(C+_)/w:N==="bottom"?A=(C-_)/w:N==="left_bottom"?A=(C+S)/w:N==="right_bottom"?A=(C-S)/w:N==="top_right"?A=(C+_)/w:N==="bottom_right"&&(A=(C-_)/w),A<E&&(A=E),A>L&&(A=L);let I=[];return Array.isArray(v)?(I=[...v],I[s]=A):I=[A],{...k,keypoints:I,path:p.formula(T.width,T.height,I)}}return k})},g=y=>{c=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const x=y instanceof MouseEvent?y.pageX:y.changedTouches[0].pageX,b=y instanceof MouseEvent?y.pageY:y.changedTouches[0].pageY;d===x&&f===b||(n.updateSlide({elements:e.value}),r())};u?(document.ontouchmove=m,document.ontouchend=g):(document.onmousemove=m,document.onmouseup=g)}}},T3=e=>{const t=ve(),{canvasScale:n,creatingElement:r}=te.storeToRefs(t),a=d=>{const{start:f,end:v}=d;if(!e.value)return;const p=e.value.getBoundingClientRect(),[h,m]=f,[g,y]=v,x=Math.min(h,g),b=Math.max(h,g),S=Math.min(m,y),_=Math.max(m,y),k=(x-p.x)/n.value,w=(S-p.y)/n.value,C=(b-x)/n.value,E=(_-S)/n.value;return{left:k,top:w,width:C,height:E}},i=d=>{const{start:f,end:v}=d;if(!e.value)return;const p=e.value.getBoundingClientRect(),[h,m]=f,[g,y]=v,x=Math.min(h,g),b=Math.max(h,g),S=Math.min(m,y),_=Math.max(m,y),k=(x-p.x)/n.value,w=(S-p.y)/n.value,C=(b-x)/n.value,E=(_-S)/n.value;return{left:k,top:w,start:[h===x?0:C,m===S?0:E],end:[g===x?0:C,y===S?0:E]}},{createTextElement:l,createShapeElement:s,createLineElement:u}=Vo();return{formatCreateSelection:a,insertElementFromCreateSelection:d=>{if(!r.value)return;const f=r.value.type;if(f==="text"){const v=a(d);v&&l(v,{vertical:r.value.vertical})}else if(f==="shape"){const v=a(d);v&&s(v,r.value.data)}else if(f==="line"){const v=i(d);v&&u(v,r.value.data)}t.setCreatingElement(null)}}},Jf=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=te.storeToRefs(ve()),{currentSlide:r,viewportRatio:a,viewportSize:i}=te.storeToRefs(e),{addHistorySnapshot:l}=Ee();return{alignElementToCanvas:u=>{const c=i.value,d=i.value*a.value,{minX:f,maxX:v,minY:p,maxY:h}=er(n.value),m=JSON.parse(JSON.stringify(r.value.elements));for(const g of m)if(t.value.includes(g.id)){if(u===Be.CENTER){const y=p+(h-p)/2-d/2,x=f+(v-f)/2-c/2;g.top=g.top-y,g.left=g.left-x}if(u===Be.TOP){const y=p-0;g.top=g.top-y}else if(u===Be.VERTICAL){const y=p+(h-p)/2-d/2;g.top=g.top-y}else if(u===Be.BOTTOM){const y=h-d;g.top=g.top-y}else if(u===Be.LEFT){const y=f-0;g.left=g.left-y}else if(u===Be.HORIZONTAL){const y=f+(v-f)/2-c/2;g.left=g.left-y}else if(u===Be.RIGHT){const y=v-c;g.left=g.left-y}}e.updateSlide({elements:m}),l()}}},Ur=e=>({shadowStyle:o.computed(()=>{if(e.value){const{h:n,v:r,blur:a,color:i}=e.value;return`${n}px ${r}px ${a}px ${i}`}return""})}),su=(e,t)=>({flipStyle:o.computed(()=>{let r="";return e.value&&t.value?r="rotateX(180deg) rotateY(180deg)":t.value?r="rotateX(180deg)":e.value&&(r="rotateY(180deg)"),r})});var nt;(function(e){e.RECT="rect",e.ELLIPSE="ellipse",e.POLYGON="polygon"})(nt||(nt={}));var wp;(function(e){e.RECT="rect",e.ROUNDRECT="roundRect",e.ELLIPSE="ellipse",e.TRIANGLE="triangle",e.PENTAGON="pentagon",e.RHOMBUS="rhombus",e.STAR="star"})(wp||(wp={}));const Ad={rect:{name:"矩形",type:nt.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:nt.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:nt.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L ${e*.2} ${t} L 0 ${t*.8} Z`},roundRect:{name:"圆角矩形",type:nt.RECT,radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:nt.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:nt.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${e*.5} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:nt.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${e*.5} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:nt.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:nt.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${t*.5} L ${e*.5} ${t} L 0 ${t*.5} Z`},pentagon:{name:"五边形",type:nt.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:nt.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.2} 0 L ${e*.8} 0 L ${e} ${t*.5} L ${e*.8} ${t} L ${e*.2} ${t} L 0 ${t*.5} Z`},heptagon:{name:"七边形",type:nt.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e*.9} ${t*.2} L ${e} ${t*.6} L ${e*.75} ${t} L ${e*.25} ${t} L 0 ${t*.6} L ${e*.1} ${t*.2} Z`},octagon:{name:"八边形",type:nt.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e*.7} 0 L ${e} ${t*.3} L ${e} ${t*.7} L ${e*.7} ${t} L ${e*.3} ${t} L 0 ${t*.7} L 0 ${t*.3} Z`},chevron:{name:"V形",type:nt.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} L ${e*.25} ${t*.5} L 0 0 Z`},point:{name:"点",type:nt.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:nt.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${t*.2} L ${e*.6} ${t*.2} L ${e*.6} 0 L ${e} ${t*.5} L ${e*.6} ${t} L ${e*.6} ${t*.8} L 0 ${t*.8} Z`},parallelogram:{name:"平行四边形",type:nt.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e} 0 L ${e*.7} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:nt.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${e*.3} ${t} L ${e} ${t} L ${e*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:nt.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.25} 0 L ${e*.75} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:nt.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${e*.75} ${t} L ${e*.25} ${t} Z`}},Kf=e=>{const t=o.computed(()=>{let r=Ad.rect;if(e.value.clip){const a=e.value.clip.shape||nt.RECT;r=Ad[a]}return r.radius!==void 0&&e.value.radius&&(r={...r,radius:`${e.value.radius}px`,style:`inset(0 round ${e.value.radius}px)`}),r}),n=o.computed(()=>{if(!e.value.clip)return{top:"0",left:"0",width:"100%",height:"100%"};const[r,a]=e.value.clip.range,i=(a[0]-r[0])/100,l=(a[1]-r[1])/100,s=r[0]/i,u=r[1]/l;return{left:-s+"%",top:-u+"%",width:100/i+"%",height:100/l+"%"}});return{clipShape:t,imgPosition:n}},O1=e=>({filter:o.computed(()=>{if(!e.value)return"";let n="";const r=Object.keys(e.value);for(const a of r)n+=`${a}(${e.value[a]}) `;return n})}),N3=["src"],I3=["src"],L3=["onMousedown"],A3=["onMousedown"],M3={__name:"ImageClipHandler",props:{src:{type:String,required:!0},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0},rotate:{type:Number,required:!0},clipData:{type:Object}},emits:["clip"],setup(e,{emit:t}){const n=e,r=t,{canvasScale:a}=te.storeToRefs(ve()),{ctrlOrShiftKeyActive:i}=te.storeToRefs(on()),l=o.ref({top:"0",left:"0"}),s=o.ref(!1),u=o.ref(null),c=()=>{const[C,E]=n.clipData?n.clipData.range:[[0,0],[100,100]],L=(E[0]-C[0])/100,N=(E[1]-C[1])/100,T=C[0]/L,A=C[1]/N;return{widthScale:L,heightScale:N,left:T,top:A}},d=o.computed(()=>{const{widthScale:C,heightScale:E,left:L,top:N}=c();return{left:-L,top:-N,width:100/C,height:100/E}}),f=o.computed(()=>({top:d.value.top+"%",left:d.value.left+"%",width:d.value.width+"%",height:d.value.height+"%"})),v=o.ref({top:0,left:0,width:0,height:0}),p=o.computed(()=>{const{top:C,left:E,width:L,height:N}=v.value;return{top:C+"%",left:E+"%",width:L+"%",height:N+"%"}}),h=o.computed(()=>{const C=d.value.width,E=d.value.height,{top:L,left:N,width:T,height:A}=v.value;return{left:-N*(100/T)+"%",top:-L*(100/A)+"%",width:C/T*100+"%",height:E/A*100+"%"}}),m=()=>{const{left:C,top:E}=c();v.value={left:C,top:E,width:100,height:100},l.value={top:-E+"%",left:-C+"%"}},g=()=>{if(s.value)return;if(!u.value){r("clip",null);return}const{left:C,top:E}=c(),L={left:(v.value.left-C)/100*n.width,top:(v.value.top-E)/100*n.height,width:(v.value.width-100)/100*n.width,height:(v.value.height-100)/100*n.height},N={range:u.value,position:L};r("clip",N)},y=C=>{C.key.toUpperCase()===ye.ENTER&&g()};o.onMounted(()=>{m(),document.addEventListener("keydown",y)}),o.onUnmounted(()=>{document.removeEventListener("keydown",y)});const x=()=>{const C={left:parseInt(h.value.left),top:parseInt(h.value.top),width:parseInt(h.value.width),height:parseInt(h.value.height)},E=100/C.width,L=100/C.height,N=[-C.left*E,-C.top*L],T=[E*100+N[0],L*100+N[1]];u.value=[N,T]},b=C=>{s.value=!0;let E=!0;const L=C.pageX,N=C.pageY,T=d.value,A={...v.value};document.onmousemove=I=>{if(!E)return;const D=I.pageX,V=I.pageY,B=(D-L)/a.value,R=(V-N)/a.value,F=Math.sqrt(B*B+R*R),O=Math.atan2(R,B)-n.rotate/180*Math.PI,P=F*Math.cos(O)/n.width*100,$=F*Math.sin(O)/n.height*100;let z=A.left+P,Z=A.top+$;z<0?z=0:z+A.width>T.width&&(z=T.width-A.width),Z<0?Z=0:Z+A.height>T.height&&(Z=T.height-A.height),v.value={...v.value,left:z,top:Z}},document.onmouseup=()=>{E=!1,document.onmousemove=null,document.onmouseup=null,x(),setTimeout(()=>{s.value=!1},0)}},S=(C,E)=>{s.value=!0;let L=!0;const N=50/n.width*100,T=50/n.height*100,A=C.pageX,I=C.pageY,D=d.value,V={...v.value},B=v.value.width/v.value.height;document.onmousemove=R=>{if(!L)return;const F=R.pageX,W=R.pageY,O=(F-A)/a.value,P=(W-I)/a.value,$=Math.sqrt(O*O+P*P),Z=Math.atan2(P,O)-n.rotate/180*Math.PI;let Q=$*Math.cos(Z)/n.width*100,J=$*Math.sin(Z)/n.height*100;i.value&&((E===he.RIGHT_BOTTOM||E===he.LEFT_TOP)&&(J=Q/B),(E===he.LEFT_BOTTOM||E===he.RIGHT_TOP)&&(J=-Q/B));let U,ne,K,H;E===he.LEFT_TOP?(V.left+Q<0&&(Q=-V.left),V.top+J<0&&(J=-V.top),V.width-Q<N&&(Q=V.width-N),V.height-J<T&&(J=V.height-T),K=V.width-Q,H=V.height-J,U=V.left+Q,ne=V.top+J):E===he.RIGHT_TOP?(V.left+V.width+Q>D.width&&(Q=D.width-(V.left+V.width)),V.top+J<0&&(J=-V.top),V.width+Q<N&&(Q=N-V.width),V.height-J<T&&(J=V.height-T),K=V.width+Q,H=V.height-J,U=V.left,ne=V.top+J):E===he.LEFT_BOTTOM?(V.left+Q<0&&(Q=-V.left),V.top+V.height+J>D.height&&(J=D.height-(V.top+V.height)),V.width-Q<N&&(Q=V.width-N),V.height+J<T&&(J=T-V.height),K=V.width-Q,H=V.height+J,U=V.left+Q,ne=V.top):E===he.RIGHT_BOTTOM?(V.left+V.width+Q>D.width&&(Q=D.width-(V.left+V.width)),V.top+V.height+J>D.height&&(J=D.height-(V.top+V.height)),V.width+Q<N&&(Q=N-V.width),V.height+J<T&&(J=T-V.height),K=V.width+Q,H=V.height+J,U=V.left,ne=V.top):E===he.TOP?(V.top+J<0&&(J=-V.top),V.height-J<T&&(J=V.height-T),K=V.width,H=V.height-J,U=V.left,ne=V.top+J):E===he.BOTTOM?(V.top+V.height+J>D.height&&(J=D.height-(V.top+V.height)),V.height+J<T&&(J=T-V.height),K=V.width,H=V.height+J,U=V.left,ne=V.top):E===he.LEFT?(V.left+Q<0&&(Q=-V.left),V.width-Q<N&&(Q=V.width-N),K=V.width-Q,H=V.height,U=V.left+Q,ne=V.top):(V.left+V.width+Q>D.width&&(Q=D.width-(V.left+V.width)),V.width+Q<N&&(Q=N-V.width),H=V.height,K=V.width+Q,U=V.left,ne=V.top),v.value={left:U,top:ne,width:K,height:H}},document.onmouseup=()=>{L=!1,document.onmousemove=null,document.onmouseup=null,x(),setTimeout(()=>s.value=!1,0)}},_=o.computed(()=>{const C="rotate-",E=n.rotate;return E>-22.5&&E<=22.5?C+0:E>22.5&&E<=67.5?C+45:E>67.5&&E<=112.5?C+90:E>112.5&&E<=157.5?C+135:E>157.5||E<=-157.5?C+0:E>-157.5&&E<=-112.5?C+45:E>-112.5&&E<=-67.5?C+90:E>-67.5&&E<=-22.5?C+135:C+0}),k=[he.LEFT_TOP,he.RIGHT_TOP,he.LEFT_BOTTOM,he.RIGHT_BOTTOM],w=[he.TOP,he.BOTTOM,he.LEFT,he.RIGHT];return(C,E)=>{const L=o.resolveDirective("click-outside");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"image-clip-handler",style:o.normalizeStyle(l.value)},[o.createElementVNode("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:o.normalizeStyle(f.value)},null,12,N3),o.createElementVNode("div",{class:"top-image-content",style:o.normalizeStyle({...p.value,clipPath:e.clipPath})},[o.createElementVNode("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:o.normalizeStyle(h.value)},null,12,I3)],4),o.createElementVNode("div",{class:"operate",style:o.normalizeStyle(p.value),onMousedown:E[0]||(E[0]=o.withModifiers(N=>b(N),["stop"]))},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(k,N=>o.createElementVNode("div",{class:o.normalizeClass(["clip-point",N,_.value]),key:N,onMousedown:o.withModifiers(T=>S(T,N),["stop"])},[...E[1]||(E[1]=[o.createElementVNode("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[o.createElementVNode("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1)])],42,L3)),64)),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(w,N=>o.createElementVNode("div",{class:o.normalizeClass(["clip-point",N,_.value]),key:N,onMousedown:o.withModifiers(T=>S(T,N),["stop"])},[...E[2]||(E[2]=[o.createElementVNode("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[o.createElementVNode("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1)])],42,A3)),64))],36)],4)),[[L,g]])}}},V3=oe(M3,[["__scopeId","data-v-297b8531"]]),Ba=e=>{const t=o.computed(()=>{var i,l;return(l=(i=e.value)===null||i===void 0?void 0:i.width)!==null&&l!==void 0?l:0}),n=o.computed(()=>{var i;return((i=e.value)===null||i===void 0?void 0:i.style)||"solid"}),r=o.computed(()=>{var i;return((i=e.value)===null||i===void 0?void 0:i.color)||"#d14424"}),a=o.computed(()=>{const i=t.value;return n.value==="dashed"?i<=6?`${i*4.5} ${i*2}`:`${i*4} ${i*1.5}`:n.value==="dotted"?i<=6?`${i*1.8} ${i*1.6}`:`${i*1.5} ${i*1.2}`:"0 0"});return{outlineWidth:t,outlineStyle:n,outlineColor:r,strokeDashArray:a}},P3=["width","height"],D3=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"],B3={__name:"ImageRectOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup(e){const t=e,{outlineWidth:n,outlineColor:r,strokeDashArray:a}=Ba(o.toRef(t,"outline"));return(i,l)=>e.outline?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[o.createElementVNode("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:o.unref(r),"stroke-width":o.unref(n),"stroke-dasharray":o.unref(a)},null,8,D3)],8,P3)):o.createCommentVNode("",!0)}},R3=oe(B3,[["__scopeId","data-v-96ceb7f1"]]),$3=["width","height"],O3=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"],F3={__name:"ImageEllipseOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:r,strokeDashArray:a}=Ba(o.toRef(t,"outline"));return(i,l)=>e.outline?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[o.createElementVNode("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:o.unref(r),"stroke-width":o.unref(n),"stroke-dasharray":o.unref(a)},null,8,O3)],8,$3)):o.createCommentVNode("",!0)}},z3=oe(F3,[["__scopeId","data-v-91e5197e"]]),H3=["width","height"],G3=["d","stroke","stroke-width","stroke-dasharray"],U3={__name:"ImagePolygonOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},createPath:{type:Function,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:r,strokeDashArray:a}=Ba(o.toRef(t,"outline"));return(i,l)=>e.outline?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[o.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:o.unref(r),"stroke-width":o.unref(n),"stroke-dasharray":o.unref(a)},null,8,G3)],8,H3)):o.createCommentVNode("",!0)}},W3=oe(U3,[["__scopeId","data-v-c3eb42b1"]]),Y3={class:"image-outline"},F1={__name:"index",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=o.computed(()=>t.elementInfo),{clipShape:r}=Kf(n);return(a,i)=>(o.openBlock(),o.createElementBlock("div",Y3,[o.unref(r).type==="rect"?(o.openBlock(),o.createBlock(R3,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:o.unref(r).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):o.unref(r).type==="ellipse"?(o.openBlock(),o.createBlock(z3,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):o.unref(r).type==="polygon"?(o.openBlock(),o.createBlock(W3,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:o.unref(r).createPath},null,8,["width","height","outline","createPath"])):o.createCommentVNode("",!0)]))}},X3=["src"],q3={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=ve(),r=pe(),{clipingImageElementId:a}=te.storeToRefs(n),i=o.computed(()=>a.value===t.elementInfo.id),{addHistorySnapshot:l}=Ee(),s=o.computed(()=>t.elementInfo.shadow),{shadowStyle:u}=Ur(s),c=o.computed(()=>t.elementInfo.flipH),d=o.computed(()=>t.elementInfo.flipV),{flipStyle:f}=su(c,d),v=o.computed(()=>t.elementInfo),{clipShape:p,imgPosition:h}=Kf(v),m=o.computed(()=>t.elementInfo.filters),{filter:g}=O1(m),y=b=>{t.elementInfo.lock||(b.stopPropagation(),t.selectElement(b,t.elementInfo))},x=b=>{if(n.setClipingImageElementId(""),!b)return;const{range:S,position:_}=b,k=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},w=t.elementInfo.left+_.left,C=t.elementInfo.top+_.top,E=t.elementInfo.width+_.width,L=t.elementInfo.height+_.height;let N=0,T=0;if(t.elementInfo.rotate){const I=w+E/2-(t.elementInfo.left+t.elementInfo.width/2),D=-(C+L/2-(t.elementInfo.top+t.elementInfo.height/2)),V=-t.elementInfo.rotate*Math.PI/180,B=I*Math.cos(V)-D*Math.sin(V),R=I*Math.sin(V)+D*Math.cos(V);N=B-I,T=-(R-D)}const A={clip:{...k,range:S},left:w+N,top:C+T,width:E,height:L};r.updateElement({id:t.elementInfo.id,props:A}),l()};return(b,S)=>{const _=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-image",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[i.value?(o.openBlock(),o.createBlock(V3,{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:o.unref(p).style,onClip:S[0]||(S[0]=k=>x(k))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:1,class:"element-content",style:o.normalizeStyle({filter:o.unref(u)?`drop-shadow(${o.unref(u)})`:"",transform:o.unref(f)}),onMousedown:S[2]||(S[2]=k=>y(k)),onTouchstart:S[3]||(S[3]=k=>y(k))},[o.createVNode(F1,{elementInfo:e.elementInfo},null,8,["elementInfo"]),o.createElementVNode("div",{class:"image-content",style:o.normalizeStyle({clipPath:o.unref(p).style})},[o.createElementVNode("img",{src:e.elementInfo.src,draggable:!1,style:o.normalizeStyle({top:o.unref(h).top,left:o.unref(h).left,width:o.unref(h).width,height:o.unref(h).height,filter:o.unref(g)}),onDragstart:S[1]||(S[1]=o.withModifiers(()=>{},["prevent"])),alt:""},null,44,X3),e.elementInfo.colorMask?(o.openBlock(),o.createElementBlock("div",{key:0,class:"color-mask",style:o.normalizeStyle({backgroundColor:e.elementInfo.colorMask})},null,4)):o.createCommentVNode("",!0)],4)],36)),[[_,e.contextmenus]])],4)],6)}}},Z3=oe(q3,[["__scopeId","data-v-176c49e1"]]),j3=["width","height"],J3=["d","stroke","stroke-width","stroke-dasharray"],K3={__name:"ElementOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:n,outlineColor:r,strokeDashArray:a}=Ba(o.toRef(t,"outline"));return(i,l)=>e.outline?(o.openBlock(),o.createElementBlock("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[o.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:o.unref(r),"stroke-width":o.unref(n),"stroke-dasharray":o.unref(a)},null,8,J3)],8,j3)):o.createCommentVNode("",!0)}},uu=oe(K3,[["__scopeId","data-v-de04f43b"]]),Q3=e=>{const t={},n=(r,a)=>t[r]=a;return n("Alt-ArrowUp",ze.joinUp),n("Alt-ArrowDown",ze.joinDown),n("Mod-z",Sd.undo),n("Mod-y",Sd.redo),n("Backspace",Hn.undoInputRule),n("Escape",ze.selectParentNode),n("Mod-b",ze.toggleMark(e.marks.strong)),n("Mod-i",ze.toggleMark(e.marks.em)),n("Mod-u",ze.toggleMark(e.marks.underline)),n("Mod-d",ze.toggleMark(e.marks.strikethrough)),n("Mod-e",ze.toggleMark(e.marks.code)),n("Mod-;",ze.toggleMark(e.marks.superscript)),n("Mod-'",ze.toggleMark(e.marks.subscript)),n("Enter",ze.chainCommands(wo.splitListItem(e.nodes.list_item),ze.newlineInCode,ze.createParagraphNear,ze.liftEmptyBlock,ze.splitBlockKeepMarks)),n("Mod-[",wo.liftListItem(e.nodes.list_item)),n("Mod-]",wo.sinkListItem(e.nodes.list_item)),n("Tab",wo.sinkListItem(e.nodes.list_item)),t},ew=e=>Hn.wrappingInputRule(/^\s*>\s$/,e),tw=e=>Hn.wrappingInputRule(/^(\d+)\.\s$/,e,t=>({order:+t[1]}),(t,n)=>n.childCount+n.attrs.order===+t[1]),nw=e=>Hn.wrappingInputRule(/^\s*([-+*])\s$/,e),rw=()=>{const e=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;return new Hn.InputRule(e,(t,n,r,a)=>{const{schema:i}=t,l=t.tr.insertText(`${n[2]} `,r,a),s=i.marks.code.create();return l.addMark(r,r+n[2].length,s)})},ow=()=>{const e=/(?:https?:\/\/)?[\w-]+(?:\.[\w-]+)+\.?(?:\d+)?(?:\/\S*)?$/;return new Hn.InputRule(e,(t,n,r,a)=>{const{schema:i}=t,l=t.tr.insertText(n[0],r,a),s=i.marks.link.create({href:n[0],title:n[0]});return l.addMark(r,r+n[0].length,s)})},aw=e=>{const t=[...Hn.smartQuotes,Hn.ellipsis,Hn.emDash];return t.push(ew(e.nodes.blockquote)),t.push(tw(e.nodes.ordered_list)),t.push(nw(e.nodes.bullet_list)),t.push(rw()),t.push(ow()),Hn.inputRules({rules:t})},iw=e=>e.type.name==="paragraph"&&e.nodeSize===2,lw=e=>new Ss.Plugin({props:{decorations(t){const{$from:n}=t.selection;if(iw(n.parent)){const r=bd.Decoration.node(n.before(),n.after(),{"data-placeholder":e});return bd.DecorationSet.create(t.doc,[r])}}}}),sw=(e,t)=>{const n=t?.placeholder,r=[aw(e),ip.keymap(Q3(e)),ip.keymap(ze.baseKeymap),c4.dropCursor(),d4.gapCursor(),Sd.history()];return n&&r.push(lw(n)),r},uw={attrs:{order:{default:1},listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const n={order:+((e.hasAttribute("start")?e.getAttribute("start"):1)||1)},{listStyleType:r,fontSize:a,color:i}=e.style;return r&&(n.listStyleType=r),a&&(n.fontsize=a),i&&(n.color=i),n}}],toDOM:e=>{const{order:t,listStyleType:n,fontsize:r,color:a}=e.attrs;let i="";n&&(i+=`list-style-type: ${n};`),r&&(i+=`font-size: ${r};`),a&&(i+=`color: ${a};`);const l={style:i};return t!==1&&(l.start=t),["ol",l,0]}},cw={attrs:{listStyleType:{default:""},fontsize:{default:""},color:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const t={},{listStyleType:n,fontSize:r,color:a}=e.style;return n&&(t.listStyleType=n),r&&(t.fontsize=r),a&&(t.color=a),t}}],toDOM:e=>{const{listStyleType:t,fontsize:n,color:r}=e.attrs;let a="";return t&&(a+=`list-style-type: ${t};`),n&&(a+=`font-size: ${n};`),r&&(a+=`color: ${r};`),["ul",{style:a},0]}},dw={...wo.listItem,content:"paragraph block*",group:"block"},fw={attrs:{align:{default:""},indent:{default:0},textIndent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t,textIndent:n}=e.style;let r=e.getAttribute("align")||t||"";r=/(left|right|center|justify)/.test(r)?r:"";let a=0;n&&(/em/.test(n)?a=parseInt(n):/px/.test(n)&&(a=Math.floor(parseInt(n)/16),a||(a=1)));const i=+(e.getAttribute("data-indent")||0);return{align:r,indent:i,textIndent:a}}},{tag:"img",ignore:!0},{tag:"pre",skip:!0}],toDOM:e=>{const{align:t,indent:n,textIndent:r}=e.attrs;let a="";t&&t!=="left"&&(a+=`text-align: ${t};`),r&&(a+=`text-indent: ${r}em;`);const i={style:a};return n&&(i["data-indent"]=n),["p",i,0]}},{doc:vw,blockquote:pw,text:hw}=h1.nodes,mw={doc:vw,paragraph:fw,blockquote:pw,text:hw,ordered_list:uw,bullet_list:cw,list_item:dw},gw={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>e==="sub"&&null}],toDOM:()=>["sub",0]},yw={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>e==="super"&&null}],toDOM:()=>["sup",0]},xw={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>e==="line-through"&&null},{style:"text-decoration-line",getAttrs:e=>e==="line-through"&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through;"},0]},ww={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>e==="underline"&&null},{style:"text-decoration-line",getAttrs:e=>e==="underline"&&null}],toDOM:()=>["span",{style:"text-decoration: underline;"},0]},bw={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let n="";return t&&(n+=`color: ${t};`),["span",{style:n},0]}},Sw={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let n="";return t&&(n+=`background-color: ${t};`),["span",{style:n},0]}},_w={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let n="";return t&&(n+=`font-size: ${t};`),["span",{style:n},0]}},kw={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&typeof e=="string"?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let n="";return t&&(n+=`font-family: ${t};`),["span",{style:n},0]}},Cw={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),n=e.getAttribute("title");return{href:t,title:n}}}],toDOM:e=>["a",e.attrs,0]},Ew={attrs:{index:{default:null}},parseDOM:[{tag:"mark",getAttrs:e=>({index:e.dataset.index})}],toDOM:e=>["mark",{"data-index":e.attrs.index},0]},{em:Tw,strong:Nw,code:Iw}=h1.marks,Lw={em:Tw,strong:Nw,fontsize:_w,fontname:kw,code:Iw,forecolor:bw,backcolor:Sw,subscript:gw,superscript:yw,strikethrough:xw,underline:ww,link:Cw,mark:Ew},Aw=mw,Mw=Lw,z1=new p1.Schema({nodes:Aw,marks:Mw}),Qf=e=>{const t=`<div>${e}</div>`,r=new window.DOMParser().parseFromString(t,"text/html").body.firstElementChild;return p1.DOMParser.fromSchema(z1).parse(r)},H1=(e,t,n,r)=>new bd.EditorView(e,{state:Ss.EditorState.create({doc:Qf(t),plugins:sw(z1,r)}),...n});var mt;(function(e){e.RICH_TEXT_COMMAND="RICH_TEXT_COMMAND",e.SYNC_RICH_TEXT_ATTRS_TO_STORE="SYNC_RICH_TEXT_ATTRS_TO_STORE",e.OPEN_CHART_DATA_EDITOR="OPEN_CHART_DATA_EDITOR",e.OPEN_LATEX_EDITOR="OPEN_LATEX_EDITOR"})(mt||(mt={}));const Tt=f4(),Vw=(e,t,n)=>{const{selection:r,doc:a}=e;if(!r||!a)return e;const{from:i,to:l}=r,{nodes:s}=t,u=s.blockquote,c=s.list_item,d=s.paragraph,f=[];n=n||"";const v=new Set([u,c,d]);return a.nodesBetween(i,l,(p,h)=>{const m=p.type;return(p.attrs.align||"")!==n&&v.has(m)&&f.push({node:p,pos:h,nodeType:m}),!0}),f.length&&f.forEach(p=>{const{node:h,pos:m,nodeType:g}=p;let{attrs:y}=h;n?y={...y,align:n}:y={...y,align:null},e=e.setNodeMarkup(m,g,y,h.marks)}),e},Pw=(e,t)=>{const{state:n}=e,{schema:r,selection:a}=n,i=Vw(n.tr.setSelection(a),r,t);e.dispatch(i)};function Dw(e,t,n,r){if(!e.doc)return e;const a=e.doc.nodeAt(t);if(!a)return e;const i=0,l=8;let s=(a.attrs[r]||0)+n;if(s<i&&(s=i),s>l&&(s=l),s===a.attrs[r])return e;const u={...a.attrs,[r]:s};return e.setNodeMarkup(t,a.type,u,a.marks)}const G1=(e,t,n,r)=>{const{selection:a,doc:i}=e;if(!a||!i||!(a instanceof Ss.TextSelection||a instanceof Ss.AllSelection))return e;const{from:l,to:s}=a;return i.nodesBetween(l,s,(u,c)=>{const d=u.type;return d.name==="paragraph"||d.name==="blockquote"?(e=Dw(e,c,n,r),!1):!_s(u,t)}),e},Bw=(e,t)=>{const{state:n}=e,{schema:r,selection:a}=n,i=G1(n.tr.setSelection(a),r,t,"indent");return i.docChanged?(e.dispatch(i),!0):!1},Rw=(e,t)=>{const{state:n}=e,{schema:r,selection:a}=n,i=G1(n.tr.setSelection(a),r,t,"textIndent");return i.docChanged?(e.dispatch(i),!0):!1},Ns=(e,t,n,r={})=>(a,i)=>{const{schema:l,selection:s}=a,{$from:u,$to:c}=s,d=u.blockRange(c);if(!d)return!1;const f=m1(p=>_s(p,l))(s);if(d.depth>=1&&f&&d.depth-f.depth<=1){if(f.node.type===e&&!n)return wo.liftListItem(t)(a,i);if(_s(f.node,l)&&e.validContent(f.node.content)){const{tr:p}=a,h={...f.node.attrs,...r};return n&&(h.listStyleType=n),p.setNodeMarkup(f.pos,e,h),i&&i(p),!1}}const v={...r};return n&&(v.listStyleType=n),wo.wrapInList(e,v)(a,i)},Xa=(e,t)=>{const{state:n}=e,{schema:r,selection:a}=n,i=n.tr.setSelection(a),{doc:l}=i;if(!l)return i;const{from:s,to:u}=a;l.nodesBetween(s,u,(c,d)=>{if(_s(c,r)&&s-3<=d&&u+3>=d+c.nodeSize){const f=Array.isArray(t)?t:[t];for(const v of f)i.setNodeAttribute(d,v.key,v.value)}return!1}),e.dispatch(i)},$w=(e,t)=>{const{state:n}=e,{schema:r,doc:a}=n;let i=[],l=r.nodes.paragraph;if(a.content.size>2){const d=a.resolve(1);i=[...d.marks()],l=d.parent.type}const u=t.split(`
|
|
19
|
+
`).map(d=>{if(d.trim()==="")return l.create();const f=r.text(d,i);return l.create(null,f)}),c=n.tr;c.replaceWith(0,a.content.size,u),e.dispatch(c)},Ow={__name:"ProsemirrorEditor",props:{elementId:{type:String,required:!0},defaultColor:{type:String,required:!0},defaultFontName:{type:String,required:!0},value:{type:String,required:!0},editable:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:n}){const r=e,a=n,i=ve(),{handleElementId:l,textFormatPainter:s,richTextAttrs:u,activeElementIdList:c}=te.storeToRefs(i),{ctrlOrShiftKeyActive:d}=te.storeToRefs(on()),f=o.useTemplateRef("editorViewRef");let v;const p=qe.debounce(function(w=!1){r.value.replace(/ style=\"\"/g,"")!==v.dom.innerHTML.replace(/ style=\"\"/g,"")&&a("update",{value:v.dom.innerHTML,ignore:w})},300,{trailing:!0}),h=()=>{(!d.value||c.value.length<=1)&&i.setDisableHotkeysState(!0),a("focus")},m=()=>{i.setDisableHotkeysState(!1),a("blur")},g=qe.debounce(function(){const w=_d(v,{color:r.defaultColor,fontname:r.defaultFontName});i.setRichtextAttrs(w)},30,{trailing:!0}),y=(w,C)=>{const{ctrlKey:E,shiftKey:L,metaKey:N}=C,T=E||L||N,A=C.key.toUpperCase(),I=T&&(A===ye.Z||A===ye.Y);p(I),g()},x=o.computed(()=>r.value);o.watch(x,()=>{if(!v||v.hasFocus())return;const{doc:w,tr:C}=v.state;v.dispatch(C.replaceRangeWith(0,w.content.size,Qf(x.value)))}),o.watch(()=>r.editable,()=>{v.setProps({editable:()=>r.editable})}),t({focus:()=>v.focus()});const S=({target:w,action:C})=>{if(!w&&l.value!==r.elementId||w&&w!==r.elementId)return;const E="command"in C?[C]:C;for(const L of E)if(L.command==="fontname"&&L.value!==void 0){const N=v.state.schema.marks.fontname.create({fontname:L.value});vt(v),Rn(v,N),L.value&&!document.fonts.check(`16px ${L.value}`)&&Se.warning("字体需要等待加载下载后生效,请稍等")}else if(L.command==="fontsize"&&L.value){const N=v.state.schema.marks.fontsize.create({fontsize:L.value});vt(v),Rn(v,N),Xa(v,{key:"fontsize",value:L.value})}else if(L.command==="fontsize-add"){const N=L.value?+L.value:2;vt(v);const T=lp(v)+N+"px",A=v.state.schema.marks.fontsize.create({fontsize:T});Rn(v,A),Xa(v,{key:"fontsize",value:T})}else if(L.command==="fontsize-reduce"){const N=L.value?+L.value:2;vt(v);let T=lp(v)-N;T<12&&(T=12);const A=v.state.schema.marks.fontsize.create({fontsize:T+"px"});Rn(v,A),Xa(v,{key:"fontsize",value:T+"px"})}else if(L.command==="color"&&L.value){const N=v.state.schema.marks.forecolor.create({color:L.value});vt(v),Rn(v,N),Xa(v,{key:"color",value:L.value})}else if(L.command==="backcolor"&&L.value){const N=v.state.schema.marks.backcolor.create({backcolor:L.value});vt(v),Rn(v,N)}else if(L.command==="bold")vt(v),ze.toggleMark(v.state.schema.marks.strong)(v.state,v.dispatch);else if(L.command==="em")vt(v),ze.toggleMark(v.state.schema.marks.em)(v.state,v.dispatch);else if(L.command==="underline")vt(v),ze.toggleMark(v.state.schema.marks.underline)(v.state,v.dispatch);else if(L.command==="strikethrough")vt(v),ze.toggleMark(v.state.schema.marks.strikethrough)(v.state,v.dispatch);else if(L.command==="subscript")ze.toggleMark(v.state.schema.marks.subscript)(v.state,v.dispatch);else if(L.command==="superscript")ze.toggleMark(v.state.schema.marks.superscript)(v.state,v.dispatch);else if(L.command==="blockquote")us("blockquote",v.state)?ze.lift(v.state,v.dispatch):ze.wrapIn(v.state.schema.nodes.blockquote)(v.state,v.dispatch);else if(L.command==="code")ze.toggleMark(v.state.schema.marks.code)(v.state,v.dispatch);else if(L.command==="align"&&L.value)Pw(v,L.value);else if(L.command==="indent"&&L.value)Bw(v,+L.value);else if(L.command==="textIndent"&&L.value)Rw(v,+L.value);else if(L.command==="bulletList"){const N=L.value||"",{bullet_list:T,list_item:A}=v.state.schema.nodes,I={color:u.value.color,fontsize:u.value.fontsize};Ns(T,A,N,I)(v.state,v.dispatch)}else if(L.command==="orderedList"){const N=L.value||"",{ordered_list:T,list_item:A}=v.state.schema.nodes,I={color:u.value.color,fontsize:u.value.fontsize};Ns(T,A,N,I)(v.state,v.dispatch)}else if(L.command==="clear"){vt(v);const{$from:N,$to:T}=v.state.selection;v.dispatch(v.state.tr.removeMark(N.pos,T.pos)),Xa(v,[{key:"fontsize",value:""},{key:"color",value:""}])}else if(L.command==="link"){const N=v.state.schema.marks.link,{from:T,to:A}=v.state.selection,I=p4(v.state.doc,T,A,N);if(I)if(L.value){const D=v.state.schema.marks.link.create({href:L.value,title:L.value});Rn(v,D,{from:I.from.pos,to:I.to.pos+1})}else v.dispatch(v.state.tr.removeMark(I.from.pos,I.to.pos+1,N));else if(y4(v.state,N))if(L.value){const D=v.state.schema.marks.link.create({href:L.value,title:L.value});Rn(v,D)}else ze.toggleMark(N)(v.state,v.dispatch);else L.value&&(vt(v),ze.toggleMark(N,{href:L.value,title:L.value})(v.state,v.dispatch))}else L.command==="insert"&&L.value?v.dispatch(v.state.tr.insertText(L.value)):L.command==="replace"&&L.value&&$w(v,L.value);v.focus(),p(),g()},_=()=>{if(!s.value)return;const{keep:w,...C}=s.value,E=[{command:"clear"}];for(const L of Object.keys(C)){const N=L,T=s.value[L];T===!0?E.push({command:N}):T&&E.push({command:N,value:T})}S({action:E}),w||i.setTextFormatPainter(null)};o.onMounted(()=>{v=H1(f.value,x.value,{handleDOMEvents:{focus:h,blur:m,keydown:y,click:g,mouseup:_},editable:()=>r.editable}),r.autoFocus&&v.focus()}),o.onUnmounted(()=>{v&&v.destroy()});const k=()=>{l.value===r.elementId&&g()};return Tt.on(mt.RICH_TEXT_COMMAND,S),Tt.on(mt.SYNC_RICH_TEXT_ATTRS_TO_STORE,k),o.onUnmounted(()=>{Tt.off(mt.RICH_TEXT_COMMAND,S),Tt.off(mt.SYNC_RICH_TEXT_ATTRS_TO_STORE,k)}),(w,C)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["prosemirror-editor",{"format-painter":o.unref(s)}]),ref_key:"editorViewRef",ref:f,onMousedown:C[0]||(C[0]=E=>a("mousedown",E))},null,34))}},U1=oe(Ow,[["__scopeId","data-v-c4abd80f"]]),Fw={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=ve(),r=pe(),{handleElementId:a,isScaling:i}=te.storeToRefs(n),{addHistorySnapshot:l}=Ee(),s=o.useTemplateRef("elementRef"),u=o.computed(()=>t.elementInfo.shadow),{shadowStyle:c}=Ur(u),d=(x,b=!0)=>{t.elementInfo.lock||(x.stopPropagation(),t.selectElement(x,t.elementInfo,b))},f=o.ref(-1),v=o.ref(-1);o.watch(i,()=>{a.value===t.elementInfo.id&&(i.value||(!t.elementInfo.vertical&&f.value!==-1&&(r.updateElement({id:t.elementInfo.id,props:{height:f.value}}),f.value=-1),t.elementInfo.vertical&&v.value!==-1&&(r.updateElement({id:t.elementInfo.id,props:{width:v.value}}),v.value=-1)))});const p=x=>{const b=x[0].contentRect;if(!s.value)return;const S=b.height+20,_=b.width+20;!t.elementInfo.vertical&&t.elementInfo.height!==S&&(i.value?f.value=S:r.updateElement({id:t.elementInfo.id,props:{height:S}})),t.elementInfo.vertical&&t.elementInfo.width!==_&&(i.value?v.value=_:r.updateElement({id:t.elementInfo.id,props:{width:_}}))},h=new ResizeObserver(p);o.onMounted(()=>{s.value&&h.observe(s.value)}),o.onUnmounted(()=>{s.value&&h.unobserve(s.value)});const m=(x,b=!1)=>{r.updateElement({id:t.elementInfo.id,props:{content:x}}),b||l()},g=qe.debounce(function(){t.elementInfo.content.replace(/<[^>]+>/g,"")||r.deleteElement(t.elementInfo.id)},300,{trailing:!0}),y=o.computed(()=>a.value===t.elementInfo.id);return o.watch(y,()=>{y.value||g()}),(x,b)=>{const S=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-text",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",ref_key:"elementRef",ref:s,style:o.normalizeStyle({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:o.unref(c),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:b[2]||(b[2]=_=>d(_)),onTouchstart:b[3]||(b[3]=_=>d(_))},[o.createVNode(uu,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),o.createVNode(U1,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:o.normalizeStyle({"--paragraphSpace":`${e.elementInfo.paragraphSpace===void 0?5:e.elementInfo.paragraphSpace}px`}),onUpdate:b[0]||(b[0]=({value:_,ignore:k})=>m(_,k)),onMousedown:b[1]||(b[1]=_=>d(_,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),b[4]||(b[4]=o.createElementVNode("div",{class:"drag-handler top"},null,-1)),b[5]||(b[5]=o.createElementVNode("div",{class:"drag-handler bottom"},null,-1))],36)),[[S,e.contextmenus]])],4)],6)}}},zw=oe(Fw,[["__scopeId","data-v-ab6d1a06"]]),W1=(e,t)=>({fill:o.computed(()=>e.value.pattern?`url(#${t}-pattern-${e.value.id})`:e.value.gradient?`url(#${t}-gradient-${e.value.id})`:e.value.fill||"none")}),Hw=["id"],Gw=["href"],Y1={__name:"PatternDefs",props:{id:{type:String,required:!0},src:{type:String,required:!0}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("pattern",{id:e.id,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",height:"1"},[o.createElementVNode("image",{href:e.src,width:"1",height:"1",preserveAspectRatio:"xMidYMid slice"},null,8,Gw)],8,Hw))}},Uw=["id","gradientTransform"],Ww=["offset","stop-color"],Yw=["id"],Xw=["offset","stop-color"],X1={__name:"GradientDefs",props:{id:{type:String,required:!0},type:{type:Object,required:!0},colors:{type:Array,required:!0},rotate:{type:Number,default:0}},setup(e){return(t,n)=>e.type==="linear"?(o.openBlock(),o.createElementBlock("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.colors,(r,a)=>(o.openBlock(),o.createElementBlock("stop",{key:a,offset:`${r.pos}%`,"stop-color":r.color},null,8,Ww))),128))],8,Uw)):(o.openBlock(),o.createElementBlock("radialGradient",{key:1,id:e.id},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.colors,(r,a)=>(o.openBlock(),o.createElementBlock("stop",{key:a,offset:`${r.pos}%`,"stop-color":r.color},null,8,Xw))),128))],8,Yw))}},qw=["width","height"],Zw=["transform"],jw=["d","fill","stroke","stroke-width","stroke-dasharray"],Jw={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=ve(),r=pe(),{theme:a}=te.storeToRefs(r),{handleElementId:i,shapeFormatPainter:l}=te.storeToRefs(n),{addHistorySnapshot:s}=Ee(),u=(N,T=!0)=>{t.elementInfo.lock||(N.stopPropagation(),t.selectElement(N,t.elementInfo,T))},c=()=>{if(!l.value)return;const{keep:N,...T}=l.value;r.updateElement({id:t.elementInfo.id,props:T}),s(),N||n.setShapeFormatPainter(null)},d=o.computed(()=>t.elementInfo),{fill:f}=W1(d,"editable"),v=o.computed(()=>t.elementInfo.outline),{outlineWidth:p,outlineColor:h,strokeDashArray:m}=Ba(v),g=o.computed(()=>t.elementInfo.shadow),{shadowStyle:y}=Ur(g),x=o.computed(()=>t.elementInfo.flipH),b=o.computed(()=>t.elementInfo.flipV),{flipStyle:S}=su(x,b),_=o.ref(!1);o.watch(i,()=>{i.value!==t.elementInfo.id&&_.value&&(_.value=!1)});const k=o.computed(()=>{const N={content:"",align:"middle",defaultFontName:a.value.fontName,defaultColor:a.value.fontColor};return t.elementInfo.text?t.elementInfo.text:N}),w=(N,T=!1)=>{const A={...k.value,content:N};r.updateElement({id:t.elementInfo.id,props:{text:A}}),T||s()},C=()=>{if(!t.elementInfo.text)return;t.elementInfo.text.content.replace(/<[^>]+>/g,"")||(r.removeElementProps({id:t.elementInfo.id,propName:"text"}),s())},E=o.useTemplateRef("prosemirrorEditorRef"),L=()=>{_.value=!0,o.nextTick(()=>E.value&&E.value.focus())};return(N,T)=>{const A=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-shape",{lock:e.elementInfo.lock,"format-painter":o.unref(l)}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",style:o.normalizeStyle({opacity:e.elementInfo.opacity,filter:o.unref(y)?`drop-shadow(${o.unref(y)})`:"",transform:o.unref(S),color:k.value.defaultColor,fontFamily:k.value.defaultFontName}),onMousedown:T[3]||(T[3]=I=>u(I)),onMouseup:T[4]||(T[4]=I=>c()),onTouchstart:T[5]||(T[5]=I=>u(I)),onDblclick:T[6]||(T[6]=I=>L())},[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[o.createElementVNode("defs",null,[e.elementInfo.pattern?(o.openBlock(),o.createBlock(Y1,{key:0,id:`editable-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,["id","src"])):e.elementInfo.gradient?(o.openBlock(),o.createBlock(X1,{key:1,id:`editable-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])):o.createCommentVNode("",!0)]),o.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[o.createElementVNode("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:o.unref(f),stroke:o.unref(h),"stroke-width":o.unref(p),"stroke-dasharray":o.unref(m)},null,8,jw)],8,Zw)],8,qw)),o.createElementVNode("div",{class:o.normalizeClass(["shape-text",[k.value.align,{editable:_.value||k.value.content}]])},[_.value||k.value.content?(o.openBlock(),o.createBlock(U1,{key:0,ref_key:"prosemirrorEditorRef",ref:E,elementId:e.elementInfo.id,defaultColor:k.value.defaultColor,defaultFontName:k.value.defaultFontName,editable:!e.elementInfo.lock,value:k.value.content,onUpdate:T[0]||(T[0]=({value:I,ignore:D})=>w(I,D)),onBlur:T[1]||(T[1]=I=>C()),onMousedown:T[2]||(T[2]=I=>u(I,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):o.createCommentVNode("",!0)],2)],36)),[[A,e.contextmenus]])],4)],6)}}},Kw=oe(Jw,[["__scopeId","data-v-13050a08"]]),Qw=["id","markerWidth","markerHeight","refX","refY"],eb=["d","fill","transform"],Vr={__name:"LinePointMarker",props:{id:{type:String,required:!0},position:{type:String,required:!0},type:{type:String,required:""},baseSize:{type:Number,required:!0},color:{type:String}},setup(e){const t=e,n={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},r={"arrow-start":180,"arrow-end":0},a=o.computed(()=>n[t.type]),i=o.computed(()=>r[`${t.type}-${t.position}`]||0),l=o.computed(()=>t.baseSize<2?2:t.baseSize);return(s,u)=>(o.openBlock(),o.createElementBlock("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:l.value*3,markerHeight:l.value*3,refX:l.value*1.5,refY:l.value*1.5},[o.createElementVNode("path",{d:a.value,fill:e.color,transform:`scale(${l.value*.3}, ${l.value*.3}) rotate(${i.value}, 5, 5)`},null,8,eb)],8,Qw))}},tb=["width","height"],nb=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],rb=["d"],ob={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=c=>{t.elementInfo.lock||(c.stopPropagation(),t.selectElement(c,t.elementInfo))},r=o.computed(()=>t.elementInfo.shadow),{shadowStyle:a}=Ur(r),i=o.computed(()=>{const c=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return c<24?24:c}),l=o.computed(()=>{const c=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return c<24?24:c}),s=o.computed(()=>{const c=t.elementInfo.width;return t.elementInfo.style==="dashed"?c<=8?`${c*5} ${c*2.5}`:`${c*5} ${c*1.5}`:t.elementInfo.style==="dotted"?c<=8?`${c*1.8} ${c*1.6}`:`${c*1.5} ${c*1.2}`:"0 0"}),u=o.computed(()=>Uf(t.elementInfo));return(c,d)=>{const f=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-shape",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({filter:o.unref(a)?`drop-shadow(${o.unref(a)})`:""}),onMousedown:d[0]||(d[0]=v=>n(v)),onTouchstart:d[1]||(d[1]=v=>n(v))},[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:i.value,height:l.value},[o.createElementVNode("defs",null,[e.elementInfo.points[0]?(o.openBlock(),o.createBlock(Vr,{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"])):o.createCommentVNode("",!0),e.elementInfo.points[1]?(o.openBlock(),o.createBlock(Vr,{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"])):o.createCommentVNode("",!0)]),o.createElementVNode("path",{class:"line-point",d:u.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":s.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,nb),o.withDirectives(o.createElementVNode("path",{class:"line-path",d:u.value,stroke:"transparent","stroke-width":"20",fill:"none"},null,8,rb),[[f,e.contextmenus]])],8,tb))],36)],6)}}},ab=oe(ob,[["__scopeId","data-v-bb998445"]]),ib=({type:e,data:t,themeColors:n,textColor:r,lineColor:a,lineSmooth:i,stack:l})=>{const s=r?{color:r}:{},u=r?{lineStyle:{color:r}}:void 0,c=r?{color:r}:void 0,d=a?{lineStyle:{color:a}}:{},f=t.series.length>1?{top:"bottom",textStyle:s}:void 0;if(e==="bar")return{color:n,textStyle:s,legend:f,xAxis:{type:"category",data:t.labels,axisLine:u,axisLabel:c},yAxis:{type:"value",axisLine:u,axisLabel:c,splitLine:d},series:t.series.map((v,p)=>{const h={data:v,name:t.legends[p],type:"bar",label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return l&&(h.stack="A"),h})};if(e==="column")return{color:n,textStyle:s,legend:f,yAxis:{type:"category",data:t.labels,axisLine:u,axisLabel:c},xAxis:{type:"value",axisLine:u,axisLabel:c,splitLine:d},series:t.series.map((v,p)=>{const h={data:v,name:t.legends[p],type:"bar",label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return l&&(h.stack="A"),h})};if(e==="line")return{color:n,textStyle:s,legend:f,xAxis:{type:"category",data:t.labels,axisLine:u,axisLabel:c},yAxis:{type:"value",axisLine:u,axisLabel:c,splitLine:d},series:t.series.map((v,p)=>{const h={data:v,name:t.legends[p],type:"line",smooth:i,label:{show:!0}};return l&&(h.stack="A"),h})};if(e==="pie")return{color:n,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:t.series[0].map((v,p)=>({value:v,name:t.labels[p]})),label:r?{color:r}:{},type:"pie",radius:"70%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(e==="ring")return{color:n,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:t.series[0].map((v,p)=>({value:v,name:t.labels[p]})),label:r?{color:r}:{},type:"pie",radius:["40%","70%"],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(e==="area")return{color:n,textStyle:s,legend:f,xAxis:{type:"category",boundaryGap:!1,data:t.labels,axisLine:u,axisLabel:c},yAxis:{type:"value",axisLine:u,axisLabel:c,splitLine:d},series:t.series.map((v,p)=>{const h={data:v,name:t.legends[p],type:"line",areaStyle:{},label:{show:!0}};return l&&(h.stack="A"),h})};if(e==="radar")return{color:n,textStyle:s,legend:f,radar:{indicator:t.labels.map(v=>({name:v})),splitLine:d,axisLine:a?{lineStyle:{color:a}}:void 0},series:[{data:t.series.map((v,p)=>({value:v,name:t.legends[p]})),type:"radar"}]};if(e==="scatter"){const v=[];for(let p=0;p<t.series[0].length;p++){const h=t.series[0][p],m=t.series[1]?t.series[1][p]:h;v.push([h,m])}return{color:n,textStyle:s,xAxis:{axisLine:u,axisLabel:c,splitLine:d},yAxis:{axisLine:u,axisLabel:c,splitLine:d},series:[{symbolSize:12,data:v,type:"scatter"}]}}return null};var Md=function(e,t){return Md=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Md(e,t)};function me(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Md(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var lb=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),sb=(function(){function e(){this.browser=new lb,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e})(),He=new sb;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(He.wxa=!0,He.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?He.worker=!0:!He.hasGlobalWindow||"Deno"in window?(He.node=!0,He.svgSupported=!0):ub(navigator.userAgent,He);function ub(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),l=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),a&&(n.ie=!0,n.version=a[1]),i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18),l&&(n.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var ev=12,q1="sans-serif",Pr=ev+"px "+q1,cb=20,db=100,fb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function vb(e){var t={};if(typeof JSON>"u")return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),a=(e.charCodeAt(n)-cb)/db;t[r]=a}return t}var pb=vb(fb),cl={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var e,t;return function(n,r){if(!e){var a=cl.createCanvas();e=a&&a.getContext("2d")}if(e)return t!==r&&(t=e.font=r||Pr),e.measureText(n);n=n||"",r=r||Pr;var i=/((?:\d+)?\.?\d*)px/.exec(r),l=i&&+i[1]||ev,s=0;if(r.indexOf("mono")>=0)s=l*n.length;else for(var u=0;u<n.length;u++){var c=pb[n[u]];s+=c==null?l:c*l}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},Z1=Dr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),j1=Dr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ra=Object.prototype.toString,cu=Array.prototype,hb=cu.forEach,mb=cu.filter,tv=cu.slice,gb=cu.map,bp=(function(){}).constructor,bl=bp?bp.prototype:null,nv="__proto__",yb=2311;function J1(){return yb++}function ka(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Oe(e){if(e==null||typeof e!="object")return e;var t=e,n=Ra.call(e);if(n==="[object Array]"){if(!Ni(e)){t=[];for(var r=0,a=e.length;r<a;r++)t[r]=Oe(e[r])}}else if(j1[n]){if(!Ni(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(var r=0,a=e.length;r<a;r++)t[r]=e[r]}}}else if(!Z1[n]&&!Ni(e)&&!Is(e)){t={};for(var l in e)e.hasOwnProperty(l)&&l!==nv&&(t[l]=Oe(e[l]))}return t}function je(e,t,n){if(!Ce(t)||!Ce(e))return n?Oe(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==nv){var a=e[r],i=t[r];Ce(i)&&Ce(a)&&!we(i)&&!we(a)&&!Is(i)&&!Is(a)&&!Sp(i)&&!Sp(a)&&!Ni(i)&&!Ni(a)?je(a,i,n):(n||!(r in e))&&(e[r]=Oe(t[r]))}return e}function fe(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==nv&&(e[n]=t[n]);return e}function $e(e,t,n){for(var r=Fe(t),a=0,i=r.length;a<i;a++){var l=r[a];e[l]==null&&(e[l]=t[l])}return e}function et(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function xb(e,t){var n=e.prototype;function r(){}r.prototype=t.prototype,e.prototype=new r;for(var a in n)n.hasOwnProperty(a)&&(e.prototype[a]=n[a]);e.prototype.constructor=e,e.superClass=t}function Nn(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),a=0;a<r.length;a++){var i=r[a];i!=="constructor"&&e[i]==null&&(e[i]=t[i])}else $e(e,t)}function qt(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function q(e,t,n){if(e&&t)if(e.forEach&&e.forEach===hb)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function ge(e,t,n){if(!e)return[];if(!t)return ov(e);if(e.map&&e.map===gb)return e.map(t,n);for(var r=[],a=0,i=e.length;a<i;a++)r.push(t.call(n,e[a],a,e));return r}function Dr(e,t,n,r){if(e&&t){for(var a=0,i=e.length;a<i;a++)n=t.call(r,n,e[a],a,e);return n}}function wt(e,t,n){if(!e)return[];if(!t)return ov(e);if(e.filter&&e.filter===mb)return e.filter(t,n);for(var r=[],a=0,i=e.length;a<i;a++)t.call(n,e[a],a,e)&&r.push(e[a]);return r}function wb(e,t,n){if(e&&t){for(var r=0,a=e.length;r<a;r++)if(t.call(n,e[r],r,e))return e[r]}}function Fe(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function bb(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(tv.call(arguments)))}}var dt=bl&&Ae(bl.bind)?bl.call.bind(bl.bind):bb;function Qt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(tv.call(arguments)))}}function we(e){return Array.isArray?Array.isArray(e):Ra.call(e)==="[object Array]"}function Ae(e){return typeof e=="function"}function _e(e){return typeof e=="string"}function K1(e){return Ra.call(e)==="[object String]"}function Qe(e){return typeof e=="number"}function Ce(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function Sp(e){return!!Z1[Ra.call(e)]}function Ot(e){return!!j1[Ra.call(e)]}function Is(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function rv(e){return e.colorStops!=null}function Sb(e){return Ra.call(e)==="[object RegExp]"}function Gi(e){return e!==e}function Lo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function ke(e,t){return e??t}function Eo(e,t,n){return e??t??n}function ov(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return tv.apply(e,t)}function Q1(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function Pe(e,t){if(!e)throw new Error(t)}function _r(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var eg="__ec_primitive__";function Vd(e){e[eg]=!0}function Ni(e){return e[eg]}var _b=(function(){function e(){this.data={}}return e.prototype.delete=function(t){var n=this.has(t);return n&&delete this.data[t],n},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,n){return this.data[t]=n,this},e.prototype.keys=function(){return Fe(this.data)},e.prototype.forEach=function(t){var n=this.data;for(var r in n)n.hasOwnProperty(r)&&t(n[r],r)},e})(),tg=typeof Map=="function";function kb(){return tg?new Map:new _b}var Cb=(function(){function e(t){var n=we(t);this.data=kb();var r=this;t instanceof e?t.each(a):t&&q(t,a);function a(i,l){n?r.set(i,l):r.set(l,i)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,n){return this.data.set(t,n),n},e.prototype.each=function(t,n){this.data.forEach(function(r,a){t.call(n,r,a)})},e.prototype.keys=function(){var t=this.data.keys();return tg?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e})();function Ve(e){return new Cb(e)}function Eb(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var a=e.length,r=0;r<t.length;r++)n[r+a]=t[r];return n}function du(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&fe(n,t),n}function Ca(e,t){return e.hasOwnProperty(t)}function en(){}var cs=180/Math.PI;function $a(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function Tb(e){return[e[0],e[1]]}function _p(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Nb(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Ib(e){return Math.sqrt(Lb(e))}function Lb(e){return e[0]*e[0]+e[1]*e[1]}function ju(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Ab(e,t){var n=Ib(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Pd(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Dd=Pd;function Mb(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var ga=Mb;function Ju(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function yn(e,t,n){var r=t[0],a=t[1];return e[0]=n[0]*r+n[2]*a+n[4],e[1]=n[1]*r+n[3]*a+n[5],e}function da(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function fa(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Ho=(function(){function e(t,n){this.target=t,this.topTarget=n&&n.topTarget}return e})(),Vb=(function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Ho(n,t),"dragstart",t.event))},e.prototype._drag=function(t){var n=this._draggingTarget;if(n){var r=t.offsetX,a=t.offsetY,i=r-this._x,l=a-this._y;this._x=r,this._y=a,n.drift(i,l,t),this.handler.dispatchToElement(new Ho(n,t),"drag",t.event);var s=this.handler.findHover(r,a,n).target,u=this._dropTarget;this._dropTarget=s,n!==s&&(u&&s!==u&&this.handler.dispatchToElement(new Ho(u,t),"dragleave",t.event),s&&s!==u&&this.handler.dispatchToElement(new Ho(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new Ho(n,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Ho(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e})(),lr=(function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,n,r,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof n=="function"&&(a=r,r=n,n=null),!r||!t)return this;var l=this._$eventProcessor;n!=null&&l&&l.normalizeQuery&&(n=l.normalizeQuery(n)),i[t]||(i[t]=[]);for(var s=0;s<i[t].length;s++)if(i[t][s].h===r)return this;var u={h:r,query:n,ctx:a||this,callAtLast:r.zrEventfulCallAtLast},c=i[t].length-1,d=i[t][c];return d&&d.callAtLast?i[t].splice(c,0,u):i[t].push(u),this},e.prototype.isSilent=function(t){var n=this._$handlers;return!n||!n[t]||!n[t].length},e.prototype.off=function(t,n){var r=this._$handlers;if(!r)return this;if(!t)return this._$handlers={},this;if(n){if(r[t]){for(var a=[],i=0,l=r[t].length;i<l;i++)r[t][i].h!==n&&a.push(r[t][i]);r[t]=a}r[t]&&r[t].length===0&&delete r[t]}else delete r[t];return this},e.prototype.trigger=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this._$handlers)return this;var a=this._$handlers[t],i=this._$eventProcessor;if(a)for(var l=n.length,s=a.length,u=0;u<s;u++){var c=a[u];if(!(i&&i.filter&&c.query!=null&&!i.filter(t,c.query)))switch(l){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,n[0]);break;case 2:c.h.call(c.ctx,n[0],n[1]);break;default:c.h.apply(c.ctx,n);break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this._$handlers)return this;var a=this._$handlers[t],i=this._$eventProcessor;if(a)for(var l=n.length,s=n[l-1],u=a.length,c=0;c<u;c++){var d=a[c];if(!(i&&i.filter&&d.query!=null&&!i.filter(t,d.query)))switch(l){case 0:d.h.call(s);break;case 1:d.h.call(s,n[0]);break;case 2:d.h.call(s,n[0],n[1]);break;default:d.h.apply(s,n.slice(1,l-1));break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},e})(),Pb=Math.log(2);function Bd(e,t,n,r,a,i){var l=r+"-"+a,s=e.length;if(i.hasOwnProperty(l))return i[l];if(t===1){var u=Math.round(Math.log((1<<s)-1&~a)/Pb);return e[n][u]}for(var c=r|1<<n,d=n+1;r&1<<d;)d++;for(var f=0,v=0,p=0;v<s;v++){var h=1<<v;h&a||(f+=(p%2?-1:1)*e[n][v]*Bd(e,t-1,d,c,a|h,i),p++)}return i[l]=f,f}function Db(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},a=Bd(n,8,0,0,0,r);if(a!==0){for(var i=[],l=0;l<8;l++)for(var s=0;s<8;s++)i[s]==null&&(i[s]=0),i[s]+=((l+s)%2?-1:1)*Bd(n,7,l===0?1:0,1<<l,1<<s,r)/a*t[l];return function(u,c,d){var f=c*i[6]+d*i[7]+1;u[0]=(c*i[0]+d*i[1]+i[2])/f,u[1]=(c*i[3]+d*i[4]+i[5])/f}}}var kp="___zrEVENTSAVED";function Bb(e,t,n,r,a){if(t.getBoundingClientRect&&He.domSupported&&!ng(t)){var i=t[kp]||(t[kp]={}),l=Rb(t,i),s=$b(l,i);if(s)return s(e,n,r),!0}return!1}function Rb(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],a=["top","bottom"],i=0;i<4;i++){var l=document.createElement("div"),s=l.style,u=i%2,c=(i>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[u]+":0",a[c]+":0",r[1-u]+":auto",a[1-c]+":auto",""].join("!important;"),e.appendChild(l),n.push(l)}return n}function $b(e,t,n){for(var r="trans",a=t[r],i=t.srcCoords,l=[],s=[],u=!0,c=0;c<4;c++){var d=e[c].getBoundingClientRect(),f=2*c,v=d.left,p=d.top;l.push(v,p),u=u&&i&&v===i[f]&&p===i[f+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return u&&a?a:(t.srcCoords=l,t[r]=Db(l,s))}function ng(e){return e.nodeName.toUpperCase()==="CANVAS"}var Ob=/([&<>"'])/g,Fb={"&":"&","<":"<",">":">",'"':""","'":"'"};function zb(e){return e==null?"":(e+"").replace(Ob,function(t,n){return Fb[n]})}var Hb=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ku=[],Gb=He.browser.firefox&&+He.browser.version.split(".")[0]<39;function Rd(e,t,n,r){return n=n||{},r?Cp(e,t,n):Gb&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX!=null?(n.zrX=t.offsetX,n.zrY=t.offsetY):Cp(e,t,n),n}function Cp(e,t,n){if(He.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(ng(e)){var i=e.getBoundingClientRect();n.zrX=r-i.left,n.zrY=a-i.top;return}else if(Bb(Ku,e,r,a)){n.zrX=Ku[0],n.zrY=Ku[1];return}}n.zrX=n.zrY=0}function av(e){return e||window.event}function kn(e,t,n){if(t=av(t),t.zrX!=null)return t;var r=t.type,a=r&&r.indexOf("touch")>=0;if(a){var l=r!=="touchend"?t.targetTouches[0]:t.changedTouches[0];l&&Rd(e,l,t,n)}else{Rd(e,t,t,n);var i=Ub(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Hb.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Ub(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var a=Math.abs(r!==0?r:n),i=r>0?-1:r<0?1:n>0?-1:1;return 3*a*i}function Wb(e,t,n,r){e.addEventListener(t,n,r)}function Yb(e,t,n,r){e.removeEventListener(t,n,r)}var Xb=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},qb=(function(){function e(){this._track=[]}return e.prototype.recognize=function(t,n,r){return this._doTrack(t,n,r),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,n,r){var a=t.touches;if(a){for(var i={points:[],touches:[],target:n,event:t},l=0,s=a.length;l<s;l++){var u=a[l],c=Rd(r,u,{});i.points.push([c.zrX,c.zrY]),i.touches.push(u)}this._track.push(i)}},e.prototype._recognize=function(t){for(var n in Qu)if(Qu.hasOwnProperty(n)){var r=Qu[n](this._track,t);if(r)return r}},e})();function Ep(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Zb(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var Qu={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,a=(e[n-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var i=Ep(r)/Ep(a);!isFinite(i)&&(i=1),t.pinchScale=i;var l=Zb(r);return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}};function Ii(){return[1,0,0,1,0,0]}function iv(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function jb(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function ya(e,t,n){var r=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],l=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],u=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=a,e[2]=i,e[3]=l,e[4]=s,e[5]=u,e}function Tp(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function rg(e,t,n,r){r===void 0&&(r=[0,0]);var a=t[0],i=t[2],l=t[4],s=t[1],u=t[3],c=t[5],d=Math.sin(n),f=Math.cos(n);return e[0]=a*f+s*d,e[1]=-a*d+s*f,e[2]=i*f+u*d,e[3]=-i*d+f*u,e[4]=f*(l-r[0])+d*(c-r[1])+r[0],e[5]=f*(c-r[1])-d*(l-r[0])+r[1],e}function Jb(e,t,n){var r=n[0],a=n[1];return e[0]=t[0]*r,e[1]=t[1]*a,e[2]=t[2]*r,e[3]=t[3]*a,e[4]=t[4]*r,e[5]=t[5]*a,e}function lv(e,t){var n=t[0],r=t[2],a=t[4],i=t[1],l=t[3],s=t[5],u=n*l-i*r;return u?(u=1/u,e[0]=l*u,e[1]=-i*u,e[2]=-r*u,e[3]=n*u,e[4]=(r*s-l*a)*u,e[5]=(i*a-n*s)*u,e):null}var Le=(function(){function e(t,n){this.x=t||0,this.y=n||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,n){return this.x=t,this.y=n,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)},e.prototype.distanceSquare=function(t){var n=this.x-t.x,r=this.y-t.y;return n*n+r*r},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var n=this.x,r=this.y;return this.x=t[0]*n+t[2]*r+t[4],this.y=t[1]*n+t[3]*r+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,n,r){t.x=n,t.y=r},e.copy=function(t,n){t.x=n.x,t.y=n.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,n){return t.x*n.x+t.y*n.y},e.add=function(t,n,r){t.x=n.x+r.x,t.y=n.y+r.y},e.sub=function(t,n,r){t.x=n.x-r.x,t.y=n.y-r.y},e.scale=function(t,n,r){t.x=n.x*r,t.y=n.y*r},e.scaleAndAdd=function(t,n,r,a){t.x=n.x+r.x*a,t.y=n.y+r.y*a},e.lerp=function(t,n,r,a){var i=1-a;t.x=i*n.x+a*r.x,t.y=i*n.y+a*r.y},e})(),Sl=Math.min,_l=Math.max,Zr=new Le,jr=new Le,Jr=new Le,Kr=new Le,qa=new Le,Za=new Le,Je=(function(){function e(t,n,r,a){r<0&&(t=t+r,r=-r),a<0&&(n=n+a,a=-a),this.x=t,this.y=n,this.width=r,this.height=a}return e.prototype.union=function(t){var n=Sl(t.x,this.x),r=Sl(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_l(t.x+t.width,this.x+this.width)-n:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=_l(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=n,this.y=r},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var n=this,r=t.width/n.width,a=t.height/n.height,i=Ii();return Tp(i,i,[-n.x,-n.y]),Jb(i,i,[r,a]),Tp(i,i,[t.x,t.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,a=r.x,i=r.x+r.width,l=r.y,s=r.y+r.height,u=t.x,c=t.x+t.width,d=t.y,f=t.y+t.height,v=!(i<u||c<a||s<d||f<l);if(n){var p=1/0,h=0,m=Math.abs(i-u),g=Math.abs(c-a),y=Math.abs(s-d),x=Math.abs(f-l),b=Math.min(m,g),S=Math.min(y,x);i<u||c<a?b>h&&(h=b,m<g?Le.set(Za,-m,0):Le.set(Za,g,0)):b<p&&(p=b,m<g?Le.set(qa,m,0):Le.set(qa,-g,0)),s<d||f<l?S>h&&(h=S,y<x?Le.set(Za,0,-y):Le.set(Za,0,x)):b<p&&(p=b,y<x?Le.set(qa,0,y):Le.set(qa,0,-x))}return n&&Le.copy(n,v?qa:Za),v},e.prototype.contain=function(t,n){var r=this;return t>=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,n){t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var a=r[0],i=r[3],l=r[4],s=r[5];t.x=n.x*a+l,t.y=n.y*i+s,t.width=n.width*a,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Zr.x=Jr.x=n.x,Zr.y=Kr.y=n.y,jr.x=Kr.x=n.x+n.width,jr.y=Jr.y=n.y+n.height,Zr.transform(r),Kr.transform(r),jr.transform(r),Jr.transform(r),t.x=Sl(Zr.x,jr.x,Jr.x,Kr.x),t.y=Sl(Zr.y,jr.y,Jr.y,Kr.y);var u=_l(Zr.x,jr.x,Jr.x,Kr.x),c=_l(Zr.y,jr.y,Jr.y,Kr.y);t.width=u-t.x,t.height=c-t.y},e})(),og="silent";function Kb(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Qb}}function Qb(){Xb(this.event)}var e8=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.handler=null,n}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(lr),ja=(function(){function e(t,n){this.x=t,this.y=n}return e})(),t8=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ec=new Je(0,0,0,0),ag=(function(e){me(t,e);function t(n,r,a,i,l){var s=e.call(this)||this;return s._hovered=new ja(0,0),s.storage=n,s.painter=r,s.painterRoot=i,s._pointerSize=l,a=a||new e8,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new Vb(s),s}return t.prototype.setHandlerProxy=function(n){this.proxy&&this.proxy.dispose(),n&&(q(t8,function(r){n.on&&n.on(r,this[r],this)},this),n.handler=this),this.proxy=n},t.prototype.mousemove=function(n){var r=n.zrX,a=n.zrY,i=ig(this,r,a),l=this._hovered,s=l.target;s&&!s.__zr&&(l=this.findHover(l.x,l.y),s=l.target);var u=this._hovered=i?new ja(r,a):this.findHover(r,a),c=u.target,d=this.proxy;d.setCursor&&d.setCursor(c?c.cursor:"default"),s&&c!==s&&this.dispatchToElement(l,"mouseout",n),this.dispatchToElement(u,"mousemove",n),c&&c!==s&&this.dispatchToElement(u,"mouseover",n)},t.prototype.mouseout=function(n){var r=n.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",n),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:n})},t.prototype.resize=function(){this._hovered=new ja(0,0)},t.prototype.dispatch=function(n,r){var a=this[n];a&&a.call(this,r)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(n){var r=this.proxy;r.setCursor&&r.setCursor(n)},t.prototype.dispatchToElement=function(n,r,a){n=n||{};var i=n.target;if(!(i&&i.silent)){for(var l="on"+r,s=Kb(r,n,a);i&&(i[l]&&(s.cancelBubble=!!i[l].call(i,s)),i.trigger(r,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(r,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(u){typeof u[l]=="function"&&u[l].call(u,s),u.trigger&&u.trigger(r,s)}))}},t.prototype.findHover=function(n,r,a){var i=this.storage.getDisplayList(),l=new ja(n,r);if(Np(i,l,n,r,a),this._pointerSize&&!l.target){for(var s=[],u=this._pointerSize,c=u/2,d=new Je(n-c,r-c,u,u),f=i.length-1;f>=0;f--){var v=i[f];v!==a&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(ec.copy(v.getBoundingRect()),v.transform&&ec.applyTransform(v.transform),ec.intersect(d)&&s.push(v))}if(s.length)for(var p=4,h=Math.PI/12,m=Math.PI*2,g=0;g<c;g+=p)for(var y=0;y<m;y+=h){var x=n+g*Math.cos(y),b=r+g*Math.sin(y);if(Np(s,l,x,b,a),l.target)return l}}return l},t.prototype.processGesture=function(n,r){this._gestureMgr||(this._gestureMgr=new qb);var a=this._gestureMgr;r==="start"&&a.clear();var i=a.recognize(n,this.findHover(n.zrX,n.zrY,null).target,this.proxy.dom);if(r==="end"&&a.clear(),i){var l=i.type;n.gestureEvent=l;var s=new ja;s.target=i.target,this.dispatchToElement(s,l,i.event)}},t})(lr);q(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){ag.prototype[e]=function(t){var n=t.zrX,r=t.zrY,a=ig(this,n,r),i,l;if((e!=="mouseup"||!a)&&(i=this.findHover(n,r),l=i.target),e==="mousedown")this._downEl=l,this._downPoint=[t.zrX,t.zrY],this._upEl=l;else if(e==="mouseup")this._upEl=l;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||Dd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}});function n8(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,a=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var l=r.getClipPath();if(l&&!l.contain(t,n))return!1}r.silent&&(a=!0);var s=r.__hostTarget;r=s||r.parent}return a?og:!0}return!1}function Np(e,t,n,r,a){for(var i=e.length-1;i>=0;i--){var l=e[i],s=void 0;if(l!==a&&!l.ignore&&(s=n8(l,n,r))&&(!t.topTarget&&(t.topTarget=l),s!==og)){t.target=l;break}}}function ig(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var lg=32,Ja=7;function r8(e){for(var t=0;e>=lg;)t|=e&1,e>>=1;return e+t}function Ip(e,t,n,r){var a=t+1;if(a===n)return 1;if(r(e[a++],e[t])<0){for(;a<n&&r(e[a],e[a-1])<0;)a++;o8(e,t,a)}else for(;a<n&&r(e[a],e[a-1])>=0;)a++;return a-t}function o8(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Lp(e,t,n,r,a){for(r===t&&r++;r<n;r++){for(var i=e[r],l=t,s=r,u;l<s;)u=l+s>>>1,a(i,e[u])<0?s=u:l=u+1;var c=r-l;switch(c){case 3:e[l+3]=e[l+2];case 2:e[l+2]=e[l+1];case 1:e[l+1]=e[l];break;default:for(;c>0;)e[l+c]=e[l+c-1],c--}e[l]=i}}function tc(e,t,n,r,a,i){var l=0,s=0,u=1;if(i(e,t[n+a])>0){for(s=r-a;u<s&&i(e,t[n+a+u])>0;)l=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),l+=a,u+=a}else{for(s=a+1;u<s&&i(e,t[n+a-u])<=0;)l=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var c=l;l=a-u,u=a-c}for(l++;l<u;){var d=l+(u-l>>>1);i(e,t[n+d])>0?l=d+1:u=d}return u}function nc(e,t,n,r,a,i){var l=0,s=0,u=1;if(i(e,t[n+a])<0){for(s=a+1;u<s&&i(e,t[n+a-u])<0;)l=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var c=l;l=a-u,u=a-c}else{for(s=r-a;u<s&&i(e,t[n+a+u])>=0;)l=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),l+=a,u+=a}for(l++;l<u;){var d=l+(u-l>>>1);i(e,t[n+d])<0?u=d:l=d+1}return u}function a8(e,t){var n=Ja,r,a,i=0,l=[];r=[],a=[];function s(p,h){r[i]=p,a[i]=h,i+=1}function u(){for(;i>1;){var p=i-2;if(p>=1&&a[p-1]<=a[p]+a[p+1]||p>=2&&a[p-2]<=a[p]+a[p-1])a[p-1]<a[p+1]&&p--;else if(a[p]>a[p+1])break;d(p)}}function c(){for(;i>1;){var p=i-2;p>0&&a[p-1]<a[p+1]&&p--,d(p)}}function d(p){var h=r[p],m=a[p],g=r[p+1],y=a[p+1];a[p]=m+y,p===i-3&&(r[p+1]=r[p+2],a[p+1]=a[p+2]),i--;var x=nc(e[g],e,h,m,0,t);h+=x,m-=x,m!==0&&(y=tc(e[h+m-1],e,g,y,y-1,t),y!==0&&(m<=y?f(h,m,g,y):v(h,m,g,y)))}function f(p,h,m,g){var y=0;for(y=0;y<h;y++)l[y]=e[p+y];var x=0,b=m,S=p;if(e[S++]=e[b++],--g===0){for(y=0;y<h;y++)e[S+y]=l[x+y];return}if(h===1){for(y=0;y<g;y++)e[S+y]=e[b+y];e[S+g]=l[x];return}for(var _=n,k,w,C;;){k=0,w=0,C=!1;do if(t(e[b],l[x])<0){if(e[S++]=e[b++],w++,k=0,--g===0){C=!0;break}}else if(e[S++]=l[x++],k++,w=0,--h===1){C=!0;break}while((k|w)<_);if(C)break;do{if(k=nc(e[b],l,x,h,0,t),k!==0){for(y=0;y<k;y++)e[S+y]=l[x+y];if(S+=k,x+=k,h-=k,h<=1){C=!0;break}}if(e[S++]=e[b++],--g===0){C=!0;break}if(w=tc(l[x],e,b,g,0,t),w!==0){for(y=0;y<w;y++)e[S+y]=e[b+y];if(S+=w,b+=w,g-=w,g===0){C=!0;break}}if(e[S++]=l[x++],--h===1){C=!0;break}_--}while(k>=Ja||w>=Ja);if(C)break;_<0&&(_=0),_+=2}if(n=_,n<1&&(n=1),h===1){for(y=0;y<g;y++)e[S+y]=e[b+y];e[S+g]=l[x]}else{if(h===0)throw new Error;for(y=0;y<h;y++)e[S+y]=l[x+y]}}function v(p,h,m,g){var y=0;for(y=0;y<g;y++)l[y]=e[m+y];var x=p+h-1,b=g-1,S=m+g-1,_=0,k=0;if(e[S--]=e[x--],--h===0){for(_=S-(g-1),y=0;y<g;y++)e[_+y]=l[y];return}if(g===1){for(S-=h,x-=h,k=S+1,_=x+1,y=h-1;y>=0;y--)e[k+y]=e[_+y];e[S]=l[b];return}for(var w=n;;){var C=0,E=0,L=!1;do if(t(l[b],e[x])<0){if(e[S--]=e[x--],C++,E=0,--h===0){L=!0;break}}else if(e[S--]=l[b--],E++,C=0,--g===1){L=!0;break}while((C|E)<w);if(L)break;do{if(C=h-nc(l[b],e,p,h,h-1,t),C!==0){for(S-=C,x-=C,h-=C,k=S+1,_=x+1,y=C-1;y>=0;y--)e[k+y]=e[_+y];if(h===0){L=!0;break}}if(e[S--]=l[b--],--g===1){L=!0;break}if(E=g-tc(e[x],l,0,g,g-1,t),E!==0){for(S-=E,b-=E,g-=E,k=S+1,_=b+1,y=0;y<E;y++)e[k+y]=l[_+y];if(g<=1){L=!0;break}}if(e[S--]=e[x--],--h===0){L=!0;break}w--}while(C>=Ja||E>=Ja);if(L)break;w<0&&(w=0),w+=2}if(n=w,n<1&&(n=1),g===1){for(S-=h,x-=h,k=S+1,_=x+1,y=h-1;y>=0;y--)e[k+y]=e[_+y];e[S]=l[b]}else{if(g===0)throw new Error;for(_=S-(g-1),y=0;y<g;y++)e[_+y]=l[y]}}return{mergeRuns:u,forceMergeRuns:c,pushRun:s}}function ds(e,t,n,r){n||(n=0),r||(r=e.length);var a=r-n;if(!(a<2)){var i=0;if(a<lg){i=Ip(e,n,r,t),Lp(e,n,r,n+i,t);return}var l=a8(e,t),s=r8(a);do{if(i=Ip(e,n,r,t),i<s){var u=a;u>s&&(u=s),Lp(e,n,n+u,n+i,t),i=u}l.pushRun(n,i),l.mergeRuns(),a-=i,n+=i}while(a!==0);l.forceMergeRuns()}}var On=1,yi=2,ia=4,Ap=!1;function rc(){Ap||(Ap=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Mp(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var i8=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Mp}return e.prototype.traverse=function(t,n){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,n)},e.prototype.getDisplayList=function(t,n){n=n||!1;var r=this._displayList;return(t||!r.length)&&this.updateDisplayList(n),r},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var n=this._roots,r=this._displayList,a=0,i=n.length;a<i;a++)this._updateAndAddDisplayable(n[a],null,t);r.length=this._displayListLen,ds(r,Mp)},e.prototype._updateAndAddDisplayable=function(t,n,r){if(!(t.ignore&&!r)){t.beforeUpdate(),t.update(),t.afterUpdate();var a=t.getClipPath();if(t.ignoreClip)n=null;else if(a){n?n=n.slice():n=[];for(var i=a,l=t;i;)i.parent=l,i.updateTransform(),n.push(i),l=i,i=i.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),u=0;u<s.length;u++){var c=s[u];t.__dirty&&(c.__dirty|=On),this._updateAndAddDisplayable(c,n,r)}t.__dirty=0}else{var d=t;n&&n.length?d.__clipPaths=n:d.__clipPaths&&d.__clipPaths.length>0&&(d.__clipPaths=[]),isNaN(d.z)&&(rc(),d.z=0),isNaN(d.z2)&&(rc(),d.z2=0),isNaN(d.zlevel)&&(rc(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,n,r);var v=t.getTextGuideLine();v&&this._updateAndAddDisplayable(v,n,r);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,n,r)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var n=0,r=t.length;n<r;n++)this.delRoot(t[n]);return}var a=et(this._roots,t);a>=0&&this._roots.splice(a,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e})(),$d;$d=He.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Li={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Li.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Li.bounceIn(e*2)*.5:Li.bounceOut(e*2-1)*.5+.5}},kl=Math.pow,Ir=Math.sqrt,Ls=1e-8,sg=1e-4,Vp=Ir(3),Cl=1/3,Fn=$a(),vn=$a(),xa=$a();function kr(e){return e>-Ls&&e<Ls}function ug(e){return e>Ls||e<-Ls}function Et(e,t,n,r,a){var i=1-a;return i*i*(i*e+3*a*t)+a*a*(a*r+3*i*n)}function Pp(e,t,n,r,a){var i=1-a;return 3*(((t-e)*i+2*(n-t)*a)*i+(r-n)*a*a)}function As(e,t,n,r,a,i){var l=r+3*(t-n)-e,s=3*(n-t*2+e),u=3*(t-e),c=e-a,d=s*s-3*l*u,f=s*u-9*l*c,v=u*u-3*s*c,p=0;if(kr(d)&&kr(f))if(kr(s))i[0]=0;else{var h=-u/s;h>=0&&h<=1&&(i[p++]=h)}else{var m=f*f-4*d*v;if(kr(m)){var g=f/d,h=-s/l+g,y=-g/2;h>=0&&h<=1&&(i[p++]=h),y>=0&&y<=1&&(i[p++]=y)}else if(m>0){var x=Ir(m),b=d*s+1.5*l*(-f+x),S=d*s+1.5*l*(-f-x);b<0?b=-kl(-b,Cl):b=kl(b,Cl),S<0?S=-kl(-S,Cl):S=kl(S,Cl);var h=(-s-(b+S))/(3*l);h>=0&&h<=1&&(i[p++]=h)}else{var _=(2*d*s-3*l*f)/(2*Ir(d*d*d)),k=Math.acos(_)/3,w=Ir(d),C=Math.cos(k),h=(-s-2*w*C)/(3*l),y=(-s+w*(C+Vp*Math.sin(k)))/(3*l),E=(-s+w*(C-Vp*Math.sin(k)))/(3*l);h>=0&&h<=1&&(i[p++]=h),y>=0&&y<=1&&(i[p++]=y),E>=0&&E<=1&&(i[p++]=E)}}return p}function cg(e,t,n,r,a){var i=6*n-12*t+6*e,l=9*t+3*r-3*e-9*n,s=3*t-3*e,u=0;if(kr(l)){if(ug(i)){var c=-s/i;c>=0&&c<=1&&(a[u++]=c)}}else{var d=i*i-4*l*s;if(kr(d))a[0]=-i/(2*l);else if(d>0){var f=Ir(d),c=(-i+f)/(2*l),v=(-i-f)/(2*l);c>=0&&c<=1&&(a[u++]=c),v>=0&&v<=1&&(a[u++]=v)}}return u}function Ms(e,t,n,r,a,i){var l=(t-e)*a+e,s=(n-t)*a+t,u=(r-n)*a+n,c=(s-l)*a+l,d=(u-s)*a+s,f=(d-c)*a+c;i[0]=e,i[1]=l,i[2]=c,i[3]=f,i[4]=f,i[5]=d,i[6]=u,i[7]=r}function l8(e,t,n,r,a,i,l,s,u,c,d){var f,v=.005,p=1/0,h,m,g,y;Fn[0]=u,Fn[1]=c;for(var x=0;x<1;x+=.05)vn[0]=Et(e,n,a,l,x),vn[1]=Et(t,r,i,s,x),g=ga(Fn,vn),g<p&&(f=x,p=g);p=1/0;for(var b=0;b<32&&!(v<sg);b++)h=f-v,m=f+v,vn[0]=Et(e,n,a,l,h),vn[1]=Et(t,r,i,s,h),g=ga(vn,Fn),h>=0&&g<p?(f=h,p=g):(xa[0]=Et(e,n,a,l,m),xa[1]=Et(t,r,i,s,m),y=ga(xa,Fn),m<=1&&y<p?(f=m,p=y):v*=.5);return Ir(p)}function s8(e,t,n,r,a,i,l,s,u){for(var c=e,d=t,f=0,v=1/u,p=1;p<=u;p++){var h=p*v,m=Et(e,n,a,l,h),g=Et(t,r,i,s,h),y=m-c,x=g-d;f+=Math.sqrt(y*y+x*x),c=m,d=g}return f}function Ht(e,t,n,r){var a=1-r;return a*(a*e+2*r*t)+r*r*n}function Dp(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function u8(e,t,n,r,a){var i=e-2*t+n,l=2*(t-e),s=e-r,u=0;if(kr(i)){if(ug(l)){var c=-s/l;c>=0&&c<=1&&(a[u++]=c)}}else{var d=l*l-4*i*s;if(kr(d)){var c=-l/(2*i);c>=0&&c<=1&&(a[u++]=c)}else if(d>0){var f=Ir(d),c=(-l+f)/(2*i),v=(-l-f)/(2*i);c>=0&&c<=1&&(a[u++]=c),v>=0&&v<=1&&(a[u++]=v)}}return u}function dg(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Vs(e,t,n,r,a){var i=(t-e)*r+e,l=(n-t)*r+t,s=(l-i)*r+i;a[0]=e,a[1]=i,a[2]=s,a[3]=s,a[4]=l,a[5]=n}function c8(e,t,n,r,a,i,l,s,u){var c,d=.005,f=1/0;Fn[0]=l,Fn[1]=s;for(var v=0;v<1;v+=.05){vn[0]=Ht(e,n,a,v),vn[1]=Ht(t,r,i,v);var p=ga(Fn,vn);p<f&&(c=v,f=p)}f=1/0;for(var h=0;h<32&&!(d<sg);h++){var m=c-d,g=c+d;vn[0]=Ht(e,n,a,m),vn[1]=Ht(t,r,i,m);var p=ga(vn,Fn);if(m>=0&&p<f)c=m,f=p;else{xa[0]=Ht(e,n,a,g),xa[1]=Ht(t,r,i,g);var y=ga(xa,Fn);g<=1&&y<f?(c=g,f=y):d*=.5}}return Ir(f)}function d8(e,t,n,r,a,i,l){for(var s=e,u=t,c=0,d=1/l,f=1;f<=l;f++){var v=f*d,p=Ht(e,n,a,v),h=Ht(t,r,i,v),m=p-s,g=h-u;c+=Math.sqrt(m*m+g*g),s=p,u=h}return c}var f8=/cubic-bezier\(([0-9,\.e ]+)\)/;function sv(e){var t=e&&f8.exec(e);if(t){var n=t[1].split(","),r=+_r(n[0]),a=+_r(n[1]),i=+_r(n[2]),l=+_r(n[3]);if(isNaN(r+a+i+l))return;var s=[];return function(u){return u<=0?0:u>=1?1:As(0,r,i,1,u,s)&&Et(0,a,l,1,s[0])}}}var v8=(function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||en,this.ondestroy=t.ondestroy||en,this.onrestart=t.onrestart||en,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=n;return}var r=this._life,a=t-this._startTime-this._pausedTime,i=a/r;i<0&&(i=0),i=Math.min(i,1);var l=this.easingFunc,s=l?l(i):i;if(this.onframe(s),i===1)if(this.loop){var u=a%r;this._startTime=t-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Ae(t)?t:Li[t]||sv(t)},e})(),fg=(function(){function e(t){this.value=t}return e})(),p8=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var n=new fg(t);return this.insertEntry(n),n},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var n=t.prev,r=t.next;n?n.next=r:this.head=r,r?r.prev=n:this.tail=n,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e})(),dl=(function(){function e(t){this._list=new p8,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,n){var r=this._list,a=this._map,i=null;if(a[t]==null){var l=r.len(),s=this._lastRemovedEntry;if(l>=this._maxSize&&l>0){var u=r.head;r.remove(u),delete a[u.key],i=u.value,this._lastRemovedEntry=u}s?s.value=n:s=new fg(n),s.key=t,r.insertEntry(s),a[t]=s}return i},e.prototype.get=function(t){var n=this._map[t],r=this._list;if(n!=null)return n!==r.tail&&(r.remove(n),r.insertEntry(n)),n.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e})(),Bp={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Lr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Od(e){return e<0?0:e>1?1:e}function oc(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Lr(parseFloat(t)/100*255):Lr(parseInt(t,10))}function Ai(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Od(parseFloat(t)/100):Od(parseFloat(t))}function ac(e,t,n){return n<0?n+=1:n>1&&(n-=1),n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function El(e,t,n){return e+(t-e)*n}function un(e,t,n,r,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e}function Fd(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var vg=new dl(20),Tl=null;function Go(e,t){Tl&&Fd(Tl,t),Tl=vg.put(e,Tl||t.slice())}function Un(e,t){if(e){t=t||[];var n=vg.get(e);if(n)return Fd(t,n);e=e+"";var r=e.replace(/ /g,"").toLowerCase();if(r in Bp)return Fd(t,Bp[r]),Go(e,t),t;var a=r.length;if(r.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(r.slice(1,4),16);if(!(i>=0&&i<=4095)){un(t,0,0,0,1);return}return un(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(r.slice(4),16)/15:1),Go(e,t),t}else if(a===7||a===9){var i=parseInt(r.slice(1,7),16);if(!(i>=0&&i<=16777215)){un(t,0,0,0,1);return}return un(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(r.slice(7),16)/255:1),Go(e,t),t}return}var l=r.indexOf("("),s=r.indexOf(")");if(l!==-1&&s+1===a){var u=r.substr(0,l),c=r.substr(l+1,s-(l+1)).split(","),d=1;switch(u){case"rgba":if(c.length!==4)return c.length===3?un(t,+c[0],+c[1],+c[2],1):un(t,0,0,0,1);d=Ai(c.pop());case"rgb":if(c.length>=3)return un(t,oc(c[0]),oc(c[1]),oc(c[2]),c.length===3?d:Ai(c[3])),Go(e,t),t;un(t,0,0,0,1);return;case"hsla":if(c.length!==4){un(t,0,0,0,1);return}return c[3]=Ai(c[3]),Rp(c,t),Go(e,t),t;case"hsl":if(c.length!==3){un(t,0,0,0,1);return}return Rp(c,t),Go(e,t),t;default:return}}un(t,0,0,0,1)}}function Rp(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Ai(e[1]),a=Ai(e[2]),i=a<=.5?a*(r+1):a+r-a*r,l=a*2-i;return t=t||[],un(t,Lr(ac(l,i,n+1/3)*255),Lr(ac(l,i,n)*255),Lr(ac(l,i,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function $p(e,t){var n=Un(e);if(n){for(var r=0;r<3;r++)n[r]=n[r]*(1-t)|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return fu(n,n.length===4?"rgba":"rgb")}}function h8(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),a=Math.floor(r),i=Math.ceil(r),l=Un(t[a]),s=Un(t[i]),u=r-a,c=fu([Lr(El(l[0],s[0],u)),Lr(El(l[1],s[1],u)),Lr(El(l[2],s[2],u)),Od(El(l[3],s[3],u))],"rgba");return n?{color:c,leftIndex:a,rightIndex:i,value:r}:c}}function fu(e,t){if(!(!e||!e.length)){var n=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(n+=","+e[3]),t+"("+n+")"}}function Ps(e,t){var n=Un(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Op=new dl(100);function zd(e){if(_e(e)){var t=Op.get(e);return t||(t=$p(e,-.1),Op.put(e,t)),t}else if(rv(e)){var n=fe({},e);return n.colorStops=ge(e.colorStops,function(r){return{offset:r.offset,color:$p(r.color,-.1)}}),n}return e}var Ds=Math.round;function Ui(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var n=Un(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}return{color:e,opacity:t??1}}var Fp=1e-4;function Cr(e){return e<Fp&&e>-Fp}function Nl(e){return Ds(e*1e3)/1e3}function Hd(e){return Ds(e*1e4)/1e4}function m8(e){return"matrix("+Nl(e[0])+","+Nl(e[1])+","+Nl(e[2])+","+Nl(e[3])+","+Hd(e[4])+","+Hd(e[5])+")"}var g8={left:"start",right:"end",center:"middle",middle:"middle"};function y8(e,t,n){return n==="top"?e+=t/2:n==="bottom"&&(e-=t/2),e}function x8(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function w8(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function pg(e){return e&&!!e.image}function b8(e){return e&&!!e.svgElement}function uv(e){return pg(e)||b8(e)}function hg(e){return e.type==="linear"}function mg(e){return e.type==="radial"}function gg(e){return e&&(e.type==="linear"||e.type==="radial")}function vu(e){return"url(#"+e+")"}function yg(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function xg(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*cs,a=ke(e.scaleX,1),i=ke(e.scaleY,1),l=e.skewX||0,s=e.skewY||0,u=[];return(t||n)&&u.push("translate("+t+"px,"+n+"px)"),r&&u.push("rotate("+r+")"),(a!==1||i!==1)&&u.push("scale("+a+","+i+")"),(l||s)&&u.push("skew("+Ds(l*cs)+"deg, "+Ds(s*cs)+"deg)"),u.join(" ")}var S8=(function(){return He.hasGlobalWindow&&Ae(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return process.env.NODE_ENV!=="production"&&ka("Base64 isn't natively supported in the current environment."),null}})(),Gd=Array.prototype.slice;function Qn(e,t,n){return(t-e)*n+e}function ic(e,t,n,r){for(var a=t.length,i=0;i<a;i++)e[i]=Qn(t[i],n[i],r);return e}function _8(e,t,n,r){for(var a=t.length,i=a&&t[0].length,l=0;l<a;l++){e[l]||(e[l]=[]);for(var s=0;s<i;s++)e[l][s]=Qn(t[l][s],n[l][s],r)}return e}function Il(e,t,n,r){for(var a=t.length,i=0;i<a;i++)e[i]=t[i]+n[i]*r;return e}function zp(e,t,n,r){for(var a=t.length,i=a&&t[0].length,l=0;l<a;l++){e[l]||(e[l]=[]);for(var s=0;s<i;s++)e[l][s]=t[l][s]+n[l][s]*r}return e}function k8(e,t){for(var n=e.length,r=t.length,a=n>r?t:e,i=Math.min(n,r),l=a[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(n,r);s++)a.push({offset:l.offset,color:l.color.slice()})}function C8(e,t,n){var r=e,a=t;if(!(!r.push||!a.push)){var i=r.length,l=a.length;if(i!==l){var s=i>l;if(s)r.length=l;else for(var u=i;u<l;u++)r.push(n===1?a[u]:Gd.call(a[u]))}for(var c=r[0]&&r[0].length,u=0;u<r.length;u++)if(n===1)isNaN(r[u])&&(r[u]=a[u]);else for(var d=0;d<c;d++)isNaN(r[u][d])&&(r[u][d]=a[u][d])}}function fs(e){if(qt(e)){var t=e.length;if(qt(e[0])){for(var n=[],r=0;r<t;r++)n.push(Gd.call(e[r]));return n}return Gd.call(e)}return e}function vs(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function E8(e){return qt(e&&e[0])?2:1}var Ll=0,ps=1,wg=2,xi=3,Ud=4,Wd=5,Hp=6;function Gp(e){return e===Ud||e===Wd}function Al(e){return e===ps||e===wg}var Ka=[0,0,0,0],T8=(function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,n,r){this._needsSort=!0;var a=this.keyframes,i=a.length,l=!1,s=Hp,u=n;if(qt(n)){var c=E8(n);s=c,(c===1&&!Qe(n[0])||c===2&&!Qe(n[0][0]))&&(l=!0)}else if(Qe(n)&&!Gi(n))s=Ll;else if(_e(n))if(!isNaN(+n))s=Ll;else{var d=Un(n);d&&(u=d,s=xi)}else if(rv(n)){var f=fe({},u);f.colorStops=ge(n.colorStops,function(p){return{offset:p.offset,color:Un(p.color)}}),hg(n)?s=Ud:mg(n)&&(s=Wd),u=f}i===0?this.valType=s:(s!==this.valType||s===Hp)&&(l=!0),this.discrete=this.discrete||l;var v={time:t,value:u,rawValue:n,percent:0};return r&&(v.easing=r,v.easingFunc=Ae(r)?r:Li[r]||sv(r)),a.push(v),v},e.prototype.prepare=function(t,n){var r=this.keyframes;this._needsSort&&r.sort(function(m,g){return m.time-g.time});for(var a=this.valType,i=r.length,l=r[i-1],s=this.discrete,u=Al(a),c=Gp(a),d=0;d<i;d++){var f=r[d],v=f.value,p=l.value;f.percent=f.time/t,s||(u&&d!==i-1?C8(v,p,a):c&&k8(v.colorStops,p.colorStops))}if(!s&&a!==Wd&&n&&this.needsAnimate()&&n.needsAnimate()&&a===n.valType&&!n._finished){this._additiveTrack=n;for(var h=r[0].value,d=0;d<i;d++)a===Ll?r[d].additiveValue=r[d].value-h:a===xi?r[d].additiveValue=Il([],r[d].value,h,-1):Al(a)&&(r[d].additiveValue=a===ps?Il([],r[d].value,h,-1):zp([],r[d].value,h,-1))}},e.prototype.step=function(t,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r=this._additiveTrack!=null,a=r?"additiveValue":"value",i=this.valType,l=this.keyframes,s=l.length,u=this.propName,c=i===xi,d,f=this._lastFr,v=Math.min,p,h;if(s===1)p=h=l[0];else{if(n<0)d=0;else if(n<this._lastFrP){var m=v(f+1,s-1);for(d=m;d>=0&&!(l[d].percent<=n);d--);d=v(d,s-2)}else{for(d=f;d<s&&!(l[d].percent>n);d++);d=v(d-1,s-2)}h=l[d+1],p=l[d]}if(p&&h){this._lastFr=d,this._lastFrP=n;var g=h.percent-p.percent,y=g===0?1:v((n-p.percent)/g,1);h.easingFunc&&(y=h.easingFunc(y));var x=r?this._additiveValue:c?Ka:t[u];if((Al(i)||c)&&!x&&(x=this._additiveValue=[]),this.discrete)t[u]=y<1?p.rawValue:h.rawValue;else if(Al(i))i===ps?ic(x,p[a],h[a],y):_8(x,p[a],h[a],y);else if(Gp(i)){var b=p[a],S=h[a],_=i===Ud;t[u]={type:_?"linear":"radial",x:Qn(b.x,S.x,y),y:Qn(b.y,S.y,y),colorStops:ge(b.colorStops,function(w,C){var E=S.colorStops[C];return{offset:Qn(w.offset,E.offset,y),color:vs(ic([],w.color,E.color,y))}}),global:S.global},_?(t[u].x2=Qn(b.x2,S.x2,y),t[u].y2=Qn(b.y2,S.y2,y)):t[u].r=Qn(b.r,S.r,y)}else if(c)ic(x,p[a],h[a],y),r||(t[u]=vs(x));else{var k=Qn(p[a],h[a],y);r?this._additiveValue=k:t[u]=k}r&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var n=this.valType,r=this.propName,a=this._additiveValue;n===Ll?t[r]=t[r]+a:n===xi?(Un(t[r],Ka),Il(Ka,Ka,a,1),t[r]=vs(Ka)):n===ps?Il(t[r],t[r],a,1):n===wg&&zp(t[r],t[r],a,1)},e})(),cv=(function(){function e(t,n,r,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&a){ka("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=r}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,n,r){return this.whenWithKeys(t,n,Fe(n),r)},e.prototype.whenWithKeys=function(t,n,r,a){for(var i=this._tracks,l=0;l<r.length;l++){var s=r[l],u=i[s];if(!u){u=i[s]=new T8(s);var c=void 0,d=this._getAdditiveTrack(s);if(d){var f=d.keyframes,v=f[f.length-1];c=v&&v.value,d.valType===xi&&c&&(c=vs(c))}else c=this._target[s];if(c==null)continue;t>0&&u.addKeyframe(0,fs(c),a),this._trackKeys.push(s)}u.addKeyframe(t,fs(n[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,r=0;r<n;r++)t[r].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,n=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,n)for(var r=0;r<n.length;r++)n[r].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,n=this._trackKeys,r=0;r<n.length;r++)t[n[r]].setFinished()},e.prototype._getAdditiveTrack=function(t){var n,r=this._additiveAnimators;if(r)for(var a=0;a<r.length;a++){var i=r[a].getTrack(t);i&&(n=i)}return n},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var n=this,r=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var l=this._trackKeys[i],s=this._tracks[l],u=this._getAdditiveTrack(l),c=s.keyframes,d=c.length;if(s.prepare(a,u),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=c[d-1];f&&(n._target[s.propName]=f.rawValue),s.setFinished()}else r.push(s)}if(r.length||this._force){var v=new v8({life:a,loop:this._loop,delay:this._delay||0,onframe:function(p){n._started=2;var h=n._additiveAnimators;if(h){for(var m=!1,g=0;g<h.length;g++)if(h[g]._clip){m=!0;break}m||(n._additiveAnimators=null)}for(var g=0;g<r.length;g++)r[g].step(n._target,p);var y=n._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](n._target,p)},ondestroy:function(){n._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var n=this._clip;t&&n.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return ge(this._trackKeys,function(n){return t._tracks[n]})},e.prototype.stopTracks=function(t,n){if(!t.length||!this._clip)return!0;for(var r=this._tracks,a=this._trackKeys,i=0;i<t.length;i++){var l=r[t[i]];l&&!l.isFinished()&&(n?l.step(this._target,1):this._started===1&&l.step(this._target,0),l.setFinished())}for(var s=!0,i=0;i<a.length;i++)if(!r[a[i]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},e.prototype.saveTo=function(t,n,r){if(t){n=n||this._trackKeys;for(var a=0;a<n.length;a++){var i=n[a],l=this._tracks[i];if(!(!l||l.isFinished())){var s=l.keyframes,u=s[r?0:s.length-1];u&&(t[i]=fs(u.rawValue))}}}},e.prototype.__changeFinalValue=function(t,n){n=n||Fe(t);for(var r=0;r<n.length;r++){var a=n[r],i=this._tracks[a];if(i){var l=i.keyframes;if(l.length>1){var s=l.pop();i.addKeyframe(s.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e})();function va(){return new Date().getTime()}var N8=(function(e){me(t,e);function t(n){var r=e.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,n=n||{},r.stage=n.stage||{},r}return t.prototype.addClip=function(n){n.animation&&this.removeClip(n),this._head?(this._tail.next=n,n.prev=this._tail,n.next=null,this._tail=n):this._head=this._tail=n,n.animation=this},t.prototype.addAnimator=function(n){n.animation=this;var r=n.getClip();r&&this.addClip(r)},t.prototype.removeClip=function(n){if(n.animation){var r=n.prev,a=n.next;r?r.next=a:this._head=a,a?a.prev=r:this._tail=r,n.next=n.prev=n.animation=null}},t.prototype.removeAnimator=function(n){var r=n.getClip();r&&this.removeClip(r),n.animation=null},t.prototype.update=function(n){for(var r=va()-this._pausedTime,a=r-this._time,i=this._head;i;){var l=i.next,s=i.step(r,a);s&&(i.ondestroy(),this.removeClip(i)),i=l}this._time=r,n||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var n=this;this._running=!0;function r(){n._running&&($d(r),!n._paused&&n.update())}$d(r)},t.prototype.start=function(){this._running||(this._time=va(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=va(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=va()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var n=this._head;n;){var r=n.next;n.prev=n.next=n.animation=null,n=r}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(n,r){r=r||{},this.start();var a=new cv(n,r.loop);return this.addAnimator(a),a},t})(lr),I8=300,lc=He.domSupported,sc=(function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=ge(e,function(a){var i=a.replace("mouse","pointer");return n.hasOwnProperty(i)?i:a});return{mouse:e,touch:t,pointer:r}})(),Up={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Wp=!1;function Yd(e){var t=e.pointerType;return t==="pen"||t==="touch"}function L8(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function uc(e){e&&(e.zrByTouch=!0)}function A8(e,t){return kn(e.dom,new M8(e,t),!0)}function bg(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var M8=(function(){function e(t,n){this.stopPropagation=en,this.stopImmediatePropagation=en,this.preventDefault=en,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY}return e})(),Cn={mousedown:function(e){e=kn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=kn(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=kn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=kn(this.dom,e);var t=e.toElement||e.relatedTarget;bg(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Wp=!0,e=kn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Wp||(e=kn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=kn(this.dom,e),uc(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Cn.mousemove.call(this,e),Cn.mousedown.call(this,e)},touchmove:function(e){e=kn(this.dom,e),uc(e),this.handler.processGesture(e,"change"),Cn.mousemove.call(this,e)},touchend:function(e){e=kn(this.dom,e),uc(e),this.handler.processGesture(e,"end"),Cn.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<I8&&Cn.click.call(this,e)},pointerdown:function(e){Cn.mousedown.call(this,e)},pointermove:function(e){Yd(e)||Cn.mousemove.call(this,e)},pointerup:function(e){Cn.mouseup.call(this,e)},pointerout:function(e){Yd(e)||Cn.mouseout.call(this,e)}};q(["click","dblclick","contextmenu"],function(e){Cn[e]=function(t){t=kn(this.dom,t),this.trigger(e,t)}});var Xd={pointermove:function(e){Yd(e)||Xd.mousemove.call(this,e)},pointerup:function(e){Xd.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function V8(e,t){var n=t.domHandlers;He.pointerEventsSupported?q(sc.pointer,function(r){hs(t,r,function(a){n[r].call(e,a)})}):(He.touchEventsSupported&&q(sc.touch,function(r){hs(t,r,function(a){n[r].call(e,a),L8(t)})}),q(sc.mouse,function(r){hs(t,r,function(a){a=av(a),t.touching||n[r].call(e,a)})}))}function P8(e,t){He.pointerEventsSupported?q(Up.pointer,n):He.touchEventsSupported||q(Up.mouse,n);function n(r){function a(i){i=av(i),bg(e,i.target)||(i=A8(e,i),t.domHandlers[r].call(e,i))}hs(t,r,a,{capture:!0})}}function hs(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Wb(e.domTarget,t,n,r)}function cc(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Yb(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Yp=(function(){function e(t,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=n}return e})(),D8=(function(e){me(t,e);function t(n,r){var a=e.call(this)||this;return a.__pointerCapturing=!1,a.dom=n,a.painterRoot=r,a._localHandlerScope=new Yp(n,Cn),lc&&(a._globalHandlerScope=new Yp(document,Xd)),V8(a,a._localHandlerScope),a}return t.prototype.dispose=function(){cc(this._localHandlerScope),lc&&cc(this._globalHandlerScope)},t.prototype.setCursor=function(n){this.dom.style&&(this.dom.style.cursor=n||"default")},t.prototype.__togglePointerCapture=function(n){if(this.__mayPointerCapture=null,lc&&+this.__pointerCapturing^+n){this.__pointerCapturing=n;var r=this._globalHandlerScope;n?P8(this,r):cc(r)}},t})(lr),Sg=1;He.hasGlobalWindow&&(Sg=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Xp=Sg,qd=.4,Zd="#333",jd="#ccc",B8="#eee",qp=iv,Zp=5e-5;function Qr(e){return e>Zp||e<-Zp}var eo=[],Uo=[],dc=Ii(),fc=Math.abs,dv=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Qr(this.rotation)||Qr(this.x)||Qr(this.y)||Qr(this.scaleX-1)||Qr(this.scaleY-1)||Qr(this.skewX)||Qr(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(qp(r),this.invTransform=null);return}r=r||Ii(),n?this.getLocalTransform(r):qp(r),t&&(n?ya(r,t,r):jb(r,t)),this.transform=r,this._resolveGlobalScaleRatio(r)},e.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(n!=null&&n!==1){this.getGlobalScale(eo);var r=eo[0]<0?-1:1,a=eo[1]<0?-1:1,i=((eo[0]-r)*n+r)/eo[0]||0,l=((eo[1]-a)*n+a)/eo[1]||0;t[0]*=i,t[1]*=i,t[2]*=l,t[3]*=l}this.invTransform=this.invTransform||Ii(),lv(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);r=Math.sqrt(r)*Math.cos(i),n=Math.sqrt(n),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=r,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Ii(),ya(Uo,t.invTransform,n),n=Uo);var r=this.originX,a=this.originY;(r||a)&&(dc[4]=r,dc[5]=a,ya(Uo,n,dc),Uo[4]-=r,Uo[5]-=a,n=Uo),this.setLocalTransform(n)}},e.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,n){var r=[t,n],a=this.invTransform;return a&&yn(r,r,a),r},e.prototype.transformCoordToGlobal=function(t,n){var r=[t,n],a=this.transform;return a&&yn(r,r,a),r},e.prototype.getLineScale=function(){var t=this.transform;return t&&fc(t[0]-1)>1e-10&&fc(t[3]-1)>1e-10?Math.sqrt(fc(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){_g(this,t)},e.getLocalTransform=function(t,n){n=n||[];var r=t.originX||0,a=t.originY||0,i=t.scaleX,l=t.scaleY,s=t.anchorX,u=t.anchorY,c=t.rotation||0,d=t.x,f=t.y,v=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(r||a||s||u){var h=r+s,m=a+u;n[4]=-h*i-v*m*l,n[5]=-m*l-p*h*i}else n[4]=n[5]=0;return n[0]=i,n[3]=l,n[1]=p*i,n[2]=v*l,c&&rg(n,n,c),n[4]+=r+d,n[5]+=a+f,n},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e})(),Wi=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _g(e,t){for(var n=0;n<Wi.length;n++){var r=Wi[n];e[r]=t[r]}}var jp={};function tn(e,t){t=t||Pr;var n=jp[t];n||(n=jp[t]=new dl(500));var r=n.get(e);return r==null&&(r=cl.measureText(e,t).width,n.put(e,r)),r}function Jp(e,t,n,r){var a=tn(e,t),i=pu(t),l=wi(0,a,n),s=la(0,i,r),u=new Je(l,s,a,i);return u}function kg(e,t,n,r){var a=((e||"")+"").split(`
|
|
20
|
+
`),i=a.length;if(i===1)return Jp(a[0],t,n,r);for(var l=new Je(0,0,0,0),s=0;s<a.length;s++){var u=Jp(a[s],t,n,r);s===0?l.copy(u):l.union(u)}return l}function wi(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function la(e,t,n){return n==="middle"?e-=t/2:n==="bottom"&&(e-=t),e}function pu(e){return tn("国",e)}function Br(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Bs(e,t,n){var r=t.position||"inside",a=t.distance!=null?t.distance:5,i=n.height,l=n.width,s=i/2,u=n.x,c=n.y,d="left",f="top";if(r instanceof Array)u+=Br(r[0],n.width),c+=Br(r[1],n.height),d=null,f=null;else switch(r){case"left":u-=a,c+=s,d="right",f="middle";break;case"right":u+=a+l,c+=s,f="middle";break;case"top":u+=l/2,c-=a,d="center",f="bottom";break;case"bottom":u+=l/2,c+=i+a,d="center";break;case"inside":u+=l/2,c+=s,d="center",f="middle";break;case"insideLeft":u+=a,c+=s,f="middle";break;case"insideRight":u+=l-a,c+=s,d="right",f="middle";break;case"insideTop":u+=l/2,c+=a,d="center";break;case"insideBottom":u+=l/2,c+=i-a,d="center",f="bottom";break;case"insideTopLeft":u+=a,c+=a;break;case"insideTopRight":u+=l-a,c+=a,d="right";break;case"insideBottomLeft":u+=a,c+=i-a,f="bottom";break;case"insideBottomRight":u+=l-a,c+=i-a,d="right",f="bottom";break}return e=e||{},e.x=u,e.y=c,e.align=d,e.verticalAlign=f,e}var vc="__zr_normal__",pc=Wi.concat(["ignore"]),R8=Dr(Wi,function(e,t){return e[t]=!0,e},{ignore:!1}),Wo={},$8=new Je(0,0,0,0),hu=(function(){function e(t){this.id=J1(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,n,r){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=n,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var r=this.textConfig,a=r.local,i=n.innerTransformable,l=void 0,s=void 0,u=!1;i.parent=a?this:null;var c=!1;if(i.copyTransform(n),r.position!=null){var d=$8;r.layoutRect?d.copy(r.layoutRect):d.copy(this.getBoundingRect()),a||d.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Wo,r,d):Bs(Wo,r,d),i.x=Wo.x,i.y=Wo.y,l=Wo.align,s=Wo.verticalAlign;var f=r.origin;if(f&&r.rotation!=null){var v=void 0,p=void 0;f==="center"?(v=d.width*.5,p=d.height*.5):(v=Br(f[0],d.width),p=Br(f[1],d.height)),c=!0,i.originX=-i.x+v+(a?0:d.x),i.originY=-i.y+p+(a?0:d.y)}}r.rotation!=null&&(i.rotation=r.rotation);var h=r.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var m=r.inside==null?typeof r.position=="string"&&r.position.indexOf("inside")>=0:r.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,x=void 0,b=void 0;m&&this.canBeInsideText()?(y=r.insideFill,x=r.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(y),b=!0)):(y=r.outsideFill,x=r.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(y),b=!0)),y=y||"#000",(y!==g.fill||x!==g.stroke||b!==g.autoStroke||l!==g.align||s!==g.verticalAlign)&&(u=!0,g.fill=y,g.stroke=x,g.autoStroke=b,g.align=l,g.verticalAlign=s,n.setDefaultTextStyle(g)),n.__dirty|=On,u&&n.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?jd:Zd},e.prototype.getOutsideStroke=function(t){var n=this.__zr&&this.__zr.getBackgroundColor(),r=typeof n=="string"&&Un(n);r||(r=[255,255,255,1]);for(var a=r[3],i=this.__zr.isDarkMode(),l=0;l<3;l++)r[l]=r[l]*a+(i?0:255)*(1-a);return r[3]=1,fu(r,"rgba")},e.prototype.traverse=function(t,n){},e.prototype.attrKV=function(t,n){t==="textConfig"?this.setTextConfig(n):t==="textContent"?this.setTextContent(n):t==="clipPath"?this.setClipPath(n):t==="extra"?(this.extra=this.extra||{},fe(this.extra,n)):this[t]=n},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,n){if(typeof t=="string")this.attrKV(t,n);else if(Ce(t))for(var r=t,a=Fe(r),i=0;i<a.length;i++){var l=a[i];this.attrKV(l,t[l])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var n=this._normalState,r=0;r<this.animators.length;r++){var a=this.animators[r],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==vc)){var l=a.targetName,s=l?n[l]:n;a.saveTo(s)}}},e.prototype._innerSaveToNormal=function(t){var n=this._normalState;n||(n=this._normalState={}),t.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(t,n,pc)},e.prototype._savePrimaryToNormal=function(t,n,r){for(var a=0;a<r.length;a++){var i=r[a];t[i]!=null&&!(i in n)&&(n[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},e.prototype.clearStates=function(t){this.useState(vc,!1,t)},e.prototype.useState=function(t,n,r,a){var i=t===vc,l=this.hasState();if(!(!l&&i)){var s=this.currentStates,u=this.stateTransition;if(!(et(s,t)>=0&&(n||s.length===1))){var c;if(this.stateProxy&&!i&&(c=this.stateProxy(t)),c||(c=this.states&&this.states[t]),!c&&!i){ka("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(c);var d=!!(c&&c.hoverLayer||a);d&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,c,this._normalState,n,!r&&!this.__inHover&&u&&u.duration>0,u);var f=this._textContent,v=this._textGuide;return f&&f.useState(t,n,r,d),v&&v.useState(t,n,r,d),i?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On),c}}},e.prototype.useStates=function(t,n,r){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,l=t.length,s=l===i.length;if(s){for(var u=0;u<l;u++)if(t[u]!==i[u]){s=!1;break}}if(s)return;for(var u=0;u<l;u++){var c=t[u],d=void 0;this.stateProxy&&(d=this.stateProxy(c,t)),d||(d=this.states[c]),d&&a.push(d)}var f=a[l-1],v=!!(f&&f.hoverLayer||r);v&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(a),h=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(t.join(","),p,this._normalState,!1,!n&&!this.__inHover&&h&&h.duration>0,h);var m=this._textContent,g=this._textGuide;m&&m.useStates(t,n,v),g&&g.useStates(t,n,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On)}},e.prototype.isSilent=function(){for(var t=this.silent,n=this.parent;!t&&n;){if(n.silent){t=!0;break}n=n.parent}return t},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var n=this.animators[t];n.targetName&&n.changeTarget(this[n.targetName])}},e.prototype.removeState=function(t){var n=et(this.currentStates,t);if(n>=0){var r=this.currentStates.slice();r.splice(n,1),this.useStates(r)}},e.prototype.replaceState=function(t,n,r){var a=this.currentStates.slice(),i=et(a,t),l=et(a,n)>=0;i>=0?l?a.splice(i,1):a[i]=n:r&&!l&&a.push(n),this.useStates(a)},e.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var n={},r,a=0;a<t.length;a++){var i=t[a];fe(n,i),i.textConfig&&(r=r||{},fe(r,i.textConfig))}return r&&(n.textConfig=r),n},e.prototype._applyStateObj=function(t,n,r,a,i,l){var s=!(n&&a);n&&n.textConfig?(this.textConfig=fe({},a?this.textConfig:r.textConfig),fe(this.textConfig,n.textConfig)):s&&r.textConfig&&(this.textConfig=r.textConfig);for(var u={},c=!1,d=0;d<pc.length;d++){var f=pc[d],v=i&&R8[f];n&&n[f]!=null?v?(c=!0,u[f]=n[f]):this[f]=n[f]:s&&r[f]!=null&&(v?(c=!0,u[f]=r[f]):this[f]=r[f])}if(!i)for(var d=0;d<this.animators.length;d++){var p=this.animators[d],h=p.targetName;p.getLoop()||p.__changeFinalValue(h?(n||r)[h]:n||r)}c&&this._transitionState(t,u,l)},e.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(t===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var n=this.__zr;n&&t.addSelfToZr(n),t.__zr=n,t.__hostTarget=this},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var n=this._textContent;if(n!==t){if(n&&n!==t&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.innerTransformable=new dv,this._attachComponent(t),this._textContent=t,this.markRedraw()}},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),fe(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=On;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var n=this._textContent,r=this._textGuide;n&&(n.__inHover=t),r&&(r.__inHover=t)},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var n=this.animators;if(n)for(var r=0;r<n.length;r++)t.animation.addAnimator(n[r]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var r=0;r<n.length;r++)t.animation.removeAnimator(n[r]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,n,r){var a=t?this[t]:this;if(process.env.NODE_ENV!=="production"&&!a){ka('Property "'+t+'" is not existed in element '+this.id);return}var i=new cv(a,n,r);return t&&(i.targetName=t),this.addAnimator(i,t),i},e.prototype.addAnimator=function(t,n){var r=this.__zr,a=this;t.during(function(){a.updateDuringAnimation(n)}).done(function(){var i=a.animators,l=et(i,t);l>=0&&i.splice(l,1)}),this.animators.push(t),r&&r.animation.addAnimator(t),r&&r.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,n){for(var r=this.animators,a=r.length,i=[],l=0;l<a;l++){var s=r[l];!t||t===s.scope?s.stop(n):i.push(s)}return this.animators=i,this},e.prototype.animateTo=function(t,n,r){hc(this,t,n,r)},e.prototype.animateFrom=function(t,n,r){hc(this,t,n,r,!0)},e.prototype._transitionState=function(t,n,r,a){for(var i=hc(this,n,r,a),l=0;l<i.length;l++)i[l].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=On;var n={};function r(i,l,s){n[i+l+s]||(console.warn("DEPRECATED: '"+i+"' has been deprecated. use '"+l+"', '"+s+"' instead"),n[i+l+s]=!0)}function a(i,l,s,u){Object.defineProperty(t,i,{get:function(){if(process.env.NODE_ENV!=="production"&&r(i,s,u),!this[l]){var d=this[l]=[];c(this,d)}return this[l]},set:function(d){process.env.NODE_ENV!=="production"&&r(i,s,u),this[s]=d[0],this[u]=d[1],this[l]=d,c(this,d)}});function c(d,f){Object.defineProperty(f,0,{get:function(){return d[s]},set:function(v){d[s]=v}}),Object.defineProperty(f,1,{get:function(){return d[u]},set:function(v){d[u]=v}})}}Object.defineProperty&&(a("position","_legacyPos","x","y"),a("scale","_legacyScale","scaleX","scaleY"),a("origin","_legacyOrigin","originX","originY"))})(),e})();Nn(hu,lr);Nn(hu,dv);function hc(e,t,n,r,a){n=n||{};var i=[];Cg(e,"",e,t,n,r,i,a);var l=i.length,s=!1,u=n.done,c=n.aborted,d=function(){s=!0,l--,l<=0&&(s?u&&u():c&&c())},f=function(){l--,l<=0&&(s?u&&u():c&&c())};l||u&&u(),i.length>0&&n.during&&i[0].during(function(h,m){n.during(m)});for(var v=0;v<i.length;v++){var p=i[v];d&&p.done(d),f&&p.aborted(f),n.force&&p.duration(n.duration),p.start(n.easing)}return i}function mc(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function O8(e){return qt(e[0])}function F8(e,t,n){if(qt(t[n]))if(qt(e[n])||(e[n]=[]),Ot(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),mc(e[n],t[n],r))}else{var a=t[n],i=e[n],l=a.length;if(O8(a))for(var s=a[0].length,u=0;u<l;u++)i[u]?mc(i[u],a[u],s):i[u]=Array.prototype.slice.call(a[u]);else mc(i,a,l);i.length=a.length}else e[n]=t[n]}function z8(e,t){return e===t||qt(e)&&qt(t)&&H8(e,t)}function H8(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Cg(e,t,n,r,a,i,l,s){for(var u=Fe(r),c=a.duration,d=a.delay,f=a.additive,v=a.setToFinal,p=!Ce(i),h=e.animators,m=[],g=0;g<u.length;g++){var y=u[g],x=r[y];if(x!=null&&n[y]!=null&&(p||i[y]))if(Ce(x)&&!qt(x)&&!rv(x)){if(t){s||(n[y]=x,e.updateDuringAnimation(t));continue}Cg(e,y,n[y],x,a,i&&i[y],l,s)}else m.push(y);else s||(n[y]=x,e.updateDuringAnimation(t),m.push(y))}var b=m.length;if(!f&&b)for(var S=0;S<h.length;S++){var _=h[S];if(_.targetName===t){var k=_.stopTracks(m);if(k){var w=et(h,_);h.splice(w,1)}}}if(a.force||(m=wt(m,function(N){return!z8(r[N],n[N])}),b=m.length),b>0||a.force&&!l.length){var C=void 0,E=void 0,L=void 0;if(s){E={},v&&(C={});for(var S=0;S<b;S++){var y=m[S];E[y]=n[y],v?C[y]=r[y]:n[y]=r[y]}}else if(v){L={};for(var S=0;S<b;S++){var y=m[S];L[y]=fs(n[y]),F8(n,r,y)}}var _=new cv(n,!1,!1,f?wt(h,function(T){return T.targetName===t}):null);_.targetName=t,a.scope&&(_.scope=a.scope),v&&C&&_.whenWithKeys(0,C,m),L&&_.whenWithKeys(0,L,m),_.whenWithKeys(c??500,s?E:r,m).delay(d||0),e.addAnimator(_,t),l.push(_)}}var yt=(function(e){me(t,e);function t(n){var r=e.call(this)||this;return r.isGroup=!0,r._children=[],r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(n){return this._children[n]},t.prototype.childOfName=function(n){for(var r=this._children,a=0;a<r.length;a++)if(r[a].name===n)return r[a]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(n){if(n&&(n!==this&&n.parent!==this&&(this._children.push(n),this._doAdd(n)),process.env.NODE_ENV!=="production"&&n.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(n,r){if(n&&n!==this&&n.parent!==this&&r&&r.parent===this){var a=this._children,i=a.indexOf(r);i>=0&&(a.splice(i,0,n),this._doAdd(n))}return this},t.prototype.replace=function(n,r){var a=et(this._children,n);return a>=0&&this.replaceAt(r,a),this},t.prototype.replaceAt=function(n,r){var a=this._children,i=a[r];if(n&&n!==this&&n.parent!==this&&n!==i){a[r]=n,i.parent=null;var l=this.__zr;l&&i.removeSelfFromZr(l),this._doAdd(n)}return this},t.prototype._doAdd=function(n){n.parent&&n.parent.remove(n),n.parent=this;var r=this.__zr;r&&r!==n.__zr&&n.addSelfToZr(r),r&&r.refresh()},t.prototype.remove=function(n){var r=this.__zr,a=this._children,i=et(a,n);return i<0?this:(a.splice(i,1),n.parent=null,r&&n.removeSelfFromZr(r),r&&r.refresh(),this)},t.prototype.removeAll=function(){for(var n=this._children,r=this.__zr,a=0;a<n.length;a++){var i=n[a];r&&i.removeSelfFromZr(r),i.parent=null}return n.length=0,this},t.prototype.eachChild=function(n,r){for(var a=this._children,i=0;i<a.length;i++){var l=a[i];n.call(r,l,i)}return this},t.prototype.traverse=function(n,r){for(var a=0;a<this._children.length;a++){var i=this._children[a],l=n.call(r,i);i.isGroup&&!l&&i.traverse(n,r)}return this},t.prototype.addSelfToZr=function(n){e.prototype.addSelfToZr.call(this,n);for(var r=0;r<this._children.length;r++){var a=this._children[r];a.addSelfToZr(n)}},t.prototype.removeSelfFromZr=function(n){e.prototype.removeSelfFromZr.call(this,n);for(var r=0;r<this._children.length;r++){var a=this._children[r];a.removeSelfFromZr(n)}},t.prototype.getBoundingRect=function(n){for(var r=new Je(0,0,0,0),a=n||this._children,i=[],l=null,s=0;s<a.length;s++){var u=a[s];if(!(u.ignore||u.invisible)){var c=u.getBoundingRect(),d=u.getLocalTransform(i);d?(Je.applyTransform(r,c,d),l=l||r.clone(),l.union(r)):(l=l||c.clone(),l.union(c))}}return l||r},t})(hu);yt.prototype.type="group";var bi={},Eg={};function G8(e){delete Eg[e]}function U8(e){if(!e)return!1;if(typeof e=="string")return Ps(e,1)<qd;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,a=0;a<r;a++)n+=Ps(t[a].color,1);return n/=r,n<qd}return!1}var W8=(function(){function e(t,n,r){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,r=r||{},this.dom=n,this.id=t;var i=new i8,l=r.renderer||"canvas";if(bi[l]||(l=Fe(bi)[0]),process.env.NODE_ENV!=="production"&&!bi[l])throw new Error("Renderer '"+l+"' is not imported. Please import it first.");r.useDirtyRect=r.useDirtyRect==null?!1:r.useDirtyRect;var s=new bi[l](n,i,r,t),u=r.ssr||s.ssrOnly;this.storage=i,this.painter=s;var c=!He.node&&!He.worker&&!u?new D8(s.getViewportRoot(),s.root):null,d=r.useCoarsePointer,f=d==null||d==="auto"?He.touchEventsSupported:!!d,v=44,p;f&&(p=ke(r.pointerSize,v)),this.handler=new ag(i,s,c,s.root,p),this.animation=new N8({stage:{update:u?null:function(){return a._flush(!0)}}}),u||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,n){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,n),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=U8(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var n,r=va();this._needsRefresh&&(n=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(n=!0,this.refreshHoverImmediately());var a=va();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-r})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,n){if(!this._disposed)return this.handler.findHover(t,n)},e.prototype.on=function(t,n,r){return this._disposed||this.handler.on(t,n,r),this},e.prototype.off=function(t,n){this._disposed||this.handler.off(t,n)},e.prototype.trigger=function(t,n){this._disposed||this.handler.trigger(t,n)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),n=0;n<t.length;n++)t[n]instanceof yt&&t[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,G8(this.id))},e})();function Kp(e,t){var n=new W8(J1(),e,t);return Eg[n.id]=n,n}function Y8(e,t){bi[e]=t}var Jd;function X8(e){if(typeof Jd=="function")return Jd(e)}function q8(e){Jd=e}var Qp=1e-4,Tg=20;function Z8(e){return e.replace(/^\s+|\s+$/g,"")}function Kd(e,t,n,r){var a=t[0],i=t[1],l=n[0],s=n[1],u=i-a,c=s-l;if(u===0)return c===0?l:(l+s)/2;if(r)if(u>0){if(e<=a)return l;if(e>=i)return s}else{if(e>=a)return l;if(e<=i)return s}else{if(e===a)return l;if(e===i)return s}return(e-a)/u*c+l}function Ke(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return _e(e)?Z8(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function ft(e,t,n){return t==null&&(t=10),t=Math.min(Math.max(0,t),Tg),e=(+e).toFixed(t),n?e:+e}function tr(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return Qd(e)}function Qd(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,a=n>0?n:t.length,i=t.indexOf("."),l=i<0?0:a-1-i;return Math.max(0,l-r)}function j8(e,t){var n=Math.log,r=Math.LN10,a=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),l=Math.min(Math.max(-a+i,0),20);return isFinite(l)?l:20}function J8(e,t){var n=Dr(e,function(p,h){return p+(isNaN(h)?0:h)},0);if(n===0)return[];for(var r=Math.pow(10,t),a=ge(e,function(p){return(isNaN(p)?0:p)/n*r*100}),i=r*100,l=ge(a,function(p){return Math.floor(p)}),s=Dr(l,function(p,h){return p+h},0),u=ge(a,function(p,h){return p-l[h]});s<i;){for(var c=Number.NEGATIVE_INFINITY,d=null,f=0,v=u.length;f<v;++f)u[f]>c&&(c=u[f],d=f);++l[d],u[d]=0,++s}return ge(l,function(p){return p/r})}function K8(e,t){var n=Math.max(tr(e),tr(t)),r=e+t;return n>Tg?r:ft(r,n)}function Ng(e){var t=Math.PI*2;return(e%t+t)%t}function Rs(e){return e>-Qp&&e<Qp}var Q8=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Rr(e){if(e instanceof Date)return e;if(_e(e)){var t=Q8.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function e6(e){return Math.pow(10,mu(e))}function mu(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function Ig(e,t){var n=mu(e),r=Math.pow(10,n),a=e/r,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,e=i*r,n>=-20?+e.toFixed(n<0?-n:0):e}function t6(e){var t=parseFloat(e);return t==e&&(t!==0||!_e(e)||e.indexOf("x")<=0)?t:NaN}function Lg(e){return!isNaN(t6(e))}function n6(){return Math.round(Math.random()*9)}function Ag(e,t){return t===0?e:Ag(t,e%t)}function eh(e,t){return e==null?t:t==null?e:e*t/Ag(e,t)}var r6="[ECharts] ",th={},o6=typeof console<"u"&&console.warn&&console.log;function gu(e,t,n){if(o6){if(n){if(th[t])return;th[t]=!0}console[e](r6+t)}}function a6(e,t){gu("log",e,t)}function Mt(e,t){gu("warn",e,t)}function Vt(e,t){gu("error",e,t)}function Yn(e){process.env.NODE_ENV!=="production"&&gu("warn","DEPRECATED: "+e,!0)}function ht(e,t,n){process.env.NODE_ENV!=="production"&&Yn((n?"["+n+"]":"")+(e+" is deprecated, use "+t+" instead."))}function ef(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";if(process.env.NODE_ENV!=="production"){var r=function(a){return a===void 0?"undefined":a===1/0?"Infinity":a===-1/0?"-Infinity":Gi(a)?"NaN":a instanceof Date?"Date("+a.toISOString()+")":Ae(a)?"function () { ... }":Sb(a)?a+"":null};n=ge(e,function(a){if(_e(a))return a;var i=r(a);if(i!=null)return i;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(a,function(l,s){var u=r(s);return u??s})}catch{return"?"}else return"?"}).join(" ")}return n}function Kt(e){throw new Error(e)}function nh(e,t,n){return(t-e)*n+e}var Mg="series\0",i6="\0_ec_\0";function $t(e){return e instanceof Array?e:e==null?[]:[e]}function tf(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,a=n.length;r<a;r++){var i=n[r];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}var rh=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function fl(e){return Ce(e)&&!we(e)&&!(e instanceof Date)?e.value:e}function l6(e){return Ce(e)&&!(e instanceof Array)}function s6(e,t,n){var r=n==="normalMerge",a=n==="replaceMerge",i=n==="replaceAll";e=e||[],t=(t||[]).slice();var l=Ve();q(t,function(u,c){if(!Ce(u)){t[c]=null;return}process.env.NODE_ENV!=="production"&&(u.id!=null&&!ah(u.id)&&oh(u.id),u.name!=null&&!ah(u.name)&&oh(u.name))});var s=u6(e,l,n);return(r||a)&&c6(s,e,l,t),r&&d6(s,t),r||a?f6(s,t,a):i&&v6(s,t),p6(s),s}function u6(e,t,n){var r=[];if(n==="replaceAll")return r;for(var a=0;a<e.length;a++){var i=e[a];i&&i.id!=null&&t.set(i.id,a),r.push({existing:n==="replaceMerge"||Ea(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return r}function c6(e,t,n,r){q(r,function(a,i){if(!(!a||a.id==null)){var l=Mi(a.id),s=n.get(l);if(s!=null){var u=e[s];Pe(!u.newOption,'Duplicated option on id "'+l+'".'),u.newOption=a,u.existing=t[s],r[i]=null}}})}function d6(e,t){q(t,function(n,r){if(!(!n||n.name==null))for(var a=0;a<e.length;a++){var i=e[a].existing;if(!e[a].newOption&&i&&(i.id==null||n.id==null)&&!Ea(n)&&!Ea(i)&&Vg("name",i,n)){e[a].newOption=n,t[r]=null;return}}})}function f6(e,t,n){q(t,function(r){if(r){for(var a,i=0;(a=e[i])&&(a.newOption||Ea(a.existing)||a.existing&&r.id!=null&&!Vg("id",r,a.existing));)i++;a?(a.newOption=r,a.brandNew=n):e.push({newOption:r,brandNew:n,existing:null,keyInfo:null}),i++}})}function v6(e,t){q(t,function(n){e.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})})}function p6(e){var t=Ve();q(e,function(n){var r=n.existing;r&&t.set(r.id,n)}),q(e,function(n){var r=n.newOption;Pe(!r||r.id==null||!t.get(r.id)||t.get(r.id)===n,"id duplicates: "+(r&&r.id)),r&&r.id!=null&&t.set(r.id,n),!n.keyInfo&&(n.keyInfo={})}),q(e,function(n,r){var a=n.existing,i=n.newOption,l=n.keyInfo;if(Ce(i)){if(l.name=i.name!=null?Mi(i.name):a?a.name:Mg+r,a)l.id=Mi(a.id);else if(i.id!=null)l.id=Mi(i.id);else{var s=0;do l.id="\0"+l.name+"\0"+s++;while(t.get(l.id))}t.set(l.id,n)}})}function Vg(e,t,n){var r=Wn(t[e],null),a=Wn(n[e],null);return r!=null&&a!=null&&r===a}function Mi(e){if(process.env.NODE_ENV!=="production"&&e==null)throw new Error;return Wn(e,"")}function Wn(e,t){return e==null?t:_e(e)?e:Qe(e)||K1(e)?e+"":t}function oh(e){process.env.NODE_ENV!=="production"&&Mt("`"+e+"` is invalid id or name. Must be a string or number.")}function ah(e){return K1(e)||Lg(e)}function fv(e){var t=e.name;return!!(t&&t.indexOf(Mg))}function Ea(e){return e&&e.id!=null&&Mi(e.id).indexOf(i6)===0}function h6(e,t,n){q(e,function(r){var a=r.newOption;Ce(a)&&(r.keyInfo.mainType=t,r.keyInfo.subType=m6(t,a,r.existing,n))})}function m6(e,t,n,r){var a=t.type?t.type:n?n.subType:r.determineSubType(e,t);return a}function Ta(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return we(t.dataIndex)?ge(t.dataIndex,function(n){return e.indexOfRawIndex(n)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return we(t.name)?ge(t.name,function(n){return e.indexOfName(n)}):e.indexOfName(t.name)}function _t(){var e="__ec_inner_"+g6++;return function(t){return t[e]||(t[e]={})}}var g6=n6();function gc(e,t,n){var r=Pg(t,n),a=r.mainTypeSpecified,i=r.queryOptionMap,l=r.others,s=l,u=n?n.defaultMainType:null;return!a&&u&&i.set(u,{}),i.each(function(c,d){var f=yu(e,d,c,{useDefault:u===d,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});s[d+"Models"]=f.models,s[d+"Model"]=f.models[0]}),s}function Pg(e,t){var n;if(_e(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var a=Ve(),i={},l=!1;return q(n,function(s,u){if(u==="dataIndex"||u==="dataIndexInside"){i[u]=s;return}var c=u.match(/^(\w+)(Index|Id|Name)$/)||[],d=c[1],f=(c[2]||"").toLowerCase();if(!(!d||!f||t&&t.includeMainTypes&&et(t.includeMainTypes,d)<0)){l=l||!!d;var v=a.get(d)||a.set(d,{});v[f]=s}}),{mainTypeSpecified:l,queryOptionMap:a,others:i}}var Tn={useDefault:!0,enableAll:!1,enableNone:!1};function yu(e,t,n,r){r=r||Tn;var a=n.index,i=n.id,l=n.name,s={models:null,specified:a!=null||i!=null||l!=null};if(!s.specified){var u=void 0;return s.models=r.useDefault&&(u=e.getComponent(t))?[u]:[],s}return a==="none"||a===!1?(Pe(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(a==="all"&&(Pe(r.enableAll,'`"all"` is not a valid value on index option.'),a=i=l=null),s.models=e.queryComponents({mainType:t,index:a,id:i,name:l}),s)}function Dg(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function y6(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function x6(e,t,n,r,a){var i=t==null||t==="auto";if(r==null)return r;if(Qe(r)){var l=nh(n||0,r,a);return ft(l,i?Math.max(tr(n||0),tr(r)):t)}else{if(_e(r))return a<1?n:r;for(var s=[],u=n,c=r,d=Math.max(u?u.length:0,c.length),f=0;f<d;++f){var v=e.getDimensionInfo(f);if(v&&v.type==="ordinal")s[f]=(a<1&&u?u:c)[f];else{var p=u&&u[f]?u[f]:0,h=c[f],l=nh(p,h,a);s[f]=ft(l,i?Math.max(tr(p),tr(h)):t)}}return s}}var w6=".",to="___EC__COMPONENT__CONTAINER___",Bg="___EC__EXTENDED_CLASS___";function Gn(e){var t={main:"",sub:""};if(e){var n=e.split(w6);t.main=n[0]||"",t.sub=n[1]||""}return t}function b6(e){Pe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function S6(e){return!!(e&&e[Bg])}function vv(e,t){e.$constructor=e,e.extend=function(n){process.env.NODE_ENV!=="production"&&q(t,function(i){n[i]||console.warn("Method `"+i+"` should be implemented"+(n.type?" in "+n.type:"")+".")});var r=this,a;return _6(r)?a=(function(i){me(l,i);function l(){return i.apply(this,arguments)||this}return l})(r):(a=function(){(n.$constructor||r).apply(this,arguments)},xb(a,this)),fe(a.prototype,n),a[Bg]=!0,a.extend=this.extend,a.superCall=E6,a.superApply=T6,a.superClass=r,a}}function _6(e){return Ae(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Rg(e,t){e.extend=t.extend}var k6=Math.round(Math.random()*10);function C6(e){var t=["__\0is_clz",k6++].join("_");e.prototype[t]=!0,process.env.NODE_ENV!=="production"&&Pe(!e.isInstance,'The method "is" can not be defined.'),e.isInstance=function(n){return!!(n&&n[t])}}function E6(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function T6(e,t,n){return this.superClass.prototype[t].apply(e,n)}function xu(e){var t={};e.registerClass=function(r){var a=r.type||r.prototype.type;if(a){b6(a),r.prototype.type=a;var i=Gn(a);if(!i.sub)process.env.NODE_ENV!=="production"&&t[i.main]&&console.warn(i.main+" exists."),t[i.main]=r;else if(i.sub!==to){var l=n(i);l[i.sub]=r}}return r},e.getClass=function(r,a,i){var l=t[r];if(l&&l[to]&&(l=a?l[a]:null),i&&!l)throw new Error(a?"Component "+r+"."+(a||"")+" is used but not imported.":r+".type should be specified.");return l},e.getClassesByMainType=function(r){var a=Gn(r),i=[],l=t[a.main];return l&&l[to]?q(l,function(s,u){u!==to&&i.push(s)}):i.push(l),i},e.hasClass=function(r){var a=Gn(r);return!!t[a.main]},e.getAllClassMainTypes=function(){var r=[];return q(t,function(a,i){r.push(i)}),r},e.hasSubTypes=function(r){var a=Gn(r),i=t[a.main];return i&&i[to]};function n(r){var a=t[r.main];return(!a||!a[to])&&(a=t[r.main]={},a[to]=!0),a}}function Yi(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(r,a,i){for(var l={},s=0;s<e.length;s++){var u=e[s][1];if(!(a&&et(a,u)>=0||i&&et(i,u)<0)){var c=r.getShallow(u,t);c!=null&&(l[e[s][0]]=c)}}return l}}var N6=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],I6=Yi(N6),L6=(function(){function e(){}return e.prototype.getAreaStyle=function(t,n){return I6(this,t,n)},e})(),nf=new dl(50);function A6(e){if(typeof e=="string"){var t=nf.get(e);return t&&t.image}else return e}function pv(e,t,n,r,a){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!n)return t;var i=nf.get(e),l={hostEl:n,cb:r,cbPayload:a};return i?(t=i.image,!wu(t)&&i.pending.push(l)):(t=cl.loadImage(e,ih,ih),t.__zrImageSrc=e,nf.put(e,t.__cachedImgObj={image:t,pending:[l]})),t}else return e;else return t}function ih(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function wu(e){return e&&e.width&&e.height}var yc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function M6(e,t,n,r,a,i){if(!n){e.text="",e.isTruncated=!1;return}var l=(t+"").split(`
|
|
21
|
+
`);i=$g(n,r,a,i);for(var s=!1,u={},c=0,d=l.length;c<d;c++)Og(u,l[c],i),l[c]=u.textLine,s=s||u.isTruncated;e.text=l.join(`
|
|
22
|
+
`),e.isTruncated=s}function $g(e,t,n,r){r=r||{};var a=fe({},r);a.font=t,n=ke(n,"..."),a.maxIterations=ke(r.maxIterations,2);var i=a.minChar=ke(r.minChar,0);a.cnCharWidth=tn("国",t);var l=a.ascCharWidth=tn("a",t);a.placeholder=ke(r.placeholder,"");for(var s=e=Math.max(0,e-1),u=0;u<i&&s>=l;u++)s-=l;var c=tn(n,t);return c>s&&(n="",c=0),s=e-c,a.ellipsis=n,a.ellipsisWidth=c,a.contentWidth=s,a.containerWidth=e,a}function Og(e,t,n){var r=n.containerWidth,a=n.font,i=n.contentWidth;if(!r){e.textLine="",e.isTruncated=!1;return}var l=tn(t,a);if(l<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(l<=i||s>=n.maxIterations){t+=n.ellipsis;break}var u=s===0?V6(t,i,n.ascCharWidth,n.cnCharWidth):l>0?Math.floor(t.length*i/l):0;t=t.substr(0,u),l=tn(t,a)}t===""&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function V6(e,t,n,r){for(var a=0,i=0,l=e.length;i<l&&a<t;i++){var s=e.charCodeAt(i);a+=0<=s&&s<=127?n:r}return i}function P6(e,t){e!=null&&(e+="");var n=t.overflow,r=t.padding,a=t.font,i=n==="truncate",l=pu(a),s=ke(t.lineHeight,l),u=!!t.backgroundColor,c=t.lineOverflow==="truncate",d=!1,f=t.width,v;f!=null&&(n==="break"||n==="breakAll")?v=e?Fg(e,t.font,f,n==="breakAll",0).lines:[]:v=e?e.split(`
|
|
23
|
+
`):[];var p=v.length*s,h=ke(t.height,p);if(p>h&&c){var m=Math.floor(h/s);d=d||v.length>m,v=v.slice(0,m)}if(e&&i&&f!=null)for(var g=$g(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},x=0;x<v.length;x++)Og(y,v[x],g),v[x]=y.textLine,d=d||y.isTruncated;for(var b=h,S=0,x=0;x<v.length;x++)S=Math.max(tn(v[x],a),S);f==null&&(f=S);var _=S;return r&&(b+=r[0]+r[2],_+=r[1]+r[3],f+=r[1]+r[3]),u&&(_=f),{lines:v,height:h,outerWidth:_,outerHeight:b,lineHeight:s,calculatedLineHeight:l,contentWidth:S,contentHeight:p,width:f,isTruncated:d}}var D6=(function(){function e(){}return e})(),lh=(function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e})(),B6=(function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e})();function R6(e,t){var n=new B6;if(e!=null&&(e+=""),!e)return n;for(var r=t.width,a=t.height,i=t.overflow,l=(i==="break"||i==="breakAll")&&r!=null?{width:r,accumWidth:0,breakAll:i==="breakAll"}:null,s=yc.lastIndex=0,u;(u=yc.exec(e))!=null;){var c=u.index;c>s&&xc(n,e.substring(s,c),t,l),xc(n,u[2],t,l,u[1]),s=yc.lastIndex}s<e.length&&xc(n,e.substring(s,e.length),t,l);var d=[],f=0,v=0,p=t.padding,h=i==="truncate",m=t.lineOverflow==="truncate",g={};function y(W,O,P){W.width=O,W.lineHeight=P,f+=P,v=Math.max(v,O)}e:for(var x=0;x<n.lines.length;x++){for(var b=n.lines[x],S=0,_=0,k=0;k<b.tokens.length;k++){var w=b.tokens[k],C=w.styleName&&t.rich[w.styleName]||{},E=w.textPadding=C.padding,L=E?E[1]+E[3]:0,N=w.font=C.font||t.font;w.contentHeight=pu(N);var T=ke(C.height,w.contentHeight);if(w.innerHeight=T,E&&(T+=E[0]+E[2]),w.height=T,w.lineHeight=Eo(C.lineHeight,t.lineHeight,T),w.align=C&&C.align||t.align,w.verticalAlign=C&&C.verticalAlign||"middle",m&&a!=null&&f+w.lineHeight>a){var A=n.lines.length;k>0?(b.tokens=b.tokens.slice(0,k),y(b,_,S),n.lines=n.lines.slice(0,x+1)):n.lines=n.lines.slice(0,x),n.isTruncated=n.isTruncated||n.lines.length<A;break e}var I=C.width,D=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")w.percentWidth=I,d.push(w),w.contentWidth=tn(w.text,N);else{if(D){var V=C.backgroundColor,B=V&&V.image;B&&(B=A6(B),wu(B)&&(w.width=Math.max(w.width,B.width*T/B.height)))}var R=h&&r!=null?r-_:null;R!=null&&R<w.width?!D||R<L?(w.text="",w.width=w.contentWidth=0):(M6(g,w.text,R-L,N,t.ellipsis,{minChar:t.truncateMinChar}),w.text=g.text,n.isTruncated=n.isTruncated||g.isTruncated,w.width=w.contentWidth=tn(w.text,N)):w.contentWidth=tn(w.text,N)}w.width+=L,_+=w.width,C&&(S=Math.max(S,w.lineHeight))}y(b,_,S)}n.outerWidth=n.width=ke(r,v),n.outerHeight=n.height=ke(a,f),n.contentHeight=f,n.contentWidth=v,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]);for(var x=0;x<d.length;x++){var w=d[x],F=w.percentWidth;w.width=parseInt(F,10)/100*n.width}return n}function xc(e,t,n,r,a){var i=t==="",l=a&&n.rich[a]||{},s=e.lines,u=l.font||n.font,c=!1,d,f;if(r){var v=l.padding,p=v?v[1]+v[3]:0;if(l.width!=null&&l.width!=="auto"){var h=Br(l.width,r.width)+p;s.length>0&&h+r.accumWidth>r.width&&(d=t.split(`
|
|
24
|
+
`),c=!0),r.accumWidth=h}else{var m=Fg(t,u,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+p,f=m.linesWidths,d=m.lines}}else d=t.split(`
|
|
25
|
+
`);for(var g=0;g<d.length;g++){var y=d[g],x=new D6;if(x.styleName=a,x.text=y,x.isLineHolder=!y&&!i,typeof l.width=="number"?x.width=l.width:x.width=f?f[g]:tn(y,u),!g&&!c){var b=(s[s.length-1]||(s[0]=new lh)).tokens,S=b.length;S===1&&b[0].isLineHolder?b[0]=x:(y||!S||i)&&b.push(x)}else s.push(new lh([x]))}}function $6(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var O6=Dr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function F6(e){return $6(e)?!!O6[e]:!0}function Fg(e,t,n,r,a){for(var i=[],l=[],s="",u="",c=0,d=0,f=0;f<e.length;f++){var v=e.charAt(f);if(v===`
|
|
26
|
+
`){u&&(s+=u,d+=c),i.push(s),l.push(d),s="",u="",c=0,d=0;continue}var p=tn(v,t),h=r?!1:!F6(v);if(i.length?d+p>n:a+d+p>n){d?(s||u)&&(h?(s||(s=u,u="",c=0,d=c),i.push(s),l.push(d-c),u+=v,c+=p,s="",d=c):(u&&(s+=u,u="",c=0),i.push(s),l.push(d),s=v,d=p)):h?(i.push(u),l.push(c),u=v,c=p):(i.push(v),l.push(p));continue}d+=p,h?(u+=v,c+=p):(u&&(s+=u,u="",c=0),s+=v)}return!i.length&&!s&&(s=e,u="",c=0),u&&(s+=u),s&&(i.push(s),l.push(d)),i.length===1&&(d+=a),{accumWidth:d,lines:i,linesWidths:l}}var rf="__zr_style_"+Math.round(Math.random()*10),To={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};To[rf]=!0;var sh=["z","z2","invisible"],z6=["invisible"],vl=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype._init=function(n){for(var r=Fe(n),a=0;a<r.length;a++){var i=r[a];i==="style"?this.useStyle(n[i]):e.prototype.attrKV.call(this,i,n[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(n,r,a,i){var l=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&H6(this,n,r)||l&&!l[0]&&!l[3])return!1;if(a&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},t.prototype.contain=function(n,r){return this.rectContain(n,r)},t.prototype.traverse=function(n,r){n.call(r,this)},t.prototype.rectContain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect();return i.contain(a[0],a[1])},t.prototype.getPaintRect=function(){var n=this._paintRect;if(!this._paintRect||this.__dirty){var r=this.transform,a=this.getBoundingRect(),i=this.style,l=i.shadowBlur||0,s=i.shadowOffsetX||0,u=i.shadowOffsetY||0;n=this._paintRect||(this._paintRect=new Je(0,0,0,0)),r?Je.applyTransform(n,a,r):n.copy(a),(l||s||u)&&(n.width+=l*2+Math.abs(s),n.height+=l*2+Math.abs(u),n.x=Math.min(n.x,n.x+s-l),n.y=Math.min(n.y,n.y+u-l));var c=this.dirtyRectTolerance;n.isZero()||(n.x=Math.floor(n.x-c),n.y=Math.floor(n.y-c),n.width=Math.ceil(n.width+1+c*2),n.height=Math.ceil(n.height+1+c*2))}return n},t.prototype.setPrevPaintRect=function(n){n?(this._prevPaintRect=this._prevPaintRect||new Je(0,0,0,0),this._prevPaintRect.copy(n)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(n){return this.animate("style",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(n,r){n!=="style"?e.prototype.attrKV.call(this,n,r):this.style?this.setStyle(r):this.useStyle(r)},t.prototype.setStyle=function(n,r){return typeof n=="string"?this.style[n]=r:fe(this.style,n),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(n){n||this.markRedraw(),this.__dirty|=yi,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&yi)},t.prototype.styleUpdated=function(){this.__dirty&=~yi},t.prototype.createStyle=function(n){return du(To,n)},t.prototype.useStyle=function(n){n[rf]||(n=this.createStyle(n)),this.__inHover?this.__hoverStyle=n:this.style=n,this.dirtyStyle()},t.prototype.isStyleObject=function(n){return n[rf]},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.style&&!r.style&&(r.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,r,sh)},t.prototype._applyStateObj=function(n,r,a,i,l,s){e.prototype._applyStateObj.call(this,n,r,a,i,l,s);var u=!(r&&i),c;if(r&&r.style?l?i?c=r.style:(c=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(c,r.style)):(c=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(c,r.style)):u&&(c=a.style),c)if(l){var d=this.style;if(this.style=this.createStyle(u?{}:d),u)for(var f=Fe(d),v=0;v<f.length;v++){var p=f[v];p in c&&(c[p]=c[p],this.style[p]=d[p])}for(var h=Fe(c),v=0;v<h.length;v++){var p=h[v];this.style[p]=this.style[p]}this._transitionState(n,{style:c},s,this.getAnimationStyleProps())}else this.useStyle(c);for(var m=this.__inHover?z6:sh,v=0;v<m.length;v++){var p=m[v];r&&r[p]!=null?this[p]=r[p]:u&&a[p]!=null&&(this[p]=a[p])}},t.prototype._mergeStates=function(n){for(var r=e.prototype._mergeStates.call(this,n),a,i=0;i<n.length;i++){var l=n[i];l.style&&(a=a||{},this._mergeStyle(a,l.style))}return a&&(r.style=a),r},t.prototype._mergeStyle=function(n,r){return fe(n,r),n},t.prototype.getAnimationStyleProps=function(){return bu},t.initDefaultProps=(function(){var n=t.prototype;n.type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,n.__dirty=On|yi})(),t})(hu),wc=new Je(0,0,0,0),bc=new Je(0,0,0,0);function H6(e,t,n){return wc.copy(e.getBoundingRect()),e.transform&&wc.applyTransform(e.transform),bc.width=t,bc.height=n,!wc.intersect(bc)}var pn=Math.min,hn=Math.max,Sc=Math.sin,_c=Math.cos,no=Math.PI*2,Ml=$a(),Vl=$a(),Pl=$a();function uh(e,t,n,r,a,i){a[0]=pn(e,n),a[1]=pn(t,r),i[0]=hn(e,n),i[1]=hn(t,r)}var ch=[],dh=[];function G6(e,t,n,r,a,i,l,s,u,c){var d=cg,f=Et,v=d(e,n,a,l,ch);u[0]=1/0,u[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var p=0;p<v;p++){var h=f(e,n,a,l,ch[p]);u[0]=pn(h,u[0]),c[0]=hn(h,c[0])}v=d(t,r,i,s,dh);for(var p=0;p<v;p++){var m=f(t,r,i,s,dh[p]);u[1]=pn(m,u[1]),c[1]=hn(m,c[1])}u[0]=pn(e,u[0]),c[0]=hn(e,c[0]),u[0]=pn(l,u[0]),c[0]=hn(l,c[0]),u[1]=pn(t,u[1]),c[1]=hn(t,c[1]),u[1]=pn(s,u[1]),c[1]=hn(s,c[1])}function U6(e,t,n,r,a,i,l,s){var u=dg,c=Ht,d=hn(pn(u(e,n,a),1),0),f=hn(pn(u(t,r,i),1),0),v=c(e,n,a,d),p=c(t,r,i,f);l[0]=pn(e,a,v),l[1]=pn(t,i,p),s[0]=hn(e,a,v),s[1]=hn(t,i,p)}function W6(e,t,n,r,a,i,l,s,u){var c=da,d=fa,f=Math.abs(a-i);if(f%no<1e-4&&f>1e-4){s[0]=e-n,s[1]=t-r,u[0]=e+n,u[1]=t+r;return}if(Ml[0]=_c(a)*n+e,Ml[1]=Sc(a)*r+t,Vl[0]=_c(i)*n+e,Vl[1]=Sc(i)*r+t,c(s,Ml,Vl),d(u,Ml,Vl),a=a%no,a<0&&(a=a+no),i=i%no,i<0&&(i=i+no),a>i&&!l?i+=no:a<i&&l&&(a+=no),l){var v=i;i=a,a=v}for(var p=0;p<i;p+=Math.PI/2)p>a&&(Pl[0]=_c(p)*n+e,Pl[1]=Sc(p)*r+t,c(s,Pl,s),d(u,Pl,u))}var We={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ro=[],oo=[],Vn=[],ur=[],Pn=[],Dn=[],kc=Math.min,Cc=Math.max,ao=Math.cos,io=Math.sin,Jn=Math.abs,of=Math.PI,br=of*2,Ec=typeof Float32Array<"u",Qa=[];function Tc(e){var t=Math.round(e/of*1e8)/1e8;return t%2*of}function zg(e,t){var n=Tc(e[0]);n<0&&(n+=br);var r=n-e[0],a=e[1];a+=r,!t&&a-n>=br?a=n+br:t&&n-a>=br?a=n-br:!t&&n>a?a=n+(br-Tc(n-a)):t&&n<a&&(a=n-(br-Tc(a-n))),e[0]=n,e[1]=a}var $r=(function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,n,r){r=r||0,r>0&&(this._ux=Jn(r/Xp/t)||0,this._uy=Jn(r/Xp/n)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(We.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},e.prototype.lineTo=function(t,n){var r=Jn(t-this._xi),a=Jn(n-this._yi),i=r>this._ux||a>this._uy;if(this.addData(We.L,t,n),this._ctx&&i&&this._ctx.lineTo(t,n),i)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var l=r*r+a*a;l>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=l)}return this},e.prototype.bezierCurveTo=function(t,n,r,a,i,l){return this._drawPendingPt(),this.addData(We.C,t,n,r,a,i,l),this._ctx&&this._ctx.bezierCurveTo(t,n,r,a,i,l),this._xi=i,this._yi=l,this},e.prototype.quadraticCurveTo=function(t,n,r,a){return this._drawPendingPt(),this.addData(We.Q,t,n,r,a),this._ctx&&this._ctx.quadraticCurveTo(t,n,r,a),this._xi=r,this._yi=a,this},e.prototype.arc=function(t,n,r,a,i,l){this._drawPendingPt(),Qa[0]=a,Qa[1]=i,zg(Qa,l),a=Qa[0],i=Qa[1];var s=i-a;return this.addData(We.A,t,n,r,r,a,s,0,l?0:1),this._ctx&&this._ctx.arc(t,n,r,a,i,l),this._xi=ao(i)*r+t,this._yi=io(i)*r+n,this},e.prototype.arcTo=function(t,n,r,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,r,a,i),this},e.prototype.rect=function(t,n,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,r,a),this.addData(We.R,t,n,r,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(We.Z);var t=this._ctx,n=this._x0,r=this._y0;return t&&t.closePath(),this._xi=n,this._yi=r,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var n=t.length;!(this.data&&this.data.length===n)&&Ec&&(this.data=new Float32Array(n));for(var r=0;r<n;r++)this.data[r]=t[r];this._len=n},e.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var n=t.length,r=0,a=this._len,i=0;i<n;i++)r+=t[i].len();Ec&&this.data instanceof Float32Array&&(this.data=new Float32Array(a+r));for(var i=0;i<n;i++)for(var l=t[i].data,s=0;s<l.length;s++)this.data[a++]=l[s];this._len=a},e.prototype.addData=function(t,n,r,a,i,l,s,u,c){if(this._saveData){var d=this.data;this._len+arguments.length>d.length&&(this._expandData(),d=this.data);for(var f=0;f<arguments.length;f++)d[this._len++]=arguments[f]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n<this._len;n++)t[n]=this.data[n];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Ec&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Vn[0]=Vn[1]=Pn[0]=Pn[1]=Number.MAX_VALUE,ur[0]=ur[1]=Dn[0]=Dn[1]=-Number.MAX_VALUE;var t=this.data,n=0,r=0,a=0,i=0,l;for(l=0;l<this._len;){var s=t[l++],u=l===1;switch(u&&(n=t[l],r=t[l+1],a=n,i=r),s){case We.M:n=a=t[l++],r=i=t[l++],Pn[0]=a,Pn[1]=i,Dn[0]=a,Dn[1]=i;break;case We.L:uh(n,r,t[l],t[l+1],Pn,Dn),n=t[l++],r=t[l++];break;case We.C:G6(n,r,t[l++],t[l++],t[l++],t[l++],t[l],t[l+1],Pn,Dn),n=t[l++],r=t[l++];break;case We.Q:U6(n,r,t[l++],t[l++],t[l],t[l+1],Pn,Dn),n=t[l++],r=t[l++];break;case We.A:var c=t[l++],d=t[l++],f=t[l++],v=t[l++],p=t[l++],h=t[l++]+p;l+=1;var m=!t[l++];u&&(a=ao(p)*f+c,i=io(p)*v+d),W6(c,d,f,v,p,h,m,Pn,Dn),n=ao(h)*f+c,r=io(h)*v+d;break;case We.R:a=n=t[l++],i=r=t[l++];var g=t[l++],y=t[l++];uh(a,i,a+g,i+y,Pn,Dn);break;case We.Z:n=a,r=i;break}da(Vn,Vn,Pn),fa(ur,ur,Dn)}return l===0&&(Vn[0]=Vn[1]=ur[0]=ur[1]=0),new Je(Vn[0],Vn[1],ur[0]-Vn[0],ur[1]-Vn[1])},e.prototype._calculateLength=function(){var t=this.data,n=this._len,r=this._ux,a=this._uy,i=0,l=0,s=0,u=0;this._pathSegLen||(this._pathSegLen=[]);for(var c=this._pathSegLen,d=0,f=0,v=0;v<n;){var p=t[v++],h=v===1;h&&(i=t[v],l=t[v+1],s=i,u=l);var m=-1;switch(p){case We.M:i=s=t[v++],l=u=t[v++];break;case We.L:{var g=t[v++],y=t[v++],x=g-i,b=y-l;(Jn(x)>r||Jn(b)>a||v===n-1)&&(m=Math.sqrt(x*x+b*b),i=g,l=y);break}case We.C:{var S=t[v++],_=t[v++],g=t[v++],y=t[v++],k=t[v++],w=t[v++];m=s8(i,l,S,_,g,y,k,w,10),i=k,l=w;break}case We.Q:{var S=t[v++],_=t[v++],g=t[v++],y=t[v++];m=d8(i,l,S,_,g,y,10),i=g,l=y;break}case We.A:var C=t[v++],E=t[v++],L=t[v++],N=t[v++],T=t[v++],A=t[v++],I=A+T;v+=1,h&&(s=ao(T)*L+C,u=io(T)*N+E),m=Cc(L,N)*kc(br,Math.abs(A)),i=ao(I)*L+C,l=io(I)*N+E;break;case We.R:{s=i=t[v++],u=l=t[v++];var D=t[v++],V=t[v++];m=D*2+V*2;break}case We.Z:{var x=s-i,b=u-l;m=Math.sqrt(x*x+b*b),i=s,l=u;break}}m>=0&&(c[f++]=m,d+=m)}return this._pathLen=d,d},e.prototype.rebuildPath=function(t,n){var r=this.data,a=this._ux,i=this._uy,l=this._len,s,u,c,d,f,v,p=n<1,h,m,g=0,y=0,x,b=0,S,_;if(!(p&&(this._pathSegLen||this._calculateLength(),h=this._pathSegLen,m=this._pathLen,x=n*m,!x)))e:for(var k=0;k<l;){var w=r[k++],C=k===1;switch(C&&(c=r[k],d=r[k+1],s=c,u=d),w!==We.L&&b>0&&(t.lineTo(S,_),b=0),w){case We.M:s=c=r[k++],u=d=r[k++],t.moveTo(c,d);break;case We.L:{f=r[k++],v=r[k++];var E=Jn(f-c),L=Jn(v-d);if(E>a||L>i){if(p){var N=h[y++];if(g+N>x){var T=(x-g)/N;t.lineTo(c*(1-T)+f*T,d*(1-T)+v*T);break e}g+=N}t.lineTo(f,v),c=f,d=v,b=0}else{var A=E*E+L*L;A>b&&(S=f,_=v,b=A)}break}case We.C:{var I=r[k++],D=r[k++],V=r[k++],B=r[k++],R=r[k++],F=r[k++];if(p){var N=h[y++];if(g+N>x){var T=(x-g)/N;Ms(c,I,V,R,T,ro),Ms(d,D,B,F,T,oo),t.bezierCurveTo(ro[1],oo[1],ro[2],oo[2],ro[3],oo[3]);break e}g+=N}t.bezierCurveTo(I,D,V,B,R,F),c=R,d=F;break}case We.Q:{var I=r[k++],D=r[k++],V=r[k++],B=r[k++];if(p){var N=h[y++];if(g+N>x){var T=(x-g)/N;Vs(c,I,V,T,ro),Vs(d,D,B,T,oo),t.quadraticCurveTo(ro[1],oo[1],ro[2],oo[2]);break e}g+=N}t.quadraticCurveTo(I,D,V,B),c=V,d=B;break}case We.A:var W=r[k++],O=r[k++],P=r[k++],$=r[k++],z=r[k++],Z=r[k++],Q=r[k++],J=!r[k++],U=P>$?P:$,ne=Jn(P-$)>.001,K=z+Z,H=!1;if(p){var N=h[y++];g+N>x&&(K=z+Z*(x-g)/N,H=!0),g+=N}if(ne&&t.ellipse?t.ellipse(W,O,P,$,Q,z,K,J):t.arc(W,O,U,z,K,J),H)break e;C&&(s=ao(z)*P+W,u=io(z)*$+O),c=ao(K)*P+W,d=io(K)*$+O;break;case We.R:s=c=r[k],u=d=r[k+1],f=r[k++],v=r[k++];var M=r[k++],G=r[k++];if(p){var N=h[y++];if(g+N>x){var X=x-g;t.moveTo(f,v),t.lineTo(f+kc(X,M),v),X-=M,X>0&&t.lineTo(f+M,v+kc(X,G)),X-=G,X>0&&t.lineTo(f+Cc(M-X,0),v+G),X-=M,X>0&&t.lineTo(f,v+Cc(G-X,0));break e}g+=N}t.rect(f,v,M,G);break;case We.Z:if(p){var N=h[y++];if(g+N>x){var T=(x-g)/N;t.lineTo(c*(1-T)+s*T,d*(1-T)+u*T);break e}g+=N}t.closePath(),c=s,d=u}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=We,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e})();function Yo(e,t,n,r,a,i,l){if(a===0)return!1;var s=a,u=0,c=e;if(l>t+s&&l>r+s||l<t-s&&l<r-s||i>e+s&&i>n+s||i<e-s&&i<n-s)return!1;if(e!==n)u=(t-r)/(e-n),c=(e*r-n*t)/(e-n);else return Math.abs(i-e)<=s/2;var d=u*i-l+c,f=d*d/(u*u+1);return f<=s/2*s/2}function Y6(e,t,n,r,a,i,l,s,u,c,d){if(u===0)return!1;var f=u;if(d>t+f&&d>r+f&&d>i+f&&d>s+f||d<t-f&&d<r-f&&d<i-f&&d<s-f||c>e+f&&c>n+f&&c>a+f&&c>l+f||c<e-f&&c<n-f&&c<a-f&&c<l-f)return!1;var v=l8(e,t,n,r,a,i,l,s,c,d);return v<=f/2}function X6(e,t,n,r,a,i,l,s,u){if(l===0)return!1;var c=l;if(u>t+c&&u>r+c&&u>i+c||u<t-c&&u<r-c&&u<i-c||s>e+c&&s>n+c&&s>a+c||s<e-c&&s<n-c&&s<a-c)return!1;var d=c8(e,t,n,r,a,i,s,u);return d<=c/2}var fh=Math.PI*2;function Dl(e){return e%=fh,e<0&&(e+=fh),e}var ei=Math.PI*2;function q6(e,t,n,r,a,i,l,s,u){if(l===0)return!1;var c=l;s-=e,u-=t;var d=Math.sqrt(s*s+u*u);if(d-c>n||d+c<n)return!1;if(Math.abs(r-a)%ei<1e-4)return!0;if(i){var f=r;r=Dl(a),a=Dl(f)}else r=Dl(r),a=Dl(a);r>a&&(a+=ei);var v=Math.atan2(u,s);return v<0&&(v+=ei),v>=r&&v<=a||v+ei>=r&&v+ei<=a}function lo(e,t,n,r,a,i){if(i>t&&i>r||i<t&&i<r||r===t)return 0;var l=(i-t)/(r-t),s=r<t?1:-1;(l===1||l===0)&&(s=r<t?.5:-.5);var u=l*(n-e)+e;return u===a?1/0:u>a?s:0}var cr=$r.CMD,so=Math.PI*2,Z6=1e-4;function j6(e,t){return Math.abs(e-t)<Z6}var Bt=[-1,-1,-1],dn=[-1,-1];function J6(){var e=dn[0];dn[0]=dn[1],dn[1]=e}function K6(e,t,n,r,a,i,l,s,u,c){if(c>t&&c>r&&c>i&&c>s||c<t&&c<r&&c<i&&c<s)return 0;var d=As(t,r,i,s,c,Bt);if(d===0)return 0;for(var f=0,v=-1,p=void 0,h=void 0,m=0;m<d;m++){var g=Bt[m],y=g===0||g===1?.5:1,x=Et(e,n,a,l,g);x<u||(v<0&&(v=cg(t,r,i,s,dn),dn[1]<dn[0]&&v>1&&J6(),p=Et(t,r,i,s,dn[0]),v>1&&(h=Et(t,r,i,s,dn[1]))),v===2?g<dn[0]?f+=p<t?y:-y:g<dn[1]?f+=h<p?y:-y:f+=s<h?y:-y:g<dn[0]?f+=p<t?y:-y:f+=s<p?y:-y)}return f}function Q6(e,t,n,r,a,i,l,s){if(s>t&&s>r&&s>i||s<t&&s<r&&s<i)return 0;var u=u8(t,r,i,s,Bt);if(u===0)return 0;var c=dg(t,r,i);if(c>=0&&c<=1){for(var d=0,f=Ht(t,r,i,c),v=0;v<u;v++){var p=Bt[v]===0||Bt[v]===1?.5:1,h=Ht(e,n,a,Bt[v]);h<l||(Bt[v]<c?d+=f<t?p:-p:d+=i<f?p:-p)}return d}else{var p=Bt[0]===0||Bt[0]===1?.5:1,h=Ht(e,n,a,Bt[0]);return h<l?0:i<t?p:-p}}function eS(e,t,n,r,a,i,l,s){if(s-=t,s>n||s<-n)return 0;var u=Math.sqrt(n*n-s*s);Bt[0]=-u,Bt[1]=u;var c=Math.abs(r-a);if(c<1e-4)return 0;if(c>=so-1e-4){r=0,a=so;var d=i?1:-1;return l>=Bt[0]+e&&l<=Bt[1]+e?d:0}if(r>a){var f=r;r=a,a=f}r<0&&(r+=so,a+=so);for(var v=0,p=0;p<2;p++){var h=Bt[p];if(h+e>l){var m=Math.atan2(s,h),d=i?1:-1;m<0&&(m=so+m),(m>=r&&m<=a||m+so>=r&&m+so<=a)&&(m>Math.PI/2&&m<Math.PI*1.5&&(d=-d),v+=d)}}return v}function Hg(e,t,n,r,a){for(var i=e.data,l=e.len(),s=0,u=0,c=0,d=0,f=0,v,p,h=0;h<l;){var m=i[h++],g=h===1;switch(m===cr.M&&h>1&&(n||(s+=lo(u,c,d,f,r,a))),g&&(u=i[h],c=i[h+1],d=u,f=c),m){case cr.M:d=i[h++],f=i[h++],u=d,c=f;break;case cr.L:if(n){if(Yo(u,c,i[h],i[h+1],t,r,a))return!0}else s+=lo(u,c,i[h],i[h+1],r,a)||0;u=i[h++],c=i[h++];break;case cr.C:if(n){if(Y6(u,c,i[h++],i[h++],i[h++],i[h++],i[h],i[h+1],t,r,a))return!0}else s+=K6(u,c,i[h++],i[h++],i[h++],i[h++],i[h],i[h+1],r,a)||0;u=i[h++],c=i[h++];break;case cr.Q:if(n){if(X6(u,c,i[h++],i[h++],i[h],i[h+1],t,r,a))return!0}else s+=Q6(u,c,i[h++],i[h++],i[h],i[h+1],r,a)||0;u=i[h++],c=i[h++];break;case cr.A:var y=i[h++],x=i[h++],b=i[h++],S=i[h++],_=i[h++],k=i[h++];h+=1;var w=!!(1-i[h++]);v=Math.cos(_)*b+y,p=Math.sin(_)*S+x,g?(d=v,f=p):s+=lo(u,c,v,p,r,a);var C=(r-y)*S/b+y;if(n){if(q6(y,x,S,_,_+k,w,t,C,a))return!0}else s+=eS(y,x,S,_,_+k,w,C,a);u=Math.cos(_+k)*b+y,c=Math.sin(_+k)*S+x;break;case cr.R:d=u=i[h++],f=c=i[h++];var E=i[h++],L=i[h++];if(v=d+E,p=f+L,n){if(Yo(d,f,v,f,t,r,a)||Yo(v,f,v,p,t,r,a)||Yo(v,p,d,p,t,r,a)||Yo(d,p,d,f,t,r,a))return!0}else s+=lo(v,f,v,p,r,a),s+=lo(d,p,d,f,r,a);break;case cr.Z:if(n){if(Yo(u,c,d,f,t,r,a))return!0}else s+=lo(u,c,d,f,r,a);u=d,c=f;break}}return!n&&!j6(c,f)&&(s+=lo(u,c,d,f,r,a)||0),s!==0}function tS(e,t,n){return Hg(e,0,!1,t,n)}function nS(e,t,n,r){return Hg(e,t,!0,n,r)}var $s=$e({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},To),rS={style:$e({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bu.style)},Nc=Wi.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(u){n.buildPath(u,n.shape)}),a.silent=!0;var i=a.style;for(var l in r)i[l]!==r[l]&&(i[l]=r[l]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s<Nc.length;++s)a[Nc[s]]=this[Nc[s]];a.__dirty|=On}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(n){var r=Fe(n);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<r.length;i++){var l=r[i],s=n[l];l==="style"?this.style?fe(this.style,s):this.useStyle(s):l==="shape"?fe(this.shape,s):e.prototype.attrKV.call(this,l,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var n=this.style.fill;if(n!=="none"){if(_e(n)){var r=Ps(n,0);return r>.5?Zd:r>.2?B8:jd}else if(n)return jd}return Zd},t.prototype.getInsideTextStroke=function(n){var r=this.style.fill;if(_e(r)){var a=this.__zr,i=!!(a&&a.isDarkMode()),l=Ps(n,0)<qd;if(i===l)return r}},t.prototype.buildPath=function(n,r,a){},t.prototype.pathUpdated=function(){this.__dirty&=~ia},t.prototype.getUpdatedPathProxy=function(n){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,n),this.path},t.prototype.createPathProxy=function(){this.path=new $r(!1)},t.prototype.hasStroke=function(){var n=this.style,r=n.stroke;return!(r==null||r==="none"||!(n.lineWidth>0))},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.getBoundingRect=function(){var n=this._rect,r=this.style,a=!n;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var l=this.path;(i||this.__dirty&ia)&&(l.beginPath(),this.buildPath(l,this.shape,!1),this.pathUpdated()),n=l.getBoundingRect()}if(this._rect=n,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=n.clone());if(this.__dirty||a){s.copy(n);var u=r.strokeNoScale?this.getLineScale():1,c=r.lineWidth;if(!this.hasFill()){var d=this.strokeContainThreshold;c=Math.max(c,d??4)}u>1e-10&&(s.width+=c/u,s.height+=c/u,s.x-=c/u/2,s.y-=c/u/2)}return s}return n},t.prototype.contain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect(),l=this.style;if(n=a[0],r=a[1],i.contain(n,r)){var s=this.path;if(this.hasStroke()){var u=l.lineWidth,c=l.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),nS(s,u/c,n,r)))return!0}if(this.hasFill())return tS(s,n,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ia,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(n){return this.animate("shape",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():n==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(n,r){n==="shape"?this.setShape(r):e.prototype.attrKV.call(this,n,r)},t.prototype.setShape=function(n,r){var a=this.shape;return a||(a=this.shape={}),typeof n=="string"?a[n]=r:fe(a,n),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ia)},t.prototype.createStyle=function(n){return du($s,n)},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.shape&&!r.shape&&(r.shape=fe({},this.shape))},t.prototype._applyStateObj=function(n,r,a,i,l,s){e.prototype._applyStateObj.call(this,n,r,a,i,l,s);var u=!(r&&i),c;if(r&&r.shape?l?i?c=r.shape:(c=fe({},a.shape),fe(c,r.shape)):(c=fe({},i?this.shape:a.shape),fe(c,r.shape)):u&&(c=a.shape),c)if(l){this.shape=fe({},this.shape);for(var d={},f=Fe(c),v=0;v<f.length;v++){var p=f[v];typeof c[p]=="object"?this.shape[p]=c[p]:d[p]=c[p]}this._transitionState(n,{shape:d},s)}else this.shape=c,this.dirtyShape()},t.prototype._mergeStates=function(n){for(var r=e.prototype._mergeStates.call(this,n),a,i=0;i<n.length;i++){var l=n[i];l.shape&&(a=a||{},this._mergeStyle(a,l.shape))}return a&&(r.shape=a),r},t.prototype.getAnimationStyleProps=function(){return rS},t.prototype.isZeroArea=function(){return!1},t.extend=function(n){var r=(function(i){me(l,i);function l(s){var u=i.call(this,s)||this;return n.init&&n.init.call(u,s),u}return l.prototype.getDefaultStyle=function(){return Oe(n.style)},l.prototype.getDefaultShape=function(){return Oe(n.shape)},l})(t);for(var a in n)typeof n[a]=="function"&&(r.prototype[a]=n[a]);return r},t.initDefaultProps=(function(){var n=t.prototype;n.type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,n.__dirty=On|yi|ia})(),t})(vl),oS=$e({strokeFirst:!0,font:Pr,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},$s),Xi=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var n=this.style,r=n.stroke;return r!=null&&r!=="none"&&n.lineWidth>0},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.createStyle=function(n){return du(oS,n)},t.prototype.setBoundingRect=function(n){this._rect=n},t.prototype.getBoundingRect=function(){var n=this.style;if(!this._rect){var r=n.text;r!=null?r+="":r="";var a=kg(r,n.font,n.textAlign,n.textBaseline);if(a.x+=n.x||0,a.y+=n.y||0,this.hasStroke()){var i=n.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},t.initDefaultProps=(function(){var n=t.prototype;n.dirtyRectTolerance=10})(),t})(vl);Xi.prototype.type="tspan";var aS=$e({x:0,y:0},To),iS={style:$e({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},bu.style)};function lS(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var In=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(n){return du(aS,n)},t.prototype._getSize=function(n){var r=this.style,a=r[n];if(a!=null)return a;var i=lS(r.image)?r.image:this.__image;if(!i)return 0;var l=n==="width"?"height":"width",s=r[l];return s==null?i[n]:i[n]/i[l]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return iS},t.prototype.getBoundingRect=function(){var n=this.style;return this._rect||(this._rect=new Je(n.x||0,n.y||0,this.getWidth(),this.getHeight())),this._rect},t})(vl);In.prototype.type="image";function sS(e,t){var n=t.x,r=t.y,a=t.width,i=t.height,l=t.r,s,u,c,d;a<0&&(n=n+a,a=-a),i<0&&(r=r+i,i=-i),typeof l=="number"?s=u=c=d=l:l instanceof Array?l.length===1?s=u=c=d=l[0]:l.length===2?(s=c=l[0],u=d=l[1]):l.length===3?(s=l[0],u=d=l[1],c=l[2]):(s=l[0],u=l[1],c=l[2],d=l[3]):s=u=c=d=0;var f;s+u>a&&(f=s+u,s*=a/f,u*=a/f),c+d>a&&(f=c+d,c*=a/f,d*=a/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),s+d>i&&(f=s+d,s*=i/f,d*=i/f),e.moveTo(n+s,r),e.lineTo(n+a-u,r),u!==0&&e.arc(n+a-u,r+u,u,-Math.PI/2,0),e.lineTo(n+a,r+i-c),c!==0&&e.arc(n+a-c,r+i-c,c,0,Math.PI/2),e.lineTo(n+d,r+i),d!==0&&e.arc(n+d,r+i-d,d,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5)}var pa=Math.round;function Gg(e,t,n){if(t){var r=t.x1,a=t.x2,i=t.y1,l=t.y2;e.x1=r,e.x2=a,e.y1=i,e.y2=l;var s=n&&n.lineWidth;return s&&(pa(r*2)===pa(a*2)&&(e.x1=e.x2=_o(r,s,!0)),pa(i*2)===pa(l*2)&&(e.y1=e.y2=_o(i,s,!0))),e}}function Ug(e,t,n){if(t){var r=t.x,a=t.y,i=t.width,l=t.height;e.x=r,e.y=a,e.width=i,e.height=l;var s=n&&n.lineWidth;return s&&(e.x=_o(r,s,!0),e.y=_o(a,s,!0),e.width=Math.max(_o(r+i,s,!1)-e.x,i===0?0:1),e.height=Math.max(_o(a+l,s,!1)-e.y,l===0?0:1)),e}}function _o(e,t,n){if(!t)return e;var r=pa(e*2);return(r+pa(t))%2===0?r/2:(r+(n?1:-1))/2}var uS=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),cS={},bt=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new uS},t.prototype.buildPath=function(n,r){var a,i,l,s;if(this.subPixelOptimize){var u=Ug(cS,r,this.style);a=u.x,i=u.y,l=u.width,s=u.height,u.r=r.r,r=u}else a=r.x,i=r.y,l=r.width,s=r.height;r.r?sS(n,r):n.rect(a,i,l,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(Ue);bt.prototype.type="rect";var vh={fill:"#000"},ph=2,dS={style:$e({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},bu.style)},nn=(function(e){me(t,e);function t(n){var r=e.call(this)||this;return r.type="text",r._children=[],r._defaultStyle=vh,r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var r=this._children[n];r.zlevel=this.zlevel,r.z=this.z,r.z2=this.z2,r.culling=this.culling,r.cursor=this.cursor,r.invisible=this.invisible}},t.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(n){var r=this.innerTransformable;return r?r.getLocalTransform(n):e.prototype.getLocalTransform.call(this,n)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,pS(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(n){e.prototype.addSelfToZr.call(this,n);for(var r=0;r<this._children.length;r++)this._children[r].__zr=n},t.prototype.removeSelfFromZr=function(n){e.prototype.removeSelfFromZr.call(this,n);for(var r=0;r<this._children.length;r++)this._children[r].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var n=new Je(0,0,0,0),r=this._children,a=[],i=null,l=0;l<r.length;l++){var s=r[l],u=s.getBoundingRect(),c=s.getLocalTransform(a);c?(n.copy(u),n.applyTransform(c),i=i||n.clone(),i.union(n)):(i=i||u.clone(),i.union(u))}this._rect=i||n}return this._rect},t.prototype.setDefaultTextStyle=function(n){this._defaultStyle=n||vh},t.prototype.setTextContent=function(n){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(n,r){if(!r)return n;var a=r.rich,i=n.rich||a&&{};return fe(n,r),a&&i?(this._mergeRich(i,a),n.rich=i):i&&(n.rich=i),n},t.prototype._mergeRich=function(n,r){for(var a=Fe(r),i=0;i<a.length;i++){var l=a[i];n[l]=n[l]||{},fe(n[l],r[l])}},t.prototype.getAnimationStyleProps=function(){return dS},t.prototype._getOrCreateChild=function(n){var r=this._children[this._childCursor];return(!r||!(r instanceof n))&&(r=new n),this._children[this._childCursor++]=r,r.__zr=this.__zr,r.parent=this,r},t.prototype._updatePlainTexts=function(){var n=this.style,r=n.font||Pr,a=n.padding,i=bh(n),l=P6(i,n),s=Ic(n),u=!!n.backgroundColor,c=l.outerHeight,d=l.outerWidth,f=l.contentWidth,v=l.lines,p=l.lineHeight,h=this._defaultStyle;this.isTruncated=!!l.isTruncated;var m=n.x||0,g=n.y||0,y=n.align||h.align||"left",x=n.verticalAlign||h.verticalAlign||"top",b=m,S=la(g,l.contentHeight,x);if(s||a){var _=wi(m,d,y),k=la(g,c,x);s&&this._renderBackground(n,n,_,k,d,c)}S+=p/2,a&&(b=wh(m,y,a),x==="top"?S+=a[0]:x==="bottom"&&(S-=a[2]));for(var w=0,C=!1,E=xh("fill"in n?n.fill:(C=!0,h.fill)),L=yh("stroke"in n?n.stroke:!u&&(!h.autoStroke||C)?(w=ph,h.stroke):null),N=n.textShadowBlur>0,T=n.width!=null&&(n.overflow==="truncate"||n.overflow==="break"||n.overflow==="breakAll"),A=l.calculatedLineHeight,I=0;I<v.length;I++){var D=this._getOrCreateChild(Xi),V=D.createStyle();D.useStyle(V),V.text=v[I],V.x=b,V.y=S,V.textAlign=y,V.textBaseline="middle",V.opacity=n.opacity,V.strokeFirst=!0,N&&(V.shadowBlur=n.textShadowBlur||0,V.shadowColor=n.textShadowColor||"transparent",V.shadowOffsetX=n.textShadowOffsetX||0,V.shadowOffsetY=n.textShadowOffsetY||0),V.stroke=L,V.fill=E,L&&(V.lineWidth=n.lineWidth||w,V.lineDash=n.lineDash,V.lineDashOffset=n.lineDashOffset||0),V.font=r,mh(V,n),S+=p,T&&D.setBoundingRect(new Je(wi(V.x,f,V.textAlign),la(V.y,A,V.textBaseline),f,A))}},t.prototype._updateRichTexts=function(){var n=this.style,r=bh(n),a=R6(r,n),i=a.width,l=a.outerWidth,s=a.outerHeight,u=n.padding,c=n.x||0,d=n.y||0,f=this._defaultStyle,v=n.align||f.align,p=n.verticalAlign||f.verticalAlign;this.isTruncated=!!a.isTruncated;var h=wi(c,l,v),m=la(d,s,p),g=h,y=m;u&&(g+=u[3],y+=u[0]);var x=g+i;Ic(n)&&this._renderBackground(n,n,h,m,l,s);for(var b=!!n.backgroundColor,S=0;S<a.lines.length;S++){for(var _=a.lines[S],k=_.tokens,w=k.length,C=_.lineHeight,E=_.width,L=0,N=g,T=x,A=w-1,I=void 0;L<w&&(I=k[L],!I.align||I.align==="left");)this._placeToken(I,n,C,y,N,"left",b),E-=I.width,N+=I.width,L++;for(;A>=0&&(I=k[A],I.align==="right");)this._placeToken(I,n,C,y,T,"right",b),E-=I.width,T-=I.width,A--;for(N+=(i-(N-g)-(x-T)-E)/2;L<=A;)I=k[L],this._placeToken(I,n,C,y,N+I.width/2,"center",b),N+=I.width,L++;y+=C}},t.prototype._placeToken=function(n,r,a,i,l,s,u){var c=r.rich[n.styleName]||{};c.text=n.text;var d=n.verticalAlign,f=i+a/2;d==="top"?f=i+n.height/2:d==="bottom"&&(f=i+a-n.height/2);var v=!n.isLineHolder&&Ic(c);v&&this._renderBackground(c,r,s==="right"?l-n.width:s==="center"?l-n.width/2:l,f-n.height/2,n.width,n.height);var p=!!c.backgroundColor,h=n.textPadding;h&&(l=wh(l,s,h),f-=n.height/2-h[0]-n.innerHeight/2);var m=this._getOrCreateChild(Xi),g=m.createStyle();m.useStyle(g);var y=this._defaultStyle,x=!1,b=0,S=xh("fill"in c?c.fill:"fill"in r?r.fill:(x=!0,y.fill)),_=yh("stroke"in c?c.stroke:"stroke"in r?r.stroke:!p&&!u&&(!y.autoStroke||x)?(b=ph,y.stroke):null),k=c.textShadowBlur>0||r.textShadowBlur>0;g.text=n.text,g.x=l,g.y=f,k&&(g.shadowBlur=c.textShadowBlur||r.textShadowBlur||0,g.shadowColor=c.textShadowColor||r.textShadowColor||"transparent",g.shadowOffsetX=c.textShadowOffsetX||r.textShadowOffsetX||0,g.shadowOffsetY=c.textShadowOffsetY||r.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=n.font||Pr,g.opacity=Eo(c.opacity,r.opacity,1),mh(g,c),_&&(g.lineWidth=Eo(c.lineWidth,r.lineWidth,b),g.lineDash=ke(c.lineDash,r.lineDash),g.lineDashOffset=r.lineDashOffset||0,g.stroke=_),S&&(g.fill=S);var w=n.contentWidth,C=n.contentHeight;m.setBoundingRect(new Je(wi(g.x,w,g.textAlign),la(g.y,C,g.textBaseline),w,C))},t.prototype._renderBackground=function(n,r,a,i,l,s){var u=n.backgroundColor,c=n.borderWidth,d=n.borderColor,f=u&&u.image,v=u&&!f,p=n.borderRadius,h=this,m,g;if(v||n.lineHeight||c&&d){m=this._getOrCreateChild(bt),m.useStyle(m.createStyle()),m.style.fill=null;var y=m.shape;y.x=a,y.y=i,y.width=l,y.height=s,y.r=p,m.dirtyShape()}if(v){var x=m.style;x.fill=u||null,x.fillOpacity=ke(n.fillOpacity,1)}else if(f){g=this._getOrCreateChild(In),g.onload=function(){h.dirtyStyle()};var b=g.style;b.image=u.image,b.x=a,b.y=i,b.width=l,b.height=s}if(c&&d){var x=m.style;x.lineWidth=c,x.stroke=d,x.strokeOpacity=ke(n.strokeOpacity,1),x.lineDash=n.borderDash,x.lineDashOffset=n.borderDashOffset||0,m.strokeContainThreshold=0,m.hasFill()&&m.hasStroke()&&(x.strokeFirst=!0,x.lineWidth*=2)}var S=(m||g).style;S.shadowBlur=n.shadowBlur||0,S.shadowColor=n.shadowColor||"transparent",S.shadowOffsetX=n.shadowOffsetX||0,S.shadowOffsetY=n.shadowOffsetY||0,S.opacity=Eo(n.opacity,r.opacity,1)},t.makeFont=function(n){var r="";return Yg(n)&&(r=[n.fontStyle,n.fontWeight,Wg(n.fontSize),n.fontFamily||"sans-serif"].join(" ")),r&&_r(r)||n.textFont||n.font},t})(vl),fS={left:!0,right:1,center:1},vS={top:1,bottom:1,middle:1},hh=["fontStyle","fontWeight","fontSize","fontFamily"];function Wg(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?ev+"px":e+"px"}function mh(e,t){for(var n=0;n<hh.length;n++){var r=hh[n],a=t[r];a!=null&&(e[r]=a)}}function Yg(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function pS(e){return gh(e),q(e.rich,gh),e}function gh(e){if(e){e.font=nn.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||fS[t]?t:"left";var n=e.verticalAlign;n==="center"&&(n="middle"),e.verticalAlign=n==null||vS[n]?n:"top";var r=e.padding;r&&(e.padding=Q1(e.padding))}}function yh(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function xh(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function wh(e,t,n){return t==="right"?e-n[1]:t==="center"?e+n[3]/2-n[1]/2:e+n[3]}function bh(e){var t=e.text;return t!=null&&(t+=""),t}function Ic(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var tt=_t(),hS=function(e,t,n,r){if(r){var a=tt(r);a.dataIndex=n,a.dataType=t,a.seriesIndex=e,a.ssrType="chart",r.type==="group"&&r.traverse(function(i){var l=tt(i);l.seriesIndex=e,l.dataIndex=n,l.dataType=t,l.ssrType="chart"})}},Sh=1,_h={},Xg=_t(),hv=_t(),mv=0,Su=1,_u=2,xn=["emphasis","blur","select"],Os=["normal","emphasis","blur","select"],mS=10,gS=9,No="highlight",ms="downplay",Vi="select",gs="unselect",Pi="toggleSelect";function Xo(e){return e!=null&&e!=="none"}function ku(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function qg(e){ku(e,"emphasis",_u)}function Zg(e){e.hoverState===_u&&ku(e,"normal",mv)}function gv(e){ku(e,"blur",Su)}function jg(e){e.hoverState===Su&&ku(e,"normal",mv)}function yS(e){e.selected=!0}function xS(e){e.selected=!1}function kh(e,t,n){t(e,n)}function sr(e,t,n){kh(e,t,n),e.isGroup&&e.traverse(function(r){kh(r,t,n)})}function Ch(e,t){switch(t){case"emphasis":e.hoverState=_u;break;case"normal":e.hoverState=mv;break;case"blur":e.hoverState=Su;break;case"select":e.selected=!0}}function wS(e,t,n,r){for(var a=e.style,i={},l=0;l<t.length;l++){var s=t[l],u=a[s];i[s]=u??(r&&r[s])}for(var l=0;l<e.animators.length;l++){var c=e.animators[l];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName==="style"&&c.saveTo(i,t)}return i}function bS(e,t,n,r){var a=n&&et(n,"select")>=0,i=!1;if(e instanceof Ue){var l=Xg(e),s=a&&l.selectFill||l.normalFill,u=a&&l.selectStroke||l.normalStroke;if(Xo(s)||Xo(u)){r=r||{};var c=r.style||{};c.fill==="inherit"?(i=!0,r=fe({},r),c=fe({},c),c.fill=s):!Xo(c.fill)&&Xo(s)?(i=!0,r=fe({},r),c=fe({},c),c.fill=zd(s)):!Xo(c.stroke)&&Xo(u)&&(i||(r=fe({},r),c=fe({},c)),c.stroke=zd(u)),r.style=c}}if(r&&r.z2==null){i||(r=fe({},r));var d=e.z2EmphasisLift;r.z2=e.z2+(d??mS)}return r}function SS(e,t,n){if(n&&n.z2==null){n=fe({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??gS)}return n}function _S(e,t,n){var r=et(e.currentStates,t)>=0,a=e.style.opacity,i=r?null:wS(e,["opacity"],t,{opacity:1});n=n||{};var l=n.style||{};return l.opacity==null&&(n=fe({},n),l=fe({opacity:r?a:i.opacity*.1},l),n.style=l),n}function Lc(e,t){var n=this.states[e];if(this.style){if(e==="emphasis")return bS(this,e,t,n);if(e==="blur")return _S(this,e,n);if(e==="select")return SS(this,e,n)}return n}function kS(e){e.stateProxy=Lc;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Lc),n&&(n.stateProxy=Lc)}function Eh(e,t){!e2(e,t)&&!e.__highByOuter&&sr(e,qg)}function Th(e,t){!e2(e,t)&&!e.__highByOuter&&sr(e,Zg)}function Fs(e,t){e.__highByOuter|=1<<(t||0),sr(e,qg)}function zs(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&sr(e,Zg)}function CS(e){sr(e,gv)}function Jg(e){sr(e,jg)}function Kg(e){sr(e,yS)}function Qg(e){sr(e,xS)}function e2(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function t2(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(a,i){var l=hv(i),s=a==="series",u=s?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!s&&r.push(u),l.isBlured&&(u.group.traverse(function(c){jg(c)}),s&&n.push(i)),l.isBlured=!1}),q(r,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(n,!1,t)})}function af(e,t,n,r){var a=r.getModel();n=n||"coordinateSystem";function i(c,d){for(var f=0;f<d.length;f++){var v=c.getItemGraphicEl(d[f]);v&&Jg(v)}}if(e!=null&&!(!t||t==="none")){var l=a.getSeriesByIndex(e),s=l.coordinateSystem;s&&s.master&&(s=s.master);var u=[];a.eachSeries(function(c){var d=l===c,f=c.coordinateSystem;f&&f.master&&(f=f.master);var v=f&&s?f===s:d;if(!(n==="series"&&!d||n==="coordinateSystem"&&!v||t==="series"&&d)){var p=r.getViewOfSeriesModel(c);if(p.group.traverse(function(g){g.__highByOuter&&d&&t==="self"||gv(g)}),qt(t))i(c.getData(),t);else if(Ce(t))for(var h=Fe(t),m=0;m<h.length;m++)i(c.getData(h[m]),t[h[m]]);u.push(c),hv(c).isBlured=!0}}),a.eachComponent(function(c,d){if(c!=="series"){var f=r.getViewOfComponentModel(d);f&&f.toggleBlurSeries&&f.toggleBlurSeries(u,!0,a)}})}}function lf(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){hv(r).isBlured=!0;var a=n.getViewOfComponentModel(r);!a||!a.focusBlurEnabled||a.group.traverse(function(i){gv(i)})}}}function ES(e,t,n){var r=e.seriesIndex,a=e.getData(t.dataType);if(!a){process.env.NODE_ENV!=="production"&&Vt("Unknown dataType "+t.dataType);return}var i=Ta(a,t);i=(we(i)?i[0]:i)||0;var l=a.getItemGraphicEl(i);if(!l)for(var s=a.count(),u=0;!l&&u<s;)l=a.getItemGraphicEl(u++);if(l){var c=tt(l);af(r,c.focus,c.blurScope,n)}else{var d=e.get(["emphasis","focus"]),f=e.get(["emphasis","blurScope"]);d!=null&&af(r,d,f,n)}}function yv(e,t,n,r){var a={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||n==null)return a;var i=r.getModel().getComponent(e,t);if(!i)return a;var l=r.getViewOfComponentModel(i);if(!l||!l.findHighDownDispatchers)return a;for(var s=l.findHighDownDispatchers(n),u,c=0;c<s.length;c++)if(process.env.NODE_ENV!=="production"&&!La(s[c])&&Vt("param should be highDownDispatcher"),tt(s[c]).focus==="self"){u=!0;break}return{focusSelf:u,dispatchers:s}}function TS(e,t,n){process.env.NODE_ENV!=="production"&&!La(e)&&Vt("param should be highDownDispatcher");var r=tt(e),a=yv(r.componentMainType,r.componentIndex,r.componentHighDownName,n),i=a.dispatchers,l=a.focusSelf;i?(l&&lf(r.componentMainType,r.componentIndex,n),q(i,function(s){return Eh(s,t)})):(af(r.seriesIndex,r.focus,r.blurScope,n),r.focus==="self"&&lf(r.componentMainType,r.componentIndex,n),Eh(e,t))}function NS(e,t,n){process.env.NODE_ENV!=="production"&&!La(e)&&Vt("param should be highDownDispatcher"),t2(n);var r=tt(e),a=yv(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;a?q(a,function(i){return Th(i,t)}):Th(e,t)}function IS(e,t,n){if(uf(t)){var r=t.dataType,a=e.getData(r),i=Ta(a,t);we(i)||(i=[i]),e[t.type===Pi?"toggleSelect":t.type===Vi?"select":"unselect"](i,r)}}function Nh(e){var t=e.getAllData();q(t,function(n){var r=n.data,a=n.type;r.eachItemGraphicEl(function(i,l){e.isSelected(l,a)?Kg(i):Qg(i)})})}function LS(e){var t=[];return e.eachSeries(function(n){var r=n.getAllData();q(r,function(a){a.data;var i=a.type,l=n.getSelectedDataIndices();if(l.length>0){var s={dataIndex:l,seriesIndex:n.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function sf(e,t,n){n2(e,!0),sr(e,kS),MS(e,t,n)}function AS(e){n2(e,!1)}function Na(e,t,n,r){r?AS(e):sf(e,t,n)}function MS(e,t,n){var r=tt(e);t!=null?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var Ih=["emphasis","blur","select"],VS={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ia(e,t,n,r){n=n||"itemStyle";for(var a=0;a<Ih.length;a++){var i=Ih[a],l=t.getModel([i,n]),s=e.ensureState(i);s.style=l[VS[n]]()}}function n2(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function La(e){return!!(e&&e.__highDownDispatcher)}function PS(e){var t=_h[e];return t==null&&Sh<=32&&(t=_h[e]=Sh++),t}function uf(e){var t=e.type;return t===Vi||t===gs||t===Pi}function Lh(e){var t=e.type;return t===No||t===ms}function DS(e){var t=Xg(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var qo=$r.CMD,BS=[[],[],[]],Ah=Math.sqrt,RS=Math.atan2;function $S(e,t){if(t){var n=e.data,r=e.len(),a,i,l,s,u,c,d=qo.M,f=qo.C,v=qo.L,p=qo.R,h=qo.A,m=qo.Q;for(l=0,s=0;l<r;){switch(a=n[l++],s=l,i=0,a){case d:i=1;break;case v:i=1;break;case f:i=3;break;case m:i=2;break;case h:var g=t[4],y=t[5],x=Ah(t[0]*t[0]+t[1]*t[1]),b=Ah(t[2]*t[2]+t[3]*t[3]),S=RS(-t[1]/b,t[0]/x);n[l]*=x,n[l++]+=g,n[l]*=b,n[l++]+=y,n[l++]*=x,n[l++]*=b,n[l++]+=S,n[l++]+=S,l+=2,s=l;break;case p:c[0]=n[l++],c[1]=n[l++],yn(c,c,t),n[s++]=c[0],n[s++]=c[1],c[0]+=n[l++],c[1]+=n[l++],yn(c,c,t),n[s++]=c[0],n[s++]=c[1]}for(u=0;u<i;u++){var _=BS[u];_[0]=n[l++],_[1]=n[l++],yn(_,_,t),n[s++]=_[0],n[s++]=_[1]}}e.increaseVersion()}}var Ac=Math.sqrt,Bl=Math.sin,Rl=Math.cos,ti=Math.PI;function Mh(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function cf(e,t){return(e[0]*t[0]+e[1]*t[1])/(Mh(e)*Mh(t))}function Vh(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(cf(e,t))}function Ph(e,t,n,r,a,i,l,s,u,c,d){var f=u*(ti/180),v=Rl(f)*(e-n)/2+Bl(f)*(t-r)/2,p=-1*Bl(f)*(e-n)/2+Rl(f)*(t-r)/2,h=v*v/(l*l)+p*p/(s*s);h>1&&(l*=Ac(h),s*=Ac(h));var m=(a===i?-1:1)*Ac((l*l*(s*s)-l*l*(p*p)-s*s*(v*v))/(l*l*(p*p)+s*s*(v*v)))||0,g=m*l*p/s,y=m*-s*v/l,x=(e+n)/2+Rl(f)*g-Bl(f)*y,b=(t+r)/2+Bl(f)*g+Rl(f)*y,S=Vh([1,0],[(v-g)/l,(p-y)/s]),_=[(v-g)/l,(p-y)/s],k=[(-1*v-g)/l,(-1*p-y)/s],w=Vh(_,k);if(cf(_,k)<=-1&&(w=ti),cf(_,k)>=1&&(w=0),w<0){var C=Math.round(w/ti*1e6)/1e6;w=ti*2+C%2*ti}d.addData(c,x,b,l,s,S,w,f,i)}var OS=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,FS=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function zS(e){var t=new $r;if(!e)return t;var n=0,r=0,a=n,i=r,l,s=$r.CMD,u=e.match(OS);if(!u)return t;for(var c=0;c<u.length;c++){for(var d=u[c],f=d.charAt(0),v=void 0,p=d.match(FS)||[],h=p.length,m=0;m<h;m++)p[m]=parseFloat(p[m]);for(var g=0;g<h;){var y=void 0,x=void 0,b=void 0,S=void 0,_=void 0,k=void 0,w=void 0,C=n,E=r,L=void 0,N=void 0;switch(f){case"l":n+=p[g++],r+=p[g++],v=s.L,t.addData(v,n,r);break;case"L":n=p[g++],r=p[g++],v=s.L,t.addData(v,n,r);break;case"m":n+=p[g++],r+=p[g++],v=s.M,t.addData(v,n,r),a=n,i=r,f="l";break;case"M":n=p[g++],r=p[g++],v=s.M,t.addData(v,n,r),a=n,i=r,f="L";break;case"h":n+=p[g++],v=s.L,t.addData(v,n,r);break;case"H":n=p[g++],v=s.L,t.addData(v,n,r);break;case"v":r+=p[g++],v=s.L,t.addData(v,n,r);break;case"V":r=p[g++],v=s.L,t.addData(v,n,r);break;case"C":v=s.C,t.addData(v,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case"c":v=s.C,t.addData(v,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case"S":y=n,x=r,L=t.len(),N=t.data,l===s.C&&(y+=n-N[L-4],x+=r-N[L-3]),v=s.C,C=p[g++],E=p[g++],n=p[g++],r=p[g++],t.addData(v,y,x,C,E,n,r);break;case"s":y=n,x=r,L=t.len(),N=t.data,l===s.C&&(y+=n-N[L-4],x+=r-N[L-3]),v=s.C,C=n+p[g++],E=r+p[g++],n+=p[g++],r+=p[g++],t.addData(v,y,x,C,E,n,r);break;case"Q":C=p[g++],E=p[g++],n=p[g++],r=p[g++],v=s.Q,t.addData(v,C,E,n,r);break;case"q":C=p[g++]+n,E=p[g++]+r,n+=p[g++],r+=p[g++],v=s.Q,t.addData(v,C,E,n,r);break;case"T":y=n,x=r,L=t.len(),N=t.data,l===s.Q&&(y+=n-N[L-4],x+=r-N[L-3]),n=p[g++],r=p[g++],v=s.Q,t.addData(v,y,x,n,r);break;case"t":y=n,x=r,L=t.len(),N=t.data,l===s.Q&&(y+=n-N[L-4],x+=r-N[L-3]),n+=p[g++],r+=p[g++],v=s.Q,t.addData(v,y,x,n,r);break;case"A":b=p[g++],S=p[g++],_=p[g++],k=p[g++],w=p[g++],C=n,E=r,n=p[g++],r=p[g++],v=s.A,Ph(C,E,n,r,k,w,b,S,_,v,t);break;case"a":b=p[g++],S=p[g++],_=p[g++],k=p[g++],w=p[g++],C=n,E=r,n+=p[g++],r+=p[g++],v=s.A,Ph(C,E,n,r,k,w,b,S,_,v,t);break}}(f==="z"||f==="Z")&&(v=s.Z,t.addData(v),n=a,r=i),l=v}return t.toStatic(),t}var r2=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(n){},t})(Ue);function o2(e){return e.setData!=null}function a2(e,t){var n=zS(e),r=fe({},t);return r.buildPath=function(a){if(o2(a)){a.setData(n.data);var i=a.getContext();i&&a.rebuildPath(i,1)}else{var i=a;n.rebuildPath(i,1)}},r.applyTransform=function(a){$S(n,a),this.dirtyShape()},r}function HS(e,t){return new r2(a2(e,t))}function GS(e,t){var n=a2(e,t),r=(function(a){me(i,a);function i(l){var s=a.call(this,l)||this;return s.applyTransform=n.applyTransform,s.buildPath=n.buildPath,s}return i})(r2);return r}function US(e,t){for(var n=[],r=e.length,a=0;a<r;a++){var i=e[a];n.push(i.getUpdatedPathProxy(!0))}var l=new Ue(t);return l.createPathProxy(),l.buildPath=function(s){if(o2(s)){s.appendPath(n);var u=s.getContext();u&&s.rebuildPath(u,1)}},l}var WS=(function(){function e(){this.cx=0,this.cy=0,this.r=0}return e})(),pl=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new WS},t.prototype.buildPath=function(n,r){n.moveTo(r.cx+r.r,r.cy),n.arc(r.cx,r.cy,r.r,0,Math.PI*2)},t})(Ue);pl.prototype.type="circle";var YS=(function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e})(),xv=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new YS},t.prototype.buildPath=function(n,r){var a=.5522848,i=r.cx,l=r.cy,s=r.rx,u=r.ry,c=s*a,d=u*a;n.moveTo(i-s,l),n.bezierCurveTo(i-s,l-d,i-c,l-u,i,l-u),n.bezierCurveTo(i+c,l-u,i+s,l-d,i+s,l),n.bezierCurveTo(i+s,l+d,i+c,l+u,i,l+u),n.bezierCurveTo(i-c,l+u,i-s,l+d,i-s,l),n.closePath()},t})(Ue);xv.prototype.type="ellipse";var i2=Math.PI,Mc=i2*2,uo=Math.sin,Zo=Math.cos,XS=Math.acos,Nt=Math.atan2,Dh=Math.abs,Di=Math.sqrt,Si=Math.max,Bn=Math.min,_n=1e-4;function qS(e,t,n,r,a,i,l,s){var u=n-e,c=r-t,d=l-a,f=s-i,v=f*u-d*c;if(!(v*v<_n))return v=(d*(t-i)-f*(e-a))/v,[e+v*u,t+v*c]}function $l(e,t,n,r,a,i,l){var s=e-n,u=t-r,c=(l?i:-i)/Di(s*s+u*u),d=c*u,f=-c*s,v=e+d,p=t+f,h=n+d,m=r+f,g=(v+h)/2,y=(p+m)/2,x=h-v,b=m-p,S=x*x+b*b,_=a-i,k=v*m-h*p,w=(b<0?-1:1)*Di(Si(0,_*_*S-k*k)),C=(k*b-x*w)/S,E=(-k*x-b*w)/S,L=(k*b+x*w)/S,N=(-k*x+b*w)/S,T=C-g,A=E-y,I=L-g,D=N-y;return T*T+A*A>I*I+D*D&&(C=L,E=N),{cx:C,cy:E,x0:-d,y0:-f,x1:C*(a/_-1),y1:E*(a/_-1)}}function ZS(e){var t;if(we(e)){var n=e.length;if(!n)return e;n===1?t=[e[0],e[0],0,0]:n===2?t=[e[0],e[0],e[1],e[1]]:n===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function jS(e,t){var n,r=Si(t.r,0),a=Si(t.r0||0,0),i=r>0,l=a>0;if(!(!i&&!l)){if(i||(r=a,a=0),a>r){var s=r;r=a,a=s}var u=t.startAngle,c=t.endAngle;if(!(isNaN(u)||isNaN(c))){var d=t.cx,f=t.cy,v=!!t.clockwise,p=Dh(c-u),h=p>Mc&&p%Mc;if(h>_n&&(p=h),!(r>_n))e.moveTo(d,f);else if(p>Mc-_n)e.moveTo(d+r*Zo(u),f+r*uo(u)),e.arc(d,f,r,u,c,!v),a>_n&&(e.moveTo(d+a*Zo(c),f+a*uo(c)),e.arc(d,f,a,c,u,v));else{var m=void 0,g=void 0,y=void 0,x=void 0,b=void 0,S=void 0,_=void 0,k=void 0,w=void 0,C=void 0,E=void 0,L=void 0,N=void 0,T=void 0,A=void 0,I=void 0,D=r*Zo(u),V=r*uo(u),B=a*Zo(c),R=a*uo(c),F=p>_n;if(F){var W=t.cornerRadius;W&&(n=ZS(W),m=n[0],g=n[1],y=n[2],x=n[3]);var O=Dh(r-a)/2;if(b=Bn(O,y),S=Bn(O,x),_=Bn(O,m),k=Bn(O,g),E=w=Si(b,S),L=C=Si(_,k),(w>_n||C>_n)&&(N=r*Zo(c),T=r*uo(c),A=a*Zo(u),I=a*uo(u),p<i2)){var P=qS(D,V,A,I,N,T,B,R);if(P){var $=D-P[0],z=V-P[1],Z=N-P[0],Q=T-P[1],J=1/uo(XS(($*Z+z*Q)/(Di($*$+z*z)*Di(Z*Z+Q*Q)))/2),U=Di(P[0]*P[0]+P[1]*P[1]);E=Bn(w,(r-U)/(J+1)),L=Bn(C,(a-U)/(J-1))}}}if(!F)e.moveTo(d+D,f+V);else if(E>_n){var ne=Bn(y,E),K=Bn(x,E),H=$l(A,I,D,V,r,ne,v),M=$l(N,T,B,R,r,K,v);e.moveTo(d+H.cx+H.x0,f+H.cy+H.y0),E<w&&ne===K?e.arc(d+H.cx,f+H.cy,E,Nt(H.y0,H.x0),Nt(M.y0,M.x0),!v):(ne>0&&e.arc(d+H.cx,f+H.cy,ne,Nt(H.y0,H.x0),Nt(H.y1,H.x1),!v),e.arc(d,f,r,Nt(H.cy+H.y1,H.cx+H.x1),Nt(M.cy+M.y1,M.cx+M.x1),!v),K>0&&e.arc(d+M.cx,f+M.cy,K,Nt(M.y1,M.x1),Nt(M.y0,M.x0),!v))}else e.moveTo(d+D,f+V),e.arc(d,f,r,u,c,!v);if(!(a>_n)||!F)e.lineTo(d+B,f+R);else if(L>_n){var ne=Bn(m,L),K=Bn(g,L),H=$l(B,R,N,T,a,-K,v),M=$l(D,V,A,I,a,-ne,v);e.lineTo(d+H.cx+H.x0,f+H.cy+H.y0),L<C&&ne===K?e.arc(d+H.cx,f+H.cy,L,Nt(H.y0,H.x0),Nt(M.y0,M.x0),!v):(K>0&&e.arc(d+H.cx,f+H.cy,K,Nt(H.y0,H.x0),Nt(H.y1,H.x1),!v),e.arc(d,f,a,Nt(H.cy+H.y1,H.cx+H.x1),Nt(M.cy+M.y1,M.cx+M.x1),v),ne>0&&e.arc(d+M.cx,f+M.cy,ne,Nt(M.y1,M.x1),Nt(M.y0,M.x0),!v))}else e.lineTo(d+B,f+R),e.arc(d,f,a,c,u,v)}e.closePath()}}}var JS=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e})(),Wr=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new JS},t.prototype.buildPath=function(n,r){jS(n,r)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(Ue);Wr.prototype.type="sector";var KS=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),Cu=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new KS},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,l=Math.PI*2;n.moveTo(a+r.r,i),n.arc(a,i,r.r,0,l,!1),n.moveTo(a+r.r0,i),n.arc(a,i,r.r0,0,l,!0)},t})(Ue);Cu.prototype.type="ring";function QS(e,t,n,r){var a=[],i=[],l=[],s=[],u,c,d,f;if(r){d=[1/0,1/0],f=[-1/0,-1/0];for(var v=0,p=e.length;v<p;v++)da(d,d,e[v]),fa(f,f,e[v]);da(d,d,r[0]),fa(f,f,r[1])}for(var v=0,p=e.length;v<p;v++){var h=e[v];if(n)u=e[v?v-1:p-1],c=e[(v+1)%p];else if(v===0||v===p-1){a.push(Tb(e[v]));continue}else u=e[v-1],c=e[v+1];Nb(i,c,u),ju(i,i,t);var m=Pd(h,u),g=Pd(h,c),y=m+g;y!==0&&(m/=y,g/=y),ju(l,i,-m),ju(s,i,g);var x=_p([],h,l),b=_p([],h,s);r&&(fa(x,x,d),da(x,x,f),fa(b,b,d),da(b,b,f)),a.push(x),a.push(b)}return n&&a.push(a.shift()),a}function l2(e,t,n){var r=t.smooth,a=t.points;if(a&&a.length>=2){if(r){var i=QS(a,r,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var l=a.length,s=0;s<(n?l:l-1);s++){var u=i[s*2],c=i[s*2+1],d=a[(s+1)%l];e.bezierCurveTo(u[0],u[1],c[0],c[1],d[0],d[1])}}else{e.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s<f;s++)e.lineTo(a[s][0],a[s][1])}n&&e.closePath()}}var e_=(function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e})(),hl=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new e_},t.prototype.buildPath=function(n,r){l2(n,r,!0)},t})(Ue);hl.prototype.type="polygon";var t_=(function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e})(),Do=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new t_},t.prototype.buildPath=function(n,r){l2(n,r,!1)},t})(Ue);Do.prototype.type="polyline";var n_={},r_=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})(),Or=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new r_},t.prototype.buildPath=function(n,r){var a,i,l,s;if(this.subPixelOptimize){var u=Gg(n_,r,this.style);a=u.x1,i=u.y1,l=u.x2,s=u.y2}else a=r.x1,i=r.y1,l=r.x2,s=r.y2;var c=r.percent;c!==0&&(n.moveTo(a,i),c<1&&(l=a*(1-c)+l*c,s=i*(1-c)+s*c),n.lineTo(l,s))},t.prototype.pointAt=function(n){var r=this.shape;return[r.x1*(1-n)+r.x2*n,r.y1*(1-n)+r.y2*n]},t})(Ue);Or.prototype.type="line";var Ft=[],o_=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e})();function Bh(e,t,n){var r=e.cpx2,a=e.cpy2;return r!=null||a!=null?[(n?Pp:Et)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Pp:Et)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Dp:Ht)(e.x1,e.cpx1,e.x2,t),(n?Dp:Ht)(e.y1,e.cpy1,e.y2,t)]}var wv=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new o_},t.prototype.buildPath=function(n,r){var a=r.x1,i=r.y1,l=r.x2,s=r.y2,u=r.cpx1,c=r.cpy1,d=r.cpx2,f=r.cpy2,v=r.percent;v!==0&&(n.moveTo(a,i),d==null||f==null?(v<1&&(Vs(a,u,l,v,Ft),u=Ft[1],l=Ft[2],Vs(i,c,s,v,Ft),c=Ft[1],s=Ft[2]),n.quadraticCurveTo(u,c,l,s)):(v<1&&(Ms(a,u,d,l,v,Ft),u=Ft[1],d=Ft[2],l=Ft[3],Ms(i,c,f,s,v,Ft),c=Ft[1],f=Ft[2],s=Ft[3]),n.bezierCurveTo(u,c,d,f,l,s)))},t.prototype.pointAt=function(n){return Bh(this.shape,n,!1)},t.prototype.tangentAt=function(n){var r=Bh(this.shape,n,!0);return Ab(r,r)},t})(Ue);wv.prototype.type="bezier-curve";var a_=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),Eu=(function(e){me(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new a_},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,l=Math.max(r.r,0),s=r.startAngle,u=r.endAngle,c=r.clockwise,d=Math.cos(s),f=Math.sin(s);n.moveTo(d*l+a,f*l+i),n.arc(a,i,l,s,u,!c)},t})(Ue);Eu.prototype.type="arc";var s2=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="compound",n}return t.prototype._updatePathDirty=function(){for(var n=this.shape.paths,r=this.shapeChanged(),a=0;a<n.length;a++)r=r||n[a].shapeChanged();r&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var n=this.shape.paths||[],r=this.getGlobalScale(),a=0;a<n.length;a++)n[a].path||n[a].createPathProxy(),n[a].path.setScale(r[0],r[1],n[a].segmentIgnoreThreshold)},t.prototype.buildPath=function(n,r){for(var a=r.paths||[],i=0;i<a.length;i++)a[i].buildPath(n,a[i].shape,!0)},t.prototype.afterBrush=function(){for(var n=this.shape.paths||[],r=0;r<n.length;r++)n[r].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ue.prototype.getBoundingRect.call(this)},t})(Ue),u2=(function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,n){this.colorStops.push({offset:t,color:n})},e})(),c2=(function(e){me(t,e);function t(n,r,a,i,l,s){var u=e.call(this,l)||this;return u.x=n??0,u.y=r??0,u.x2=a??1,u.y2=i??0,u.type="linear",u.global=s||!1,u}return t})(u2),i_=(function(e){me(t,e);function t(n,r,a,i,l){var s=e.call(this,i)||this;return s.x=n??.5,s.y=r??.5,s.r=a??.5,s.type="radial",s.global=l||!1,s}return t})(u2),co=[0,0],fo=[0,0],Ol=new Le,Fl=new Le,Hs=(function(){function e(t,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var r=0;r<4;r++)this._corners[r]=new Le;for(var r=0;r<2;r++)this._axes[r]=new Le;t&&this.fromBoundingRect(t,n)}return e.prototype.fromBoundingRect=function(t,n){var r=this._corners,a=this._axes,i=t.x,l=t.y,s=i+t.width,u=l+t.height;if(r[0].set(i,l),r[1].set(s,l),r[2].set(s,u),r[3].set(i,u),n)for(var c=0;c<4;c++)r[c].transform(n);Le.sub(a[0],r[1],r[0]),Le.sub(a[1],r[3],r[0]),a[0].normalize(),a[1].normalize();for(var c=0;c<2;c++)this._origin[c]=a[c].dot(r[0])},e.prototype.intersect=function(t,n){var r=!0,a=!n;return Ol.set(1/0,1/0),Fl.set(0,0),!this._intersectCheckOneSide(this,t,Ol,Fl,a,1)&&(r=!1,a)||!this._intersectCheckOneSide(t,this,Ol,Fl,a,-1)&&(r=!1,a)||a||Le.copy(n,r?Ol:Fl),r},e.prototype._intersectCheckOneSide=function(t,n,r,a,i,l){for(var s=!0,u=0;u<2;u++){var c=this._axes[u];if(this._getProjMinMaxOnAxis(u,t._corners,co),this._getProjMinMaxOnAxis(u,n._corners,fo),co[1]<fo[0]||co[0]>fo[1]){if(s=!1,i)return s;var d=Math.abs(fo[0]-co[1]),f=Math.abs(co[0]-fo[1]);Math.min(d,f)>a.len()&&(d<f?Le.scale(a,c,-d*l):Le.scale(a,c,f*l))}else if(r){var d=Math.abs(fo[0]-co[1]),f=Math.abs(co[0]-fo[1]);Math.min(d,f)<r.len()&&(d<f?Le.scale(r,c,d*l):Le.scale(r,c,-f*l))}}return s},e.prototype._getProjMinMaxOnAxis=function(t,n,r){for(var a=this._axes[t],i=this._origin,l=n[0].dot(a)+i[t],s=l,u=l,c=1;c<n.length;c++){var d=n[c].dot(a)+i[t];s=Math.min(d,s),u=Math.max(d,u)}r[0]=s,r[1]=u},e})(),l_=[],s_=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.notClear=!0,n.incremental=!0,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return t.prototype.traverse=function(n,r){n.call(r,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(n,r){r?this._temporaryDisplayables.push(n):this._displayables.push(n),this.markRedraw()},t.prototype.addDisplayables=function(n,r){r=r||!1;for(var a=0;a<n.length;a++)this.addDisplayable(n[a],r)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(n){for(var r=this._cursor;r<this._displayables.length;r++)n&&n(this._displayables[r]);for(var r=0;r<this._temporaryDisplayables.length;r++)n&&n(this._temporaryDisplayables[r])},t.prototype.update=function(){this.updateTransform();for(var n=this._cursor;n<this._displayables.length;n++){var r=this._displayables[n];r.parent=this,r.update(),r.parent=null}for(var n=0;n<this._temporaryDisplayables.length;n++){var r=this._temporaryDisplayables[n];r.parent=this,r.update(),r.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var n=new Je(1/0,1/0,-1/0,-1/0),r=0;r<this._displayables.length;r++){var a=this._displayables[r],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(l_)),n.union(i)}this._rect=n}return this._rect},t.prototype.contain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var l=0;l<this._displayables.length;l++){var s=this._displayables[l];if(s.contain(n,r))return!0}return!1},t})(vl),u_=_t();function c_(e,t,n,r,a){var i;if(t&&t.ecModel){var l=t.ecModel.getUpdatePayload();i=l&&l.animation}var s=t&&t.isAnimationEnabled(),u=e==="update";if(s){var c=void 0,d=void 0,f=void 0;r?(c=ke(r.duration,200),d=ke(r.easing,"cubicOut"),f=0):(c=t.getShallow(u?"animationDurationUpdate":"animationDuration"),d=t.getShallow(u?"animationEasingUpdate":"animationEasing"),f=t.getShallow(u?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(c=i.duration),i.easing!=null&&(d=i.easing),i.delay!=null&&(f=i.delay)),Ae(f)&&(f=f(n,a)),Ae(c)&&(c=c(n));var v={duration:c||0,delay:f,easing:d};return v}else return null}function bv(e,t,n,r,a,i,l){var s=!1,u;Ae(a)?(l=i,i=a,a=null):Ce(a)&&(i=a.cb,l=a.during,s=a.isFrom,u=a.removeOpt,a=a.dataIndex);var c=e==="leave";c||t.stopAnimation("leave");var d=c_(e,r,a,c?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,a):null);if(d&&d.duration>0){var f=d.duration,v=d.delay,p=d.easing,h={duration:f,delay:v||0,easing:p,done:i,force:!!i||!!l,setToFinal:!c,scope:e,during:l};s?t.animateFrom(n,h):t.animateTo(n,h)}else t.stopAnimation(),!s&&t.attr(n),l&&l(1),i&&i()}function Pt(e,t,n,r,a,i){bv("update",e,t,n,r,a,i)}function Yt(e,t,n,r,a,i){bv("enter",e,t,n,r,a,i)}function Bi(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var n=e.animators[t];if(n.scope==="leave")return!0}return!1}function Gs(e,t,n,r,a,i){Bi(e)||bv("leave",e,t,n,r,a,i)}function Rh(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Gs(e,{style:{opacity:0}},t,n,r)}function Us(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(a){a.isGroup||Rh(a,t,n,r)}):Rh(e,t,n,r)}function qi(e){u_(e).oldStyle=e.style}var Ws=Math.max,Ys=Math.min,df={};function d_(e){return Ue.extend(e)}var f_=GS;function v_(e,t){return f_(e,t)}function Ln(e,t){df[e]=t}function p_(e){if(df.hasOwnProperty(e))return df[e]}function Sv(e,t,n,r){var a=HS(e,t);return n&&(r==="center"&&(n=f2(n,a.getBoundingRect())),v2(a,n)),a}function d2(e,t,n){var r=new In({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(a){if(n==="center"){var i={width:a.width,height:a.height};r.setStyle(f2(t,i))}}});return r}function f2(e,t){var n=t.width/t.height,r=e.height*n,a;r<=e.width?a=e.height:(r=e.width,a=r/n);var i=e.x+e.width/2,l=e.y+e.height/2;return{x:i-r/2,y:l-a/2,width:r,height:a}}var ff=US;function v2(e,t){if(e.applyTransform){var n=e.getBoundingRect(),r=n.calculateTransform(t);e.applyTransform(r)}}function Zi(e,t){return Gg(e,e,{lineWidth:t}),e}function h_(e){return Ug(e.shape,e.shape,e.style),e}var m_=_o;function g_(e,t){for(var n=iv([]);e&&e!==t;)ya(n,e.getLocalTransform(),n),e=e.parent;return n}function p2(e,t,n){return t&&!qt(t)&&(t=dv.getLocalTransform(t)),n&&(t=lv([],t)),yn([],e,t)}function y_(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),a=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),i=[e==="left"?-r:e==="right"?r:0,e==="top"?-a:e==="bottom"?a:0];return i=p2(i,t,n),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function $h(e){return!e.isGroup}function x_(e){return e.shape!=null}function h2(e,t,n){if(!e||!t)return;function r(l){var s={};return l.traverse(function(u){$h(u)&&u.anid&&(s[u.anid]=u)}),s}function a(l){var s={x:l.x,y:l.y,rotation:l.rotation};return x_(l)&&(s.shape=fe({},l.shape)),s}var i=r(e);t.traverse(function(l){if($h(l)&&l.anid){var s=i[l.anid];if(s){var u=a(l);l.attr(a(s)),Pt(l,u,n,tt(l).dataIndex)}}})}function w_(e,t){return ge(e,function(n){var r=n[0];r=Ws(r,t.x),r=Ys(r,t.x+t.width);var a=n[1];return a=Ws(a,t.y),a=Ys(a,t.y+t.height),[r,a]})}function b_(e,t){var n=Ws(e.x,t.x),r=Ys(e.x+e.width,t.x+t.width),a=Ws(e.y,t.y),i=Ys(e.y+e.height,t.y+t.height);if(r>=n&&i>=a)return{x:n,y:a,width:r-n,height:i-a}}function m2(e,t,n){var r=fe({rectHover:!0},t),a=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(a.image=e.slice(8),$e(a,n),new In(r)):Sv(e.replace("path://",""),r,n,"center")}function S_(e,t,n,r,a){for(var i=0,l=a[a.length-1];i<a.length;i++){var s=a[i];if(g2(e,t,n,r,s[0],s[1],l[0],l[1]))return!0;l=s}}function g2(e,t,n,r,a,i,l,s){var u=n-e,c=r-t,d=l-a,f=s-i,v=Vc(d,f,u,c);if(__(v))return!1;var p=e-a,h=t-i,m=Vc(p,h,u,c)/v;if(m<0||m>1)return!1;var g=Vc(p,h,d,f)/v;return!(g<0||g>1)}function Vc(e,t,n,r){return e*r-n*t}function __(e){return e<=1e-6&&e>=-1e-6}function Tu(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,a=_e(t)?{formatter:t}:t,i=n.mainType,l=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=l;var u=e.formatterParamsExtra;u&&q(Fe(u),function(d){Ca(s,d)||(s[d]=u[d],s.$vars.push(d))});var c=tt(e.el);c.componentMainType=i,c.componentIndex=l,c.tooltipConfig={name:r,option:$e({content:r,encodeHTMLContent:!0,formatterParams:s},a)}}function Oh(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Nu(e,t){if(e)if(we(e))for(var n=0;n<e.length;n++)Oh(e[n],t);else Oh(e,t)}Ln("circle",pl);Ln("ellipse",xv);Ln("sector",Wr);Ln("ring",Cu);Ln("polygon",hl);Ln("polyline",Do);Ln("rect",bt);Ln("line",Or);Ln("bezierCurve",wv);Ln("arc",Eu);const k_=Object.freeze(Object.defineProperty({__proto__:null,Arc:Eu,BezierCurve:wv,BoundingRect:Je,Circle:pl,CompoundPath:s2,Ellipse:xv,Group:yt,Image:In,IncrementalDisplayable:s_,Line:Or,LinearGradient:c2,OrientedBoundingRect:Hs,Path:Ue,Point:Le,Polygon:hl,Polyline:Do,RadialGradient:i_,Rect:bt,Ring:Cu,Sector:Wr,Text:nn,applyTransform:p2,clipPointsByRect:w_,clipRectByRect:b_,createIcon:m2,extendPath:v_,extendShape:d_,getShapeClass:p_,getTransform:g_,groupTransition:h2,initProps:Yt,isElementRemoved:Bi,lineLineIntersect:g2,linePolygonIntersect:S_,makeImage:d2,makePath:Sv,mergePath:ff,registerShape:Ln,removeElement:Gs,removeElementWithFadeOut:Us,resizePath:v2,setTooltipConfig:Tu,subPixelOptimize:m_,subPixelOptimizeLine:Zi,subPixelOptimizeRect:h_,transformDirection:y_,traverseElements:Nu,updateProps:Pt},Symbol.toStringTag,{value:"Module"}));var Iu={};function C_(e,t){for(var n=0;n<xn.length;n++){var r=xn[n],a=t[r],i=e.ensureState(r);i.style=i.style||{},i.style.text=a}var l=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(l,!0)}function Fh(e,t,n){var r=e.labelFetcher,a=e.labelDataIndex,i=e.labelDimIndex,l=t.normal,s;r&&(s=r.getFormattedLabel(a,"normal",null,i,l&&l.get("formatter"),n!=null?{interpolatedValue:n}:null)),s==null&&(s=Ae(e.defaultText)?e.defaultText(a,e,n):e.defaultText);for(var u={normal:s},c=0;c<xn.length;c++){var d=xn[c],f=t[d];u[d]=ke(r?r.getFormattedLabel(a,d,null,i,f&&f.get("formatter")):null,s)}return u}function Oa(e,t,n,r){n=n||Iu;for(var a=e instanceof nn,i=!1,l=0;l<Os.length;l++){var s=t[Os[l]];if(s&&s.getShallow("show")){i=!0;break}}var u=a?e:e.getTextContent();if(i){a||(u||(u=new nn,e.setTextContent(u)),e.stateProxy&&(u.stateProxy=e.stateProxy));var c=Fh(n,t),d=t.normal,f=!!d.getShallow("show"),v=ji(d,r&&r.normal,n,!1,!a);v.text=c.normal,a||e.setTextConfig(zh(d,n,!1));for(var l=0;l<xn.length;l++){var p=xn[l],s=t[p];if(s){var h=u.ensureState(p),m=!!ke(s.getShallow("show"),f);if(m!==f&&(h.ignore=!m),h.style=ji(s,r&&r[p],n,!0,!a),h.style.text=c[p],!a){var g=e.ensureState(p);g.textConfig=zh(s,n,!0)}}}u.silent=!!d.getShallow("silent"),u.style.x!=null&&(v.x=u.style.x),u.style.y!=null&&(v.y=u.style.y),u.ignore=!f,u.useStyle(v),u.dirty(),n.enableTextSetter&&(Lu(u).setLabelText=function(y){var x=Fh(n,t,y);C_(u,x)})}else u&&(u.ignore=!0);e.dirty()}function Fa(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<xn.length;r++){var a=xn[r];n[a]=e.getModel([a,t])}return n}function ji(e,t,n,r,a){var i={};return E_(i,e,n,r,a),t&&fe(i,t),i}function zh(e,t,n){t=t||{};var r={},a,i=e.getShallow("rotate"),l=ke(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return a=e.getShallow("position")||(n?null:"inside"),a==="outside"&&(a=t.defaultOutsidePosition||"top"),a!=null&&(r.position=a),s!=null&&(r.offset=s),i!=null&&(i*=Math.PI/180,r.rotation=i),l!=null&&(r.distance=l),r.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",r}function E_(e,t,n,r,a){n=n||Iu;var i=t.ecModel,l=i&&i.option.textStyle,s=T_(t),u;if(s){u={};for(var c in s)if(s.hasOwnProperty(c)){var d=t.getModel(["rich",c]);Wh(u[c]={},d,l,n,r,a,!1,!0)}}u&&(e.rich=u);var f=t.get("overflow");f&&(e.overflow=f);var v=t.get("minMargin");v!=null&&(e.margin=v),Wh(e,t,l,n,r,a,!0,!1)}function T_(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Iu).rich;if(n){t=t||{};for(var r=Fe(n),a=0;a<r.length;a++){var i=r[a];t[i]=1}}e=e.parentModel}return t}var Hh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Gh=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Uh=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Wh(e,t,n,r,a,i,l,s){n=!a&&n||Iu;var u=r&&r.inheritColor,c=t.getShallow("color"),d=t.getShallow("textBorderColor"),f=ke(t.getShallow("opacity"),n.opacity);(c==="inherit"||c==="auto")&&(process.env.NODE_ENV!=="production"&&c==="auto"&&ht("color: 'auto'","color: 'inherit'"),u?c=u:c=null),(d==="inherit"||d==="auto")&&(process.env.NODE_ENV!=="production"&&d==="auto"&&ht("color: 'auto'","color: 'inherit'"),u?d=u:d=null),i||(c=c||n.color,d=d||n.textBorderColor),c!=null&&(e.fill=c),d!=null&&(e.stroke=d);var v=ke(t.getShallow("textBorderWidth"),n.textBorderWidth);v!=null&&(e.lineWidth=v);var p=ke(t.getShallow("textBorderType"),n.textBorderType);p!=null&&(e.lineDash=p);var h=ke(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);h!=null&&(e.lineDashOffset=h),!a&&f==null&&!s&&(f=r&&r.defaultOpacity),f!=null&&(e.opacity=f),!a&&!i&&e.fill==null&&r.inheritColor&&(e.fill=r.inheritColor);for(var m=0;m<Hh.length;m++){var g=Hh[m],y=ke(t.getShallow(g),n[g]);y!=null&&(e[g]=y)}for(var m=0;m<Gh.length;m++){var g=Gh[m],y=t.getShallow(g);y!=null&&(e[g]=y)}if(e.verticalAlign==null){var x=t.getShallow("baseline");x!=null&&(e.verticalAlign=x)}if(!l||!r.disableBox){for(var m=0;m<Uh.length;m++){var g=Uh[m],y=t.getShallow(g);y!=null&&(e[g]=y)}var b=t.getShallow("borderType");b!=null&&(e.borderDash=b),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&e.backgroundColor==="auto"&&ht("backgroundColor: 'auto'","backgroundColor: 'inherit'"),e.backgroundColor=u),(e.borderColor==="auto"||e.borderColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&e.borderColor==="auto"&&ht("borderColor: 'auto'","borderColor: 'inherit'"),e.borderColor=u)}}function N_(e,t){var n=t&&t.getModel("textStyle");return _r([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Lu=_t();function I_(e,t,n,r){if(e){var a=Lu(e);a.prevValue=a.value,a.value=n;var i=t.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=r,a.statesModels=t)}}var L_=["textStyle","color"],Pc=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Dc=new nn,A_=(function(){function e(){}return e.prototype.getTextColor=function(t){var n=this.ecModel;return this.getShallow("color")||(!t&&n?n.get(L_):null)},e.prototype.getFont=function(){return N_({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(t){for(var n={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},r=0;r<Pc.length;r++)n[Pc[r]]=this.getShallow(Pc[r]);return Dc.useStyle(n),Dc.update(),Dc.getBoundingRect()},e})(),y2=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],M_=Yi(y2),V_=(function(){function e(){}return e.prototype.getLineStyle=function(t){return M_(this,t)},e})(),x2=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],P_=Yi(x2),D_=(function(){function e(){}return e.prototype.getItemStyle=function(t,n){return P_(this,t,n)},e})(),St=(function(){function e(t,n,r){this.parentModel=n,this.ecModel=r,this.option=t}return e.prototype.init=function(t,n,r){},e.prototype.mergeOption=function(t,n){je(this.option,t,!0)},e.prototype.get=function(t,n){return t==null?this.option:this._doGet(this.parsePath(t),!n&&this.parentModel)},e.prototype.getShallow=function(t,n){var r=this.option,a=r==null?r:r[t];if(a==null&&!n){var i=this.parentModel;i&&(a=i.getShallow(t))}return a},e.prototype.getModel=function(t,n){var r=t!=null,a=r?this.parsePath(t):null,i=r?this._doGet(a):this.option;return n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new e(i,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var t=this.constructor;return new t(Oe(this.option))},e.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},e.prototype.resolveParentPath=function(t){return t},e.prototype.isAnimationEnabled=function(){if(!He.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(t,n){var r=this.option;if(!t)return r;for(var a=0;a<t.length&&!(t[a]&&(r=r&&typeof r=="object"?r[t[a]]:null,r==null));a++);return r==null&&n&&(r=n._doGet(this.resolveParentPath(t),n.parentModel)),r},e})();vv(St);C6(St);Nn(St,V_);Nn(St,D_);Nn(St,L6);Nn(St,A_);var B_=Math.round(Math.random()*10);function Au(e){return[e||"",B_++].join("_")}function R_(e){var t={};e.registerSubTypeDefaulter=function(n,r){var a=Gn(n);t[a.main]=r},e.determineSubType=function(n,r){var a=r.type;if(!a){var i=Gn(n).main;e.hasSubTypes(n)&&t[i]&&(a=t[i](r))}return a}}function $_(e,t){e.topologicalTravel=function(i,l,s,u){if(!i.length)return;var c=n(l),d=c.graph,f=c.noEntryList,v={};for(q(i,function(x){v[x]=!0});f.length;){var p=f.pop(),h=d[p],m=!!v[p];m&&(s.call(u,p,h.originalDeps.slice()),delete v[p]),q(h.successor,m?y:g)}q(v,function(){var x="";throw process.env.NODE_ENV!=="production"&&(x=ef("Circular dependency may exists: ",v,i,l)),new Error(x)});function g(x){d[x].entryCount--,d[x].entryCount===0&&f.push(x)}function y(x){v[x]=!0,g(x)}};function n(i){var l={},s=[];return q(i,function(u){var c=r(l,u),d=c.originalDeps=t(u),f=a(d,i);c.entryCount=f.length,c.entryCount===0&&s.push(u),q(f,function(v){et(c.predecessor,v)<0&&c.predecessor.push(v);var p=r(l,v);et(p.successor,v)<0&&p.successor.push(u)})}),{graph:l,noEntryList:s}}function r(i,l){return i[l]||(i[l]={predecessor:[],successor:[]}),i[l]}function a(i,l){var s=[];return q(i,function(u){et(l,u)>=0&&s.push(u)}),s}}function w2(e,t){return je(je({},e,!0),t,!0)}const O_={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},F_={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Xs="ZH",_v="EN",wa=_v,ys={},kv={},b2=He.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||wa).toUpperCase();return e.indexOf(Xs)>-1?Xs:wa})():wa;function S2(e,t){e=e.toUpperCase(),kv[e]=new St(t),ys[e]=t}function z_(e){if(_e(e)){var t=ys[e.toUpperCase()]||{};return e===Xs||e===_v?Oe(t):je(Oe(t),Oe(ys[wa]),!1)}else return je(Oe(e),Oe(ys[wa]),!1)}function H_(e){return kv[e]}function G_(){return kv[wa]}S2(_v,O_);S2(Xs,F_);var Cv=1e3,Ev=Cv*60,Ri=Ev*60,gn=Ri*24,Yh=gn*365,_i={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},zl="{yyyy}-{MM}-{dd}",Xh={year:"{yyyy}",month:"{yyyy}-{MM}",day:zl,hour:zl+" "+_i.hour,minute:zl+" "+_i.minute,second:zl+" "+_i.second,millisecond:_i.none},Bc=["year","month","day","hour","minute","second","millisecond"],_2=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function dr(e,t){return e+="","0000".substr(0,t-e.length)+e}function ba(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function U_(e){return e===ba(e)}function W_(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function k2(e,t,n,r){var a=Rr(e),i=a[Tv(n)](),l=a[Sa(n)]()+1,s=Math.floor((l-1)/3)+1,u=a[Mu(n)](),c=a["get"+(n?"UTC":"")+"Day"](),d=a[Ji(n)](),f=(d-1)%12+1,v=a[Vu(n)](),p=a[Pu(n)](),h=a[Du(n)](),m=d>=12?"pm":"am",g=m.toUpperCase(),y=r instanceof St?r:H_(r||b2)||G_(),x=y.getModel("time"),b=x.get("month"),S=x.get("monthAbbr"),_=x.get("dayOfWeek"),k=x.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,m+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,dr(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[l-1]).replace(/{MMM}/g,S[l-1]).replace(/{MM}/g,dr(l,2)).replace(/{M}/g,l+"").replace(/{dd}/g,dr(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,_[c]).replace(/{ee}/g,k[c]).replace(/{e}/g,c+"").replace(/{HH}/g,dr(d,2)).replace(/{H}/g,d+"").replace(/{hh}/g,dr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,dr(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,dr(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,dr(h,3)).replace(/{S}/g,h+"")}function Y_(e,t,n,r,a){var i=null;if(_e(n))i=n;else if(Ae(n))i=n(e.value,t,{level:e.level});else{var l=fe({},_i);if(e.level>0)for(var s=0;s<Bc.length;++s)l[Bc[s]]="{primary|"+l[Bc[s]]+"}";var u=n?n.inherit===!1?n:$e(n,l):l,c=C2(e.value,a);if(u[c])i=u[c];else if(u.inherit){for(var d=_2.indexOf(c),s=d-1;s>=0;--s)if(u[c]){i=u[c];break}i=i||l.none}if(we(i)){var f=e.level==null?0:e.level>=0?e.level:i.length+e.level;f=Math.min(f,i.length-1),i=i[f]}}return k2(new Date(e.value),i,a,r)}function C2(e,t){var n=Rr(e),r=n[Sa(t)]()+1,a=n[Mu(t)](),i=n[Ji(t)](),l=n[Vu(t)](),s=n[Pu(t)](),u=n[Du(t)](),c=u===0,d=c&&s===0,f=d&&l===0,v=f&&i===0,p=v&&a===1,h=p&&r===1;return h?"year":p?"month":v?"day":f?"hour":d?"minute":c?"second":"millisecond"}function qh(e,t,n){var r=Qe(e)?Rr(e):e;switch(t=t||C2(e,n),t){case"year":return r[Tv(n)]();case"half-year":return r[Sa(n)]()>=6?1:0;case"quarter":return Math.floor((r[Sa(n)]()+1)/4);case"month":return r[Sa(n)]();case"day":return r[Mu(n)]();case"half-day":return r[Ji(n)]()/24;case"hour":return r[Ji(n)]();case"minute":return r[Vu(n)]();case"second":return r[Pu(n)]();case"millisecond":return r[Du(n)]()}}function Tv(e){return e?"getUTCFullYear":"getFullYear"}function Sa(e){return e?"getUTCMonth":"getMonth"}function Mu(e){return e?"getUTCDate":"getDate"}function Ji(e){return e?"getUTCHours":"getHours"}function Vu(e){return e?"getUTCMinutes":"getMinutes"}function Pu(e){return e?"getUTCSeconds":"getSeconds"}function Du(e){return e?"getUTCMilliseconds":"getMilliseconds"}function X_(e){return e?"setUTCFullYear":"setFullYear"}function E2(e){return e?"setUTCMonth":"setMonth"}function T2(e){return e?"setUTCDate":"setDate"}function N2(e){return e?"setUTCHours":"setHours"}function I2(e){return e?"setUTCMinutes":"setMinutes"}function L2(e){return e?"setUTCSeconds":"setSeconds"}function A2(e){return e?"setUTCMilliseconds":"setMilliseconds"}function q_(e){if(!Lg(e))return _e(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}var M2=Q1,Zh=["a","b","c","d","e","f","g"],Rc=function(e,t){return"{"+e+(t??"")+"}"};function Z_(e,t,n){we(t)||(t=[t]);var r=t.length;if(!r)return"";for(var a=t[0].$vars||[],i=0;i<a.length;i++){var l=Zh[i];e=e.replace(Rc(l),Rc(l,0))}for(var s=0;s<r;s++)for(var u=0;u<a.length;u++){var c=t[s][a[u]];e=e.replace(Rc(Zh[u],s),c)}return e}function vf(e,t){return t=t||"transparent",_e(e)?e:Ce(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var xs=q,j_=["left","right","top","bottom","width","height"],Hl=[["width","left","right"],["height","top","bottom"]];function Nv(e,t,n,r,a){var i=0,l=0;r==null&&(r=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(u,c){var d=u.getBoundingRect(),f=t.childAt(c+1),v=f&&f.getBoundingRect(),p,h;if(e==="horizontal"){var m=d.width+(v?-v.x+d.x:0);p=i+m,p>r||u.newline?(i=0,p=m,l+=s+n,s=d.height):s=Math.max(s,d.height)}else{var g=d.height+(v?-v.y+d.y:0);h=l+g,h>a||u.newline?(i+=s+n,l=0,h=g,s=d.width):s=Math.max(s,d.width)}u.newline||(u.x=i,u.y=l,u.markRedraw(),e==="horizontal"?i=p+n:l=h+n)})}var $i=Nv;Qt(Nv,"vertical");Qt(Nv,"horizontal");function qs(e,t,n){n=M2(n||0);var r=t.width,a=t.height,i=Ke(e.left,r),l=Ke(e.top,a),s=Ke(e.right,r),u=Ke(e.bottom,a),c=Ke(e.width,r),d=Ke(e.height,a),f=n[2]+n[0],v=n[1]+n[3],p=e.aspect;switch(isNaN(c)&&(c=r-s-v-i),isNaN(d)&&(d=a-u-f-l),p!=null&&(isNaN(c)&&isNaN(d)&&(p>r/a?c=r*.8:d=a*.8),isNaN(c)&&(c=p*d),isNaN(d)&&(d=c/p)),isNaN(i)&&(i=r-s-c-v),isNaN(l)&&(l=a-u-d-f),e.left||e.right){case"center":i=r/2-c/2-n[3];break;case"right":i=r-c-v;break}switch(e.top||e.bottom){case"middle":case"center":l=a/2-d/2-n[0];break;case"bottom":l=a-d-f;break}i=i||0,l=l||0,isNaN(c)&&(c=r-v-i-(s||0)),isNaN(d)&&(d=a-f-l-(u||0));var h=new Je(i+n[3],l+n[0],c,d);return h.margin=n,h}function Ki(e){var t=e.layoutMode||e.constructor.layoutMode;return Ce(t)?t:t?{type:t}:null}function Aa(e,t,n){var r=n&&n.ignoreSize;!we(r)&&(r=[r,r]);var a=l(Hl[0],0),i=l(Hl[1],1);c(Hl[0],e,a),c(Hl[1],e,i);function l(d,f){var v={},p=0,h={},m=0,g=2;if(xs(d,function(b){h[b]=e[b]}),xs(d,function(b){s(t,b)&&(v[b]=h[b]=t[b]),u(v,b)&&p++,u(h,b)&&m++}),r[f])return u(t,d[1])?h[d[2]]=null:u(t,d[2])&&(h[d[1]]=null),h;if(m===g||!p)return h;if(p>=g)return v;for(var y=0;y<d.length;y++){var x=d[y];if(!s(v,x)&&s(e,x)){v[x]=e[x];break}}return v}function s(d,f){return d.hasOwnProperty(f)}function u(d,f){return d[f]!=null&&d[f]!=="auto"}function c(d,f,v){xs(d,function(p){f[p]=v[p]})}}function Bu(e){return J_({},e)}function J_(e,t){return t&&e&&xs(j_,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var K_=_t(),Ye=(function(e){me(t,e);function t(n,r,a){var i=e.call(this,n,r,a)||this;return i.uid=Au("ec_cpt_model"),i}return t.prototype.init=function(n,r,a){this.mergeDefaultAndTheme(n,a)},t.prototype.mergeDefaultAndTheme=function(n,r){var a=Ki(this),i=a?Bu(n):{},l=r.getTheme();je(n,l.get(this.mainType)),je(n,this.getDefaultOption()),a&&Aa(n,i,a)},t.prototype.mergeOption=function(n,r){je(this.option,n,!0);var a=Ki(this);a&&Aa(this.option,n,a)},t.prototype.optionUpdated=function(n,r){},t.prototype.getDefaultOption=function(){var n=this.constructor;if(!S6(n))return n.defaultOption;var r=K_(this);if(!r.defaultOption){for(var a=[],i=n;i;){var l=i.prototype.defaultOption;l&&a.push(l),i=i.superClass}for(var s={},u=a.length-1;u>=0;u--)s=je(s,a[u],!0);r.defaultOption=s}return r.defaultOption},t.prototype.getReferringComponents=function(n,r){var a=n+"Index",i=n+"Id";return yu(this.ecModel,n,{index:this.get(a,!0),id:this.get(i,!0)},r)},t.prototype.getBoxLayoutParams=function(){var n=this;return{left:n.get("left"),top:n.get("top"),right:n.get("right"),bottom:n.get("bottom"),width:n.get("width"),height:n.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(n){this.option.zlevel=n},t.protoInitialize=(function(){var n=t.prototype;n.type="component",n.id="",n.name="",n.mainType="",n.subType="",n.componentIndex=0})(),t})(St);Rg(Ye,St);xu(Ye);R_(Ye);$_(Ye,Q_);function Q_(e){var t=[];return q(Ye.getClassesByMainType(e),function(n){t=t.concat(n.dependencies||n.prototype.dependencies||[])}),t=ge(t,function(n){return Gn(n).main}),e!=="dataset"&&et(t,"dataset")<=0&&t.unshift("dataset"),t}var V2="";typeof navigator<"u"&&(V2=navigator.platform||"");var jo="rgba(0, 0, 0, 0.2)";const e7={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:jo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:jo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:jo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:jo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:jo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:jo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:V2.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var pf=Ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),bn="original",Zt="arrayRows",An="objectRows",qn="keyedColumns",rr="typedArray",P2="unknown",or="column",za="row",kt={Must:1,Might:2,Not:3},D2=_t();function t7(e){D2(e).datasetMap=Ve()}function n7(e,t,n){var r={},a=Iv(t);if(!a||!e)return r;var i=[],l=[],s=t.ecModel,u=D2(s).datasetMap,c=a.uid+"_"+n.seriesLayoutBy,d,f;e=e.slice(),q(e,function(m,g){var y=Ce(m)?m:e[g]={name:m};y.type==="ordinal"&&d==null&&(d=g,f=h(y)),r[y.name]=[]});var v=u.get(c)||u.set(c,{categoryWayDim:f,valueWayDim:0});q(e,function(m,g){var y=m.name,x=h(m);if(d==null){var b=v.valueWayDim;p(r[y],b,x),p(l,b,x),v.valueWayDim+=x}else if(d===g)p(r[y],0,x),p(i,0,x);else{var b=v.categoryWayDim;p(r[y],b,x),p(l,b,x),v.categoryWayDim+=x}});function p(m,g,y){for(var x=0;x<y;x++)m.push(g+x)}function h(m){var g=m.dimsDef;return g?g.length:1}return i.length&&(r.itemName=i),l.length&&(r.seriesName=l),r}function r7(e,t,n){var r={},a=Iv(e);if(!a)return r;var i=t.sourceFormat,l=t.dimensionsDefine,s;(i===An||i===qn)&&q(l,function(d,f){(Ce(d)?d.name:d)==="name"&&(s=f)});var u=(function(){for(var d={},f={},v=[],p=0,h=Math.min(5,n);p<h;p++){var m=R2(t.data,i,t.seriesLayoutBy,l,t.startIndex,p);v.push(m);var g=m===kt.Not;if(g&&d.v==null&&p!==s&&(d.v=p),(d.n==null||d.n===d.v||!g&&v[d.n]===kt.Not)&&(d.n=p),y(d)&&v[d.n]!==kt.Not)return d;g||(m===kt.Might&&f.v==null&&p!==s&&(f.v=p),(f.n==null||f.n===f.v)&&(f.n=p))}function y(x){return x.v!=null&&x.n!=null}return y(d)?d:y(f)?f:null})();if(u){r.value=[u.v];var c=s??u.n;r.itemName=[c],r.seriesName=[c]}return r}function Iv(e){var t=e.get("data",!0);if(!t)return yu(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Tn).models[0]}function o7(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:yu(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Tn).models}function B2(e,t){return R2(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function R2(e,t,n,r,a,i){var l,s=5;if(Ot(e))return kt.Not;var u,c;if(r){var d=r[i];Ce(d)?(u=d.name,c=d.type):_e(d)&&(u=d)}if(c!=null)return c==="ordinal"?kt.Must:kt.Not;if(t===Zt){var f=e;if(n===za){for(var v=f[i],p=0;p<(v||[]).length&&p<s;p++)if((l=S(v[a+p]))!=null)return l}else for(var p=0;p<f.length&&p<s;p++){var h=f[a+p];if(h&&(l=S(h[i]))!=null)return l}}else if(t===An){var m=e;if(!u)return kt.Not;for(var p=0;p<m.length&&p<s;p++){var g=m[p];if(g&&(l=S(g[u]))!=null)return l}}else if(t===qn){var y=e;if(!u)return kt.Not;var v=y[u];if(!v||Ot(v))return kt.Not;for(var p=0;p<v.length&&p<s;p++)if((l=S(v[p]))!=null)return l}else if(t===bn)for(var x=e,p=0;p<x.length&&p<s;p++){var g=x[p],b=fl(g);if(!we(b))return kt.Not;if((l=S(b[i]))!=null)return l}function S(_){var k=_e(_);if(_!=null&&Number.isFinite(Number(_))&&_!=="")return k?kt.Might:kt.Not;if(k&&_!=="-")return kt.Must}return kt.Not}var a7=Ve();function i7(e,t,n){var r=a7.get(t);if(!r)return n;var a=r(e);if(!a)return n;if(process.env.NODE_ENV!=="production")for(var i=0;i<a.length;i++)Pe(Ea(a[i]));return n.concat(a)}var jh=_t();_t();var Lv=(function(){function e(){}return e.prototype.getColorFromPalette=function(t,n,r){var a=$t(this.get("color",!0)),i=this.get("colorLayer",!0);return s7(this,jh,a,i,t,n,r)},e.prototype.clearColorPalette=function(){u7(this,jh)},e})();function l7(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function s7(e,t,n,r,a,i,l){i=i||e;var s=t(i),u=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(a))return c[a];var d=l==null||!r?n:l7(r,l);if(d=d||n,!(!d||!d.length)){var f=d[u];return a&&(c[a]=f),s.paletteIdx=(u+1)%d.length,f}}function u7(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Gl,ni,Jh,$c="\0_ec_inner",Kh=1,c7={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},d7={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Zs={};function f7(e){q(e,function(t,n){if(!Ye.hasClass(n)){var r=c7[n];r&&!Zs[r]&&(Vt("Component "+n+` is used but not imported.
|
|
27
|
+
import { `+r+` } from 'echarts/components';
|
|
28
|
+
echarts.use([`+r+"]);"),Zs[r]=!0)}})}var Av=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n,r,a,i,l,s){i=i||{},this.option=null,this._theme=new St(i),this._locale=new St(l),this._optionManager=s},t.prototype.setOption=function(n,r,a){process.env.NODE_ENV!=="production"&&(Pe(n!=null,"option is null/undefined"),Pe(n[$c]!==Kh,"please use chart.getOption()"));var i=t0(r);this._optionManager.setOption(n,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(n,r){return this._resetOption(n,t0(r))},t.prototype._resetOption=function(n,r){var a=!1,i=this._optionManager;if(!n||n==="recreate"){var l=i.mountOption(n==="recreate");process.env.NODE_ENV!=="production"&&f7(l),!this.option||n==="recreate"?Jh(this,l):(this.restoreData(),this._mergeOption(l,r)),a=!0}if((n==="timeline"||n==="media")&&this.restoreData(),!n||n==="recreate"||n==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,r))}if(!n||n==="recreate"||n==="media"){var u=i.getMediaOption(this);u.length&&q(u,function(c){a=!0,this._mergeOption(c,r)},this)}return a},t.prototype.mergeOption=function(n){this._mergeOption(n,null)},t.prototype._mergeOption=function(n,r){var a=this.option,i=this._componentsMap,l=this._componentsCount,s=[],u=Ve(),c=r&&r.replaceMergeMainTypeMap;t7(this),q(n,function(f,v){f!=null&&(Ye.hasClass(v)?v&&(s.push(v),u.set(v,!0)):a[v]=a[v]==null?Oe(f):je(a[v],f,!0))}),c&&c.each(function(f,v){Ye.hasClass(v)&&!u.get(v)&&(s.push(v),u.set(v,!0))}),Ye.topologicalTravel(s,Ye.getAllClassMainTypes(),d,this);function d(f){var v=i7(this,f,$t(n[f])),p=i.get(f),h=p?c&&c.get(f)?"replaceMerge":"normalMerge":"replaceAll",m=s6(p,v,h);h6(m,f,Ye),a[f]=null,i.set(f,null),l.set(f,0);var g=[],y=[],x=0,b,S;q(m,function(_,k){var w=_.existing,C=_.newOption;if(!C)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var E=f==="series",L=Ye.getClass(f,_.keyInfo.subType,!E);if(!L){if(process.env.NODE_ENV!=="production"){var N=_.keyInfo.subType,T=d7[N];Zs[N]||(Zs[N]=!0,Vt(T?"Series "+N+` is used but not imported.
|
|
29
|
+
import { `+T+` } from 'echarts/charts';
|
|
30
|
+
echarts.use([`+T+"]);":"Unknown series "+N))}return}if(f==="tooltip"){if(b){process.env.NODE_ENV!=="production"&&(S||(Mt("Currently only one tooltip component is allowed."),S=!0));return}b=!0}if(w&&w.constructor===L)w.name=_.keyInfo.name,w.mergeOption(C,this),w.optionUpdated(C,!1);else{var A=fe({componentIndex:k},_.keyInfo);w=new L(C,this,this,A),fe(w,A),_.brandNew&&(w.__requireNewView=!0),w.init(C,this,this),w.optionUpdated(null,!0)}}w?(g.push(w.option),y.push(w),x++):(g.push(void 0),y.push(void 0))},this),a[f]=g,i.set(f,y),l.set(f,x),f==="series"&&Gl(this)}this._seriesIndices||Gl(this)},t.prototype.getOption=function(){var n=Oe(this.option);return q(n,function(r,a){if(Ye.hasClass(a)){for(var i=$t(r),l=i.length,s=!1,u=l-1;u>=0;u--)i[u]&&!Ea(i[u])?s=!0:(i[u]=null,!s&&l--);i.length=l,n[a]=i}}),delete n[$c],n},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(n){this._payload=n},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(n,r){var a=this._componentsMap.get(n);if(a){var i=a[r||0];if(i)return i;if(r==null){for(var l=0;l<a.length;l++)if(a[l])return a[l]}}},t.prototype.queryComponents=function(n){var r=n.mainType;if(!r)return[];var a=n.index,i=n.id,l=n.name,s=this._componentsMap.get(r);if(!s||!s.length)return[];var u;return a!=null?(u=[],q($t(a),function(c){s[c]&&u.push(s[c])})):i!=null?u=Qh("id",i,s):l!=null?u=Qh("name",l,s):u=wt(s,function(c){return!!c}),e0(u,n)},t.prototype.findComponents=function(n){var r=n.query,a=n.mainType,i=s(r),l=i?this.queryComponents(i):wt(this._componentsMap.get(a),function(c){return!!c});return u(e0(l,n));function s(c){var d=a+"Index",f=a+"Id",v=a+"Name";return c&&(c[d]!=null||c[f]!=null||c[v]!=null)?{mainType:a,index:c[d],id:c[f],name:c[v]}:null}function u(c){return n.filter?wt(c,n.filter):c}},t.prototype.eachComponent=function(n,r,a){var i=this._componentsMap;if(Ae(n)){var l=r,s=n;i.each(function(f,v){for(var p=0;f&&p<f.length;p++){var h=f[p];h&&s.call(l,v,h,h.componentIndex)}})}else for(var u=_e(n)?i.get(n):Ce(n)?this.findComponents(n):null,c=0;u&&c<u.length;c++){var d=u[c];d&&r.call(a,d,d.componentIndex)}},t.prototype.getSeriesByName=function(n){var r=Wn(n,null);return wt(this._componentsMap.get("series"),function(a){return!!a&&r!=null&&a.name===r})},t.prototype.getSeriesByIndex=function(n){return this._componentsMap.get("series")[n]},t.prototype.getSeriesByType=function(n){return wt(this._componentsMap.get("series"),function(r){return!!r&&r.subType===n})},t.prototype.getSeries=function(){return wt(this._componentsMap.get("series"),function(n){return!!n})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(n,r){ni(this),q(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];n.call(r,i,a)},this)},t.prototype.eachRawSeries=function(n,r){q(this._componentsMap.get("series"),function(a){a&&n.call(r,a,a.componentIndex)})},t.prototype.eachSeriesByType=function(n,r,a){ni(this),q(this._seriesIndices,function(i){var l=this._componentsMap.get("series")[i];l.subType===n&&r.call(a,l,i)},this)},t.prototype.eachRawSeriesByType=function(n,r,a){return q(this.getSeriesByType(n),r,a)},t.prototype.isSeriesFiltered=function(n){return ni(this),this._seriesIndicesMap.get(n.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(n,r){ni(this);var a=[];q(this._seriesIndices,function(i){var l=this._componentsMap.get("series")[i];n.call(r,l,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=Ve(a)},t.prototype.restoreData=function(n){Gl(this);var r=this._componentsMap,a=[];r.each(function(i,l){Ye.hasClass(l)&&a.push(l)}),Ye.topologicalTravel(a,Ye.getAllClassMainTypes(),function(i){q(r.get(i),function(l){l&&(i!=="series"||!v7(l,n))&&l.restoreData()})})},t.internalField=(function(){Gl=function(n){var r=n._seriesIndices=[];q(n._componentsMap.get("series"),function(a){a&&r.push(a.componentIndex)}),n._seriesIndicesMap=Ve(r)},ni=function(n){if(process.env.NODE_ENV!=="production"&&!n._seriesIndices)throw new Error("Option should contains series.")},Jh=function(n,r){n.option={},n.option[$c]=Kh,n._componentsMap=Ve({series:[]}),n._componentsCount=Ve();var a=r.aria;Ce(a)&&a.enabled==null&&(a.enabled=!0),p7(r,n._theme.option),je(r,e7,!1),n._mergeOption(r,null)}})(),t})(St);function v7(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,a=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||a!=null&&e.name!==a}}function p7(e,t){var n=e.color&&!e.colorLayer;q(t,function(r,a){a==="colorLayer"&&n||Ye.hasClass(a)||(typeof r=="object"?e[a]=e[a]?je(e[a],r,!1):Oe(r):e[a]==null&&(e[a]=r))})}function Qh(e,t,n){if(we(t)){var r=Ve();return q(t,function(i){if(i!=null){var l=Wn(i,null);l!=null&&r.set(i,!0)}}),wt(n,function(i){return i&&r.get(i[e])})}else{var a=Wn(t,null);return wt(n,function(i){return i&&a!=null&&i[e]===a})}}function e0(e,t){return t.hasOwnProperty("subType")?wt(e,function(n){return n&&n.subType===t.subType}):e}function t0(e){var t=Ve();return e&&q($t(e.replaceMerge),function(n){process.env.NODE_ENV!=="production"&&Pe(Ye.hasClass(n),'"'+n+'" is not valid component main type in "replaceMerge"'),t.set(n,!0)}),{replaceMergeMainTypeMap:t}}Nn(Av,Lv);var h7=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],$2=(function(){function e(t){q(h7,function(n){this[n]=dt(t[n],t)},this)}return e})(),Oc={},Mv=(function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(t,n){var r=[];q(Oc,function(a,i){var l=a.create(t,n);r=r.concat(l||[])}),this._coordinateSystems=r},e.prototype.update=function(t,n){q(this._coordinateSystems,function(r){r.update&&r.update(t,n)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(t,n){Oc[t]=n},e.get=function(t){return Oc[t]},e})(),m7=/^(min|max)?(.+)$/,g7=(function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,n,r){t&&(q($t(t.series),function(l){l&&l.data&&Ot(l.data)&&Vd(l.data)}),q($t(t.dataset),function(l){l&&l.source&&Ot(l.source)&&Vd(l.source)})),t=Oe(t);var a=this._optionBackup,i=y7(t,n,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(t){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],Oe(t?n.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var n,r=this._timelineOptions;if(r.length){var a=t.getComponent("timeline");a&&(n=Oe(r[a.getCurrentIndex()]))}return n},e.prototype.getMediaOption=function(t){var n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,l=[],s=[];if(!a.length&&!i)return s;for(var u=0,c=a.length;u<c;u++)x7(a[u].query,n,r)&&l.push(u);return!l.length&&i&&(l=[-1]),l.length&&!b7(l,this._currentMediaIndices)&&(s=ge(l,function(d){return Oe(d===-1?i.option:a[d].option)})),this._currentMediaIndices=l,s},e})();function y7(e,t,n){var r=[],a,i,l=e.baseOption,s=e.timeline,u=e.options,c=e.media,d=!!e.media,f=!!(u||s||l&&l.timeline);l?(i=l,i.timeline||(i.timeline=s)):((f||d)&&(e.options=e.media=null),i=e),d&&(we(c)?q(c,function(p){process.env.NODE_ENV!=="production"&&p&&!p.option&&Ce(p.query)&&Ce(p.query.option)&&Vt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),p&&p.option&&(p.query?r.push(p):a||(a=p))}):process.env.NODE_ENV!=="production"&&Vt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),v(i),q(u,function(p){return v(p)}),q(r,function(p){return v(p.option)});function v(p){q(t,function(h){h(p,n)})}return{baseOption:i,timelineOptions:u||[],mediaDefault:a,mediaList:r}}function x7(e,t,n){var r={width:t,height:n,aspectratio:t/n},a=!0;return q(e,function(i,l){var s=l.match(m7);if(!(!s||!s[1]||!s[2])){var u=s[1],c=s[2].toLowerCase();w7(r[c],i,u)||(a=!1)}}),a}function w7(e,t,n){return n==="min"?e>=t:n==="max"?e<=t:e===t}function b7(e,t){return e.join(",")===t.join(",")}var an=q,Qi=Ce,n0=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Fc(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=n0.length;n<r;n++){var a=n0[n],i=t.normal,l=t.emphasis;i&&i[a]&&(process.env.NODE_ENV!=="production"&&ht("itemStyle.normal."+a,a),e[a]=e[a]||{},e[a].normal?je(e[a].normal,i[a]):e[a].normal=i[a],i[a]=null),l&&l[a]&&(process.env.NODE_ENV!=="production"&&ht("itemStyle.emphasis."+a,"emphasis."+a),e[a]=e[a]||{},e[a].emphasis?je(e[a].emphasis,l[a]):e[a].emphasis=l[a],l[a]=null)}}function At(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,a=e[t].emphasis;r&&(process.env.NODE_ENV!=="production"&&Yn("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),n?(e[t].normal=e[t].emphasis=null,$e(e[t],r)):e[t]=r),a&&(process.env.NODE_ENV!=="production"&&Yn(t+".emphasis has been changed to emphasis."+t+" since 4.0"),e.emphasis=e.emphasis||{},e.emphasis[t]=a,a.focus&&(e.emphasis.focus=a.focus),a.blurScope&&(e.emphasis.blurScope=a.blurScope))}}function ki(e){At(e,"itemStyle"),At(e,"lineStyle"),At(e,"areaStyle"),At(e,"label"),At(e,"labelLine"),At(e,"upperLabel"),At(e,"edgeLabel")}function lt(e,t){var n=Qi(e)&&e[t],r=Qi(n)&&n.textStyle;if(r){process.env.NODE_ENV!=="production"&&Yn("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var a=0,i=rh.length;a<i;a++){var l=rh[a];r.hasOwnProperty(l)&&(n[l]=r[l])}}}function cn(e){e&&(ki(e),lt(e,"label"),e.emphasis&<(e.emphasis,"label"))}function S7(e){if(Qi(e)){Fc(e),ki(e),lt(e,"label"),lt(e,"upperLabel"),lt(e,"edgeLabel"),e.emphasis&&(lt(e.emphasis,"label"),lt(e.emphasis,"upperLabel"),lt(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(Fc(t),cn(t));var n=e.markLine;n&&(Fc(n),cn(n));var r=e.markArea;r&&cn(r);var a=e.data;if(e.type==="graph"){a=a||e.nodes;var i=e.links||e.edges;if(i&&!Ot(i))for(var l=0;l<i.length;l++)cn(i[l]);q(e.categories,function(c){ki(c)})}if(a&&!Ot(a))for(var l=0;l<a.length;l++)cn(a[l]);if(t=e.markPoint,t&&t.data)for(var s=t.data,l=0;l<s.length;l++)cn(s[l]);if(n=e.markLine,n&&n.data)for(var u=n.data,l=0;l<u.length;l++)we(u[l])?(cn(u[l][0]),cn(u[l][1])):cn(u[l]);e.type==="gauge"?(lt(e,"axisLabel"),lt(e,"title"),lt(e,"detail")):e.type==="treemap"?(At(e.breadcrumb,"itemStyle"),q(e.levels,function(c){ki(c)})):e.type==="tree"&&ki(e.leaves)}}function Kn(e){return we(e)?e:e?[e]:[]}function r0(e){return(we(e)?e[0]:e)||{}}function _7(e,t){an(Kn(e.series),function(r){Qi(r)&&S7(r)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),an(n,function(r){an(Kn(e[r]),function(a){a&&(lt(a,"axisLabel"),lt(a.axisPointer,"label"))})}),an(Kn(e.parallel),function(r){var a=r&&r.parallelAxisDefault;lt(a,"axisLabel"),lt(a&&a.axisPointer,"label")}),an(Kn(e.calendar),function(r){At(r,"itemStyle"),lt(r,"dayLabel"),lt(r,"monthLabel"),lt(r,"yearLabel")}),an(Kn(e.radar),function(r){lt(r,"name"),r.name&&r.axisName==null&&(r.axisName=r.name,delete r.name,process.env.NODE_ENV!=="production"&&Yn("name property in radar component has been changed to axisName")),r.nameGap!=null&&r.axisNameGap==null&&(r.axisNameGap=r.nameGap,delete r.nameGap,process.env.NODE_ENV!=="production"&&Yn("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&an(r.indicator,function(a){a.text&&ht("text","name","radar.indicator")})}),an(Kn(e.geo),function(r){Qi(r)&&(cn(r),an(Kn(r.regions),function(a){cn(a)}))}),an(Kn(e.timeline),function(r){cn(r),At(r,"label"),At(r,"itemStyle"),At(r,"controlStyle",!0);var a=r.data;we(a)&&q(a,function(i){Ce(i)&&(At(i,"label"),At(i,"itemStyle"))})}),an(Kn(e.toolbox),function(r){At(r,"iconStyle"),an(r.feature,function(a){At(a,"iconStyle")})}),lt(r0(e.axisPointer),"label"),lt(r0(e.tooltip).axisPointer,"label")}function k7(e,t){for(var n=t.split(","),r=e,a=0;a<n.length&&(r=r&&r[n[a]],r!=null);a++);return r}function C7(e,t,n,r){for(var a=t.split(","),i=e,l,s=0;s<a.length-1;s++)l=a[s],i[l]==null&&(i[l]={}),i=i[l];i[a[s]]==null&&(i[a[s]]=n)}function o0(e){e&&q(E7,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var E7=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],T7=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],zc=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ri(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<zc.length;n++){var r=zc[n][1],a=zc[n][0];t[r]!=null&&(t[a]=t[r],process.env.NODE_ENV!=="production"&&ht(r,a))}}function a0(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&ht("label.margin","label.edgeDistance","pie"),e.edgeDistance=e.margin)}function i0(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,process.env.NODE_ENV!=="production"&&ht("downplay","blur","sunburst"))}function N7(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&ht("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),e.emphasis.focus="adjacency"))}function O2(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&O2(e[n].children,t)}function F2(e,t){_7(e,t),e.series=$t(e.series),q(e.series,function(n){if(Ce(n)){var r=n.type;if(r==="line")n.clipOverflow!=null&&(n.clip=n.clipOverflow,process.env.NODE_ENV!=="production"&&ht("clipOverflow","clip","line"));else if(r==="pie"||r==="gauge"){n.clockWise!=null&&(n.clockwise=n.clockWise,process.env.NODE_ENV!=="production"&&ht("clockWise","clockwise")),a0(n.label);var a=n.data;if(a&&!Ot(a))for(var i=0;i<a.length;i++)a0(a[i]);n.hoverOffset!=null&&(n.emphasis=n.emphasis||{},(n.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&ht("hoverOffset","emphasis.scaleSize"),n.emphasis.scaleSize=n.hoverOffset))}else if(r==="gauge"){var l=k7(n,"pointer.color");l!=null&&C7(n,"itemStyle.color",l)}else if(r==="bar"){ri(n),ri(n.backgroundStyle),ri(n.emphasis);var a=n.data;if(a&&!Ot(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(ri(a[i]),ri(a[i]&&a[i].emphasis))}else if(r==="sunburst"){var s=n.highlightPolicy;s&&(n.emphasis=n.emphasis||{},n.emphasis.focus||(n.emphasis.focus=s,process.env.NODE_ENV!=="production"&&ht("highlightPolicy","emphasis.focus","sunburst"))),i0(n),O2(n.data,i0)}else r==="graph"||r==="sankey"?N7(n):r==="map"&&(n.mapType&&!n.map&&(process.env.NODE_ENV!=="production"&&ht("mapType","map","map"),n.map=n.mapType),n.mapLocation&&(process.env.NODE_ENV!=="production"&&Yn("`mapLocation` is not used anymore."),$e(n,n.mapLocation)));n.hoverAnimation!=null&&(n.emphasis=n.emphasis||{},n.emphasis&&n.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&ht("hoverAnimation","emphasis.scale"),n.emphasis.scale=n.hoverAnimation)),o0(n)}}),e.dataRange&&(e.visualMap=e.dataRange),q(T7,function(n){var r=e[n];r&&(we(r)||(r=[r]),q(r,function(a){o0(a)}))})}function I7(e){var t=Ve();e.eachSeries(function(n){var r=n.get("stack");if(r){var a=t.get(r)||t.set(r,[]),i=n.getData(),l={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:n};if(!l.stackedDimension||!(l.isStackedByIndex||l.stackedByDimension))return;a.length&&i.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(l)}}),t.each(L7)}function L7(e){q(e,function(t,n){var r=[],a=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],l=t.data,s=t.isStackedByIndex,u=t.seriesModel.get("stackStrategy")||"samesign";l.modify(i,function(c,d,f){var v=l.get(t.stackedDimension,f);if(isNaN(v))return a;var p,h;s?h=l.getRawIndex(f):p=l.get(t.stackedByDimension,f);for(var m=NaN,g=n-1;g>=0;g--){var y=e[g];if(s||(h=y.data.rawIndexOf(y.stackedByDimension,p)),h>=0){var x=y.data.getByRawIndex(y.stackResultDimension,h);if(u==="all"||u==="positive"&&x>0||u==="negative"&&x<0||u==="samesign"&&v>=0&&x>0||u==="samesign"&&v<=0&&x<0){v=K8(v,x),m=x;break}}}return r[0]=v,r[1]=m,r})})}var Ru=(function(){function e(t){this.data=t.data||(t.sourceFormat===qn?{}:[]),this.sourceFormat=t.sourceFormat||P2,this.seriesLayoutBy=t.seriesLayoutBy||or,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var r=0;r<n.length;r++){var a=n[r];a.type==null&&B2(this,r)===kt.Must&&(a.type="ordinal")}}return e})();function Vv(e){return e instanceof Ru}function hf(e,t,n){n=n||H2(e);var r=t.seriesLayoutBy,a=M7(e,n,r,t.sourceHeader,t.dimensions),i=new Ru({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:Oe(t)});return i}function z2(e){return new Ru({data:e,sourceFormat:Ot(e)?rr:bn})}function A7(e){return new Ru({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Oe(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function H2(e){var t=P2;if(Ot(e))t=rr;else if(we(e)){e.length===0&&(t=Zt);for(var n=0,r=e.length;n<r;n++){var a=e[n];if(a!=null){if(we(a)||Ot(a)){t=Zt;break}else if(Ce(a)){t=An;break}}}}else if(Ce(e)){for(var i in e)if(Ca(e,i)&&qt(e[i])){t=qn;break}}return t}function M7(e,t,n,r,a){var i,l;if(!e)return{dimensionsDefine:l0(a),startIndex:l,dimensionsDetectedCount:i};if(t===Zt){var s=e;r==="auto"||r==null?s0(function(c){c!=null&&c!=="-"&&(_e(c)?l==null&&(l=1):l=0)},n,s,10):l=Qe(r)?r:r?1:0,!a&&l===1&&(a=[],s0(function(c,d){a[d]=c!=null?c+"":""},n,s,1/0)),i=a?a.length:n===za?s.length:s[0]?s[0].length:null}else if(t===An)a||(a=V7(e));else if(t===qn)a||(a=[],q(e,function(c,d){a.push(d)}));else if(t===bn){var u=fl(e[0]);i=we(u)&&u.length||1}else t===rr&&process.env.NODE_ENV!=="production"&&Pe(!!a,"dimensions must be given if data is TypedArray.");return{startIndex:l,dimensionsDefine:l0(a),dimensionsDetectedCount:i}}function V7(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Fe(n)}function l0(e){if(e){var t=Ve();return ge(e,function(n,r){n=Ce(n)?n:{name:n};var a={name:n.name,displayName:n.displayName,type:n.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=t.get(a.name);return i?a.name+="-"+i.count++:t.set(a.name,{count:1}),a})}}function s0(e,t,n,r){if(t===za)for(var a=0;a<n.length&&a<r;a++)e(n[a]?n[a][0]:null,a);else for(var i=n[0]||[],a=0;a<i.length&&a<r;a++)e(i[a],a)}function G2(e){var t=e.sourceFormat;return t===An||t===qn}var vo,po,ho,u0,c0,U2=(function(){function e(t,n){var r=Vv(t)?t:z2(t);this._source=r;var a=this._data=r.data;if(r.sourceFormat===rr){if(process.env.NODE_ENV!=="production"&&n==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=n,this._data=a}c0(this,a,r)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,n){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=(function(){var t=e.prototype;t.pure=!1,t.persistent=!0})(),e.internalField=(function(){var t;c0=function(l,s,u){var c=u.sourceFormat,d=u.seriesLayoutBy,f=u.startIndex,v=u.dimensionsDefine,p=u0[Pv(c,d)];if(process.env.NODE_ENV!=="production"&&Pe(p,"Invalide sourceFormat: "+c),fe(l,p),c===rr)l.getItem=n,l.count=a,l.fillStorage=r;else{var h=W2(c,d);l.getItem=dt(h,null,s,f,v);var m=Y2(c,d);l.count=dt(m,null,s,f,v)}};var n=function(l,s){l=l-this._offset,s=s||[];for(var u=this._data,c=this._dimSize,d=c*l,f=0;f<c;f++)s[f]=u[d+f];return s},r=function(l,s,u,c){for(var d=this._data,f=this._dimSize,v=0;v<f;v++){for(var p=c[v],h=p[0]==null?1/0:p[0],m=p[1]==null?-1/0:p[1],g=s-l,y=u[v],x=0;x<g;x++){var b=d[x*f+v];y[l+x]=b,b<h&&(h=b),b>m&&(m=b)}p[0]=h,p[1]=m}},a=function(){return this._data?this._data.length/this._dimSize:0};u0=(t={},t[Zt+"_"+or]={pure:!0,appendData:i},t[Zt+"_"+za]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[An]={pure:!0,appendData:i},t[qn]={pure:!0,appendData:function(l){var s=this._data;q(l,function(u,c){for(var d=s[c]||(s[c]=[]),f=0;f<(u||[]).length;f++)d.push(u[f])})}},t[bn]={appendData:i},t[rr]={persistent:!1,pure:!0,appendData:function(l){process.env.NODE_ENV!=="production"&&Pe(Ot(l),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=l},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(l){for(var s=0;s<l.length;s++)this._data.push(l[s])}})(),e})(),d0=function(e,t,n,r){return e[r]},P7=(vo={},vo[Zt+"_"+or]=function(e,t,n,r){return e[r+t]},vo[Zt+"_"+za]=function(e,t,n,r,a){r+=t;for(var i=a||[],l=e,s=0;s<l.length;s++){var u=l[s];i[s]=u?u[r]:null}return i},vo[An]=d0,vo[qn]=function(e,t,n,r,a){for(var i=a||[],l=0;l<n.length;l++){var s=n[l].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var u=e[s];i[l]=u?u[r]:null}return i},vo[bn]=d0,vo);function W2(e,t){var n=P7[Pv(e,t)];return process.env.NODE_ENV!=="production"&&Pe(n,'Do not support get item on "'+e+'", "'+t+'".'),n}var f0=function(e,t,n){return e.length},D7=(po={},po[Zt+"_"+or]=function(e,t,n){return Math.max(0,e.length-t)},po[Zt+"_"+za]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},po[An]=f0,po[qn]=function(e,t,n){var r=n[0].name;if(process.env.NODE_ENV!=="production"&&r==null)throw new Error;var a=e[r];return a?a.length:0},po[bn]=f0,po);function Y2(e,t){var n=D7[Pv(e,t)];return process.env.NODE_ENV!=="production"&&Pe(n,'Do not support count on "'+e+'", "'+t+'".'),n}var Hc=function(e,t,n){return e[t]},B7=(ho={},ho[Zt]=Hc,ho[An]=function(e,t,n){return e[n]},ho[qn]=Hc,ho[bn]=function(e,t,n){var r=fl(e);return r instanceof Array?r[t]:r},ho[rr]=Hc,ho);function X2(e){var t=B7[e];return process.env.NODE_ENV!=="production"&&Pe(t,'Do not support get value on "'+e+'".'),t}function Pv(e,t){return e===Zt?e+"_"+t:e}function Ma(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var a=e.getStore(),i=a.getSource().sourceFormat;if(n!=null){var l=e.getDimensionIndex(n),s=a.getDimensionProperty(l);return X2(i)(r,l,s)}else{var u=r;return i===bn&&(u=fl(r)),u}}}}var R7=/\{@(.+?)\}/g,$7=(function(){function e(){}return e.prototype.getDataParams=function(t,n){var r=this.getData(n),a=this.getRawValue(t,n),i=r.getRawIndex(t),l=r.getName(t),s=r.getRawDataItem(t),u=r.getItemVisual(t,"style"),c=u&&u[r.getItemVisual(t,"drawType")||"fill"],d=u&&u.stroke,f=this.mainType,v=f==="series",p=r.userOutput&&r.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:l,dataIndex:i,data:s,dataType:n,value:a,color:c,borderColor:d,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,n,r,a,i,l){n=n||"normal";var s=this.getData(r),u=this.getDataParams(t,r);if(l&&(u.value=l.interpolatedValue),a!=null&&we(u.value)&&(u.value=u.value[a]),!i){var c=s.getItemModel(t);i=c.get(n==="normal"?["label","formatter"]:[n,"label","formatter"])}if(Ae(i))return u.status=n,u.dimensionIndex=a,i(u);if(_e(i)){var d=Z_(i,u);return d.replace(R7,function(f,v){var p=v.length,h=v;h.charAt(0)==="["&&h.charAt(p-1)==="]"&&(h=+h.slice(1,p-1),process.env.NODE_ENV!=="production"&&isNaN(h)&&Vt("Invalide label formatter: @"+v+", only support @[0], @[1], @[2], ..."));var m=Ma(s,t,h);if(l&&we(l.interpolatedValue)){var g=s.getDimensionIndex(h);g>=0&&(m=l.interpolatedValue[g])}return m!=null?m+"":""})}},e.prototype.getRawValue=function(t,n){return Ma(this.getData(n),t)},e.prototype.formatTooltip=function(t,n,r){},e})();function Oi(e){return new O7(e)}var O7=(function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!r&&(i=this._plan(this.context));var l=d(this._modBy),s=this._modDataCount||0,u=d(t&&t.modBy),c=t&&t.modDataCount||0;(l!==u||s!==c)&&(i="reset");function d(x){return!(x>=1)&&(x=1),x}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(r)),this._modBy=u,this._modDataCount=c;var v=t&&t.step;if(n?(process.env.NODE_ENV!=="production"&&Pe(n._outputDueEnd!=null),this._dueEnd=n._outputDueEnd):(process.env.NODE_ENV!=="production"&&Pe(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var p=this._dueIndex,h=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!r&&(f||p<h)){var m=this._progress;if(we(m))for(var g=0;g<m.length;g++)this._doProgress(m[g],p,h,u,c);else this._doProgress(m,p,h,u,c)}this._dueIndex=h;var y=this._settedOutputEnd!=null?this._settedOutputEnd:h;process.env.NODE_ENV!=="production"&&Pe(y>=this._outputDueEnd),this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,n,r,a,i){v0.reset(n,r,a,i),this._callingProgress=t,this._callingProgress({start:n,end:r,count:r-n,next:v0.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var n,r;!t&&this._reset&&(n=this._reset(this.context),n&&n.progress&&(r=n.forceFirstProgress,n=n.progress),we(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),r},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){process.env.NODE_ENV!=="production"&&Pe(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e})(),v0=(function(){var e,t,n,r,a,i={reset:function(u,c,d,f){t=u,e=c,n=d,r=f,a=Math.ceil(r/n),i.next=n>1&&r>0?s:l}};return i;function l(){return t<e?t++:null}function s(){var u=t%a*n+Math.ceil(t/a),c=t>=e?null:u<r?u:t;return t++,c}})();function ws(e,t){var n=t&&t.type;return n==="ordinal"?e:(n==="time"&&!Qe(e)&&e!=null&&e!=="-"&&(e=+Rr(e)),e==null||e===""?NaN:Number(e))}Ve({number:function(e){return parseFloat(e)},time:function(e){return+Rr(e)},trim:function(e){return _e(e)?_r(e):e}});var F7=(function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,n){},e.prototype.retrieveValueFromItem=function(t,n){},e.prototype.convertValue=function(t,n){return ws(t,n)},e})();function z7(e,t){var n=new F7,r=e.data,a=n.sourceFormat=e.sourceFormat,i=e.startIndex,l="";e.seriesLayoutBy!==or&&(process.env.NODE_ENV!=="production"&&(l='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Kt(l));var s=[],u={},c=e.dimensionsDefine;if(c)q(c,function(m,g){var y=m.name,x={index:g,name:y,displayName:m.displayName};if(s.push(x),y!=null){var b="";Ca(u,y)&&(process.env.NODE_ENV!=="production"&&(b='dimension name "'+y+'" duplicated.'),Kt(b)),u[y]=x}});else for(var d=0;d<e.dimensionsDetectedCount;d++)s.push({index:d});var f=W2(a,or);t.__isBuiltIn&&(n.getRawDataItem=function(m){return f(r,i,s,m)},n.getRawData=dt(H7,null,e)),n.cloneRawData=dt(G7,null,e);var v=Y2(a,or);n.count=dt(v,null,r,i,s);var p=X2(a);n.retrieveValue=function(m,g){var y=f(r,i,s,m);return h(y,g)};var h=n.retrieveValueFromItem=function(m,g){if(m!=null){var y=s[g];if(y)return p(m,g,y.name)}};return n.getDimensionInfo=dt(U7,null,s,u),n.cloneAllDimensionInfo=dt(W7,null,s),n}function H7(e){var t=e.sourceFormat;if(!Dv(t)){var n="";process.env.NODE_ENV!=="production"&&(n="`getRawData` is not supported in source format "+t),Kt(n)}return e.data}function G7(e){var t=e.sourceFormat,n=e.data;if(!Dv(t)){var r="";process.env.NODE_ENV!=="production"&&(r="`cloneRawData` is not supported in source format "+t),Kt(r)}if(t===Zt){for(var a=[],i=0,l=n.length;i<l;i++)a.push(n[i].slice());return a}else if(t===An){for(var a=[],i=0,l=n.length;i<l;i++)a.push(fe({},n[i]));return a}}function U7(e,t,n){if(n!=null){if(Qe(n)||!isNaN(n)&&!Ca(t,n))return e[n];if(Ca(t,n))return t[n]}}function W7(e){return Oe(e)}var q2=Ve();function Y7(e){e=Oe(e);var t=e.type,n="";t||(process.env.NODE_ENV!=="production"&&(n="Must have a `type` when `registerTransform`."),Kt(n));var r=t.split(":");r.length!==2&&(process.env.NODE_ENV!=="production"&&(n='Name must include namespace like "ns:regression".'),Kt(n));var a=!1;r[0]==="echarts"&&(t=r[1],a=!0),e.__isBuiltIn=a,q2.set(t,e)}function X7(e,t,n){var r=$t(e),a=r.length,i="";a||(process.env.NODE_ENV!=="production"&&(i="If `transform` declared, it should at least contain one transform."),Kt(i));for(var l=0,s=a;l<s;l++){var u=r[l];t=q7(u,t,n,a===1?null:l),l!==s-1&&(t.length=Math.max(t.length,1))}return t}function q7(e,t,n,r){var a="";t.length||(process.env.NODE_ENV!=="production"&&(a="Must have at least one upstream dataset."),Kt(a)),Ce(e)||(process.env.NODE_ENV!=="production"&&(a="transform declaration must be an object rather than "+typeof e+"."),Kt(a));var i=e.type,l=q2.get(i);l||(process.env.NODE_ENV!=="production"&&(a='Can not find transform on type "'+i+'".'),Kt(a));var s=ge(t,function(d){return z7(d,l)}),u=$t(l.transform({upstream:s[0],upstreamList:s,config:Oe(e.config)}));if(process.env.NODE_ENV!=="production"&&e.print){var c=ge(u,function(d){var f=r!=null?" === pipe index: "+r:"";return["=== dataset index: "+n.datasetIndex+f+" ===","- transform result data:",ef(d.data),"- transform result dimensions:",ef(d.dimensions)].join(`
|
|
31
|
+
`)}).join(`
|
|
32
|
+
`);a6(c)}return ge(u,function(d,f){var v="";Ce(d)||(process.env.NODE_ENV!=="production"&&(v="A transform should not return some empty results."),Kt(v)),d.data||(process.env.NODE_ENV!=="production"&&(v="Transform result data should be not be null or undefined"),Kt(v));var p=H2(d.data);Dv(p)||(process.env.NODE_ENV!=="production"&&(v="Transform result data should be array rows or object rows."),Kt(v));var h,m=t[0];if(m&&f===0&&!d.dimensions){var g=m.startIndex;g&&(d.data=m.data.slice(0,g).concat(d.data)),h={seriesLayoutBy:or,sourceHeader:g,dimensions:m.metaRawOption.dimensions}}else h={seriesLayoutBy:or,sourceHeader:0,dimensions:d.dimensions};return hf(d.data,h,null)})}function Dv(e){return e===Zt||e===An}var $u="undefined",Z7=typeof Uint32Array===$u?Array:Uint32Array,j7=typeof Uint16Array===$u?Array:Uint16Array,Z2=typeof Int32Array===$u?Array:Int32Array,p0=typeof Float64Array===$u?Array:Float64Array,j2={float:p0,int:Z2,ordinal:Array,number:Array,time:p0},Gc;function Jo(e){return e>65535?Z7:j7}function Ko(){return[1/0,-1/0]}function J7(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function h0(e,t,n,r,a){var i=j2[n||"float"];if(a){var l=e[t],s=l&&l.length;if(s!==r){for(var u=new i(r),c=0;c<s;c++)u[c]=l[c];e[t]=u}}else e[t]=new i(r)}var mf=(function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ve()}return e.prototype.initData=function(t,n,r){process.env.NODE_ENV!=="production"&&Pe(Ae(t.getItem)&&Ae(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=t.getSource(),i=this.defaultDimValueGetter=Gc[a.sourceFormat];this._dimValueGetter=r||i,this._rawExtent=[];var l=G2(a);this._dimensions=ge(n,function(s){return process.env.NODE_ENV!=="production"&&l&&Pe(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,n){var r=this._calcDimNameToIdx,a=this._dimensions,i=r.get(t);if(i!=null){if(a[i].type===n)return i}else i=a.length;return a[i]={type:n},r.set(t,i),this._chunks[i]=new j2[n||"float"](this._rawCount),this._rawExtent[i]=Ko(),i},e.prototype.collectOrdinalMeta=function(t,n){var r=this._chunks[t],a=this._dimensions[t],i=this._rawExtent,l=a.ordinalOffset||0,s=r.length;l===0&&(i[t]=Ko());for(var u=i[t],c=l;c<s;c++){var d=r[c]=n.parseAndCollect(r[c]);isNaN(d)||(u[0]=Math.min(d,u[0]),u[1]=Math.max(d,u[1]))}a.ordinalMeta=n,a.ordinalOffset=s,a.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var n=this._dimensions[t],r=n.ordinalMeta;return r},e.prototype.getDimensionProperty=function(t){var n=this._dimensions[t];return n&&n.property},e.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&Pe(!this._indices,"appendData can only be called on raw data.");var n=this._provider,r=this.count();n.appendData(t);var a=n.count();return n.persistent||(a+=r),r<a&&this._initDataFromProvider(r,a,!0),[r,a]},e.prototype.appendValues=function(t,n){for(var r=this._chunks,a=this._dimensions,i=a.length,l=this._rawExtent,s=this.count(),u=s+Math.max(t.length,n||0),c=0;c<i;c++){var d=a[c];h0(r,c,d.type,u,!0)}for(var f=[],v=s;v<u;v++)for(var p=v-s,h=0;h<i;h++){var d=a[h],m=Gc.arrayRows.call(this,t[p]||f,d.property,p,h);r[h][v]=m;var g=l[h];m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}return this._rawCount=this._count=u,{start:s,end:u}},e.prototype._initDataFromProvider=function(t,n,r){for(var a=this._provider,i=this._chunks,l=this._dimensions,s=l.length,u=this._rawExtent,c=ge(l,function(x){return x.property}),d=0;d<s;d++){var f=l[d];u[d]||(u[d]=Ko()),h0(i,d,f.type,n,r)}if(a.fillStorage)a.fillStorage(t,n,i,u);else for(var v=[],p=t;p<n;p++){v=a.getItem(p,v);for(var h=0;h<s;h++){var m=i[h],g=this._dimValueGetter(v,c[h],p,h);m[p]=g;var y=u[h];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=n,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,n){if(!(n>=0&&n<this._count))return NaN;var r=this._chunks[t];return r?r[this.getRawIndex(n)]:NaN},e.prototype.getValues=function(t,n){var r=[],a=[];if(n==null){n=t,t=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=t;for(var i=0,l=a.length;i<l;i++)r.push(this.get(a[i],n));return r},e.prototype.getByRawIndex=function(t,n){if(!(n>=0&&n<this._rawCount))return NaN;var r=this._chunks[t];return r?r[n]:NaN},e.prototype.getSum=function(t){var n=this._chunks[t],r=0;if(n)for(var a=0,i=this.count();a<i;a++){var l=this.get(t,a);isNaN(l)||(r+=l)}return r},e.prototype.getMedian=function(t){var n=[];this.each([t],function(i){isNaN(i)||n.push(i)});var r=n.sort(function(i,l){return i-l}),a=this.count();return a===0?0:a%2===1?r[(a-1)/2]:(r[a/2]+r[a/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,r=n[t];if(r!=null&&r<this._count&&r===t)return t;for(var a=0,i=this._count-1;a<=i;){var l=(a+i)/2|0;if(n[l]<t)a=l+1;else if(n[l]>t)i=l-1;else return l}return-1},e.prototype.indicesOfNearest=function(t,n,r){var a=this._chunks,i=a[t],l=[];if(!i)return l;r==null&&(r=1/0);for(var s=1/0,u=-1,c=0,d=0,f=this.count();d<f;d++){var v=this.getRawIndex(d),p=n-i[v],h=Math.abs(p);h<=r&&((h<s||h===s&&p>=0&&u<0)&&(s=h,u=p,c=0),p===u&&(l[c++]=d))}return l.length=c,l},e.prototype.getIndices=function(){var t,n=this._indices;if(n){var r=n.constructor,a=this._count;if(r===Array){t=new r(a);for(var i=0;i<a;i++)t[i]=n[i]}else t=new r(n.buffer,0,a)}else{var r=Jo(this._rawCount);t=new r(this.count());for(var i=0;i<t.length;i++)t[i]=i}return t},e.prototype.filter=function(t,n){if(!this._count)return this;for(var r=this.clone(),a=r.count(),i=Jo(r._rawCount),l=new i(a),s=[],u=t.length,c=0,d=t[0],f=r._chunks,v=0;v<a;v++){var p=void 0,h=r.getRawIndex(v);if(u===0)p=n(v);else if(u===1){var m=f[d][h];p=n(m,v)}else{for(var g=0;g<u;g++)s[g]=f[t[g]][h];s[g]=v,p=n.apply(null,s)}p&&(l[c++]=h)}return c<a&&(r._indices=l),r._count=c,r._extent=[],r._updateGetRawIdx(),r},e.prototype.selectRange=function(t){var n=this.clone(),r=n._count;if(!r)return this;var a=Fe(t),i=a.length;if(!i)return this;var l=n.count(),s=Jo(n._rawCount),u=new s(l),c=0,d=a[0],f=t[d][0],v=t[d][1],p=n._chunks,h=!1;if(!n._indices){var m=0;if(i===1){for(var g=p[a[0]],y=0;y<r;y++){var x=g[y];(x>=f&&x<=v||isNaN(x))&&(u[c++]=m),m++}h=!0}else if(i===2){for(var g=p[a[0]],b=p[a[1]],S=t[a[1]][0],_=t[a[1]][1],y=0;y<r;y++){var x=g[y],k=b[y];(x>=f&&x<=v||isNaN(x))&&(k>=S&&k<=_||isNaN(k))&&(u[c++]=m),m++}h=!0}}if(!h)if(i===1)for(var y=0;y<l;y++){var w=n.getRawIndex(y),x=p[a[0]][w];(x>=f&&x<=v||isNaN(x))&&(u[c++]=w)}else for(var y=0;y<l;y++){for(var C=!0,w=n.getRawIndex(y),E=0;E<i;E++){var L=a[E],x=p[L][w];(x<t[L][0]||x>t[L][1])&&(C=!1)}C&&(u[c++]=n.getRawIndex(y))}return c<l&&(n._indices=u),n._count=c,n._extent=[],n._updateGetRawIdx(),n},e.prototype.map=function(t,n){var r=this.clone(t);return this._updateDims(r,t,n),r},e.prototype.modify=function(t,n){this._updateDims(this,t,n)},e.prototype._updateDims=function(t,n,r){for(var a=t._chunks,i=[],l=n.length,s=t.count(),u=[],c=t._rawExtent,d=0;d<n.length;d++)c[n[d]]=Ko();for(var f=0;f<s;f++){for(var v=t.getRawIndex(f),p=0;p<l;p++)u[p]=a[n[p]][v];u[l]=f;var h=r&&r.apply(null,u);if(h!=null){typeof h!="object"&&(i[0]=h,h=i);for(var d=0;d<h.length;d++){var m=n[d],g=h[d],y=c[m],x=a[m];x&&(x[v]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},e.prototype.lttbDownSample=function(t,n){var r=this.clone([t],!0),a=r._chunks,i=a[t],l=this.count(),s=0,u=Math.floor(1/n),c=this.getRawIndex(0),d,f,v,p=new(Jo(this._rawCount))(Math.min((Math.ceil(l/u)+2)*2,l));p[s++]=c;for(var h=1;h<l-1;h+=u){for(var m=Math.min(h+u,l-1),g=Math.min(h+u*2,l),y=(g+m)/2,x=0,b=m;b<g;b++){var S=this.getRawIndex(b),_=i[S];isNaN(_)||(x+=_)}x/=g-m;var k=h,w=Math.min(h+u,l),C=h-1,E=i[c];d=-1,v=k;for(var L=-1,N=0,b=k;b<w;b++){var S=this.getRawIndex(b),_=i[S];if(isNaN(_)){N++,L<0&&(L=S);continue}f=Math.abs((C-y)*(_-E)-(C-b)*(x-E)),f>d&&(d=f,v=S)}N>0&&N<w-k&&(p[s++]=Math.min(L,v),v=Math.max(L,v)),p[s++]=v,c=v}return p[s++]=this.getRawIndex(l-1),r._count=s,r._indices=p,r.getRawIndex=this._getRawIdx,r},e.prototype.minmaxDownSample=function(t,n){for(var r=this.clone([t],!0),a=r._chunks,i=Math.floor(1/n),l=a[t],s=this.count(),u=new(Jo(this._rawCount))(Math.ceil(s/i)*2),c=0,d=0;d<s;d+=i){var f=d,v=l[this.getRawIndex(f)],p=d,h=l[this.getRawIndex(p)],m=i;d+i>s&&(m=s-d);for(var g=0;g<m;g++){var y=this.getRawIndex(d+g),x=l[y];x<v&&(v=x,f=d+g),x>h&&(h=x,p=d+g)}var b=this.getRawIndex(f),S=this.getRawIndex(p);f<p?(u[c++]=b,u[c++]=S):(u[c++]=S,u[c++]=b)}return r._count=c,r._indices=u,r._updateGetRawIdx(),r},e.prototype.downSample=function(t,n,r,a){for(var i=this.clone([t],!0),l=i._chunks,s=[],u=Math.floor(1/n),c=l[t],d=this.count(),f=i._rawExtent[t]=Ko(),v=new(Jo(this._rawCount))(Math.ceil(d/u)),p=0,h=0;h<d;h+=u){u>d-h&&(u=d-h,s.length=u);for(var m=0;m<u;m++){var g=this.getRawIndex(h+m);s[m]=c[g]}var y=r(s),x=this.getRawIndex(Math.min(h+a(s,y)||0,d-1));c[x]=y,y<f[0]&&(f[0]=y),y>f[1]&&(f[1]=y),v[p++]=x}return i._count=p,i._indices=v,i._updateGetRawIdx(),i},e.prototype.each=function(t,n){if(this._count)for(var r=t.length,a=this._chunks,i=0,l=this.count();i<l;i++){var s=this.getRawIndex(i);switch(r){case 0:n(i);break;case 1:n(a[t[0]][s],i);break;case 2:n(a[t[0]][s],a[t[1]][s],i);break;default:for(var u=0,c=[];u<r;u++)c[u]=a[t[u]][s];c[u]=i,n.apply(null,c)}}},e.prototype.getDataExtent=function(t){var n=this._chunks[t],r=Ko();if(!n)return r;var a=this.count(),i=!this._indices,l;if(i)return this._rawExtent[t].slice();if(l=this._extent[t],l)return l.slice();l=r;for(var s=l[0],u=l[1],c=0;c<a;c++){var d=this.getRawIndex(c),f=n[d];f<s&&(s=f),f>u&&(u=f)}return l=[s,u],this._extent[t]=l,l},e.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var r=[],a=this._chunks,i=0;i<a.length;i++)r.push(a[i][n]);return r},e.prototype.clone=function(t,n){var r=new e,a=this._chunks,i=t&&Dr(t,function(s,u){return s[u]=!0,s},{});if(i)for(var l=0;l<a.length;l++)r._chunks[l]=i[l]?J7(a[l]):a[l];else r._chunks=a;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Oe(this._extent),t._rawExtent=Oe(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,n=void 0;if(t===Array){var r=this._indices.length;n=new t(r);for(var a=0;a<r;a++)n[a]=this._indices[a]}else n=new t(this._indices);return n}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(n,r,a,i){return ws(n[i],this._dimensions[i])}Gc={arrayRows:t,objectRows:function(n,r,a,i){return ws(n[r],this._dimensions[i])},keyedColumns:t,original:function(n,r,a,i){var l=n&&(n.value==null?n:n.value);return ws(l instanceof Array?l[i]:l,this._dimensions[i])},typedArray:function(n,r,a,i){return n[i]}}})(),e})(),K7=(function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,n=this._getUpstreamSourceManagers(),r=!!n.length,a,i;if(oi(t)){var l=t,s=void 0,u=void 0,c=void 0;if(r){var d=n[0];d.prepareSource(),c=d.getSource(),s=c.data,u=c.sourceFormat,i=[d._getVersionSign()]}else s=l.get("data",!0),u=Ot(s)?rr:bn,i=[];var f=this._getSourceMetaRawOption()||{},v=c&&c.metaRawOption||{},p=ke(f.seriesLayoutBy,v.seriesLayoutBy)||null,h=ke(f.sourceHeader,v.sourceHeader),m=ke(f.dimensions,v.dimensions),g=p!==v.seriesLayoutBy||!!h!=!!v.sourceHeader||m;a=g?[hf(s,{seriesLayoutBy:p,sourceHeader:h,dimensions:m},u)]:[]}else{var y=t;if(r){var x=this._applyTransform(n);a=x.sourceList,i=x.upstreamSignList}else{var b=y.get("source",!0);a=[hf(b,this._getSourceMetaRawOption(),null)],i=[]}}process.env.NODE_ENV!=="production"&&Pe(a&&i),this._setLocalSource(a,i)},e.prototype._applyTransform=function(t){var n=this._sourceHost,r=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&Pe(a!=null||r!=null),a!=null){var i="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),m0(i))}var l,s=[],u=[];return q(t,function(c){c.prepareSource();var d=c.getSource(a||0),f="";a!=null&&!d&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+a),m0(f)),s.push(d),u.push(c._getVersionSign())}),r?l=X7(r,s,{datasetIndex:n.componentIndex}):a!=null&&(l=[A7(s[0])]),{sourceList:l,upstreamSignList:u}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n<t.length;n++){var r=t[n];if(r._isDirty()||this._upstreamSignList[n]!==r._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var n=this._sourceList[t];if(!n){var r=this._getUpstreamSourceManagers();return r[0]&&r[0].getSource(t)}return n},e.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&Pe(oi(this._sourceHost),"Can only call getDataStore on series source manager.");var n=t.makeStoreSchema();return this._innerGetDataStore(n.dimensions,t.source,n.hash)},e.prototype._innerGetDataStore=function(t,n,r){var a=0,i=this._storeList,l=i[a];l||(l=i[a]={});var s=l[r];if(!s){var u=this._getUpstreamSourceManagers()[0];oi(this._sourceHost)&&u?s=u._innerGetDataStore(t,n,r):(s=new mf,s.initData(new U2(n,t.length),t)),l[r]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(oi(t)){var n=Iv(t);return n?[n.getSourceManager()]:[]}else return ge(o7(t),function(r){return r.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,n,r,a;if(oi(t))n=t.get("seriesLayoutBy",!0),r=t.get("sourceHeader",!0),a=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=t;n=i.get("seriesLayoutBy",!0),r=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:n,sourceHeader:r,dimensions:a}},e})();function oi(e){return e.mainType==="series"}function m0(e){throw new Error(e)}function el(e,t){return t.type=e,t}function J2(e,t){var n=e.getData().getItemVisual(t,"style"),r=n[e.visualDrawType];return vf(r)}function Q7(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),l=i.length,s=t.getRawValue(n),u=we(s),c=J2(t,n),d,f,v,p;if(l>1||u&&!l){var h=ek(s,t,n,i,c);d=h.inlineValues,f=h.inlineValueTypes,v=h.blocks,p=h.inlineValues[0]}else if(l){var m=a.getDimensionInfo(i[0]);p=d=Ma(a,n,i[0]),f=m.type}else p=d=u?s[0]:s;var g=fv(t),y=g&&t.name||"",x=a.getName(n),b=r?y:x;return el("section",{header:y,noHeader:r||!g,sortParam:p,blocks:[el("nameValue",{markerType:"item",markerColor:c,name:b,noName:!_r(b),value:d,valueType:f,dataIndex:n})].concat(v||[])})}function ek(e,t,n,r,a){var i=t.getData(),l=Dr(e,function(f,v,p){var h=i.getDimensionInfo(p);return f=f||h&&h.tooltip!==!1&&h.displayName!=null},!1),s=[],u=[],c=[];r.length?q(r,function(f){d(Ma(i,n,f),f)}):q(e,d);function d(f,v){var p=i.getDimensionInfo(v);!p||p.otherDims.tooltip===!1||(l?c.push(el("nameValue",{markerType:"subItem",markerColor:a,name:p.displayName,value:f,valueType:p.type})):(s.push(f),u.push(p.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:c}}var fr=_t();function Ul(e,t){return e.getName(t)||e.getId(t)}var tk="__universalTransitionEnabled",rn=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}return t.prototype.init=function(n,r,a){this.seriesIndex=this.componentIndex,this.dataTask=Oi({count:rk,reset:ok}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(n,a);var i=fr(this).sourceManager=new K7(this);i.prepareSource();var l=this.getInitialData(n,a);y0(l,this),this.dataTask.context.data=l,process.env.NODE_ENV!=="production"&&Pe(l,"getInitialData returned invalid data."),fr(this).dataBeforeProcessed=l,g0(this),this._initSelectedMapFromData(l)},t.prototype.mergeDefaultAndTheme=function(n,r){var a=Ki(this),i=a?Bu(n):{},l=this.subType;Ye.hasClass(l)&&(l+="Series"),je(n,r.getTheme().get(this.subType)),je(n,this.getDefaultOption()),tf(n,"label",["show"]),this.fillDataTextStyle(n.data),a&&Aa(n,i,a)},t.prototype.mergeOption=function(n,r){n=je(this.option,n,!0),this.fillDataTextStyle(n.data);var a=Ki(this);a&&Aa(this.option,n,a);var i=fr(this).sourceManager;i.dirty(),i.prepareSource();var l=this.getInitialData(n,r);y0(l,this),this.dataTask.dirty(),this.dataTask.context.data=l,fr(this).dataBeforeProcessed=l,g0(this),this._initSelectedMapFromData(l)},t.prototype.fillDataTextStyle=function(n){if(n&&!Ot(n))for(var r=["show"],a=0;a<n.length;a++)n[a]&&n[a].label&&tf(n[a],"label",r)},t.prototype.getInitialData=function(n,r){},t.prototype.appendData=function(n){var r=this.getRawData();r.appendData(n.data)},t.prototype.getData=function(n){var r=gf(this);if(r){var a=r.context.data;return n==null||!a.getLinkedData?a:a.getLinkedData(n)}else return fr(this).data},t.prototype.getAllData=function(){var n=this.getData();return n&&n.getLinkedDataAll?n.getLinkedDataAll():[{data:n}]},t.prototype.setData=function(n){var r=gf(this);if(r){var a=r.context;a.outputData=n,r!==this.dataTask&&(a.data=n)}fr(this).data=n},t.prototype.getEncode=function(){var n=this.get("encode",!0);if(n)return Ve(n)},t.prototype.getSourceManager=function(){return fr(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return fr(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var n=this.get("colorBy");return n||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var n=this.coordinateSystem;return n&&n.getBaseAxis&&n.getBaseAxis()},t.prototype.formatTooltip=function(n,r,a){return Q7({series:this,dataIndex:n,multipleSeries:r})},t.prototype.isAnimationEnabled=function(){var n=this.ecModel;if(He.node&&!(n&&n.ssr))return!1;var r=this.getShallow("animation");return r&&this.getData().count()>this.getShallow("animationThreshold")&&(r=!1),!!r},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(n,r,a){var i=this.ecModel,l=Lv.prototype.getColorFromPalette.call(this,n,r,a);return l||(l=i.getColorFromPalette(n,r,a)),l},t.prototype.coordDimToDataDim=function(n){return this.getRawData().mapDimensionsAll(n)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(n,r){this._innerSelect(this.getData(r),n)},t.prototype.unselect=function(n,r){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,l=this.getData(r);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<n.length;s++){var u=n[s],c=Ul(l,u);a[c]=!1,this._selectedDataIndicesMap[c]=-1}}},t.prototype.toggleSelect=function(n,r){for(var a=[],i=0;i<n.length;i++)a[0]=n[i],this.isSelected(n[i],r)?this.unselect(a,r):this.select(a,r)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var n=this._selectedDataIndicesMap,r=Fe(n),a=[],i=0;i<r.length;i++){var l=n[r[i]];l>=0&&a.push(l)}return a},t.prototype.isSelected=function(n,r){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(r);return(a==="all"||a[Ul(i,n)])&&!i.getItemModel(n).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[tk])return!0;var n=this.option.universalTransition;return n?n===!0?!0:n&&n.enabled:!1},t.prototype._innerSelect=function(n,r){var a,i,l=this.option,s=l.selectedMode,u=r.length;if(!(!s||!u)){if(s==="series")l.selectedMap="all";else if(s==="multiple"){Ce(l.selectedMap)||(l.selectedMap={});for(var c=l.selectedMap,d=0;d<u;d++){var f=r[d],v=Ul(n,f);c[v]=!0,this._selectedDataIndicesMap[v]=n.getRawIndex(f)}}else if(s==="single"||s===!0){var p=r[u-1],v=Ul(n,p);l.selectedMap=(a={},a[v]=!0,a),this._selectedDataIndicesMap=(i={},i[v]=n.getRawIndex(p),i)}}},t.prototype._initSelectedMapFromData=function(n){if(!this.option.selectedMap){var r=[];n.hasItemOption&&n.each(function(a){var i=n.getRawDataItem(a);i&&i.selected&&r.push(a)}),r.length>0&&this._innerSelect(n,r)}},t.registerClass=function(n){return Ye.registerClass(n)},t.protoInitialize=(function(){var n=t.prototype;n.type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",n.visualDrawType="fill"})(),t})(Ye);Nn(rn,$7);Nn(rn,Lv);Rg(rn,Ye);function g0(e){var t=e.name;fv(e)||(e.name=nk(e)||t)}function nk(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return q(n,function(a){var i=t.getDimensionInfo(a);i.displayName&&r.push(i.displayName)}),r.join(" ")}function rk(e){return e.model.getRawData().count()}function ok(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ak}function ak(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function y0(e,t){q(Eb(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Qt(ik,t))})}function ik(e,t){var n=gf(e);return n&&n.setOutputEnd((t||this).count()),t}function gf(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var a=r.agentStubMap;a&&(r=a.get(e.uid))}return r}}var ar=(function(){function e(){this.group=new yt,this.uid=Au("viewComponent")}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,a){},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,a){},e.prototype.updateLayout=function(t,n,r,a){},e.prototype.updateVisual=function(t,n,r,a){},e.prototype.toggleBlurSeries=function(t,n,r){},e.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},e})();vv(ar);xu(ar);function Bv(){var e=_t();return function(t){var n=e(t),r=t.pipelineContext,a=!!n.large,i=!!n.progressiveRender,l=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(a!==l||i!==s)&&"reset"}}var K2=_t(),lk=Bv(),Xt=(function(){function e(){this.group=new yt,this.uid=Au("viewChart"),this.renderTask=Oi({plan:sk,reset:uk}),this.renderTask.context={view:this}}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,a){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},e.prototype.highlight=function(t,n,r,a){var i=t.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&Vt("Unknown dataType "+a.dataType);return}w0(i,a,"emphasis")},e.prototype.downplay=function(t,n,r,a){var i=t.getData(a&&a.dataType);if(!i){process.env.NODE_ENV!=="production"&&Vt("Unknown dataType "+a.dataType);return}w0(i,a,"normal")},e.prototype.remove=function(t,n){this.group.removeAll()},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.updateLayout=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.updateVisual=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.eachRendered=function(t){Nu(this.group,t)},e.markUpdateMethod=function(t,n){K2(t).updateMethod=n},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function x0(e,t,n){e&&La(e)&&(t==="emphasis"?Fs:zs)(e,n)}function w0(e,t,n){var r=Ta(e,t),a=t&&t.highlightKey!=null?PS(t.highlightKey):null;r!=null?q($t(r),function(i){x0(e.getItemGraphicEl(i),n,a)}):e.eachItemGraphicEl(function(i){x0(i,n,a)})}vv(Xt,["dispose"]);xu(Xt);function sk(e){return lk(e.model)}function uk(e){var t=e.model,n=e.ecModel,r=e.api,a=e.payload,i=t.pipelineContext.progressiveRender,l=e.view,s=a&&K2(a).updateMethod,u=i?"incrementalPrepareRender":s&&l[s]?s:"render";return u!=="render"&&l[u](t,n,r,a),ck[u]}var ck={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function Q2(e,t,n){var r,a=0,i=0,l=null,s,u,c,d;t=t||0;function f(){i=new Date().getTime(),l=null,e.apply(u,c||[])}var v=function(){for(var p=[],h=0;h<arguments.length;h++)p[h]=arguments[h];r=new Date().getTime(),u=this,c=p;var m=d||t,g=d||n;d=null,s=r-(g?a:i)-m,clearTimeout(l),g?l=setTimeout(f,m):s>=0?f():l=setTimeout(f,-s),a=r};return v.clear=function(){l&&(clearTimeout(l),l=null)},v.debounceNextCall=function(p){d=p},v}var b0=_t(),S0={itemStyle:Yi(x2,!0),lineStyle:Yi(y2,!0)},dk={lineStyle:"stroke",itemStyle:"fill"};function ey(e,t){var n=e.visualStyleMapper||S0[t];return n||(console.warn("Unknown style type '"+t+"'."),S0.itemStyle)}function ty(e,t){var n=e.visualDrawType||dk[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var fk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=e.getModel(r),i=ey(e,r),l=i(a),s=a.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var u=ty(e,r),c=l[u],d=Ae(c)?c:null,f=l.fill==="auto"||l.stroke==="auto";if(!l[u]||d||f){var v=e.getColorFromPalette(e.name,null,t.getSeriesCount());l[u]||(l[u]=v,n.setVisual("colorFromPalette",!0)),l.fill=l.fill==="auto"||Ae(l.fill)?v:l.fill,l.stroke=l.stroke==="auto"||Ae(l.stroke)?v:l.stroke}if(n.setVisual("style",l),n.setVisual("drawType",u),!t.isSeriesFiltered(e)&&d)return n.setVisual("colorFromPalette",!1),{dataEach:function(p,h){var m=e.getDataParams(h),g=fe({},l);g[u]=d(m),p.setItemVisual(h,"style",g)}}}},ai=new St,vk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=ey(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(l,s){var u=l.getRawDataItem(s);if(u&&u[r]){ai.option=u[r];var c=a(ai),d=l.ensureUniqueItemVisual(s,"style");fe(d,c),ai.option.decal&&(l.setItemVisual(s,"decal",ai.option.decal),ai.option.decal.dirty=!0),i in c&&l.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},pk={performRawSeries:!0,overallReset:function(e){var t=Ve();e.eachSeries(function(n){var r=n.getColorBy();if(!n.isColorBySeries()){var a=n.type+"-"+r,i=t.get(a);i||(i={},t.set(a,i)),b0(n).scope=i}}),e.eachSeries(function(n){if(!(n.isColorBySeries()||e.isSeriesFiltered(n))){var r=n.getRawData(),a={},i=n.getData(),l=b0(n).scope,s=n.visualStyleAccessPath||"itemStyle",u=ty(n,s);i.each(function(c){var d=i.getRawIndex(c);a[d]=c}),r.each(function(c){var d=a[c],f=i.getItemVisual(d,"colorFromPalette");if(f){var v=i.ensureUniqueItemVisual(d,"style"),p=r.getName(c)||c+"",h=r.count();v[u]=n.getColorFromPalette(p,l,h)}})}})}},Wl=Math.PI;function hk(e,t){t=t||{},$e(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new yt,r=new bt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var a=new nn({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new bt({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});n.add(i);var l;return t.showSpinner&&(l=new Eu({shape:{startAngle:-Wl/2,endAngle:-Wl/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),l.animateShape(!0).when(1e3,{endAngle:Wl*3/2}).start("circularInOut"),l.animateShape(!0).when(1e3,{startAngle:Wl*3/2}).delay(300).start("circularInOut"),n.add(l)),n.resize=function(){var s=a.getBoundingRect().width,u=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-u*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:u),d=e.getHeight()/2;t.showSpinner&&l.setShape({cx:c,cy:d}),i.setShape({x:c-u,y:d-u,width:u*2,height:u*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var ny=(function(){function e(t,n,r,a){this._stageTaskMap=Ve(),this.ecInstance=t,this.api=n,r=this._dataProcessorHandlers=r.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=r.concat(a)}return e.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},e.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),a=r.context,i=!n&&r.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>r.blockIndex,l=i?r.step:null,s=a&&a.modDataCount,u=s!=null?Math.ceil(s/l):null;return{step:l,modBy:u,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,n){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),l=r.progressiveEnabled&&n.incrementalPrepareRender&&i>=r.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),u=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:l,modDataCount:u,large:s}},e.prototype.restorePipelines=function(t){var n=this,r=n._pipelineMap=Ve();t.eachSeries(function(a){var i=a.getProgressive(),l=a.uid;r.set(l,{id:l,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(a,a.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),r=this.api;q(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),l="";process.env.NODE_ENV!=="production"&&(l='"reset" and "overallReset" must not be both specified.'),Pe(!(a.reset&&a.overallReset),l),a.reset&&this._createSeriesStageTask(a,i,n,r),a.overallReset&&this._createOverallStageTask(a,i,n,r)},this)},e.prototype.prepareView=function(t,n,r,a){var i=t.renderTask,l=i.context;l.model=n,l.ecModel=r,l.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(n,i)},e.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},e.prototype.performVisualTasks=function(t,n,r){this._performStageTasks(this._visualHandlers,t,n,r)},e.prototype._performStageTasks=function(t,n,r,a){a=a||{};var i=!1,l=this;q(t,function(u,c){if(!(a.visualType&&a.visualType!==u.visualType)){var d=l._stageTaskMap.get(u.uid),f=d.seriesTaskMap,v=d.overallTask;if(v){var p,h=v.agentStubMap;h.each(function(g){s(a,g)&&(g.dirty(),p=!0)}),p&&v.dirty(),l.updatePayload(v,r);var m=l.getPerformArgs(v,a.block);h.each(function(g){g.perform(m)}),v.perform(m)&&(i=!0)}else f&&f.each(function(g,y){s(a,g)&&g.dirty();var x=l.getPerformArgs(g,a.block);x.skip=!u.performRawSeries&&n.isSeriesFiltered(g.context.model),l.updatePayload(g,r),g.perform(x)&&(i=!0)})}});function s(u,c){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(c.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(t){var n;t.eachSeries(function(r){n=r.dataTask.perform()||n}),this.unfinished=n||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)})},e.prototype.updatePayload=function(t,n){n!=="remain"&&(t.context.payload=n)},e.prototype._createSeriesStageTask=function(t,n,r,a){var i=this,l=n.seriesTaskMap,s=n.seriesTaskMap=Ve(),u=t.seriesType,c=t.getTargetSeries;t.createOnAllSeries?r.eachRawSeries(d):u?r.eachRawSeriesByType(u,d):c&&c(r,a).each(d);function d(f){var v=f.uid,p=s.set(v,l&&l.get(v)||Oi({plan:wk,reset:bk,count:_k}));p.context={model:f,ecModel:r,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(f,p)}},e.prototype._createOverallStageTask=function(t,n,r,a){var i=this,l=n.overallTask=n.overallTask||Oi({reset:mk});l.context={ecModel:r,api:a,overallReset:t.overallReset,scheduler:i};var s=l.agentStubMap,u=l.agentStubMap=Ve(),c=t.seriesType,d=t.getTargetSeries,f=!0,v=!1,p="";process.env.NODE_ENV!=="production"&&(p='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Pe(!t.createOnAllSeries,p),c?r.eachRawSeriesByType(c,h):d?d(r,a).each(h):(f=!1,q(r.getSeries(),h));function h(m){var g=m.uid,y=u.set(g,s&&s.get(g)||(v=!0,Oi({reset:gk,onDirty:xk})));y.context={model:m,overallProgress:f},y.agent=l,y.__block=f,i._pipe(m,y)}v&&l.dirty()},e.prototype._pipe=function(t,n){var r=t.uid,a=this._pipelineMap.get(r);!a.head&&(a.head=n),a.tail&&a.tail.pipe(n),a.tail=n,n.__idxInPipeline=a.count++,n.__pipeline=a},e.wrapStageHandler=function(t,n){return Ae(t)&&(t={overallReset:t,seriesType:kk(t)}),t.uid=Au("stageHandler"),n&&(t.visualType=n),t},e})();function mk(e){e.overallReset(e.ecModel,e.api,e.payload)}function gk(e){return e.overallProgress&&yk}function yk(){this.agent.dirty(),this.getDownstream().dirty()}function xk(){this.agent&&this.agent.dirty()}function wk(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function bk(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$t(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?ge(t,function(n,r){return ry(r)}):Sk}var Sk=ry(0);function ry(e){return function(t,n){var r=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var i=t.start;i<t.end;i++)a.dataEach(r,i);else a&&a.progress&&a.progress(t,r)}}function _k(e){return e.data.count()}function kk(e){js=null;try{e(tl,oy)}catch{}return js}var tl={},oy={},js;ay(tl,Av);ay(oy,$2);tl.eachSeriesByType=tl.eachRawSeriesByType=function(e){js=e};tl.eachComponent=function(e){e.mainType==="series"&&e.subType&&(js=e.subType)};function ay(e,t){for(var n in t.prototype)e[n]=en}var _0=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Ck={color:_0,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],_0]};var Lt="#B9B8CE",k0="#100C2A",Yl=function(){return{axisLine:{lineStyle:{color:Lt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},C0=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],iy={darkMode:!0,color:C0,backgroundColor:k0,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Lt},pageTextStyle:{color:Lt}},textStyle:{color:Lt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Lt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Lt},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Lt}},timeline:{lineStyle:{color:Lt},label:{color:Lt},controlStyle:{color:Lt,borderColor:Lt}},calendar:{itemStyle:{color:k0},dayLabel:{color:Lt},monthLabel:{color:Lt},yearLabel:{color:Lt}},timeAxis:Yl(),logAxis:Yl(),valueAxis:Yl(),categoryAxis:Yl(),line:{symbol:"circle"},graph:{color:C0},gauge:{title:{color:Lt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Lt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};iy.categoryAxis.splitLine.show=!1;var Ek=(function(){function e(){}return e.prototype.normalizeQuery=function(t){var n={},r={},a={};if(_e(t)){var i=Gn(t);n.mainType=i.main||null,n.subType=i.sub||null}else{var l=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};q(t,function(u,c){for(var d=!1,f=0;f<l.length;f++){var v=l[f],p=c.lastIndexOf(v);if(p>0&&p===c.length-v.length){var h=c.slice(0,p);h!=="data"&&(n.mainType=h,n[v.toLowerCase()]=u,d=!0)}}s.hasOwnProperty(c)&&(r[c]=u,d=!0),d||(a[c]=u)})}return{cptQuery:n,dataQuery:r,otherQuery:a}},e.prototype.filter=function(t,n){var r=this.eventInfo;if(!r)return!0;var a=r.targetEl,i=r.packedEvent,l=r.model,s=r.view;if(!l||!s)return!0;var u=n.cptQuery,c=n.dataQuery;return d(u,l,"mainType")&&d(u,l,"subType")&&d(u,l,"index","componentIndex")&&d(u,l,"name")&&d(u,l,"id")&&d(c,i,"name")&&d(c,i,"dataIndex")&&d(c,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,n.otherQuery,a,i));function d(f,v,p,h){return f[p]==null||v[h||p]===f[p]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),yf=["symbol","symbolSize","symbolRotate","symbolOffset"],E0=yf.concat(["symbolKeepAspect"]),Tk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var r={},a={},i=!1,l=0;l<yf.length;l++){var s=yf[l],u=e.get(s);Ae(u)?(i=!0,a[s]=u):r[s]=u}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(fe({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),t.isSeriesFiltered(e))return;var c=Fe(a);function d(f,v){for(var p=e.getRawValue(v),h=e.getDataParams(v),m=0;m<c.length;m++){var g=c[m];f.setItemVisual(v,g,a[g](p,h))}}return{dataEach:i?d:null}}},Nk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(a,i){for(var l=a.getItemModel(i),s=0;s<E0.length;s++){var u=E0[s],c=l.getShallow(u,!0);c!=null&&a.setItemVisual(i,u,c)}}return{dataEach:n.hasItemOption?r:null}}};function Ik(e,t,n){switch(n){case"color":var r=e.getItemVisual(t,"style");return r[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+n)}}function Lk(e,t){switch(t){case"color":var n=e.getVisual("style");return n[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function Ak(e,t){function n(r,a){var i=[];return r.eachComponent({mainType:"series",subType:e,query:a},function(l){i.push(l.seriesIndex)}),i}q([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(r){t(r[0],function(a,i,l){a=fe({},a),process.env.NODE_ENV!=="production"&&ht(a.type,r[1]),l.dispatchAction(fe(a,{type:r[1],seriesIndex:n(i,a)}))})})}function Qo(e,t,n,r,a){var i=e+t;n.isSilent(i)||(process.env.NODE_ENV!=="production"&&Yn("event "+i+" is deprecated."),r.eachComponent({mainType:"series",subType:"pie"},function(l){for(var s=l.seriesIndex,u=l.option.selectedMap,c=a.selected,d=0;d<c.length;d++)if(c[d].seriesIndex===s){var f=l.getData(),v=Ta(f,a.fromActionPayload);n.trigger(i,{type:i,seriesId:l.id,name:we(v)?f.getName(v[0]):f.getName(v),selected:_e(u)?u:fe({},u)})}}))}function Mk(e,t,n){e.on("selectchanged",function(r){var a=n.getModel();r.isFromClick?(Qo("map","selectchanged",t,a,r),Qo("pie","selectchanged",t,a,r)):r.fromAction==="select"?(Qo("map","selected",t,a,r),Qo("pie","selected",t,a,r)):r.fromAction==="unselect"&&(Qo("map","unselected",t,a,r),Qo("pie","unselected",t,a,r))})}function Xl(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var Vk=Math.round(Math.random()*9),Pk=typeof Object.defineProperty=="function",Dk=(function(){function e(){this._id="__ec_inner_"+Vk++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,n){var r=this._guard(t);return Pk?Object.defineProperty(r,this._id,{value:n,enumerable:!1,configurable:!0}):r[this._id]=n,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e})(),Bk=Ue.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,a=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+a,r+i),e.lineTo(n-a,r+i),e.closePath()}}),Rk=Ue.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,a=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+a,r),e.lineTo(n,r+i),e.lineTo(n-a,r),e.closePath()}}),$k=Ue.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,a=t.width/5*3,i=Math.max(a,t.height),l=a/2,s=l*l/(i-l),u=r-i+l+s,c=Math.asin(s/l),d=Math.cos(c)*l,f=Math.sin(c),v=Math.cos(c),p=l*.6,h=l*.7;e.moveTo(n-d,u+s),e.arc(n,u,l,Math.PI-c,Math.PI*2+c),e.bezierCurveTo(n+d-f*p,u+s+v*p,n,r-h,n,r),e.bezierCurveTo(n,r-h,n-d+f*p,u+s+v*p,n-d,u+s),e.closePath()}}),Ok=Ue.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,a=t.x,i=t.y,l=r/3*2;e.moveTo(a,i),e.lineTo(a+l,i+n),e.lineTo(a,i+n/4*3),e.lineTo(a-l,i+n),e.lineTo(a,i),e.closePath()}}),Fk={line:Or,rect:bt,roundRect:bt,square:bt,circle:pl,diamond:Rk,pin:$k,arrow:Ok,triangle:Bk},zk={line:function(e,t,n,r,a){a.x1=e,a.y1=t+r/2,a.x2=e+n,a.y2=t+r/2},rect:function(e,t,n,r,a){a.x=e,a.y=t,a.width=n,a.height=r},roundRect:function(e,t,n,r,a){a.x=e,a.y=t,a.width=n,a.height=r,a.r=Math.min(n,r)/4},square:function(e,t,n,r,a){var i=Math.min(n,r);a.x=e,a.y=t,a.width=i,a.height=i},circle:function(e,t,n,r,a){a.cx=e+n/2,a.cy=t+r/2,a.r=Math.min(n,r)/2},diamond:function(e,t,n,r,a){a.cx=e+n/2,a.cy=t+r/2,a.width=n,a.height=r},pin:function(e,t,n,r,a){a.x=e+n/2,a.y=t+r/2,a.width=n,a.height=r},arrow:function(e,t,n,r,a){a.x=e+n/2,a.y=t+r/2,a.width=n,a.height=r},triangle:function(e,t,n,r,a){a.cx=e+n/2,a.cy=t+r/2,a.width=n,a.height=r}},xf={};q(Fk,function(e,t){xf[t]=new e});var Hk=Ue.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Bs(e,t,n),a=this.shape;return a&&a.symbolType==="pin"&&t.position==="inside"&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!=="none"){var a=xf[r];a||(r="rect",a=xf[r]),zk[r](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,n)}}});function Gk(e,t){if(this.type!=="image"){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):this.shape.symbolType==="line"?n.stroke=e:n.fill=e,this.markRedraw()}}function Fr(e,t,n,r,a,i,l){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var u;return e.indexOf("image://")===0?u=d2(e.slice(8),new Je(t,n,r,a),l?"center":"cover"):e.indexOf("path://")===0?u=Sv(e.slice(7),{},new Je(t,n,r,a),l?"center":"cover"):u=new Hk({shape:{symbolType:e,x:t,y:n,width:r,height:a}}),u.__isEmptyBrush=s,u.setColor=Gk,i&&u.setColor(i),u}function ly(e){return we(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function sy(e,t){if(e!=null)return we(e)||(e=[e,e]),[Ke(e[0],t[0])||0,Ke(ke(e[1],e[0]),t[1])||0]}function ko(e){return isFinite(e)}function Uk(e,t,n){var r=t.x==null?0:t.x,a=t.x2==null?1:t.x2,i=t.y==null?0:t.y,l=t.y2==null?0:t.y2;t.global||(r=r*n.width+n.x,a=a*n.width+n.x,i=i*n.height+n.y,l=l*n.height+n.y),r=ko(r)?r:0,a=ko(a)?a:1,i=ko(i)?i:0,l=ko(l)?l:0;var s=e.createLinearGradient(r,i,a,l);return s}function Wk(e,t,n){var r=n.width,a=n.height,i=Math.min(r,a),l=t.x==null?.5:t.x,s=t.y==null?.5:t.y,u=t.r==null?.5:t.r;t.global||(l=l*r+n.x,s=s*a+n.y,u=u*i),l=ko(l)?l:.5,s=ko(s)?s:.5,u=u>=0&&ko(u)?u:.5;var c=e.createRadialGradient(l,s,0,l,s,u);return c}function T0(e,t,n){for(var r=t.type==="radial"?Wk(e,t,n):Uk(e,t,n),a=t.colorStops,i=0;i<a.length;i++)r.addColorStop(a[i].offset,a[i].color);return r}function Yk(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function ql(e){return parseInt(e,10)}function N0(e,t,n){var r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],l=["paddingRight","paddingBottom"][t];if(n[r]!=null&&n[r]!=="auto")return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[a]||ql(s[r])||ql(e.style[r]))-(ql(s[i])||0)-(ql(s[l])||0)|0}function Xk(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Qe(e)?[e]:we(e)?e:null}function Rv(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Xk(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var a=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&a!==1&&(n=ge(n,function(i){return i/a}),r/=a)}return[n,r]}var qk=new $r(!0);function Js(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function I0(e){return typeof e=="string"&&e!=="none"}function Ks(e){var t=e.fill;return t!=null&&t!=="none"}function L0(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function A0(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function M0(e,t,n){var r=pv(t.image,t.__image,n);if(wu(r)){var a=e.createPattern(r,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*cs),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function Zk(e,t,n,r){var a,i=Js(n),l=Ks(n),s=n.strokePercent,u=s<1,c=!t.path;(!t.silent||u)&&c&&t.createPathProxy();var d=t.path||qk,f=t.__dirty;if(!r){var v=n.fill,p=n.stroke,h=l&&!!v.colorStops,m=i&&!!p.colorStops,g=l&&!!v.image,y=i&&!!p.image,x=void 0,b=void 0,S=void 0,_=void 0,k=void 0;(h||m)&&(k=t.getBoundingRect()),h&&(x=f?T0(e,v,k):t.__canvasFillGradient,t.__canvasFillGradient=x),m&&(b=f?T0(e,p,k):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),g&&(S=f||!t.__canvasFillPattern?M0(e,v,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(_=f||!t.__canvasStrokePattern?M0(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=x:g&&(S?e.fillStyle=S:l=!1),m?e.strokeStyle=b:y&&(_?e.strokeStyle=_:i=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var C,E;e.setLineDash&&n.lineDash&&(a=Rv(t),C=a[0],E=a[1]);var L=!0;(c||f&ia)&&(d.setDPR(e.dpr),u?d.setContext(null):(d.setContext(e),L=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),L&&d.rebuildPath(e,u?s:1),C&&(e.setLineDash(C),e.lineDashOffset=E),r||(n.strokeFirst?(i&&A0(e,n),l&&L0(e,n)):(l&&L0(e,n),i&&A0(e,n))),C&&e.setLineDash([])}function jk(e,t,n){var r=t.__image=pv(n.image,t.__image,t,t.onload);if(!(!r||!wu(r))){var a=n.x||0,i=n.y||0,l=t.getWidth(),s=t.getHeight(),u=r.width/r.height;if(l==null&&s!=null?l=s*u:s==null&&l!=null?s=l/u:l==null&&s==null&&(l=r.width,s=r.height),n.sWidth&&n.sHeight){var c=n.sx||0,d=n.sy||0;e.drawImage(r,c,d,n.sWidth,n.sHeight,a,i,l,s)}else if(n.sx&&n.sy){var c=n.sx,d=n.sy,f=l-c,v=s-d;e.drawImage(r,c,d,f,v,a,i,l,s)}else e.drawImage(r,a,i,l,s)}}function Jk(e,t,n){var r,a=n.text;if(a!=null&&(a+=""),a){e.font=n.font||Pr,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0,l=void 0;e.setLineDash&&n.lineDash&&(r=Rv(t),i=r[0],l=r[1]),i&&(e.setLineDash(i),e.lineDashOffset=l),n.strokeFirst?(Js(n)&&e.strokeText(a,n.x,n.y),Ks(n)&&e.fillText(a,n.x,n.y)):(Ks(n)&&e.fillText(a,n.x,n.y),Js(n)&&e.strokeText(a,n.x,n.y)),i&&e.setLineDash([])}}var V0=["shadowBlur","shadowOffsetX","shadowOffsetY"],P0=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function uy(e,t,n,r,a){var i=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){Gt(e,a),i=!0;var l=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(l)?To.opacity:l}(r||t.blend!==n.blend)&&(i||(Gt(e,a),i=!0),e.globalCompositeOperation=t.blend||To.blend);for(var s=0;s<V0.length;s++){var u=V0[s];(r||t[u]!==n[u])&&(i||(Gt(e,a),i=!0),e[u]=e.dpr*(t[u]||0))}return(r||t.shadowColor!==n.shadowColor)&&(i||(Gt(e,a),i=!0),e.shadowColor=t.shadowColor||To.shadowColor),i}function D0(e,t,n,r,a){var i=nl(t,a.inHover),l=r?null:n&&nl(n,a.inHover)||{};if(i===l)return!1;var s=uy(e,i,l,r,a);if((r||i.fill!==l.fill)&&(s||(Gt(e,a),s=!0),I0(i.fill)&&(e.fillStyle=i.fill)),(r||i.stroke!==l.stroke)&&(s||(Gt(e,a),s=!0),I0(i.stroke)&&(e.strokeStyle=i.stroke)),(r||i.opacity!==l.opacity)&&(s||(Gt(e,a),s=!0),e.globalAlpha=i.opacity==null?1:i.opacity),t.hasStroke()){var u=i.lineWidth,c=u/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||(Gt(e,a),s=!0),e.lineWidth=c)}for(var d=0;d<P0.length;d++){var f=P0[d],v=f[0];(r||i[v]!==l[v])&&(s||(Gt(e,a),s=!0),e[v]=i[v]||f[1])}return s}function Kk(e,t,n,r,a){return uy(e,nl(t,a.inHover),n&&nl(n,a.inHover),r,a)}function cy(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function Qk(e,t,n){for(var r=!1,a=0;a<e.length;a++){var i=e[a];r=r||i.isZeroArea(),cy(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}n.allClipped=r}function eC(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var B0=1,R0=2,$0=3,O0=4;function tC(e){var t=Ks(e),n=Js(e);return!(e.lineDash||!(+t^+n)||t&&typeof e.fill!="string"||n&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Gt(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function nl(e,t){return t&&e.__hoverStyle||e.style}function nC(e,t){wf(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function wf(e,t,n,r){var a=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=~On,t.__isRendered=!1;return}var i=t.__clipPaths,l=n.prevElClipPaths,s=!1,u=!1;if((!l||Yk(i,l))&&(l&&l.length&&(Gt(e,n),e.restore(),u=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(Gt(e,n),e.save(),Qk(i,e,n),s=!0),n.prevElClipPaths=i),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var c=n.prevEl;c||(u=s=!0);var d=t instanceof Ue&&t.autoBatch&&tC(t.style);s||eC(a,c.transform)?(Gt(e,n),cy(e,t)):d||Gt(e,n);var f=nl(t,n.inHover);t instanceof Ue?(n.lastDrawType!==B0&&(u=!0,n.lastDrawType=B0),D0(e,t,c,u,n),(!d||!n.batchFill&&!n.batchStroke)&&e.beginPath(),Zk(e,t,f,d),d&&(n.batchFill=f.fill||"",n.batchStroke=f.stroke||"")):t instanceof Xi?(n.lastDrawType!==$0&&(u=!0,n.lastDrawType=$0),D0(e,t,c,u,n),Jk(e,t,f)):t instanceof In?(n.lastDrawType!==R0&&(u=!0,n.lastDrawType=R0),Kk(e,t,c,u,n),jk(e,t,f)):t.getTemporalDisplayables&&(n.lastDrawType!==O0&&(u=!0,n.lastDrawType=O0),rC(e,t,n)),d&&r&&Gt(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function rC(e,t,n){var r=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover},l,s;for(l=t.getCursor(),s=r.length;l<s;l++){var u=r[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),wf(e,u,i,l===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),i.prevEl=u}for(var c=0,d=a.length;c<d;c++){var u=a[c];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),wf(e,u,i,c===d-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),i.prevEl=u}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Uc=new Dk,F0=new dl(100),z0=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function bf(e,t){if(e==="none")return null;var n=t.getDevicePixelRatio(),r=t.getZr(),a=r.painter.type==="svg";e.dirty&&Uc.delete(e);var i=Uc.get(e);if(i)return i;var l=$e(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});l.backgroundColor==="none"&&(l.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=l.rotation,s.scaleX=s.scaleY=a?1:1/n,Uc.set(e,s),e.dirty=!1,s;function u(c){for(var d=[n],f=!0,v=0;v<z0.length;++v){var p=l[z0[v]];if(p!=null&&!we(p)&&!_e(p)&&!Qe(p)&&typeof p!="boolean"){f=!1;break}d.push(p)}var h;if(f){h=d.join(",")+(a?"-svg":"");var m=F0.get(h);m&&(a?c.svgElement=m:c.image=m)}var g=fy(l.dashArrayX),y=oC(l.dashArrayY),x=dy(l.symbol),b=aC(g),S=vy(y),_=!a&&cl.createCanvas(),k=a&&{tag:"g",attrs:{},key:"dcl",children:[]},w=E(),C;_&&(_.width=w.width*n,_.height=w.height*n,C=_.getContext("2d")),L(),f&&F0.put(h,_||k),c.image=_,c.svgElement=k,c.svgWidth=w.width,c.svgHeight=w.height;function E(){for(var N=1,T=0,A=b.length;T<A;++T)N=eh(N,b[T]);for(var I=1,T=0,A=x.length;T<A;++T)I=eh(I,x[T].length);N*=I;var D=S*b.length*x.length;if(process.env.NODE_ENV!=="production"){var V=function(B){console.warn("Calculated decal size is greater than "+B+" due to decal option settings so "+B+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+B+" to be larger to avoid incontinuity.")};N>l.maxTileWidth&&V("maxTileWidth"),D>l.maxTileHeight&&V("maxTileHeight")}return{width:Math.max(1,Math.min(N,l.maxTileWidth)),height:Math.max(1,Math.min(D,l.maxTileHeight))}}function L(){C&&(C.clearRect(0,0,_.width,_.height),l.backgroundColor&&(C.fillStyle=l.backgroundColor,C.fillRect(0,0,_.width,_.height)));for(var N=0,T=0;T<y.length;++T)N+=y[T];if(N<=0)return;for(var A=-S,I=0,D=0,V=0;A<w.height;){if(I%2===0){for(var B=D/2%x.length,R=0,F=0,W=0;R<w.width*2;){for(var O=0,T=0;T<g[V].length;++T)O+=g[V][T];if(O<=0)break;if(F%2===0){var P=(1-l.symbolSize)*.5,$=R+g[V][F]*P,z=A+y[I]*P,Z=g[V][F]*l.symbolSize,Q=y[I]*l.symbolSize,J=W/2%x[B].length;U($,z,Z,Q,x[B][J])}R+=g[V][F],++W,++F,F===g[V].length&&(F=0)}++V,V===g.length&&(V=0)}A+=y[I],++D,++I,I===y.length&&(I=0)}function U(ne,K,H,M,G){var X=a?1:n,j=Fr(G,ne*X,K*X,H*X,M*X,l.color,l.symbolKeepAspect);if(a){var ie=r.painter.renderOneToVNode(j);ie&&k.children.push(ie)}else nC(C,j)}}}}function dy(e){if(!e||e.length===0)return[["rect"]];if(_e(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!_e(e[n])){t=!1;break}if(t)return dy([e]);for(var r=[],n=0;n<e.length;++n)_e(e[n])?r.push([e[n]]):r.push(e[n]);return r}function fy(e){if(!e||e.length===0)return[[0,0]];if(Qe(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!Qe(e[r])){n=!1;break}if(n)return fy([e]);for(var a=[],r=0;r<e.length;++r)if(Qe(e[r])){var t=Math.ceil(e[r]);a.push([t,t])}else{var t=ge(e[r],function(s){return Math.ceil(s)});t.length%2===1?a.push(t.concat(t)):a.push(t)}return a}function oC(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(Qe(e)){var t=Math.ceil(e);return[t,t]}var n=ge(e,function(r){return Math.ceil(r)});return e.length%2?n.concat(n):n}function aC(e){return ge(e,function(t){return vy(t)})}function vy(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2===1?t*2:t}function iC(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(l){var s=r.getItemVisual(l,"decal");if(s){var u=r.ensureUniqueItemVisual(l,"style");u.decal=bf(s,t)}});var a=r.getVisual("decal");if(a){var i=r.getVisual("style");i.decal=bf(a,t)}}})}var En=new lr,Qs={};function lC(e,t){process.env.NODE_ENV!=="production"&&Qs[e]&&Vt("Already has an implementation of "+e+"."),Qs[e]=t}function sC(e){return process.env.NODE_ENV!=="production"&&(Qs[e]||Vt("Implementation of "+e+" doesn't exists.")),Qs[e]}var uC=1,cC=800,dC=900,fC=1e3,vC=2e3,pC=5e3,py=1e3,hC=1100,$v=2e3,hy=3e3,mC=4e3,Ou=4500,gC=4600,yC=5e3,xC=6e3,my=7e3,wC={PROCESSOR:{FILTER:fC,SERIES_FILTER:cC,STATISTIC:pC},VISUAL:{LAYOUT:py,PROGRESSIVE_LAYOUT:hC,GLOBAL:$v,CHART:hy,POST_CHART_LAYOUT:gC,COMPONENT:mC,BRUSH:yC,CHART_ITEM:Ou,ARIA:xC,DECAL:my}},It="__flagInMainProcess",zt="__pendingUpdate",Wc="__needsUpdateStatus",H0=/^[a-zA-Z0-9_]+$/,Yc="__connectUpdateStatus",G0=0,bC=1,SC=2;function gy(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){jt(this.id);return}return xy(this,e,t)}}function yy(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return xy(this,e,t)}}function xy(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),lr.prototype[t].apply(e,n)}var wy=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(lr),by=wy.prototype;by.on=yy("on");by.off=yy("off");var ea,Xc,Zl,vr,qc,Zc,jc,ii,li,U0,W0,Jc,Y0,jl,X0,Sy,ln,q0,_y=(function(e){me(t,e);function t(n,r,a){var i=e.call(this,new Ek)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},_e(r)&&(r=ky[r]),i._dom=n;var l="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var c=He.hasGlobalWindow?window:global;c&&(l=ke(c.__ECHARTS__DEFAULT__RENDERER__,l),s=ke(c.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=ke(c.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}a.ssr&&q8(function(p){var h=tt(p),m=h.dataIndex;if(m!=null){var g=Ve();return g.set("series_index",h.seriesIndex),g.set("data_index",m),h.ssrType&&g.set("ssr_type",h.ssrType),g}});var d=i._zr=Kp(n,{renderer:a.renderer||l,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:ke(a.useDirtyRect,u),useCoarsePointer:ke(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Q2(dt(d.flush,d),17),r=Oe(r),r&&F2(r,!0),i._theme=r,i._locale=z_(a.locale||b2),i._coordSysMgr=new Mv;var f=i._api=X0(i);function v(p,h){return p.__prio-h.__prio}return ds(tu,v),ds(Sf,v),i._scheduler=new ny(i,f,Sf,tu),i._messageCenter=new wy,i._initEvents(),i.resize=dt(i.resize,i),d.animation.on("frame",i._onframe,i),U0(d,i),W0(d,i),Vd(i),i}return t.prototype._onframe=function(){if(!this._disposed){q0(this);var n=this._scheduler;if(this[zt]){var r=this[zt].silent;this[It]=!0;try{ea(this),vr.update.call(this,null,this[zt].updateParams)}catch(u){throw this[It]=!1,this[zt]=null,u}this._zr.flush(),this[It]=!1,this[zt]=null,ii.call(this,r),li.call(this,r)}else if(n.unfinished){var a=uC,i=this._model,l=this._api;n.unfinished=!1;do{var s=+new Date;n.performSeriesTasks(i),n.performDataProcessorTasks(i),Zc(this,i),n.performVisualTasks(i),jl(this,this._model,l,"remain",{}),a-=+new Date-s}while(a>0&&n.unfinished);n.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(n,r,a){if(this[It]){process.env.NODE_ENV!=="production"&&Vt("`setOption` should not be called during main process.");return}if(this._disposed){jt(this.id);return}var i,l,s;if(Ce(r)&&(a=r.lazyUpdate,i=r.silent,l=r.replaceMerge,s=r.transition,r=r.notMerge),this[It]=!0,!this._model||r){var u=new g7(this._api),c=this._theme,d=this._model=new Av;d.scheduler=this._scheduler,d.ssr=this._ssr,d.init(null,null,null,c,this._locale,u)}this._model.setOption(n,{replaceMerge:l},_f);var f={seriesTransition:s,optionChanged:!0};if(a)this[zt]={silent:i,updateParams:f},this[It]=!1,this.getZr().wakeUp();else{try{ea(this),vr.update.call(this,null,f)}catch(v){throw this[zt]=null,this[It]=!1,v}this._ssr||this._zr.flush(),this[zt]=null,this[It]=!1,ii.call(this,i),li.call(this,i)}},t.prototype.setTheme=function(){Yn("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||He.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(n){return process.env.NODE_ENV!=="production"&&ht("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(n)},t.prototype.renderToCanvas=function(n){n=n||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return r.getRenderedCanvas({backgroundColor:n.backgroundColor||this._model.get("backgroundColor"),pixelRatio:n.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(n){n=n||{};var r=this._zr.painter;if(process.env.NODE_ENV!=="production"&&r.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return r.renderToString({useViewBox:n.useViewBox})},t.prototype.getSvgDataURL=function(){if(He.svgSupported){var n=this._zr,r=n.storage.getDisplayList();return q(r,function(a){a.stopAnimation(null,!0)}),n.painter.toDataURL()}},t.prototype.getDataURL=function(n){if(this._disposed){jt(this.id);return}n=n||{};var r=n.excludeComponents,a=this._model,i=[],l=this;q(r,function(u){a.eachComponent({mainType:u},function(c){var d=l._componentsMap[c.__viewId];d.group.ignore||(i.push(d),d.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(n).toDataURL("image/"+(n&&n.type||"png"));return q(i,function(u){u.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(n){if(this._disposed){jt(this.id);return}var r=n.type==="svg",a=this.group,i=Math.min,l=Math.max,s=1/0;if(Z0[a]){var u=s,c=s,d=-s,f=-s,v=[],p=n&&n.pixelRatio||this.getDevicePixelRatio();q(zi,function(b,S){if(b.group===a){var _=r?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(Oe(n)),k=b.getDom().getBoundingClientRect();u=i(k.left,u),c=i(k.top,c),d=l(k.right,d),f=l(k.bottom,f),v.push({dom:_,left:k.left,top:k.top})}}),u*=p,c*=p,d*=p,f*=p;var h=d-u,m=f-c,g=cl.createCanvas(),y=Kp(g,{renderer:r?"svg":"canvas"});if(y.resize({width:h,height:m}),r){var x="";return q(v,function(b){var S=b.left-u,_=b.top-c;x+='<g transform="translate('+S+","+_+')">'+b.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=x,n.connectedBackgroundColor&&y.painter.setBackgroundColor(n.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return n.connectedBackgroundColor&&y.add(new bt({shape:{x:0,y:0,width:h,height:m},style:{fill:n.connectedBackgroundColor}})),q(v,function(b){var S=new In({style:{x:b.left*p-u,y:b.top*p-c,image:b.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(n&&n.type||"png"))}else return this.getDataURL(n)},t.prototype.convertToPixel=function(n,r){return qc(this,"convertToPixel",n,r)},t.prototype.convertFromPixel=function(n,r){return qc(this,"convertFromPixel",n,r)},t.prototype.containPixel=function(n,r){if(this._disposed){jt(this.id);return}var a=this._model,i,l=gc(a,n);return q(l,function(s,u){u.indexOf("Models")>=0&&q(s,function(c){var d=c.coordinateSystem;if(d&&d.containPoint)i=i||!!d.containPoint(r);else if(u==="seriesModels"){var f=this._chartsMap[c.__viewId];f&&f.containPoint?i=i||f.containPoint(r,c):process.env.NODE_ENV!=="production"&&Mt(u+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Mt(u+": containPoint is not supported")},this)},this),!!i},t.prototype.getVisual=function(n,r){var a=this._model,i=gc(a,n,{defaultMainType:"series"}),l=i.seriesModel;process.env.NODE_ENV!=="production"&&(l||Mt("There is no specified series model"));var s=l.getData(),u=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return u!=null?Ik(s,u,r):Lk(s,r)},t.prototype.getViewOfComponentModel=function(n){return this._componentsMap[n.__viewId]},t.prototype.getViewOfSeriesModel=function(n){return this._chartsMap[n.__viewId]},t.prototype._initEvents=function(){var n=this;q(_C,function(r){var a=function(i){var l=n.getModel(),s=i.target,u,c=r==="globalout";if(c?u={}:s&&Xl(s,function(h){var m=tt(h);if(m&&m.dataIndex!=null){var g=m.dataModel||l.getSeriesByIndex(m.seriesIndex);return u=g&&g.getDataParams(m.dataIndex,m.dataType,s)||{},!0}else if(m.eventData)return u=fe({},m.eventData),!0},!0),u){var d=u.componentType,f=u.componentIndex;(d==="markLine"||d==="markPoint"||d==="markArea")&&(d="series",f=u.seriesIndex);var v=d&&f!=null&&l.getComponent(d,f),p=v&&n[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(v&&p)&&Mt("model or view can not be found by params"),u.event=i,u.type=r,n._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:v,view:p},n.trigger(r,u)}};a.zrEventfulCallAtLast=!0,n._zr.on(r,a,n)}),q(Fi,function(r,a){n._messageCenter.on(a,function(i){this.trigger(a,i)},n)}),q(["selectchanged"],function(r){n._messageCenter.on(r,function(a){this.trigger(r,a)},n)}),Mk(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){jt(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){jt(this.id);return}this._disposed=!0;var n=this.getDom();n&&Dg(this.getDom(),Fv,"");var r=this,a=r._api,i=r._model;q(r._componentsViews,function(l){l.dispose(i,a)}),q(r._chartsViews,function(l){l.dispose(i,a)}),r._zr.dispose(),r._dom=r._model=r._chartsMap=r._componentsMap=r._chartsViews=r._componentsViews=r._scheduler=r._api=r._zr=r._throttledZrFlush=r._theme=r._coordSysMgr=r._messageCenter=null,delete zi[r.id]},t.prototype.resize=function(n){if(this[It]){process.env.NODE_ENV!=="production"&&Vt("`resize` should not be called during main process.");return}if(this._disposed){jt(this.id);return}this._zr.resize(n);var r=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!r){var a=r.resetOption("media"),i=n&&n.silent;this[zt]&&(i==null&&(i=this[zt].silent),a=!0,this[zt]=null),this[It]=!0;try{a&&ea(this),vr.update.call(this,{type:"resize",animation:fe({duration:0},n&&n.animation)})}catch(l){throw this[It]=!1,l}this[It]=!1,ii.call(this,i),li.call(this,i)}},t.prototype.showLoading=function(n,r){if(this._disposed){jt(this.id);return}if(Ce(n)&&(r=n,n=""),n=n||"default",this.hideLoading(),!kf[n]){process.env.NODE_ENV!=="production"&&Mt("Loading effects "+n+" not exists.");return}var a=kf[n](this._api,r),i=this._zr;this._loadingFX=a,i.add(a)},t.prototype.hideLoading=function(){if(this._disposed){jt(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(n){var r=fe({},n);return r.type=Fi[n.type],r},t.prototype.dispatchAction=function(n,r){if(this._disposed){jt(this.id);return}if(Ce(r)||(r={silent:!!r}),!!eu[n.type]&&this._model){if(this[It]){this._pendingActions.push(n);return}var a=r.silent;jc.call(this,n,a);var i=r.flush;i?this._zr.flush():i!==!1&&He.browser.weChat&&this._throttledZrFlush(),ii.call(this,a),li.call(this,a)}},t.prototype.updateLabelLayout=function(){En.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(n){if(this._disposed){jt(this.id);return}var r=n.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(r);process.env.NODE_ENV!=="production"&&Pe(n.data&&i),i.appendData(n),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){ea=function(f){var v=f._scheduler;v.restorePipelines(f._model),v.prepareStageTasks(),Xc(f,!0),Xc(f,!1),v.plan()},Xc=function(f,v){for(var p=f._model,h=f._scheduler,m=v?f._componentsViews:f._chartsViews,g=v?f._componentsMap:f._chartsMap,y=f._zr,x=f._api,b=0;b<m.length;b++)m[b].__alive=!1;v?p.eachComponent(function(k,w){k!=="series"&&S(w)}):p.eachSeries(S);function S(k){var w=k.__requireNewView;k.__requireNewView=!1;var C="_ec_"+k.id+"_"+k.type,E=!w&&g[C];if(!E){var L=Gn(k.type),N=v?ar.getClass(L.main,L.sub):Xt.getClass(L.sub);process.env.NODE_ENV!=="production"&&Pe(N,L.sub+" does not exist."),E=new N,E.init(p,x),g[C]=E,m.push(E),y.add(E.group)}k.__viewId=E.__id=C,E.__alive=!0,E.__model=k,E.group.__ecComponentInfo={mainType:k.mainType,index:k.componentIndex},!v&&h.prepareView(E,k,p,x)}for(var b=0;b<m.length;){var _=m[b];_.__alive?b++:(!v&&_.renderTask.dispose(),y.remove(_.group),_.dispose(p,x),m.splice(b,1),g[_.__id]===_&&delete g[_.__id],_.__id=_.group.__ecComponentInfo=null)}},Zl=function(f,v,p,h,m){var g=f._model;if(g.setUpdatePayload(p),!h){q([].concat(f._componentsViews).concat(f._chartsViews),_);return}var y={};y[h+"Id"]=p[h+"Id"],y[h+"Index"]=p[h+"Index"],y[h+"Name"]=p[h+"Name"];var x={mainType:h,query:y};m&&(x.subType=m);var b=p.excludeSeriesId,S;b!=null&&(S=Ve(),q($t(b),function(k){var w=Wn(k,null);w!=null&&S.set(w,!0)})),g&&g.eachComponent(x,function(k){var w=S&&S.get(k.id)!=null;if(!w)if(Lh(p))if(k instanceof rn)p.type===No&&!p.notBlur&&!k.get(["emphasis","disabled"])&&ES(k,p,f._api);else{var C=yv(k.mainType,k.componentIndex,p.name,f._api),E=C.focusSelf,L=C.dispatchers;p.type===No&&E&&!p.notBlur&&lf(k.mainType,k.componentIndex,f._api),L&&q(L,function(N){p.type===No?Fs(N):zs(N)})}else uf(p)&&k instanceof rn&&(IS(k,p,f._api),Nh(k),ln(f))},f),g&&g.eachComponent(x,function(k){var w=S&&S.get(k.id)!=null;w||_(f[h==="series"?"_chartsMap":"_componentsMap"][k.__viewId])},f);function _(k){k&&k.__alive&&k[v]&&k[v](k.__model,g,f._api,p)}},vr={prepareAndUpdate:function(f){ea(this),vr.update.call(this,f,{optionChanged:f.newOption!=null})},update:function(f,v){var p=this._model,h=this._api,m=this._zr,g=this._coordSysMgr,y=this._scheduler;if(p){p.setUpdatePayload(f),y.restoreData(p,f),y.performSeriesTasks(p),g.create(p,h),y.performDataProcessorTasks(p,f),Zc(this,p),g.update(p,h),n(p),y.performVisualTasks(p,f),Jc(this,p,h,f,v);var x=p.get("backgroundColor")||"transparent",b=p.get("darkMode");m.setBackgroundColor(x),b!=null&&b!=="auto"&&m.setDarkMode(b),En.trigger("afterupdate",p,h)}},updateTransform:function(f){var v=this,p=this._model,h=this._api;if(p){p.setUpdatePayload(f);var m=[];p.eachComponent(function(y,x){if(y!=="series"){var b=v.getViewOfComponentModel(x);if(b&&b.__alive)if(b.updateTransform){var S=b.updateTransform(x,p,h,f);S&&S.update&&m.push(b)}else m.push(b)}});var g=Ve();p.eachSeries(function(y){var x=v._chartsMap[y.__viewId];if(x.updateTransform){var b=x.updateTransform(y,p,h,f);b&&b.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),n(p),this._scheduler.performVisualTasks(p,f,{setDirty:!0,dirtyMap:g}),jl(this,p,h,f,{},g),En.trigger("afterupdate",p,h)}},updateView:function(f){var v=this._model;v&&(v.setUpdatePayload(f),Xt.markUpdateMethod(f,"updateView"),n(v),this._scheduler.performVisualTasks(v,f,{setDirty:!0}),Jc(this,v,this._api,f,{}),En.trigger("afterupdate",v,this._api))},updateVisual:function(f){var v=this,p=this._model;p&&(p.setUpdatePayload(f),p.eachSeries(function(h){h.getData().clearAllVisual()}),Xt.markUpdateMethod(f,"updateVisual"),n(p),this._scheduler.performVisualTasks(p,f,{visualType:"visual",setDirty:!0}),p.eachComponent(function(h,m){if(h!=="series"){var g=v.getViewOfComponentModel(m);g&&g.__alive&&g.updateVisual(m,p,v._api,f)}}),p.eachSeries(function(h){var m=v._chartsMap[h.__viewId];m.updateVisual(h,p,v._api,f)}),En.trigger("afterupdate",p,this._api))},updateLayout:function(f){vr.update.call(this,f)}},qc=function(f,v,p,h){if(f._disposed){jt(f.id);return}for(var m=f._model,g=f._coordSysMgr.getCoordinateSystems(),y,x=gc(m,p),b=0;b<g.length;b++){var S=g[b];if(S[v]&&(y=S[v](m,x,h))!=null)return y}process.env.NODE_ENV!=="production"&&Mt("No coordinate system that supports "+v+" found by the given finder.")},Zc=function(f,v){var p=f._chartsMap,h=f._scheduler;v.eachSeries(function(m){h.updateStreamModes(m,p[m.__viewId])})},jc=function(f,v){var p=this,h=this.getModel(),m=f.type,g=f.escapeConnect,y=eu[m],x=y.actionInfo,b=(x.update||"update").split(":"),S=b.pop(),_=b[0]!=null&&Gn(b[0]);this[It]=!0;var k=[f],w=!1;f.batch&&(w=!0,k=ge(f.batch,function(I){return I=$e(fe({},I),f),I.batch=null,I}));var C=[],E,L=uf(f),N=Lh(f);if(N&&t2(this._api),q(k,function(I){if(E=y.action(I,p._model,p._api),E=E||fe({},I),E.type=x.event||E.type,C.push(E),N){var D=Pg(f),V=D.queryOptionMap,B=D.mainTypeSpecified,R=B?V.keys()[0]:"series";Zl(p,S,I,R),ln(p)}else L?(Zl(p,S,I,"series"),ln(p)):_&&Zl(p,S,I,_.main,_.sub)}),S!=="none"&&!N&&!L&&!_)try{this[zt]?(ea(this),vr.update.call(this,f),this[zt]=null):vr[S].call(this,f)}catch(I){throw this[It]=!1,I}if(w?E={type:x.event||m,escapeConnect:g,batch:C}:E=C[0],this[It]=!1,!v){var T=this._messageCenter;if(T.trigger(E.type,E),L){var A={type:"selectchanged",escapeConnect:g,selected:LS(h),isFromClick:f.isFromClick||!1,fromAction:f.type,fromActionPayload:f};T.trigger(A.type,A)}}},ii=function(f){for(var v=this._pendingActions;v.length;){var p=v.shift();jc.call(this,p,f)}},li=function(f){!f&&this.trigger("updated")},U0=function(f,v){f.on("rendered",function(p){v.trigger("rendered",p),f.animation.isFinished()&&!v[zt]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},W0=function(f,v){f.on("mouseover",function(p){var h=p.target,m=Xl(h,La);m&&(TS(m,p,v._api),ln(v))}).on("mouseout",function(p){var h=p.target,m=Xl(h,La);m&&(NS(m,p,v._api),ln(v))}).on("click",function(p){var h=p.target,m=Xl(h,function(x){return tt(x).dataIndex!=null},!0);if(m){var g=m.selected?"unselect":"select",y=tt(m);v._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(v){v.clearColorPalette()})}function r(f){var v=[],p=[],h=!1;if(f.eachComponent(function(x,b){var S=b.get("zlevel")||0,_=b.get("z")||0,k=b.getZLevelKey();h=h||!!k,(x==="series"?p:v).push({zlevel:S,z:_,idx:b.componentIndex,type:x,key:k})}),h){var m=v.concat(p),g,y;ds(m,function(x,b){return x.zlevel===b.zlevel?x.z-b.z:x.zlevel-b.zlevel}),q(m,function(x){var b=f.getComponent(x.type,x.idx),S=x.zlevel,_=x.key;g!=null&&(S=Math.max(g,S)),_?(S===g&&_!==y&&S++,y=_):y&&(S===g&&S++,y=""),g=S,b.setZLevel(S)})}}Jc=function(f,v,p,h,m){r(v),Y0(f,v,p,h,m),q(f._chartsViews,function(g){g.__alive=!1}),jl(f,v,p,h,m),q(f._chartsViews,function(g){g.__alive||g.remove(v,p)})},Y0=function(f,v,p,h,m,g){q(g||f._componentsViews,function(y){var x=y.__model;c(x,y),y.render(x,v,p,h),s(x,y),d(x,y)})},jl=function(f,v,p,h,m,g){var y=f._scheduler;m=fe(m||{},{updatedSeries:v.getSeries()}),En.trigger("series:beforeupdate",v,p,m);var x=!1;v.eachSeries(function(b){var S=f._chartsMap[b.__viewId];S.__alive=!0;var _=S.renderTask;y.updatePayload(_,h),c(b,S),g&&g.get(b.uid)&&_.dirty(),_.perform(y.getPerformArgs(_))&&(x=!0),S.group.silent=!!b.get("silent"),l(b,S),Nh(b)}),y.unfinished=x||y.unfinished,En.trigger("series:layoutlabels",v,p,m),En.trigger("series:transition",v,p,m),v.eachSeries(function(b){var S=f._chartsMap[b.__viewId];s(b,S),d(b,S)}),i(f,v),En.trigger("series:afterupdate",v,p,m)},ln=function(f){f[Wc]=!0,f.getZr().wakeUp()},q0=function(f){f[Wc]&&(f.getZr().storage.traverse(function(v){Bi(v)||a(v)}),f[Wc]=!1)};function a(f){for(var v=[],p=f.currentStates,h=0;h<p.length;h++){var m=p[h];m==="emphasis"||m==="blur"||m==="select"||v.push(m)}f.selected&&f.states.select&&v.push("select"),f.hoverState===_u&&f.states.emphasis?v.push("emphasis"):f.hoverState===Su&&f.states.blur&&v.push("blur"),f.useStates(v)}function i(f,v){var p=f._zr,h=p.storage,m=0;h.traverse(function(g){g.isGroup||m++}),m>v.get("hoverLayerThreshold")&&!He.node&&!He.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(x){x.states.emphasis&&(x.states.emphasis.hoverLayer=!0)})}})}function l(f,v){var p=f.get("blendMode")||null;v.eachRendered(function(h){h.isGroup||(h.style.blend=p)})}function s(f,v){if(!f.preventAutoZ){var p=f.get("z")||0,h=f.get("zlevel")||0;v.eachRendered(function(m){return u(m,p,h,-1/0),!0})}}function u(f,v,p,h){var m=f.getTextContent(),g=f.getTextGuideLine(),y=f.isGroup;if(y)for(var x=f.childrenRef(),b=0;b<x.length;b++)h=Math.max(u(x[b],v,p,h),h);else f.z=v,f.zlevel=p,h=Math.max(f.z2,h);if(m&&(m.z=v,m.zlevel=p,isFinite(h)&&(m.z2=h+2)),g){var S=f.textGuideLineConfig;g.z=v,g.zlevel=p,isFinite(h)&&(g.z2=h+(S&&S.showAbove?1:-1))}return h}function c(f,v){v.eachRendered(function(p){if(!Bi(p)){var h=p.getTextContent(),m=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),h&&h.stateTransition&&(h.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function d(f,v){var p=f.getModel("stateAnimation"),h=f.isAnimationEnabled(),m=p.get("duration"),g=m>0?{duration:m,delay:p.get("delay"),easing:p.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Bi(y))return;if(y instanceof Ue&&DS(y),y.__dirty){var x=y.prevStates;x&&y.useStates(x)}if(h){y.stateTransition=g;var b=y.getTextContent(),S=y.getTextGuideLine();b&&(b.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&a(y)}})}X0=function(f){return new((function(v){me(p,v);function p(){return v!==null&&v.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(h){for(;h;){var m=h.__ecComponentInfo;if(m!=null)return f._model.getComponent(m.mainType,m.index);h=h.parent}},p.prototype.enterEmphasis=function(h,m){Fs(h,m),ln(f)},p.prototype.leaveEmphasis=function(h,m){zs(h,m),ln(f)},p.prototype.enterBlur=function(h){CS(h),ln(f)},p.prototype.leaveBlur=function(h){Jg(h),ln(f)},p.prototype.enterSelect=function(h){Kg(h),ln(f)},p.prototype.leaveSelect=function(h){Qg(h),ln(f)},p.prototype.getModel=function(){return f.getModel()},p.prototype.getViewOfComponentModel=function(h){return f.getViewOfComponentModel(h)},p.prototype.getViewOfSeriesModel=function(h){return f.getViewOfSeriesModel(h)},p})($2))(f)},Sy=function(f){function v(p,h){for(var m=0;m<p.length;m++){var g=p[m];g[Yc]=h}}q(Fi,function(p,h){f._messageCenter.on(h,function(m){if(Z0[f.group]&&f[Yc]!==G0){if(m&&m.escapeConnect)return;var g=f.makeActionFromEvent(m),y=[];q(zi,function(x){x!==f&&x.group===f.group&&y.push(x)}),v(y,G0),q(y,function(x){x[Yc]!==bC&&x.dispatchAction(g)}),v(y,SC)}})})}})(),t})(lr),Ov=_y.prototype;Ov.on=gy("on");Ov.off=gy("off");Ov.one=function(e,t,n){var r=this;Yn("ECharts#one is deprecated.");function a(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];t&&t.apply&&t.apply(this,i),r.off(e,a)}this.on.call(this,e,a,n)};var _C=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function jt(e){process.env.NODE_ENV!=="production"&&Mt("Instance "+e+" has been disposed")}var eu={},Fi={},Sf=[],_f=[],tu=[],ky={},kf={},zi={},Z0={},kC=+new Date-0,Fv="_echarts_instance_";function CC(e,t,n){var r=!(n&&n.ssr);if(r){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Initialize failed: invalid dom.");var a=EC(e);if(a)return process.env.NODE_ENV!=="production"&&Mt("There is a chart instance already initialized on the dom."),a;process.env.NODE_ENV!=="production"&&Is(e)&&e.nodeName.toUpperCase()!=="CANVAS"&&(!e.clientWidth&&(!n||n.width==null)||!e.clientHeight&&(!n||n.height==null))&&Mt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new _y(e,t,n);return i.id="ec_"+kC++,zi[i.id]=i,r&&Dg(e,Fv,i.id),Sy(i),En.trigger("afterinit",i),i}function EC(e){return zi[y6(e,Fv)]}function Cy(e,t){ky[e]=t}function Ey(e){et(_f,e)<0&&_f.push(e)}function Ty(e,t){Hv(Sf,e,t,vC)}function TC(e){zv("afterinit",e)}function NC(e){zv("afterupdate",e)}function zv(e,t){En.on(e,t)}function Ha(e,t,n){Ae(t)&&(n=t,t="");var r=Ce(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,!Fi[t]&&(Pe(H0.test(r)&&H0.test(t)),eu[r]||(eu[r]={action:n,actionInfo:e}),Fi[t]=r)}function IC(e,t){Mv.register(e,t)}function LC(e,t){Hv(tu,e,t,py,"layout")}function Bo(e,t){Hv(tu,e,t,hy,"visual")}var j0=[];function Hv(e,t,n,r,a){if((Ae(t)||Ce(t))&&(n=t,t=r),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");q(e,function(l){Pe(l.__raw!==n)})}if(!(et(j0,n)>=0)){j0.push(n);var i=ny.wrapStageHandler(n,a);i.__prio=t,i.__raw=n,e.push(i)}}function Ny(e,t){kf[e]=t}function AC(e,t,n){var r=sC("registerMap");r&&r(e,t,n)}var MC=Y7;Bo($v,fk);Bo(Ou,vk);Bo(Ou,pk);Bo($v,Tk);Bo(Ou,Nk);Bo(my,iC);Ey(F2);Ty(dC,I7);Ny("default",hk);Ha({type:No,event:No,update:No},en);Ha({type:ms,event:ms,update:ms},en);Ha({type:Vi,event:Vi,update:Vi},en);Ha({type:gs,event:gs,update:gs},en);Ha({type:Pi,event:Pi,update:Pi},en);Cy("light",Ck);Cy("dark",iy);function si(e){return e==null?0:e.length||1}function J0(e){return e}var VC=(function(){function e(t,n,r,a,i,l){this._old=t,this._new=n,this._oldKeyGetter=r||J0,this._newKeyGetter=a||J0,this.context=i,this._diffModeMultiple=l==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,n=this._new,r={},a=new Array(t.length),i=new Array(n.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(n,r,i,"_newKeyGetter");for(var l=0;l<t.length;l++){var s=a[l],u=r[s],c=si(u);if(c>1){var d=u.shift();u.length===1&&(r[s]=u[0]),this._update&&this._update(d,l)}else c===1?(r[s]=null,this._update&&this._update(u,l)):this._remove&&this._remove(l)}this._performRestAdd(i,r)},e.prototype._executeMultiple=function(){var t=this._old,n=this._new,r={},a={},i=[],l=[];this._initIndexMap(t,r,i,"_oldKeyGetter"),this._initIndexMap(n,a,l,"_newKeyGetter");for(var s=0;s<i.length;s++){var u=i[s],c=r[u],d=a[u],f=si(c),v=si(d);if(f>1&&v===1)this._updateManyToOne&&this._updateManyToOne(d,c),a[u]=null;else if(f===1&&v>1)this._updateOneToMany&&this._updateOneToMany(d,c),a[u]=null;else if(f===1&&v===1)this._update&&this._update(d,c),a[u]=null;else if(f>1&&v>1)this._updateManyToMany&&this._updateManyToMany(d,c),a[u]=null;else if(f>1)for(var p=0;p<f;p++)this._remove&&this._remove(c[p]);else this._remove&&this._remove(c)}this._performRestAdd(l,a)},e.prototype._performRestAdd=function(t,n){for(var r=0;r<t.length;r++){var a=t[r],i=n[a],l=si(i);if(l>1)for(var s=0;s<l;s++)this._add&&this._add(i[s]);else l===1&&this._add&&this._add(i);n[a]=null}},e.prototype._initIndexMap=function(t,n,r,a){for(var i=this._diffModeMultiple,l=0;l<t.length;l++){var s="_ec_"+this[a](t[l],l);if(i||(r[l]=s),!!n){var u=n[s],c=si(u);c===0?(n[s]=l,i&&r.push(s)):c===1?n[s]=[u,l]:u.push(l)}}},e})(),PC=(function(){function e(t,n){this._encode=t,this._schema=n}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e})();function DC(e,t){var n={},r=n.encode={},a=Ve(),i=[],l=[],s={};q(e.dimensions,function(v){var p=e.getDimensionInfo(v),h=p.coordDim;if(h){process.env.NODE_ENV!=="production"&&Pe(pf.get(h)==null);var m=p.coordDimIndex;Kc(r,h)[m]=v,p.isExtraCoord||(a.set(h,1),RC(p.type)&&(i[0]=v),Kc(s,h)[m]=e.getDimensionIndex(p.name)),p.defaultTooltip&&l.push(v)}pf.each(function(g,y){var x=Kc(r,y),b=p.otherDims[y];b!=null&&b!==!1&&(x[b]=p.name)})});var u=[],c={};a.each(function(v,p){var h=r[p];c[p]=h[0],u=u.concat(h)}),n.dataDimsOnCoord=u,n.dataDimIndicesOnCoord=ge(u,function(v){return e.getDimensionInfo(v).storeDimIndex}),n.encodeFirstDimNotExtra=c;var d=r.label;d&&d.length&&(i=d.slice());var f=r.tooltip;return f&&f.length?l=f.slice():l.length||(l=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=l,n.userOutput=new PC(s,t),n}function Kc(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function BC(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function RC(e){return!(e==="ordinal"||e==="time")}var bs=(function(){function e(t){this.otherDims={},t!=null&&fe(this,t)}return e})(),$C=_t(),OC={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Iy=(function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=My(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return ke(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var n=this.source.dimensionsDefine;if(n)return n[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,n=G2(this.source),r=!Vy(t),a="",i=[],l=0,s=0;l<t;l++){var u=void 0,c=void 0,d=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===l)u=n?f.name:null,c=f.type,d=f.ordinalMeta,s++;else{var v=this.getSourceDimension(l);v&&(u=n?v.name:null,c=v.type)}i.push({property:u,type:c,ordinalMeta:d}),n&&u!=null&&(!f||!f.isCalculationCoord)&&(a+=r?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),a+="$",a+=OC[c]||"f",d&&(a+=d.uid),a+="$"}var p=this.source,h=[p.seriesLayoutBy,p.startIndex,a].join("$$");return{dimensions:i,hash:h}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],n=0,r=0;n<this._fullDimCount;n++){var a=void 0,i=this.dimensions[r];if(i&&i.storeDimIndex===n)i.isCalculationCoord||(a=i.name),r++;else{var l=this.getSourceDimension(n);l&&(a=l.name)}t.push(a)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e})();function Ly(e){return e instanceof Iy}function Ay(e){for(var t=Ve(),n=0;n<(e||[]).length;n++){var r=e[n],a=Ce(r)?r.name:r;a!=null&&t.get(a)==null&&t.set(a,n)}return t}function My(e){var t=$C(e);return t.dimNameMap||(t.dimNameMap=Ay(e.dimensionsDefine))}function Vy(e){return e>30}var ui=Ce,pr=ge,FC=typeof Int32Array>"u"?Array:Int32Array,zC="e\0\0",K0=-1,HC=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],GC=["_approximateExtent"],Q0,Jl,ci,ta,Qc,di,ed,Py=(function(){function e(t,n){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r,a=!1;Ly(t)?(r=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,r=t),r=r||["x","y"];for(var i={},l=[],s={},u=!1,c={},d=0;d<r.length;d++){var f=r[d],v=_e(f)?new bs({name:f}):f instanceof bs?f:new bs(f),p=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=p,v.coordDimIndex=0);var h=v.otherDims=v.otherDims||{};l.push(p),i[p]=v,c[p]!=null&&(u=!0),v.createInvertedIndices&&(s[p]=[]),h.itemName===0&&(this._nameDimIdx=d),h.itemId===0&&(this._idDimIdx=d),process.env.NODE_ENV!=="production"&&Pe(a||v.storeDimIndex>=0),a&&(v.storeDimIndex=d)}if(this.dimensions=l,this._dimInfos=i,this._initGetDimensionInfo(u),this.hostModel=n,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=Ve();q(l,function(g){m.set(i[g].storeDimIndex,g)})}}return e.prototype.getDimension=function(t){var n=this._recognizeDimIndex(t);if(n==null)return t;if(n=t,!this._dimOmitted)return this.dimensions[n];var r=this._dimIdxToName.get(n);if(r!=null)return r;var a=this._schema.getSourceDimension(n);if(a)return a.name},e.prototype.getDimensionIndex=function(t){var n=this._recognizeDimIndex(t);if(n!=null)return n;if(t==null)return-1;var r=this._getDimInfo(t);return r?r.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(Qe(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var n=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&n==null)throw new Error("Unknown dimension "+t);return n},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var n=this._dimInfos;this._getDimInfo=t?function(r){return n.hasOwnProperty(r)?n[r]:void 0}:function(r){return n[r]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,n){var r=this._dimSummary;if(n==null)return r.encodeFirstDimNotExtra[t];var a=r.encode[t];return a?a[n]:null},e.prototype.mapDimensionsAll=function(t){var n=this._dimSummary,r=n.encode[t];return(r||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,n,r){var a=this,i;if(t instanceof mf&&(i=t),!i){var l=this.dimensions,s=Vv(t)||qt(t)?new U2(t,l.length):t;i=new mf;var u=pr(l,function(c){return{type:a._dimInfos[c].type,property:c}});i.initData(s,u,r)}this._store=i,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=DC(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var n=this._store.appendData(t);this._doInit(n[0],n[1])},e.prototype.appendValues=function(t,n){var r=this._store.appendValues(t,n&&n.length),a=r.start,i=r.end,l=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var s=a;s<i;s++){var u=s-a;this._nameList[s]=n[u],l&&ed(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,n=this.dimensions,r=0;r<n.length;r++){var a=this._dimInfos[n[r]];a.ordinalMeta&&t.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==rr&&!t.fillStorage},e.prototype._doInit=function(t,n){if(!(t>=n)){var r=this._store,a=r.getProvider();this._updateOrdinalMeta();var i=this._nameList,l=this._idList,s=a.getSource().sourceFormat,u=s===bn;if(u&&!a.pure)for(var c=[],d=t;d<n;d++){var f=a.getItem(d,c);if(!this.hasItemOption&&l6(f)&&(this.hasItemOption=!0),f){var v=f.name;i[d]==null&&v!=null&&(i[d]=Wn(v,null));var p=f.id;l[d]==null&&p!=null&&(l[d]=Wn(p,null))}}if(this._shouldMakeIdFromName())for(var d=t;d<n;d++)ed(this,d);Q0(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,n){n=this.getDimension(n),this._approximateExtent[n]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,n){ui(t)?fe(this._calculationInfo,t):this._calculationInfo[t]=n},e.prototype.getName=function(t){var n=this.getRawIndex(t),r=this._nameList[n];return r==null&&this._nameDimIdx!=null&&(r=ci(this,this._nameDimIdx,n)),r==null&&(r=""),r},e.prototype._getCategory=function(t,n){var r=this._store.get(t,n),a=this._store.getOrdinalMeta(t);return a?a.categories[r]:r},e.prototype.getId=function(t){return Jl(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,n){var r=this._store,a=this._dimInfos[t];if(a)return r.get(a.storeDimIndex,n)},e.prototype.getByRawIndex=function(t,n){var r=this._store,a=this._dimInfos[t];if(a)return r.getByRawIndex(a.storeDimIndex,n)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,n){var r=this,a=this._store;return we(t)?a.getValues(pr(t,function(i){return r._getStoreDimIndex(i)}),n):a.getValues(t)},e.prototype.hasValue=function(t){for(var n=this._dimSummary.dataDimIndicesOnCoord,r=0,a=n.length;r<a;r++)if(isNaN(this._store.get(n[r],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var n=0,r=this._store.count();n<r;n++)if(this.getName(n)===t)return n;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,n){var r=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Do not supported yet");var a=r&&r[n];return a==null||isNaN(a)?K0:a},e.prototype.indicesOfNearest=function(t,n,r){return this._store.indicesOfNearest(this._getStoreDimIndex(t),n,r)},e.prototype.each=function(t,n,r){Ae(t)&&(r=n,n=t,t=[]);var a=r||this,i=pr(ta(t),this._getStoreDimIndex,this);this._store.each(i,a?dt(n,a):n)},e.prototype.filterSelf=function(t,n,r){Ae(t)&&(r=n,n=t,t=[]);var a=r||this,i=pr(ta(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?dt(n,a):n),this},e.prototype.selectRange=function(t){var n=this,r={},a=Fe(t);return q(a,function(i){var l=n._getStoreDimIndex(i);r[l]=t[i]}),this._store=this._store.selectRange(r),this},e.prototype.mapArray=function(t,n,r){Ae(t)&&(r=n,n=t,t=[]),r=r||this;var a=[];return this.each(t,function(){a.push(n&&n.apply(this,arguments))},r),a},e.prototype.map=function(t,n,r,a){var i=r||a||this,l=pr(ta(t),this._getStoreDimIndex,this),s=di(this);return s._store=this._store.map(l,i?dt(n,i):n),s},e.prototype.modify=function(t,n,r,a){var i=this,l=r||a||this;process.env.NODE_ENV!=="production"&&q(ta(t),function(u){var c=i.getDimensionInfo(u);c.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=pr(ta(t),this._getStoreDimIndex,this);this._store.modify(s,l?dt(n,l):n)},e.prototype.downSample=function(t,n,r,a){var i=di(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),n,r,a),i},e.prototype.minmaxDownSample=function(t,n){var r=di(this);return r._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),n),r},e.prototype.lttbDownSample=function(t,n){var r=di(this);return r._store=this._store.lttbDownSample(this._getStoreDimIndex(t),n),r},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var n=this.hostModel,r=this.getRawDataItem(t);return new St(r,n,n&&n.ecModel)},e.prototype.diff=function(t){var n=this;return new VC(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(r){return Jl(t,r)},function(r){return Jl(n,r)})},e.prototype.getVisual=function(t){var n=this._visual;return n&&n[t]},e.prototype.setVisual=function(t,n){this._visual=this._visual||{},ui(t)?fe(this._visual,t):this._visual[t]=n},e.prototype.getItemVisual=function(t,n){var r=this._itemVisuals[t],a=r&&r[n];return a??this.getVisual(n)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,n){var r=this._itemVisuals,a=r[t];a||(a=r[t]={});var i=a[n];return i==null&&(i=this.getVisual(n),we(i)?i=i.slice():ui(i)&&(i=fe({},i)),a[n]=i),i},e.prototype.setItemVisual=function(t,n,r){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,ui(n)?fe(a,n):a[n]=r},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,n){ui(t)?fe(this._layout,t):this._layout[t]=n},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,n,r){this._itemLayouts[t]=r?fe(this._itemLayouts[t]||{},n):n},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,n){var r=this.hostModel&&this.hostModel.seriesIndex;hS(r,this.dataType,t,n),this._graphicEls[t]=n},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,n){q(this._graphicEls,function(r,a){r&&t&&t.call(n,r,a)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:pr(this.dimensions,this._getDimInfo,this),this.hostModel)),Qc(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,n){var r=this[t];Ae(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return n.apply(this,[a].concat(ov(arguments)))})},e.internalField=(function(){Q0=function(t){var n=t._invertedIndicesMap;q(n,function(r,a){var i=t._dimInfos[a],l=i.ordinalMeta,s=t._store;if(l){r=n[a]=new FC(l.categories.length);for(var u=0;u<r.length;u++)r[u]=K0;for(var u=0;u<s.count();u++)r[s.get(i.storeDimIndex,u)]=u}})},ci=function(t,n,r){return Wn(t._getCategory(n,r),null)},Jl=function(t,n){var r=t._idList[n];return r==null&&t._idDimIdx!=null&&(r=ci(t,t._idDimIdx,n)),r==null&&(r=zC+n),r},ta=function(t){return we(t)||(t=t!=null?[t]:[]),t},di=function(t){var n=new e(t._schema?t._schema:pr(t.dimensions,t._getDimInfo,t),t.hostModel);return Qc(n,t),n},Qc=function(t,n){q(HC.concat(n.__wrappedMethods||[]),function(r){n.hasOwnProperty(r)&&(t[r]=n[r])}),t.__wrappedMethods=n.__wrappedMethods,q(GC,function(r){t[r]=Oe(n[r])}),t._calculationInfo=fe({},n._calculationInfo)},ed=function(t,n){var r=t._nameList,a=t._idList,i=t._nameDimIdx,l=t._idDimIdx,s=r[n],u=a[n];if(s==null&&i!=null&&(r[n]=s=ci(t,i,n)),u==null&&l!=null&&(a[n]=u=ci(t,l,n)),u==null&&s!=null){var c=t._nameRepeatCount,d=c[s]=(c[s]||0)+1;u=s,d>1&&(u+="__ec__"+d),a[n]=u}}})(),e})();function Dy(e,t){Vv(e)||(e=z2(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],a=Ve(),i=[],l=WC(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Vy(l),u=r===e.dimensionsDefine,c=u?My(e):Ay(r),d=t.encodeDefine;!d&&t.encodeDefaulter&&(d=t.encodeDefaulter(e,l));for(var f=Ve(d),v=new Z2(l),p=0;p<v.length;p++)v[p]=-1;function h(E){var L=v[E];if(L<0){var N=r[E],T=Ce(N)?N:{name:N},A=new bs,I=T.name;I!=null&&c.get(I)!=null&&(A.name=A.displayName=I),T.type!=null&&(A.type=T.type),T.displayName!=null&&(A.displayName=T.displayName);var D=i.length;return v[E]=D,A.storeDimIndex=E,i.push(A),A}return i[L]}if(!s)for(var p=0;p<l;p++)h(p);f.each(function(E,L){var N=$t(E).slice();if(N.length===1&&!_e(N[0])&&N[0]<0){f.set(L,!1);return}var T=f.set(L,[]);q(N,function(A,I){var D=_e(A)?c.get(A):A;D!=null&&D<l&&(T[I]=D,g(h(D),L,I))})});var m=0;q(n,function(E){var L,N,T,A;if(_e(E))L=E,A={};else{A=E,L=A.name;var I=A.ordinalMeta;A.ordinalMeta=null,A=fe({},A),A.ordinalMeta=I,N=A.dimsDef,T=A.otherDims,A.name=A.coordDim=A.coordDimIndex=A.dimsDef=A.otherDims=null}var D=f.get(L);if(D!==!1){if(D=$t(D),!D.length)for(var V=0;V<(N&&N.length||1);V++){for(;m<l&&h(m).coordDim!=null;)m++;m<l&&D.push(m++)}q(D,function(B,R){var F=h(B);if(u&&A.type!=null&&(F.type=A.type),g($e(F,A),L,R),F.name==null&&N){var W=N[R];!Ce(W)&&(W={name:W}),F.name=F.displayName=W.name,F.defaultTooltip=W.defaultTooltip}T&&$e(F.otherDims,T)})}});function g(E,L,N){pf.get(L)!=null?E.otherDims[L]=N:(E.coordDim=L,E.coordDimIndex=N,a.set(L,!0))}var y=t.generateCoord,x=t.generateCoordCount,b=x!=null;x=y?x||1:0;var S=y||"value";function _(E){E.name==null&&(E.name=E.coordDim)}if(s)q(i,function(E){_(E)}),i.sort(function(E,L){return E.storeDimIndex-L.storeDimIndex});else for(var k=0;k<l;k++){var w=h(k),C=w.coordDim;C==null&&(w.coordDim=YC(S,a,b),w.coordDimIndex=0,(!y||x<=0)&&(w.isExtraCoord=!0),x--),_(w),w.type==null&&(B2(e,k)===kt.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return UC(i),new Iy({source:e,dimensions:i,fullDimensionCount:l,dimensionOmitted:s})}function UC(e){for(var t=Ve(),n=0;n<e.length;n++){var r=e[n],a=r.name,i=t.get(a)||0;i>0&&(r.name=a+(i-1)),i++,t.set(a,i)}}function WC(e,t,n,r){var a=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return q(t,function(i){var l;Ce(i)&&(l=i.dimsDef)&&(a=Math.max(a,l.length))}),a}function YC(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var XC=(function(){function e(t){this.coordSysDims=[],this.axisMap=Ve(),this.categoryAxisMap=Ve(),this.coordSysName=t}return e})();function qC(e){var t=e.get("coordinateSystem"),n=new XC(t),r=ZC[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ZC={cartesian2d:function(e,t,n,r){var a=e.getReferringComponents("xAxis",Tn).models[0],i=e.getReferringComponents("yAxis",Tn).models[0];if(process.env.NODE_ENV!=="production"){if(!a)throw new Error('xAxis "'+Lo(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!i)throw new Error('yAxis "'+Lo(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],n.set("x",a),n.set("y",i),na(a)&&(r.set("x",a),t.firstCategoryDimIndex=0),na(i)&&(r.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var a=e.getReferringComponents("singleAxis",Tn).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],n.set("single",a),na(a)&&(r.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var a=e.getReferringComponents("polar",Tn).models[0],i=a.findAxisModel("radiusAxis"),l=a.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!l)throw new Error("angleAxis option not found");if(!i)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",l),na(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),na(l)&&(r.set("angle",l),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var a=e.ecModel,i=a.getComponent("parallel",e.get("parallelIndex")),l=t.coordSysDims=i.dimensions.slice();q(i.parallelAxisIndex,function(s,u){var c=a.getComponent("parallelAxis",s),d=l[u];n.set(d,c),na(c)&&(r.set(d,c),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=u))})}};function na(e){return e.get("type")==="category"}function jC(e,t,n){n=n||{};var r=n.byIndex,a=n.stackedCoordDimension,i,l,s;JC(t)?i=t:(l=t.schema,i=l.dimensions,s=t.store);var u=!!(e&&e.get("stack")),c,d,f,v;if(q(i,function(x,b){_e(x)&&(i[b]=x={name:x}),u&&!x.isExtraCoord&&(!r&&!c&&x.ordinalMeta&&(c=x),!d&&x.type!=="ordinal"&&x.type!=="time"&&(!a||a===x.coordDim)&&(d=x))}),d&&!r&&!c&&(r=!0),d){f="__\0ecstackresult_"+e.id,v="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var p=d.coordDim,h=d.type,m=0;q(i,function(x){x.coordDim===p&&m++});var g={name:f,coordDim:p,coordDimIndex:m,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:m+1,type:h,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};l?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,h),y.storeDimIndex=s.ensureCalculationDimension(f,h)),l.appendCalculationDimension(g),l.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:d&&d.name,stackedByDimension:c&&c.name,isStackedByIndex:r,stackedOverDimension:v,stackResultDimension:f}}function JC(e){return!Ly(e.schema)}function Va(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function KC(e,t){return Va(e,t)?e.getCalculationInfo("stackResultDimension"):t}function QC(e,t){var n=e.get("coordinateSystem"),r=Mv.get(n),a;return t&&t.coordSysDims&&(a=ge(t.coordSysDims,function(i){var l={name:i},s=t.axisMap.get(i);if(s){var u=s.get("type");l.type=BC(u)}return l})),a||(a=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),a}function eE(e,t,n){var r,a;return n&&q(e,function(i,l){var s=i.coordDim,u=n.categoryAxisMap.get(s);u&&(r==null&&(r=l),i.ordinalMeta=u.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&r!=null&&(e[r].otherDims.itemName=0),r}function Fu(e,t,n){n=n||{};var r=t.getSourceManager(),a,i=!1;a=r.getSource(),i=a.sourceFormat===bn;var l=qC(t),s=QC(t,l),u=n.useEncodeDefaulter,c=Ae(u)?u:u?Qt(n7,s,t):null,d={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!i},f=Dy(a,d),v=eE(f.dimensions,n.createInvertedIndices,l),p=i?null:r.getSharedDataStore(f),h=jC(t,{schema:f,store:p}),m=new Py(f,t);m.setCalculationInfo(h);var g=v!=null&&tE(a)?function(y,x,b,S){return S===v?b:this.defaultDimValueGetter(y,x,b,S)}:null;return m.hasItemOption=!1,m.initData(i?a:p,null,g),m}function tE(e){if(e.sourceFormat===bn){var t=nE(e.data||[]);return!we(fl(t))}}function nE(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Zn=(function(){function e(t){this._setting=t||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1])},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,n){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(n)||(r[1]=n)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e})();xu(Zn);var rE=0,Cf=(function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++rE}return e.createByAxisModel=function(t){var n=t.option,r=n.data,a=r&&ge(r,oE);return new e({categories:a,needCollect:!a,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var n,r=this._needCollect;if(!_e(t)&&!r)return t;if(r&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var a=this._getOrCreateMap();return n=a.get(t),n==null&&(r?(n=this.categories.length,this.categories[n]=t,a.set(t,n)):n=NaN),n},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ve(this.categories))},e})();function oE(e){return Ce(e)&&e.value!=null?e.value:e+""}function aE(e){var t=Math.pow(10,mu(Math.abs(e))),n=Math.abs(e/t);return n===0||n===1||n===2||n===3||n===5}function Ef(e){return e.type==="interval"||e.type==="log"}function iE(e,t,n,r){var a={},i=e[1]-e[0],l=a.interval=Ig(i/t);n!=null&&l<n&&(l=a.interval=n),r!=null&&l>r&&(l=a.interval=r);var s=a.intervalPrecision=By(l),u=a.niceTickExtent=[ft(Math.ceil(e[0]/l)*l,s),ft(Math.floor(e[1]/l)*l,s)];return lE(u,e),a}function td(e){var t=Math.pow(10,mu(e)),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,ft(n*t)}function By(e){return tr(e)+2}function em(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function lE(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),em(e,0,t),em(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function zu(e,t){return e>=t[0]&&e<=t[1]}function Hu(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Gu(e,t){return e*(t[1]-t[0])+t[0]}var Gv=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;r.type="ordinal";var a=r.getSetting("ordinalMeta");return a||(a=new Cf({})),we(a)&&(a=new Cf({categories:ge(a,function(i){return Ce(i)?i.value:i})})),r._ordinalMeta=a,r._extent=r.getSetting("extent")||[0,a.categories.length-1],r}return t.prototype.parse=function(n){return n==null?NaN:_e(n)?this._ordinalMeta.getOrdinal(n):Math.round(n)},t.prototype.contain=function(n){return n=this.parse(n),zu(n,this._extent)&&this._ordinalMeta.categories[n]!=null},t.prototype.normalize=function(n){return n=this._getTickNumber(this.parse(n)),Hu(n,this._extent)},t.prototype.scale=function(n){return n=Math.round(Gu(n,this._extent)),this.getRawOrdinalNumber(n)},t.prototype.getTicks=function(){for(var n=[],r=this._extent,a=r[0];a<=r[1];)n.push({value:a}),a++;return n},t.prototype.getMinorTicks=function(n){},t.prototype.setSortInfo=function(n){if(n==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=n.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],l=0,s=this._ordinalMeta.categories.length,u=Math.min(s,r.length);l<u;++l){var c=r[l];a[l]=c,i[c]=l}for(var d=0;l<s;++l){for(;i[d]!=null;)d++;a.push(d),i[d]=l}},t.prototype._getTickNumber=function(n){var r=this._ticksByOrdinalNumber;return r&&n>=0&&n<r.length?r[n]:n},t.prototype.getRawOrdinalNumber=function(n){var r=this._ordinalNumbersByTick;return r&&n>=0&&n<r.length?r[n]:n},t.prototype.getLabel=function(n){if(!this.isBlank()){var r=this.getRawOrdinalNumber(n.value),a=this._ordinalMeta.categories[r];return a==null?"":a+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(n,r){this.unionExtent(n.getApproximateExtent(r))},t.prototype.isInExtentRange=function(n){return n=this._getTickNumber(n),this._extent[0]<=n&&this._extent[1]>=n},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(Zn);Zn.registerClass(Gv);var mo=ft,zr=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="interval",n._interval=0,n._intervalPrecision=2,n}return t.prototype.parse=function(n){return n},t.prototype.contain=function(n){return zu(n,this._extent)},t.prototype.normalize=function(n){return Hu(n,this._extent)},t.prototype.scale=function(n){return Gu(n,this._extent)},t.prototype.setExtent=function(n,r){var a=this._extent;isNaN(n)||(a[0]=parseFloat(n)),isNaN(r)||(a[1]=parseFloat(r))},t.prototype.unionExtent=function(n){var r=this._extent;n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1]),this.setExtent(r[0],r[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(n){this._interval=n,this._niceExtent=this._extent.slice(),this._intervalPrecision=By(n)},t.prototype.getTicks=function(n){var r=this._interval,a=this._extent,i=this._niceExtent,l=this._intervalPrecision,s=[];if(!r)return s;var u=1e4;a[0]<i[0]&&(n?s.push({value:mo(i[0]-r,l)}):s.push({value:a[0]}));for(var c=i[0];c<=i[1]&&(s.push({value:c}),c=mo(c+r,l),c!==s[s.length-1].value);)if(s.length>u)return[];var d=s.length?s[s.length-1].value:i[1];return a[1]>d&&(n?s.push({value:mo(d+r,l)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(n){for(var r=this.getTicks(!0),a=[],i=this.getExtent(),l=1;l<r.length;l++){for(var s=r[l],u=r[l-1],c=0,d=[],f=s.value-u.value,v=f/n;c<n-1;){var p=mo(u.value+(c+1)*v);p>i[0]&&p<i[1]&&d.push(p),c++}a.push(d)}return a},t.prototype.getLabel=function(n,r){if(n==null)return"";var a=r&&r.precision;a==null?a=tr(n.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=mo(n.value,a,!0);return q_(i)},t.prototype.calcNiceTicks=function(n,r,a){n=n||5;var i=this._extent,l=i[1]-i[0];if(isFinite(l)){l<0&&(l=-l,i.reverse());var s=iE(i,n,r,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(n){var r=this._extent;if(r[0]===r[1])if(r[0]!==0){var a=Math.abs(r[0]);n.fixMax||(r[1]+=a/2),r[0]-=a/2}else r[1]=1;var i=r[1]-r[0];isFinite(i)||(r[0]=0,r[1]=1),this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval);var l=this._interval;n.fixMin||(r[0]=mo(Math.floor(r[0]/l)*l)),n.fixMax||(r[1]=mo(Math.ceil(r[1]/l)*l))},t.prototype.setNiceExtent=function(n,r){this._niceExtent=[n,r]},t.type="interval",t})(Zn);Zn.registerClass(zr);var Ry=typeof Float32Array<"u",sE=Ry?Float32Array:Array;function nr(e){return we(e)?Ry?new Float32Array(e):e:new sE(e)}var uE="__ec_stack_";function $y(e){return e.get("stack")||uE+e.seriesIndex}function Uv(e){return e.dim+e.index}function Oy(e,t){var n=[];return t.eachSeriesByType(e,function(r){zy(r)&&n.push(r)}),n}function cE(e){var t={};q(e,function(u){var c=u.coordinateSystem,d=c.getBaseAxis();if(!(d.type!=="time"&&d.type!=="value"))for(var f=u.getData(),v=d.dim+"_"+d.index,p=f.getDimensionIndex(f.mapDimension(d.dim)),h=f.getStore(),m=0,g=h.count();m<g;++m){var y=h.get(p,m);t[v]?t[v].push(y):t[v]=[y]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var a=t[r];if(a){a.sort(function(u,c){return u-c});for(var i=null,l=1;l<a.length;++l){var s=a[l]-a[l-1];s>0&&(i=i===null?s:Math.min(i,s))}n[r]=i}}return n}function Fy(e){var t=cE(e),n=[];return q(e,function(r){var a=r.coordinateSystem,i=a.getBaseAxis(),l=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var u=i.dim+"_"+i.index,c=t[u],d=Math.abs(l[1]-l[0]),f=i.scale.getExtent(),v=Math.abs(f[1]-f[0]);s=c?d/v*c:d}else{var p=r.getData();s=Math.abs(l[1]-l[0])/p.count()}var h=Ke(r.get("barWidth"),s),m=Ke(r.get("barMaxWidth"),s),g=Ke(r.get("barMinWidth")||(Hy(r)?.5:1),s),y=r.get("barGap"),x=r.get("barCategoryGap");n.push({bandWidth:s,barWidth:h,barMaxWidth:m,barMinWidth:g,barGap:y,barCategoryGap:x,axisKey:Uv(i),stackId:$y(r)})}),dE(n)}function dE(e){var t={};q(e,function(r,a){var i=r.axisKey,l=r.bandWidth,s=t[i]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;t[i]=s;var c=r.stackId;u[c]||s.autoWidthCount++,u[c]=u[c]||{width:0,maxWidth:0};var d=r.barWidth;d&&!u[c].width&&(u[c].width=d,d=Math.min(s.remainedWidth,d),s.remainedWidth-=d);var f=r.barMaxWidth;f&&(u[c].maxWidth=f);var v=r.barMinWidth;v&&(u[c].minWidth=v);var p=r.barGap;p!=null&&(s.gap=p);var h=r.barCategoryGap;h!=null&&(s.categoryGap=h)});var n={};return q(t,function(r,a){n[a]={};var i=r.stacks,l=r.bandWidth,s=r.categoryGap;if(s==null){var u=Fe(i).length;s=Math.max(35-u*4,15)+"%"}var c=Ke(s,l),d=Ke(r.gap,1),f=r.remainedWidth,v=r.autoWidthCount,p=(f-c)/(v+(v-1)*d);p=Math.max(p,0),q(i,function(y){var x=y.maxWidth,b=y.minWidth;if(y.width){var S=y.width;x&&(S=Math.min(S,x)),b&&(S=Math.max(S,b)),y.width=S,f-=S+d*S,v--}else{var S=p;x&&x<S&&(S=Math.min(x,f)),b&&b>S&&(S=b),S!==p&&(y.width=S,f-=S+d*S,v--)}}),p=(f-c)/(v+(v-1)*d),p=Math.max(p,0);var h=0,m;q(i,function(y,x){y.width||(y.width=p),m=y,h+=y.width*(1+d)}),m&&(h-=m.width*d);var g=-h/2;q(i,function(y,x){n[a][x]=n[a][x]||{bandWidth:l,offset:g,width:y.width},g+=y.width*(1+d)})}),n}function fE(e,t,n){if(e&&t){var r=e[Uv(t)];return r}}function vE(e,t){var n=Oy(e,t),r=Fy(n);q(n,function(a){var i=a.getData(),l=a.coordinateSystem,s=l.getBaseAxis(),u=$y(a),c=r[Uv(s)][u],d=c.offset,f=c.width;i.setLayout({bandWidth:c.bandWidth,offset:d,size:f})})}function pE(e){return{seriesType:e,plan:Bv(),reset:function(t){if(zy(t)){var n=t.getData(),r=t.coordinateSystem,a=r.getBaseAxis(),i=r.getOtherAxis(a),l=n.getDimensionIndex(n.mapDimension(i.dim)),s=n.getDimensionIndex(n.mapDimension(a.dim)),u=t.get("showBackground",!0),c=n.mapDimension(i.dim),d=n.getCalculationInfo("stackResultDimension"),f=Va(n,c)&&!!n.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),p=hE(a,i),h=Hy(t),m=t.get("barMinHeight")||0,g=d&&n.getDimensionIndex(d),y=n.getLayout("size"),x=n.getLayout("offset");return{progress:function(b,S){for(var _=b.count,k=h&&nr(_*3),w=h&&u&&nr(_*3),C=h&&nr(_),E=r.master.getRect(),L=v?E.width:E.height,N,T=S.getStore(),A=0;(N=b.next())!=null;){var I=T.get(f?g:l,N),D=T.get(s,N),V=p,B=void 0;f&&(B=+I-T.get(l,N));var R=void 0,F=void 0,W=void 0,O=void 0;if(v){var P=r.dataToPoint([I,D]);if(f){var $=r.dataToPoint([B,D]);V=$[0]}R=V,F=P[1]+x,W=P[0]-V,O=y,Math.abs(W)<m&&(W=(W<0?-1:1)*m)}else{var P=r.dataToPoint([D,I]);if(f){var $=r.dataToPoint([D,B]);V=$[1]}R=P[0]+x,F=V,W=y,O=P[1]-V,Math.abs(O)<m&&(O=(O<=0?-1:1)*m)}h?(k[A]=R,k[A+1]=F,k[A+2]=v?W:O,w&&(w[A]=v?E.x:R,w[A+1]=v?F:E.y,w[A+2]=L),C[N]=N):S.setItemLayout(N,{x:R,y:F,width:W,height:O}),A+=3}h&&S.setLayout({largePoints:k,largeDataIndices:C,largeBackgroundPoints:w,valueAxisHorizontal:v})}}}}}}function zy(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function Hy(e){return e.pipelineContext&&e.pipelineContext.large}function hE(e,t){var n=t.model.get("startValue");return n||(n=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?n>0?n:1:n))}var mE=function(e,t,n,r){for(;n<r;){var a=n+r>>>1;e[a][1]<t?n=a+1:r=a}return n},Gy=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r.type="time",r}return t.prototype.getLabel=function(n){var r=this.getSetting("useUTC");return k2(n.value,Xh[W_(ba(this._minLevelUnit))]||Xh.second,r,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(n,r,a){var i=this.getSetting("useUTC"),l=this.getSetting("locale");return Y_(n,r,a,l,i)},t.prototype.getTicks=function(){var n=this._interval,r=this._extent,a=[];if(!n)return a;a.push({value:r[0],level:0});var i=this.getSetting("useUTC"),l=_E(this._minLevelUnit,this._approxInterval,i,r);return a=a.concat(l),a.push({value:r[1],level:0}),a},t.prototype.calcNiceExtent=function(n){var r=this._extent;if(r[0]===r[1]&&(r[0]-=gn,r[1]+=gn),r[1]===-1/0&&r[0]===1/0){var a=new Date;r[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),r[0]=r[1]-gn}this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval)},t.prototype.calcNiceTicks=function(n,r,a){n=n||10;var i=this._extent,l=i[1]-i[0];this._approxInterval=l/n,r!=null&&this._approxInterval<r&&(this._approxInterval=r),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var s=Kl.length,u=Math.min(mE(Kl,this._approxInterval,0,s),s-1);this._interval=Kl[u][1],this._minLevelUnit=Kl[Math.max(u-1,0)][0]},t.prototype.parse=function(n){return Qe(n)?n:+Rr(n)},t.prototype.contain=function(n){return zu(this.parse(n),this._extent)},t.prototype.normalize=function(n){return Hu(this.parse(n),this._extent)},t.prototype.scale=function(n){return Gu(n,this._extent)},t.type="time",t})(zr),Kl=[["second",Cv],["minute",Ev],["hour",Ri],["quarter-day",Ri*6],["half-day",Ri*12],["day",gn*1.2],["half-week",gn*3.5],["week",gn*7],["month",gn*31],["quarter",gn*95],["half-year",Yh/2],["year",Yh]];function gE(e,t,n,r){var a=Rr(t),i=Rr(n),l=function(h){return qh(a,h,r)===qh(i,h,r)},s=function(){return l("year")},u=function(){return s()&&l("month")},c=function(){return u()&&l("day")},d=function(){return c()&&l("hour")},f=function(){return d()&&l("minute")},v=function(){return f()&&l("second")},p=function(){return v()&&l("millisecond")};switch(e){case"year":return s();case"month":return u();case"day":return c();case"hour":return d();case"minute":return f();case"second":return v();case"millisecond":return p()}}function yE(e,t){return e/=gn,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function xE(e){var t=30*gn;return e/=t,e>6?6:e>3?3:e>2?2:1}function wE(e){return e/=Ri,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function tm(e,t){return e/=t?Ev:Cv,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function bE(e){return Ig(e)}function SE(e,t,n){var r=new Date(e);switch(ba(t)){case"year":case"month":r[E2(n)](0);case"day":r[T2(n)](1);case"hour":r[N2(n)](0);case"minute":r[I2(n)](0);case"second":r[L2(n)](0),r[A2(n)](0)}return r.getTime()}function _E(e,t,n,r){var a=1e4,i=_2,l=0;function s(L,N,T,A,I,D,V){for(var B=new Date(N),R=N,F=B[A]();R<T&&R<=r[1];)V.push({value:R}),F+=L,B[I](F),R=B.getTime();V.push({value:R,notAdd:!0})}function u(L,N,T){var A=[],I=!N.length;if(!gE(ba(L),r[0],r[1],n)){I&&(N=[{value:SE(new Date(r[0]),L,n)},{value:r[1]}]);for(var D=0;D<N.length-1;D++){var V=N[D].value,B=N[D+1].value;if(V!==B){var R=void 0,F=void 0,W=void 0,O=!1;switch(L){case"year":R=Math.max(1,Math.round(t/gn/365)),F=Tv(n),W=X_(n);break;case"half-year":case"quarter":case"month":R=xE(t),F=Sa(n),W=E2(n);break;case"week":case"half-week":case"day":R=yE(t),F=Mu(n),W=T2(n),O=!0;break;case"half-day":case"quarter-day":case"hour":R=wE(t),F=Ji(n),W=N2(n);break;case"minute":R=tm(t,!0),F=Vu(n),W=I2(n);break;case"second":R=tm(t,!1),F=Pu(n),W=L2(n);break;case"millisecond":R=bE(t),F=Du(n),W=A2(n);break}s(R,V,B,F,W,O,A),L==="year"&&T.length>1&&D===0&&T.unshift({value:T[0].value-R})}}for(var D=0;D<A.length;D++)T.push(A[D]);return A}}for(var c=[],d=[],f=0,v=0,p=0;p<i.length&&l++<a;++p){var h=ba(i[p]);if(U_(i[p])){u(i[p],c[c.length-1]||[],d);var m=i[p+1]?ba(i[p+1]):null;if(h!==m){if(d.length){v=f,d.sort(function(L,N){return L.value-N.value});for(var g=[],y=0;y<d.length;++y){var x=d[y].value;(y===0||d[y-1].value!==x)&&(g.push(d[y]),x>=r[0]&&x<=r[1]&&f++)}var b=(r[1]-r[0])/t;if(f>b*1.5&&v>b/1.5||(c.push(g),f>b||e===i[p]))break}d=[]}}}process.env.NODE_ENV!=="production"&&l>=a&&Mt("Exceed safe limit.");for(var S=wt(ge(c,function(L){return wt(L,function(N){return N.value>=r[0]&&N.value<=r[1]&&!N.notAdd})}),function(L){return L.length>0}),_=[],k=S.length-1,p=0;p<S.length;++p)for(var w=S[p],C=0;C<w.length;++C)_.push({value:w[C].value,level:k-p});_.sort(function(L,N){return L.value-N.value});for(var E=[],p=0;p<_.length;++p)(p===0||_[p].value!==_[p-1].value)&&E.push(_[p]);return E}Zn.registerClass(Gy);var nm=Zn.prototype,Hi=zr.prototype,kE=ft,CE=Math.floor,EE=Math.ceil,Ql=Math.pow,Sn=Math.log,Wv=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="log",n.base=10,n._originalScale=new zr,n._interval=0,n}return t.prototype.getTicks=function(n){var r=this._originalScale,a=this._extent,i=r.getExtent(),l=Hi.getTicks.call(this,n);return ge(l,function(s){var u=s.value,c=ft(Ql(this.base,u));return c=u===a[0]&&this._fixMin?es(c,i[0]):c,c=u===a[1]&&this._fixMax?es(c,i[1]):c,{value:c}},this)},t.prototype.setExtent=function(n,r){var a=Sn(this.base);n=Sn(Math.max(0,n))/a,r=Sn(Math.max(0,r))/a,Hi.setExtent.call(this,n,r)},t.prototype.getExtent=function(){var n=this.base,r=nm.getExtent.call(this);r[0]=Ql(n,r[0]),r[1]=Ql(n,r[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(r[0]=es(r[0],i[0])),this._fixMax&&(r[1]=es(r[1],i[1])),r},t.prototype.unionExtent=function(n){this._originalScale.unionExtent(n);var r=this.base;n[0]=Sn(n[0])/Sn(r),n[1]=Sn(n[1])/Sn(r),nm.unionExtent.call(this,n)},t.prototype.unionExtentFromData=function(n,r){this.unionExtent(n.getApproximateExtent(r))},t.prototype.calcNiceTicks=function(n){n=n||10;var r=this._extent,a=r[1]-r[0];if(!(a===1/0||a<=0)){var i=e6(a),l=n/a*i;for(l<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[ft(EE(r[0]/i)*i),ft(CE(r[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(n){Hi.calcNiceExtent.call(this,n),this._fixMin=n.fixMin,this._fixMax=n.fixMax},t.prototype.parse=function(n){return n},t.prototype.contain=function(n){return n=Sn(n)/Sn(this.base),zu(n,this._extent)},t.prototype.normalize=function(n){return n=Sn(n)/Sn(this.base),Hu(n,this._extent)},t.prototype.scale=function(n){return n=Gu(n,this._extent),Ql(this.base,n)},t.type="log",t})(Zn),Uy=Wv.prototype;Uy.getMinorTicks=Hi.getMinorTicks;Uy.getLabel=Hi.getLabel;function es(e,t){return kE(e,tr(t))}Zn.registerClass(Wv);var TE=(function(){function e(t,n,r){this._prepareParams(t,n,r)}return e.prototype._prepareParams=function(t,n,r){r[1]<r[0]&&(r=[NaN,NaN]),this._dataMin=r[0],this._dataMax=r[1];var a=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&n.getNeedCrossZero&&n.getNeedCrossZero();var i=n.get("min",!0);i==null&&(i=n.get("startValue",!0));var l=this._modelMinRaw=i;Ae(l)?this._modelMinNum=ts(t,l({min:r[0],max:r[1]})):l!=="dataMin"&&(this._modelMinNum=ts(t,l));var s=this._modelMaxRaw=n.get("max",!0);if(Ae(s)?this._modelMaxNum=ts(t,s({min:r[0],max:r[1]})):s!=="dataMax"&&(this._modelMaxNum=ts(t,s)),a)this._axisDataLen=n.getCategories().length;else{var u=n.get("boundaryGap"),c=we(u)?u:[u||0,u||0];typeof c[0]=="boolean"||typeof c[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Br(c[0],1),Br(c[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,n=this._dataMin,r=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,l=t?null:r-n||Math.abs(n),s=this._modelMinRaw==="dataMin"?n:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?r:this._modelMaxNum,c=s!=null,d=u!=null;s==null&&(s=t?a?0:NaN:n-i[0]*l),u==null&&(u=t?a?a-1:NaN:r+i[1]*l),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var f=Gi(s)||Gi(u)||t&&!a;this._needCrossZero&&(s>0&&u>0&&!c&&(s=0),s<0&&u<0&&!d&&(u=0));var v=this._determinedMin,p=this._determinedMax;return v!=null&&(s=v,c=!0),p!=null&&(u=p,d=!0),{min:s,max:u,minFixed:c,maxFixed:d,isBlank:f}},e.prototype.modifyDataMinMax=function(t,n){process.env.NODE_ENV!=="production"&&Pe(!this.frozen),this[IE[t]]=n},e.prototype.setDeterminedMinMax=function(t,n){var r=NE[t];process.env.NODE_ENV!=="production"&&Pe(!this.frozen&&this[r]==null),this[r]=n},e.prototype.freeze=function(){this.frozen=!0},e})(),NE={min:"_determinedMin",max:"_determinedMax"},IE={min:"_dataMin",max:"_dataMax"};function LE(e,t,n){var r=e.rawExtentInfo;return r||(r=new TE(e,t,n),e.rawExtentInfo=r,r)}function ts(e,t){return t==null?null:Gi(t)?NaN:e.parse(t)}function Wy(e,t){var n=e.type,r=LE(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var a=r.min,i=r.max,l=t.ecModel;if(l&&n==="time"){var s=Oy("bar",l),u=!1;if(q(s,function(f){u=u||f.getBaseAxis()===t.axis}),u){var c=Fy(s),d=AE(a,i,t,c);a=d.min,i=d.max}}return{extent:[a,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function AE(e,t,n,r){var a=n.axis.getExtent(),i=Math.abs(a[1]-a[0]),l=fE(r,n.axis);if(l===void 0)return{min:e,max:t};var s=1/0;q(l,function(p){s=Math.min(p.offset,s)});var u=-1/0;q(l,function(p){u=Math.max(p.offset+p.width,u)}),s=Math.abs(s),u=Math.abs(u);var c=s+u,d=t-e,f=1-(s+u)/i,v=d/f-d;return t+=v*(u/c),e-=v*(s/c),{min:e,max:t}}function rm(e,t){var n=t,r=Wy(e,n),a=r.extent,i=n.get("splitNumber");e instanceof Wv&&(e.base=n.get("logBase"));var l=e.type,s=n.get("interval"),u=l==="interval"||l==="time";e.setExtent(a[0],a[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:u?n.get("minInterval"):null,maxInterval:u?n.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function ME(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Gv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Gy({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Zn.getClass(t)||zr)}}function VE(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function Ga(e){var t=e.getLabelModel().get("formatter"),n=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?(function(r){return function(a,i){return e.scale.getFormattedLabel(a,i,r)}})(t):_e(t)?(function(r){return function(a){var i=e.scale.getLabel(a),l=r.replace("{value}",i??"");return l}})(t):Ae(t)?(function(r){return function(a,i){return n!=null&&(i=a.value-n),r(PE(e,a),i,a.level!=null?{level:a.level}:null)}})(t):function(r){return e.scale.getLabel(r)}}function PE(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function DE(e){var t=e.model,n=e.scale;if(!(!t.get(["axisLabel","show"])||n.isBlank())){var r,a,i=n.getExtent();n instanceof Gv?a=n.count():(r=n.getTicks(),a=r.length);var l=e.getLabelModel(),s=Ga(e),u,c=1;a>40&&(c=Math.ceil(a/40));for(var d=0;d<a;d+=c){var f=r?r[d]:{value:i[0]+d},v=s(f,d),p=l.getTextRect(v),h=BE(p,l.get("rotate")||0);u?u.union(h):u=h}return u}}function BE(e,t){var n=t*Math.PI/180,r=e.width,a=e.height,i=r*Math.abs(Math.cos(n))+Math.abs(a*Math.sin(n)),l=r*Math.abs(Math.sin(n))+Math.abs(a*Math.cos(n)),s=new Je(e.x,e.y,i,l);return s}function Yv(e){var t=e.get("interval");return t??"auto"}function Yy(e){return e.type==="category"&&Yv(e.getLabelModel())===0}function RE(e,t){var n={};return q(e.mapDimensionsAll(t),function(r){n[KC(e,r)]=!0}),Fe(n)}var Xy=(function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e})(),om=[],$E={registerPreprocessor:Ey,registerProcessor:Ty,registerPostInit:TC,registerPostUpdate:NC,registerUpdateLifecycle:zv,registerAction:Ha,registerCoordinateSystem:IC,registerLayout:LC,registerVisual:Bo,registerTransform:MC,registerLoading:Ny,registerMap:AC,registerImpl:lC,PRIORITY:wC,ComponentModel:Ye,ComponentView:ar,SeriesModel:rn,ChartView:Xt,registerComponentModel:function(e){Ye.registerClass(e)},registerComponentView:function(e){ar.registerClass(e)},registerSeriesModel:function(e){rn.registerClass(e)},registerChartView:function(e){Xt.registerClass(e)},registerSubTypeDefaulter:function(e,t){Ye.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Y8(e,t)}};function Ao(e){if(we(e)){q(e,function(t){Ao(t)});return}et(om,e)>=0||(om.push(e),Ae(e)&&(e={install:e}),e.install($E))}var rl=_t();function qy(e,t){var n=ge(t,function(r){return e.scale.parse(r)});return e.type==="time"&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function OE(e){var t=e.getLabelModel().get("customValues");if(t){var n=Ga(e),r=e.scale.getExtent(),a=qy(e,t),i=wt(a,function(l){return l>=r[0]&&l<=r[1]});return{labels:ge(i,function(l){var s={value:l};return{formattedLabel:n(s),rawLabel:e.scale.getLabel(s),tickValue:l}})}}return e.type==="category"?zE(e):GE(e)}function FE(e,t){var n=e.getTickModel().get("customValues");if(n){var r=e.scale.getExtent(),a=qy(e,n);return{ticks:wt(a,function(i){return i>=r[0]&&i<=r[1]})}}return e.type==="category"?HE(e,t):{ticks:ge(e.scale.getTicks(),function(i){return i.value})}}function zE(e){var t=e.getLabelModel(),n=Zy(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Zy(e,t){var n=jy(e,"labels"),r=Yv(t),a=Jy(n,r);if(a)return a;var i,l;return Ae(r)?i=e5(e,r):(l=r==="auto"?UE(e):r,i=Qy(e,l)),Ky(n,r,{labels:i,labelCategoryInterval:l})}function HE(e,t){var n=jy(e,"ticks"),r=Yv(t),a=Jy(n,r);if(a)return a;var i,l;if((!t.get("show")||e.scale.isBlank())&&(i=[]),Ae(r))i=e5(e,r,!0);else if(r==="auto"){var s=Zy(e,e.getLabelModel());l=s.labelCategoryInterval,i=ge(s.labels,function(u){return u.tickValue})}else l=r,i=Qy(e,l,!0);return Ky(n,r,{ticks:i,tickCategoryInterval:l})}function GE(e){var t=e.scale.getTicks(),n=Ga(e);return{labels:ge(t,function(r,a){return{level:r.level,formattedLabel:n(r,a),rawLabel:e.scale.getLabel(r),tickValue:r.value}})}}function jy(e,t){return rl(e)[t]||(rl(e)[t]=[])}function Jy(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function Ky(e,t,n){return e.push({key:t,value:n}),n}function UE(e){var t=rl(e).autoInterval;return t??(rl(e).autoInterval=e.calculateCategoryInterval())}function WE(e){var t=YE(e),n=Ga(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,i=a.getExtent(),l=a.count();if(i[1]-i[0]<1)return 0;var s=1;l>40&&(s=Math.max(1,Math.floor(l/40)));for(var u=i[0],c=e.dataToCoord(u+1)-e.dataToCoord(u),d=Math.abs(c*Math.cos(r)),f=Math.abs(c*Math.sin(r)),v=0,p=0;u<=i[1];u+=s){var h=0,m=0,g=kg(n({value:u}),t.font,"center","top");h=g.width*1.3,m=g.height*1.3,v=Math.max(v,h,7),p=Math.max(p,m,7)}var y=v/d,x=p/f;isNaN(y)&&(y=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(y,x))),S=rl(e.model),_=e.getExtent(),k=S.lastAutoInterval,w=S.lastTickCount;return k!=null&&w!=null&&Math.abs(k-b)<=1&&Math.abs(w-l)<=1&&k>b&&S.axisExtent0===_[0]&&S.axisExtent1===_[1]?b=k:(S.lastTickCount=l,S.lastAutoInterval=b,S.axisExtent0=_[0],S.axisExtent1=_[1]),b}function YE(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Qy(e,t,n){var r=Ga(e),a=e.scale,i=a.getExtent(),l=e.getLabelModel(),s=[],u=Math.max((t||0)+1,1),c=i[0],d=a.count();c!==0&&u>1&&d/u>2&&(c=Math.round(Math.ceil(c/u)*u));var f=Yy(e),v=l.get("showMinLabel")||f,p=l.get("showMaxLabel")||f;v&&c!==i[0]&&m(i[0]);for(var h=c;h<=i[1];h+=u)m(h);p&&h-u!==i[1]&&m(i[1]);function m(g){var y={value:g};s.push(n?g:{formattedLabel:r(y),rawLabel:a.getLabel(y),tickValue:g})}return s}function e5(e,t,n){var r=e.scale,a=Ga(e),i=[];return q(r.getTicks(),function(l){var s=r.getLabel(l),u=l.value;t(l.value,s)&&i.push(n?u:{formattedLabel:a(l),rawLabel:s,tickValue:u})}),i}var am=[0,1],t5=(function(){function e(t,n,r){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=n,this._extent=r||[0,0]}return e.prototype.contain=function(t){var n=this._extent,r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return t>=r&&t<=a},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return j8(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,n){var r=this._extent;r[0]=t,r[1]=n},e.prototype.dataToCoord=function(t,n){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),im(r,a.count())),Kd(t,am,r,n)},e.prototype.coordToData=function(t,n){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),im(r,a.count()));var i=Kd(t,r,am,n);return this.scale.scale(i)},e.prototype.pointToData=function(t,n){},e.prototype.getTicksCoords=function(t){t=t||{};var n=t.tickModel||this.getTickModel(),r=FE(this,n),a=r.ticks,i=ge(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),l=n.get("alignWithLabel");return XE(this,i,l,t.clamp),i},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),n=t.get("splitNumber");n>0&&n<100||(n=5);var r=this.scale.getMinorTicks(n),a=ge(r,function(i){return ge(i,function(l){return{coord:this.dataToCoord(l),tickValue:l}},this)},this);return a},e.prototype.getViewLabels=function(){return OE(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,n=this.scale.getExtent(),r=n[1]-n[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},e.prototype.calculateCategoryInterval=function(){return WE(this)},e})();function im(e,t){var n=e[1]-e[0],r=t,a=n/r/2;e[0]+=a,e[1]-=a}function XE(e,t,n,r){var a=t.length;if(!e.onBand||n||!a)return;var i=e.getExtent(),l,s;if(a===1)t[0].coord=i[0],l=t[1]={coord:i[1],tickValue:t[0].tickValue};else{var u=t[a-1].tickValue-t[0].tickValue,c=(t[a-1].coord-t[0].coord)/u;q(t,function(p){p.coord-=c/2});var d=e.scale.getExtent();s=1+d[1]-t[a-1].tickValue,l={coord:t[a-1].coord+c*s,tickValue:d[1]+1},t.push(l)}var f=i[0]>i[1];v(t[0].coord,i[0])&&(r?t[0].coord=i[0]:t.shift()),r&&v(i[0],t[0].coord)&&t.unshift({coord:i[0]}),v(i[1],l.coord)&&(r?l.coord=i[1]:t.pop()),r&&v(l.coord,i[1])&&t.push({coord:i[1]});function v(p,h){return p=ft(p),h=ft(h),f?p>h:p<h}}function n5(e,t,n,r,a,i,l,s){var u=a-e,c=i-t,d=n-e,f=r-t,v=Math.sqrt(d*d+f*f);d/=v,f/=v;var p=u*d+c*f,h=p/v;h*=v;var m=l[0]=e+h*d,g=l[1]=t+h*f;return Math.sqrt((m-a)*(m-a)+(g-i)*(g-i))}var Er=new Le,it=new Le,Ct=new Le,Tr=new Le,zn=new Le,nu=[],Rt=new Le;function qE(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Er.fromArray(e[0]),it.fromArray(e[1]),Ct.fromArray(e[2]),Le.sub(Tr,Er,it),Le.sub(zn,Ct,it);var n=Tr.len(),r=zn.len();if(!(n<.001||r<.001)){Tr.scale(1/n),zn.scale(1/r);var a=Tr.dot(zn),i=Math.cos(t);if(i<a){var l=n5(it.x,it.y,Ct.x,Ct.y,Er.x,Er.y,nu);Rt.fromArray(nu),Rt.scaleAndAdd(zn,l/Math.tan(Math.PI-t));var s=Ct.x!==it.x?(Rt.x-it.x)/(Ct.x-it.x):(Rt.y-it.y)/(Ct.y-it.y);if(isNaN(s))return;s<0?Le.copy(Rt,it):s>1&&Le.copy(Rt,Ct),Rt.toArray(e[1])}}}}function ZE(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Er.fromArray(e[0]),it.fromArray(e[1]),Ct.fromArray(e[2]),Le.sub(Tr,it,Er),Le.sub(zn,Ct,it);var r=Tr.len(),a=zn.len();if(!(r<.001||a<.001)){Tr.scale(1/r),zn.scale(1/a);var i=Tr.dot(t),l=Math.cos(n);if(i<l){var s=n5(it.x,it.y,Ct.x,Ct.y,Er.x,Er.y,nu);Rt.fromArray(nu);var u=Math.PI/2,c=Math.acos(zn.dot(t)),d=u+c-n;if(d>=u)Le.copy(Rt,Ct);else{Rt.scaleAndAdd(zn,s/Math.tan(Math.PI/2-d));var f=Ct.x!==it.x?(Rt.x-it.x)/(Ct.x-it.x):(Rt.y-it.y)/(Ct.y-it.y);if(isNaN(f))return;f<0?Le.copy(Rt,it):f>1&&Le.copy(Rt,Ct)}Rt.toArray(e[1])}}}}function nd(e,t,n,r){var a=n==="normal",i=a?e:e.ensureState(n);i.ignore=t;var l=r.get("smooth");l&&l===!0&&(l=.3),i.shape=i.shape||{},l>0&&(i.shape.smooth=l);var s=r.getModel("lineStyle").getLineStyle();a?e.useStyle(s):i.style=s}function jE(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var a=Dd(r[0],r[1]),i=Dd(r[1],r[2]);if(!a||!i){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var l=Math.min(a,i)*n,s=Ju([],r[1],r[0],l/a),u=Ju([],r[1],r[2],l/i),c=Ju([],s,u,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],c[0],c[1]),e.bezierCurveTo(u[0],u[1],u[0],u[1],r[2][0],r[2][1])}else for(var d=1;d<r.length;d++)e.lineTo(r[d][0],r[d][1])}function JE(e,t,n){var r=e.getTextGuideLine(),a=e.getTextContent();if(!a){r&&e.removeTextGuideLine();return}for(var i=t.normal,l=i.get("show"),s=a.ignore,u=0;u<Os.length;u++){var c=Os[u],d=t[c],f=c==="normal";if(d){var v=d.get("show"),p=f?s:ke(a.states[c]&&a.states[c].ignore,s);if(p||!ke(v,l)){var h=f?r:r&&r.states[c];h&&(h.ignore=!0),r&&nd(r,!0,c,d);continue}r||(r=new Do,e.setTextGuideLine(r),!f&&(s||!l)&&nd(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),nd(r,!1,c,d)}}if(r){$e(r.style,n),r.style.fill=null;var m=i.get("showAbove"),g=e.textGuideLineConfig=e.textGuideLineConfig||{};g.showAbove=m||!1,r.buildPath=jE}}function KE(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<xn.length;r++){var a=xn[r];n[a]=e.getModel([a,t])}return n}function QE(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var a=r.label,i=a.getComputedTransform(),l=a.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,u=a.style.margin||0,c=l.clone();c.applyTransform(i),c.x-=u/2,c.y-=u/2,c.width+=u,c.height+=u;var d=s?new Hs(l,i):null;t.push({label:a,labelLine:r.labelLine,rect:c,localRect:l,obb:d,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:i})}}return t}function e9(e,t,n,r,a,i){var l=e.length;if(l<2)return;e.sort(function(k,w){return k.rect[t]-w.rect[t]});for(var s=0,u,c=!1,d=0;d<l;d++){var f=e[d],v=f.rect;u=v[t]-s,u<0&&(v[t]-=u,f.label[t]-=u,c=!0),s=v[t]+v[n]}var p=e[0],h=e[l-1],m,g;y(),m<0&&S(-m,.8),g<0&&S(g,.8),y(),x(m,g,1),x(g,m,-1),y(),m<0&&_(-m),g<0&&_(g);function y(){m=p.rect[t]-r,g=a-h.rect[t]-h.rect[n]}function x(k,w,C){if(k<0){var E=Math.min(w,-k);if(E>0){b(E*C,0,l);var L=E+k;L<0&&S(-L*C,1)}else S(-k*C,1)}}function b(k,w,C){k!==0&&(c=!0);for(var E=w;E<C;E++){var L=e[E],N=L.rect;N[t]+=k,L.label[t]+=k}}function S(k,w){for(var C=[],E=0,L=1;L<l;L++){var N=e[L-1].rect,T=Math.max(e[L].rect[t]-N[t]-N[n],0);C.push(T),E+=T}if(E){var A=Math.min(Math.abs(k)/E,w);if(k>0)for(var L=0;L<l-1;L++){var I=C[L]*A;b(I,0,L+1)}else for(var L=l-1;L>0;L--){var I=C[L-1]*A;b(-I,L,l)}}}function _(k){var w=k<0?-1:1;k=Math.abs(k);for(var C=Math.ceil(k/(l-1)),E=0;E<l-1;E++)if(w>0?b(C,0,E+1):b(-C,l-E-1,l),k-=C,k<=0)return}return c}function t9(e,t,n,r){return e9(e,"y","height",t,n)}function n9(e){var t=[];e.sort(function(m,g){return g.priority-m.priority});var n=new Je(0,0,0,0);function r(m){if(!m.ignore){var g=m.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}m.ignore=!0}for(var a=0;a<e.length;a++){var i=e[a],l=i.axisAligned,s=i.localRect,u=i.transform,c=i.label,d=i.labelLine;n.copy(i.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var f=i.obb,v=!1,p=0;p<t.length;p++){var h=t[p];if(n.intersect(h.rect)){if(l&&h.axisAligned){v=!0;break}if(h.obb||(h.obb=new Hs(h.localRect,h.transform)),f||(f=new Hs(s,u)),f.intersect(h.obb)){v=!0;break}}}v?(r(c),d&&r(d)):(c.attr("ignore",i.defaultAttr.ignore),d&&d.attr("ignore",i.defaultAttr.labelGuideIgnore),t.push(i))}}var r9=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(n){if(process.env.NODE_ENV!=="production"){var r=n.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Fu(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(n){var r=new yt,a=Fr("line",0,n.itemHeight/2,n.itemWidth,0,n.lineStyle.stroke,!1);r.add(a),a.setStyle(n.lineStyle);var i=this.getData().getVisual("symbol"),l=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,u=n.itemHeight*.8,c=Fr(s,(n.itemWidth-u)/2,(n.itemHeight-u)/2,u,u,n.itemStyle.fill);r.add(c),c.setStyle(n.itemStyle);var d=n.iconRotate==="inherit"?l:n.iconRotate||0;return c.rotation=d*Math.PI/180,c.setOrigin([n.itemWidth/2,n.itemHeight/2]),s.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill="#fff",c.style.lineWidth=2),r},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})(rn);function Xv(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(r===1){var a=Ma(e,t,n[0]);return a!=null?a+"":null}else if(r){for(var i=[],l=0;l<n.length;l++)i.push(Ma(e,t,n[l]));return i.join(" ")}}function r5(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!we(t))return t+"";for(var r=[],a=0;a<n.length;a++){var i=e.getDimensionIndex(n[a]);i>=0&&r.push(t[i])}return r.join(" ")}var qv=(function(e){me(t,e);function t(n,r,a,i){var l=e.call(this)||this;return l.updateData(n,r,a,i),l}return t.prototype._createSymbol=function(n,r,a,i,l){this.removeAll();var s=Fr(n,-1,-1,2,2,null,l);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=o9,this._symbolType=n,this.add(s)},t.prototype.stopSymbolAnimation=function(n){this.childAt(0).stopAnimation(null,n)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Fs(this.childAt(0))},t.prototype.downplay=function(){zs(this.childAt(0))},t.prototype.setZ=function(n,r){var a=this.childAt(0);a.zlevel=n,a.z=r},t.prototype.setDraggable=function(n,r){var a=this.childAt(0);a.draggable=n,a.cursor=!r&&n?"move":a.cursor},t.prototype.updateData=function(n,r,a,i){this.silent=!1;var l=n.getItemVisual(r,"symbol")||"circle",s=n.hostModel,u=t.getSymbolSize(n,r),c=l!==this._symbolType,d=i&&i.disableAnimation;if(c){var f=n.getItemVisual(r,"symbolKeepAspect");this._createSymbol(l,n,r,u,f)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:u[0]/2,scaleY:u[1]/2};d?v.attr(p):Pt(v,p,s,r),qi(v)}if(this._updateCommon(n,r,u,a,i),c){var v=this.childAt(0);if(!d){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Yt(v,p,s,r)}}d&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(n,r,a,i,l){var s=this.childAt(0),u=n.hostModel,c,d,f,v,p,h,m,g,y;if(i&&(c=i.emphasisItemStyle,d=i.blurItemStyle,f=i.selectItemStyle,v=i.focus,p=i.blurScope,m=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,h=i.emphasisDisabled),!i||n.hasItemOption){var x=i&&i.itemModel?i.itemModel:n.getItemModel(r),b=x.getModel("emphasis");c=b.getModel("itemStyle").getItemStyle(),f=x.getModel(["select","itemStyle"]).getItemStyle(),d=x.getModel(["blur","itemStyle"]).getItemStyle(),v=b.get("focus"),p=b.get("blurScope"),h=b.get("disabled"),m=Fa(x),g=b.getShallow("scale"),y=x.getShallow("cursor")}var S=n.getItemVisual(r,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var _=sy(n.getItemVisual(r,"symbolOffset"),a);_&&(s.x=_[0],s.y=_[1]),y&&s.attr("cursor",y);var k=n.getItemVisual(r,"style"),w=k.fill;if(s instanceof In){var C=s.style;s.useStyle(fe({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},k))}else s.__isEmptyBrush?s.useStyle(fe({},k)):s.useStyle(k),s.style.decal=null,s.setColor(w,l&&l.symbolInnerColor),s.style.strokeNoScale=!0;var E=n.getItemVisual(r,"liftZ"),L=this._z2;E!=null?L==null&&(this._z2=s.z2,s.z2+=E):L!=null&&(s.z2=L,this._z2=null);var N=l&&l.useNameLabel;Oa(s,m,{labelFetcher:u,labelDataIndex:r,defaultText:T,inheritColor:w,defaultOpacity:k.opacity});function T(D){return N?n.getName(D):Xv(n,D)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var A=s.ensureState("emphasis");A.style=c,s.ensureState("select").style=f,s.ensureState("blur").style=d;var I=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;A.scaleX=this._sizeX*I,A.scaleY=this._sizeY*I,this.setSymbolScale(1),Na(this,v,p,h)},t.prototype.setSymbolScale=function(n){this.scaleX=this.scaleY=n},t.prototype.fadeOut=function(n,r,a){var i=this.childAt(0),l=tt(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var u=i.getTextContent();u&&Gs(u,{style:{opacity:0}},r,{dataIndex:l,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Gs(i,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:l,cb:n,removeOpt:s})},t.getSymbolSize=function(n,r){return ly(n.getItemVisual(r,"symbolSize"))},t})(yt);function o9(e,t){this.parent.drift(e,t)}function rd(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,"symbol")!=="none"}function lm(e){return e!=null&&!Ce(e)&&(e={isIgnore:e}),e||{}}function sm(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Fa(t),cursorStyle:t.get("cursor")}}var o5=(function(){function e(t){this.group=new yt,this._SymbolCtor=t||qv}return e.prototype.updateData=function(t,n){this._progressiveEls=null,n=lm(n);var r=this.group,a=t.hostModel,i=this._data,l=this._SymbolCtor,s=n.disableAnimation,u=sm(t),c={disableAnimation:s},d=n.getSymbolPoint||function(f){return t.getItemLayout(f)};i||r.removeAll(),t.diff(i).add(function(f){var v=d(f);if(rd(t,v,f,n)){var p=new l(t,f,u,c);p.setPosition(v),t.setItemGraphicEl(f,p),r.add(p)}}).update(function(f,v){var p=i.getItemGraphicEl(v),h=d(f);if(!rd(t,h,f,n)){r.remove(p);return}var m=t.getItemVisual(f,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==m)r.remove(p),p=new l(t,f,u,c),p.setPosition(h);else{p.updateData(t,f,u,c);var y={x:h[0],y:h[1]};s?p.attr(y):Pt(p,y,a)}r.add(p),t.setItemGraphicEl(f,p)}).remove(function(f){var v=i.getItemGraphicEl(f);v&&v.fadeOut(function(){r.remove(v)},a)}).execute(),this._getSymbolPoint=d,this._data=t},e.prototype.updateLayout=function(){var t=this,n=this._data;n&&n.eachItemGraphicEl(function(r,a){var i=t._getSymbolPoint(a);r.setPosition(i),r.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=sm(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,n,r){this._progressiveEls=[],r=lm(r);function a(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var l=n.getItemLayout(i);if(rd(n,l,i,r)){var s=new this._SymbolCtor(n,i,this._seriesScope);s.traverse(a),s.setPosition(l),this.group.add(s),n.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Nu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var n=this.group,r=this._data;r&&t?r.eachItemGraphicEl(function(a){a.fadeOut(function(){n.remove(a)},r.hostModel)}):n.removeAll()},e})();function a5(e,t,n){var r=e.getBaseAxis(),a=e.getOtherAxis(r),i=a9(a,n),l=r.dim,s=a.dim,u=t.mapDimension(s),c=t.mapDimension(l),d=s==="x"||s==="radius"?1:0,f=ge(e.dimensions,function(h){return t.mapDimension(h)}),v=!1,p=t.getCalculationInfo("stackResultDimension");return Va(t,f[0])&&(v=!0,f[0]=p),Va(t,f[1])&&(v=!0,f[1]=p),{dataDimsForPoint:f,valueStart:i,valueAxisDim:s,baseAxisDim:l,stacked:!!v,valueDim:u,baseDim:c,baseDataOffset:d,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function a9(e,t){var n=0,r=e.scale.getExtent();return t==="start"?n=r[0]:t==="end"?n=r[1]:Qe(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function i5(e,t,n,r){var a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(a)&&(a=e.valueStart);var i=e.baseDataOffset,l=[];return l[i]=n.get(e.baseDim,r),l[1-i]=a,t.dataToPoint(l)}function i9(e,t){var n=[];return t.diff(e).add(function(r){n.push({cmd:"+",idx:r})}).update(function(r,a){n.push({cmd:"=",idx:a,idx1:r})}).remove(function(r){n.push({cmd:"-",idx:r})}).execute(),n}function l9(e,t,n,r,a,i,l,s){for(var u=i9(e,t),c=[],d=[],f=[],v=[],p=[],h=[],m=[],g=a5(a,t,l),y=e.getLayout("points")||[],x=t.getLayout("points")||[],b=0;b<u.length;b++){var S=u[b],_=!0,k=void 0,w=void 0;switch(S.cmd){case"=":k=S.idx*2,w=S.idx1*2;var C=y[k],E=y[k+1],L=x[w],N=x[w+1];(isNaN(C)||isNaN(E))&&(C=L,E=N),c.push(C,E),d.push(L,N),f.push(n[k],n[k+1]),v.push(r[w],r[w+1]),m.push(t.getRawIndex(S.idx1));break;case"+":var T=S.idx,A=g.dataDimsForPoint,I=a.dataToPoint([t.get(A[0],T),t.get(A[1],T)]);w=T*2,c.push(I[0],I[1]),d.push(x[w],x[w+1]);var D=i5(g,a,t,T);f.push(D[0],D[1]),v.push(r[w],r[w+1]),m.push(t.getRawIndex(T));break;case"-":_=!1}_&&(p.push(S),h.push(h.length))}h.sort(function(Z,Q){return m[Z]-m[Q]});for(var V=c.length,B=nr(V),R=nr(V),F=nr(V),W=nr(V),O=[],b=0;b<h.length;b++){var P=h[b],$=b*2,z=P*2;B[$]=c[z],B[$+1]=c[z+1],R[$]=d[z],R[$+1]=d[z+1],F[$]=f[z],F[$+1]=f[z+1],W[$]=v[z],W[$+1]=v[z+1],O[b]=p[P]}return{current:B,next:R,stackedOnCurrent:F,stackedOnNext:W,status:O}}var hr=Math.min,mr=Math.max;function Io(e,t){return isNaN(e)||isNaN(t)}function Tf(e,t,n,r,a,i,l,s,u){for(var c,d,f,v,p,h,m=n,g=0;g<r;g++){var y=t[m*2],x=t[m*2+1];if(m>=a||m<0)break;if(Io(y,x)){if(u){m+=i;continue}break}if(m===n)e[i>0?"moveTo":"lineTo"](y,x),f=y,v=x;else{var b=y-c,S=x-d;if(b*b+S*S<.5){m+=i;continue}if(l>0){for(var _=m+i,k=t[_*2],w=t[_*2+1];k===y&&w===x&&g<r;)g++,_+=i,m+=i,k=t[_*2],w=t[_*2+1],y=t[m*2],x=t[m*2+1],b=y-c,S=x-d;var C=g+1;if(u)for(;Io(k,w)&&C<r;)C++,_+=i,k=t[_*2],w=t[_*2+1];var E=.5,L=0,N=0,T=void 0,A=void 0;if(C>=r||Io(k,w))p=y,h=x;else{L=k-c,N=w-d;var I=y-c,D=k-y,V=x-d,B=w-x,R=void 0,F=void 0;if(s==="x"){R=Math.abs(I),F=Math.abs(D);var W=L>0?1:-1;p=y-W*R*l,h=x,T=y+W*F*l,A=x}else if(s==="y"){R=Math.abs(V),F=Math.abs(B);var O=N>0?1:-1;p=y,h=x-O*R*l,T=y,A=x+O*F*l}else R=Math.sqrt(I*I+V*V),F=Math.sqrt(D*D+B*B),E=F/(F+R),p=y-L*l*(1-E),h=x-N*l*(1-E),T=y+L*l*E,A=x+N*l*E,T=hr(T,mr(k,y)),A=hr(A,mr(w,x)),T=mr(T,hr(k,y)),A=mr(A,hr(w,x)),L=T-y,N=A-x,p=y-L*R/F,h=x-N*R/F,p=hr(p,mr(c,y)),h=hr(h,mr(d,x)),p=mr(p,hr(c,y)),h=mr(h,hr(d,x)),L=y-p,N=x-h,T=y+L*F/R,A=x+N*F/R}e.bezierCurveTo(f,v,p,h,y,x),f=T,v=A}else e.lineTo(y,x)}c=y,d=x,m+=i}return g}var l5=(function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e})(),s9=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new l5},t.prototype.buildPath=function(n,r){var a=r.points,i=0,l=a.length/2;if(r.connectNulls){for(;l>0&&Io(a[l*2-2],a[l*2-1]);l--);for(;i<l&&Io(a[i*2],a[i*2+1]);i++);}for(;i<l;)i+=Tf(n,a,i,l,l,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(n,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,l=$r.CMD,s,u,c=r==="x",d=[],f=0;f<i.length;){var v=i[f++],p=void 0,h=void 0,m=void 0,g=void 0,y=void 0,x=void 0,b=void 0;switch(v){case l.M:s=i[f++],u=i[f++];break;case l.L:if(p=i[f++],h=i[f++],b=c?(n-s)/(p-s):(n-u)/(h-u),b<=1&&b>=0){var S=c?(h-u)*b+u:(p-s)*b+s;return c?[n,S]:[S,n]}s=p,u=h;break;case l.C:p=i[f++],h=i[f++],m=i[f++],g=i[f++],y=i[f++],x=i[f++];var _=c?As(s,p,m,y,n,d):As(u,h,g,x,n,d);if(_>0)for(var k=0;k<_;k++){var w=d[k];if(w<=1&&w>=0){var S=c?Et(u,h,g,x,w):Et(s,p,m,y,w);return c?[n,S]:[S,n]}}s=y,u=x;break}}},t})(Ue),u9=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(l5),c9=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new u9},t.prototype.buildPath=function(n,r){var a=r.points,i=r.stackedOnPoints,l=0,s=a.length/2,u=r.smoothMonotone;if(r.connectNulls){for(;s>0&&Io(a[s*2-2],a[s*2-1]);s--);for(;l<s&&Io(a[l*2],a[l*2+1]);l++);}for(;l<s;){var c=Tf(n,a,l,s,s,1,r.smooth,u,r.connectNulls);Tf(n,i,l+c-1,c,s,-1,r.stackedOnSmooth,u,r.connectNulls),l+=c+1,n.closePath()}},t})(Ue);function s5(e,t,n,r,a){var i=e.getArea(),l=i.x,s=i.y,u=i.width,c=i.height,d=n.get(["lineStyle","width"])||0;l-=d/2,s-=d/2,u+=d,c+=d,u=Math.ceil(u),l!==Math.floor(l)&&(l=Math.floor(l),u++);var f=new bt({shape:{x:l,y:s,width:u,height:c}});if(t){var v=e.getBaseAxis(),p=v.isHorizontal(),h=v.inverse;p?(h&&(f.shape.x+=u),f.shape.width=0):(h||(f.shape.y+=c),f.shape.height=0);var m=Ae(a)?function(g){a(g,f)}:null;Yt(f,{shape:{width:u,height:c,x:l,y:s}},n,null,r,m)}return f}function u5(e,t,n){var r=e.getArea(),a=ft(r.r0,1),i=ft(r.r,1),l=new Wr({shape:{cx:ft(e.cx,1),cy:ft(e.cy,1),r0:a,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?l.shape.endAngle=r.startAngle:l.shape.r=a,Yt(l,{shape:{endAngle:r.endAngle,r:i}},n)}return l}function d9(e,t,n,r,a){if(e){if(e.type==="polar")return u5(e,t,n);if(e.type==="cartesian2d")return s5(e,t,n,r,a)}else return null;return null}function Zv(e,t){return e.type===t}function um(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function cm(e){for(var t=1/0,n=1/0,r=-1/0,a=-1/0,i=0;i<e.length;){var l=e[i++],s=e[i++];isNaN(l)||(t=Math.min(l,t),r=Math.max(l,r)),isNaN(s)||(n=Math.min(s,n),a=Math.max(s,a))}return[[t,n],[r,a]]}function dm(e,t){var n=cm(e),r=n[0],a=n[1],i=cm(t),l=i[0],s=i[1];return Math.max(Math.abs(r[0]-l[0]),Math.abs(r[1]-l[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function fm(e){return Qe(e)?e:e?.5:0}function f9(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),a=nr(r*2),i=0;i<r;i++){var l=i5(n,e,t,i);a[i*2]=l[0],a[i*2+1]=l[1]}return a}function gr(e,t,n,r,a){var i=n.getBaseAxis(),l=i.dim==="x"||i.dim==="radius"?0:1,s=[],u=0,c=[],d=[],f=[],v=[];if(a){for(u=0;u<e.length;u+=2){var p=t||e;!isNaN(p[u])&&!isNaN(p[u+1])&&v.push(e[u],e[u+1])}e=v}for(u=0;u<e.length-2;u+=2)switch(f[0]=e[u+2],f[1]=e[u+3],d[0]=e[u],d[1]=e[u+1],s.push(d[0],d[1]),r){case"end":c[l]=f[l],c[1-l]=d[1-l],s.push(c[0],c[1]);break;case"middle":var h=(d[l]+f[l])/2,m=[];c[l]=m[l]=h,c[1-l]=d[1-l],m[1-l]=f[1-l],s.push(c[0],c[1]),s.push(m[0],m[1]);break;default:c[l]=d[l],c[1-l]=f[1-l],s.push(c[0],c[1])}return s.push(e[u++],e[u++]),s}function v9(e,t){var n=[],r=e.length,a,i;function l(d,f,v){var p=d.coord,h=(v-p)/(f.coord-p),m=h8(h,[d.color,f.color]);return{coord:v,color:m}}for(var s=0;s<r;s++){var u=e[s],c=u.coord;if(c<0)a=u;else if(c>t){i?n.push(l(i,u,t)):a&&n.push(l(a,u,0),l(a,u,t));break}else a&&(n.push(l(a,u,0)),a=null),n.push(u),i=u}return n}function p9(e,t,n){var r=e.getVisual("visualMeta");if(!(!r||!r.length||!e.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var a,i,l=r.length-1;l>=0;l--){var s=e.getDimensionInfo(r[l].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=r[l];break}}if(!i){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=t.getAxis(a),c=ge(i.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),d=c.length,f=i.outerColors.slice();d&&c[0].coord>c[d-1].coord&&(c.reverse(),f.reverse());var v=v9(c,a==="x"?n.getWidth():n.getHeight()),p=v.length;if(!p&&d)return c[0].coord<0?f[1]?f[1]:c[d-1].color:f[0]?f[0]:c[0].color;var h=10,m=v[0].coord-h,g=v[p-1].coord+h,y=g-m;if(y<.001)return"transparent";q(v,function(b){b.offset=(b.coord-m)/y}),v.push({offset:p?v[p-1].offset:.5,color:f[1]||"transparent"}),v.unshift({offset:p?v[0].offset:.5,color:f[0]||"transparent"});var x=new c2(0,0,0,0,v,!0);return x[a]=m,x[a+"2"]=g,x}}function h9(e,t,n){var r=e.get("showAllSymbol"),a=r==="auto";if(!(r&&!a)){var i=n.getAxesByScale("ordinal")[0];if(i&&!(a&&m9(i,t))){var l=t.mapDimension(i.dim),s={};return q(i.getViewLabels(),function(u){var c=i.scale.getRawOrdinalNumber(u.tickValue);s[c]=1}),function(u){return!s.hasOwnProperty(t.get(l,u))}}}}function m9(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),l=0;l<a;l+=i)if(qv.getSymbolSize(t,l)[e.isHorizontal()?1:0]*1.5>r)return!1;return!0}function g9(e,t){return isNaN(e)||isNaN(t)}function y9(e){for(var t=e.length/2;t>0&&g9(e[t*2-2],e[t*2-1]);t--);return t-1}function vm(e,t){return[e[t*2],e[t*2+1]]}function x9(e,t,n){for(var r=e.length/2,a=n==="x"?0:1,i,l,s=0,u=-1,c=0;c<r;c++)if(l=e[c*2+a],!(isNaN(l)||isNaN(e[c*2+1-a]))){if(c===0){i=l;continue}if(i<=t&&l>=t||i>=t&&l<=t){u=c;break}s=c,i=l}return{range:[s,u],t:(t-i)/(l-i)}}function c5(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<xn.length;t++)if(e.get([xn[t],"endLabel","show"]))return!0;return!1}function od(e,t,n,r){if(Zv(t,"cartesian2d")){var a=r.getModel("endLabel"),i=a.get("valueAnimation"),l=r.getData(),s={lastFrameIndex:0},u=c5(r)?function(p,h){e._endLabelOnDuring(p,h,l,s,i,a,t)}:null,c=t.getBaseAxis().isHorizontal(),d=s5(t,n,r,function(){var p=e._endLabel;p&&n&&s.originalX!=null&&p.attr({x:s.originalX,y:s.originalY})},u);if(!r.get("clip",!0)){var f=d.shape,v=Math.max(f.width,f.height);c?(f.y-=v,f.height+=v*2):(f.x-=v,f.width+=v*2)}return u&&u(1,d),d}else return process.env.NODE_ENV!=="production"&&r.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),u5(t,n,r)}function w9(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),a=n.inverse,i=r?a?"right":"left":"center",l=r?"middle":a?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||l}}}var b9=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var n=new yt,r=new o5;this.group.add(r.group),this._symbolDraw=r,this._lineGroup=n,this._changePolyState=dt(this._changePolyState,this)},t.prototype.render=function(n,r,a){var i=n.coordinateSystem,l=this.group,s=n.getData(),u=n.getModel("lineStyle"),c=n.getModel("areaStyle"),d=s.getLayout("points")||[],f=i.type==="polar",v=this._coordSys,p=this._symbolDraw,h=this._polyline,m=this._polygon,g=this._lineGroup,y=!r.ssr&&n.get("animation"),x=!c.isEmpty(),b=c.get("origin"),S=a5(i,s,b),_=x&&f9(i,s,S),k=n.get("showSymbol"),w=n.get("connectNulls"),C=k&&!f&&h9(n,s,i),E=this._data;E&&E.eachItemGraphicEl(function(Z,Q){Z.__temp&&(l.remove(Z),E.setItemGraphicEl(Q,null))}),k||p.remove(),l.add(g);var L=f?!1:n.get("step"),N;i&&i.getArea&&n.get("clip",!0)&&(N=i.getArea(),N.width!=null?(N.x-=.1,N.y-=.1,N.width+=.2,N.height+=.2):N.r0&&(N.r0-=.5,N.r+=.5)),this._clipShapeForSymbol=N;var T=p9(s,i,a)||s.getVisual("style")[s.getVisual("drawType")];if(!(h&&v.type===i.type&&L===this._step))k&&p.updateData(s,{isIgnore:C,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Z){return[d[Z*2],d[Z*2+1]]}}),y&&this._initSymbolLabelAnimation(s,i,N),L&&(_&&(_=gr(_,d,i,L,w)),d=gr(d,null,i,L,w)),h=this._newPolyline(d),x?m=this._newPolygon(d,_):m&&(g.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(n,i,vf(T)),g.setClipPath(od(this,i,!0,n));else{x&&!m?m=this._newPolygon(d,_):m&&!x&&(g.remove(m),m=this._polygon=null),f||this._initOrUpdateEndLabel(n,i,vf(T));var A=g.getClipPath();if(A){var I=od(this,i,!1,n);Yt(A,{shape:I.shape},n)}else g.setClipPath(od(this,i,!0,n));k&&p.updateData(s,{isIgnore:C,clipShape:N,disableAnimation:!0,getSymbolPoint:function(Z){return[d[Z*2],d[Z*2+1]]}}),(!um(this._stackedOnPoints,_)||!um(this._points,d))&&(y?this._doUpdateAnimation(s,_,i,a,L,b,w):(L&&(_&&(_=gr(_,d,i,L,w)),d=gr(d,null,i,L,w)),h.setShape({points:d}),m&&m.setShape({points:d,stackedOnPoints:_})))}var D=n.getModel("emphasis"),V=D.get("focus"),B=D.get("blurScope"),R=D.get("disabled");if(h.useStyle($e(u.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),Ia(h,n,"lineStyle"),h.style.lineWidth>0&&n.get(["emphasis","lineStyle","width"])==="bolder"){var F=h.getState("emphasis").style;F.lineWidth=+h.style.lineWidth+1}tt(h).seriesIndex=n.seriesIndex,Na(h,V,B,R);var W=fm(n.get("smooth")),O=n.get("smoothMonotone");if(h.setShape({smooth:W,smoothMonotone:O,connectNulls:w}),m){var P=s.getCalculationInfo("stackedOnSeries"),$=0;m.useStyle($e(c.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),P&&($=fm(P.get("smooth"))),m.setShape({smooth:W,stackedOnSmooth:$,smoothMonotone:O,connectNulls:w}),Ia(m,n,"areaStyle"),tt(m).seriesIndex=n.seriesIndex,Na(m,V,B,R)}var z=this._changePolyState;s.eachItemGraphicEl(function(Z){Z&&(Z.onHoverStateChange=z)}),this._polyline.onHoverStateChange=z,this._data=s,this._coordSys=i,this._stackedOnPoints=_,this._points=d,this._step=L,this._valueOrigin=b,n.get("triggerLineEvent")&&(this.packEventData(n,h),m&&this.packEventData(n,m))},t.prototype.packEventData=function(n,r){tt(r).eventData={componentType:"series",componentSubType:"line",componentIndex:n.componentIndex,seriesIndex:n.seriesIndex,seriesName:n.name,seriesType:"line"}},t.prototype.highlight=function(n,r,a,i){var l=n.getData(),s=Ta(l,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var u=l.getLayout("points"),c=l.getItemGraphicEl(s);if(!c){var d=u[s*2],f=u[s*2+1];if(isNaN(d)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(d,f))return;var v=n.get("zlevel")||0,p=n.get("z")||0;c=new qv(l,s),c.x=d,c.y=f,c.setZ(v,p);var h=c.getSymbolPath().getTextContent();h&&(h.zlevel=v,h.z=p,h.z2=this._polyline.z2+1),c.__temp=!0,l.setItemGraphicEl(s,c),c.stopSymbolAnimation(!0),this.group.add(c)}c.highlight()}else Xt.prototype.highlight.call(this,n,r,a,i)},t.prototype.downplay=function(n,r,a,i){var l=n.getData(),s=Ta(l,i);if(this._changePolyState("normal"),s!=null&&s>=0){var u=l.getItemGraphicEl(s);u&&(u.__temp?(l.setItemGraphicEl(s,null),this.group.remove(u)):u.downplay())}else Xt.prototype.downplay.call(this,n,r,a,i)},t.prototype._changePolyState=function(n){var r=this._polygon;Ch(this._polyline,n),r&&Ch(r,n)},t.prototype._newPolyline=function(n){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new s9({shape:{points:n},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},t.prototype._newPolygon=function(n,r){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new c9({shape:{points:n,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(n,r,a){var i,l,s=r.getBaseAxis(),u=s.inverse;r.type==="cartesian2d"?(i=s.isHorizontal(),l=!1):r.type==="polar"&&(i=s.dim==="angle",l=!0);var c=n.hostModel,d=c.get("animationDuration");Ae(d)&&(d=d(null));var f=c.get("animationDelay")||0,v=Ae(f)?f(null):f;n.eachItemGraphicEl(function(p,h){var m=p;if(m){var g=[p.x,p.y],y=void 0,x=void 0,b=void 0;if(a)if(l){var S=a,_=r.pointToCoord(g);i?(y=S.startAngle,x=S.endAngle,b=-_[1]/180*Math.PI):(y=S.r0,x=S.r,b=_[0])}else{var k=a;i?(y=k.x,x=k.x+k.width,b=p.x):(y=k.y+k.height,x=k.y,b=p.y)}var w=x===y?0:(b-y)/(x-y);u&&(w=1-w);var C=Ae(f)?f(h):d*w+v,E=m.getSymbolPath(),L=E.getTextContent();m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),L&&L.animateFrom({style:{opacity:0}},{duration:300,delay:C}),E.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(n,r,a){var i=n.getModel("endLabel");if(c5(n)){var l=n.getData(),s=this._polyline,u=l.getLayout("points");if(!u){s.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||(c=this._endLabel=new nn({z2:200}),c.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var d=y9(u);d>=0&&(Oa(s,Fa(n,"endLabel"),{inheritColor:a,labelFetcher:n,labelDataIndex:d,defaultText:function(f,v,p){return p!=null?r5(l,p):Xv(l,f)},enableTextSetter:!0},w9(i,r)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(n,r,a,i,l,s,u){var c=this._endLabel,d=this._polyline;if(c){n<1&&i.originalX==null&&(i.originalX=c.x,i.originalY=c.y);var f=a.getLayout("points"),v=a.hostModel,p=v.get("connectNulls"),h=s.get("precision"),m=s.get("distance")||0,g=u.getBaseAxis(),y=g.isHorizontal(),x=g.inverse,b=r.shape,S=x?y?b.x:b.y+b.height:y?b.x+b.width:b.y,_=(y?m:0)*(x?-1:1),k=(y?0:-m)*(x?-1:1),w=y?"x":"y",C=x9(f,S,w),E=C.range,L=E[1]-E[0],N=void 0;if(L>=1){if(L>1&&!p){var T=vm(f,E[0]);c.attr({x:T[0]+_,y:T[1]+k}),l&&(N=v.getRawValue(E[0]))}else{var T=d.getPointOn(S,w);T&&c.attr({x:T[0]+_,y:T[1]+k});var A=v.getRawValue(E[0]),I=v.getRawValue(E[1]);l&&(N=x6(a,h,A,I,C.t))}i.lastFrameIndex=E[0]}else{var D=n===1||i.lastFrameIndex>0?E[0]:0,T=vm(f,D);l&&(N=v.getRawValue(D)),c.attr({x:T[0]+_,y:T[1]+k})}if(l){var V=Lu(c);typeof V.setLabelText=="function"&&V.setLabelText(N)}}},t.prototype._doUpdateAnimation=function(n,r,a,i,l,s,u){var c=this._polyline,d=this._polygon,f=n.hostModel,v=l9(this._data,n,this._stackedOnPoints,r,this._coordSys,a,this._valueOrigin),p=v.current,h=v.stackedOnCurrent,m=v.next,g=v.stackedOnNext;if(l&&(h=gr(v.stackedOnCurrent,v.current,a,l,u),p=gr(v.current,null,a,l,u),g=gr(v.stackedOnNext,v.next,a,l,u),m=gr(v.next,null,a,l,u)),dm(p,m)>3e3||d&&dm(h,g)>3e3){c.stopAnimation(),c.setShape({points:m}),d&&(d.stopAnimation(),d.setShape({points:m,stackedOnPoints:g}));return}c.shape.__points=v.current,c.shape.points=p;var y={shape:{points:m}};v.current!==p&&(y.shape.__points=v.next),c.stopAnimation(),Pt(c,y,f),d&&(d.setShape({points:p,stackedOnPoints:h}),d.stopAnimation(),Pt(d,{shape:{stackedOnPoints:g}},f),c.shape.points!==d.shape.points&&(d.shape.points=c.shape.points));for(var x=[],b=v.status,S=0;S<b.length;S++){var _=b[S].cmd;if(_==="="){var k=n.getItemGraphicEl(b[S].idx1);k&&x.push({el:k,ptIdx:S})}}c.animators&&c.animators.length&&c.animators[0].during(function(){d&&d.dirtyShape();for(var w=c.shape.__points,C=0;C<x.length;C++){var E=x[C].el,L=x[C].ptIdx*2;E.x=w[L],E.y=w[L+1],E.markRedraw()}})},t.prototype.remove=function(n){var r=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,l){i.__temp&&(r.remove(i),a.setItemGraphicEl(l,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(Xt);function jv(e,t){return{seriesType:e,plan:Bv(),reset:function(n){var r=n.getData(),a=n.coordinateSystem,i=n.pipelineContext,l=t||i.large;if(a){var s=ge(a.dimensions,function(p){return r.mapDimension(p)}).slice(0,2),u=s.length,c=r.getCalculationInfo("stackResultDimension");Va(r,s[0])&&(s[0]=c),Va(r,s[1])&&(s[1]=c);var d=r.getStore(),f=r.getDimensionIndex(s[0]),v=r.getDimensionIndex(s[1]);return u&&{progress:function(p,h){for(var m=p.end-p.start,g=l&&nr(m*u),y=[],x=[],b=p.start,S=0;b<p.end;b++){var _=void 0;if(u===1){var k=d.get(f,b);_=a.dataToPoint(k,null,x)}else y[0]=d.get(f,b),y[1]=d.get(v,b),_=a.dataToPoint(y,null,x);l?(g[S++]=_[0],g[S++]=_[1]):h.setItemLayout(b,_.slice())}l&&h.setLayout("points",g)}}}}}}var S9={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},_9=function(e){return Math.round(e.length/2)};function d5(e){return{seriesType:e,reset:function(t,n,r){var a=t.getData(),i=t.get("sampling"),l=t.coordinateSystem,s=a.count();if(s>10&&l.type==="cartesian2d"&&i){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=u.getExtent(),f=r.getDevicePixelRatio(),v=Math.abs(d[1]-d[0])*(f||1),p=Math.round(s/v);if(isFinite(p)&&p>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(c.dim),1/p)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(c.dim),1/p));var h=void 0;_e(i)?h=S9[i]:Ae(i)&&(h=i),h&&t.setData(a.downSample(a.mapDimension(c.dim),1/p,h,_9))}}}}}function k9(e){e.registerChartView(b9),e.registerSeriesModel(r9),e.registerLayout(jv("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var n=t.getData(),r=t.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",r)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,d5("line"))}var Nf=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(n,r){return Fu(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(n,r,a){var i=this.coordinateSystem;if(i&&i.clampData){var l=i.clampData(n),s=i.dataToPoint(l);if(a)q(i.getAxes(),function(v,p){if(v.type==="category"&&r!=null){var h=v.getTicksCoords(),m=v.getTickModel().get("alignWithLabel"),g=l[p],y=r[p]==="x1"||r[p]==="y1";if(y&&!m&&(g+=1),h.length<2)return;if(h.length===2){s[p]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var x=void 0,b=void 0,S=1,_=0;_<h.length;_++){var k=h[_].coord,w=_===h.length-1?h[_-1].tickValue+S:h[_].tickValue;if(w===g){b=k;break}else if(w<g)x=k;else if(x!=null&&w>g){b=(k+x)/2;break}_===1&&(S=w-h[0].tickValue)}b==null&&(x?x&&(b=h[h.length-1].coord):b=h[0].coord),s[p]=v.toGlobalCoord(b)}});else{var u=this.getData(),c=u.getLayout("offset"),d=u.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=c+d/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t})(rn);rn.registerClass(Nf);var C9=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return Fu(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var n=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>n&&(n=r),n},t.prototype.brushSelector=function(n,r,a){return a.rect(r.getItemLayout(n))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=w2(Nf.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t})(Nf),E9=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),pm=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r.type="sausage",r}return t.prototype.getDefaultShape=function(){return new E9},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,l=Math.max(r.r0||0,0),s=Math.max(r.r,0),u=(s-l)*.5,c=l+u,d=r.startAngle,f=r.endAngle,v=r.clockwise,p=Math.PI*2,h=v?f-d<p:d-f<p;h||(d=f-(v?p:-p));var m=Math.cos(d),g=Math.sin(d),y=Math.cos(f),x=Math.sin(f);h?(n.moveTo(m*l+a,g*l+i),n.arc(m*c+a,g*c+i,u,-Math.PI+d,d,!v)):n.moveTo(m*s+a,g*s+i),n.arc(a,i,s,d,f,!v),n.arc(y*c+a,x*c+i,u,f-Math.PI*2,f-Math.PI,!v),l!==0&&n.arc(a,i,l,f,d,v)},t})(Ue);function T9(e,t){t=t||{};var n=t.isRoundCap;return function(r,a,i){var l=a.position;if(!l||l instanceof Array)return Bs(r,a,i);var s=e(l),u=a.distance!=null?a.distance:5,c=this.shape,d=c.cx,f=c.cy,v=c.r,p=c.r0,h=(v+p)/2,m=c.startAngle,g=c.endAngle,y=(m+g)/2,x=n?Math.abs(v-p)/2:0,b=Math.cos,S=Math.sin,_=d+v*b(m),k=f+v*S(m),w="left",C="top";switch(s){case"startArc":_=d+(p-u)*b(y),k=f+(p-u)*S(y),w="center",C="top";break;case"insideStartArc":_=d+(p+u)*b(y),k=f+(p+u)*S(y),w="center",C="bottom";break;case"startAngle":_=d+h*b(m)+ns(m,u+x,!1),k=f+h*S(m)+rs(m,u+x,!1),w="right",C="middle";break;case"insideStartAngle":_=d+h*b(m)+ns(m,-u+x,!1),k=f+h*S(m)+rs(m,-u+x,!1),w="left",C="middle";break;case"middle":_=d+h*b(y),k=f+h*S(y),w="center",C="middle";break;case"endArc":_=d+(v+u)*b(y),k=f+(v+u)*S(y),w="center",C="bottom";break;case"insideEndArc":_=d+(v-u)*b(y),k=f+(v-u)*S(y),w="center",C="top";break;case"endAngle":_=d+h*b(g)+ns(g,u+x,!0),k=f+h*S(g)+rs(g,u+x,!0),w="left",C="middle";break;case"insideEndAngle":_=d+h*b(g)+ns(g,-u+x,!0),k=f+h*S(g)+rs(g,-u+x,!0),w="right",C="middle";break;default:return Bs(r,a,i)}return r=r||{},r.x=_,r.y=k,r.align=w,r.verticalAlign=C,r}}function N9(e,t,n,r){if(Qe(r)){e.setTextConfig({rotation:r});return}else if(we(t)){e.setTextConfig({rotation:0});return}var a=e.shape,i=a.clockwise?a.startAngle:a.endAngle,l=a.clockwise?a.endAngle:a.startAngle,s=(i+l)/2,u,c=n(t);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=i;break;case"endAngle":case"insideEndAngle":u=l;break;default:e.setTextConfig({rotation:0});return}var d=Math.PI*1.5-u;c==="middle"&&d>Math.PI/2&&d<Math.PI*1.5&&(d-=Math.PI),e.setTextConfig({rotation:d})}function ns(e,t,n){return t*Math.sin(e)*(n?-1:1)}function rs(e,t,n){return t*Math.cos(e)*(n?1:-1)}function Ci(e,t,n){var r=e.get("borderRadius");if(r==null)return n?{cornerRadius:0}:null;we(r)||(r=[r,r,r,r]);var a=Math.abs(t.r||0-t.r0||0);return{cornerRadius:ge(r,function(i){return Br(i,a)})}}var ad=Math.max,id=Math.min;function I9(e,t){var n=e.getArea&&e.getArea();if(Zv(e,"cartesian2d")){var r=e.getBaseAxis();if(r.type!=="category"||!r.onBand){var a=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=a,n.width+=a*2):(n.y-=a,n.height+=a*2)}}return n}var L9=(function(e){me(t,e);function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return t.prototype.render=function(n,r,a,i){this._model=n,this._removeOnRenderedListener(a),this._updateDrawMode(n);var l=n.get("coordinateSystem");l==="cartesian2d"||l==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(n,r,a):this._renderNormal(n,r,a,i)):process.env.NODE_ENV!=="production"&&Mt("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(n){this._clear(),this._updateDrawMode(n),this._updateLargeClip(n)},t.prototype.incrementalRender=function(n,r){this._progressiveEls=[],this._incrementalRenderLarge(n,r)},t.prototype.eachRendered=function(n){Nu(this._progressiveEls||this.group,n)},t.prototype._updateDrawMode=function(n){var r=n.pipelineContext.large;(this._isLargeDraw==null||r!==this._isLargeDraw)&&(this._isLargeDraw=r,this._clear())},t.prototype._renderNormal=function(n,r,a,i){var l=this.group,s=n.getData(),u=this._data,c=n.coordinateSystem,d=c.getBaseAxis(),f;c.type==="cartesian2d"?f=d.isHorizontal():c.type==="polar"&&(f=d.dim==="angle");var v=n.isAnimationEnabled()?n:null,p=A9(n,c);p&&this._enableRealtimeSort(p,s,a);var h=n.get("clip",!0)||p,m=I9(c,s);l.removeClipPath();var g=n.get("roundCap",!0),y=n.get("showBackground",!0),x=n.getModel("backgroundStyle"),b=x.get("borderRadius")||0,S=[],_=this._backgroundEls,k=i&&i.isInitSort,w=i&&i.type==="changeAxisOrder";function C(N){var T=os[c.type](s,N),A=$9(c,f,T);return A.useStyle(x.getItemStyle()),c.type==="cartesian2d"?A.setShape("r",b):A.setShape("cornerRadius",b),S[N]=A,A}s.diff(u).add(function(N){var T=s.getItemModel(N),A=os[c.type](s,N,T);if(y&&C(N),!(!s.hasValue(N)||!xm[c.type](A))){var I=!1;h&&(I=hm[c.type](m,A));var D=mm[c.type](n,s,N,A,f,v,d.model,!1,g);p&&(D.forceLabelAnimation=!0),wm(D,s,N,T,A,n,f,c.type==="polar"),k?D.attr({shape:A}):p?gm(p,v,D,A,N,f,!1,!1):Yt(D,{shape:A},n,N),s.setItemGraphicEl(N,D),l.add(D),D.ignore=I}}).update(function(N,T){var A=s.getItemModel(N),I=os[c.type](s,N,A);if(y){var D=void 0;_.length===0?D=C(T):(D=_[T],D.useStyle(x.getItemStyle()),c.type==="cartesian2d"?D.setShape("r",b):D.setShape("cornerRadius",b),S[N]=D);var V=os[c.type](s,N),B=v5(f,V,c);Pt(D,{shape:B},v,N)}var R=u.getItemGraphicEl(T);if(!s.hasValue(N)||!xm[c.type](I)){l.remove(R);return}var F=!1;if(h&&(F=hm[c.type](m,I),F&&l.remove(R)),R?qi(R):R=mm[c.type](n,s,N,I,f,v,d.model,!!R,g),p&&(R.forceLabelAnimation=!0),w){var W=R.getTextContent();if(W){var O=Lu(W);O.prevValue!=null&&(O.prevValue=O.value)}}else wm(R,s,N,A,I,n,f,c.type==="polar");k?R.attr({shape:I}):p?gm(p,v,R,I,N,f,!0,w):Pt(R,{shape:I},n,N,null),s.setItemGraphicEl(N,R),R.ignore=F,l.add(R)}).remove(function(N){var T=u.getItemGraphicEl(N);T&&Us(T,n,N)}).execute();var E=this._backgroundGroup||(this._backgroundGroup=new yt);E.removeAll();for(var L=0;L<S.length;++L)E.add(S[L]);l.add(E),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(n,r,a){this._clear(),Sm(n,this.group),this._updateLargeClip(n)},t.prototype._incrementalRenderLarge=function(n,r){this._removeBackground(),Sm(r,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(n){var r=n.get("clip",!0)&&d9(n.coordinateSystem,!1,n),a=this.group;r?a.setClipPath(r):a.removeClipPath()},t.prototype._enableRealtimeSort=function(n,r,a){var i=this;if(r.count()){var l=n.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(r,n,a),this._isFirstFrame=!1;else{var s=function(u){var c=r.getItemGraphicEl(u),d=c&&c.shape;return d&&Math.abs(l.isHorizontal()?d.height:d.width)||0};this._onRendered=function(){i._updateSortWithinSameData(r,s,l,a)},a.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(n,r,a){var i=[];return n.each(n.mapDimension(r.dim),function(l,s){var u=a(s);u=u??NaN,i.push({dataIndex:s,mappedValue:u,ordinalNumber:l})}),i.sort(function(l,s){return s.mappedValue-l.mappedValue}),{ordinalNumbers:ge(i,function(l){return l.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(n,r,a){for(var i=a.scale,l=n.mapDimension(a.dim),s=Number.MAX_VALUE,u=0,c=i.getOrdinalMeta().categories.length;u<c;++u){var d=n.rawIndexOf(l,i.getRawOrdinalNumber(u)),f=d<0?Number.MIN_VALUE:r(n.indexOfRawIndex(d));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(n,r){for(var a=r.scale,i=a.getExtent(),l=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);l<=s;++l)if(n.ordinalNumbers[l]!==a.getRawOrdinalNumber(l))return!0},t.prototype._updateSortWithinSameData=function(n,r,a,i){if(this._isOrderChangedWithinSameData(n,r,a)){var l=this._dataSort(n,a,r);this._isOrderDifferentInView(l,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:l}))}},t.prototype._dispatchInitSort=function(n,r,a){var i=r.baseAxis,l=this._dataSort(n,i,function(s){return n.get(n.mapDimension(r.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:l})},t.prototype.remove=function(n,r){this._clear(this._model),this._removeOnRenderedListener(r)},t.prototype.dispose=function(n,r){this._removeOnRenderedListener(r)},t.prototype._removeOnRenderedListener=function(n){this._onRendered&&(n.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(n){var r=this.group,a=this._data;n&&n.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Us(i,n,tt(i).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Xt),hm={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var a=e.x+e.width,i=e.y+e.height,l=ad(t.x,e.x),s=id(t.x+t.width,a),u=ad(t.y,e.y),c=id(t.y+t.height,i),d=s<l,f=c<u;return t.x=d&&l>a?s:l,t.y=f&&u>i?c:u,t.width=d?0:s-l,t.height=f?0:c-u,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),d||f},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var a=id(t.r,e.r),i=ad(t.r0,e.r0);t.r=a,t.r0=i;var l=a-i<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return l}},mm={cartesian2d:function(e,t,n,r,a,i,l,s,u){var c=new bt({shape:fe({},r),z2:1});if(c.__dataIndex=n,c.name="item",i){var d=c.shape,f=a?"height":"width";d[f]=0}return c},polar:function(e,t,n,r,a,i,l,s,u){var c=!a&&u?pm:Wr,d=new c({shape:r,z2:1});d.name="item";var f=f5(a);if(d.calculateTextPosition=T9(f,{isRoundCap:c===pm}),i){var v=d.shape,p=a?"r":"endAngle",h={};v[p]=a?r.r0:r.startAngle,h[p]=r[p],(s?Pt:Yt)(d,{shape:h},i)}return d}};function A9(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&n&&(r.type!=="category"&&Mt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Mt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type==="category"&&t.type==="cartesian2d")return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function gm(e,t,n,r,a,i,l,s){var u,c;i?(c={x:r.x,width:r.width},u={y:r.y,height:r.height}):(c={y:r.y,height:r.height},u={x:r.x,width:r.width}),s||(l?Pt:Yt)(n,{shape:u},t,a,null);var d=t?e.baseAxis.model:null;(l?Pt:Yt)(n,{shape:c},d,a)}function ym(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var M9=["x","y","width","height"],V9=["cx","cy","r","startAngle","endAngle"],xm={cartesian2d:function(e){return!ym(e,M9)},polar:function(e){return!ym(e,V9)}},os={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),a=n?D9(n,r):0,i=r.width>0?1:-1,l=r.height>0?1:-1;return{x:r.x+i*a/2,y:r.y+l*a/2,width:r.width-i*a,height:r.height-l*a}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function P9(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function f5(e){return(function(t){var n=t?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+n;default:return r}}})(e)}function wm(e,t,n,r,a,i,l,s){var u=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var d=e.shape,f=Ci(r.getModel("itemStyle"),d,!0);fe(d,f),e.setShape(d)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(u);var v=r.getShallow("cursor");v&&e.attr("cursor",v);var p=s?l?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":l?a.height>=0?"bottom":"top":a.width>=0?"right":"left",h=Fa(r);Oa(e,h,{labelFetcher:i,labelDataIndex:n,defaultText:Xv(i.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:p});var m=e.getTextContent();if(s&&m){var g=r.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,N9(e,g==="outside"?p:g,f5(l),r.get(["label","rotate"]))}I_(m,h,i.getRawValue(n),function(x){return r5(t,x)});var y=r.getModel(["emphasis"]);Na(e,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ia(e,r),P9(a)&&(e.style.fill="none",e.style.stroke="none",q(e.states,function(x){x.style&&(x.style.fill=x.style.stroke="none")}))}function D9(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||n==="none")return 0;var r=e.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,a,i)}var B9=(function(){function e(){}return e})(),bm=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r.type="largeBar",r}return t.prototype.getDefaultShape=function(){return new B9},t.prototype.buildPath=function(n,r){for(var a=r.points,i=this.baseDimIdx,l=1-this.baseDimIdx,s=[],u=[],c=this.barWidth,d=0;d<a.length;d+=3)u[i]=c,u[l]=a[d+2],s[i]=a[d+i],s[l]=a[d+l],n.rect(s[0],s[1],u[0],u[1])},t})(Ue);function Sm(e,t,n,r){var a=e.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,l=a.getLayout("largeDataIndices"),s=a.getLayout("size"),u=e.getModel("backgroundStyle"),c=a.getLayout("largeBackgroundPoints");if(c){var d=new bm({shape:{points:c},incremental:!!r,silent:!0,z2:0});d.baseDimIdx=i,d.largeDataIndices=l,d.barWidth=s,d.useStyle(u.getItemStyle()),t.add(d),n&&n.push(d)}var f=new bm({shape:{points:a.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=i,f.largeDataIndices=l,f.barWidth=s,t.add(f),f.useStyle(a.getVisual("style")),f.style.stroke=null,tt(f).seriesIndex=e.seriesIndex,e.get("silent")||(f.on("mousedown",_m),f.on("mousemove",_m)),n&&n.push(f)}var _m=Q2(function(e){var t=this,n=R9(t,e.offsetX,e.offsetY);tt(t).dataIndex=n>=0?n:null},30,!1);function R9(e,t,n){for(var r=e.baseDimIdx,a=1-r,i=e.shape.points,l=e.largeDataIndices,s=[],u=[],c=e.barWidth,d=0,f=i.length/3;d<f;d++){var v=d*3;if(u[r]=c,u[a]=i[v+2],s[r]=i[v+r],s[a]=i[v+a],u[a]<0&&(s[a]+=u[a],u[a]=-u[a]),t>=s[0]&&t<=s[0]+u[0]&&n>=s[1]&&n<=s[1]+u[1])return l[d]}return-1}function v5(e,t,n){if(Zv(n,"cartesian2d")){var r=t,a=n.getArea();return{x:e?r.x:a.x,y:e?a.y:r.y,width:e?r.width:a.width,height:e?a.height:r.height}}else{var a=n.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:e?a.r0:i.r0,r:e?a.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:Math.PI*2}}}function $9(e,t,n){var r=e.type==="polar"?Wr:bt;return new r({shape:v5(t,n,e),silent:!0,z2:0})}function O9(e){e.registerChartView(L9),e.registerSeriesModel(C9),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Qt(vE,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,pE("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,d5("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,n){var r=t.componentType||"series";n.eachComponent({mainType:r,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var km=Math.PI*2,as=Math.PI/180;function p5(e,t){return qs(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function h5(e,t){var n=p5(e,t),r=e.get("center"),a=e.get("radius");we(a)||(a=[0,a]);var i=Ke(n.width,t.getWidth()),l=Ke(n.height,t.getHeight()),s=Math.min(i,l),u=Ke(a[0],s/2),c=Ke(a[1],s/2),d,f,v=e.coordinateSystem;if(v){var p=v.dataToPoint(r);d=p[0]||0,f=p[1]||0}else we(r)||(r=[r,r]),d=Ke(r[0],i)+n.x,f=Ke(r[1],l)+n.y;return{cx:d,cy:f,r0:u,r:c}}function F9(e,t,n){t.eachSeriesByType(e,function(r){var a=r.getData(),i=a.mapDimension("value"),l=p5(r,n),s=h5(r,n),u=s.cx,c=s.cy,d=s.r,f=s.r0,v=-r.get("startAngle")*as,p=r.get("endAngle"),h=r.get("padAngle")*as;p=p==="auto"?v-km:-p*as;var m=r.get("minAngle")*as,g=m+h,y=0;a.each(i,function(B){!isNaN(B)&&y++});var x=a.getSum(i),b=Math.PI/(x||y)*2,S=r.get("clockwise"),_=r.get("roseType"),k=r.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var C=S?1:-1,E=[v,p],L=C*h/2;zg(E,!S),v=E[0],p=E[1];var N=m5(r);N.startAngle=v,N.endAngle=p,N.clockwise=S;var T=Math.abs(p-v),A=T,I=0,D=v;if(a.setLayout({viewRect:l,r:d}),a.each(i,function(B,R){var F;if(isNaN(B)){a.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:u,cy:c,r0:f,r:_?NaN:d});return}_!=="area"?F=x===0&&k?b:B*b:F=T/y,F<g?(F=g,A-=g):I+=B;var W=D+C*F,O=0,P=0;h>F?(O=D+C*F/2,P=O):(O=D+L,P=W-L),a.setItemLayout(R,{angle:F,startAngle:O,endAngle:P,clockwise:S,cx:u,cy:c,r0:f,r:_?Kd(B,w,[f,d]):d}),D=W}),A<km&&y)if(A<=.001){var V=T/y;a.each(i,function(B,R){if(!isNaN(B)){var F=a.getItemLayout(R);F.angle=V;var W=0,O=0;V<h?(W=v+C*(R+1/2)*V,O=W):(W=v+C*R*V+L,O=v+C*(R+1)*V-L),F.startAngle=W,F.endAngle=O}})}else b=A/I,D=v,a.each(i,function(B,R){if(!isNaN(B)){var F=a.getItemLayout(R),W=F.angle===g?g:B*b,O=0,P=0;W<h?(O=D+C*W/2,P=O):(O=D+L,P=D+C*W-L),F.startAngle=O,F.endAngle=P,D+=C*W}})})}var m5=_t();function g5(e){return{seriesType:e,reset:function(t,n){var r=n.findComponents({mainType:"legend"});if(!(!r||!r.length)){var a=t.getData();a.filterSelf(function(i){for(var l=a.getName(i),s=0;s<r.length;s++)if(!r[s].isSelected(l))return!1;return!0})}}}}var z9=Math.PI/180;function Cm(e,t,n,r,a,i,l,s,u,c){if(e.length<2)return;function d(m){for(var g=m.rB,y=g*g,x=0;x<m.list.length;x++){var b=m.list[x],S=Math.abs(b.label.y-n),_=r+b.len,k=_*_,w=Math.sqrt(Math.abs((1-S*S/y)*k)),C=t+(w+b.len2)*a,E=C-b.label.x,L=b.targetTextWidth-E*a;y5(b,L,!0),b.label.x=C}}function f(m){for(var g={list:[],maxY:0},y={list:[],maxY:0},x=0;x<m.length;x++)if(m[x].labelAlignTo==="none"){var b=m[x],S=b.label.y>n?y:g,_=Math.abs(b.label.y-n);if(_>=S.maxY){var k=b.label.x-t-b.len2*a,w=r+b.len,C=Math.abs(k)<w?Math.sqrt(_*_/(1-k*k/w/w)):w;S.rB=C,S.maxY=_}S.list.push(b)}d(g),d(y)}for(var v=e.length,p=0;p<v;p++)if(e[p].position==="outer"&&e[p].labelAlignTo==="labelLine"){var h=e[p].label.x-c;e[p].linePoints[1][0]+=h,e[p].label.x=c}t9(e,u,u+l)&&f(e)}function H9(e,t,n,r,a,i,l,s){for(var u=[],c=[],d=Number.MAX_VALUE,f=-Number.MAX_VALUE,v=0;v<e.length;v++){var p=e[v].label;ld(e[v])||(p.x<t?(d=Math.min(d,p.x),u.push(e[v])):(f=Math.max(f,p.x),c.push(e[v])))}for(var v=0;v<e.length;v++){var h=e[v];if(!ld(h)&&h.linePoints){if(h.labelStyleWidth!=null)continue;var p=h.label,m=h.linePoints,g=void 0;h.labelAlignTo==="edge"?p.x<t?g=m[2][0]-h.labelDistance-l-h.edgeDistance:g=l+a-h.edgeDistance-m[2][0]-h.labelDistance:h.labelAlignTo==="labelLine"?p.x<t?g=d-l-h.bleedMargin:g=l+a-f-h.bleedMargin:p.x<t?g=p.x-l-h.bleedMargin:g=l+a-p.x-h.bleedMargin,h.targetTextWidth=g,y5(h,g)}}Cm(c,t,n,r,1,a,i,l,s,f),Cm(u,t,n,r,-1,a,i,l,s,d);for(var v=0;v<e.length;v++){var h=e[v];if(!ld(h)&&h.linePoints){var p=h.label,m=h.linePoints,y=h.labelAlignTo==="edge",x=p.style.padding,b=x?x[1]+x[3]:0,S=p.style.backgroundColor?0:b,_=h.rect.width+S,k=m[1][0]-m[2][0];y?p.x<t?m[2][0]=l+h.edgeDistance+_+h.labelDistance:m[2][0]=l+a-h.edgeDistance-_-h.labelDistance:(p.x<t?m[2][0]=p.x+h.labelDistance:m[2][0]=p.x-h.labelDistance,m[1][0]=m[2][0]+k),m[1][1]=m[2][1]=p.y}}}function y5(e,t,n){if(n===void 0&&(n=!1),e.labelStyleWidth==null){var r=e.label,a=r.style,i=e.rect,l=a.backgroundColor,s=a.padding,u=s?s[1]+s[3]:0,c=a.overflow,d=i.width+(l?0:u);if(t<d||n){var f=i.height;if(c&&c.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-u);var v=r.getBoundingRect();r.setStyle("width",Math.ceil(v.width)),r.setStyle("backgroundColor",l)}else{var p=t-u,h=t<d?p:n?p>e.unconstrainedWidth?null:p:null;r.setStyle("width",h)}var m=r.getBoundingRect();i.width=m.width;var g=(r.style.margin||0)+2.1;i.height=m.height+g,i.y-=(i.height-f)/2}}}function ld(e){return e.position==="center"}function G9(e){var t=e.getData(),n=[],r,a,i=!1,l=(e.get("minShowLabelAngle")||0)*z9,s=t.getLayout("viewRect"),u=t.getLayout("r"),c=s.width,d=s.x,f=s.y,v=s.height;function p(k){k.ignore=!0}function h(k){if(!k.ignore)return!0;for(var w in k.states)if(k.states[w].ignore===!1)return!0;return!1}t.each(function(k){var w=t.getItemGraphicEl(k),C=w.shape,E=w.getTextContent(),L=w.getTextGuideLine(),N=t.getItemModel(k),T=N.getModel("label"),A=T.get("position")||N.get(["emphasis","label","position"]),I=T.get("distanceToLabelLine"),D=T.get("alignTo"),V=Ke(T.get("edgeDistance"),c),B=T.get("bleedMargin"),R=N.getModel("labelLine"),F=R.get("length");F=Ke(F,c);var W=R.get("length2");if(W=Ke(W,c),Math.abs(C.endAngle-C.startAngle)<l){q(E.states,p),E.ignore=!0,L&&(q(L.states,p),L.ignore=!0);return}if(h(E)){var O=(C.startAngle+C.endAngle)/2,P=Math.cos(O),$=Math.sin(O),z,Z,Q,J;r=C.cx,a=C.cy;var U=A==="inside"||A==="inner";if(A==="center")z=C.cx,Z=C.cy,J="center";else{var ne=(U?(C.r+C.r0)/2*P:C.r*P)+r,K=(U?(C.r+C.r0)/2*$:C.r*$)+a;if(z=ne+P*3,Z=K+$*3,!U){var H=ne+P*(F+u-C.r),M=K+$*(F+u-C.r),G=H+(P<0?-1:1)*W,X=M;D==="edge"?z=P<0?d+V:d+c-V:z=G+(P<0?-I:I),Z=X,Q=[[ne,K],[H,M],[G,X]]}J=U?"center":D==="edge"?P>0?"right":"left":P>0?"left":"right"}var j=Math.PI,ie=0,ue=T.get("rotate");if(Qe(ue))ie=ue*(j/180);else if(A==="center")ie=0;else if(ue==="radial"||ue===!0){var se=P<0?-O+j:-O;ie=se}else if(ue==="tangential"&&A!=="outside"&&A!=="outer"){var ae=Math.atan2(P,$);ae<0&&(ae=j*2+ae);var Y=$>0;Y&&(ae=j+ae),ie=ae-j}if(i=!!ie,E.x=z,E.y=Z,E.rotation=ie,E.setStyle({verticalAlign:"middle"}),U){E.setStyle({align:J});var de=E.states.select;de&&(de.x+=E.x,de.y+=E.y)}else{var ee=E.getBoundingRect().clone();ee.applyTransform(E.getComputedTransform());var ce=(E.style.margin||0)+2.1;ee.y-=ce/2,ee.height+=ce,n.push({label:E,labelLine:L,position:A,len:F,len2:W,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new Le(P,$),linePoints:Q,textAlign:J,labelDistance:I,labelAlignTo:D,edgeDistance:V,bleedMargin:B,rect:ee,unconstrainedWidth:ee.width,labelStyleWidth:E.style.width})}w.setTextConfig({inside:U})}}),!i&&e.get("avoidLabelOverlap")&&H9(n,r,a,u,c,v,d,f);for(var m=0;m<n.length;m++){var g=n[m],y=g.label,x=g.labelLine,b=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),b&&(q(y.states,p),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(x){var _=g.linePoints;b||!_?(q(x.states,p),x.ignore=!0):(qE(_,g.minTurnAngle),ZE(_,g.surfaceNormal,g.maxSurfaceAngle),x.setShape({points:_}),y.__hostTarget.textGuideLineConfig={anchor:new Le(_[0][0],_[0][1])})}}}var U9=(function(e){me(t,e);function t(n,r,a){var i=e.call(this)||this;i.z2=2;var l=new nn;return i.setTextContent(l),i.updateData(n,r,a,!0),i}return t.prototype.updateData=function(n,r,a,i){var l=this,s=n.hostModel,u=n.getItemModel(r),c=u.getModel("emphasis"),d=n.getItemLayout(r),f=fe(Ci(u.getModel("itemStyle"),d,!0),d);if(isNaN(f.startAngle)){l.setShape(f);return}if(i){l.setShape(f);var v=s.getShallow("animationType");s.ecModel.ssr?(Yt(l,{scaleX:0,scaleY:0},s,{dataIndex:r,isFrom:!0}),l.originX=f.cx,l.originY=f.cy):v==="scale"?(l.shape.r=d.r0,Yt(l,{shape:{r:d.r}},s,r)):a!=null?(l.setShape({startAngle:a,endAngle:a}),Yt(l,{shape:{startAngle:d.startAngle,endAngle:d.endAngle}},s,r)):(l.shape.endAngle=d.startAngle,Pt(l,{shape:{endAngle:d.endAngle}},s,r))}else qi(l),Pt(l,{shape:f},s,r);l.useStyle(n.getItemVisual(r,"style")),Ia(l,u);var p=(d.startAngle+d.endAngle)/2,h=s.get("selectedOffset"),m=Math.cos(p)*h,g=Math.sin(p)*h,y=u.getShallow("cursor");y&&l.attr("cursor",y),this._updateLabel(s,n,r),l.ensureState("emphasis").shape=fe({r:d.r+(c.get("scale")&&c.get("scaleSize")||0)},Ci(c.getModel("itemStyle"),d)),fe(l.ensureState("select"),{x:m,y:g,shape:Ci(u.getModel(["select","itemStyle"]),d)}),fe(l.ensureState("blur"),{shape:Ci(u.getModel(["blur","itemStyle"]),d)});var x=l.getTextGuideLine(),b=l.getTextContent();x&&fe(x.ensureState("select"),{x:m,y:g}),fe(b.ensureState("select"),{x:m,y:g}),Na(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(n,r,a){var i=this,l=r.getItemModel(a),s=l.getModel("labelLine"),u=r.getItemVisual(a,"style"),c=u&&u.fill,d=u&&u.opacity;Oa(i,Fa(l),{labelFetcher:r.hostModel,labelDataIndex:a,inheritColor:c,defaultOpacity:d,defaultText:n.getFormattedLabel(a,"normal")||r.getName(a)});var f=i.getTextContent();i.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var v=n.get(["label","position"]);if(v!=="outside"&&v!=="outer")i.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new Do,this.setTextGuideLine(p)),JE(this,KE(l),{stroke:c,opacity:Eo(s.get(["lineStyle","opacity"]),d,1)})}},t})(Wr),W9=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.ignoreLabelLineUpdate=!0,n}return t.prototype.render=function(n,r,a,i){var l=n.getData(),s=this._data,u=this.group,c;if(!s&&l.count()>0){for(var d=l.getItemLayout(0),f=1;isNaN(d&&d.startAngle)&&f<l.count();++f)d=l.getItemLayout(f);d&&(c=d.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),l.count()===0&&n.get("showEmptyCircle")){var v=m5(n),p=new Wr({shape:fe(h5(n,a),v)});p.useStyle(n.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,u.add(p)}l.diff(s).add(function(h){var m=new U9(l,h,c);l.setItemGraphicEl(h,m),u.add(m)}).update(function(h,m){var g=s.getItemGraphicEl(m);g.updateData(l,h,c),g.off("click"),u.add(g),l.setItemGraphicEl(h,g)}).remove(function(h){var m=s.getItemGraphicEl(h);Us(m,n,h)}).execute(),G9(n),n.get("animationTypeUpdate")!=="expansion"&&(this._data=l)},t.prototype.dispose=function(){},t.prototype.containPoint=function(n,r){var a=r.getData(),i=a.getItemLayout(0);if(i){var l=n[0]-i.cx,s=n[1]-i.cy,u=Math.sqrt(l*l+s*s);return u<=i.r&&u>=i.r0}},t.type="pie",t})(Xt);function x5(e,t,n){t=we(t)&&{coordDimensions:t}||fe({encodeDefine:e.getEncode()},t);var r=e.getSource(),a=Dy(r,t).dimensions,i=new Py(a,e);return i.initData(r,n),i}var w5=(function(){function e(t,n){this._getDataWithEncodedVisual=t,this._getRawData=n}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var n=this._getRawData();return n.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var n=this._getDataWithEncodedVisual();return n.indexOfName(t)},e.prototype.getItemVisual=function(t,n){var r=this._getDataWithEncodedVisual();return r.getItemVisual(t,n)},e})(),Y9=_t(),X9=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new w5(dt(this.getData,this),dt(this.getRawData,this)),this._defaultLabelLine(n)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return x5(this,{coordDimensions:["value"],encodeDefaulter:Qt(r7,this)})},t.prototype.getDataParams=function(n){var r=this.getData(),a=Y9(r),i=a.seats;if(!i){var l=[];r.each(r.mapDimension("value"),function(u){l.push(u)}),i=a.seats=J8(l,r.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,n);return s.percent=i[n]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(n){tf(n,"labelLine",["show"]);var r=n.labelLine,a=n.emphasis.labelLine;r.show=r.show&&n.label.show,a.show=a.show&&n.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})(rn);function q9(e){return{seriesType:e,reset:function(t,n){var r=t.getData();r.filterSelf(function(a){var i=r.mapDimension("value"),l=r.get(i,a);return!(Qe(l)&&!isNaN(l)&&l<0)})}}}function Z9(e){e.registerChartView(W9),e.registerSeriesModel(X9),Ak("pie",e.registerAction),e.registerLayout(Qt(F9,"pie")),e.registerProcessor(g5("pie")),e.registerProcessor(q9("pie"))}var j9=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(n,r){return Fu(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var n=this.option.progressive;return n??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var n=this.option.progressiveThreshold;return n??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(n,r,a){return a.point(r.getItemLayout(n))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t})(rn),b5=4,J9=(function(){function e(){}return e})(),K9=(function(e){me(t,e);function t(n){var r=e.call(this,n)||this;return r._off=0,r.hoverDataIdx=-1,r}return t.prototype.getDefaultShape=function(){return new J9},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(n,r){var a=r.points,i=r.size,l=this.symbolProxy,s=l.shape,u=n.getContext?n.getContext():n,c=u&&i[0]<b5,d=this.softClipShape,f;if(c){this._ctx=u;return}for(this._ctx=null,f=this._off;f<a.length;){var v=a[f++],p=a[f++];isNaN(v)||isNaN(p)||d&&!d.contain(v,p)||(s.x=v-i[0]/2,s.y=p-i[1]/2,s.width=i[0],s.height=i[1],l.buildPath(n,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var n=this.shape,r=n.points,a=n.size,i=this._ctx,l=this.softClipShape,s;if(i){for(s=this._off;s<r.length;){var u=r[s++],c=r[s++];isNaN(u)||isNaN(c)||l&&!l.contain(u,c)||i.fillRect(u-a[0]/2,c-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(n,r){for(var a=this.shape,i=a.points,l=a.size,s=Math.max(l[0],4),u=Math.max(l[1],4),c=i.length/2-1;c>=0;c--){var d=c*2,f=i[d]-s/2,v=i[d+1]-u/2;if(n>=f&&r>=v&&n<=f+s&&r<=v+u)return c}return-1},t.prototype.contain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect();if(n=a[0],r=a[1],i.contain(n,r)){var l=this.hoverDataIdx=this.findDataIndex(n,r);return l>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var n=this._rect;if(!n){for(var r=this.shape,a=r.points,i=r.size,l=i[0],s=i[1],u=1/0,c=1/0,d=-1/0,f=-1/0,v=0;v<a.length;){var p=a[v++],h=a[v++];u=Math.min(p,u),d=Math.max(p,d),c=Math.min(h,c),f=Math.max(h,f)}n=this._rect=new Je(u-l/2,c-s/2,d-u+l,f-c+s)}return n},t})(Ue),Q9=(function(){function e(){this.group=new yt}return e.prototype.updateData=function(t,n){this._clear();var r=this._create();r.setShape({points:t.getLayout("points")}),this._setCommon(r,t,n)},e.prototype.updateLayout=function(t){var n=t.getLayout("points");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;n=new Float32Array(n.buffer,i,a)}r.setShape("points",n),r.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,n,r){var a=this._newAdded[0],i=n.getLayout("points"),l=a&&a.shape.points;if(l&&l.length<2e4){var s=l.length,u=new Float32Array(s+i.length);u.set(l),u.set(i,s),a.endIndex=t.end,a.setShape({points:u})}else{this._newAdded=[];var c=this._create();c.startIndex=t.start,c.endIndex=t.end,c.incremental=!0,c.setShape({points:i}),this._setCommon(c,n,r)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new K9({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,n,r){var a=n.hostModel;r=r||{};var i=n.getVisual("symbolSize");t.setShape("size",i instanceof Array?i:[i,i]),t.softClipShape=r.clipShape||null,t.symbolProxy=Fr(n.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var l=t.shape.size[0]<b5;t.useStyle(a.getModel("itemStyle").getItemStyle(l?["color","shadowBlur","shadowColor"]:["color"]));var s=n.getVisual("style"),u=s&&s.fill;u&&t.setColor(u);var c=tt(t);c.seriesIndex=a.seriesIndex,t.on("mousemove",function(d){c.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(c.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e})(),eT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a){var i=n.getData(),l=this._updateSymbolDraw(i,n);l.updateData(i,{clipShape:this._getClipShape(n)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(n,r,a){var i=n.getData(),l=this._updateSymbolDraw(i,n);l.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(n,r,a){this._symbolDraw.incrementalUpdate(n,r.getData(),{clipShape:this._getClipShape(r)}),this._finished=n.end===r.getData().count()},t.prototype.updateTransform=function(n,r,a){var i=n.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var l=jv("").reset(n,r,a);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(n){this._symbolDraw&&this._symbolDraw.eachRendered(n)},t.prototype._getClipShape=function(n){if(n.get("clip",!0)){var r=n.coordinateSystem;return r&&r.getArea&&r.getArea(.1)}},t.prototype._updateSymbolDraw=function(n,r){var a=this._symbolDraw,i=r.pipelineContext,l=i.large;return(!a||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=l?new Q9:new o5,this._isLargeDraw=l,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(n,r){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Xt),tT=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(Ye),If=(function(e){me(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Tn).models[0]},t.type="cartesian2dAxis",t})(Ye);Nn(If,Xy);var S5={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},nT=je({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},S5),Jv=je({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},S5),rT=je({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Jv),oT=$e({logBase:10},Jv);const _5={category:nT,value:Jv,time:rT,log:oT};var aT={value:1,category:1,time:1,log:1};function Em(e,t,n,r){q(aT,function(a,i){var l=je(je({},_5[i],!0),r,!0),s=(function(u){me(c,u);function c(){var d=u!==null&&u.apply(this,arguments)||this;return d.type=t+"Axis."+i,d}return c.prototype.mergeDefaultAndTheme=function(d,f){var v=Ki(this),p=v?Bu(d):{},h=f.getTheme();je(d,h.get(i+"Axis")),je(d,this.getDefaultOption()),d.type=Tm(d),v&&Aa(d,p,v)},c.prototype.optionUpdated=function(){var d=this.option;d.type==="category"&&(this.__ordinalMeta=Cf.createByAxisModel(this))},c.prototype.getCategories=function(d){var f=this.option;if(f.type==="category")return d?f.data:this.__ordinalMeta.categories},c.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},c.type=t+"Axis."+i,c.defaultOption=l,c})(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",Tm)}function Tm(e){return e.type||(e.data?"category":"value")}var iT=(function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return ge(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),wt(this.getAxes(),function(n){return n.scale.type===t})},e.prototype.addAxis=function(t){var n=t.dim;this._axes[n]=t,this._dimList.push(n)},e})(),Lf=["x","y"];function Nm(e){return e.type==="interval"||e.type==="time"}var lT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="cartesian2d",n.dimensions=Lf,n}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var n=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!Nm(n)||!Nm(r))){var a=n.getExtent(),i=r.getExtent(),l=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),u=a[1]-a[0],c=i[1]-i[0];if(!(!u||!c)){var d=(s[0]-l[0])/u,f=(s[1]-l[1])/c,v=l[0]-a[0]*d,p=l[1]-i[0]*f,h=this._transform=[d,0,0,f,v,p];this._invTransform=lv([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(n){var r=this.getAxis("x"),a=this.getAxis("y");return r.contain(r.toLocalCoord(n[0]))&&a.contain(a.toLocalCoord(n[1]))},t.prototype.containData=function(n){return this.getAxis("x").containData(n[0])&&this.getAxis("y").containData(n[1])},t.prototype.containZone=function(n,r){var a=this.dataToPoint(n),i=this.dataToPoint(r),l=this.getArea(),s=new Je(a[0],a[1],i[0]-a[0],i[1]-a[1]);return l.intersect(s)},t.prototype.dataToPoint=function(n,r,a){a=a||[];var i=n[0],l=n[1];if(this._transform&&i!=null&&isFinite(i)&&l!=null&&isFinite(l))return yn(a,n,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,r)),a[1]=u.toGlobalCoord(u.dataToCoord(l,r)),a},t.prototype.clampData=function(n,r){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,l=a.getExtent(),s=i.getExtent(),u=a.parse(n[0]),c=i.parse(n[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(l[0],l[1]),u),Math.max(l[0],l[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),c),Math.max(s[0],s[1])),r},t.prototype.pointToData=function(n,r){var a=[];if(this._invTransform)return yn(a,n,this._invTransform);var i=this.getAxis("x"),l=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(n[0]),r),a[1]=l.coordToData(l.toLocalCoord(n[1]),r),a},t.prototype.getOtherAxis=function(n){return this.getAxis(n.dim==="x"?"y":"x")},t.prototype.getArea=function(n){n=n||0;var r=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1])-n,l=Math.min(a[0],a[1])-n,s=Math.max(r[0],r[1])-i+n,u=Math.max(a[0],a[1])-l+n;return new Je(i,l,s,u)},t})(iT),sT=(function(e){me(t,e);function t(n,r,a,i,l){var s=e.call(this,n,r,a)||this;return s.index=0,s.type=i||"value",s.position=l||"bottom",s}return t.prototype.isHorizontal=function(){var n=this.position;return n==="top"||n==="bottom"},t.prototype.getGlobalExtent=function(n){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),n&&r[0]>r[1]&&r.reverse(),r},t.prototype.pointToData=function(n,r){return this.coordToData(this.toLocalCoord(n[this.dim==="x"?0:1]),r)},t.prototype.setCategorySortInfo=function(n){if(this.type!=="category")return!1;this.model.option.categorySortInfo=n,this.scale.setSortInfo(n)},t})(t5);function uT(e,t,n){n=n||{};var r=e.coordinateSystem,a=t.axis,i={},l=a.getAxesOnZeroOf()[0],s=a.position,u=l?"onZero":s,c=a.dim,d=r.getRect(),f=[d.x,d.x+d.width,d.y,d.y+d.height],v={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,h=c==="x"?[f[2]-p,f[3]+p]:[f[0]-p,f[1]+p];if(l){var m=l.toGlobalCoord(l.dataToCoord(0));h[v.onZero]=Math.max(Math.min(m,h[1]),h[0])}i.position=[c==="y"?h[v[u]]:f[0],c==="x"?h[v[u]]:f[3]],i.rotation=Math.PI/2*(c==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=l?h[v[s]]-h[v.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Lo(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=t.get(["axisLabel","rotate"]);return i.labelRotate=u==="top"?-y:y,i.z2=1,i}function Im(e){return e.get("coordinateSystem")==="cartesian2d"}function Lm(e){var t={xAxisModel:null,yAxisModel:null};return q(t,function(n,r){var a=r.replace(/Model$/,""),i=e.getReferringComponents(a,Tn).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error(a+' "'+Eo(e.get(a+"Index"),e.get(a+"Id"),0)+'" not found');t[r]=i}),t}var sd=Math.log;function k5(e,t,n){var r=zr.prototype,a=r.getTicks.call(n),i=r.getTicks.call(n,!0),l=a.length-1,s=r.getInterval.call(n),u=Wy(e,t),c=u.extent,d=u.fixMin,f=u.fixMax;if(e.type==="log"){var v=sd(e.base);c=[sd(c[0])/v,sd(c[1])/v]}e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:l,fixMin:d,fixMax:f});var p=r.getExtent.call(e);d&&(c[0]=p[0]),f&&(c[1]=p[1]);var h=r.getInterval.call(e),m=c[0],g=c[1];if(d&&f)h=(g-m)/l;else if(d)for(g=c[0]+h*l;g<c[1]&&isFinite(g)&&isFinite(c[1]);)h=td(h),g=c[0]+h*l;else if(f)for(m=c[1]-h*l;m>c[0]&&isFinite(m)&&isFinite(c[0]);)h=td(h),m=c[1]-h*l;else{var y=e.getTicks().length-1;y>l&&(h=td(h));var x=h*l;g=Math.ceil(c[1]/h)*h,m=ft(g-x),m<0&&c[0]>=0?(m=0,g=ft(x)):g>0&&c[1]<=0&&(g=0,m=-ft(x))}var b=(a[0].value-i[0].value)/s,S=(a[l].value-i[l].value)/s;if(r.setExtent.call(e,m+h*b,g+h*S),r.setInterval.call(e,h),(b||S)&&r.setNiceExtent.call(e,m+h,g-h),process.env.NODE_ENV!=="production"){var _=r.getTicks.call(e);_[1]&&(!aE(h)||Qd(_[1].value)>Qd(h))&&Mt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var cT=(function(){function e(t,n,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Lf,this._initCartesian(t,n,r),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,n){var r=this._axesMap;this._updateScale(t,this.model);function a(l){var s,u=Fe(l),c=u.length;if(c){for(var d=[],f=c-1;f>=0;f--){var v=+u[f],p=l[v],h=p.model,m=p.scale;Ef(m)&&h.get("alignTicks")&&h.get("interval")==null?d.push(p):(rm(m,h),Ef(m)&&(s=p))}d.length&&(s||(s=d.pop(),rm(s.scale,s.model)),q(d,function(g){k5(g.scale,g.model,s.scale)}))}}a(r.x),a(r.y);var i={};q(r.x,function(l){Am(r,"y",l,i)}),q(r.y,function(l){Am(r,"x",l,i)}),this.resize(this.model,n)},e.prototype.resize=function(t,n,r){var a=t.getBoxLayoutParams(),i=!r&&t.get("containLabel"),l=qs(a,{width:n.getWidth(),height:n.getHeight()});this._rect=l;var s=this._axesList;u(),i&&(q(s,function(c){if(!c.model.get(["axisLabel","inside"])){var d=DE(c);if(d){var f=c.isHorizontal()?"height":"width",v=c.model.get(["axisLabel","margin"]);l[f]-=d[f]+v,c.position==="top"?l.y+=d.height+v:c.position==="left"&&(l.x+=d.width+v)}}}),u()),q(this._coordsList,function(c){c.calcAffineTransform()});function u(){q(s,function(c){var d=c.isHorizontal(),f=d?[0,l.width]:[0,l.height],v=c.inverse?1:0;c.setExtent(f[v],f[1-v]),dT(c,d?l.x:l.y)})}},e.prototype.getAxis=function(t,n){var r=this._axesMap[t];if(r!=null)return r[n||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,n){if(t!=null&&n!=null){var r="x"+t+"y"+n;return this._coordsMap[r]}Ce(t)&&(n=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===n)return i[a]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,n,r){var a=this._findConvertTarget(n);return a.cartesian?a.cartesian.dataToPoint(r):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(r)):null},e.prototype.convertFromPixel=function(t,n,r){var a=this._findConvertTarget(n);return a.cartesian?a.cartesian.pointToData(r):a.axis?a.axis.coordToData(a.axis.toLocalCoord(r)):null},e.prototype._findConvertTarget=function(t){var n=t.seriesModel,r=t.xAxisModel||n&&n.getReferringComponents("xAxis",Tn).models[0],a=t.yAxisModel||n&&n.getReferringComponents("yAxis",Tn).models[0],i=t.gridModel,l=this._coordsList,s,u;if(n)s=n.coordinateSystem,et(l,s)<0&&(s=null);else if(r&&a)s=this.getCartesian(r.componentIndex,a.componentIndex);else if(r)u=this.getAxis("x",r.componentIndex);else if(a)u=this.getAxis("y",a.componentIndex);else if(i){var c=i.coordinateSystem;c===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},e.prototype.containPoint=function(t){var n=this._coordsList[0];if(n)return n.containPoint(t)},e.prototype._initCartesian=function(t,n,r){var a=this,i=this,l={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(n.eachComponent("xAxis",c("x"),this),n.eachComponent("yAxis",c("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,q(s.x,function(d,f){q(s.y,function(v,p){var h="x"+f+"y"+p,m=new lT(h);m.master=a,m.model=t,a._coordsMap[h]=m,a._coordsList.push(m),m.addAxis(d),m.addAxis(v)})});function c(d){return function(f,v){if(ud(f,t)){var p=f.get("position");d==="x"?p!=="top"&&p!=="bottom"&&(p=l.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=l.left?"right":"left"),l[p]=!0;var h=new sT(d,ME(f),[0,0],f.get("type"),p),m=h.type==="category";h.onBand=m&&f.get("boundaryGap"),h.inverse=f.get("inverse"),f.axis=h,h.model=f,h.grid=i,h.index=v,i._axesList.push(h),s[d][v]=h,u[d]++}}}},e.prototype._updateScale=function(t,n){q(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),t.eachSeries(function(a){if(Im(a)){var i=Lm(a),l=i.xAxisModel,s=i.yAxisModel;if(!ud(l,n)||!ud(s,n))return;var u=this.getCartesian(l.componentIndex,s.componentIndex),c=a.getData(),d=u.getAxis("x"),f=u.getAxis("y");r(c,d),r(c,f)}},this);function r(a,i){q(RE(a,i.dim),function(l){i.scale.unionExtentFromData(a,l)})}},e.prototype.getTooltipAxes=function(t){var n=[],r=[];return q(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),l=a.getOtherAxis(i);et(n,i)<0&&n.push(i),et(r,l)<0&&r.push(l)}),{baseAxes:n,otherAxes:r}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(a,i){var l=new e(a,t,n);l.name="grid_"+i,l.resize(a,n,!0),a.coordinateSystem=l,r.push(l)}),t.eachSeries(function(a){if(Im(a)){var i=Lm(a),l=i.xAxisModel,s=i.yAxisModel,u=l.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+Eo(l.get("gridIndex"),l.get("gridId"),0)+'" not found');if(l.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;a.coordinateSystem=c.getCartesian(l.componentIndex,s.componentIndex)}}),r},e.dimensions=Lf,e})();function ud(e,t){return e.getCoordSysModel()===t}function Am(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var a=e[t],i,l=n.model,s=l.get(["axisLine","onZero"]),u=l.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)Mm(a[u])&&(i=a[u]);else for(var c in a)if(a.hasOwnProperty(c)&&Mm(a[c])&&!r[d(a[c])]){i=a[c];break}i&&(r[d(i)]=!0);function d(f){return f.dim+"_"+f.index}}function Mm(e){return e&&e.type!=="category"&&e.type!=="time"&&VE(e)}function dT(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim==="x"?function(a){return a+t}:function(a){return r-a+t},e.toLocalCoord=e.dim==="x"?function(a){return a-t}:function(a){return r-a+t}}var Nr=Math.PI,Ar=(function(){function e(t,n){this.group=new yt,this.opt=n,this.axisModel=t,$e(n,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var r=new yt({x:n.position[0],y:n.position[1],rotation:n.rotation});r.updateTransform(),this._transformGroup=r}return e.prototype.hasBuilder=function(t){return!!Vm[t]},e.prototype.add=function(t){Vm[t](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(t,n,r){var a=Ng(n-t),i,l;return Rs(a)?(l=r>0?"top":"bottom",i="center"):Rs(a-Nr)?(l=r>0?"bottom":"top",i="center"):(l="middle",a>0&&a<Nr?i=r>0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:l}},e.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},e.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},e})(),Vm={axisLine:function(e,t,n,r){var a=t.get(["axisLine","show"]);if(a==="auto"&&e.handleAutoShown&&(a=e.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),l=r.transform,s=[i[0],0],u=[i[1],0],c=s[0]>u[0];l&&(yn(s,s,l),yn(u,u,l));var d=fe({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new Or({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:d,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Zi(f.shape,f.style.lineWidth),f.anid="line",n.add(f);var v=t.get(["axisLine","symbol"]);if(v!=null){var p=t.get(["axisLine","symbolSize"]);_e(v)&&(v=[v,v]),(_e(p)||Qe(p))&&(p=[p,p]);var h=sy(t.get(["axisLine","symbolOffset"])||0,p),m=p[0],g=p[1];q([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(y,x){if(v[x]!=="none"&&v[x]!=null){var b=Fr(v[x],-m/2,-g/2,m,g,d.stroke,!0),S=y.r+y.offset,_=c?u:s;b.attr({rotation:y.rotate,x:_[0]+S*Math.cos(e.rotation),y:_[1]-S*Math.sin(e.rotation),silent:!0,z2:11}),n.add(b)}})}}},axisTickLabel:function(e,t,n,r){var a=pT(n,r,t,e),i=mT(n,r,t,e);if(vT(t,i,a),hT(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var l=QE(ge(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));n9(l)}},axisName:function(e,t,n,r){var a=Lo(e.axisName,t.get("name"));if(a){var i=t.get("nameLocation"),l=e.nameDirection,s=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,c=t.axis.getExtent(),d=c[0]>c[1]?-1:1,f=[i==="start"?c[0]-d*u:i==="end"?c[1]+d*u:(c[0]+c[1])/2,Dm(i)?e.labelOffset+l*u:0],v,p=t.get("nameRotate");p!=null&&(p=p*Nr/180);var h;Dm(i)?v=Ar.innerTextLayout(e.rotation,p??e.rotation,l):(v=fT(e.rotation,i,p||0,c),h=e.axisNameAvailableWidth,h!=null&&(h=Math.abs(h/Math.sin(v.rotation)),!isFinite(h)&&(h=null)));var m=s.getFont(),g=t.get("nameTruncate",!0)||{},y=g.ellipsis,x=Lo(e.nameTruncateMaxWidth,g.maxWidth,h),b=new nn({x:f[0],y:f[1],rotation:v.rotation,silent:Ar.isLabelSilent(t),style:ji(s,{text:a,font:m,overflow:"truncate",width:x,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(Tu({el:b,componentModel:t,itemName:a}),b.__fullText=a,b.anid="name",t.get("triggerEvent")){var S=Ar.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,tt(b).eventData=S}r.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function fT(e,t,n,r){var a=Ng(n-e),i,l,s=r[0]>r[1],u=t==="start"&&!s||t!=="start"&&s;return Rs(a-Nr/2)?(l=u?"bottom":"top",i="center"):Rs(a-Nr*1.5)?(l=u?"top":"bottom",i="center"):(l="middle",a<Nr*1.5&&a>Nr/2?i=u?"left":"right":i=u?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:l}}function vT(e,t,n){if(!Yy(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var i=t[0],l=t[1],s=t[t.length-1],u=t[t.length-2],c=n[0],d=n[1],f=n[n.length-1],v=n[n.length-2];r===!1?(sn(i),sn(c)):Pm(i,l)&&(r?(sn(l),sn(d)):(sn(i),sn(c))),a===!1?(sn(s),sn(f)):Pm(u,s)&&(a?(sn(u),sn(v)):(sn(s),sn(f)))}}function sn(e){e&&(e.ignore=!0)}function Pm(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(!(!n||!r)){var a=iv([]);return rg(a,a,-e.rotation),n.applyTransform(ya([],a,e.getLocalTransform())),r.applyTransform(ya([],a,t.getLocalTransform())),n.intersect(r)}}function Dm(e){return e==="middle"||e==="center"}function C5(e,t,n,r,a){for(var i=[],l=[],s=[],u=0;u<e.length;u++){var c=e[u].coord;l[0]=c,l[1]=0,s[0]=c,s[1]=n,t&&(yn(l,l,t),yn(s,s,t));var d=new Or({shape:{x1:l[0],y1:l[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});Zi(d.shape,d.style.lineWidth),d.anid=a+"_"+e[u].tickValue,i.push(d)}return i}function pT(e,t,n,r){var a=n.axis,i=n.getModel("axisTick"),l=i.get("show");if(l==="auto"&&r.handleAutoShown&&(l=r.handleAutoShown("axisTick")),!(!l||a.scale.isBlank())){for(var s=i.getModel("lineStyle"),u=r.tickDirection*i.get("length"),c=a.getTicksCoords(),d=C5(c,t.transform,u,$e(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<d.length;f++)e.add(d[f]);return d}}function hT(e,t,n,r){var a=n.axis,i=n.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var l=a.getMinorTicksCoords();if(l.length)for(var s=i.getModel("lineStyle"),u=r*i.get("length"),c=$e(s.getLineStyle(),$e(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),d=0;d<l.length;d++)for(var f=C5(l[d],t.transform,u,c,"minorticks_"+d),v=0;v<f.length;v++)e.add(f[v])}}function mT(e,t,n,r){var a=n.axis,i=Lo(r.axisLabelShow,n.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var l=n.getModel("axisLabel"),s=l.get("margin"),u=a.getViewLabels(),c=(Lo(r.labelRotate,l.get("rotate"))||0)*Nr/180,d=Ar.innerTextLayout(r.rotation,c,r.labelDirection),f=n.getCategories&&n.getCategories(!0),v=[],p=Ar.isLabelSilent(n),h=n.get("triggerEvent");return q(u,function(m,g){var y=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(m.tickValue):m.tickValue,x=m.formattedLabel,b=m.rawLabel,S=l;if(f&&f[y]){var _=f[y];Ce(_)&&_.textStyle&&(S=new St(_.textStyle,l,n.ecModel))}var k=S.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=a.dataToCoord(y),C=S.getShallow("align",!0)||d.textAlign,E=ke(S.getShallow("alignMinLabel",!0),C),L=ke(S.getShallow("alignMaxLabel",!0),C),N=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||d.textVerticalAlign,T=ke(S.getShallow("verticalAlignMinLabel",!0),N),A=ke(S.getShallow("verticalAlignMaxLabel",!0),N),I=new nn({x:w,y:r.labelOffset+r.labelDirection*s,rotation:d.rotation,silent:p,z2:10+(m.level||0),style:ji(S,{text:x,align:g===0?E:g===u.length-1?L:C,verticalAlign:g===0?T:g===u.length-1?A:N,fill:Ae(k)?k(a.type==="category"?b:a.type==="value"?y+"":y,g):k})});if(I.anid="label_"+y,Tu({el:I,componentModel:n,itemName:x,formatterParamsExtra:{isTruncated:function(){return I.isTruncated},value:b,tickIndex:g}}),h){var D=Ar.makeAxisEventDataBase(n);D.targetType="axisLabel",D.value=b,D.tickIndex=g,a.type==="category"&&(D.dataIndex=y),tt(I).eventData=D}t.add(I),I.updateTransform(),v.push(I),e.add(I),I.decomposeTransform()}),v}}function gT(e){var t=E5(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,a=n.option,i=n.get("status"),l=n.get("value");l!=null&&(l=r.parse(l));var s=xT(n);i==null&&(a.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(l==null||l>u[1])&&(l=u[1]),l<u[0]&&(l=u[0]),a.value=l,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}}function E5(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[wT(e)]}function yT(e){var t=E5(e);return t&&t.axisPointerModel}function xT(e){return!!e.get(["handle","show"])}function wT(e){return e.type+"||"+e.id}var cd={},bT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a,i){this.axisPointerClass&&gT(n),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,a,!0)},t.prototype.updateAxisPointer=function(n,r,a,i){this._doUpdateAxisPointerClass(n,a,!1)},t.prototype.remove=function(n,r){var a=this._axisPointer;a&&a.remove(r)},t.prototype.dispose=function(n,r){this._disposeAxisPointer(r),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(n,r,a){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var l=yT(n);l?(this._axisPointer||(this._axisPointer=new i)).render(n,l,r,a):this._disposeAxisPointer(r)}},t.prototype._disposeAxisPointer=function(n){this._axisPointer&&this._axisPointer.dispose(n),this._axisPointer=null},t.registerAxisPointerClass=function(n,r){if(process.env.NODE_ENV!=="production"&&cd[n])throw new Error("axisPointer "+n+" exists");cd[n]=r},t.getAxisPointerClass=function(n){return n&&cd[n]},t.type="axis",t})(ar),Af=_t();function ST(e,t,n,r){var a=n.axis;if(!a.scale.isBlank()){var i=n.getModel("splitArea"),l=i.getModel("areaStyle"),s=l.get("color"),u=r.coordinateSystem.getRect(),c=a.getTicksCoords({tickModel:i,clamp:!0});if(c.length){var d=s.length,f=Af(e).splitAreaColors,v=Ve(),p=0;if(f)for(var h=0;h<c.length;h++){var m=f.get(c[h].tickValue);if(m!=null){p=(m+(d-1)*h)%d;break}}var g=a.toGlobalCoord(c[0].coord),y=l.getAreaStyle();s=we(s)?s:[s];for(var h=1;h<c.length;h++){var x=a.toGlobalCoord(c[h].coord),b=void 0,S=void 0,_=void 0,k=void 0;a.isHorizontal()?(b=g,S=u.y,_=x-b,k=u.height,g=b+_):(b=u.x,S=g,_=u.width,k=x-S,g=S+k);var w=c[h-1].tickValue;w!=null&&v.set(w,p),t.add(new bt({anid:w!=null?"area_"+w:null,shape:{x:b,y:S,width:_,height:k},style:$e({fill:s[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%d}Af(e).splitAreaColors=v}}}function _T(e){Af(e).splitAreaColors=null}var kT=["axisLine","axisTickLabel","axisName"],CT=["splitArea","splitLine","minorSplitLine"],T5=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return t.prototype.render=function(n,r,a,i){this.group.removeAll();var l=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!n.get("show")){var s=n.getCoordSysModel(),u=uT(s,n),c=new Ar(n,fe({handleAutoShown:function(f){for(var v=s.coordinateSystem.getCartesians(),p=0;p<v.length;p++)if(Ef(v[p].getOtherAxis(n.axis).scale))return!0;return!1}},u));q(kT,c.add,c),this._axisGroup.add(c.getGroup()),q(CT,function(f){n.get([f,"show"])&&ET[f](this,this._axisGroup,n,s)},this);var d=i&&i.type==="changeAxisOrder"&&i.isInitSort;d||h2(l,this._axisGroup,n),e.prototype.render.call(this,n,r,a,i)}},t.prototype.remove=function(){_T(this)},t.type="cartesianAxis",t})(bT),ET={splitLine:function(e,t,n,r){var a=n.axis;if(!a.scale.isBlank()){var i=n.getModel("splitLine"),l=i.getModel("lineStyle"),s=l.get("color"),u=i.get("showMinLine")!==!1,c=i.get("showMaxLine")!==!1;s=we(s)?s:[s];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),v=0,p=a.getTicksCoords({tickModel:i}),h=[],m=[],g=l.getLineStyle(),y=0;y<p.length;y++){var x=a.toGlobalCoord(p[y].coord);if(!(y===0&&!u||y===p.length-1&&!c)){var b=p[y].tickValue;f?(h[0]=x,h[1]=d.y,m[0]=x,m[1]=d.y+d.height):(h[0]=d.x,h[1]=x,m[0]=d.x+d.width,m[1]=x);var S=v++%s.length,_=new Or({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:m[0],y2:m[1]},style:$e({stroke:s[S]},g),silent:!0});Zi(_.shape,g.lineWidth),t.add(_)}}}},minorSplitLine:function(e,t,n,r){var a=n.axis,i=n.getModel("minorSplitLine"),l=i.getModel("lineStyle"),s=r.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var d=[],f=[],v=l.getLineStyle(),p=0;p<c.length;p++)for(var h=0;h<c[p].length;h++){var m=a.toGlobalCoord(c[p][h].coord);u?(d[0]=m,d[1]=s.y,f[0]=m,f[1]=s.y+s.height):(d[0]=s.x,d[1]=m,f[0]=s.x+s.width,f[1]=m);var g=new Or({anid:"minor_line_"+c[p][h].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:v,silent:!0});Zi(g.shape,v.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){ST(e,t,n,r)}},N5=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="xAxis",t})(T5),TT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=N5.type,n}return t.type="yAxis",t})(T5),NT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="grid",n}return t.prototype.render=function(n,r){this.group.removeAll(),n.get("show")&&this.group.add(new bt({shape:n.coordinateSystem.getRect(),style:$e({fill:n.get("backgroundColor")},n.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(ar),Bm={offset:0};function IT(e){e.registerComponentView(NT),e.registerComponentModel(tT),e.registerCoordinateSystem("cartesian2d",cT),Em(e,"x",If,Bm),Em(e,"y",If,Bm),e.registerComponentView(N5),e.registerComponentView(TT),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function LT(e){Ao(IT),e.registerSeriesModel(j9),e.registerChartView(eT),e.registerLayout(jv("scatter"))}function AT(e){e.eachSeriesByType("radar",function(t){var n=t.getData(),r=[],a=t.coordinateSystem;if(a){var i=a.getIndicatorAxes();q(i,function(l,s){n.each(n.mapDimension(i[s].dim),function(u,c){r[c]=r[c]||[];var d=a.dataToPoint(u,s);r[c][s]=Rm(d)?d:$m(a)})}),n.each(function(l){var s=wb(r[l],function(u){return Rm(u)})||$m(a);r[l].push(s.slice()),n.setItemLayout(l,r[l])})}})}function Rm(e){return!isNaN(e[0])&&!isNaN(e[1])}function $m(e){return[e.cx,e.cy]}function MT(e){var t=e.polar;if(t){we(t)||(t=[t]);var n=[];q(t,function(r,a){r.indicator?(r.type&&!r.shape&&(r.shape=r.type),e.radar=e.radar||[],we(e.radar)||(e.radar=[e.radar]),e.radar.push(r)):n.push(r)}),e.polar=n}q(e.series,function(r){r&&r.type==="radar"&&r.polarIndex&&(r.radarIndex=r.polarIndex)})}var VT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a){var i=n.coordinateSystem,l=this.group,s=n.getData(),u=this._data;function c(v,p){var h=v.getItemVisual(p,"symbol")||"circle";if(h!=="none"){var m=ly(v.getItemVisual(p,"symbolSize")),g=Fr(h,-1,-1,2,2),y=v.getItemVisual(p,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:m[0]/2,scaleY:m[1]/2,rotation:y*Math.PI/180||0}),g}}function d(v,p,h,m,g,y){h.removeAll();for(var x=0;x<p.length-1;x++){var b=c(m,g);b&&(b.__dimIdx=x,v[x]?(b.setPosition(v[x]),k_[y?"initProps":"updateProps"](b,{x:p[x][0],y:p[x][1]},n,g)):b.setPosition(p[x]),h.add(b))}}function f(v){return ge(v,function(p){return[i.cx,i.cy]})}s.diff(u).add(function(v){var p=s.getItemLayout(v);if(p){var h=new hl,m=new Do,g={shape:{points:p}};h.shape.points=f(p),m.shape.points=f(p),Yt(h,g,n,v),Yt(m,g,n,v);var y=new yt,x=new yt;y.add(m),y.add(h),y.add(x),d(m.shape.points,p,x,s,v,!0),s.setItemGraphicEl(v,y)}}).update(function(v,p){var h=u.getItemGraphicEl(p),m=h.childAt(0),g=h.childAt(1),y=h.childAt(2),x={shape:{points:s.getItemLayout(v)}};x.shape.points&&(d(m.shape.points,x.shape.points,y,s,v,!1),qi(g),qi(m),Pt(m,x,n),Pt(g,x,n),s.setItemGraphicEl(v,h))}).remove(function(v){l.remove(u.getItemGraphicEl(v))}).execute(),s.eachItemGraphicEl(function(v,p){var h=s.getItemModel(p),m=v.childAt(0),g=v.childAt(1),y=v.childAt(2),x=s.getItemVisual(p,"style"),b=x.fill;l.add(v),m.useStyle($e(h.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),Ia(m,h,"lineStyle"),Ia(g,h,"areaStyle");var S=h.getModel("areaStyle"),_=S.isEmpty()&&S.parentModel.isEmpty();g.ignore=_,q(["emphasis","select","blur"],function(C){var E=h.getModel([C,"areaStyle"]),L=E.isEmpty()&&E.parentModel.isEmpty();g.ensureState(C).ignore=L&&_}),g.useStyle($e(S.getAreaStyle(),{fill:b,opacity:.7,decal:x.decal}));var k=h.getModel("emphasis"),w=k.getModel("itemStyle").getItemStyle();y.eachChild(function(C){if(C instanceof In){var E=C.style;C.useStyle(fe({image:E.image,x:E.x,y:E.y,width:E.width,height:E.height},x))}else C.useStyle(x),C.setColor(b),C.style.strokeNoScale=!0;var L=C.ensureState("emphasis");L.style=Oe(w);var N=s.getStore().get(s.getDimensionIndex(C.__dimIdx),p);(N==null||isNaN(N))&&(N=""),Oa(C,Fa(h),{labelFetcher:s.hostModel,labelDataIndex:p,labelDimIndex:C.__dimIdx,defaultText:N,inheritColor:b,defaultOpacity:x.opacity})}),Na(v,k.get("focus"),k.get("blurScope"),k.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t})(Xt),PT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new w5(dt(this.getData,this),dt(this.getRawData,this))},t.prototype.getInitialData=function(n,r){return x5(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(n,r,a){var i=this.getData(),l=this.coordinateSystem,s=l.getIndicatorAxes(),u=this.getData().getName(n),c=u===""?this.name:u,d=J2(this,n);return el("section",{header:c,sortBlocks:!0,blocks:ge(s,function(f){var v=i.get(i.mapDimension(f.dim),n);return el("nameValue",{markerType:"subItem",markerColor:d,name:f.name,value:v,sortParam:v})})})},t.prototype.getTooltipPosition=function(n){if(n!=null){for(var r=this.getData(),a=this.coordinateSystem,i=r.getValues(ge(a.dimensions,function(c){return r.mapDimension(c)}),n),l=0,s=i.length;l<s;l++)if(!isNaN(i[l])){var u=a.getIndicatorAxes();return a.coordToPoint(u[l].dataToCoord(i[l]),l)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t})(rn),fi=_5.value;function is(e,t){return $e({show:t},e)}var DT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(){var n=this.get("boundaryGap"),r=this.get("splitNumber"),a=this.get("scale"),i=this.get("axisLine"),l=this.get("axisTick"),s=this.get("axisLabel"),u=this.get("axisName"),c=this.get(["axisName","show"]),d=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),v=this.get("triggerEvent"),p=ge(this.get("indicator")||[],function(h){h.max!=null&&h.max>0&&!h.min?h.min=0:h.min!=null&&h.min<0&&!h.max&&(h.max=0);var m=u;h.color!=null&&(m=$e({color:h.color},u));var g=je(Oe(h),{boundaryGap:n,splitNumber:r,scale:a,axisLine:i,axisTick:l,axisLabel:s,name:h.text,showName:c,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:v},!1);if(_e(d)){var y=g.name;g.name=d.replace("{value}",y??"")}else Ae(d)&&(g.name=d(g.name,g));var x=new St(g,null,this.ecModel);return Nn(x,Xy.prototype),x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this._indicatorModels=p},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:je({lineStyle:{color:"#bbb"}},fi.axisLine),axisLabel:is(fi.axisLabel,!1),axisTick:is(fi.axisTick,!1),splitLine:is(fi.splitLine,!0),splitArea:is(fi.splitArea,!0),indicator:[]},t})(Ye),BT=["axisLine","axisTickLabel","axisName"],RT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a){var i=this.group;i.removeAll(),this._buildAxes(n),this._buildSplitLineAndArea(n)},t.prototype._buildAxes=function(n){var r=n.coordinateSystem,a=r.getIndicatorAxes(),i=ge(a,function(l){var s=l.model.get("showName")?l.name:"",u=new Ar(l.model,{axisName:s,position:[r.cx,r.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});q(i,function(l){q(BT,l.add,l),this.group.add(l.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(n){var r=n.coordinateSystem,a=r.getIndicatorAxes();if(!a.length)return;var i=n.get("shape"),l=n.getModel("splitLine"),s=n.getModel("splitArea"),u=l.getModel("lineStyle"),c=s.getModel("areaStyle"),d=l.get("show"),f=s.get("show"),v=u.get("color"),p=c.get("color"),h=we(v)?v:[v],m=we(p)?p:[p],g=[],y=[];function x(D,V,B){var R=B%V.length;return D[R]=D[R]||[],R}if(i==="circle")for(var b=a[0].getTicksCoords(),S=r.cx,_=r.cy,k=0;k<b.length;k++){if(d){var w=x(g,h,k);g[w].push(new pl({shape:{cx:S,cy:_,r:b[k].coord}}))}if(f&&k<b.length-1){var w=x(y,m,k);y[w].push(new Cu({shape:{cx:S,cy:_,r0:b[k].coord,r:b[k+1].coord}}))}}else for(var C,E=ge(a,function(D,V){var B=D.getTicksCoords();return C=C==null?B.length-1:Math.min(B.length-1,C),ge(B,function(R){return r.coordToPoint(R.coord,V)})}),L=[],k=0;k<=C;k++){for(var N=[],T=0;T<a.length;T++)N.push(E[T][k]);if(N[0]?N.push(N[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+k),d){var w=x(g,h,k);g[w].push(new Do({shape:{points:N}}))}if(f&&L){var w=x(y,m,k-1);y[w].push(new hl({shape:{points:N.concat(L)}}))}L=N.slice().reverse()}var A=u.getLineStyle(),I=c.getAreaStyle();q(y,function(D,V){this.group.add(ff(D,{style:$e({stroke:"none",fill:m[V%m.length]},I),silent:!0}))},this),q(g,function(D,V){this.group.add(ff(D,{style:$e({fill:"none",stroke:h[V%h.length]},A),silent:!0}))},this)},t.type="radar",t})(ar),$T=(function(e){me(t,e);function t(n,r,a){var i=e.call(this,n,r,a)||this;return i.type="value",i.angle=0,i.name="",i}return t})(t5),OT=(function(){function e(t,n,r){this.dimensions=[],this._model=t,this._indicatorAxes=ge(t.getIndicatorModels(),function(a,i){var l="indicator_"+i,s=new $T(l,new zr);return s.name=a.get("name"),s.model=a,a.axis=s,this.dimensions.push(l),s},this),this.resize(t,r)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,n){var r=this._indicatorAxes[n];return this.coordToPoint(r.dataToCoord(t),n)},e.prototype.coordToPoint=function(t,n){var r=this._indicatorAxes[n],a=r.angle,i=this.cx+t*Math.cos(a),l=this.cy-t*Math.sin(a);return[i,l]},e.prototype.pointToData=function(t){var n=t[0]-this.cx,r=t[1]-this.cy,a=Math.sqrt(n*n+r*r);n/=a,r/=a;for(var i=Math.atan2(-r,n),l=1/0,s,u=-1,c=0;c<this._indicatorAxes.length;c++){var d=this._indicatorAxes[c],f=Math.abs(i-d.angle);f<l&&(s=d,u=c,l=f)}return[u,+(s&&s.coordToData(a))]},e.prototype.resize=function(t,n){var r=t.get("center"),a=n.getWidth(),i=n.getHeight(),l=Math.min(a,i)/2;this.cx=Ke(r[0],a),this.cy=Ke(r[1],i),this.startAngle=t.get("startAngle")*Math.PI/180;var s=t.get("radius");(_e(s)||Qe(s))&&(s=[0,s]),this.r0=Ke(s[0],l),this.r=Ke(s[1],l),q(this._indicatorAxes,function(u,c){u.setExtent(this.r0,this.r);var d=this.startAngle+c*Math.PI*2/this._indicatorAxes.length;d=Math.atan2(Math.sin(d),Math.cos(d)),u.angle=d},this)},e.prototype.update=function(t,n){var r=this._indicatorAxes,a=this._model;q(r,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,u){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==a)){var c=s.getData();q(r,function(d){d.scale.unionExtentFromData(c,c.mapDimension(d.dim))})}},this);var i=a.get("splitNumber"),l=new zr;l.setExtent(0,i),l.setInterval(1),q(r,function(s,u){k5(s.scale,s.model,l)})},e.prototype.convertToPixel=function(t,n,r){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,n,r){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",function(a){var i=new e(a,t,n);r.push(i),a.coordinateSystem=i}),t.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=r[a.get("radarIndex")||0])}),r},e.dimensions=[],e})();function FT(e){e.registerCoordinateSystem("radar",OT),e.registerComponentModel(DT),e.registerComponentView(RT),e.registerVisual({seriesType:"radar",reset:function(t){var n=t.getData();n.each(function(r){n.setItemVisual(r,"legendIcon","roundRect")}),n.setVisual("legendIcon","roundRect")}})}function zT(e){Ao(FT),e.registerChartView(VT),e.registerSeriesModel(PT),e.registerLayout(AT),e.registerProcessor(g5("radar")),e.registerPreprocessor(MT)}function HT(e,t){var n=M2(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new bt({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1}),e}var GT=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Mf=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return t.prototype.init=function(n,r,a){this.mergeDefaultAndTheme(n,a),n.selected=n.selected||{},this._updateSelector(n)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),this._updateSelector(n)},t.prototype._updateSelector=function(n){var r=n.selector,a=this.ecModel;r===!0&&(r=n.selector=["all","inverse"]),we(r)&&q(r,function(i,l){_e(i)&&(i={type:i}),r[l]=je(i,GT(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var n=this._data;if(n[0]&&this.get("selectedMode")==="single"){for(var r=!1,a=0;a<n.length;a++){var i=n[a].get("name");if(this.isSelected(i)){this.select(i),r=!0;break}}!r&&this.select(n[0].get("name"))}},t.prototype._updateData=function(n){var r=[],a=[];n.eachRawSeries(function(u){var c=u.name;a.push(c);var d;if(u.legendVisualProvider){var f=u.legendVisualProvider,v=f.getAllNames();n.isSeriesFiltered(u)||(a=a.concat(v)),v.length?r=r.concat(v):d=!0}else d=!0;d&&fv(u)&&r.push(u.name)}),this._availableNames=a;var i=this.get("data")||r,l=Ve(),s=ge(i,function(u){return(_e(u)||Qe(u))&&(u={name:u}),l.get(u.name)?null:(l.set(u.name,!0),new St(u,this,this.ecModel))},this);this._data=wt(s,function(u){return!!u})},t.prototype.getData=function(){return this._data},t.prototype.select=function(n){var r=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;q(i,function(l){r[l.get("name")]=!1})}r[n]=!0},t.prototype.unSelect=function(n){this.get("selectedMode")!=="single"&&(this.option.selected[n]=!1)},t.prototype.toggleSelected=function(n){var r=this.option.selected;r.hasOwnProperty(n)||(r[n]=!0),this[r[n]?"unSelect":"select"](n)},t.prototype.allSelect=function(){var n=this._data,r=this.option.selected;q(n,function(a){r[a.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var n=this._data,r=this.option.selected;q(n,function(a){var i=a.get("name",!0);r.hasOwnProperty(i)||(r[i]=!0),r[i]=!r[i]})},t.prototype.isSelected=function(n){var r=this.option.selected;return!(r.hasOwnProperty(n)&&!r[n])&&et(this._availableNames,n)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t})(Ye),ra=Qt,Vf=q,ls=yt,I5=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new ls),this.group.add(this._selectorGroup=new ls),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(n,r,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!n.get("show",!0)){var l=n.get("align"),s=n.get("orient");(!l||l==="auto")&&(l=n.get("left")==="right"&&s==="vertical"?"right":"left");var u=n.get("selector",!0),c=n.get("selectorPosition",!0);u&&(!c||c==="auto")&&(c=s==="horizontal"?"end":"start"),this.renderInner(l,n,r,a,u,s,c);var d=n.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},v=n.get("padding"),p=qs(d,f,v),h=this.layoutInner(n,l,p,i,u,c),m=qs($e({width:h.width,height:h.height},d),f,v);this.group.x=m.x-h.x,this.group.y=m.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=HT(h,n))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(n,r,a,i,l,s,u){var c=this.getContentGroup(),d=Ve(),f=r.get("selectedMode"),v=[];a.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),Vf(r.getData(),function(p,h){var m=p.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
33
|
+
`)){var g=new ls;g.newline=!0,c.add(g);return}var y=a.getSeriesByName(m)[0];if(!d.get(m)){if(y){var x=y.getData(),b=x.getVisual("legendLineStyle")||{},S=x.getVisual("legendIcon"),_=x.getVisual("style"),k=this._createItem(y,m,h,p,r,n,b,_,S,f,i);k.on("click",ra(Om,m,null,i,v)).on("mouseover",ra(Pf,y.name,null,i,v)).on("mouseout",ra(Df,y.name,null,i,v)),a.ssr&&k.eachChild(function(w){var C=tt(w);C.seriesIndex=y.seriesIndex,C.dataIndex=h,C.ssrType="legend"}),d.set(m,!0)}else a.eachRawSeries(function(w){if(!d.get(m)&&w.legendVisualProvider){var C=w.legendVisualProvider;if(!C.containName(m))return;var E=C.indexOfName(m),L=C.getItemVisual(E,"style"),N=C.getItemVisual(E,"legendIcon"),T=Un(L.fill);T&&T[3]===0&&(T[3]=.2,L=fe(fe({},L),{fill:fu(T,"rgba")}));var A=this._createItem(w,m,h,p,r,n,{},L,N,f,i);A.on("click",ra(Om,null,m,i,v)).on("mouseover",ra(Pf,null,m,i,v)).on("mouseout",ra(Df,null,m,i,v)),a.ssr&&A.eachChild(function(I){var D=tt(I);D.seriesIndex=w.seriesIndex,D.dataIndex=h,D.ssrType="legend"}),d.set(m,!0)}},this);process.env.NODE_ENV!=="production"&&(d.get(m)||console.warn(m+" series not exists. Legend data should be same with series name or data name."))}},this),l&&this._createSelector(l,r,i,s,u)},t.prototype._createSelector=function(n,r,a,i,l){var s=this.getSelectorGroup();Vf(n,function(c){var d=c.type,f=new nn({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:d==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});s.add(f);var v=r.getModel("selectorLabel"),p=r.getModel(["emphasis","selectorLabel"]);Oa(f,{normal:v,emphasis:p},{defaultText:c.title}),sf(f)})},t.prototype._createItem=function(n,r,a,i,l,s,u,c,d,f,v){var p=n.visualDrawType,h=l.get("itemWidth"),m=l.get("itemHeight"),g=l.isSelected(r),y=i.get("symbolRotate"),x=i.get("symbolKeepAspect"),b=i.get("icon");d=b||d||"roundRect";var S=UT(d,i,u,c,p,g,v),_=new ls,k=i.getModel("textStyle");if(Ae(n.getLegendIcon)&&(!b||b==="inherit"))_.add(n.getLegendIcon({itemWidth:h,itemHeight:m,icon:d,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:x}));else{var w=b==="inherit"&&n.getData().getVisual("symbol")?y==="inherit"?n.getData().getVisual("symbolRotate"):y:0;_.add(WT({itemWidth:h,itemHeight:m,icon:d,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:x}))}var C=s==="left"?h+5:-5,E=s,L=l.get("formatter"),N=r;_e(L)&&L?N=L.replace("{name}",r??""):Ae(L)&&(N=L(r));var T=g?k.getTextColor():i.get("inactiveColor");_.add(new nn({style:ji(k,{text:N,x:C,y:m/2,fill:T,align:E,verticalAlign:"middle"},{inheritColor:T})}));var A=new bt({shape:_.getBoundingRect(),style:{fill:"transparent"}}),I=i.getModel("tooltip");return I.get("show")&&Tu({el:A,componentModel:l,itemName:r,itemTooltipOption:I.option}),_.add(A),_.eachChild(function(D){D.silent=!0}),A.silent=!f,this.getContentGroup().add(_),sf(_),_.__legendDataIndex=a,_},t.prototype.layoutInner=function(n,r,a,i,l,s){var u=this.getContentGroup(),c=this.getSelectorGroup();$i(n.get("orient"),u,n.get("itemGap"),a.width,a.height);var d=u.getBoundingRect(),f=[-d.x,-d.y];if(c.markRedraw(),u.markRedraw(),l){$i("horizontal",c,n.get("selectorItemGap",!0));var v=c.getBoundingRect(),p=[-v.x,-v.y],h=n.get("selectorButtonGap",!0),m=n.getOrient().index,g=m===0?"width":"height",y=m===0?"height":"width",x=m===0?"y":"x";s==="end"?p[m]+=d[g]+h:f[m]+=v[g]+h,p[1-m]+=d[y]/2-v[y]/2,c.x=p[0],c.y=p[1],u.x=f[0],u.y=f[1];var b={x:0,y:0};return b[g]=d[g]+h+v[g],b[y]=Math.max(d[y],v[y]),b[x]=Math.min(0,v[x]+p[1-m]),b}else return u.x=f[0],u.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(ar);function UT(e,t,n,r,a,i,l){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Vf(g,function(x,b){g[b]==="inherit"&&(g[b]=y[b])})}var u=t.getModel("itemStyle"),c=u.getItemStyle(),d=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=u.getShallow("decal");c.decal=!f||f==="inherit"?r.decal:bf(f,l),c.fill==="inherit"&&(c.fill=r[a]),c.stroke==="inherit"&&(c.stroke=r[d]),c.opacity==="inherit"&&(c.opacity=(a==="fill"?r:n).opacity),s(c,r);var v=t.getModel("lineStyle"),p=v.getLineStyle();if(s(p,n),c.fill==="auto"&&(c.fill=r.fill),c.stroke==="auto"&&(c.stroke=r.fill),p.stroke==="auto"&&(p.stroke=r.fill),!i){var h=t.get("inactiveBorderWidth"),m=c[d];c.lineWidth=h==="auto"?r.lineWidth>0&&m?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),p.stroke=v.get("inactiveColor"),p.lineWidth=v.get("inactiveWidth")}return{itemStyle:c,lineStyle:p}}function WT(e){var t=e.icon||"roundRect",n=Fr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function Om(e,t,n,r){Df(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:e??t}),Pf(e,t,n,r)}function L5(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,a=t.length;r<a&&!(n=t[r].states.emphasis);)r++;return n&&n.hoverLayer}function Pf(e,t,n,r){L5(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function Df(e,t,n,r){L5(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function YT(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(n){for(var r=0;r<t.length;r++)if(!t[r].isSelected(n.name))return!1;return!0})}function vi(e,t,n){var r=e==="allSelect"||e==="inverseSelect",a={},i=[];n.eachComponent({mainType:"legend",query:t},function(s){r?s[e]():s[e](t.name),Fm(s,a),i.push(s.componentIndex)});var l={};return n.eachComponent("legend",function(s){q(a,function(u,c){s[u?"select":"unSelect"](c)}),Fm(s,l)}),r?{selected:l,legendIndex:i}:{name:t.name,selected:l}}function Fm(e,t){var n=t||{};return q(e.getData(),function(r){var a=r.get("name");if(!(a===`
|
|
34
|
+
`||a==="")){var i=e.isSelected(a);Ca(n,a)?n[a]=n[a]&&i:n[a]=i}}),n}function XT(e){e.registerAction("legendToggleSelect","legendselectchanged",Qt(vi,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Qt(vi,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Qt(vi,"inverseSelect")),e.registerAction("legendSelect","legendselected",Qt(vi,"select")),e.registerAction("legendUnSelect","legendunselected",Qt(vi,"unSelect"))}function A5(e){e.registerComponentModel(Mf),e.registerComponentView(I5),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,YT),e.registerSubTypeDefaulter("legend",function(){return"plain"}),XT(e)}var qT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(n){this.option.scrollDataIndex=n},t.prototype.init=function(n,r,a){var i=Bu(n);e.prototype.init.call(this,n,r,a),zm(this,n,i)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),zm(this,this.option,n)},t.type="legend.scroll",t.defaultOption=w2(Mf.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t})(Mf);function zm(e,t,n){var r=e.getOrient(),a=[1,1];a[r.index]=0,Aa(t,n,{type:"box",ignoreSize:!!a})}var Hm=yt,dd=["width","height"],fd=["x","y"],ZT=(function(e){me(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Hm),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Hm)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(n,r,a,i,l,s,u){var c=this;e.prototype.renderInner.call(this,n,r,a,i,l,s,u);var d=this._controllerGroup,f=r.get("pageIconSize",!0),v=we(f)?f:[f,f];h("pagePrev",0);var p=r.getModel("pageTextStyle");d.add(new nn({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1);function h(m,g){var y=m+"DataIndex",x=m2(r.get("pageIcons",!0)[r.getOrient().name][g],{onclick:dt(c._pageGo,c,y,r,i)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});x.name=m,d.add(x)}},t.prototype.layoutInner=function(n,r,a,i,l,s){var u=this.getSelectorGroup(),c=n.getOrient().index,d=dd[c],f=fd[c],v=dd[1-c],p=fd[1-c];l&&$i("horizontal",u,n.get("selectorItemGap",!0));var h=n.get("selectorButtonGap",!0),m=u.getBoundingRect(),g=[-m.x,-m.y],y=Oe(a);l&&(y[d]=a[d]-m[d]-h);var x=this._layoutContentAndController(n,i,y,c,d,v,p,f);if(l){if(s==="end")g[c]+=x[d]+h;else{var b=m[d]+h;g[c]-=b,x[f]-=b}x[d]+=m[d]+h,g[1-c]+=x[p]+x[v]/2-m[v]/2,x[v]=Math.max(x[v],m[v]),x[p]=Math.min(x[p],m[p]+g[1-c]),u.x=g[0],u.y=g[1],u.markRedraw()}return x},t.prototype._layoutContentAndController=function(n,r,a,i,l,s,u,c){var d=this.getContentGroup(),f=this._containerGroup,v=this._controllerGroup;$i(n.get("orient"),d,n.get("itemGap"),i?a.width:null,i?null:a.height),$i("horizontal",v,n.get("pageButtonItemGap",!0));var p=d.getBoundingRect(),h=v.getBoundingRect(),m=this._showController=p[l]>a[l],g=[-p.x,-p.y];r||(g[i]=d[c]);var y=[0,0],x=[-h.x,-h.y],b=ke(n.get("pageButtonGap",!0),n.get("itemGap",!0));if(m){var S=n.get("pageButtonPosition",!0);S==="end"?x[i]+=a[l]-h[l]:y[i]+=h[l]+b}x[1-i]+=p[s]/2-h[s]/2,d.setPosition(g),f.setPosition(y),v.setPosition(x);var _={x:0,y:0};if(_[l]=m?a[l]:p[l],_[s]=Math.max(p[s],h[s]),_[u]=Math.min(0,h[u]+x[1-i]),f.__rectSize=a[l],m){var k={x:0,y:0};k[l]=Math.max(a[l]-h[l]-b,0),k[s]=_[s],f.setClipPath(new bt({shape:k})),f.__rectSize=k[l]}else v.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(n);return w.pageIndex!=null&&Pt(d,{x:w.contentPosition[0],y:w.contentPosition[1]},m?n:null),this._updatePageInfoView(n,w),_},t.prototype._pageGo=function(n,r,a){var i=this._getPageInfo(r)[n];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:r.id})},t.prototype._updatePageInfoView=function(n,r){var a=this._controllerGroup;q(["pagePrev","pageNext"],function(d){var f=d+"DataIndex",v=r[f]!=null,p=a.childOfName(d);p&&(p.setStyle("fill",v?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),p.cursor=v?"pointer":"default")});var i=a.childOfName("pageText"),l=n.get("pageFormatter"),s=r.pageIndex,u=s!=null?s+1:0,c=r.pageCount;i&&l&&i.setStyle("text",_e(l)?l.replace("{current}",u==null?"":u+"").replace("{total}",c==null?"":c+""):l({current:u,total:c}))},t.prototype._getPageInfo=function(n){var r=n.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,l=n.getOrient().index,s=dd[l],u=fd[l],c=this._findTargetItemIndex(r),d=a.children(),f=d[c],v=d.length,p=v?1:0,h={contentPosition:[a.x,a.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return h;var m=S(f);h.contentPosition[l]=-m.s;for(var g=c+1,y=m,x=m,b=null;g<=v;++g)b=S(d[g]),(!b&&x.e>y.s+i||b&&!_(b,y.s))&&(x.i>y.i?y=x:y=b,y&&(h.pageNextDataIndex==null&&(h.pageNextDataIndex=y.i),++h.pageCount)),x=b;for(var g=c-1,y=m,x=m,b=null;g>=-1;--g)b=S(d[g]),(!b||!_(x,b.s))&&y.i<x.i&&(x=y,h.pagePrevDataIndex==null&&(h.pagePrevDataIndex=y.i),++h.pageCount,++h.pageIndex),y=b;return h;function S(k){if(k){var w=k.getBoundingRect(),C=w[u]+k[u];return{s:C,e:C+w[s],i:k.__legendDataIndex}}}function _(k,w){return k.e>=w&&k.s<=w+i}},t.prototype._findTargetItemIndex=function(n){if(!this._showController)return 0;var r,a=this.getContentGroup(),i;return a.eachChild(function(l,s){var u=l.__legendDataIndex;i==null&&u!=null&&(i=s),u===n&&(r=s)}),r??i},t.type="legend.scroll",t})(I5);function jT(e){e.registerAction("legendScroll","legendscroll",function(t,n){var r=t.scrollDataIndex;r!=null&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})})}function JT(e){Ao(A5),e.registerComponentModel(qT),e.registerComponentView(ZT),jT(e)}function KT(e){Ao(A5),Ao(JT)}var vd=Math.sin,pd=Math.cos,M5=Math.PI,go=Math.PI*2,QT=180/M5,V5=(function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,n){this._add("M",t,n)},e.prototype.lineTo=function(t,n){this._add("L",t,n)},e.prototype.bezierCurveTo=function(t,n,r,a,i,l){this._add("C",t,n,r,a,i,l)},e.prototype.quadraticCurveTo=function(t,n,r,a){this._add("Q",t,n,r,a)},e.prototype.arc=function(t,n,r,a,i,l){this.ellipse(t,n,r,r,0,a,i,l)},e.prototype.ellipse=function(t,n,r,a,i,l,s,u){var c=s-l,d=!u,f=Math.abs(c),v=Cr(f-go)||(d?c>=go:-c>=go),p=c>0?c%go:c%go+go,h=!1;v?h=!0:Cr(f)?h=!1:h=p>=M5==!!d;var m=t+r*pd(l),g=n+a*vd(l);this._start&&this._add("M",m,g);var y=Math.round(i*QT);if(v){var x=1/this._p,b=(d?1:-1)*(go-x);this._add("A",r,a,y,1,+d,t+r*pd(l+b),n+a*vd(l+b)),x>.01&&this._add("A",r,a,y,0,+d,m,g)}else{var S=t+r*pd(s),_=n+a*vd(s);this._add("A",r,a,y,+h,+d,S,_)}},e.prototype.rect=function(t,n,r,a){this._add("M",t,n),this._add("l",r,0),this._add("l",0,a),this._add("l",-r,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,n,r,a,i,l,s,u,c){for(var d=[],f=this._p,v=1;v<arguments.length;v++){var p=arguments[v];if(isNaN(p)){this._invalid=!0;return}d.push(Math.round(p*f)/f)}this._d.push(t+d.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e})(),Kv="none",eN=Math.round;function tN(e){var t=e.fill;return t!=null&&t!==Kv}function nN(e){var t=e.stroke;return t!=null&&t!==Kv}var Bf=["lineCap","miterLimit","lineJoin"],rN=ge(Bf,function(e){return"stroke-"+e.toLowerCase()});function oN(e,t,n,r){var a=t.opacity==null?1:t.opacity;if(n instanceof In){e("opacity",a);return}if(tN(t)){var i=Ui(t.fill);e("fill",i.color);var l=t.fillOpacity!=null?t.fillOpacity*i.opacity*a:i.opacity*a;l<1&&e("fill-opacity",l)}else e("fill",Kv);if(nN(t)){var s=Ui(t.stroke);e("stroke",s.color);var u=t.strokeNoScale?n.getLineScale():1,c=u?(t.lineWidth||0)/u:0,d=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*a:s.opacity*a,f=t.strokeFirst;if(c!==1&&e("stroke-width",c),f&&e("paint-order",f?"stroke":"fill"),d<1&&e("stroke-opacity",d),t.lineDash){var v=Rv(n),p=v[0],h=v[1];p&&(h=eN(h||0),e("stroke-dasharray",p.join(",")),(h||r)&&e("stroke-dashoffset",h))}for(var m=0;m<Bf.length;m++){var g=Bf[m];if(t[g]!==$s[g]){var y=t[g]||$s[g];y&&e(rN[m],y)}}}}var P5="http://www.w3.org/2000/svg",D5="http://www.w3.org/1999/xlink",aN="http://www.w3.org/2000/xmlns/",iN="http://www.w3.org/XML/1998/namespace",Gm="ecmeta_";function B5(e){return document.createElementNS(P5,e)}function gt(e,t,n,r,a){return{tag:e,attrs:n||{},children:r,text:a,key:t}}function lN(e,t){var n=[];if(t)for(var r in t){var a=t[r],i=r;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),n.push(i))}return"<"+e+" "+n.join(" ")+">"}function sN(e){return"</"+e+">"}function Qv(e,t){t=t||{};var n=t.newline?`
|
|
35
|
+
`:"";function r(a){var i=a.children,l=a.tag,s=a.attrs,u=a.text;return lN(l,s)+(l!=="style"?zb(u):u||"")+(i?""+n+ge(i,function(c){return r(c)}).join(n)+n:"")+sN(l)}return r(e)}function uN(e,t,n){n=n||{};var r=n.newline?`
|
|
36
|
+
`:"",a=" {"+r,i=r+"}",l=ge(Fe(e),function(u){return u+a+ge(Fe(e[u]),function(c){return c+":"+e[u][c]+";"}).join(r)+i}).join(r),s=ge(Fe(t),function(u){return"@keyframes "+u+a+ge(Fe(t[u]),function(c){return c+a+ge(Fe(t[u][c]),function(d){var f=t[u][c][d];return d==="d"&&(f='path("'+f+'")'),d+":"+f+";"}).join(r)+i}).join(r)+i}).join(r);return!l&&!s?"":["<![CDATA[",l,s,"]]>"].join(r)}function Rf(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Um(e,t,n,r){return gt("svg","root",{width:e,height:t,xmlns:P5,"xmlns:xlink":D5,version:"1.1",baseProfile:"full",viewBox:r?"0 0 "+e+" "+t:!1},n)}var cN=0;function R5(){return cN++}var Wm={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},yo="transform-origin";function dN(e,t,n){var r=fe({},e.shape);fe(r,t),e.buildPath(n,r);var a=new V5;return a.reset(yg(e)),n.rebuildPath(a,1),a.generateStr(),a.getStr()}function fN(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[yo]=n+"px "+r+"px")}var vN={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function $5(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function pN(e,t,n){var r=e.shape.paths,a={},i,l;if(q(r,function(u){var c=Rf(n.zrId);c.animation=!0,Uu(u,{},c,!0);var d=c.cssAnims,f=c.cssNodes,v=Fe(d),p=v.length;if(p){l=v[p-1];var h=d[l];for(var m in h){var g=h[m];a[m]=a[m]||{d:""},a[m].d+=g.d||""}for(var y in f){var x=f[y].animation;x.indexOf(l)>=0&&(i=x)}}}),!!i){t.d=!1;var s=$5(a,n);return i.replace(l,s)}}function Ym(e){return _e(e)?Wm[e]?"cubic-bezier("+Wm[e]+")":sv(e)?e:"":""}function Uu(e,t,n,r){var a=e.animators,i=a.length,l=[];if(e instanceof s2){var s=pN(e,t,n);if(s)l.push(s);else if(!i)return}else if(!i)return;for(var u={},c=0;c<i;c++){var d=a[c],f=[d.getMaxTime()/1e3+"s"],v=Ym(d.getClip().easing),p=d.getDelay();v?f.push(v):f.push("linear"),p&&f.push(p/1e3+"s"),d.getLoop()&&f.push("infinite");var h=f.join(" ");u[h]=u[h]||[h,[]],u[h][1].push(d)}function m(x){var b=x[1],S=b.length,_={},k={},w={},C="animation-timing-function";function E(U,ne,K){for(var H=U.getTracks(),M=U.getMaxTime(),G=0;G<H.length;G++){var X=H[G];if(X.needsAnimate()){var j=X.keyframes,ie=X.propName;if(K&&(ie=K(ie)),ie)for(var ue=0;ue<j.length;ue++){var se=j[ue],ae=Math.round(se.time/M*100)+"%",Y=Ym(se.easing),ee=se.rawValue;(_e(ee)||Qe(ee))&&(ne[ae]=ne[ae]||{},ne[ae][ie]=se.rawValue,Y&&(ne[ae][C]=Y))}}}}for(var L=0;L<S;L++){var N=b[L],T=N.targetName;T?T==="shape"&&E(N,k):!r&&E(N,_)}for(var A in _){var I={};_g(I,e),fe(I,_[A]);var D=xg(I),V=_[A][C];w[A]=D?{transform:D}:{},fN(w[A],I),V&&(w[A][C]=V)}var B,R=!0;for(var A in k){w[A]=w[A]||{};var F=!B,V=k[A][C];F&&(B=new $r);var W=B.len();B.reset(),w[A].d=dN(e,k[A],B);var O=B.len();if(!F&&W!==O){R=!1;break}V&&(w[A][C]=V)}if(!R)for(var A in w)delete w[A].d;if(!r)for(var L=0;L<S;L++){var N=b[L],T=N.targetName;T==="style"&&E(N,w,function(H){return vN[H]})}for(var P=Fe(w),$=!0,z,L=1;L<P.length;L++){var Z=P[L-1],Q=P[L];if(w[Z][yo]!==w[Q][yo]){$=!1;break}z=w[Z][yo]}if($&&z){for(var A in w)w[A][yo]&&delete w[A][yo];t[yo]=z}if(wt(P,function(U){return Fe(w[U]).length>0}).length){var J=$5(w,n);return J+" "+x[0]+" both"}}for(var g in u){var s=m(u[g]);s&&l.push(s)}if(l.length){var y=n.zrId+"-cls-"+R5();n.cssNodes["."+y]={animation:l.join(",")},t.class=y}}function hN(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":"none"};Xm(r,t,n)}else{var a=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=a.fill;if(!i){var l=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,u=e.currentStates.indexOf("select")>=0&&s||l;u&&(i=zd(u))}var c=a.lineWidth;if(c){var d=!a.strokeNoScale&&e.transform?e.transform[0]:1;c=c/d}var r={cursor:"pointer"};i&&(r.fill=i),a.stroke&&(r.stroke=a.stroke),c&&(r["stroke-width"]=c),Xm(r,t,n)}}function Xm(e,t,n,r){var a=JSON.stringify(e),i=n.cssStyleCache[a];i||(i=n.zrId+"-cls-"+R5(),n.cssStyleCache[a]=i,n.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var ol=Math.round;function O5(e){return e&&_e(e.src)}function F5(e){return e&&Ae(e.toDataURL)}function ep(e,t,n,r){oN(function(a,i){var l=a==="fill"||a==="stroke";l&&gg(i)?H5(t,e,a,r):l&&uv(i)?G5(n,e,a,r):e[a]=i,l&&r.ssr&&i==="none"&&(e["pointer-events"]="visible")},t,n,!1),SN(n,e,r)}function tp(e,t){var n=X8(t);n&&(n.each(function(r,a){r!=null&&(e[(Gm+a).toLowerCase()]=r+"")}),t.isSilent()&&(e[Gm+"silent"]="true"))}function qm(e){return Cr(e[0]-1)&&Cr(e[1])&&Cr(e[2])&&Cr(e[3]-1)}function mN(e){return Cr(e[4])&&Cr(e[5])}function np(e,t,n){if(t&&!(mN(t)&&qm(t))){var r=1e4;e.transform=qm(t)?"translate("+ol(t[4]*r)/r+" "+ol(t[5]*r)/r+")":m8(t)}}function Zm(e,t,n){for(var r=e.points,a=[],i=0;i<r.length;i++)a.push(ol(r[i][0]*n)/n),a.push(ol(r[i][1]*n)/n);t.points=a.join(" ")}function jm(e){return!e.smooth}function gN(e){var t=ge(e,function(n){return typeof n=="string"?[n,n]:n});return function(n,r,a){for(var i=0;i<t.length;i++){var l=t[i],s=n[l[0]];s!=null&&(r[l[1]]=ol(s*a)/a)}}}var yN={circle:[gN(["cx","cy","r"])],polyline:[Zm,jm],polygon:[Zm,jm]};function xN(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName==="shape")return!0;return!1}function z5(e,t){var n=e.style,r=e.shape,a=yN[e.type],i={},l=t.animation,s="path",u=e.style.strokePercent,c=t.compress&&yg(e)||4;if(a&&!t.willUpdate&&!(a[1]&&!a[1](r))&&!(l&&xN(e))&&!(u<1)){s=e.type;var d=Math.pow(10,c);a[0](r,i,d)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var v=e.path;f&&(v.beginPath(),e.buildPath(v,e.shape),e.pathUpdated());var p=v.getVersion(),h=e,m=h.__svgPathBuilder;(h.__svgPathVersion!==p||!m||u!==h.__svgPathStrokePercent)&&(m||(m=h.__svgPathBuilder=new V5),m.reset(c),v.rebuildPath(m,u),m.generateStr(),h.__svgPathVersion=p,h.__svgPathStrokePercent=u),i.d=m.getStr()}return np(i,e.transform),ep(i,n,e,t),tp(i,e),t.animation&&Uu(e,i,t),t.emphasis&&hN(e,i,t),gt(s,e.id+"",i)}function wN(e,t){var n=e.style,r=n.image;if(r&&!_e(r)&&(O5(r)?r=r.src:F5(r)&&(r=r.toDataURL())),!!r){var a=n.x||0,i=n.y||0,l=n.width,s=n.height,u={href:r,width:l,height:s};return a&&(u.x=a),i&&(u.y=i),np(u,e.transform),ep(u,n,e,t),tp(u,e),t.animation&&Uu(e,u,t),gt("image",e.id+"",u)}}function bN(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=""),!(!r||isNaN(n.x)||isNaN(n.y))){var a=n.font||Pr,i=n.x||0,l=y8(n.y||0,pu(a),n.textBaseline),s=g8[n.textAlign]||n.textAlign,u={"dominant-baseline":"central","text-anchor":s};if(Yg(n)){var c="",d=n.fontStyle,f=Wg(n.fontSize);if(!parseFloat(f))return;var v=n.fontFamily||q1,p=n.fontWeight;c+="font-size:"+f+";font-family:"+v+";",d&&d!=="normal"&&(c+="font-style:"+d+";"),p&&p!=="normal"&&(c+="font-weight:"+p+";"),u.style=c}else u.style="font: "+a;return r.match(/\s/)&&(u["xml:space"]="preserve"),i&&(u.x=i),l&&(u.y=l),np(u,e.transform),ep(u,n,e,t),tp(u,e),t.animation&&Uu(e,u,t),gt("text",e.id+"",u,void 0,r)}}function Jm(e,t){if(e instanceof Ue)return z5(e,t);if(e instanceof In)return wN(e,t);if(e instanceof Xi)return bN(e,t)}function SN(e,t,n){var r=e.style;if(x8(r)){var a=w8(e),i=n.shadowCache,l=i[a];if(!l){var s=e.getGlobalScale(),u=s[0],c=s[1];if(!u||!c)return;var d=r.shadowOffsetX||0,f=r.shadowOffsetY||0,v=r.shadowBlur,p=Ui(r.shadowColor),h=p.opacity,m=p.color,g=v/2/u,y=v/2/c,x=g+" "+y;l=n.zrId+"-s"+n.shadowIdx++,n.defs[l]=gt("filter",l,{id:l,x:"-100%",y:"-100%",width:"300%",height:"300%"},[gt("feDropShadow","",{dx:d/u,dy:f/c,stdDeviation:x,"flood-color":m,"flood-opacity":h})]),i[a]=l}t.filter=vu(l)}}function H5(e,t,n,r){var a=e[n],i,l={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(hg(a))i="linearGradient",l.x1=a.x,l.y1=a.y,l.x2=a.x2,l.y2=a.y2;else if(mg(a))i="radialGradient",l.cx=ke(a.x,.5),l.cy=ke(a.y,.5),l.r=ke(a.r,.5);else{process.env.NODE_ENV!=="production"&&ka("Illegal gradient type.");return}for(var s=a.colorStops,u=[],c=0,d=s.length;c<d;++c){var f=Hd(s[c].offset)*100+"%",v=s[c].color,p=Ui(v),h=p.color,m=p.opacity,g={offset:f};g["stop-color"]=h,m<1&&(g["stop-opacity"]=m),u.push(gt("stop",c+"",g))}var y=gt(i,"",l,u),x=Qv(y),b=r.gradientCache,S=b[x];S||(S=r.zrId+"-g"+r.gradientIdx++,b[x]=S,l.id=S,r.defs[S]=gt(i,S,l,u)),t[n]=vu(S)}function G5(e,t,n,r){var a=e.style[n],i=e.getBoundingRect(),l={},s=a.repeat,u=s==="no-repeat",c=s==="repeat-x",d=s==="repeat-y",f;if(pg(a)){var v=a.imageWidth,p=a.imageHeight,h=void 0,m=a.image;if(_e(m)?h=m:O5(m)?h=m.src:F5(m)&&(h=m.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Pe(v,g),Pe(p,g)}else if(v==null||p==null){var y=function(L,N){if(L){var T=L.elm,A=v||N.width,I=p||N.height;L.tag==="pattern"&&(c?(I=1,A/=i.width):d&&(A=1,I/=i.height)),L.attrs.width=A,L.attrs.height=I,T&&(T.setAttribute("width",A),T.setAttribute("height",I))}},x=pv(h,null,e,function(L){u||y(k,L),y(f,L)});x&&x.width&&x.height&&(v=v||x.width,p=p||x.height)}f=gt("image","img",{href:h,width:v,height:p}),l.width=v,l.height=p}else a.svgElement&&(f=Oe(a.svgElement),l.width=a.svgWidth,l.height=a.svgHeight);if(f){var b,S;u?b=S=1:c?(S=1,b=l.width/i.width):d?(b=1,S=l.height/i.height):l.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(l.width=b),S!=null&&!isNaN(S)&&(l.height=S);var _=xg(a);_&&(l.patternTransform=_);var k=gt("pattern","",l,[f]),w=Qv(k),C=r.patternCache,E=C[w];E||(E=r.zrId+"-p"+r.patternIdx++,C[w]=E,l.id=E,k=r.defs[E]=gt("pattern",E,l,[f])),t[n]=vu(E)}}function _N(e,t,n){var r=n.clipPathCache,a=n.defs,i=r[e.id];if(!i){i=n.zrId+"-c"+n.clipPathIdx++;var l={id:i};r[e.id]=i,a[i]=gt("clipPath",i,l,[z5(e,n)])}t["clip-path"]=vu(i)}function Km(e){return document.createTextNode(e)}function xo(e,t,n){e.insertBefore(t,n)}function Qm(e,t){e.removeChild(t)}function e1(e,t){e.appendChild(t)}function U5(e){return e.parentNode}function W5(e){return e.nextSibling}function hd(e,t){e.textContent=t}var t1=58,kN=120,CN=gt("","");function $f(e){return e===void 0}function $n(e){return e!==void 0}function EN(e,t,n){for(var r={},a=t;a<=n;++a){var i=e[a].key;i!==void 0&&(process.env.NODE_ENV!=="production"&&r[i]!=null&&console.error("Duplicate key "+i),r[i]=a)}return r}function Ei(e,t){var n=e.key===t.key,r=e.tag===t.tag;return r&&n}function al(e){var t,n=e.children,r=e.tag;if($n(r)){var a=e.elm=B5(r);if(rp(CN,e),we(n))for(t=0;t<n.length;++t){var i=n[t];i!=null&&e1(a,al(i))}else $n(e.text)&&!Ce(e.text)&&e1(a,Km(e.text))}else e.elm=Km(e.text);return e.elm}function Y5(e,t,n,r,a){for(;r<=a;++r){var i=n[r];i!=null&&xo(e,al(i),t)}}function ru(e,t,n,r){for(;n<=r;++n){var a=t[n];if(a!=null)if($n(a.tag)){var i=U5(a.elm);Qm(i,a.elm)}else Qm(e,a.elm)}}function rp(e,t){var n,r=t.elm,a=e&&e.attrs||{},i=t.attrs||{};if(a!==i){for(n in i){var l=i[n],s=a[n];s!==l&&(l===!0?r.setAttribute(n,""):l===!1?r.removeAttribute(n):n==="style"?r.style.cssText=l:n.charCodeAt(0)!==kN?r.setAttribute(n,l):n==="xmlns:xlink"||n==="xmlns"?r.setAttributeNS(aN,n,l):n.charCodeAt(3)===t1?r.setAttributeNS(iN,n,l):n.charCodeAt(5)===t1?r.setAttributeNS(D5,n,l):r.setAttribute(n,l))}for(n in a)n in i||r.removeAttribute(n)}}function TN(e,t,n){for(var r=0,a=0,i=t.length-1,l=t[0],s=t[i],u=n.length-1,c=n[0],d=n[u],f,v,p,h;r<=i&&a<=u;)l==null?l=t[++r]:s==null?s=t[--i]:c==null?c=n[++a]:d==null?d=n[--u]:Ei(l,c)?(sa(l,c),l=t[++r],c=n[++a]):Ei(s,d)?(sa(s,d),s=t[--i],d=n[--u]):Ei(l,d)?(sa(l,d),xo(e,l.elm,W5(s.elm)),l=t[++r],d=n[--u]):Ei(s,c)?(sa(s,c),xo(e,s.elm,l.elm),s=t[--i],c=n[++a]):($f(f)&&(f=EN(t,r,i)),v=f[c.key],$f(v)?xo(e,al(c),l.elm):(p=t[v],p.tag!==c.tag?xo(e,al(c),l.elm):(sa(p,c),t[v]=void 0,xo(e,p.elm,l.elm))),c=n[++a]);(r<=i||a<=u)&&(r>i?(h=n[u+1]==null?null:n[u+1].elm,Y5(e,h,n,a,u)):ru(e,t,r,i))}function sa(e,t){var n=t.elm=e.elm,r=e.children,a=t.children;e!==t&&(rp(e,t),$f(t.text)?$n(r)&&$n(a)?r!==a&&TN(n,r,a):$n(a)?($n(e.text)&&hd(n,""),Y5(n,null,a,0,a.length-1)):$n(r)?ru(n,r,0,r.length-1):$n(e.text)&&hd(n,""):e.text!==t.text&&($n(r)&&ru(n,r,0,r.length-1),hd(n,t.text)))}function NN(e,t){if(Ei(e,t))sa(e,t);else{var n=e.elm,r=U5(n);al(t),r!==null&&(xo(r,t.elm,W5(n)),ru(r,[e],0,0))}return t}var IN=0,LN=(function(){function e(t,n,r){if(this.type="svg",this.refreshHover=n1("refreshHover"),this.configLayer=n1("configLayer"),this.storage=n,this._opts=r=fe({},r),this.root=t,this._id="zr"+IN++,this._oldVNode=Um(r.width,r.height),t&&!r.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=B5("svg");rp(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(r.width,r.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",NN(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return Jm(t,Rf(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var n=this.storage.getDisplayList(!0),r=this._width,a=this._height,i=Rf(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var l=[],s=this._bgVNode=AN(r,a,this._backgroundColor,i);s&&l.push(s);var u=t.compress?null:this._mainVNode=gt("g","main",{},[]);this._paintList(n,i,u?u.children:l),u&&l.push(u);var c=ge(Fe(i.defs),function(v){return i.defs[v]});if(c.length&&l.push(gt("defs","defs",{},c)),t.animation){var d=uN(i.cssNodes,i.cssAnims,{newline:!0});if(d){var f=gt("style","stl",{},[],d);l.push(f)}}return Um(r,a,l,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},Qv(this.renderToVNode({animation:ke(t.cssAnimation,!0),emphasis:ke(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ke(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,n,r){for(var a=t.length,i=[],l=0,s,u,c=0,d=0;d<a;d++){var f=t[d];if(!f.invisible){var v=f.__clipPaths,p=v&&v.length||0,h=u&&u.length||0,m=void 0;for(m=Math.max(p-1,h-1);m>=0&&!(v&&u&&v[m]===u[m]);m--);for(var g=h-1;g>m;g--)l--,s=i[l-1];for(var y=m+1;y<p;y++){var x={};_N(v[y],x,n);var b=gt("g","clip-g-"+c++,x,[]);(s?s.children:r).push(b),i[l++]=b,s=b}u=v;var S=Jm(f,n);S&&(s?s.children:r).push(S)}}},e.prototype.resize=function(t,n){var r=this._opts,a=this.root,i=this._viewport;if(t!=null&&(r.width=t),n!=null&&(r.height=n),a&&i&&(i.style.display="none",t=N0(a,0,r),n=N0(a,1,r),i.style.display=""),this._width!==t||this._height!==n){if(this._width=t,this._height=n,i){var l=i.style;l.width=t+"px",l.height=n+"px"}if(uv(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",n));var u=this._bgVNode&&this._bgVNode.elm;u&&(u.setAttribute("width",t),u.setAttribute("height",n))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var n=this.renderToString(),r="data:image/svg+xml;";return t?(n=S8(n),n&&r+"base64,"+n):r+"charset=UTF-8,"+encodeURIComponent(n)},e})();function n1(e){return function(){process.env.NODE_ENV!=="production"&&ka('In SVG mode painter not support method "'+e+'"')}}function AN(e,t,n,r){var a;if(n&&n!=="none")if(a=gt("rect","bg",{width:e,height:t,x:"0",y:"0"}),gg(n))H5({fill:n},a.attrs,"fill",r);else if(uv(n))G5({style:{fill:n},dirty:en,getBoundingRect:function(){return{width:e,height:t}}},a.attrs,"fill",r);else{var i=Ui(n),l=i.color,s=i.opacity;a.attrs.fill=l,s<1&&(a.attrs["fill-opacity"]=s)}return a}function MN(e){e.registerPainter("svg",LN)}const VN={__name:"Chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:Object,required:!0},data:{type:Object,required:!0},themeColors:{type:Array,required:!0},textColor:{type:String},lineColor:{type:String},options:{type:Object}},setup(e){Ao([O9,k9,Z9,LT,zT,KT,MN]);const t=e;let n=null;const r=o.useTemplateRef("chartRef"),a=o.computed(()=>{let l=[];if(t.themeColors.length>=10)l=t.themeColors;else if(t.themeColors.length===1)l=Ne(t.themeColors[0]).analogous(10).map(s=>s.toRgbString());else{const s=t.themeColors.length,u=Ne(t.themeColors[s-1]).analogous(11-s).map(c=>c.toRgbString());l=[...t.themeColors.slice(0,s-1),...u]}return l}),i=()=>{var l,s;const u=ib({type:t.type,data:t.data,themeColors:a.value,textColor:t.textColor,lineColor:t.lineColor,lineSmooth:((l=t.options)===null||l===void 0?void 0:l.lineSmooth)||!1,stack:((s=t.options)===null||s===void 0?void 0:s.stack)||!1});u&&n.setOption(u,!0)};return o.onMounted(()=>{n=CC(r.value,null,{renderer:"svg"}),i();const l=()=>n.resize();new ResizeObserver(l).observe(r.value)}),o.watch(()=>t.type,i),o.watch(()=>t.data,i),o.watch(()=>t.themeColors,i),o.watch(()=>t.textColor,i),(l,s)=>(o.openBlock(),o.createElementBlock("div",{class:"chart",ref_key:"chartRef",ref:r},null,512))}},X5=oe(VN,[["__scopeId","data-v-9c0594a2"]]),PN={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},r=()=>{Tt.emit(mt.OPEN_CHART_DATA_EDITOR)};return(a,i)=>{const l=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-chart",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",style:o.normalizeStyle({backgroundColor:e.elementInfo.fill}),onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>r())},[o.createVNode(uu,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),o.createVNode(X5,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],36)),[[l,e.contextmenus]])],4)],6)}}},DN=oe(PN,[["__scopeId","data-v-fe3f73d3"]]),BN={class:"element-content"},RN={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=ve(),r=pe(),{canvasScale:a,handleElementId:i,isScaling:l}=te.storeToRefs(n),s=o.useTemplateRef("elementRef"),{addHistorySnapshot:u}=Ee(),c=x=>{t.elementInfo.lock||(x.stopPropagation(),t.selectElement(x,t.elementInfo))},d=o.ref(!1);o.watch(i,()=>{i.value!==t.elementInfo.id&&(d.value=!1)}),o.watch(d,()=>{n.setDisableHotkeysState(d.value)});const f=()=>{t.elementInfo.lock||(d.value=!0)},v=o.ref(-1);o.watch(l,()=>{i.value===t.elementInfo.id&&(l.value&&(d.value=!1),!l.value&&v.value!==-1&&(r.updateElement({id:t.elementInfo.id,props:{height:v.value}}),v.value=-1))});const p=x=>{const b=x[0].contentRect;if(!s.value)return;const S=b.height;t.elementInfo.height!==S&&(l.value?v.value=S:r.updateElement({id:t.elementInfo.id,props:{height:S}}))},h=new ResizeObserver(p);o.onMounted(()=>{s.value&&h.observe(s.value)}),o.onUnmounted(()=>{s.value&&h.unobserve(s.value)});const m=x=>{r.updateElement({id:t.elementInfo.id,props:{data:x}}),u()},g=x=>{const b=x.reduce((_,k)=>_+k),S=x.map(_=>_/b);r.updateElement({id:t.elementInfo.id,props:{width:b,colWidths:S}}),u()},y=x=>{o.nextTick(()=>n.setSelectedTableCells(x))};return(x,b)=>{const S=o.resolveComponent("EditableTable"),_=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:s,style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",BN,[o.createVNode(S,{onMousedown:b[0]||(b[0]=o.withModifiers(()=>{},["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:d.value,onChange:b[1]||(b[1]=k=>m(k)),onChangeColWidths:b[2]||(b[2]=k=>g(k)),onChangeSelectedCells:b[3]||(b[3]=k=>y(k))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!d.value||e.elementInfo.lock?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:b[4]||(b[4]=k=>f()),onMousedown:b[5]||(b[5]=k=>c(k)),onTouchstart:b[6]||(b[6]=k=>c(k))},[o.unref(i)===e.elementInfo.id?(o.openBlock(),o.createElementBlock("div",{key:0,class:"mask-tip",style:o.normalizeStyle({transform:`scale(${1/o.unref(a)})`})},"双击编辑",4)):o.createCommentVNode("",!0)],34)):o.createCommentVNode("",!0)])),[[_,e.contextmenus]])],4)],6)}}},$N=oe(RN,[["__scopeId","data-v-02c7565d"]]),ON=["width","height","stroke","stroke-width"],FN=["transform"],zN=["d"],HN={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,n=a=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo))},r=()=>{Tt.emit(mt.OPEN_LATEX_EDITOR)};return(a,i)=>{const l=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-latex",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",onMousedown:i[0]||(i[0]=s=>n(s)),onTouchstart:i[1]||(i[1]=s=>n(s)),onDblclick:i[2]||(i[2]=s=>r())},[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[o.createElementVNode("path",{d:e.elementInfo.path},null,8,zN)],8,FN)],8,ON))],32)),[[l,e.contextmenus]])],4)],6)}}},GN=oe(HN,[["__scopeId","data-v-1edb6009"]]),UN={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=(a,i=!0)=>{t.elementInfo.lock||(a.stopPropagation(),t.selectElement(a,t.elementInfo,i))};return(a,i)=>{const l=o.resolveComponent("VideoPlayer"),s=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-video",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",onMousedown:i[2]||(i[2]=u=>r(u,!1)),onTouchstart:i[3]||(i[3]=u=>r(u,!1))},[o.createVNode(l,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:o.unref(n)},null,8,["width","height","src","poster","scale"]),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["t","b","l","r"],u=>o.createElementVNode("div",{class:o.normalizeClass(["handler-border",u]),key:u,onMousedown:i[0]||(i[0]=c=>r(c)),onTouchstart:i[1]||(i[1]=c=>r(c))},null,34)),64))],32)),[[s,e.contextmenus]])],4)],6)}}},WN=oe(UN,[["__scopeId","data-v-2e3adf82"]]),YN={__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,handleElementId:r}=te.storeToRefs(ve()),{viewportRatio:a,viewportSize:i}=te.storeToRefs(pe()),l=o.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),s=o.computed(()=>{const c=i.value,d=i.value*a.value,f=280/n.value,v=50/n.value,p=t.elementInfo.width,h=t.elementInfo.height,m=t.elementInfo.left,g=t.elementInfo.top;let y=0,x=h;return m+f>=c&&(y=p-f),g+h+v>=d&&(x=-v),{left:y+"px",top:x+"px"}}),u=c=>{t.elementInfo.lock||(c.stopPropagation(),t.selectElement(c,t.elementInfo))};return(c,d)=>{const f=o.resolveComponent("AiPptVolumeNotice"),v=o.resolveComponent("AudioPlayer"),p=o.resolveDirective("contextmenu");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["editable-element-audio",{lock:e.elementInfo.lock}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"element-content",onMousedown:d[1]||(d[1]=h=>u(h)),onTouchstart:d[2]||(d[2]=h=>u(h))},[o.createVNode(f,{class:"audio-icon",style:o.normalizeStyle({fontSize:l.value,color:e.elementInfo.color})},null,8,["style"]),o.unref(r)===e.elementInfo.id?(o.openBlock(),o.createBlock(v,{key:0,class:"audio-player",style:o.normalizeStyle({...s.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:o.unref(n),onMousedown:d[0]||(d[0]=o.withModifiers(()=>{},["stop"]))},null,8,["style","src","loop","scale"])):o.createCommentVNode("",!0)],32)),[[p,e.contextmenus]])],4)],6)}}},XN=oe(YN,[["__scopeId","data-v-b12b5a81"]]),qN=["id"],ZN={__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,n=o.computed(()=>({[Xe.IMAGE]:Z3,[Xe.TEXT]:zw,[Xe.SHAPE]:Kw,[Xe.LINE]:ab,[Xe.CHART]:DN,[Xe.TABLE]:$N,[Xe.LATEX]:GN,[Xe.VIDEO]:WN,[Xe.AUDIO]:XN})[t.elementInfo.type]||null),{orderElement:r}=iu(),{alignElementToCanvas:a}=Jf(),{combineElements:i,uncombineElements:l}=qf(),{deleteElement:s}=ou(),{lockElement:u,unlockElement:c}=L1(),{copyElement:d,pasteElement:f,cutElement:v}=Zf(),{selectAllElements:p}=au(),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:f},{divider:!0},{text:"水平居中",handler:()=>a(Be.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>a(Be.CENTER)},{text:"水平居中",handler:()=>a(Be.HORIZONTAL)},{text:"左对齐",handler:()=>a(Be.LEFT)},{text:"右对齐",handler:()=>a(Be.RIGHT)}]},{text:"垂直居中",handler:()=>a(Be.VERTICAL),children:[{text:"水平垂直居中",handler:()=>a(Be.CENTER)},{text:"垂直居中",handler:()=>a(Be.VERTICAL)},{text:"顶部对齐",handler:()=>a(Be.TOP)},{text:"底部对齐",handler:()=>a(Be.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>r(t.elementInfo,ct.TOP),children:[{text:"置于顶层",handler:()=>r(t.elementInfo,ct.TOP)},{text:"上移一层",handler:()=>r(t.elementInfo,ct.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>r(t.elementInfo,ct.BOTTOM),children:[{text:"置于底层",handler:()=>r(t.elementInfo,ct.BOTTOM)},{text:"下移一层",handler:()=>r(t.elementInfo,ct.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?l:i,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:p},{text:"锁定",subText:"Ctrl + L",handler:u},{text:"删除",subText:"Delete",handler:s}];return(m,g)=>(o.openBlock(),o.createElementBlock("div",{class:"editable-element",ref:"elementRef",id:`editable-element-${e.elementInfo.id}`,style:o.normalizeStyle({zIndex:e.elementIndex})},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(n.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:h},null,8,["elementInfo","selectElement"]))],12,qN))}},jN={__name:"MouseSelection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`mouse-selection quadrant-${e.quadrant}`),style:o.normalizeStyle({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}},JN=oe(jN,[["__scopeId","data-v-b3e3fa3d"]]),KN={class:"grid-lines"},QN=["d","stroke"],eI={__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:n}=te.storeToRefs(ve()),{currentSlide:r,viewportRatio:a,viewportSize:i}=te.storeToRefs(pe()),l=o.computed(()=>{var c;return(c=r.value)===null||c===void 0?void 0:c.background}),s=o.computed(()=>{var c;const d=((c=l.value)===null||c===void 0?void 0:c.color)||"#fff",f=["#000","#fff"];return Ne.mostReadable(d,f,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()}),u=o.computed(()=>{const c=i.value,d=i.value*a.value;let f="";for(let v=0;v<=Math.floor(d/n.value);v++)f+=`M0 ${v*n.value} L${c} ${v*n.value} `;for(let v=0;v<=Math.floor(c/n.value);v++)f+=`M${v*n.value} 0 L${v*n.value} ${d} `;return f});return(c,d)=>(o.openBlock(),o.createElementBlock("svg",KN,[o.createElementVNode("path",{style:o.normalizeStyle({transform:`scale(${o.unref(t)})`}),d:u.value,fill:"none",stroke:s.value,"stroke-width":"0.3","stroke-dasharray":"5"},null,12,QN)]))}},tI=oe(eI,[["__scopeId","data-v-6ba06713"]]),q5=e=>({backgroundStyle:o.computed(()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:n,color:r,image:a,gradient:i}=e.value;if(n==="solid")return{backgroundColor:r};if(n==="image"&&a){const{src:l,size:s}=a;return l?s==="repeat"?{backgroundImage:`url(${l}`,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:`url(${l}`,backgroundRepeat:"no-repeat",backgroundSize:s||"cover"}:{backgroundColor:"#fff"}}else if(n==="gradient"&&i){const{type:l,colors:s,rotate:u}=i,c=s.map(d=>`${d.color} ${d.pos}%`);return l==="radial"?{backgroundImage:`radial-gradient(${c.join(",")}`}:{backgroundImage:`linear-gradient(${u}deg, ${c.join(",")}`}}return{backgroundColor:"#fff"}})}),nI={__name:"ViewportBackground",setup(e){const{gridLineSize:t}=te.storeToRefs(ve()),{currentSlide:n}=te.storeToRefs(pe()),r=o.computed(()=>{var i;return(i=n.value)===null||i===void 0?void 0:i.background}),{backgroundStyle:a}=q5(r);return(i,l)=>(o.openBlock(),o.createElementBlock("div",{class:"viewport-background",style:o.normalizeStyle(o.unref(a))},[o.unref(t)?(o.openBlock(),o.createBlock(tI,{key:0})):o.createCommentVNode("",!0)],4))}},rI=oe(nI,[["__scopeId","data-v-2a842543"]]),oI={__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,n=o.computed(()=>t.axis.x*t.canvasScale+"px"),r=o.computed(()=>t.axis.y*t.canvasScale+"px"),a=o.computed(()=>t.type==="vertical"?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"});return(i,l)=>(o.openBlock(),o.createElementBlock("div",{class:"alignment-line",style:o.normalizeStyle({left:n.value,top:r.value})},[o.createElementVNode("div",{class:o.normalizeClass(["line",e.type]),style:o.normalizeStyle(a.value)},null,6)],4))}},aI=oe(oI,[["__scopeId","data-v-7a8c7b0a"]]),iI={class:"ruler"},lI={key:0},sI={key:0},uI={__name:"Ruler",props:{viewportStyles:{type:Object,required:!0},elementList:{type:Array,required:!0}},setup(e){const t=e,{canvasScale:n,activeElementIdList:r}=te.storeToRefs(ve()),{viewportRatio:a,viewportSize:i}=te.storeToRefs(pe()),l=o.ref(null);o.watchEffect(()=>{const u=t.elementList.filter(c=>r.value.includes(c.id));if(!u.length)return l.value=null;l.value=er(u)});const s=o.computed(()=>t.viewportStyles.width*n.value/(i.value/100));return(u,c)=>(o.openBlock(),o.createElementBlock("div",iI,[o.createElementVNode("div",{class:"h",style:o.normalizeStyle({width:e.viewportStyles.width*o.unref(n)+"px",left:e.viewportStyles.left+"px"})},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(20,d=>o.createElementVNode("div",{class:o.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`h-marker-100-${d}`,style:o.normalizeStyle({width:s.value+"px"})},[d*100<=o.unref(i)?(o.openBlock(),o.createElementBlock("span",lI,o.toDisplayString(d*100),1)):o.createCommentVNode("",!0)],6)),64)),l.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"range",style:o.normalizeStyle({left:l.value.minX*o.unref(n)+"px",width:(l.value.maxX-l.value.minX)*o.unref(n)+"px"})},null,4)):o.createCommentVNode("",!0)],4),o.createElementVNode("div",{class:"v",style:o.normalizeStyle({height:e.viewportStyles.height*o.unref(n)+"px",top:e.viewportStyles.top+"px"})},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(20,d=>o.createElementVNode("div",{class:o.normalizeClass(["ruler-marker-100",{hide:s.value<36,omit:s.value<72}]),key:`v-marker-100-${d}`,style:o.normalizeStyle({height:s.value+"px"})},[d*100<=o.unref(i)*o.unref(a)?(o.openBlock(),o.createElementBlock("span",sI,o.toDisplayString(d*100),1)):o.createCommentVNode("",!0)],6)),64)),l.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"range",style:o.normalizeStyle({top:l.value.minY*o.unref(n)+"px",height:(l.value.maxY-l.value.minY)*o.unref(n)+"px"})},null,4)):o.createCommentVNode("",!0)],4)]))}},cI=oe(uI,[["__scopeId","data-v-c105180a"]]),dI=["width","height"],fI=["d"],vI={__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const n=t,r=ve(),{creatingElement:a}=te.storeToRefs(r),{ctrlOrShiftKeyActive:i}=te.storeToRefs(on()),l=o.ref(),s=o.ref(),u=o.useTemplateRef("selectionRef"),c=o.ref({x:0,y:0});o.onMounted(()=>{if(!u.value)return;const{x:p,y:h}=u.value.getBoundingClientRect();c.value={x:p,y:h}});const d=p=>{let h=!0;const m=p.pageX,g=p.pageY;l.value=[m,g],document.onmousemove=y=>{if(!a.value||!h)return;let x=y.pageX,b=y.pageY;if(i.value){const S=x-m,_=b-g,k=Math.abs(S),w=Math.abs(_);if(a.value.type==="shape"){const C=_>0&&S<0||_<0&&S>0;k>w?b=C?g-S:g+S:x=C?m-_:m+_}else a.value.type==="line"&&(k>w?b=g:x=m)}s.value=[x,b]},document.onmouseup=y=>{var x,b;if(document.onmousemove=null,document.onmouseup=null,y.button===2){setTimeout(()=>r.setCreatingElement(null),0);return}h=!1;const S=y.pageX,_=y.pageY,k=30;if(((x=a.value)===null||x===void 0?void 0:x.type)==="line"&&(Math.abs(S-m)>=k||Math.abs(_-g)>=k))n("created",{start:l.value,end:s.value});else if(((b=a.value)===null||b===void 0?void 0:b.type)!=="line"&&Math.abs(S-m)>=k&&Math.abs(_-g)>=k)n("created",{start:l.value,end:s.value});else{const C=Math.min(S,m),E=Math.min(_,g),L=Math.max(S,m),N=Math.max(_,g),T=L-C>=k?L-C:200,A=N-E>=k?N-E:200;n("created",{start:[C,E],end:[C+T,E+A]})}}},f=o.computed(()=>{if(!l.value||!s.value||!a.value||a.value.type!=="line")return null;const[p,h]=l.value,[m,g]=s.value,y=Math.min(p,m),x=Math.max(p,m),b=Math.min(h,g),S=Math.max(h,g),_=x-y>=24?x-y:24,k=S-b>=24?S-b:24,w=p===y?0:x-y,C=h===b?0:S-b,E=m===y?0:x-y,L=g===b?0:S-b,N=`M${w}, ${C} L${E}, ${L}`;return{svgWidth:_,svgHeight:k,startX:w,startY:C,endX:E,endY:L,path:N}}),v=o.computed(()=>{if(!l.value||!s.value)return{};const[p,h]=l.value,[m,g]=s.value,y=Math.min(p,m),x=Math.max(p,m),b=Math.min(h,g),S=Math.max(h,g),_=x-y,k=S-b;return{left:y-c.value.x+"px",top:b-c.value.y+"px",width:_+"px",height:k+"px"}});return(p,h)=>(o.openBlock(),o.createElementBlock("div",{class:"element-create-selection",ref_key:"selectionRef",ref:u,onMousedown:h[0]||(h[0]=o.withModifiers(m=>d(m),["stop"])),onContextmenu:h[1]||(h[1]=o.withModifiers(()=>{},["stop","prevent"]))},[l.value&&s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["selection",o.unref(a)?.type]),style:o.normalizeStyle(v.value)},[o.unref(a)?.type==="line"&&f.value?(o.openBlock(),o.createElementBlock("svg",{key:0,overflow:"visible",width:f.value.svgWidth,height:f.value.svgHeight},[o.createElementVNode("path",{d:f.value.path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,fI)],8,dI)):o.createCommentVNode("",!0)],6)):o.createCommentVNode("",!0)],544))}},pI=oe(vI,[["__scopeId","data-v-0759af8f"]]),hI={overflow:"visible"},mI=["d","fill"],gI={__name:"ShapeCreateCanvas",emits:["created"],setup(e,{emit:t}){const n=t,r=ve(),{ctrlOrShiftKeyActive:a}=te.storeToRefs(on()),{theme:i}=te.storeToRefs(pe()),l=o.useTemplateRef("shapeCanvasRef"),s=o.ref(!1),u=o.ref({x:0,y:0});o.onMounted(()=>{if(!l.value)return;const{x:S,y:_}=l.value.getBoundingClientRect();u.value={x:S,y:_}});const c=o.ref(null),d=o.ref([]),f=o.ref(!1),v=(S,_=!1)=>{let k=S.pageX-u.value.x,w=S.pageY-u.value.y;if(_)return{pageX:k,pageY:w};if(a.value&&d.value.length){const[C,E]=d.value[d.value.length-1];Math.abs(C-k)-Math.abs(E-w)>0?w=E:k=C}return{pageX:k,pageY:w}},p=S=>{if(s.value){const{pageX:w,pageY:C}=v(S,!0);d.value.push([w,C]),c.value=null;return}const{pageX:_,pageY:k}=v(S);if(c.value=[_,k],d.value.length>=2){const[w,C]=d.value[0];Math.abs(w-_)<5&&Math.abs(C-k)<5?f.value=!0:f.value=!1}else f.value=!1},h=o.computed(()=>{let S="";for(let _=0;_<d.value.length;_++){const k=d.value[_];_===0?S+=`M ${k[0]} ${k[1]} `:S+=`L ${k[0]} ${k[1]} `}return d.value.length&&c.value&&(S+=`L ${c.value[0]} ${c.value[1]}`),S}),m=(S=!0)=>{const _=d.value.map(V=>V[0]),k=d.value.map(V=>V[1]),w=Math.min(..._),C=Math.min(...k),E=Math.max(..._),L=Math.max(...k),N=d.value.map(V=>[V[0]-w,V[1]-C]);let T="";for(let V=0;V<N.length;V++){const B=N[V];V===0?T+=`M ${B[0]} ${B[1]} `:T+=`L ${B[0]} ${B[1]} `}S&&(T+="Z");const A=[w+u.value.x,C+u.value.y],I=[E+u.value.x,L+u.value.y],D=[E-w,L-C];return{start:A,end:I,path:T,viewBox:D}},g=S=>{const{pageX:_,pageY:k}=v(S);s.value=!0,f.value?n("created",m()):d.value.push([_,k]),document.onmouseup=()=>{s.value=!1}},y=()=>{r.setCreatingCustomShapeState(!1)},x=()=>{n("created",{...m(!1),fill:"rgba(0, 0, 0, 0)",outline:{width:2,color:i.value.themeColors[0],style:"solid"}}),y()},b=S=>{const _=S.key.toUpperCase();_===ye.ESC&&y(),_===ye.ENTER&&x()};return o.onMounted(()=>{Se.success("点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成",{duration:0}),document.addEventListener("keydown",b)}),o.onUnmounted(()=>{document.removeEventListener("keydown",b),Se.closeAll()}),(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:"shape-create-canvas",ref_key:"shapeCanvasRef",ref:l,onMousedown:_[0]||(_[0]=o.withModifiers(k=>g(k),["stop"])),onMousemove:_[1]||(_[1]=k=>p(k)),onContextmenu:_[2]||(_[2]=o.withModifiers(k=>y(),["stop","prevent"]))},[(o.openBlock(),o.createElementBlock("svg",hI,[o.createElementVNode("path",{d:h.value,stroke:"#d14424",fill:f.value?"rgba(226, 83, 77, 0.15)":"none","stroke-width":"2"},null,8,mI)]))],544))}},yI=oe(gI,[["__scopeId","data-v-26e3f0b9"]]),Ua=(e,t)=>{const n=o.computed(()=>[{direction:he.LEFT_TOP,style:{}},{direction:he.TOP,style:{left:e.value/2+"px"}},{direction:he.RIGHT_TOP,style:{left:e.value+"px"}},{direction:he.LEFT,style:{top:t.value/2+"px"}},{direction:he.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:he.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:he.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:he.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]),r=o.computed(()=>[{direction:he.LEFT,style:{top:t.value/2+"px"}},{direction:he.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]),a=o.computed(()=>[{direction:he.TOP,style:{left:e.value/2+"px"}},{direction:he.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}]),i=o.computed(()=>[{type:ca.T,style:{width:e.value+"px"}},{type:ca.B,style:{top:t.value+"px",width:e.value+"px"}},{type:ca.L,style:{height:t.value+"px"}},{type:ca.R,style:{left:e.value+"px",height:t.value+"px"}}]);return{resizeHandlers:n,textElementResizeHandlers:r,verticalTextElementResizeHandlers:a,borderLines:i}},xI={__name:"ResizeHandler",props:{type:{type:String,required:!0},rotate:{type:Number,default:0}},setup(e){const t=e,n=o.computed(()=>{const r="rotate-",a=t.rotate;return a>-22.5&&a<=22.5?r+0:a>22.5&&a<=67.5?r+45:a>67.5&&a<=112.5?r+90:a>112.5&&a<=157.5?r+135:a>157.5||a<=-157.5?r+0:a>-157.5&&a<=-112.5?r+45:a>-112.5&&a<=-67.5?r+90:a>-67.5&&a<=-22.5?r+135:r+0});return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["resize-handler",n.value,e.type])},null,2))}},Ro=oe(xI,[["__scopeId","data-v-8c60708a"]]),wI={__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["border-line",e.type,{wide:e.isWide}])},null,2))}},Wa=oe(wI,[["__scopeId","data-v-08062188"]]),bI={__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:n,canvasScale:r}=te.storeToRefs(ve()),a=o.computed(()=>t.elementList.filter(v=>n.value.includes(v.id))),i=o.ref({minX:0,maxX:0,minY:0,maxY:0}),l=o.computed(()=>(i.value.maxX-i.value.minX)*r.value),s=o.computed(()=>(i.value.maxY-i.value.minY)*r.value),{resizeHandlers:u,borderLines:c}=Ua(l,s),d=()=>{const{minX:v,maxX:p,minY:h,maxY:m}=er(a.value);i.value={minX:v,maxX:p,minY:h,maxY:m}};o.watchEffect(d);const f=o.computed(()=>a.value.some(v=>!((v.type==="image"||v.type==="shape")&&!v.rotate)));return(v,p)=>(o.openBlock(),o.createElementBlock("div",{class:"multi-select-operate",style:o.normalizeStyle({left:i.value.minX*o.unref(r)+"px",top:i.value.minY*o.unref(r)+"px"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c),h=>(o.openBlock(),o.createBlock(Wa,{key:h.type,type:h.type,style:o.normalizeStyle(h.style)},null,8,["type","style"]))),128)),f.value?o.createCommentVNode("",!0):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(o.unref(u),h=>(o.openBlock(),o.createBlock(Ro,{key:h.direction,type:h.direction,style:o.normalizeStyle(h.style),onMousedown:o.withModifiers(m=>e.scaleMultiElement(m,i.value,h.direction),["stop"])},null,8,["type","style","onMousedown"]))),128))],4))}},SI=oe(bI,[["__scopeId","data-v-cc0512e7"]]),_I={},kI={class:"rotate-handler"};function CI(e,t){return o.openBlock(),o.createElementBlock("div",kI)}const ml=oe(_I,[["render",CI],["__scopeId","data-v-b729709a"]]),EI={inheritAttrs:!1},TI=Object.assign(EI,{__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,clipingImageElementId:r}=te.storeToRefs(ve()),a=o.computed(()=>r.value===t.elementInfo.id),i=o.computed(()=>t.elementInfo.width*n.value),l=o.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:s,borderLines:u}=Ua(i,l);return(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["image-element-operate",{cliping:a.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(u),f=>(o.openBlock(),o.createBlock(Wa,{class:"operate-border-line",key:f.type,type:f.type,style:o.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(s),f=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:o.normalizeStyle(f.style),onMousedown:o.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),o.createVNode(ml,{class:"operate-rotate-handler",style:o.normalizeStyle({left:i.value/2+"px"}),onMousedown:d[0]||(d[0]=o.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):o.createCommentVNode("",!0)],2))}}),NI=oe(TI,[["__scopeId","data-v-01315e4e"]]),II={class:"text-element-operate"},LI={inheritAttrs:!1},AI=Object.assign(LI,{__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=o.computed(()=>t.elementInfo.width*n.value),a=o.computed(()=>t.elementInfo.height*n.value),{textElementResizeHandlers:i,verticalTextElementResizeHandlers:l,borderLines:s}=Ua(r,a),u=o.computed(()=>t.elementInfo.vertical?l.value:i.value);return(c,d)=>(o.openBlock(),o.createElementBlock("div",II,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(s),f=>(o.openBlock(),o.createBlock(Wa,{class:"operate-border-line",key:f.type,type:f.type,style:o.normalizeStyle(f.style)},null,8,["type","style"]))),128)),e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.value,f=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:f.direction,type:f.direction,rotate:e.elementInfo.rotate,style:o.normalizeStyle(f.style),onMousedown:o.withModifiers(v=>e.scaleElement(v,e.elementInfo,f.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),o.createVNode(ml,{class:"operate-rotate-handler",style:o.normalizeStyle({left:r.value/2+"px"}),onMousedown:d[0]||(d[0]=o.withModifiers(f=>e.rotateElement(f,e.elementInfo),["stop"]))},null,8,["style"])],64)):o.createCommentVNode("",!0)]))}}),MI={class:"shape-element-operate"},VI=["onMousedown"],PI={inheritAttrs:!1},DI=Object.assign(PI,{__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=o.computed(()=>t.elementInfo.width*n.value),a=o.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Ua(r,a),s=o.computed(()=>{if(!t.elementInfo.pathFormula||t.elementInfo.keypoints===void 0)return[];const u=Mo[t.elementInfo.pathFormula];return t.elementInfo.keypoints.map((c,d)=>{const f=u.getBaseSize[d],v=u.relative[d],p=f(t.elementInfo.width,t.elementInfo.height)*c;let h={};return v==="left"?h={left:p*n.value+"px"}:v==="right"?h={left:(t.elementInfo.width-p)*n.value+"px"}:v==="center"?h={left:(t.elementInfo.width-p)/2*n.value+"px"}:v==="top"?h={top:p*n.value+"px"}:v==="bottom"?h={top:(t.elementInfo.height-p)*n.value+"px"}:v==="left_bottom"?h={left:p*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="right_bottom"?h={left:(t.elementInfo.width-p)*n.value+"px",top:t.elementInfo.height*n.value+"px"}:v==="top_right"?h={left:t.elementInfo.width*n.value+"px",top:p*n.value+"px"}:v==="bottom_right"&&(h={left:t.elementInfo.width*n.value+"px",top:(t.elementInfo.height-p)*n.value+"px"}),{keypoint:c,styles:h}})});return(u,c)=>(o.openBlock(),o.createElementBlock("div",MI,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(l),d=>(o.openBlock(),o.createBlock(Wa,{class:"operate-border-line",key:d.type,type:d.type,style:o.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i),d=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:o.normalizeStyle(d.style),onMousedown:o.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),o.createVNode(ml,{class:"operate-rotate-handler",style:o.normalizeStyle({left:r.value/2+"px"}),onMousedown:c[0]||(c[0]=o.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:"operate-keypoint-handler",key:f,style:o.normalizeStyle(d.styles),onMousedown:o.withModifiers(v=>e.moveShapeKeypoint(v,e.elementInfo,f),["stop"])},null,44,VI))),128))],64)):o.createCommentVNode("",!0)]))}}),BI=oe(DI,[["__scopeId","data-v-5a3aed42"]]),RI={class:"line-element-operate"},$I=["width","height","stroke"],OI={key:0},FI=["x1","y1","x2","y2"],zI=["x1","y1","x2","y2"],HI=["x1","y1","x2","y2"],GI=["x1","y1","x2","y2"],UI={inheritAttrs:!1},WI=Object.assign(UI,{__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=o.computed(()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0])),a=o.computed(()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1])),i=o.computed(()=>{const l=[{handler:Dt.START,style:{left:t.elementInfo.start[0]*n.value+"px",top:t.elementInfo.start[1]*n.value+"px"}},{handler:Dt.END,style:{left:t.elementInfo.end[0]*n.value+"px",top:t.elementInfo.end[1]*n.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2){const s=t.elementInfo.curve||t.elementInfo.broken||t.elementInfo.broken2;l.push({handler:Dt.C,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}})}else if(t.elementInfo.cubic){const[s,u]=t.elementInfo.cubic;l.push({handler:Dt.C1,style:{left:s[0]*n.value+"px",top:s[1]*n.value+"px"}}),l.push({handler:Dt.C2,style:{left:u[0]*n.value+"px",top:u[1]*n.value+"px"}})}return l});return(l,s)=>(o.openBlock(),o.createElementBlock("div",RI,[e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,u=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:u.handler,style:o.normalizeStyle(u.style),onMousedown:o.withModifiers(c=>e.dragLineElement(c,e.elementInfo,u.handler),["stop"])},null,8,["style","onMousedown"]))),128)),(o.openBlock(),o.createElementBlock("svg",{width:r.value||1,height:a.value||1,stroke:e.elementInfo.color,overflow:"visible",style:o.normalizeStyle({transform:`scale(${o.unref(n)})`})},[e.elementInfo.curve?(o.openBlock(),o.createElementBlock("g",OI,[o.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,FI),o.createElementVNode("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,zI)])):o.createCommentVNode("",!0),e.elementInfo.cubic?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(e.elementInfo.cubic,(u,c)=>(o.openBlock(),o.createElementBlock("g",{key:c},[c===0?(o.openBlock(),o.createElementBlock("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:u[0],y2:u[1]},null,8,HI)):o.createCommentVNode("",!0),c===1?(o.openBlock(),o.createElementBlock("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:u[0],y2:u[1]},null,8,GI)):o.createCommentVNode("",!0)]))),128)):o.createCommentVNode("",!0)],12,$I))],64)):o.createCommentVNode("",!0)]))}}),YI=oe(WI,[["__scopeId","data-v-1757e3e2"]]),XI={class:"table-element-operate"},qI={inheritAttrs:!1},ZI=Object.assign(qI,{__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=o.computed(()=>t.elementInfo.outline.width||1),a=o.computed(()=>(t.elementInfo.width+r.value)*n.value),i=o.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:l,borderLines:s}=Ua(a,i);return(u,c)=>(o.openBlock(),o.createElementBlock("div",XI,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(s),d=>(o.openBlock(),o.createBlock(Wa,{class:"operate-border-line",key:d.type,type:d.type,style:o.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(l),d=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:o.normalizeStyle(d.style),onMousedown:o.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),o.createVNode(ml,{class:"operate-rotate-handler",style:o.normalizeStyle({left:a.value/2+"px"}),onMousedown:c[0]||(c[0]=o.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"])],64)):o.createCommentVNode("",!0)]))}}),jI={class:"common-element-operate"},JI={inheritAttrs:!1},ss=Object.assign(JI,{__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n}=te.storeToRefs(ve()),r=o.computed(()=>t.elementInfo.width*n.value),a=o.computed(()=>t.elementInfo.height*n.value),{resizeHandlers:i,borderLines:l}=Ua(r,a),s=o.computed(()=>["chart","video","audio"].includes(t.elementInfo.type));return(u,c)=>(o.openBlock(),o.createElementBlock("div",jI,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(l),d=>(o.openBlock(),o.createBlock(Wa,{class:"operate-border-line",key:d.type,type:d.type,style:o.normalizeStyle(d.style)},null,8,["type","style"]))),128)),e.handlerVisible?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i),d=>(o.openBlock(),o.createBlock(Ro,{class:"operate-resize-handler",key:d.direction,type:d.direction,rotate:e.elementInfo.rotate,style:o.normalizeStyle(d.style),onMousedown:o.withModifiers(f=>e.scaleElement(f,e.elementInfo,d.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),s.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ml,{key:0,class:"operate-rotate-handler",style:o.normalizeStyle({left:r.value/2+"px"}),onMousedown:c[0]||(c[0]=o.withModifiers(d=>e.rotateElement(d,e.elementInfo),["stop"]))},null,8,["style"]))],64)):o.createCommentVNode("",!0)]))}}),Z5=()=>{const e=pe(),{addHistorySnapshot:t}=Ee();return{setLink:(a,i)=>{const l=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(i.type==="web"&&!l.test(i.target))return Se.error("不是正确的网页链接地址"),!1;if(i.type==="slide"&&!i.target)return Se.error("请先选择链接目标"),!1;const s={link:i};return e.updateElement({id:a.id,props:s}),t(),!0},removeLink:a=>{e.removeElementProps({id:a.id,propName:"link"}),t()}}},KI=["href"],QI={class:"btns"},eL={__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,n=ve(),r=pe(),{canvasScale:a}=te.storeToRefs(n),{slides:i}=te.storeToRefs(r),{removeLink:l}=Z5(),s=o.computed(()=>t.elementInfo.type==="line"?0:t.elementInfo.height),u=c=>{const d=i.value.findIndex(f=>f.id===c);d!==-1&&(n.setActiveElementIdList([]),r.updateSlideIndex(d))};return(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:"link-handler",style:o.normalizeStyle({top:s.value*o.unref(a)+10+"px"})},[e.link.type==="web"?(o.openBlock(),o.createElementBlock("a",{key:0,class:"link",href:e.link.target,target:"_blank"},o.toDisplayString(e.link.target),9,KI)):(o.openBlock(),o.createElementBlock("a",{key:1,class:"link",onClick:d[0]||(d[0]=f=>u(e.link.target))},"幻灯片页面 "+o.toDisplayString(e.link.target),1)),o.createElementVNode("div",QI,[o.createElementVNode("div",{class:"btn",onClick:d[1]||(d[1]=f=>e.openLinkDialog())},"更换"),o.createVNode(Ie,{type:"vertical"}),o.createElementVNode("div",{class:"btn",onClick:d[2]||(d[2]=f=>o.unref(l)(e.elementInfo))},"移除")])],4))}},tL=oe(eL,[["__scopeId","data-v-3bf86785"]]),nL={key:1,class:"animation-index"},rL={__name:"index",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:n,toolbarState:r}=te.storeToRefs(ve()),{formatedAnimations:a}=te.storeToRefs(pe()),i=o.computed(()=>({[Xe.IMAGE]:NI,[Xe.TEXT]:AI,[Xe.SHAPE]:BI,[Xe.LINE]:YI,[Xe.TABLE]:ZI,[Xe.CHART]:ss,[Xe.LATEX]:ss,[Xe.VIDEO]:ss,[Xe.AUDIO]:ss})[t.elementInfo.type]||null),l=o.computed(()=>{const c=[];for(let d=0;d<a.value.length;d++)a.value[d].animations.map(v=>v.elId).includes(t.elementInfo.id)&&c.push(d);return c}),s=o.computed(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),u=o.computed(()=>"height"in t.elementInfo?t.elementInfo.height:0);return(c,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:o.normalizeStyle({top:e.elementInfo.top*o.unref(n)+"px",left:e.elementInfo.left*o.unref(n)+"px",transform:`rotate(${s.value}deg)`,transformOrigin:`${e.elementInfo.width*o.unref(n)/2}px ${u.value*o.unref(n)/2}px`})},[e.isSelected?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.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"])):o.createCommentVNode("",!0),o.unref(r)==="elAnimation"&&l.value.length?(o.openBlock(),o.createElementBlock("div",nL,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,f=>(o.openBlock(),o.createElementBlock("div",{class:"index-item",key:f},o.toDisplayString(f+1),1))),128))])):o.createCommentVNode("",!0),e.isActive&&e.elementInfo.link?(o.openBlock(),o.createBlock(tL,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:d[0]||(d[0]=o.withModifiers(()=>{},["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):o.createCommentVNode("",!0)],6))}},oL=oe(rL,[["__scopeId","data-v-7ab125ed"]]),aL={class:"element-content"},iL={__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=o.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px");return(r,a)=>{const i=o.resolveComponent("AiPptVolumeNotice");return o.openBlock(),o.createElementBlock("div",{class:"base-element-audio",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",aL,[o.createVNode(i,{class:"audio-icon",style:o.normalizeStyle({fontSize:n.value,color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}},lL=oe(iL,[["__scopeId","data-v-58330b22"]]),sL={__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["base-element-chart",{"is-thumbnail":e.target==="thumbnail"}]),style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({backgroundColor:e.elementInfo.fill})},[o.createVNode(uu,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),o.createVNode(X5,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,themeColors:e.elementInfo.themeColors,textColor:e.elementInfo.textColor,lineColor:e.elementInfo.lineColor,options:e.elementInfo.options},null,8,["width","height","type","data","themeColors","textColor","lineColor","options"])],4)],4)],6))}},uL=oe(sL,[["__scopeId","data-v-22251d90"]]),cL=["src"],dL={__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=o.computed(()=>t.elementInfo.shadow),{shadowStyle:r}=Ur(n),a=o.computed(()=>t.elementInfo.flipH),i=o.computed(()=>t.elementInfo.flipV),{flipStyle:l}=su(a,i),s=o.computed(()=>t.elementInfo),{clipShape:u,imgPosition:c}=Kf(s),d=o.computed(()=>t.elementInfo.filters),{filter:f}=O1(d);return(v,p)=>(o.openBlock(),o.createElementBlock("div",{class:"base-element-image",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({filter:o.unref(r)?`drop-shadow(${o.unref(r)})`:"",transform:o.unref(l)})},[o.createVNode(F1,{elementInfo:e.elementInfo},null,8,["elementInfo"]),o.createElementVNode("div",{class:"image-content",style:o.normalizeStyle({clipPath:o.unref(u).style})},[o.createElementVNode("img",{src:e.elementInfo.src,draggable:!1,style:o.normalizeStyle({top:o.unref(c).top,left:o.unref(c).left,width:o.unref(c).width,height:o.unref(c).height,filter:o.unref(f)}),alt:""},null,12,cL),e.elementInfo.colorMask?(o.openBlock(),o.createElementBlock("div",{key:0,class:"color-mask",style:o.normalizeStyle({backgroundColor:e.elementInfo.colorMask})},null,4)):o.createCommentVNode("",!0)],4)],4)],4)],4))}},fL=oe(dL,[["__scopeId","data-v-068ab3b5"]]),vL={class:"element-content"},pL=["width","height","stroke","stroke-width"],hL=["transform"],mL=["d"],gL={__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:"base-element-latex",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",vL,[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[o.createElementVNode("path",{d:e.elementInfo.path},null,8,mL)],8,hL)],8,pL))])],4)],4))}},yL=oe(gL,[["__scopeId","data-v-30737566"]]),xL=["width","height"],wL=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],bL={__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n=o.computed(()=>t.elementInfo.shadow),{shadowStyle:r}=Ur(n),a=o.computed(()=>{const u=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return u<24?24:u}),i=o.computed(()=>{const u=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return u<24?24:u}),l=o.computed(()=>{const u=t.elementInfo.width;return t.elementInfo.style==="dashed"?u<=8?`${u*5} ${u*2.5}`:`${u*5} ${u*1.5}`:t.elementInfo.style==="dotted"?u<=8?`${u*1.8} ${u*1.6}`:`${u*1.5} ${u*1.2}`:"0 0"}),s=o.computed(()=>Uf(t.elementInfo));return(u,c)=>(o.openBlock(),o.createElementBlock("div",{class:"base-element-line",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({filter:o.unref(r)?`drop-shadow(${o.unref(r)})`:""})},[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:a.value,height:i.value},[o.createElementVNode("defs",null,[e.elementInfo.points[0]?(o.openBlock(),o.createBlock(Vr,{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"])):o.createCommentVNode("",!0),e.elementInfo.points[1]?(o.openBlock(),o.createBlock(Vr,{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"])):o.createCommentVNode("",!0)]),o.createElementVNode("path",{d:s.value,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":l.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,wL)],8,xL))],4)],4))}},SL=oe(bL,[["__scopeId","data-v-0996dc6c"]]),_L=["width","height"],kL=["transform"],CL=["d","fill","stroke","stroke-width","stroke-dasharray"],EL=["innerHTML"],TL={__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{theme:n}=te.storeToRefs(pe()),r=o.computed(()=>t.elementInfo),{fill:a}=W1(r,"base"),i=o.computed(()=>t.elementInfo.outline),{outlineWidth:l,outlineColor:s,strokeDashArray:u}=Ba(i),c=o.computed(()=>t.elementInfo.shadow),{shadowStyle:d}=Ur(c),f=o.computed(()=>t.elementInfo.flipH),v=o.computed(()=>t.elementInfo.flipV),{flipStyle:p}=su(f,v),h=o.computed(()=>{const m={content:"",align:"middle",defaultFontName:n.value.fontName,defaultColor:n.value.fontColor};return t.elementInfo.text?t.elementInfo.text:m});return(m,g)=>(o.openBlock(),o.createElementBlock("div",{class:"base-element-shape",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({opacity:e.elementInfo.opacity,filter:o.unref(d)?`drop-shadow(${o.unref(d)})`:"",transform:o.unref(p),color:h.value.defaultColor,fontFamily:h.value.defaultFontName})},[(o.openBlock(),o.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[o.createElementVNode("defs",null,[e.elementInfo.pattern?(o.openBlock(),o.createBlock(Y1,{key:0,id:`base-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,["id","src"])):e.elementInfo.gradient?(o.openBlock(),o.createBlock(X1,{key:1,id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])):o.createCommentVNode("",!0)]),o.createElementVNode("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[o.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:o.unref(a),stroke:o.unref(s),"stroke-width":o.unref(l),"stroke-dasharray":o.unref(u)},null,8,CL)],8,kL)],8,_L)),o.createElementVNode("div",{class:o.normalizeClass(["shape-text",h.value.align])},[o.createElementVNode("div",{class:"ProseMirror-static",innerHTML:h.value.content},null,8,EL)],2)],4)],4)],4))}},NL=oe(TL,[["__scopeId","data-v-451ce389"]]),IL={class:"element-content"},LL={__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>{const r=o.resolveComponent("StaticTable");return o.openBlock(),o.createElementBlock("div",{class:"base-element-table",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",IL,[o.createVNode(r,{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)}}},AL=oe(LL,[["__scopeId","data-v-cd5a2caf"]]),ML=["innerHTML"],VL={__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0},target:{type:String}},setup(e){const t=e,n=o.computed(()=>t.elementInfo.shadow),{shadowStyle:r}=Ur(n);return(a,i)=>(o.openBlock(),o.createElementBlock("div",{class:"base-element-text",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:o.unref(r),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"})},[o.createVNode(uu,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),o.createElementVNode("div",{class:o.normalizeClass(["text ProseMirror-static",{thumbnail:e.target==="thumbnail"}]),style:o.normalizeStyle({"--paragraphSpace":`${e.elementInfo.paragraphSpace===void 0?5:e.elementInfo.paragraphSpace}px`}),innerHTML:e.elementInfo.content},null,14,ML)],4)],4)],4))}},PL=oe(VL,[["__scopeId","data-v-9d3db6bb"]]),DL={__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,n)=>{const r=o.resolveComponent("AiPptPlayOne");return o.openBlock(),o.createElementBlock("div",{class:"base-element-video",style:o.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[o.createElementVNode("div",{class:"rotate-wrapper",style:o.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[o.createElementVNode("div",{class:"element-content",style:o.normalizeStyle({backgroundImage:e.elementInfo.poster?`url(${e.elementInfo.poster})`:""})},[o.createVNode(r,{class:"icon"})],4)],4)],4)}}},BL=oe(DL,[["__scopeId","data-v-18aa219a"]]),RL={__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,n={audio:lL,chart:uL,image:fL,latex:yL,line:SL,shape:NL,table:AL,text:PL,video:BL},r=o.computed(()=>n[t.elementInfo.type]),a=o.computed(()=>t.elementInfo.type==="text"||t.elementInfo.type==="chart"?{target:"thumbnail"}:{});return(i,l)=>r.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.value),o.mergeProps({key:0,elementInfo:e.elementInfo},a.value),null,16,["elementInfo"])):o.createCommentVNode("",!0)}},$L={key:1,class:"placeholder"},OL={__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:n,viewportSize:r}=te.storeToRefs(pe()),a=o.computed(()=>t.slide.background),{backgroundStyle:i}=q5(a),l=o.computed(()=>t.size/r.value);return o.provide(B1,l),(s,u)=>(o.openBlock(),o.createElementBlock("div",{class:"thumbnail-slide",style:o.normalizeStyle({width:e.size+"px",height:e.size*o.unref(n)+"px"})},[e.visible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"elements",style:o.normalizeStyle({width:o.unref(r)+"px",height:o.unref(r)*o.unref(n)+"px",transform:`scale(${l.value})`})},[o.createElementVNode("div",{class:"background",style:o.normalizeStyle(o.unref(i))},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.slide.elements,(c,d)=>(o.openBlock(),o.createBlock(RL,{key:c.id,elementInfo:c,elementIndex:d+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(o.openBlock(),o.createElementBlock("div",$L,"加载中 ..."))],4))}},Pa=oe(OL,[["__scopeId","data-v-9421bce1"]]),FL=["onClick"],zL={__name:"Tabs",props:{value:{type:String,required:!0},tabs:{type:Array,required:!0},card:{type:Boolean,default:!1},tabsStyle:{type:Object},tabStyle:{type:Object},spaceAround:{type:Boolean,default:!1},spaceBetween:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=t;return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tabs",{card:e.card,"space-around":e.spaceAround,"space-between":e.spaceBetween}]),style:o.normalizeStyle(e.tabsStyle||{})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.tabs,i=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["tab",{active:i.key===e.value}]),key:i.key,style:o.normalizeStyle({...e.tabStyle||{},"--color":i.color}),onClick:l=>n("update:value",i.key)},o.toDisplayString(i.label),15,FL))),128))],6))}},Xn=oe(zL,[["__scopeId","data-v-622775b2"]]),HL={__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,a=()=>{n.disabled||r("click")};return(i,l)=>(o.openBlock(),o.createElementBlock("button",{class:o.normalizeClass(["button",{disabled:e.disabled,checked:!e.disabled&&e.checked,default:!e.disabled&&e.type==="default",primary:!e.disabled&&e.type==="primary",checkbox:!e.disabled&&e.type==="checkbox",radio:!e.disabled&&e.type==="radio",small:e.size==="small",first:e.first,last:e.last}]),onClick:l[0]||(l[0]=s=>a())},[o.renderSlot(i.$slots,"default",{},void 0,!0)],2))}},le=oe(HL,[["__scopeId","data-v-68c53c35"]]),GL={key:0,class:"select-wrap"},UL={class:"selector"},WL={class:"icon"},YL=["onClick"],XL={class:"selector"},qL={class:"icon"},ZL={__name:"Select",props:{value:{type:[String,Number,Object],required:!0},options:{type:Array,required:!0},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{type:String,default:"搜索"}},emits:["update:value"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(!1),i=o.ref(0),l=o.ref(""),s=o.useTemplateRef("selectRef"),u=o.useTemplateRef("searchInputRef"),c=o.computed(()=>{var h;return((h=n.options.find(m=>m.value===n.value))===null||h===void 0?void 0:h.label)||n.value}),d=o.computed(()=>{if(!n.search||!l.value.trim())return n.options;const h=n.options.filter(m=>m.label.toLowerCase().indexOf(l.value.toLowerCase())!==-1);return h.length?h:n.options});o.watch(a,()=>{a.value?o.nextTick(()=>{u.value&&u.value.focus()}):l.value=""}),o.onBeforeUnmount(()=>{l.value=""});const f=()=>{s.value&&(i.value=s.value.clientWidth)},v=new ResizeObserver(f);o.onMounted(()=>{s.value&&v.observe(s.value)}),o.onUnmounted(()=>{s.value&&v.unobserve(s.value)});const p=h=>{h.disabled||(r("update:value",h.value),a.value=!1)};return(h,m)=>{const g=o.resolveComponent("AiPptDown");return e.disabled?(o.openBlock(),o.createElementBlock("div",GL,[o.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:s},[o.createElementVNode("div",UL,o.toDisplayString(e.value),1),o.createElementVNode("div",WL,[o.renderSlot(h.$slots,"icon",{},()=>[o.createVNode(g,{size:14})],!0)])],512)])):(o.openBlock(),o.createBlock(be,{key:1,class:"select-wrap",trigger:"click",value:a.value,"onUpdate:value":m[1]||(m[1]=y=>a.value=y),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:o.withCtx(()=>[e.search?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(Mr,{ref_key:"searchInputRef",ref:u,simple:"",placeholder:e.searchLabel,value:l.value,"onUpdate:value":m[0]||(m[0]=y=>l.value=y),style:o.normalizeStyle({width:i.value+2+"px"})},null,8,["placeholder","value","style"]),o.createVNode(Ie,{margin:0})],64)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"options",style:o.normalizeStyle({width:i.value+2+"px"})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,y=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["option",{disabled:y.disabled,selected:y.value===e.value}]),key:y.value,onClick:x=>p(y)},o.toDisplayString(y.label),11,YL))),128))],4)]),default:o.withCtx(()=>[o.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:s},[o.createElementVNode("div",XL,o.toDisplayString(c.value),1),o.createElementVNode("div",qL,[o.renderSlot(h.$slots,"icon",{},()=>[o.createVNode(g,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},at=oe(ZL,[["__scopeId","data-v-b5e5f841"]]),jL={class:"link-dialog"},JL={key:2,class:"preview"},KL={class:"btns"},QL={__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){var n;const r=t,a=ve(),{handleElement:i}=te.storeToRefs(a),{slides:l,currentSlide:s}=te.storeToRefs(pe()),u=o.ref("web"),c=o.ref(""),d=o.ref(""),f=o.useTemplateRef("inputRef"),v=o.computed(()=>l.value.map((y,x)=>({label:`幻灯片 ${x+1}`,value:y.id,disabled:s.value.id===y.id})));d.value=((n=l.value.find(y=>y.id!==s.value.id))===null||n===void 0?void 0:n.id)||"";const p=o.computed(()=>d.value&&l.value.find(y=>y.id===d.value)||null),h=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:m}=Z5();o.onMounted(()=>{var y;a.setDisableHotkeysState(!0),!((y=i.value)===null||y===void 0)&&y.link&&(i.value.link.type==="web"?c.value=i.value.link.target:i.value.link.type==="slide"&&(d.value=i.value.link.target),u.value=i.value.link.type),u.value==="web"&&o.nextTick(()=>{f.value.focus()})}),o.onUnmounted(()=>{a.setDisableHotkeysState(!1)});const g=()=>{const y={type:u.value,target:u.value==="web"?c.value:d.value};i.value&&(m(i.value,y)?r("close"):c.value="")};return(y,x)=>(o.openBlock(),o.createElementBlock("div",jL,[o.createVNode(Xn,{tabs:h,value:u.value,"onUpdate:value":x[0]||(x[0]=b=>u.value=b),tabsStyle:{marginBottom:"20px"}},null,8,["value"]),u.value==="web"?(o.openBlock(),o.createBlock(Mr,{key:0,class:"input",ref_key:"inputRef",ref:f,value:c.value,"onUpdate:value":x[1]||(x[1]=b=>c.value=b),placeholder:"请输入网页链接地址",onEnter:x[2]||(x[2]=b=>g())},null,8,["value"])):o.createCommentVNode("",!0),u.value==="slide"?(o.openBlock(),o.createBlock(at,{key:1,class:"input",value:d.value,"onUpdate:value":x[3]||(x[3]=b=>d.value=b),options:v.value},null,8,["value","options"])):o.createCommentVNode("",!0),u.value==="slide"&&p.value?(o.openBlock(),o.createElementBlock("div",JL,[x[6]||(x[6]=o.createElementVNode("div",null,"预览:",-1)),o.createVNode(Pa,{class:"thumbnail",slide:p.value,size:500},null,8,["slide"])])):o.createCommentVNode("",!0),o.createElementVNode("div",KL,[o.createVNode(le,{onClick:x[4]||(x[4]=b=>r("close")),style:{"margin-right":"10px"}},{default:o.withCtx(()=>[...x[7]||(x[7]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{type:"primary",onClick:x[5]||(x[5]=b=>g())},{default:o.withCtx(()=>[...x[8]||(x[8]=[o.createTextVNode("确认",-1)])]),_:1})])]))}},eA=oe(QL,[["__scopeId","data-v-c22a4163"]]),tA={__name:"Modal",props:{visible:{type:Boolean,required:!0},width:{type:Number,default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{type:Object}},emits:["update:visible","closed"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(!1),i=o.ref(null),l=o.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));o.watch(()=>n.visible,()=>{n.visible&&o.nextTick(()=>i.value.focus())});const s=()=>{r("update:visible",!1),r("closed")},u=()=>{n.visible&&n.closeOnEsc&&s()},c=()=>{n.closeOnClickMask&&s()};return(d,f)=>{const v=o.resolveComponent("AiPptClose");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"modal-fade"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:"modal",ref_key:"modalRef",ref:i,tabindex:"-1",onKeyup:f[4]||(f[4]=o.withKeys(p=>u(),["esc"]))},[o.createElementVNode("div",{class:"mask",onClick:f[0]||(f[0]=p=>c())}),o.createVNode(o.Transition,{name:"modal-zoom",onAfterLeave:f[2]||(f[2]=p=>a.value=!1),onBeforeEnter:f[3]||(f[3]=p=>a.value=!0)},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:"modal-content",style:o.normalizeStyle(l.value)},[e.closeButton?(o.openBlock(),o.createElementBlock("span",{key:0,class:"close-btn",onClick:f[1]||(f[1]=p=>s())},[o.createVNode(v)])):o.createCommentVNode("",!0),a.value?o.renderSlot(d.$slots,"default",{key:1},void 0,!0):o.createCommentVNode("",!0)],4),[[o.vShow,e.visible]])]),_:3})],544),[[o.vShow,e.visible]])]),_:3})])}}},Hr=oe(tA,[["__scopeId","data-v-6f5d94fa"]]),nA={class:"operates"},rA={key:2,class:"drag-mask"},oA={__name:"index",setup(e){const t=ve(),{activeElementIdList:n,activeGroupElementId:r,handleElementId:a,hiddenElementIdList:i,editorAreaFocus:l,gridLineSize:s,showRuler:u,creatingElement:c,creatingCustomShape:d,canvasScale:f,textFormatPainter:v}=te.storeToRefs(t),{currentSlide:p}=te.storeToRefs(pe()),{ctrlKeyState:h,spaceKeyState:m}=te.storeToRefs(on()),g=o.useTemplateRef("viewportRef"),y=o.ref([]),x=o.ref(!1),b=()=>x.value=!0;o.watch(a,()=>{t.setActiveGroupElementId("")});const S=o.ref([]),_=()=>{S.value=p.value?JSON.parse(JSON.stringify(p.value.elements)):[]};o.watchEffect(_);const k=o.useTemplateRef("canvasRef"),{dragViewport:w,viewportStyles:C}=g3(k);x3(k);const{mouseSelection:E,mouseSelectionVisible:L,mouseSelectionQuadrant:N,updateMouseSelection:T}=y3(S,g),{dragElement:A}=k3(S,y,f),{dragLineElement:I}=C3(S),{selectElement:D}=_3(S,A),{scaleElement:V,scaleMultiElement:B}=S3(S,y,f),{rotateElement:R}=b3(S,g,f),{moveShapeKeypoint:F}=E3(S,f),{selectAllElements:W}=au(),{deleteAllElements:O}=ou(),{pasteElement:P}=Zf(),{enterScreeningFromStart:$}=lu(),{updateSlideIndex:z}=Po(),{createTextElement:Z,createShapeElement:Q}=Vo();o.onMounted(()=>{n.value.length&&o.nextTick(()=>t.setActiveElementIdList([]))});const J=ae=>{n.value.length&&t.setActiveElementIdList([]),m.value?w(ae):T(ae),l.value||t.setEditorareaFocus(!0),v.value&&t.setTextFormatPainter(null),m3()},U=ae=>{if(n.value.length||c.value||d.value||!g.value)return;const Y=g.value.getBoundingClientRect(),ee=(ae.pageX-Y.x)/f.value,ce=(ae.pageY-Y.y)/f.value;Z({left:ee,top:ce,width:200/f.value,height:0})};o.onUnmounted(()=>{v.value&&t.setTextFormatPainter(null)});const ne=()=>{l.value&&t.setEditorareaFocus(!1)},{scaleCanvas:K}=jf(),H=qe.throttle(K,100,{leading:!0,trailing:!1}),M=qe.throttle(z,300,{leading:!0,trailing:!1}),G=ae=>{ae.preventDefault(),h.value?ae.deltaY>0?H("-"):ae.deltaY<0&&H("+"):ae.deltaY>0?M(ye.DOWN):ae.deltaY<0&&M(ye.UP)},X=()=>{t.setRulerState(!u.value)},{insertElementFromCreateSelection:j,formatCreateSelection:ie}=T3(g),ue=ae=>{const{start:Y,end:ee,path:ce,viewBox:de}=ae,De=ie({start:Y,end:ee});if(De){const Re={};ae.fill&&(Re.fill=ae.fill),ae.outline&&(Re.outline=ae.outline),Q(De,{path:ce,viewBox:de},Re)}t.setCreatingCustomShapeState(!1)},se=()=>[{text:"粘贴",subText:"Ctrl + V",handler:P},{text:"全选",subText:"Ctrl + A",handler:W},{text:"标尺",subText:u.value?"√":"",handler:X},{text:"网格线",handler:()=>t.setGridLineSize(s.value?0:50),children:[{text:"无",subText:s.value===0?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:s.value===25?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:s.value===50?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:s.value===100?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:"重置当前页",handler:O},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:$}];return o.provide(B1,f),(ae,Y)=>{const ee=o.resolveDirective("contextmenu"),ce=o.resolveDirective("click-outside");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"canvas",ref_key:"canvasRef",ref:k,onWheel:Y[4]||(Y[4]=de=>G(de)),onMousedown:Y[5]||(Y[5]=de=>J(de)),onDblclick:Y[6]||(Y[6]=de=>U(de))},[o.unref(c)?(o.openBlock(),o.createBlock(pI,{key:0,onCreated:Y[0]||(Y[0]=de=>o.unref(j)(de))})):o.createCommentVNode("",!0),o.unref(d)?(o.openBlock(),o.createBlock(yI,{key:1,onCreated:Y[1]||(Y[1]=de=>ue(de))})):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"viewport-wrapper",style:o.normalizeStyle({width:o.unref(C).width*o.unref(f)+"px",height:o.unref(C).height*o.unref(f)+"px",left:o.unref(C).left+"px",top:o.unref(C).top+"px"})},[o.createElementVNode("div",nA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.value,(de,De)=>(o.openBlock(),o.createBlock(aI,{key:De,type:de.type,axis:de.axis,length:de.length,canvasScale:o.unref(f)},null,8,["type","axis","length","canvasScale"]))),128)),o.unref(n).length>1?(o.openBlock(),o.createBlock(SI,{key:0,elementList:S.value,scaleMultiElement:o.unref(B)},null,8,["elementList","scaleMultiElement"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.value,de=>o.withDirectives((o.openBlock(),o.createBlock(oL,{key:de.id,elementInfo:de,isSelected:o.unref(n).includes(de.id),isActive:o.unref(a)===de.id,isActiveGroupElement:o.unref(r)===de.id,isMultiSelect:o.unref(n).length>1,rotateElement:o.unref(R),scaleElement:o.unref(V),openLinkDialog:b,dragLineElement:o.unref(I),moveShapeKeypoint:o.unref(F)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[o.vShow,!o.unref(i).includes(de.id)]])),128)),o.createVNode(rI)]),o.createElementVNode("div",{class:"viewport",ref_key:"viewportRef",ref:g,style:o.normalizeStyle({transform:`scale(${o.unref(f)})`})},[o.unref(L)?(o.openBlock(),o.createBlock(JN,{key:0,top:o.unref(E).top,left:o.unref(E).left,width:o.unref(E).width,height:o.unref(E).height,quadrant:o.unref(N)},null,8,["top","left","width","height","quadrant"])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.value,(de,De)=>o.withDirectives((o.openBlock(),o.createBlock(ZN,{key:de.id,elementInfo:de,elementIndex:De+1,isMultiSelect:o.unref(n).length>1,selectElement:o.unref(D),openLinkDialog:b},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[o.vShow,!o.unref(i).includes(de.id)]])),128))],4)],4),o.unref(m)?(o.openBlock(),o.createElementBlock("div",rA)):o.createCommentVNode("",!0),o.unref(u)?(o.openBlock(),o.createBlock(cI,{key:3,viewportStyles:o.unref(C),elementList:S.value},null,8,["viewportStyles","elementList"])):o.createCommentVNode("",!0),o.createVNode(Hr,{visible:x.value,"onUpdate:visible":Y[3]||(Y[3]=de=>x.value=de),width:540},{default:o.withCtx(()=>[o.createVNode(eA,{onClose:Y[2]||(Y[2]=de=>x.value=!1)})]),_:1},8,["visible"])],32)),[[ee,se],[ce,ne]])}}},aA=oe(oA,[["__scopeId","data-v-bbb5c9e2"]]),iA={class:"shape-item-thumbnail"},lA={class:"shape-content"},sA={overflow:"visible",width:"18",height:"18"},uA=["transform"],cA=["fill","stroke","d"],dA={__name:"ShapeItemThumbnail",props:{shape:{type:Object,required:!0}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",iA,[o.createElementVNode("div",lA,[(o.openBlock(),o.createElementBlock("svg",sA,[o.createElementVNode("g",{transform:`scale(${18/e.shape.viewBox[0]}, ${18/e.shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[o.createElementVNode("path",{class:o.normalizeClass(["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,cA)],8,uA)]))])]))}},j5=oe(dA,[["__scopeId","data-v-af5e0ce2"]]),fA={class:"shape-pool"},vA={class:"category-name"},pA={class:"shape-list"},hA={__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const n=t,r=a=>{n("select",a)};return(a,i)=>(o.openBlock(),o.createElementBlock("div",fA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Yf),l=>(o.openBlock(),o.createElementBlock("div",{class:"category",key:l.type},[o.createElementVNode("div",vA,o.toDisplayString(l.type),1),o.createElementVNode("div",pA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.children,(s,u)=>(o.openBlock(),o.createBlock(j5,{class:"shape-item",key:u,shape:s,onClick:c=>r(s)},null,8,["shape","onClick"]))),128))])]))),128))]))}},mA=oe(hA,[["__scopeId","data-v-903b7b4d"]]),gA=[{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 L 10 0 L 10 20 L 20 20",style:"solid",points:["","arrow"],isBroken2:!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}]}],yA={class:"line-pool"},xA={class:"category-name"},wA={class:"line-list"},bA=["onClick"],SA={overflow:"visible",width:"20",height:"20"},_A=["d","stroke-dasharray","marker-start","marker-end"],kA={__name:"LinePool",emits:["select"],setup(e,{emit:t}){const n=t,r=a=>{n("select",a)};return(a,i)=>(o.openBlock(),o.createElementBlock("div",yA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(gA),(l,s)=>(o.openBlock(),o.createElementBlock("div",{class:"category",key:l.type},[o.createElementVNode("div",xA,o.toDisplayString(l.type),1),o.createElementVNode("div",wA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.children,(u,c)=>(o.openBlock(),o.createElementBlock("div",{class:"line-item",key:c},[o.createElementVNode("div",{class:"line-content",onClick:d=>r(u)},[(o.openBlock(),o.createElementBlock("svg",SA,[o.createElementVNode("defs",null,[u.points[0]?(o.openBlock(),o.createBlock(Vr,{key:0,class:"line-marker",id:`preset-line-${s}-${c}`,position:"start",type:u.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):o.createCommentVNode("",!0),u.points[1]?(o.openBlock(),o.createBlock(Vr,{key:1,class:"line-marker",id:`preset-line-${s}-${c}`,position:"end",type:u.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):o.createCommentVNode("",!0)]),o.createElementVNode("path",{class:"line-path",d:u.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":u.style==="solid"?"0, 0":"4, 1","marker-start":u.points[0]?`url(#${`preset-line-${s}-${c}`}-${u.points[0]}-start)`:"","marker-end":u.points[1]?`url(#${`preset-line-${s}-${c}`}-${u.points[1]}-end)`:""},null,8,_A)]))],8,bA)]))),128))])]))),128))]))}},CA=oe(kA,[["__scopeId","data-v-936fda96"]]),EA={class:"chart-pool"},TA=["onClick"],NA={class:"name"},IA={__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const n=t,r=["bar","column","line","area","scatter","pie","ring","radar"],a=i=>{n("select",i)};return(i,l)=>{const s=o.resolveComponent("AiPptChartLine"),u=o.resolveComponent("AiPptChartHistogram"),c=o.resolveComponent("AiPptChartPie"),d=o.resolveComponent("AiPptChartHistogramOne"),f=o.resolveComponent("AiPptChartLineArea"),v=o.resolveComponent("AiPptChartRing"),p=o.resolveComponent("AiPptChartScatter"),h=o.resolveComponent("AiPptRadarChart");return o.openBlock(),o.createElementBlock("ul",EA,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,(m,g)=>o.createElementVNode("li",{class:"chart-item",key:g},[o.createElementVNode("div",{class:"chart-content",onClick:y=>a(m)},[m==="line"?(o.openBlock(),o.createBlock(s,{key:0,size:"24"})):m==="bar"?(o.openBlock(),o.createBlock(u,{key:1,size:"24"})):m==="pie"?(o.openBlock(),o.createBlock(c,{key:2,size:"24"})):m==="column"?(o.openBlock(),o.createBlock(d,{key:3,size:"24"})):m==="area"?(o.openBlock(),o.createBlock(f,{key:4,size:"24"})):m==="ring"?(o.openBlock(),o.createBlock(v,{key:5,size:"24"})):m==="scatter"?(o.openBlock(),o.createBlock(p,{key:6,size:"24"})):m==="radar"?(o.openBlock(),o.createBlock(h,{key:7,size:"23"})):o.createCommentVNode("",!0),o.createElementVNode("div",NA,o.toDisplayString(o.unref(Ld)[m]),1)],8,TA)])),64))])}}},LA=oe(IA,[["__scopeId","data-v-294ab86b"]]),AA={class:"prefix"},MA={class:"input-wrap"},VA=["disabled","placeholder"],PA={class:"handlers"},DA={class:"suffix"},BA={__name:"NumberInput",props:{value:{type:Number,required:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:1/0},step:{type:Number,default:1}},emits:["update:value","input","change","enter","blur","focus"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(0),i=o.ref(!1);o.watch(()=>n.value,()=>{n.value!==a.value&&(a.value=n.value)},{immediate:!0}),o.watch(a,()=>{const d=+a.value;if(!isNaN(d)){{if(d>n.max)return;if(d<n.min)return}a.value=d,r("update:value",a.value)}});const l=()=>{let d=+a.value;isNaN(d)?d=n.min:d>n.max?d=n.max:d<n.min&&(d=n.min),a.value=d,r("update:value",a.value)},s=d=>{l(),r("enter",d)},u=d=>{l(),i.value=!1,r("blur",d)},c=d=>{i.value=!0,r("focus",d)};return(d,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["number-input",{disabled:e.disabled,focused:i.value}])},[o.createElementVNode("span",AA,[o.renderSlot(d.$slots,"prefix",{},void 0,!0)]),o.createElementVNode("div",MA,[o.withDirectives(o.createElementVNode("input",{type:"text",disabled:e.disabled,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),placeholder:e.placeholder,onInput:f[1]||(f[1]=v=>r("input",v)),onFocus:f[2]||(f[2]=v=>c(v)),onBlur:f[3]||(f[3]=v=>u(v)),onChange:f[4]||(f[4]=v=>r("change",v)),onKeydown:f[5]||(f[5]=o.withKeys(v=>s(v),["enter"]))},null,40,VA),[[o.vModelText,a.value]]),o.createElementVNode("div",PA,[o.createElementVNode("span",{class:"handler",onClick:f[6]||(f[6]=v=>a.value+=e.step)},[...f[8]||(f[8]=[o.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[o.createElementVNode("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)])]),o.createElementVNode("span",{class:"handler",onClick:f[7]||(f[7]=v=>a.value-=e.step)},[...f[9]||(f[9]=[o.createElementVNode("svg",{fill:"currentColor",width:"1em",height:"1em",viewBox:"64 64 896 896"},[o.createElementVNode("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)])])])]),o.createElementVNode("span",DA,[o.renderSlot(d.$slots,"suffix",{},void 0,!0)])],2))}},Ut=oe(BA,[["__scopeId","data-v-2e690069"]]),RA={class:"table-generator"},$A={class:"title"},OA={class:"lef"},FA=["onMouseenter"],zA={key:1,class:"custom"},HA={class:"row"},GA={class:"row"},UA={class:"btns"},WA={__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const n=t,r=o.ref([]),a=o.ref(3),i=o.ref(3),l=o.ref(!1),s=()=>{if(!r.value.length)return;const[d,f]=r.value;n("insert",{row:d,col:f})},u=()=>{if(a.value<1||a.value>20||i.value<1||i.value>20)return Se.warning("行数/列数必须在0~20之间!");n("insert",{row:a.value,col:i.value}),l.value=!1},c=()=>{n("close"),l.value=!1};return(d,f)=>(o.openBlock(),o.createElementBlock("div",RA,[o.createElementVNode("div",$A,[o.createElementVNode("div",OA,"表格 "+o.toDisplayString(r.value.length?`${r.value[0]} x ${r.value[1]}`:""),1),o.createElementVNode("div",{class:"right",onClick:f[0]||(f[0]=v=>l.value=!l.value)},o.toDisplayString(l.value?"返回":"自定义"),1)]),l.value?(o.openBlock(),o.createElementBlock("div",zA,[o.createElementVNode("div",HA,[f[7]||(f[7]=o.createElementVNode("div",{class:"label",style:{width:"25%"}},"行数:",-1)),o.createVNode(Ut,{min:1,max:20,value:a.value,"onUpdate:value":f[3]||(f[3]=v=>a.value=v),style:{width:"75%"}},null,8,["value"])]),o.createElementVNode("div",GA,[f[8]||(f[8]=o.createElementVNode("div",{class:"label",style:{width:"25%"}},"列数:",-1)),o.createVNode(Ut,{min:1,max:20,value:i.value,"onUpdate:value":f[4]||(f[4]=v=>i.value=v),style:{width:"75%"}},null,8,["value"])]),o.createElementVNode("div",UA,[o.createVNode(le,{class:"btn",onClick:f[5]||(f[5]=v=>c())},{default:o.withCtx(()=>[...f[9]||(f[9]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{class:"btn",type:"primary",onClick:f[6]||(f[6]=v=>u())},{default:o.withCtx(()=>[...f[10]||(f[10]=[o.createTextVNode("确认",-1)])]),_:1})])])):(o.openBlock(),o.createElementBlock("table",{key:0,onMouseleave:f[1]||(f[1]=v=>r.value=[]),onClick:f[2]||(f[2]=v=>s())},[o.createElementVNode("tbody",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(10,v=>o.createElementVNode("tr",{key:v},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(10,p=>o.createElementVNode("td",{onMouseenter:h=>r.value=[v,p],key:p},[o.createElementVNode("div",{class:o.normalizeClass(["cell",{active:r.value.length&&v<=r.value[0]&&p<=r.value[1]}])},null,2)],40,FA)),64))])),64))])],32))]))}},YA=oe(WA,[["__scopeId","data-v-4e38c55c"]]),XA={class:"media-input"},qA={class:"btns"},ZA={class:"btns"},jA={__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const n=t,r=o.ref("video"),a=o.ref(""),i=o.ref(""),l=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],s=()=>{if(!a.value)return Se.error("请先输入正确的视频地址");n("insertVideo",a.value)},u=()=>{if(!i.value)return Se.error("请先输入正确的音频地址");n("insertAudio",i.value)};return(c,d)=>(o.openBlock(),o.createElementBlock("div",XA,[o.createVNode(Xn,{tabs:l,value:r.value,"onUpdate:value":d[0]||(d[0]=f=>r.value=f),tabsStyle:{marginBottom:"15px"}},null,8,["value"]),r.value==="video"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(Mr,{value:a.value,"onUpdate:value":d[1]||(d[1]=f=>a.value=f),placeholder:"请输入视频地址,e.g. https://xxx.mp4"},null,8,["value"]),o.createElementVNode("div",qA,[o.createVNode(le,{onClick:d[2]||(d[2]=f=>n("close")),style:{"margin-right":"10px"}},{default:o.withCtx(()=>[...d[7]||(d[7]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{type:"primary",onClick:d[3]||(d[3]=f=>s())},{default:o.withCtx(()=>[...d[8]||(d[8]=[o.createTextVNode("确认",-1)])]),_:1})])],64)):o.createCommentVNode("",!0),r.value==="audio"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(Mr,{value:i.value,"onUpdate:value":d[4]||(d[4]=f=>i.value=f),placeholder:"请输入音频地址,e.g. https://xxx.mp3"},null,8,["value"]),o.createElementVNode("div",ZA,[o.createVNode(le,{onClick:d[5]||(d[5]=f=>n("close")),style:{"margin-right":"10px"}},{default:o.withCtx(()=>[...d[9]||(d[9]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{type:"primary",onClick:d[6]||(d[6]=f=>u())},{default:o.withCtx(()=>[...d[10]||(d[10]=[o.createTextVNode("确认",-1)])]),_:1})])],64)):o.createCommentVNode("",!0)]))}},JA=oe(jA,[["__scopeId","data-v-358fa502"]]),KA=[{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"}],md=[{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"}]}],QA=["disabled","value","rows","placeholder"],eM={__name:"TextArea",props:{value:{type:String,required:!0},rows:{type:Number,default:4},padding:{type:Number},disabled:{type:Boolean,default:!1},resizable:{type:Boolean,default:!1},placeholder:{type:String,default:""}},emits:["update:value","focus","blur","enter"],setup(e,{expose:t,emit:n}){const r=n,a=s=>{r("update:value",s.target.value)},i=o.useTemplateRef("textareaRef");return t({focus:()=>{i.value&&i.value.focus()}}),(s,u)=>(o.openBlock(),o.createElementBlock("textarea",{class:o.normalizeClass(["textarea",{disabled:e.disabled,resizable:e.resizable}]),ref_key:"textareaRef",ref:i,disabled:e.disabled,value:e.value,rows:e.rows,placeholder:e.placeholder,style:o.normalizeStyle({padding:e.padding?`${e.padding}px`:"10px"}),onInput:u[0]||(u[0]=c=>a(c)),onFocus:u[1]||(u[1]=c=>r("focus",c)),onBlur:u[2]||(u[2]=c=>r("blur",c)),onKeydown:u[3]||(u[3]=o.withKeys(c=>r("enter",c),["enter"]))},null,46,QA))}},Of=oe(eM,[["__scopeId","data-v-5f5d7a19"]]),tM=["width","height"],nM=["transform"],rM=["d"],oM={__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){const t=e,n=o.ref({x:0,y:0,w:0,h:0}),r=o.ref("");o.watch(()=>t.latex,()=>{const i=new Hf.hfmath(t.latex);r.value=i.pathd({}),n.value=i.box({})},{immediate:!0});const a=o.computed(()=>{const i=n.value.w+32,l=n.value.h+32;return i>t.width||l>t.height?i/l>t.width/t.height?t.width/i:t.height/l:1});return(i,l)=>(o.openBlock(),o.createElementBlock("svg",{class:"formula-content",overflow:"visible",width:n.value.w+32,height:n.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[o.createElementVNode("g",{transform:`scale(${a.value}, ${a.value}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[o.createElementVNode("path",{d:r.value},null,8,rM)],8,nM)],8,tM))}},r1=oe(oM,[["__scopeId","data-v-dac6e591"]]),aM=["innerHTML"],iM={__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,n=o.computed(()=>new Hf.hfmath(t.latex).svg({SCALE_X:10,SCALE_Y:10}));return(r,a)=>(o.openBlock(),o.createElementBlock("div",{class:"symbol-content",innerHTML:n.value},null,8,aM))}},lM={class:"latex-editor"},sM={class:"container"},uM={class:"left"},cM={class:"input-area"},dM={class:"preview"},fM={key:0,class:"placeholder"},vM={key:1,class:"preview-content"},pM={class:"right"},hM={class:"content"},mM={key:0,class:"symbol"},gM={class:"symbol-pool"},yM=["onClick"],xM={key:1,class:"formula"},wM={class:"formula-title"},bM=["onClick"],SM={class:"footer"},_M={__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const n=[{label:"常用符号",key:"symbol"},{label:"预置公式",key:"formula"}],r=e,a=t,i=KA,l=md.map(h=>({label:h.label,key:h.type})),s=o.ref(""),u=o.ref("symbol"),c=o.useTemplateRef("textAreaRef"),d=o.ref(md[0].type),f=o.computed(()=>{const h=md.find(m=>m.type===d.value);return h?.children||[]});o.onMounted(()=>{r.value&&(s.value=r.value)});const v=()=>{if(!s.value)return Se.error("公式不能为空");const h=new Hf.hfmath(s.value),m=h.pathd({}),g=h.box({});a("update",{latex:s.value,path:m,w:g.w+32,h:g.h+32})},p=h=>{c.value&&(c.value.focus(),document.execCommand("insertText",!1,h))};return(h,m)=>(o.openBlock(),o.createElementBlock("div",lM,[o.createElementVNode("div",sM,[o.createElementVNode("div",uM,[o.createElementVNode("div",cM,[o.createVNode(Of,{value:s.value,"onUpdate:value":m[0]||(m[0]=g=>s.value=g),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:c},null,8,["value"])]),o.createElementVNode("div",dM,[s.value?(o.openBlock(),o.createElementBlock("div",vM,[o.createVNode(r1,{width:518,height:138,latex:s.value},null,8,["latex"])])):(o.openBlock(),o.createElementBlock("div",fM,"公式预览"))])]),o.createElementVNode("div",pM,[o.createVNode(Xn,{tabs:n,value:u.value,"onUpdate:value":m[1]||(m[1]=g=>u.value=g),card:""},null,8,["value"]),o.createElementVNode("div",hM,[u.value==="symbol"?(o.openBlock(),o.createElementBlock("div",mM,[o.createVNode(Xn,{tabs:o.unref(l),value:d.value,"onUpdate:value":m[2]||(m[2]=g=>d.value=g),spaceBetween:""},null,8,["tabs","value"]),o.createElementVNode("div",gM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,g=>(o.openBlock(),o.createElementBlock("div",{class:"symbol-item",key:g.latex,onClick:y=>p(g.latex)},[o.createVNode(iM,{latex:g.latex},null,8,["latex"])],8,yM))),128))])])):(o.openBlock(),o.createElementBlock("div",xM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i),g=>(o.openBlock(),o.createElementBlock("div",{class:"formula-item",key:g.label},[o.createElementVNode("div",wM,o.toDisplayString(g.label),1),o.createElementVNode("div",{class:"formula-item-content",onClick:y=>s.value=g.latex},[o.createVNode(r1,{width:236,height:60,latex:g.latex},null,8,["latex"])],8,bM)]))),128))]))])])]),o.createElementVNode("div",SM,[o.createVNode(le,{class:"btn",onClick:m[3]||(m[3]=g=>a("close"))},{default:o.withCtx(()=>[...m[5]||(m[5]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{class:"btn",type:"primary",onClick:m[4]||(m[4]=g=>v())},{default:o.withCtx(()=>[...m[6]||(m[6]=[o.createTextVNode("确定",-1)])]),_:1})])]))}},J5=oe(_M,[["__scopeId","data-v-eb475fa8"]]),kM={class:"canvas-tool"},CM={class:"left-handler"},EM={class:"more"},TM={class:"add-element-handler"},NM={class:"handler-item group-btn"},IM={class:"handler-item group-btn",offset:10},LM={class:"right-handler"},AM={class:"text"},MM={__name:"index",setup(e){const t=ve(),{creatingElement:n,creatingCustomShape:r,showSelectPanel:a,showSearchPanel:i,showNotesPanel:l,showSymbolPanel:s}=te.storeToRefs(t),{canUndo:u,canRedo:c}=te.storeToRefs(S1()),{redo:d,undo:f}=Ee(),{scaleCanvas:v,setCanvasScalePercentage:p,resetCanvas:h,canvasScalePercentage:m}=jf(),g=[200,150,125,100,75,50],y=o.ref(!1),x=J=>{p(J),y.value=!1},{createImageElement:b,createChartElement:S,createTableElement:_,createLatexElement:k,createVideoElement:w,createAudioElement:C}=Vo(),E=J=>{const U=J[0];U&&Gr(U).then(ne=>b(ne))},L=o.ref(!1),N=o.ref(!1),T=o.ref(!1),A=o.ref(!1),I=o.ref(!1),D=o.ref(!1),V=o.ref(!1),B=o.ref(!1),R=o.ref(!1),F=(J=!1)=>{t.setCreatingElement({type:"text",vertical:J})},W=J=>{t.setCreatingElement({type:"shape",data:J}),L.value=!1},O=()=>{t.setCreatingCustomShapeState(!0),L.value=!1},P=J=>{t.setCreatingElement({type:"line",data:J}),N.value=!1},$=()=>{t.setSelectPanelState(!a.value)},z=()=>{t.setSearchPanelState(!i.value)},Z=()=>{t.setNotesPanelState(!l.value)},Q=()=>{t.setSymbolPanelState(!s.value)};return(J,U)=>{const ne=o.resolveComponent("AiPptBack"),K=o.resolveComponent("AiPptNext"),H=o.resolveComponent("AiPptMore"),M=o.resolveComponent("AiPptComment"),G=o.resolveComponent("AiPptMoveOne"),X=o.resolveComponent("AiPptSearch"),j=o.resolveComponent("AiPptFontSize"),ie=o.resolveComponent("AiPptTextRotationNone"),ue=o.resolveComponent("AiPptTextRotationDown"),se=o.resolveComponent("AiPptDown"),ae=o.resolveComponent("AiPptGraphicDesign"),Y=o.resolveComponent("AiPptPicture"),ee=o.resolveComponent("AiPptConnection"),ce=o.resolveComponent("AiPptChartProportion"),de=o.resolveComponent("AiPptInsertTable"),De=o.resolveComponent("AiPptFormula"),Re=o.resolveComponent("AiPptVideoTwo"),jn=o.resolveComponent("AiPptSymbol"),$o=o.resolveComponent("AiPptMinus"),Oo=o.resolveComponent("AiPptPlus"),Xu=o.resolveComponent("AiPptFullScreen"),st=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",kM,[o.createElementVNode("div",CM,[o.withDirectives(o.createVNode(ne,{class:o.normalizeClass(["handler-item",{disable:!o.unref(u)}]),onClick:U[0]||(U[0]=xe=>o.unref(f)())},null,8,["class"]),[[st,"撤销(Ctrl + Z)"]]),o.withDirectives(o.createVNode(K,{class:o.normalizeClass(["handler-item",{disable:!o.unref(c)}]),onClick:U[1]||(U[1]=xe=>o.unref(d)())},null,8,["class"]),[[st,"重做(Ctrl + Y)"]]),o.createElementVNode("div",EM,[o.createVNode(Ie,{type:"vertical",style:{height:"20px"}}),o.createVNode(be,{class:"more-icon",trigger:"click",value:R.value,"onUpdate:value":U[5]||(U[5]=xe=>R.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:U[2]||(U[2]=xe=>{Z(),R.value=!1})},{default:o.withCtx(()=>[...U[39]||(U[39]=[o.createTextVNode("批注面板",-1)])]),_:1}),o.createVNode(ut,{center:"",onClick:U[3]||(U[3]=xe=>{$(),R.value=!1})},{default:o.withCtx(()=>[...U[40]||(U[40]=[o.createTextVNode("选择窗格",-1)])]),_:1}),o.createVNode(ut,{center:"",onClick:U[4]||(U[4]=xe=>{z(),R.value=!1})},{default:o.withCtx(()=>[...U[41]||(U[41]=[o.createTextVNode("查找替换",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(H,{class:"handler-item"})]),_:1},8,["value"]),o.withDirectives(o.createVNode(M,{class:o.normalizeClass(["handler-item",{active:o.unref(l)}]),onClick:U[6]||(U[6]=xe=>Z())},null,8,["class"]),[[st,"批注面板"]]),o.withDirectives(o.createVNode(G,{class:o.normalizeClass(["handler-item",{active:o.unref(a)}]),onClick:U[7]||(U[7]=xe=>$())},null,8,["class"]),[[st,"选择窗格"]]),o.withDirectives(o.createVNode(X,{class:o.normalizeClass(["handler-item",{active:o.unref(i)}]),onClick:U[8]||(U[8]=xe=>z())},null,8,["class"]),[[st,"查找/替换(Ctrl + F)"]])])]),o.createElementVNode("div",TM,[o.withDirectives((o.openBlock(),o.createElementBlock("div",NM,[o.createVNode(j,{class:o.normalizeClass(["icon",{active:o.unref(n)?.type==="text"}]),onClick:U[9]||(U[9]=xe=>F())},null,8,["class"]),o.createVNode(be,{trigger:"click",value:V.value,"onUpdate:value":U[12]||(U[12]=xe=>V.value=xe),style:{height:"100%"},offset:10},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:U[10]||(U[10]=()=>{F(),V.value=!1})},{default:o.withCtx(()=>[o.createVNode(ie),U[42]||(U[42]=o.createTextVNode(" 横向文本框 ",-1))]),_:1}),o.createVNode(ut,{center:"",onClick:U[11]||(U[11]=()=>{F(!0),V.value=!1})},{default:o.withCtx(()=>[o.createVNode(ue),U[43]||(U[43]=o.createTextVNode(" 竖向文本框 ",-1))]),_:1})]),default:o.withCtx(()=>[o.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[st,"插入文字"]]),o.withDirectives((o.openBlock(),o.createElementBlock("div",IM,[o.createVNode(be,{trigger:"click",style:{height:"100%"},value:L.value,"onUpdate:value":U[14]||(U[14]=xe=>L.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(mA,{onSelect:U[13]||(U[13]=xe=>W(xe))})]),default:o.withCtx(()=>[o.createVNode(ae,{class:o.normalizeClass(["icon",{active:o.unref(r)||o.unref(n)?.type==="shape"}])},null,8,["class"])]),_:1},8,["value"]),o.createVNode(be,{trigger:"click",value:B.value,"onUpdate:value":U[16]||(U[16]=xe=>B.value=xe),style:{height:"100%"},offset:10},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:U[15]||(U[15]=()=>{O(),B.value=!1})},{default:o.withCtx(()=>[...U[44]||(U[44]=[o.createTextVNode("自由绘制 ",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(se,{class:"arrow"})]),_:1},8,["value"])])),[[st,"插入形状"]]),o.createVNode(ul,{onChange:U[17]||(U[17]=xe=>E(xe))},{default:o.withCtx(()=>[o.withDirectives(o.createVNode(Y,{class:"handler-item"},null,512),[[st,"插入图片"]])]),_:1}),o.createVNode(be,{trigger:"click",value:N.value,"onUpdate:value":U[19]||(U[19]=xe=>N.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(CA,{onSelect:U[18]||(U[18]=xe=>P(xe))})]),default:o.withCtx(()=>[o.withDirectives(o.createVNode(ee,{class:o.normalizeClass(["handler-item",{active:o.unref(n)?.type==="line"}])},null,8,["class"]),[[st,"插入线条"]])]),_:1},8,["value"]),o.createVNode(be,{trigger:"click",value:T.value,"onUpdate:value":U[21]||(U[21]=xe=>T.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(LA,{onSelect:U[20]||(U[20]=xe=>{o.unref(S)(xe),T.value=!1})})]),default:o.withCtx(()=>[o.withDirectives(o.createVNode(ce,{class:"handler-item"},null,512),[[st,"插入图表"]])]),_:1},8,["value"]),o.createVNode(be,{trigger:"click",value:A.value,"onUpdate:value":U[24]||(U[24]=xe=>A.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(YA,{onClose:U[22]||(U[22]=xe=>A.value=!1),onInsert:U[23]||(U[23]=({row:xe,col:ap})=>{o.unref(_)(xe,ap),A.value=!1})})]),default:o.withCtx(()=>[o.withDirectives(o.createVNode(de,{class:"handler-item"},null,512),[[st,"插入表格"]])]),_:1},8,["value"]),o.withDirectives(o.createVNode(De,{class:"handler-item",onClick:U[25]||(U[25]=xe=>D.value=!0)},null,512),[[st,"插入公式"]]),o.createVNode(be,{trigger:"click",value:I.value,"onUpdate:value":U[29]||(U[29]=xe=>I.value=xe),offset:10},{content:o.withCtx(()=>[o.createVNode(JA,{onClose:U[26]||(U[26]=xe=>I.value=!1),onInsertVideo:U[27]||(U[27]=xe=>{o.unref(w)(xe),I.value=!1}),onInsertAudio:U[28]||(U[28]=xe=>{o.unref(C)(xe),I.value=!1})})]),default:o.withCtx(()=>[o.withDirectives(o.createVNode(Re,{class:"handler-item"},null,512),[[st,"插入音视频"]])]),_:1},8,["value"]),o.withDirectives(o.createVNode(jn,{class:o.normalizeClass(["handler-item",{active:o.unref(s)}]),onClick:U[30]||(U[30]=xe=>Q())},null,8,["class"]),[[st,"插入符号"]])]),o.createElementVNode("div",LM,[o.withDirectives(o.createVNode($o,{class:"handler-item viewport-size",onClick:U[31]||(U[31]=xe=>o.unref(v)("-"))},null,512),[[st,"画布缩小(Ctrl + -)"]]),o.createVNode(be,{trigger:"click",value:y.value,"onUpdate:value":U[33]||(U[33]=xe=>y.value=xe)},{content:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(g,xe=>o.createVNode(ut,{center:"",key:xe,onClick:ap=>x(xe)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(xe)+"%",1)]),_:2},1032,["onClick"])),64)),o.createVNode(ut,{center:"",onClick:U[32]||(U[32]=xe=>{o.unref(h)(),y.value=!1})},{default:o.withCtx(()=>[...U[45]||(U[45]=[o.createTextVNode("适应屏幕",-1)])]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",AM,o.toDisplayString(o.unref(m)),1)]),_:1},8,["value"]),o.withDirectives(o.createVNode(Oo,{class:"handler-item viewport-size",onClick:U[34]||(U[34]=xe=>o.unref(v)("+"))},null,512),[[st,"画布放大(Ctrl + =)"]]),o.withDirectives(o.createVNode(Xu,{class:"handler-item viewport-size-adaptation",onClick:U[35]||(U[35]=xe=>o.unref(h)())},null,512),[[st,"适应屏幕(Ctrl + 0)"]])]),o.createVNode(Hr,{visible:D.value,"onUpdate:visible":U[38]||(U[38]=xe=>D.value=xe),width:880},{default:o.withCtx(()=>[o.createVNode(J5,{onClose:U[36]||(U[36]=xe=>D.value=!1),onUpdate:U[37]||(U[37]=xe=>{o.unref(k)(xe),D.value=!1})})]),_:1},8,["visible"])])}}},VM=oe(MM,[["__scopeId","data-v-2a5a97ea"]]),PM=()=>{const e=pe(),{slides:t}=te.storeToRefs(e),{addHistorySnapshot:n}=Ee(),{deleteSlide:r}=Po();return{createSection:()=>{e.updateSlide({sectionTag:{id:Te.nanoid(6)}}),n()},removeSection:c=>{if(!c)return;const d=t.value.find(f=>{var v;return((v=f.sectionTag)===null||v===void 0?void 0:v.id)===c});e.removeSlideProps({id:d.id,propName:"sectionTag"}),n()},removeAllSection:()=>{const c=t.value.map(d=>(d.sectionTag&&delete d.sectionTag,d));e.setSlides(c),n()},removeSectionSlides:c=>{let d=0;c&&(d=t.value.findIndex(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===c}));const f=[];for(let v=d;v<t.value.length;v++){const p=t.value[v];if(v!==d&&p.sectionTag)break;f.push(p.id)}r(f)},updateSectionTitle:(c,d)=>{if(d){if(c==="default")e.updateSlide({sectionTag:{id:Te.nanoid(6),title:d}},t.value[0].id);else{const f=t.value.find(v=>{var p;return((p=v.sectionTag)===null||p===void 0?void 0:p.id)===c});if(!f)return;e.updateSlide({sectionTag:{...f.sectionTag,title:d}},f.id)}n()}}}},DM=()=>{const{slides:e}=te.storeToRefs(pe()),t=o.ref(null),n=o.ref(50),r=()=>{e.value.length>n.value?t.value=setTimeout(()=>{n.value=n.value+20,r()},600):n.value=9999};return o.onMounted(r),o.onUnmounted(()=>{t.value&&clearTimeout(t.value)}),{slidesLoadLimit:n}},BM={class:"templates"},RM={class:"catalogs"},$M=["onClick"],OM={class:"content"},FM={class:"header"},zM={class:"types"},HM=["onClick"],GM={key:0,class:"slide-item"},UM={class:"btns"},WM={__name:"Templates",emits:["select","selectAll"],setup(e,{emit:t}){const n=t,r=pe(),{templates:a}=te.storeToRefs(r),i=o.ref([]),l=o.useTemplateRef("listRef"),s=o.ref([{label:"全部",value:"all"},{label:"封面",value:"cover"},{label:"目录",value:"contents"},{label:"过渡",value:"transition"},{label:"内容",value:"content"},{label:"引用",value:"reference"},{label:"结束",value:"end"}]),u=o.ref("all"),c=o.ref(""),d=p=>{n("select",p)},f=p=>{n("selectAll",p)},v=p=>{c.value=p,bo.getFileData(c.value).then(h=>{i.value=h.slides,h.width&&h.height&&(r.setViewportSize(h.width),r.setViewportRatio(h.height/h.width)),l.value&&l.value.scrollTo(0,0)})};return o.onMounted(()=>{v(a.value[0].id)}),(p,h)=>(o.openBlock(),o.createElementBlock("div",BM,[o.createElementVNode("div",RM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a),m=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["catalog",{active:c.value===m.id}]),key:m.id,onClick:g=>v(m.id)},o.toDisplayString(m.name),11,$M))),128))]),o.createElementVNode("div",OM,[o.createElementVNode("div",FM,[o.createElementVNode("div",zM,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,m=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["type",{active:u.value===m.value}]),key:m.value,onClick:g=>u.value=m.value},o.toDisplayString(m.label),11,HM))),128))]),o.createElementVNode("div",{class:"insert-all",onClick:h[0]||(h[0]=m=>f(i.value))},"插入全部")]),o.createElementVNode("div",{class:"list",ref_key:"listRef",ref:l},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,m=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:m.id},[m.type===u.value||u.value==="all"?(o.openBlock(),o.createElementBlock("div",GM,[o.createVNode(Pa,{class:"thumbnail",slide:m,size:180},null,8,["slide"]),o.createElementVNode("div",UM,[o.createVNode(le,{class:"btn",type:"primary",size:"small",onClick:g=>d(m)},{default:o.withCtx(()=>[...h[1]||(h[1]=[o.createTextVNode("插入模板",-1)])]),_:1},8,["onClick"])])])):o.createCommentVNode("",!0)],64))),128))],512)])]))}},YM=oe(WM,[["__scopeId","data-v-32e641b9"]]),XM={class:"add-slide"},qM={class:"select-btn"},ZM={class:"thumbnail-container"},jM=["data-section-id","onDblclick"],JM=["id","value"],KM={key:1,class:"text"},QM={class:"text-content"},eV=["onMousedown"],tV={class:"page-number"},nV={__name:"index",setup(e){const t=ve(),n=pe(),r=on(),{selectedSlidesIndex:a,thumbnailsFocus:i}=te.storeToRefs(t),{slides:l,slideIndex:s,currentSlide:u}=te.storeToRefs(n),{ctrlKeyState:c,shiftKeyState:d}=te.storeToRefs(r),{slidesLoadLimit:f}=DM(),v=o.computed(()=>[...a.value,s.value]),p=o.ref(!1),h=o.computed(()=>l.value.some(K=>K.sectionTag)),{addSlidesFromData:m}=ll(),{copySlide:g,pasteSlide:y,createSlide:x,createSlideByTemplate:b,copyAndPasteSlide:S,deleteSlide:_,cutSlide:k,selectAllSlide:w,sortSlides:C,isEmptySlide:E}=Po(),{createSection:L,removeSection:N,removeAllSection:T,removeSectionSlides:A,updateSectionTitle:I}=PM(),D=o.useTemplateRef("thumbnailsRef");o.watch(()=>s.value,()=>{v.value.length&&t.updateSelectedSlidesIndex([]),o.nextTick(()=>{var K,H;const M=(H=(K=D.value)===null||K===void 0?void 0:K.$el)===null||H===void 0?void 0:H.querySelector(".thumbnail-item.active");D.value&&M&&!J4(M,D.value.$el)&&setTimeout(()=>{M.scrollIntoView({behavior:"smooth"})},100)})},{immediate:!0});const V=K=>{t.setActiveElementIdList([]),s.value!==K&&n.updateSlideIndex(K)},B=(K,H)=>{if(O.value)return;const M=v.value.length>1;if(!(M&&v.value.includes(H)&&K.button!==0))if(c.value)if(s.value===H){if(!M)return;const G=v.value.filter(X=>X!==H);t.updateSelectedSlidesIndex(G),V(v.value[0])}else if(v.value.includes(H)){const G=v.value.filter(X=>X!==H);t.updateSelectedSlidesIndex(G)}else{const G=[...v.value,H];t.updateSelectedSlidesIndex(G)}else if(d.value){if(s.value===H&&!M)return;let G=Math.min(...v.value),X=H;H<G&&(X=Math.max(...v.value),G=H);const j=[];for(let ie=G;ie<=X;ie++)j.push(ie);t.updateSelectedSlidesIndex(j)}else t.updateSelectedSlidesIndex([]),V(H)},R=K=>{i.value!==K&&(t.setThumbnailsFocus(K),K||t.updateSelectedSlidesIndex([]))},F=K=>{const{newIndex:H,oldIndex:M}=K;H===void 0||M===void 0||H===M||C(H,M)},W=()=>{t.setNotesPanelState(!0)},O=o.ref(""),P=K=>{t.setDisableHotkeysState(!0),O.value=K||"default",o.nextTick(()=>{document.querySelector(`#section-title-input-${K||"default"}`).focus()})},$=K=>{const H=K.target.value;I(O.value,H),O.value="",t.setDisableHotkeysState(!1)},z=K=>{E.value?n.setSlides(K):m(K)},Z=K=>{const H=K.dataset.sectionId;return[{text:"删除节",handler:()=>N(H)},{text:"删除节和幻灯片",handler:()=>{t.setActiveElementIdList([]),A(H)}},{text:"删除所有节",handler:T},{text:"重命名节",handler:()=>P(H)}]},{enterScreening:Q,enterScreeningFromStart:J}=lu(),U=()=>[{text:"粘贴",subText:"Ctrl + V",handler:y},{text:"全选",subText:"Ctrl + A",handler:w},{text:"新建页面",subText:"Enter",handler:x},{text:"幻灯片放映",subText:"F5",handler:J}],ne=()=>[{text:"剪切",subText:"Ctrl + X",handler:k},{text:"复制",subText:"Ctrl + C",handler:g},{text:"粘贴",subText:"Ctrl + V",handler:y},{text:"全选",subText:"Ctrl + A",handler:w},{divider:!0},{text:"新建页面",subText:"Enter",handler:x},{text:"复制页面",subText:"Ctrl + D",handler:S},{text:"删除页面",subText:"Delete",handler:()=>_()},{text:"增加节",handler:L,disable:!!u.value.sectionTag},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:Q}];return(K,H)=>{const M=o.resolveComponent("AiPptPlus"),G=o.resolveComponent("AiPptDown"),X=o.resolveDirective("contextmenu"),j=o.resolveDirective("click-outside");return o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"thumbnails",onMousedown:H[8]||(H[8]=()=>R(!0))},[o.createElementVNode("div",XM,[o.createElementVNode("div",{class:"btn",onClick:H[0]||(H[0]=ie=>o.unref(x)())},[o.createVNode(M,{class:"icon"}),H[9]||(H[9]=o.createTextVNode("添加幻灯片 ",-1))]),o.createVNode(be,{trigger:"click",placement:"bottom-start",value:p.value,"onUpdate:value":H[3]||(H[3]=ie=>p.value=ie),center:""},{content:o.withCtx(()=>[o.createVNode(YM,{onSelect:H[1]||(H[1]=ie=>{o.unref(b)(ie),p.value=!1}),onSelectAll:H[2]||(H[2]=ie=>{z(ie),p.value=!1})})]),default:o.withCtx(()=>[o.createElementVNode("div",qM,[o.createVNode(G)])]),_:1},8,["value"])]),o.createVNode(o.unref(Gf),{class:"thumbnail-list",ref_key:"thumbnailsRef",ref:D,modelValue:o.unref(l),animation:200,scroll:!0,scrollSensitivity:50,disabled:O.value,onEnd:F,itemKey:"id"},{item:o.withCtx(({element:ie,index:ue})=>[o.createElementVNode("div",ZM,[ie.sectionTag||h.value&&ue===0?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,class:"section-title","data-section-id":ie?.sectionTag?.id||"",onDblclick:()=>P(ie?.sectionTag?.id||"")},[O.value===ie?.sectionTag?.id||ue===0&&O.value==="default"?(o.openBlock(),o.createElementBlock("input",{key:0,id:`section-title-input-${ie?.sectionTag?.id||"default"}`,type:"text",value:ie?.sectionTag?.title||"",placeholder:"输入节名称",onBlur:H[4]||(H[4]=se=>$(se)),onKeydown:H[5]||(H[5]=o.withKeys(o.withModifiers(se=>$(se),["stop"]),["enter"]))},null,40,JM)):(o.openBlock(),o.createElementBlock("span",KM,[o.createElementVNode("div",QM,o.toDisplayString(ie?.sectionTag?ie?.sectionTag?.title||"无标题节":"默认节"),1)]))],40,jM)),[[X,Z]]):o.createCommentVNode("",!0),o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["thumbnail-item",{active:o.unref(s)===ue,selected:v.value.includes(ue)}]),onMousedown:se=>B(se,ue),onDblclick:H[7]||(H[7]=se=>o.unref(Q)())},[o.createElementVNode("div",{class:o.normalizeClass(["label",{"offset-left":ue>=99}])},o.toDisplayString(o.unref(A4)(ue+1,2)),3),o.createVNode(Pa,{class:"thumbnail",slide:ie,size:120,visible:ue<o.unref(f)},null,8,["slide","visible"]),ie.notes&&ie.notes.length?(o.openBlock(),o.createElementBlock("div",{key:0,class:"note-flag",onClick:H[6]||(H[6]=se=>W())},o.toDisplayString(ie.notes.length),1)):o.createCommentVNode("",!0)],42,eV)),[[X,ne]])])]),_:1},8,["modelValue","disabled"]),o.createElementVNode("div",tV,"幻灯片 "+o.toDisplayString(o.unref(s)+1)+" / "+o.toDisplayString(o.unref(l).length),1)],32)),[[j,()=>R(!1)],[X,U]])}}},rV=oe(nV,[["__scopeId","data-v-4954203e"]]),oV={class:"bar"},aV=["data-tooltip"],iV=["data-tooltip"],lV=["data-tooltip"],sV={__name:"Slider",props:{value:{type:Number,default:0},disabled:{type:Boolean,default:!1},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},range:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=S=>S.getBoundingClientRect().left,r=e,a=t,i=o.useTemplateRef("sliderRef"),l=o.ref(0),s=o.ref(0),u=o.ref(0),c=o.ref("end"),d=S=>{let _=S/100*(r.max-r.min);if(r.step>=1)_=Math.fround(_);else{const k=r.step.toString(),w=k.match(/^[0.]*([1-9])/);if(w){const C=w[1],E=k.indexOf(C)-1;if(E>0){const L=Math.pow(10,E);_=Math.fround(_*L)/L}}}return v4.plus(_,r.min)},f=o.computed(()=>d(l.value)),v=o.computed(()=>d(s.value)),p=o.computed(()=>d(u.value));o.watch(()=>r.value,()=>{r.max!==r.min&&(typeof r.value=="number"?l.value=(r.value-r.min)/(r.max-r.min)*100:(s.value=(r.value[0]-r.min)/(r.max-r.min)*100,u.value=(r.value[1]-r.min)/(r.max-r.min)*100))},{immediate:!0});const h=S=>{if(!i.value)return 0;let k=(("clientX"in S?S.clientX:S.changedTouches[0].clientX)-n(i.value))/i.value.clientWidth;k=Math.max(k,0),k=Math.min(k,1);let w=k*100;const C=r.step/(r.max-r.min)*100,E=w%C;return E>0&&(E<=C/2?w=w-E:w=w-E+C),w},m=S=>{const _=h(S);c.value==="start"?s.value=_:u.value=_},g=S=>{y(S);const _=d(l.value),k=r.value,w=c.value==="start"?[_,k[1]]:[k[0],_];w[0]>w[1]&&([w[0],w[1]]=[w[1],w[0]]),a("update:value",w),document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)},y=S=>{l.value=h(S)},x=S=>{y(S);const _=d(l.value);a("update:value",_),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x)},b=S=>{if(!r.disabled)if(r.range){const _=h(S);Math.abs(_-s.value)<Math.abs(_-u.value)?c.value="start":c.value="end",document.addEventListener("mousemove",m),document.addEventListener("touchmove",m),document.addEventListener("mouseup",g),document.addEventListener("touchend",g)}else document.addEventListener("mousemove",y),document.addEventListener("touchmove",y),document.addEventListener("mouseup",x),document.addEventListener("touchend",x)};return(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["slider",{disabled:e.disabled}]),ref_key:"sliderRef",ref:i,onMousedown:_[0]||(_[0]=k=>b(k))},[o.createElementVNode("div",oV,[e.range?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{class:"track",style:o.normalizeStyle({width:`${u.value-s.value}%`,left:`${s.value}%`})},null,4),o.createElementVNode("div",{class:"thumb",style:o.normalizeStyle({left:`${s.value}%`}),"data-tooltip":v.value},null,12,iV),o.createElementVNode("div",{class:"thumb",style:o.normalizeStyle({left:`${u.value}%`}),"data-tooltip":p.value},null,12,lV)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"track",style:o.normalizeStyle({width:`${l.value}%`})},null,4),o.createElementVNode("div",{class:"thumb",style:o.normalizeStyle({left:`${l.value}%`}),"data-tooltip":f.value},null,12,aV)],64))])],34))}},Wt=oe(sV,[["__scopeId","data-v-1e4f2a9b"]]),uV={class:"element-opacity"},cV={class:"row"},dV={__name:"ElementOpacity",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=o.ref(1);o.watch(n,()=>{n.value&&(r.value="opacity"in n.value&&n.value.opacity!==void 0?n.value.opacity:1)},{deep:!0,immediate:!0});const{addHistorySnapshot:a}=Ee(),i=l=>{if(!n.value)return;const s={opacity:l};t.updateElement({id:n.value.id,props:s}),a()};return(l,s)=>(o.openBlock(),o.createElementBlock("div",uV,[o.createElementVNode("div",cV,[s[1]||(s[1]=o.createElementVNode("div",{style:{width:"40%"}},"不透明度:",-1)),o.createVNode(Wt,{min:0,max:1,step:.1,value:r.value,"onUpdate:value":s[0]||(s[0]=u=>i(u)),style:{width:"60%"}},null,8,["value"])])]))}},K5=oe(dV,[["__scopeId","data-v-d967055b"]]),fV={width:"100%",height:"100%",viewBox:"0 0 100 10"},vV=["x1","x2","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],mn={__name:"SVGLine",props:{width:{type:Number,default:2},color:{type:String,default:"#333"},markers:{type:Array},type:{type:String},padding:{type:Number,default:0}},setup(e){const t=e,n=o.ref("");o.onMounted(()=>{n.value=Te.nanoid()});const r=o.computed(()=>{const a=t.width;return t.type==="dashed"?a<=8?`${a*5} ${a*2.5}`:`${a*5} ${a*1.5}`:t.type==="dotted"?a<=8?`${a*1.8} ${a*1.6}`:`${a*1.5} ${a*1.2}`:"0 0"});return(a,i)=>(o.openBlock(),o.createElementBlock("svg",fV,[o.createElementVNode("defs",null,[e.markers&&e.markers[0]?(o.openBlock(),o.createBlock(Vr,{key:0,id:n.value,position:"start",type:e.markers[0],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):o.createCommentVNode("",!0),e.markers&&e.markers[1]?(o.openBlock(),o.createBlock(Vr,{key:1,id:n.value,position:"end",type:e.markers[1],color:e.color,baseSize:e.width},null,8,["id","type","color","baseSize"])):o.createCommentVNode("",!0)]),o.createElementVNode("line",{x1:e.padding,y1:5,x2:100-e.padding,y2:5,stroke:e.color,"stroke-width":e.width,"stroke-dasharray":r.value,"marker-start":e.markers&&e.markers[0]?`url(#${n.value}-${e.markers[0]}-start)`:"","marker-end":e.markers&&e.markers[1]?`url(#${n.value}-${e.markers[1]}-end)`:""},null,8,vV)]))}},pV={class:"color-block"},hV={__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>{const r=o.resolveComponent("AiPptPlatte");return o.openBlock(),o.createBlock(le,{class:"color-btn"},{default:o.withCtx(()=>[o.createElementVNode("div",pV,[o.createElementVNode("div",{class:"content",style:o.normalizeStyle({backgroundColor:e.color})},null,4)]),o.createVNode(r,{class:"color-btn-icon"})]),_:1})}}},ot=oe(hV,[["__scopeId","data-v-43bbbd6f"]]),mV={__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>{const p=Ne(n.value).toHsv();return n.hue!==-1&&(p.h=n.hue),p}),i=o.computed(()=>`hsl(${a.value.h}, 100%, 50%)`),l=o.computed(()=>-(a.value.v*100)+1+100+"%"),s=o.computed(()=>a.value.s*100+"%"),u=qe.throttle(function(p){r("colorChange",p)},20,{leading:!0,trailing:!1}),c=o.useTemplateRef("saturationRef"),d=p=>{if(p.preventDefault(),!c.value)return;const h=c.value.clientWidth,m=c.value.clientHeight,g=c.value.getBoundingClientRect().left+window.pageXOffset,y=c.value.getBoundingClientRect().top+window.pageYOffset,x=qe.clamp(p.pageX-g,0,h),b=qe.clamp(p.pageY-y,0,m),S=x/h,_=qe.clamp(-(b/m)+1,0,1);u({h:a.value.h,s:S,v:_,a:a.value.a})},f=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)},v=p=>{d(p),window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)};return o.onUnmounted(f),(p,h)=>(o.openBlock(),o.createElementBlock("div",{class:"saturation",ref_key:"saturationRef",ref:c,style:o.normalizeStyle({background:i.value}),onMousedown:h[0]||(h[0]=m=>v(m))},[h[2]||(h[2]=o.createElementVNode("div",{class:"saturation-white"},null,-1)),h[3]||(h[3]=o.createElementVNode("div",{class:"saturation-black"},null,-1)),o.createElementVNode("div",{class:"saturation-pointer",style:o.normalizeStyle({top:l.value,left:s.value})},[...h[1]||(h[1]=[o.createElementVNode("div",{class:"saturation-circle"},null,-1)])],4)],36))}},gV=oe(mV,[["__scopeId","data-v-6bd36a5c"]]),yV={class:"hue"},xV={__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(0),i=o.ref(""),l=o.computed(()=>{const v=Ne(n.value).toHsl();return n.hue!==-1&&(v.h=n.hue),v}),s=o.computed(()=>l.value.h===0&&i.value==="right"?"100%":l.value.h*100/360+"%");o.watch(()=>n.value,()=>{const v=Ne(n.value).toHsl(),p=v.s===0?n.hue:v.h;p!==0&&p-a.value>0&&(i.value="right"),p!==0&&p-a.value<0&&(i.value="left"),a.value=p});const u=o.useTemplateRef("hueRef"),c=v=>{if(v.preventDefault(),!u.value)return;const p=u.value.clientWidth,h=u.value.getBoundingClientRect().left+window.pageXOffset,m=v.pageX-h;let g,y;m<0?g=0:m>p?g=360:(y=m*100/p,g=360*y/100),(n.hue===-1||l.value.h!==g)&&r("colorChange",{h:g,l:l.value.l,s:l.value.s,a:l.value.a})},d=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d)},f=v=>{c(v),window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)};return o.onUnmounted(d),(v,p)=>(o.openBlock(),o.createElementBlock("div",yV,[o.createElementVNode("div",{class:"hue-container",ref_key:"hueRef",ref:u,onMousedown:p[0]||(p[0]=h=>f(h))},[o.createElementVNode("div",{class:"hue-pointer",style:o.normalizeStyle({left:s.value})},[...p[1]||(p[1]=[o.createElementVNode("div",{class:"hue-picker"},null,-1)])],4)],544)]))}},wV=oe(xV,[["__scopeId","data-v-4bd75080"]]),bV={__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup(e){const t=e,n={},r=(l,s,u)=>{const c=document.createElement("canvas");c.width=c.height=u*2;const d=c.getContext("2d");return d?(d.fillStyle=l,d.fillRect(0,0,c.width,c.height),d.fillStyle=s,d.fillRect(0,0,u,u),d.translate(u,u),d.fillRect(0,0,u,u),c.toDataURL()):null},a=(l,s,u)=>{const c=l+","+s+","+u;if(n[c])return n[c];const d=r(l,s,u);return n[c]=d,d},i=o.computed(()=>({backgroundImage:`url(${a(t.white,t.grey,t.size)})`}));return(l,s)=>(o.openBlock(),o.createElementBlock("div",{class:"checkerboard",style:o.normalizeStyle(i.value)},null,4))}},Ff=oe(bV,[["__scopeId","data-v-6ab7f97c"]]),SV={class:"alpha"},_V={class:"alpha-checkboard-wrap"},kV={__name:"Alpha",props:{value:{type:[String,Object],default:"#000000"}},emits:["colorChange"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>n.value),i=o.computed(()=>{const d=[a.value.r,a.value.g,a.value.b].join(",");return`linear-gradient(to right, rgba(${d}, 0) 0%, rgba(${d}, 1) 100%)`}),l=o.useTemplateRef("alphaRef"),s=d=>{if(d.preventDefault(),!l.value)return;const f=l.value.clientWidth,v=l.value.getBoundingClientRect().left+window.pageXOffset,p=d.pageX-v;let h;p<0?h=0:p>f?h=1:h=Math.round(p*100/f)/100,a.value.a!==h&&r("colorChange",{r:a.value.r,g:a.value.g,b:a.value.b,a:h})},u=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",u)},c=d=>{s(d),window.addEventListener("mousemove",s),window.addEventListener("mouseup",u)};return o.onUnmounted(u),(d,f)=>(o.openBlock(),o.createElementBlock("div",SV,[o.createElementVNode("div",_V,[o.createVNode(Ff)]),o.createElementVNode("div",{class:"alpha-gradient",style:o.normalizeStyle({background:i.value})},null,4),o.createElementVNode("div",{class:"alpha-container",ref_key:"alphaRef",ref:l,onMousedown:f[0]||(f[0]=v=>c(v))},[o.createElementVNode("div",{class:"alpha-pointer",style:o.normalizeStyle({left:a.value.a*100+"%"})},[...f[1]||(f[1]=[o.createElementVNode("div",{class:"alpha-picker"},null,-1)])],4)],544)]))}},CV=oe(kV,[["__scopeId","data-v-6cfeb0a4"]]),EV={class:"editable-input"},TV=["value"],NV={__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const n=e,r=t,a=o.computed(()=>{let l="";return n.value.a<1?l=Ne(n.value).toHex8String().toUpperCase():l=Ne(n.value).toHexString().toUpperCase(),l.replace("#","")}),i=l=>{const s=l.target.value;if(s.length>=6){const u=Ne(s);u.isValid()&&r("colorChange",u.toRgb())}};return(l,s)=>(o.openBlock(),o.createElementBlock("div",EV,[o.createElementVNode("input",{class:"input-content",value:a.value,onInput:s[0]||(s[0]=u=>i(u))},null,40,TV)]))}},IV=oe(NV,[["__scopeId","data-v-17acfcdf"]]),LV={class:"color-picker"},AV={class:"picker-saturation-wrap"},MV={class:"picker-controls"},VV={class:"picker-color-wrap"},PV={class:"picker-sliders"},DV={class:"picker-hue-wrap"},BV={class:"picker-alpha-wrap"},RV={class:"picker-field"},$V={class:"picker-presets"},OV=["onClick"],FV={class:"picker-gradient-presets"},zV=["onClick"],HV={class:"picker-presets"},GV=["onClick"],UV={key:0,class:"recent-colors-title"},WV={class:"picker-presets"},YV=["onClick"],o1="RECENT_COLORS",XV={__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,a=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],i=(S,_,k)=>{const w=Ne(S).toRgb(),C=Ne(_).toRgb(),E=(C.r-w.r)/k,L=(C.g-w.g)/k,N=(C.b-w.b)/k,T=[];for(let A=0;A<k;A++){const I=Ne({r:w.r+E*A,g:w.g+L*A,b:w.b+N*A}).toRgbString();T.push(I)}return T},l=()=>{const S=[];for(const _ of a)S.push(i(_[1],_[0],5));return S},s=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],u=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],c=o.ref(-1),d=o.ref([]),f=o.computed({get(){return Ne(n.modelValue).toRgb()},set(S){const _=`rgba(${[S.r,S.g,S.b,S.a].join(",")})`;r("update:modelValue",_)}}),v=l(),p=o.computed(()=>`rgba(${[f.value.r,f.value.g,f.value.b,f.value.a].join(",")})`),h=S=>{c.value=Ne(S).toHsl().h,r("update:modelValue",S)},m=qe.debounce(function(){const S=Ne(f.value).toRgbString();if(!d.value.includes(S)){d.value=[S,...d.value];const _=10;d.value.length>_&&(d.value=d.value.slice(0,_))}},300,{trailing:!0});o.onMounted(()=>{const S=localStorage.getItem(o1);S&&(d.value=JSON.parse(S))}),o.watch(d,()=>{const S=JSON.stringify(d.value);localStorage.setItem(o1,S)});const g=S=>{"h"in S?(c.value=S.h,f.value=Ne(S).toRgb()):(c.value=Ne(S).toHsl().h,f.value=S),m()},y=()=>{"EyeDropper"in window?x():b()},x=()=>{Se.success("按 ESC 键关闭取色吸管",{duration:0}),new window.EyeDropper().open().then(_=>{const k=Ne(_.sRGBHex);c.value=k.toHsl().h,f.value=k.toRgb(),Se.closeAll(),m()}).catch(()=>{Se.closeAll()})},b=()=>{const S=document.querySelector(".canvas");if(!S)return;const _=document.createElement("div");_.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(_);const k=document.createElement("div");k.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",_.appendChild(k);const{left:w,top:C,width:E,height:L}=S.getBoundingClientRect(),N=T=>!(T.tagName&&T.tagName.toUpperCase()==="FOREIGNOBJECT"||T.classList&&T.classList.contains("operate"));wd.toCanvas(S,{filter:N,fontEmbedCSS:"",width:E,height:L,canvasWidth:E,canvasHeight:L,pixelRatio:1}).then(T=>{T.style.cssText=`position: absolute; top: ${C}px; left: ${w}px; cursor: crosshair;`,_.style.cursor="default",_.appendChild(T);const A=T.getContext("2d");if(!A)return;let I="";const D=R=>{const F=R.x,W=R.y,O=F-w,P=W-C,[$,z,Z,Q]=A.getImageData(O,P,1,1).data;I=`rgba(${$}, ${z}, ${Z}, ${(Q/255).toFixed(2)})`,k.style.left=F+10+"px",k.style.top=W+10+"px",k.style.backgroundColor=I},V=()=>{I="",k.style.left="-100px",k.style.top="-100px",k.style.backgroundColor=""},B=R=>{if(I&&R.button===0){const F=Ne(I);c.value=F.toHsl().h,f.value=F.toRgb(),m()}document.body.removeChild(_),T.removeEventListener("mousemove",D),T.removeEventListener("mouseleave",V),window.removeEventListener("mousedown",B)};T.addEventListener("mousemove",D),T.addEventListener("mouseleave",V),window.addEventListener("mousedown",B)}).catch(()=>{Se.error("取色吸管初始化失败"),document.body.removeChild(_)})};return(S,_)=>{const k=o.resolveComponent("AiPptNeedle");return o.openBlock(),o.createElementBlock("div",LV,[o.createElementVNode("div",AV,[o.createVNode(gV,{value:f.value,hue:c.value,onColorChange:_[0]||(_[0]=w=>g(w))},null,8,["value","hue"])]),o.createElementVNode("div",MV,[o.createElementVNode("div",VV,[o.createElementVNode("div",{class:"picker-current-color",style:o.normalizeStyle({background:p.value})},null,4),o.createVNode(Ff)]),o.createElementVNode("div",PV,[o.createElementVNode("div",DV,[o.createVNode(wV,{value:f.value,hue:c.value,onColorChange:_[1]||(_[1]=w=>g(w))},null,8,["value","hue"])]),o.createElementVNode("div",BV,[o.createVNode(CV,{value:f.value,onColorChange:_[2]||(_[2]=w=>g(w))},null,8,["value"])])])]),o.createElementVNode("div",RV,[o.createVNode(IV,{class:"input",value:f.value,onColorChange:_[3]||(_[3]=w=>g(w))},null,8,["value"]),o.createElementVNode("div",{class:"straw",onClick:_[4]||(_[4]=w=>y())},[o.createVNode(k)]),o.createElementVNode("div",{class:"transparent",onClick:_[5]||(_[5]=w=>h("#00000000"))},[o.createVNode(Ff)])]),o.createElementVNode("div",$V,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(s,w=>o.createElementVNode("div",{class:"picker-presets-color",key:w,style:o.normalizeStyle({background:w}),onClick:C=>h(w)},null,12,OV)),64))]),o.createElementVNode("div",FV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(v),(w,C)=>(o.openBlock(),o.createElementBlock("div",{class:"picker-gradient-col",key:C},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w,E=>(o.openBlock(),o.createElementBlock("div",{class:"picker-gradient-color",key:E,style:o.normalizeStyle({background:E}),onClick:L=>h(E)},null,12,zV))),128))]))),128))]),o.createElementVNode("div",HV,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(u,w=>o.createElementVNode("div",{key:w,class:"picker-presets-color",style:o.normalizeStyle({background:w}),onClick:C=>h(w)},null,12,GV)),64))]),d.value.length?(o.openBlock(),o.createElementBlock("div",UV,"最近使用:")):o.createCommentVNode("",!0),o.createElementVNode("div",WV,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,w=>(o.openBlock(),o.createElementBlock("div",{key:w,class:"picker-presets-color alpha",onClick:C=>h(w)},[o.createElementVNode("div",{class:"picker-presets-color-content",style:o.normalizeStyle({background:w})},null,4)],8,YV))),128))])])}}},Ge=oe(XV,[["__scopeId","data-v-f94b5116"]]),qV={__name:"Switch",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,r=t,a=()=>{n.disabled||r("update:value",!n.value)};return(i,l)=>(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(["switch",{active:e.value,disabled:e.disabled}]),onClick:l[0]||(l[0]=s=>a())},[...l[1]||(l[1]=[o.createElementVNode("span",{class:"switch-core"},null,-1)])],2))}},wn=oe(qV,[["__scopeId","data-v-1b809c9b"]]),ZV={key:0,class:"select-wrap"},jV={class:"selector"},JV={class:"icon"},KV={class:"selector"},QV={class:"icon"},eP={__name:"SelectCustom",props:{disabled:{type:Boolean,default:!1}},setup(e){const t=o.ref(!1),n=o.useTemplateRef("selectRef"),r=o.ref(0),a=()=>{n.value&&(r.value=n.value.clientWidth)},i=new ResizeObserver(a);return o.onMounted(()=>{n.value&&i.observe(n.value)}),o.onUnmounted(()=>{n.value&&i.unobserve(n.value)}),(l,s)=>{const u=o.resolveComponent("AiPptDown");return e.disabled?(o.openBlock(),o.createElementBlock("div",ZV,[o.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:n},[o.createElementVNode("div",jV,[o.renderSlot(l.$slots,"label",{},void 0,!0)]),o.createElementVNode("div",JV,[o.renderSlot(l.$slots,"icon",{},()=>[o.createVNode(u,{size:14})],!0)])],512)])):(o.openBlock(),o.createBlock(be,{key:1,class:"select-wrap",trigger:"click",value:t.value,"onUpdate:value":s[1]||(s[1]=c=>t.value=c),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)"}},{content:o.withCtx(()=>[o.createElementVNode("div",{class:"options",style:o.normalizeStyle({width:r.value+2+"px"}),onClick:s[0]||(s[0]=c=>t.value=!1)},[o.renderSlot(l.$slots,"options",{},void 0,!0)],4)]),default:o.withCtx(()=>[o.createElementVNode("div",{class:"select",ref_key:"selectRef",ref:n},[o.createElementVNode("div",KV,[o.renderSlot(l.$slots,"label",{},void 0,!0)]),o.createElementVNode("div",QV,[o.renderSlot(l.$slots,"icon",{},()=>[o.createVNode(u,{size:14})],!0)])],512)]),_:3},8,["value"]))}}},_a=oe(eP,[["__scopeId","data-v-d816ba97"]]),tP={class:"element-outline"},nP={key:0,class:"row"},rP={class:"switch-wrapper",style:{width:"60%"}},oP={class:"row"},aP=["onClick"],iP={class:"row"},lP={class:"row"},sP={__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=pe(),{theme:n}=te.storeToRefs(t),{handleElement:r}=te.storeToRefs(ve()),a=o.ref(),i=o.ref(!1),l=o.ref(["solid","dashed","dotted"]);o.watch(r,()=>{r.value&&(a.value="outline"in r.value?r.value.outline:void 0,i.value=!!a.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:s}=Ee(),u=d=>{if(!r.value)return;const f={outline:{...a.value,...d}};t.updateElement({id:r.value.id,props:f}),s()},c=d=>{if(r.value){if(d){const f=n.value.outline;t.updateElement({id:r.value.id,props:{outline:f}})}else t.removeElementProps({id:r.value.id,propName:"outline"});s()}};return(d,f)=>(o.openBlock(),o.createElementBlock("div",tP,[e.fixed?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",nP,[f[3]||(f[3]=o.createElementVNode("div",{style:{width:"40%"}},"启用边框:",-1)),o.createElementVNode("div",rP,[o.createVNode(wn,{value:i.value,"onUpdate:value":f[0]||(f[0]=v=>c(v))},null,8,["value"])])])),i.value&&a.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",oP,[f[4]||(f[4]=o.createElementVNode("div",{style:{width:"40%"}},"边框样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,v=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:v,onClick:p=>u({style:v})},[o.createVNode(mn,{type:v},null,8,["type"])],8,aP))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{type:a.value.style},null,8,["type"])]),_:1})]),o.createElementVNode("div",iP,[f[5]||(f[5]=o.createElementVNode("div",{style:{width:"40%"}},"边框颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:a.value.color,"onUpdate:modelValue":f[1]||(f[1]=v=>u({color:v}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:a.value.color||"#000"},null,8,["color"])]),_:1})]),o.createElementVNode("div",lP,[f[6]||(f[6]=o.createElementVNode("div",{style:{width:"40%"}},"边框粗细:",-1)),o.createVNode(Ut,{value:a.value.width||0,"onUpdate:value":f[2]||(f[2]=v=>u({width:v})),style:{width:"60%"}},null,8,["value"])])],64)):o.createCommentVNode("",!0)]))}},gl=oe(sP,[["__scopeId","data-v-3ada422a"]]),uP={class:"element-shadow"},cP={class:"row"},dP={class:"switch-wrapper",style:{width:"60%"}},fP={class:"row"},vP={class:"row"},pP={class:"row"},hP={class:"row"},mP={__name:"ElementShadow",setup(e){const t=pe(),{theme:n}=te.storeToRefs(t),{handleElement:r}=te.storeToRefs(ve()),a=o.ref(),i=o.ref(!1);o.watch(r,()=>{r.value&&(a.value="shadow"in r.value?r.value.shadow:void 0,i.value=!!a.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:l}=Ee(),s=c=>{if(!r.value||!a.value)return;const d={...a.value,...c};t.updateElement({id:r.value.id,props:{shadow:d}}),l()},u=c=>{if(r.value){if(c){const d=n.value.shadow;t.updateElement({id:r.value.id,props:{shadow:d}})}else t.removeElementProps({id:r.value.id,propName:"shadow"});l()}};return(c,d)=>(o.openBlock(),o.createElementBlock("div",uP,[o.createElementVNode("div",cP,[d[5]||(d[5]=o.createElementVNode("div",{style:{width:"40%"}},"启用阴影:",-1)),o.createElementVNode("div",dP,[o.createVNode(wn,{value:i.value,"onUpdate:value":d[0]||(d[0]=f=>u(f))},null,8,["value"])])]),i.value&&a.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",fP,[d[6]||(d[6]=o.createElementVNode("div",{style:{width:"40%"}},"水平阴影:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.h,"onUpdate:value":d[1]||(d[1]=f=>s({h:f}))},null,8,["value"])]),o.createElementVNode("div",vP,[d[7]||(d[7]=o.createElementVNode("div",{style:{width:"40%"}},"垂直阴影:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:a.value.v,"onUpdate:value":d[2]||(d[2]=f=>s({v:f}))},null,8,["value"])]),o.createElementVNode("div",pP,[d[8]||(d[8]=o.createElementVNode("div",{style:{width:"40%"}},"模糊距离:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:a.value.blur,"onUpdate:value":d[3]||(d[3]=f=>s({blur:f}))},null,8,["value"])]),o.createElementVNode("div",hP,[d[9]||(d[9]=o.createElementVNode("div",{style:{width:"40%"}},"阴影颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:a.value.color,"onUpdate:modelValue":d[4]||(d[4]=f=>s({color:f}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:a.value.color},null,8,["color"])]),_:1})])],64)):o.createCommentVNode("",!0)]))}},Wu=oe(mP,[["__scopeId","data-v-86085ef0"]]),yl=[{label:"默认字体",value:""},{label:"思源黑体",value:"SourceHanSans"},{label:"思源宋体",value:"SourceHanSerif"},{label:"方正黑体",value:"FangZhengHeiTi"},{label:"方正楷体",value:"FangZhengKaiTi"},{label:"方正宋体",value:"FangZhengShuSong"},{label:"方正仿宋",value:"FangZhengFangSong"},{label:"阿里巴巴普惠体",value:"AlibabaPuHuiTi"},{label:"朱雀仿宋",value:"ZhuQueFangSong"},{label:"霞鹜文楷",value:"LXGWWenKai"},{label:"文鼎PL楷体",value:"WenDingPLKaiTi"},{label:"得意黑",value:"DeYiHei"},{label:"MiSans",value:"MiSans"},{label:"仓耳小丸子",value:"CangerXiaowanzi"},{label:"优设标题黑",value:"YousheTitleBlack"},{label:"峰广明锐体",value:"FengguangMingrui"},{label:"摄图摩登小方体",value:"ShetuModernSquare"},{label:"站酷快乐体",value:"ZcoolHappy"},{label:"字制区喜脉体",value:"ZizhiQuXiMai"},{label:"素材集市康康体",value:"SucaiJishiKangkang"},{label:"素材集市酷方体",value:"SucaiJishiCoolSquare"},{label:"途牛类圆体",value:"TuniuRounded"},{label:"锐字真言体",value:"RuiziZhenyan"}],gP=()=>{const e=ve(),{richTextAttrs:t,textFormatPainter:n}=te.storeToRefs(e);return{toggleTextFormatPainter:(a=!1)=>{n.value?e.setTextFormatPainter(null):e.setTextFormatPainter({keep:a,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})}}},yP={class:"text-color-block"},xP={__name:"TextColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,n)=>(o.openBlock(),o.createBlock(le,{class:"text-color-btn"},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"default",{},void 0,!0),o.createElementVNode("div",yP,[o.createElementVNode("div",{class:"text-color-block-content",style:o.normalizeStyle({backgroundColor:e.color})},null,4)])]),_:3}))}},Da=oe(xP,[["__scopeId","data-v-2ae52e70"]]),pt={__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(o.openBlock(),o.createBlock(le,{checked:e.checked,disabled:e.disabled,type:"checkbox"},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"default")]),_:3},8,["checked","disabled"]))}},wP={__name:"ButtonGroup",props:{passive:{type:Boolean,default:!1}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["button-group",{passive:e.passive}]),ref:"groupRef"},[o.renderSlot(t.$slots,"default",{},void 0,!0)],2))}},rt=oe(wP,[["__scopeId","data-v-b6e2dfa5"]]),bP={},SP={class:"select-group"};function _P(e,t){return o.openBlock(),o.createElementBlock("div",SP,[o.renderSlot(e.$slots,"default",{},void 0,!0)])}const op=oe(bP,[["render",_P],["__scopeId","data-v-e80d73f2"]]),Ze={__name:"RadioButton",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},setup(e){const{value:t,updateValue:n}=o.inject(R1);return(r,a)=>(o.openBlock(),o.createBlock(le,{checked:!e.disabled&&o.unref(t)===e.value,disabled:e.disabled,type:"radio",onClick:a[0]||(a[0]=i=>!e.disabled&&o.unref(n)(e.value))},{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},8,["checked","disabled"]))}},ir={__name:"RadioGroup",props:{value:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,r=t,a=l=>{n.disabled||r("update:value",l)},i=o.computed(()=>n.value);return o.provide(R1,{value:i,updateValue:a}),(l,s)=>(o.openBlock(),o.createBlock(rt,{class:"radio-group"},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3}))}},kP={class:"rich-text-base"},CP={class:"link-popover"},EP={class:"btns"},TP={class:"row",passive:""},NP={class:"list-wrap"},IP=["onClick"],LP={class:"list-wrap"},AP=["onClick"],MP={class:"row"},VP={__name:"RichTextBase",setup(e){const{handleElement:t,handleElementId:n,richTextAttrs:r,textFormatPainter:a}=te.storeToRefs(ve()),{toggleTextFormatPainter:i}=gP(),l=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],s=(k,w)=>{Tt.emit(mt.RICH_TEXT_COMMAND,{action:{command:k,value:w}})},u=o.ref(!1),c=o.ref(!1),d=o.ref(!1),f=o.ref(!1),v=o.ref(["disc","circle","square"]),p=o.ref(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),h=o.ref(""),m=o.ref(!1),g=o.ref(!1),y=o.ref(!1);o.watch(r,()=>m.value=!1),o.watch(n,()=>{y.value&&(y.value=!1)});const x=()=>{h.value=r.value.link},b=k=>{if(!k||!/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/.test(k))return Se.error("不是正确的网页链接地址");s("link",k),m.value=!1},S=()=>{s("link"),m.value=!1},_=async k=>{if(g.value=!1,!t.value)return;let w="";if(t.value.type==="text"&&t.value.content&&(w=t.value.content),t.value.type==="shape"&&t.value.text&&t.value.text.content&&(w=t.value.text.content),!w)return Se.error("没有可以执行的文本内容");let C="";const E=await bo.AI_Writing({content:V4(w),command:k});y.value=!0;const L=E.body.getReader(),N=new TextDecoder("utf-8"),T=()=>{L.read().then(({done:A,value:I})=>{if(!y.value)return;if(A){y.value=!1;return}const D=N.decode(I,{stream:!0});C+=D,s("replace",C),T()})};T()};return(k,w)=>{const C=o.resolveComponent("AiPptFontSize"),E=o.resolveComponent("AiPptAddText"),L=o.resolveComponent("AiPptText"),N=o.resolveComponent("AiPptHighLight"),T=o.resolveComponent("AiPptTextBold"),A=o.resolveComponent("AiPptTextItalic"),I=o.resolveComponent("AiPptTextUnderline"),D=o.resolveComponent("AiPptStrikethrough"),V=o.resolveComponent("AiPptCode"),B=o.resolveComponent("AiPptQuote"),R=o.resolveComponent("AiPptFormat"),F=o.resolveComponent("AiPptFormatBrush"),W=o.resolveComponent("AiPptLinkOne"),O=o.resolveComponent("AiPptAlignTextLeft"),P=o.resolveComponent("AiPptAlignTextCenter"),$=o.resolveComponent("AiPptAlignTextRight"),z=o.resolveComponent("AiPptAlignTextBoth"),Z=o.resolveComponent("AiPptList"),Q=o.resolveComponent("AiPptDown"),J=o.resolveComponent("AiPptOrderedList"),U=o.resolveComponent("AiPptIndentLeft"),ne=o.resolveComponent("AiPptIndentRight"),K=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",kP,[o.createVNode(op,{class:"row"},{default:o.withCtx(()=>[o.createVNode(at,{style:{width:"60%"},value:o.unref(r).fontname,search:"",searchLabel:"搜索字体","onUpdate:value":w[0]||(w[0]=H=>s("fontname",H)),options:o.unref(yl)},{icon:o.withCtx(()=>[o.createVNode(C)]),_:1},8,["value","options"]),o.createVNode(at,{style:{width:"40%"},value:o.unref(r).fontsize,search:"",searchLabel:"搜索字号","onUpdate:value":w[1]||(w[1]=H=>s("fontsize",H)),options:l.map(H=>({label:H,value:H}))},{icon:o.withCtx(()=>[o.createVNode(E)]),_:1},8,["value","options"])]),_:1}),o.createVNode(rt,{class:"row",passive:""},{default:o.withCtx(()=>[o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(r).color,"onUpdate:modelValue":w[2]||(w[2]=H=>s("color",H))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{first:"",color:o.unref(r).color},{default:o.withCtx(()=>[o.createVNode(L)]),_:1},8,["color"])),[[K,"文字颜色"]])]),_:1}),o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(r).backcolor,"onUpdate:modelValue":w[3]||(w[3]=H=>s("backcolor",H))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{color:o.unref(r).backcolor},{default:o.withCtx(()=>[o.createVNode(N)]),_:1},8,["color"])),[[K,"文字高亮"]])]),_:1}),o.withDirectives((o.openBlock(),o.createBlock(le,{class:"font-size-btn",style:{width:"20%"},onClick:w[4]||(w[4]=H=>s("fontsize-add"))},{default:o.withCtx(()=>[o.createVNode(C),w[37]||(w[37]=o.createTextVNode("+ ",-1))]),_:1})),[[K,"增大字号"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:w[5]||(w[5]=H=>s("fontsize-reduce"))},{default:o.withCtx(()=>[o.createVNode(C),w[38]||(w[38]=o.createTextVNode("- ",-1))]),_:1})),[[K,"减小字号"]])]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).bold,onClick:w[6]||(w[6]=H=>s("bold"))},{default:o.withCtx(()=>[o.createVNode(T)]),_:1},8,["checked"])),[[K,"加粗"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).em,onClick:w[7]||(w[7]=H=>s("em"))},{default:o.withCtx(()=>[o.createVNode(A)]),_:1},8,["checked"])),[[K,"斜体"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).underline,onClick:w[8]||(w[8]=H=>s("underline"))},{default:o.withCtx(()=>[o.createVNode(I)]),_:1},8,["checked"])),[[K,"下划线"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).strikethrough,onClick:w[9]||(w[9]=H=>s("strikethrough"))},{default:o.withCtx(()=>[o.createVNode(D)]),_:1},8,["checked"])),[[K,"删除线"]])]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).superscript,onClick:w[10]||(w[10]=H=>s("superscript"))},{default:o.withCtx(()=>[...w[39]||(w[39]=[o.createTextVNode("A²",-1)])]),_:1},8,["checked"])),[[K,"上标"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).subscript,onClick:w[11]||(w[11]=H=>s("subscript"))},{default:o.withCtx(()=>[...w[40]||(w[40]=[o.createTextVNode("A₂",-1)])]),_:1},8,["checked"])),[[K,"下标"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).code,onClick:w[12]||(w[12]=H=>s("code"))},{default:o.withCtx(()=>[o.createVNode(V)]),_:1},8,["checked"])),[[K,"行内代码"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:o.unref(r).blockquote,onClick:w[13]||(w[13]=H=>s("blockquote"))},{default:o.withCtx(()=>[o.createVNode(B)]),_:1},8,["checked"])),[[K,"引用"]])]),_:1}),o.createVNode(rt,{class:"row",passive:""},{default:o.withCtx(()=>[o.createVNode(be,{trigger:"click",value:g.value,"onUpdate:value":w[17]||(w[17]=H=>g.value=H),style:{width:"25%"}},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:w[14]||(w[14]=H=>_("美化改写"))},{default:o.withCtx(()=>[...w[41]||(w[41]=[o.createTextVNode("美化",-1)])]),_:1}),o.createVNode(ut,{center:"",onClick:w[15]||(w[15]=H=>_("扩写丰富"))},{default:o.withCtx(()=>[...w[42]||(w[42]=[o.createTextVNode("扩写",-1)])]),_:1}),o.createVNode(ut,{center:"",onClick:w[16]||(w[16]=H=>_("精简提炼"))},{default:o.withCtx(()=>[...w[43]||(w[43]=[o.createTextVNode("精简",-1)])]),_:1})]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(pt,{first:"",style:{width:"100%"}},{default:o.withCtx(()=>[o.createElementVNode("span",{class:o.normalizeClass({"ai-loading":y.value})},o.toDisplayString(y.value?"":"AI"),3)]),_:1})),[[K,"AI辅助"]])]),_:1},8,["value"]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},onClick:w[18]||(w[18]=H=>s("clear"))},{default:o.withCtx(()=>[o.createVNode(R)]),_:1})),[[K,"清除格式"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:!!o.unref(a),onClick:w[19]||(w[19]=H=>o.unref(i)()),onDblclick:w[20]||(w[20]=H=>o.unref(i)(!0))},{default:o.withCtx(()=>[o.createVNode(F)]),_:1},8,["checked"])),[[K,"格式刷(双击连续使用)"]]),o.createVNode(be,{placement:"bottom-end",trigger:"click",value:m.value,"onUpdate:value":w[25]||(w[25]=H=>m.value=H),style:{width:"25%"}},{content:o.withCtx(()=>[o.createElementVNode("div",CP,[o.createVNode(Mr,{value:h.value,"onUpdate:value":w[21]||(w[21]=H=>h.value=H),placeholder:"请输入超链接"},null,8,["value"]),o.createElementVNode("div",EP,[o.createVNode(le,{size:"small",disabled:!o.unref(r).link,onClick:w[22]||(w[22]=H=>S()),style:{"margin-right":"5px"}},{default:o.withCtx(()=>[...w[44]||(w[44]=[o.createTextVNode("移除",-1)])]),_:1},8,["disabled"]),o.createVNode(le,{size:"small",type:"primary",onClick:w[23]||(w[23]=H=>b(h.value))},{default:o.withCtx(()=>[...w[45]||(w[45]=[o.createTextVNode("确认",-1)])]),_:1})])])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(pt,{last:"",style:{width:"100%"},checked:!!o.unref(r).link,onClick:w[24]||(w[24]=H=>x())},{default:o.withCtx(()=>[o.createVNode(W)]),_:1},8,["checked"])),[[K,"超链接"]])]),_:1},8,["value"])]),_:1}),o.createVNode(Ie),o.createVNode(ir,{class:"row","button-style":"solid",value:o.unref(r).align,"onUpdate:value":w[26]||(w[26]=H=>s("align",H))},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"left",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(O)]),_:1})),[[K,"左对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"center",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(P)]),_:1})),[[K,"居中"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"right",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode($)]),_:1})),[[K,"右对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"justify",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(z)]),_:1})),[[K,"两端对齐"]])]),_:1},8,["value"]),o.createElementVNode("div",TP,[o.createVNode(rt,{style:{flex:"1"},passive:""},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{first:"",type:o.unref(r).bulletList?"primary":"default",style:{flex:"1"},onClick:w[27]||(w[27]=H=>s("bulletList"))},{default:o.withCtx(()=>[o.createVNode(Z)]),_:1},8,["type"])),[[K,"项目符号"]]),o.createVNode(be,{trigger:"click",value:u.value,"onUpdate:value":w[28]||(w[28]=H=>u.value=H)},{content:o.withCtx(()=>[o.createElementVNode("div",NP,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,H=>(o.openBlock(),o.createElementBlock("ul",{class:"list",key:H,style:o.normalizeStyle({listStyleType:H}),onClick:M=>s("bulletList",H)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,M=>o.createElementVNode("li",{class:"list-item",key:M},[...w[46]||(w[46]=[o.createElementVNode("span",null,null,-1)])])),64))],12,IP))),128))])]),default:o.withCtx(()=>[o.createVNode(le,{last:"",class:"popover-btn"},{default:o.withCtx(()=>[o.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),w[48]||(w[48]=o.createElementVNode("div",{style:{width:"10px"}},null,-1)),o.createVNode(rt,{style:{flex:"1"},passive:""},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{first:"",type:o.unref(r).orderedList?"primary":"default",style:{flex:"1"},onClick:w[29]||(w[29]=H=>s("orderedList"))},{default:o.withCtx(()=>[o.createVNode(J)]),_:1},8,["type"])),[[K,"编号"]]),o.createVNode(be,{trigger:"click",value:c.value,"onUpdate:value":w[30]||(w[30]=H=>c.value=H)},{content:o.withCtx(()=>[o.createElementVNode("div",LP,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.value,H=>(o.openBlock(),o.createElementBlock("ul",{class:"list",key:H,style:o.normalizeStyle({listStyleType:H}),onClick:M=>s("orderedList",H)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,M=>o.createElementVNode("li",{class:"list-item",key:M},[...w[47]||(w[47]=[o.createElementVNode("span",null,null,-1)])])),64))],12,AP))),128))])]),default:o.withCtx(()=>[o.createVNode(le,{last:"",class:"popover-btn"},{default:o.withCtx(()=>[o.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})]),o.createElementVNode("div",MP,[o.createVNode(rt,{style:{flex:"1"},passive:""},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{first:"",style:{flex:"1"},onClick:w[31]||(w[31]=H=>s("indent","-1"))},{default:o.withCtx(()=>[o.createVNode(U)]),_:1})),[[K,"减小段落缩进"]]),o.createVNode(be,{trigger:"click",value:d.value,"onUpdate:value":w[33]||(w[33]=H=>d.value=H)},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:w[32]||(w[32]=H=>s("textIndent","-1"))},{default:o.withCtx(()=>[...w[49]||(w[49]=[o.createTextVNode("减小首行缩进",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(le,{last:"",class:"popover-btn"},{default:o.withCtx(()=>[o.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1}),w[51]||(w[51]=o.createElementVNode("div",{style:{width:"10px"}},null,-1)),o.createVNode(rt,{style:{flex:"1"},passive:""},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{first:"",style:{flex:"1"},onClick:w[34]||(w[34]=H=>s("indent","+1"))},{default:o.withCtx(()=>[o.createVNode(ne)]),_:1})),[[K,"增大段落缩进"]]),o.createVNode(be,{trigger:"click",value:f.value,"onUpdate:value":w[36]||(w[36]=H=>f.value=H)},{content:o.withCtx(()=>[o.createVNode(ut,{center:"",onClick:w[35]||(w[35]=H=>s("textIndent","+1"))},{default:o.withCtx(()=>[...w[50]||(w[50]=[o.createTextVNode("增大首行缩进",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(le,{last:"",class:"popover-btn"},{default:o.withCtx(()=>[o.createVNode(Q)]),_:1})]),_:1},8,["value"])]),_:1})])])}}},Q5=oe(VP,[["__scopeId","data-v-5fe5ca91"]]),PP={class:"text-style-panel"},DP={class:"preset-style"},BP=["onClick"],RP={class:"row"},$P={class:"row"},OP={class:"row"},FP={class:"row"},zP={__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"}]}],n=ve(),r=pe(),{handleElement:a,handleElementId:i}=te.storeToRefs(n),{addHistorySnapshot:l}=Ee(),s=S=>{r.updateElement({id:i.value,props:S}),l()},u=o.ref("#000"),c=o.ref(),d=o.ref(),f=o.ref();o.watch(a,()=>{!a.value||a.value.type!=="text"||(u.value=a.value.fill||"#fff",c.value=a.value.lineHeight||1.5,d.value=a.value.wordSpace||0,f.value=a.value.paragraphSpace===void 0?5:a.value.paragraphSpace,Tt.emit(mt.SYNC_RICH_TEXT_ATTRS_TO_STORE))},{deep:!0,immediate:!0});const v=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],p=[0,1,2,3,4,5,6,8,10],h=[0,5,10,15,20,25,30,40,50,80],m=S=>{s({lineHeight:S})},g=S=>{s({paragraphSpace:S})},y=S=>{s({wordSpace:S})},x=S=>{s({fill:S})},b=S=>{Tt.emit(mt.RICH_TEXT_COMMAND,{action:S})};return(S,_)=>{const k=o.resolveComponent("AiPptRowHeight"),w=o.resolveComponent("AiPptVerticalSpacingBetweenItems"),C=o.resolveComponent("AiPptFullwidth");return o.openBlock(),o.createElementBlock("div",PP,[o.createElementVNode("div",DP,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,E=>o.createElementVNode("div",{class:"preset-style-item",key:E.label,style:o.normalizeStyle(E.style),onClick:L=>b(E.cmd)},o.toDisplayString(E.label),13,BP)),64))]),o.createVNode(Ie),o.createVNode(Q5),o.createVNode(Ie),o.createElementVNode("div",RP,[_[4]||(_[4]=o.createElementVNode("div",{style:{width:"40%"}},"行间距:",-1)),o.createVNode(at,{style:{width:"60%"},value:c.value||1,"onUpdate:value":_[0]||(_[0]=E=>m(E)),options:v.map(E=>({label:E+"倍",value:E}))},{icon:o.withCtx(()=>[o.createVNode(k)]),_:1},8,["value","options"])]),o.createElementVNode("div",$P,[_[5]||(_[5]=o.createElementVNode("div",{style:{width:"40%"}},"段间距:",-1)),o.createVNode(at,{style:{width:"60%"},value:f.value||0,"onUpdate:value":_[1]||(_[1]=E=>g(E)),options:h.map(E=>({label:E+"px",value:E}))},{icon:o.withCtx(()=>[o.createVNode(w)]),_:1},8,["value","options"])]),o.createElementVNode("div",OP,[_[6]||(_[6]=o.createElementVNode("div",{style:{width:"40%"}},"字间距:",-1)),o.createVNode(at,{style:{width:"60%"},value:d.value||0,"onUpdate:value":_[2]||(_[2]=E=>y(E)),options:p.map(E=>({label:E+"px",value:E}))},{icon:o.withCtx(()=>[o.createVNode(C)]),_:1},8,["value","options"])]),o.createElementVNode("div",FP,[_[7]||(_[7]=o.createElementVNode("div",{style:{width:"40%"}},"文本框填充:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:u.value,"onUpdate:modelValue":_[3]||(_[3]=E=>x(E))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:u.value},null,8,["color"])]),_:1})]),o.createVNode(Ie),o.createVNode(gl),o.createVNode(Ie),o.createVNode(Wu),o.createVNode(Ie),o.createVNode(K5)])}}},HP=oe(zP,[["__scopeId","data-v-9aff4261"]]),GP={class:"element-flip"},UP={__name:"ElementFlip",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=o.ref(!1),a=o.ref(!1);o.watch(n,()=>{n.value&&(n.value.type==="image"||n.value.type==="shape")&&(r.value=!!n.value.flipH,a.value=!!n.value.flipV)},{deep:!0,immediate:!0});const{addHistorySnapshot:i}=Ee(),l=s=>{n.value&&(t.updateElement({id:n.value.id,props:s}),i())};return(s,u)=>{const c=o.resolveComponent("AiPptFlipVertically"),d=o.resolveComponent("AiPptFlipHorizontally");return o.openBlock(),o.createElementBlock("div",GP,[o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.createVNode(pt,{style:{flex:"1"},checked:a.value,onClick:u[0]||(u[0]=f=>l({flipV:!a.value}))},{default:o.withCtx(()=>[o.createVNode(c),u[2]||(u[2]=o.createTextVNode(" 垂直翻转 ",-1))]),_:1},8,["checked"]),o.createVNode(pt,{style:{flex:"1"},checked:r.value,onClick:u[1]||(u[1]=f=>l({flipH:!r.value}))},{default:o.withCtx(()=>[o.createVNode(d),u[3]||(u[3]=o.createTextVNode(" 水平翻转 ",-1))]),_:1},8,["checked"])]),_:1})])}}},e4=oe(UP,[["__scopeId","data-v-79c75c36"]]),WP={class:"element-filter"},YP={class:"row"},XP={class:"switch-wrapper",style:{flex:"3"}},qP={class:"presets"},ZP=["onClick"],jP=["src"],JP={class:"preset-label"},KP={class:"filter"},QP={class:"name"},eD={__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:"sepia",default:0,value:0,unit:"%",max:100,step:5},{label:"反转",key:"invert",default:0,value:0,unit:"%",max:100,step:5},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],n=[{label:"黑白",values:{grayscale:"100%"}},{label:"复古",values:{sepia:"50%",contrast:"110%",brightness:"90%"}},{label:"锐化",values:{contrast:"150%"}},{label:"柔和",values:{brightness:"110%",contrast:"90%"}},{label:"暖色",values:{sepia:"30%",saturate:"135%"}},{label:"明亮",values:{brightness:"110%",contrast:"110%"}},{label:"鲜艳",values:{saturate:"200%"}},{label:"模糊",values:{blur:"2px"}},{label:"反转",values:{invert:"100%"}}],r=pe(),{handleElement:a,handleElementId:i}=te.storeToRefs(ve()),l=a,s=o.ref(JSON.parse(JSON.stringify(t))),u=o.ref(!1),{addHistorySnapshot:c}=Ee();o.watch(a,()=>{if(!a.value||a.value.type!=="image")return;const h=a.value.filters;h?(s.value=t.map(m=>{const g=h[m.key];return g?{...m,value:parseInt(g)}:m}),u.value=!0):(s.value=JSON.parse(JSON.stringify(t)),u.value=!1)},{deep:!0,immediate:!0});const d=h=>{let m="";const g=Object.keys(h);for(const y of g)m+=`${y}(${h[y]}) `;return m},f=(h,m)=>{const x={...a.value.filters||{},[h.key]:`${m}${h.unit}`};r.updateElement({id:i.value,props:{filters:x}}),c()},v=h=>{a.value&&(h?r.updateElement({id:a.value.id,props:{filters:{}}}):r.removeElementProps({id:a.value.id,propName:"filters"}),c())},p=h=>{r.updateElement({id:i.value,props:{filters:h}}),c()};return(h,m)=>(o.openBlock(),o.createElementBlock("div",WP,[o.createElementVNode("div",YP,[m[1]||(m[1]=o.createElementVNode("div",{style:{flex:"2"}},"启用滤镜:",-1)),o.createElementVNode("div",XP,[o.createVNode(wn,{value:u.value,"onUpdate:value":m[0]||(m[0]=g=>v(g))},null,8,["value"])])]),u.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",qP,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(n,(g,y)=>o.createElementVNode("div",{class:"preset-item",key:y,onClick:x=>p(g.values)},[o.createElementVNode("img",{src:o.unref(l).src,alt:"",style:o.normalizeStyle({filter:d(g.values)})},null,12,jP),o.createElementVNode("span",JP,o.toDisplayString(g.label),1)],8,ZP)),64))]),o.createElementVNode("div",KP,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,g=>(o.openBlock(),o.createElementBlock("div",{class:"filter-item",key:g.key},[o.createElementVNode("div",QP,o.toDisplayString(g.label),1),o.createVNode(Wt,{class:"filter-slider",max:g.max,min:0,step:g.step,value:g.value,"onUpdate:value":y=>f(g,y)},null,8,["max","step","value","onUpdate:value"])]))),128))])],64)):o.createCommentVNode("",!0)]))}},tD=oe(eD,[["__scopeId","data-v-4ce453c2"]]),nD={class:"element-color-mask"},rD={class:"row"},oD={class:"switch-wrapper",style:{width:"60%"}},aD={key:0,class:"row",style:{"margin-top":"15px"}},iD={__name:"ElementColorMask",setup(e){const t=pe(),{handleElement:n,handleElementId:r}=te.storeToRefs(ve()),{theme:a}=te.storeToRefs(t),{addHistorySnapshot:i}=Ee(),l=o.computed(()=>{const f=a.value.themeColors[0];return Ne(f).setAlpha(.5).toRgbString()}),s=o.ref(""),u=o.ref(!1);o.watch(n,()=>{!n.value||n.value.type!=="image"||(n.value.colorMask?(s.value=n.value.colorMask,u.value=!0):u.value=!1)},{deep:!0,immediate:!0});const c=f=>{n.value&&(f?t.updateElement({id:n.value.id,props:{colorMask:l.value}}):t.removeElementProps({id:n.value.id,propName:"colorMask"}),i())},d=f=>{t.updateElement({id:r.value,props:{colorMask:f}}),i()};return(f,v)=>(o.openBlock(),o.createElementBlock("div",nD,[o.createElementVNode("div",rD,[v[2]||(v[2]=o.createElementVNode("div",{style:{width:"40%"}},"着色(蒙版):",-1)),o.createElementVNode("div",oD,[o.createVNode(wn,{value:u.value,"onUpdate:value":v[0]||(v[0]=p=>c(p))},null,8,["value"])])]),u.value?(o.openBlock(),o.createElementBlock("div",aD,[v[3]||(v[3]=o.createElementVNode("div",{style:{width:"40%"}},"蒙版颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:s.value,"onUpdate:modelValue":v[1]||(v[1]=p=>d(p))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:s.value},null,8,["color"])]),_:1})])):o.createCommentVNode("",!0)]))}},lD=oe(iD,[["__scopeId","data-v-78c1631b"]]),sD={class:"image-style-panel"},uD={class:"clip"},cD={class:"shape-clip"},dD=["onClick"],fD={key:0,class:"title"},vD={class:"row"},pD={__name:"ImageStylePanel",setup(e){const t=Ad,n=[{label:"纵横比(正方形)",children:[{key:"1:1",ratio:1/1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:3/2},{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:3/5},{key:"5:4",ratio:4/5}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:10/16}]}],r=ve(),a=pe(),{handleElement:i,handleElementId:l}=te.storeToRefs(r),{currentSlide:s}=te.storeToRefs(a),u=i,c=o.ref(!1),{addHistorySnapshot:d}=Ee(),f=()=>{r.setClipingImageElementId(l.value),c.value=!1},v=()=>{const x=i.value,b=x.width,S=x.height,_=x.left,k=x.top,w=x.clip?x.clip.range:[[0,0],[100,100]],C=b/((w[1][0]-w[0][0])/100),E=S/((w[1][1]-w[0][1])/100),L=_-C*(w[0][0]/100),N=k-E*(w[0][1]/100);return{originClipRange:w,originWidth:C,originHeight:E,originLeft:L,originTop:N}},p=x=>{i.value&&(a.updateElement({id:l.value,props:x}),d())},h=(x,b=0)=>{const S=i.value,{originClipRange:_,originWidth:k,originHeight:w,originLeft:C,originTop:E}=v();if(b){const L=w/k,N=0,T=100;let A;if(L>b){const I=(1-b/L)/2*100;A=[[N,I],[T,T-I]]}else{const I=(1-L/b)/2*100;A=[[I,N],[T-I,T]]}p({clip:{...S.clip,shape:x,range:A},left:C+k*(A[0][0]/100),top:E+w*(A[0][1]/100),width:k*(A[1][0]-A[0][0])/100,height:w*(A[1][1]-A[0][1])/100})}else{const L={...S.clip,shape:x,range:_};let N={clip:L};x==="rect"&&(N={clip:L,radius:0}),p(N)}f()},m=x=>{const b=x[0];b&&Gr(b).then(S=>{const _=u.value.width,k=u.value.height,w=u.value.left,C=u.value.top,E=w+_/2,L=C+k/2;N1(S).then(({width:N,height:T})=>{const A=k,I=N*(k/T),D=E-I/2,V=L-A/2;a.removeElementProps({id:l.value,propName:"clip"}),p({src:S,width:I,height:A,left:D,top:V})})})},g=()=>{if(i.value.clip){const{originWidth:b,originHeight:S,originLeft:_,originTop:k}=v();p({left:_,top:k,width:b,height:S})}a.removeElementProps({id:l.value,propName:["clip","outline","flip","shadow","filters","colorMask","radius"]}),d()},y=()=>{const x=i.value,b={...s.value.background,type:"image",image:{src:x.src,size:"cover"}};a.updateSlide({background:b}),d()};return(x,b)=>{const S=o.resolveComponent("AiPptTailoring"),_=o.resolveComponent("AiPptDown"),k=o.resolveComponent("AiPptTransform"),w=o.resolveComponent("AiPptUndo"),C=o.resolveComponent("AiPptTheme");return o.openBlock(),o.createElementBlock("div",sD,[o.createElementVNode("div",{class:"origin-image",style:o.normalizeStyle({backgroundImage:`url(${o.unref(u).src})`})},null,4),o.createVNode(e4),o.createVNode(rt,{class:"row",passive:""},{default:o.withCtx(()=>[o.createVNode(le,{first:"",style:{width:"calc(100% / 6 * 5)"},onClick:b[0]||(b[0]=E=>f())},{default:o.withCtx(()=>[o.createVNode(S),b[6]||(b[6]=o.createTextVNode(" 裁剪图片 ",-1))]),_:1}),o.createVNode(be,{trigger:"click",value:c.value,"onUpdate:value":b[1]||(b[1]=E=>c.value=E),style:{width:"calc(100% / 6)"}},{content:o.withCtx(()=>[o.createElementVNode("div",uD,[b[7]||(b[7]=o.createElementVNode("div",{class:"title"},"按形状:",-1)),o.createElementVNode("div",cD,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(t),(E,L)=>(o.openBlock(),o.createElementBlock("div",{class:"shape-clip-item",key:L,onClick:N=>h(L)},[o.createElementVNode("div",{class:"shape",style:o.normalizeStyle({clipPath:E.style})},null,4)],8,dD))),128))]),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(n,E=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:E.label},[E.label?(o.openBlock(),o.createElementBlock("div",fD,"按"+o.toDisplayString(E.label)+":",1)):o.createCommentVNode("",!0),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(E.children,L=>(o.openBlock(),o.createBlock(le,{style:{flex:"1"},key:L.key,onClick:N=>h("rect",L.ratio)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(L.key),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)],64))),64))])]),default:o.withCtx(()=>[o.createVNode(le,{last:"",class:"popover-btn",style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(_)]),_:1})]),_:1},8,["value"])]),_:1}),o.createElementVNode("div",vD,[b[8]||(b[8]=o.createElementVNode("div",{style:{width:"40%"}},"圆角半径:",-1)),o.createVNode(Ut,{value:o.unref(u).radius||0,"onUpdate:value":b[2]||(b[2]=E=>p({radius:E})),style:{width:"60%"}},null,8,["value"])]),o.createVNode(Ie),o.createVNode(lD),o.createVNode(Ie),o.createVNode(tD),o.createVNode(Ie),o.createVNode(gl),o.createVNode(Ie),o.createVNode(Wu),o.createVNode(Ie),o.createVNode(ul,{onChange:b[3]||(b[3]=E=>m(E))},{default:o.withCtx(()=>[o.createVNode(le,{class:"full-width-btn"},{default:o.withCtx(()=>[o.createVNode(k),b[9]||(b[9]=o.createTextVNode(" 替换图片 ",-1))]),_:1})]),_:1}),o.createVNode(le,{class:"full-width-btn",onClick:b[4]||(b[4]=E=>g())},{default:o.withCtx(()=>[o.createVNode(w),b[10]||(b[10]=o.createTextVNode(" 重置样式 ",-1))]),_:1}),o.createVNode(le,{class:"full-width-btn",onClick:b[5]||(b[5]=E=>y())},{default:o.withCtx(()=>[o.createVNode(C),b[11]||(b[11]=o.createTextVNode(" 设为背景 ",-1))]),_:1})])}}},hD=oe(pD,[["__scopeId","data-v-2154ba87"]]),mD=()=>{const e=ve(),{shapeFormatPainter:t,handleElement:n}=te.storeToRefs(e);return{toggleShapeFormatPainter:(a=!1)=>{const i=n.value;t.value?e.setShapeFormatPainter(null):e.setShapeFormatPainter({keep:a,fill:i.fill,gradient:i.gradient,outline:i.outline,opacity:i.opacity,shadow:i.shadow})}}},gD={class:"gradient-bar"},yD=["onMousedown","onContextmenu"],xD={__name:"GradientBar",props:{value:{type:Array,required:!0},index:{type:Number,required:!0}},emits:["update:value","update:index"],setup(e,{emit:t}){const n=e,r=t,a=o.ref([]),i=o.useTemplateRef("barRef");o.watchEffect(()=>{a.value=n.value,n.index>n.value.length-1&&r("update:index",0)});const l=o.computed(()=>`linear-gradient(to right, ${a.value.map(f=>`${f.color} ${f.pos}%`).join(",")})`),s=d=>{if(n.value.length<=2)return;let f=0;d===n.index?f=d-1<0?0:d-1:n.index===n.value.length-1&&(f=n.value.length-2);const v=n.value.filter((p,h)=>h!==d);r("update:index",f),r("update:value",v)},u=d=>{let f=!0;document.onmousemove=v=>{if(!f||!i.value)return;let p=Math.round((v.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);p>100&&(p=100),p<0&&(p=0),a.value=a.value.map((h,m)=>m===d?{...h,pos:p}:h)},document.onmouseup=()=>{f=!1;const v=a.value[d],p=[...a.value];p.splice(d,1);let h=0;for(let m=0;m<p.length;m++)v.pos>p[m].pos&&(h=m+1);p.splice(h,0,v),r("update:index",h),r("update:value",p),document.onmousemove=null,document.onmouseup=null}},c=d=>{if(n.value.length>=6||!i.value)return;const f=Math.round((d.clientX-i.value.getBoundingClientRect().left)/i.value.clientWidth*100);let v=0;for(let m=0;m<n.value.length;m++)f>n.value[m].pos&&(v=m+1);const p=n.value[v-1]?n.value[v-1].color:n.value[v].color,h=[...n.value];h.splice(v,0,{pos:f,color:p}),r("update:index",v),r("update:value",h)};return(d,f)=>(o.openBlock(),o.createElementBlock("div",gD,[o.createElementVNode("div",{class:"bar",ref_key:"barRef",ref:i,style:o.normalizeStyle({backgroundImage:l.value}),onClick:f[0]||(f[0]=v=>c(v))},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(v,p)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["point",{active:e.index===p}]),key:v.pos+"-"+p,style:o.normalizeStyle({backgroundColor:v.color,left:`calc(${v.pos}% - 5px)`}),onMousedown:o.withModifiers(h=>u(p),["left"]),onContextmenu:o.withModifiers(h=>s(p),["right"])},null,46,yD))),128))]))}},t4=oe(xD,[["__scopeId","data-v-ebde6111"]]),wD={class:"shape-style-panel"},bD={class:"title"},SD={class:"shape-pool"},_D={class:"shape-list"},kD={class:"row"},CD={key:0,style:{width:"10px"}},ED={class:"row"},TD={class:"row"},ND={key:0,class:"row"},ID={key:1,class:"pattern-image-wrapper"},LD={class:"pattern-image"},AD={class:"row"},MD={__name:"ShapeStylePanel",setup(e){const t=ve(),n=pe(),{handleElement:r,handleElementId:a,shapeFormatPainter:i}=te.storeToRefs(t),l=r,s=o.ref("#000"),u=o.ref(""),c=o.ref({type:"linear",rotate:0,colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}]}),d=o.ref("fill"),f=o.ref("middle"),v=o.ref(0);o.watch(r,()=>{var w,C,E;if(!r.value||r.value.type!=="shape")return;s.value=r.value.fill||"#fff";const L=[{pos:0,color:s.value},{pos:100,color:"#fff"}];c.value=r.value.gradient||{type:"linear",rotate:0,colors:L},u.value=r.value.pattern||"",d.value=r.value.pattern!==void 0?"pattern":r.value.gradient?"gradient":"fill",f.value=((C=(w=r.value)===null||w===void 0?void 0:w.text)===null||C===void 0?void 0:C.align)||"middle",!((E=r.value.text)===null||E===void 0)&&E.content&&Tt.emit(mt.SYNC_RICH_TEXT_ATTRS_TO_STORE)},{deep:!0,immediate:!0}),o.watch(a,()=>{v.value=0});const{addHistorySnapshot:p}=Ee(),{toggleShapeFormatPainter:h}=mD(),m=w=>{n.updateElement({id:a.value,props:w}),p()},g=w=>{w==="fill"?(n.removeElementProps({id:a.value,propName:["gradient","pattern"]}),p()):w==="gradient"?(v.value=0,n.removeElementProps({id:a.value,propName:"pattern"}),m({gradient:c.value})):w==="pattern"&&(n.removeElementProps({id:a.value,propName:"gradient"}),m({pattern:""}))},y=w=>{if(!c.value)return;const C={...c.value,...w};m({gradient:C})},x=w=>{const C=c.value.colors.map((E,L)=>L===v.value?{...E,color:w}:E);y({colors:C})},b=w=>{const C=w[0];C&&Gr(C).then(E=>{u.value=E,m({pattern:E})})},S=w=>{m({fill:w})},_=w=>{const{width:C,height:E}=r.value,L={viewBox:w.viewBox,path:w.path,special:w.special};if(w.pathFormula){L.pathFormula=w.pathFormula,L.viewBox=[C,E];const N=Mo[w.pathFormula];"editable"in N?(L.path=N.formula(C,E,N.defaultValue),L.keypoints=N.defaultValue):L.path=N.formula(C,E)}else L.pathFormula=void 0,L.keypoints=void 0;m(L)},k=w=>{const C=r.value,E={content:"",defaultFontName:"",defaultColor:"#000",align:"middle"},L=C.text||E;m({text:{...L,align:w}})};return(w,C)=>{const E=o.resolveComponent("AiPptDown"),L=o.resolveComponent("AiPptPlus"),N=o.resolveComponent("AiPptAlignTextTopOne"),T=o.resolveComponent("AiPptAlignTextMiddleOne"),A=o.resolveComponent("AiPptAlignTextBottomOne"),I=o.resolveComponent("AiPptFormatBrush"),D=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",wD,[o.createElementVNode("div",bD,[C[11]||(C[11]=o.createElementVNode("span",null,"点击替换形状",-1)),o.createVNode(E)]),o.createElementVNode("div",SD,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(Yf),V=>(o.openBlock(),o.createElementBlock("div",{class:"category",key:V.type},[o.createElementVNode("div",_D,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(V.children,(B,R)=>(o.openBlock(),o.createBlock(j5,{class:"shape-item",key:R,shape:B,onClick:F=>_(B)},null,8,["shape","onClick"]))),128))])]))),128))]),o.createElementVNode("div",kD,[o.createVNode(at,{style:{flex:"1"},value:d.value,"onUpdate:value":C[0]||(C[0]=V=>g(V)),options:[{label:"纯色填充",value:"fill"},{label:"渐变填充",value:"gradient"},{label:"图片填充",value:"pattern"}]},null,8,["value"]),d.value!=="pattern"?(o.openBlock(),o.createElementBlock("div",CD)):o.createCommentVNode("",!0),d.value==="fill"?(o.openBlock(),o.createBlock(be,{key:1,trigger:"click",style:{flex:"1"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=V=>S(V))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:s.value},null,8,["color"])]),_:1})):d.value==="gradient"?(o.openBlock(),o.createBlock(at,{key:2,style:{flex:"1"},value:c.value.type,"onUpdate:value":C[2]||(C[2]=V=>y({type:V})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"])):o.createCommentVNode("",!0)]),d.value==="gradient"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",ED,[o.createVNode(t4,{value:c.value.colors,index:v.value,"onUpdate:value":C[3]||(C[3]=V=>y({colors:V})),"onUpdate:index":C[4]||(C[4]=V=>v.value=V)},null,8,["value","index"])]),o.createElementVNode("div",TD,[C[12]||(C[12]=o.createElementVNode("div",{style:{width:"40%"}},"当前色块:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:c.value.colors[v.value].color,"onUpdate:modelValue":C[5]||(C[5]=V=>x(V))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:c.value.colors[v.value].color},null,8,["color"])]),_:1})]),c.value.type==="linear"?(o.openBlock(),o.createElementBlock("div",ND,[C[13]||(C[13]=o.createElementVNode("div",{style:{width:"40%"}},"渐变角度:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:0,max:360,step:15,value:c.value.rotate,"onUpdate:value":C[6]||(C[6]=V=>y({rotate:V}))},null,8,["value"])])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),d.value==="pattern"?(o.openBlock(),o.createElementBlock("div",ID,[o.createVNode(ul,{onChange:C[7]||(C[7]=V=>b(V))},{default:o.withCtx(()=>[o.createElementVNode("div",LD,[o.createElementVNode("div",{class:"content",style:o.normalizeStyle({backgroundImage:`url(${u.value})`})},[o.createVNode(L)],4)])]),_:1})])):o.createCommentVNode("",!0),o.createVNode(e4),o.createVNode(Ie),o.unref(l).text?.content?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createVNode(Q5),o.createVNode(Ie),o.createVNode(ir,{class:"row","button-style":"solid",value:f.value,"onUpdate:value":C[8]||(C[8]=V=>k(V))},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"top",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(N)]),_:1})),[[D,"顶对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"middle",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(T)]),_:1})),[[D,"居中"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"bottom",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(A)]),_:1})),[[D,"底对齐"]])]),_:1},8,["value"]),o.createVNode(Ie)],64)):o.createCommentVNode("",!0),o.createVNode(gl),o.createVNode(Ie),o.createVNode(Wu),o.createVNode(Ie),o.createVNode(K5),o.createVNode(Ie),o.createElementVNode("div",AD,[o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:!!o.unref(i),onClick:C[9]||(C[9]=V=>o.unref(h)()),onDblclick:C[10]||(C[10]=V=>o.unref(h)(!0))},{default:o.withCtx(()=>[o.createVNode(I),C[14]||(C[14]=o.createTextVNode(" 形状格式刷 ",-1))]),_:1},8,["checked"])),[[D,"双击连续使用"]])])])}}},VD=oe(MD,[["__scopeId","data-v-28cd42bc"]]),PD={class:"line-style-panel"},DD={class:"row"},BD=["onClick"],RD={class:"row"},$D={class:"row"},OD={class:"row"},FD=["onClick"],zD={class:"row"},HD=["onClick"],GD={class:"row"},UD={__name:"LineStylePanel",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=n,{addHistorySnapshot:a}=Ee(),i=o.ref(["solid","dashed","dotted"]),l=o.ref(["","arrow","dot"]),s=u=>{n.value&&(t.updateElement({id:n.value.id,props:u}),a())};return(u,c)=>{const d=o.resolveComponent("AiPptSwitch");return o.openBlock(),o.createElementBlock("div",PD,[o.createElementVNode("div",DD,[c[3]||(c[3]=o.createElementVNode("div",{style:{width:"40%"}},"线条样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,f=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:f,onClick:v=>s({style:f})},[o.createVNode(mn,{type:f},null,8,["type"])],8,BD))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{type:o.unref(r).style},null,8,["type"])]),_:1})]),o.createElementVNode("div",RD,[c[4]||(c[4]=o.createElementVNode("div",{style:{width:"40%"}},"线条颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(r).color,"onUpdate:modelValue":c[0]||(c[0]=f=>s({color:f}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(r).color},null,8,["color"])]),_:1})]),o.createElementVNode("div",$D,[c[5]||(c[5]=o.createElementVNode("div",{style:{width:"40%"}},"线条宽度:",-1)),o.createVNode(Ut,{value:o.unref(r).width,"onUpdate:value":c[1]||(c[1]=f=>s({width:f})),style:{width:"60%"}},null,8,["value"])]),o.createElementVNode("div",OD,[c[6]||(c[6]=o.createElementVNode("div",{style:{width:"40%"}},"起点样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,f=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:f,onClick:v=>s({points:[f,o.unref(r).points[1]]})},[o.createVNode(mn,{padding:5,markers:[f,""]},null,8,["markers"])],8,FD))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{padding:5,markers:[o.unref(r).points[0],""]},null,8,["markers"])]),_:1})]),o.createElementVNode("div",zD,[c[7]||(c[7]=o.createElementVNode("div",{style:{width:"40%"}},"终点样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,f=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:f,onClick:v=>s({points:[o.unref(r).points[0],f]})},[o.createVNode(mn,{padding:5,markers:["",f]},null,8,["markers"])],8,HD))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{padding:5,markers:["",o.unref(r).points[1]]},null,8,["markers"])]),_:1})]),o.createVNode(Ie),o.createElementVNode("div",GD,[o.createVNode(le,{style:{flex:"1"},onClick:c[2]||(c[2]=f=>s({start:o.unref(r).end,end:o.unref(r).start}))},{default:o.withCtx(()=>[o.createVNode(d),c[8]||(c[8]=o.createTextVNode(" 交换方向 ",-1))]),_:1})]),o.createVNode(Ie),o.createVNode(Wu)])}}},WD=oe(UD,[["__scopeId","data-v-5f4e7539"]]),YD={class:"chart-data-editor"},XD={class:"editor-content"},qD={class:"handler"},ZD={class:"col-header"},jD={class:"col-key"},JD={class:"row-header"},KD={class:"row-key"},QD={class:"range-box"},eB=["id","onFocus","onPaste"],tB={class:"btns"},nB={class:"left"},rB={class:"right"},oB="ABCDEFGHIJKLMNOPQRSTUVWXYZ",yr=100,xr=32,aB={__name:"ChartDataEditor",props:{type:{type:Object,required:!0},data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const n=e,r=t,a=["bar","column","line","area","scatter","pie","ring","radar"],i=o.ref(!1),l=o.ref([0,0]),s=o.ref({width:0,height:0}),u=o.ref(null),c=o.ref("bar"),d=o.computed(()=>{const _=l.value[0]*yr,k=l.value[1]*xr;return[{type:"t",style:{width:_+"px"}},{type:"b",style:{top:k+"px",width:_+"px"}},{type:"l",style:{height:k+"px"}},{type:"r",style:{left:_+"px",height:k+"px"}}]}),f=o.computed(()=>{const _=l.value[0]*yr,k=l.value[1]*xr;return{left:_+"px",top:k+"px"}}),v=()=>{c.value=n.type;const _=[],{labels:k,legends:w,series:C}=n.data,E=k.length,L=C.length;_.push(["",...w]);for(let N=0;N<E;N++){const T=[k[N]];for(let A=0;A<L;A++)T.push(C[A][N]+"");_.push(T)}for(let N=0;N<E+1;N++)for(let T=0;T<L+1;T++){const A=document.querySelector(`#cell-${N}-${T}`);A&&(A.value=_[N][T]+"")}l.value=[L+1,E+1]};o.onMounted(v);const p=()=>{if(!u.value)return;const[_,k]=u.value,w=document.querySelector(`#cell-${_+1}-${k}`);w&&w.focus()},h=_=>{_.key.toUpperCase()===ye.ENTER&&p()};o.onMounted(()=>{document.addEventListener("keydown",h)}),o.onUnmounted(()=>{document.removeEventListener("keydown",h)});const m=()=>{const[_,k]=l.value,w=[];let C=[],E=[];for(let L=1;L<k;L++){let N=`类别${L}`;const T=document.querySelector(`#cell-${L}-0`);T&&T.value&&(N=T.value),w.push(N)}for(let L=1;L<_;L++){let N=`系列${L}`;const T=document.querySelector(`#cell-0-${L}`);T&&T.value&&(N=T.value),C.push(N)}for(let L=1;L<_;L++){const N=[];for(let T=1;T<k;T++){const A=document.querySelector(`#cell-${T}-${L}`);let I=0;A&&A.value&&+A.value&&(I=+A.value),N.push(I)}E.push(N)}c.value==="scatter"&&(C.length>2&&(C=C.slice(0,2),E=E.slice(0,2)),C.length<2&&(C.push("Y"),E.push(E[0]))),(c.value==="ring"||c.value==="pie")&&C.length>1&&(C=C.slice(0,1),E=E.slice(0,1)),r("save",{data:{labels:w,legends:C,series:E},type:c.value})},g=()=>{for(let _=1;_<31;_++)for(let k=1;k<7;k++){const w=document.querySelector(`#cell-${_}-${k}`);w&&(w.value="")}},y=(_,k,w)=>{const C=k+_.length,E=w+_[0].length;for(let L=k;L<C;L++)for(let N=w;N<E;N++){const T=document.querySelector(`#cell-${L}-${N}`);T&&(T.value=_[L-k][N-w])}},x=(_,k,w)=>{if(_.preventDefault(),!_.clipboardData)return;const C=_.clipboardData.items[0];C&&C.kind==="string"&&(C.type==="text/plain"?C.getAsString(E=>{if(typeof T1(E)=="object")return;const N=K4(E);if(N){y(N,k,w);return}document.execCommand("insertText",!1,E)}):C.type==="text/html"&&C.getAsString(E=>{const L=Q4(E);L&&y(L,k,w)}))},b=()=>r("close"),S=_=>{let k=!0;const w=_.pageX,C=_.pageY,E=l.value[0]*yr,L=l.value[1]*xr;document.onmousemove=N=>{if(!k)return;const T=N.pageX,A=N.pageY,I=T-w,D=A-C,V=E+I,B=L+D;s.value={width:V,height:B}},document.onmouseup=N=>{k=!1,document.onmousemove=null,document.onmouseup=null;const T=N.pageX,A=N.pageY;if(w===T&&C===A)return;let I=s.value.width,D=s.value.height;I%yr>yr*.5&&(I=I+(yr-I%yr)),D%xr>xr*.5&&(D=D+(xr-D%xr));let V=Math.round(D/xr),B=Math.round(I/yr);V<3&&(V=3),B<2&&(B=2),l.value=[B,V],s.value={width:0,height:0}}};return(_,k)=>(o.openBlock(),o.createElementBlock("div",YD,[o.createElementVNode("div",XD,[o.createElementVNode("div",qD,[o.createElementVNode("div",ZD,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(7,w=>o.createElementVNode("div",{class:"col-header-item",key:w},[o.createElementVNode("div",jD,o.toDisplayString(oB[w-1]),1)])),64))]),o.createElementVNode("div",JD,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(31,w=>o.createElementVNode("div",{class:"row-header-item",key:w},[o.createElementVNode("div",KD,o.toDisplayString(w),1)])),64))]),k[5]||(k[5]=o.createElementVNode("div",{class:"all-header"},[o.createElementVNode("svg",{class:"triangle",width:"8",height:"8",viewBox:"0 0 8 8",xmlns:"http://www.w3.org/2000/svg"},[o.createElementVNode("path",{d:"M8,0 L8,8 L0,8 L8,0",fill:"#ccc"})])],-1))]),o.createElementVNode("div",QD,[o.createElementVNode("div",{class:"temp-range",style:o.normalizeStyle({width:s.value.width+"px",height:s.value.height+"px"})},null,4),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,w=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["range-line",w.type]),key:w.type,style:o.normalizeStyle(w.style)},null,6))),128)),o.createElementVNode("div",{class:"resizable",style:o.normalizeStyle(f.value),onMousedown:k[0]||(k[0]=o.withModifiers(w=>S(w),["stop"]))},null,36)]),o.createElementVNode("table",null,[o.createElementVNode("tbody",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(31,w=>o.createElementVNode("tr",{key:w},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(7,C=>o.createElementVNode("td",{key:C,class:o.normalizeClass({head:C===1&&w<=l.value[1]||w===1&&C<=l.value[0]})},[w===1&&C===1?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("input",{key:0,class:o.normalizeClass(["item",{selected:w<=l.value[1]&&C<=l.value[0]}]),id:`cell-${w-1}-${C-1}`,autocomplete:"off",onFocus:E=>u.value=[w-1,C-1],onPaste:E=>x(E,w-1,C-1)},null,42,eB))],2)),64))])),64))])])]),o.createElementVNode("div",tB,[o.createElementVNode("div",nB,[o.createTextVNode(" 图表类型:"+o.toDisplayString(o.unref(Ld)[c.value])+" ",1),o.createVNode(be,{trigger:"click",placement:"top",value:i.value,"onUpdate:value":k[1]||(k[1]=w=>i.value=w)},{content:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(a,w=>o.createVNode(ut,{center:"",key:w,onClick:C=>{c.value=w,i.value=!1}},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(Ld)[w]),1)]),_:2},1032,["onClick"])),64))]),default:o.withCtx(()=>[k[6]||(k[6]=o.createElementVNode("span",{class:"change"},"点击更换",-1))]),_:1},8,["value"])]),o.createElementVNode("div",rB,[o.createVNode(le,{class:"btn",onClick:k[2]||(k[2]=w=>b())},{default:o.withCtx(()=>[...k[7]||(k[7]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{class:"btn",onClick:k[3]||(k[3]=w=>g())},{default:o.withCtx(()=>[...k[8]||(k[8]=[o.createTextVNode("清空数据",-1)])]),_:1}),o.createVNode(le,{type:"primary",class:"btn",onClick:k[4]||(k[4]=w=>m())},{default:o.withCtx(()=>[...k[9]||(k[9]=[o.createTextVNode("确认",-1)])]),_:1})])])]))}},iB=oe(aB,[["__scopeId","data-v-9de56e0d"]]),lB={class:"theme-colors-setting"},sB={class:"list"},uB={class:"label",style:{width:"40%"}},cB={class:"color-btn-wrap",style:{width:"100%"}},dB=["onClick"],fB={__name:"ThemeColorsSetting",props:{colors:{type:Array,required:!0}},emits:["update"],setup(e,{emit:t}){const n=e,r=t,a=o.ref([]);o.onMounted(()=>{a.value=[...n.colors]});const i=()=>{r("update",a.value)},l=()=>{const u=[...a.value,"#00000000"];a.value=u},s=u=>{const c=a.value.filter((d,f)=>f!==u);a.value=c};return(u,c)=>{const d=o.resolveComponent("AiPptCloseSmall"),f=o.resolveComponent("AiPptPlus"),v=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",lB,[c[4]||(c[4]=o.createElementVNode("div",{class:"title"},"图表主题配色",-1)),o.createElementVNode("div",sB,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(p,h)=>(o.openBlock(),o.createElementBlock("div",{class:"row",key:h},[o.createElementVNode("div",uB,"主题配色"+o.toDisplayString(h+1)+":",1),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:p,"onUpdate:modelValue":m=>a.value[h]=m},null,8,["modelValue","onUpdate:modelValue"])]),default:o.withCtx(()=>[o.createElementVNode("div",cB,[o.createVNode(ot,{color:p},null,8,["color"]),h!==0?o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:0,class:"delete-color-btn",onClick:o.withModifiers(m=>s(h),["stop"])},[o.createVNode(d)],8,dB)),[[v,"删除"]]):o.createCommentVNode("",!0)])]),_:2},1024)]))),128)),o.createVNode(le,{style:{width:"100%"},disabled:a.value.length>=10,onClick:c[0]||(c[0]=p=>l())},{default:o.withCtx(()=>[o.createVNode(f),c[2]||(c[2]=o.createTextVNode(" 添加主题色 ",-1))]),_:1},8,["disabled"])]),o.createVNode(le,{class:"btn",type:"primary",onClick:c[1]||(c[1]=p=>i())},{default:o.withCtx(()=>[...c[3]||(c[3]=[o.createTextVNode("确认",-1)])]),_:1})])}}},vB=oe(fB,[["__scopeId","data-v-0ce303ae"]]),pB={class:"blocks"},hB={__name:"ColorListButton",props:{colors:{type:Array,required:!0}},setup(e){const t=e,n=o.computed(()=>t.colors?t.colors.length>12?t.colors.slice(0,12):t.colors:[]);return(r,a)=>{const i=o.resolveComponent("AiPptPlatte");return o.openBlock(),o.createBlock(le,{class:"color-btn"},{default:o.withCtx(()=>[o.createElementVNode("div",pB,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(l,s)=>(o.openBlock(),o.createElementBlock("div",{class:"color-block",key:s},[o.createElementVNode("div",{class:"content",style:o.normalizeStyle({backgroundColor:l})},null,4)]))),128))]),o.createVNode(i,{class:"color-btn-icon"})]),_:1})}}},n4=oe(hB,[["__scopeId","data-v-20effdc7"]]),mB=["checked"],gB={class:"checkbox-label"},yB={__name:"Checkbox",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:t}){const n=e,r=t,a=i=>{n.disabled||r("update:value",i.target.checked)};return(i,l)=>(o.openBlock(),o.createElementBlock("label",{class:o.normalizeClass(["checkbox",{checked:e.value,disabled:e.disabled}]),onChange:l[0]||(l[0]=s=>a(s))},[l[1]||(l[1]=o.createElementVNode("span",{class:"checkbox-input"},null,-1)),o.createElementVNode("input",{class:"checkbox-original",type:"checkbox",checked:e.value},null,8,mB),o.createElementVNode("span",gB,[o.renderSlot(i.$slots,"default",{},void 0,!0)])],34))}},ha=oe(yB,[["__scopeId","data-v-c2b1f28a"]]),xB={class:"chart-style-panel"},wB={class:"row"},bB={class:"row"},SB={class:"row"},_B={class:"row"},kB={class:"row"},CB={class:"themes"},EB={class:"preset-themes"},TB=["onClick"],NB={class:"preset-themes",style:{marginBottom:"-10px"}},IB={__name:"index",setup(e){const t=ve(),n=pe(),{handleElement:r,handleElementId:a}=te.storeToRefs(t),{theme:i}=te.storeToRefs(n),l=r,s=o.ref(!1),u=o.ref(!1),c=o.ref(!1),{addHistorySnapshot:d}=Ee(),f=o.ref("#000"),v=o.ref([]),p=o.ref(""),h=o.ref(""),m=o.ref(!1),g=o.ref(!1);o.watch(r,()=>{if(!(!r.value||r.value.type!=="chart")){if(f.value=r.value.fill||"#fff",m.value=!1,g.value=!1,r.value.options){const{lineSmooth:k,stack:w}=r.value.options;k!==void 0&&(m.value=k),w!==void 0&&(g.value=w)}v.value=r.value.themeColors,p.value=r.value.textColor||"#333",h.value=r.value.lineColor||"#e8ecf4"}},{deep:!0,immediate:!0});const y=k=>{n.updateElement({id:a.value,props:k}),d()},x=k=>{s.value=!1,y({data:k.data,chartType:k.type})},b=k=>{const C={...r.value.options,...k};y({options:C})},S=k=>{y({themeColors:k}),u.value=!1,c.value=!1},_=()=>s.value=!0;return Tt.on(mt.OPEN_CHART_DATA_EDITOR,_),o.onUnmounted(()=>{Tt.off(mt.OPEN_CHART_DATA_EDITOR,_)}),(k,w)=>{const C=o.resolveComponent("AiPptEdit");return o.openBlock(),o.createElementBlock("div",xB,[o.createVNode(le,{class:"full-width-btn",onClick:w[0]||(w[0]=E=>s.value=!0)},{default:o.withCtx(()=>[o.createVNode(C),w[15]||(w[15]=o.createTextVNode(" 编辑图表 ",-1))]),_:1}),o.createVNode(Ie),["bar","column","area","line"].includes(o.unref(l).chartType)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",wB,[o.createVNode(ha,{"onUpdate:value":w[1]||(w[1]=E=>b({stack:E})),value:g.value,style:{flex:"2"}},{default:o.withCtx(()=>[...w[16]||(w[16]=[o.createTextVNode("堆叠样式 ",-1)])]),_:1},8,["value"]),o.unref(l).chartType==="line"?(o.openBlock(),o.createBlock(ha,{key:0,"onUpdate:value":w[2]||(w[2]=E=>b({lineSmooth:E})),value:m.value,style:{flex:"3"}},{default:o.withCtx(()=>[...w[17]||(w[17]=[o.createTextVNode("使用平滑曲线 ",-1)])]),_:1},8,["value"])):o.createCommentVNode("",!0)]),o.createVNode(Ie)],64)):o.createCommentVNode("",!0),o.createElementVNode("div",bB,[w[18]||(w[18]=o.createElementVNode("div",{style:{width:"40%"}},"背景填充:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:f.value,"onUpdate:modelValue":w[3]||(w[3]=E=>y({fill:E}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:f.value},null,8,["color"])]),_:1})]),o.createElementVNode("div",SB,[w[19]||(w[19]=o.createElementVNode("div",{style:{width:"40%"}},"坐标与文字:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:p.value,"onUpdate:modelValue":w[4]||(w[4]=E=>y({textColor:E}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:p.value},null,8,["color"])]),_:1})]),o.createElementVNode("div",_B,[w[20]||(w[20]=o.createElementVNode("div",{style:{width:"40%"}},"网格颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:h.value,"onUpdate:modelValue":w[5]||(w[5]=E=>y({lineColor:E}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:h.value},null,8,["color"])]),_:1})]),o.createElementVNode("div",kB,[w[24]||(w[24]=o.createElementVNode("div",{style:{width:"40%"}},"主题配色:",-1)),o.createVNode(be,{trigger:"click",value:u.value,"onUpdate:value":w[8]||(w[8]=E=>u.value=E),style:{width:"60%"}},{content:o.withCtx(()=>[o.createElementVNode("div",CB,[w[22]||(w[22]=o.createElementVNode("div",{class:"label"},"预置图表主题:",-1)),o.createElementVNode("div",EB,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(ox),(E,L)=>(o.openBlock(),o.createElementBlock("div",{class:"preset-theme",key:L,onClick:N=>S(E)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(E,N=>(o.openBlock(),o.createElementBlock("div",{class:"preset-theme-color",key:N,style:o.normalizeStyle({backgroundColor:N})},null,4))),128))],8,TB))),128))]),w[23]||(w[23]=o.createElementVNode("div",{class:"label"},"幻灯片主题:",-1)),o.createElementVNode("div",NB,[o.createElementVNode("div",{class:"preset-theme",onClick:w[6]||(w[6]=E=>S(o.unref(i).themeColors))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i).themeColors,E=>(o.openBlock(),o.createElementBlock("div",{class:"preset-theme-color",key:E,style:o.normalizeStyle({backgroundColor:E})},null,4))),128))])]),o.createVNode(Ie,{margin:10}),o.createVNode(le,{class:"full-width-btn",onClick:w[7]||(w[7]=E=>{u.value=!1,c.value=!0})},{default:o.withCtx(()=>[...w[21]||(w[21]=[o.createTextVNode("自定义配色",-1)])]),_:1})])]),default:o.withCtx(()=>[o.createVNode(n4,{colors:v.value},null,8,["colors"])]),_:1},8,["value"])]),o.createVNode(Ie),o.createVNode(gl),o.createVNode(Hr,{visible:s.value,"onUpdate:visible":w[11]||(w[11]=E=>s.value=E),width:640},{default:o.withCtx(()=>[o.createVNode(iB,{type:o.unref(l).chartType,data:o.unref(l).data,onClose:w[9]||(w[9]=E=>s.value=!1),onSave:w[10]||(w[10]=E=>x(E))},null,8,["type","data"])]),_:1},8,["visible"]),o.createVNode(Hr,{visible:c.value,"onUpdate:visible":w[13]||(w[13]=E=>c.value=E),width:310,onClosed:w[14]||(w[14]=E=>c.value=!1)},{default:o.withCtx(()=>[o.createVNode(vB,{colors:v.value,onUpdate:w[12]||(w[12]=E=>S(E))},null,8,["colors"])]),_:1},8,["visible"])])}}},LB=oe(IB,[["__scopeId","data-v-99c7b7ed"]]),AB={class:"table-style-panel"},MB={class:"row"},VB={class:"set-count",style:{width:"60%"}},PB={class:"count-text"},DB={class:"row"},BB={class:"set-count",style:{width:"60%"}},RB={class:"count-text"},$B={class:"row theme-switch"},OB={class:"switch-wrapper",style:{width:"60%"}},FB={class:"row"},zB={class:"row"},HB={class:"row"},GB={__name:"TableStylePanel",setup(e){const t=pe(),{handleElement:n,handleElementId:r,selectedTableCells:a}=te.storeToRefs(ve()),i=o.computed(()=>t.theme.themeColors[0]),l=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],s=o.ref({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}),u=o.ref(),c=o.ref(!1),d=o.ref(0),f=o.ref(0),v=o.ref(0),p=o.ref(0);o.watch(n,()=>{!n.value||n.value.type!=="table"||(u.value=n.value.theme,c.value=!!u.value,d.value=n.value.data.length,f.value=n.value.data[0].length,v.value=n.value.data.length,p.value=n.value.data[0].length)},{deep:!0,immediate:!0});const{addHistorySnapshot:h}=Ee(),m=()=>{if(!n.value||n.value.type!=="table")return;let k=0,w=0;if(a.value.length){const E=a.value[0];k=+E.split("_")[0],w=+E.split("_")[1]}const C=n.value.data[k][w].style;C?s.value={bold:!!C.bold,em:!!C.em,underline:!!C.underline,strikethrough:!!C.strikethrough,color:C.color||"#000",backcolor:C.backcolor||"",fontsize:C.fontsize||"12px",fontname:C.fontname||"",align:C.align||"left"}:s.value={bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"",align:"left"}};o.onMounted(()=>{a.value.length&&m()}),o.watch(a,m);const g=k=>{t.updateElement({id:r.value,props:k}),h()},y=k=>{const w=n.value,C=JSON.parse(JSON.stringify(w.data));for(let E=0;E<C.length;E++)for(let L=0;L<C[E].length;L++)if(!a.value.length||a.value.includes(`${E}_${L}`)){const N=C[E][L].style||{};C[E][L].style={...N,...k}}g({data:C}),m()},x=k=>{if(!u.value)return;const w={...u.value,...k};g({theme:w})},b=k=>{if(k){const w={theme:{color:i.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};g(w)}else t.removeElementProps({id:r.value,propName:"theme"}),h()},S=k=>{const w=n.value,C=w.data.length;if(k>C){const E=new Array(f.value).fill({id:Te.nanoid(10),colspan:1,rowspan:1,text:""}),L=new Array(k-C).fill(E),N=JSON.parse(JSON.stringify(w.data));N.push(...L),g({data:N})}else{const E=w.data.slice(0,k);g({data:E})}},_=k=>{const w=n.value,C=w.data[0].length;let E=w.data,L=w.colWidths.map(I=>I*w.width);if(k>C){E=E.map(D=>{const V=new Array(k-C).fill({id:Te.nanoid(10),colspan:1,rowspan:1,text:""});return D.push(...V),D});const I=new Array(k-C).fill(100);L.push(...I)}else E=E.map(I=>I.slice(0,k)),L=L.slice(0,k);const N=L.reduce((I,D)=>I+D),T=L.map(I=>I/N);g({width:N,data:E,colWidths:T})};return(k,w)=>{const C=o.resolveComponent("AiPptFontSize"),E=o.resolveComponent("AiPptAddText"),L=o.resolveComponent("AiPptText"),N=o.resolveComponent("AiPptFill"),T=o.resolveComponent("AiPptTextBold"),A=o.resolveComponent("AiPptTextItalic"),I=o.resolveComponent("AiPptTextUnderline"),D=o.resolveComponent("AiPptStrikethrough"),V=o.resolveComponent("AiPptAlignTextLeft"),B=o.resolveComponent("AiPptAlignTextCenter"),R=o.resolveComponent("AiPptAlignTextRight"),F=o.resolveComponent("AiPptAlignTextBoth"),W=o.resolveComponent("AiPptMinus"),O=o.resolveComponent("AiPptPlus"),P=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",AB,[o.createVNode(op,{class:"row"},{default:o.withCtx(()=>[o.createVNode(at,{style:{width:"50%"},value:s.value.fontname,search:"",searchLabel:"搜索字体","onUpdate:value":w[0]||(w[0]=$=>y({fontname:$})),options:o.unref(yl)},{icon:o.withCtx(()=>[o.createVNode(C)]),_:1},8,["value","options"]),o.createVNode(at,{style:{width:"50%"},value:s.value.fontsize,search:"",searchLabel:"搜索字号","onUpdate:value":w[1]||(w[1]=$=>y({fontsize:$})),options:l.map($=>({label:$,value:$}))},{icon:o.withCtx(()=>[o.createVNode(E)]),_:1},8,["value","options"])]),_:1}),o.createVNode(rt,{class:"row",passive:""},{default:o.withCtx(()=>[o.createVNode(be,{trigger:"click",style:{width:"50%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:s.value.color,"onUpdate:modelValue":w[2]||(w[2]=$=>y({color:$}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{first:"",color:s.value.color},{default:o.withCtx(()=>[o.createVNode(L)]),_:1},8,["color"])),[[P,"文字颜色"]])]),_:1}),o.createVNode(be,{trigger:"click",style:{width:"50%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:s.value.backcolor,"onUpdate:modelValue":w[3]||(w[3]=$=>y({backcolor:$}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{last:"",color:s.value.backcolor},{default:o.withCtx(()=>[o.createVNode(N)]),_:1},8,["color"])),[[P,"单元格填充"]])]),_:1})]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:s.value.bold,onClick:w[4]||(w[4]=$=>y({bold:!s.value.bold}))},{default:o.withCtx(()=>[o.createVNode(T)]),_:1},8,["checked"])),[[P,"加粗"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:s.value.em,onClick:w[5]||(w[5]=$=>y({em:!s.value.em}))},{default:o.withCtx(()=>[o.createVNode(A)]),_:1},8,["checked"])),[[P,"斜体"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:s.value.underline,onClick:w[6]||(w[6]=$=>y({underline:!s.value.underline}))},{default:o.withCtx(()=>[o.createVNode(I)]),_:1},8,["checked"])),[[P,"下划线"]]),o.withDirectives((o.openBlock(),o.createBlock(pt,{style:{flex:"1"},checked:s.value.strikethrough,onClick:w[7]||(w[7]=$=>y({strikethrough:!s.value.strikethrough}))},{default:o.withCtx(()=>[o.createVNode(D)]),_:1},8,["checked"])),[[P,"删除线"]])]),_:1}),o.createVNode(ir,{class:"row","button-style":"solid",value:s.value.align,"onUpdate:value":w[8]||(w[8]=$=>y({align:$}))},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"left",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(V)]),_:1})),[[P,"左对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"center",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(B)]),_:1})),[[P,"居中"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"right",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(R)]),_:1})),[[P,"右对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"justify",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(F)]),_:1})),[[P,"两端对齐"]])]),_:1},8,["value"]),o.createVNode(Ie),o.createVNode(gl,{fixed:!0}),o.createVNode(Ie),o.createElementVNode("div",MB,[w[19]||(w[19]=o.createElementVNode("div",{style:{width:"40%"}},"行数:",-1)),o.createElementVNode("div",VB,[o.createVNode(le,{class:"btn",disabled:d.value<=1,onClick:w[9]||(w[9]=$=>S(d.value-1))},{default:o.withCtx(()=>[o.createVNode(W)]),_:1},8,["disabled"]),o.createElementVNode("div",PB,o.toDisplayString(d.value),1),o.createVNode(le,{class:"btn",disabled:d.value>=30,onClick:w[10]||(w[10]=$=>S(d.value+1))},{default:o.withCtx(()=>[o.createVNode(O)]),_:1},8,["disabled"])])]),o.createElementVNode("div",DB,[w[20]||(w[20]=o.createElementVNode("div",{style:{width:"40%"}},"列数:",-1)),o.createElementVNode("div",BB,[o.createVNode(le,{class:"btn",disabled:f.value<=1,onClick:w[11]||(w[11]=$=>_(f.value-1))},{default:o.withCtx(()=>[o.createVNode(W)]),_:1},8,["disabled"]),o.createElementVNode("div",RB,o.toDisplayString(f.value),1),o.createVNode(le,{class:"btn",disabled:f.value>=30,onClick:w[12]||(w[12]=$=>_(f.value+1))},{default:o.withCtx(()=>[o.createVNode(O)]),_:1},8,["disabled"])])]),o.createVNode(Ie),o.createElementVNode("div",$B,[w[21]||(w[21]=o.createElementVNode("div",{style:{width:"40%"}},"启用主题表格:",-1)),o.createElementVNode("div",OB,[o.createVNode(wn,{value:c.value,"onUpdate:value":w[13]||(w[13]=$=>b($))},null,8,["value"])])]),u.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",FB,[o.createVNode(ha,{"onUpdate:value":w[14]||(w[14]=$=>x({rowHeader:$})),value:u.value.rowHeader,style:{flex:"1"}},{default:o.withCtx(()=>[...w[22]||(w[22]=[o.createTextVNode(" 标题行",-1)])]),_:1},8,["value"]),o.createVNode(ha,{"onUpdate:value":w[15]||(w[15]=$=>x({rowFooter:$})),value:u.value.rowFooter,style:{flex:"1"}},{default:o.withCtx(()=>[...w[23]||(w[23]=[o.createTextVNode(" 汇总行",-1)])]),_:1},8,["value"])]),o.createElementVNode("div",zB,[o.createVNode(ha,{"onUpdate:value":w[16]||(w[16]=$=>x({colHeader:$})),value:u.value.colHeader,style:{flex:"1"}},{default:o.withCtx(()=>[...w[24]||(w[24]=[o.createTextVNode(" 第一列",-1)])]),_:1},8,["value"]),o.createVNode(ha,{"onUpdate:value":w[17]||(w[17]=$=>x({colFooter:$})),value:u.value.colFooter,style:{flex:"1"}},{default:o.withCtx(()=>[...w[25]||(w[25]=[o.createTextVNode(" 最后一列",-1)])]),_:1},8,["value"])]),o.createElementVNode("div",HB,[w[26]||(w[26]=o.createElementVNode("div",{style:{width:"40%"}},"主题颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:u.value.color,"onUpdate:modelValue":w[18]||(w[18]=$=>x({color:$}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:u.value.color},null,8,["color"])]),_:1})])],64)):o.createCommentVNode("",!0)])}}},UB=oe(GB,[["__scopeId","data-v-cff6f583"]]),WB={class:"latex-style-panel"},YB={class:"row"},XB={class:"row"},qB={class:"row"},ZB={__name:"LatexStylePanel",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=n,a=o.ref(!1),{addHistorySnapshot:i}=Ee(),l=c=>{n.value&&(t.updateElement({id:n.value.id,props:c}),i())},s=c=>{l({path:c.path,latex:c.latex,width:c.w,height:c.h,viewBox:[c.w,c.h]})},u=()=>a.value=!0;return Tt.on(mt.OPEN_LATEX_EDITOR,u),o.onUnmounted(()=>{Tt.off(mt.OPEN_LATEX_EDITOR,u)}),(c,d)=>{const f=o.resolveComponent("AiPptEdit");return o.openBlock(),o.createElementBlock("div",WB,[o.createElementVNode("div",YB,[o.createVNode(le,{style:{flex:"1"},onClick:d[0]||(d[0]=v=>a.value=!0)},{default:o.withCtx(()=>[o.createVNode(f),d[6]||(d[6]=o.createTextVNode(" 编辑 LaTeX ",-1))]),_:1})]),o.createVNode(Ie),o.createElementVNode("div",XB,[d[7]||(d[7]=o.createElementVNode("div",{style:{width:"40%"}},"颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(r).color,"onUpdate:modelValue":d[1]||(d[1]=v=>l({color:v}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(r).color},null,8,["color"])]),_:1})]),o.createElementVNode("div",qB,[d[8]||(d[8]=o.createElementVNode("div",{style:{width:"40%"}},"粗细:",-1)),o.createVNode(Ut,{min:1,max:3,value:o.unref(r).strokeWidth,"onUpdate:value":d[2]||(d[2]=v=>l({strokeWidth:v})),style:{width:"60%"}},null,8,["value"])]),o.createVNode(Hr,{visible:a.value,"onUpdate:visible":d[5]||(d[5]=v=>a.value=v),width:880},{default:o.withCtx(()=>[o.createVNode(J5,{value:o.unref(r).latex,onClose:d[3]||(d[3]=v=>a.value=!1),onUpdate:d[4]||(d[4]=v=>{s(v),a.value=!1})},null,8,["value"])]),_:1},8,["visible"])])}}},jB=oe(ZB,[["__scopeId","data-v-c67c5d5f"]]),JB={class:"video-style-panel"},KB={class:"background-image-wrapper"},QB={class:"background-image"},eR={class:"row"},tR={class:"row switch-row"},nR={class:"switch-wrapper",style:{width:"60%"}},rR={__name:"VideoStylePanel",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=n,{addHistorySnapshot:a}=Ee(),i=s=>{n.value&&(t.updateElement({id:n.value.id,props:s}),a())},l=s=>{const u=s[0];u&&Gr(u).then(c=>i({poster:c}))};return(s,u)=>{const c=o.resolveComponent("AiPptPlus"),d=o.resolveComponent("AiPptUndo");return o.openBlock(),o.createElementBlock("div",JB,[u[5]||(u[5]=o.createElementVNode("div",{class:"title"},"视频预览封面",-1)),o.createElementVNode("div",KB,[o.createVNode(ul,{onChange:u[0]||(u[0]=f=>l(f))},{default:o.withCtx(()=>[o.createElementVNode("div",QB,[o.createElementVNode("div",{class:"content",style:o.normalizeStyle({backgroundImage:o.unref(r).poster?`url(${o.unref(r).poster})`:""})},[o.createVNode(c)],4)])]),_:1})]),o.createElementVNode("div",eR,[o.createVNode(le,{style:{flex:"1"},onClick:u[1]||(u[1]=f=>i({poster:""}))},{default:o.withCtx(()=>[o.createVNode(d),u[3]||(u[3]=o.createTextVNode(" 重置封面 ",-1))]),_:1})]),o.createElementVNode("div",tR,[u[4]||(u[4]=o.createElementVNode("div",{style:{width:"40%"}},"自动播放:",-1)),o.createElementVNode("div",nR,[o.createVNode(wn,{value:o.unref(r).autoplay,"onUpdate:value":u[2]||(u[2]=f=>i({autoplay:f}))},null,8,["value"])])])])}}},oR=oe(rR,[["__scopeId","data-v-13500193"]]),aR={class:"audio-style-panel"},iR={class:"row"},lR={class:"row switch-row"},sR={class:"switch-wrapper",style:{width:"60%"}},uR={class:"row switch-row"},cR={class:"switch-wrapper",style:{width:"60%"}},dR={__name:"AudioStylePanel",setup(e){const t=pe(),{handleElement:n}=te.storeToRefs(ve()),r=n,{addHistorySnapshot:a}=Ee(),i=l=>{n.value&&(t.updateElement({id:n.value.id,props:l}),a())};return(l,s)=>(o.openBlock(),o.createElementBlock("div",aR,[o.createElementVNode("div",iR,[s[3]||(s[3]=o.createElementVNode("div",{style:{width:"40%"}},"图标颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(r).color,"onUpdate:modelValue":s[0]||(s[0]=u=>i({color:u}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(r).color},null,8,["color"])]),_:1})]),o.createElementVNode("div",lR,[s[4]||(s[4]=o.createElementVNode("div",{style:{width:"40%"}},"自动播放:",-1)),o.createElementVNode("div",sR,[o.createVNode(wn,{value:o.unref(r).autoplay,"onUpdate:value":s[1]||(s[1]=u=>i({autoplay:u}))},null,8,["value"])])]),o.createElementVNode("div",uR,[s[5]||(s[5]=o.createElementVNode("div",{style:{width:"40%"}},"循环播放:",-1)),o.createElementVNode("div",cR,[o.createVNode(wn,{value:o.unref(r).loop,"onUpdate:value":s[2]||(s[2]=u=>i({loop:u}))},null,8,["value"])])])]))}},fR=oe(dR,[["__scopeId","data-v-55537d4d"]]),vR={class:"element-style-panel"},pR={__name:"index",setup(e){const t={[Xe.TEXT]:HP,[Xe.IMAGE]:hD,[Xe.SHAPE]:VD,[Xe.LINE]:WD,[Xe.CHART]:LB,[Xe.TABLE]:UB,[Xe.LATEX]:jB,[Xe.VIDEO]:oR,[Xe.AUDIO]:fR},{handleElement:n}=te.storeToRefs(ve()),r=o.computed(()=>n.value&&t[n.value.type]||null);return(a,i)=>(o.openBlock(),o.createElementBlock("div",vR,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(r.value)))]))}},hR={class:"element-positopn-panel"},mR={class:"row"},gR={key:0,class:"row"},yR={key:1,style:{width:"10%"}},xR={class:"row"},wR={__name:"ElementPositionPanel",setup(e){const t=pe(),{handleElement:n,handleElementId:r}=te.storeToRefs(ve()),a=o.ref(0),i=o.ref(0),l=o.ref(0),s=o.ref(0),u=o.ref(0),c=o.ref(!1),d=o.computed(()=>n.value&&$1[n.value.type]||20),f=o.computed(()=>{var C;return((C=n.value)===null||C===void 0?void 0:C.type)==="text"&&!n.value.vertical}),v=o.computed(()=>{var C;return((C=n.value)===null||C===void 0?void 0:C.type)==="text"&&n.value.vertical});o.watch(n,()=>{n.value&&(a.value=qe.round(n.value.left,1),i.value=qe.round(n.value.top,1),c.value="fixedRatio"in n.value&&!!n.value.fixedRatio,n.value.type!=="line"&&(l.value=qe.round(n.value.width,1),s.value=qe.round(n.value.height,1),u.value="rotate"in n.value&&n.value.rotate!==void 0?qe.round(n.value.rotate,1):0))},{deep:!0,immediate:!0});const{orderElement:p}=iu(),{alignElementToCanvas:h}=Jf(),{addHistorySnapshot:m}=Ee(),g=C=>{const E={left:C};t.updateElement({id:r.value,props:E}),m()},y=C=>{const E={top:C};t.updateElement({id:r.value,props:E}),m()},x=(C,E)=>{if(n.value&&n.value.type==="shape"&&"pathFormula"in n.value&&n.value.pathFormula){const L=Mo[n.value.pathFormula];let N="";return"editable"in L&&L.editable?N=L.formula(C,E,n.value.keypoints):N=L.formula(C,E),{viewBox:[C,E],path:N}}return null},b=C=>{if(!n.value||n.value.type==="line"||v.value)return;let E=s.value;if(c.value){const T=l.value/s.value;E=C/T<d.value?d.value:C/T}let L={width:C,height:E};const N=x(C,E);N&&(L={width:C,height:E,...N}),t.updateElement({id:r.value,props:L}),m()},S=C=>{if(!n.value||n.value.type==="line"||n.value.type==="table"||f.value)return;let E=l.value;if(c.value){const T=l.value/s.value;E=C*T<d.value?d.value:C*T}let L={width:E,height:C};const N=x(E,C);N&&(L={width:E,height:C,...N}),t.updateElement({id:r.value,props:L}),m()},_=C=>{const E={rotate:C};t.updateElement({id:r.value,props:E}),m()},k=C=>{const E={fixedRatio:C};t.updateElement({id:r.value,props:E}),m()},w=C=>{let E=Math.floor(u.value/45)*45;C==="+"?E=E+45:C==="-"&&(E=E-45),E<-180&&(E=-180),E>180&&(E=180);const L={rotate:E};t.updateElement({id:r.value,props:L}),m()};return(C,E)=>{const L=o.resolveComponent("AiPptSendToBack"),N=o.resolveComponent("AiPptBringToFrontOne"),T=o.resolveComponent("AiPptBringToFront"),A=o.resolveComponent("AiPptSentToBack"),I=o.resolveComponent("AiPptAlignLeft"),D=o.resolveComponent("AiPptAlignVertically"),V=o.resolveComponent("AiPptAlignRight"),B=o.resolveComponent("AiPptAlignTop"),R=o.resolveComponent("AiPptAlignHorizontally"),F=o.resolveComponent("AiPptAlignBottom"),W=o.resolveComponent("AiPptLock"),O=o.resolveComponent("AiPptUnlock"),P=o.resolveComponent("AiPptRotate"),$=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",hR,[E[32]||(E[32]=o.createElementVNode("div",{class:"title"},"层级:",-1)),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.createVNode(le,{style:{flex:"1"},onClick:E[0]||(E[0]=z=>o.unref(p)(o.unref(n),o.unref(ct).TOP))},{default:o.withCtx(()=>[o.createVNode(L),E[19]||(E[19]=o.createTextVNode(" 置顶 ",-1))]),_:1}),o.createVNode(le,{style:{flex:"1"},onClick:E[1]||(E[1]=z=>o.unref(p)(o.unref(n),o.unref(ct).BOTTOM))},{default:o.withCtx(()=>[o.createVNode(N),E[20]||(E[20]=o.createTextVNode(" 置底 ",-1))]),_:1})]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.createVNode(le,{style:{flex:"1"},onClick:E[2]||(E[2]=z=>o.unref(p)(o.unref(n),o.unref(ct).UP))},{default:o.withCtx(()=>[o.createVNode(T),E[21]||(E[21]=o.createTextVNode(" 上移 ",-1))]),_:1}),o.createVNode(le,{style:{flex:"1"},onClick:E[3]||(E[3]=z=>o.unref(p)(o.unref(n),o.unref(ct).DOWN))},{default:o.withCtx(()=>[o.createVNode(A),E[22]||(E[22]=o.createTextVNode(" 下移 ",-1))]),_:1})]),_:1}),o.createVNode(Ie),E[33]||(E[33]=o.createElementVNode("div",{class:"title"},"对齐:",-1)),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[4]||(E[4]=z=>o.unref(h)(o.unref(Be).LEFT))},{default:o.withCtx(()=>[o.createVNode(I)]),_:1})),[[$,"左对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[5]||(E[5]=z=>o.unref(h)(o.unref(Be).HORIZONTAL))},{default:o.withCtx(()=>[o.createVNode(D)]),_:1})),[[$,"水平居中"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[6]||(E[6]=z=>o.unref(h)(o.unref(Be).RIGHT))},{default:o.withCtx(()=>[o.createVNode(V)]),_:1})),[[$,"右对齐"]])]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[7]||(E[7]=z=>o.unref(h)(o.unref(Be).TOP))},{default:o.withCtx(()=>[o.createVNode(B)]),_:1})),[[$,"上对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[8]||(E[8]=z=>o.unref(h)(o.unref(Be).VERTICAL))},{default:o.withCtx(()=>[o.createVNode(R)]),_:1})),[[$,"垂直居中"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:E[9]||(E[9]=z=>o.unref(h)(o.unref(Be).BOTTOM))},{default:o.withCtx(()=>[o.createVNode(F)]),_:1})),[[$,"下对齐"]])]),_:1}),o.createVNode(Ie),o.createElementVNode("div",mR,[o.createVNode(Ut,{min:-1e3,step:5,value:a.value,"onUpdate:value":E[10]||(E[10]=z=>g(z)),style:{width:"45%"}},{prefix:o.withCtx(()=>[...E[23]||(E[23]=[o.createTextVNode(" 水平: ",-1)])]),_:1},8,["value"]),E[25]||(E[25]=o.createElementVNode("div",{style:{width:"10%"}},null,-1)),o.createVNode(Ut,{min:-1e3,step:5,value:i.value,"onUpdate:value":E[11]||(E[11]=z=>y(z)),style:{width:"45%"}},{prefix:o.withCtx(()=>[...E[24]||(E[24]=[o.createTextVNode(" 垂直: ",-1)])]),_:1},8,["value"])]),o.unref(n)?.type!=="line"?(o.openBlock(),o.createElementBlock("div",gR,[o.createVNode(Ut,{min:d.value,max:1500,step:5,disabled:v.value,value:l.value,"onUpdate:value":E[12]||(E[12]=z=>b(z)),style:{width:"45%"}},{prefix:o.withCtx(()=>[...E[26]||(E[26]=[o.createTextVNode(" 宽度: ",-1)])]),_:1},8,["min","disabled","value"]),["image","shape","audio"].includes(o.unref(n)?.type)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[c.value?o.withDirectives((o.openBlock(),o.createBlock(W,{key:0,style:{width:"10%"},class:"icon-btn active",onClick:E[13]||(E[13]=z=>k(!1))},null,512)),[[$,"解除宽高比锁定"]]):o.withDirectives((o.openBlock(),o.createBlock(O,{key:1,style:{width:"10%"},class:"icon-btn",onClick:E[14]||(E[14]=z=>k(!0))},null,512)),[[$,"宽高比锁定"]])],64)):(o.openBlock(),o.createElementBlock("div",yR)),o.createVNode(Ut,{min:d.value,max:800,step:5,disabled:f.value||o.unref(n)?.type==="table",value:s.value,"onUpdate:value":E[15]||(E[15]=z=>S(z)),style:{width:"45%"}},{prefix:o.withCtx(()=>[...E[27]||(E[27]=[o.createTextVNode(" 高度: ",-1)])]),_:1},8,["min","disabled","value"])])):o.createCommentVNode("",!0),["line","video","audio"].includes(o.unref(n)?.type)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(Ie),o.createElementVNode("div",xR,[o.createVNode(Ut,{min:-180,max:180,step:5,value:u.value,"onUpdate:value":E[16]||(E[16]=z=>_(z)),style:{width:"45%"}},{prefix:o.withCtx(()=>[...E[28]||(E[28]=[o.createTextVNode(" 旋转: ",-1)])]),_:1},8,["value"]),E[31]||(E[31]=o.createElementVNode("div",{style:{width:"7%"}},null,-1)),o.createElementVNode("div",{class:"text-btn",onClick:E[17]||(E[17]=z=>w("-")),style:{width:"24%"}},[o.createVNode(P),E[29]||(E[29]=o.createTextVNode(" -45° ",-1))]),o.createElementVNode("div",{class:"text-btn",onClick:E[18]||(E[18]=z=>w("+")),style:{width:"24%"}},[o.createVNode(P,{style:{transform:"rotateY(180deg)"}}),E[30]||(E[30]=o.createTextVNode(" +45° ",-1))])])],64))])}}},bR=oe(wR,[["__scopeId","data-v-458a6267"]]),gd=1e3,SR="click",oa="animate__",a1=[{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"}]}],i1=[{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"}]}],l1=[{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"}]}],_R=[{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"}],kR={class:"element-animation-panel"},CR={key:0,class:"element-animation"},ER={class:"type-title"},TR={class:"pool-item-wrapper"},NR=["onMouseenter","onClick"],IR={key:0,class:"mask"},LR={key:1,class:"tip"},AR={class:"sequence-content"},MR={class:"index"},VR={class:"text"},PR={class:"handler"},DR={key:0,class:"configs"},BR={class:"config-item"},RR={class:"config-item"},$R={class:"config-item"},OR={__name:"ElementAnimationPanel",setup(e){const t={};for(const I of a1)for(const D of I.children)t[D.value]=D.name;for(const I of i1)for(const D of I.children)t[D.value]=D.name;for(const I of l1)for(const D of I.children)t[D.value]=D.name;const n=["in","out","attention"],r=pe(),{handleElement:a,handleElementId:i}=te.storeToRefs(ve()),{currentSlide:l,formatedAnimations:s,currentSlideAnimations:u}=te.storeToRefs(r),c=[{key:"in",label:"入场",color:"#68a490"},{key:"out",label:"退场",color:"#d86344"},{key:"attention",label:"强调",color:"#e8b76a"}],d=o.ref("in"),f=o.ref(!1);o.watch(()=>i.value,()=>{p.value=!1});const v=o.ref(""),p=o.ref(!1),{addHistorySnapshot:h}=Ee(),m=o.computed(()=>{const I=[];for(let D=0;D<s.value.length;D++){const V=s.value[D];for(let B=0;B<V.animations.length;B++){const R=V.animations[B],F=l.value.elements.find(P=>P.id===R.elId);if(!F)continue;const W=gi[F.type],O=t[R.effect];I.push({...R,index:B===0?D+1:"",elType:W,animationEffect:O})}}return I}),g=o.computed(()=>u.value.filter(V=>V.elId===i.value)||[]),y=I=>{const D=u.value.filter(V=>V.id!==I);r.updateSlide({animations:D}),h()},x=I=>{const{newIndex:D,oldIndex:V}=I;if(D===void 0||V===void 0||D===V)return;const B=JSON.parse(JSON.stringify(u.value)),R=B[V];B.splice(V,1),B.splice(D,0,R),r.updateSlide({animations:B}),h()},b=(I,D,V)=>{const B=document.querySelector(`#editable-element-${I} [class^=editable-element-]`);if(B){const R=`${oa}${D}`;document.documentElement.style.setProperty("--animate-duration",`${V}ms`),B.classList.add(`${oa}animated`,R);const F=()=>{document.documentElement.style.removeProperty("--animate-duration"),B.classList.remove(`${oa}animated`,R)};B.addEventListener("animationend",F,{once:!0})}},S=async()=>{f.value=!f.value;for(let I=0;I<m.value.length&&f.value;I++){const D=m.value[I];D.index!==1&&D.trigger!=="meantime"&&await new Promise(V=>setTimeout(V,D.duration+100)),b(D.elId,D.effect,D.duration),I>=m.value.length-1&&(f.value=!1)}},_=(I,D)=>{if(D<100||D>5e3)return;const V=u.value.map(B=>B.id===I?{...B,duration:D}:B);r.updateSlide({animations:V}),h()},k=(I,D)=>{const V=u.value.map(B=>B.id===I?{...B,trigger:D}:B);r.updateSlide({animations:V}),h()},w=(I,D)=>{const V=u.value.map(F=>F.id===C.value?{...F,type:I,effect:D}:F);r.updateSlide({animations:V}),p.value=!1,h();const B=u.value.find(F=>F.elId===i.value),R=B?.duration||gd;setTimeout(()=>{b(i.value,D,R)},0)},C=o.ref(""),E=(I,D)=>{if(C.value){w(I,D);return}const V=JSON.parse(JSON.stringify(u.value));V.push({id:Te.nanoid(10),elId:i.value,type:I,effect:D,duration:gd,trigger:SR}),r.updateSlide({animations:V}),p.value=!1,h(),setTimeout(()=>{b(i.value,D,gd)},0)},L=o.ref(!1),N=I=>{I?setTimeout(()=>L.value=!0,600):L.value=!1},T=I=>{p.value=!0,C.value=I,N(!0)},A={in:a1,out:i1,attention:l1};return(I,D)=>{const V=o.resolveComponent("AiPptEffects"),B=o.resolveComponent("AiPptClick"),R=o.resolveComponent("AiPptPlayOne"),F=o.resolveComponent("AiPptCloseSmall"),W=o.resolveComponent("AiPptSwitch"),O=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",kR,[o.unref(a)?(o.openBlock(),o.createElementBlock("div",CR,[o.createVNode(be,{trigger:"click",value:p.value,"onUpdate:value":[D[3]||(D[3]=P=>p.value=P),D[4]||(D[4]=P=>N(P))],style:{width:"100%"}},{content:o.withCtx(()=>[o.createVNode(Xn,{tabs:c,value:d.value,"onUpdate:value":D[0]||(D[0]=P=>d.value=P),tabsStyle:{marginBottom:"20px"},tabStyle:{width:"33.333%"},spaceAround:""},null,8,["value"]),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(n,P=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[d.value===P?(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["animation-pool",P]),key:P},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A[P],$=>(o.openBlock(),o.createElementBlock("div",{class:"pool-type",key:$.name},[o.createElementVNode("div",ER,o.toDisplayString($.name)+":",1),o.createElementVNode("div",TR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.children,z=>(o.openBlock(),o.createElementBlock("div",{class:"pool-item",key:z.name,onMouseenter:Z=>v.value=z.value,onMouseleave:D[1]||(D[1]=Z=>v.value=""),onClick:Z=>E(P,z.value)},[o.createElementVNode("div",{class:o.normalizeClass(["animation-box",[`${o.unref(oa)}animated`,`${o.unref(oa)}fast`,v.value===z.value&&`${o.unref(oa)}${z.value}`]])},o.toDisplayString(z.name),3)],40,NR))),128))])]))),128)),L.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",IR))],2)):o.createCommentVNode("",!0)],64))),64))]),default:o.withCtx(()=>[o.createVNode(le,{class:"element-animation-btn",onClick:D[2]||(D[2]=P=>C.value="")},{default:o.withCtx(()=>[o.createVNode(V),D[6]||(D[6]=o.createTextVNode(" 添加动画 ",-1))]),_:1})]),_:1},8,["value"])])):(o.openBlock(),o.createElementBlock("div",LR,[o.createVNode(B,{style:{"margin-right":"5px"}}),D[7]||(D[7]=o.createTextVNode(" 选中画布中的元素添加动画 ",-1))])),o.createVNode(Ie),o.createVNode(o.unref(Gf),{class:"animation-sequence",modelValue:m.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".sequence-content",itemKey:"id",onEnd:x},{item:o.withCtx(({element:P})=>[o.createElementVNode("div",{class:o.normalizeClass(["sequence-item",[P.type,{active:o.unref(a)?.id===P.elId}]])},[o.createElementVNode("div",AR,[o.createElementVNode("div",MR,o.toDisplayString(P.index),1),o.createElementVNode("div",VR,"【"+o.toDisplayString(P.elType)+"】"+o.toDisplayString(P.animationEffect),1),o.createElementVNode("div",PR,[o.withDirectives(o.createVNode(R,{class:"handler-btn",onClick:$=>b(P.elId,P.effect,P.duration)},null,8,["onClick"]),[[O,"预览"]]),o.withDirectives(o.createVNode(F,{class:"handler-btn",onClick:$=>y(P.id)},null,8,["onClick"]),[[O,"删除"]])])]),g.value[0]?.elId===P.elId?(o.openBlock(),o.createElementBlock("div",DR,[o.createVNode(Ie,{margin:16}),o.createElementVNode("div",BR,[D[8]||(D[8]=o.createElementVNode("div",{style:{width:"35%"}},"持续时长:",-1)),o.createVNode(Ut,{min:500,max:3e3,step:500,value:P.duration,"onUpdate:value":$=>_(P.id,$),style:{width:"65%"}},null,8,["value","onUpdate:value"])]),o.createElementVNode("div",RR,[D[9]||(D[9]=o.createElementVNode("div",{style:{width:"35%"}},"触发方式:",-1)),o.createVNode(at,{value:P.trigger,"onUpdate:value":$=>k(P.id,$),style:{width:"65%"},options:[{label:"主动触发",value:"click"},{label:"与上一动画同时",value:"meantime"},{label:"上一动画之后",value:"auto"}]},null,8,["value","onUpdate:value"])]),o.createElementVNode("div",$R,[o.createVNode(le,{style:{width:"100%"},onClick:$=>T(P.id)},{default:o.withCtx(()=>[o.createVNode(W),D[10]||(D[10]=o.createTextVNode(" 更换动画 ",-1))]),_:1},8,["onClick"])])])):o.createCommentVNode("",!0)],2)]),_:1},8,["modelValue"]),m.value.length>=2?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createVNode(Ie),o.createVNode(le,{onClick:D[5]||(D[5]=P=>S())},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.value?"停止预览":"预览全部"),1)]),_:1})],64)):o.createCommentVNode("",!0)])}}},FR=oe(OR,[["__scopeId","data-v-01b1a9fa"]]),zR=[{background:"#ffffff",fontColor:"#333333",borderColor:"#41719c",fontname:"",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#5f6f1c",fontname:"",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#a75f0a",fontname:"",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#688e19",fontname:"",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",borderColor:"#4495b0",fontname:"",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",borderColor:"#782009",fontname:"",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",borderColor:"#800c0b",fontname:"",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",borderColor:"#830949",fontname:"",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",borderColor:"#032e45",fontname:"",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",borderColor:"#2d7f8a",fontname:"",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",borderColor:"#7d2b8d",fontname:"",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",borderColor:"#b68317",fontname:"",colors:["#a5644e","#b58b80","#c3986d","#a19574","#c17529","#826277"]},{background:"#333333",fontColor:"#ffffff",borderColor:"#7c91a8",fontname:"",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#2b2b2d",fontColor:"#ffffff",borderColor:"#893011",fontname:"",colors:["#bc451b","#d3ba68","#bb8640","#ad9277","#a55a43","#ad9d7b"]},{background:"#171b1e",fontColor:"#ffffff",borderColor:"#505050",fontname:"",colors:["#6f6f6f","#bfbfa5","#dbd084","#e7bf5f","#e9a039","#cf7133"]}],r4=()=>{const e=pe(),{slides:t,theme:n}=te.storeToRefs(e),{addHistorySnapshot:r}=Ee(),a=d=>{var f,v,p,h,m,g,y,x,b;const S=Array.isArray(d)?d:[d],_=[],k=[],w=[],C=[];for(const A of S){if(A.background)if(A.background.type==="solid"&&A.background.color)_.push({area:1,value:A.background.color});else if(A.background.type==="gradient"&&A.background.gradient){const I=A.background.gradient.colors.length;_.push(...A.background.gradient.colors.map(D=>({area:1/I,value:D.color})))}else _.push({area:1,value:n.value.backgroundColor});for(const I of A.elements){const D=I.width;let V=0;if(I.type==="line"){const[R,F]=I.start,[W,O]=I.end;V=Math.sqrt(Math.pow(Math.abs(R-W),2)+Math.pow(Math.abs(F-O),2))}else V=I.height;const B=D*V;if(I.type==="shape"||I.type==="text"){if(I.fill&&k.push({area:B,value:I.fill}),I.type==="shape"&&I.gradient){const z=I.gradient.colors.length;k.push(...I.gradient.colors.map(Z=>({area:1/z*B,value:Z.color})))}const R=(I.type==="shape"?(f=I.text)===null||f===void 0?void 0:f.content:I.content)||"";if(!R)continue;const F=R.replace(/<[^>]+>/g,"").replace(/\s*/g,""),W=R.match(/<[^>]+color: .+?<\/.+?>/g),O=R.match(/<[^>]+font-family: .+?<\/.+?>/g);let P=1,$=1;if(W)for(const z of W){const Z=z.match(/color: (.+?);/);if(!Z)continue;const Q=z.replace(/<[^>]+>/g,"").replace(/\s*/g,""),J=Z[1],U=Q.length/F.length;P=P-U,w.push({area:B*U,value:J})}if(O)for(const z of O){const Z=z.match(/font-family: (.+?);/);if(!Z)continue;const Q=z.replace(/<[^>]+>/g,"").replace(/\s*/g,""),J=Z[1],U=Q.length/F.length;$=$-U,C.push({area:B*U,value:J})}if(P){const Z=(I.type==="shape"?(v=I.text)===null||v===void 0?void 0:v.defaultColor:I.defaultColor)||n.value.fontColor;w.push({area:B*P,value:Z})}if($){const Z=(I.type==="shape"?(p=I.text)===null||p===void 0?void 0:p.defaultFontName:I.defaultFontName)||n.value.fontName;C.push({area:B*$,value:Z})}}else if(I.type==="table"){const R=I.data.length*I.data[0].length;let F=0;for(const W of I.data)for(const O of W)if(!((h=O.style)===null||h===void 0)&&h.backcolor&&(F+=1,k.push({area:B/R,value:(m=O.style)===null||m===void 0?void 0:m.backcolor})),O.text){const P=O.text.length>=10?1:O.text.length/10;!((g=O.style)===null||g===void 0)&&g.color&&w.push({area:B/R*P,value:(y=O.style)===null||y===void 0?void 0:y.color}),!((x=O.style)===null||x===void 0)&&x.fontname&&w.push({area:B/R*P,value:(b=O.style)===null||b===void 0?void 0:b.fontname})}if(I.theme){const W=1-F/R;k.push({area:B*W,value:I.theme.color})}}else if(I.type==="chart"){I.fill&&k.push({area:B*.6,value:I.fill}),I.themeColors[0]&&k.push({area:B*.3,value:I.themeColors[0]});for(const R of I.themeColors)Ne(R).getAlpha()!==0&&k.push({area:B/I.themeColors.length*.1,value:R})}else I.type==="line"?k.push({area:B,value:I.color}):I.type==="audio"?k.push({area:B,value:I.color}):I.type==="latex"&&w.push({area:B,value:I.color})}}const E={};for(const A of _){const I=Ne(A.value).toRgbString();I!=="rgba(0, 0, 0, 0)"&&(E[I]?E[I]+=A.area:E[I]=A.area)}const L={};for(const A of k){const I=Ne(A.value).toRgbString();I!=="rgba(0, 0, 0, 0)"&&(L[I]?L[I]+=A.area:L[I]=A.area)}const N={};for(const A of w){const I=Ne(A.value).toRgbString();I!=="rgba(0, 0, 0, 0)"&&(N[I]?N[I]+=A.area:N[I]=A.area)}const T={};for(const A of C)T[A.value]?T[A.value]+=A.area:T[A.value]=A.area;return{backgroundColors:Object.keys(E).sort((A,I)=>E[I]-E[A]),themeColors:Object.keys(L).sort((A,I)=>L[I]-L[A]),fontColors:Object.keys(N).sort((A,I)=>N[I]-N[A]),fontNames:Object.keys(T).sort((A,I)=>T[I]-T[A])}},i=d=>{const f={},v=(h,m)=>{const g=Ne(h).setAlpha(1).toRgbString();f[g]?f[g]=f[g]+m:f[g]=m};for(const h of d.elements){const m=h.width,g=h.type==="line"?Z4(h):h.height,y=m*g;if(h.type==="shape"&&Ne(h.fill).getAlpha()!==0&&v(h.fill,y),h.type==="text"&&h.fill&&Ne(h.fill).getAlpha()!==0&&v(h.fill,y),h.type==="image"&&h.colorMask&&Ne(h.colorMask).getAlpha()!==0&&v(h.colorMask,y),h.type==="table"&&h.theme&&Ne(h.theme.color).getAlpha()!==0&&v(h.theme.color,y),h.type==="chart"){for(const x of h.themeColors)Ne(x).getAlpha()!==0&&v(x,y/h.themeColors.length*.1);h.themeColors[0]&&Ne(h.themeColors[0]).getAlpha()!==0&&v(h.themeColors[0],y*.3),h.fill&&Ne(h.fill).getAlpha()!==0&&v(h.fill,y*.6)}h.type==="line"&&Ne(h.color).getAlpha()!==0&&v(h.color,y),h.type==="audio"&&Ne(h.color).getAlpha()!==0&&v(h.color,y)}return Object.keys(f).sort((h,m)=>f[m]-f[h])},l=(d,f)=>{const v=[...f],p=i(d),h={};if(p.length>v.length){const g=Ne(v[0]).analogous(p.length-v.length+10).map(y=>y.toHexString()).slice(1);v.push(...g)}for(let m=0;m<p.length;m++)h[p[m]]=v[m];return h},s=(d,f)=>{const v=l(d,f.colors),p=h=>{const m=Ne(h).getAlpha(),g=v[Ne(h).setAlpha(1).toRgbString()];return g?Ne(g).setAlpha(m).toRgbString():h};(!d.background||d.background.type!=="image")&&(d.background={type:"solid",color:f.background});for(const h of d.elements){if(h.type==="shape"&&(h.fill&&(h.fill=p(h.fill)),h.gradient&&delete h.gradient,h.text&&(h.text.defaultColor=f.fontColor,h.text.defaultFontName=f.fontname,h.text.content&&(h.text.content=h.text.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,"")))),h.type==="text"&&(h.fill&&(h.fill=p(h.fill)),h.defaultColor=f.fontColor,h.defaultFontName=f.fontname,h.content&&(h.content=h.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),h.type==="image"&&h.colorMask&&(h.colorMask=p(h.colorMask)),h.type==="table"){h.theme&&(h.theme.color=p(h.theme.color));for(const m of h.data)for(const g of m)g.style&&(g.style.color=f.fontColor,g.style.fontname=f.fontname)}h.type==="chart"&&(h.themeColors=[...f.colors],h.textColor=f.fontColor),h.type==="line"&&(h.color=p(h.color)),h.type==="audio"&&(h.color=p(h.color)),h.type==="latex"&&(h.color=f.fontColor),"outline"in h&&h.outline&&(f.outline&&(h.outline={...f.outline}),f.borderColor&&(h.outline.color=f.borderColor)),"shadow"in h&&h.shadow&&f.shadow&&(h.shadow=f.shadow)}};return{getSlidesThemeStyles:a,applyPresetTheme:(d,f=!1)=>{if(e.setTheme({backgroundColor:d.background,themeColors:d.colors,fontColor:d.fontColor,outline:{width:2,style:"solid",color:d.borderColor},fontName:d.fontname}),f){const v=JSON.parse(JSON.stringify(t.value));for(const p of v)s(p,d);e.setSlides(v),r()}},applyThemeToAllSlides:(d=!1)=>{const f=JSON.parse(JSON.stringify(t.value)),v={background:n.value.backgroundColor,fontColor:n.value.fontColor,borderColor:d?n.value.outline.color:void 0,fontname:n.value.fontName,colors:n.value.themeColors,outline:d?n.value.outline:void 0,shadow:d?n.value.shadow:void 0};for(const p of f)s(p,v);e.setSlides(f),r()}}},HR={class:"theme-styles-extract"},GR={class:"content"},UR={key:0,class:"config-item"},WR={class:"values"},YR={class:"handler"},XR=["onClick"],qR=["onClick"],ZR={key:1,class:"config-item"},jR={class:"values"},JR={class:"handler"},KR=["onClick"],QR=["onClick"],e$={key:2,class:"config-item"},t$={class:"values"},n$={class:"handler"},r$=["onClick"],o$=["onClick"],a$={key:3,class:"config-item"},i$={class:"values inline"},l$=["onClick"],s$={class:"btns"},u$={__name:"ThemeStylesExtract",emits:["close"],setup(e,{emit:t}){const n=t,r=pe(),{slides:a,currentSlide:i}=te.storeToRefs(r),{getSlidesThemeStyles:l}=r4(),s=[{key:"single",label:"从当前页中提取"},{key:"all",label:"从全部幻灯片提取"}],u=o.ref("single"),c=o.ref({});o.onMounted(()=>{const y={};for(const x of yl)y[x.value]=x.label;c.value=y});const d=o.ref({backgroundColors:[],themeColors:[],fontColors:[],fontNames:[]}),f=o.ref({backgroundColor:0,themeColors:[0],fontColor:0,fontName:0});o.watch(u,()=>{u.value==="single"?d.value=l(i.value):d.value=l(a.value);const y=[];for(let x=0;x<Math.min(d.value.themeColors.length);x++)y.push(x);f.value={backgroundColor:0,fontColor:0,fontName:0,themeColors:y}},{immediate:!0});const v=y=>{r.setTheme(y)},p=()=>{let y=d.value.themeColors.filter((k,w)=>f.value.themeColors.includes(w));y.length>6&&(y=y.slice(0,6),Se.warning("主题色超出数量限制,已自动选取前6个"));const x=d.value.backgroundColors[f.value.backgroundColor],b=d.value.fontColors[f.value.fontColor],S=d.value.fontNames[f.value.fontName],_={};x&&(_.backgroundColor=x),b&&(_.fontColor=b),S&&(_.fontName=S),y.length&&(_.themeColors=y),r.setTheme(_),n("close")},h=y=>{f.value.themeColors.includes(y)?f.value.themeColors=f.value.themeColors.filter(x=>x!==y):f.value.themeColors.push(y)},m=y=>{const x=["#000","#fff"];return Ne.mostReadable(y,x,{includeFallbackColors:!0}).toRgbString()},g=y=>{const x=Ne(y);return x.getAlpha()<1?x.toHex8String().toUpperCase():x.toHexString().toUpperCase()};return(y,x)=>{const b=o.resolveComponent("AiPptCheck");return o.openBlock(),o.createElementBlock("div",HR,[o.createVNode(Xn,{tabs:s,value:u.value,"onUpdate:value":x[0]||(x[0]=S=>u.value=S),tabsStyle:{marginBottom:"12px"},tabStyle:{padding:"8px 12px"}},null,8,["value"]),o.createElementVNode("div",GR,[d.value.fontNames.length?(o.openBlock(),o.createElementBlock("div",UR,[x[2]||(x[2]=o.createElementVNode("div",{class:"label"},"字体:",-1)),o.createElementVNode("div",WR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value.fontNames,(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["value-wrap",{"is-selected":f.value.fontName===_}]),key:S},[o.createElementVNode("div",{class:"value",style:o.normalizeStyle({fontFamily:S})},o.toDisplayString(c.value[S]||S),5),o.createElementVNode("div",YR,[o.createElementVNode("div",{class:o.normalizeClass(["state",{active:f.value.fontName===_}])},[o.createVNode(b)],2),o.createElementVNode("div",{class:"config-btn",onClick:k=>f.value.fontName=_},"选择",8,XR),o.createElementVNode("div",{class:"config-btn",onClick:k=>{v({fontName:S}),f.value.fontName=_}},"应用到主题 ",8,qR)])],2))),128))])])):o.createCommentVNode("",!0),d.value.fontColors.length?(o.openBlock(),o.createElementBlock("div",ZR,[x[3]||(x[3]=o.createElementVNode("div",{class:"label"},"文字颜色:",-1)),o.createElementVNode("div",jR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value.fontColors,(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["value-wrap",{"is-selected":f.value.fontColor===_}]),key:S},[o.createElementVNode("div",{class:"value",style:o.normalizeStyle({backgroundColor:S,color:m(S)})},o.toDisplayString(g(S)),5),o.createElementVNode("div",JR,[o.createElementVNode("div",{class:o.normalizeClass(["state",{active:f.value.fontColor===_}])},[o.createVNode(b)],2),o.createElementVNode("div",{class:"config-btn",onClick:k=>f.value.fontColor=_},"选择",8,KR),o.createElementVNode("div",{class:"config-btn",onClick:k=>{v({fontColor:S}),f.value.fontColor=_}},"应用到主题 ",8,QR)])],2))),128))])])):o.createCommentVNode("",!0),d.value.backgroundColors.length?(o.openBlock(),o.createElementBlock("div",e$,[x[4]||(x[4]=o.createElementVNode("div",{class:"label"},"背景颜色:",-1)),o.createElementVNode("div",t$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value.backgroundColors,(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["value-wrap",{"is-selected":f.value.backgroundColor===_}]),key:S},[o.createElementVNode("div",{class:"value",style:o.normalizeStyle({backgroundColor:S,color:m(S)})},o.toDisplayString(g(S)),5),o.createElementVNode("div",n$,[o.createElementVNode("div",{class:o.normalizeClass(["state",{active:f.value.backgroundColor===_}])},[o.createVNode(b)],2),o.createElementVNode("div",{class:"config-btn",onClick:k=>f.value.backgroundColor=_},"选择",8,r$),o.createElementVNode("div",{class:"config-btn",onClick:k=>{v({backgroundColor:S}),f.value.backgroundColor=_}},"应用到主题",8,o$)])],2))),128))])])):o.createCommentVNode("",!0),d.value.themeColors.length?(o.openBlock(),o.createElementBlock("div",a$,[x[5]||(x[5]=o.createElementVNode("div",{class:"label"},[o.createTextVNode("主题色:"),o.createElementVNode("span",{class:"tip"},"(点击色块排除不要的颜色)")],-1)),o.createElementVNode("div",i$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value.themeColors,(S,_)=>(o.openBlock(),o.createElementBlock("div",{class:"value-wrap",key:S,onClick:k=>h(_)},[o.createElementVNode("div",{class:o.normalizeClass(["value",{disabled:!f.value.themeColors.includes(_)}]),style:o.normalizeStyle({backgroundColor:S})},null,6)],8,l$))),128))])])):o.createCommentVNode("",!0)]),o.createElementVNode("div",s$,[o.createVNode(le,{class:"btn",type:"primary",onClick:x[1]||(x[1]=S=>p())},{default:o.withCtx(()=>[o.createVNode(b),x[6]||(x[6]=o.createTextVNode(" 将选中配置保存为主题 ",-1))]),_:1})])])}}},c$=oe(u$,[["__scopeId","data-v-07832ff1"]]),d$={class:"theme-colors-setting"},f$={class:"row"},v$={class:"label",style:{width:"40%"}},p$={__name:"ThemeColorsSetting",emits:["close"],setup(e,{emit:t}){const n=t,r=pe(),{theme:a}=te.storeToRefs(r),i=o.ref([]);o.onMounted(()=>{const u=[...a.value.themeColors];for(;u.length<6;)u.push("#00000000");i.value=[...u]});const l=()=>{let u=i.value.filter(c=>c!=="#00000000");u.length||(u=["#00000000"]),r.setTheme({themeColors:u}),n("close")},s=u=>{const{newIndex:c,oldIndex:d}=u;if(c===void 0||d===void 0||c===d)return;const f=i.value[d];i.value.splice(d,1),i.value.splice(c,0,f)};return(u,c)=>(o.openBlock(),o.createElementBlock("div",d$,[c[2]||(c[2]=o.createElementVNode("div",{class:"title"},"编辑主题色",-1)),o.createVNode(o.unref(Gf),{class:"list",modelValue:i.value,animation:200,scroll:!0,scrollSensitivity:50,handle:".label",onEnd:s,itemKey:"id"},{item:o.withCtx(({element:d,index:f})=>[o.createElementVNode("div",f$,[o.createElementVNode("div",v$,"幻灯片主题色"+o.toDisplayString(f+1)+":",1),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:d,"onUpdate:modelValue":v=>i.value[f]=v},null,8,["modelValue","onUpdate:modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:d},null,8,["color"])]),_:2},1024)])]),_:1},8,["modelValue"]),o.createVNode(le,{class:"btn",type:"primary",onClick:c[0]||(c[0]=d=>l())},{default:o.withCtx(()=>[...c[1]||(c[1]=[o.createTextVNode("确认",-1)])]),_:1})]))}},h$=oe(p$,[["__scopeId","data-v-43efded4"]]),m$={class:"slide-design-panel"},g$={class:"row"},y$={key:0,class:"background-image-wrapper"},x$={class:"background-image"},w$={key:1,class:"background-gradient-wrapper"},b$={class:"row"},S$={class:"row"},_$={key:0,class:"row"},k$={class:"row"},C$={class:"row"},E$={class:"row"},T$={class:"canvas-size"},N$={class:"title"},I$={class:"row"},L$={class:"row"},A$={class:"row"},M$={class:"row"},V$={class:"row"},P$=["onClick"],D$={class:"row"},B$={class:"row"},R$={class:"row",style:{height:"30px"}},$$={class:"row",style:{height:"30px"}},O$={class:"row",style:{height:"30px"}},F$={class:"row"},z$={class:"row"},H$={class:"row"},G$={class:"theme-list"},U$={class:"colors"},W$={class:"btns"},Y$={__name:"index",setup(e){const t=pe(),{slides:n,currentSlide:r,slideIndex:a,viewportRatio:i,viewportSize:l,theme:s}=te.storeToRefs(t),u=o.ref(!1),c=o.ref(!1),d=o.ref(!1),f=o.ref(0),v=o.ref(["solid","dashed","dotted"]),p=o.computed(()=>r.value.background?r.value.background:{type:"solid",value:"#fff"}),{addHistorySnapshot:h}=Ee(),{applyPresetTheme:m,applyThemeToAllSlides:g}=r4();o.watch(a,()=>{f.value=0});const y=N=>{if(N==="solid"){const T={...p.value,type:"solid",color:p.value.color||"#fff"};t.updateSlide({background:T})}else if(N==="image"){const T={...p.value,type:"image",image:p.value.image||{src:"",size:"cover"}};t.updateSlide({background:T})}else{const T={...p.value,type:"gradient",gradient:p.value.gradient||{type:"linear",colors:[{pos:0,color:"#fff"},{pos:100,color:"#fff"}],rotate:0}};f.value=0,t.updateSlide({background:T})}h()},x=N=>{t.updateSlide({background:{...p.value,...N}}),h()},b=N=>{x({gradient:{...p.value.gradient,...N}})},S=N=>{const T=p.value.gradient.colors.map((A,I)=>I===f.value?{...A,color:N}:A);b({colors:T})},_=N=>{x({image:{...p.value.image,...N}})},k=N=>{const T=N[0];T&&Gr(T).then(A=>_({src:A}))},w=()=>{const N=n.value.map(T=>({...T,background:r.value.background}));t.setSlides(N),h()},C=N=>{t.setTheme(N)},E=N=>{t.setViewportRatio(N)},L=N=>N%1!==0?parseFloat(N.toFixed(1)):Math.floor(N);return(N,T)=>{const A=o.resolveComponent("AiPptPlus"),I=o.resolveComponent("AiPptCheck"),D=o.resolveComponent("AiPptDown"),V=o.resolveComponent("AiPptRight"),B=o.resolveComponent("AiPptPlatte");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",m$,[T[51]||(T[51]=o.createElementVNode("div",{class:"title"},"背景填充",-1)),o.createElementVNode("div",g$,[o.createVNode(at,{style:{flex:"1"},value:p.value.type,"onUpdate:value":T[0]||(T[0]=R=>y(R)),options:[{label:"纯色填充",value:"solid"},{label:"图片填充",value:"image"},{label:"渐变填充",value:"gradient"}]},null,8,["value"]),T[30]||(T[30]=o.createElementVNode("div",{style:{width:"10px"}},null,-1)),p.value.type==="solid"?(o.openBlock(),o.createBlock(be,{key:0,trigger:"click",style:{flex:"1"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:p.value.color,"onUpdate:modelValue":T[1]||(T[1]=R=>x({color:R}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:p.value.color||"#fff"},null,8,["color"])]),_:1})):p.value.type==="image"?(o.openBlock(),o.createBlock(at,{key:1,style:{flex:"1"},value:p.value.image?.size||"cover","onUpdate:value":T[2]||(T[2]=R=>_({size:R})),options:[{label:"缩放",value:"contain"},{label:"拼贴",value:"repeat"},{label:"缩放铺满",value:"cover"}]},null,8,["value"])):(o.openBlock(),o.createBlock(at,{key:2,style:{flex:"1"},value:p.value.gradient?.type||"","onUpdate:value":T[3]||(T[3]=R=>b({type:R})),options:[{label:"线性渐变",value:"linear"},{label:"径向渐变",value:"radial"}]},null,8,["value"]))]),p.value.type==="image"?(o.openBlock(),o.createElementBlock("div",y$,[o.createVNode(ul,{onChange:T[4]||(T[4]=R=>k(R))},{default:o.withCtx(()=>[o.createElementVNode("div",x$,[o.createElementVNode("div",{class:"content",style:o.normalizeStyle({backgroundImage:`url(${p.value.image?.src})`})},[o.createVNode(A)],4)])]),_:1})])):o.createCommentVNode("",!0),p.value.type==="gradient"?(o.openBlock(),o.createElementBlock("div",w$,[o.createElementVNode("div",b$,[o.createVNode(t4,{value:p.value.gradient?.colors||[],index:f.value,"onUpdate:value":T[5]||(T[5]=R=>b({colors:R})),"onUpdate:index":T[6]||(T[6]=R=>f.value=R)},null,8,["value","index"])]),o.createElementVNode("div",S$,[T[31]||(T[31]=o.createElementVNode("div",{style:{width:"40%"}},"当前色块:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:p.value.gradient?.colors[f.value].color,"onUpdate:modelValue":T[7]||(T[7]=R=>S(R))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:p.value.gradient?.colors[f.value].color},null,8,["color"])]),_:1})]),p.value.gradient?.type==="linear"?(o.openBlock(),o.createElementBlock("div",_$,[T[32]||(T[32]=o.createElementVNode("div",{style:{width:"40%"}},"渐变角度:",-1)),o.createVNode(Wt,{min:0,max:360,step:15,value:p.value.gradient.rotate||0,"onUpdate:value":T[8]||(T[8]=R=>b({rotate:R})),style:{width:"60%"}},null,8,["value"])])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",k$,[o.createVNode(le,{style:{flex:"1"},onClick:T[9]||(T[9]=R=>w())},{default:o.withCtx(()=>[o.createVNode(I),T[33]||(T[33]=o.createTextVNode(" 应用背景到全部 ",-1))]),_:1})]),o.createVNode(Ie),o.createElementVNode("div",C$,[o.createVNode(at,{style:{width:"100%"},value:o.unref(i),"onUpdate:value":T[10]||(T[10]=R=>E(R)),options:[{label:"宽屏 16 : 9",value:.5625},{label:"宽屏 16 : 10",value:.625},{label:"标准 4 : 3",value:.75},{label:"纸张 A3 / A4",value:.70710678},{label:"竖向 A3 / A4",value:1.41421356}]},null,8,["value"])]),o.createElementVNode("div",E$,[o.createElementVNode("div",T$,"画布尺寸:"+o.toDisplayString(o.unref(l))+" × "+o.toDisplayString(L(o.unref(l)*o.unref(i))),1)]),o.createVNode(Ie),o.createElementVNode("div",N$,[T[35]||(T[35]=o.createElementVNode("span",null,"全局主题",-1)),o.createElementVNode("span",{class:"more",onClick:T[11]||(T[11]=R=>u.value=!u.value)},[T[34]||(T[34]=o.createElementVNode("span",{class:"text"},"更多",-1)),u.value?(o.openBlock(),o.createBlock(D,{key:0})):(o.openBlock(),o.createBlock(V,{key:1}))])]),o.createElementVNode("div",I$,[T[36]||(T[36]=o.createElementVNode("div",{style:{width:"40%"}},"字体:",-1)),o.createVNode(at,{style:{width:"60%"},value:o.unref(s).fontName,search:"",searchLabel:"搜索字体","onUpdate:value":T[12]||(T[12]=R=>C({fontName:R})),options:o.unref(yl)},null,8,["value","options"])]),o.createElementVNode("div",L$,[T[37]||(T[37]=o.createElementVNode("div",{style:{width:"40%"}},"字体颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(s).fontColor,"onUpdate:modelValue":T[13]||(T[13]=R=>C({fontColor:R}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(s).fontColor},null,8,["color"])]),_:1})]),o.createElementVNode("div",A$,[T[38]||(T[38]=o.createElementVNode("div",{style:{width:"40%"}},"背景颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(s).backgroundColor,"onUpdate:modelValue":T[14]||(T[14]=R=>C({backgroundColor:R}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(s).backgroundColor},null,8,["color"])]),_:1})]),o.createElementVNode("div",M$,[T[39]||(T[39]=o.createElementVNode("div",{style:{width:"40%"}},"主题色:",-1)),o.createVNode(n4,{style:{width:"60%"},colors:o.unref(s).themeColors,onClick:T[15]||(T[15]=R=>d.value=!0)},null,8,["colors"])]),u.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createElementVNode("div",V$,[T[40]||(T[40]=o.createElementVNode("div",{style:{width:"40%"}},"边框样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.value,R=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:R,onClick:F=>C({outline:{...o.unref(s).outline,style:R}})},[o.createVNode(mn,{type:R},null,8,["type"])],8,P$))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{type:o.unref(s).outline.style},null,8,["type"])]),_:1})]),o.createElementVNode("div",D$,[T[41]||(T[41]=o.createElementVNode("div",{style:{width:"40%"}},"边框颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(s).outline.color,"onUpdate:modelValue":T[16]||(T[16]=R=>C({outline:{...o.unref(s).outline,color:R}}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(s).outline.color||"#000"},null,8,["color"])]),_:1})]),o.createElementVNode("div",B$,[T[42]||(T[42]=o.createElementVNode("div",{style:{width:"40%"}},"边框粗细:",-1)),o.createVNode(Ut,{value:o.unref(s).outline.width||0,"onUpdate:value":T[17]||(T[17]=R=>C({outline:{...o.unref(s).outline,width:R}})),style:{width:"60%"}},null,8,["value"])]),o.createElementVNode("div",R$,[T[43]||(T[43]=o.createElementVNode("div",{style:{width:"40%"}},"水平阴影:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:o.unref(s).shadow.h,"onUpdate:value":T[18]||(T[18]=R=>C({shadow:{...o.unref(s).shadow,h:R}}))},null,8,["value"])]),o.createElementVNode("div",$$,[T[44]||(T[44]=o.createElementVNode("div",{style:{width:"40%"}},"垂直阴影:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:-10,max:10,step:1,value:o.unref(s).shadow.v,"onUpdate:value":T[19]||(T[19]=R=>C({shadow:{...o.unref(s).shadow,v:R}}))},null,8,["value"])]),o.createElementVNode("div",O$,[T[45]||(T[45]=o.createElementVNode("div",{style:{width:"40%"}},"模糊距离:",-1)),o.createVNode(Wt,{style:{width:"60%"},min:1,max:20,step:1,value:o.unref(s).shadow.blur,"onUpdate:value":T[20]||(T[20]=R=>C({shadow:{...o.unref(s).shadow,blur:R}}))},null,8,["value"])]),o.createElementVNode("div",F$,[T[46]||(T[46]=o.createElementVNode("div",{style:{width:"40%"}},"阴影颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(s).shadow.color,"onUpdate:modelValue":T[21]||(T[21]=R=>C({shadow:{...o.unref(s).shadow,color:R}}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:o.unref(s).shadow.color},null,8,["color"])]),_:1})])],64)):o.createCommentVNode("",!0),o.createElementVNode("div",z$,[o.createVNode(le,{style:{flex:"1"},onClick:T[22]||(T[22]=R=>o.unref(g)(u.value))},{default:o.withCtx(()=>[o.createVNode(I),T[47]||(T[47]=o.createTextVNode(" 应用主题到全部 ",-1))]),_:1})]),o.createElementVNode("div",H$,[o.createVNode(le,{style:{flex:"1"},onClick:T[23]||(T[23]=R=>c.value=!0)},{default:o.withCtx(()=>[o.createVNode(B),T[48]||(T[48]=o.createTextVNode(" 从幻灯片提取主题 ",-1))]),_:1})]),o.createVNode(Ie),T[52]||(T[52]=o.createElementVNode("div",{class:"title"},"预置主题",-1)),o.createElementVNode("div",G$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(zR),(R,F)=>(o.openBlock(),o.createElementBlock("div",{class:"theme-item",key:F,style:o.normalizeStyle({backgroundColor:R.background,fontFamily:R.fontname})},[o.createElementVNode("div",{class:"theme-item-content",style:o.normalizeStyle({backgroundColor:R.background})},[o.createElementVNode("div",{class:"text",style:o.normalizeStyle({color:R.fontColor})},"文字 Aa",4),o.createElementVNode("div",U$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(R.colors,(W,O)=>(o.openBlock(),o.createElementBlock("div",{class:"color-block",key:O,style:o.normalizeStyle({backgroundColor:W})},null,4))),128))]),o.createElementVNode("div",W$,[o.createVNode(le,{type:"primary",size:"small",onClick:W=>o.unref(m)(R)},{default:o.withCtx(()=>[...T[49]||(T[49]=[o.createTextVNode("设置",-1)])]),_:1},8,["onClick"]),o.createVNode(le,{type:"primary",size:"small",style:{"margin-top":"3px"},onClick:W=>o.unref(m)(R,!0)},{default:o.withCtx(()=>[...T[50]||(T[50]=[o.createTextVNode("设置并应用",-1)])]),_:1},8,["onClick"])])],4)],4))),128))])]),o.createVNode(Hr,{visible:c.value,"onUpdate:visible":T[25]||(T[25]=R=>c.value=R),width:520,closeButton:"",onClosed:T[26]||(T[26]=R=>c.value=!1)},{default:o.withCtx(()=>[o.createVNode(c$,{onClose:T[24]||(T[24]=R=>c.value=!1)})]),_:1},8,["visible"]),o.createVNode(Hr,{visible:d.value,"onUpdate:visible":T[28]||(T[28]=R=>d.value=R),width:310,onClosed:T[29]||(T[29]=R=>d.value=!1)},{default:o.withCtx(()=>[o.createVNode(h$,{onClose:T[27]||(T[27]=R=>d.value=!1)})]),_:1},8,["visible"])],64)}}},X$=oe(Y$,[["__scopeId","data-v-dd5e8b5c"]]),q$={class:"slide-animation-panel"},Z$={class:"animation-pool"},j$=["onClick"],J$={class:"animation-text"},K$={__name:"SlideAnimationPanel",setup(e){const t=pe(),{slides:n,currentSlide:r}=te.storeToRefs(t),a=o.computed(()=>r.value.turningMode||"slideY"),i=_R,{addHistorySnapshot:l}=Ee(),s=c=>{c!==a.value&&(t.updateSlide({turningMode:c}),l())},u=()=>{const c=n.value.map(d=>({...d,turningMode:r.value.turningMode}));t.setSlides(c),Se.success("已应用到全部"),l()};return(c,d)=>{const f=o.resolveComponent("AiPptCheck");return o.openBlock(),o.createElementBlock("div",q$,[o.createElementVNode("div",Z$,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i),v=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["animation-item",{active:a.value===v.value}]),key:v.label,onClick:p=>s(v.value)},[o.createElementVNode("div",{class:o.normalizeClass(["animation-block",v.value])},"P",2),o.createElementVNode("div",J$,o.toDisplayString(v.label),1)],10,j$))),128))]),o.createVNode(le,{style:{width:"100%"},onClick:d[0]||(d[0]=v=>u())},{default:o.withCtx(()=>[o.createVNode(f),d[1]||(d[1]=o.createTextVNode(" 应用到全部 ",-1))]),_:1})])}}},Q$=oe(K$,[["__scopeId","data-v-b68a3398"]]),eO=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=te.storeToRefs(ve()),{currentSlide:r}=te.storeToRefs(e),{addHistorySnapshot:a}=Ee();return{alignActiveElement:l=>{const{minX:s,maxX:u,minY:c,maxY:d}=er(n.value),f=JSON.parse(JSON.stringify(r.value.elements)),v={};for(const p of n.value)if(p.groupId&&!v[p.groupId]){const h=n.value.filter(m=>m.groupId===p.groupId);v[p.groupId]=er(h)}if(l===Be.LEFT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minX-s;p.left=p.left-m}else if("rotate"in p&&p.rotate){const{offsetX:h}=ua({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=s-h}else p.left=s});else if(l===Be.RIGHT)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxX-u;p.left=p.left-m}else{const h=p.type==="line"?Math.max(p.start[0],p.end[0]):p.width;if("rotate"in p&&p.rotate){const{offsetX:m}=ua({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.left=u-h+m}else p.left=u-h}});else if(l===Be.TOP)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].minY-c;p.top=p.top-m}else if("rotate"in p&&p.rotate){const{offsetY:h}=ua({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=c-h}else p.top=c});else if(l===Be.BOTTOM)f.forEach(p=>{if(t.value.includes(p.id))if(p.groupId){const m=v[p.groupId].maxY-d;p.top=p.top-m}else{const h=p.type==="line"?Math.max(p.start[1],p.end[1]):p.height;if("rotate"in p&&p.rotate){const{offsetY:m}=ua({left:p.left,top:p.top,width:p.width,height:p.height,rotate:p.rotate});p.top=d-h+m}else p.top=d-h}});else if(l===Be.HORIZONTAL){const p=(s+u)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],y=(m.maxX+m.minX)/2-p;h.left=h.left-y}else{const m=h.type==="line"?Math.max(h.start[0],h.end[0]):h.width;h.left=p-m/2}})}else if(l===Be.VERTICAL){const p=(c+d)/2;f.forEach(h=>{if(t.value.includes(h.id))if(h.groupId){const m=v[h.groupId],y=(m.maxY+m.minY)/2-p;h.top=h.top-y}else{const m=h.type==="line"?Math.max(h.start[1],h.end[1]):h.height;h.top=p-m/2}})}e.updateSlide({elements:f}),a()}}},tO=()=>{const e=pe(),{activeElementIdList:t,activeElementList:n}=te.storeToRefs(ve()),{currentSlide:r}=te.storeToRefs(e),{addHistorySnapshot:a}=Ee();return{displayItemCount:o.computed(()=>{let u=0;const c=[];for(const d of n.value)d.groupId?c.includes(d.groupId)||(c.push(d.groupId),u+=1):u+=1;return u}),uniformHorizontalDisplay:()=>{const{minX:u,maxX:c}=er(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(r.value.elements)),v=[];let p=[];for(const _ of d)if(_.groupId)p.find(w=>w.groupId===_.groupId)?p=p.map(w=>w.groupId===_.groupId?{...w,els:[...w.els,_]}:w):p.push({groupId:_.groupId,els:[_]});else{const{minX:k,maxX:w}=fn(_);v.push({min:k,max:w,el:_})}const h=[];for(const _ of p){const{minX:k,maxX:w}=er(_.els);h.push({min:k,max:w,els:_.els})}const m=[...v,...h];m.sort((_,k)=>_.min-k.min);let g=0;for(const _ of m){const k=_.max-_.min;g+=k}const y=(c-u-g)/(m.length-1),x=[],b=m[0];let S={min:b.min,max:b.max};if("el"in b)x.push({pos:b.min,el:b.el});else for(const _ of b.els){const{minX:k}=fn(_);x.push({pos:k,el:_})}for(let _=1;_<m.length;_++){const k=m[_],w=S.max-S.min,C=S.min+w+y,E=k.max-k.min;if(S={min:C,max:C+E},"el"in k)x.push({pos:C,el:k.el});else for(const L of k.els){const{minX:N}=fn(L),T=N-k.min;x.push({pos:C+T,el:L})}}for(const _ of f)if(t.value.includes(_.id)){for(const k of x)if(k.el.id===_.id)if("rotate"in _&&_.rotate){const{offsetX:w}=ua({left:_.left,top:_.top,width:_.width,height:_.height,rotate:_.rotate});_.left=k.pos-w}else _.left=k.pos}e.updateSlide({elements:f}),a()},uniformVerticalDisplay:()=>{const{minY:u,maxY:c}=er(n.value),d=JSON.parse(JSON.stringify(n.value)),f=JSON.parse(JSON.stringify(r.value.elements)),v=[];let p=[];for(const _ of d)if(_.groupId)p.find(w=>w.groupId===_.groupId)?p=p.map(w=>w.groupId===_.groupId?{...w,els:[...w.els,_]}:w):p.push({groupId:_.groupId,els:[_]});else{const{minY:k,maxY:w}=fn(_);v.push({min:k,max:w,el:_})}const h=[];for(const _ of p){const{minY:k,maxY:w}=er(_.els);h.push({min:k,max:w,els:_.els})}const m=[...v,...h];m.sort((_,k)=>_.min-k.min);let g=0;for(const _ of m){const k=_.max-_.min;g+=k}const y=(c-u-g)/(m.length-1),x=[],b=m[0];let S={min:b.min,max:b.max};if("el"in b)x.push({pos:b.min,el:b.el});else for(const _ of b.els){const{minY:k}=fn(_);x.push({pos:k,el:_})}for(let _=1;_<m.length;_++){const k=m[_],w=S.max-S.min,C=S.min+w+y,E=k.max-k.min;if(S={min:C,max:C+E},"el"in k)x.push({pos:C,el:k.el});else for(const L of k.els){const{minY:N}=fn(L),T=N-k.min;x.push({pos:C+T,el:L})}}for(const _ of f)if(t.value.includes(_.id)){for(const k of x)if(k.el.id===_.id)if("rotate"in _&&_.rotate){const{offsetY:w}=ua({left:_.left,top:_.top,width:_.width,height:_.height,rotate:_.rotate});_.top=k.pos-w}else _.top=k.pos}e.updateSlide({elements:f}),a()}}},nO={class:"multi-position-panel"},rO={__name:"MultiPositionPanel",setup(e){const{canCombine:t,combineElements:n,uncombineElements:r}=qf(),{alignActiveElement:a}=eO(),{alignElementToCanvas:i}=Jf(),{displayItemCount:l,uniformHorizontalDisplay:s,uniformVerticalDisplay:u}=tO(),c=d=>{t.value?a(d):i(d)};return(d,f)=>{const v=o.resolveComponent("AiPptAlignLeft"),p=o.resolveComponent("AiPptAlignHorizontally"),h=o.resolveComponent("AiPptAlignRight"),m=o.resolveComponent("AiPptAlignTop"),g=o.resolveComponent("AiPptAlignVertically"),y=o.resolveComponent("AiPptAlignBottom"),x=o.resolveComponent("AiPptGroup"),b=o.resolveComponent("AiPptUngroup"),S=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",nO,[o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[0]||(f[0]=_=>c(o.unref(Be).LEFT))},{default:o.withCtx(()=>[o.createVNode(v)]),_:1})),[[S,"左对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[1]||(f[1]=_=>c(o.unref(Be).HORIZONTAL))},{default:o.withCtx(()=>[o.createVNode(p)]),_:1})),[[S,"水平居中"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[2]||(f[2]=_=>c(o.unref(Be).RIGHT))},{default:o.withCtx(()=>[o.createVNode(h)]),_:1})),[[S,"右对齐"]])]),_:1}),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[3]||(f[3]=_=>c(o.unref(Be).TOP))},{default:o.withCtx(()=>[o.createVNode(m)]),_:1})),[[S,"上对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[4]||(f[4]=_=>c(o.unref(Be).VERTICAL))},{default:o.withCtx(()=>[o.createVNode(g)]),_:1})),[[S,"垂直居中"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{style:{flex:"1"},onClick:f[5]||(f[5]=_=>c(o.unref(Be).BOTTOM))},{default:o.withCtx(()=>[o.createVNode(y)]),_:1})),[[S,"下对齐"]])]),_:1}),o.unref(l)>2?(o.openBlock(),o.createBlock(rt,{key:0,class:"row"},{default:o.withCtx(()=>[o.createVNode(le,{style:{flex:"1"},onClick:f[6]||(f[6]=_=>o.unref(s)())},{default:o.withCtx(()=>[...f[10]||(f[10]=[o.createTextVNode("水平均匀分布",-1)])]),_:1}),o.createVNode(le,{style:{flex:"1"},onClick:f[7]||(f[7]=_=>o.unref(u)())},{default:o.withCtx(()=>[...f[11]||(f[11]=[o.createTextVNode("垂直均匀分布",-1)])]),_:1})]),_:1})):o.createCommentVNode("",!0),o.createVNode(Ie),o.createVNode(rt,{class:"row"},{default:o.withCtx(()=>[o.createVNode(le,{disabled:!o.unref(t),onClick:f[8]||(f[8]=_=>o.unref(n)()),style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(x,{style:{"margin-right":"3px"}}),f[12]||(f[12]=o.createTextVNode("组合 ",-1))]),_:1},8,["disabled"]),o.createVNode(le,{disabled:o.unref(t),onClick:f[9]||(f[9]=_=>o.unref(r)()),style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(b,{style:{"margin-right":"3px"}}),f[13]||(f[13]=o.createTextVNode("取消组合 ",-1))]),_:1},8,["disabled"])]),_:1})])}}},oO=oe(rO,[["__scopeId","data-v-4ceeb2a2"]]),aO={class:"multi-style-panel"},iO={class:"row"},lO={class:"row"},sO=["onClick"],uO={class:"row"},cO={class:"row"},dO={__name:"MultiStylePanel",setup(e){const t=pe(),{richTextAttrs:n,activeElementList:r}=te.storeToRefs(ve()),{addHistorySnapshot:a}=Ee(),i=(p,h)=>{t.updateElement({id:p,props:h}),a()},l=o.ref(["solid","dashed","dotted"]),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"],u=o.ref("#fff"),c=o.ref({width:0,color:"#fff",style:"solid"}),d=p=>{for(const h of r.value){if((h.type==="text"||h.type==="shape"||h.type==="chart")&&i(h.id,{fill:p}),h.type==="table"){const m=JSON.parse(JSON.stringify(h.data));for(let g=0;g<m.length;g++)for(let y=0;y<m[g].length;y++){const x=m[g][y].style||{};m[g][y].style={...x,backcolor:p}}i(h.id,{data:m})}h.type==="audio"&&i(h.id,{color:p})}u.value=p},f=p=>{for(const h of r.value){if(h.type==="text"||h.type==="image"||h.type==="shape"||h.type==="table"||h.type==="chart"){const g={outline:{...h.outline||{width:2,color:"#000",style:"solid"},...p}};i(h.id,g)}h.type==="line"&&i(h.id,p)}c.value={...c.value,...p}},v=(p,h)=>{var m;for(const g of r.value){if((g.type==="text"||g.type==="shape"&&(!((m=g.text)===null||m===void 0)&&m.content))&&Tt.emit(mt.RICH_TEXT_COMMAND,{target:g.id,action:{command:p,value:h}}),g.type==="table"){const y=JSON.parse(JSON.stringify(g.data));for(let x=0;x<y.length;x++)for(let b=0;b<y[x].length;b++){const S=y[x][b].style||{};y[x][b].style={...S,[p]:h}}i(g.id,{data:y})}g.type==="latex"&&p==="color"&&i(g.id,{color:h})}};return(p,h)=>{const m=o.resolveComponent("AiPptFontSize"),g=o.resolveComponent("AiPptAddText"),y=o.resolveComponent("AiPptText"),x=o.resolveComponent("AiPptHighLight"),b=o.resolveComponent("AiPptAlignTextLeft"),S=o.resolveComponent("AiPptAlignTextCenter"),_=o.resolveComponent("AiPptAlignTextRight"),k=o.resolveComponent("AiPptAlignTextBoth"),w=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",aO,[o.createElementVNode("div",iO,[h[10]||(h[10]=o.createElementVNode("div",{style:{width:"40%"}},"填充颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:u.value,"onUpdate:modelValue":h[0]||(h[0]=C=>d(C))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:u.value},null,8,["color"])]),_:1})]),o.createVNode(Ie),o.createElementVNode("div",lO,[h[11]||(h[11]=o.createElementVNode("div",{style:{width:"40%"}},"边框样式:",-1)),o.createVNode(_a,{style:{width:"60%"}},{options:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,C=>(o.openBlock(),o.createElementBlock("div",{class:"option",key:C,onClick:E=>f({style:C})},[o.createVNode(mn,{type:C},null,8,["type"])],8,sO))),128))]),label:o.withCtx(()=>[o.createVNode(mn,{type:c.value.style},null,8,["type"])]),_:1})]),o.createElementVNode("div",uO,[h[12]||(h[12]=o.createElementVNode("div",{style:{width:"40%"}},"边框颜色:",-1)),o.createVNode(be,{trigger:"click",style:{width:"60%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:c.value.color,"onUpdate:modelValue":h[1]||(h[1]=C=>f({color:C}))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createVNode(ot,{color:c.value.color||"#000"},null,8,["color"])]),_:1})]),o.createElementVNode("div",cO,[h[13]||(h[13]=o.createElementVNode("div",{style:{width:"40%"}},"边框粗细:",-1)),o.createVNode(Ut,{value:c.value.width||0,"onUpdate:value":h[2]||(h[2]=C=>f({width:C})),style:{width:"60%"}},null,8,["value"])]),o.createVNode(Ie),o.createVNode(op,{class:"row"},{default:o.withCtx(()=>[o.createVNode(at,{style:{width:"60%"},value:o.unref(n).fontname,search:"",searchLabel:"搜索字体","onUpdate:value":h[3]||(h[3]=C=>v("fontname",C)),options:o.unref(yl)},{icon:o.withCtx(()=>[o.createVNode(m)]),_:1},8,["value","options"]),o.createVNode(at,{style:{width:"40%"},value:o.unref(n).fontsize,search:"",searchLabel:"搜索字号","onUpdate:value":h[4]||(h[4]=C=>v("fontsize",C)),options:s.map(C=>({label:C,value:C}))},{icon:o.withCtx(()=>[o.createVNode(g)]),_:1},8,["value","options"])]),_:1}),o.createVNode(rt,{class:"row",passive:""},{default:o.withCtx(()=>[o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(n).color,"onUpdate:modelValue":h[5]||(h[5]=C=>v("color",C))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{first:"",color:o.unref(n).color},{default:o.withCtx(()=>[o.createVNode(y)]),_:1},8,["color"])),[[w,"文字颜色"]])]),_:1}),o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:o.unref(n).backcolor,"onUpdate:modelValue":h[6]||(h[6]=C=>v("backcolor",C))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Da,{color:o.unref(n).backcolor},{default:o.withCtx(()=>[o.createVNode(x)]),_:1},8,["color"])),[[w,"文字高亮"]])]),_:1}),o.withDirectives((o.openBlock(),o.createBlock(le,{class:"font-size-btn",style:{width:"20%"},onClick:h[7]||(h[7]=C=>v("fontsize-add","2"))},{default:o.withCtx(()=>[o.createVNode(m),h[14]||(h[14]=o.createTextVNode("+ ",-1))]),_:1})),[[w,"增大字号"]]),o.withDirectives((o.openBlock(),o.createBlock(le,{last:"",class:"font-size-btn",style:{width:"20%"},onClick:h[8]||(h[8]=C=>v("fontsize-reduce","2"))},{default:o.withCtx(()=>[o.createVNode(m),h[15]||(h[15]=o.createTextVNode("- ",-1))]),_:1})),[[w,"减小字号"]])]),_:1}),o.createVNode(ir,{class:"row","button-style":"solid",value:o.unref(n).align,"onUpdate:value":h[9]||(h[9]=C=>v("align",C))},{default:o.withCtx(()=>[o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"left",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(b)]),_:1})),[[w,"左对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"center",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(S)]),_:1})),[[w,"居中"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"right",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(_)]),_:1})),[[w,"右对齐"]]),o.withDirectives((o.openBlock(),o.createBlock(Ze,{value:"justify",style:{flex:"1"}},{default:o.withCtx(()=>[o.createVNode(k)]),_:1})),[[w,"两端对齐"]])]),_:1},8,["value"])])}}},fO=oe(dO,[["__scopeId","data-v-ddc888c5"]]),vO={class:"toolbar"},pO={class:"content"},hO={__name:"index",setup(e){const t=ve(),{activeElementIdList:n,activeElementList:r,activeGroupElementId:a,toolbarState:i}=te.storeToRefs(t),l=[{label:"样式",key:xt.EL_STYLE},{label:"位置",key:xt.EL_POSITION},{label:"动画",key:xt.EL_ANIMATION}],s=[{label:"设计",key:xt.SLIDE_DESIGN},{label:"切换",key:xt.SLIDE_ANIMATION},{label:"动画",key:xt.EL_ANIMATION}],u=[{label:"样式(多选)",key:xt.MULTI_STYLE},{label:"位置(多选)",key:xt.MULTI_POSITION}],c=v=>{t.setToolbarState(v)},d=o.computed(()=>{if(n.value.length){if(n.value.length>1)return a.value&&r.value.find(p=>p.id===a.value)?l:u}else return s;return l});o.watch(d,()=>{const v=d.value.map(p=>p.key);v.includes(i.value)||t.setToolbarState(v[0])});const f=o.computed(()=>({[xt.EL_STYLE]:pR,[xt.EL_POSITION]:bR,[xt.EL_ANIMATION]:FR,[xt.SLIDE_DESIGN]:X$,[xt.SLIDE_ANIMATION]:Q$,[xt.MULTI_STYLE]:fO,[xt.MULTI_POSITION]:oO})[i.value]||null);return(v,p)=>(o.openBlock(),o.createElementBlock("div",vO,[o.createVNode(Xn,{tabs:d.value,value:o.unref(i),card:"","onUpdate:value":p[0]||(p[0]=h=>c(h))},null,8,["tabs","value"]),o.createElementVNode("div",pO,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(f.value)))])]))}},mO=oe(hO,[["__scopeId","data-v-b1315b39"]]),gO={class:"editor"},yO={__name:"Editor",props:{value:{type:String,required:!0}},emits:["update"],setup(e,{expose:t,emit:n}){const r=e,a=n,i=ve(),l=o.useTemplateRef("editorViewRef");let s;const u=o.ref(),c=o.ref(),d=o.useTemplateRef("menuRef"),f=()=>{c.value&&c.value.hide()},v=qe.debounce(function(){a("update",s.dom.innerHTML)},300,{trailing:!0}),p=()=>{i.setDisableHotkeysState(!0)},h=()=>{i.setDisableHotkeysState(!1)};t({updateTextContent:()=>{if(!s)return;const{doc:x,tr:b}=s.state;s.dispatch(b.replaceRangeWith(0,x.content.size,Qf(r.value)))}});const g=()=>{const x=window.getSelection();if(!x||!x.anchorNode||!x.focusNode||x.isCollapsed||x.type==="Caret"||x.type==="None")return;const b=x.getRangeAt(0);if(c.value){u.value=_d(s);const{x:S,y:_,left:k,top:w}=b.getBoundingClientRect();c.value.setProps({getReferenceClientRect:()=>({x:S,y:_,left:k,top:w,height:0,width:0,right:k,bottom:w})}),c.value.show()}},y=(x,b)=>{if(x==="color"&&b){const S=s.state.schema.marks.forecolor.create({color:b});vt(s),Rn(s,S)}else if(x==="backcolor"&&b){const S=s.state.schema.marks.backcolor.create({backcolor:b});vt(s),Rn(s,S)}else if(x==="bold")vt(s),ze.toggleMark(s.state.schema.marks.strong)(s.state,s.dispatch);else if(x==="em")vt(s),ze.toggleMark(s.state.schema.marks.em)(s.state,s.dispatch);else if(x==="underline")vt(s),ze.toggleMark(s.state.schema.marks.underline)(s.state,s.dispatch);else if(x==="strikethrough")vt(s),ze.toggleMark(s.state.schema.marks.strikethrough)(s.state,s.dispatch);else if(x==="bulletList"){const{bullet_list:S,list_item:_}=s.state.schema.nodes;Ns(S,_,"")(s.state,s.dispatch)}else if(x==="orderedList"){const{ordered_list:S,list_item:_}=s.state.schema.nodes;Ns(S,_,"")(s.state,s.dispatch)}else if(x==="clear"){vt(s);const{$from:S,$to:_}=s.state.selection;s.dispatch(s.state.tr.removeMark(S.pos,_.pos))}s.focus(),v(),u.value=_d(s)};return o.onMounted(()=>{s=H1(l.value,r.value,{handleDOMEvents:{focus:p,blur:h,mouseup:g,mousedown:()=>{var x;(x=window.getSelection())===null||x===void 0||x.removeAllRanges(),f()},keydown:f,input:v}},{placeholder:"点击输入演讲者备注"}),c.value=zf(l.value,{duration:0,content:d.value,interactive:!0,trigger:"manual",placement:"top-start",hideOnClick:"toggle",offset:[0,6]})}),o.onUnmounted(()=>{s&&s.destroy()}),(x,b)=>{const S=o.resolveComponent("AiPptTextBold"),_=o.resolveComponent("AiPptTextItalic"),k=o.resolveComponent("AiPptTextUnderline"),w=o.resolveComponent("AiPptStrikethrough"),C=o.resolveComponent("AiPptText"),E=o.resolveComponent("AiPptHighLight"),L=o.resolveComponent("AiPptList"),N=o.resolveComponent("AiPptOrderedList"),T=o.resolveComponent("AiPptFormat"),A=o.resolveDirective("click-outside");return o.withDirectives((o.openBlock(),o.createElementBlock("div",gO,[o.createElementVNode("div",{class:"prosemirror-editor",ref_key:"editorViewRef",ref:l},null,512),o.createElementVNode("div",{class:"menu",ref_key:"menuRef",ref:d},[o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.bold}),onClick:b[0]||(b[0]=I=>y("bold"))},[o.createVNode(S)],2),o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.em}),onClick:b[1]||(b[1]=I=>y("em"))},[o.createVNode(_)],2),o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.underline}),onClick:b[2]||(b[2]=I=>y("underline"))},[o.createVNode(k)],2),o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.strikethrough}),onClick:b[3]||(b[3]=I=>y("strikethrough"))},[o.createVNode(w)],2),o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:u.value?.color,"onUpdate:modelValue":b[4]||(b[4]=I=>y("color",I))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createElementVNode("button",null,[o.createVNode(C)])]),_:1}),o.createVNode(be,{trigger:"click",style:{width:"30%"}},{content:o.withCtx(()=>[o.createVNode(Ge,{modelValue:u.value?.backcolor,"onUpdate:modelValue":b[5]||(b[5]=I=>y("backcolor",I))},null,8,["modelValue"])]),default:o.withCtx(()=>[o.createElementVNode("button",null,[o.createVNode(E)])]),_:1}),o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.bulletList}),onClick:b[6]||(b[6]=I=>y("bulletList"))},[o.createVNode(L)],2),o.createElementVNode("button",{class:o.normalizeClass({active:u.value?.orderedList}),onClick:b[7]||(b[7]=I=>y("orderedList"))},[o.createVNode(N)],2),o.createElementVNode("button",{onClick:b[8]||(b[8]=I=>y("clear"))},[o.createVNode(T)])],512)])),[[A,f]])}}},xO=oe(yO,[["__scopeId","data-v-1a19b3e0"]]),wO={class:"remark"},bO={__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const n=e,r=t,a=pe(),{currentSlide:i}=te.storeToRefs(a),l=o.useTemplateRef("editorRef");o.watch(()=>{var d;return(d=i.value)===null||d===void 0?void 0:d.id},()=>{o.nextTick(()=>{l.value&&i.value&&l.value.updateTextContent()})},{immediate:!0});const s=o.computed(()=>{var d;return((d=i.value)===null||d===void 0?void 0:d.remark)||""}),u=d=>{a.updateSlide({remark:d})},c=d=>{let f=!0;const v=d.pageY,p=n.height;document.onmousemove=h=>{if(!f)return;let y=-(h.pageY-v)+p;y<40&&(y=40),y>360&&(y=360),r("update:height",y)},document.onmouseup=()=>{f=!1,document.onmousemove=null,document.onmouseup=null}};return(d,f)=>(o.openBlock(),o.createElementBlock("div",wO,[o.createElementVNode("div",{class:"resize-handler",onMousedown:f[0]||(f[0]=v=>c(v))},null,32),o.createVNode(xO,{value:s.value,ref_key:"editorRef",ref:l,onUpdate:f[1]||(f[1]=v=>u(v))},null,8,["value"])]))}},SO=oe(bO,[["__scopeId","data-v-96fb20c8"]]),_O={class:"export-img-dialog"},kO={class:"thumbnails-view"},CO={class:"configs"},EO={class:"row"},TO={class:"row"},NO={key:0,class:"row"},IO=["data-range"],LO={class:"row"},AO={class:"row"},MO={class:"config-item"},VO={class:"btns"},PO={__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const n=t,{slides:r,currentSlide:a}=te.storeToRefs(pe()),i=o.useTemplateRef("imageThumbnailsRef"),l=o.ref("all"),s=o.ref([1,r.value.length]),u=o.ref("jpeg"),c=o.ref(1),d=o.ref(!1),f=o.computed(()=>l.value==="all"?r.value:l.value==="current"?[a.value]:r.value.filter((m,g)=>{const[y,x]=s.value;return g>=y-1&&g<=x-1})),{exportImage:v,exporting:p}=sl(),h=()=>{i.value&&v(i.value,u.value,c.value,d.value)};return(m,g)=>{const y=o.resolveComponent("AiPptDownload"),x=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",_O,[o.createElementVNode("div",kO,[o.createElementVNode("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:i},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(f.value,b=>(o.openBlock(),o.createBlock(Pa,{class:"thumbnail",key:b.id,slide:b,size:1600},null,8,["slide"]))),128))],512)]),o.createElementVNode("div",CO,[o.createElementVNode("div",EO,[g[9]||(g[9]=o.createElementVNode("div",{class:"title"},"导出格式:",-1)),o.createVNode(ir,{class:"config-item",value:u.value,"onUpdate:value":g[0]||(g[0]=b=>u.value=b)},{default:o.withCtx(()=>[o.createVNode(Ze,{style:{width:"50%"},value:"jpeg"},{default:o.withCtx(()=>[...g[7]||(g[7]=[o.createTextVNode("JPEG",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"50%"},value:"png"},{default:o.withCtx(()=>[...g[8]||(g[8]=[o.createTextVNode("PNG",-1)])]),_:1})]),_:1},8,["value"])]),o.createElementVNode("div",TO,[g[13]||(g[13]=o.createElementVNode("div",{class:"title"},"导出范围:",-1)),o.createVNode(ir,{class:"config-item",value:l.value,"onUpdate:value":g[1]||(g[1]=b=>l.value=b)},{default:o.withCtx(()=>[o.createVNode(Ze,{style:{width:"33.33%"},value:"all"},{default:o.withCtx(()=>[...g[10]||(g[10]=[o.createTextVNode("全部",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"current"},{default:o.withCtx(()=>[...g[11]||(g[11]=[o.createTextVNode("当前页",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"custom"},{default:o.withCtx(()=>[...g[12]||(g[12]=[o.createTextVNode("自定义",-1)])]),_:1})]),_:1},8,["value"])]),l.value==="custom"?(o.openBlock(),o.createElementBlock("div",NO,[o.createElementVNode("div",{class:"title","data-range":`(${s.value[0]} ~ ${s.value[1]})`},"自定义范围:",8,IO),o.createVNode(Wt,{class:"config-item",range:"",min:1,max:o.unref(r).length,step:1,value:s.value,"onUpdate:value":g[2]||(g[2]=b=>s.value=b)},null,8,["max","value"])])):o.createCommentVNode("",!0),o.createElementVNode("div",LO,[g[14]||(g[14]=o.createElementVNode("div",{class:"title"},"图片质量:",-1)),o.createVNode(Wt,{class:"config-item",min:0,max:1,step:.1,value:c.value,"onUpdate:value":g[3]||(g[3]=b=>c.value=b)},null,8,["value"])]),o.createElementVNode("div",AO,[g[15]||(g[15]=o.createElementVNode("div",{class:"title"},"忽略在线字体:",-1)),o.createElementVNode("div",MO,[o.withDirectives(o.createVNode(wn,{value:d.value,"onUpdate:value":g[4]||(g[4]=b=>d.value=b)},null,8,["value"]),[[x,"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"]])])])]),o.createElementVNode("div",VO,[o.createVNode(le,{class:"btn export",type:"primary",onClick:g[5]||(g[5]=b=>h())},{default:o.withCtx(()=>[o.createVNode(y),g[16]||(g[16]=o.createTextVNode(" 导出图片 ",-1))]),_:1}),o.createVNode(le,{class:"btn close",onClick:g[6]||(g[6]=b=>n("close"))},{default:o.withCtx(()=>[...g[17]||(g[17]=[o.createTextVNode("关闭",-1)])]),_:1})]),o.createVNode(Ts,{loading:o.unref(p),tip:"正在导出..."},null,8,["loading"])])}}},DO=oe(PO,[["__scopeId","data-v-f24cc531"]]),BO={class:"export-json-dialog"},RO={class:"preview"},$O={class:"btns"},OO={__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const n=t,{slides:r,viewportRatio:a,title:i,viewportSize:l,theme:s}=te.storeToRefs(pe()),{exportJSON:u}=sl(),c=o.computed(()=>({title:i.value,width:l.value,height:l.value*a.value,theme:s.value,slides:r.value}));return(d,f)=>{const v=o.resolveComponent("AiPptDownload");return o.openBlock(),o.createElementBlock("div",BO,[o.createElementVNode("div",RO,[o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]),o.createElementVNode("div",$O,[o.createVNode(le,{class:"btn export",type:"primary",onClick:f[0]||(f[0]=p=>o.unref(u)())},{default:o.withCtx(()=>[o.createVNode(v),f[2]||(f[2]=o.createTextVNode(" 导出 JSON ",-1))]),_:1}),o.createVNode(le,{class:"btn close",onClick:f[1]||(f[1]=p=>n("close"))},{default:o.withCtx(()=>[...f[3]||(f[3]=[o.createTextVNode("关闭",-1)])]),_:1})])])}}},FO=oe(OO,[["__scopeId","data-v-2820c6fc"]]),zO=()=>{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},HO=(e,t,n)=>{const r="<!DOCTYPE html>";let a="";const i=document.styleSheets;if(i){for(const f of i)if(f.cssRules)for(const v of f.cssRules)a+=v.cssText}const{width:l,height:s,margin:u}=n,c=`
|
|
37
|
+
<head>
|
|
38
|
+
<style type="text/css">
|
|
39
|
+
${a}
|
|
40
|
+
html, body {
|
|
41
|
+
height: auto;
|
|
42
|
+
overflow: auto;
|
|
43
|
+
}
|
|
44
|
+
@media print {
|
|
45
|
+
@page {
|
|
46
|
+
size: ${l+2*u}px ${s+2*u}px;
|
|
47
|
+
margin: ${u}px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
51
|
+
</head>
|
|
52
|
+
`,d="<body>"+t.innerHTML+"</body>";e.open(),e.write(`
|
|
53
|
+
${r}
|
|
54
|
+
<html>
|
|
55
|
+
${c}
|
|
56
|
+
${d}
|
|
57
|
+
</html>
|
|
58
|
+
`),e.close()},GO=(e,t)=>{const n=zO(),r=n.contentWindow;if(!n.contentDocument||!r)return;HO(n.contentDocument,e,t);const a=()=>{r.focus(),r.print()},i=()=>{n.removeEventListener("load",a),r.removeEventListener("afterprint",i),document.body.removeChild(n)};n.addEventListener("load",a),r.addEventListener("afterprint",i)},UO={class:"export-pdf-dialog"},WO={class:"thumbnails-view"},YO={class:"configs"},XO={class:"row"},qO={class:"row"},ZO={class:"row"},jO={class:"config-item"},JO={class:"btns"},KO={__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const n=t,{slides:r,currentSlide:a,viewportRatio:i}=te.storeToRefs(pe()),l=o.useTemplateRef("pdfThumbnailsRef"),s=o.ref("all"),u=o.ref(1),c=o.ref(!0),d=()=>{if(!l.value)return;const f={width:1600,height:s.value==="all"?1600*i.value*u.value:1600*i.value,margin:c.value?50:0};GO(l.value,f)};return(f,v)=>{const p=o.resolveComponent("AiPptDownload");return o.openBlock(),o.createElementBlock("div",UO,[o.createElementVNode("div",WO,[o.createElementVNode("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:l},[s.value==="current"?(o.openBlock(),o.createBlock(Pa,{key:0,class:"thumbnail",slide:o.unref(a),size:1600},null,8,["slide"])):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(o.unref(r),(h,m)=>(o.openBlock(),o.createBlock(Pa,{class:o.normalizeClass(["thumbnail",{"break-page":(m+1)%u.value===0}]),key:h.id,slide:h,size:1600},null,8,["class","slide"]))),128))],512)]),o.createElementVNode("div",YO,[o.createElementVNode("div",XO,[v[7]||(v[7]=o.createElementVNode("div",{class:"title"},"导出范围:",-1)),o.createVNode(ir,{class:"config-item",value:s.value,"onUpdate:value":v[0]||(v[0]=h=>s.value=h)},{default:o.withCtx(()=>[o.createVNode(Ze,{style:{width:"50%"},value:"all"},{default:o.withCtx(()=>[...v[5]||(v[5]=[o.createTextVNode("全部",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"50%"},value:"current"},{default:o.withCtx(()=>[...v[6]||(v[6]=[o.createTextVNode("当前页",-1)])]),_:1})]),_:1},8,["value"])]),o.createElementVNode("div",qO,[v[8]||(v[8]=o.createElementVNode("div",{class:"title"},"每页数量:",-1)),o.createVNode(at,{class:"config-item",value:u.value,"onUpdate:value":v[1]||(v[1]=h=>u.value=h),options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3}]},null,8,["value"])]),o.createElementVNode("div",ZO,[v[9]||(v[9]=o.createElementVNode("div",{class:"title"},"边缘留白:",-1)),o.createElementVNode("div",jO,[o.createVNode(wn,{value:c.value,"onUpdate:value":v[2]||(v[2]=h=>c.value=h)},null,8,["value"])])]),v[10]||(v[10]=o.createElementVNode("div",{class:"tip"}," 提示:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1))]),o.createElementVNode("div",JO,[o.createVNode(le,{class:"btn export",type:"primary",onClick:v[3]||(v[3]=h=>d())},{default:o.withCtx(()=>[o.createVNode(p),v[11]||(v[11]=o.createTextVNode(" 打印 / 导出 PDF ",-1))]),_:1}),o.createVNode(le,{class:"btn close",onClick:v[4]||(v[4]=h=>n("close"))},{default:o.withCtx(()=>[...v[12]||(v[12]=[o.createTextVNode("关闭",-1)])]),_:1})])])}}},QO=oe(KO,[["__scopeId","data-v-1f841b41"]]),eF={class:"export-pptx-dialog"},tF={class:"configs"},nF={class:"row"},rF={key:0,class:"row"},oF=["data-range"],aF={class:"row"},iF={class:"config-item"},lF={class:"row"},sF={class:"config-item"},uF={key:1,class:"tip"},cF={class:"btns"},dF={__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const n=t,{slides:r,currentSlide:a}=te.storeToRefs(pe()),{exportPPTX:i,exporting:l}=sl(),s=o.ref("all"),u=o.ref([1,r.value.length]),c=o.ref(!0),d=o.ref(!0),f=o.computed(()=>s.value==="all"?r.value:s.value==="current"?[a.value]:r.value.filter((v,p)=>{const[h,m]=u.value;return p>=h-1&&p<=m-1}));return(v,p)=>{const h=o.resolveComponent("AiPptDownload"),m=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock("div",eF,[o.createElementVNode("div",tF,[o.createElementVNode("div",nF,[p[9]||(p[9]=o.createElementVNode("div",{class:"title"},"导出范围:",-1)),o.createVNode(ir,{class:"config-item",value:s.value,"onUpdate:value":p[0]||(p[0]=g=>s.value=g)},{default:o.withCtx(()=>[o.createVNode(Ze,{style:{width:"33.33%"},value:"all"},{default:o.withCtx(()=>[...p[6]||(p[6]=[o.createTextVNode("全部",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"current"},{default:o.withCtx(()=>[...p[7]||(p[7]=[o.createTextVNode("当前页",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"custom"},{default:o.withCtx(()=>[...p[8]||(p[8]=[o.createTextVNode("自定义",-1)])]),_:1})]),_:1},8,["value"])]),s.value==="custom"?(o.openBlock(),o.createElementBlock("div",rF,[o.createElementVNode("div",{class:"title","data-range":`(${u.value[0]} ~ ${u.value[1]})`},"自定义范围:",8,oF),o.createVNode(Wt,{class:"config-item",range:"",min:1,max:o.unref(r).length,step:1,value:u.value,"onUpdate:value":p[1]||(p[1]=g=>u.value=g)},null,8,["max","value"])])):o.createCommentVNode("",!0),o.createElementVNode("div",aF,[p[10]||(p[10]=o.createElementVNode("div",{class:"title"},"忽略音频/视频:",-1)),o.createElementVNode("div",iF,[o.withDirectives(o.createVNode(wn,{value:d.value,"onUpdate:value":p[2]||(p[2]=g=>d.value=g)},null,8,["value"]),[[m,"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭【忽略音视频】选项,但要注意这将会大幅增加导出用时。"]])])]),o.createElementVNode("div",lF,[p[11]||(p[11]=o.createElementVNode("div",{class:"title"},"覆盖默认母版:",-1)),o.createElementVNode("div",sF,[o.createVNode(wn,{value:c.value,"onUpdate:value":p[3]||(p[3]=g=>c.value=g)},null,8,["value"])])]),d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",uF," 提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。 "))]),o.createElementVNode("div",cF,[o.createVNode(le,{class:"btn export",type:"primary",onClick:p[4]||(p[4]=g=>o.unref(i)(f.value,c.value,d.value))},{default:o.withCtx(()=>[o.createVNode(h),p[12]||(p[12]=o.createTextVNode(" 导出 PPTX ",-1))]),_:1}),o.createVNode(le,{class:"btn close",onClick:p[5]||(p[5]=g=>n("close"))},{default:o.withCtx(()=>[...p[13]||(p[13]=[o.createTextVNode("关闭",-1)])]),_:1})]),o.createVNode(Ts,{loading:o.unref(l),tip:"正在导出..."},null,8,["loading"])])}}},fF=oe(dF,[["__scopeId","data-v-b0e5d6fa"]]),vF={class:"export-pptist-dialog"},pF={class:"configs"},hF={class:"row"},mF={key:0,class:"row"},gF=["data-range"],yF={class:"btns"},xF={__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const n=t,{slides:r,currentSlide:a}=te.storeToRefs(pe()),{exportSpecificFile:i}=sl(),l=o.ref("all"),s=o.ref([1,r.value.length]),u=o.computed(()=>l.value==="all"?r.value:l.value==="current"?[a.value]:r.value.filter((c,d)=>{const[f,v]=s.value;return d>=f-1&&d<=v-1}));return(c,d)=>{const f=o.resolveComponent("AiPptDownload");return o.openBlock(),o.createElementBlock("div",vF,[o.createElementVNode("div",pF,[o.createElementVNode("div",hF,[d[7]||(d[7]=o.createElementVNode("div",{class:"title"},"导出范围:",-1)),o.createVNode(ir,{class:"config-item",value:l.value,"onUpdate:value":d[0]||(d[0]=v=>l.value=v)},{default:o.withCtx(()=>[o.createVNode(Ze,{style:{width:"33.33%"},value:"all"},{default:o.withCtx(()=>[...d[4]||(d[4]=[o.createTextVNode("全部",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"current"},{default:o.withCtx(()=>[...d[5]||(d[5]=[o.createTextVNode("当前页",-1)])]),_:1}),o.createVNode(Ze,{style:{width:"33.33%"},value:"custom"},{default:o.withCtx(()=>[...d[6]||(d[6]=[o.createTextVNode("自定义",-1)])]),_:1})]),_:1},8,["value"])]),l.value==="custom"?(o.openBlock(),o.createElementBlock("div",mF,[o.createElementVNode("div",{class:"title","data-range":`(${s.value[0]} ~ ${s.value[1]})`},"自定义范围:",8,gF),o.createVNode(Wt,{class:"config-item",range:"",min:1,max:o.unref(r).length,step:1,value:s.value,"onUpdate:value":d[1]||(d[1]=v=>s.value=v)},null,8,["max","value"])])):o.createCommentVNode("",!0),d[8]||(d[8]=o.createElementVNode("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1))]),o.createElementVNode("div",yF,[o.createVNode(le,{class:"btn export",type:"primary",onClick:d[2]||(d[2]=v=>o.unref(i)(u.value))},{default:o.withCtx(()=>[o.createVNode(f),d[9]||(d[9]=o.createTextVNode(" 导出 PPTIST 文件 ",-1))]),_:1}),o.createVNode(le,{class:"btn close",onClick:d[3]||(d[3]=v=>n("close"))},{default:o.withCtx(()=>[...d[10]||(d[10]=[o.createTextVNode("关闭",-1)])]),_:1})])])}}},wF=oe(xF,[["__scopeId","data-v-7bde908f"]]),bF={class:"export-dialog"},SF={class:"content"},_F={__name:"index",setup(e){const t=ve(),{dialogForExport:n}=te.storeToRefs(t),r=t.setDialogForExport,a=[{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],i=o.computed(()=>{const l={image:DO,json:FO,pdf:QO,pptx:fF,pptist:wF};return n.value&&l[n.value]||null});return(l,s)=>(o.openBlock(),o.createElementBlock("div",bF,[o.createVNode(Xn,{tabs:a,value:o.unref(n),card:"","onUpdate:value":s[0]||(s[0]=u=>o.unref(r)(u))},null,8,["value"]),o.createElementVNode("div",SF,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.value),{onClose:s[1]||(s[1]=u=>o.unref(r)(""))},null,32))])]))}},kF=oe(_F,[["__scopeId","data-v-db8ac4b2"]]),CF=()=>{const e=pe(),t=ve(),{currentSlide:n}=te.storeToRefs(e),{activeElementIdList:r,hiddenElementIdList:a}=te.storeToRefs(t);return{toggleHideElement:u=>{a.value.includes(u)?t.setHiddenElementIdList(a.value.filter(c=>c!==u)):t.setHiddenElementIdList([...a.value,u]),r.value.includes(u)&&t.setActiveElementIdList([])},showAllElements:()=>{const u=n.value.elements.map(d=>d.id),c=a.value.filter(d=>!u.includes(d));t.setHiddenElementIdList(c)},hideAllElements:()=>{const u=n.value.elements.map(c=>c.id);t.setHiddenElementIdList([...a.value,...u]),r.value.length&&t.setActiveElementIdList([])}}},EF={class:"title"},TF={__name:"MoveablePanel",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},minWidth:{type:Number,default:20},minHeight:{type:Number,default:20},maxWidth:{type:Number,default:500},maxHeight:{type:Number,default:500},left:{type:Number,default:10},top:{type:Number,default:10},title:{type:String,default:""},moveable:{type:Boolean,default:!0},resizeable:{type:Boolean,default:!1},contentStyle:{type:Object}},emits:["close"],setup(e,{emit:t}){const n=e,r=t,a=o.ref(0),i=o.ref(0),l=o.ref(0),s=o.ref(0),u=o.useTemplateRef("moveablePanelRef"),c=o.computed(()=>{var h;return s.value?s.value:((h=u.value)===null||h===void 0?void 0:h.clientHeight)||0}),d=()=>{l.value=n.width,s.value=n.height},f=()=>{n.left>=0?a.value=n.left:a.value=document.body.clientWidth+n.left-(n.width||l.value),n.top>=0?i.value=n.top:i.value=document.body.clientHeight+n.top-(n.height||c.value)};o.onMounted(()=>{d(),o.nextTick(f)}),o.watch(()=>[n.left,n.top,n.width,n.height],()=>{d(),o.nextTick(f)});const v=h=>{if(!n.moveable)return;let m=!0;const g=document.body.clientWidth,y=document.body.clientHeight,x=h.pageX,b=h.pageY,S=a.value,_=i.value;document.onmousemove=k=>{if(!m)return;const w=k.pageX-x,C=k.pageY-b;let E=S+w,L=_+C;E<0&&(E=0),L<0&&(L=0),E+l.value>g&&(E=g-l.value),L+c.value>y&&(L=y-c.value),a.value=E,i.value=L},document.onmouseup=()=>{m=!1,document.onmousemove=null,document.onmouseup=null}},p=h=>{if(!n.resizeable)return;let m=!0;const g=h.pageX,y=h.pageY,x=l.value,b=s.value;document.onmousemove=S=>{if(!m)return;const _=S.pageX-g,k=S.pageY-y;let w=x+_,C=b+k;w<n.minWidth&&(w=n.minWidth),C<n.minHeight&&(C=n.minHeight),w>n.maxWidth&&(w=n.maxWidth),C>n.maxHeight&&(C=n.maxHeight),l.value=w,s.value=C},document.onmouseup=()=>{m=!1,document.onmousemove=null,document.onmouseup=null}};return(h,m)=>{const g=o.resolveComponent("AiPptClose");return o.openBlock(),o.createElementBlock("div",{class:"moveable-panel",ref_key:"moveablePanelRef",ref:u,style:o.normalizeStyle({width:l.value+"px",height:s.value?s.value+"px":"auto",left:a.value+"px",top:i.value+"px"})},[e.title?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"header",onMousedown:m[2]||(m[2]=y=>v(y))},[o.createElementVNode("div",EF,o.toDisplayString(e.title),1),o.createElementVNode("div",{class:"close-btn",onMousedown:m[0]||(m[0]=o.withModifiers(()=>{},["stop"])),onClick:m[1]||(m[1]=y=>r("close"))},[o.createVNode(g)],32)],32),o.createElementVNode("div",{class:"content",style:o.normalizeStyle(e.contentStyle||{})},[o.renderSlot(h.$slots,"default",{},void 0,!0)],4)],64)):(o.openBlock(),o.createElementBlock("div",{key:1,class:"content",style:o.normalizeStyle(e.contentStyle||{}),onMousedown:m[3]||(m[3]=y=>v(y))},[o.renderSlot(h.$slots,"default",{},void 0,!0)],36)),e.resizeable?(o.openBlock(),o.createElementBlock("div",{key:2,class:"resizer",onMousedown:m[4]||(m[4]=y=>p(y))},null,32)):o.createCommentVNode("",!0)],4)}}},xl=oe(TF,[["__scopeId","data-v-d48e478a"]]),NF={key:0,class:"handler"},IF={class:"btns"},LF={key:0,class:"icon-btns"},AF={class:"element-list"},MF={key:0,class:"group-els"},VF=["onClick","onDblclick"],PF=["id","value","onBlur","onKeydown"],DF={key:1,class:"name"},BF={class:"icons"},RF=["onClick","onDblclick"],$F=["id","value","onBlur","onKeydown"],OF={key:1,class:"name"},FF={class:"icons"},s1=200,zF=360,HF={__name:"SelectionPanel",setup(e){const t=pe(),n=ve(),{currentSlide:r}=te.storeToRefs(t),{handleElement:a,handleElementId:i,activeElementIdList:l,activeGroupElementId:s,hiddenElementIdList:u}=te.storeToRefs(n),{orderElement:c}=iu(),{selectElement:d}=au(),{toggleHideElement:f,showAllElements:v,hideAllElements:p}=CF(),h=o.ref(-270),m=o.ref(90),g=o.computed(()=>{const w=[];for(const C of r.value.elements)if(C.groupId){const E=w[w.length-1];E&&E.type==="group"&&E.id&&E.id===C.groupId?E.elements.push(C):w.push({type:"group",id:C.groupId,elements:[C]})}else w.push(C);return w}),y=(w,C)=>{if(i.value===C||u.value.includes(C))return;const E=w.elements.map(L=>L.id);n.setActiveElementIdList(E),n.setHandleElementId(C),o.nextTick(()=>n.setActiveGroupElementId(C))},x=o.ref(""),b=(w,C)=>{const E=w.target.value;t.updateElement({id:C,props:{name:E}}),x.value=""},S=w=>{x.value=w,o.nextTick(()=>{document.querySelector(`#select-panel-input-${w}`).focus()})},_=()=>{n.setSelectPanelState(!1)},k=()=>{const w=document.querySelector(".center-body");if(!w)return;const C=w.getBoundingClientRect();h.value=Math.round(C.right-s1),m.value=Math.round(C.top)};return o.onMounted(()=>{o.nextTick(k)}),(w,C)=>{const E=o.resolveComponent("AiPptDown"),L=o.resolveComponent("AiPptUp"),N=o.resolveComponent("AiPptPreviewClose"),T=o.resolveComponent("AiPptPreviewOpen");return o.openBlock(),o.createBlock(xl,{class:"select-panel",width:s1,height:zF,title:`选择(${o.unref(l).length}/${o.unref(r).elements.length})`,left:h.value,top:m.value,onClose:C[4]||(C[4]=A=>_())},{default:o.withCtx(()=>[g.value.length?(o.openBlock(),o.createElementBlock("div",NF,[o.createElementVNode("div",IF,[o.createVNode(le,{size:"small",style:{"margin-right":"5px"},onClick:C[0]||(C[0]=A=>o.unref(v)())},{default:o.withCtx(()=>[...C[5]||(C[5]=[o.createTextVNode("全部显示",-1)])]),_:1}),o.createVNode(le,{size:"small",onClick:C[1]||(C[1]=A=>o.unref(p)())},{default:o.withCtx(()=>[...C[6]||(C[6]=[o.createTextVNode("全部隐藏",-1)])]),_:1})]),o.unref(a)?(o.openBlock(),o.createElementBlock("div",LF,[o.createVNode(E,{class:"icon-btn",onClick:C[2]||(C[2]=A=>o.unref(c)(o.unref(a),o.unref(ct).UP))}),o.createVNode(L,{class:"icon-btn",onClick:C[3]||(C[3]=A=>o.unref(c)(o.unref(a),o.unref(ct).DOWN))})])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("div",AF,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,A=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:A.id},[A.type==="group"?(o.openBlock(),o.createElementBlock("div",MF,[C[7]||(C[7]=o.createElementVNode("div",{class:"group-title"},"组合",-1)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.elements,I=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["item",{active:o.unref(l).includes(I.id),"group-active":o.unref(s).includes(I.id)}]),key:I.id,onClick:D=>y(A,I.id),onDblclick:D=>S(I.id)},[x.value===I.id?(o.openBlock(),o.createElementBlock("input",{key:0,id:`select-panel-input-${I.id}`,value:I.name||o.unref(gi)[I.type],class:"input",type:"text",onBlur:D=>b(D,I.id),onKeydown:o.withKeys(D=>b(D,I.id),["enter"])},null,40,PF)):(o.openBlock(),o.createElementBlock("div",DF,o.toDisplayString(I.name||o.unref(gi)[I.type]),1)),o.createElementVNode("div",BF,[o.unref(u).includes(I.id)?(o.openBlock(),o.createBlock(N,{key:0,style:{"font-size":"17px"},onClick:o.withModifiers(D=>o.unref(f)(I.id),["stop"])},null,8,["onClick"])):(o.openBlock(),o.createBlock(T,{key:1,style:{"font-size":"17px"},onClick:o.withModifiers(D=>o.unref(f)(I.id),["stop"])},null,8,["onClick"]))])],42,VF))),128))])):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["item",{active:o.unref(l).includes(A.id)}]),onClick:I=>o.unref(d)(A.id),onDblclick:I=>S(A.id)},[x.value===A.id?(o.openBlock(),o.createElementBlock("input",{key:0,id:`select-panel-input-${A.id}`,value:A.name||o.unref(gi)[A.type],class:"input",type:"text",onBlur:I=>b(I,A.id),onKeydown:o.withKeys(I=>b(I,A.id),["enter"])},null,40,$F)):(o.openBlock(),o.createElementBlock("div",OF,o.toDisplayString(A.name||o.unref(gi)[A.type]),1)),o.createElementVNode("div",FF,[o.unref(u).includes(A.id)?(o.openBlock(),o.createBlock(N,{key:0,style:{"font-size":"17px"},onClick:o.withModifiers(I=>o.unref(f)(A.id),["stop"])},null,8,["onClick"])):(o.openBlock(),o.createBlock(T,{key:1,style:{"font-size":"17px"},onClick:o.withModifiers(I=>o.unref(f)(A.id),["stop"])},null,8,["onClick"]))])],42,RF))],64))),128))])]),_:1},8,["title","left","top"])}}},GF=oe(HF,[["__scopeId","data-v-abc1ff9b"]]),UF=()=>{const e=ve(),t=pe(),{handleElement:n}=te.storeToRefs(e),{slides:r,slideIndex:a,currentSlide:i}=te.storeToRefs(t),l=o.ref(""),s=o.ref(""),u=o.ref([]),c=o.ref(-1),d=o.ref("g"),f=()=>{const N=[],T=new RegExp(l.value,d.value),A=/(<([^>]+)>)/g;for(const I of r.value)for(const D of I.elements)if(D.type==="text"){const B=D.content.replace(A,"").match(T);B&&N.push(...new Array(B.length).fill({slideId:I.id,elId:D.id,elType:D.type}))}else if(D.type==="shape"&&D.text&&D.text.content){const B=D.text.content.replace(A,"").match(T);B&&N.push(...new Array(B.length).fill({slideId:I.id,elId:D.id,elType:D.type}))}else if(D.type==="table")for(let V=0;V<D.data.length;V++){const B=D.data[V];for(let R=0;R<B.length;R++){const F=B[R];if(!F.text)continue;const O=F.text.replace(A,"").match(T);O&&N.push(...new Array(O.length).fill({slideId:I.id,elId:D.id,elType:D.type,cellIndex:[V,R]}))}}N.length?(u.value=N,c.value=0,x()):(Se.warning("未查找到匹配项"),y())},v=N=>{const T=[...N.childNodes],A=[];for(;T.length;){const I=T.shift();I.nodeType===I.TEXT_NODE?I.wholeText&&A.push(I):T.unshift(...I.childNodes)}return A},p=N=>{let T=0;return N.map(I=>{const D=T,V=T+I.wholeText.length;return T=V,{text:I.wholeText,startIdx:D,endIdx:V}})},h=(N,T)=>{const A=new RegExp(T,d.value),I=[];let D=A.exec(N);for(;D;)I.push(D),D=A.exec(N);return I},m=(N,T,A,I)=>{for(let D=A.length-1;D>=0;D--){const V=A[D],B=V.index,R=B+V[0].length;for(let F=0;F<T.length;F++){const{text:W,startIdx:O,endIdx:P}=T[F];if(P<B)continue;if(O>=R)break;let $=N[F];const z=Math.max(0,B-O),Z=Math.min(P,R)-O-z;z>0&&($=$.splitText(z)),Z<$.wholeText.length&&$.splitText(Z);const Q=document.createElement("mark");Q.dataset.index=I+D+"",Q.innerText=W.substring(z,z+Z),$.parentNode.replaceChild(Q,$)}}},g=(N,T)=>{for(const A of N)A.innerHTML=A.innerHTML.replace(new RegExp(l.value,d.value),()=>`<mark data-index=${T++}>${l.value}</mark>`)},y=()=>{const N=document.querySelectorAll(".editable-element mark");for(const T of N)setTimeout(()=>{const A=T.parentNode,I=T.textContent;A.replaceChild(document.createTextNode(I),T)},0)},x=()=>{y(),setTimeout(()=>{for(let N=0;N<u.value.length;N++){const T=u.value[N-1],A=u.value[N];if(A.slideId!==i.value.id||T&&T.elId===A.elId)continue;const I=document.querySelector(`#editable-element-${A.elId}`);if(I)if(A.elType==="table"){const D=I.querySelectorAll(".cell-text");g(D,N)}else{const D=v(I),V=p(D),B=V.map(({text:F})=>F).join(""),R=h(B,l.value);m(D,V,R,N)}}},0)},b=()=>{const N=document.querySelectorAll("mark[data-index]");for(const T of N)setTimeout(()=>{const A=T.dataset.index;A!==void 0&&+A===c.value?T.classList.add("active"):T.classList.remove("active")},0)},S=()=>{if(c.value===-1)return;const N=u.value[c.value];if(N.slideId===i.value.id)setTimeout(b,0);else{const T=r.value.findIndex(A=>A.id===N.slideId);T!==-1&&t.updateSlideIndex(T)}},_=()=>{if(!l.value)return Se.warning("请先输入查找内容");e.setActiveElementIdList([]),c.value===-1?f():c.value<u.value.length-1?c.value+=1:c.value=0,S()},k=()=>{if(!l.value)return Se.warning("请先输入查找内容");e.setActiveElementIdList([]),c.value===-1?f():c.value>0?c.value-=1:c.value=u.value.length-1,S()},w=()=>{if(!l.value)return;if(c.value===-1){_();return}const N=u.value[c.value];let T=null;if(N.elType==="table"){const[V,B]=N.cellIndex;T=document.querySelector(`#editable-element-${N.elId} .cell[data-cell-index="${V}_${B}"] .cell-text`)}else T=document.querySelector(`#editable-element-${N.elId} .ProseMirror`);if(!T)return;const A=document.createElement("div");A.innerHTML=T.innerHTML;let I=!1;const D=A.querySelectorAll("mark[data-index]");for(const V of D){const B=V.parentNode;if(V.classList.contains("active"))I?B.removeChild(V):(B.replaceChild(document.createTextNode(s.value),V),I=!0);else{const R=V.textContent;B.replaceChild(document.createTextNode(R),V)}}if(N.elType==="text"){const V={content:A.innerHTML};t.updateElement({id:N.elId,props:V})}else if(N.elType==="shape"){const V=i.value.elements.find(B=>B.id===N.elId);if(V&&V.type==="shape"&&V.text){const B={text:{...V.text,content:A.innerHTML}};t.updateElement({id:N.elId,props:B})}}else if(N.elType==="table"){const V=i.value.elements.find(B=>B.id===N.elId);if(V&&V.type==="table"){const R={data:V.data.map((F,W)=>W===N.cellIndex[0]?F.map((O,P)=>P===N.cellIndex[1]?{...O,text:A.innerHTML}:O):F)};t.updateElement({id:N.elId,props:R})}}u.value.splice(c.value,1),u.value.length?(c.value>u.value.length-1&&(c.value=0),o.nextTick(()=>{x(),S()})):c.value=-1},C=()=>{var N;if(l.value){if(c.value===-1){_();return}for(let T=0;T<u.value.length;T++){const A=u.value[T-1],I=u.value[T];if(A&&A.elId===I.elId)continue;const D=r.value.find(R=>R.id===I.slideId);if(!D)continue;const V=D.elements.find(R=>R.id===I.elId);if(!V)continue;const B=document.createElement("div");if(V.type==="text"?B.innerHTML=V.content:V.type==="shape"&&(B.innerHTML=((N=V.text)===null||N===void 0?void 0:N.content)||""),I.elType==="table"){const F={data:V.data.map(W=>W.map(O=>O.text?{...O,text:O.text.replace(new RegExp(l.value,"g"),s.value)}:O))};t.updateElement({id:I.elId,slideId:I.slideId,props:F})}else{const R=v(B),F=p(R),W=F.map(({text:z})=>z).join(""),O=h(W,l.value);m(R,F,O,T);const P=B.querySelectorAll("mark[data-index]");let $=-1;for(const z of P){const Z=+z.dataset.index,Q=z.parentNode;Z===$?Q.removeChild(z):(Q.replaceChild(document.createTextNode(s.value),z),$=Z)}if(I.elType==="text"){const z={content:B.innerHTML};t.updateElement({id:I.elId,slideId:I.slideId,props:z})}else if(I.elType==="shape"){const z=i.value.elements.find(Z=>Z.id===I.elId);if(z&&z.type==="shape"&&z.text){const Z={text:{...z.text,content:B.innerHTML}};t.updateElement({id:I.elId,slideId:I.slideId,props:Z})}}}}u.value=[],c.value=-1}},E=()=>{c.value=-1,u.value=[],l.value||y()};return o.watch(l,E),o.watch(a,()=>{o.nextTick(()=>{x(),setTimeout(b,0)})}),o.watch(n,()=>{n.value&&(c.value=-1,u.value=[],y())}),o.onBeforeUnmount(y),{searchWord:l,replaceWord:s,searchResults:u,searchIndex:c,modifiers:d,searchNext:_,searchPrev:k,replace:w,replaceAll:C,toggleModifiers:()=>{d.value=d.value==="g"?"gi":"g",E()}}},WF={class:"panel-head"},YF={class:"count"},XF={key:1,class:"footer"},u1=330,qF={__name:"QuickSearchPanel",setup(e){const t=ve(),{searchWord:n,replaceWord:r,searchResults:a,searchIndex:i,modifiers:l,searchNext:s,searchPrev:u,replace:c,replaceAll:d,toggleModifiers:f}=UF(),v=o.ref("search"),p=o.ref(-270),h=o.ref(90),m=[{key:"search",label:"查找"},{key:"replace",label:"替换"}],g=()=>{t.setSearchPanelState(!1)},y=o.useTemplateRef("searchInpRef"),x=()=>{const b=document.querySelector(".center-body");if(!b)return;const S=b.getBoundingClientRect();p.value=Math.round(S.right-u1),h.value=Math.round(S.top)};return o.onMounted(()=>{o.nextTick(x),y.value.focus()}),o.watch(v,()=>{o.nextTick(()=>{y.value.focus()})}),(b,S)=>{const _=o.resolveComponent("AiPptClose"),k=o.resolveComponent("AiPptLeft"),w=o.resolveComponent("AiPptRight"),C=o.resolveDirective("tooltip");return o.openBlock(),o.createBlock(xl,{class:"search-panel",width:u1,height:0,left:p.value,top:h.value},{default:o.withCtx(()=>[o.createElementVNode("div",WF,[o.createVNode(Xn,{tabs:m,value:v.value,"onUpdate:value":S[0]||(S[0]=E=>v.value=E)},null,8,["value"]),o.createElementVNode("div",{class:"close-btn",onClick:S[1]||(S[1]=E=>g()),onMousedown:S[2]||(S[2]=o.withModifiers(()=>{},["stop"]))},[o.createVNode(_)],32)]),o.createElementVNode("div",{class:o.normalizeClass(["content",v.value]),onMousedown:S[12]||(S[12]=o.withModifiers(()=>{},["stop"]))},[o.createVNode(Mr,{class:"input",value:o.unref(n),"onUpdate:value":S[6]||(S[6]=E=>o.isRef(n)?n.value=E:null),placeholder:"输入查找内容",onEnter:S[7]||(S[7]=E=>o.unref(s)()),ref_key:"searchInpRef",ref:y},{suffix:o.withCtx(()=>[o.createElementVNode("span",YF,o.toDisplayString(o.unref(i)+1)+"/"+o.toDisplayString(o.unref(a).length),1),o.createVNode(Ie,{type:"vertical"}),o.withDirectives((o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(["ignore-case",{active:o.unref(l)==="g"}]),onClick:S[3]||(S[3]=E=>o.unref(f)())},[...S[13]||(S[13]=[o.createTextVNode("Aa",-1)])],2)),[[C,"忽略大小写"]]),o.createVNode(Ie,{type:"vertical"}),o.withDirectives(o.createVNode(k,{class:"next-btn left",onClick:S[4]||(S[4]=E=>o.unref(u)())},null,512),[[C,"上一个"]]),o.withDirectives(o.createVNode(w,{class:"next-btn right",onClick:S[5]||(S[5]=E=>o.unref(s)())},null,512),[[C,"下一个"]])]),_:1},8,["value"]),v.value==="replace"?(o.openBlock(),o.createBlock(Mr,{key:0,class:"input",value:o.unref(r),"onUpdate:value":S[8]||(S[8]=E=>o.isRef(r)?r.value=E:null),placeholder:"输入替换内容",onEnter:S[9]||(S[9]=E=>o.unref(c)())},null,8,["value"])):o.createCommentVNode("",!0),v.value==="replace"?(o.openBlock(),o.createElementBlock("div",XF,[o.createVNode(le,{disabled:!o.unref(n),style:{"margin-left":"5px"},onClick:S[10]||(S[10]=E=>o.unref(c)())},{default:o.withCtx(()=>[...S[14]||(S[14]=[o.createTextVNode("替换",-1)])]),_:1},8,["disabled"]),o.createVNode(le,{disabled:!o.unref(n),type:"primary",style:{"margin-left":"5px"},onClick:S[11]||(S[11]=E=>o.unref(d)())},{default:o.withCtx(()=>[...S[15]||(S[15]=[o.createTextVNode("全部替换",-1)])]),_:1},8,["disabled"])])):o.createCommentVNode("",!0)],34)]),_:1},8,["left","top"])}}},ZF=oe(qF,[["__scopeId","data-v-438bbcef"]]),jF={class:"container"},JF=["onClick"],KF={class:"header note-header"},QF={class:"user"},ez={class:"avatar"},tz={class:"user-info"},nz={class:"username"},rz={class:"time"},oz={class:"btns"},az=["onClick"],iz=["onClick"],lz={class:"content"},sz={key:0,class:"replies"},uz={class:"header reply-header"},cz={class:"user"},dz={class:"avatar"},fz={class:"user-info"},vz={class:"username"},pz={class:"time"},hz={class:"btns"},mz=["onClick"],gz={class:"content"},yz={key:1,class:"note-reply"},xz={class:"reply-btns"},wz={key:0,class:"empty"},bz={class:"send"},Sz={class:"footer"},c1=300,_z=560,kz={__name:"SpeakerNotesPanel",setup(e){const t=pe(),n=ve(),{slideIndex:r,currentSlide:a}=te.storeToRefs(t),{handleElementId:i}=te.storeToRefs(n),l=o.ref(-270),s=o.ref(90),u=o.ref(""),c=o.ref(""),d=o.computed(()=>{var C;return((C=a.value)===null||C===void 0?void 0:C.notes)||[]}),f=o.ref(""),v=o.ref(""),p=o.useTemplateRef("textAreaRef"),h=o.useTemplateRef("notesRef");o.watch(r,()=>{f.value="",v.value=""});const m=()=>{h.value&&(h.value.scrollTop=h.value.scrollHeight)},g=()=>{if(!u.value){p.value&&p.value.focus();return}const C={id:Te.nanoid(),content:u.value,time:new Date().getTime(),user:"测试用户"};i.value&&(C.elId=i.value);const E=[...d.value,C];t.updateSlide({notes:E}),u.value="",o.nextTick(m)},y=C=>{const E=d.value.filter(L=>L.id!==C);t.updateSlide({notes:E})},x=()=>{if(!c.value)return;const C=d.value.find(T=>T.id===v.value);if(!C)return;const E=[...C.replies||[],{id:Te.nanoid(),content:c.value,time:new Date().getTime(),user:"测试用户"}],L={...C,replies:E},N=d.value.map(T=>T.id===v.value?L:T);t.updateSlide({notes:N}),c.value="",v.value="",o.nextTick(m)},b=(C,E)=>{const L=d.value.find(I=>I.id===C);if(!L||!L.replies)return;const N=L.replies.filter(I=>I.id!==E),T={...L,replies:N},A=d.value.map(I=>I.id===C?T:I);t.updateSlide({notes:A})},S=C=>{f.value=C.id,C.elId?a.value.elements.map(L=>L.id).includes(C.elId)?n.setActiveElementIdList([C.elId]):n.setActiveElementIdList([]):n.setActiveElementIdList([])},_=()=>{t.updateSlide({notes:[]})},k=()=>{n.setNotesPanelState(!1)},w=()=>{const C=document.querySelector(".center-body");if(!C)return;const E=C.getBoundingClientRect();l.value=Math.round(E.right-c1),s.value=Math.round(E.top)};return o.onMounted(()=>{o.nextTick(w)}),(C,E)=>{const L=o.resolveComponent("AiPptUser"),N=o.resolveComponent("AiPptDelete"),T=o.resolveComponent("AiPptPlus"),A=o.resolveDirective("tooltip");return o.openBlock(),o.createBlock(xl,{class:"notes-panel",width:c1,height:_z,title:`幻灯片${o.unref(r)+1}的批注`,left:l.value,top:s.value,minWidth:300,minHeight:400,maxWidth:480,maxHeight:780,resizeable:"",onClose:E[9]||(E[9]=I=>k())},{default:o.withCtx(()=>[o.createElementVNode("div",jF,[o.createElementVNode("div",{class:"notes",ref_key:"notesRef",ref:h},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,I=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["note",{active:f.value===I.id}]),key:I.id,onClick:D=>S(I)},[o.createElementVNode("div",KF,[o.createElementVNode("div",QF,[o.createElementVNode("div",ez,[o.createVNode(L)]),o.createElementVNode("div",tz,[o.createElementVNode("div",nz,o.toDisplayString(I.user),1),o.createElementVNode("div",rz,o.toDisplayString(new Date(I.time).toLocaleString()),1)])]),o.createElementVNode("div",oz,[o.createElementVNode("div",{class:"btn reply",onClick:D=>v.value=I.id},"回复",8,az),o.createElementVNode("div",{class:"btn delete",onClick:o.withModifiers(D=>y(I.id),["stop"])},"删除",8,iz)])]),o.createElementVNode("div",lz,o.toDisplayString(I.content),1),I.replies?.length?(o.openBlock(),o.createElementBlock("div",sz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(I.replies,D=>(o.openBlock(),o.createElementBlock("div",{class:"reply-item",key:D.id},[o.createElementVNode("div",uz,[o.createElementVNode("div",cz,[o.createElementVNode("div",dz,[o.createVNode(L)]),o.createElementVNode("div",fz,[o.createElementVNode("div",vz,o.toDisplayString(D.user),1),o.createElementVNode("div",pz,o.toDisplayString(new Date(D.time).toLocaleString()),1)])]),o.createElementVNode("div",hz,[o.createElementVNode("div",{class:"btn delete",onClick:o.withModifiers(V=>b(I.id,D.id),["stop"])},"删除",8,mz)])]),o.createElementVNode("div",gz,o.toDisplayString(D.content),1)]))),128))])):o.createCommentVNode("",!0),v.value===I.id?(o.openBlock(),o.createElementBlock("div",yz,[o.createVNode(Of,{padding:6,value:c.value,"onUpdate:value":E[0]||(E[0]=D=>c.value=D),placeholder:"输入回复内容",rows:1,onEnter:E[1]||(E[1]=o.withModifiers(D=>x(),["prevent"]))},null,8,["value"]),o.createElementVNode("div",xz,[o.createVNode(le,{class:"btn",size:"small",onClick:E[2]||(E[2]=D=>v.value="")},{default:o.withCtx(()=>[...E[10]||(E[10]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(le,{class:"btn",size:"small",type:"primary",onClick:E[3]||(E[3]=D=>x())},{default:o.withCtx(()=>[...E[11]||(E[11]=[o.createTextVNode("回复",-1)])]),_:1})])])):o.createCommentVNode("",!0)],10,JF))),128)),d.value.length?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",wz,"本页暂无批注"))],512),o.createElementVNode("div",bz,[o.createVNode(Of,{ref_key:"textAreaRef",ref:p,value:u.value,"onUpdate:value":E[4]||(E[4]=I=>u.value=I),padding:6,placeholder:`输入批注(为${o.unref(i)?"选中元素":"当前页幻灯片"})`,rows:2,onFocus:E[5]||(E[5]=I=>{v.value="",f.value=""}),onEnter:E[6]||(E[6]=o.withModifiers(I=>g(),["prevent"]))},null,8,["value","placeholder"]),o.createElementVNode("div",Sz,[o.withDirectives(o.createVNode(N,{class:"btn icon",style:{flex:"1"},onClick:E[7]||(E[7]=I=>_())},null,512),[[A,"清空本页批注"]]),o.createVNode(le,{type:"primary",class:"btn",style:{flex:"12"},onClick:E[8]||(E[8]=I=>g())},{default:o.withCtx(()=>[o.createVNode(T),E[12]||(E[12]=o.createTextVNode(" 添加批注 ",-1))]),_:1})])])])]),_:1},8,["title","left","top"])}}},Cz=oe(kz,[["__scopeId","data-v-c562998f"]]),yd=[{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:[["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]]},{key:"emoji",label:"Emoji",children:[["😀","😃","😄","😁","😆","😅","🤣","😂","🙂","🙃","😉","😊","😇","🥰","😍","🤩","😘","😚","😙","😋","😛","😜","🤪","😝","🤑","🤗","🤭","🤫","🤔","🤐","🤨","😐","😑","😶","😏","😒","🙄","😬","🤥","😌","😔","😪","🤤","😴","😷","🤒","🤕","🤢","🤮","🤧","🥶","🥴","😵","🤯","🤠","🥳","😎","🤓","🧐","😕","😟","🙁","☹️","😮","😯","😲","😳","🥺","😦","😧","😨","😰","😥","😢","😭","😱","😖","😣","😞","😓","😩","😫","😤","😠","😡","🥵","🤬","😈","👿","💀","☠️","🤡","👹","👺","👻","👽","👾","😺","😸","😹","😻","😼","😽","🙀","😿","😾","🙈","🙉","🙊","💌","💘","💝","💖","💗","💓","💞","💕","💟","❣️","💔","🧡","💛","💚","💙","💜","🖤","💋","💯","💢","💥","💫","💦","💨","🕳️","💬","👁️🗨️","🗨️","🗯️","💭","💤"],["👋","🤚","🖐️","✋","🖖","👌","✌️","🤞","🤟","🤘","🤙","👈","👉","👆","🖕","👇","☝️","👍","👎","✊","👊","🤛","🤜","👏","🙌","👐","🤲","🤝","🙏","✍️","💅","🤳","💪","🦵","🦶","👂","👃","🧠","🦷","🦴","👀","👁️","👅","👄","🤺","🏇","⛷️","🏂","🏌️","🏌️♂️","🏌️♀️","🏄","🏄♂️","🏄♀️","🚣","🚣♂️","🚣♀️","🏊","🏊♂️","🏊♀️","⛹️","⛹️♂️","⛹️♀️","🏋️","🏋️♂️","🏋️♀️","🚴","🚴♂️","🚴♀️","🚵","🚵♂️","🚵♀️","🤸","🤸♂️","🤸♀️","🤼","🤼♂️","🤼♀️","🤽","🤽♂️","🤽♀️","🤾","🤾♂️","🤾♀️","🤹","🤹♂️","🤹♀️","🧘","🧘♂️","🧘♀️","🛀","🛌"],["🐵","🐒","🦍","🐶","🐕","🐩","🐺","🦊","🦝","🐱","🐈","🦁","🐯","🐅","🐆","🐴","🐎","🦄","🦓","🦌","🐮","🐂","🐃","🐄","🐷","🐖","🐗","🐽","🐏","🐑","🐐","🐪","🐫","🦙","🦒","🐘","🦏","🦛","🐭","🐁","🐀","🐹","🐰","🐇","🐿️","🦔","🦇","🐻","🐨","🐼","🦘","🦡","🐾","🦃","🐔","🐓","🐣","🐤","🐥","🐦","🐧","🕊️","🦅","🦆","🦢","🦉","🦚","🦜","🐸","🐊","🐢","🦎","🐍","🐲","🐉","🦕","🦖","🐳","🐋","🐬","🐟","🐠","🐡","🦈","🐙","🐚","🐌","🦋","🐛","🐜","🐝","🐞","🦗","🪳","🕷️","🕸️","🦂","🦟","🦠","💐","🌸","💮","🏵️","🌹","🥀","🌺","🌻","🌼","🌷","🌱","🌲","🌳","🌴","🌵","🌾","🌿","☘️","🍀","🍁","🍂","🍃","🍄"],["🍇","🍈","🍉","🍊","🍋","🍌","🍍","🥭","🍎","🍏","🍐","🍑","🍒","🍓","🥝","🍅","🥥","🥑","🍆","🥔","🥕","🌽","🌶️","🥒","🥬","🥦","🥜","🌰","🍞","🥐","🥖","🥨","🥯","🥞","🧀","🍖","🍗","🥩","🥓","🍔","🍟","🍕","🌭","🥪","🌮","🌯","🥙","🥚","🍳","🥘","🍲","🥣","🥗","🍿","🧂","🥫","🍱","🍘","🍙","🍚","🍛","🍜","🍝","🍠","🍢","🍣","🍤","🍥","🥮","🍡","🥟","🥠","🥡","🦀","🦞","🦐","🦑","🍦","🍧","🍨","🍩","🍪","🎂","🍰","🧁","🥧","🍫","🍬","🍭","🍮","🍯","🍼","🥛","🍵","🍶","🍾","🍷","🍸","🍹","🍺","🍻","🥂","🥃","🥤","🥢","🍽️","🍴","🥄","🔪","🏺"],["🌍","🌎","🌏","🌐","🗺️","🗾","🧭","🏔️","⛰️","🌋","🗻","🏕️","🏖️","🏜️","🏝️","🏞️","🏟️","🏛️","🏗️","🧱","🏘️","🏚️","🏠","🏡","🏢","🏣","🏤","🏥","🏦","🏨","🏩","🏪","🏫","🏬","🏭","🏯","🏰","💒","🗼","🗽","⛪","🕌","🕍","⛩️","🕋","⛲","⛺","🌁","🌃","🏙️","🌄","🌅","🌆","🌇","🌉","♨️","🎠","🎡","🎢","💈","🎪","🚂","🚃","🚄","🚅","🚆","🚇","🚈","🚉","🚊","🚝","🚞","🚋","🚌","🚍","🚎","🚐","🚑","🚒","🚓","🚔","🚕","🚖","🚗","🚘","🚙","🚚","🚛","🚜","🏎️","🏍️","🛵","🚲","🛴","🛹","🚏","🛣️","🛤️","🛢️","⛽","🚨","🚥","🚦","🛑","🚧","⚓","⛵","🛶","🚤","🛳️","⛴️","🛥️","🚢","✈️","🛩️","🛫","🛬","💺","🚁","🚟","🚠","🚡","🛰️","🚀","🛸","🛎️","🧳","⌛","⏳","⌚","⏰","⏱️","⏲️","🕰️","🕛","🕧","🕐","🕜","🕑","🕝","🕒","🕞","🕓","🕟","🕔","🕠","🕕","🕡","🕖","🕢","🕗","🕣","🕘","🕤","🕙","🕥","🕚","🕦","🌑","🌒","🌓","🌔","🌕","🌖","🌗","🌘","🌙","🌚","🌛","🌜","🌡️","☀️","🌝","🌞","⭐","🌟","🌠","🌌","☁️","⛅","⛈️","🌤️","🌥️","🌦️","🌧️","🌨️","🌩️","🌪️","🌫️","🌬️","🌀","🌈","🌂","☂️","☔","⛱️","⚡","❄️","☃️","⛄","☄️","🔥","💧","🌊"],["🎃","🎄","🎆","🎇","🧨","✨","🎈","🎉","🎊","🎋","🎍","🎎","🎏","🎐","🎑","🧧","🎀","🎁","🎗️","🎟️","🎫","🎖️","🏆","🏅","🥇","🥈","🥉","⚽","⚾","🥎","🏀","🏐","🏈","🏉","🎾","🥏","🎳","🏏","🏑","🏒","🥍","🏓","🏸","🥊","🥋","🥅","⛳","⛸️","🎣","🎽","🎿","🛷","🥌","🎯","🔫","🎱","🔮","🎮","🕹️","🎰","🎲","🧩","🧸","♟️","🃏","🀄","🎴","🎭","🖼️","🎨","🧵","🧶"],["👓","🕶️","🥽","🥼","👔","👕","👖","🧣","🧤","🧥","🧦","👗","👘","👙","👚","👛","👜","👝","🛍️","🎒","👞","👟","🥾","🥿","👠","👡","👢","👑","👒","🎩","🎓","🧢","⛑️","📿","💄","💍","💎","🔇","🔈","🔉","🔊","📢","📣","📯","🔔","🔕","🎼","🎙️","🎚️","🎛️","🎤","🎧","📻","🎷","🎸","🎹","🎺","🎻","🥁","📱","📲","☎️","📞","📟","📠","🔋","🔌","💻","🖥️","🖨️","⌨️","🖱️","🖲️","💽","💾","💿","📀","🧮","🎥","🎞️","📽️","🎬","📺","📷","📸","📹","📼","🔍","🔎","🕯️","💡","🔦","🏮","📔","📕","📖","📗","📘","📙","📚","📓","📒","📃","📜","📄","📰","🗞️","📑","🔖","🏷️","💰","💴","💵","💶","💷","💸","💳","🧾","💹","✉️","📧","📨","📩","📤","📥","📦","📫","📪","📬","📭","📮","🗳️","✏️","✒️","🖋️","🖊️","🖌️","🖍️","📝","💼","📁","📂","🗂️","📅","📆","🗒️","🗓️","📇","📈","📉","📊","📋","📌","📍","📎","🖇️","📏","📐","✂️","🗃️","🗄️","🗑️","🔓","🔏","🔐","🔑","🗝️","🔨","⛏️","⚒️","🛠️","🗡️","⚔️","💣","🏹","🛡️","🔧","🔩","⚙️","🗜️","⚖️","🔗","⛓️","🧰","🧲","⚗️","🧪","🧫","🧬","🔬","🔭","📡","💉","💊","🚪","🛏️","🛋️","🚽","🚿","🛁","🧴","🧷","🧹","🧺","🧻","🧼","🧽","🧯","🛒","🚬","⚰️","⚱️","🧿","🗿"],["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣","8️⃣","9️⃣","🔟","🔠","🔡","🔢","🔣","🚮","🚰","♿","🚹","🚺","🚻","🚼","🚾","🛂","🛃","🛄","🛅","⛔","🚫","🚳","🚭","🚯","🚱","🚷","📵","🔞","⚠️","🚸","☢️","☣️","⬆️","➡️","⬇️","⬅️","↩️","↪️","⤴️","⤵️","🔃","🔄","🔙","🔚","🔛","🔜","🔝","🛐","⚛️","🕉️","✡️","☸️","☯️","✝️","☦️","☪️","☮️","🕎","🔯","♈","♉","♊","♋","♌","♍","♎","♏","♐","♑","♒","♓","⛎","🔀","🔁","🔂","⏩","⏭️","⏯️","⏪","⏮️","⏫","⏬","⏸️","⏹️","⏺️","⏏️","🎦","🏁","🚩","🎌","🏴","🏳️","🏳️🌈","🏴☠️","🔴","🔵","⚫","⚪","⬛","⬜","◼️","◻️","◾","◽","🔶","🔷","🔸","🔹","🔺","🔻","💠","🔘","🔳","🔲","🔅","🔆","📶","📳","📴","✖️","➕","➖","➗","♾️","❓","❔","❕","❗","⚕️","♻️","⚜️","🔱","📛","🔰","⭕","✅","✔️","❌","❎","➰","➿","✳️","✴️","❇️"]]}],Ez={class:"panel-head"},Tz={key:0,class:"emoji-types"},Nz=["onClick"],Iz={class:"pool"},Lz=["onClick"],Az={class:"symbol"},d1=350,Mz=560,Vz={__name:"SymbolLibraryPanel",setup(e){const t=ve(),{handleElement:n}=te.storeToRefs(t),{createTextElement:r}=Vo(),a=o.ref(yd[0].key),i=o.ref(-270),l=o.ref(132),s=o.ref(["表情","动作","动植物","食物","旅行","活动","物品","符号"]),u=o.ref(0),c=o.computed(()=>{const h=yd.find(m=>m.key===a.value);return h?h.key==="emoji"?[h.children[u.value]]:h.children:[]}),d=yd.map(h=>({key:h.key,label:h.label})),f=()=>{const h=document.querySelector(".center-body");if(!h)return;const m=h.getBoundingClientRect();i.value=Math.round(m.right-d1),l.value=Math.round(m.top)};o.onMounted(()=>{o.nextTick(f)});const v=h=>{var m,g,y;if(((m=n.value)===null||m===void 0?void 0:m.type)==="text"){Tt.emit(mt.RICH_TEXT_COMMAND,{action:{command:"insert",value:h}});return}if(((g=n.value)===null||g===void 0?void 0:g.type)==="shape"&&document.querySelector(`#editable-element-${n.value.id} .ProseMirror`)){Tt.emit(mt.RICH_TEXT_COMMAND,{action:{command:"insert",value:h}});return}if(((y=n.value)===null||y===void 0?void 0:y.type)==="table"&&document.querySelector(`#editable-element-${n.value.id} .cell.active .cell-text`)){document.execCommand("insertText",!1,h);return}r({left:0,top:0,width:200,height:50},{content:h})},p=()=>{t.setSymbolPanelState(!1)};return(h,m)=>{const g=o.resolveComponent("AiPptClose");return o.openBlock(),o.createBlock(xl,{class:"symbol-panel",width:d1,height:Mz,left:i.value,top:l.value,contentStyle:{overflow:"hidden",display:"flex",flexDirection:"column"}},{default:o.withCtx(()=>[o.createElementVNode("div",Ez,[o.createVNode(Xn,{tabs:o.unref(d),value:a.value,"onUpdate:value":m[0]||(m[0]=y=>a.value=y),tabsStyle:{marginBottom:"8px"}},null,8,["tabs","value"]),o.createElementVNode("div",{class:"close-btn",onClick:m[1]||(m[1]=y=>p()),onMousedown:m[2]||(m[2]=o.withModifiers(()=>{},["stop"]))},[o.createVNode(g)],32)]),a.value==="emoji"?(o.openBlock(),o.createElementBlock("div",Tz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(y,x)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["emoji-type",{active:u.value===x}]),key:x,onClick:b=>u.value=x},o.toDisplayString(y),11,Nz))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",Iz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(y,x)=>(o.openBlock(),o.createElementBlock("div",{class:"symbol-group",key:x},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y,(b,S)=>(o.openBlock(),o.createElementBlock("div",{class:"symbol-item",key:S,onClick:_=>v(b)},[o.createElementVNode("div",Az,o.toDisplayString(b),1)],8,Lz))),128))]))),128))])]),_:1},8,["left","top"])}}},Pz=oe(Vz,[["__scopeId","data-v-cee7d69b"]]),Dz={class:"container"},Bz={class:"row"},Rz={key:0,class:"row"},$z={key:1,class:"row"},Oz={key:2,class:"row"},Fz={key:3,class:"placeholder"},zz={__name:"MarkupSidePanel",setup(e){const t=pe(),n=ve(),{currentSlide:r}=te.storeToRefs(t),{handleElement:a,handleElementId:i}=te.storeToRefs(n),l=o.ref([{label:"未标记类型",value:""},{label:"封面页",value:"cover"},{label:"目录页",value:"contents"},{label:"过渡页",value:"transition"},{label:"内容页",value:"content"},{label:"引用页",value:"reference"},{label:"结束页",value:"end"}]),s=o.ref([{label:"未标记类型",value:""},{label:"标题",value:"title"},{label:"副标题",value:"subtitle"},{label:"正文",value:"content"},{label:"列表项目",value:"item"},{label:"列表项标题",value:"itemTitle"},{label:"注释",value:"notes"},{label:"页眉",value:"header"},{label:"页脚",value:"footer"},{label:"节编号",value:"partNumber"},{label:"项目编号",value:"itemNumber"},{label:"引用编号",value:"referenceNumber"},{label:"PMID",value:"pmid"},{label:"url",value:"url"},{label:"DOI",value:"doi"},{label:"引用标题",value:"text"}]),u=o.ref([{label:"未标记类型",value:""},{label:"页面插图",value:"pageFigure"},{label:"项目插图",value:"itemFigure"},{label:"背景图",value:"background"}]),c=o.ref([{label:"未标记类型",value:""},{label:"图表(内容项)",value:"item"}]),d=o.computed(()=>{var y;return((y=r.value)===null||y===void 0?void 0:y.type)||""}),f=o.computed(()=>a.value?a.value.type==="text"?a.value.textType||"":a.value.type==="shape"&&a.value.text&&a.value.text.type||"":""),v=o.computed(()=>a.value&&a.value.type==="image"&&a.value.imageType||""),p=o.computed(()=>a.value&&a.value.type==="chart"&&a.value.chartMark||""),h=y=>{y?t.updateSlide({type:y}):t.removeSlideProps({id:r.value.id,propName:"type"})},m=y=>{if(a.value){if(a.value.type==="image"&&(y?t.updateElement({id:i.value,props:{imageType:y}}):t.removeElementProps({id:i.value,propName:"imageType"})),a.value.type==="text"&&(y?t.updateElement({id:i.value,props:{textType:y}}):t.removeElementProps({id:i.value,propName:"textType"})),a.value.type==="shape"){const x=a.value.text;if(!x)return;y?t.updateElement({id:i.value,props:{text:{...x,type:y}}}):(delete x.type,t.updateElement({id:i.value,props:{text:x}}))}a.value.type==="chart"&&(y?t.updateElement({id:i.value,props:{chartMark:y}}):t.removeElementProps({id:i.value,propName:"chartMark"}))}},g=()=>{n.setMarkupPanelState(!1)};return(y,x)=>(o.openBlock(),o.createBlock(xl,{class:"notes-panel",width:300,height:130,title:"幻灯片类型标注",left:-270,top:90,onClose:x[4]||(x[4]=b=>g())},{default:o.withCtx(()=>[o.createElementVNode("div",Dz,[o.createElementVNode("div",Bz,[x[5]||(x[5]=o.createElementVNode("div",{style:{width:"40%"}},"当前页面类型:",-1)),o.createVNode(at,{style:{width:"60%"},value:d.value,"onUpdate:value":x[0]||(x[0]=b=>h(b)),options:l.value},null,8,["value","options"])]),o.unref(a)&&(o.unref(a).type==="text"||o.unref(a).type==="shape"&&o.unref(a).text)?(o.openBlock(),o.createElementBlock("div",Rz,[x[6]||(x[6]=o.createElementVNode("div",{style:{width:"40%"}},"当前文本类型:",-1)),o.createVNode(at,{style:{width:"60%"},value:f.value,"onUpdate:value":x[1]||(x[1]=b=>m(b)),options:s.value},null,8,["value","options"])])):o.unref(a)&&o.unref(a).type==="chart"?(o.openBlock(),o.createElementBlock("div",$z,[x[7]||(x[7]=o.createElementVNode("div",{style:{width:"40%"}},"当前图表标记:",-1)),o.createVNode(at,{style:{width:"60%"},value:p.value,"onUpdate:value":x[2]||(x[2]=b=>m(b)),options:c.value},null,8,["value","options"])])):o.unref(a)&&o.unref(a).type==="image"?(o.openBlock(),o.createElementBlock("div",Oz,[x[8]||(x[8]=o.createElementVNode("div",{style:{width:"40%"}},"当前图片类型:",-1)),o.createVNode(at,{style:{width:"60%"},value:v.value,"onUpdate:value":x[3]||(x[3]=b=>m(b)),options:u.value},null,8,["value","options"])])):(o.openBlock(),o.createElementBlock("div",Fz," 选中文本、图表、图片或带文字的形状,进行类型标记 "))])]),_:1}))}},Hz=oe(zz,[["__scopeId","data-v-56243f0c"]]),Gz={class:"pptist-editor"},Uz={class:"layout-content"},Wz={class:"layout-content-center"},Yz={key:5,class:"bottom-loading"},Xz={__name:"index",props:{pptId:{type:String,default:""}},setup(e){const t=e,n=o.getCurrentInstance(),r=n&&n.proxy?n.proxy.$route:null,a=o.computed(()=>t.pptId||r&&r.query&&r.query.id||""),i=ve(),l=pe(),{dialogForExport:s,showSelectPanel:u,showSearchPanel:c,showNotesPanel:d,showSymbolPanel:f,showMarkupPanel:v,isGenerating:p,disabled:h}=te.storeToRefs(i),{templates:m,slides:g}=te.storeToRefs(l),{AIPPTStream:y,presetImgPool:x}=I1(),{getSaveJSON:b}=sl(),{importJSONStr:S}=D1(),_=()=>i.setDialogForExport(""),k=o.ref(40);cx(),dx();const w=T=>{if(T.images&&T.images.length>0){const A=T.images.map(I=>({id:I.id||Math.random().toString(),src:I.src,width:I.width||1920,height:I.height||1080}));x(A)}},C=o.ref(null),E=async()=>{var T,A,I,D;const V=a.value;if(!V){Se.error("aippt生成失败,缺少pptId参数");return}try{i.setGenerating(!0);const B=await bo.getAIPPTData(V);if(B.code!==0){Se.error(B.mesg),i.setGenerating(!1);return}C.value=B.data;const R=C.value.pptContent;let F=C.value.templateId;if(!R){Se.error("获取AIPPT数据失败");return}if(R.saveJson&&R.saveJson!==""){S(R.saveJson),i.setGenerating(!1);return}F||(F="template_5"),l.resetSlides();const W=F||((A=(T=m.value)===null||T===void 0?void 0:T[0])===null||A===void 0?void 0:A.id)||"",O=(I=m.value)===null||I===void 0?void 0:I.find(U=>U.id===W),P=await bo.getFileData(O?.id||"");if(!P){Se.error("获取模板数据失败");return}const $=P.slides,z=P.theme;l.setTheme(z),P.width&&P.height&&(l.setViewportSize(P.width),l.setViewportRatio(P.height/P.width));const Z=await bo.getImageList(O?.imageList||"");Z&&x(Z);const Q=Array.isArray(R.contentPages)?R.contentPages:[],J=Q.find(U=>U.type==="cover");J&&l.setTitle(((D=J.data)===null||D===void 0?void 0:D.title)||""),Q.forEach(U=>{w(U)}),Q.length>0&&await y($,Q,Z,40,(ne,K,H,M)=>{}),l.updateSlideIndex(0),N(),i.setGenerating(!1)}catch(B){i.setGenerating(!1),console.error("Editor: 生成 PPT 失败",B)}},L=()=>{try{const T=b(),A={...C.value,pptContent:{saveJson:T}};bo.saveAIPPTData(A)}catch(T){console.error("自动保存失败",T)}},N=qe.debounce(L,300);return o.watch(()=>g.value,()=>{p.value||g.value&&g.value.length>0&&N()},{deep:!0}),o.onMounted(()=>{a.value&&E()}),o.watch(a,(T,A)=>{T&&T!==A&&E()}),(T,A)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Gz,[o.createVNode(h3,{class:"layout-header"}),o.createElementVNode("div",Uz,[o.createVNode(rV,{class:"layout-content-left"}),o.createElementVNode("div",Wz,[o.createVNode(VM,{class:"center-top"}),o.createVNode(aA,{class:"center-body",style:o.normalizeStyle({height:`calc(100% - ${k.value+64}px)`})},null,8,["style"]),o.createVNode(SO,{class:"center-bottom",height:k.value,"onUpdate:height":A[0]||(A[0]=I=>k.value=I),style:o.normalizeStyle({height:`${k.value}px`})},null,8,["height","style"])]),o.createVNode(mO,{class:"layout-content-right"})])]),o.unref(u)?(o.openBlock(),o.createBlock(GF,{key:0})):o.createCommentVNode("",!0),o.unref(c)?(o.openBlock(),o.createBlock(ZF,{key:1})):o.createCommentVNode("",!0),o.unref(d)?(o.openBlock(),o.createBlock(Cz,{key:2})):o.createCommentVNode("",!0),o.unref(v)?(o.openBlock(),o.createBlock(Hz,{key:3})):o.createCommentVNode("",!0),o.unref(f)?(o.openBlock(),o.createBlock(Pz,{key:4})):o.createCommentVNode("",!0),o.createVNode(Hr,{visible:!!o.unref(s),width:680,onClosed:A[1]||(A[1]=I=>_())},{default:o.withCtx(()=>[o.createVNode(kF)]),_:1},8,["visible"]),o.unref(p)?(o.openBlock(),o.createElementBlock("div",Yz,[...A[11]||(A[11]=[o.createElementVNode("span",null,"AI 生成中,请耐心等待…",-1)])])):o.createCommentVNode("",!0),o.unref(h)?(o.openBlock(),o.createElementBlock("div",{key:6,class:"disabled-overlay",onMousedown:A[2]||(A[2]=o.withModifiers(()=>{},["stop"])),onMouseup:A[3]||(A[3]=o.withModifiers(()=>{},["stop"])),onClick:A[4]||(A[4]=o.withModifiers(()=>{},["stop"])),onDblclick:A[5]||(A[5]=o.withModifiers(()=>{},["stop"])),onContextmenu:A[6]||(A[6]=o.withModifiers(()=>{},["stop"])),onWheel:A[7]||(A[7]=o.withModifiers(()=>{},["stop"])),onTouchstart:A[8]||(A[8]=o.withModifiers(()=>{},["stop"])),onTouchmove:A[9]||(A[9]=o.withModifiers(()=>{},["stop"])),onTouchend:A[10]||(A[10]=o.withModifiers(()=>{},["stop"]))},null,32)):o.createCommentVNode("",!0)],64))}},Yu=oe(Xz,[["__scopeId","data-v-3a70bc17"]]),f1={AiPptPlayOne:re.PlayOne,AiPptFullScreenPlay:re.FullScreenPlay,AiPptLock:re.Lock,AiPptUnlock:re.Unlock,AiPptPpt:re.Ppt,AiPptFormat:re.Format,AiPptPicture:re.Picture,AiPptFullScreen:re.FullScreen,AiPptList:re.List,AiPptOrderedList:re.OrderedList,AiPptFlipVertically:re.FlipVertically,AiPptFlipHorizontally:re.FlipHorizontally,AiPptFontSize:re.FontSize,AiPptCode:re.Code,AiPptTextBold:re.TextBold,AiPptTextItalic:re.TextItalic,AiPptTextUnderline:re.TextUnderline,AiPptStrikethrough:re.Strikethrough,AiPptEdit:re.Edit,AiPptQuote:re.Quote,AiPptBackgroundColor:re.BackgroundColor,AiPptGroup:re.Group,AiPptUngroup:re.Ungroup,AiPptBack:re.Back,AiPptNext:re.Next,AiPptFullwidth:re.Fullwidth,AiPptAlignTop:re.AlignTop,AiPptAlignLeft:re.AlignLeft,AiPptAlignRight:re.AlignRight,AiPptAlignBottom:re.AlignBottom,AiPptAlignVertically:re.AlignVertically,AiPptAlignHorizontally:re.AlignHorizontally,AiPptBringToFront:re.BringToFront,AiPptSendToBack:re.SendToBack,AiPptSend:re.Send,AiPptAlignTextLeft:re.AlignTextLeft,AiPptAlignTextRight:re.AlignTextRight,AiPptAlignTextCenter:re.AlignTextCenter,AiPptAlignTextBoth:re.AlignTextBoth,AiPptRowHeight:re.RowHeight,AiPptWrite:re.Write,AiPptInsertTable:re.InsertTable,AiPptAddText:re.AddText,AiPptFill:re.Fill,AiPptTailoring:re.Tailoring,AiPptEffects:re.Effects,AiPptColorFilter:re.ColorFilter,AiPptUp:re.Up,AiPptDown:re.Down,AiPptPlus:re.Plus,AiPptMinus:re.Minus,AiPptConnection:re.Connection,AiPptBringToFrontOne:re.BringToFrontOne,AiPptSentToBack:re.SentToBack,AiPptGithub:re.Github,AiPptChartProportion:re.ChartProportion,AiPptChartHistogram:re.ChartHistogram,AiPptChartHistogramOne:re.ChartHistogramOne,AiPptChartLineArea:re.ChartLineArea,AiPptChartRing:re.ChartRing,AiPptChartScatter:re.ChartScatter,AiPptChartLine:re.ChartLine,AiPptChartPie:re.ChartPie,AiPptRadarChart:re.RadarChart,AiPptText:re.Text,AiPptRotate:re.Rotate,AiPptLeftTwo:re.LeftTwo,AiPptRightTwo:re.RightTwo,AiPptPlatte:re.Platte,AiPptClose:re.Close,AiPptCloseSmall:re.CloseSmall,AiPptUndo:re.Undo,AiPptTransform:re.Transform,AiPptClick:re.Click,AiPptTheme:re.Theme,AiPptArrowCircleLeft:re.ArrowCircleLeft,AiPptArrowRight:re.ArrowRight,AiPptGraphicDesign:re.GraphicDesign,AiPptLogout:re.Logout,AiPptErase:re.Erase,AiPptClear:re.Clear,AiPptAlignTextTopOne:re.AlignTextTopOne,AiPptAlignTextBottomOne:re.AlignTextBottomOne,AiPptAlignTextMiddleOne:re.AlignTextMiddleOne,AiPptPause:re.Pause,AiPptVolumeMute:re.VolumeMute,AiPptVolumeNotice:re.VolumeNotice,AiPptVolumeSmall:re.VolumeSmall,AiPptVideoTwo:re.VideoTwo,AiPptFormula:re.Formula,AiPptLinkOne:re.LinkOne,AiPptFullScreenOne:re.FullScreenOne,AiPptOffScreenOne:re.OffScreenOne,AiPptPower:re.Power,AiPptListView:re.ListView,AiPptMagic:re.Magic,AiPptHighLight:re.HighLight,AiPptDownload:re.Download,AiPptIndentLeft:re.IndentLeft,AiPptIndentRight:re.IndentRight,AiPptVerticalSpacingBetweenItems:re.VerticalSpacingBetweenItems,AiPptCopy:re.Copy,AiPptDelete:re.Delete,AiPptSquare:re.Square,AiPptRound:re.Round,AiPptNeedle:re.Needle,AiPptTextRotationNone:re.TextRotationNone,AiPptTextRotationDown:re.TextRotationDown,AiPptFormatBrush:re.FormatBrush,AiPptPreviewOpen:re.PreviewOpen,AiPptPreviewClose:re.PreviewClose,AiPptStopwatchStart:re.StopwatchStart,AiPptSearch:re.Search,AiPptLeft:re.Left,AiPptRight:re.Right,AiPptMoveOne:re.MoveOne,AiPptHamburgerButton:re.HamburgerButton,AiPptAttention:re.Attention,AiPptCheckOne:re.CheckOne,AiPptCloseOne:re.CloseOne,AiPptCheck:re.Check,AiPptInfo:re.Info,AiPptComment:re.Comment,AiPptUser:re.User,AiPptSwitch:re.Switch,AiPptMore:re.More,AiPptFilePdf:re.FilePdf,AiPptFileJpg:re.FileJpg,AiPptNotes:re.Notes,AiPptRefresh:re.Refresh,AiPptHelpcenter:re.Helpcenter,AiPptMark:re.Mark,AiPptCommand:re.Command,AiPptSlideTwo:re.SlideTwo,AiPptSymbol:re.Symbol},qz={install(e){for(const t of Object.keys(f1))e.component(t)||e.component(t,f1[t])}},Zz={__name:"index",props:{axis:{type:Object,required:!0},el:{type:Object,required:!0},menus:{type:Array,required:!0},removeContextmenu:{type:Function,required:!0}},setup(e){const t=e,n=o.computed(()=>{const{x:u,y:c}=t.axis,d=t.menus.filter(g=>!(g.divider||g.hide)).length,f=t.menus.filter(g=>g.divider).length,v=180,p=d*30+f*11+10,h=document.body.clientWidth,m=document.body.clientHeight;return{left:h<=u+v?u-v:u,top:m<=c+p?c-p:c}}),r=a=>{a.disable||a.children&&!a.handler||(a.handler&&a.handler(t.el),t.removeContextmenu())};return(a,i)=>{const l=o.resolveComponent("MenuContent");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:"mask",onContextmenu:i[0]||(i[0]=o.withModifiers(s=>e.removeContextmenu(),["prevent"])),onMousedown:i[1]||(i[1]=o.withModifiers(s=>e.removeContextmenu(),["left"]))},null,32),o.createElementVNode("div",{class:"contextmenu",style:o.normalizeStyle({left:n.value.left+"px",top:n.value.top+"px"}),onContextmenu:i[2]||(i[2]=o.withModifiers(()=>{},["prevent"]))},[o.createVNode(l,{menus:e.menus,handleClickMenuItem:r},null,8,["menus"])],36)],64)}}},pi="CTX_CONTEXTMENU_HANDLER",jz=(e,t,n)=>{t.stopPropagation(),t.preventDefault();const r=n.value(e);if(!r)return;let a=null;const i=()=>{a&&(document.body.removeChild(a),a=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",i),window.removeEventListener("resize",i)},l={axis:{x:t.x,y:t.y},el:e,menus:r,removeContextmenu:i};a=document.createElement("div");const s=o.createVNode(Zz,l,null);o.render(s,a),document.body.appendChild(a),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",i),window.addEventListener("resize",i)},Jz={mounted(e,t){e[pi]=n=>jz(e,n,t),e.addEventListener("contextmenu",e[pi])},unmounted(e){e&&e[pi]&&(e.removeEventListener("contextmenu",e[pi]),delete e[pi])}},hi="CTX_CLICK_OUTSIDE_HANDLER",Kz=(e,t,n)=>{const r=n.value,a=t.composedPath();(a?a.indexOf(e)<0:!e.contains(t.target))&&r(t)},Qz={mounted(e,t){e[hi]=n=>Kz(e,n,t),setTimeout(()=>{document.addEventListener("click",e[hi])},0)},unmounted(e){e[hi]&&(document.removeEventListener("click",e[hi]),delete e[hi])}},mi="TOOLTIP_INSTANCE",eH={mounted(e,t){let n="",r="top",a=[300,0];typeof t.value=="string"?n=t.value:(n=t.value.content,t.value.placement!==void 0&&(r=t.value.placement),t.value.delay!==void 0&&(a=t.value.delay)),e[mi]=zf(e,{content:n,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:r,delay:a})},updated(e,t){let n="";typeof t.value=="string"?n=t.value:n=t.value.content,e[mi]&&e[mi].setContent(n)},unmounted(e){e[mi]&&e[mi].destroy()}},tH={install(e){e.directive("contextmenu",Jz),e.directive("click-outside",Qz),e.directive("tooltip",eH)}},nH={install(e){e.use(qz),e.use(tH),e.component("EditComponent",Yu)}};exports.EditComponent=Yu;exports.EditPlugin=nH;exports.Editor=Yu;exports.default=Yu;
|