import{d as qb,c as nt,q as Aa,r as eI,y as rI,$ as aI,bG as iI,k as Zy,ab as nI,bI as oI}from"./index.b4473196.js";const sI="_subjectEcharts_17r04_1",lI="_container_17r04_5",uI="_emtry_17r04_12",fI="_head_17r04_20",hI="_headLeft_17r04_26",vI="_icon_17r04_30",cI="_headRight_17r04_36",pI="_headLabelWrap_17r04_50",dI="_headLabel_17r04_50",gI="_headLabelDot_17r04_62",yI="_content_17r04_68",mI="_echartsMain_17r04_73",_I="_items_17r04_77",SI="_item_17r04_77",xI="_itemNum_17r04_84",bI="_rect_17r04_94",wI="_itemTitle_17r04_101",TI="_line_17r04_106",AI="_subjectWrap_17r04_112",CI="_listItem_17r04_115",MI="_itemLeft_17r04_125",DI="_subjectName_17r04_129",LI="_subjectType_17r04_138",II="_dot_17r04_144",PI="_listItemActive_17r04_153",RI="_listitems_17r04_158";var _t={subjectEcharts:sI,container:lI,emtry:uI,head:fI,headLeft:hI,icon:vI,headRight:cI,headLabelWrap:pI,headLabel:dI,headLabelDot:gI,content:yI,echartsMain:mI,items:_I,item:SI,itemNum:xI,rect:bI,itemTitle:wI,line:TI,subjectWrap:AI,listItem:CI,itemLeft:MI,subjectName:DI,subjectType:LI,dot:II,listItemActive:PI,listitems:RI};const EI="_circle_1j0c8_1",kI="_des_1j0c8_22";var pn={circle:EI,"circle-main-box":"_circle-main-box_1j0c8_4","count-num":"_count-num_1j0c8_9",des:kI},OI=qb({name:"CircleProgress",data(){return{now:0,timer:null}},props:{value:{type:Number,default:0},size:{type:Number,default:120},strokeWidth:{type:Number,default:10},color:{type:String,default:"rgba(153,202,251,1)"},duration:{type:Number,default:1e3},des:{type:String,default:"\u603B\u8FBE\u6807\u7387"}},watch:{value(r){this.now=0,this.$nextTick(()=>{this.run()})}},computed:{percentage(){return this.value},countDown(){return this.now},cx(){return this.size/2},cy(){return this.size/2},radius(){return(this.size-this.strokeWidth)/2},circumference(){return 2*Math.PI*this.radius},progress(){return(1-this.now/100)*this.circumference}},mounted(){this.run()},methods:{run(){if(this.value==0)return;let r=this.duration/this.value;this.timer=setInterval(()=>{if(this.now>=this.value)return this.now=this.value,clearInterval(this.timer);this.now++},r)}},render(){return nt("div",{class:pn["circle-main"]},[nt("div",{class:pn["circle-main-box"],style:[{width:this.size+"px",height:this.size+"px"}]},[nt("svg",{width:this.size,height:this.size,class:pn.circle},[nt("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:"#FFE7DF","stroke-width":this.strokeWidth},null),nt("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:this.color,"stroke-width":this.strokeWidth,"stroke-linecap":"round","stroke-dasharray":this.circumference,"stroke-dashoffset":this.progress},null)]),nt("span",{class:pn["count-num"]},[this.countDown,nt("span",{class:pn.countType},[Aa("%")])]),nt("span",{class:pn.des},[this.des])])])}}),NI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABHtJREFUWEe9mFtsVFUUhr81A1MwtOoLqZBweVOHQnwwXqKJxigyBJCqSDReovWCthGtaWO0OlJ8ANNIAgmRlKp4B6TSalMlGB8M1MdCa9BEa0kMKEFjR21anNlmz5wzs3tmn8u00f22z1l77X///1prXwRP29KvkggNwK3AIqWo9trMpC+QQTiN4gjQ+dLtMmz6E7eT3q8S1NABbFKK+EwmjTpWIIuwmzGa0xtkUo/LA9JgctX0objFdKacThG103e/+03sZ+9+944X4WgsQ0qDytu09amdStEYdWX/hZ0Iu9pT0iRt/SqZzTKIRSZxlqTCKImK0I+iglbZeJwV8vyn6nUUm20+y6h1jTyO/aT1xemrHTuktVcNAUnr4DBmphtcPisVGJaWHjWmcFI7KoCIdkUi/Ow9C9IlQZ47rBQBnCdroX45VFcZHFoo/2McDg7Cd+cgBtxzFdQtgFm6A2QmoPsEDJ21aGHML89+EhyybbdB9Zxo+X7+L9j2JSyrhQeuLp9Yg2r/IjgDZHN3MEPb14SnkEvYRBZe7IPrlsD6Ovu41l6KghQtTIaePlTOkPtFp70NkJ/CGlCbBrQY1i+3A2rpDWGo6eNgyQIZ8sTSpMvQTAA1HiwBsiXDa4ZkYcmlAWmGrtWSaYYs6d3a48+QNpcnD0RgyFtvXJ+eCV3JNKB6HUOWOhUq2RP7gwG9sgrmzo6WZUXJfIJ6/AK83B8SQ49/ZAFkxMY1S2DdMog79aR4RLAocuoX6PoGFl4MT91QqkGaqWwODp+EgdFy4kyI8uiH4Vvn7DhclAhemfai64zrrWoWzHGZBf6ehAvZCCXkkQ/CAS2+1CiOTtUd/a3gfF4V6P/uycBvT9RgR3+PAOjh9y11yBmnlVtXB9cv9ThSsHcAvj8Hz9wEtTXhE2mLYyMF2YKaPPReMEOvrgYtmbcdOgEDP0F7CrQ8tuYtoFqyFz4LAfTgu8F1aPtau4Puk3B8BLamIOEDyDayxahDttOL3P+OUrZ64TrbZgGkHemd+/hogaFEBVcCa2E0kMl9+0IKowHIlCAPSEu2ugTIr36aTJkM2RiUe/cpVYTkeCw6VmBjSDPaPVgAtNUAFCW0NSBvRprzy8a3AxjyA+RIpoN6S0BQ2wDq40dglm14yzgPuZZGpW6+GeY7d1dTkjeOwQ/nofFGWHTJ1Cn8NuFfM9DxlQWOMUDuetPCkGOgqb2sBlZeXiiAuv2Tg6Ez8PWPhc18/jxYdQXUuKdKn+X/OQH9p+DsWMnABlzu7FLaZHr397CrbZQon7qAjNR3qSFU4RoUdt7x1b7ii1nBUxleYVju2Bt+Uax8oVHyzWIj7JA1e1RShEH4f148AqBmlWJFfvFrO9XOXK702BB0BZ/m2kOHxWLs6mmQpvzcd6dVYnwhfSo39TnG9TLNEAkFUawyMY7O/ZnUgbTzHKN/XJlWiaUL6MgpNtleQiJ7r8RQyMZg98gZmr9NGw9Wpo+Ve1SSHA1SwZNexDtAIbOEDHBawRFidH7+2NQnvX8BBdCOWcDBrfEAAAAASUVORK5CYII=",BI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABOJJREFUWEfNmGtsFFUUx39nW4oUeQQUEGoJiRCwIZDoB4KJCQoBUZGoLYgoooipSAAhoAhxo2IkPApCBJRADcYoqNFEES2NfvMREkUoigSQUpRHQGlDW0q7x9zO7O7szJ2dBYJxPjTde8/jf8/5nzP3jOB79P2lJbS2zgDGAMWgXVBXSPzCfm3f76R8Ut9sizQAtZCoIp/NMmV5jVcr5UK3xwtoal6FJspB8jJNhyGKABS93YbIBjpdN1/K4i3teM0fjccL6N+4E/TuDBtXG5mkMb8db8ScqFVzrHC8xOMtDqAtC9ah+lz0ga6hhMh6eXLlbNG355UQk71AXoorSb9+DgQ45B5V3A2NSG0YB531NhI6TPSduRUoc6/h2XM3LawR3TRnP2hJppb/xJ7d/AIoHgL9h8IN/aCwG+R1gKZ6qD8Ldb/C0V+g4SzBiIfYTUVOakQ3zq5H6eK4zMJiicHgEXDbOCjsmv3UJnW//wh7voQL5z2yATb749Ag+tYsjeROx04wehoUDXZx+7iTqqbkurvQ3Ai7K+HEIWsCUosenKLry/2wM5ULOsHEOdC9T5YIZgmYJqBqK/yxLycuib75jBefo5TMqamee2amI5OTSYvQpRb4bA2c+yszwgFRQXTtTEuE3KUhI+HOSRYPEVwI5ELgTC18sjrySKIVM+wpM9X0yBLoHEHgSBcegap34chP6QWLZ9HVT3mWPf8OGA5jn8gsvstxbpOtOwhfbMxGOERXTg/iNBwaNRUG3W6vjuxlEO4w0QaVL0FLc6iM6IppdvNli6DHTVcbk6D+p2vh5NEsgJY/roGWaqpr+jLoWBgB6AouSF9vhcPm1el90jERfWOqPUJPr4D8Dj69kIZYvQ3+Pu3pU2HnEGg4B80XskTo9Sl2QFOXQteedlL7bwEfrYJ/TkH33tkj6tU7c9wqK7pschCQWZkwC4oGuUoRLDaAzPPwgpBU+E5wsRG2LA4B9Ooku7fho2DkA7mRuh2QWgCFqJuO/cHyEECvlNoBmXQ9usRcL6NB7XAjVDo/WtZIHNwD1e+FAIo/ZOlDLohRk2HIiHAnyRuiAWRUSt2UJddTh/G52FUJh38OAfTyg2lpv6Hru8GkRdHl3x4hTQPKFqfG87DtNWi7FJRSRXTpRHunNuJmp2gg3F8OsZjFjRvJHSudvVxS9u2HUPNdlrJfMiH6RTBgKIx5DDoUuIZ8vNruAipLVlnIzbP2N/h8E5g7Usgjuvi+4H0oJexphD37wl2ToVdx0JQfkA3PuZPw8VpoaYLUdOI3Ze5DL95r70NGNlBgAgOHO0TvdwvE3AF3u0vqMrfK/BaPH4SvKuFiU2QVir4wvh5V95Lvk7fN5kkRc7Xt2Qc6d4O6Q9C1B6RS5goZAv+wCw58nzVNaa/SILpw3H7AHYOi6eQoW16qN94ME591powzJ+DIPjh2AFot1RQepxrRhWMrSOj/Y1DEDIqLxpbQmtgLmh6lc2jOkWS4bAFpIxEb5nxseH70OjSR/tiQmtWTVnNNZbBqnJWooUBBYutl9e7ZDqDSWwso6r0TJfNzzGWf8goVhGrqTo2XHQeczzEpUH17rUIpb0/ff/JIG8IG/jw934Cxdhqdd0cJrXkzQMcgUhzaEjIAh5HONudIA6q1IFXk522Wim8yPun9C9eIpLzmb7PtAAAAAElFTkSuQmCC";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var tp=function(r,e){return tp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])},tp(r,e)};function k(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");tp(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var VI=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),zI=function(){function r(){this.browser=new VI,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!="undefined"}return r}(),Mi=new zI;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Mi.wxa=!0,Mi.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?Mi.worker=!0:typeof navigator=="undefined"?(Mi.node=!0,Mi.svgSupported=!0):GI(navigator.userAgent,Mi);function GI(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),n=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),i&&(t.ie=!0,t.version=i[1]),n&&(t.edge=!0,t.version=n[1],t.newEdge=+n[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document!="undefined";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var Mt=Mi,Gd=12,Kb="sans-serif",$a=Gd+"px "+Kb,FI=20,HI=100,WI="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function $I(r){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function h2(r,e,t){for(var a=t?"invTrans":"trans",i=e[a],n=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&n&&v===n[h]&&c===n[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[a]=t?Qy(s,o):Qy(o,s))}function rw(r){return r.nodeName.toUpperCase()==="CANVAS"}var v2=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Oh=[],c2=Mt.browser.firefox&&+Mt.browser.version.split(".")[0]<39;function sp(r,e,t,a){return t=t||{},a?Jy(r,e,t):c2&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Jy(r,e,t),t}function Jy(r,e,t){if(Mt.domSupported&&r.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(rw(r)){var n=r.getBoundingClientRect();t.zrX=a-n.left,t.zrY=i-n.top;return}else if(op(Oh,r,a,i)){t.zrX=Oh[0],t.zrY=Oh[1];return}}t.zrX=t.zrY=0}function Zd(r){return r||window.event}function qe(r,e,t){if(e=Zd(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(i){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&sp(r,o,e,t)}else{sp(r,e,e,t);var n=p2(e);e.zrDelta=n?n/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&v2.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function p2(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var i=Math.abs(a!==0?a:t),n=a>0?-1:a<0?1:t>0?-1:1;return 3*i*n}function lp(r,e,t,a){r.addEventListener(e,t,a)}function d2(r,e,t,a){r.removeEventListener(e,t,a)}var oa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function tm(r){return r.which===2||r.which===3}var g2=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var i=e.touches;if(!!i){for(var n={points:[],touches:[],target:t,event:e},o=0,s=i.length;o1&&a&&a.length>1){var n=em(a)/em(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=y2(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}},aw="silent";function m2(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:_2}}function _2(){oa(this.event)}var S2=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(sr),Ao=function(){function r(e,t){this.x=e,this.y=t}return r}(),x2=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],iw=function(r){k(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o._hovered=new Ao(0,0),o.storage=t,o.painter=a,o.painterRoot=n,i=i||new S2,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new o2(o),o}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(C(x2,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,i=t.zrY,n=nw(this,a,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=n?new Ao(a,i):this.findHover(a,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ao(0,0)},e.prototype.dispatch=function(t,a){var i=this[t];i&&i.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,i){t=t||{};var n=t.target;if(!(n&&n.silent)){for(var o="on"+a,s=m2(a,t,i);n&&(n[o]&&(s.cancelBubble=!!n[o].call(n,s)),n.trigger(a,s),n=n.__hostTarget?n.__hostTarget:n.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,i){for(var n=this.storage.getDisplayList(),o=new Ao(t,a),s=n.length-1;s>=0;s--){var l=void 0;if(n[s]!==i&&!n[s].ignore&&(l=b2(n[s],t,a))&&(!o.topTarget&&(o.topTarget=n[s]),l!==aw)){o.target=n[s];break}}return o},e.prototype.processGesture=function(t,a){this._gestureMgr||(this._gestureMgr=new g2);var i=this._gestureMgr;a==="start"&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(a==="end"&&i.clear(),n){var o=n.type;t.gestureEvent=o;var s=new Ao;s.target=n.target,this.dispatchToElement(s,o,n.event)}},e}(sr);C(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){iw.prototype[r]=function(e){var t=e.zrX,a=e.zrY,i=nw(this,t,a),n,o;if((r!=="mouseup"||!i)&&(n=this.findHover(t,a),o=n.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||Ia(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,r,e)}});function b2(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,i=void 0,n=!1;a;){if(a.ignoreClip&&(n=!0),!n){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1;a.silent&&(i=!0)}var s=a.__hostTarget;a=s||a.parent}return i?aw:!0}return!1}function nw(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}var w2=iw,ow=32,Co=7;function T2(r){for(var e=0;r>=ow;)e|=r&1,r>>=1;return r+e}function rm(r,e,t,a){var i=e+1;if(i===t)return 1;if(a(r[i++],r[e])<0){for(;i=0;)i++;return i-e}function A2(r,e,t){for(t--;e>>1,i(n,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=n}}function Bh(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])>0){for(s=a-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);n(r,e[t+f])>0?o=f+1:l=f}return l}function Vh(r,e,t,a,i,n){var o=0,s=0,l=1;if(n(r,e[t+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);n(r,e[t+f])<0?l=f:o=f+1}return l}function C2(r,e){var t=Co,a,i,n=0;r.length;var o=[];a=[],i=[];function s(c,p){a[n]=c,i[n]=p,n+=1}function l(){for(;n>1;){var c=n-2;if(c>=1&&i[c-1]<=i[c]+i[c+1]||c>=2&&i[c-2]<=i[c]+i[c-1])i[c-1]i[c+1])break;f(c)}}function u(){for(;n>1;){var c=n-2;c>0&&i[c-1]=Co||w>=Co);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,A=0,M=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,A=0,--p===0){M=!0;break}}else if(r[S--]=o[_--],A++,T=0,--g===1){M=!0;break}while((T|A)=0;y--)r[x+y]=r[b+y];if(p===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(A=g-Bh(r[m],o,0,g,g-1,e),A!==0){for(S-=A,_-=A,g-=A,x=S+1,b=_+1,y=0;y=Co||A>=Co);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),am(r,t,t+l,t+n,e),n=l}o.pushRun(t,n),o.mergeRuns(),i-=n,t+=n}while(i!==0);o.forceMergeRuns()}}var ze=1,ts=2,Nn=4,im=!1;function zh(){im||(im=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nm(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var M2=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nm}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(zh(),f.z=0),isNaN(f.z2)&&(zh(),f.z2=0),isNaN(f.zlevel)&&(zh(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),D2=M2,sw;sw=Mt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var up=sw,Ru={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Ru.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Ru.bounceIn(r*2)*.5:Ru.bounceOut(r*2-1)*.5+.5}},lw=Ru,Ml=Math.pow,Ga=Math.sqrt,Qu=1e-8,uw=1e-4,om=Ga(3),Dl=1/3,Pr=sn(),Je=sn(),Zn=sn();function Ea(r){return r>-Qu&&rQu||r<-Qu}function ee(r,e,t,a,i){var n=1-i;return n*n*(n*r+3*i*e)+i*i*(i*a+3*n*t)}function sm(r,e,t,a,i){var n=1-i;return 3*(((e-r)*n+2*(t-e)*i)*n+(a-t)*i*i)}function ju(r,e,t,a,i,n){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(Ea(f)&&Ea(h))if(Ea(s))n[0]=0;else{var p=-l/s;p>=0&&p<=1&&(n[c++]=p)}else{var d=h*h-4*f*v;if(Ea(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(n[c++]=p),y>=0&&y<=1&&(n[c++]=y)}else if(d>0){var m=Ga(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Ml(-_,Dl):_=Ml(_,Dl),S<0?S=-Ml(-S,Dl):S=Ml(S,Dl);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(n[c++]=p)}else{var b=(2*f*s-3*o*h)/(2*Ga(f*f*f)),x=Math.acos(b)/3,w=Ga(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+om*Math.sin(x)))/(3*o),A=(-s+w*(T-om*Math.sin(x)))/(3*o);p>=0&&p<=1&&(n[c++]=p),y>=0&&y<=1&&(n[c++]=y),A>=0&&A<=1&&(n[c++]=A)}}return c}function hw(r,e,t,a,i){var n=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(Ea(o)){if(fw(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var f=n*n-4*o*s;if(Ea(f))i[0]=-n/(2*o);else if(f>0){var h=Ga(f),u=(-n+h)/(2*o),v=(-n-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function Ya(r,e,t,a,i,n){var o=(e-r)*i+r,s=(t-e)*i+e,l=(a-t)*i+t,u=(s-o)*i+o,f=(l-s)*i+s,h=(f-u)*i+u;n[0]=r,n[1]=o,n[2]=u,n[3]=h,n[4]=h,n[5]=f,n[6]=l,n[7]=a}function vw(r,e,t,a,i,n,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;Pr[0]=l,Pr[1]=u;for(var m=0;m<1;m+=.05)Je[0]=ee(r,t,i,o,m),Je[1]=ee(e,a,n,s,m),g=$i(Pr,Je),g=0&&g=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*n*s;if(Ea(f)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var h=Ga(f),u=(-o+h)/(2*n),v=(-o-h)/(2*n);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function cw(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Is(r,e,t,a,i){var n=(e-r)*a+r,o=(t-e)*a+e,s=(o-n)*a+n;i[0]=r,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function pw(r,e,t,a,i,n,o,s,l){var u,f=.005,h=1/0;Pr[0]=o,Pr[1]=s;for(var v=0;v<1;v+=.05){Je[0]=ie(r,t,i,v),Je[1]=ie(e,a,n,v);var c=$i(Pr,Je);c=0&&c=1?1:ju(0,a,n,1,l,s)&&ee(0,i,o,1,s[0])}}}var E2=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Kt,this.ondestroy=e.ondestroy||Kt,this.onrestart=e.onrestart||Kt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,i=e-this._startTime-this._pausedTime,n=i/a;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,s=o?o(n):n;if(this.onframe(s),n===1)if(this.loop){var l=i%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:lw[e]||Xd(e)},r}(),k2=E2,dw=function(){function r(e){this.value=e}return r}(),O2=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new dw(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),N2=function(){function r(e){this._list=new O2,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,i=this._map,n=null;if(i[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete i[l.key],n=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new dw(t),s.key=e,a.insertEntry(s),i[e]=s}return n},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),al=N2,lm={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 yr(r){return r=Math.round(r),r<0?0:r>255?255:r}function B2(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ps(r){return r<0?0:r>1?1:r}function Gh(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?yr(parseFloat(e)/100*255):yr(parseInt(e,10))}function jn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Ps(parseFloat(e)/100):Ps(parseFloat(e))}function Fh(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function ka(r,e,t){return r+(e-r)*t}function Xe(r,e,t,a,i){return r[0]=e,r[1]=t,r[2]=a,r[3]=i,r}function hp(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var gw=new al(20),Ll=null;function gn(r,e){Ll&&hp(Ll,e),Ll=gw.put(r,Ll||e.slice())}function Ge(r,e){if(!!r){e=e||[];var t=gw.get(r);if(t)return hp(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in lm)return hp(e,lm[a]),gn(r,e),e;var i=a.length;if(a.charAt(0)==="#"){if(i===4||i===5){var n=parseInt(a.slice(1,4),16);if(!(n>=0&&n<=4095)){Xe(e,0,0,0,1);return}return Xe(e,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(a.slice(4),16)/15:1),gn(r,e),e}else if(i===7||i===9){var n=parseInt(a.slice(1,7),16);if(!(n>=0&&n<=16777215)){Xe(e,0,0,0,1);return}return Xe(e,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(a.slice(7),16)/255:1),gn(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===i){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Xe(e,+u[0],+u[1],+u[2],1):Xe(e,0,0,0,1);f=jn(u.pop());case"rgb":if(u.length!==3){Xe(e,0,0,0,1);return}return Xe(e,Gh(u[0]),Gh(u[1]),Gh(u[2]),f),gn(r,e),e;case"hsla":if(u.length!==4){Xe(e,0,0,0,1);return}return u[3]=jn(u[3]),vp(u,e),gn(r,e),e;case"hsl":if(u.length!==3){Xe(e,0,0,0,1);return}return vp(u,e),gn(r,e),e;default:return}}Xe(e,0,0,0,1)}}function vp(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=jn(r[1]),i=jn(r[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],Xe(e,yr(Fh(o,n,t+1/3)*255),yr(Fh(o,n,t)*255),yr(Fh(o,n,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function V2(r){if(!!r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,i=Math.min(e,t,a),n=Math.max(e,t,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var f=((n-e)/6+o/2)/o,h=((n-t)/6+o/2)/o,v=((n-a)/6+o/2)/o;e===n?l=v-h:t===n?l=1/3+f-v:a===n&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function cp(r,e){var t=Ge(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return ra(t,t.length===4?"rgba":"rgb")}}function Hh(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return t[0]=yr(ka(o[0],s[0],l)),t[1]=yr(ka(o[1],s[1],l)),t[2]=yr(ka(o[2],s[2],l)),t[3]=Ps(ka(o[3],s[3],l)),t}}function z2(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=Ge(e[i]),s=Ge(e[n]),l=a-i,u=ra([yr(ka(o[0],s[0],l)),yr(ka(o[1],s[1],l)),yr(ka(o[2],s[2],l)),Ps(ka(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}function cs(r,e,t,a){var i=Ge(r);if(r)return i=V2(i),e!=null&&(i[0]=B2(e)),t!=null&&(i[1]=jn(t)),a!=null&&(i[2]=jn(a)),ra(vp(i),"rgba")}function Ju(r,e){var t=Ge(r);if(t&&e!=null)return t[3]=Ps(e),ra(t,"rgba")}function ra(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function tf(r,e){var t=Ge(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var ef=Math.round;function Jn(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Ge(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var um=1e-4;function Oa(r){return r-um}function Il(r){return ef(r*1e3)/1e3}function pp(r){return ef(r*1e4)/1e4}function G2(r){return"matrix("+Il(r[0])+","+Il(r[1])+","+Il(r[2])+","+Il(r[3])+","+pp(r[4])+","+pp(r[5])+")"}var F2={left:"start",right:"end",center:"middle",middle:"middle"};function H2(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function W2(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function $2(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function yw(r){return r&&!!r.image}function U2(r){return r&&!!r.svgElement}function Y2(r){return yw(r)||U2(r)}function mw(r){return r.type==="linear"}function _w(r){return r.type==="radial"}function Z2(r){return r&&(r.type==="linear"||r.type==="radial")}function qf(r){return"url(#"+r+")"}function Sw(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function xw(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Lu,i=ct(r.scaleX,1),n=ct(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(i!==1||n!==1)&&l.push("scale("+i+","+n+")"),(o||s)&&l.push("skew("+ef(o*Lu)+"deg, "+ef(s*Lu)+"deg)"),l.join(" ")}var X2=function(){return Mt.hasGlobalWindow&&K(window.btoa)?function(r){return window.btoa(unescape(r))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),dp=Array.prototype.slice;function Kr(r,e,t){return(e-r)*t+r}function Wh(r,e,t,a){for(var i=e.length,n=0;na?e:r,n=Math.min(t,a),o=i[n-1]||{color:[0,0,0,0],offset:0},s=n;so;if(s)a.length=o;else for(var l=n;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var i=this.keyframes,n=i.length,o=!1,s=hm,l=t;if(ye(t)){var u=j2(t);s=u,(u===1&&!wt(t[0])||u===2&&!wt(t[0][0]))&&(o=!0)}else if(wt(t)&&!Ls(t))s=Rl;else if($(t))if(!isNaN(+t))s=Rl;else{var f=Ge(t);f&&(l=f,s=es)}else if(Zf(t)){var h=V({},l);h.colorStops=G(t.colorStops,function(c){return{offset:c.offset,color:Ge(c.color)}}),mw(t)?s=gp:_w(t)&&(s=yp),l=h}n===0?this.valType=s:(s!==this.valType||s===hm)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=K(a)?a:lw[a]||Xd(a)),i.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var i=this.valType,n=a.length,o=a[n-1],s=this.discrete,l=El(i),u=vm(i),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(f-1,s-2)}p=o[f+1],c=o[f]}if(!!(c&&p)){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?Mo:e[l];if((El(n)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(El(n))n===ku?Wh(m,c[i],p[i],y):q2(m,c[i],p[i],y);else if(vm(n)){var _=c[i],S=p[i],b=n===gp;e[l]={type:b?"linear":"radial",x:Kr(_.x,S.x,y),y:Kr(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var A=S.colorStops[T];return{offset:Kr(w.offset,A.offset,y),color:Eu(Wh([],w.color,A.color,y))}}),global:S.global},b?(e[l].x2=Kr(_.x2,S.x2,y),e[l].y2=Kr(_.y2,S.y2,y)):e[l].r=Kr(_.r,S.r,y)}else if(u)Wh(m,c[i],p[i],y),a||(e[l]=Eu(m));else{var x=Kr(c[i],p[i],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,i=this._additiveValue;t===Rl?e[a]=e[a]+i:t===es?(Ge(e[a],Mo),Pl(Mo,Mo,i,1),e[a]=Eu(Mo)):t===ku?Pl(e[a],e[a],i,1):t===bw&&fm(e[a],e[a],i,1)},r}(),tP=function(){function r(e,t,a,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){Wd("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,mt(t),a)},r.prototype.whenWithKeys=function(e,t,a,i){for(var n=this._tracks,o=0;o0&&l.addKeyframe(0,ps(u),i),this._trackKeys.push(s)}l.addKeyframe(e,ps(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],i=this._maxTime||0,n=0;n1){var s=o.pop();n.addKeyframe(s.time,e[i]),n.prepare(this._maxTime,n.getAdditiveTrack())}}}},r}(),qd=tP;function Fn(){return new Date().getTime()}var eP=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(!!t.animation){var a=t.prev,i=t.next;a?a.next=i:this._head=i,i?i.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Fn()-this._pausedTime,i=a-this._time,n=this._head;n;){var o=n.next,s=n.step(a,i);s&&(n.ondestroy(),this.removeClip(n)),n=o}this._time=a,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(up(a),!t._paused&&t.update())}up(a)},e.prototype.start=function(){this._running||(this._time=Fn(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Fn(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Fn()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var i=new qd(t,a.loop);return this.addAnimator(i),i},e}(sr),rP=eP,aP=300,$h=Mt.domSupported,Uh=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=G(r,function(i){var n=i.replace("mouse","pointer");return t.hasOwnProperty(n)?n:i});return{mouse:r,touch:e,pointer:a}}(),cm={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},pm=!1;function mp(r){var e=r.pointerType;return e==="pen"||e==="touch"}function iP(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Yh(r){r&&(r.zrByTouch=!0)}function nP(r,e){return qe(r.dom,new oP(r,e),!0)}function ww(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var oP=function(){function r(e,t){this.stopPropagation=Kt,this.stopImmediatePropagation=Kt,this.preventDefault=Kt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),vr={mousedown:function(r){r=qe(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=qe(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=qe(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=qe(this.dom,r);var e=r.toElement||r.relatedTarget;ww(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){pm=!0,r=qe(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){pm||(r=qe(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=qe(this.dom,r),Yh(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),vr.mousemove.call(this,r),vr.mousedown.call(this,r)},touchmove:function(r){r=qe(this.dom,r),Yh(r),this.handler.processGesture(r,"change"),vr.mousemove.call(this,r)},touchend:function(r){r=qe(this.dom,r),Yh(r),this.handler.processGesture(r,"end"),vr.mouseup.call(this,r),+new Date-+this.__lastTouchMomentym||r<-ym}var ai=[],yn=[],Xh=nr(),qh=Math.abs,jr=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return ri(this.rotation)||ri(this.x)||ri(this.y)||ri(this.scaleX-1)||ri(this.scaleY-1)||ri(this.skewX)||ri(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&gm(a);return}a=a||nr(),t?this.getLocalTransform(a):gm(a),e&&(t?aa(a,e,a):Kd(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ai);var a=ai[0]<0?-1:1,i=ai[1]<0?-1:1,n=((ai[0]-a)*t+a)/ai[0]||0,o=((ai[1]-i)*t+i)/ai[1]||0;e[0]*=n,e[1]*=n,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||nr(),uo(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(!!e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),n=Math.PI/2+i-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(n),t=Math.sqrt(t),this.skewX=n,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(aa(yn,e.invTransform,t),t=yn);var a=this.originX,i=this.originY;(a||i)&&(Xh[4]=a,Xh[5]=i,aa(yn,t,Xh),yn[4]-=a,yn[5]-=i,t=yn),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],i=this.invTransform;return i&&ue(a,a,i),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],i=this.transform;return i&&ue(a,a,i),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&qh(e[0]-1)>1e-10&&qh(e[3]-1)>1e-10?Math.sqrt(qh(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Aw(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,i=e.originY||0,n=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||i||s||l){var p=a+s,d=i+l;t[4]=-p*n-v*d*o,t[5]=-d*o-c*p*n}else t[4]=t[5]=0;return t[0]=n,t[3]=o,t[1]=c*n,t[2]=v*o,u&&ln(t,t,u),t[4]+=a+f,t[5]+=i+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Gr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Aw(r,e){for(var t=0;tp&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var i=a[0],n=a[3],o=a[4],s=a[5];e.x=t.x*i+o,e.y=t.y*n+s,e.width=t.width*i,e.height=t.height*n,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}ii.x=oi.x=t.x,ii.y=si.y=t.y,ni.x=si.x=t.x+t.width,ni.y=oi.y=t.y+t.height,ii.transform(a),si.transform(a),ni.transform(a),oi.transform(a),e.x=kl(ii.x,ni.x,oi.x,si.x),e.y=kl(ii.y,ni.y,oi.y,si.y);var l=Ol(ii.x,ni.x,oi.x,si.x),u=Ol(ii.y,ni.y,oi.y,si.y);e.width=l-e.x,e.height=u-e.y},r}(),ft=pP,mm={};function Fe(r,e){e=e||$a;var t=mm[e];t||(t=mm[e]=new al(500));var a=t.get(r);return a==null&&(a=Ua.measureText(r,e).width,t.put(r,a)),a}function _m(r,e,t,a){var i=Fe(r,e),n=Qf(e),o=rs(0,i,t),s=Bn(0,n,a),l=new ft(o,s,i,n);return l}function il(r,e,t,a){var i=((r||"")+"").split(` `),n=i.length;if(n===1)return _m(i[0],e,t,a);for(var o=new ft(0,0,0,0),s=0;s=0?parseFloat(r)/100*e:parseFloat(r):r}function af(r,e,t){var a=e.position||"inside",i=e.distance!=null?e.distance:5,n=t.height,o=t.width,s=n/2,l=t.x,u=t.y,f="left",h="top";if(a instanceof Array)l+=_r(a[0],t.width),u+=_r(a[1],t.height),f=null,h=null;else switch(a){case"left":l-=i,u+=s,f="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,f="center",h="bottom";break;case"bottom":l+=o/2,u+=n+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=n-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=n-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=n-i,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Kh="__zr_normal__",Qh=Gr.concat(["ignore"]),dP=Vr(Gr,function(r,e){return r[e]=!0,r},{ignore:!1}),mn={},gP=new ft(0,0,0,0),jd=function(){function r(e){this.id=Jb(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,i=a.local,n=t.innerTransformable,o=void 0,s=void 0,l=!1;n.parent=i?this:null;var u=!1;if(n.copyTransform(t),a.position!=null){var f=gP;a.layoutRect?f.copy(a.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(mn,a,f):af(mn,a,f),n.x=mn.x,n.y=mn.y,o=mn.align,s=mn.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=_r(h[0],f.width),c=_r(h[1],f.height)),u=!0,n.originX=-n.x+v+(i?0:f.x),n.originY=-n.y+c+(i?0:f.y)}}a.rotation!=null&&(n.rotation=a.rotation);var p=a.offset;p&&(n.x+=p[0],n.y+=p[1],u||(n.originX=-p[0],n.originY=-p[1]));var d=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=a.insideFill,m=a.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=a.outsideFill,m=a.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=ze,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?bp:xp},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&Ge(t);a||(a=[255,255,255,1]);for(var i=a[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*i+(n?0:255)*(1-i);return a[3]=1,ra(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(j(e))for(var a=e,i=mt(a),n=0;n0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Kh,!1,e)},r.prototype.useState=function(e,t,a,i){var n=e===Kh,o=this.hasState();if(!(!o&&n)){var s=this.currentStates,l=this.stateTransition;if(!(vt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!n&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!n){Wd("State "+e+" not exists.");return}n||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(e,t,a,f),v&&v.useState(e,t,a,f),n?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ze),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var i=[],n=this.currentStates,o=e.length,s=o===n.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ze)}},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var i=this.currentStates.slice(),n=vt(i,e),o=vt(i,t)>=0;n>=0?o?i.splice(n,1):i[n]=t:a&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,i=0;i=0&&n.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,i=a.length,n=[],o=0;o0&&t.during&&n[0].during(function(p,d){t.during(d)});for(var v=0;v0||i.force&&!o.length){var T=void 0,A=void 0,M=void 0;if(s){A={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];A[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){M={};for(var S=0;S<_;S++){var y=d[S];M[y]=ps(t[y]),mP(t,a,y)}}var b=new qd(t,!1,!1,h?Rt(p,function(L){return L.targetName===e}):null);b.targetName=e,i.scope&&(b.scope=i.scope),v&&T&&b.whenWithKeys(0,T,d),M&&b.whenWithKeys(0,M,d),b.whenWithKeys(u==null?500:u,s?A:a,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}var Mw=jd,Dw=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var i=vt(this._children,t);return i>=0&&this.replaceAt(a,i),this},e.prototype.replaceAt=function(t,a){var i=this._children,n=i[a];if(t&&t!==this&&t.parent!==this&&t!==n){i[a]=t,n.parent=null;var o=this.__zr;o&&n.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,i=this._children,n=vt(i,t);return n<0?this:(i.splice(n,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},r.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},r.prototype.clearAnimation=function(){this.animation.clear()},r.prototype.getWidth=function(){return this.painter.getWidth()},r.prototype.getHeight=function(){return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this.handler.off(e,t)},r.prototype.trigger=function(e,t){this.handler.trigger(e,t)},r.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t0){if(r<=i)return o;if(r>=n)return s}else{if(r>=i)return o;if(r<=n)return s}else{if(r===i)return o;if(r===n)return s}return(r-i)/l*u+o}function H(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return $(r)?AP(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Ut(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),Iw),r=(+r).toFixed(e),t?r:+r}function ar(r){return r.sort(function(e,t){return e-t}),r}function Er(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return CP(r)}function CP(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,i=t>0?t:e.length,n=e.indexOf("."),o=n<0?0:i-1-n;return Math.max(0,o-a)}function Pw(r,e){var t=Math.log,a=Math.LN10,i=Math.floor(t(r[1]-r[0])/a),n=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function MP(r,e,t){if(!r[e])return 0;var a=Vr(r,function(p,d){return p+(isNaN(d)?0:d)},0);if(a===0)return 0;for(var i=Math.pow(10,t),n=G(r,function(p){return(isNaN(p)?0:p)/a*i*100}),o=i*100,s=G(n,function(p){return Math.floor(p)}),l=Vr(s,function(p,d){return p+d},0),u=G(n,function(p,d){return p-s[d]});lf&&(f=u[v],h=v);++s[h],u[h]=0,++l}return s[e]/i}function DP(r,e){var t=Math.max(Er(r),Er(e)),a=r+e;return t>Iw?a:Ut(a,t)}var bm=9007199254740991;function Rw(r){var e=Math.PI*2;return(r%e+e)%e}function nf(r){return r>-xm&&r=10&&e++,e}function Ew(r,e){var t=Jd(r),a=Math.pow(10,t),i=r/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,r=n*a,t>=-20?+r.toFixed(t<0?-t:0):r}function tv(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),i=+r[a-1],n=t-a;return n?i+n*(r[a]-i):i}function wm(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||n&&vt(n,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var tR=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],eR=en(tR),rR=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return eR(this,e,t)},r}(),Tp=new al(50);function aR(r){if(typeof r=="string"){var e=Tp.get(r);return e&&e.image}else return r}function ag(r,e,t,a,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var n=Tp.get(r),o={hostEl:t,cb:a,cbPayload:i};return n?(e=n.image,!Jf(e)&&n.pending.push(o)):(e=Ua.loadImage(r,Mm,Mm),e.__zrImageSrc=r,Tp.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function Mm(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Fe(t,e);return u>s&&(t="",u=0),s=r-u,i.ellipsis=t,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function Yw(r,e){var t=e.containerWidth,a=e.font,i=e.contentWidth;if(!t)return"";var n=Fe(r,a);if(n<=t)return r;for(var o=0;;o++){if(n<=i||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?nR(r,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(r.length*i/n):0;r=r.substr(0,s),n=Fe(r,a)}return r===""&&(r=e.placeholder),r}function nR(r,e,t,a){for(var i=0,n=0,o=r.length;nc&&u){var p=Math.floor(c/s);h=h.slice(0,p)}if(r&&n&&f!=null)for(var d=Uw(f,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;gs&&rv(t,r.substring(s,u),e,o),rv(t,l[2],e,o,l[1]),s=ev.lastIndex}si){b>0?(m.tokens=m.tokens.slice(0,b),g(m,S,_),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y);break t}var L=w.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=Fe(x.text,M);else{if(I){var P=w.backgroundColor,R=P&&P.image;R&&(R=aR(R),Jf(R)&&(x.width=Math.max(x.width,R.width*D/R.height)))}var E=p&&a!=null?a-S:null;E!=null&&E0&&p+a.accumWidth>a.width&&(f=e.split(` `),u=!0),a.accumWidth=p}else{var d=Zw(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,h=d.linesWidths,f=d.lines}}else f=e.split(` `);for(var g=0;g=33&&e<=383}var hR=Vr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function vR(r){return fR(r)?!!hR[r]:!0}function Zw(r,e,t,a,i){for(var n=[],o=[],s="",l="",u=0,f=0,h=0;ht:i+f+c>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),n.push(s),o.push(f-u),l+=v,u+=c,s="",f=u):(l&&(s+=l,l="",u=0),n.push(s),o.push(f),s=v,f=c)):p?(n.push(l),o.push(u),l=v,u=c):(n.push(v),o.push(c));continue}f+=c,p?(l+=v,u+=c):(l&&(s+=l,l="",u=0),s+=v)}return!n.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(n.push(s),o.push(f)),n.length===1&&(f+=i),{accumWidth:f,lines:n,linesWidths:o}}var Ap="__zr_style_"+Math.round(Math.random()*10),Ui={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},th={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ui[Ap]=!0;var Lm=["z","z2","invisible"],cR=["invisible"],pR=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=mt(t),i=0;i1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Nl[0]=ov(i)*t+r,Nl[1]=nv(i)*a+e,Bl[0]=ov(n)*t+r,Bl[1]=nv(n)*a+e,u(s,Nl,Bl),f(l,Nl,Bl),i=i%ui,i<0&&(i=i+ui),n=n%ui,n<0&&(n=n+ui),i>n&&!o?n+=ui:ii&&(Vl[0]=ov(c)*t+r,Vl[1]=nv(c)*a+e,u(s,Vl,s),f(l,Vl,l))}var kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fi=[],hi=[],wr=[],ya=[],Tr=[],Ar=[],sv=Math.min,lv=Math.max,vi=Math.cos,ci=Math.sin,Zr=Math.abs,Cp=Math.PI,Ca=Cp*2,uv=typeof Float32Array!="undefined",Io=[];function fv(r){var e=Math.round(r/Cp*1e8)/1e8;return e%2*Cp}function Xw(r,e){var t=fv(r[0]);t<0&&(t+=Ca);var a=t-r[0],i=r[1];i+=a,!e&&i-t>=Ca?i=t+Ca:e&&t-i>=Ca?i=t-Ca:!e&&t>i?i=t+(Ca-fv(t-i)):e&&t0&&(this._ux=Zr(a/rf/e)||0,this._uy=Zr(a/rf/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(kt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=Zr(e-this._xi),i=Zr(t-this._yi),n=a>this._ux||i>this._uy;if(this.addData(kt.L,e,t),this._ctx&&n&&this._ctx.lineTo(e,t),n)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){return this._drawPendingPt(),this.addData(kt.C,e,t,a,i,n,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,i,n,o),this._xi=n,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,i){return this._drawPendingPt(),this.addData(kt.Q,e,t,a,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,i),this._xi=a,this._yi=i,this},r.prototype.arc=function(e,t,a,i,n,o){this._drawPendingPt(),Io[0]=i,Io[1]=n,Xw(Io,o),i=Io[0],n=Io[1];var s=n-i;return this.addData(kt.A,e,t,a,a,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,i,n,o),this._xi=vi(n)*a+e,this._yi=ci(n)*a+t,this},r.prototype.arcTo=function(e,t,a,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,i,n),this},r.prototype.rect=function(e,t,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,i),this.addData(kt.R,e,t,a,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(kt.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&uv&&(this.data=new Float32Array(t));for(var a=0;af.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){wr[0]=wr[1]=Tr[0]=Tr[1]=Number.MAX_VALUE,ya[0]=ya[1]=Ar[0]=Ar[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,i=0,n=0,o;for(o=0;oa||Zr(_)>i||v===t-1)&&(d=Math.sqrt(m*m+_*_),n=g,o=y);break}case kt.C:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++],x=e[v++],w=e[v++];d=L2(n,o,S,b,g,y,x,w,10),n=x,o=w;break}case kt.Q:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++];d=P2(n,o,S,b,g,y,10),n=g,o=y;break}case kt.A:var T=e[v++],A=e[v++],M=e[v++],D=e[v++],L=e[v++],I=e[v++],P=I+L;v+=1,e[v++],p&&(s=vi(L)*M+T,l=ci(L)*D+A),d=lv(M,D)*sv(Ca,Math.abs(I)),n=vi(P)*M+T,o=ci(P)*D+A;break;case kt.R:{s=n=e[v++],l=o=e[v++];var R=e[v++],E=e[v++];d=R*2+E*2;break}case kt.Z:{var m=s-n,_=l-o;d=Math.sqrt(m*m+_*_),n=s,o=l;break}}d>=0&&(u[h++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var a=this.data,i=this._ux,n=this._uy,o=this._len,s,l,u,f,h,v,c=t<1,p,d,g=0,y=0,m,_=0,S,b;if(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m))return;t:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case kt.M:s=u=a[x++],l=f=a[x++],e.moveTo(u,f);break;case kt.L:{h=a[x++],v=a[x++];var A=Zr(h-u),M=Zr(v-f);if(A>i||M>n){if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+h*L,f*(1-L)+v*L);break t}g+=D}e.lineTo(h,v),u=h,f=v,_=0}else{var I=A*A+M*M;I>_&&(S=h,b=v,_=I)}break}case kt.C:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++],O=a[x++],B=a[x++];if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;Ya(u,P,E,O,L,fi),Ya(f,R,N,B,L,hi),e.bezierCurveTo(fi[1],hi[1],fi[2],hi[2],fi[3],hi[3]);break t}g+=D}e.bezierCurveTo(P,R,E,N,O,B),u=O,f=B;break}case kt.Q:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++];if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;Is(u,P,E,L,fi),Is(f,R,N,L,hi),e.quadraticCurveTo(fi[1],hi[1],fi[2],hi[2]);break t}g+=D}e.quadraticCurveTo(P,R,E,N),u=E,f=N;break}case kt.A:var F=a[x++],W=a[x++],Z=a[x++],tt=a[x++],ht=a[x++],It=a[x++],Dt=a[x++],dt=!a[x++],et=Z>tt?Z:tt,yt=Zr(Z-tt)>.001,ut=ht+It,X=!1;if(c){var D=p[y++];g+D>m&&(ut=ht+It*(m-g)/D,X=!0),g+=D}if(yt&&e.ellipse?e.ellipse(F,W,Z,tt,Dt,ht,ut,dt):e.arc(F,W,et,ht,ut,dt),X)break t;T&&(s=vi(ht)*Z+F,l=ci(ht)*tt+W),u=vi(ut)*Z+F,f=ci(ut)*tt+W;break;case kt.R:s=u=a[x],l=f=a[x+1],h=a[x++],v=a[x++];var ot=a[x++],Vt=a[x++];if(c){var D=p[y++];if(g+D>m){var St=m-g;e.moveTo(h,v),e.lineTo(h+sv(St,ot),v),St-=ot,St>0&&e.lineTo(h+ot,v+sv(St,Vt)),St-=Vt,St>0&&e.lineTo(h+lv(ot-St,0),v+Vt),St-=ot,St>0&&e.lineTo(h,v+lv(Vt-St,0));break t}g+=D}e.rect(h,v,ot,Vt);break;case kt.Z:if(c){var D=p[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=kt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}(),Hr=_R;function Da(r,e,t,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>a+s||or+s&&n>t+s||ne+h&&f>a+h&&f>n+h&&f>s+h||fr+h&&u>t+h&&u>i+h&&u>o+h||ue+u&&l>a+u&&l>n+u||lr+u&&s>t+u&&s>i+u||st||f+ui&&(i+=Po);var v=Math.atan2(l,s);return v<0&&(v+=Po),v>=a&&v<=i||v+Po>=a&&v+Po<=i}function Qr(r,e,t,a,i,n){if(n>e&&n>a||ni?s:0}var ma=Hr.CMD,pi=Math.PI*2,bR=1e-4;function wR(r,e){return Math.abs(r-e)e&&u>a&&u>n&&u>s||u1&&TR(),c=ee(e,a,n,s,Qe[0]),v>1&&(p=ee(e,a,n,s,Qe[1]))),v===2?ge&&s>a&&s>n||s=0&&u<=1){for(var f=0,h=ie(e,a,n,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);be[0]=-l,be[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u>=pi-1e-4){a=0,i=pi;var f=n?1:-1;return o>=be[0]+r&&o<=be[1]+r?f:0}if(a>i){var h=a;a=i,i=h}a<0&&(a+=pi,i+=pi);for(var v=0,c=0;c<2;c++){var p=be[c];if(p+r>o){var d=Math.atan2(s,p),f=n?1:-1;d<0&&(d=pi+d),(d>=a&&d<=i||d+pi>=a&&d+pi<=i)&&(d>Math.PI/2&&d1&&(t||(s+=Qr(l,u,f,h,a,i))),g&&(l=n[p],u=n[p+1],f=l,h=u),d){case ma.M:f=n[p++],h=n[p++],l=f,u=h;break;case ma.L:if(t){if(Da(l,u,n[p],n[p+1],e,a,i))return!0}else s+=Qr(l,u,n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case ma.C:if(t){if(SR(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],e,a,i))return!0}else s+=AR(l,u,n[p++],n[p++],n[p++],n[p++],n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case ma.Q:if(t){if(qw(l,u,n[p++],n[p++],n[p],n[p+1],e,a,i))return!0}else s+=CR(l,u,n[p++],n[p++],n[p],n[p+1],a,i)||0;l=n[p++],u=n[p++];break;case ma.A:var y=n[p++],m=n[p++],_=n[p++],S=n[p++],b=n[p++],x=n[p++];p+=1;var w=!!(1-n[p++]);v=Math.cos(b)*_+y,c=Math.sin(b)*S+m,g?(f=v,h=c):s+=Qr(l,u,v,c,a,i);var T=(a-y)*S/_+y;if(t){if(xR(y,m,S,b,b+x,w,e,T,i))return!0}else s+=MR(y,m,S,b,b+x,w,T,i);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case ma.R:f=l=n[p++],h=u=n[p++];var A=n[p++],M=n[p++];if(v=f+A,c=h+M,t){if(Da(f,h,v,h,e,a,i)||Da(v,h,v,c,e,a,i)||Da(v,c,f,c,e,a,i)||Da(f,c,f,h,e,a,i))return!0}else s+=Qr(v,h,v,c,a,i),s+=Qr(f,c,f,h,a,i);break;case ma.Z:if(t){if(Da(l,u,f,h,e,a,i))return!0}else s+=Qr(l,u,f,h,a,i);l=f,u=h;break}}return!t&&!wR(u,h)&&(s+=Qr(l,u,f,h,a,i)||0),s!==0}function DR(r,e,t){return Kw(r,0,!1,e,t)}function LR(r,e,t,a){return Kw(r,e,!0,t,a)}var of=Q({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ui),IR={style:Q({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},th.style)},hv=Gr.concat(["invisible","culling","z","z2","zlevel","parent"]),PR=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var n=i.style;for(var o in a)n[o]!==a[o]&&(n[o]=a[o]);n.fill=a.fill?a.decal:null,n.decal=null,n.shadowColor=null,a.strokeFirst&&(n.stroke=null);for(var s=0;s.5?xp:a>.2?hP:bp}else if(t)return bp}return xp},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if($(a)){var i=this.__zr,n=!!(i&&i.isDarkMode()),o=tf(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,i=!t;if(i){var n=!1;this.path||(n=!0,this.createPathProxy());var o=this.path;(n||this.__dirty&Nn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect(),o=this.style;if(t=i[0],a=i[1],n.contain(t,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),LR(s,l/u,t,a)))return!0}if(this.hasFill())return DR(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Nn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=a:V(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Nn)},e.prototype.createStyle=function(t){return Xf(of,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=V({},this.shape))},e.prototype._applyStateObj=function(t,a,i,n,o,s){r.prototype._applyStateObj.call(this,t,a,i,n,o,s);var l=!(a&&n),u;if(a&&a.shape?o?n?u=a.shape:(u=V({},i.shape),V(u,a.shape)):(u=V({},n?this.shape:i.shape),V(u,a.shape)):l&&(u=i.shape),u)if(o){this.shape=V({},this.shape);for(var f={},h=mt(u),v=0;v0},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return Xf(RR,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var a=t.text;a!=null?a+="":a="";var i=il(a,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var n=t.lineWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(or);Qw.prototype.type="tspan";var Es=Qw,ER=Q({x:0,y:0},Ui),kR={style:Q({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},th.style)};function OR(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var jw=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return Xf(ER,t)},e.prototype._getSize=function(t){var a=this.style,i=a[t];if(i!=null)return i;var n=OR(a.image)?a.image:this.__image;if(!n)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?n[t]:n[t]/n[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return kR},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ft(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(or);jw.prototype.type="image";var ve=jw;function NR(r,e){var t=e.x,a=e.y,i=e.width,n=e.height,o=e.r,s,l,u,f;i<0&&(t=t+i,i=-i),n<0&&(a=a+n,n=-n),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+f>i&&(h=u+f,u*=i/h,f*=i/h),l+u>n&&(h=l+u,l*=n/h,u*=n/h),s+f>n&&(h=s+f,s*=n/h,f*=n/h),r.moveTo(t+s,a),r.lineTo(t+i-l,a),l!==0&&r.arc(t+i-l,a+l,l,-Math.PI/2,0),r.lineTo(t+i,a+n-u),u!==0&&r.arc(t+i-u,a+n-u,u,0,Math.PI/2),r.lineTo(t+f,a+n),f!==0&&r.arc(t+f,a+n-f,f,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var Hn=Math.round;function Jw(r,e,t){if(!!e){var a=e.x1,i=e.x2,n=e.y1,o=e.y2;r.x1=a,r.x2=i,r.y1=n,r.y2=o;var s=t&&t.lineWidth;return s&&(Hn(a*2)===Hn(i*2)&&(r.x1=r.x2=zi(a,s,!0)),Hn(n*2)===Hn(o*2)&&(r.y1=r.y2=zi(n,s,!0))),r}}function tT(r,e,t){if(!!e){var a=e.x,i=e.y,n=e.width,o=e.height;r.x=a,r.y=i,r.width=n,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=zi(a,s,!0),r.y=zi(i,s,!0),r.width=Math.max(zi(a+n,s,!1)-r.x,n===0?0:1),r.height=Math.max(zi(i+o,s,!1)-r.y,o===0?0:1)),r}}function zi(r,e,t){if(!e)return r;var a=Hn(r*2);return(a+Hn(e))%2===0?a/2:(a+(t?1:-1))/2}var BR=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),VR={},eT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new BR},e.prototype.buildPath=function(t,a){var i,n,o,s;if(this.subPixelOptimize){var l=tT(VR,a,this.style);i=l.x,n=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else i=a.x,n=a.y,o=a.width,s=a.height;a.r?NR(t,a):t.rect(i,n,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(gt);eT.prototype.type="rect";var xt=eT,km={fill:"#000"},Om=2,zR={style:Q({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},th.style)},rT=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=km,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,L=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P=0&&(P=x[I],P.align==="right");)this._placeToken(P,t,T,y,L,"right",_),A-=P.width,L-=P.width,I--;for(D+=(n-(D-g)-(m-L)-A)/2;M<=I;)P=x[M],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,M++;y+=T}},e.prototype._placeToken=function(t,a,i,n,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,h=n+i/2;f==="top"?h=n+t.height/2:f==="bottom"&&(h=n+i-t.height/2);var v=!t.isLineHolder&&vv(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var c=!!u.backgroundColor,p=t.textPadding;p&&(o=Fm(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Es),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=Gm("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=zm("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=Om,y.stroke):null),x=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||$a,g.opacity=ta(u.opacity,a.opacity,1),Bm(g,u),b&&(g.lineWidth=ta(u.lineWidth,a.lineWidth,_),g.lineDash=ct(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),S&&(g.fill=S);var w=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new ft(rs(g.x,w,g.textAlign),Bn(g.y,T,g.textBaseline),w,T))},e.prototype._renderBackground=function(t,a,i,n,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,v=l&&!h,c=t.borderRadius,p=this,d,g;if(v||t.lineHeight||u&&f){d=this._getOrCreateChild(xt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=i,y.y=n,y.width=o,y.height=s,y.r=c,d.dirtyShape()}if(v){var m=d.style;m.fill=l||null,m.fillOpacity=ct(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(ve),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=n,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=ct(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=ta(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return iT(t)&&(a=[t.fontStyle,t.fontWeight,aT(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&dr(a)||t.textFont||t.font},e}(or),GR={left:!0,right:1,center:1},FR={top:1,bottom:1,middle:1},Nm=["fontStyle","fontWeight","fontSize","fontFamily"];function aT(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Gd+"px":r+"px"}function Bm(r,e){for(var t=0;t=0,n=!1;if(r instanceof gt){var o=nT(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(_n(s)||_n(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(n=!0,a=V({},a),u=V({},u),u.fill=s):!_n(u.fill)&&_n(s)?(n=!0,a=V({},a),u=V({},u),u.fill=Ym(s)):!_n(u.stroke)&&_n(l)&&(n||(a=V({},a),u=V({},u)),u.stroke=Ym(l)),a.style=u}}if(a&&a.z2==null){n||(a=V({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f!=null?f:ho)}return a}function XR(r,e,t){if(t&&t.z2==null){t=V({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:WR)}return t}function qR(r,e,t){var a=vt(r.currentStates,e)>=0,i=r.style.opacity,n=a?null:YR(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=V({},t),o=V({opacity:a?i:n.opacity*.1},o),t.style=o),t}function cv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return ZR(this,r,e,t);if(r==="blur")return qR(this,r,t);if(r==="select")return XR(this,r,t)}return t}function rn(r){r.stateProxy=cv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=cv),t&&(t.stateProxy=cv)}function Xm(r,e){!vT(r,e)&&!r.__highByOuter&&ca(r,oT)}function qm(r,e){!vT(r,e)&&!r.__highByOuter&&ca(r,sT)}function la(r,e){r.__highByOuter|=1<<(e||0),ca(r,oT)}function ua(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&ca(r,sT)}function uT(r){ca(r,og)}function sg(r){ca(r,lT)}function fT(r){ca(r,$R)}function hT(r){ca(r,UR)}function vT(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function cT(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(i,n){var o=ig(n),s=i==="series",l=s?r.getViewOfSeriesModel(n):r.getViewOfComponentModel(n);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){lT(u)}),s&&t.push(n)),o.isBlured=!1}),C(a,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function Dp(r,e,t,a){var i=a.getModel();t=t||"coordinateSystem";function n(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};n!=null&&(s.dataType=n),e.push(s)}})}),e}function Zi(r,e,t){Gi(r,!0),ca(r,rn),Ip(r,e,t)}function eE(r){Gi(r,!1)}function Yt(r,e,t,a){a?eE(r):Zi(r,e,t)}function Ip(r,e,t){var a=at(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var Qm=["emphasis","blur","select"],rE={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function he(r,e,t,a){t=t||"itemStyle";for(var i=0;i1&&(o*=pv(p),s*=pv(p));var d=(i===n?-1:1)*pv((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=d*o*c/s,y=d*-s*v/o,m=(r+t)/2+Gl(h)*g-zl(h)*y,_=(e+a)/2+zl(h)*g+Gl(h)*y,S=e0([1,0],[(v-g)/o,(c-y)/s]),b=[(v-g)/o,(c-y)/s],x=[(-1*v-g)/o,(-1*c-y)/s],w=e0(b,x);if(Rp(b,x)<=-1&&(w=Ro),Rp(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Ro*1e6)/1e6;w=Ro*2+T%2*Ro}f.addData(u,m,_,o,s,S,w,h,n)}var lE=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,uE=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function fE(r){var e=new Hr;if(!r)return e;var t=0,a=0,i=t,n=a,o,s=Hr.CMD,l=r.match(lE);if(!l)return e;for(var u=0;uP*P+R*R&&(T=M,A=D),{cx:T,cy:A,x0:-f,y0:-h,x1:T*(i/b-1),y1:A*(i/b-1)}}function yE(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function mE(r,e){var t,a=as(e.r,0),i=as(e.r0||0,0),n=a>0,o=i>0;if(!(!n&&!o)){if(n||(a=i,i=0),i>a){var s=a;a=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,v=!!e.clockwise,c=a0(u-l),p=c>dv&&c%dv;if(p>hr&&(c=p),!(a>hr))r.moveTo(f,h);else if(c>dv-hr)r.moveTo(f+a*xn(l),h+a*di(l)),r.arc(f,h,a,l,u,!v),i>hr&&(r.moveTo(f+i*xn(u),h+i*di(u)),r.arc(f,h,i,u,l,v));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,A=void 0,M=void 0,D=void 0,L=void 0,I=void 0,P=void 0,R=a*xn(l),E=a*di(l),N=i*xn(u),O=i*di(u),B=c>hr;if(B){var F=e.cornerRadius;F&&(t=yE(F),d=t[0],g=t[1],y=t[2],m=t[3]);var W=a0(a-i)/2;if(_=Cr(W,y),S=Cr(W,m),b=Cr(W,d),x=Cr(W,g),A=w=as(_,S),M=T=as(b,x),(w>hr||T>hr)&&(D=a*xn(u),L=a*di(u),I=i*xn(l),P=i*di(l),chr){var yt=Cr(y,A),ut=Cr(m,A),X=Fl(I,P,R,E,a,yt,v),ot=Fl(D,L,N,O,a,ut,v);r.moveTo(f+X.cx+X.x0,h+X.cy+X.y0),A0&&r.arc(f+X.cx,h+X.cy,yt,pe(X.y0,X.x0),pe(X.y1,X.x1),!v),r.arc(f,h,a,pe(X.cy+X.y1,X.cx+X.x1),pe(ot.cy+ot.y1,ot.cx+ot.x1),!v),ut>0&&r.arc(f+ot.cx,h+ot.cy,ut,pe(ot.y1,ot.x1),pe(ot.y0,ot.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,a,l,u,!v);if(!(i>hr)||!B)r.lineTo(f+N,h+O);else if(M>hr){var yt=Cr(d,M),ut=Cr(g,M),X=Fl(N,O,D,L,i,-ut,v),ot=Fl(R,E,I,P,i,-yt,v);r.lineTo(f+X.cx+X.x0,h+X.cy+X.y0),M0&&r.arc(f+X.cx,h+X.cy,ut,pe(X.y0,X.x0),pe(X.y1,X.x1),!v),r.arc(f,h,i,pe(X.cy+X.y1,X.cx+X.x1),pe(ot.cy+ot.y1,ot.cx+ot.x1),v),yt>0&&r.arc(f+ot.cx,h+ot.cy,yt,pe(ot.y1,ot.x1),pe(ot.y0,ot.x0),!v))}else r.lineTo(f+N,h+O),r.arc(f,h,i,u,l,v)}r.closePath()}}}var _E=function(){function r(){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 r}(),bT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new _E},e.prototype.buildPath=function(t,a){mE(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(gt);bT.prototype.type="sector";var Ee=bT,SE=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),wT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new SE},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.PI*2;t.moveTo(i+a.r,n),t.arc(i,n,a.r,0,o,!1),t.moveTo(i+a.r0,n),t.arc(i,n,a.r0,0,o,!0)},e}(gt);wT.prototype.type="ring";var ih=wT;function xE(r,e,t,a){var i=[],n=[],o=[],s=[],l,u,f,h;if(a){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v=2){if(a){var n=xE(i,a,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=n[s*2],u=n[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;syi[1]){if(s=!1,n)return s;var f=Math.abs(yi[0]-gi[1]),h=Math.abs(gi[0]-yi[1]);Math.min(f,h)>i.len()&&(f0){var h=f.duration,v=f.delay,c=f.easing,p={duration:h,delay:v||0,easing:c,done:n,force:!!n||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),n&&n()}function Tt(r,e,t,a,i,n){cg("update",r,e,t,a,i,n)}function zt(r,e,t,a,i,n){cg("enter",r,e,t,a,i,n)}function Xn(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function o0(r){return!r.isGroup}function HE(r){return r.shape!=null}function ll(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){o0(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return HE(o)&&(s.shape=V({},o.shape)),s}var n=a(r);e.traverse(function(o){if(o0(o)&&o.anid){var s=n[o.anid];if(s){var l=i(o);o.attr(i(s)),Tt(o,l,t,at(o).dataIndex)}}})}function NT(r,e){return G(r,function(t){var a=t[0];a=uf(a,e.x),a=ff(a,e.x+e.width);var i=t[1];return i=uf(i,e.y),i=ff(i,e.y+e.height),[a,i]})}function WE(r,e){var t=uf(r.x,e.x),a=ff(r.x+r.width,e.x+e.width),i=uf(r.y,e.y),n=ff(r.y+r.height,e.y+e.height);if(a>=t&&n>=i)return{x:t,y:i,width:a-t,height:n-i}}function ul(r,e,t){var a=V({rectHover:!0},e),i=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),Q(i,t),new ve(a)):oh(r.replace("path://",""),a,t,"center")}function is(r,e,t,a,i){for(var n=0,o=i[i.length-1];n1)return!1;var g=gv(c,p,f,h)/v;return!(g<0||g>1)}function gv(r,e,t,a){return r*a-t*e}function $E(r){return r<=1e-6&&r>=-1e-6}function co(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,i=$(e)?{formatter:e}:e,n=t.mainType,o=t.componentIndex,s={componentType:n,name:a,$vars:["name"]};s[n+"Index"]=o;var l=r.formatterParamsExtra;l&&C(mt(l),function(f){Y(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=at(r.el);u.componentMainType=n,u.componentIndex=o,u.tooltipConfig={name:a,option:Q({content:a,formatterParams:s},i)}}function s0(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function ti(r,e){if(r)if(z(r))for(var t=0;t=0&&s.push(l)}),s}}function ei(r,e){return lt(lt({},r,!0),e,!0)}var ak={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"}},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:". "}}}},ik={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},vf="ZH",dg="EN",Bs=dg,Gu={},gg={},$T=Mt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return r.indexOf(vf)>-1?vf:Bs}():Bs;function UT(r,e){r=r.toUpperCase(),gg[r]=new Nt(e),Gu[r]=e}function nk(r){if($(r)){var e=Gu[r.toUpperCase()]||{};return r===vf||r===dg?J(e):lt(J(e),J(Gu[Bs]),!1)}else return lt(J(r),J(Gu[Bs]),!1)}function Op(r){return gg[r]}function ok(){return gg[Bs]}UT(dg,ak);UT(vf,ik);var yg=1e3,mg=yg*60,Ss=mg*60,rr=Ss*24,v0=rr*365,ns={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}"},$l="{yyyy}-{MM}-{dd}",c0={year:"{yyyy}",month:"{yyyy}-{MM}",day:$l,hour:$l+" "+ns.hour,minute:$l+" "+ns.minute,second:$l+" "+ns.second,millisecond:ns.none},_v=["year","month","day","hour","minute","second","millisecond"],YT=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mi(r,e){return r+="","0000".substr(0,e-r.length)+r}function qn(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function sk(r){return r===qn(r)}function lk(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function uh(r,e,t,a){var i=Fr(r),n=i[_g(t)](),o=i[Kn(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[fh(t)](),u=i["get"+(t?"UTC":"")+"Day"](),f=i[Vs(t)](),h=(f-1)%12+1,v=i[hh(t)](),c=i[vh(t)](),p=i[ch(t)](),d=a instanceof Nt?a:Op(a||$T)||ok(),g=d.getModel("time"),y=g.get("month"),m=g.get("monthAbbr"),_=g.get("dayOfWeek"),S=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,n+"").replace(/{yy}/g,n%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,m[o-1]).replace(/{MM}/g,mi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,mi(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,mi(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,mi(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,mi(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,mi(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,mi(p,3)).replace(/{S}/g,p+"")}function uk(r,e,t,a,i){var n=null;if($(t))n=t;else if(K(t))n=t(r.value,e,{level:r.level});else{var o=V({},ns);if(r.level>0)for(var s=0;s<_v.length;++s)o[_v[s]]="{primary|"+o[_v[s]]+"}";var l=t?t.inherit===!1?t:Q(t,o):o,u=ZT(r.value,i);if(l[u])n=l[u];else if(l.inherit){for(var f=YT.indexOf(u),s=f-1;s>=0;--s)if(l[u]){n=l[u];break}n=n||o.none}if(z(n)){var h=r.level==null?0:r.level>=0?r.level:n.length+r.level;h=Math.min(h,n.length-1),n=n[h]}}return uh(new Date(r.value),n,i,a)}function ZT(r,e){var t=Fr(r),a=t[Kn(e)]()+1,i=t[fh(e)](),n=t[Vs(e)](),o=t[hh(e)](),s=t[vh(e)](),l=t[ch(e)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&n===0,c=v&&i===1,p=c&&a===1;return p?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function p0(r,e,t){var a=wt(r)?Fr(r):r;switch(e=e||ZT(r,t),e){case"year":return a[_g(t)]();case"half-year":return a[Kn(t)]()>=6?1:0;case"quarter":return Math.floor((a[Kn(t)]()+1)/4);case"month":return a[Kn(t)]();case"day":return a[fh(t)]();case"half-day":return a[Vs(t)]()/24;case"hour":return a[Vs(t)]();case"minute":return a[hh(t)]();case"second":return a[vh(t)]();case"millisecond":return a[ch(t)]()}}function _g(r){return r?"getUTCFullYear":"getFullYear"}function Kn(r){return r?"getUTCMonth":"getMonth"}function fh(r){return r?"getUTCDate":"getDate"}function Vs(r){return r?"getUTCHours":"getHours"}function hh(r){return r?"getUTCMinutes":"getMinutes"}function vh(r){return r?"getUTCSeconds":"getSeconds"}function ch(r){return r?"getUTCMilliseconds":"getMilliseconds"}function fk(r){return r?"setUTCFullYear":"setFullYear"}function XT(r){return r?"setUTCMonth":"setMonth"}function qT(r){return r?"setUTCDate":"setDate"}function KT(r){return r?"setUTCHours":"setHours"}function QT(r){return r?"setUTCMinutes":"setMinutes"}function jT(r){return r?"setUTCSeconds":"setSeconds"}function JT(r){return r?"setUTCMilliseconds":"setMilliseconds"}function tA(r){if(!kw(r))return $(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function eA(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var yo=Yd,hk=/([&<>"'])/g,vk={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ve(r){return r==null?"":(r+"").replace(hk,function(e,t){return vk[t]})}function Np(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&dr(f)?f:"-"}function n(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Fr(r):r;if(isNaN(+l)){if(s)return"-"}else return uh(l,a,t)}if(e==="ordinal")return ep(r)?i(r):wt(r)&&n(r)?r+"":"-";var u=sa(r);return n(u)?tA(u):ep(r)?i(r):typeof r=="boolean"?r+"":"-"}var d0=["a","b","c","d","e","f","g"],Sv=function(r,e){return"{"+r+(e==null?"":e)+"}"};function rA(r,e,t){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n':'';var o=t.markerId||"markerX";return{renderMode:n,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function an(r,e){return e=e||"transparent",$(r)?r:j(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function cf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Fu=C,aA=["left","right","top","bottom","width","height"],Fi=[["width","left","right"],["height","top","bottom"]];function Sg(r,e,t,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),v=h&&h.getBoundingRect(),c,p;if(r==="horizontal"){var d=f.width+(v?-v.x+f.x:0);c=n+d,c>a||l.newline?(n=0,c=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);p=o+g,p>i||l.newline?(n+=s+t,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=n,l.y=o,l.markRedraw(),r==="horizontal"?n=c+t:o=p+t)})}var qi=Sg;it(Sg,"vertical");it(Sg,"horizontal");function dk(r,e,t){var a=e.width,i=e.height,n=H(r.left,a),o=H(r.top,i),s=H(r.right,a),l=H(r.bottom,i);return(isNaN(n)||isNaN(parseFloat(r.left)))&&(n=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),t=yo(t||0),{width:Math.max(s-n-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function te(r,e,t){t=yo(t||0);var a=e.width,i=e.height,n=H(r.left,a),o=H(r.top,i),s=H(r.right,a),l=H(r.bottom,i),u=H(r.width,a),f=H(r.height,i),h=t[2]+t[0],v=t[1]+t[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-n),isNaN(f)&&(f=i-l-h-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/i?u=a*.8:f=i*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(n)&&(n=a-s-u-v),isNaN(o)&&(o=i-l-f-h),r.left||r.right){case"center":n=a/2-u/2-t[3];break;case"right":n=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-t[0];break;case"bottom":o=i-f-h;break}n=n||0,o=o||0,isNaN(u)&&(u=a-v-n-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var p=new ft(n+t[3],o+t[0],u,f);return p.margin=t,p}function ph(r,e,t,a,i,n){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(n=n||r,n.x=r.x,n.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new ft(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=te(Q({width:u.width,height:u.height},e),t,a),v=o?h.x-u.x:0,c=s?h.y-u.y:0;return l==="raw"?(n.x=v,n.y=c):(n.x+=v,n.y+=c),n===r&&r.markRedraw(),!0}function gk(r,e){return r[Fi[e][0]]!=null||r[Fi[e][1]]!=null&&r[Fi[e][2]]!=null}function zs(r){var e=r.layoutMode||r.constructor.layoutMode;return j(e)?e:e?{type:e}:null}function Xa(r,e,t){var a=t&&t.ignoreSize;!z(a)&&(a=[a,a]);var i=o(Fi[0],0),n=o(Fi[1],1);u(Fi[0],r,i),u(Fi[1],r,n);function o(f,h){var v={},c=0,p={},d=0,g=2;if(Fu(f,function(_){p[_]=r[_]}),Fu(f,function(_){s(e,_)&&(v[_]=p[_]=e[_]),l(v,_)&&c++,l(p,_)&&d++}),a[h])return l(e,f[1])?p[f[2]]=null:l(e,f[2])&&(p[f[1]]=null),p;if(d===g||!c)return p;if(c>=g)return v;for(var y=0;y=0;l--)s=lt(s,i[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var i=t+"Index",n=t+"Id";return nl(this.ecModel,t,{index:this.get(i,!0),id:this.get(n,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Nt);$w(_o,Nt);jf(_o);ek(_o);rk(_o,mk);function mk(r){var e=[];return C(_o.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return kr(t).main}),r!=="dataset"&&vt(e,"dataset")<=0&&e.unshift("dataset"),e}var bt=_o,nA="";typeof navigator!="undefined"&&(nA=navigator.platform||"");var bn="rgba(0, 0, 0, 0.2)",_k={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:bn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:bn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:bn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:bn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:bn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:bn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:nA.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},oA=q(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),lr="original",me="arrayRows",ur="objectRows",$r="keyedColumns",Fa="typedArray",sA="unknown",Br="column",So="row",le={Must:1,Might:2,Not:3},lA=At();function Sk(r){lA(r).datasetMap=q()}function uA(r,e,t){var a={},i=bg(e);if(!i||!r)return a;var n=[],o=[],s=e.ecModel,l=lA(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),C(r,function(d,g){var y=j(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});C(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(n,0,m);else{var _=v.categoryWayDim;c(a[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function vA(r,e,t,a,i,n,o){n=n||r;var s=e(n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!a?t:Ak(a,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%f.length,h}}function Ck(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Ul,Eo,y0,m0="\0_ec_inner",Mk=1,cA=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,i,n,o,s){n=n||{},this.option=null,this._theme=new Nt(n),this._locale=new Nt(o),this._optionManager=s},e.prototype.setOption=function(t,a,i){var n=x0(a);this._optionManager.setOption(t,i,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,a){return this._resetOption(t,x0(a))},e.prototype._resetOption=function(t,a){var i=!1,n=this._optionManager;if(!t||t==="recreate"){var o=n.mountOption(t==="recreate");!this.option||t==="recreate"?y0(this,o):(this.restoreData(),this._mergeOption(o,a)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=n.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=n.getMediaOption(this);l.length&&C(l,function(u){i=!0,this._mergeOption(u,a)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var i=this.option,n=this._componentsMap,o=this._componentsCount,s=[],l=q(),u=a&&a.replaceMergeMainTypeMap;Sk(this),C(t,function(h,v){h!=null&&(bt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):i[v]=i[v]==null?J(h):lt(i[v],h,!0))}),u&&u.each(function(h,v){bt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),bt.topologicalTravel(s,bt.getAllClassMainTypes(),f,this);function f(h){var v=wk(this,h,Et(t[h])),c=n.get(h),p=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=zw(c,v,p);zP(d,h,bt),i[h]=null,n.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;C(d,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",A=bt.getClass(h,S.keyInfo.subType,!T);if(!A)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===A)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=V({componentIndex:b},S.keyInfo);x=new A(w,this,this,M),V(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),i[h]=g,n.set(h,y),o.set(h,m),h==="series"&&Ul(this)}this._seriesIndices||Ul(this)},e.prototype.getOption=function(){var t=J(this.option);return C(t,function(a,i){if(bt.hasClass(i)){for(var n=Et(a),o=n.length,s=!1,l=o-1;l>=0;l--)n[l]&&!Rs(n[l])?s=!0:(n[l]=null,!s&&o--);n.length=o,t[i]=n}}),delete t[m0],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var i=this._componentsMap.get(t);if(i){var n=i[a||0];if(n)return n;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function Vk(r,e){return r.join(",")===e.join(",")}var zk=kk,fr=C,Gs=j,b0=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function bv(r){var e=r&&r.itemStyle;if(!!e)for(var t=0,a=b0.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=DP(v,m),d=m;break}}}return a[0]=v,a[1]=d,a})})}var dh=function(){function r(e){this.data=e.data||(e.sourceFormat===$r?{}:[]),this.sourceFormat=e.sourceFormat||sA,this.seriesLayoutBy=e.seriesLayoutBy||Br,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=_)}c[0]=p,c[1]=d}},i=function(){return this._data?this._data.length/this._dimSize:0};L0=(e={},e[me+"_"+Br]={pure:!0,appendData:n},e[me+"_"+So]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ur]={pure:!0,appendData:n},e[$r]={pure:!0,appendData:function(o){var s=this._data;C(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[lr]={appendData:n},e[Fa]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function n(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return to(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function E0(r){var e,t;return j(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function xs(r){return new rO(r)}var rO=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var n;this._plan&&!a&&(n=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(n="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||n==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,p=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(h||c1&&a>0?s:o}};return n;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},iO=function(){function r(e,t){if(!wt(t)){var a="";Lt(a)}this._opFn=AA[e],this._rvalFloat=sa(t)}return r.prototype.evaluate=function(e){return wt(e)?this._opFn(e,this._rvalFloat):this._opFn(sa(e),this._rvalFloat)},r}(),CA=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=wt(e)?e:sa(e),i=wt(t)?t:sa(t),n=isNaN(a),o=isNaN(i);if(n&&(a=this._incomparable),o&&(i=this._incomparable),n&&o){var s=$(e),l=$(t);s&&(a=l?e:0),l&&(i=s?t:0)}return ai?-this._resultLT:0},r}(),nO=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=sa(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=sa(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function oO(r,e){return r==="eq"||r==="ne"?new nO(r==="eq",e):Y(AA,r)?new iO(r,e):null}var sO=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ha(e,t)},r}();function lO(r,e){var t=new sO,a=r.data,i=t.sourceFormat=r.sourceFormat,n=r.startIndex,o="";r.seriesLayoutBy!==Br&&Lt(o);var s=[],l={},u=r.dimensionsDefine;if(u)C(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Y(l,y)&&Lt(_),l[y]=m}});else for(var f=0;f65535?gO:yO}function wn(){return[1/0,-1/0]}function mO(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function N0(r,e,t,a,i){var n=LA[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new n(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var i=this._provider,n=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)n=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,a){var i=this._chunks,n=i[e],o=[];if(!n)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=p,l=c,u=0),c===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,i=this._count;if(a===Array){e=new a(i);for(var n=0;n=h&&m<=v||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(n===2){for(var g=c[i[0]],_=c[i[1]],S=e[i[1]][0],b=e[i[1]][1],y=0;y=h&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(n===1)for(var y=0;y=h&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;ye[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),i=a._chunks,n=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,h,v,c=new(Oo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var p=1;pf&&(f=h,v=S)}D>0&&Df-p&&(l=f-p,s.length=l);for(var d=0;dh[1]&&(h[1]=y),v[c++]=m}return n._count=c,n._indices=v,n._updateGetRawIdx(),n},r.prototype.each=function(e,t){if(!!this._count)for(var a=e.length,i=this._chunks,n=0,o=this.count();nl&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],i=this._chunks,n=0;n=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,i,n){return Ha(t[n],this._dimensions[n])}Av={arrayRows:e,objectRows:function(t,a,i,n){return Ha(t[a],this._dimensions[n])},keyedColumns:e,original:function(t,a,i,n){var o=t&&(t.value==null?t:t.value);return Ha(o instanceof Array?o[n]:o,this._dimensions[n])},typedArray:function(t,a,i,n){return t[n]}}}(),r}(),IA=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,i,n;if(Yl(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,n=[f._getVersionSign()]}else s=o.get("data",!0),l=He(s)?Fa:lr,n=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=ct(h.seriesLayoutBy,v.seriesLayoutBy)||null,p=ct(h.sourceHeader,v.sourceHeader),d=ct(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;i=g?[zp(s,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);i=m.sourceList,n=m.upstreamSignList}else{var _=y.get("source",!0);i=[zp(_,this._getSourceMetaRawOption(),null)],n=[]}}this._setLocalSource(i,n)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var n="";e.length!==1&&V0(n)}var o,s=[],l=[];return C(e,function(u){u.prepareSource();var f=u.getSource(i||0),h="";i!=null&&!f&&V0(h),s.push(f),l.push(u._getVersionSign())}),a?o=pO(a,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[qk(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return C(r.blocks,function(i){var n=kA(i);n>=e&&(e=n+ +(a&&(!n||Fp(i)&&!i.noHeader)))}),e}return 0}function xO(r,e,t,a){var i=e.noHeader,n=wO(kA(e)),o=[],s=e.blocks||[];Ae(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Y(u,l)){var f=new CA(u[l],null);s.sort(function(p,d){return f.evaluate(p.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}C(s,function(p,d){var g=e.valueFormatter,y=EA(p)(g?V(V({},r),{valueFormatter:g}):r,p,d>0?n.html:0,a);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(n.richText):Hp(o.join(""),i?t:n.html);if(i)return h;var v=Np(e.header,"ordinal",r.useUTC),c=RA(a,r.renderMode).nameStyle;return r.renderMode==="richText"?OA(r,v,c)+n.richText+h:Hp('
'+Ve(v)+"
"+h,t)}function bO(r,e,t,a){var i=r.renderMode,n=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=z(S)?S:[S],G(S,function(b,x){return Np(b,z(c)?c[x]:c,u)})};if(!(n&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),v=n?"":Np(l,"ordinal",u),c=e.valueType,p=o?[]:f(e.value),d=!s||!n,g=!s&&n,y=RA(a,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":h)+(n?"":OA(r,v,m))+(o?"":CO(r,p,d,g,_)):Hp((s?"":h)+(n?"":TO(v,!s,m))+(o?"":AO(p,d,g,_)),t)}}function z0(r,e,t,a,i,n){if(!!r){var o=EA(r),s={useUTC:i,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,n)}}function wO(r){return{html:_O[r],richText:SO[r]}}function Hp(r,e){var t='
',a="margin: "+e+"px 0 0";return'
'+r+t+"
"}function TO(r,e,t){var a=e?"margin-left:2px":"";return''+Ve(r)+""}function AO(r,e,t,a){var i=t?"10px":"20px",n=e?"float:right;margin-left:"+i:"";return r=z(r)?r:[r],''+G(r,function(o){return Ve(o)}).join("  ")+""}function OA(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function CO(r,e,t,a,i){var n=[i],o=a?10:20;return t&&n.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join(" "):e,n)}function NA(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return an(a)}function BA(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Cv=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Ow()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var i=a==="richText"?this._generateStyleName():null,n=pk({color:t,type:e,renderMode:a,markerId:i});return $(n)?n:(this.richTextStyles[i]=n.style,n.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};z(t)?C(t,function(n){return V(a,n)}):V(a,t);var i=this._generateStyleName();return this.richTextStyles[i]=a,"{"+i+"|"+e+"}"},r}();function VA(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,i=e.getData(),n=i.mapDimensionsAll("defaultedTooltip"),o=n.length,s=e.getRawValue(t),l=z(s),u=NA(e,t),f,h,v,c;if(o>1||l&&!o){var p=MO(s,e,t,n,u);f=p.inlineValues,h=p.inlineValueTypes,v=p.blocks,c=p.inlineValues[0]}else if(o){var d=i.getDimensionInfo(n[0]);c=f=to(i,t,n[0]),h=d.type}else c=f=l?s[0]:s;var g=tg(e),y=g&&e.name||"",m=i.getName(t),_=a?y:m;return ae("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ae("nameValue",{markerType:"item",markerColor:u,name:_,noName:!dr(_),value:f,valueType:h})].concat(v||[])})}function MO(r,e,t,a,i){var n=e.getData(),o=Vr(r,function(h,v,c){var p=n.getDimensionInfo(c);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?C(a,function(h){f(to(n,t,h),h)}):C(r,f);function f(h,v){var c=n.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(ae("nameValue",{markerType:"subItem",markerColor:i,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var _a=At();function Zl(r,e){return r.getName(e)||r.getId(e)}var Hu="__universalTransitionEnabled",yh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,i){this.seriesIndex=this.componentIndex,this.dataTask=xs({count:LO,reset:IO}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var n=_a(this).sourceManager=new IA(this);n.prepareSource();var o=this.getInitialData(t,i);F0(o,this),this.dataTask.context.data=o,_a(this).dataBeforeProcessed=o,G0(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var i=zs(this),n=i?mo(t):{},o=this.subType;bt.hasClass(o)&&(o+="Series"),lt(t,a.getTheme().get(this.subType)),lt(t,this.getDefaultOption()),Ji(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Xa(t,n,i)},e.prototype.mergeOption=function(t,a){t=lt(this.option,t,!0),this.fillDataTextStyle(t.data);var i=zs(this);i&&Xa(this.option,t,i);var n=_a(this).sourceManager;n.dirty(),n.prepareSource();var o=this.getInitialData(t,a);F0(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,_a(this).dataBeforeProcessed=o,G0(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!He(t))for(var a=["show"],i=0;ithis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,i){var n=this.ecModel,o=wg.prototype.getColorFromPalette.call(this,t,a,i);return o||(o=n.getColorFromPalette(t,a,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var i=this.option.selectedMap;if(!!i){var n=this.option.selectedMode,o=this.getData(a);if(n==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(t,a){var i=this.option.selectedMap;if(!i)return!1;var n=this.getData(a);return(i==="all"||i[Zl(n,t)])&&!n.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Hu])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var i,n,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){j(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return bt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(bt);jt(yh,Mg);jt(yh,wg);$w(yh,bt);function G0(r){var e=r.name;tg(r)||(r.name=DO(r)||e)}function DO(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return C(t,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function LO(r){return r.model.getRawData().count()}function IO(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),PO}function PO(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function F0(r,e){C(Ku(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,it(RO,e))})}function RO(r,e){var t=Wp(r);return t&&t.setOutputEnd((e||this).count()),e}function Wp(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(r.uid))}return a}}var Ft=yh,Lg=function(){function r(){this.group=new rt,this.uid=go("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){},r.prototype.updateLayout=function(e,t,a,i){},r.prototype.updateVisual=function(e,t,a,i){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();rg(Lg);jf(Lg);var Wt=Lg;function xo(){var r=At();return function(e){var t=r(e),a=e.pipelineContext,i=!!t.large,n=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(i!==o||n!==s)&&"reset"}}var zA=At(),EO=xo(),Ig=function(){function r(){this.group=new rt,this.uid=go("viewChart"),this.renderTask=xs({plan:kO,reset:OO}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,i){},r.prototype.highlight=function(e,t,a,i){var n=e.getData(i&&i.dataType);!n||W0(n,i,"emphasis")},r.prototype.downplay=function(e,t,a,i){var n=e.getData(i&&i.dataType);!n||W0(n,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateLayout=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.updateVisual=function(e,t,a,i){this.render(e,t,a,i)},r.prototype.eachRendered=function(e){ti(this.group,e)},r.markUpdateMethod=function(e,t){zA(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function H0(r,e,t){r&&Os(r)&&(e==="emphasis"?la:ua)(r,t)}function W0(r,e,t){var a=tn(r,e),i=e&&e.highlightKey!=null?iE(e.highlightKey):null;a!=null?C(Et(a),function(n){H0(r.getItemGraphicEl(n),t,i)}):r.eachItemGraphicEl(function(n){H0(n,t,i)})}rg(Ig);jf(Ig);function kO(r){return EO(r.model)}function OO(r){var e=r.model,t=r.ecModel,a=r.api,i=r.payload,n=e.pipelineContext.progressiveRender,o=r.view,s=i&&zA(i).updateMethod,l=n?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,i),NO[l]}var NO={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Bt=Ig,pf="\0__throttleOriginMethod",$0="\0__throttleRate",U0="\0__throttleType";function Pg(r,e,t){var a,i=0,n=0,o=null,s,l,u,f;e=e||0;function h(){n=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],p=0;p=0?h():o=setTimeout(h,-s),i=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function bo(r,e,t,a){var i=r[e];if(!!i){var n=i[pf]||i,o=i[U0],s=i[$0];if(s!==t||o!==a){if(t==null||!a)return r[e]=n;i=r[e]=Pg(n,t,a==="debounce"),i[pf]=n,i[U0]=a,i[$0]=t}return i}}function Fs(r,e){var t=r[e];t&&t[pf]&&(t.clear&&t.clear(),r[e]=t[pf])}var Y0=At(),Z0={itemStyle:en(WT,!0),lineStyle:en(HT,!0)},BO={lineStyle:"stroke",itemStyle:"fill"};function GA(r,e){var t=r.visualStyleMapper||Z0[e];return t||(console.warn("Unkown style type '"+e+"'."),Z0.itemStyle)}function FA(r,e){var t=r.visualDrawType||BO[e];return t||(console.warn("Unkown style type '"+e+"'."),"fill")}var VO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=r.getModel(a),n=GA(r,a),o=n(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=FA(r,a),u=o[l],f=K(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||K(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||K(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(c,p){var d=r.getDataParams(p),g=V({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},No=new Nt,zO={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",i=GA(r,a),n=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){No.option=l[a];var u=i(No),f=o.ensureUniqueItemVisual(s,"style");V(f,u),No.option.decal&&(o.setItemVisual(s,"decal",No.option.decal),No.option.decal.dirty=!0),n in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},GO={performRawSeries:!0,overallReset:function(r){var e=q();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+a,n=e.get(i);n||(n={},e.set(i,n)),Y0(t).scope=n}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),i={},n=t.getData(),o=Y0(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=FA(t,s);n.each(function(u){var f=n.getRawIndex(u);i[f]=u}),a.each(function(u){var f=i[u],h=n.getItemVisual(f,"colorFromPalette");if(h){var v=n.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",p=a.count();v[l]=t.getColorFromPalette(c,o,p)}})}})}},Xl=Math.PI;function FO(r,e){e=e||{},Q(e,{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 t=new rt,a=new xt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var i=new Ct({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),n=new xt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(n);var o;return e.showSpinner&&(o=new hg({shape:{startAngle:-Xl/2,endAngle:-Xl/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Xl*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Xl*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),n.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var HO=function(){function r(e,t,a,i){this._stageTaskMap=q(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=a.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var i=a.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(!!e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),i=a.context,n=!t&&a.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=n?a.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),i=e.getData(),n=i.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&n>=a.threshold,s=e.get("large")&&n>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?n:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=q();e.eachSeries(function(i){var n=i.getProgressive(),o=i.uid;a.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:n&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;C(this._allHandlers,function(i){var n=e.get(i.uid)||e.set(i.uid,{}),o="";Ae(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,n,t,a),i.overallReset&&this._createOverallStageTask(i,n,t,a)},this)},r.prototype.prepareView=function(e,t,a,i){var n=e.renderTask,o=n.context;o.model=t,o.ecModel=a,o.api=i,n.__block=!e.incrementalPrepareRender,this._pipe(t,n)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,i){i=i||{};var n=!1,o=this;C(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,p=v.agentStubMap;p.each(function(g){s(i,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var d=o.getPerformArgs(v,i.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(n=!0)}else h&&h.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(n=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=n||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,i){var n=this,o=t.seriesTaskMap,s=t.seriesTaskMap=q(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,i).each(f);function f(h){var v=h.uid,c=s.set(v,o&&o.get(v)||xs({plan:ZO,reset:XO,count:KO}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:n},n._pipe(h,c)}},r.prototype._createOverallStageTask=function(e,t,a,i){var n=this,o=t.overallTask=t.overallTask||xs({reset:WO});o.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:n};var s=o.agentStubMap,l=o.agentStubMap=q(),u=e.seriesType,f=e.getTargetSeries,h=!0,v=!1,c="";Ae(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,i).each(p):(h=!1,C(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,xs({reset:$O,onDirty:YO})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,n._pipe(d,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,i=this._pipelineMap.get(a);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:QO(e)}),e.uid=go("stageHandler"),t&&(e.visualType=t),e},r}();function WO(r){r.overallReset(r.ecModel,r.api,r.payload)}function $O(r){return r.overallProgress&&UO}function UO(){this.agent.dirty(),this.getDownstream().dirty()}function YO(){this.agent&&this.agent.dirty()}function ZO(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function XO(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Et(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,a){return HA(a)}):qO}var qO=HA(0);function HA(r){return function(e,t){var a=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var n=e.start;n0&&c===u.length-v.length){var p=u.slice(0,c);p!=="data"&&(t.mainType=p,t[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:i}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,n,"name")&&f(u,n,"dataIndex")&&f(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,n));function f(h,v,c,p){return h[c]==null||v[p||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),$p=["symbol","symbolSize","symbolRotate","symbolOffset"],Q0=$p.concat(["symbolKeepAspect"]),eN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},i={},n=!1,o=0;o<$p.length;o++){var s=$p[o],l=r.get(s);K(l)?(n=!0,i[s]=l):a[s]=l}if(a.symbol=a.symbol||r.defaultSymbol,t.setVisual(V({legendIcon:r.legendIcon||a.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},a)),e.isSeriesFiltered(r))return;var u=mt(i);function f(h,v){for(var c=r.getRawValue(v),p=r.getDataParams(v),d=0;d=0&&Hi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Up(r,e,t){for(var a=e.type==="radial"?yN(r,e,t):gN(r,e,t),i=e.colorStops,n=0;n0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:wt(r)?[r]:z(r)?r:null}function Eg(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&_N(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=G(t,function(n){return n/i}),a/=i)}return[t,a]}var SN=new Hr(!0);function yf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function j0(r){return typeof r=="string"&&r!=="none"}function mf(r){var e=r.fill;return e!=null&&e!=="none"}function J0(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function t_(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Yp(r,e,t){var a=ag(e.image,e.__image,t);if(Jf(a)){var i=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var n=new DOMMatrix;n.translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Lu),n.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(n)}return i}}function xN(r,e,t,a){var i,n=yf(t),o=mf(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||SN,h=e.__dirty;if(!a){var v=t.fill,c=t.stroke,p=o&&!!v.colorStops,d=n&&!!c.colorStops,g=o&&!!v.image,y=n&&!!c.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=h?Up(r,v,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=h?Up(r,c,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?Yp(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=h||!e.__canvasStrokePattern?Yp(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:n=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,A;r.setLineDash&&t.lineDash&&(i=Eg(e),T=i[0],A=i[1]);var M=!0;(u||h&Nn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=A),a||(t.strokeFirst?(n&&t_(r,t),o&&J0(r,t)):(o&&J0(r,t),n&&t_(r,t))),T&&r.setLineDash([])}function bN(r,e,t){var a=e.__image=ag(t.image,e.__image,e,e.onload);if(!(!a||!Jf(a))){var i=t.x||0,n=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(a,u,f,t.sWidth,t.sHeight,i,n,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,h=o-u,v=s-f;r.drawImage(a,u,f,h,v,i,n,o,s)}else r.drawImage(a,i,n,o,s)}}function wN(r,e,t){var a,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||$a,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var n=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=Eg(e),n=a[0],o=a[1]),n&&(r.setLineDash(n),r.lineDashOffset=o),t.strokeFirst?(yf(t)&&r.strokeText(i,t.x,t.y),mf(t)&&r.fillText(i,t.x,t.y)):(mf(t)&&r.fillText(i,t.x,t.y),yf(t)&&r.strokeText(i,t.x,t.y)),n&&r.setLineDash([])}}var e_=["shadowBlur","shadowOffsetX","shadowOffsetY"],r_=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qA(r,e,t,a,i){var n=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){Re(r,i),n=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ui.opacity:o}(a||e.blend!==t.blend)&&(n||(Re(r,i),n=!0),r.globalCompositeOperation=e.blend||Ui.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,i){if(!this[de]){if(this._disposed){this.id;return}var n,o,s;if(j(a)&&(i=a.lazyUpdate,n=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[de]=!0,!this._model||a){var l=new zk(this._api),u=this._theme,f=this._model=new pA;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},Xp);var h={seriesTransition:s,optionChanged:!0};if(i)this[Le]={silent:n,updateParams:h},this[de]=!1,this.getZr().wakeUp();else{try{An(this),Sa.update.call(this,null,h)}catch(v){throw this[Le]=null,this[de]=!1,v}this._ssr||this._zr.flush(),this[Le]=null,this[de]=!1,Bo.call(this,n),Vo.call(this,n)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ON&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!Mt.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return C(a,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,i=this._model,n=[],o=this;C(a,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(n.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return C(n,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",i=this.group,n=Math.min,o=Math.max,s=1/0;if(y_[i]){var l=s,u=s,f=-s,h=-s,v=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();C(ws,function(_,S){if(_.group===i){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(J(t)),x=_.getDom().getBoundingClientRect();l=n(x.left,l),u=n(x.top,u),f=o(x.right,f),h=o(x.bottom,h),v.push({dom:b,left:x.left,top:x.top})}}),l*=c,u*=c,f*=c,h*=c;var p=f-l,d=h-u,g=Ua.createCanvas(),y=Sm(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return C(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new xt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),C(v,function(_){var S=new ve({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a){return Pv(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return Pv(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var i=this._model,n,o=gs(i,t);return C(o,function(s,l){l.indexOf("Models")>=0&&C(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)n=n||!!f.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(n=n||h.containPoint(a,u))}},this)},this),!!n},e.prototype.getVisual=function(t,a){var i=this._model,n=gs(i,t,{defaultMainType:"series"}),o=n.seriesModel,s=o.getData(),l=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?s.indexOfRawIndex(n.dataIndex):null;return l!=null?Rg(s,l,a):vl(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;C(KN,function(a){var i=function(n){var o=t.getModel(),s=n.target,l,u=a==="globalout";if(u?l={}:s&&Wn(s,function(p){var d=at(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType)||{},!0}else if(d.eventData)return l=V({},d.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var v=f&&h!=null&&o.getComponent(f,h),c=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=n,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:c},t.trigger(a,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)}),C(bs,function(a,i){t._messageCenter.on(i,function(n){this.trigger(i,n)},t)}),C(["selectchanged"],function(a){t._messageCenter.on(a,function(i){this.trigger(a,i)},t)}),aN(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&Fw(this.getDom(),Ng,"");var a=this,i=a._api,n=a._model;C(a._componentsViews,function(o){o.dispose(n,i)}),C(a._chartsViews,function(o){o.dispose(n,i)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete ws[a.id]},e.prototype.resize=function(t){if(!this[de]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var i=a.resetOption("media"),n=t&&t.silent;this[Le]&&(n==null&&(n=this[Le].silent),i=!0,this[Le]=null),this[de]=!0;try{i&&An(this),Sa.update.call(this,{type:"resize",animation:V({duration:0},t&&t.animation)})}catch(o){throw this[de]=!1,o}this[de]=!1,Bo.call(this,n),Vo.call(this,n)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(j(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!qp[t]){var i=qp[t](this._api,a),n=this._zr;this._loadingFX=i,n.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=V({},t);return a.type=bs[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(j(a)||(a={silent:!!a}),!!_f[t.type]&&!!this._model){if(this[de]){this._pendingActions.push(t);return}var i=a.silent;Ev.call(this,t,i);var n=a.flush;n?this._zr.flush():n!==!1&&Mt.browser.weChat&&this._throttledZrFlush(),Bo.call(this,i),Vo.call(this,i)}},e.prototype.updateLabelLayout=function(){cr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(a);n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){An=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),Iv(h,!0),Iv(h,!1),v.plan()},Iv=function(h,v){for(var c=h._model,p=h._scheduler,d=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_v.get("hoverLayerThreshold")&&!Mt.node&&!Mt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=c)})}function s(h,v){if(!h.preventAutoZ){var c=h.get("z")||0,p=h.get("zlevel")||0;v.eachRendered(function(d){return l(d,c,p,-1/0),!0})}}function l(h,v,c,p){var d=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:d,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Xn(y))return;if(y instanceof gt&&nE(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}d_=function(h){return new(function(v){k(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return h._model.getComponent(d.mainType,d.index);p=p.parent}},c.prototype.enterEmphasis=function(p,d){la(p,d),We(h)},c.prototype.leaveEmphasis=function(p,d){ua(p,d),We(h)},c.prototype.enterBlur=function(p){uT(p),We(h)},c.prototype.leaveBlur=function(p){sg(p),We(h)},c.prototype.enterSelect=function(p){fT(p),We(h)},c.prototype.leaveSelect=function(p){hT(p),We(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},c.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},c}(dA))(h)},fC=function(h){function v(c,p){for(var d=0;d=0)){m_.push(t);var n=UA.wrapStageHandler(t,i);n.__prio=e,n.__raw=t,r.push(n)}}function gC(r,e){qp[r]=e}function iB(r,e,t){var a=kN("registerMap");a&&a(r,e,t)}var nB=cO;fn(kg,VO);fn(mh,zO);fn(mh,GO);fn(kg,eN);fn(mh,rN);fn(iC,PN);pC(yA);dC(VN,Zk);gC("default",FO);Ur({type:Yi,event:Yi,update:Yi},Kt);Ur({type:Bu,event:Bu,update:Bu},Kt);Ur({type:ys,event:ys,update:ys},Kt);Ur({type:Vu,event:Vu,update:Vu},Kt);Ur({type:ms,event:ms,update:ms},Kt);cC("light",jO);cC("dark",JO);var __=[],oB={registerPreprocessor:pC,registerProcessor:dC,registerPostInit:tB,registerPostUpdate:eB,registerUpdateLifecycle:Bg,registerAction:Ur,registerCoordinateSystem:rB,registerLayout:aB,registerVisual:fn,registerTransform:nB,registerLoading:gC,registerMap:iB,registerImpl:EN,PRIORITY:ZN,ComponentModel:bt,ComponentView:Wt,SeriesModel:Ft,ChartView:Bt,registerComponentModel:function(r){bt.registerClass(r)},registerComponentView:function(r){Wt.registerClass(r)},registerSeriesModel:function(r){Ft.registerClass(r)},registerChartView:function(r){Bt.registerClass(r)},registerSubTypeDefaulter:function(r,e){bt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){TP(r,e)}};function pt(r){if(z(r)){C(r,function(e){pt(e)});return}vt(__,r)>=0||(__.push(r),K(r)&&(r={install:r}),r.install(oB))}function zo(r){return r==null?0:r.length||1}function S_(r){return r}var sB=function(){function r(e,t,a,i,n,o){this._old=e,this._new=t,this._oldKeyGetter=a||S_,this._newKeyGetter=i||S_,this.context=n,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},i=new Array(e.length),n=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,a,n,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(n,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},i={},n=[],o=[];this._initIndexMap(e,a,n,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),i[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(h>1)for(var c=0;c1)for(var s=0;s30}var Go=j,xa=G,pB=typeof Int32Array=="undefined"?Array:Int32Array,dB="e\0\0",x_=-1,gB=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],yB=["_approximateExtent"],b_,Jl,Fo,Ho,Nv,tu,Bv,mB=function(){function r(e,t){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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var a,i=!1;mC(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,a=e),a=a||["x","y"];for(var n={},o=[],s={},l=!1,u={},f=0;f=t)){var a=this._store,i=a.getProvider();this._updateOrdinalMeta();var n=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===lr;if(l&&!i.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,i=a[e];i||(i=a[e]={});var n=i[t];return n==null&&(n=this.getVisual(t),z(n)?n=n.slice():Go(n)&&(n=V({},n)),i[t]=n),n},r.prototype.setItemVisual=function(e,t,a){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Go(t)?V(i,t):i[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Go(e)?V(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?V(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;Mp(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){C(this._graphicEls,function(a,i){a&&e&&e.call(t,a,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:xa(this.dimensions,this._getDimInfo,this),this.hostModel)),Nv(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];!K(a)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=a.apply(this,arguments);return t.apply(this,[i].concat(Ud(arguments)))})},r.internalField=function(){b_=function(e){var t=e._invertedIndicesMap;C(t,function(a,i){var n=e._dimInfos[i],o=n.ordinalMeta,s=e._store;if(o){a=t[i]=new pB(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),i[t]=l}}}(),r}(),Te=mB;function pl(r,e){Tg(r)||(r=Ag(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],i=q(),n=[],o=SB(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&xC(o),l=a===r.dimensionsDefine,u=l?SC(r):_C(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=q(f),v=new DA(o),c=0;c0&&(a.name=i+(n-1)),n++,e.set(i,n)}}function SB(r,e,t,a){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return C(e,function(n){var o;j(n)&&(o=n.dimsDef)&&(i=Math.max(i,o.length))}),i}function xB(r,e,t){var a=e.data;if(t||a.hasOwnProperty(r)){for(var i=0;a.hasOwnProperty(r+i);)i++;r+=i}return e.set(r,!0),r}var bB=function(){function r(e){this.coordSysDims=[],this.axisMap=q(),this.categoryAxisMap=q(),this.coordSysName=e}return r}();function wB(r){var e=r.get("coordinateSystem"),t=new bB(e),a=TB[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var TB={cartesian2d:function(r,e,t,a){var i=r.getReferringComponents("xAxis",qt).models[0],n=r.getReferringComponents("yAxis",qt).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",n),Cn(i)&&(a.set("x",i),e.firstCategoryDimIndex=0),Cn(n)&&(a.set("y",n),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var i=r.getReferringComponents("singleAxis",qt).models[0];e.coordSysDims=["single"],t.set("single",i),Cn(i)&&(a.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var i=r.getReferringComponents("polar",qt).models[0],n=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",n),t.set("angle",o),Cn(n)&&(a.set("radius",n),e.firstCategoryDimIndex=0),Cn(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var i=r.ecModel,n=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=n.dimensions.slice();C(n.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Cn(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Cn(r){return r.get("type")==="category"}function AB(r,e,t){t=t||{};var a=t.byIndex,i=t.stackedCoordDimension,n,o,s;CB(e)?n=e:(o=e.schema,n=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(C(n,function(m,_){$(m)&&(n[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,p=f.type,d=0;C(n,function(m){m.coordDim===c&&d++});var g={name:h,coordDim:c,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:n.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(n.push(g),n.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:h}}function CB(r){return!mC(r.schema)}function qa(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function bC(r,e){return qa(r,e)?r.getCalculationInfo("stackResultDimension"):e}function MB(r,e){var t=r.get("coordinateSystem"),a=hl.get(t),i;return e&&e.coordSysDims&&(i=G(e.coordSysDims,function(n){var o={name:n},s=e.axisMap.get(n);if(s){var l=s.get("type");o.type=xf(l)}return o})),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),i}function DB(r,e,t){var a,i;return t&&C(r,function(n,o){var s=n.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),n.ordinalMeta=l.getOrdinalMeta(),e&&(n.createInvertedIndices=!0)),n.otherDims.itemName!=null&&(i=!0)}),!i&&a!=null&&(r[a].otherDims.itemName=0),a}function pa(r,e,t){t=t||{};var a=e.getSourceManager(),i,n=!1;r?(n=!0,i=Ag(r)):(i=a.getSource(),n=i.sourceFormat===lr);var o=wB(e),s=MB(e,o),l=t.useEncodeDefaulter,u=K(l)?l:l?it(uA,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!n},h=pl(i,f),v=DB(h.dimensions,t.createInvertedIndices,o),c=n?null:a.getSharedDataStore(h),p=AB(e,{schema:h,store:c}),d=new Te(h,e);d.setCalculationInfo(p);var g=v!=null&&LB(i)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(n?i:c,null,g),d}function LB(r){if(r.sourceFormat===lr){var e=IB(r.data||[]);return!z(fo(e))}}function IB(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();jf(wC);var da=wC,PB=0,RB=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++PB}return r.createByAxisModel=function(e){var t=e.option,a=t.data,i=a&&G(a,EB);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!$(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=q(this.categories))},r}();function EB(r){return j(r)&&r.value!=null?r.value:r+""}var Kp=RB;function Qp(r){return r.type==="interval"||r.type==="log"}function kB(r,e,t,a){var i={},n=r[1]-r[0],o=i.interval=Ew(n/e,!0);t!=null&&oa&&(o=i.interval=a);var s=i.intervalPrecision=TC(o),l=i.niceTickExtent=[Ut(Math.ceil(r[0]/o)*o,s),Ut(Math.floor(r[1]/o)*o,s)];return OB(l,r),i}function Vv(r){var e=Math.pow(10,Jd(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ut(t*e)}function TC(r){return Er(r)+2}function w_(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function OB(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),w_(r,0,e),w_(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function _h(r,e){return r>=e[0]&&r<=e[1]}function Sh(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function xh(r,e){return r*(e[1]-e[0])+e[0]}var AC=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var i=a.getSetting("ordinalMeta");return i||(i=new Kp({})),z(i)&&(i=new Kp({categories:G(i,function(n){return j(n)?n.value:n})})),a._ordinalMeta=i,a._extent=a.getSetting("extent")||[0,i.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:$(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),_h(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Sh(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(xh(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,i=a[0];i<=a[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],n=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(da);da.registerClass(AC);var zg=AC,bi=Ut,CC=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return _h(t,this._extent)},e.prototype.normalize=function(t){return Sh(t,this._extent)},e.prototype.scale=function(t){return xh(t,this._extent)},e.prototype.setExtent=function(t,a){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(a)||(i[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=TC(t)},e.prototype.getTicks=function(t){var a=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;i[0]l)return[];var f=s.length?s[s.length-1].value:n[1];return i[1]>f&&(t?s.push({value:bi(f+a,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),i=[],n=this.getExtent(),o=1;on[0]&&c0&&(n=n===null?s:Math.min(n,s))}t[a]=n}}return t}function LC(r){var e=VB(r),t=[];return C(r,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],f=Math.abs(o[1]-o[0]),h=n.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var p=H(a.get("barWidth"),s),d=H(a.get("barMaxWidth"),s),g=H(a.get("barMinWidth")||(kC(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:Fg(n),stackId:Gg(a)})}),IC(t)}function IC(r){var e={};C(r,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=a.barMaxWidth;h&&(l[u].maxWidth=h);var v=a.barMinWidth;v&&(l[u].minWidth=v);var c=a.barGap;c!=null&&(s.gap=c);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return C(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=mt(n).length;s=Math.max(35-l*4,15)+"%"}var u=H(s,o),f=H(a.gap,1),h=a.remainedWidth,v=a.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),C(n,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,v--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var p=0,d;C(n,function(y,m){y.width||(y.width=c),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;C(n,function(y,m){t[i][m]=t[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function zB(r,e,t){if(r&&e){var a=r[Fg(e)];return a!=null&&t!=null?a[Gg(t)]:a}}function PC(r,e){var t=DC(r,e),a=LC(t);C(t,function(i){var n=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Gg(i),u=a[Fg(s)][l],f=u.offset,h=u.width;n.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function RC(r){return{seriesType:r,plan:xo(),reset:function(e){if(!!EC(e)){var t=e.getData(),a=e.coordinateSystem,i=a.getBaseAxis(),n=a.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(n.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(n.dim),f=t.getCalculationInfo("stackResultDimension"),h=qa(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=n.isHorizontal(),c=GB(i,n),p=kC(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&Or(b*3),w=p&&l&&Or(b*3),T=p&&Or(b),A=a.master.getRect(),M=v?A.width:A.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(h?g:o,D),R=L.get(s,D),E=c,N=void 0;h&&(N=+P-L.get(o,D));var O=void 0,B=void 0,F=void 0,W=void 0;if(v){var Z=a.dataToPoint([P,R]);if(h){var tt=a.dataToPoint([N,R]);E=tt[0]}O=E,B=Z[1]+m,F=Z[0]-E,W=y,Math.abs(F)>>1;r[i][1]i&&(this._approxInterval=i);var s=eu.length,l=Math.min(FB(eu,this._approxInterval,0,s),s-1);this._interval=eu[l][1],this._minLevelUnit=eu[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return wt(t)?t:+Fr(t)},e.prototype.contain=function(t){return _h(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Sh(this.parse(t),this._extent)},e.prototype.scale=function(t){return xh(t,this._extent)},e.type="time",e}(Ka),eu=[["second",yg],["minute",mg],["hour",Ss],["quarter-day",Ss*6],["half-day",Ss*12],["day",rr*1.2],["half-week",rr*3.5],["week",rr*7],["month",rr*31],["quarter",rr*95],["half-year",v0/2],["year",v0]];function HB(r,e,t,a){var i=Fr(e),n=Fr(t),o=function(p){return p0(i,p,a)===p0(n,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},v=function(){return h()&&o("second")},c=function(){return v()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return v();case"millisecond":return c()}}function WB(r,e){return r/=rr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function $B(r){var e=30*rr;return r/=e,r>6?6:r>3?3:r>2?2:1}function UB(r){return r/=Ss,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function T_(r,e){return r/=e?mg:yg,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function YB(r){return Ew(r,!0)}function ZB(r,e,t){var a=new Date(r);switch(qn(e)){case"year":case"month":a[XT(t)](0);case"day":a[qT(t)](1);case"hour":a[KT(t)](0);case"minute":a[QT(t)](0);case"second":a[jT(t)](0),a[JT(t)](0)}return a.getTime()}function XB(r,e,t,a){var i=1e4,n=YT,o=0;function s(M,D,L,I,P,R,E){for(var N=new Date(D),O=D,B=N[I]();O1&&R===0&&L.unshift({value:L[0].value-O})}}for(var R=0;R=a[0]&&m<=a[1]&&h++)}var _=(a[1]-a[0])/e;if(h>_*1.5&&v>_/1.5||(u.push(g),h>_||r===n[c]))break}f=[]}}}for(var S=Rt(G(u,function(M){return Rt(M,function(D){return D.value>=a[0]&&D.value<=a[1]&&!D.notAdd})}),function(M){return M.length>0}),b=[],x=S.length-1,c=0;c0;)n*=10;var s=[Ut(QB(a[0]/n)*n),Ut(KB(a[1]/n)*n)];this._interval=n,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Ts.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=$e(t)/$e(this.base),_h(t,this._extent)},e.prototype.normalize=function(t){return t=$e(t)/$e(this.base),Sh(t,this._extent)},e.prototype.scale=function(t){return t=xh(t,this._extent),ru(this.base,t)},e.type="log",e}(da),BC=Hg.prototype;BC.getMinorTicks=Ts.getMinorTicks;BC.getLabel=Ts.getLabel;function au(r,e){return qB(r,Er(e))}da.registerClass(Hg);var jB=Hg,JB=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[eV[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=tV[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),tV={min:"_determinedMin",max:"_determinedMax"},eV={min:"_dataMin",max:"_dataMax"};function VC(r,e,t){var a=r.rawExtentInfo;return a||(a=new JB(r,e,t),r.rawExtentInfo=a,a)}function iu(r,e){return e==null?null:Ls(e)?NaN:r.parse(e)}function zC(r,e){var t=r.type,a=VC(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var i=a.min,n=a.max,o=e.ecModel;if(o&&t==="time"){var s=DC("bar",o),l=!1;if(C(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=LC(s),f=rV(i,n,e,u);i=f.min,n=f.max}}return{extent:[i,n],fixMin:a.minFixed,fixMax:a.maxFixed}}function rV(r,e,t,a){var i=t.axis.getExtent(),n=i[1]-i[0],o=zB(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;C(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;C(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,h=1-(s+l)/n,v=f/h-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function ro(r,e){var t=e,a=zC(r,t),i=a.extent,n=t.get("splitNumber");r instanceof jB&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:n,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function bh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new zg({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new NC({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(da.getClass(e)||Ka)}}function aV(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function dl(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(i,n){return r.scale.getFormattedLabel(i,n,a)}}(e):$(e)?function(a){return function(i){var n=r.scale.getLabel(i),o=a.replace("{value}",n!=null?n:"");return o}}(e):K(e)?function(a){return function(i,n){return t!=null&&(n=i.value-t),a(Wg(r,i),n,i.level!=null?{level:i.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function Wg(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function iV(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,i,n=t.getExtent();t instanceof zg?i=t.count():(a=t.getTicks(),i=a.length);var o=r.getLabelModel(),s=dl(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;fr[1]&&(r[1]=i[1])})}var gl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),sV=1e-8;function C_(r,e){return Math.abs(r-e)i&&(a=o,i=l)}if(a)return uV(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var i=[1/0,1/0],n=[-1/0,-1/0],o=this.geometries;return C(o,function(s){s.type==="polygon"?M_(s.exterior,i,n,t):C(s.points,function(l){M_(l,i,n,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(n[0])&&isFinite(n[1])||(i[0]=i[1]=n[0]=n[1]=0),a=new ft(i[0],i[1],n[0]-i[0],n[1]-i[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),i=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/t,l/t])}return a}function vV(r,e){return r=hV(r),G(Rt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new D_(o[0],o.slice(1)));break;case"MultiPolygon":C(i.coordinates,function(l){l[0]&&n.push(new D_(l[0],l.slice(1)))});break;case"LineString":n.push(new L_([i.coordinates]));break;case"MultiLineString":n.push(new L_(i.coordinates))}var s=new HC(a[e||"name"],n,a.cp);return s.properties=a,s})}var $s=At();function cV(r){return r.type==="category"?dV(r):yV(r)}function pV(r,e){return r.type==="category"?gV(r,e):{ticks:G(r.scale.getTicks(),function(t){return t.value})}}function dV(r){var e=r.getLabelModel(),t=$C(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function $C(r,e){var t=UC(r,"labels"),a=$g(e),i=YC(t,a);if(i)return i;var n,o;return K(a)?n=qC(r,a):(o=a==="auto"?mV(r):a,n=XC(r,o)),ZC(t,a,{labels:n,labelCategoryInterval:o})}function gV(r,e){var t=UC(r,"ticks"),a=$g(e),i=YC(t,a);if(i)return i;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),K(a))n=qC(r,a,!0);else if(a==="auto"){var s=$C(r,r.getLabelModel());o=s.labelCategoryInterval,n=G(s.labels,function(l){return l.tickValue})}else o=a,n=XC(r,o,!0);return ZC(t,a,{ticks:n,tickCategoryInterval:o})}function yV(r){var e=r.scale.getTicks(),t=dl(r);return{labels:G(e,function(a,i){return{level:a.level,formattedLabel:t(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function UC(r,e){return $s(r)[e]||($s(r)[e]=[])}function YC(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=n[1];l+=s){var p=0,d=0,g=il(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=$s(r.model),b=r.getExtent(),x=S.lastAutoInterval,w=S.lastTickCount;return x!=null&&w!=null&&Math.abs(x-_)<=1&&Math.abs(w-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function SV(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function XC(r,e,t){var a=dl(r),i=r.scale,n=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=GC(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==n[0]&&d(n[0]);for(var p=u;p<=n[1];p+=l)d(p);c&&p-l!==n[1]&&d(n[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:i.getLabel(y),tickValue:g})}return s}function qC(r,e,t){var a=r.scale,i=dl(r),n=[];return C(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),n}var I_=[0,1],xV=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=a&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Pw(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(a=a.slice(),P_(a,i.count())),Pt(e,I_,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),P_(a,i.count()));var n=Pt(e,a,I_,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=pV(this,t),i=a.ticks,n=G(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return bV(this,n,o,e.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),i=G(a,function(n){return G(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return cV(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(){return _V(this)},r}();function P_(r,e){var t=r[1]-r[0],a=e,i=t/a/2;r[0]+=i,r[1]-=i}function bV(r,e,t,a){var i=e.length;if(!r.onBand||t||!i)return;var n=r.getExtent(),o,s;if(i===1)e[0].coord=n[0],o=e[1]={coord:n[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;C(e,function(c){c.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var h=n[0]>n[1];v(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&v(n[0],e[0].coord)&&e.unshift({coord:n[0]}),v(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&v(o.coord,n[1])&&e.push({coord:n[1]});function v(c,p){return c=Ut(c),p=Ut(p),h?c>p:ci&&(i+=Wo);var c=Math.atan2(s,o);if(c<0&&(c+=Wo),c>=a&&c<=i||c+Wo>=a&&c+Wo<=i)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(i)+r,y=t*Math.sin(i)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function wf(r,e,t,a,i,n,o,s){var l=i-r,u=n-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-i)*(d-i)+(g-n)*(g-n))}function KC(r,e,t,a,i,n,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(i,r),s),f=o[1]=Math.min(Math.max(n,e),l);return Math.sqrt((u-i)*(u-i)+(f-n)*(f-n))}var pr=[];function CV(r,e,t){var a=KC(e.x,e.y,e.width,e.height,r.x,r.y,pr);return t.set(pr[0],pr[1]),a}function MV(r,e,t){for(var a=0,i=0,n=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,gr.fromArray(r[0]),Ot.fromArray(r[1]),Zt.fromArray(r[2]),st.sub(Nr,gr,Ot),st.sub(Rr,Zt,Ot);var t=Nr.len(),a=Rr.len();if(!(t<.001||a<.001)){Nr.scale(1/t),Rr.scale(1/a);var i=Nr.dot(Rr),n=Math.cos(e);if(n1&&st.copy(we,Zt),we.toArray(r[1])}}}}function DV(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,gr.fromArray(r[0]),Ot.fromArray(r[1]),Zt.fromArray(r[2]),st.sub(Nr,Ot,gr),st.sub(Rr,Zt,Ot);var a=Nr.len(),i=Rr.len();if(!(a<.001||i<.001)){Nr.scale(1/a),Rr.scale(1/i);var n=Nr.dot(e),o=Math.cos(t);if(n=l)st.copy(we,Zt);else{we.scaleAndAdd(Rr,s/Math.tan(Math.PI/2-f));var h=Zt.x!==Ot.x?(we.x-Ot.x)/(Zt.x-Ot.x):(we.y-Ot.y)/(Zt.y-Ot.y);if(isNaN(h))return;h<0?st.copy(we,Ot):h>1&&st.copy(we,Zt)}we.toArray(r[1])}}}}function E_(r,e,t,a){var i=t==="normal",n=i?r:r.ensureState(t);n.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function LV(r,e){var t=e.smooth,a=e.points;if(!!a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var i=Ia(a[0],a[1]),n=Ia(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*t,s=Iu([],a[1],a[0],o/i),l=Iu([],a[1],a[2],o/n),u=Iu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0&&n&&b(-f/o,0,o);var d=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&w(-y),m<0&&w(m);function _(){y=d.rect[e]-a,m=i-g.rect[e]-g.rect[t]}function S(T,A,M){if(T<0){var D=Math.min(A,-T);if(D>0){b(D*M,0,o);var L=D+T;L<0&&x(-L*M,1)}else x(-T*M,1)}}function b(T,A,M){T!==0&&(u=!0);for(var D=A;D0)for(var L=0;L0;L--){var E=M[L-1]*R;b(-E,L,o)}}}function w(T){var A=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),D=0;D0?b(M,0,D+1):b(-M,o-D-1,o),T-=M,T<=0)return}return u}function IV(r,e,t,a){return JC(r,"x","width",e,t,a)}function tM(r,e,t,a){return JC(r,"y","height",e,t,a)}function eM(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new ft(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var i=0;i=0&&a.attr(n.oldLayoutSelect),vt(v,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),Tt(a,u,t,l)}else if(a.attr(u),!po(a).valueAnimation){var h=ct(a.style.opacity,1);a.style.opacity=0,zt(a,{style:{opacity:h}},t,l)}if(n.oldLayout=u,a.states.select){var c=n.oldLayoutSelect={};nu(c,u,ou),nu(c,a.states.select,ou)}if(a.states.emphasis){var p=n.oldLayoutEmphasis={};nu(p,u,ou),nu(p,a.states.emphasis,ou)}FT(a,l,f,t,t)}if(i&&!i.ignore&&!i.invisible){var n=EV(i),o=n.oldLayout,d={points:i.shape.points};o?(i.attr({shape:o}),Tt(i,{shape:d},t)):(i.setShape(d),i.style.strokePercent=0,zt(i,{style:{strokePercent:1}},t)),n.oldLayout=d}},r}(),OV=kV,Hv=At();function NV(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var i=Hv(t).labelManager;i||(i=Hv(t).labelManager=new OV),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var i=Hv(t).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var Wv=Math.sin,$v=Math.cos,rM=Math.PI,Ti=Math.PI*2,BV=180/rM,VV=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){this._add("C",e,t,a,i,n,o)},r.prototype.quadraticCurveTo=function(e,t,a,i){this._add("Q",e,t,a,i)},r.prototype.arc=function(e,t,a,i,n,o){this.ellipse(e,t,a,a,0,i,n,o)},r.prototype.ellipse=function(e,t,a,i,n,o,s,l){var u=s-o,f=!l,h=Math.abs(u),v=Oa(h-Ti)||(f?u>=Ti:-u>=Ti),c=u>0?u%Ti:u%Ti+Ti,p=!1;v?p=!0:Oa(h)?p=!1:p=c>=rM==!!f;var d=e+a*$v(o),g=t+i*Wv(o);this._start&&this._add("M",d,g);var y=Math.round(n*BV);if(v){var m=1/this._p,_=(f?1:-1)*(Ti-m);this._add("A",a,i,y,1,+f,e+a*$v(o+_),t+i*Wv(o+_)),m>.01&&this._add("A",a,i,y,0,+f,d,g)}else{var S=e+a*$v(s),b=t+i*Wv(s);this._add("A",a,i,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,a,i){this._add("M",e,t),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,i,n,o,s,l,u){for(var f=[],h=this._p,v=1;v"}function ZV(r){return""}function Zg(r,e){e=e||{};var t=e.newline?` `:"";function a(i){var n=i.children,o=i.tag,s=i.attrs;return YV(o,s)+(i.text||"")+(n?""+t+G(n,function(l){return a(l)}).join(t)+t:"")+ZV(o)}return a(r)}function XV(r,e,t){t=t||{};var a=t.newline?` `:"",i=" {"+a,n=a+"}",o=G(mt(r),function(l){return l+i+G(mt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=G(mt(e),function(l){return"@keyframes "+l+i+G(mt(e[l]),function(u){return u+i+G(mt(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":[""].join(a)}function td(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function O_(r,e,t,a){return re("svg","root",{width:r,height:e,xmlns:iM,"xmlns:xlink":nM,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var N_={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"},Di="transform-origin";function qV(r,e,t){var a=V({},r.shape);V(a,e),r.buildPath(t,a);var i=new aM;return i.reset(Sw(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function KV(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Di]=t+"px "+a+"px")}var QV={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function sM(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function jV(r,e,t){var a=r.shape.paths,i={},n,o;if(C(a,function(l){var u=td(t.zrId);u.animation=!0,wh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=mt(f),c=v.length;if(!!c){o=v[c-1];var p=f[o];for(var d in p){var g=p[d];i[d]=i[d]||{d:""},i[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(n=m)}}}),!!n){e.d=!1;var s=sM(i,t);return n.replace(o,s)}}function B_(r){return $(r)?N_[r]?"cubic-bezier("+N_[r]+")":Xd(r)?r:"":""}function wh(r,e,t,a){var i=r.animators,n=i.length,o=[];if(r instanceof vg){var s=jV(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var dt=sM(w,t);return dt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Us=Math.round;function lM(r){return r&&$(r.src)}function uM(r){return r&&K(r.toDataURL)}function Xg(r,e,t,a){WV(function(i,n){var o=i==="fill"||i==="stroke";o&&Z2(n)?o5(e,r,i,a):o&&Y2(n)?s5(t,r,i,a):r[i]=n},e,t,!1),n5(t,r,a)}function V_(r){return Oa(r[0]-1)&&Oa(r[1])&&Oa(r[2])&&Oa(r[3]-1)}function JV(r){return Oa(r[4])&&Oa(r[5])}function qg(r,e,t){if(e&&!(JV(e)&&V_(e))){var a=t?10:1e4;r.transform=V_(e)?"translate("+Us(e[4]*a)/a+" "+Us(e[5]*a)/a+")":G2(e)}}function z_(r,e,t){for(var a=r.points,i=[],n=0;nn?(p=t[l+1]==null?null:t[l+1].elm,cM(r,p,t,i,l)):Af(r,e,a,n))}function Vn(r,e){var t=e.elm=r.elm,a=r.children,i=e.children;r!==e&&(Kg(r,e),ed(e.text)?Ir(a)&&Ir(i)?a!==i&&v5(t,a,i):Ir(i)?(Ir(r.text)&&Uv(t,""),cM(t,null,i,0,i.length-1)):Ir(a)?Af(t,a,0,a.length-1):Ir(r.text)&&Uv(t,""):r.text!==e.text&&(Ir(a)&&Af(t,a,0,a.length-1),Uv(t,e.text)))}function c5(r,e){if(ss(r,e))Vn(r,e);else{var t=r.elm,a=hM(t);Ys(e),a!==null&&(Oi(a,e.elm,vM(t)),Af(a,[r],0,0))}return e}var p5=0,d5=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=Y_(),this.configLayer=Y_(),this.storage=t,this._opts=a=V({},a),this.root=e,this._id="zr"+p5++,this._oldVNode=O_(a.width,a.height),e&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=oM("svg");Kg(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",c5(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return F_(e,td(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._backgroundColor,i=this._width,n=this._height,o=td(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress;var s=[];if(a&&a!=="none"){var l=Jn(a),u=l.color,f=l.opacity;this._bgVNode=re("rect","bg",{width:i,height:n,x:"0",y:"0",id:"0",fill:u,"fill-opacity":f}),s.push(this._bgVNode)}else this._bgVNode=null;var h=e.compress?null:this._mainVNode=re("g","main",{},[]);this._paintList(t,o,h?h.children:s),h&&s.push(h);var v=G(mt(o.defs),function(d){return o.defs[d]});if(v.length&&s.push(re("defs","defs",{},v)),e.animation){var c=XV(o.cssNodes,o.cssAnims,{newline:!0});if(c){var p=re("style","stl",{},[],c);s.push(p)}}return O_(i,n,s,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Zg(this.renderToVNode({animation:ct(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:ct(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var t=this._bgVNode;if(t&&t.elm){var a=Jn(e),i=a.color,n=a.opacity;t.elm.setAttribute("fill",i),n<1&&t.elm.setAttribute("fill-opacity",n)}},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var i=e.length,n=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=n[o-1];for(var y=d+1;y=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=c.dpr,D=0;D0&&e>i[0]){for(l=0;le);l++);s=a[i[l]]}if(i.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,i=0;i0?su:0),this._needsManuallyCompositing),f.__builtin__||Wd("ZLevel "+u+" has been used by unkown layer "+f.id),f!==n&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),n=f),i.__dirty&ze&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,C(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?lt(a[e],t,!0):a[e]=t;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.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},e}(Ft),C5=A5;function ao(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var i=to(r,e,t[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o=0&&a.push(e[n])}return a.join(" ")}var M5=function(r){k(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o.updateData(t,a,i,n),o}return e.prototype._createSymbol=function(t,a,i,n,o){this.removeAll();var s=Qt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=D5,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){la(this.childAt(0))},e.prototype.downplay=function(){ua(this.childAt(0))},e.prototype.setZ=function(t,a){var i=this.childAt(0);i.zlevel=t,i.z=a},e.prototype.setDraggable=function(t,a){var i=this.childAt(0);i.draggable=t,i.cursor=!a&&t?"move":i.cursor},e.prototype.updateData=function(t,a,i,n){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,f=n&&n.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):Tt(v,c,s,a),Sr(v)}if(this._updateCommon(t,a,l,i,n),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,zt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,i,n,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(n&&(u=n.emphasisItemStyle,f=n.blurItemStyle,h=n.selectItemStyle,v=n.focus,c=n.blurScope,d=n.labelStatesModels,g=n.hoverScale,y=n.cursorStyle,p=n.emphasisDisabled),!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=se(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=wo(t.getItemVisual(a,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof ve){var T=s.style;s.useStyle(V({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(V({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=t.getItemVisual(a,"liftZ"),M=this._z2;A!=null?M==null&&(this._z2=s.z2,s.z2+=A):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;_e(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:w,defaultOpacity:x.opacity});function L(R){return D?t.getName(R):ao(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");if(I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f,g){var P=Math.max(wt(g)?g:1.1,3/this._sizeY);I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P}this.setSymbolScale(1),Yt(this,v,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,i){var n=this.childAt(0),o=at(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Za(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Za(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return cl(t.getItemVisual(a,"symbolSize"))},e}(rt);function D5(r,e){this.parent.drift(r,e)}var yl=M5;function Zv(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function q_(r){return r!=null&&!j(r)&&(r={isIgnore:r}),r||{}}function K_(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:se(e),cursorStyle:e.get("cursor")}}var L5=function(){function r(e){this.group=new rt,this._SymbolCtor=e||yl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=q_(t);var a=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=K_(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};n||a.removeAll(),e.diff(n).add(function(h){var v=f(h);if(Zv(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=n.getItemGraphicEl(v),p=f(h);if(!Zv(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Tt(c,y,i)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=n.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},i)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,i){var n=e._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=K_(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=q_(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=a[0]:a[1]<0&&(t=a[1]),t}function gM(r,e,t,a){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function P5(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,i){t.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function R5(r,e,t,a,i,n,o,s){for(var l=P5(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=dM(i,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=i||d<0)break;if(Ki(y,m)){if(l){d+=n;continue}break}if(d===t)r[n>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=n;continue}if(o>0){for(var b=d+n,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||Ki(x,w))c=y,p=m;else{M=x-u,D=w-f;var P=y-u,R=x-y,E=m-f,N=w-m,O=void 0,B=void 0;if(s==="x"){O=Math.abs(P),B=Math.abs(R);var F=M>0?1:-1;c=y-F*O*o,p=m,L=y+F*B*o,I=m}else if(s==="y"){O=Math.abs(E),B=Math.abs(N);var W=D>0?1:-1;c=y,p=m-W*O*o,L=y,I=m+W*B*o}else O=Math.sqrt(P*P+E*E),B=Math.sqrt(R*R+N*N),A=B/(B+O),c=y-M*o*(1-A),p=m-D*o*(1-A),L=y+M*o*A,I=m+D*o*A,L=ba(L,wa(x,y)),I=ba(I,wa(w,m)),L=wa(L,ba(x,y)),I=wa(I,ba(w,m)),M=L-y,D=I-m,c=y-M*O/B,p=m-D*O/B,c=ba(c,wa(u,y)),p=ba(p,wa(f,m)),c=wa(c,ba(u,y)),p=wa(p,ba(f,m)),M=y-c,D=m-p,L=y+M*B/O,I=m+D*B/O}r.bezierCurveTo(h,v,c,p,y,m),h=L,v=I}else r.lineTo(y,m)}u=y,f=m,d+=n}return g}var yM=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),E5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new yM},e.prototype.buildPath=function(t,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&Ki(i[o*2-2],i[o*2-1]);o--);for(;n=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}s=c,l=p;break;case o.C:c=n[h++],p=n[h++],d=n[h++],g=n[h++],y=n[h++],m=n[h++];var b=u?ju(s,c,d,y,t,f):ju(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?ee(l,p,g,m,w):ee(s,c,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(gt),k5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(yM),mM=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new k5},e.prototype.buildPath=function(t,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Ki(i[s*2-2],i[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function B5(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(!!n){var l=e.getAxis(i),u=G(n.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=n.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=N5(u,i==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";C(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new sl(0,0,0,0,v,!0);return m[i]=d,m[i+"2"]=g,m}}}function V5(r,e,t){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=t.getAxesByScale("ordinal")[0];if(!!n&&!(i&&z5(n,e))){var o=e.mapDimension(n.dim),s={};return C(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function z5(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;oa)return!1;return!0}function G5(r,e){return isNaN(r)||isNaN(e)}function F5(r){for(var e=r.length/2;e>0&&G5(r[e*2-2],r[e*2-1]);e--);return e-1}function e1(r,e){return[r[e*2],r[e*2+1]]}function H5(r,e,t){for(var a=r.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function xM(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=d.getState("emphasis").style;F.lineWidth=+d.style.lineWidth+1}at(d).seriesIndex=t.seriesIndex,Yt(d,N,O,B);var W=t1(t.get("smooth")),Z=t.get("smoothMonotone");if(d.setShape({smooth:W,smoothMonotone:Z,connectNulls:T}),g){var tt=l.getCalculationInfo("stackedOnSeries"),ht=0;g.useStyle(Q(f.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),tt&&(ht=t1(tt.get("smooth"))),g.setShape({smooth:W,stackedOnSmooth:ht,smoothMonotone:Z,connectNulls:T}),he(g,t,"areaStyle"),at(g).seriesIndex=t.seriesIndex,Yt(g,N,O,B)}var It=function(Dt){n._changePolyState(Dt)};l.eachItemGraphicEl(function(Dt){Dt&&(Dt.onHoverStateChange=It)}),this._polyline.onHoverStateChange=It,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=D,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,a){at(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,i,n){var o=t.getData(),s=tn(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel"),c=t.get("z");u=new yl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Bt.prototype.highlight.call(this,t,a,i,n)},e.prototype.downplay=function(t,a,i,n){var o=t.getData(),s=tn(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Bt.prototype.downplay.call(this,t,a,i,n)},e.prototype._changePolyState=function(t){var a=this._polygon;sf(this._polyline,t),a&&sf(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new E5({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new mM({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");K(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=K(h)?h(null):h;t.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,b=a.pointToCoord(g);n?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=i;n?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=K(h)?h(p):f*w+v,A=d.getSymbolPath(),M=A.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),A.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,i){var n=t.getModel("endLabel");if(xM(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ct({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=F5(l);f>=0&&(_e(s,se(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?pM(o,c):ao(o,h)},enableTextSetter:!0},W5(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,i,n,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var h=i.getLayout("points"),v=i.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=H5(h,S,w),A=T.range,M=A[1]-A[0],D=void 0;if(M>=1){if(M>1&&!c){var L=e1(h,A[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(D=v.getRawValue(A[0]))}else{var L=f.getPointOn(S,w);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=v.getRawValue(A[0]),P=v.getRawValue(A[1]);o&&(D=Hw(i,p,I,P,T.t))}n.lastFrameIndex=A[0]}else{var R=t===1||n.lastFrameIndex>0?A[0]:0,L=e1(h,R);o&&(D=v.getRawValue(R)),u.attr({x:L[0]+b,y:L[1]+x})}o&&po(u).setLabelText(D)}},e.prototype._doUpdateAnimation=function(t,a,i,n,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=R5(this._data,t,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(c=Ta(v.current,i,o,l),p=Ta(v.stackedOnCurrent,i,o,l),d=Ta(v.next,i,o,l),g=Ta(v.stackedOnNext,i,o,l)),J_(c,d)>3e3||f&&J_(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),Tt(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Tt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){n==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/c));var p=void 0;$(n)?p=Y5[n]:K(n)&&(p=n),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/c,p,Z5))}}}}}function X5(r){r.registerChartView(U5),r.registerSeriesModel(C5),r.registerLayout(_l("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,bM("line"))}var wM=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return pa(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var a=this.coordinateSystem;if(a&&a.clampData){var i=a.dataToPoint(a.clampData(t)),n=this.getData(),o=n.getLayout("offset"),s=n.getLayout("size"),l=a.getBaseAxis().isHorizontal()?0:1;return i[l]+=o+s/2,i}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ft);Ft.registerClass(wM);var Cf=wM,q5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return pa(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,i){return i.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ei(Cf.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}),e}(Cf),K5=q5,Q5=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),j5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new Q5},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,i,n){if(!!this._isOrderChangedWithinSameData(t,a,i)){var o=this._dataSort(t,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,i){var n=a.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){Ns(n,t,at(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Bt),r1={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,n=r.y+r.height,o=qv(e.x,r.x),s=Kv(e.x+e.width,i),l=qv(e.y,r.y),u=Kv(e.y+e.height,n),f=si?s:o,e.y=h&&l>n?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var i=Kv(e.r,r.r),n=qv(e.r0,r.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},a1={cartesian2d:function(r,e,t,a,i,n,o,s,l){var u=new xt({shape:V({},a),z2:1});if(u.__dataIndex=t,u.name="item",n){var f=u.shape,h=i?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,i,n,o,s,l){var u=!i&&l?Mf:Ee,f=new u({shape:a,z2:1});f.name="item";var h=TM(i);if(f.calculateTextPosition=J5(h,{isRoundCap:u===Mf}),n){var v=f.shape,c=i?"r":"endAngle",p={};v[c]=i?0:a.startAngle,p[c]=a[c],(s?Tt:zt)(f,{shape:p},n)}return f}};function az(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function i1(r,e,t,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Tt:zt)(t,{shape:l},e,i,null);var f=e?r.baseAxis.model:null;(o?Tt:zt)(t,{shape:u},f,i)}function n1(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function oz(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function TM(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function s1(r,e,t,a,i,n,o,s){var l=e.getItemVisual(t,"style");s||r.setShape("r",a.get(["itemStyle","borderRadius"])||0),r.useStyle(l);var u=a.getShallow("cursor");u&&r.attr("cursor",u);var f=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=se(a);_e(r,h,{labelFetcher:n,labelDataIndex:t,defaultText:ao(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var v=r.getTextContent();if(s&&v){var c=a.get(["label","position"]);r.textConfig.inside=c==="middle"?!0:null,tz(r,c==="outside"?f:c,TM(o),a.get(["label","rotate"]))}GT(v,h,n.getRawValue(t),function(d){return pM(e,d)});var p=a.getModel(["emphasis"]);Yt(r,p.get("focus"),p.get("blurScope"),p.get("disabled")),he(r,a),oz(i)&&(r.style.fill="none",r.style.stroke="none",C(r.states,function(d){d.style&&(d.style.fill=d.style.stroke="none")}))}function sz(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,i,n)}var lz=function(){function r(){}return r}(),l1=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new lz},e.prototype.buildPath=function(t,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function uz(r,e,t){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=n.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function AM(r,e,t){if(hn(t,"cartesian2d")){var a=e,i=t.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function fz(r,e,t){var a=r.type==="polar"?Ee:xt;return new a({shape:AM(e,t,r),silent:!0,z2:0})}var hz=rz;function vz(r){r.registerChartView(hz),r.registerSeriesModel(K5),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,it(PC,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,RC("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,bM("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var hu=Math.PI*2,h1=Math.PI/180;function CM(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function MM(r,e){var t=CM(r,e),a=r.get("center"),i=r.get("radius");z(i)||(i=[0,i]),z(a)||(a=[a,a]);var n=H(t.width,e.getWidth()),o=H(t.height,e.getHeight()),s=Math.min(n,o),l=H(a[0],n)+t.x,u=H(a[1],o)+t.y,f=H(i[0],s/2),h=H(i[1],s/2);return{cx:l,cy:u,r0:f,r:h}}function cz(r,e,t){e.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=CM(a,t),s=MM(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*h1,c=a.get("minAngle")*h1,p=0;i.each(n,function(M){!isNaN(M)&&p++});var d=i.getSum(n),g=Math.PI/(d||p)*2,y=a.get("clockwise"),m=a.get("roseType"),_=a.get("stillShowZeroSum"),S=i.getDataExtent(n);S[0]=0;var b=hu,x=0,w=v,T=y?1:-1;if(i.setLayout({viewRect:o,r:f}),i.each(n,function(M,D){var L;if(isNaN(M)){i.setItemLayout(D,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:h,r:m?NaN:f});return}m!=="area"?L=d===0&&_?g:M*g:L=hu/p,Lt?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*i,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();n.width=d.width;var g=(a.style.margin||0)+2.1;n.height=d.height+g,n.y-=(n.height-h)/2}}}function Qv(r){return r.position==="center"}function gz(r){var e=r.getData(),t=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*pz,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,A=w.getTextContent(),M=w.getTextGuideLine(),D=e.getItemModel(x),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=H(L.get("edgeDistance"),u),N=L.get("bleedMargin"),O=D.getModel("labelLine"),B=O.get("length");B=H(B,u);var F=O.get("length2");if(F=H(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Z>0?"left":"right"}var $t=Math.PI,Ht=0,ce=L.get("rotate");if(wt(ce))Ht=ce*($t/180);else if(I==="center")Ht=0;else if(ce==="radial"||ce===!0){var Yr=Z<0?-W+$t:-W;Ht=Yr}else if(ce==="tangential"&&I!=="outside"&&I!=="outer"){var Me=Math.atan2(Z,tt);Me<0&&(Me=$t*2+Me);var Al=tt>0;Al&&(Me=$t+Me),Ht=Me-$t}if(n=!!Ht,A.x=ht,A.y=It,A.rotation=Ht,A.setStyle({verticalAlign:"middle"}),et){A.setStyle({align:dt});var Rh=A.states.select;Rh&&(Rh.x+=A.x,Rh.y+=A.y)}else{var ga=A.getBoundingRect().clone();ga.applyTransform(A.getComputedTransform());var Yy=(A.style.margin||0)+2.1;ga.y-=Yy/2,ga.height+=Yy,t.push({label:A,labelLine:M,position:I,len:B,len2:F,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new st(Z,tt),linePoints:Dt,textAlign:dt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:ga,unconstrainedWidth:ga.width,labelStyleWidth:A.style.width})}w.setTextConfig({inside:et})}}),!n&&r.get("avoidLabelOverlap")&&dz(t,a,i,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=n.r0}},e.type="pie",e}(Bt),_z=mz;function To(r,e,t){e=z(e)&&{coordDimensions:e}||V({encodeDefine:r.getEncode()},e);var a=r.getSource(),i=pl(a,e).dimensions,n=new Te(i,r);return n.initData(a,t),n}var Sz=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),xl=Sz,xz=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new xl(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return To(this,{coordDimensions:["value"],encodeDefaulter:it(xg,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=[];return a.each(a.mapDimension("value"),function(o){n.push(o)}),i.percent=MP(n,t,a.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){Ji(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,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"},e}(Ft),bz=xz;function wz(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(wt(o)&&!isNaN(o)&&o<0)})}}}function Tz(r){r.registerChartView(_z),r.registerSeriesModel(bz),XA("pie",r.registerAction),r.registerLayout(it(cz,"pie")),r.registerProcessor(Sl("pie")),r.registerProcessor(wz("pie"))}var Az=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return pa(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,i){return i.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.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"}},e}(Ft),Cz=Az,LM=4,Mz=function(){function r(){}return r}(),Dz=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new Mz},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var f=u*2,h=n[f]-s/2,v=n[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Iz=Lz,Pz=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=_l("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,i=a&&a.getArea&&a.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Iz:new ml,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Bt),Rz=Pz,Ez=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.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"},e}(bt),kz=Ez,ad=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",qt).models[0]},e.type="cartesian2dAxis",e}(bt);jt(ad,gl);var IM={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Oz=lt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},IM),Qg=lt({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}}},IM),Nz=lt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Qg),Bz=Q({logBase:10},Qg),PM={category:Oz,value:Qg,time:Nz,log:Bz},Vz={value:1,category:1,time:1,log:1};function io(r,e,t,a){C(Vz,function(i,n){var o=lt(lt({},PM[n],!0),a,!0),s=function(l){k(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+n,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=zs(this),c=v?mo(f):{},p=h.getTheme();lt(f,p.get(n+"Axis")),lt(f,this.getDefaultOption()),f.type=c1(f),v&&Xa(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Kp.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",c1)}function c1(r){return r.type||(r.data?"category":"value")}var zz=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Rt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),Gz=zz,id=["x","y"];function p1(r){return r.type==="interval"||r.type==="time"}var Fz=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=id,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!p1(t)||!p1(a))){var i=t.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-i[0]*f,c=o[1]-n[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=uo([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var i=this.dataToPoint(t),n=this.dataToPoint(a),o=this.getArea(),s=new ft(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return ue(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},e.prototype.clampData=function(t,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var i=[];if(this._invTransform)return ue(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),a),i[1]=o.coordToData(o.toLocalCoord(t[1]),a),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(a[0],a[1]),o=Math.max(t[0],t[1])-i,s=Math.max(a[0],a[1])-n;return new ft(i,n,o,s)},e}(Gz),Hz=function(r){k(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(br),Wz=Hz;function nd(r,e,t){t=t||{};var a=r.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}n.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[s],n.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),ne(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var y=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-y:y,n.z2=1,n}function d1(r){return r.get("coordinateSystem")==="cartesian2d"}function g1(r){var e={xAxisModel:null,yAxisModel:null};return C(e,function(t,a){var i=a.replace(/Model$/,""),n=r.getReferringComponents(i,qt).models[0];e[a]=n}),e}var jv=Math.log;function RM(r,e,t){var a=Ka.prototype,i=a.getTicks.call(t),n=a.getTicks.call(t,!0),o=i.length-1,s=a.getInterval.call(t),l=zC(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=jv(r.base);u=[jv(u[0])/v,jv(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=Vv(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Vv(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Ut(g-m),d<0&&u[0]>=0?(d=0,g=Ut(m)):g>0&&u[1]<=0&&(g=0,d=-Ut(m))}var _=(i[0].value-n[0].value)/s,S=(i[o].value-n[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var $z=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=id,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=mt(o),u=l.length;if(!!u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;Qp(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(ro(d,p),Qp(d)&&(s=c))}f.length&&(s||(s=f.pop(),ro(s.scale,s.model)),C(f,function(g){RM(g.scale,g.model,s.scale)}))}}i(a.x),i(a.y);var n={};C(a.x,function(o){y1(a,"y",o,n)}),C(a.y,function(o){y1(a,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var i=e.getBoxLayoutParams(),n=!a&&e.get("containLabel"),o=te(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(C(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=iV(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),C(this._coordsList,function(u){u.calcAffineTransform()});function l(){C(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),Uz(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}j(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i0?"top":"bottom",n="center"):nf(i-Ba)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),_1={axisLine:function(r,e,t,a){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var n=e.axis.getExtent(),o=a.transform,s=[n[0],0],l=[n[1],0];o&&(ue(s,s,o),ue(l,l,o));var u=V({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new oe({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var v=e.get(["axisLine","symbolSize"]);$(h)&&(h=[h,h]),($(v)||wt(v))&&(v=[v,v]);var c=wo(e.get(["axisLine","symbolOffset"])||0,v),p=v[0],d=v[1];C([{rotate:r.rotation+Math.PI/2,offset:c[0],r:0},{rotate:r.rotation-Math.PI/2,offset:c[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(h[y]!=="none"&&h[y]!=null){var m=Qt(h[y],-p/2,-d/2,p,d,u.stroke,!0),_=g.r+g.offset;m.attr({rotation:g.rotate,x:s[0]+_*Math.cos(r.rotation),y:s[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(m)}})}}},axisTickLabel:function(r,e,t,a){var i=qz(t,a,e,r),n=Qz(t,a,e,r);if(Xz(e,n,i),Kz(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=jC(G(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));eM(o)}},axisName:function(r,e,t,a){var i=ne(r.axisName,e.get("name"));if(!!i){var n=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[n==="start"?u[0]-f*l:n==="end"?u[1]+f*l:(u[0]+u[1])/2,x1(n)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*Ba/180);var p;x1(n)?v=Qi.innerTextLayout(r.rotation,c!=null?c:r.rotation,o):(v=Zz(r.rotation,n,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=ne(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Ct({x:h[0],y:h[1],rotation:v.rotation,silent:Qi.isLabelSilent(e),style:Gt(s,{text:i,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(co({el:_,componentModel:e,itemName:i}),_.__fullText=i,_.anid="name",e.get("triggerEvent")){var S=Qi.makeAxisEventDataBase(e);S.targetType="axisName",S.name=i,at(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function Zz(r,e,t,a){var i=Rw(t-r),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return nf(i-Ba/2)?(o=l?"bottom":"top",n="center"):nf(i-Ba*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iBa/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function Xz(r,e,t){if(!GC(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?(Ue(n),Ue(u)):S1(n,o)&&(a?(Ue(o),Ue(f)):(Ue(n),Ue(u))),i===!1?(Ue(s),Ue(h)):S1(l,s)&&(i?(Ue(l),Ue(v)):(Ue(s),Ue(h)))}}function Ue(r){r&&(r.ignore=!0)}function S1(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var i=Kf([]);return ln(i,i,-r.rotation),t.applyTransform(aa([],i,r.getLocalTransform())),a.applyTransform(aa([],i,e.getLocalTransform())),t.intersect(a)}}function x1(r){return r==="middle"||r==="center"}function EM(r,e,t,a,i){for(var n=[],o=[],s=[],l=0;l=0||r===e}function aG(r){var e=jg(r);if(!!e){var t=e.axisPointerModel,a=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=od(t);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=Q({color:p.color},l));var g=lt(J(p),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if($(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else K(f)&&(g.name=f(g.name,g));var m=new Nt(g,null,this.ecModel);return jt(m,gl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.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:lt({lineStyle:{color:"#bbb"}},$o.axisLine),axisLabel:vu($o.axisLabel,!1),axisTick:vu($o.axisTick,!1),splitLine:vu($o.splitLine,!0),splitArea:vu($o.splitArea,!0),indicator:[]},e}(bt),_G=mG,SG=["axisLine","axisTickLabel","axisName"],xG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes(),n=G(i,function(o){var s=o.model.get("showName")?o.name:"",l=new ha(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});C(n,function(o){C(SG,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=z(v)?v:[v],d=z(c)?c:[c],g=[],y=[];function m(R,E,N){var O=N%E.length;return R[O]=R[O]||[],O}if(n==="circle")for(var _=i[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new Wr({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var w=m(y,d,x);y[w].push(new ih({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,A=G(i,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(O){return a.coordToPoint(O.coord,E)})}),M=[],x=0;x<=T;x++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,f=n>0?u:1/u;ec(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(n),v=(n>0?1:-1)*(h>3?.4:h>1?.15:.05);ec(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!M1(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;ec(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(sr);function ec(r,e,t,a,i){r.pointerChecker&&r.pointerChecker(a,i.originX,i.originY)&&(oa(a.event),zM(r,e,t,a,i))}function zM(r,e,t,a,i){i.isAvailableBehavior=U($u,null,t,a),r.trigger(e,i)}function $u(r,e,t){var a=t[r];return!r||a&&(!$(a)||e.event[a+"Key"])}var bl=PG;function ty(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function ey(r,e,t,a){var i=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(a-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var RG={axisPointer:1,tooltip:1,brush:1};function Ah(r,e,t){var a=e.getComponentByElement(r.topTarget),i=a&&a.coordinateSystem;return a&&a!==t&&!RG.hasOwnProperty(a.mainType)&&i&&i.model!==t}function GM(r){if($(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var rc,Df={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},D1=mt(Df),Lf={"alignment-baseline":"textBaseline","stop-color":"stopColor"},L1=mt(Lf),EG=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=GM(e);this._defsUsePending=[];var i=new rt;this._root=i;var n=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Be(a,i,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;NG(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=Ch(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=HM(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=i;i=new rt,i.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new xt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:n}},r.prototype._parseNode=function(e,t,a,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var f=rc[s];if(f&&Y(rc,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var c=I1[s];if(c&&Y(I1,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new Es({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),kG(a,t);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){rc={g:function(e,t){var a=new rt;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new xt;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Wr;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new oe;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new fg;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),i;a&&(i=E1(a));var n=new ke({shape:{points:i||[]},silent:!0});return Ye(t,n),Be(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var a=e.getAttribute("points"),i;a&&(i=E1(a));var n=new Oe({shape:{points:i||[]},silent:!0});return Ye(t,n),Be(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var a=new ve;return Ye(t,a),Be(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new rt;return Ye(t,s),Be(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),i=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new rt;return Ye(t,s),Be(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",i=mT(a);return Ye(t,i),Be(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),I1={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new sl(e,t,a,i);return P1(r,n),R1(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new PT(e,t,a);return P1(r,i),R1(r,i),i}};function P1(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function R1(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};FM(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Ye(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Q(e.__inheritedStyle,r.__inheritedStyle))}function E1(r){for(var e=Ch(r),t=[],a=0;a0;n-=2){var o=a[n],s=a[n-1],l=Ch(o);switch(i=i||nr(),s){case"translate":zr(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Qd(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ln(i,i,-parseFloat(l[0])*ac);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ac);aa(i,[1,0,u,1,0,0],i);break;case"skewY":var f=Math.tan(parseFloat(l[0])*ac);aa(i,[1,f,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var O1=/([^\s:;]+)\s*:\s*([^:;]+)/g;function FM(r,e,t){var a=r.getAttribute("style");if(!!a){O1.lastIndex=0;for(var i;(i=O1.exec(a))!=null;){var n=i[1],o=Y(Df,n)?Df[n]:null;o&&(e[o]=i[2]);var s=Y(Lf,n)?Lf[n]:null;s&&(t[s]=i[2])}}}function GG(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=q(),a=q(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*n.scaleX+n.x,c[1]*n.scaleY+n.y]}function h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=i);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;_e(e,se(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(WM(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function G1(r,e,t,a,i,n){r.data?r.data.setItemGraphicEl(n,e):at(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:a&&a.option||{}}}function F1(r,e,t,a,i){r.data||co({el:e,componentModel:i,itemName:t,itemTooltipOption:a.get("tooltip")})}function H1(r,e,t,a,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return Yt(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&aE(e,i,t),o}function W1(r,e,t){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),C(r,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Ft),lF=sF;function uF(r,e){var t={};return C(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,S=te(b,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function pF(r,e){C(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var dF=function(){function r(){this.dimensions=UM}return r.prototype.create=function(e,t){var a=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Z1(l+s,l,V({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=X1,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),C(n,function(o,s){var l=G(o,function(f){return f.get("nameMap")}),u=new Z1(s,s,V({nameMap:$d(l)},i(o[0])));u.zoomLimit=ne.apply(null,G(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=X1,u.resize(o[0],t),C(o,function(f){f.coordinateSystem=u,pF(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,i){for(var n=(e||[]).slice(),o=q(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function TF(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){MF(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=DF(r,i,r.parentNode.hierNode.defaultAncestor||a[0],e)}function AF(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function K1(r){return arguments.length?r:PF}function ls(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function CF(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function MF(r){for(var e=r.children,t=e.length,a=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function DF(r,e,t,a){if(e){for(var i=r,n=r,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=ic(s),n=nc(n),s&&n;){i=ic(i),o=nc(o),i.hierNode.ancestor=r;var v=s.hierNode.prelim+h-n.hierNode.prelim-u+a(s,n);v>0&&(IF(LF(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,f+=o.hierNode.modifier}s&&!ic(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),n&&!nc(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-f,t=r)}return t}function ic(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function nc(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function LF(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function IF(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function PF(r,e){return r.parentNode===e.parentNode?1:2}var RF=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),EF=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new RF},e.prototype.buildPath=function(t,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,v=H(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),A=T.get("rotate"),M=A*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:A==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?Ku(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(at(t).focus=I),OF(i,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===ol||sf(t.__edge,P)}})}function OF(r,e,t,a,i,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new nh({shape:ud(f,h,v,i,i)})),Tt(d,{shape:ud(f,h,v,n,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,i=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,i=r.targetNode;if($(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function jM(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function oy(r,e){var t=jM(r);return vt(t,e)>=0}function Mh(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var YF=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},i=t.leaves||{},n=new Nt(i,this,this.ecModel),o=ny.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=n),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ae("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Mh(i,this),a.collapsed=!i.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Ft),ZF=YF;function XF(r,e,t){for(var a=[r],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function qF(r,e){r.eachSeriesByType("tree",function(t){KF(t,e)})}function KF(r,e){var t=CF(r,e);r.layoutInfo=t;var a=r.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=K1(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(i=t.width,n=t.height,o=K1());var s=r.getData().tree.root,l=s.children[0];if(l){wF(s),XF(l,TF,o),s.hierNode.modifier=-l.hierNode.prelim,Yo(l,AF);var u=l,f=l,h=l;Yo(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=i/(f.getLayout().x+v+c),d=n/(h.depth-1||1),Yo(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=ls(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=n/(f.getLayout().x+v+c),p=i/(h.depth-1||1),Yo(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=i/(f.getLayout().x+v+c),d=n/(h.depth-1||1),Yo(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:n-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function QF(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");V(s,o)})})}function jF(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=e.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=ay(n,e,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function JF(r){r.registerChartView(NF),r.registerSeriesModel(ZF),r.registerLayout(qF),r.registerVisual(QF),jF(r)}var eS=["treemapZoomToNode","treemapRender","treemapMove"];function t3(r){for(var e=0;e1;)n=n.parentNode;var o=Vp(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var e3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};tD(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Nt({itemStyle:o},this,a);n=t.levels=r3(n,a);var l=G(n||[],function(h){return new Nt(h,s,a)},this),u=ny.createTree(i,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return ae("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Mh(i,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},V(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=q(),this._idIndexMapCount=0);var i=a.get(t);return i==null&&a.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){JM(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Ft);function tD(r){var e=0;C(r.children,function(a){tD(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function r3(r,e){var t=Et(e.get("color")),a=Et(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var i,n;C(r,function(s){var l=new Nt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!n&&a&&(o.decal=a.slice()),r}}var a3=e3,i3=8,rS=8,oc=5,n3=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,a,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,u,l),this._renderContent(e,u,s,l,i),ph(o,u.pos,u.box)}},r.prototype._prepare=function(e,t,a){for(var i=e;i;i=i.parentNode){var n=Jt(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+i3*2,t.emptyItemWidth);t.totalWidth+=s+rS,t.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(e,t,a,i,n){for(var o=0,s=t.emptyItemWidth,l=e.get(["breadcrumb","height"]),u=dk(t.pos,t.box),f=t.totalWidth,h=t.renderList,v=h.length-1;v>=0;v--){var c=h[v],p=c.node,d=c.width,g=c.text;f>u.width&&(f-=d-s,d=s,g=null);var y=new ke({shape:{points:o3(o,0,d,l,v===h.length-1,v===0)},style:Q(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ct({style:{text:g,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:ho*1e4,onclick:it(n,p)});y.disableLabelAnimation=!0,this.group.add(y),s3(y,e,p),o+=d+rS}},r.prototype.remove=function(){this.group.removeAll()},r}();function o3(r,e,t,a,i,n){var o=[[i?r:r-oc,e],[r+t,e],[r+t,e+a],[i?r:r-oc,e+a]];return!n&&o.splice(2,0,[r+t+oc,e+a/2]),!i&&o.push([r,e+a/2]),o}function s3(r,e,t){at(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Mh(t,e)}}var l3=n3,u3=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;iiS||Math.abs(t.dy)>iS)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var a=t.originX,i=t.originY;if(this._state!=="animating"){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var s=new ft(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;a-=l.x,i-=l.y;var u=nr();zr(u,u,[-a,-i]),Qd(u,u,[t.scale,t.scale]),zr(u,u,[a,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(!!n){var o=a.findTarget(i.offsetX,i.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&cf(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new l3(this.group))).render(t,a,i.node,function(o){n._state!=="animating"&&(oy(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Zo(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(Bt);function Zo(){return{nodeGroup:[],background:[],content:[]}}function d3(r,e,t,a,i,n,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),A=v.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=ht("nodeGroup",fd);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),If(D).nodeWidth=c,If(D).nodeHeight=p,f.isAboveViewRoot)return D;var L=ht("background",aS,u,v3);L&&B(D,L,b&&f.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Os(D)&&Gi(D,!1),L&&(Gi(L,!E),h.setItemGraphicEl(o.dataIndex,L),Ip(L,N,R));else{var O=ht("content",aS,u,c3);O&&F(D,O),L.disableMorphing=!0,L&&Os(L)&&Gi(L,!1),Gi(D,!E),h.setItemGraphicEl(o.dataIndex,D),Ip(D,N,R)}return D;function B(dt,et,yt){var ut=at(et);if(ut.dataIndex=o.dataIndex,ut.seriesIndex=r.seriesIndex,et.setShape({x:0,y:0,width:c,height:p,r:M}),g)W(et);else{et.invisible=!1;var X=o.getVisual("style"),ot=X.stroke,Vt=sS(x);Vt.fill=ot;var St=Ii(w);St.fill=w.get("borderColor");var $t=Ii(T);$t.fill=T.get("borderColor");var Ht=Ii(A);if(Ht.fill=A.get("borderColor"),yt){var ce=c-2*d;Z(et,ot,X.opacity,{x:d,y:0,width:ce,height:S})}else et.removeTextContent();et.setStyle(Vt),et.ensureState("emphasis").style=St,et.ensureState("blur").style=$t,et.ensureState("select").style=Ht,rn(et)}dt.add(et)}function F(dt,et){var yt=at(et);yt.dataIndex=o.dataIndex,yt.seriesIndex=r.seriesIndex;var ut=Math.max(c-2*d,0),X=Math.max(p-2*d,0);if(et.culling=!0,et.setShape({x:d,y:d,width:ut,height:X,r:M}),g)W(et);else{et.invisible=!1;var ot=o.getVisual("style"),Vt=ot.fill,St=sS(x);St.fill=Vt,St.decal=ot.decal;var $t=Ii(w),Ht=Ii(T),ce=Ii(A);Z(et,Vt,ot.opacity,null),et.setStyle(St),et.ensureState("emphasis").style=$t,et.ensureState("blur").style=Ht,et.ensureState("select").style=ce,rn(et)}dt.add(et)}function W(dt){!dt.invisible&&n.push(dt)}function Z(dt,et,yt,ut){var X=v.getModel(ut?oS:nS),ot=Jt(v.get("name"),null),Vt=X.getShallow("show");_e(dt,se(v,ut?oS:nS),{defaultText:Vt?ot:null,inheritColor:et,defaultOpacity:yt,labelFetcher:r,labelDataIndex:o.dataIndex});var St=dt.getTextContent();if(!!St){var $t=St.style,Ht=Yd($t.padding||0);ut&&(dt.setTextConfig({layoutRect:ut}),St.disableLabelLayout=!0),St.beforeUpdate=function(){var Yr=Math.max((ut?ut.width:dt.shape.width)-Ht[1]-Ht[3],0),Me=Math.max((ut?ut.height:dt.shape.height)-Ht[0]-Ht[2],0);($t.width!==Yr||$t.height!==Me)&&St.setStyle({width:Yr,height:Me})},$t.truncateMinChar=2,$t.lineOverflow="truncate",tt($t,ut,f);var ce=St.getState("emphasis");tt(ce?ce.style:null,ut,f)}}function tt(dt,et,yt){var ut=dt?dt.text:null;if(!et&&yt.isLeafRoot&&ut!=null){var X=r.get("drillDownIcon",!0);dt.text=X?X+" "+ut:ut}}function ht(dt,et,yt,ut){var X=m!=null&&t[dt][m],ot=i[dt];return X?(t[dt][m]=null,It(ot,X)):g||(X=new et,X instanceof or&&(X.z2=g3(yt,ut)),Dt(ot,X)),e[dt][y]=X}function It(dt,et){var yt=dt[y]={};et instanceof fd?(yt.oldX=et.x,yt.oldY=et.y):yt.oldShape=V({},et.shape)}function Dt(dt,et){var yt=dt[y]={},ut=o.parentNode,X=et instanceof rt;if(ut&&(!a||a.direction==="drillDown")){var ot=0,Vt=0,St=i.background[ut.getRawIndex()];!a&&St&&St.oldShape&&(ot=St.oldShape.width,Vt=St.oldShape.height),X?(yt.oldX=0,yt.oldY=Vt):yt.oldShape={x:ot,y:Vt,width:0,height:0}}yt.fadein=!X}}function g3(r,e){return r*h3+e}var y3=p3,qs=C,m3=j,Pf=-1,sy=function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=J(e);this.type=a,this.mappingMethod=t,this._normalizeData=x3[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(sc(i),_3(i)):t==="category"?i.categories?S3(i):sc(i,!0):(Ae(t!=="linear"||i.dataExtent),sc(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return U(this._normalizeData,this)},r.listVisualTypes=function(){return mt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){j(e)?C(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=z(e)?[]:j(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},a;return e&&qs(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(m3(e)){var t=[];qs(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function sc(r,e){var t=r.visual,a=[];j(t)?qs(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),eD(r,a)}function pu(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:hd([0,1])}}function lS(r){var e=this.option.visual;return e[Math.round(Pt(r,[0,1],[0,e.length-1],!0))]||{}}function Xo(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function us(r){var e=this.option.visual;return e[this.option.loop&&r!==Pf?r%e.length:r]}function Pi(){return this.option.visual[0]}function hd(r){return{linear:function(e){return Pt(e,r,this.option.visual,!0)},category:us,piecewise:function(e,t){var a=vd.call(this,t);return a==null&&(a=Pt(e,r,this.option.visual,!0)),a},fixed:Pi}}function vd(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=sy.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function eD(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=Ge(t);return a||[0,0,0,1]})),e}var x3={linear:function(r){return Pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=sy.findPieceIndex(r,e,!0);if(t!=null)return Pt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Pf:e},fixed:Kt};function du(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=M3(i,l,d,g,p,a);aD(d,y,t,a)}})}}}function T3(r,e,t){var a=V({},e),i=t.designatedVisualItemStyle;return C(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function uS(r){var e=lc(r,"color");if(e){var t=lc(r,"colorAlpha"),a=lc(r,"colorSaturation");return a&&(e=cs(e,null,null,a)),t&&(e=Ju(e,t)),e}}function A3(r,e){return e!=null?cs(e,null,null,r):null}function lc(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function C3(r,e,t,a,i,n){if(!(!n||!n.length)){var o=uc(e,"color")||i.color!=null&&i.color!=="none"&&(uc(e,"colorAlpha")||uc(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new fe(h);return rD(v).drColorMappingBy=f,v}}}function uc(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function M3(r,e,t,a,i,n){var o=V({},e);if(i){var s=i.type,l=s==="color"&&rD(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ks=Math.max,Rf=Math.min,fS=ne,ly=C,iD=["itemStyle","borderWidth"],D3=["itemStyle","gapWidth"],L3=["upperLabel","show"],I3=["upperLabel","height"],P3={seriesType:"treemap",reset:function(r,e,t,a){var i=t.getWidth(),n=t.getHeight(),o=r.option,s=te(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=H(fS(s.width,l[0]),i),f=H(fS(s.height,l[1]),n),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=Xs(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=jM(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?B3(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),nD(d,_,!1,0),S=d.getLayout(),ly(g,function(x,w){var T=(g[w+1]||d).getValue();x.setLayout(V({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var b=r.getData().tree.root;b.setLayout(V3(s,p,c),!0),r.setLayoutInfo(s),oD(b,new ft(-s.x,-s.y,i,n),g,d,0)}};function nD(r,e,t,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(iD),u=s.get(D3)/2,f=sD(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),i=Ks(i-2*v,0),n=Ks(n-v-c,0);var p=i*n,d=R3(r,s,p,e,t,a);if(!!d.length){var g={x:v,y:c,width:i,height:n},y=Rf(i,n),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function N3(r,e,t){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;na&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Ks(u*a/l,l/(u*i)):1/0}function hS(r,e,t,a,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],f=e?r.area/e:0;(i||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,v=r.length;hbm&&(u=bm),n=s}ua&&(a=e);var n=a%2?a+2:a+3;i=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":n.x=-v[0]*y+f[0],n.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=y*w+f[0],n.y=f[1]+A,p=S[0]<0?"right":"left",n.originX=-y*w,n.originY=-A;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=x[0],n.y=x[1]+A,p="center",n.originY=-A;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*w+h[0],n.y=h[1]+A,p=S[0]>=0?"right":"left",n.originX=y*w,n.originY=-A;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}},e}(rt),fy=aH,iH=function(){function r(e){this.group=new rt,this._LineCtor=e||fy}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=e,n||i.removeAll();var o=gS(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=gS(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!nH(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function gS(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:se(e)}}function yS(r){return isNaN(r[0])||isNaN(r[1])}function pc(r){return r&&!yS(r[0])&&!yS(r[1])}var hy=iH,dc=[],gc=[],yc=[],Ln=ie,mc=$i,mS=Math.abs;function _S(r,e,t){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){dc[0]=Ln(a[0],i[0],n[0],f),dc[1]=Ln(a[1],i[1],n[1],f);var h=mS(mc(dc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function _c(r,e){var t=[],a=Is,i=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ea(u[0]),ea(u[1])],u[2]&&u.__original.push(ea(u[2])));var v=u.__original;if(u[2]!=null){if(xe(i[0],v[0]),xe(i[1],v[2]),xe(i[2],v[1]),f&&f!=="none"){var c=hs(s.node1),p=_S(i,v[0],c*e);a(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],a(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(h&&h!=="none"){var c=hs(s.node2),p=_S(i,v[1],c*e);a(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],a(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}xe(u[0],i[0]),xe(u[1],i[2]),xe(u[2],i[1])}else{if(xe(n[0],v[0]),xe(n[1],v[1]),Vi(o,n[1],n[0]),rl(o,o),f&&f!=="none"){var c=hs(s.node1);rp(n[0],n[0],o,c*e)}if(h&&h!=="none"){var c=hs(s.node2);rp(n[1],n[1],o,-c*e)}xe(u[0],n[0]),xe(u[1],n[1])}})}function SS(r){return r.type==="view"}var oH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var i=new ml,n=new hy,o=this.group;this._controller=new bl(a.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,a,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(SS(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Tt(u,f,t)}_c(t.getGraph(),fs(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),h.graph.eachNode(function(m){var _=m.dataIndex,S=m.getGraphicEl(),b=m.getModel();if(!!S){S.off("drag").off("dragend");var x=b.get("draggable");x&&S.on("drag",function(){c&&(c.warmUp(),!n._layouting&&n._startForceLayoutIteration(c,p),c.setFixed(_),h.setItemLayout(_,[S.x,S.y]))}).on("dragend",function(){c&&c.setUnfixed(_)}),S.setDraggable(x&&!!c,!!b.get("cursor"));var w=b.get(["emphasis","focus"]);w==="adjacency"&&(at(S).focus=m.getAdjacentDataIndices())}}),h.graph.eachEdge(function(m){var _=m.getGraphicEl(),S=m.getModel().get(["emphasis","focus"]);!_||S==="adjacency"&&(at(_).focus={edge:[m.dataIndex],node:[m.node1.dataIndex,m.node2.dataIndex]})});var d=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),y=h.getLayout("cy");h.eachItemGraphicEl(function(m,_){var S=h.getItemModel(_),b=S.get(["label","rotate"])||0,x=m.getSymbolPath();if(d){var w=h.getItemLayout(_),T=Math.atan2(w[1]-y,w[0]-g);T<0&&(T=Math.PI*2+T);var A=w[0]=0&&e.call(t,a[n],n)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,i=a.length,n=0;n=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&e.call(t,a[n],n)},r.prototype.breadthFirstTraverse=function(e,t,a,i){if(t instanceof Ri||(t=this._nodesMap[In(t)]),!!t){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}jt(Ri,dD("hostGraph","data"));jt(pD,dD("hostGraph","edgeData"));var uH=lH;function gD(r,e,t,a,i){for(var n=new uH(a),o=0;o "+v)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar")p=pa(r,t);else{var d=hl.get(c),g=d?d.dimensions||[]:[];vt(g,"value")<0&&g.concat(["value"]);var y=pl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Te(y,t),p.initData(r)}var m=new Te(["value"],t);return m.initData(l,s),i&&i(p,m),KM({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var fH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new xl(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ji(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){U3(this);var s=gD(n,i,this,!0,l);return C(s.edges,function(u){Y3(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=Nt.prototype.getModel;function v(p,d){var g=h.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=v,p});function c(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ae("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=VA({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(i){return i.value!=null?i:V({value:0},i)}),a=new Te(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ft),hH=fH,vH={type:"graphRoam",event:"graphRoam",update:"none"};function cH(r){r.registerChartView(sH),r.registerSeriesModel(hH),r.registerProcessor(G3),r.registerVisual(F3),r.registerVisual(H3),r.registerLayout(Z3),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,q3),r.registerLayout(Q3),r.registerCoordinateSystem("graphView",{dimensions:wl.dimensions,create:J3}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Kt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Kt),r.registerAction(vH,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=ay(n,e,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var pH=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),dH=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new pH},e.prototype.buildPath=function(t,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),f=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(a.x+i(l)*s,a.y+n(l)*s),t.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),t.lineTo(a.x-i(l)*s,a.y-n(l)*s),t.lineTo(u,f)},e}(gt),gH=dH;function yH(r,e){var t=r.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(t[0],e.getWidth()),s=H(t[1],e.getHeight()),l=H(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function yu(r,e){var t=r==null?"":r+"";return e&&($(e)?t=e.replace("{value}",t):K(e)&&(t=e(r))),t}var mH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=yH(t,i);this._renderMain(t,a,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),v=h.get("roundCap"),c=v?Mf:Ee,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];Xw(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=0;p&&S=T&&(A===0?0:n[A-1][0]).8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var W=0;W<=b;W++){P=Math.cos(T),R=Math.sin(T);var Z=new oe({shape:{x1:P*(p-N)+v,y1:R*(p-N)+c,x2:P*(p-w-N)+v,y2:R*(p-w-N)+c},silent:!0,style:L});L.stroke==="auto"&&Z.setStyle({stroke:n((E+W/b)/S)}),h.add(Z),T+=M}T-=M}else T+=A}},e.prototype._renderPointer=function(t,a,i,n,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(M,D){var L=m.getItemModel(M),I=L.getModel("pointer"),P=H(I.get("width"),o.r),R=H(I.get("length"),o.r),E=t.get(["pointer","icon"]),N=I.get("offsetCenter"),O=H(N[0],o.r),B=H(N[1],o.r),F=I.get("keepAspect"),W;return E?W=Qt(E,O-P/2,B-R,P,R,null,F):W=new gH({shape:{angle:-Math.PI/2,width:P,r:R,x:O,y:B}}),W.rotation=-(D+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function A(M,D){var L=g.get("roundCap"),I=L?Mf:Ee,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(M+1)*R,N=P?o.r:o.r-M*R,O=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(O.z2=b-m.get(_,M)%b),O}(y||d)&&(m.diff(v).add(function(M){var D=m.get(_,M);if(d){var L=T(M,s);zt(L,{rotation:-((isNaN(+D)?w[0]:Pt(D,x,w,!0))+Math.PI/2)},t),h.add(L),m.setItemGraphicEl(M,L)}if(y){var I=A(M,s),P=g.get("clip");zt(I,{shape:{endAngle:Pt(D,x,w,P)}},t),h.add(I),Mp(t.seriesIndex,m.dataType,M,I),p[M]=I}}).update(function(M,D){var L=m.get(_,M);if(d){var I=v.getItemGraphicEl(D),P=I?I.rotation:s,R=T(M,P);R.rotation=P,Tt(R,{rotation:-((isNaN(+L)?w[0]:Pt(L,x,w,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(M,R)}if(y){var E=c[D],N=E?E.shape.endAngle:s,O=A(M,N),B=g.get("clip");Tt(O,{shape:{endAngle:Pt(L,x,w,B)}},t),h.add(O),Mp(t.seriesIndex,m.dataType,M,O),p[M]=O}}).execute(),m.each(function(M){var D=m.getItemModel(M),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(d){var E=m.getItemGraphicEl(M),N=m.getItemVisual(M,"style"),O=N.fill;if(E instanceof ve){var B=E.style;E.useStyle(V({image:B.image,x:B.x,y:B.y,width:B.width,height:B.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(O);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",n(Pt(m.get(_,M),x,[0,1],!0))),E.z2EmphasisLift=0,he(E,D),Yt(E,I,P,R)}if(y){var F=p[M];F.useStyle(m.getItemVisual(M,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,he(F,D),Yt(F,I,P,R)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),f=Qt(s,a.cx-o/2+H(l[0],a.r),a.cy-o/2+H(l[1],a.r),o,o,null,u);f.z2=i.get("showAbove")?1:0,f.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),v=new rt,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Ct({silent:!0}),p[y]=new Ct({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new rt,b=n(Pt(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+H(w[0],o.r),A=o.cy+H(w[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Gt(x,{x:T,y:A,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+H(L[0],o.r),P=o.cy+H(L[1],o.r),R=H(D.get("width"),o.r),E=H(D.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=p[y],O=D.get("formatter");M.attr({z2:g?0:2,style:Gt(D,{x:I,y:P,text:yu(_,O),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),GT(M,{normal:D},_,function(F){return yu(F,O)}),d&&FT(M,y,l,t,{getFormattedLabel:function(F,W,Z,tt,ht,It){return yu(It?It.interpolatedValue:_,O)}}),S.add(M)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Bt),_H=mH,SH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return To(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Ft),xH=SH;function bH(r){r.registerChartView(_H),r.registerSeriesModel(xH)}var wH=["itemStyle","opacity"],TH=function(r){k(e,r);function e(t,a){var i=r.call(this)||this,n=i,o=new Oe,s=new Ct;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,a,!0),i}return e.prototype.updateData=function(t,a,i){var n=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(wH);f=f==null?1:f,i||Sr(n),n.useStyle(t.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,zt(n,{style:{opacity:f}},o,a)):Tt(n,{style:{opacity:f},shape:{points:l.points}},o,a),he(n,s),this._updateLabel(t,a),Yt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,h=t.getItemVisual(a,"style"),v=h.fill;_e(o,se(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),i.setTextConfig({local:!0,inside:!!f.inside,insideStroke:v,outsideFill:v});var c=f.linePoints;n.setShape({points:c}),i.textGuideLineConfig={anchor:c?new st(c[0][0],c[0][1]):null},Tt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),Ug(i,Yg(l),{stroke:v})},e}(ke),AH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new TH(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,l),s.add(f),n.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Ns(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Bt),CH=AH,MH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new xl(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return To(this,{coordDimensions:["value"],encodeDefaulter:it(xg,this)})},e.prototype._defaultLabelLine=function(t){Ji(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Ft),DH=MH;function LH(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function IH(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=r.count();oqH)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!xc(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function xc(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var jH=KH,JH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&<(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var i=t.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){C(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],i=Rt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);C(i,function(n){t.push("dim"+n.get("dim")),a.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(bt),t4=JH,e4=function(r){k(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(br),r4=e4;function cn(r,e,t,a,i,n){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=Pn(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Pn(s,[0,o]),i=n=Pn(s,[i,n]),a=0}e[0]=Pn(e[0],t),e[1]=Pn(e[1],t);var l=bc(e,a);e[a]+=r;var u=i||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Pn(e[a],f);var h;return h=bc(e,a),i!=null&&(h.sign!==l.sign||h.spann&&(e[1-a]=e[a]+h.sign*n),e}function bc(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Pn(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var wc=C,mD=Math.min,_D=Math.max,wS=Math.floor,a4=Math.ceil,TS=Ut,i4=Math.PI,n4=function(){function r(e,t,a){this.type="parallel",this._axesMap=q(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=e.dimensions,n=e.parallelAxisIndex;wc(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new r4(o,bh(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=a&&o<=a+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(!!e.contains(a,t)){var i=a.getData();wc(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),ro(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=te(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,f=mu(e.get("axisExpandWidth"),l),h=mu(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=mu(c[1]-c[0],l),c[1]=c[0]+p;else{p=mu(f*(h-1),l);var d=e.get("axisExpandCenter")||wS(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[wS(TS(c[0]/f,1))+1,a4(TS(c[1]/f,1))-1],m=g/f*c[0];return{layout:n,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[i[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),wc(a,function(o,s){var l=(i.axisExpandable?s4:o4)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},f={horizontal:i4/2,vertical:0},h=[u[n].x+e.x,u[n].y+e.y],v=f[n],c=nr();ln(c,c,v),zr(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,i){a==null&&(a=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];C(o,function(g){s.push(e.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fn*(1-h[0])?(u="jump",l=s-n*(1-h[2])):(l=s-n*h[1])>=0&&(l=s-n*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?cn(l,i,o,"all"):u="none";else{var c=i[1]-i[0],p=o[1]*s/c;i=[_D(0,p-c/2)],i[1]=mD(o[1],i[0]+c),i[0]=i[1]-c}return{axisExpandWindow:i,behavior:u}},r}();function mu(r,e){return mD(_D(r,e[0]),e[1])}function o4(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function s4(r,e){var t=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,f;return r=0;i--)ar(a[i])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var i=a[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=a.length;np4}function CD(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function MD(r,e,t,a){var i=new rt;return i.add(new xt({name:"main",style:dy(t),silent:!0,draggable:!0,cursor:"move",drift:it(DS,r,e,i,["n","s","w","e"]),ondragend:it(on,e,{isEnd:!0})})),C(a,function(n){i.add(new xt({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:it(DS,r,e,i,n),ondragend:it(on,e,{isEnd:!0})}))}),i}function DD(r,e,t,a){var i=a.brushStyle.lineWidth||0,n=no(i,d4),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,f=t[0][1],h=t[1][1],v=f-n+i/2,c=h-n+i/2,p=f-o,d=h-s,g=p+i,y=d+i;qr(r,e,"main",o,s,p,d),a.transformable&&(qr(r,e,"w",l,u,n,y),qr(r,e,"e",v,u,n,y),qr(r,e,"n",l,u,g,n),qr(r,e,"s",l,c,g,n),qr(r,e,"nw",l,u,n,n),qr(r,e,"ne",v,u,n,n),qr(r,e,"sw",l,c,n,n),qr(r,e,"se",v,c,n,n))}function yd(r,e){var t=e.__brushOption,a=t.transformable,i=e.childAt(0);i.useStyle(dy(t)),i.attr({silent:!a,cursor:a?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var o=e.childOfName(n.join("")),s=n.length===1?md(r,n[0]):b4(r,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?y4[s]+"-resize":null})})}function qr(r,e,t,a,i,n,o){var s=e.childOfName(t);s&&s.setShape(T4(gy(r,e,[[a,i],[a+n,i+o]])))}function dy(r){return Q({strokeNoScale:!0},r.brushStyle)}function LD(r,e,t,a){var i=[js(r,t),js(e,a)],n=[no(r,t),no(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function x4(r){return Xi(r.group)}function md(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=sh(t[e],x4(r));return a[i]}function b4(r,e){var t=[md(r,e[0]),md(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function DS(r,e,t,a,i,n){var o=t.__brushOption,s=r.toRectRange(o.range),l=ID(e,i,n);C(a,function(u){var f=g4[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(LD(s[0][0],s[1][0],s[0][1],s[1][1])),vy(e,t),on(e,{isEnd:!1})}function w4(r,e,t,a){var i=e.__brushOption.range,n=ID(r,t,a);C(i,function(o){o[0]+=n[0],o[1]+=n[1]}),vy(r,e),on(r,{isEnd:!1})}function ID(r,e,t){var a=r.group,i=a.transformCoordToLocal(e,t),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function gy(r,e,t){var a=AD(r,e);return a&&a!==nn?a.clipPath(t,r._transform):J(t)}function T4(r){var e=js(r[0][0],r[1][0]),t=js(r[0][1],r[1][1]),a=no(r[0][0],r[1][0]),i=no(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:i-t}}function A4(r,e,t){if(!(!r._brushType||M4(r,e.offsetX,e.offsetY))){var a=r._zr,i=r._covers,n=py(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var Lh={lineX:PS(0),lineY:PS(1),rect:{createCover:function(r,e){function t(a){return a}return MD({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=CD(r);return LD(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){DD(r,e,t,a)},updateCommon:yd,contain:Sd},polygon:{createCover:function(r,e){var t=new rt;return t.add(new Oe({name:"main",style:dy(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new ke({name:"main",draggable:!0,drift:it(w4,r,e),ondragend:it(on,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:gy(r,e,t)})},updateCommon:yd,contain:Sd}};function PS(r){return{createCover:function(e,t){return MD({toRectRange:function(a){var i=[a,[0,100]];return r&&i.reverse(),i},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=CD(e),a=js(t[0][r],t[1][r]),i=no(t[0][r],t[1][r]);return[a,i]},updateCoverShape:function(e,t,a,i){var n,o=AD(e,t);if(o!==nn&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(r);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,n];r&&l.reverse(),DD(e,t,l,i)},updateCommon:yd,contain:Sd}}var yy=_4;function RD(r){return r=my(r),function(e){return NT(e,r)}}function ED(r,e){return r=my(r),function(t){var a=e!=null?e:t,i=a?r.width:r.height,n=a?r.x:r.y;return[n,n+(i||0)]}}function kD(r,e,t){var a=my(r);return function(i,n){return a.contain(n[0],n[1])&&!Ah(i,e,t)}}function my(r){return ft.create(r)}var D4=["axisLine","axisTickLabel","axisName"],L4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new yy(a.getZr())).on("brush",U(this._onBrush,this))},e.prototype.render=function(t,a,i,n){if(!I4(t,a,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new rt,this.group.add(this._axisGroup),!!t.get("show")){var s=R4(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,v=l.getAxisLayout(h),c=V({strokeContainThreshold:f},v),p=new ha(t,c);C(D4,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(c,u,t,s,f,i),ll(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,i,n,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ft.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:RD(h),isTargetByCursor:kD(h,s,n),getLinearBrushOtherExtent:ED(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(P4(i))},e.prototype._onBrush=function(t){var a=t.areas,i=this.axisModel,n=i.axis,o=G(a,function(s){return[n.coordToData(s.range[0],!0),n.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Wt);function I4(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function P4(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function R4(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var E4=L4,k4={type:"axisAreaSelect",event:"axisAreaSelected"};function O4(r){r.registerAction(k4,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var N4={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function OD(r){r.registerComponentView(jH),r.registerComponentModel(t4),r.registerCoordinateSystem("parallel",h4),r.registerPreprocessor(YH),r.registerComponentModel(AS),r.registerComponentView(E4),io(r,"parallel",AS,N4),O4(r)}function B4(r){pt(OD),r.registerChartView(VH),r.registerSeriesModel(HH),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,UH)}var V4=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),z4=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new V4},e.prototype.buildPath=function(t,a){var i=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+i,a.y2),t.bezierCurveTo(a.cpx2+i,a.cpy2,a.cpx1+i,a.cpy1,a.x1+i,a.y1)):(t.lineTo(a.x2,a.y2+i),t.bezierCurveTo(a.cpx2,a.cpy2+i,a.cpx1,a.cpy1+i,a.x1,a.y1+i)),t.closePath()},e.prototype.highlight=function(){la(this)},e.prototype.downplay=function(){ua(this)},e}(gt),G4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,i){var n=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,h=t.getData(),v=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new z4,g=at(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),b=p.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),A=p.node2.getModel(),M=A.get("localX"),D=A.get("localY"),L=p.getLayout(),I,P,R,E,N,O,B,F;switch(d.shape.extent=Math.max(1,L.dy),d.shape.orient=c,c==="vertical"?(I=(x!=null?x*u:S.x)+L.sy,P=(w!=null?w*f:S.y)+S.dy,R=(M!=null?M*u:T.x)+L.ty,E=D!=null?D*f:T.y,N=I,O=P*(1-_)+E*_,B=R,F=P*_+E*(1-_)):(I=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+L.sy,R=M!=null?M*u:T.x,E=(D!=null?D*f:T.y)+L.ty,N=I*(1-_)+R*_,O=P,B=I*_+R*(1-_),F=E),d.setShape({x1:I,y1:P,x2:R,y2:E,cpx1:N,cpy1:O,cpx2:B,cpy2:F}),d.useStyle(m.getItemStyle()),d.style.fill){case"source":d.style.fill=p.node1.getVisual("color"),d.style.decal=p.node1.getVisual("style").decal;break;case"target":d.style.fill=p.node2.getVisual("color"),d.style.decal=p.node2.getVisual("style").decal;break;case"gradient":var W=p.node1.getVisual("color"),Z=p.node2.getVisual("color");$(W)&&$(Z)&&(d.style.fill=new sl(0,0,+(c==="horizontal"),+(c==="vertical"),[{color:W,offset:0},{color:Z,offset:1}]))}var tt=y.getModel("emphasis");he(d,y,"lineStyle",function(It){return It.getItemStyle()}),s.add(d),v.setItemGraphicEl(p.dataIndex,d);var ht=tt.get("focus");Yt(d,ht==="adjacency"?p.getAdjacentDataIndices():ht,tt.get("blurScope"),tt.get("disabled")),at(d).dataType="edge"}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=new xt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy},style:g.getModel("itemStyle").getItemStyle(),z2:10});_e(S,se(g),{labelFetcher:t,labelDataIndex:p.dataIndex,defaultText:p.id}),S.disableLabelAnimation=!0,S.setStyle("fill",p.getVisual("color")),S.setStyle("decal",p.getVisual("style").decal),he(S,g),s.add(S),h.setItemGraphicEl(p.dataIndex,S),at(S).dataType="node";var b=_.get("focus");Yt(S,b==="adjacency"?p.getAdjacentDataIndices():b,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,d){var g=h.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){n._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){n._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(F4(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Bt);function F4(r,e,t){var a=new xt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return zt(a,{shape:{width:r.width+20}},e,t),a}var H4=G4,W4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Nt(o[l],this,a));if(n&&i){var u=gD(n,i,this,!0,f);return u.data}function f(h,v){h.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(c.parentModel=m)}return c}),v.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(c.parentModel=_)}return c})}},e.prototype.setNodePosition=function(t,a){var i=this.option.data||this.option.nodes,n=i[t];n.localX=a[0],n.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,i){function n(c){return isNaN(c)||c==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ae("nameValue",{name:u,value:l,noValue:n(l)})}else{var f=this.getGraph().getNodeByIndex(t),h=f.getLayout().value,v=this.getDataParams(t,i).data.name;return ae("nameValue",{name:v!=null?v+"":null,value:h,noValue:n(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var i=r.prototype.getDataParams.call(this,t,a);if(i.value==null&&a==="node"){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Ft),$4=W4;function U4(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),i=t.get("nodeGap"),n=Y4(t,e);t.layoutInfo=n;var o=n.width,s=n.height,l=t.getGraph(),u=l.nodes,f=l.edges;X4(u);var h=Rt(u,function(d){return d.getLayout().value===0}),v=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),p=t.get("nodeAlign");Z4(u,f,a,i,o,s,v,c,p)})}function Y4(r,e){return te(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Z4(r,e,t,a,i,n,o,s,l){q4(r,e,t,i,n,s,l),J4(r,e,n,i,a,o,s),lW(r,s)}function X4(r){C(r,function(e){var t=Wa(e.outEdges,Ef),a=Wa(e.inEdges,Ef),i=e.getValue()||0,n=Math.max(t,a,i);e.setLayout({value:n},!0)})}function q4(r,e,t,a,i,n,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v=0;y&&g.depth>c&&(c=g.depth),d.setLayout({depth:y?g.depth:h},!0),n==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mh-1?c:h-1;o&&o!=="left"&&K4(r,o,n,w);var T=n==="vertical"?(i-t)/w:(a-t)/w;j4(r,T,n)}function ND(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function K4(r,e,t,a){if(e==="right"){for(var i=[],n=r,o=0;n.length;){for(var s=0;s0;n--)l*=.99,rW(s,l,o),Tc(s,i,t,a,o),sW(s,l,o),Tc(s,i,t,a,o)}function tW(r,e){var t=[],a=e==="vertical"?"y":"x",i=wp(r,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),C(i.keys,function(n){t.push(i.buckets.get(n))}),t}function eW(r,e,t,a,i,n){var o=1/0;C(r,function(s){var l=s.length,u=0;C(s,function(h){u+=h.getLayout().value});var f=n==="vertical"?(a-(l-1)*i)/u:(t-(l-1)*i)/u;f0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[n]+l.getLayout()[v]+e;var p=i==="vertical"?a:t;if(u=f-e-p,u>0){s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[n]+l.getLayout()[v]+e-f,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[n]}})}function rW(r,e,t){C(r.slice().reverse(),function(a){C(a,function(i){if(i.outEdges.length){var n=Wa(i.outEdges,aW,t)/Wa(i.outEdges,Ef);if(isNaN(n)){var o=i.outEdges.length;n=o?Wa(i.outEdges,iW,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(n-Qa(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Qa(i,t))*e;i.setLayout({y:l},!0)}}})})}function aW(r,e){return Qa(r.node2,e)*r.getValue()}function iW(r,e){return Qa(r.node2,e)}function nW(r,e){return Qa(r.node1,e)*r.getValue()}function oW(r,e){return Qa(r.node1,e)}function Qa(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ef(r){return r.getValue()}function Wa(r,e,t){for(var a=0,i=r.length,n=-1;++nn&&(n=s)}),C(a,function(o){var s=new fe({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:e.get("color")}),l=s.mapValueToVisual(o.getLayout().value),u=o.getModel().get(["itemStyle","color"]);u!=null?(o.setVisual("color",u),o.setVisual("style",{fill:u})):(o.setVisual("color",l),o.setVisual("style",{fill:l}))})}})}function fW(r){r.registerChartView(H4),r.registerSeriesModel($4),r.registerLayout(U4),r.registerVisual(uW),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var BD=function(){function r(){}return r.prototype.getInitialData=function(e,t){var a,i=t.getComponent("xAxis",this.get("xAxisIndex")),n=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=n.get("type"),l;o==="category"?(e.layout="horizontal",a=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",a=n.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],v=u[1-f],c=[i,n],p=c[f].get("type"),d=c[1-f].get("type"),g=e.data;if(g&&l){var y=[];C(g,function(S,b){var x;z(S)?(x=S.slice(),S.unshift(b)):z(S.value)?(x=V({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:xf(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:xf(d),dimsDef:m.slice()}];return To(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:it(uA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),VD=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Ft);jt(VD,BD,!0);var hW=VD,vW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;n.diff(s).add(function(u){if(n.hasValue(u)){var f=n.getItemLayout(u),h=RS(f,n,u,l,!0);n.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!n.hasValue(u)){o.remove(h);return}var v=n.getItemLayout(u);h?(Sr(h),zD(v,h,n,u)):h=RS(v,n,u,l),o.add(h),n.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=n},e.prototype.remove=function(t){var a=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(n){n&&a.remove(n)})},e.type="boxplot",e}(Bt),cW=function(){function r(){}return r}(),pW=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new cW},e.prototype.buildPath=function(t,a){var i=a.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();nd){var S=[y,_];a.push(S)}}}return{boxData:t,outliers:a}}var wW={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==me){var a="";Lt(a)}var i=bW(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function TW(r){r.registerSeriesModel(hW),r.registerChartView(gW),r.registerVisual(yW),r.registerLayout(mW),r.registerTransform(wW)}var AW=["color","borderColor"],CW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){ti(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),i=this._data,n=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||n.removeAll(),a.diff(i).add(function(f){if(a.hasValue(f)){var h=a.getItemLayout(f);if(s&&ES(u,h))return;var v=Ac(h,f,!0);zt(v,{shape:{points:h.ends}},t,f),Cc(v,a,f,o),n.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,h){var v=i.getItemGraphicEl(h);if(!a.hasValue(f)){n.remove(v);return}var c=a.getItemLayout(f);if(s&&ES(u,c)){n.remove(v);return}v?(Tt(v,{shape:{points:c.ends}},t,f),Sr(v)):v=Ac(c),Cc(v,a,f,o),n.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&n.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),OS(t,this.group);var a=t.get("clip",!0)?Th(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var i=a.getData(),n=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=Ac(s);Cc(l,i,o,n),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){OS(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Bt),MW=function(){function r(){}return r}(),DW=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new MW},e.prototype.buildPath=function(t,a){var i=a.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(gt);function Ac(r,e,t){var a=r.ends;return new DW({shape:{points:t?LW(a,r):a},z2:100})}function ES(r,e){for(var t=!0,a=0;a0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]),n=t.getModel("itemStyle").getItemStyle(AW);e.useStyle(n),e.style.fill=null,e.style.stroke=i}var PW=CW,GD=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,i){var n=a.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Ft);jt(GD,BD,!0);var RW=GD;function EW(r){!r||!z(r.series)||C(r.series,function(e){j(e)&&e.type==="k"&&(e.type="candlestick")})}var kW=["itemStyle","borderColor"],OW=["itemStyle","borderColor0"],NW=["itemStyle","color"],BW=["itemStyle","color0"],VW={seriesType:"candlestick",plan:xo(),performRawSeries:!0,reset:function(r,e){function t(n,o){return o.get(n>0?NW:BW)}function a(n,o){return o.get(n>0?kW:OW)}if(!e.isSeriesFiltered(r)){var i=r.pipelineContext.large;return!i&&{progress:function(n,o){for(var s;(s=n.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=t(u,l),f.stroke=a(u,l)||f.fill;var h=o.ensureUniqueItemVisual(s,"style");V(h,f)}}}}}},zW=VW,GW={seriesType:"candlestick",plan:xo(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=FW(r,t),i=0,n=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=G(t.mapDimensionsAll(o[n]),t.getDimensionIndex,t),u=l[0],f=l[1],h=l[2],v=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:c};function c(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var _=m.get(s,y),S=m.get(u,y),b=m.get(f,y),x=m.get(h,y),w=m.get(v,y),T=Math.min(S,b),A=Math.max(S,b),M=R(T,_),D=R(A,_),L=R(x,_),I=R(w,_),P=[];E(P,D,0),E(P,M,1),P.push(O(I),O(D),O(L),O(M)),g.setItemLayout(y,{sign:BS(m,y,S,b,f),initBaseline:S>b?D[n]:M[n],ends:P,brushRect:N(x,w,_)})}function R(B,F){var W=[];return W[i]=F,W[n]=B,isNaN(F)||isNaN(B)?[NaN,NaN]:e.dataToPoint(W)}function E(B,F,W){var Z=F.slice(),tt=F.slice();Z[i]=zu(Z[i]+a/2,1,!1),tt[i]=zu(tt[i]-a/2,1,!0),W?B.push(Z,tt):B.push(tt,Z)}function N(B,F,W){var Z=R(B,W),tt=R(F,W);return Z[i]-=a/2,tt[i]-=a/2,{x:Z[0],y:Z[1],width:a,height:tt[1]-Z[1]}}function O(B){return B[i]=zu(B[i],1),B}}function p(d,g){for(var y=Or(d.count*4),m=0,_,S=[],b=[],x,w=g.getStore();(x=d.next())!=null;){var T=w.get(s,x),A=w.get(u,x),M=w.get(f,x),D=w.get(h,x),L=w.get(v,x);if(isNaN(T)||isNaN(D)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=BS(w,x,A,M,f),S[i]=T,S[n]=D,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[n]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function BS(r,e,t,a,i){var n;return t>a?n=-1:t0?r.get(i,e-1)<=a?1:-1:1,n}function FW(r,e){var t=r.getBaseAxis(),a,i=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=H(ct(r.get("barMaxWidth"),i),i),o=H(ct(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?H(s,i):Math.max(Math.min(i/2,n),o)}var HW=GW;function WW(r){r.registerChartView(PW),r.registerSeriesModel(RW),r.registerPreprocessor(EW),r.registerVisual(zW),r.registerLayout(HW)}function VS(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var $W=function(r){k(e,r);function e(t,a){var i=r.call(this)||this,n=new yl(t,a),o=new rt;return i.add(n),i.add(o),i.updateData(t,a),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(n)/u*1e3),s!==this._period||l!==this._loop){n.stopAnimation();var h=void 0;K(f)?h=f(i):h=f,n.__t>0&&(h=-s*n.__t),this._animateSymbol(n,s,h,l)}this._period=s,this._loop=l}},e.prototype._animateSymbol=function(t,a,i,n){if(a>0){t.__t=0;var o=this,s=t.animate("",n).when(a,{__t:1}).delay(i).during(function(){o._updateSymbolPosition(t)});n||s.done(function(){o.remove(t)}),s.start()}},e.prototype._getLineLength=function(t){return Ia(t.__p1,t.__cp1)+Ia(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,i){this.childAt(0).updateData(t,a,i),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,s=[t.x,t.y],l=s.slice(),u=ie,f=fp;s[0]=u(a[0],n[0],i[0],o),s[1]=u(a[1],n[1],i[1],o);var h=f(a[0],n[0],i[0],o),v=f(a[1],n[1],i[1],o);t.rotation=-Math.atan2(v,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(n[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-n[l])/(n[l+1]-n[l]),h=i[l],v=i[l+1];t.x=h[0]*(1-f)+f*v[0],t.y=h[1]*(1-f)+f*v[1];var c=v[0]-h[0],p=v[1]-h[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(FD),t$=JW,e$=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),r$=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new e$},e.prototype.buildPath=function(t,a){var i=a.segs,n=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var c=(u+h)/2-(f-v)*n,p=(f+v)/2-(h-u)*n;t.quadraticCurveTo(c,p,h,v)}else t.lineTo(h,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var i=this.shape,n=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var h=n[u++],v=n[u++],c=1;c0){var g=(h+p)/2-(v-d)*o,y=(v+d)/2-(p-h)*o;if(qw(h,v,g,y,p,d,s,t,a))return l}else if(Da(h,v,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.segs,n=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),i$=a$,n$={seriesType:"lines",plan:xo(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(i,n){var o=[];if(a){var s=void 0,l=i.end-i.start;if(t){for(var u=0,f=i.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(n);var h=t.get("clip",!0)&&Th(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=WD.reset(t,a,i);s.progress&&s.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,a){var i=this._lineDraw,n=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!i||n!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new i$:new hy(o?n?t$:HD:n?FD:fy),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),i=a.painter.getType()==="svg";!i&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Bt),s$=o$,l$=typeof Uint32Array=="undefined"?Array:Uint32Array,u$=typeof Float64Array=="undefined"?Array:Float64Array;function zS(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],i={coords:a};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),$d([i,t[0],t[1]])}))}var f$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],zS(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(zS(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Ku(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Ku(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),i=a.option instanceof Array?a.option:a.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],n=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Ft),h$=f$;function _u(r){return r instanceof Array||(r=[r,r]),r}var v$={seriesType:"lines",reset:function(r){var e=_u(r.get("symbol")),t=_u(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function i(n,o){var s=n.getItemModel(o),l=_u(s.getShallow("symbol",!0)),u=_u(s.getShallow("symbolSize",!0));l[0]&&n.setItemVisual(o,"fromSymbol",l[0]),l[1]&&n.setItemVisual(o,"toSymbol",l[1]),u[0]&&n.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&n.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?i:null}}},c$=v$;function p$(r){r.registerChartView(s$),r.registerSeriesModel(h$),r.registerLayout(WD),r.registerVisual(c$)}var d$=256,g$=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ua.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,i,n,o){var s=this._getBrush(),l=this._getGradient(n,"inRange"),u=this._getGradient(n,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var p=0;p0){var L=o(_)?l:u;_>0&&(_=_*M+T),b[x++]=L[D],b[x++]=L[D+1],b[x++]=L[D+2],b[x++]=L[D+3]*_*256}else x+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ua.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var i=e.getContext("2d");return i.clearRect(0,0,a,a),i.shadowOffsetX=a,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,i=a[t]||(a[t]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i},r}(),y$=g$;function m$(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var i=e.length,n=0;return function(o){var s;for(s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function GS(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var S$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(n=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):GS(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,a,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,i,n){var o=a.coordinateSystem;o&&(GS(o)?this.render(a,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ti(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,i,n,o){var s=t.coordinateSystem,l=hn(s,"cartesian2d"),u,f,h,v;if(l){var c=s.getAxis("x"),p=s.getAxis("y");u=c.getBandWidth()+.5,f=p.getBandWidth()+.5,h=c.scale.getExtent(),v=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),b=se(t),x=t.getModel("emphasis"),w=x.get("focus"),T=x.get("blurScope"),A=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=i;Dh[1]||Rv[1])continue;var E=s.dataToPoint([P,R]);L=new xt({shape:{x:E[0]-u/2,y:E[1]-f/2,width:u,height:f},style:I})}else{if(isNaN(g.get(M[1],D)))continue;L=new xt({z2:1,shape:s.dataToRect([g.get(M[0],D)]).contentShape,style:I})}if(g.hasItemOption){var N=g.getItemModel(D),O=N.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),S=N.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),A=O.get("disabled"),b=se(N)}L.shape.r=S;var B=t.getRawValue(D),F="-";B&&B[2]!=null&&(F=B[2]+""),_e(L,b,{labelFetcher:t,labelDataIndex:D,defaultOpacity:I.opacity,defaultText:F}),L.ensureState("emphasis").style=y,L.ensureState("blur").style=m,L.ensureState("select").style=_,Yt(L,w,T,A),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),d.add(L),g.setItemGraphicEl(D,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,a,i,n){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new y$;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=t.getViewRect().clone(),h=t.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),c=Math.max(f.y,0),p=Math.min(f.width+f.x,n.getWidth()),d=Math.min(f.height+f.y,n.getHeight()),g=p-v,y=d-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,A){var M=t.dataToPoint([w,T]);return M[0]-=v,M[1]-=c,M.push(A),M}),S=i.getExtent(),b=i.type==="visualMap.continuous"?_$(S,i.option.range):m$(S,i.getPieceList(),i.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new ve({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Bt),x$=S$,b$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return pa(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=hl.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Ft),w$=b$;function T$(r){r.registerChartView(x$),r.registerSeriesModel(w$)}var A$=["itemStyle","borderWidth"],FS=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Mc=new Wr,C$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),v={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:FS[+f],categoryDim:FS[1-+f]};return o.diff(s).add(function(c){if(!!o.hasValue(c)){var p=WS(o,c),d=HS(o,c,p,v),g=$S(o,v,d);o.setItemGraphicEl(c,g),n.add(g),YS(g,v,d)}}).update(function(c,p){var d=s.getItemGraphicEl(p);if(!o.hasValue(c)){n.remove(d);return}var g=WS(o,c),y=HS(o,c,g,v),m=qD(o,y);d&&m!==d.__pictorialShapeStr&&(n.remove(d),o.setItemGraphicEl(c,null),d=null),d?E$(d,v,y):d=$S(o,v,y,!0),o.setItemGraphicEl(c,d),d.__pictorialSymbolMeta=y,n.add(d),YS(d,v,y)}).remove(function(c){var p=s.getItemGraphicEl(c);p&&US(s,c,p.__pictorialSymbolMeta.animationModel,p)}).execute(),this._data=o,this.group},e.prototype.remove=function(t,a){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(o){US(n,at(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(Bt);function HS(r,e,t,a){var i=r.getItemLayout(e),n=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),v={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};M$(t,n,i,a,v),D$(r,e,i,n,o,v.boundingLength,v.pxSign,f,a,v),L$(t,v.symbolScale,u,a,v);var c=v.symbolSize,p=wo(t.get("symbolOffset"),c);return I$(t,c,i,n,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function M$(r,e,t,a,i){var n=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[n.wh]<=0),f;if(z(o)){var h=[Dc(s,o[0])-l,Dc(s,o[1])-l];h[1]0?1:-1}function Dc(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function D$(r,e,t,a,i,n,o,s,l,u){var f=l.valueDim,h=l.categoryDim,v=Math.abs(t[h.wh]),c=r.getItemVisual(e,"symbolSize"),p;z(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[h.index]=H(p[h.index],v),p[f.index]=H(p[f.index],a?v:Math.abs(n)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function L$(r,e,t,a,i){var n=r.get(A$)||0;n&&(Mc.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Mc.updateTransform(),n/=Mc.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n||0}function I$(r,e,t,a,i,n,o,s,l,u,f,h){var v=f.categoryDim,c=f.valueDim,p=h.pxSign,d=Math.max(e[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=ne(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=H(m,e[c.index]),b=Math.max(d+S*2,0),x=_?0:S*2,w=kw(a),T=w?a:ZS((y+x)/b),A=y-T*d;S=A/2/(_?T:Math.max(T-1,1)),b=d+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?ZS((Math.abs(u)+x)/b):0),g=T*b-x,h.repeatTimes=T,h.symbolMargin=S}var M=p*(g/2),D=h.pathPosition=[];D[v.index]=t[v.wh]/2,D[c.index]=o==="start"?M:o==="end"?l-M:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var L=h.bundlePosition=[];L[v.index]=t[v.xy],L[c.index]=t[c.xy];var I=h.barRectShape=V({},t);I[c.wh]=p*Math.max(Math.abs(t[c.wh]),Math.abs(D[c.index]+M)),I[v.wh]=t[v.wh];var P=h.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function $D(r){var e=r.symbolPatternSize,t=Qt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function UD(r,e,t,a){var i=r.__pictorialBundle,n=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,h=n[e.valueDim.index]+o+t.symbolMargin*2;for(_y(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=h*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function YD(r,e,t,a){var i=r.__pictorialBundle,n=r.__pictorialMainPath;n?Qn(n,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(n=r.__pictorialMainPath=$D(t),i.add(n),Qn(n,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function ZD(r,e,t){var a=V({},e.barRectShape),i=r.__pictorialBarRect;i?Qn(i,null,{shape:a},e,t):(i=r.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function XD(r,e,t,a){if(t.symbolClip){var i=r.__pictorialClipPath,n=V({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)Tt(i,{shape:n},s,l);else{n[o.wh]=0,i=new xt({shape:n}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],fl[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function WS(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=P$,t.isAnimationEnabled=R$,t}function P$(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function R$(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $S(r,e,t,a){var i=new rt,n=new rt;return i.add(n),i.__pictorialBundle=n,n.x=t.bundlePosition[0],n.y=t.bundlePosition[1],t.symbolRepeat?UD(i,e,t):YD(i,e,t),ZD(i,t,a),XD(i,e,t,a),i.__pictorialShapeStr=qD(r,t),i.__pictorialSymbolMeta=t,i}function E$(r,e,t){var a=t.animationModel,i=t.dataIndex,n=r.__pictorialBundle;Tt(n,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,i),t.symbolRepeat?UD(r,e,t,!0):YD(r,e,t,!0),ZD(r,t,!0),XD(r,e,t,!0)}function US(r,e,t,a){var i=a.__pictorialBarRect;i&&i.removeTextContent();var n=[];_y(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),C(n,function(o){Za(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function qD(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function _y(r,e,t){C(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function Qn(r,e,t,a,i,n){e&&r.attr(e),a.symbolClip&&!i?t&&r.attr(t):t&&fl[i?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,n)}function YS(r,e,t){var a=t.dataIndex,i=t.itemModel,n=i.getModel("emphasis"),o=n.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),f=n.get("focus"),h=n.get("blurScope"),v=n.get("scale");_y(r,function(d){if(d instanceof ve){var g=d.style;d.useStyle(V({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,v&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var c=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;_e(p,se(i),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:ao(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),Yt(r,f,h,n.get("disabled"))}function ZS(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var k$=C$,O$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ei(Cf.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Cf),N$=O$;function B$(r){r.registerChartView(k$),r.registerSeriesModel(N$),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,it(PC,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,RC("pictorialBar"))}var V$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=n.getLayout("layoutInfo"),f=u.rect,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function v(g){return g.name}var c=new fa(this._layersSeries||[],l,v,v),p=[];c.add(U(d,this,"add")).update(U(d,this,"update")).remove(U(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Tn&&(n=s),a.push(s)}for(var u=0;un&&(n=h)}return{y0:i,max:n}}function U$(r){r.registerChartView(G$),r.registerSeriesModel(H$),r.registerLayout(W$),r.registerProcessor(Sl("themeRiver"))}var Y$=2,Z$=4,X$=function(r){k(e,r);function e(t,a,i,n){var o=r.call(this)||this;o.z2=Y$,o.textConfig={inside:!0},at(o).seriesIndex=a.seriesIndex;var s=new Ct({z2:Z$,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,i,n),o}return e.prototype.updateData=function(t,a,i,n,o){this.node=a,a.piece=this,i=i||this._seriesModel,n=n||this._ecModel;var s=this;at(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),h=V({},f);h.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=eo(c,o));var p=Un(l.getModel("itemStyle"),h,!0);V(h,p),C(Ce,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=Un(S,h);b&&(_.shape=b)}),t?(s.setShape(h),s.shape.r=f.r0,Tt(s,{shape:{r:f.r}},i,a.dataIndex)):(Tt(s,{shape:h},i),Sr(s)),s.useStyle(v),this._updateLabel(i);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=i||this._seriesModel,this._ecModel=n||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Yt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,i=this.node.getModel(),n=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,v=h.getTextContent(),c=this.node.dataIndex,p=n.get("minAngle")/180*Math.PI,d=n.get("show")&&!(p!=null&&Math.abs(s)Math.PI/2?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?M=0:M=(o.r+o.r0)/2,L="center"):L==="left"?(M=o.r0+D,l>Math.PI/2&&(L="right")):L==="right"&&(M=o.r-D,l>Math.PI/2&&(L="left")),S.style.align=L,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=M*u+o.cx,S.y=M*f+o.cy;var I=g(m,"rotate"),P=0;I==="radial"?(P=-l,P<-Math.PI/2&&(P+=Math.PI)):I==="tangential"?(P=Math.PI/2-l,P>Math.PI/2?P-=Math.PI:P<-Math.PI/2&&(P+=Math.PI)):wt(I)&&(P=I*Math.PI/180),S.rotation=P});function g(y,m){var _=y.get(m);return _==null?n.get(m):_}v.dirtyStyle()},e}(Ee),qS=X$,xd="sunburstRootToNode",KS="sunburstHighlight",q$="sunburstUnhighlight";function K$(r){r.registerAction({type:xd,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},a);function a(i,n){var o=Xs(e,[xd],i);if(o){var s=i.getViewRoot();s&&(e.direction=oy(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:KS,update:"none"},function(e,t,a){e=V({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(n){var o=Xs(e,[KS],n);o&&(e.dataIndex=o.node.dataIndex)}a.dispatchAction(V(e,{type:"highlight"}))}),r.registerAction({type:q$,update:"updateView"},function(e,t,a){e=V({},e),a.dispatchAction(V(e,{type:"downplay"}))})}var Q$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=a;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),f=this.group,h=t.get("renderLabelForZeroData"),v=[];u.eachNode(function(m){v.push(m)});var c=this._oldChildren||[];p(v,c),y(l,u),this._initEvents(),this._oldChildren=v;function p(m,_){if(m.length===0&&_.length===0)return;new fa(_,m,S,S).add(b).update(b).remove(it(b,null)).execute();function S(x){return x.getId()}function b(x,w){var T=x==null?null:m[x],A=w==null?null:_[w];d(T,A)}}function d(m,_){if(!h&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,t,a,i),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var S=new qS(m,t,a,i);f.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){!m||m.piece&&(f.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,i):(o.virtualPiece=new qS(m,t,a,i),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(o){if(!i&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";cf(u,f)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:xd,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var i=a.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,s=t[1]-n.cy,l=Math.sqrt(o*o+s*s);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(Bt),j$=Q$,J$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};KD(i);var n=this._levelModels=G(t.levels||[],function(l){return new Nt(l,this,a)},this),o=ny.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=n[h.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Mh(i,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){JM(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Ft);function KD(r){var e=0;C(r.children,function(a){KD(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}var t6=J$,QS=Math.PI/180;function e6(r,e,t){e.eachSeriesByType(r,function(a){var i=a.get("center"),n=a.get("radius");z(n)||(n=[0,n]),z(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=H(i[0],o),f=H(i[1],s),h=H(n[0],l/2),v=H(n[1],l/2),c=-a.get("startAngle")*QS,p=a.get("minAngle")*QS,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&QD(g,m);var _=0;C(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-h)/(w||1),A=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=A?1:-1,L=function(E,N){if(!!E){var O=N;if(E!==d){var B=E.getValue(),F=S===0&&M?b:B*b;F1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&$(s)&&(s=cp(s,(a.depth-1)/(n-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var i=a.getData(),n=i.tree;n.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,n.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");V(u,l)})})}function i6(r){r.registerChartView(j$),r.registerSeriesModel(t6),r.registerLayout(it(e6,"sunburst")),r.registerProcessor(it(Sl,"sunburst")),r.registerVisual(a6),K$(r)}var jS={color:"fill",borderColor:"stroke"},n6={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ia=At(),o6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return pa(null,this)},e.prototype.getDataParams=function(t,a,i){var n=r.prototype.getDataParams.call(this,t,a);return i&&(n.info=ia(i).info),n},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Ft),s6=o6;function l6(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var i=this.getAxis(t),n=e[a],o=r[a]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}function u6(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:U(l6,r)}}}function f6(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],i=r[t]/2,n=[],o=[];return n[t]=a-i,o[t]=a+i,n[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function h6(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:U(f6,r)}}}function v6(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-i)-t.dataToCoord(a+i))}function c6(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:U(v6,r)}}}function p6(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var i="get"+t+"Axis",n=this[i](),o=e[a],s=r[a]/2,l=n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(o-s)-n.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function d6(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(i){var n=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s},size:U(p6,r)}}}function g6(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,i){return r.dataToPoint(a,i)}}}}function jD(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||Y(r,"text")))}function JD(r,e,t){var a=r,i,n,o;if(e==="text")o=a;else{o={},Y(a,"text")&&(o.text=a.text),Y(a,"rich")&&(o.rich=a.rich),Y(a,"textFill")&&(o.fill=a.textFill),Y(a,"textStroke")&&(o.stroke=a.textStroke),Y(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Y(a,"fontSize")&&(o.fontSize=a.fontSize),Y(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Y(a,"fontWeight")&&(o.fontWeight=a.fontWeight),n={type:"text",style:o,silent:!0},i={};var s=Y(a,"textPosition");t?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),Y(a,"textPosition")&&(i.position=a.textPosition),Y(a,"textOffset")&&(i.offset=a.textOffset),Y(a,"textRotation")&&(i.rotation=a.textRotation),Y(a,"textDistance")&&(i.distance=a.textDistance)}return JS(o,r),C(o.rich,function(l){JS(l,l)}),{textConfig:i,textContent:n}}function JS(r,e){!e||(e.font=e.textFont||e.font,Y(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Y(e,"textAlign")&&(r.align=e.textAlign),Y(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Y(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Y(e,"textWidth")&&(r.width=e.textWidth),Y(e,"textHeight")&&(r.height=e.textHeight),Y(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Y(e,"textPadding")&&(r.padding=e.textPadding),Y(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Y(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Y(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Y(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Y(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Y(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Y(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function tx(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var i=a.textPosition.indexOf("inside")>=0,n=r.fill||"#000";ex(a,e);var o=a.textFill==null;return i?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=n),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,C(e.rich,function(s){ex(s,s)}),a}function ex(r,e){!e||(Y(e,"fill")&&(r.textFill=e.fill),Y(e,"stroke")&&(r.textStroke=e.fill),Y(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Y(e,"font")&&(r.font=e.font),Y(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Y(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Y(e,"fontSize")&&(r.fontSize=e.fontSize),Y(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Y(e,"align")&&(r.textAlign=e.align),Y(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Y(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Y(e,"width")&&(r.textWidth=e.width),Y(e,"height")&&(r.textHeight=e.height),Y(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Y(e,"padding")&&(r.textPadding=e.padding),Y(e,"borderColor")&&(r.textBorderColor=e.borderColor),Y(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Y(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Y(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Y(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Y(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Y(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Y(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Y(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Y(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Y(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var tL={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},rx=mt(tL);Vr(Gr,function(r,e){return r[e]=1,r},{});Gr.join(", ");var kf=["","style","shape","extra"],oo=At();function Sy(r,e,t,a,i){var n=r+"Animation",o=vo(r,a,i)||{},s=oo(e).userDuring;return o.duration>0&&(o.during=s?U(x6,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),V(o,t[n]),o}function Uu(r,e,t,a){a=a||{};var i=a.dataIndex,n=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=oo(r),u=e.style;l.userDuring=e.during;var f={},h={};if(w6(r,e,h),ix("shape",e,h),ix("extra",e,h),!n&&s&&(b6(r,e,f),ax("shape",r,e,f),ax("extra",r,e,f),T6(r,e,u,f)),h.style=u,y6(r,h,o),_6(r,e),s)if(n){var v={};C(kf,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(v[p]=v[p]||{}),V(p?v[p]:v,d.enterFrom))});var c=Sy("enter",r,e,t,i);c.duration>0&&r.animateFrom(v,c)}else m6(r,e,i||0,t,f);eL(r,e),u?r.dirty():r.markRedraw()}function eL(r,e){for(var t=oo(r).leaveToProps,a=0;a0&&r.animateFrom(i,n)}}function _6(r,e){Y(e,"silent")&&(r.silent=e.silent),Y(e,"ignore")&&(r.ignore=e.ignore),r instanceof or&&Y(e,"invisible")&&(r.invisible=e.invisible),r instanceof gt&&Y(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Dr={},S6={setTransform:function(r,e){return Dr.el[r]=e,this},getTransform:function(r){return Dr.el[r]},setShape:function(r,e){var t=Dr.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Dr.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Dr.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Dr.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Dr.el.extra||(Dr.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Dr.el.extra;if(e)return e[r]}};function x6(){var r=this,e=r.el;if(!!e){var t=oo(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Dr.el=e,a(S6)}}function ax(r,e,t,a){var i=t[r];if(!!i){var n=e[r],o;if(n){var s=t.transition,l=i.transition;if(l)if(!o&&(o=a[r]={}),ji(l))V(o,n);else for(var u=Et(l),f=0;f=0){!o&&(o=a[r]={});for(var c=mt(n),f=0;f=0)){var v=r.getAnimationStyleProps(),c=v?v.style:null;if(c){!n&&(n=a.style={});for(var p=mt(t),u=0;u=0?e.getStore().get(N,R):void 0}var O=e.get(E.name,R),B=E&&E.ordinalMeta;return B?B.categories[O]:O}function x(P,R){R==null&&(R=u);var E=e.getItemVisual(R,"style"),N=E&&E.fill,O=E&&E.opacity,B=m(R,Va).getItemStyle();N!=null&&(B.fill=N),O!=null&&(B.opacity=O);var F={inheritColor:$(N)?N:"#000"},W=_(R,Va),Z=Gt(W,null,F,!1,!0);Z.text=W.getShallow("show")?ct(r.getFormattedLabel(R,Va),ao(e,R)):null;var tt=hf(W,F,!1);return A(P,B),B=tx(B,Z,tt),P&&T(B,P),B.legacy=!0,B}function w(P,R){R==null&&(R=u);var E=m(R,na).getItemStyle(),N=_(R,na),O=Gt(N,null,null,!0,!0);O.text=N.getShallow("show")?ta(r.getFormattedLabel(R,na),r.getFormattedLabel(R,Va),ao(e,R)):null;var B=hf(N,null,!0);return A(P,E),E=tx(E,O,B),P&&T(E,P),E.legacy=!0,E}function T(P,R){for(var E in R)Y(R,E)&&(P[E]=R[E])}function A(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function M(P,R){if(R==null&&(R=u),Y(jS,P)){var E=e.getItemVisual(R,"style");return E?E[jS[P]]:null}if(Y(n6,P))return e.getItemVisual(R,P)}function D(P){if(n.type==="cartesian2d"){var R=n.getBaseAxis();return BB(Q({axis:R},P))}}function L(){return t.getCurrentSeriesIndices()}function I(P){return zT(P,t)}}function O6(r){var e={};return C(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var i=a.coordDim,n=e[i]=e[i]||[];n[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Rc(r,e,t,a,i,n,o){if(!a){n.remove(e);return}var s=Ay(r,e,t,a,i,n);return s&&o.setItemGraphicEl(t,s),s&&Yt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Ay(r,e,t,a,i,n){var o=-1,s=e;e&&nL(e,a,i)&&(o=vt(n.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=wy(a),s&&I6(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Ze.normal.cfg=Ze.normal.conOpt=Ze.emphasis.cfg=Ze.emphasis.conOpt=Ze.blur.cfg=Ze.blur.conOpt=Ze.select.cfg=Ze.select.conOpt=null,Ze.isLegacy=!1,B6(u,t,a,i,l,Ze),N6(u,t,a,i,l),Ty(r,u,t,a,Ze,i,l),Y(a,"info")&&(ia(u).info=a.info);for(var f=0;f=0?n.replaceAt(u,o):n.add(u),u}function nL(r,e,t){var a=ia(r),i=e.type,n=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==a.customGraphicType||i==="path"&&F6(n)&&oL(n)!==a.customPathData||i==="image"&&Y(o,"image")&&o.image!==a.customImagePath}function N6(r,e,t,a,i){var n=t.clipPath;if(n===!1)r&&r.getClipPath()&&r.removeClipPath();else if(n){var o=r.getClipPath();o&&nL(o,n,a)&&(o=null),o||(o=wy(n),r.setClipPath(o)),Ty(null,o,e,n,null,a,i)}}function B6(r,e,t,a,i,n){if(!r.isGroup){ox(t,null,n),ox(t,na,n);var o=n.normal.conOpt,s=n.emphasis.conOpt,l=n.blur.conOpt,u=n.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=n.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=wy(o),r.setTextContent(f)),Ty(null,f,e,o,null,a,i);for(var h=o&&o.style,v=0;v=f;h--){var v=e.childAt(h);Ih(v,ia(e).option,i)}}}function z6(r){new fa(r.oldChildren,r.newChildren,sx,sx,r).add(lx).update(lx).remove(G6).execute()}function sx(r,e){var t=r&&r.name;return t!=null?t:D6+e}function lx(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;Ay(t.api,i,t.dataIndex,a,t.seriesModel,t.group)}function G6(r){var e=this.context,t=e.oldChildren[r];Ih(t,ia(t).option,e.seriesModel)}function oL(r){return r&&(r.pathData||r.d)}function F6(r){return r&&(Y(r,"pathData")||Y(r,"d"))}function H6(r){r.registerChartView(R6),r.registerSeriesModel(s6)}var Ni=At(),ux=J,Ec=U,W6=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,i){var n=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!i&&this._lastValue===n&&this._lastStatus===o)){this._lastValue=n,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,n,e,t,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new rt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=it(fx,t,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}vx(s,t,!0),this._renderHandle(n)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),i=e.axis,n=i.type==="category",o=t.get("snap");if(!o&&!n)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(n&&i.getBandWidth()>s)return!0;if(o){var l=jg(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,i,n){},r.prototype.createPointerEl=function(e,t,a,i){var n=t.pointer;if(n){var o=Ni(e).pointerEl=new fl[n.type](ux(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,i){if(t.label){var n=Ni(e).labelEl=new Ct(ux(t.label));e.add(n),hx(n,i)}},r.prototype.updatePointerEl=function(e,t,a){var i=Ni(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),a(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,i){var n=Ni(e).labelEl;n&&(n.setStyle(t.label.style),a(n,{x:t.label.x,y:t.label.y}),hx(n,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),i=this._handle,n=t.getModel("handle"),o=t.get("status");if(!n.get("show")||!o||o==="hide"){i&&a.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=ul(n.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oa(u.event)},onmousedown:Ec(this._onHandleDragMove,this,0,0),drift:Ec(this._onHandleDragMove,this),ondragend:Ec(this._onHandleDragEnd,this)}),a.add(i)),vx(i,t,!1),i.setStyle(n.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=n.get("size");z(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,bo(this,"_doDispatchAxisPointer",n.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){fx(this._axisPointerModel,!t&&this._moveAnimation,this._handle,kc(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(!!a){this._dragging=!0;var i=this.updateHandleTransform(kc(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,a.stopAnimation(),a.attr(kc(i)),Ni(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,i=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Fs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function fx(r,e,t,a){sL(Ni(t).lastProp,a)||(Ni(t).lastProp=a,e?Tt(t,a,r):(t.stopAnimation(),t.attr(a)))}function sL(r,e){if(j(r)&&j(e)){var t=!0;return C(e,function(a,i){t=t&&sL(r[i],a)}),!!t}else return r===e}function hx(r,e){r[e.get(["label","show"])?"show":"hide"]()}function kc(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function vx(r,e,t){var a=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=t)})}var My=W6;function Dy(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function lL(r,e,t,a,i){var n=t.get("value"),o=uL(n,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=yo(s.get("padding")||0),u=s.getFont(),f=il(o,u),h=i.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=v),p==="center"&&(h[0]-=v/2);var d=i.verticalAlign;d==="bottom"&&(h[1]-=c),d==="middle"&&(h[1]-=c/2),$6(h,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Gt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function $6(r,e,t,a){var i=a.getWidth(),n=a.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,n)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function uL(r,e,t,a,i){r=e.scale.parse(r);var n=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Wg(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};C(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),$(o)?n=o.replace("{value}",n):K(o)&&(n=o(s))}return n}function Ly(r,e,t){var a=nr();return ln(a,a,t.rotation),zr(a,a,t.position),mr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function fL(r,e,t,a,i,n){var o=ha.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),lL(e,a,i,n,{position:Ly(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Iy(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function hL(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function cx(r,e,t,a,i,n){return{cx:r,cy:e,r0:t,r:a,startAngle:i,endAngle:n,clockwise:!0}}var U6=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.grid,u=n.get("type"),f=px(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=Dy(n),c=Y6[u](s,h,f);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=nd(l.model,i);fL(a,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=nd(a.axis.grid.model,a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Ly(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=px(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=a[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:p[f]}},e}(My);function px(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Y6={line:function(r,e,t){var a=Iy([e,t[0]],[e,t[1]],dx(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:hL([e-a/2,t[0]],[a,i],dx(r))}}};function dx(r){return r.dim==="x"?0:1}var Z6=U6,X6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(bt),q6=X6,Jr=At(),K6=C;function vL(r,e,t){if(!Mt.node){var a=e.getZr();Jr(a).records||(Jr(a).records={}),Q6(a,e);var i=Jr(a).records[r]||(Jr(a).records[r]={});i.handler=t}}function Q6(r,e){if(Jr(r).initialized)return;Jr(r).initialized=!0,t("click",it(gx,"click")),t("mousemove",it(gx,"mousemove")),t("globalout",J6);function t(a,i){r.on(a,function(n){var o=t7(e);K6(Jr(r).records,function(s){s&&i(s,n,o.dispatchAction)}),j6(o.pendings,e)})}}function j6(r,e){var t=r.showTip.length,a=r.hideTip.length,i;t?i=r.showTip[t-1]:a&&(i=r.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function J6(r,e,t){r.handler("leave",null,t)}function gx(r,e,t,a){e.handler(r,t,a)}function t7(r){var e={showTip:[],hideTip:[]},t=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function Td(r,e){if(!Mt.node){var t=e.getZr(),a=(Jr(t).records||{})[r];a&&(Jr(t).records[r]=null)}}var e7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=a.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";vL("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,a){Td("axisPointer",a)},e.prototype.dispose=function(t,a){Td("axisPointer",a)},e.type="axisPointer",e}(Wt),r7=e7;function cL(r,e){var t=[],a=r.seriesIndex,i;if(a==null||!(i=e.getSeriesByIndex(a)))return{point:[]};var n=i.getData(),o=tn(n,r);if(o==null||o<0||z(o))return{point:[]};var s=n.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,p=n.mapDimension(v),d=[];d[c]=n.get(p,o),d[1-c]=n.get(n.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(n.getValues(G(l.dimensions,function(y){return n.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var yx=At();function a7(r,e,t){var a=r.currTrigger,i=[r.x,r.y],n=r,o=r.dispatchAction||U(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){Yu(i)&&(i=cL({seriesIndex:n.seriesIndex,dataIndex:n.dataIndex},e).point);var l=Yu(i),u=n.axesInfo,f=s.axesInfo,h=a==="leave"||Yu(i),v={},c={},p={list:[],map:{}},d={showPointer:it(n7,c),showTooltip:it(o7,p)};C(s.coordSysMap,function(y,m){var _=l||y.containPoint(i);C(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=f7(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(i)),T!=null&&mx(S,T,d,!1,v)}})});var g={};return C(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&C(_.axesInfo,function(S,b){var x=c[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,_x(S),_x(y)))),g[y.key]=w}})}),C(g,function(y,m){mx(f[m],y,d,!0,v)}),s7(c,f,v),l7(p,i,r,o),u7(f,o,t),v}}function mx(r,e,t,a,i){var n=r.axis;if(!(n.scale.isBlank()||!n.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=i7(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!a&&r.snap&&n.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function i7(r,e){var t=e.axis,a=t.dim,i=r,n=[],o=Number.MAX_VALUE,s=-1;return C(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,t);v=c.dataIndices,h=c.nestestValue}else{if(v=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var p=r-h,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,i=h,n.length=0),C(v,function(g){n.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:n,snapToValue:i}}function n7(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function o7(r,e,t,a){var i=t.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Zs(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function s7(r,e,t){var a=t.axesInfo=[];C(e,function(i,n){var o=i.axisPointerModel.option,s=r[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function l7(r,e,t,a){if(Yu(e)||!r.list.length){a({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function u7(r,e,t){var a=t.getZr(),i="axisPointerLastHighlights",n=yx(a)[i]||{},o=yx(a)[i]={};C(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&C(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];C(n,function(u,f){!o[f]&&l.push(u)}),C(o,function(u,f){!n[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function f7(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function _x(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function Yu(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Tl(r){vn.registerAxisPointerClass("CartesianAxisPointer",Z6),r.registerComponentModel(q6),r.registerComponentView(r7),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=jz(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},a7)}function h7(r){pt(VM),pt(Tl)}var v7=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(a),v=n.get("type");if(v&&v!=="none"){var c=Dy(n),p=p7[v](s,l,h,f);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=n.get(["label","margin"]),g=c7(a,i,n,l,d);lL(t,i,n,o,g)},e}(My);function c7(r,e,t,a,i){var n=e.axis,o=n.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,h;if(n.dim==="radius"){var v=nr();ln(v,v,s),zr(v,v,[a.cx,a.cy]),u=mr([o,-i],v);var c=e.getModel("axisLabel").get("rotate")||0,p=ha.innerTextLayout(s,c*Math.PI/180,-1);f=p.textAlign,h=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+i,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var p7={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:Iy(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var i=Math.max(1,r.getBandWidth()),n=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:cx(e.cx,e.cy,a[0],a[1],(-t-i/2)*n,(-t+i/2)*n)}:{type:"Sector",shape:cx(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},d7=v7,g7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,i=this.ecModel;return i.eachComponent(t,function(n){n.getCoordSysModel()===this&&(a=n)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(bt),y7=g7,Py=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",qt).models[0]},e.type="polarAxis",e}(bt);jt(Py,gl);var m7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Py),_7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Py),Ry=function(r){k(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(br);Ry.prototype.dataToRadius=br.prototype.dataToCoord;Ry.prototype.radiusToData=br.prototype.coordToData;var S7=Ry,x7=At(),Ey=function(r){k(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var s=n[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=il(s==null?"":s+"",a.getFont(),"center","top"),h=Math.max(f.height,7),v=h/u;isNaN(v)&&(v=1/0);var c=Math.max(0,Math.floor(v)),p=x7(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-c)<=1&&Math.abs(g-o)<=1&&d>c?c=d:(p.lastTickCount=o,p.lastAutoInterval=c),c},e}(br);Ey.prototype.dataToAngle=br.prototype.dataToCoord;Ey.prototype.angleToData=br.prototype.coordToData;var b7=Ey,pL=["radius","angle"],w7=function(){function r(e){this.dimensions=pL,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new S7,this._angleAxis=new b7,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,i=this._radiusAxis;return a.scale.type===e&&t.push(a),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=this.getAngleAxis(),n=i.getExtent(),o=Math.min(n[0],n[1]),s=Math.max(n[0],n[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],a=e[1]/180*Math.PI,i=Math.cos(a)*t+this.cx,n=-Math.sin(a)*t+this.cy;return[i,n]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,h=this.r,v=this.r0;return f<=h*h&&f>=v*v}}},r.prototype.convertToPixel=function(e,t,a){var i=Sx(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=Sx(t);return i===this?this.pointToData(a):null},r}();function Sx(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var T7=w7;function A7(r,e,t){var a=e.get("center"),i=t.getWidth(),n=t.getHeight();r.cx=H(a[0],i),r.cy=H(a[1],n);var o=r.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]);var u=[H(l[0],s),H(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function C7(r,e){var t=this,a=t.getAngleAxis(),i=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();C(bf(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),C(bf(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),ro(a.scale,a.model),ro(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function M7(r){return r.mainType==="angleAxis"}function xx(r,e){if(r.type=e.get("type"),r.scale=bh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),M7(e)){r.inverse=r.inverse!==e.get("clockwise");var t=e.get("startAngle");r.setExtent(t,t+(r.inverse?-360:360))}e.axis=r,r.model=e}var D7={dimensions:pL,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,i){var n=new T7(i+"");n.update=C7;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");xx(o,l),xx(s,u),A7(n,a,e),t.push(n),a.coordinateSystem=n,n.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=a.getReferringComponents("polar",qt).models[0];a.coordinateSystem=i.coordinateSystem}}),t}},L7=D7,I7=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Su(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function xu(r){var e=r.getRadiusAxis();return e.inverse?0:1}function bx(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var P7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=G(i.getViewLabels(),function(f){f=J(f);var h=i.scale,v=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=i.dataToCoord(v),f});bx(u),bx(s),C(I7,function(f){t.get([f,"show"])&&(!i.scale.isBlank()||f==="axisLine")&&R7[f](this.group,t,n,s,l,o,u)},this)}},e.type="angleAxis",e}(vn),R7={axisLine:function(r,e,t,a,i,n){var o=e.getModel(["axisLine","lineStyle"]),s=xu(t),l=s?0:1,u;n[l]===0?u=new Wr({shape:{cx:t.cx,cy:t.cy,r:n[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new ih({shape:{cx:t.cx,cy:t.cy,r:n[s],r0:n[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,r.add(u)},axisTick:function(r,e,t,a,i,n){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=n[xu(t)],u=G(a,function(f){return new oe({shape:Su(t,[l,l+s],f.coord)})});r.add(er(u,{style:Q(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,i,n){if(!!i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=n[xu(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];j(b)&&b.textStyle&&(c=new Nt(b.textStyle,l,l.ecModel))}var x=new Ct({silent:ha.isLabelSilent(e),style:Gt(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var w=ha.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=h.rawLabel,at(x).eventData=w}},this)},splitLine:function(r,e,t,a,i,n){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",I=w;b&&(a[f][D]||(a[f][D]={p:w,n:w}),I=a[f][D][L]);var P=void 0,R=void 0,E=void 0,N=void 0;if(p.dim==="radius"){var O=p.dataToCoord(M)-w,B=l.dataToCoord(D);Math.abs(O)=N})}}})}function F7(r){var e={};C(r,function(a,i){var n=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=gL(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/n.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=h.stacks;e[l]=h;var c=dL(a);v[c]||h.autoWidthCount++,v[c]=v[c]||{width:0,maxWidth:0};var p=H(a.get("barWidth"),f),d=H(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!v[c].width&&(p=Math.min(h.remainedWidth,p),v[c].width=p,h.remainedWidth-=p),d&&(v[c].maxWidth=d),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return C(e,function(a,i){t[i]={};var n=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),C(n,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),i=[],n=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[n]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-n]=n===0?a.y+a.height/2:a.x+a.width/2,i},r.prototype.convertToPixel=function(e,t,a){var i=Tx(t);return i===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var i=Tx(t);return i===this?this.pointToData(a):null},r}();function Tx(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function tU(r,e){var t=[];return r.eachComponent("singleAxis",function(a,i){var n=new J7(a,r,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,t.push(n)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=a.getReferringComponents("singleAxis",qt).models[0];a.coordinateSystem=i&&i.coordinateSystem}}),t}var eU={create:tU,dimensions:mL},rU=eU,Ax=["x","y"],aU=["width","height"],iU=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,i,n,o){var s=i.axis,l=s.coordinateSystem,u=Nc(l,1-Bf(s)),f=l.dataToPoint(a)[0],h=n.get("type");if(h&&h!=="none"){var v=Dy(n),c=nU[h](s,f,u);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Ad(i);fL(a,t,p,i,n,o)},e.prototype.getHandleTransform=function(t,a,i){var n=Ad(a,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=Ly(a.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,i,n){var o=i.axis,s=o.coordinateSystem,l=Bf(o),u=Nc(s,l),f=[t.x,t.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var h=Nc(s,1-l),v=(h[1]+h[0])/2,c=[v,v];return c[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(My),nU={line:function(r,e,t){var a=Iy([e,t[0]],[e,t[1]],Bf(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:hL([e-a/2,t[0]],[a,i],Bf(r))}}};function Bf(r){return r.isHorizontal()?0:1}function Nc(r,e){var t=r.getRect();return[t[Ax[e]],t[Ax[e]]+t[aU[e]]]}var oU=iU,sU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Wt);function lU(r){pt(Tl),vn.registerAxisPointerClass("SingleAxisPointer",oU),r.registerComponentView(sU),r.registerComponentView(K7),r.registerComponentModel(Oc),io(r,"single",Oc,Oc.defaultOption),r.registerCoordinateSystem("single",rU)}var uU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,i){var n=mo(t);r.prototype.init.apply(this,arguments),Cx(t,n)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Cx(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(bt);function Cx(r,e){var t=r.cellSize,a;z(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var i=G([0,1],function(n){return gk(e,n)&&(a[n]="auto"),a[n]!=null&&a[n]!=="auto"});Xa(r,e,{type:"box",ignoreSize:i})}var fU=uU,hU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,n),this._renderLines(t,s,l,n),this._renderYearText(t,s,l,n),this._renderMonthText(t,u,l,n),this._renderWeekText(t,u,s,l,n)},e.prototype._renderDayRect=function(t,a,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=n.getCellWidth(),l=n.getCellHeight(),u=a.start.time;u<=a.end.time;u=n.getNextNDay(u,1).time){var f=n.dataToRect([u],!1).tl,h=new xt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(t,a,i,n){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=a.start,v=0;h.time<=a.end.time;v++){p(h.formatedDate),v===0&&(h=s.getDateInfo(a.start.y+"-"+a.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=s.getDateInfo(c)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,i);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,n)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,i),l,n),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,i),l,n)},e.prototype._getEdgesPoints=function(t,a,i){var n=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return n[0][o]=n[0][o]-a/2,n[1][o]=n[1][o]+a/2,n},e.prototype._drawSplitline=function(t,a,i){var n=new Oe({z2:20,shape:{points:t},style:a});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,a,i){for(var n=t.coordinateSystem,o=n.getDateInfo(a),s=[],l=0;l<7;l++){var u=n.getNextNDay(o.time,l),f=n.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return $(t)&&t?ck(t,a):K(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,i,n,o){var s=a[0],l=a[1],u=["center","bottom"];n==="bottom"?(l+=o,u=["center","top"]):n==="left"?s-=o:n==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(n==="left"||n==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,i,n){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,v=i==="horizontal"?0:1,c={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],h],right:[u[v][0],h]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Ct({z2:30,style:Gt(o,{text:y})});m.attr(this._yearTextPositionControl(m,c[l],i,l,s)),n.add(m)}},e.prototype._monthTextPositionControl=function(t,a,i,n,o){var s="left",l="top",u=t[0],f=t[1];return i==="horizontal"?(f=f+o,a&&(s="center"),n==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),n==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,i,n){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||$(s))&&(s&&(a=Op(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,c=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=0;d=i.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var i=Math.floor(t[1].time/Bc)-Math.floor(t[0].time/Bc)+1,n=new Date(t[0].time),o=n.getDate(),s=t[1].date.getDate();n.setDate(o+i-1);var l=n.getDate();if(l!==s)for(var u=n.getTime()-t[1].time>0?1:-1;(l=n.getDate())!==s&&(n.getTime()-t[1].time)*u>0;)i-=u,n.setDate(l-u);var f=Math.floor((i+t[0].day+6)/7),h=a?-f+1:f-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:f,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var i=this._getRangeInfo(a);if(e>i.weeks||e===0&&ti.lweek)return null;var n=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+n),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(i){var n=new r(i);a.push(n),i.coordinateSystem=n}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=a[i.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function Mx(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var pU=cU;function dU(r){r.registerComponentModel(fU),r.registerComponentView(vU),r.registerCoordinateSystem("calendar",pU)}function gU(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Dx(r,e){var t;return C(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function yU(r,e,t){var a=V({},t),i=r[e],n=t.$action||"merge";n==="merge"?i?(lt(i,a,!0),Xa(i,a,{ignoreSize:!0}),iA(t,i),bu(t,i),bu(t,i,"shape"),bu(t,i,"style"),bu(t,i,"extra"),t.clipPath=i.clipPath):r[e]=a:n==="replace"?r[e]=a:n==="remove"&&i&&(r[e]=null)}var _L=["transition","enterFrom","leaveTo"],mU=_L.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function bu(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?_L:mU,i=0;i=0;f--){var h=i[f],v=Jt(h.id,null),c=v!=null?o.get(v):null;if(!!c){var p=c.parent,y=je(p),m=p===n?{width:s,height:l}:{width:y.width,height:y.height},_={},S=ph(c,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!je(c).isNew&&S){for(var b=h.transition,x={},w=0;w=0)?x[T]=A:c[T]=A}Tt(c,x,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(i){Zu(i,je(i).option,a,t._lastGraphicModel)}),this._elMap=q()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Wt);function Cd(r){var e=Y(Lx,r)?Lx[r]:pg(r),t=new e({});return je(t).type=r,t}function Ix(r,e,t,a){var i=Cd(t);return e.add(i),a.set(r,i),je(i).id=r,je(i).isNew=!0,i}function Zu(r,e,t,a){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(n){Zu(n,e,t,a)}),Ih(r,e,a),t.removeKey(je(r).id))}function Px(r,e,t,a){r.isGroup||C([["cursor",or.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(i){var n=i[0];Y(e,n)?r[n]=ct(e[n],i[1]):r[n]==null&&(r[n]=i[1])}),C(mt(e),function(i){if(i.indexOf("on")===0){var n=e[i];r[i]=K(n)?n:null}}),Y(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function bU(r){return r=V({},r),C(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(aA),function(e){delete r[e]}),r}function wU(r,e,t){var a=at(r).eventData;!r.silent&&!r.ignore&&!a&&(a=at(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function TU(r){r.registerComponentModel(SU),r.registerComponentView(xU),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Rx=["x","y","radius","angle","single"],AU=["cartesian2d","polar","singleAxis"];function CU(r){var e=r.get("coordinateSystem");return vt(AU,e)>=0}function za(r){return r+"Axis"}function MU(r,e){var t=q(),a=[],i=q();r.eachComponent({mainType:"dataZoom",query:e},function(f){i.get(f.uid)||s(f)});var n;do n=!1,r.eachComponent("dataZoom",o);while(n);function o(f){!i.get(f.uid)&&l(f)&&(s(f),n=!0)}function s(f){i.set(f.uid,!0),a.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(v,c){var p=t.get(v);p&&p[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(t.get(h)||t.set(h,[]))[v]=!0})}return a}function SL(r){var e=r.ecModel,t={infoList:[],infoMap:q()};return r.eachTargetAxis(function(a,i){var n=e.getComponent(za(a),i);if(!!n){var o=n.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(n)}}}),t}var Vc=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),DU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,i){var n=Ex(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this._doInit(n)},e.prototype.mergeOption=function(t){var a=Ex(t);lt(this.option,t,!0),lt(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;C([["start","startValue"],["end","endValue"]],function(n,o){this._rangePropMode[o]==="value"&&(a[n[0]]=i[n[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=q(),i=this._fillSpecifiedTargetAxis(a);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(n){n.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return C(Rx,function(i){var n=this.getReferringComponents(za(i),WP);if(!!n.specified){a=!0;var o=new Vc;C(n.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var i=this.ecModel,n=!0;if(n){var o=a==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(n){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var h=u[0];if(!!h){var v=new Vc;if(v.add(h.componentIndex),t.set(f,v),n=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",qt).models[0];c&&C(u,function(p){h.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",qt).models[0]&&v.add(p.componentIndex)})}}}n&&C(Rx,function(u){if(!!n){var f=i.findComponents({mainType:za(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new Vc;h.add(f[0].componentIndex),t.set(u,h),n=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,i=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(n,o){var s=t[n[0]]!=null,l=t[n[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":i?a[o]=i[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,i){t==null&&(t=this.ecModel.getComponent(za(a),i))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(i,n){C(i.indexList,function(o){t.call(a,n,o)})})},e.prototype.getAxisProxy=function(t,a){var i=this.getAxisModel(t,a);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[a])return this.ecModel.getComponent(za(t),a)},e.prototype.setRawRange=function(t){var a=this.option,i=this.settledOption;C([["start","startValue"],["end","endValue"]],function(n){(t[n[0]]!=null||t[n[1]]!=null)&&(a[n[0]]=i[n[0]]=t[n[0]],a[n[1]]=i[n[1]]=t[n[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;C(["start","startValue","end","endValue"],function(i){a[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,i=this._targetAxisInfoMap.keys(),n=0;no[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else zn(f,function(c){if(n==="empty")l.setData(u=u.map(c,function(d){return s(d)?d:NaN}));else{var p={};p[c]=o,u.selectRange(p)}});zn(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;zn(["min","max"],function(i){var n=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?n=Pt(a[0]+o,a,[0,100],!0):n!=null&&(o=Pt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(!!t){var i=Pw(a,[0,500]);i=Math.min(i,20);var n=e.axis.scale.rawExtentInfo;t[0]!==0&&n.setDeterminedMinMax("min",+a[0].toFixed(i)),t[1]!==100&&n.setDeterminedMinMax("max",+a[1].toFixed(i)),n.freeze()}},r}();function OU(r,e,t){var a=[1/0,-1/0];zn(t,function(o){oV(a,o.getData(),e)});var i=r.getAxisModel(),n=VC(i.axis.scale,i,a).calculate();return[n.min,n.max]}var NU=kU,BU={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,s){var l=r.getComponent(za(o),s);i(o,s,l,n)})})}e(function(i,n,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,n,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new NU(i,n,s,r),t.push(o.__dzAxisProxy))});var a=q();return C(t,function(i){C(i.getTargetSeriesModels(),function(n){a.set(n.uid,n)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).reset(t)}),t.eachTargetAxis(function(a,i){t.getAxisProxy(a,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var i=a.getDataPercentWindow(),n=a.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}})}},VU=BU;function zU(r){r.registerAction("dataZoom",function(e,t){var a=MU(t,e);C(a,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Ox=!1;function Oy(r){Ox||(Ox=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,VU),zU(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function GU(r){r.registerComponentModel(IU),r.registerComponentView(EU),Oy(r)}var tr=function(){function r(){}return r}(),xL={};function Gn(r,e){xL[r]=e}function bL(r){return xL[r]}var FU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;C(this.option.feature,function(a,i){var n=bL(i);n&&(n.getDefaultOption&&(n.defaultOption=n.getDefaultOption(t)),lt(a,n.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(bt),HU=FU;function WU(r,e,t){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:t.getWidth(),height:t.getHeight()},o=te(a,n,i);qi(e.get("orient"),r,e.get("itemGap"),o.width,o.height),ph(r,a,n,i)}function wL(r,e){var t=yo(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new xt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var $U=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),h=[];C(u,function(p,d){h.push(d)}),new fa(this._featureNames||[],h).add(v).update(v).remove(it(v,null)).execute(),this._featureNames=h;function v(p,d){var g=h[p],y=h[d],m=u[g],_=new Nt(m,t,t.ecModel),S;if(n&&n.newTitle!=null&&n.featureName===g&&(m.title=n.newTitle),g&&!y){if(UU(g))S={onclick:_.option.onclick,featureName:g};else{var b=bL(g);if(!b)return;S=new b}f[g]=S}else if(S=f[y],!S)return;S.uid=go("toolbox-feature"),S.model=_,S.ecModel=a,S.api=i;var x=S instanceof tr;if(!g&&y){x&&S.dispose&&S.dispose(a,i);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(a,i);return}c(_,S,g),_.setIconStatus=function(w,T){var A=this.option,M=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[w]=T,M[w]&&(T==="emphasis"?la:ua)(M[w])},S instanceof tr&&S.render&&S.render(_,a,i,n)}function c(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof tr&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},b,x;$(_)?(b={},b[g]=_):b=_,$(S)?(x={},x[g]=S):x=S;var w=p.iconPaths={};C(b,function(T,A){var M=ul(T,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var D=M.ensureState("emphasis");D.style=m.getItemStyle();var L=new Ct({style:{text:x[A],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});M.setTextContent(L),co({el:M,componentModel:t,itemName:A,formatterParamsExtra:{title:x[A]}}),M.__title=x[A],M.on("mouseover",function(){var I=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",A])!=="emphasis"&&i.leaveEmphasis(this),L.hide()}),(p.get(["iconStatus",A])==="emphasis"?la:ua)(M),o.add(M),M.on("click",U(d.onclick,d,a,i,A)),w[A]=M})}WU(o,t,i),o.add(wL(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!K(_)&&d){var S=_.style||(_.style={}),b=il(d,Ct.makeFont(S)),x=p.x+o.x,w=p.y+o.y+s,T=!1;w+b.height>i.getHeight()&&(y.position="top",T=!0);var A=T?-5-b.height:s+10;x+b.width/2>i.getWidth()?(y.position=["100%",A],S.align="right"):x-b.width/2<0&&(y.position=[0,A],S.align="left")}})},e.prototype.updateView=function(t,a,i,n){C(this._features,function(o){o instanceof tr&&o.updateView&&o.updateView(o.model,a,i,n)})},e.prototype.remove=function(t,a){C(this._features,function(i){i instanceof tr&&i.remove&&i.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){C(this._features,function(i){i instanceof tr&&i.dispose&&i.dispose(t,a)})},e.type="toolbox",e}(Wt);function UU(r){return r.indexOf("my")===0}var YU=$U,ZU=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Mt.browser;if(K(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=n+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];c&&(p=window.atob(p));var d=n+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=i.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=n}},e.getDefaultOption=function(t){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(tr),XU=ZU,Nx="__ec_magicType_stack__",qU=[["line","bar"],["stack"]],KU=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),i={};return C(t.get("type"),function(n){a[n]&&(i[n]=a[n])}),i},e.getDefaultOption=function(t){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,i){var n=this.model,o=n.get(["seriesIndex",i]);if(!!Bx[i]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,p=Bx[i](v,c,h,n);p&&(Q(p,h.option),s.series.push(p));var d=h.coordinateSystem;if(d&&d.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,qt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};C(qU,function(h){vt(h,i)>=0&&C(h,function(v){n.setIconStatus(v,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=i;i==="stack"&&(u=lt({stack:n.option.title.tiled,tiled:n.option.title.stack},n.option.title),n.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(tr),Bx={line:function(r,e,t,a){if(r==="bar")return lt({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return lt({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var i=t.get("stack")===Nx;if(r==="line"||r==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),lt({id:e,stack:i?"":Nx},a.get(["option","stack"])||{},!0)}};Ur({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var QU=KU,Ph=new Array(60).join("-"),so=" ";function jU(r){var e={},t=[],a=[];return r.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function JU(r){var e=[];return C(r,function(t,a){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,s=[" "].concat(G(t.series,function(c){return c.name})),l=[i.model.getCategories()];C(t.series,function(c){var p=c.getRawData();l.push(c.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(so)],f=0;f=0)return!0}var Md=new RegExp("["+so+"]+","g");function a8(r){for(var e=r.split(/\n+/g),t=Vf(e.shift()).split(Md),a=[],i=G(t,function(l){return{name:l,data:[]}}),n=0;n=0;n--){var o=t[n];if(o[i])break}if(n<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function f8(r){var e=Ny(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return TL(t,function(i,n){for(var o=e.length-1;o>=0;o--)if(i=e[o][n],i){a[n]=i;break}}),a}function h8(r){AL(r).snapshots=null}function v8(r){return Ny(r).length}function Ny(r){var e=AL(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var c8=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){h8(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(tr);Ur({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var p8=c8,d8=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],g8=function(){function r(e,t,a){var i=this;this._targetInfoList=[];var n=Vx(t,e);C(y8,function(o,s){(!a||!a.include||vt(a.include,s)>=0)&&o(n,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,i,n){if((a.coordRanges||(a.coordRanges=[])).push(i),!a.coordRange){a.coordRange=i;var o=zc[a.brushType](0,n,i);a.__rangeOffset={offset:Hx[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){C(e,function(i){var n=this.findTargetInfo(i,t);n&&n!==!0&&C(n.coordSyses,function(o){var s=zc[i.brushType](1,o,i.range,!0);a(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){C(e,function(a){var i=this.findTargetInfo(a,t);if(a.range=a.range||[],i&&i!==!0){a.panelId=i.panelId;var n=zc[a.brushType](0,i.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?Hx[a.brushType](n.values,o.offset,m8(n.xyMinMax,o.xyMinMax)):n.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(a){var i=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:RD(i),isTargetByCursor:kD(i,e,a.coordSysModel),getLinearBrushOtherExtent:ED(i)}})},r.prototype.controlSeries=function(e,t,a){var i=this.findTargetInfo(e,a);return i===!0||i&&vt(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,i=Vx(t,e),n=0;nr[1]&&r.reverse(),r}function Vx(r,e){return gs(r,e,{includeMainTypes:d8})}var y8={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,i=r.gridModels,n=q(),o={},s={};!t&&!a&&!i||(C(t,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),C(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),C(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,f=[];C(u.getCartesians(),function(h,v){(vt(t,h.getAxis("x").model)>=0||vt(a,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Gx.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){C(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:Gx.geo})})}},zx=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Gx={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Xi(r)),e}},zc={lineX:it(Fx,0),lineY:it(Fx,1),rect:function(r,e,t,a){var i=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),n=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[Dd([i[0],n[0]]),Dd([i[1],n[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var i=[[1/0,-1/0],[1/0,-1/0]],n=G(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:n,xyMinMax:i}}};function Fx(r,e,t,a){var i=t.getAxis(["x","y"][r]),n=Dd(G([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s]),!0):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[r]=n,o[1-r]=[NaN,NaN],{values:n,xyMinMax:o}}var Hx={lineX:it(Wx,0),lineY:it(Wx,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(a,i){return[a[0]-t[0]*e[i][0],a[1]-t[1]*e[i][1]]})}};function Wx(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function m8(r,e){var t=$x(r),a=$x(e),i=[t[0]/a[0],t[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function $x(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var By=g8,Ld=C,_8=VP("toolbox-dataZoom_"),S8=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i,n){this._brushController||(this._brushController=new yy(i.getZr()),this._brushController.on("brush",U(this._onBrush,this)).mount()),w8(t,a,this,n,i),b8(t,a)},e.prototype.onclick=function(t,a,i){x8[i].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var i={},n=this.ecModel;this._brushController.updateCovers([]);var o=new By(Vy(this.model),n,{include:["grid"]});o.matchOutputRanges(a,n,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),u8(n,i),this._dispatchZoomAction(i);function s(u,f,h){var v=f.getAxis(u),c=v.model,p=l(u,c,n),d=p.findRepresentativeAxisProxy(c).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=cn(0,h.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var p=c.getAxisModel(u,f.componentIndex);p&&(v=c)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];Ld(t,function(i,n){a.push(J(i))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},e}(tr),x8={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(f8(this.ecModel))}};function Vy(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function b8(r,e){r.setIconStatus("back",v8(e)>1?"emphasis":"normal")}function w8(r,e,t,a,i){var n=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=n,r.setIconStatus("zoom",n?"emphasis":"normal");var o=new By(Vy(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(n&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}bk("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),i=[],n=Vy(a),o=gs(r,n);Ld(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Ld(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:_8+u+h};v[f]=h,i.push(v)}return i});var T8=S8;function A8(r){r.registerComponentModel(HU),r.registerComponentView(YU),Gn("saveAsImage",XU),Gn("magicType",QU),Gn("dataView",l8),Gn("dataZoom",T8),Gn("restore",p8),pt(GU)}var C8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(bt),M8=C8;function CL(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function ML(r){if(!!Mt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=n==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=n==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+i,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-h)/2)*100)/100;s+=";"+n+":-"+c+"px";var p=e+" solid "+i+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function k8(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,i="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,i+=Mt.transformSupported?","+zy+a:",left"+a+",top"+a),I8+":"+i}function Ux(r,e,t){var a=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Mt.transformSupported)return t?"top:"+i+";left:"+a+";":[["top",i],["left",a]];var n=Mt.transform3dSupported,o="translate"+(n?"3d":"")+"("+a+","+i+(n?",0":"")+")";return t?"top:0;left:0;"+zy+":"+o+";":[["top",0],["left",0],[DL,o]]}function O8(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=r.get("textShadowColor"),n=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return i&&n&&e.push("text-shadow:"+o+"px "+s+"px "+n+"px "+i),C(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function N8(r,e,t){var a=[],i=r.get("transitionDuration"),n=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=BA(r,"html"),v=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+v),e&&i&&a.push(k8(i,t)),n&&a.push("background-color:"+n),C(["width","color","radius"],function(c){var p="border-"+c,d=eA(p),g=r.get(d);g!=null&&a.push(p+":"+g+(c==="color"?"":"px"))}),a.push(O8(f)),h!=null&&a.push("padding:"+yo(h).join("px ")+"px"),a.join(";")+";"}function Yx(r,e,t,a,i){var n=e&&e.painter;if(t){var o=n&&n.getViewportRoot();o&&u2(r,o,document.body,a,i)}else{r[0]=a,r[1]=i;var s=n&&n.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var B8=function(){function r(e,t,a){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,Mt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),o=this._appendToBody=a&&a.appendToBody;Yx(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();qe(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){var t=this._container,a=L8(t,"position"),i=t.style;i.position!=="absolute"&&a!=="absolute"&&(i.position="relative");var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,i=a.style,n=this._styleCoord;a.innerHTML?i.cssText=P8+N8(e,!this._firstShow,this._longHide)+Ux(n[0],n[1],!0)+("border-color:"+an(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,i,n){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if($(n)&&a.get("trigger")==="item"&&!CL(a)&&(s=E8(a,i,n)),$(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l=0?this._tryShow(n,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,i=this._api,n=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&n!=="none"&&n!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,a,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,i,n){if(!(n.from===this.uid||Mt.node||!i.getDom())){var o=qx(n,i);this._ticket="";var s=n.dataByCoordSys,l=Y8(n,a,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:n.position,positionDefault:"bottom"},o)}else if(n.tooltip&&n.x!=null&&n.y!=null){var f=F8;f.x=n.x,f.y=n.y,f.update(),at(f).tooltipConfig={name:null,option:n.tooltip},this._tryShow({offsetX:n.x,offsetY:n.y,target:f},o)}else if(s)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:s,tooltipOption:n.tooltipOption},o);else if(n.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,i,n))return;var h=cL(n,a),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.el,position:n.position,positionDefault:"bottom"},o)}else n.x!=null&&n.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,n.from!==this.uid&&this._hide(qx(n,i))},e.prototype._manuallyAxisShowTip=function(t,a,i,n){var o=n.seriesIndex,s=n.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(!!u){var f=u.getData(),h=qo([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:n.position}),!0}}},e.prototype._tryShow=function(t,a){var i=t.target,n=this._tooltipModel;if(!!n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){this._lastDataByCoordSys=null;var s,l;Wn(i,function(u){if(at(u).dataIndex!=null)return s=u,!0;if(at(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(t,s,a):l?this._showComponentItemTooltip(t,l,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var i=t.get("showDelay");a=U(a,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(a,i):a()},e.prototype._showAxisTooltip=function(t,a){var i=this._ecModel,n=this._tooltipModel,o=[a.offsetX,a.offsetY],s=qo([a.tooltipOption],n),l=this._renderMode,u=[],f=ae("section",{blocks:[],noHeader:!0}),h=[],v=new Cv;C(t,function(m){C(m.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=uL(b,S.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=ae("section",{header:x,noHeader:!dr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),C(_.seriesDataIndices,function(T){var A=i.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=A.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Wg(S.axis,{value:b}),D.axisValueLabel=x,D.marker=v.makeTooltipMarker("item",an(D.color),l);var L=E0(A.formatTooltip(M,!0,null)),I=L.frag;if(I){var P=qo([A],n).get("valueFormatter");w.blocks.push(P?V({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(D)}})}})}),f.blocks.reverse(),h.reverse();var c=a.position,p=s.get("order"),d=z0(f,v,l,p,i.get("useUTC"),s.get("textStyle"));d&&h.unshift(d);var g=l==="richText"?` `:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,i){var n=this._ecModel,o=at(a),s=o.seriesIndex,l=n.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,p=t.positionDefault,d=qo([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new Cv;y.marker=m.makeTooltipMarker("item",an(y.color),c);var _=E0(u.formatTooltip(f,!1,h)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,w=x?z0(b?V({valueFormatter:b},x):x,m,c,S,n.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,i){var n=at(a),o=n.tooltipConfig,s=o.option||{};if($(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(n.componentMainType,n.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=t.positionDefault,v=qo(u,this._tooltipModel,h?{position:h}:null),c=v.get("content"),p=Math.random()+"",d=new Cv;this._showOrMove(v,function(){var g=J(v.get("formatterParams")||{});this._showTooltipContent(v,c,g,p,t.offsetX,t.offsetY,t.position,a,d)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,i,n,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var c=a,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),d=p.color;if(v)if($(v)){var g=t.ecModel.get("useUTC"),y=z(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=uh(y.axisValue,c,g)),c=rA(c,i,!0)}else if(K(v)){var _=U(function(S,b){S===this._ticket&&(h.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,h,i,u))},this);this._ticket=n,c=v(i,n,_)}else c=v;h.setContent(c,f,t,d,l),h.show(t,d),this._updatePosition(t,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(t,a,i,n){if(i==="axis"||z(a))return{color:n||(this._renderMode==="html"?"#fff":"none")};if(!z(a))return{color:n||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,i,n,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var h=o.getSize(),v=t.get("align"),c=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),K(a)&&(a=a([i,n],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),z(a))i=H(a[0],u),n=H(a[1],f);else if(j(a)){var d=a;d.width=h[0],d.height=h[1];var g=te(d,{width:u,height:f});i=g.x,n=g.y,v=null,c=null}else if($(a)&&l){var y=U8(a,p,h,t.get("borderWidth"));i=y[0],n=y[1]}else{var y=W8(i,n,o,u,f,v?null:20,c?null:20);i=y[0],n=y[1]}if(v&&(i-=Kx(v)?h[0]/2:v==="right"?h[0]:0),c&&(n-=Kx(c)?h[1]/2:c==="bottom"?h[1]:0),CL(t)){var y=$8(i,n,o,u,f);i=y[0],n=y[1]}o.moveTo(i,n)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var i=this._lastDataByCoordSys,n=this._cbParamsList,o=!!i&&i.length===t.length;return o&&C(i,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&C(u,function(v,c){var p=h[c]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&C(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),n&&C(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=n[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Mt.node||!a.getDom()||(Fs(this,"_updatePosition"),this._tooltipContent.dispose(),Td("itemTooltip",a))},e.type="tooltip",e}(Wt);function qo(r,e,t){var a=e.ecModel,i;t?(i=new Nt(t,a,a),i=new Nt(e.option,i,a)):i=e;for(var n=r.length-1;n>=0;n--){var o=r[n];o&&(o instanceof Nt&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(i=new Nt(o,i,a)))}return i}function qx(r,e){return r.dispatchAction||U(e.dispatchAction,e)}function W8(r,e,t,a,i,n,o){var s=t.getSize(),l=s[0],u=s[1];return n!=null&&(r+l+n+2>a?r-=l+n:r+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function $8(r,e,t,a,i){var n=t.getSize(),o=n[0],s=n[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function U8(r,e,t,a){var i=t[0],n=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+f/2-n/2;break;case"top":s=e.x+u/2-i/2,l=e.y-n-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+f+o;break;case"left":s=e.x-i-o,l=e.y+f/2-n/2;break;case"right":s=e.x+u+o,l=e.y+f/2-n/2}return[s,l]}function Kx(r){return r==="center"||r==="middle"}function Y8(r,e,t){var a=eg(r).queryOptionMap,i=a.keys()[0];if(!(!i||i==="series")){var n=nl(e,i,a.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=n.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=at(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}var Z8=H8;function X8(r){pt(Tl),r.registerComponentModel(M8),r.registerComponentView(Z8),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Kt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Kt)}var q8=["rect","polygon","keep","clear"];function K8(r,e){var t=Et(r?r.brush:[]);if(!!t.length){var a=[];C(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=r&&r.toolbox;z(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),Q8(s),e&&!s.length&&s.push.apply(s,q8)}}function Q8(r){var e={};C(r,function(t){e[t]=1}),r.length=0,C(e,function(t,a){r.push(a)})}var Qx=C;function jx(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Id(r,e,t){var a={};return Qx(e,function(n){var o=a[n]=i();Qx(r[n],function(s,l){if(!!fe.isValidType(l)){var u={type:l,visual:s};t&&t(u,n),o[l]=new fe(u),l==="opacity"&&(u=J(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new fe(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function IL(r,e,t){var a;C(t,function(i){e.hasOwnProperty(i)&&jx(e[i])&&(a=!0)}),a&&C(t,function(i){e.hasOwnProperty(i)&&jx(e[i])?r[i]=J(e[i]):delete r[i]})}function j8(r,e,t,a,i,n){var o={};C(r,function(h){var v=fe.prepareVisualTypes(e[h]);o[h]=v});var s;function l(h){return Rg(t,s,h)}function u(h,v){ZA(t,s,h,v)}n==null?t.each(f):t.each([n],f);function f(h,v){s=n==null?h:v;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(i,h),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&ab(e)}};function ab(r){return new ft(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var o9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new yy(a.getZr())).on("brush",U(this._onBrush,this)).mount()},e.prototype.render=function(t,a,i,n){this.model=t,this._updateController(t,a,i,n)},e.prototype.updateTransform=function(t,a,i,n){PL(a),this._updateController(t,a,i,n)},e.prototype.updateVisual=function(t,a,i,n){this.updateTransform(t,a,i,n)},e.prototype.updateView=function(t,a,i,n){this._updateController(t,a,i,n)},e.prototype._updateController=function(t,a,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:J(i),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:J(i),$from:a})},e.type="brush",e}(Wt),s9=o9,l9="#ddd",u9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&IL(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:l9},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=G(t,function(a){return ib(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=ib(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(bt);function ib(r,e){return lt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Nt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var f9=u9,h9=["rect","polygon","lineX","lineY","keep","clear"],v9=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,i){var n,o,s;a.eachComponent({mainType:"brush"},function(l){n=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=n,this._brushMode=o,C(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===n)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,i){this.render(t,a,i)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),i={};return C(t.get("type",!0),function(n){a[n]&&(i[n]=a[n])}),i},e.prototype.onclick=function(t,a,i){var n=this._brushType,o=this._brushMode;i==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?n:n===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:h9.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(tr),c9=v9;function p9(r){r.registerComponentView(s9),r.registerComponentModel(f9),r.registerPreprocessor(K8),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,e9),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Kt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Kt),Gn("brush",c9)}var d9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(bt),g9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){if(this.group.removeAll(),!!t.get("show")){var n=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ct(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Ct({style:Gt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=t.get("subtext"),c=new Ct({style:Gt(s,{text:v,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,c.silent=!d&&!g,p&&f.on("click",function(){cf(p,"_"+t.get("target"))}),d&&c.on("click",function(){cf(d,"_"+t.get("subtarget"))}),at(f).eventData=at(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(f),v&&n.add(c);var y=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=te(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),n.x=_.x,n.y=_.y,n.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),c.setStyle(S),y=n.getBoundingRect();var b=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new xt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});n.add(w)}},e.type="title",e}(Wt);function y9(r){r.registerComponentModel(d9),r.registerComponentView(g9)}var m9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],i=t.axisType,n=this._names=[],o;i==="category"?(o=[],C(a,function(u,f){var h=Jt(fo(u),""),v;j(u)?(v=J(u),v.value=f):v=f,o.push(v),n.push(h)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Te([{name:"value",type:s}],this);l.initData(o,n)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(bt),nb=m9,RL=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=ei(nb.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(nb);jt(RL,Mg.prototype);var _9=RL,S9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Wt),x9=S9,b9=function(r){k(e,r);function e(t,a,i,n){var o=r.call(this,t,a,i)||this;return o.type=n||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(br),w9=b9,Fc=Math.PI,ob=At(),T9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,i){if(this.model=t,this.api=i,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(n,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ae("nameValue",{noName:!0,value:f})},C(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](n,o,l,t)},this),this._renderAxisLabel(n,s,l,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var i=t.get(["label","position"]),n=t.get("orient"),o=C9(t,a),s;i==null||i==="auto"?s=n==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Fc/2},h=n==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),c=v.get("show",!0),p=c?v.get("itemSize"):0,d=c?v.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Fc/180;var m,_,S,b=v.get("position",!0),x=c&&v.get("showPlayBtn",!0),w=c&&v.get("showPrevBtn",!0),T=c&&v.get("showNextBtn",!0),A=0,M=h;b==="left"||b==="bottom"?(x&&(m=[0,0],A+=g),w&&(_=[A,0],A+=g),T&&(S=[M-p,0],M-=g)):(x&&(m=[M-p,0],M-=g),w&&(_=[0,0],A+=g),T&&(S=[M-p,0],M-=g));var D=[A,M];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:h,orient:n,rotation:f[n],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[n],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[n],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=nr(),l=o.x,u=o.y+o.height;zr(s,s,[-l,-u]),ln(s,s,-Fc/2),zr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(i.getBoundingRect()),v=m(n.getBoundingRect()),c=[i.x,i.y],p=[n.x,n.y];p[0]=c[0]=f[0][0];var d=t.labelPosOpt;if(d==null||$(d)){var g=d==="+"?0:1;_(c,h,f,1,g),_(p,v,f,1,1-g)}else{var g=d>=0?0:1;_(c,h,f,1,g),p[1]=c[1]+d}i.setPosition(c),n.setPosition(p),i.rotation=n.rotation=t.rotation,y(i),y(n);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var i=a.getData(),n=a.get("axisType"),o=A9(a,n);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new w9("value",o,t.axisExtent,n);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new rt;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,i,n){var o=i.getExtent();if(!!n.get(["lineStyle","show"])){var s=new oe({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:V({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new oe({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Q({lineCap:"round",lineWidth:s.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,i,n){var o=this,s=n.getData(),l=i.scale.getTicks();this._tickSymbols=[],C(l,function(u){var f=i.dataToCoord(u.value),h=s.getItemModel(u.value),v=h.getModel("itemStyle"),c=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:U(o._changeTimeline,o,u.value)},g=sb(h,v,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Zi(g);var y=at(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=n):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,i,n){var o=this,s=i.getLabelModel();if(!!s.get("show")){var l=n.getData(),u=i.getViewLabels();this._tickLabels=[],C(u,function(f){var h=f.tickValue,v=l.getItemModel(h),c=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=i.dataToCoord(f.tickValue),y=new Ct({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:U(o._changeTimeline,o,h),silent:!1,style:Gt(c,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Gt(p),y.ensureState("progress").style=Gt(d),a.add(y),Zi(y),ob(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,i,n){var o=t.controlSize,s=t.rotation,l=n.getModel("controlStyle").getItemStyle(),u=n.getModel(["emphasis","controlStyle"]).getItemStyle(),f=n.getPlayState(),h=n.get("inverse",!0);v(t.nextBtnPosition,"next",U(this._changeTimeline,this,h?"-":"+")),v(t.prevBtnPosition,"prev",U(this._changeTimeline,this,h?"+":"-")),v(t.playPosition,f?"stop":"play",U(this._handlePlayClick,this,!f),!0);function v(c,p,d,g){if(!!c){var y=_r(ct(n.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=M9(n,p+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,a.add(_),Zi(_)}}},e.prototype._renderCurrentPointer=function(t,a,i,n){var o=n.getData(),s=n.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=U(u._handlePointerDrag,u),h.ondragend=U(u._handlePointerDragend,u),lb(h,u._progressLine,s,i,n,!0)},onUpdate:function(h){lb(h,u._progressLine,s,i,n)}};this._currentPointer=sb(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var i=this._toAxisCoord(t)[0],n=this._axis,o=ar(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[n]=+o[n].toFixed(v)),[o,h]}var Hc={min:it(Au,"min"),max:it(Au,"max"),average:it(Au,"average"),median:it(Au,"median")};function tl(r,e){var t=r.getData(),a=r.coordinateSystem;if(e&&!O9(e)&&!z(e.coord)&&a){var i=a.dimensions,n=kL(e,t,a,r);if(e=J(e),e.type&&Hc[e.type]&&n.baseAxis&&n.valueAxis){var o=vt(i,n.baseAxis.dim),s=vt(i,n.valueAxis.dim),l=Hc[e.type](t,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],f=0;f<2;f++)Hc[u[f]]&&(u[f]=Fy(t,t.mapDimension(i[f]),u[f]));e.coord=u}}return e}function kL(r,e,t,a){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(N9(a,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function N9(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function el(r,e){return r&&r.containData&&e.coord&&!Rd(e)?r.containData(e.coord):!0}function B9(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Rd(e)&&!Rd(t)?r.containZone(e.coord,t.coord):!0}function OL(r,e){return r?function(t,a,i,n){var o=n<2?t.coord&&t.coord[n]:t.value;return Ha(o,e[n])}:function(t,a,i,n){return Ha(t.value,e[n])}}function Fy(r,e,t){if(t==="average"){var a=0,i=0;return r.each(e,function(n,o){isNaN(n)||(a+=n,i++)}),a/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Wc=At(),V9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=q()},e.prototype.render=function(t,a,i){var n=this,o=this.markerGroupMap;o.each(function(s){Wc(s).keep=!1}),a.eachSeries(function(s){var l=Ja.getMarkerModelFromSeries(s,n.type);l&&n.renderSeries(s,l,a,i)}),o.each(function(s){!Wc(s).keep&&n.group.remove(s.group)})},e.prototype.markKeep=function(t){Wc(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var i=this;C(t,function(n){var o=Ja.getMarkerModelFromSeries(n,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?uT(l):sg(l))})}})},e.type="marker",e}(Wt),Hy=V9;function fb(r,e,t){var a=e.coordinateSystem;r.each(function(i){var n=r.getItemModel(i),o,s=H(n.get("x"),t.getWidth()),l=H(n.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,i));else if(a){var u=r.get(a.dimensions[0],i),f=r.get(a.dimensions[1],i);o=a.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var z9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ja.getMarkerModelFromSeries(n,"markPoint");o&&(fb(o.getData(),n,i),this.markerGroupMap.get(n.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new ml),h=G9(o,t,a);a.setData(h),fb(a.getData(),t,n),h.each(function(v){var c=h.getItemModel(v),p=c.getShallow("symbol"),d=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(K(p)||K(d)||K(g)||K(y)){var _=a.getRawValue(v),S=a.getDataParams(v);K(p)&&(p=p(_,S)),K(d)&&(d=d(_,S)),K(g)&&(g=g(_,S)),K(y)&&(y=y(_,S))}var b=c.getModel("itemStyle").getItemStyle(),x=vl(l,"color");b.fill||(b.fill=x),h.setItemVisual(v,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){at(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(Hy);function G9(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return V(V({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Te(a,t),n=G(t.get("data"),it(tl,e));r&&(n=Rt(n,it(el,r)));var o=OL(!!r,a);return i.initData(n,null,o),i}var F9=z9;function H9(r){r.registerComponentModel(k9),r.registerComponentView(F9),r.registerPreprocessor(function(e){Gy(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var W9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Ja),$9=W9,Cu=At(),U9=function(r,e,t,a){var i=r.getData(),n;if(z(a))n=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=ne(a.yAxis,a.xAxis);else{var u=kL(a,i,e,r);s=u.valueAxis;var f=bC(i,u.valueDataDim);l=Fy(i,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=J(a),p={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,p.coord[v]=1/0;var d=t.get("precision");d>=0&&wt(l)&&(l=+l.toFixed(Math.min(d,20))),c.coord[h]=p.coord[h]=l,n=[c,p,{type:o,valueIndex:a.valueIndex,value:l}]}else n=[]}var g=[tl(r,n[0]),tl(r,n[1]),V({},n[2])];return g[2].type=g[2].type||null,lt(g[2],g[0]),lt(g[2],g[1]),g};function zf(r){return!isNaN(r)&&!isFinite(r)}function hb(r,e,t,a){var i=1-r,n=a.dimensions[r];return zf(e[i])&&zf(t[i])&&e[r]===t[r]&&a.getAxis(n).containData(e[r])}function Y9(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(hb(1,t,a,r)||hb(0,t,a,r)))return!0}return el(r,e[0])&&el(r,e[1])}function $c(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get("x"),i.getWidth()),u=H(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=n.dimensions,h=r.get(f[0],e),v=r.get(f[1],e);s=n.dataToPoint([h,v])}if(hn(n,"cartesian2d")){var c=n.getAxis("x"),p=n.getAxis("y"),f=n.dimensions;zf(r.get(f[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):zf(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Z9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ja.getMarkerModelFromSeries(n,"markLine");if(o){var s=o.getData(),l=Cu(o).from,u=Cu(o).to;l.each(function(f){$c(l,f,!0,n,i),$c(u,f,!1,n,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(n.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new hy);this.group.add(f.group);var h=X9(o,t,a),v=h.from,c=h.to,p=h.line;Cu(a).from=v,Cu(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");z(d)||(d=[d,d]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),z(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),p.each(function(S){var b=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]),b.stroke==null&&(b.stroke=v.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(p),h.line.eachItemGraphicEl(function(S){at(S).dataModel=a,S.traverse(function(b){at(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);$c(S,b,x,t,n);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=vl(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:ct(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:ct(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:ct(w.get("symbolSize"),g[x?0:1]),symbol:ct(w.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(Hy);function X9(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return V(V({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var i=new Te(a,t),n=new Te(a,t),o=new Te([],t),s=G(t.get("data"),it(U9,e,r,t));r&&(s=Rt(s,it(Y9,r)));var l=OL(!!r,a);return i.initData(G(s,function(u){return u[0]}),null,l),n.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}var q9=Z9;function K9(r){r.registerComponentModel($9),r.registerComponentView(q9),r.registerPreprocessor(function(e){Gy(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Q9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,i){return new e(t,a,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Ja),j9=Q9,Mu=At(),J9=function(r,e,t,a){var i=tl(r,a[0]),n=tl(r,a[1]),o=i.coord,s=n.coord;o[0]=ne(o[0],-1/0),o[1]=ne(o[1],-1/0),s[0]=ne(s[0],1/0),s[1]=ne(s[1],1/0);var l=$d([{},i,n]);return l.coord=[i.coord,n.coord],l.x0=i.x,l.y0=i.y,l.x1=n.x,l.y1=n.y,l};function Gf(r){return!isNaN(r)&&!isFinite(r)}function vb(r,e,t,a){var i=1-r;return Gf(e[i])&&Gf(t[i])}function tY(r,e){var t=e.coord[0],a=e.coord[1],i={coord:t,x:e.x0,y:e.y0},n={coord:a,x:e.x1,y:e.y1};return hn(r,"cartesian2d")?t&&a&&(vb(1,t,a)||vb(0,t,a))?!0:B9(r,i,n):el(r,i)||el(r,n)}function cb(r,e,t,a,i){var n=a.coordinateSystem,o=r.getItemModel(e),s,l=H(o.get(t[0]),i.getWidth()),u=H(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(t,e));else{var f=r.get(t[0],e),h=r.get(t[1],e),v=[f,h];n.clampData&&n.clampData(v,v),s=n.dataToPoint(v,!0)}if(hn(n,"cartesian2d")){var c=n.getAxis("x"),p=n.getAxis("y"),f=r.get(t[0],e),h=r.get(t[1],e);Gf(f)?s[0]=c.toGlobalCoord(c.getExtent()[t[0]==="x0"?0:1]):Gf(h)&&(s[1]=p.toGlobalCoord(p.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var pb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],eY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,i){a.eachSeries(function(n){var o=Ja.getMarkerModelFromSeries(n,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(pb,function(h){return cb(s,l,h,n,i)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,i,n){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new rt});this.group.add(f.group),this.markKeep(f);var h=rY(o,t,a);a.setData(h),h.each(function(v){var c=G(pb,function(T){return cb(h,v,T,t,n)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(h.get("x0",v)),p.parse(h.get("x1",v))],_=[d.parse(h.get("y0",v)),d.parse(h.get("y1",v))];ar(m),ar(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;h.setItemLayout(v,{points:c,allClipped:b});var x=h.getItemModel(v).getModel("itemStyle").getItemStyle(),w=vl(l,"color");x.fill||(x.fill=w,$(x.fill)&&(x.fill=Ju(x.fill,.4))),x.stroke||(x.stroke=w),h.setItemVisual(v,"style",x)}),h.diff(Mu(f).data).add(function(v){var c=h.getItemLayout(v);if(!c.allClipped){var p=new ke({shape:{points:c.points}});h.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,c){var p=Mu(f).data.getItemGraphicEl(c),d=h.getItemLayout(v);d.allClipped?p&&f.group.remove(p):(p?Tt(p,{shape:{points:d.points}},a,v):p=new ke({shape:{points:d.points}}),h.setItemGraphicEl(v,p),f.group.add(p))}).remove(function(v){var c=Mu(f).data.getItemGraphicEl(v);f.group.remove(c)}).execute(),h.eachItemGraphicEl(function(v,c){var p=h.getItemModel(c),d=h.getItemVisual(c,"style");v.useStyle(h.getItemVisual(c,"style")),_e(v,se(p),{labelFetcher:a,labelDataIndex:c,defaultText:h.getName(c)||"",inheritColor:$(d.fill)?Ju(d.fill,1):"#000"}),he(v,p),Yt(v,null,null,p.get(["emphasis","disabled"])),at(v).dataModel=a}),Mu(f).data=h,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(Hy);function rY(r,e,t){var a,i,n=["x0","y0","x1","y1"];if(r){var o=G(r&&r.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return V(V({},h),{name:u,ordinalMeta:null})});i=G(n,function(u,f){return{name:u,type:o[f%2].type}}),a=new Te(i,t)}else i=[{name:"value",type:"float"}],a=new Te(i,t);var s=G(t.get("data"),it(J9,e,r,t));r&&(s=Rt(s,it(tY,r)));var l=r?function(u,f,h,v){var c=u.coord[Math.floor(v/2)][v%2];return Ha(c,i[v])}:function(u,f,h,v){return Ha(u.value,i[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}var aY=eY;function iY(r){r.registerComponentModel(j9),r.registerComponentView(aY),r.registerPreprocessor(function(e){Gy(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var nY=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},oY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,i=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),z(a)&&C(a,function(n,o){$(n)&&(n={type:n}),a[o]=lt(n,nY(i,n.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,i=0;i=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.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}},e}(bt),Ed=oY,Rn=it,kd=C,Du=rt,sY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Du),this.group.add(this._selectorGroup=new Du),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,i,l,s,u);var f=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},v=t.get("padding"),c=te(f,h,v),p=this.layoutInner(t,o,c,n,l,u),d=te(Q({width:p.width,height:p.height},f),h,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=wL(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,i,n,o,s,l){var u=this.getContentGroup(),f=q(),h=a.get("selectedMode"),v=[];i.eachRawSeries(function(c){!c.get("legendHoverLink")&&v.push(c.id)}),kd(a.getData(),function(c,p){var d=c.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new Du;g.newline=!0,u.add(g);return}var y=i.getSeriesByName(d)[0];if(!f.get(d))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),b=m.getVisual("style"),x=this._createItem(y,d,p,c,a,t,_,b,S,h,n);x.on("click",Rn(db,d,null,n,v)).on("mouseover",Rn(Od,y.name,null,n,v)).on("mouseout",Rn(Nd,y.name,null,n,v)),f.set(d,!0)}else i.eachRawSeries(function(w){if(!f.get(d)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(d))return;var A=T.indexOfName(d),M=T.getItemVisual(A,"style"),D=T.getItemVisual(A,"legendIcon"),L=Ge(M.fill);L&&L[3]===0&&(L[3]=.2,M=V(V({},M),{fill:ra(L,"rgba")}));var I=this._createItem(w,d,p,c,a,t,{},M,D,h,n);I.on("click",Rn(db,null,d,n,v)).on("mouseover",Rn(Od,null,d,n,v)).on("mouseout",Rn(Nd,null,d,n,v)),f.set(d,!0)}},this)},this),o&&this._createSelector(o,a,n,s,l)},e.prototype._createSelector=function(t,a,i,n,o){var s=this.getSelectorGroup();kd(t,function(u){var f=u.type,h=new Ct({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);_e(h,{normal:v,emphasis:c},{defaultText:u.title}),Zi(h)})},e.prototype._createItem=function(t,a,i,n,o,s,l,u,f,h,v){var c=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=n.get("symbolRotate"),m=n.get("symbolKeepAspect"),_=n.get("icon");f=_||f||"roundRect";var S=lY(f,n,l,u,c,g,v),b=new Du,x=n.getModel("textStyle");if(K(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(uY({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,A=s,M=o.get("formatter"),D=a;$(M)&&M?D=M.replace("{name}",a!=null?a:""):K(M)&&(D=M(a));var L=n.get("inactiveColor");b.add(new Ct({style:Gt(x,{text:D,x:T,y:d/2,fill:g?x.getTextColor():L,align:A,verticalAlign:"middle"})}));var I=new xt({shape:b.getBoundingRect(),invisible:!0}),P=n.getModel("tooltip");return P.get("show")&&co({el:I,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(b),Zi(b),b.__legendDataIndex=i,b},e.prototype.layoutInner=function(t,a,i,n,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();qi(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){qi("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?c[d]+=f[g]+p:h[d]+=v[g]+p,c[1-d]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+p+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-d]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Wt);function lY(r,e,t,a,i,n,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),kd(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:eo(h,o),u.fill==="inherit"&&(u.fill=a[i]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?a:t).opacity),s(u,a);var v=e.getModel("lineStyle"),c=v.getLineStyle();if(s(c,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!n){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function uY(r){var e=r.icon||"roundRect",t=Qt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function db(r,e,t,a){Nd(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),Od(r,e,t,a)}function NL(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,i=e.length;ai[o],g=[-c.x,-c.y];a||(g[n]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=ct(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[n]+=i[o]-p[o]:y[n]+=p[o]+_}m[1-n]+=c[s]/2-p[s]/2,f.setPosition(g),h.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=d?i[o]:c[o],b[s]=Math.max(c[s],p[s]),b[l]=Math.min(0,p[l]+m[1-n]),h.__rectSize=i[o],d){var x={x:0,y:0};x[o]=Math.max(i[o]-p[o]-_,0),x[s]=b[s],h.setClipPath(new xt({shape:x})),h.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Tt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,i){var n=this._getPageInfo(a)[t];n!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var i=this._controllerGroup;C(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=a[h]!=null,c=i.childOfName(f);c&&(c.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;n&&o&&n.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,s=Uc[o],l=Yc[o],u=this._findTargetItemIndex(a),f=i.children(),h=f[u],v=f.length,c=v?1:0,p={contentPosition:[i.x,i.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var d=S(h);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+n||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+n}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,i=this.getContentGroup(),n;return i.eachChild(function(o,s){var l=o.__legendDataIndex;n==null&&l!=null&&(n=s),l===t&&(a=s)}),a!=null?a:n},e.type="legend.scroll",e}(BL),dY=pY;function gY(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(a)})})}function yY(r){pt(VL),r.registerComponentModel(cY),r.registerComponentView(dY),gY(r)}function mY(r){pt(VL),pt(yY)}var _Y=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=ei(Js.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Js),SY=_Y,Wy=At();function xY(r,e,t){Wy(r).coordSysRecordMap.each(function(a){var i=a.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function bY(r,e){for(var t=Wy(r).coordSysRecordMap,a=t.keys(),i=0;ia[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function MY(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=Wy(t),i=a.coordSysRecordMap||(a.coordSysRecordMap=q());i.each(function(n){n.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(n){var o=SL(n);C(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,wY(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=q());f.set(n.uid,{dzReferCoordSysInfo:s,model:n,getRange:null})})}),i.each(function(n){var o=n.controller,s,l=n.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){zL(i,n);return}var f=CY(l);o.enable(f.controlType,f.opt),o.setPointerChecker(n.containsPoint),bo(n,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var DY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),xY(i,t,{pan:U(Zc.pan,this),zoom:U(Zc.zoom,this),scrollMove:U(Zc.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){bY(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(ky),Zc={zoom:function(r,e,t,a){var i=this.range,n=i.slice(),o=r.axisModels[0];if(!!o){var s=Xc[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(cn(0,n,[0,100],0,f.minSpan,f.maxSpan),this.range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:mb(function(r,e,t,a,i,n){var o=Xc[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:mb(function(r,e,t,a,i,n){var o=Xc[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*n.scrollDelta})};function mb(r){return function(e,t,a,i){var n=this.range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,a,i);if(cn(l,o,[0,100],"all"),this.range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Xc={grid:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],n.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(r,e,t,a,i){var n=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(r,e,t,a,i){var n=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},LY=DY;function GL(r){Oy(r),r.registerComponentModel(SY),r.registerComponentView(LY),MY(r)}var IY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ei(Js.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Js),PY=IY,jo=xt,_b=7,RY=1,qc=30,EY=7,Jo="horizontal",Sb="vertical",kY=5,OY=["line","bar","candlestick","scatter"],NY={easing:"cubicOut",duration:100,delay:0},BY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=U(this._onBrush,this),this._onBrushEnd=U(this._onBrushEnd,this)},e.prototype.render=function(t,a,i,n){if(r.prototype.render.apply(this,arguments),bo(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!n||n.type!=="dataZoom"||n.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Fs(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new rt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,i=t.get("brushSelect"),n=i?EY:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===Jo?{right:s.width-o.x-o.width,top:s.height-qc-_b-n,width:o.width,height:qc}:{right:_b,top:o.y,width:qc,height:o.height},u=mo(t.option);C(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=te(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Sb&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Jo&&!o?{scaleY:l?1:-1,scaleX:1}:i===Jo&&o?{scaleY:l?1:-1,scaleX:-1}:i===Sb&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,i=this._displayables.sliderGroup,n=t.get("brushSelect");i.add(new jo({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new jo({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:U(this._onClickPanel,this)}),s=this.api.getZr();n?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,i=this._shadowSize||[],n=t.series,o=n.getRawData(),s=n.getShadowDim?n.getShadowDim():t.otherDim;if(s==null)return;var l=this._shadowPolygonPts,u=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||a[0]!==i[0]||a[1]!==i[1]){var f=o.getDataExtent(s),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var v=[0,a[1]],c=[0,a[0]],p=[[a[0],0],[0,0]],d=[],g=c[1]/(o.count()-1),y=0,m=Math.round(o.count()/a[0]),_;o.each([s],function(T,A){if(m>0&&A%m){y+=g;return}var M=T==null||isNaN(T)||T==="",D=M?0:Pt(T,f,v,!0);M&&!_&&A?(p.push([p[p.length-1][0],0]),d.push([d[d.length-1][0],0])):!M&&_&&(p.push([y,0]),d.push([y,0])),p.push([y,D]),d.push([y,D]),y+=g,_=M}),l=this._shadowPolygonPts=p,u=this._shadowPolylinePts=d}this._shadowData=o,this._shadowDim=s,this._shadowSize=[a[0],a[1]];var S=this.dataZoomModel;function b(T){var A=S.getModel(T?"selectedDataBackground":"dataBackground"),M=new rt,D=new ke({shape:{points:l},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new Oe({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return M.add(D),M.add(L),M}for(var x=0;x<3;x++){var w=b(x===1);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();C(l,function(u){if(!i&&!(a!==!0&&vt(OY,u.get("type"))<0)){var f=n.getComponent(za(o),s).axis,h=VY(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),i={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:v}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,i=a.handles=[null,null],n=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),v=a.filler=new jo({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new jo({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:RY,fill:"rgba(0,0,0,0)"}})),C([0,1],function(_){var S=l.get("handleIcon");!gf[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Qt(S,-1,0,2,2,null,!0);b.attr({cursor:xb(this._orient),draggable:!0,drift:U(this._onDragMove,this,_),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=H(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Zi(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(i[_]=b);var A=l.getModel("textStyle");t.add(n[_]=new Ct({silent:!0,invisible:!0,style:Gt(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var c=v;if(h){var p=H(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new xt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=Qt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));c=a.moveZone=new xt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),c.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:xb(this._orient),drift:U(this._onDragMove,this,"all"),ondragstart:U(this._showDataInfo,this,!0),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Pt(t[0],[0,100],a,!0),Pt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];cn(a,n,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Pt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=ar([Pt(n[0],o,l,!0),Pt(n[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var a=this._displayables,i=this._handleEnds,n=ar(i.slice()),o=this._size;C([0,1],function(c){var p=a.handles[c],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:i[c]+(c?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]});var s={x:n[0],width:n[1]-n[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,n[0],n[1],o[0]],f=0;fa[0]||i[1]<0||i[1]>a[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,i=t.offsetY;this._brushStart=new st(a,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var i=a.shape,n=+new Date;if(!(n-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=ar([Pt(i.x,o,s,!0),Pt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(oa(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var i=this._displayables,n=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new jo({silent:!0,style:n.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?NY:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=SL(this.dataZoomModel).infoList;if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var n=this.api.getWidth(),o=this.api.getHeight();t={x:n*.2,y:o*.2,width:n*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(ky);function VY(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function xb(r){return r==="vertical"?"ns-resize":"ew-resize"}var zY=BY;function FL(r){r.registerComponentModel(PY),r.registerComponentView(zY),Oy(r)}function GY(r){pt(GL),pt(FL)}var FY={get:function(r,e,t){var a=J((HY[r]||{})[e]);return t&&z(a)?a[a.length-1]:a}},HY={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},HL=FY,bb=fe.mapVisual,WY=fe.eachVisual,$Y=z,wb=C,UY=ar,YY=Pt,ZY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,a){var i=this.option;!a&&IL(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=U(t,this),this.controllerVisuals=Id(this.option.controller,a,t),this.targetVisuals=Id(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,n){a.push(n)}):a=Et(t),a},e.prototype.eachTargetSeries=function(t,a){C(this.getTargetSeriesIndices(),function(i){var n=this.ecModel.getSeriesByIndex(i);n&&t.call(a,n)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(i){i===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,i){var n=this.option,o=n.precision,s=this.dataBound,l=n.formatter,u;i=i||["<",">"],z(t)&&(t=t.slice(),u=!0);var f=a?t:u?[h(t[0]),h(t[1])]:h(t);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(K(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+f[1]:t[1]===s[1]?i[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=UY([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,i={inRange:a.inRange,outOfRange:a.outOfRange},n=a.target||(a.target={}),o=a.controller||(a.controller={});lt(n,i),lt(o,i);var s=this.isCategory();l.call(this,n),l.call(this,o),u.call(this,n,"inRange","outOfRange"),f.call(this,o);function l(h){$Y(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,v,c){var p=h[v],d=h[c];p&&!d&&(d=h[c]={},wb(p,function(g,y){if(!!fe.isValidType(y)){var m=HL.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";wb(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&J(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&J(c)||(s?m[0]:[m[0],m[0]])),_.symbol=bb(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;WY(S,function(x){x>b&&(b=x)}),_.symbolSize=bb(S,function(x){return YY(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(bt),Ff=ZY,Tb=[20,140],XY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Tb[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Tb[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),C(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=ar((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=i[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&n.push(l)},this),a.push({seriesId:i.id,dataIndex:n})},this),a},e.prototype.getVisualMeta=function(t){var a=Ab(this,"outOfRange",this.getExtent()),i=Ab(this,"inRange",this.option.range.slice()),n=[];function o(c,p){n.push({value:c,color:t(c,p)})}for(var s=0,l=0,u=i.length,f=a.length;lt[1])break;n.push({color:this.getControllerVisual(l,"color",a),offset:s/i})}return n.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),n},e.prototype._createBarPoints=function(t,a){var i=this.visualMapModel.itemSize;return[[i[0]-a[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,i=this.visualMapModel.get("inverse");return new rt(a==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(!!this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=n.itemSize,u=n.getExtent();QY([0,1],function(f){var h=o[f];h.setStyle("fill",a.handlesColor[f]),h.y=t[f];var v=Lr(t[f],[0,l[1]],u,!0),c=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=c/l[0],h.x=l[0]-c/2;var p=mr(i.handleLabelPoints[f],Xi(h,this.group));s[f].setStyle({x:p[0],y:p[1],text:n.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,i,n){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(!!h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",v),p=this.getControllerVisual(t,"symbolSize"),d=Lr(t,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=mr(f.indicatorLabelPoint,Xi(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:d,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(w,A),_.animateTo(T,A)}else h.attr(w),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var v=this._hoverLinkDataIndices,c=[];(a||Lb(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=FP(v,c);this._dispatchHighDown("downplay",Xu(p[0],i)),this._dispatchHighDown("highlight",Xu(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a=t.target,i=this.visualMapModel;if(!(!a||at(a).dataIndex==null)){var n=at(a),o=this.ecModel.getSeriesByIndex(n.seriesIndex);if(!!i.isTargetSeries(o)){var s=o.getData(n.dataType),l=s.getStore().get(i.getDataDimensionIndex(s),n.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var i=0;i=0&&(n.dimension=o,a.push(n))}}),r.getData().setVisual("visualMeta",a)}}];function oZ(r,e,t,a){for(var i=e.targetVisuals[a],n=fe.prepareVisualTypes(i),o={color:vl(r.getData(),"color")},s=0,l=n.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(aZ,iZ),C(nZ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(sZ))}function YL(r){r.registerComponentModel(qY),r.registerComponentView(rZ),UL(r)}var lZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],uZ[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var n=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=J(n)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=J(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},i=fe.listVisualTypes(),n=this.isCategory();C(t.pieces,function(s){C(i,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),C(a,function(s,l){var u=!1;C(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&C(this.stateList,function(f){(t[f]||(t[f]={}))[l]=HL.get(l,f==="inRange"?"active":"inactive",n)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var i=this.option,n=this._pieceList,o=(a?i:t).selected||{};if(i.selected=o,C(n,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),i.selectedMode==="single"){var s=!1;C(n,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=J(t)},e.prototype.getValueState=function(t){var a=fe.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],i=this._pieceList;return this.eachTargetSeries(function(n){var o=[],s=n.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=fe.findPieceIndex(l,i);f===t&&o.push(u)},this),a.push({seriesId:n.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var i=t.interval||[];a=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],i=["",""],n=this;function o(f,h){var v=n.getRepresentValue({interval:f});h||(h=n.getValueState(v));var c=t(v,h);f[0]===-1/0?i[0]=c:f[1]===1/0?i[1]=c:a.push({value:f[0],color:c},{value:f[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return C(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=ei(Ff.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Ff),uZ={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(t)!==n&&t<5;)t++;e.precision=t,n=+n.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function Eb(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var fZ=lZ,hZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,i=a.get("textGap"),n=a.textStyleModel,o=n.getFont(),s=n.getTextColor(),l=this._getItemAlign(),u=a.itemSize,f=this._getViewData(),h=f.endsText,v=ne(a.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],u,v,l),C(f.viewPieceList,function(c){var p=c.piece,d=new rt;d.onclick=U(this._onItemClick,this,p),this._enableHoverLink(d,c.indexInModelPieceList);var g=a.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),v){var y=this.visualMapModel.getValueState(g);d.add(new Ct({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),h&&this._renderEndsText(t,h[1],u,v,l),qi(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var i=this;t.on("mouseover",function(){return n("highlight")}).on("mouseout",function(){return n("downplay")});var n=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Xu(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return $L(t,this.api,t.itemSize);var i=a.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,a,i,n,o){if(!!a){var s=new rt,l=this.visualMapModel.textStyleModel;s.add(new Ct({style:Gt(l,{x:n?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return(n==="horizontal"?o:!o)?a.reverse():i&&(i=i.slice().reverse()),{viewPieceList:a,endsText:i}},e.prototype._createItemSymbol=function(t,a,i){t.add(Qt(this.getControllerVisual(a,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(a,"color")))},e.prototype._onItemClick=function(t){var a=this.visualMapModel,i=a.option,n=i.selectedMode;if(!!n){var o=J(i.selected),s=a.getSelectedMapKey(t);n==="single"||n===!0?(o[s]=!0,C(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(WL),vZ=hZ;function ZL(r){r.registerComponentModel(fZ),r.registerComponentView(vZ),UL(r)}function cZ(r){pt(YL),pt(ZL)}var pZ={label:{enabled:!0},decal:{show:!1}},kb=At(),dZ={};function gZ(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=J(pZ);lt(a.label,r.getLocaleModel().get("aria"),!1),lt(t.option,a,!1),i(),n();function i(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=q();r.eachSeries(function(v){if(!v.isColorBySeries()){var c=h.get(v.type);c||(c={},h.set(v.type,c)),kb(v).scope=c}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(K(v.enableAriaDecal)){v.enableAriaDecal();return}var c=v.getData();if(v.isColorBySeries()){var m=Vp(v.ecModel,v.name,dZ,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var p=v.getRawData(),d={},g=kb(v).scope;c.each(function(b){var x=c.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],w=p.getName(b)||b+"",T=Vp(v.ecModel,w,g,y),A=c.getItemVisual(x,"decal");c.setItemVisual(x,"decal",S(A,T))})}function S(b,x){var w=b?V(V({},x),b):x;return w.dirty=!0,w}})}}function n(){var u=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=Q(f.option,u),!!f.get("enabled")){var h=e.getZr().dom;if(f.get("description")){h.setAttribute("aria-label",f.get("description"));return}var v=r.getSeriesCount(),c=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],S=v>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,A){if(A1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>c){var P=f.get(["data","partialData"]);M+=o(P,{displayCnt:c})}else M+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),E=f.get(["data","separator","end"]),N=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},_Z=function(){function r(e){var t=this._condVal=$(e)?new RegExp(e):t2(e)?e:null;if(t==null){var a="";Lt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return $(t)?this._condVal.test(e):wt(t)?this._condVal.test(e+""):!1},r}(),SZ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),xZ=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(i),i=[I,P]}function f(I,P,R,E){Yn(I,R)&&Yn(P,E)||i.push(I,P,R,E,R,E)}function h(I,P,R,E,N,O){var B=Math.abs(P-I),F=Math.tan(B/4)*4/3,W=PT:D2&&a.push(i),a}function Vd(r,e,t,a,i,n,o,s,l,u){if(Yn(r,t)&&Yn(e,a)&&Yn(i,o)&&Yn(n,s)){l.push(o,s);return}var f=2/u,h=f*f,v=o-r,c=s-e,p=Math.sqrt(v*v+c*c);v/=p,c/=p;var d=t-r,g=a-e,y=i-o,m=n-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var A=[],M=[];Ya(r,t,i,o,.5,A),Ya(e,a,n,s,.5,M),Vd(A[0],M[0],A[1],M[1],A[2],M[2],A[3],M[3],l,u),Vd(A[4],M[4],A[5],M[5],A[6],M[6],A[7],M[7],l,u)}function OZ(r,e){var t=Bd(r),a=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=qL([l,u],f?0:1,e),v=(f?s:u)/h.length,c=0;ci,o=qL([a,i],n?0:1,e),s=n?"width":"height",l=n?"height":"width",u=n?"x":"y",f=n?"y":"x",h=r[s]/o.length,v=0;v1?null:new st(d*l+r,d*u+e)}function VZ(r,e,t){var a=new st;st.sub(a,t,e),a.normalize();var i=new st;st.sub(i,r,e);var n=i.dot(a);return n}function kn(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function zZ(r,e,t){for(var a=r.length,i=[],n=0;no?(u.x=f.x=s+n/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+n),zZ(e,u,f)}function Hf(r,e,t,a){if(t===1)a.push(e);else{var i=Math.floor(t/2),n=r(e);Hf(r,n[0],i,a),Hf(r,n[1],t-i,a)}return a}function GZ(r,e){for(var t=[],a=0;a0)for(var b=a/t,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),T=Math.cos(x),A=0,_=0;_0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Uf(r){var e=1/0,t=1/0,a=-1/0,i=-1/0,n=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),a=Math.max(f,a),i=Math.max(h,i),[f,h]}),o=G(n,function(s,l){return{cp:s,z:qZ(s[0],s[1],e,t,a,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function jL(r){return WZ(r.path,r.count)}function zd(){return{fromIndividuals:[],toIndividuals:[],count:0}}function KZ(r,e,t){var a=[];function i(b){for(var x=0;x=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var n=l.length,u=Math.ceil(n/2);t[i].many=l.slice(u,n),t[s].many=l.slice(0,u),s++}return t}var jZ={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;Wb(r)&&(u=r,f=e),Wb(e)&&(u=e,f=r);function h(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,A=m?w:x[0];if(Wf(T))h({many:[T],one:A},!0,_,S,!0);else{var M=s?Q({delay:s(_,S)},l):l;Uy(T,A,M),n(T,A,T,A,M)}}else for(var D=Q({dividePath:jZ[t],individualDelay:s&&function(N,O,B,F){return s(N+_,S)}},l),L=m?KZ(x,w,D):QZ(w,x,D),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Ee.length,c=u?$b(f,u):$b(v?e:r,[v?r:e]),p=0,d=0;dJL))for(var i=a.getIndices(),n=tX(a),o=0;o0&&S.group.traverse(function(x){x instanceof gt&&!x.animators.length&&x.animateFrom({style:{opacity:0}},b)})})}function Yb(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function Zb(r){return z(r)?r.sort().join(","):r}function La(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function aX(r,e){var t=q(),a=q(),i=q();return C(r.oldSeries,function(n,o){var s=r.oldData[o],l=Yb(n),u=Zb(l);a.set(u,s),z(l)&&C(l,function(f){i.set(f,{data:s,key:u})})}),C(e.updatedSeries,function(n){if(n.isUniversalTransitionEnabled()&&n.isAnimationEnabled()){var o=n.getData(),s=Yb(n),l=Zb(s),u=a.get(l);if(u)t.set(l,{oldSeries:[{divide:La(u),data:u}],newSeries:[{divide:La(o),data:o}]});else if(z(s)){var f=[];C(s,function(c){var p=a.get(c);p&&f.push({divide:La(p),data:p})}),f.length&&t.set(l,{oldSeries:f,newSeries:[{data:o,divide:La(o)}]})}else{var h=i.get(s);if(h){var v=t.get(h.key);v||(v={oldSeries:[{data:h.data,divide:La(h.data)}],newSeries:[]},t.set(h.key,v)),v.newSeries.push({data:o,divide:La(o)})}}}}),t}function Xb(r,e){for(var t=0;t=0&&i.push({data:e.oldData[s],divide:La(e.oldData[s]),dim:o.dimension})}),C(Et(r.to),function(o){var s=Xb(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();n.push({data:l,divide:La(l),dim:o.dimension})}}),i.length>0&&n.length>0&&tI(i,n,a)}function nX(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){C(Et(a.seriesTransition),function(i){C(Et(i.to),function(n){for(var o=a.updatedSeries,s=0;sr.practiceThisWeeks.map(s=>s.subjectName));let t;const a=s=>{const{content:l}=s;if(!l)return;t&&t.dispose(),r.sum=l.sum||{},r.practiceThisWeeks=l.practiceThisWeeks||[];const u=document.getElementById("subjectEcharts");t=jN(u);const f={tooltip:{trigger:"axis",showContent:!1,axisPointer:{type:"line",lineStyle:{width:30,type:"solid",opacity:.2}}},grid:{left:8,top:5,right:5,bottom:5,containLabel:!0},legend:{type:"plain",align:"auto",itemGap:10,itemWidth:6,itemStyle:{opacity:0},lineStyle:{width:0,opacity:0},textStyle:{opacity:0}},xAxis:{type:"category",axisLine:{show:!1},axisLabel:{interval:0,color:"#333",fontSize:9},axisTick:{alignWithLabel:!0,show:!1},data:e.value},yAxis:[{type:"value",position:"left",axisLine:{show:!1,lineStyle:{color:"#999"}},splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},min:0,splitNumber:5},{type:"value",position:"right",splitLine:{show:!0,lineStyle:{color:["rgba(249, 234, 220, 1)"]}},axisLine:{show:!1,lineStyle:{color:"#999"}},interval:20,min:0,max:100,splitNumber:5,axisLabel:{formatter:function(v,c){return v+"%"}}}],series:["practiceRate","passNum","noPassNum","noMemberNum"].map((v,c)=>({name:r.colors[c].text,color:r.colors[c].color,...oX,yAxisIndex:c===0?1:0,data:r.practiceThisWeeks.map(p=>p[v])}))};let h=Math.max(...f.series.map(v=>v.data).flat());Math.min(...f.series.map(v=>v.data).flat()),h=Math.ceil(h/9.5)*10,f.yAxis[0].interval=Math.ceil(Math.ceil(h)/5),f.yAxis[0].max=Math.ceil(Math.ceil(h)/5)*5,f&&t.setOption(f),t.on("highlight",function(v){r.index=v.batch[0].dataIndex})},i=s=>{r.index=s,t==null||t.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:s})},n=s=>{t==null||t.dispatchAction({type:s.select?"legendUnSelect":"legendSelect",name:s.text}),s.select=!s.select};aI(()=>{iI("setAccomanyEcharts",a),Zy({api:"setAccomanyEcharts"})}),nI(()=>{oI("setAccomanyEcharts",a)});const o=()=>{const s=location.origin+location.pathname+"#/exercise-record";console.log("\u{1F680} ~ url:",s),Zy({api:"openWebView",content:{url:s,orientation:1}})};return()=>nt("div",{class:_t.subjectEcharts},[nt("div",{class:[_t.container,_t.ensemble]},[nt("div",{class:_t.head},[nt("div",{class:_t.headLeft},[nt("img",{class:_t.icon,src:BI},null),nt("div",null,[Aa("\u603B\u4F53\u60C5\u51B5")])])]),nt("div",{class:_t.content,onClick:()=>o()},[nt(OI,{value:Number(r.sum.practiceRate),size:80,color:"#FF8057",strokeWidth:6},null),nt("div",{class:_t.items},[nt("div",{class:_t.item},[nt("div",{class:_t.itemNum},[nt("span",{class:_t.rect},null),nt("span",{style:{color:"#FF8057"}},[r.sum.passNum])]),nt("div",{class:_t.itemTitle},[Aa("\u8FBE\u6807\u4EBA\u6570")])]),nt("div",{class:[_t.item,_t.line]},[nt("div",{class:_t.itemNum},[nt("span",{class:_t.rect,style:{background:"#FFE7DF"}},null),nt("span",null,[r.sum.noPassNum])]),nt("div",{class:_t.itemTitle},[Aa("\u672A\u8FBE\u6807\u4EBA\u6570")])]),nt("div",{class:_t.item},[nt("div",{class:_t.itemNum},[nt("span",null,[r.sum.noMemberNum])]),nt("div",{class:_t.itemTitle},[Aa("\u975E\u4F1A\u5458\u4EBA\u6570")])])])])]),nt("div",{class:[_t.container,_t.ensemble]},[nt("div",{class:_t.head},[nt("div",{class:_t.headLeft},[nt("img",{class:_t.icon,src:NI},null),nt("div",null,[Aa("\u58F0\u90E8\u60C5\u51B5")])]),nt("div",{class:_t.headRight},[r.colors.map(s=>nt("div",{style:s.select?{color:"#fff",borderColor:s.color,backgroundColor:s.color}:{color:s.color,borderColor:s.borderColor},onClick:()=>n(s)},[s.text]))])]),nt("div",{class:_t.headLabelWrap},[r.colors.map((s,l)=>nt("div",{class:_t.headLabel,style:{display:s.select?"":"none"}},[nt("div",{class:_t.headLabelDot,style:{background:s.color,color:s.color}},null),nt("div",{style:{color:s.color}},[r.sum[s.key]||0,l===0?"%":"\u4EBA"])]))]),nt("div",{id:"subjectEcharts",class:_t.echartsMain},null),!r.practiceThisWeeks.length&&nt("div",{class:_t.emtry},[Aa("\u6682\u65E0\u7EC3\u4E60\u8BB0\u5F55")])]),nt("div",{class:[_t.container,_t.subjectWrap]},[r.practiceThisWeeks.map((s,l)=>nt("div",{class:[_t.listItem,l===r.index?_t.listItemActive:""],onClick:()=>i(l)},[nt("div",{class:_t.dot},null),nt("div",{class:_t.itemLeft},[nt("div",{class:_t.subjectName},[s.subjectName]),nt("div",{class:_t.subjectType},[Aa("\u58F0\u90E8")])]),nt("div",{class:_t.listitems},[r.colors.map((u,f)=>nt("div",{class:_t.item},[nt("div",{class:_t.itemNum},[nt("span",{style:{color:u.color}},[s[u.key],f===0?"%":""])]),nt("div",{class:_t.itemTitle},[u.text,f===0?"":"\u4EBA\u6570"])]))])]))])])}});export{lX as default};