/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);a&&(e.edge=!0,e.version=a[1]);o&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,a=i.slice,c=i.map,d=i.reduce,o={};function f(t,e){"createCanvas"===t&&(y=null),o[t]=e}function D(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,a=t.length;n>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(t,r),r);if(s)return s(Rt,n,a),i.zrX=Rt[0],void(i.zrY=Rt[1])}i.zrX=i.zrY=0}function Vt(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var a="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];a&&zt(t,a,e,i)}else zt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Ot.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Gt(t,e,i){Nt?t.addEventListener(e,i):t.attachEvent("on"+e,i)}var Ft=Nt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Wt(t){return 2===t.which||3===t.which}function Ht(){this._track=[]}function Zt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Ht.prototype={constructor:Ht,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;o=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Oe(t,e),e):void Le(e,0,0,0,1):7===a.length?0<=(n=parseInt(a.substr(1),16))&&n<=16777215?(Le(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Oe(t,e),e):void Le(e,0,0,0,1):void 0;var o=a.indexOf("("),r=a.indexOf(")");if(-1!==o&&r+1===a.length){var s=a.substr(0,o),l=a.substr(o+1,r-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Le(e,0,0,0,1);u=Te(l.pop());case"rgb":return 3!==l.length?void Le(e,0,0,0,1):(Le(e,Ae(l[0]),Ae(l[1]),Ae(l[2]),u),Oe(t,e),e);case"hsla":return 4!==l.length?void Le(e,0,0,0,1):(l[3]=Te(l[3]),Re(l,e),Oe(t,e),e);case"hsl":return 3!==l.length?void Le(e,0,0,0,1):(Re(l,e),Oe(t,e),e);default:return}}Le(e,0,0,0,1)}}function Re(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Te(t[1]),a=Te(t[2]),o=a<=.5?a*(n+1):a+n-a*n,r=2*a-o;return Le(e=e||[],Me(255*De(r,o,i+1/3)),Me(255*De(r,o,i)),Me(255*De(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ze(t,e){var i=Ee(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],A=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new bi(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},bi.create=function(t){return new bi(t.x,t.y,t.width,t.height)};var Si=function(t){for(var e in t=t||{},pi.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Si.prototype={constructor:Si,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i>>1])<0?l=o:s=1+o;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function Li(p,g){var r,s,m=Ii,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],a=s[t+1];s[t]=i+a,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var o=Ci(p[n],p,e,i,0,g);e+=o,0!==(i-=o)&&0!==(a=Di(p[e+i-1],p,n,a,a-1,g))&&(i<=a?function(t,e,i,n){var a=0;for(a=0;as[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(a);do{if((o=Ai(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===r?mn(t,a,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};C.textWidth=ln(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&tn(A=$i(A))&&(S=Math.max(S,A.width*b/A.height))}var T=_?_[1]+_[3]:0;S+=T;var D=null!=d?d-v:null;null!=D&&Dn[0]){for(r=0;rt);r++);o=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else ci("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n=o.length&&o.push({option:t})}}),o}function Aa(t){var r=Q();va(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),va(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),va(t,function(t,e){var i=t.exist,n=t.option,a=t.keyInfo;if(ya(n)){if(a.name=null!=n.name?n.name+"":i?i.name:_a+e,i)a.id=i.id;else if(null!=n.id)a.id=n.id+"";else for(var o=0;a.id="\0"+a.name+"\0"+o++,r.get(a.id););r.set(a.id,t)}})}function Ta(t){var e=t.name;return!(!e||!e.indexOf(_a))}function Da(t){return ya(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ca(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?k(t.dataIndex)?N(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?k(t.name)?N(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function La(){var e="__\0ec_inner_"+ka+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var ka=0;function Pa(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Na(l,e+"Index")||Na(l,e+"Id")||Na(l,e+"Name")||(l[e+"Index"]=0);var h={};return va(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],a=(i[2]||"").toLowerCase();if(!(!n||!a||null==t||"index"===a&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var o={mainType:n};"index"===a&&"all"===t||(o[a]=t);var r=s.queryComponents(o);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function Na(t,e){return t&&t.hasOwnProperty(e)}function Oa(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Ea(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function Ra(t,i){var n=Q(),a=[];return E(t,function(t){var e=i(t);(n.get(e)||(a.push(e),n.set(e,[]))).push(t)}),{keys:a,buckets:n}}var za=".",Ba="___EC__COMPONENT__CONTAINER___";function Va(t){var e={main:"",sub:""};return t&&(t=t.split(za),e.main=t[0]||"",e.sub=t[1]||""),e}function Ga(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return L(e.prototype,t),e.extend=this.extend,e.superCall=Ha,e.superApply=Za,w(e,this),e.superClass=i,e}}var Fa=0;function Wa(t){var e=["__\0is_clz",Fa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Ha(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Za(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Ua(i,t){t=t||{};var a={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Va(e)).sub){if(e.sub!==Ba){(function(t){var e=a[t.main];e&&e[Ba]||((e=a[t.main]={})[Ba]=!0);return e})(e)[e.sub]=t}}else a[e.main]=t;return t},i.getClass=function(t,e,i){var n=a[t];if(n&&n[Ba]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=Va(t);var i=[],e=a[t.main];return e&&e[Ba]?E(e,function(t,e){e!==Ba&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=Va(t),!!a[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(a,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=Va(t);var e=a[t.main];return e&&e[Ba]},i.parseClassType=Va,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function Xa(s){for(var t=0;tthis._ux||Fo(e-this._yi)>this._uy||this._len<5;return this.addData(ko.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,o){return this.addData(ko.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ko.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.addData(ko.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=Bo(a)*i+t,this._yi=Vo(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ko.R,t,e,i,n),this},closePath:function(){this.addData(ko.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||Fo(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case ko.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=er[n=0]+t&&r<=er[1]+t?h:0}if(o){l=n;n=jo(a),a=jo(l)}else n=jo(n),a=jo(a);aMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function rr(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;hMath.abs(o[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function xl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function _l(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function wl(t){return t.sort(function(t,e){return t-e}),t}function bl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Sl(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}var Al=9007199254740991;function Tl(t){var e=2*Math.PI;return(t%e+e)%e}function Dl(t){return-vl"'])/g,Fl={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wl(t){return null==t?"":(t+"").replace(Gl,function(t,e){return Fl[e]})}function Hl(t,e){return"{"+t+(null==e?"":e)+"}"}var Zl=["a","b","c","d","e","f","g"];function Ul(t,e,i){k(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function jl(t,e){return"0000".substr(0,e-(t+="").length)+t}function ql(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Ll(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return t=t.replace("MM",jl(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",jl(s,2)).replace("d",s).replace("hh",jl(l,2)).replace("h",l).replace("mm",jl(u,2)).replace("m",u).replace("ss",jl(h,2)).replace("s",h).replace("SSS",jl(c,3))}function Kl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var $l=fn;var Jl=(Object.freeze||Object)({addCommas:zl,toCamelCase:Bl,normalizeCssArray:Vl,encodeHTML:Wl,formatTpl:Ul,formatTplSimple:Xl,getTooltipMarker:Yl,formatTime:ql,capitalFirst:Kl,truncateText:$l,getTextBoundingRect:function(t){return un(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,a,o,r,s){return un(t,e,i,n,a,s,o,r)}}),Ql=E,tu=["left","right","top","bottom","width","height"],eu=[["width","left","right"],["height","top","bottom"]];function iu(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,a=t.position,o=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=o.width+(s?-s.x+o.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,o.height):Math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,o.width):Math.max(v,o.width)}t.newline||(a[0]=g,a[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var nu=iu;A(iu,"vertical"),A(iu,"horizontal");function au(t,e,i){i=Vl(i||0);var n=e.width,a=e.height,o=xl(t.left,n),r=xl(t.top,a),s=xl(t.right,n),l=xl(t.bottom,a),u=xl(t.width,n),h=xl(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=a-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/ae)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[a];return t&&(o[t]=u),n.colorIdx=(a+1)%l.length,u}}};function xu(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:Q(),categoryAxisMap:Q()},n=_u[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}var _u={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.set("y",o),wu(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),wu(o)&&(n.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var a=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",a),wu(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var a=t.getReferringComponents("polar")[0],o=a.findAxisModel("radiusAxis"),r=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",r),wu(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),wu(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,a,o,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=a.coordSysDims=e.dimensions.slice();E(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];o.set(n,i),wu(i)&&null==a.firstCategoryDimIndex&&(r.set(n,i),a.firstCategoryDimIndex=e)})}};function wu(t){return"category"===t.get("type")}var bu="original",Su="arrayRows",Mu="objectRows",Iu="keyedColumns",Au="unknown",Tu="typedArray",Du="column",Cu="row";function Lu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Iu?{}:[]),this.sourceFormat=t.sourceFormat||Au,this.seriesLayoutBy=t.seriesLayoutBy||Du,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Lu.seriesDataToSource=function(t){return new Lu({data:t,sourceFormat:V(t)?Tu:bu,fromDataset:!1})},Wa(Lu);var ku=La();function Pu(t){var e=t.option,i=e.data,n=V(i)?Tu:bu,a=!1,o=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var u=l.option;i=u.source,n=ku(l).sourceFormat,a=!0,o=o||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,a){if(!t)return{dimensionsDefine:Nu(a)};var o,r,s,l;if(e===Su)"auto"===n||null==n?Ou(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],Ou(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===Cu?t.length:t[0]?t[0].length:null;else if(e===Mu)a||(a=function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:Wl(zl(t)),style:p}}var m=this.getData(),o=m.mapDimension("defaultedTooltip",!0),n=o.length,r=this.getRawValue(a),s=k(r),v=m.getItemVisual(a,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Mh(m,a,o[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=Yl({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(a),_=this.name;Ta(this)||(_=""),_=_?Wl(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?Wl(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,a=yu.getColorFromPalette.call(this,t,e,i);return a=a||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Hh(t){var e=t.name;Ta(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function Zh(t){return t.model.getRawData().count()}function Uh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Xh}function Xh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Yh(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,A(jh,i))})}function jh(t){var e=qh(t);e&&e.setOutputEnd(this.count())}function qh(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(t.uid))}return n}}b(Wh,Th),b(Wh,yu);var Kh=function(){this.group=new Si,this.uid=ml("viewComponent")};Kh.prototype={constructor:Kh,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var $h=Kh.prototype;$h.updateView=$h.updateLayout=$h.updateVisual=function(t,e,i,n){},Ga(Kh),Ua(Kh,{registerWhenExtend:!0});function Jh(){var s=La();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,a=e.progressiveRender,o=e.large=i.large,r=e.progressiveRender=i.progressiveRender;return!!(n^o||a^r)&&"reset"}}var Qh=La(),tc=Jh();function ec(){this.group=new Si,this.uid=ml("viewChart"),this.renderTask=Dh({plan:oc,reset:rc}),this.renderTask.context={view:this}}var ic=ec.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){ac(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){ac(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function nc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Rs(t)))for(var n=0,a=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;si.blockIndex?i.step:null,o=n&&n.modDataCount;return{step:a,modBy:null!=o?Math.ceil(o/a):null,modDataCount:o}}},xc.getPipeline=function(t){return this._pipelineMap.get(t)},xc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),a=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:a,modDataCount:r,large:o}},xc.restorePipelines=function(t){var n=this,a=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;a.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),kc(n,t,t.dataTask)})},xc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),a=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,a,t,o,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=a.seriesType,i=a.getTargetSeries;a.createOnAllSeries?o.eachRawSeries(l):e?o.eachRawSeriesByType(e,l):i&&i(o,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Dh({plan:Ac,reset:Tc,count:Lc}));i.context={model:t,ecModel:o,api:r,useClearVisual:a.isVisual&&!a.isLayout,plan:a.plan,reset:a.reset,scheduler:n},kc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,a),t.overallReset&&function(n,t,e,i,a){var o=e.overallTask=e.overallTask||Dh({reset:bc});o.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:n};var r=o.agentStubMap=o.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,a).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Dh({reset:Sc,onDirty:Ic})),o.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=o,i.__block=u,kc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),r.removeKey(e))})}(this,t,e,n,a)},this)},xc.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,kc(this,e,a)},xc.performDataProcessorTasks=function(t,e){_c(this,this._dataProcessorHandlers,t,e,{block:!0})},xc.performVisualTasks=function(t,e,i){_c(this,this._visualHandlers,t,e,i)},xc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},xc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var wc=xc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function bc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Sc(t,e){return t.overallProgress&&Mc}function Mc(){this.agent.dirty(),this.getDownstream().dirty()}function Ic(){this.agent&&this.agent.dirty()}function Ac(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Tc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=wa(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),mc(n._zr.dom,t)}function kd(e,i){sd(Vd,function(t){t(e,i)})}yd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[dd]=!0,i&&wd(this),_d.update.call(this),this[dd]=!1,Id.call(this,n),Ad.call(this,n)}}},yd.showLoading=function(t,e){if(!this._disposed&&(ud(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Wd[t])){var i=Wd[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},yd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},yd.makeActionFromEvent=function(t){var e=L({},t);return e.type=Rd[t.type],e},yd.dispatchAction=function(t,e){this._disposed||(ud(e)||(e={silent:!!e}),Ed[t.type]&&this._model&&(this[dd]?this._pendingActions.push(t):(Md.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Id.call(this,e.silent),Ad.call(this,e.silent))))},yd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},yd.on=gd("on",!1),yd.off=gd("off",!1),yd.one=gd("one",!1);var Pd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Nd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Od(){this.eventInfo}yd._initEvents=function(){sd(Pd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var a=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=a&&a.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=L({},n.eventData));if(e){var o=e.componentType,r=e.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",r=e.seriesIndex);var s=o&&null!=r&&i.getComponent(o,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),sd(Rd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},yd.isDisposed=function(){return this._disposed},yd.clear=function(){this._disposed||this.setOption({series:[]},!0)},yd.dispose=function(){if(!this._disposed){this._disposed=!0,Oa(this.getDom(),Yd,"");var e=this._api,i=this._model;sd(this._componentsViews,function(t){t.dispose(i,e)}),sd(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete Hd[this.id]}},b(vd,Ct),Od.prototype={constructor:Od,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=hd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Lf(this)},Df._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,a=this._rawData,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!a.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var A=r[i],T=o[A][y];if(T){I=T[x];var D=l[A].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return o;a=o-1}}return-1},Df.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var a=Number.MAX_VALUE,o=-1,r=0,s=this.count();rt[I][1])&&(M=!1)}M&&(o[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return a},Df.downSample=function(t,e,i,n){for(var a=Rf(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new(Sf(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=Nf,a},Df.getItemModel=function(t){var e=this.hostModel;return new dl(this.getRawDataItem(t),e,e&&e.ecModel)},Df.diff=function(e){var i=this;return new df(e?e.getIndices():[],this.getIndices(),function(t){return Of(e,t)},function(t){return Of(i,t)})},Df.getVisual=function(t){var e=this._visual;return e&&e[t]},Df.setVisual=function(t,e){if(vf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Df.setLayout=function(t,e){if(vf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Df.getLayout=function(t){return this._layout[t]},Df.getItemLayout=function(t){return this._itemLayouts[t]},Df.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?L(this._itemLayouts[t]||{},e):e},Df.clearItemLayouts=function(){this._itemLayouts.length=0},Df.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},Df.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,vf(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},Df.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Vf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Gf(t,e,i){Lu.isInstance(e)||(e=Lu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),l=Q(i.encodeDef),a=Q(),o=Q(),u=[],r=function(t,e,i,n){var a=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))}),a}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},Yf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Yf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Yf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Yf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Yf.prototype.getExtent=function(){return this._extent.slice()},Yf.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Yf.prototype.isBlank=function(){return this._isBlank},Yf.prototype.setBlank=function(t){this._isBlank=t},Yf.prototype.getLabel=null,Ga(Yf),Ua(Yf,{registerWhenExtend:!0}),jf.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&N(i,$f);return new jf({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var qf=jf.prototype;function Kf(t){return t._map||(t._map=Q(t.categories))}function $f(t){return z(t)&&null!=t.value?t.value:t+""}qf.getOrdinal=function(t){return Kf(this).get(t)},qf.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Kf(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Jf=Yf.prototype,Qf=Yf.extend({type:"ordinal",init:function(t,e){t&&!k(t)||(t=new jf({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Jf.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Jf.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Jf.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});Qf.create=function(){return new Qf};var tp=_l;function ep(t){return Sl(t)+2}function ip(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function np(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),ip(t,0,e),ip(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var ap=_l,op=Yf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),op.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ep(t)},getTicks:function(){return function(t,e,i,n){var a=[];if(!t)return a;e[0](a.length?a[a.length-1]:i[1])&&a.push(e[1]),a}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Sl(t)||0:"auto"===i&&(i=this._intervalPrecision),zl(t=ap(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isFinite(a)){a<0&&(a=-a,n.reverse());var o=function(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=Nl(o/e,!0);null!=i&&r>>1;t[a][1]>1^-(1&s),l=l>>1^-(1&l),a=s+=a,o=l+=o,n.push([s/i,l/i])}return n}ag.prototype={constructor:ag,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],o.coord)&&(n?o.coord=s[1]:e.pop());n&&d(o.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=_l(t),e=_l(e),c?en[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var Kg=hr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Cr(hr.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,o=qg(i,e.smoothConstraint);if(e.connectNulls){for(;0n)return!1;return!0}(o,e))){var r=e.mapDimension(o.dim),s={};return E(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function om(t,e,i){if("cartesian2d"!==t.type)return Qg(t,e,i);var n=t.getBaseAxis().isHorizontal(),a=Jg(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=Math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}ec.extend({type:"line",init:function(){var t=new Si,e=new Ng;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=o.mapArray(o.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],a=0,o=e.count();ah[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new Jr(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(o,n)||o.getVisual("color");d.useStyle(C(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=im(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var A=o.getCalculationInfo("stackedOnSeries"),T=0;f.useStyle(C(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),A&&(T=im(A.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=Ca(a,n);if(!(o instanceof Array)&&null!=o&&0<=o){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;(r=new Sg(a,o)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else ec.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=Ca(a,n);if(null!=o&&0<=o){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else ec.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Kg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new $g({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,a,o,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Bg(a,e,r),v=Bg(o,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(fm,vg);var pm={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},gm={};gm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},pm),gm.valueAxis=m({boundaryGap:[0,0],splitNumber:5},pm),gm.timeAxis=C({scale:!0,min:"dataMin",max:"dataMax"},gm.valueAxis),gm.logAxis=C({scale:!0,logBase:10},gm.valueAxis);function mm(o,t,r,e){E(vm,function(a){t.extend({type:o+"Axis."+a,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?su(t):{};m(t,e.getTheme().get(a+"Axis")),m(t,this.getDefaultOption()),t.type=r(o,t),i&&ru(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=jf.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},gm[a+"Axis"],e],!0)})}),fu.registerSubTypeDefaulter(o+"Axis",A(r,o))}var vm=["value","category","time","log"],ym=fu.extend({type:"cartesian2dAxis",axis:null,init:function(){ym.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){ym.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){ym.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function xm(t,e){return e.type||(e.data?"category":"value")}m(ym.prototype,Hp);var _m={offset:0};function wm(t,e){return t.getCoordSysModel()===e}function bm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}mm("x",ym,xm,_m),mm("y",ym,xm,_m),fu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Sm=bm.prototype;function Mm(t,e,i,n){i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Im(o[l])&&(a=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&Im(o[u])&&!n[h(o[u])]){a=o[u];break}a&&(n[h(a)]=!0)}function h(t){return t.dim+"_"+t.index}}function Im(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,zm(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*Lm/180),zm(o)?n=Nm(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var a,o,r=Tl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;a=Dl(r-Lm/2)?(o=l?"bottom":"top","center"):Dl(r-1.5*Lm)?(o=l?"top":"bottom","center"):(o="middle",r<1.5*Lm&&Lm/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var Tv=Math.PI/180;function Dv(a,t,e,i,n,o,r){function s(t,e,i){for(var n=t;na[n].y+a[n].height)return void l(n,i/2);l(e-1,i/2)}function l(t,e){for(var i=t;0<=i&&(a[i].y-=e,!(0a[i-1].y+a[i-1].height));i--);}function u(t,e,i,n,a,o){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?p.push(a[g]):f.push(a[g]);u(f,!1,t,e,i,n),u(p,!0,t,e,i,n)}function Cv(t){return"center"===t.position}function Lv(I,A,t,e,i){var T,D,C=I.getData(),L=[],k=!1,P=(I.get("minShowLabelAngle")||0)*Tv;C.each(function(t){var e=C.getItemLayout(t),i=C.getItemModel(t),n=i.getModel("label"),a=n.get("position")||i.get("emphasis.label.position"),o=i.getModel("labelLine"),r=o.get("length"),s=o.get("length2");if(!(e.anglei[0]&&isFinite(u)&&isFinite(i[0]););else{var h=a.getTicks().length-1;f"+N(t,function(t,e){var i=a.get(a.mapDimension(t.dim),n);return Wl(t.name+" : "+i)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});hf({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return k(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),o=Jp(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function h(t,e,i,n,a,o){i.removeAll();for(var r=0;r"+Wl(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}}}}),xv);var ry="\0_ec_interaction_mutex";function sy(t,e){return!!ly(t)[e]}function ly(t){return t[ry]||(t[ry]={})}function uy(i){this.pointerChecker,this._zr=i,this._opt={};var t=T,n=t(hy,this),a=t(cy,this),o=t(dy,this),r=t(fy,this),s=t(py,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=C(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",a),i.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",a),i.off("mouseup",o),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function hy(t){if(!(Wt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function cy(t){if(this._dragging&&vy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!sy(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Ft(t.event),my(this,"pan","moveOnMouseMove",t,{dx:o,dy:r,oldX:n,oldY:a,newX:e,newY:i})}}function dy(t){Wt(t)||(this._dragging=!1)}function fy(t){var e=vy("zoomOnMouseWheel",t,this._opt),i=vy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,a=Math.abs(n),o=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3x.x)||(m-=Math.PI);var b=v?"left":"right",S=o.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:o.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==u){var I=i.__edge;js(I=I||(i.__edge=new qr({shape:hx(o,f,f),style:C({opacity:0,strokeNoScale:!0},o.lineStyle)})),{shape:hx(o,d,p),style:{opacity:1}},a),n.add(I)}}function ux(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(o=sx(s,u,o),s.parentNode===l?s:s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;js(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&js(c,{shape:hx(o,r,r),style:{opacity:0}},a,function(){n.remove(c)})}function hx(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=ex(s,u),f=ex(s,u+(h-u)*t.curvature),p=ex(l,h+(u-h)*t.curvature),g=ex(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function cx(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var a=i.children;if(a.length)for(var o=a.length-1;0<=o;o--)n.push(a[o])}}qy.prototype={constructor:qy,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;eo&&(o=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:o;return a.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Wl(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),hf({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Si,this._controller=new uy(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var a=n.getData(),o=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]),this._updateViewCoordSys(n,o,s),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add(function(t){rx(a,t)&&lx(a,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);rx(a,t)?lx(a,t,i,r,n,u):i&&ux(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&ux(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&a.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=a},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],a=[];Io(n,e,a);var o=this._min,r=this._max;a[0]-e[0]==0&&(e[0]=o?o[0]:e[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-e[1]==0&&(e[1]=o?o[1]:e[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinateSystem=new Py;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],a[0]-e[0],a[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=a},_updateController:function(a,t,o){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!wy(t,o,a)}),e.enable(a.get("roam")),i.zoomLimit=a.get("scaleLimit"),i.zoom=a.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){yy(i,t.dx,t.dy),o.dispatchAction({seriesId:a.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){xy(i,t.scale,t.originX,t.originY),o.dispatchAction({seriesId:a.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(a)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,a=n&&n[0]||1;return((e.getZoom()-1)*i+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),tf({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),tf({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=Cy(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function dx(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}}function fx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function px(t,e){return 0<=_(fx(t),e)}function gx(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}af(rm("tree","circle")),nf(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return au(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;r="radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,tx(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=i.width,o=i.height,tx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length-1;0<=a;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}(s),function(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),cx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=ex(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+f),p=a/(c.depth-1||1),cx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),cx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),Wh.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;k(e)&&(e=e[0]),n+=e});var e=t.value;k(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);k(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new dl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var a={};return a.levels=n,Ky.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=k(i)?zl(i[0]):zl(i);return Wl(e.getName(t)+": "+n)},getDataParams:function(t){var e=Wh.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=gx(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},L(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var mx=5;function vx(t){this.group=new Si,t.add(this.group)}function yx(t,e,i,n,a,o){var r=[[a?t:t-mx,e],[t+i,e],[t+i,e+n],[a?t:t-mx,e+n]];return o||r.splice(2,0,[t+i+mx,e+n/2]),a||r.push([t,e+n/2]),r}vx.prototype={constructor:vx,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),ou(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,a=e.height,o=xl(t.x,n),r=xl(t.y,a),s=xl(t.x2,n),l=xl(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=Vl(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Rr({shape:{points:yx(s,0,m,u,f===d.length-1,0===f)},style:C(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:A(a,g)});this.group.add(y),o=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:o.componentIndex,seriesIndex:o.componentIndex,seriesName:o.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&gx(r,o)},s+=m+8}},remove:function(){this.group.removeAll()}};function xx(t){var e=Lx(t);return e.stroke=e.fill=e.lineWidth=null,e}var _x=T,bx=Si,Sx=Hr,Mx=E,Ix=["label"],Ax=["emphasis","label"],Tx=["upperLabel"],Dx=["emphasis","upperLabel"],Cx=10,Lx=Xa([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function kx(d,r,s,l,u,i,f,t,e,n){if(f){var p=f.getLayout();if(p&&p.isInView){var h=p.width,c=p.height,g=p.borderWidth,m=p.invisible,v=f.getRawIndex(),y=t&&t.getRawIndex(),a=f.viewChildren,x=p.upperHeight,o=a&&a.length,_=f.getModel("itemStyle"),w=f.getModel("emphasis.itemStyle"),b=T("nodeGroup",bx);if(b){if(e.add(b),b.attr("position",[p.x||0,p.y||0]),b.__tmNodeWidth=h,b.__tmNodeHeight=c,p.isAboveViewRoot)return b;var S=T("background",Sx,n,1);if(S&&function(t,n,a){n.dataIndex=f.dataIndex,n.seriesIndex=d.seriesIndex,n.setShape({x:0,y:0,width:h,height:c});var o=f.getVisual("borderColor",!0),r=w.get("borderColor");I(n,function(){var t=xx(_);t.fill=o;var e=Lx(w);if(e.fill=r,a){var i=h-2*g;A(t,e,o,i,x,{x:g,y:0,width:i,height:x})}else t.text=e.text=null;n.setStyle(t),Os(n,e)}),t.add(n)}(b,S,o&&p.upperHeight),!o){var M=T("content",Sx,n,2);M&&function(t,i){i.dataIndex=f.dataIndex,i.seriesIndex=d.seriesIndex;var n=Math.max(h-2*g,0),a=Math.max(c-2*g,0);i.culling=!0,i.setShape({x:g,y:g,width:n,height:a});var o=f.getVisual("color",!0);I(i,function(){var t=xx(_);t.fill=o;var e=Lx(w);A(t,e,o,n,a),i.setStyle(t),Os(i,e)}),t.add(i)}(b,M)}return b}}}function I(t,e){m?t.invisible||i.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function A(t,e,i,n,a,o){var r=f.getModel(),s=W(d.getFormattedLabel(f.dataIndex,"normal",null,null,o?"upperLabel":"label"),r.get("name"));if(!o&&p.isLeafRoot){var l=d.get("drillDownIcon",!0);s=l?l+" "+s:s}var u=r.getModel(o?Tx:Ix),h=r.getModel(o?Dx:Ax),c=u.getShallow("show");Bs(t,e,u,h,{defaultText:c?s:null,autoColor:i,isRectText:!0}),o&&(t.textRect=D(o)),t.truncate=c&&u.get("ellipsis")?{outerWidth:n,outerHeight:a,minChar:2}:null}function T(t,e,i,n){var a=null!=y&&s[t][y],o=u[t];return a?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():L({},e.shape)}(o,a,t)):m||((a=new e({z:function(t,e){var i=t*Cx+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},a=f.parentNode;if(a&&(!l||"drillDown"===l.direction)){var o=0,r=0,s=u.background[a.getRawIndex()];!l&&s&&s.old&&(o=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:o,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(o,0,a.__tmStorageName=t)),r[t][v]=a}}hf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var a=dx(n,["treemapZoomToNode","treemapRootToNode"],t),o=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===o&&a&&l?{rootNodeGroup:l.nodeGroup[a.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,a)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new bx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,a=this._oldTree,o={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=A(kx,e,r,s,i,o,l);!function o(r,s,l,u,h){u?Mx(s=r,function(t,e){t.isRemoved()||i(e,e)}):new df(s,r,t,t).add(i).update(i).remove(A(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,a=c(i,n,l,h);a&&o(i&&i.viewChildren||[],n&&n.viewChildren||[],a,u,h+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&Mx(u,function(t,e){var i=h[e];Mx(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:o,willDeleteEls:d,renderFinally:function(){Mx(d,function(t){Mx(t,function(t){t.parent&&t.parent.remove(t)})}),Mx(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,o,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var o,r=[],s={};return{add:function(t,e,i,n,a){return R(n)&&(a=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:a}),!0)},done:function(t){return o=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=o_(l,c,t,e,y,s);n(t,i,a,o,r,s)}})}else p=e_(c),t.setVisual("color",p)}(o,{},N(a.levelModels,function(t){return t?t.get(Jx):null}),r,t.getViewRoot().getAncestors(),t)}};function t_(i,n,a,o){var r=L({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&a&&(e=a[t]),null==e&&(e=n[t]),null==e&&(e=o.get(t)),null!=e&&(r[t]=e)}),r}function e_(t){var e=i_(t,"color");if(e){var i=i_(t,"colorAlpha"),n=i_(t,"colorSaturation");return n&&(e=He(e,null,null,n)),i&&(e=Ze(e,i)),e}}function i_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function n_(t,e,i,n,a,o){if(o&&o.length){var r=a_(e,"color")||null!=a.color&&"none"!==a.color&&(a_(e,"colorAlpha")||a_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new Bx(c);return d.__drColorMappingBy=h,d}}}function a_(t,e){var i=t.get(e);return $x(i)&&i.length?{name:e,range:i}:null}function o_(t,e,i,n,a,o){var r=L({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=a.mapValueToVisual(u)}return r}var r_=Math.max,s_=Math.min,l_=W,u_=E,h_=["itemStyle","borderWidth"],c_=["itemStyle","gapWidth"],d_=["upperLabel","show"],f_=["upperLabel","height"],p_={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),r=t.option,s=au(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=xl(l_(s.width,l[0]),a),h=xl(l_(s.height,l[1]),o),c=n&&n.type,d=dx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=fx(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,a){var o,r=(e||{}).node,s=[n,a];if(!r||r===i)return s;var l=n*a,u=l*t.option.zoomToNodeRatio;for(;o=r.parentNode;){for(var h=0,c=o.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,a){if(!n)return i;for(var o=t.get("visibleMin"),r=a.length,s=r,l=r-1;0<=l;l--){var u=a["asc"===n?r-l-1:l].getValue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=Xf(t,i);else{var g=Hu.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=Wf(t,{coordDimensions:m});(f=new Tf(v,i)).initData(t)}var y=new Tf(["value"],i);return y.initData(l,s),a&&a(f,y),Wy({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var A_=uf({type:"series.graph",init:function(t){A_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){A_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){A_.superApply(this,"mergeDefaultAndTheme",arguments),ba(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return I_(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new dl({label:i.option},i.parentModel,s),a=l.getModel("emphasis.edgeLabel"),o=new dl({emphasis:{label:a.option}},a.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?o:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return A_.superApply(this,"formatTooltip",arguments);var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Wl(l.join(" > ")),a.value&&(l+=" : "+Wl(a.value)),l},_updateCategoriesData:function(){var t=N(this.option.categories||[],function(t){return null!=t.value?t:L({value:0},t)}),e=new Tf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return A_.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,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"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),T_=Ur.prototype,D_=qr.prototype;function C_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var L_=ds({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[C_(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:T_.buildPath,_buildPathCurve:D_.buildPath,pointAt:function(t){return this[C_(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:T_.pointAt,_pointAtCurve:D_.pointAt,tangentAt:function(t){var e=this.shape,i=C_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:D_.tangentAt}),k_=["fromSymbol","toSymbol"];function P_(t){return"_"+t+"Type"}function N_(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){k(o)||(o=[o,o]);var r=Jp(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function O_(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function E_(t,e,i){Si.call(this),this._createLine(t,e,i)}var R_=E_.prototype;function z_(t){this._ctor=t||E_,this.group=new Si}R_.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,a=this.parent;a;)a.scale&&(n/=a.scale[0]),a=a.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var r=o.shape.percent,s=o.pointAt(0),l=o.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=o.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=o.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f;i.attr("position",l);var p=5*n;if("end"===i.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8=t&&(0===e?0:n[e-1][0])o&&(e[1-n]=e[n]+c.sign*o),e}function bw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0a*(1-h[0])?(l="jump",r=s-a*(1-h[2])):0<=(r=s-a*h[1])&&(r=s-a*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?ww(r,n,o,"all"):l="none";else{a=n[1]-n[0];(n=[Aw(0,o[1]*s/a-a/2)])[1]=Iw(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},Hu.register("parallel",{create:function(n,a){var o=[];return n.eachComponent("parallel",function(t,e){var i=new kw(t,n,a);i.name="parallel_"+e,i.resize(t,a),(t.coordinateSystem=i).model=t,o.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),o}});var Nw=fu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Xa([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var i=e.length-1;0<=i;i--)wl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;nf&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===o?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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}}});function PS(t,e,i){Si.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var NS=PS.prototype;function OS(t,e,i){Si.call(this),this._createPolyline(t,e,i)}NS.createLine=function(t,e,i){return new E_(t,e,i)},NS._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");k(n)||(n=[n,n]);var o=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==a&&(this.remove(r),(r=Jp(a,-.5,-.5,1,1,o)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",o),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(o),r.attr("scale",n),this._symbolType=a,this._updateEffectAnimation(t,i,e))},NS._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var a=this,o=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,o),0e);r++);r=Math.min(r-1,a-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(RS,PS);var BS=ds({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,a){var i=e[1]-e[0],o=(n=N(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0==a?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var vM=["axisLine","axisTickLabel","axisName"],yM="splitLine",xM=Um.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=mM(t),r=new Cm(t,o);E(vM,r.add,r),a.add(r.getGroup()),t.get(yM+".show")&&this["_"+yM](t),xM.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr)return!0;if(o){var s=Wm(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var o=zM(t).pointerEl=new ol[a.type](BM(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var a=zM(t).labelEl=new Hr(BM(e.label));t.add(a),WM(a,n)}},updatePointerEl:function(t,e,i){var n=zM(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=zM(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),WM(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,o=i.getModel("handle"),r=i.get("status");if(!o.get("show")||!r||"hide"===r)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=el(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ft(t.event)},onmousedown:VM(this._onHandleDragMove,this,0,0),drift:VM(this._onHandleDragMove,this),ondragend:VM(this._onHandleDragEnd,this)}),n.add(a)),ZM(a,i,!1);a.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");k(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),dc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){FM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,HM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(HM(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(HM(n)),zM(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=GM);var QM=GM.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=tI(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=UM(n),c=eI[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}qM(e,t,qm(r.model,i),i,n,a)},getHandleTransform:function(t,e,i){var n=qm(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:jM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.grid,r=a.getGlobalExtent(!0),s=tI(o,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function tI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var eI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:KM([e,i[0]],[e,i[1]],iI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:$M([e-n/2,i[0]],[n,a],iI(t))}}};function iI(t){return"x"===t.dim?0:1}Um.registerAxisPointerClass("CartesianAxisPointer",QM),Jd(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!k(e)&&(t.axisPointer.link=[e])}}),Qd(cd.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Gm(t,e)}),tf({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||T(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){CM(r)&&(r=wM({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=CM(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||CM(r),d={},f={},p={list:[],map:{}},g={showPointer:SM(AM,f),showTooltip:SM(TM,p)};bM(s.coordSysMap,function(t,e){var o=l||t.containPoint(r);bM(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&o&&(!u||n)){var a=n&&n.value;null!=a||l||(a=i.pointToData(r)),null!=a&&IM(t,a,g,!1,d)}})});var m={};return bM(h,function(a,t){var o=a.linkGroup;o&&!f[t]&&bM(o.axesInfo,function(t,e){var i=f[e];if(t!==a&&i){var n=i.value;o.mapper&&(n=a.axis.scale.parse(o.mapper(n,DM(t),DM(a)))),m[a.key]=n}})}),bM(m,function(t,e){IM(h[e],t,g,!0,d)}),function(a,t,e){var o=e.axesInfo=[];bM(t,function(t,e){var i=t.axisPointerModel.option,n=a[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(CM(e)||!t.list.length)return n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}(p,r,t,o),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=MM(n)[a]||{},r=MM(n)[a]={};bM(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&bM(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(o,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){o[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var nI=["x","y"],aI=["width","height"],oI=GM.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=lI(r,1-sI(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=UM(n),c=rI[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}qM(e,t,mM(i),i,n,a)},getHandleTransform:function(t,e,i){var n=mM(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:jM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.coordinateSystem,r=sI(a),s=lI(o,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=lI(o,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),rI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:KM([e,i[0]],[e,i[1]],sI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:$M([e-n/2,i[0]],[n,a],sI(t))}}};function sI(t){return t.isHorizontal()?0:1}function lI(t,e){var i=t.getRect();return[i[nI[e]],i[nI[e]]+i[aI[e]]]}Um.registerAxisPointerClass("SingleAxisPointer",oI),lf({type:"single"});var uI=Wh.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){uI.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=Ra(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var a=n.length,o=-1,r=-1,s=0;sMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=o.get(t);return null==e?a.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},vI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function a(){r.onEmphasis(n)}function o(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(mI,Si);ec.extend({type:"sunburst",init:function(){},render:function(a,o,t,e){var n=this;this.seriesModel=a,this.api=t,this.ecModel=o;var r=a.getData(),s=r.tree.root,i=a.getViewRoot(),l=this.group,u=a.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",a,o),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new mI(t,a,o);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new df(n,i,t,t).add(e).update(e).remove(A(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var yI="sunburstRootToNode";tf({type:yI,update:"updateView"},function(a,t){t.eachComponent({mainType:"series",subType:"sunburst",query:a},function(t,e){var i=dx(a,[yI],t);if(i){var n=t.getViewRoot();n&&(a.direction=px(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var xI="sunburstHighlight";tf({type:xI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=dx(n,[xI],t);i&&(n.highlight=i.node)})});tf({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var _I=Math.PI/180;function wI(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function bI(o,r){return r=r||[0,0],N(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],a=o[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))},this)}af(A(Av,"sunburst")),nf(A(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");k(i)||(i=[0,i]),k(e)||(e=[e,e]);var n=C.getWidth(),a=C.getHeight(),h=Math.min(n,a),c=xl(e[0],n),d=xl(e[1],a),f=xl(i[0],h/2),o=xl(i[1],h/2),r=-t.get("startAngle")*_I,p=t.get("minAngle")*_I,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=wI(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:t[1],r0:t[0]},api:{coord:T(function(t){var e=o.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=a.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:T(II,a)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function NI(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function OI(o,r,e,t){var i=o.get("renderItem"),n=o.coordinateSystem,a={};n&&(a=n.prepareCustoms?n.prepareCustoms():PI[n.type](n));var s,l,u,h,c,d=C({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(TI).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var a=t?VI(t,u):u;return Gs(i,a,null,{autoColor:c,isRectText:!0}),i.text=a.getShallow("show")?H(o.getFormattedLabel(e,"normal"),bg(r,e)):null,t&&GI(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(DI).getItemStyle(),n=t?VI(t,h):h;return Gs(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),bg(r,e)):null,t&&GI(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),a=0;ae[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return a<=o*o&&r*r<=a}}}};var KI=fu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(KI.prototype,Hp);var $I={splitNumber:5};function JI(t,e){return e.type||(e.data?"category":"value")}function QI(t,e){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){a.scale.unionExtentFromData(e,Uf(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,Uf(e,t))})}}),zp(n.scale,n.model),zp(a.scale,a.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),r=360/n.scale.count();n.inverse?o[1]+=r:o[1]-=r,n.setExtent(o[0],o[1])}}function tA(t,e){if(t.type=e.get("type"),t.scale=Bp(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}mm("angle",KI,JI,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),mm("radius",KI,JI,$I),sf({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),Hu.register("polar",{dimensions:qI.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new qI(e);i.update=QI;var n=i.getRadiusAxis(),a=i.getAngleAxis(),o=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");tA(n,o),tA(a,r),function(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=xl(n[0],a),t.cy=xl(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:k(l)||(l=[0,l]),l=[xl(l[0],s),xl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var eA=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function iA(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function nA(t){return t.getRadiusAxis().inverse?0:1}function aA(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}Um.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords(),r=N(i.getViewLabels(),function(t){return(t=D(t)).coord=i.dataToCoord(t.tickValue),t});aA(r),aA(o),E(eA,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,o,a,r)},this)}},_axisLine:function(t,e,i,n){var a,o=t.getModel("axisLine.lineStyle"),r=nA(e),s=r?0:1;(a=0===n[s]?new Lr({shape:{cx:e.cx,cy:e.cy,r:n[r]},style:o.getLineStyle(),z2:1,silent:!0}):new Nr({shape:{cx:e.cx,cy:e.cy,r:n[r],r0:n[s]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var a=t.getModel("axisTick"),o=(a.get("inside")?-1:1)*a.get("length"),r=n[nA(e)],s=N(i,function(t){return new Ur({shape:iA(e,[r,r+o],t.coord)})});this.group.add(ys(s,{style:C(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,f,e){var p=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin"),v=c.get("triggerEvent");E(e,function(t,e){var i=g,n=t.tickValue,a=f[nA(d)],o=d.coordToPoint([a+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(o[0]-r)/a<.3?"center":o[0]>r?"left":"right",u=Math.abs(o[1]-s)/a<.3?"middle":o[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new dl(p[n].textStyle,g,g.ecModel));var h=new Dr({silent:Cm.isLabelSilent(c)});this.group.add(h),Gs(h.style,i,{x:o[0],y:o[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Cm.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n){var a=t.getModel("splitLine").getModel("lineStyle"),o=a.get("color"),r=0;o=o instanceof Array?o:[o];for(var s=[],l=0;lm?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var lA={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:KM(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:JM(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:JM(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}};function uA(n,t){t.update="updateView",tf(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}Um.registerAxisPointerClass("PolarAxisPointer",sA),nf(A(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=UI(n,a),r=a.getExtent(),s="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[o]=l;var h=ZI(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=xl(t.get("barWidth"),s),d=xl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,a=xl(t.categoryGap,n),o=xl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-a)/(s+(s-1)*o);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==o)for(var r=0n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},hA.dimensions=hA.prototype.dimensions,hA.getDimensionsInfo=hA.prototype.getDimensionsInfo,hA.create=function(i,n){var a=[];return i.eachComponent("calendar",function(t){var e=new hA(t,i,n);a.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=a[t.get("calendarIndex")||0])}),a},Hu.register("calendar",hA);var dA=fu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var a=su(t);dA.superApply(this,"init",arguments),fA(t,a)},mergeOption:function(t,e){dA.superApply(this,"mergeOption",arguments),fA(this.option,t)}});function fA(t,e){var i=t.cellSize;k(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=N([0,1],function(t){return function(t,e){return null!=t[eu[e][0]]||null!=t[eu[e][1]]&&null!=t[eu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ru(t,e,{type:"box",ignoreSize:n})}var pA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},gA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};lf({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var a=t.coordinateSystem,o=a.getRangeInfo(),r=a.getOrient();this._renderDayRect(t,o,n),this._renderLines(t,o,r,n),this._renderYearText(t,o,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,o,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new Hr({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderLines:function(i,t,n,a){var o=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=o._getLinePointsOfOneWeek(i,t,n);o._tlpoints.push(e[0]),o._blpoints.push(e[e.length-1]),l&&o._drawSplitline(e,s,a)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,e,n),s,a),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,e,n),s,a)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new zr({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;o<7;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?Xl(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Dr({z2:30});Gs(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(a)&&(a=pA[a.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;o="start"===r?-o:o;for(var c="center"===s,d=0;dd.getHeight()&&(i.textPosition="top",o=!0);var r=o?-5-n.height:p+8;a+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):a-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=g[t],a=g[e],o=new dl(l[n],h,h.ecModel);if(n&&!a){if(function(t){return 0===t.indexOf("my")}(n))i={model:o,onclick:o.option.onclick,featureName:n};else{var r=SA(n);if(!r)return;i=new r(o,c,d)}u[n]=i}else{if(!(i=u[a]))return;i.model=o,i.ecModel=c,i.api=d}n||!a?o.get("show")&&!i.unusable?(function(a,o,t){var r=a.getModel("iconStyle"),s=a.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():a.get("icon"),l=a.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=a.iconPaths={};E(e,function(t,e){var i=el(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",L({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),Os(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(a.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",T(o.onclick,o,c,d,e)),u[e]=i})}(o,i,n),o.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(o,c,d,s)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var AA=gc.toolbox.saveAsImage;function TA(t){this.model=t}TA.defaultOption={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:AA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:AA.lang.slice()},TA.prototype.unusable=!v.canvasSupported,TA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(o.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+a,d.target="_blank",d.href=o;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},bA("saveAsImage",TA);var DA=gc.toolbox.magicType;function CA(t){this.model=t}CA.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:D(DA.title),option:{},seriesIndex:{}};var LA=CA.prototype;LA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var kA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:""},n.get("option.tiled")||{},!0)}},PA=[["line","bar"],["stack","tiled"]];LA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(kA[h]){var d={series:[]};E(PA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=kA[h](e,i,t,c);n&&(C(n,t.option),d.series.push(n));var a=t.coordinateSystem;if(a&&"cartesian2d"===a.type&&("line"===h||"bar"===h)){var o=a.getAxesByScale("ordinal")[0];if(o){var r=o.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d})}},tf({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),bA("magicType",CA);var NA=gc.toolbox.dataView,OA=new Array(60).join("-"),EA="\t";function RA(t){var e=function(t){var a={},o=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;a[n]||(a[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),a[n].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:a,other:o,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,a=[" "].concat(N(t.series,function(t){return t.name})),o=[i.model.getCategories()];E(t.series,function(t){o.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[a.join(EA)],s=0;st[1]&&t.reverse(),t}function qA(t,e){return Pa(t,e,{includeMainTypes:UA})}YA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=QA[t.brushType](0,i,e);t.__rangeOffset={offset:eT[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},YA.matchOutputRanges=function(t,n,a){FA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=QA[i.brushType](1,t,i.range);a(i,e.values,t,n)})},this)},YA.setInputRanges=function(t,a){FA(t,function(t){var e=this.findTargetInfo(t,a);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=QA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?eT[t.brushType](i.values,n.offset,function(t,e){var i=nT(t),n=nT(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}(i.xyMinMax,n.xyMinMax)):i.values}},this)},YA.makePanelOpts=function(i,n){return N(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:Mb(e),isTargetByCursor:Ab(e,i,t.coordSysModel),getLinearBrushOtherExtent:Ib(e)}})},YA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=WA(n.coordSyses,e.coordinateSystem)},YA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=qA(e,t),a=0;an[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):gT(h,function(t){if("empty"===a)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),gT(h,function(t){u.setApproximateExtent(c,t)}))})}}};var yT=E,xT=dT,_T=sf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=wT(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=wT(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),bT(this,t);var n=this.settledOption;yT([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var a=this.dependentModels[t.axis][e],o=a.__dzAxisProxy||(a.__dzAxisProxy=new pT(t.name,e,this,n));r[t.name+"_"+e]=o},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();xT(function(t){var e=t.axisIndex;i[e]=wa(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;xT(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var o=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(o){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],o=!1):yT(t.singleAxis,function(t){o&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],o=!1)})}o&&xT(function(t){if(o){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,a=i.length;ne[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&sD(e)}};function sD(t){return new bi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var lD=["#ddd"];sf({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||qT(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:lD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=N(t,function(t){return uD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=uD(this.option,t),this.brushType=this.brushOption.brushType}});function uD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new dl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function hD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}lf({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new jw(e.getZr())).on("brush",T(this._onBrush,this)).mount()},render:function(t){return this.model=t,hD.apply(this,arguments)},updateTransform:hD,updateView:hD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:D(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:D(t),$from:i})}}),tf({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),tf({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),tf({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var cD=gc.toolbox.brush;function dD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}dD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:D(cD.title)};var fD=dD.prototype;fD.render=fD.updateView=function(e,t,i){var n,a,o;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,a=t.brushOption.brushMode||"single",o|=t.areas.length}),this._brushType=n,this._brushMode=a,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?o:t===n)?"emphasis":"normal")})},fD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},fD.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},bA("brush",dD),Jd(function(t,e){var i=t&&t.brush;if(k(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var a=t&&t.toolbox;k(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,UT)}}),sf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),lf({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Dr({style:Gs({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Dr({style:Gs({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=au(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new Hr({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function pD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};E(n,function(t,e){o[e]||gD(a,e)||(a[e]=t)}),i.label&&!gD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function gD(t,e){return t.hasOwnProperty(e)}fu.registerSubTypeDefaulter("timeline",function(){return"slider"}),tf({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),C({currentIndex:i.option.currentIndex},t)}),tf({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var mD=fu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,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:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){mD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,a=this._names=[];if("category"===i){var o=[];E(e,function(t,e){var i,n=Ma(t);z(t)?(i=D(t)).value=e:i=e,o.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),a.push(n+"")}),e=o}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Tf([{name:"value",type:n}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(mD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Th);function vD(t,e,i,n){vg.call(this,t,e,i),this.type=n||"value",this.model=null}var yD=Kh.extend({type:"timeline"});vD.prototype={constructor:vD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(vD,vg);var xD=T,_D=E,wD=Math.PI;function bD(t,e,i,n,a,o){var r=e.get("color");a?(a.setColor(r),i.add(a),o&&o.onUpdate(a)):((a=Jp(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a));var s=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=xl(u[0],l[0]),h[1]+=xl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function SD(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}yD.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,i),o=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(t){return Wl(s.scale.getLabel(t))},_D(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](a,o,s,e)},this),this._renderAxisLabel(a,r,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=function(t,e){return au(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2n[1]&&(i=n[1]),i"),a&&(o+=ID(a),null!=i&&(o+=" : ")),null!=i&&(o+=ID(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});b(TD,Th),TD.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var DD=_;function CD(t,e,i,n,a,o){var r=[],s=Zf(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=RD(e,s,t),u=e.indicesOfNearest(s,l)[0];r[a]=e.get(i,u),r[o]=e.get(n,u);var h=bl(e.get(n,u));return 0<=(h=Math.min(h,20))&&(r[o]=+r[o].toFixed(h)),r}var LD=A,kD={min:LD(CD,"min"),max:LD(CD,"max"),average:LD(CD,"average")};function PD(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!k(e.coord)&&n){var a=n.dimensions,o=ND(e,i,n,t);if((e=D(e)).type&&kD[e.type]&&o.baseAxis&&o.valueAxis){var r=DD(a,o.baseAxis.dim),s=DD(a,o.valueAxis.dim);e.coord=kD[e.type](i,o.baseDataDim,o.valueDataDim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)kD[l[u]]&&(l[u]=RD(i,i.mapDimension(a[u]),l[u]));e.coord=l}}return e}function ND(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;ai[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[a]-c[a]:p[n]+=c[a]+m);g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?i[a]:h[a],v[o]=Math.max(h[o],c[o]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[a],d){var y={x:0,y:0};y[a]=Math.max(i[a]-c[a]-m,0),y[o]=v[o],l.setClipPath(new Hr({shape:y})),l.__rectSize=y[a]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&js(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,a){var o=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=a[t+"DataIndex"],i=o.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),i=a.pageIndex,r=null!=i?i+1:0,s=a.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,a=t.getOrient().index,o=cC[a],r=dC[a],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[a]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){var a,o,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var i=t.__legendDataIndex;null==o&&null!=i&&(o=e),i===n&&(a=e)}),null!=a?a:o}});tf("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});_T.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var pC=Hr,gC=yl,mC=wl,vC=T,yC=E,xC="horizontal",_C="vertical",wC=["line","bar","candlestick","scatter"],bC=ST.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){bC.superApply(this,"render",arguments),dc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){bC.superApply(this,"remove",arguments),fc(this,"_dispatchZoomAction")},dispose:function(){bC.superApply(this,"dispose",arguments),fc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Si;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},a=this._orient===xC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=su(t.option);E(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=a[t])});var r=au(o,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===_C&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),a=n&&n.get("inverse"),o=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==xC||a?i===xC&&a?{scale:r?[-1,1]:[-1,-1]}:i!==_C||a?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new pC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new pC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:T(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=a){var o=n.getDataExtent(a),r=.3*(o[1]-o[0]);o=[o[0]-r,o[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-a);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(yC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function SC(t){return"vertical"===t?"ns-resize":"ew-resize"}_T.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var MC="\0_ec_dataZoom_roams";function IC(t,n){var e=TC(t),a=n.dataZoomId,o=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[a]&&_(n.allCoordIds,o)<0&&(delete i[a],t.count--)}),DC(e);var i=e[o];i||((i=e[o]={coordId:o,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new uy(t.getZr());return E(["pan","zoom","scrollMove"],function(o){e.on(o,function(n){var a=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[o],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&a.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),a.length&&r.dispatchAction(a)})}),e}(t,i),i.dispatchAction=A(CC,t)),i.dataZoomInfos[a]||i.count++,i.dataZoomInfos[a]=n;var r=function(t){var n,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");a["type_"+n]"],k(t)&&(t=t.slice(),n=!0),a=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):O(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=XC([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,a=n.length-1;0<=a;a--){var o=n[a];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),a=e.controller||(e.controller={});m(n,i),m(a,i);var u=this.isCategory();function o(n){ZC(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},UC(this.stateList,function(t){var e=n[t];if(R(e)){var i=GC(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}o.call(this,n),o.call(this,a),function(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},UC(n,function(t,e){if(Bx.isValidType(e)){var i=GC(e,"inactive",u);null!=i&&(a[e]=i,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,s=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,l=this.get("inactiveColor");UC(this.stateList,function(t){var e=this.itemSize,i=o[t];null==(i=i||(o[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),i.symbol=WC(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var a=-1/0;HC(n,function(t){ae[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){jC.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=wl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var a=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),a.push({seriesId:t.id,dataIndex:i})},this),a},getVisualMeta:function(i){var t=$C(this,"outOfRange",this.getExtent()),e=$C(this,"inRange",this.option.range.slice()),n=[];function a(t,e){n.push({value:t,color:i(t,e)})}for(var o=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(o,"color",e),offset:a/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Si("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,a){if(this._useHandle){var o=this._shapes,r=this.visualMapModel,s=o.handleThumbs,l=o.handleLabels;iL([0,1],function(t){var e=s[t];e.setStyle("fill",a.handlesColor[t]),e.position[1]=n[t];var i=$s(o.handleLabelPoints[t],Ks(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",o.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=eL(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-nL(e,aL(i,0))],[6,0],[0,nL(e,aL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=$s(u.indicatorLabelPoint,Ks(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=nL(aL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],o=i.getExtent();t=nL(aL(a[0],t),a[1]);var r=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=eL(a,e,i,!0)/2);return n}(i,o,a),s=[t-r,t+r],l=eL(t,a,o,!0),u=[eL(s[0],a,o,!0),eL(s[1],a,o,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||sL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[o(i),o(n)];function a(t,e,i){for(var n=0,a=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:o,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=a(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:o.push({value:t[0],color:n},{value:t[1],color:n})}}}),hL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function cL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}JC.extend({type:"visualMap.piecewise",doRender:function(){var o=this.group;o.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(o,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Si;i.onclick=T(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var a=this.visualMapModel.getValueState(n);i.add(new Dr({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===a?.5:1}}))}o.add(i)},this),i&&this._renderEndsText(o,i[1],c,d,h),nu(r.get("orient"),o,r.get("itemGap")),this.renderBackground(o),this.positionGroup(o)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:tL(e.findTargetDataIndices(i),e)})}t.on("mouseover",T(e,this,"highlight")).on("mouseout",T(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return QC(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new Si,r=this.visualMapModel.textStyleModel;o.add(new Dr({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=N(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jp(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=D(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,E(n,function(t,e){n[e]=e===a})):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});Jd(OC);var dL,fL="urn:schemas-microsoft-com:vml",pL="undefined"==typeof window?null:window,gL=!1,mL=pL&&pL.document;function vL(t){return dL(t)}if(mL&&!v.canvasSupported)try{mL.namespaces.zrvml||mL.namespaces.add("zrvml",fL),dL=function(t){return mL.createElement("')}}catch(t){dL=function(t){return mL.createElement("<"+t+' xmlns="'+fL+'" class="zrvml">')}}var yL,xL=Ho.CMD,_L=Math.round,wL=Math.sqrt,bL=Math.abs,SL=Math.cos,ML=Math.sin,IL=Math.max;if(!v.canvasSupported){var AL=",",TL="progid:DXImageTransform.Microsoft",DL=21600,CL=DL/2,LL=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=DL+","+DL,t.coordorigin="0,0"},kL=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},PL=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},NL=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},OL=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},EL=Fn,RL=function(t,e,i){var n=Ee(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=kL(n[0],n[1],n[2]),t.opacity=i*n[3])},zL=function(t,e,i,n){var a="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof jr&&NL(t,o),o=o||vL(e),a?function(t,e,i){var n,a,o=e.fill;if(null!=o)if(o instanceof jr){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){r="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[o.x*d,o.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*DL,w/=x[1]*DL;var b=IL(_,w);u=0/b,h=2*o.r/b-u}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],A=[],T=0;T=c&&d<=i+1){for(var n=[],a=0;a=c&&d<=a+1)return Ik(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=o();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newPos,s=r-n,l=0;r+1