text: (function(t,e){typeof exports==="object"&&typeof module!=="undefined"?e(exports):typeof define==="function"&&define.amd?define(["exports"],e):window.layui&&layui.define?layui.define("echartStyle",function(t){t("echarts",e(t))}):e(t.echarts={})})(this,function(t){"use strict";if(!window.larrymsExtend){return false}var e;if(typeof window!=="undefined"){e=window.__DEV__}else if(typeof global!=="undefined"){e=global.__DEV__}if(typeof e==="undefined"){e=true}var A=e;var r=2311;var i=function(){return r++};var a={};if(typeof wx!=="undefined"){a={browser:{},os:{},node:false,wxa:true,canvasSupported:true,svgSupported:false,touchEventsSupported:true}}else if(typeof document==="undefined"&&typeof self!=="undefined"){a={browser:{},os:{},node:false,worker:true,canvasSupported:true}}else if(typeof navigator==="undefined"){a={browser:{},os:{},node:true,worker:false,canvasSupported:true,svgSupported:true}}else{a=n(navigator.userAgent)}var m=a;function n(t){var e={};var r={};var i=t.match(/Firefox\/([\d.]+)/);var a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/);var n=t.match(/Edge\/([\d.]+)/);var o=/micromessenger/i.test(t);if(i){r.firefox=true;r.version=i[1]}if(a){r.ie=true;r.version=a[1]}if(n){r.edge=true;r.version=n[1]}if(o){r.weChat=true}return{browser:r,os:e,node:false,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect!=="undefined",touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11)}}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};var 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};var u=Object.prototype.toString;var o=Array.prototype;var h=o.forEach;var f=o.filter;var c=o.slice;var v=o.map;var d=o.reduce;var p={};function g(t,e){if(t==="createCanvas"){w=null}p[t]=e}function P(t){if(t==null||typeof t!="object"){return t}var e=t;var r=u.call(t);if(r==="[object Array]"){if(!et(t)){e=[];for(var i=0,a=t.length;i<a;i++){e[i]=P(t[i])}}}else if(l[r]){if(!et(t)){var n=t.constructor;if(t.constructor.from){e=n.from(t)}else{e=new n(t.length);for(var i=0,a=t.length;i<a;i++){e[i]=P(t[i])}}}}else if(!s[r]&&!et(t)&&!Z(t)){e={};for(var o in t){if(t.hasOwnProperty(o)){e[o]=P(t[o])}}}return e}function y(t,e,r){if(!F(e)||!F(t)){return r?P(e):t}for(var i in e){if(e.hasOwnProperty(i)){var a=t[i];var n=e[i];if(F(n)&&F(a)&&!B(n)&&!B(a)&&!Z(n)&&!Z(a)&&!W(n)&&!W(a)&&!et(n)&&!et(a)){y(a,n,r)}else if(r||!(i in t)){t[i]=P(e[i],true)}}}return t}function x(t,e){var r=t[0];for(var i=1,a=t.length;i<a;i++){r=y(r,t[i],e)}return r}function N(t,e){for(var r in e){if(e.hasOwnProperty(r)){t[r]=e[r]}}return t}function C(t,e,r){for(var i in e){if(e.hasOwnProperty(i)&&(r?e[i]!=null:t[i]==null)){t[i]=e[i]}}return t}var _=function(){return p.createCanvas()};p.createCanvas=function(){return document.createElement("canvas")};var w;function b(){if(!w){w=_().getContext("2d")}return w}function S(t,e){if(t){if(t.indexOf){return t.indexOf(e)}for(var r=0,i=t.length;r<i;r++){if(t[r]===e){return r}}}return-1}function M(t,e){var r=t.prototype;function i(){}i.prototype=e.prototype;t.prototype=new i;for(var a in r){t.prototype[a]=r[a]}t.prototype.constructor=t;t.superClass=e}function I(t,e,r){t="prototype"in t?t.prototype:t;e="prototype"in e?e.prototype:e;C(t,e,r)}function O(t){if(!t){return}if(typeof t=="string"){return false}return typeof t.length=="number"}function L(t,e,r){if(!(t&&e)){return}if(t.forEach&&t.forEach===h){t.forEach(e,r)}else if(t.length===+t.length){for(var i=0,a=t.length;i<a;i++){e.call(r,t[i],i,t)}}else{for(var n in t){if(t.hasOwnProperty(n)){e.call(r,t[n],n,t)}}}}function T(t,e,r){if(!(t&&e)){return}if(t.map&&t.map===v){return t.map(e,r)}else{var i=[];for(var a=0,n=t.length;a<n;a++){i.push(e.call(r,t[a],a,t))}return i}}function D(t,e,r,i){if(!(t&&e)){return}if(t.reduce&&t.reduce===d){return t.reduce(e,r,i)}else{for(var a=0,n=t.length;a<n;a++){r=e.call(i,r,t[a],a,t)}return r}}function k(t,e,r){if(!(t&&e)){return}if(t.filter&&t.filter===f){return t.filter(e,r)}else{var i=[];for(var a=0,n=t.length;a<n;a++){if(e.call(r,t[a],a,t)){i.push(t[a])}}return i}}function E(t,e,r){if(!(t&&e)){return}for(var i=0,a=t.length;i<a;i++){if(e.call(r,t[i],i,t)){return t[i]}}}function z(t,e){var r=c.call(arguments,2);return function(){return t.apply(e,r.concat(c.call(arguments)))}}function R(t){var e=c.call(arguments,1);return function(){return t.apply(this,e.concat(c.call(arguments)))}}function B(t){return u.call(t)==="[object Array]"}function V(t){return typeof t==="function"}function G(t){return u.call(t)==="[object String]"}function F(t){var e=typeof t;return e==="function"||!!t&&e=="object"}function W(t){return!!s[u.call(t)]}function H(t){return!!l[u.call(t)]}function Z(t){return typeof t==="object"&&typeof t.nodeType==="number"&&typeof t.ownerDocument==="object"}function U(t){return t!==t}function j(t){for(var e=0,r=arguments.length;e<r;e++){if(arguments[e]!=null){return arguments[e]}}}function X(t,e){return t!=null?t:e}function Y(t,e,r){return t!=null?t:e!=null?e:r}function q(){return Function.call.apply(c,arguments)}function $(t){if(typeof t==="number"){return[t,t,t,t]}var e=t.length;if(e===2){return[t[0],t[1],t[0],t[1]]}else if(e===3){return[t[0],t[1],t[2],t[1]]}return t}function K(t,e){if(!t){throw new Error(e)}}function J(t){if(t==null){return null}else if(typeof t.trim==="function"){return t.trim()}else{return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}var Q="__ec_primitive__";function tt(t){t[Q]=true}function et(t){return t[Q]}function rt(t){var r=B(t);var i=this;t instanceof rt?t.each(e):t&&L(t,e);function e(t,e){r?i.set(t,e):i.set(e,t)}}rt.prototype={constructor:rt,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){e!==void 0&&(t=z(t,e));for(var r in this){this.hasOwnProperty(r)&&t(this[r],r)}},removeKey:function(t){delete this[t]}};function it(t){return new rt(t)}function at(t,e){var r=new t.constructor(t.length+e.length);for(var i=0;i<t.length;i++){r[i]=t[i]}var a=t.length;for(i=0;i<e.length;i++){r[i+a]=e[i]}return r}function nt(){}var ot=(Object.freeze||Object)({$override:g,clone:P,merge:y,mergeAll:x,extend:N,defaults:C,createCanvas:_,getContext:b,indexOf:S,inherits:M,mixin:I,isArrayLike:O,each:L,map:T,reduce:D,filter:k,find:E,bind:z,curry:R,isArray:B,isFunction:V,isString:G,isObject:F,isBuiltInObject:W,isTypedArray:H,isDom:Z,eqNaN:U,retrieve:j,retrieve2:X,retrieve3:Y,slice:q,normalizeCssArray:$,assert:K,trim:J,setAsPrimitive:tt,isPrimitive:et,createHashMap:it,concatArray:at,noop:nt});var st=typeof Float32Array==="undefined"?Array:Float32Array;function lt(t,e){var r=new st(2);if(t==null){t=0}if(e==null){e=0}r[0]=t;r[1]=e;return r}function ut(t,e){t[0]=e[0];t[1]=e[1];return t}function ht(t){var e=new st(2);e[0]=t[0];e[1]=t[1];return e}function ft(t,e,r){t[0]=e;t[1]=r;return t}function ct(t,e,r){t[0]=e[0]+r[0];t[1]=e[1]+r[1];return t}function vt(t,e,r,i){t[0]=e[0]+r[0]*i;t[1]=e[1]+r[1]*i;return t}function dt(t,e,r){t[0]=e[0]-r[0];t[1]=e[1]-r[1];return t}function pt(t){return Math.sqrt(mt(t))}var gt=pt;function mt(t){return t[0]*t[0]+t[1]*t[1]}var yt=mt;function xt(t,e,r){t[0]=e[0]*r[0];t[1]=e[1]*r[1];return t}function _t(t,e,r){t[0]=e[0]/r[0];t[1]=e[1]/r[1];return t}function wt(t,e){return t[0]*e[0]+t[1]*e[1]}function bt(t,e,r){t[0]=e[0]*r;t[1]=e[1]*r;return t}function St(t,e){var r=pt(e);if(r===0){t[0]=0;t[1]=0}else{t[0]=e[0]/r;t[1]=e[1]/r}return t}function Mt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var It=Mt;function Dt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Tt=Dt;function At(t,e){t[0]=-e[0];t[1]=-e[1];return t}function Ct(t,e,r,i){t[0]=e[0]+i*(r[0]-e[0]);t[1]=e[1]+i*(r[1]-e[1]);return t}function Lt(t,e,r){var i=e[0];var a=e[1];t[0]=r[0]*i+r[2]*a+r[4];t[1]=r[1]*i+r[3]*a+r[5];return t}function kt(t,e,r){t[0]=Math.min(e[0],r[0]);t[1]=Math.min(e[1],r[1]);return t}function Pt(t,e,r){t[0]=Math.max(e[0],r[0]);t[1]=Math.max(e[1],r[1]);return t}var Nt=(Object.freeze||Object)({create:lt,copy:ut,clone:ht,set:ft,add:ct,scaleAndAdd:vt,sub:dt,len:pt,length:gt,lenSquare:mt,lengthSquare:yt,mul:xt,div:_t,dot:wt,scale:bt,normalize:St,distance:Mt,dist:It,distanceSquare:Dt,distSquare:Tt,negate:At,lerp:Ct,applyTransform:Lt,min:kt,max:Pt});function Et(){this.on("mousedown",this._dragStart,this);this.on("mousemove",this._drag,this);this.on("mouseup",this._dragEnd,this);this.on("globalout",this._dragEnd,this)}Et.prototype={constructor:Et,_dragStart:function(t){var e=t.target;if(e&&e.draggable){this._draggingTarget=e;e.dragging=true;this._x=t.offsetX;this._y=t.offsetY;this.dispatchToElement(Ot(e,t),"dragstart",t.event)}},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX;var i=t.offsetY;var a=r-this._x;var n=i-this._y;this._x=r;this._y=i;e.drift(a,n,t);this.dispatchToElement(Ot(e,t),"drag",t.event);var o=this.findHover(r,i,e).target;var s=this._dropTarget;this._dropTarget=o;if(e!==o){if(s&&o!==s){this.dispatchToElement(Ot(s,t),"dragleave",t.event)}if(o&&o!==s){this.dispatchToElement(Ot(o,t),"dragenter",t.event)}}}},_dragEnd:function(t){var e=this._draggingTarget;if(e){e.dragging=false}this.dispatchToElement(Ot(e,t),"dragend",t.event);if(this._dropTarget){this.dispatchToElement(Ot(this._dropTarget,t),"drop",t.event)}this._draggingTarget=null;this._dropTarget=null}};function Ot(t,e){return{target:t,topTarget:e&&e.topTarget}}var zt=Array.prototype.slice;var Rt=function(){this._$handlers={}};Rt.prototype={constructor:Rt,one:function(t,e,r){var i=this._$handlers;if(!e||!t){return this}if(!i[t]){i[t]=[]}for(var a=0;a<i[t].length;a++){if(i[t][a].h===e){return this}}i[t].push({h:e,one:true,ctx:r||this});return this},on:function(t,e,r){var i=this._$handlers;if(!e||!t){return this}if(!i[t]){i[t]=[]}for(var a=0;a<i[t].length;a++){if(i[t][a].h===e){return this}}i[t].push({h:e,one:false,ctx:r||this});return this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var r=this._$handlers;if(!t){this._$handlers={};return this}if(e){if(r[t]){var i=[];for(var a=0,n=r[t].length;a<n;a++){if(r[t][a]["h"]!=e){i.push(r[t][a])}}r[t]=i}if(r[t]&&r[t].length===0){delete r[t]}}else{delete r[t]}return this},trigger:function(t){if(this._$handlers[t]){var e=arguments;var r=e.length;if(r>3){e=zt.call(e,1)}var i=this._$handlers[t];var a=i.length;for(var n=0;n<a;){switch(r){case 1:i[n]["h"].call(i[n]["ctx"]);break;case 2:i[n]["h"].call(i[n]["ctx"],e[1]);break;case 3:i[n]["h"].call(i[n]["ctx"],e[1],e[2]);break;default:i[n]["h"].apply(i[n]["ctx"],e);break}if(i[n]["one"]){i.splice(n,1);a--}else{n++}}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments;var r=e.length;if(r>4){e=zt.call(e,1,e.length-1)}var i=e[e.length-1];var a=this._$handlers[t];var n=a.length;for(var o=0;o<n;){switch(r){case 1:a[o]["h"].call(i);break;case 2:a[o]["h"].call(i,e[1]);break;case 3:a[o]["h"].call(i,e[1],e[2]);break;default:a[o]["h"].apply(i,e);break}if(a[o]["one"]){a.splice(o,1);n--}else{o++}}}return this}};var Bt="silent";function Vt(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:false,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which}}function Gt(){}Gt.prototype.dispose=function(){};var Ft=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];var Wt=function(t,e,r,i){Rt.call(this);this.storage=t;this.painter=e;this.painterRoot=i;r=r||new Gt;this.proxy=null;this._hovered={};this._lastTouchMoment;this._lastX;this._lastY;Et.call(this);this.setHandlerProxy(r)};Wt.prototype={constructor:Wt,setHandlerProxy:function(e){if(this.proxy){this.proxy.dispose()}if(e){L(Ft,function(t){e.on&&e.on(t,this[t],this)},this);e.handler=this}this.proxy=e},mousemove:function(t){var e=t.zrX;var r=t.zrY;var i=this._hovered;var a=i.target;if(a&&!a.__zr){i=this.findHover(i.x,i.y);a=i.target}var n=this._hovered=this.findHover(e,r);var o=n.target;var s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default");if(a&&o!==a){this.dispatchToElement(i,"mouseout",t)}this.dispatchToElement(n,"mousemove",t);if(o&&o!==a){this.dispatchToElement(n,"mouseover",t)}},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e=t.toElement||t.relatedTarget;var r;do{e=e&&e.parentNode}while(e&&e.nodeType!=9&&!(r=e===this.painterRoot));!r&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose();this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){t=t||{};var i=t.target;if(i&&i.silent){return}var a="on"+e;var n=Vt(e,t,r);while(i){i[a]&&(n.cancelBubble=i[a].call(i,n));i.trigger(e,n);i=i.parent;if(n.cancelBubble){break}}if(!n.cancelBubble){this.trigger(e,n);this.painter&&this.painter.eachOtherLayer(function(t){if(typeof t[a]=="function"){t[a].call(t,n)}if(t.trigger){t.trigger(e,n)}})}},findHover:function(t,e,r){var i=this.storage.getDisplayList();var a={x:t,y:e};for(var n=i.length-1;n>=0;n--){var o;if(i[n]!==r&&!i[n].ignore&&(o=Ht(i[n],t,e))){!a.topTarget&&(a.topTarget=i[n]);if(o!==Bt){a.target=i[n];break}}}return a}};L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){Wt.prototype[i]=function(t){var e=this.findHover(t.zrX,t.zrY);var r=e.target;if(i==="mousedown"){this._downEl=r;this._downPoint=[t.zrX,t.zrY];this._upEl=r}else if(i==="mouseup"){this._upEl=r}else if(i==="click"){if(this._downEl!==this._upEl||!this._downPoint||It(this._downPoint,[t.zrX,t.zrY])>4){return}this._downPoint=null}this.dispatchToElement(e,i,t)}});function Ht(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){var i=t;var a;while(i){if(i.clipPath&&!i.clipPath.contain(e,r)){return false}if(i.silent){a=true}i=i.parent}return a?Bt:true}return false}I(Wt,Rt);I(Wt,Et);var Zt=typeof Float32Array==="undefined"?Array:Float32Array;function Ut(){var t=new Zt(6);jt(t);return t}function jt(t){t[0]=1;t[1]=0;t[2]=0;t[3]=1;t[4]=0;t[5]=0;return t}function Xt(t,e){t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[4];t[5]=e[5];return t}function Yt(t,e,r){var i=e[0]*r[0]+e[2]*r[1];var a=e[1]*r[0]+e[3]*r[1];var n=e[0]*r[2]+e[2]*r[3];var o=e[1]*r[2]+e[3]*r[3];var s=e[0]*r[4]+e[2]*r[5]+e[4];var l=e[1]*r[4]+e[3]*r[5]+e[5];t[0]=i;t[1]=a;t[2]=n;t[3]=o;t[4]=s;t[5]=l;return t}function qt(t,e,r){t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];t[4]=e[4]+r[0];t[5]=e[5]+r[1];return t}function $t(t,e,r){var i=e[0];var a=e[2];var n=e[4];var o=e[1];var s=e[3];var l=e[5];var u=Math.sin(r);var h=Math.cos(r);t[0]=i*h+o*u;t[1]=-i*u+o*h;t[2]=a*h+s*u;t[3]=-a*u+h*s;t[4]=h*n+u*l;t[5]=h*l-u*n;return t}function Kt(t,e,r){var i=r[0];var a=r[1];t[0]=e[0]*i;t[1]=e[1]*a;t[2]=e[2]*i;t[3]=e[3]*a;t[4]=e[4]*i;t[5]=e[5]*a;return t}function Jt(t,e){var r=e[0];var i=e[2];var a=e[4];var n=e[1];var o=e[3];var s=e[5];var l=r*o-n*i;if(!l){return null}l=1/l;t[0]=o*l;t[1]=-n*l;t[2]=-i*l;t[3]=r*l;t[4]=(i*s-o*a)*l;t[5]=(n*a-r*s)*l;return t}function Qt(t){var e=Ut();Xt(e,t);return e}var te=(Object.freeze||Object)({create:Ut,identity:jt,copy:Xt,mul:Yt,translate:qt,rotate:$t,scale:Kt,invert:Jt,clone:Qt});var ee=jt;var re=5e-5;function ie(t){return t>re||t<-re}var ae=function(t){t=t||{};if(!t.position){this.position=[0,0]}if(t.rotation==null){this.rotation=0}if(!t.scale){this.scale=[1,1]}this.origin=this.origin||null};var ne=ae.prototype;ne.transform=null;ne.needLocalTransform=function(){return ie(this.rotation)||ie(this.position[0])||ie(this.position[1])||ie(this.scale[0]-1)||ie(this.scale[1]-1)};ne.updateTransform=function(){var t=this.parent;var e=t&&t.transform;var r=this.needLocalTransform();var i=this.transform;if(!(r||e)){i&&ee(i);return}i=i||Ut();if(r){this.getLocalTransform(i)}else{ee(i)}if(e){if(r){Yt(i,t.transform,i)}else{Xt(i,t.transform)}}this.transform=i;this.invTransform=this.invTransform||Ut();Jt(this.invTransform,i)};ne.getLocalTransform=function(t){return ae.getLocalTransform(this,t)};ne.setTransform=function(t){var e=this.transform;var r=t.dpr||1;if(e){t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5])}else{t.setTransform(r,0,0,r,0,0)}};ne.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var oe=[];ne.decomposeTransform=function(){if(!this.transform){return}var t=this.parent;var e=this.transform;if(t&&t.transform){Yt(oe,t.invTransform,e);e=oe}var r=e[0]*e[0]+e[1]*e[1];var i=e[2]*e[2]+e[3]*e[3];var a=this.position;var n=this.scale;if(ie(r-1)){r=Math.sqrt(r)}if(ie(i-1)){i=Math.sqrt(i)}if(e[0]<0){r=-r}if(e[3]<0){i=-i}a[0]=e[4];a[1]=e[5];n[0]=r;n[1]=i;this.rotation=Math.atan2(-e[1]/i,e[0]/r)};ne.getGlobalScale=function(){var t=this.transform;if(!t){return[1,1]}var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);var r=Math.sqrt(t[2]*t[2]+t[3]*t[3]);if(t[0]<0){e=-e}if(t[3]<0){r=-r}return[e,r]};ne.transformCoordToLocal=function(t,e){var r=[t,e];var i=this.invTransform;if(i){Lt(r,r,i)}return r};ne.transformCoordToGlobal=function(t,e){var r=[t,e];var i=this.transform;if(i){Lt(r,r,i)}return r};ae.getLocalTransform=function(t,e){e=e||[];ee(e);var r=t.origin;var i=t.scale||[1,1];var a=t.rotation||0;var n=t.position||[0,0];if(r){e[4]-=r[0];e[5]-=r[1]}Kt(e,e,i);if(a){$t(e,e,a)}if(r){e[4]+=r[0];e[5]+=r[1]}e[4]+=n[0];e[5]+=n[1];return e};var se={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){if((t*=2)<1){return.5*t*t}return-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){if((t*=2)<1){return.5*t*t*t}return.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){if((t*=2)<1){return.5*t*t*t*t}return-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){if((t*=2)<1){return.5*t*t*t*t*t}return.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){if(t===0){return 0}if(t===1){return 1}if((t*=2)<1){return.5*Math.pow(1024,t-1)}return.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){if((t*=2)<1){return-.5*(Math.sqrt(1-t*t)-1)}return.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}return-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},elasticOut:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}return r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1},elasticInOut:function(t){var e;var r=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;e=i/4}else{e=i*Math.asin(1/r)/(2*Math.PI)}if((t*=2)<1){return-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))}return r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=1.70158*1.525;if((t*=2)<1){return.5*(t*t*((e+1)*t-e))}return.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-se.bounceOut(1-t)},bounceOut:function(t){if(t<1/2.75){return 7.5625*t*t}else if(t<2/2.75){return 7.5625*(t-=1.5/2.75)*t+.75}else if(t<2.5/2.75){return 7.5625*(t-=2.25/2.75)*t+.9375}else{return 7.5625*(t-=2.625/2.75)*t+.984375}},bounceInOut:function(t){if(t<.5){return se.bounceIn(t*2)*.5}return se.bounceOut(t*2-1)*.5+.5}};function le(t){this._target=t.target;this._life=t.life||1e3;this._delay=t.delay||0;this._initialized=false;this.loop=t.loop==null?false:t.loop;this.gap=t.gap||0;this.easing=t.easing||"Linear";this.onframe=t.onframe;this.ondestroy=t.ondestroy;this.onrestart=t.onrestart;this._pausedTime=0;this._paused=false}le.prototype={constructor:le,step:function(t,e){if(!this._initialized){this._startTime=t+this._delay;this._initialized=true}if(this._paused){this._pausedTime+=e;return}var r=(t-this._startTime-this._pausedTime)/this._life;if(r<0){return}r=Math.min(r,1);var i=this.easing;var a=typeof i=="string"?se[i]:i;var n=typeof a==="function"?a(r):r;this.fire("frame",n);if(r==1){if(this.loop){this.restart(t);return"restart"}this._needsRemove=true;return"destroy"}return null},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap;this._pausedTime=0;this._needsRemove=false},fire:function(t,e){t="on"+t;if(this[t]){this[t](this._target,e)}},pause:function(){this._paused=true},resume:function(){this._paused=false}};var ue=function(){this.head=null;this.tail=null;this._len=0};var he=ue.prototype;he.insert=function(t){var e=new fe(t);this.insertEntry(e);return e};he.insertEntry=function(t){if(!this.head){this.head=this.tail=t}else{this.tail.next=t;t.prev=this.tail;t.next=null;this.tail=t}this._len++};he.remove=function(t){var e=t.prev;var r=t.next;if(e){e.next=r}else{this.head=r}if(r){r.prev=e}else{this.tail=e}t.next=t.prev=null;this._len--};he.len=function(){return this._len};he.clear=function(){this.head=this.tail=null;this._len=0};var fe=function(t){this.value=t;this.next;this.prev};var ce=function(t){this._list=new ue;this._map={};this._maxSize=t||10;this._lastRemovedEntry=null};var ve=ce.prototype;ve.put=function(t,e){var r=this._list;var i=this._map;var a=null;if(i[t]==null){var n=r.len();var o=this._lastRemovedEntry;if(n>=this._maxSize&&n>0){var s=r.head;r.remove(s);delete i[s.key];a=s.value;this._lastRemovedEntry=s}if(o){o.value=e}else{o=new fe(e)}o.key=t;r.insertEntry(o);i[t]=o}return a};ve.get=function(t){var e=this._map[t];var r=this._list;if(e!=null){if(e!==r.tail){r.remove(e);r.insertEntry(e)}return e.value}};ve.clear=function(){this._list.clear();this._map={}};var de={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function pe(t){t=Math.round(t);return t<0?0:t>255?255:t}function ge(t){t=Math.round(t);return t<0?0:t>360?360:t}function me(t){return t<0?0:t>1?1:t}function ye(t){if(t.length&&t.charAt(t.length-1)==="%"){return pe(parseFloat(t)/100*255)}return pe(parseInt(t,10))}function xe(t){if(t.length&&t.charAt(t.length-1)==="%"){return me(parseFloat(t)/100)}return me(parseFloat(t))}function _e(t,e,r){if(r<0){r+=1}else if(r>1){r-=1}if(r*6<1){return t+(e-t)*r*6}if(r*2<1){return e}if(r*3<2){return t+(e-t)*(2/3-r)*6}return t}function we(t,e,r){return t+(e-t)*r}function be(t,e,r,i,a){t[0]=e;t[1]=r;t[2]=i;t[3]=a;return t}function Se(t,e){t[0]=e[0];t[1]=e[1];t[2]=e[2];t[3]=e[3];return t}var Me=new ce(20);var Ie=null;function De(t,e){if(Ie){Se(Ie,e)}Ie=Me.put(t,Ie||e.slice())}function Te(t,e){if(!t){return}e=e||[];var r=Me.get(t);if(r){return Se(e,r)}t=t+"";var i=t.replace(/ /g,"").toLowerCase();if(i in de){Se(e,de[i]);De(t,e);return e}if(i.charAt(0)==="#"){if(i.length===4){var a=parseInt(i.substr(1),16);if(!(a>=0&&a<=4095)){be(e,0,0,0,1);return}be(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,1);De(t,e);return e}else if(i.length===7){var a=parseInt(i.substr(1),16);if(!(a>=0&&a<=16777215)){be(e,0,0,0,1);return}be(e,(a&16711680)>>16,(a&65280)>>8,a&255,1);De(t,e);return e}return}var n=i.indexOf("("),o=i.indexOf(")");if(n!==-1&&o+1===i.length){var s=i.substr(0,n);var l=i.substr(n+1,o-(n+1)).split(",");var u=1;switch(s){case"rgba":if(l.length!==4){be(e,0,0,0,1);return}u=xe(l.pop());case"rgb":if(l.length!==3){be(e,0,0,0,1);return}be(e,ye(l[0]),ye(l[1]),ye(l[2]),u);De(t,e);return e;case"hsla":if(l.length!==4){be(e,0,0,0,1);return}l[3]=xe(l[3]);Ae(l,e);De(t,e);return e;case"hsl":if(l.length!==3){be(e,0,0,0,1);return}Ae(l,e);De(t,e);return e;default:return}}be(e,0,0,0,1);return}function Ae(t,e){var r=(parseFloat(t[0])%360+360)%360/360;var i=xe(t[1]);var a=xe(t[2]);var n=a<=.5?a*(i+1):a+i-a*i;var o=a*2-n;e=e||[];be(e,pe(_e(o,n,r+1/3)*255),pe(_e(o,n,r)*255),pe(_e(o,n,r-1/3)*255),1);if(t.length===4){e[3]=t[3]}return e}function Ce(t){if(!t){return}var e=t[0]/255;var r=t[1]/255;var i=t[2]/255;var a=Math.min(e,r,i);var n=Math.max(e,r,i);var o=n-a;var s=(n+a)/2;var l;var u;if(o===0){l=0;u=0}else{if(s<.5){u=o/(n+a)}else{u=o/(2-n-a)}var h=((n-e)/6+o/2)/o;var f=((n-r)/6+o/2)/o;var c=((n-i)/6+o/2)/o;if(e===n){l=c-f}else if(r===n){l=1/3+h-c}else if(i===n){l=2/3+f-h}if(l<0){l+=1}if(l>1){l-=1}}var v=[l*360,u,s];if(t[3]!=null){v.push(t[3])}return v}function Le(t,e){var r=Te(t);if(r){for(var i=0;i<3;i++){if(e<0){r[i]=r[i]*(1-e)|0}else{r[i]=(255-r[i])*e+r[i]|0}}return Be(r,r.length===4?"rgba":"rgb")}}function ke(t){var e=Te(t);if(e){return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}}function Pe(t,e,r){if(!(e&&e.length)||!(t>=0&&t<=1)){return}r=r||[];var i=t*(e.length-1);var a=Math.floor(i);var n=Math.ceil(i);var o=e[a];var s=e[n];var l=i-a;r[0]=pe(we(o[0],s[0],l));r[1]=pe(we(o[1],s[1],l));r[2]=pe(we(o[2],s[2],l));r[3]=me(we(o[3],s[3],l));return r}var Ne=Pe;function Ee(t,e,r){if(!(e&&e.length)||!(t>=0&&t<=1)){return}var i=t*(e.length-1);var a=Math.floor(i);var n=Math.ceil(i);var o=Te(e[a]);var s=Te(e[n]);var l=i-a;var u=Be([pe(we(o[0],s[0],l)),pe(we(o[1],s[1],l)),pe(we(o[2],s[2],l)),me(we(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:a,rightIndex:n,value:i}:u}var Oe=Ee;function ze(t,e,r,i){t=Te(t);if(t){t=Ce(t);e!=null&&(t[0]=ge(e));r!=null&&(t[1]=xe(r));i!=null&&(t[2]=xe(i));return Be(Ae(t),"rgba")}}function Re(t,e){t=Te(t);if(t&&e!=null){t[3]=me(e);return Be(t,"rgba")}}function Be(t,e){if(!t||!t.length){return}var r=t[0]+","+t[1]+","+t[2];if(e==="rgba"||e==="hsva"||e==="hsla"){r+=","+t[3]}return e+"("+r+")"}var Ve=(Object.freeze||Object)({parse:Te,lift:Le,toHex:ke,fastLerp:Pe,fastMapToColor:Ne,lerp:Ee,mapToColor:Oe,modifyHSL:ze,modifyAlpha:Re,stringify:Be});var Ge=Array.prototype.slice;function Fe(t,e){return t[e]}function We(t,e,r){t[e]=r}function He(t,e,r){return(e-t)*r+t}function Ze(t,e,r){return r>.5?e:t}function Ue(t,e,r,i,a){var n=t.length;if(a==1){for(var o=0;o<n;o++){i[o]=He(t[o],e[o],r)}}else{var s=n&&t[0].length;for(var o=0;o<n;o++){for(var l=0;l<s;l++){i[o][l]=He(t[o][l],e[o][l],r)}}}}function je(t,e,r){var i=t.length;var a=e.length;if(i!==a){var n=i>a;if(n){t.length=a}else{for(var o=i;o<a;o++){t.push(r===1?e[o]:Ge.call(e[o]))}}}var s=t[0]&&t[0].length;for(var o=0;o<t.length;o++){if(r===1){if(isNaN(t[o])){t[o]=e[o]}}else{for(var l=0;l<s;l++){if(isNaN(t[o][l])){t[o][l]=e[o][l]}}}}}function Xe(t,e,r){if(t===e){return true}var i=t.length;if(i!==e.length){return false}if(r===1){for(var a=0;a<i;a++){if(t[a]!==e[a]){return false}}}else{var n=t[0].length;for(var a=0;a<i;a++){for(var o=0;o<n;o++){if(t[a][o]!==e[a][o]){return false}}}}return true}function Ye(t,e,r,i,a,n,o,s,l){var u=t.length;if(l==1){for(var h=0;h<u;h++){s[h]=qe(t[h],e[h],r[h],i[h],a,n,o)}}else{var f=t[0].length;for(var h=0;h<u;h++){for(var c=0;c<f;c++){s[h][c]=qe(t[h][c],e[h][c],r[h][c],i[h][c],a,n,o)}}}}function qe(t,e,r,i,a,n,o){var s=(r-t)*.5;var l=(i-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*a+e}function $e(t){if(O(t)){var e=t.length;if(O(t[0])){var r=[];for(var i=0;i<e;i++){r.push(Ge.call(t[i]))}return r}return Ge.call(t)}return t}function Ke(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.floor(t[2]);return"rgba("+t.join(",")+")"}function Je(t){var e=t[t.length-1].value;return O(e&&e[0])?2:1}function Qe(t,e,r,i,n,a){var o=t._getter;var s=t._setter;var l=e==="spline";var u=i.length;if(!u){return}var h=i[0].value;var f=O(h);var c=false;var v=false;var d=f?Je(i):0;var p;i.sort(function(t,e){return t.time-e.time});p=i[u-1].time;var g=[];var m=[];var y=i[0].value;var x=true;for(var _=0;_<u;_++){g.push(i[_].time/p);var w=i[_].value;if(!(f&&Xe(w,y,d)||!f&&w===y)){x=false}y=w;if(typeof w=="string"){var b=Te(w);if(b){w=b;c=true}else{v=true}}m.push(w)}if(!a&&x){return}var S=m[u-1];for(var _=0;_<u-1;_++){if(f){je(m[_],S,d)}else{if(isNaN(m[_])&&!isNaN(S)&&!v&&!c){m[_]=S}}}f&&je(o(t._target,n),S,d);var M=0;var I=0;var D;var T;var A;var C;var L;var k;if(c){var P=[0,0,0,0]}var N=function(t,e){var r;if(e<0){r=0}else if(e<I){D=Math.min(M+1,u-1);for(r=D;r>=0;r--){if(g[r]<=e){break}}r=Math.min(r,u-2)}else{for(r=M;r<u;r++){if(g[r]>e){break}}r=Math.min(r-1,u-2)}M=r;I=e;var i=g[r+1]-g[r];if(i===0){return}else{T=(e-g[r])/i}if(l){C=m[r];A=m[r===0?r:r-1];L=m[r>u-2?u-1:r+1];k=m[r>u-3?u-1:r+2];if(f){Ye(A,C,L,k,T,T*T,T*T*T,o(t,n),d)}else{var a;if(c){a=Ye(A,C,L,k,T,T*T,T*T*T,P,1);a=Ke(P)}else if(v){return Ze(C,L,T)}else{a=qe(A,C,L,k,T,T*T,T*T*T)}s(t,n,a)}}else{if(f){Ue(m[r],m[r+1],T,o(t,n),d)}else{var a;if(c){Ue(m[r],m[r+1],T,P,1);a=Ke(P)}else if(v){return Ze(m[r],m[r+1],T)}else{a=He(m[r],m[r+1],T)}s(t,n,a)}}};var E=new le({target:t._target,life:p,loop:t._loop,delay:t._delay,onframe:N,ondestroy:r});if(e&&e!=="spline"){E.easing=e}return E}var tr=function(t,e,r,i){this._tracks={};this._target=t;this._loop=e||false;this._getter=r||Fe;this._setter=i||We;this._clipCount=0;this._delay=0;this._doneList=[];this._onframeList=[];this._clipList=[]};tr.prototype={when:function(t,e){var r=this._tracks;for(var i in e){if(!e.hasOwnProperty(i)){continue}if(!r[i]){r[i]=[];var a=this._getter(this._target,i);if(a==null){continue}if(t!==0){r[i].push({time:0,value:$e(a)})}}r[i].push({time:t,value:e[i]})}return this},during:function(t){this._onframeList.push(t);return this},pause:function(){for(var t=0;t<this._clipList.length;t++){this._clipList[t].pause()}this._paused=true},resume:function(){for(var t=0;t<this._clipList.length;t++){this._clipList[t].resume()}this._paused=false},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={};this._clipList.length=0;var t=this._doneList;var e=t.length;for(var r=0;r<e;r++){t[r].call(this)}},start:function(t,e){var i=this;var r=0;var a=function(){r--;if(!r){i._doneCallback()}};var n;for(var o in this._tracks){if(!this._tracks.hasOwnProperty(o)){continue}var s=Qe(this,t,a,this._tracks[o],o,e);if(s){this._clipList.push(s);r++;if(this.animation){this.animation.addClip(s)}n=s}}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var r=0;r<i._onframeList.length;r++){i._onframeList[r](t,e)}}}if(!r){this._doneCallback()}return this},stop:function(t){var e=this._clipList;var r=this.animation;for(var i=0;i<e.length;i++){var a=e[i];if(t){a.onframe(this._target,1)}r&&r.removeClip(a)}e.length=0},delay:function(t){this._delay=t;return this},done:function(t){if(t){this._doneList.push(t)}return this},getClips:function(){return this._clipList}};var er=1;if(typeof window!=="undefined"){er=Math.max(window.devicePixelRatio||1,1)}var rr=0;var ir=er;var ar=function(){};if(rr===1){ar=function(){for(var t in arguments){throw new Error(arguments[t])}}}else if(rr>1){ar=function(){for(var t in arguments){console.log(arguments[t])}}}var nr=ar;var or=function(){this.animators=[]};or.prototype={constructor:or,animate:function(t,e){var r;var i=false;var a=this;var n=this.__zr;if(t){var o=t.split(".");var s=a;i=o[0]==="shape";for(var l=0,u=o.length;l<u;l++){if(!s){continue}s=s[o[l]]}if(s){r=s}}else{r=a}if(!r){nr('Property "'+t+'" is not existed in element '+a.id);return}var h=a.animators;var f=new tr(r,e);f.during(function(t){a.dirty(i)}).done(function(){h.splice(S(h,f),1)});h.push(f);if(n){n.animation.addAnimator(f)}return f},stopAnimation:function(t){var e=this.animators;var r=e.length;for(var i=0;i<r;i++){e[i].stop(t)}e.length=0;return this},animateTo:function(t,e,r,i,a,n){if(G(r)){a=i;i=r;r=0}else if(V(i)){a=i;i="linear";r=0}else if(V(r)){a=r;r=0}else if(V(e)){a=e;e=500}else if(!e){e=500}this.stopAnimation();this._animateToShallow("",this,t,e,r);var o=this.animators.slice();var s=o.length;function l(){s--;if(!s){a&&a()}}if(!s){a&&a()}for(var u=0;u<o.length;u++){o[u].done(l).start(i,n)}},_animateToShallow:function(t,e,r,i,a){var n={};var o=0;for(var s in r){if(!r.hasOwnProperty(s)){continue}if(e[s]!=null){if(F(r[s])&&!O(r[s])){this._animateToShallow(t?t+"."+s:s,e[s],r[s],i,a)}else{n[s]=r[s];o++}}else if(r[s]!=null){if(!t){this.attr(s,r[s])}else{var l={};l[t]={};l[t][s]=r[s];this.attr(l)}}}if(o>0){this.animate(t,false).when(i==null?500:i,n).delay(a||0)}return this}};var sr=function(t){ae.call(this,t);Rt.call(this,t);or.call(this,t);this.id=t.id||i()};sr.prototype={type:"element",name:"",__zr:null,ignore:false,clipPath:null,isGroup:false,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var r=this.transform;if(!r){r=this.transform=[1,0,0,1,0,0]}r[4]+=t;r[5]+=e;this.decomposeTransform();this.dirty(false)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if(t==="position"||t==="scale"||t==="origin"){if(e){var r=this[t];if(!r){r=this[t]=[]}r[0]=e[0];r[1]=e[1]}}else{this[t]=e}},hide:function(){this.ignore=true;this.__zr&&this.__zr.refresh()},show:function(){this.ignore=false;this.__zr&&this.__zr.refresh()},attr:function(t,e){if(typeof t==="string"){this.attrKV(t,e)}else if(F(t)){for(var r in t){if(t.hasOwnProperty(r)){this.attrKV(r,t[r])}}}this.dirty(false);return this},setClipPath:function(t){var e=this.__zr;if(e){t.addSelfToZr(e)}if(this.clipPath&&this.clipPath!==t){this.removeClipPath()}this.clipPath=t;t.__zr=e;t.__clipTarget=this;this.dirty(false)},removeClipPath:function(){var t=this.clipPath;if(t){if(t.__zr){t.removeSelfFromZr(t.__zr)}t.__zr=null;t.__clipTarget=null;this.clipPath=null;this.dirty(false)}},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e){for(var r=0;r<e.length;r++){t.animation.addAnimator(e[r])}}if(this.clipPath){this.clipPath.addSelfToZr(t)}},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e){for(var r=0;r<e.length;r++){t.animation.removeAnimator(e[r])}}if(this.clipPath){this.clipPath.removeSelfFromZr(t)}}};I(sr,or);I(sr,ae);I(sr,Rt);var lr=Lt;var ur=Math.min;var hr=Math.max;function fr(t,e,r,i){if(r<0){t=t+r;r=-r}if(i<0){e=e+i;i=-i}this.x=t;this.y=e;this.width=r;this.height=i}fr.prototype={constructor:fr,union:function(t){var e=ur(t.x,this.x);var r=ur(t.y,this.y);this.width=hr(t.x+t.width,this.x+this.width)-e;this.height=hr(t.y+t.height,this.y+this.height)-r;this.x=e;this.y=r},applyTransform:function(){var i=[];var a=[];var n=[];var o=[];return function(t){if(!t){return}i[0]=n[0]=this.x;i[1]=o[1]=this.y;a[0]=o[0]=this.x+this.width;a[1]=n[1]=this.y+this.height;lr(i,i,t);lr(a,a,t);lr(n,n,t);lr(o,o,t);this.x=ur(i[0],a[0],n[0],o[0]);this.y=ur(i[1],a[1],n[1],o[1]);var e=hr(i[0],a[0],n[0],o[0]);var r=hr(i[1],a[1],n[1],o[1]);this.width=e-this.x;this.height=r-this.y}}(),calculateTransform:function(t){var e=this;var r=t.width/e.width;var i=t.height/e.height;var a=Ut();qt(a,a,[-e.x,-e.y]);Kt(a,a,[r,i]);qt(a,a,[t.x,t.y]);return a},intersect:function(t){if(!t){return false}if(!(t instanceof fr)){t=fr.create(t)}var e=this;var r=e.x;var i=e.x+e.width;var a=e.y;var n=e.y+e.height;var o=t.x;var s=t.x+t.width;var l=t.y;var u=t.y+t.height;return!(i<o||s<r||n<l||u<a)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new fr(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}}};fr.create=function(t){return new fr(t.x,t.y,t.width,t.height)};var cr=function(t){t=t||{};sr.call(this,t);for(var e in t){if(t.hasOwnProperty(e)){this[e]=t[e]}}this._children=[];this.__storage=null;this.__dirty=true};cr.prototype={constructor:cr,isGroup:true,type:"group",silent:false,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){var e=this._children;for(var r=0;r<e.length;r++){if(e[r].name===t){return e[r]}}},childCount:function(){return this._children.length},add:function(t){if(t&&t!==this&&t.parent!==this){this._children.push(t);this._doAdd(t)}return this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var r=this._children;var i=r.indexOf(e);if(i>=0){r.splice(i,0,t);this._doAdd(t)}}return this},_doAdd:function(t){if(t.parent){t.parent.remove(t)}t.parent=this;var e=this.__storage;var r=this.__zr;if(e&&e!==t.__storage){e.addToStorage(t);if(t instanceof cr){t.addChildrenToStorage(e)}}r&&r.refresh()},remove:function(t){var e=this.__zr;var r=this.__storage;var i=this._children;var a=S(i,t);if(a<0){return this}i.splice(a,1);t.parent=null;if(r){r.delFromStorage(t);if(t instanceof cr){t.delChildrenFromStorage(r)}}e&&e.refresh();return this},removeAll:function(){var t=this._children;var e=this.__storage;var r;var i;for(i=0;i<t.length;i++){r=t[i];if(e){e.delFromStorage(r);if(r instanceof cr){r.delChildrenFromStorage(e)}}r.parent=null}t.length=0;return this},eachChild:function(t,e){var r=this._children;for(var i=0;i<r.length;i++){var a=r[i];t.call(e,a,i)}return this},traverse:function(t,e){for(var r=0;r<this._children.length;r++){var i=this._children[r];t.call(e,i);if(i.type==="group"){i.traverse(t,e)}}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.addToStorage(r);if(r instanceof cr){r.addChildrenToStorage(t)}}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var r=this._children[e];t.delFromStorage(r);if(r instanceof cr){r.delChildrenFromStorage(t)}}},dirty:function(){this.__dirty=true;this.__zr&&this.__zr.refresh();return this},getBoundingRect:function(t){var e=null;var r=new fr(0,0,0,0);var i=t||this._children;var a=[];for(var n=0;n<i.length;n++){var o=i[n];if(o.ignore||o.invisible){continue}var s=o.getBoundingRect();var l=o.getLocalTransform(a);if(l){r.copy(s);r.applyTransform(l);e=e||r.clone();e.union(r)}else{e=e||s.clone();e.union(s)}}return e||r}};M(cr,sr);var vr=32;var dr=7;function pr(t){var e=0;while(t>=vr){e|=t&1;t>>=1}return t+e}function gr(t,e,r,i){var a=e+1;if(a===r){return 1}if(i(t[a++],t[e])<0){while(a<r&&i(t[a],t[a-1])<0){a++}mr(t,e,a)}else{while(a<r&&i(t[a],t[a-1])>=0){a++}}return a-e}function mr(t,e,r){r--;while(e<r){var i=t[e];t[e++]=t[r];t[r--]=i}}function yr(t,e,r,i,a){if(i===e){i++}for(;i<r;i++){var n=t[i];var o=e;var s=i;var l;while(o<s){l=o+s>>>1;if(a(n,t[l])<0){s=l}else{o=l+1}}var u=i-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:while(u>0){t[o+u]=t[o+u-1];u--}}t[o]=n}}function xr(t,e,r,i,a,n){var o=0;var s=0;var l=1;if(n(t,e[r+a])>0){s=i-a;while(l<s&&n(t,e[r+a+l])>0){o=l;l=(l<<1)+1;if(l<=0){l=s}}if(l>s){l=s}o+=a;l+=a}else{s=a+1;while(l<s&&n(t,e[r+a-l])<=0){o=l;l=(l<<1)+1;if(l<=0){l=s}}if(l>s){l=s}var u=o;o=a-l;l=a-u}o++;while(o<l){var h=o+(l-o>>>1);if(n(t,e[r+h])>0){o=h+1}else{l=h}}return l}function _r(t,e,r,i,a,n){var o=0;var s=0;var l=1;if(n(t,e[r+a])<0){s=a+1;while(l<s&&n(t,e[r+a-l])<0){o=l;l=(l<<1)+1;if(l<=0){l=s}}if(l>s){l=s}var u=o;o=a-l;l=a-u}else{s=i-a;while(l<s&&n(t,e[r+a+l])>=0){o=l;l=(l<<1)+1;if(l<=0){l=s}}if(l>s){l=s}o+=a;l+=a}o++;while(o<l){var h=o+(l-o>>>1);if(n(t,e[r+h])<0){l=h}else{o=h+1}}return l}function wr(d,p){var g=dr;var o;var s;var l=0;var m=[];o=[];s=[];function t(t,e){o[l]=t;s[l]=e;l+=1}function e(){while(l>1){var t=l-2;if(t>=1&&s[t-1]<=s[t]+s[t+1]||t>=2&&s[t-2]<=s[t]+s[t-1]){if(s[t-1]<s[t+1]){t--}}else if(s[t]>s[t+1]){break}i(t)}}function r(){while(l>1){var t=l-2;if(t>0&&s[t-1]<s[t+1]){t--}i(t)}}function i(t){var e=o[t];var r=s[t];var i=o[t+1];var a=s[t+1];s[t]=r+a;if(t===l-3){o[t+1]=o[t+2];s[t+1]=s[t+2]}l--;var n=_r(d[i],d,e,r,0,p);e+=n;r-=n;if(r===0){return}a=xr(d[e+r-1],d,i,a,a-1,p);if(a===0){return}if(r<=a){u(e,r,i,a)}else{h(e,r,i,a)}}function u(t,e,r,i){var a=0;for(a=0;a<e;a++){m[a]=d[t+a]}var n=0;var o=r;var s=t;d[s++]=d[o++];if(--i===0){for(a=0;a<e;a++){d[s+a]=m[n+a]}return}if(e===1){for(a=0;a<i;a++){d[s+a]=d[o+a]}d[s+i]=m[n];return}var l=g;var u,h,f;while(1){u=0;h=0;f=false;do{if(p(d[o],m[n])<0){d[s++]=d[o++];h++;u=0;if(--i===0){f=true;break}}else{d[s++]=m[n++];u++;h=0;if(--e===1){f=true;break}}}while((u|h)<l);if(f){break}do{u=_r(d[o],m,n,e,0,p);if(u!==0){for(a=0;a<u;a++){d[s+a]=m[n+a]}s+=u;n+=u;e-=u;if(e<=1){f=true;break}}d[s++]=d[o++];if(--i===0){f=true;break}h=xr(m[n],d,o,i,0,p);if(h!==0){for(a=0;a<h;a++){d[s+a]=d[o+a]}s+=h;o+=h;i-=h;if(i===0){f=true;break}}d[s++]=m[n++];if(--e===1){f=true;break}l--}while(u>=dr||h>=dr);if(f){break}if(l<0){l=0}l+=2}g=l;g<1&&(g=1);if(e===1){for(a=0;a<i;a++){d[s+a]=d[o+a]}d[s+i]=m[n]}else if(e===0){throw new Error}else{for(a=0;a<e;a++){d[s+a]=m[n+a]}}}function h(t,e,r,i){var a=0;for(a=0;a<i;a++){m[a]=d[r+a]}var n=t+e-1;var o=i-1;var s=r+i-1;var l=0;var u=0;d[s--]=d[n--];if(--e===0){l=s-(i-1);for(a=0;a<i;a++){d[l+a]=m[a]}return}if(i===1){s-=e;n-=e;u=s+1;l=n+1;for(a=e-1;a>=0;a--){d[u+a]=d[l+a]}d[s]=m[o];return}var h=g;while(true){var f=0;var c=0;var v=false;do{if(p(m[o],d[n])<0){d[s--]=d[n--];f++;c=0;if(--e===0){v=true;break}}else{d[s--]=m[o--];c++;f=0;if(--i===1){v=true;break}}}while((f|c)<h);if(v){break}do{f=e-_r(m[o],d,t,e,e-1,p);if(f!==0){s-=f;n-=f;e-=f;u=s+1;l=n+1;for(a=f-1;a>=0;a--){d[u+a]=d[l+a]}if(e===0){v=true;break}}d[s--]=m[o--];if(--i===1){v=true;break}c=i-xr(d[n],m,0,i,i-1,p);if(c!==0){s-=c;o-=c;i-=c;u=s+1;l=o+1;for(a=0;a<c;a++){d[u+a]=m[l+a]}if(i<=1){v=true;break}}d[s--]=d[n--];if(--e===0){v=true;break}h--}while(f>=dr||c>=dr);if(v){break}if(h<0){h=0}h+=2}g=h;if(g<1){g=1}if(i===1){s-=e;n-=e;u=s+1;l=n+1;for(a=e-1;a>=0;a--){d[u+a]=d[l+a]}d[s]=m[o]}else if(i===0){throw new Error}else{l=s-(i-1);for(a=0;a<i;a++){d[l+a]=m[a]}}}this.mergeRuns=e;this.forceMergeRuns=r;this.pushRun=t}function br(t,e,r,i){if(!r){r=0}if(!i){i=t.length}var a=i-r;if(a<2){return}var n=0;if(a<vr){n=gr(t,r,i,e);yr(t,r,i,r+n,e);return}var o=new wr(t,e);var s=pr(a);do{n=gr(t,r,i,e);if(n<s){var l=a;if(l>s){l=s}yr(t,r,r+l,r+n,e);n=l}o.pushRun(r,n);o.mergeRuns();a-=n;r+=n}while(a!==0);o.forceMergeRuns()}function Sr(t,e){if(t.zlevel===e.zlevel){if(t.z===e.z){return t.z2-e.z2}return t.z-e.z}return t.zlevel-e.zlevel}var Mr=function(){this._roots=[];this._displayList=[];this._displayListLen=0};Mr.prototype={constructor:Mr,traverse:function(t,e){for(var r=0;r<this._roots.length;r++){this._roots[r].traverse(t,e)}},getDisplayList:function(t,e){e=e||false;if(t){this.updateDisplayList(e)}return this._displayList},updateDisplayList:function(t){this._displayListLen=0;var e=this._roots;var r=this._displayList;for(var i=0,a=e.length;i<a;i++){this._updateAndAddDisplayable(e[i],null,t)}r.length=this._displayListLen;m.canvasSupported&&br(r,Sr)},_updateAndAddDisplayable:function(t,e,r){if(t.ignore&&!r){return}t.beforeUpdate();if(t.__dirty){t.update()}t.afterUpdate();var i=t.clipPath;if(i){if(e){e=e.slice()}else{e=[]}var a=i;var n=t;while(a){a.parent=n;a.updateTransform();e.push(a);n=a;a=a.clipPath}}if(t.isGroup){var o=t._children;for(var s=0;s<o.length;s++){var l=o[s];if(t.__dirty){l.__dirty=true}this._updateAndAddDisplayable(l,e,r)}t.__dirty=false}else{t.__clipPaths=e;this._displayList[this._displayListLen++]=t}},addRoot:function(t){if(t.__storage===this){return}if(t instanceof cr){t.addChildrenToStorage(this)}this.addToStorage(t);this._roots.push(t)},delRoot:function(t){if(t==null){for(var e=0;e<this._roots.length;e++){var r=this._roots[e];if(r instanceof cr){r.delChildrenFromStorage(this)}}this._roots=[];this._displayList=[];this._displayListLen=0;return}if(t instanceof Array){for(var e=0,i=t.length;e<i;e++){this.delRoot(t[e])}return}var a=S(this._roots,t);if(a>=0){this.delFromStorage(t);this._roots.splice(a,1);if(t instanceof cr){t.delChildrenFromStorage(this)}}},addToStorage:function(t){if(t){t.__storage=this;t.dirty(false)}return this},delFromStorage:function(t){if(t){t.__storage=null}return this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Sr};var Ir={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Dr=function(t,e,r){if(Ir.hasOwnProperty(e)){return r*=t.dpr}return r};var Tr=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];var Ar=function(t,e){this.extendFrom(t,false);this.host=e};function Cr(t,e,r){var i=e.x==null?0:e.x;var a=e.x2==null?1:e.x2;var n=e.y==null?0:e.y;var o=e.y2==null?0:e.y2;if(!e.global){i=i*r.width+r.x;a=a*r.width+r.x;n=n*r.height+r.y;o=o*r.height+r.y}i=isNaN(i)?0:i;a=isNaN(a)?1:a;n=isNaN(n)?0:n;o=isNaN(o)?0:o;var s=t.createLinearGradient(i,n,a,o);return s}function Lr(t,e,r){var i=r.width;var a=r.height;var n=Math.min(i,a);var o=e.x==null?.5:e.x;var s=e.y==null?.5:e.y;var l=e.r==null?.5:e.r;if(!e.global){o=o*i+r.x;s=s*a+r.y;l=l*n}var u=t.createRadialGradient(o,s,0,o,s,l);return u}Ar.prototype={constructor:Ar,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:false,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:false,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var i=this;var a=r&&r.style;var n=!a;for(var o=0;o<Tr.length;o++){var s=Tr[o];var l=s[0];if(n||i[l]!==a[l]){t[l]=Dr(t,l,i[l]||s[1])}}if(n||i.fill!==a.fill){t.fillStyle=i.fill}if(n||i.stroke!==a.stroke){t.strokeStyle=i.stroke}if(n||i.opacity!==a.opacity){t.globalAlpha=i.opacity==null?1:i.opacity}if(n||i.blend!==a.blend){t.globalCompositeOperation=i.blend||"source-over"}if(this.hasStroke()){var u=i.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return t!=null&&t!=="none"},hasStroke:function(){var t=this.stroke;return t!=null&&t!=="none"&&this.lineWidth>0},extendFrom:function(t,e){if(t){for(var r in t){if(t.hasOwnProperty(r)&&(e===true||(e===false?!this.hasOwnProperty(r):t[r]!=null))){this[r]=t[r]}}}},set:function(t,e){if(typeof t==="string"){this[t]=e}else{this.extendFrom(t,true)}},clone:function(){var t=new this.constructor;t.extendFrom(this,true);return t},getGradient:function(t,e,r){var i=e.type==="radial"?Lr:Cr;var a=i(t,e,r);var n=e.colorStops;for(var o=0;o<n.length;o++){a.addColorStop(n[o].offset,n[o].color)}return a}};var kr=Ar.prototype;for(var Pr=0;Pr<Tr.length;Pr++){var Nr=Tr[Pr];if(!(Nr[0]in kr)){kr[Nr[0]]=Nr[1]}}Ar.getGradient=kr.getGradient;var Er=function(t,e){this.image=t;this.repeat=e;this.type="pattern"};Er.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};function Or(){return false}function zr(t,e,r){var i=_();var a=e.getWidth();var n=e.getHeight();var o=i.style;if(o){o.position="absolute";o.left=0;o.top=0;o.width=a+"px";o.height=n+"px";i.setAttribute("data-zr-dom-id",t)}i.width=a*r;i.height=n*r;return i}var Rr=function(t,e,r){var i;r=r||ir;if(typeof t==="string"){i=zr(t,e,r)}else if(F(t)){i=t;t=i.id}this.id=t;this.dom=i;var a=i.style;if(a){i.onselectstart=Or;a["-webkit-user-select"]="none";a["user-select"]="none";a["-webkit-touch-callout"]="none";a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)";a["padding"]=0;a["margin"]=0;a["border-width"]=0}this.domBack=null;this.ctxBack=null;this.painter=e;this.config=null;this.clearColor=0;this.motionBlur=false;this.lastFrameAlpha=.7;this.dpr=r};Rr.prototype={constructor:Rr,__dirty:true,__used:false,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:false,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d");this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=zr("back-"+this.id,this.painter,t);this.ctxBack=this.domBack.getContext("2d");if(t!=1){this.ctxBack.scale(t,t)}},resize:function(t,e){var r=this.dpr;var i=this.dom;var a=i.style;var n=this.domBack;a.width=t+"px";a.height=e+"px";i.width=t*r;i.height=e*r;if(n){n.width=t*r;n.height=e*r;if(r!=1){this.ctxBack.scale(r,r)}}},clear:function(t){var e=this.dom;var r=this.ctx;var i=e.width;var a=e.height;var n=this.clearColor;var o=this.motionBlur&&!t;var s=this.lastFrameAlpha;var l=this.dpr;if(o){if(!this.domBack){this.createBackBuffer()}this.ctxBack.globalCompositeOperation="copy";this.ctxBack.drawImage(e,0,0,i/l,a/l)}r.clearRect(0,0,i,a);if(n){var u;if(n.colorStops){u=n.__canvasGradient||Ar.getGradient(r,n,{x:0,y:0,width:i,height:a});n.__canvasGradient=u}else if(n.image){u=Er.prototype.getCanvasPattern.call(n,r)}r.save();r.fillStyle=u||n;r.fillRect(0,0,i,a);r.restore()}if(o){var h=this.domBack;r.save();r.globalAlpha=s;r.drawImage(h,0,0,i,a);r.restore()}}};var Br=typeof window!=="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)};var Vr=new ce(50);function Gr(t){if(typeof t==="string"){var e=Vr.get(t);return e&&e.image}else{return t}}function Fr(t,e,r,i,a){if(!t){return e}else if(typeof t==="string"){if(e&&e.__zrImageSrc===t||!r){return e}var n=Vr.get(t);var o={hostEl:r,cb:i,cbPayload:a};if(n){e=n.image;!Hr(e)&&n.pending.push(o)}else{!e&&(e=new Image);e.onload=Wr;Vr.put(t,e.__cachedImgObj={image:e,pending:[o]});e.src=e.__zrImageSrc=t}return e}else{return t}}function Wr(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e];var i=r.cb;i&&i(this,r.cbPayload);r.hostEl.dirty()}t.pending.length=0}function Hr(t){return t&&t.width&&t.height}var Zr={};var Ur=0;var jr=5e3;var Xr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;var Yr="12px sans-serif";var qr={};function $r(t,e){qr[t]=e}function Kr(t,e){e=e||Yr;var r=t+":"+e;if(Zr[r]){return Zr[r]}var i=(t+"").split("\n");var a=0;for(var n=0,o=i.length;n<o;n++){a=Math.max(ui(i[n],e).width,a)}if(Ur>jr){Ur=0;Zr={}}Ur++;Zr[r]=a;return a}function Jr(t,e,r,i,a,n,o){return n?ti(t,e,r,i,a,n,o):Qr(t,e,r,i,a,o)}function Qr(t,e,r,i,a,n){var o=hi(t,e,a,n);var s=Kr(t,e);if(a){s+=a[1]+a[3]}var l=o.outerHeight;var u=ei(0,s,r);var h=ri(0,l,i);var f=new fr(u,h,s,l);f.lineHeight=o.lineHeight;return f}function ti(t,e,r,i,a,n,o){var s=fi(t,{rich:n,truncate:o,font:e,textAlign:r,textPadding:a});var l=s.outerWidth;var u=s.outerHeight;var h=ei(0,l,r);var f=ri(0,u,i);return new fr(h,f,l,u)}function ei(t,e,r){if(r==="right"){t-=e}else if(r==="center"){t-=e/2}return t}function ri(t,e,r){if(r==="middle"){t-=e/2}else if(r==="bottom"){t-=e}return t}function ii(t,e,r){var i=e.x;var a=e.y;var n=e.height;var o=e.width;var s=n/2;var l="left";var u="top";switch(t){case"left":i-=r;a+=s;l="right";u="middle";break;case"right":i+=r+o;a+=s;u="middle";break;case"top":i+=o/2;a-=r;l="center";u="bottom";break;case"bottom":i+=o/2;a+=n+r;l="center";break;case"inside":i+=o/2;a+=s;l="center";u="middle";break;case"insideLeft":i+=r;a+=s;u="middle";break;case"insideRight":i+=o-r;a+=s;l="right";u="middle";break;case"insideTop":i+=o/2;a+=r;l="center";break;case"insideBottom":i+=o/2;a+=n-r;l="center";u="bottom";break;case"insideTopLeft":i+=r;a+=r;break;case"insideTopRight":i+=o-r;a+=r;l="right";break;case"insideBottomLeft":i+=r;a+=n-r;u="bottom";break;case"insideBottomRight":i+=o-r;a+=n-r;l="right";u="bottom";break}return{x:i,y:a,textAlign:l,textVerticalAlign:u}}function ai(t,e,r,i,a){if(!e){return""}var n=(t+"").split("\n");a=ni(e,r,i,a);for(var o=0,s=n.length;o<s;o++){n[o]=oi(n[o],a)}return n.join("\n")}function ni(t,e,r,i){i=N({},i);i.font=e;var r=X(r,"...");i.maxIterations=X(i.maxIterations,2);var a=i.minChar=X(i.minChar,0);i.cnCharWidth=Kr("国",e);var n=i.ascCharWidth=Kr("a",e);i.placeholder=X(i.placeholder,"");var o=t=Math.max(0,t-1);for(var s=0;s<a&&o>=n;s++){o-=n}var l=Kr(r);if(l>o){r="";l=0}o=t-l;i.ellipsis=r;i.ellipsisWidth=l;i.contentWidth=o;i.containerWidth=t;return i}function oi(t,e){var r=e.containerWidth;var i=e.font;var a=e.contentWidth;if(!r){return""}var n=Kr(t,i);if(n<=r){return t}for(var o=0;;o++){if(n<=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?si(t,a,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*a/n):0;t=t.substr(0,s);n=Kr(t,i)}if(t===""){t=e.placeholder}return t}function si(t,e,r,i){var a=0;var n=0;for(var o=t.length;n<o&&a<e;n++){var s=t.charCodeAt(n);a+=0<=s&&s<=127?r:i}return n}function li(t){return Kr("国",t)}function ui(t,e){return qr.measureText(t,e)}qr.measureText=function(t,e){var r=b();r.font=e||Yr;return r.measureText(t)};function hi(t,e,r,i){t!=null&&(t+="");var a=li(e);var n=t?t.split("\n"):[];var o=n.length*a;var s=o;if(r){s+=r[0]+r[2]}if(t&&i){var l=i.outerHeight;var u=i.outerWidth;if(l!=null&&s>l){t="";n=[]}else if(u!=null){var h=ni(u-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder});for(var f=0,c=n.length;f<c;f++){n[f]=oi(n[f],h)}}}return{lines:n,height:o,outerHeight:s,lineHeight:a}}function fi(t,e){var r={lines:[],width:0,height:0};t!=null&&(t+="");if(!t){return r}var i=Xr.lastIndex=0;var a;while((a=Xr.exec(t))!=null){var n=a.index;if(n>i){ci(r,t.substring(i,n))}ci(r,a[2],a[1]);i=Xr.lastIndex}if(i<t.length){ci(r,t.substring(i,t.length))}var o=r.lines;var s=0;var l=0;var u=[];var h=e.textPadding;var f=e.truncate;var c=f&&f.outerWidth;var v=f&&f.outerHeight;if(h){c!=null&&(c-=h[1]+h[3]);v!=null&&(v-=h[0]+h[2])}for(var d=0;d<o.length;d++){var p=o[d];var g=0;var m=0;for(var y=0;y<p.tokens.length;y++){var x=p.tokens[y];var _=x.styleName&&e.rich[x.styleName]||{};var w=x.textPadding=_.textPadding;var b=x.font=_.font||e.font;var S=x.textHeight=X(_.textHeight,li(b));w&&(S+=w[0]+w[2]);x.height=S;x.lineHeight=Y(_.textLineHeight,e.textLineHeight,S);x.textAlign=_&&_.textAlign||e.textAlign;x.textVerticalAlign=_&&_.textVerticalAlign||"middle";if(v!=null&&s+x.lineHeight>v){return{lines:[],width:0,height:0}}x.textWidth=Kr(x.text,b);var M=_.textWidth;var I=M==null||M==="auto";if(typeof M==="string"&&M.charAt(M.length-1)==="%"){x.percentWidth=M;u.push(x);M=0}else{if(I){M=x.textWidth;var D=_.textBackgroundColor;var T=D&&D.image;if(T){T=Gr(T);if(Hr(T)){M=Math.max(M,T.width*S/T.height)}}}var A=w?w[1]+w[3]:0;M+=A;var C=c!=null?c-m:null;if(C!=null&&C<M){if(!I||C<A){x.text="";x.textWidth=M=0}else{x.text=ai(x.text,C-A,b,f.ellipsis,{minChar:f.minChar});x.textWidth=Kr(x.text,b);M=x.textWidth+A}}}m+=x.width=M;_&&(g=Math.max(g,x.lineHeight))}p.width=m;p.lineHeight=g;s+=g;l=Math.max(l,m)}r.outerWidth=r.width=X(e.textWidth,l);r.outerHeight=r.height=X(e.textHeight,s);if(h){r.outerWidth+=h[1]+h[3];r.outerHeight+=h[0]+h[2]}for(var d=0;d<u.length;d++){var x=u[d];var L=x.percentWidth;x.width=parseInt(L,10)/100*l}return r}function ci(t,e,r){var i=e==="";var a=e.split("\n");var n=t.lines;for(var o=0;o<a.length;o++){var s=a[o];var l={styleName:r,text:s,isLineHolder:!s&&!i};if(!o){var u=(n[n.length-1]||(n[0]={tokens:[]})).tokens;var h=u.length;h===1&&u[0].isLineHolder?u[0]=l:(s||!h||i)&&u.push(l)}else{n.push({tokens:[l]})}}}function vi(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&J(e)||t.textFont||t.font}function di(t,e){var r=e.x;var i=e.y;var a=e.width;var n=e.height;var o=e.r;var s;var l;var u;var h;if(a<0){r=r+a;a=-a}if(n<0){i=i+n;n=-n}if(typeof o==="number"){s=l=u=h=o}else if(o instanceof Array){if(o.length===1){s=l=u=h=o[0]}else if(o.length===2){s=u=o[0];l=h=o[1]}else if(o.length===3){s=o[0];l=h=o[1];u=o[2]}else{s=o[0];l=o[1];u=o[2];h=o[3]}}else{s=l=u=h=0}var f;if(s+l>a){f=s+l;s*=a/f;l*=a/f}if(u+h>a){f=u+h;u*=a/f;h*=a/f}if(l+u>n){f=l+u;l*=n/f;u*=n/f}if(s+h>n){f=s+h;s*=n/f;h*=n/f}t.moveTo(r+s,i);t.lineTo(r+a-l,i);l!==0&&t.arc(r+a-l,i+l,l,-Math.PI/2,0);t.lineTo(r+a,i+n-u);u!==0&&t.arc(r+a-u,i+n-u,u,0,Math.PI/2);t.lineTo(r+h,i+n);h!==0&&t.arc(r+h,i+n-h,h,Math.PI/2,Math.PI);t.lineTo(r,i+s);s!==0&&t.arc(r+s,i+s,s,Math.PI,Math.PI*1.5)}var pi={left:1,right:1,center:1};var gi={top:1,bottom:1,middle:1};function mi(t){yi(t);L(t.rich,yi);return t}function yi(t){if(t){t.font=vi(t);var e=t.textAlign;e==="middle"&&(e="center");t.textAlign=e==null||pi[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle");t.textVerticalAlign=r==null||gi[r]?r:"top";var i=t.textPadding;if(i){t.textPadding=$(t.textPadding)}}}function xi(t,e,r,i,a){i.rich?wi(t,e,r,i,a):_i(t,e,r,i,a)}function _i(t,e,r,i,a){var n=Ci(e,"font",i.font||Yr);var o=i.textPadding;var s=t.__textCotentBlock;if(!s||t.__dirty){s=t.__textCotentBlock=hi(r,n,o,i.truncate)}var l=s.outerHeight;var u=s.lines;var h=s.lineHeight;var f=Ai(l,i,a);var c=f.baseX;var v=f.baseY;var d=f.textAlign;var p=f.textVerticalAlign;Si(e,i,a,c,v);var g=ri(v,l,p);var m=c;var y=g;var x=Ii(i);if(x||o){var _=Kr(r,n);var w=_;o&&(w+=o[1]+o[3]);var b=ei(c,w,d);x&&Di(t,e,i,b,g,w,l);if(o){m=Ni(c,d,o);y+=o[0]}}Ci(e,"textAlign",d||"left");Ci(e,"textBaseline","middle");Ci(e,"shadowBlur",i.textShadowBlur||0);Ci(e,"shadowColor",i.textShadowColor||"transparent");Ci(e,"shadowOffsetX",i.textShadowOffsetX||0);Ci(e,"shadowOffsetY",i.textShadowOffsetY||0);y+=h/2;var S=i.textStrokeWidth;var M=Li(i.textStroke,S);var I=ki(i.textFill);if(M){Ci(e,"lineWidth",S);Ci(e,"strokeStyle",M)}if(I){Ci(e,"fillStyle",I)}for(var D=0;D<u.length;D++){M&&e.strokeText(u[D],m,y);I&&e.fillText(u[D],m,y);y+=h}}function wi(t,e,r,i,a){var n=t.__textCotentBlock;if(!n||t.__dirty){n=t.__textCotentBlock=fi(r,i)}bi(t,e,n,i,a)}function bi(t,e,r,i,a){var n=r.width;var o=r.outerWidth;var s=r.outerHeight;var l=i.textPadding;var u=Ai(s,i,a);var h=u.baseX;var f=u.baseY;var c=u.textAlign;var v=u.textVerticalAlign;Si(e,i,a,h,f);var d=ei(h,o,c);var p=ri(f,s,v);var g=d;var m=p;if(l){g+=l[3];m+=l[0]}var y=g+n;Ii(i)&&Di(t,e,i,d,p,o,s);for(var x=0;x<r.lines.length;x++){var _=r.lines[x];var w=_.tokens;var b=w.length;var S=_.lineHeight;var M=_.width;var I=0;var D=g;var T=y;var A=b-1;var C;while(I<b&&(C=w[I],!C.textAlign||C.textAlign==="left")){Mi(t,e,C,i,S,m,D,"left");M-=C.width;D+=C.width;I++}while(A>=0&&(C=w[A],C.textAlign==="right")){Mi(t,e,C,i,S,m,T,"right");M-=C.width;T-=C.width;A--}D+=(n-(D-g)-(y-T)-M)/2;while(I<=A){C=w[I];Mi(t,e,C,i,S,m,D+C.width/2,"center");D+=C.width;I++}m+=S}}function Si(t,e,r,i,a){if(r&&e.textRotation){var n=e.textOrigin;if(n==="center"){i=r.width/2+r.x;a=r.height/2+r.y}else if(n){i=n[0]+r.x;a=n[1]+r.y}t.translate(i,a);t.rotate(-e.textRotation);t.translate(-i,-a)}}function Mi(t,e,r,i,a,n,o,s){var l=i.rich[r.styleName]||{};var u=r.textVerticalAlign;var h=n+a/2;if(u==="top"){h=n+r.height/2}else if(u==="bottom"){h=n+a-r.height/2}!r.isLineHolder&&Ii(l)&&Di(t,e,l,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var f=r.textPadding;if(f){o=Ni(o,s,f);h-=r.height/2-f[2]-r.textHeight/2}Ci(e,"shadowBlur",Y(l.textShadowBlur,i.textShadowBlur,0));Ci(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent");Ci(e,"shadowOffsetX",Y(l.textShadowOffsetX,i.textShadowOffsetX,0));Ci(e,"shadowOffsetY",Y(l.textShadowOffsetY,i.textShadowOffsetY,0));Ci(e,"textAlign",s);Ci(e,"textBaseline","middle");Ci(e,"font",r.font||Yr);var c=Li(l.textStroke||i.textStroke,d);var v=ki(l.textFill||i.textFill);var d=X(l.textStrokeWidth,i.textStrokeWidth);if(c){Ci(e,"lineWidth",d);Ci(e,"strokeStyle",c);e.strokeText(r.text,o,h)}if(v){Ci(e,"fillStyle",v);e.fillText(r.text,o,h)}}function Ii(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Di(t,e,r,i,a,n,o){var s=r.textBackgroundColor;var l=r.textBorderWidth;var u=r.textBorderColor;var h=G(s);Ci(e,"shadowBlur",r.textBoxShadowBlur||0);Ci(e,"shadowColor",r.textBoxShadowColor||"transparent");Ci(e,"shadowOffsetX",r.textBoxShadowOffsetX||0);Ci(e,"shadowOffsetY",r.textBoxShadowOffsetY||0);if(h||l&&u){e.beginPath();var f=r.textBorderRadius;if(!f){e.rect(i,a,n,o)}else{di(e,{x:i,y:a,width:n,height:o,r:f})}e.closePath()}if(h){Ci(e,"fillStyle",s);e.fill()}else if(F(s)){var c=s.image;c=Fr(c,null,t,Ti,s);if(c&&Hr(c)){e.drawImage(c,i,a,n,o)}}if(l&&u){Ci(e,"lineWidth",l);Ci(e,"strokeStyle",u);e.stroke()}}function Ti(t,e){e.image=t}function Ai(t,e,r){var i=e.x||0;var a=e.y||0;var n=e.textAlign;var o=e.textVerticalAlign;if(r){var s=e.textPosition;if(s instanceof Array){i=r.x+Pi(s[0],r.width);a=r.y+Pi(s[1],r.height)}else{var l=ii(s,r,e.textDistance);i=l.x;a=l.y;n=n||l.textAlign;o=o||l.textVerticalAlign}var u=e.textOffset;if(u){i+=u[0];a+=u[1]}}return{baseX:i,baseY:a,textAlign:n,textVerticalAlign:o}}function Ci(t,e,r){t[e]=Dr(t,e,r);return t[e]}function Li(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function ki(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function Pi(t,e){if(typeof t==="string"){if(t.lastIndexOf("%")>=0){return parseFloat(t)/100*e}return parseFloat(t)}return t}function Ni(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function Ei(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var Oi=new fr;var zi=function(){};zi.prototype={constructor:zi,drawRectText:function(t,e){var r=this.style;e=r.textRect||e;this.__dirty&&mi(r,true);var i=r.text;i!=null&&(i+="");if(!Ei(i,r)){return}t.save();var a=this.transform;if(!r.transformText){if(a){Oi.copy(e);Oi.applyTransform(a);e=Oi}}else{this.setTransform(t)}xi(this,t,i,r,e);t.restore()}};function Ri(t){t=t||{};sr.call(this,t);for(var e in t){if(t.hasOwnProperty(e)&&e!=="style"){this[e]=t[e]}}this.style=new Ar(t.style,this);this._rect=null;this.__clipPaths=[]}Ri.prototype={constructor:Ri,type:"displayable",__dirty:true,invisible:false,z:0,z2:0,zlevel:0,draggable:false,dragging:false,silent:false,culling:false,cursor:"pointer",rectHover:false,progressive:false,incremental:false,inplace:false,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e);var i=this.getBoundingRect();return i.contain(r[0],r[1])},dirty:function(){this.__dirty=true;this._rect=null;this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){if(t!=="style"){sr.prototype.attrKV.call(this,t,e)}else{this.style.set(e)}},setStyle:function(t,e){this.style.set(t,e);this.dirty(false);return this},useStyle:function(t){this.style=new Ar(t,this);this.dirty(false);return this}};M(Ri,sr);I(Ri,zi);function Bi(t){Ri.call(this,t)}Bi.prototype={constructor:Bi,type:"image",brush:function(t,e){var r=this.style;var i=r.image;r.bind(t,this,e);var a=this._image=Fr(i,this._image,this,this.onload);if(!a||!Hr(a)){return}var n=r.x||0;var o=r.y||0;var s=r.width;var l=r.height;var u=a.width/a.height;if(s==null&&l!=null){s=l*u}else if(l==null&&s!=null){l=s/u}else if(s==null&&l==null){s=a.width;l=a.height}this.setTransform(t);if(r.sWidth&&r.sHeight){var h=r.sx||0;var f=r.sy||0;t.drawImage(a,h,f,r.sWidth,r.sHeight,n,o,s,l)}else if(r.sx&&r.sy){var h=r.sx;var f=r.sy;var c=s-h;var v=l-f;t.drawImage(a,h,f,c,v,n,o,s,l)}else{t.drawImage(a,n,o,s,l)}if(r.text!=null){this.restoreTransform(t);this.drawRectText(t,this.getBoundingRect())}},getBoundingRect:function(){var t=this.style;if(!this._rect){this._rect=new fr(t.x||0,t.y||0,t.width||0,t.height||0)}return this._rect}};M(Bi,Ri);var Vi=1e5;var Gi=314159;var Fi=.01;var Wi=.001;function Hi(t){return parseInt(t,10)}function Zi(t){if(!t){return false}if(t.__builtin__){return true}if(typeof t.resize!=="function"||typeof t.refresh!=="function"){return false}return true}var Ui=new fr(0,0,0,0);var ji=new fr(0,0,0,0);function Xi(t,e,r){Ui.copy(t.getBoundingRect());if(t.transform){Ui.applyTransform(t.transform)}ji.width=e;ji.height=r;return!Ui.intersect(ji)}function Yi(t,e){if(t==e){return false}if(!t||!e||t.length!==e.length){return true}for(var r=0;r<t.length;r++){if(t[r]!==e[r]){return true}}}function qi(t,e){for(var r=0;r<t.length;r++){var i=t[r];i.setTransform(e);e.beginPath();i.buildPath(e,i.shape);e.clip();i.restoreTransform(e)}}function $i(t,e){var r=document.createElement("div");r.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";";return r}var Ki=function(t,e,r){this.type="canvas";var i=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=r=N({},r||{});this.dpr=r.devicePixelRatio||ir;this._singleCanvas=i;this.root=t;var a=t.style;if(a){a["-webkit-tap-highlight-color"]="transparent";a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none";t.innerHTML=""}this.storage=e;var n=this._zlevelList=[];var o=this._layers={};this._layerConfig={};this._needsManuallyCompositing=false;if(!i){this._width=this._getSize(0);this._height=this._getSize(1);var s=this._domRoot=$i(this._width,this._height);t.appendChild(s)}else{if(r.width!=null){t.width=r.width}if(r.height!=null){t.height=r.height}var l=t.width;var u=t.height;this._width=l;this._height=u;var h=new Rr(t,this,1);h.__builtin__=true;h.initContext();o[Gi]=h;n.push(Gi);this._domRoot=t}this._hoverlayer=null;this._hoverElements=[]};Ki.prototype={constructor:Ki,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t){return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}}},refresh:function(t){var e=this.storage.getDisplayList(true);var r=this._zlevelList;this._redrawId=Math.random();this._paintList(e,t,this._redrawId);for(var i=0;i<r.length;i++){var a=r[i];var n=this._layers[a];if(!n.__builtin__&&n.refresh){n.refresh()}}this.refreshHover();return this},addHover:function(t,e){if(t.__hoverMir){return}var r=new t.constructor({style:t.style,shape:t.shape});r.__from=t;t.__hoverMir=r;r.setStyle(e);this._hoverElements.push(r)},removeHover:function(t){var e=t.__hoverMir;var r=this._hoverElements;var i=S(r,e);if(i>=0){r.splice(i,1)}t.__hoverMir=null},clearHover:function(t){var e=this._hoverElements;for(var r=0;r<e.length;r++){var i=e[r].__from;if(i){i.__hoverMir=null}}e.length=0},refreshHover:function(){var t=this._hoverElements;var e=t.length;var r=this._hoverlayer;r&&r.clear();if(!e){return}br(t,this.storage.displayableSortFunc);if(!r){r=this._hoverlayer=this.getLayer(Vi)}var i={};r.ctx.save();for(var a=0;a<e;){var n=t[a];var o=n.__from;if(!(o&&o.__zr)){t.splice(a,1);o.__hoverMir=null;e--;continue}a++;if(!o.invisible){n.transform=o.transform;n.invTransform=o.invTransform;n.__clipPaths=o.__clipPaths;this._doPaintEl(n,r,true,i)}}r.ctx.restore()},getHoverLayer:function(){return this.getLayer(Vi)},_paintList:function(t,e,r){if(this._redrawId!==r){return}e=e||false;this._updateLayerStatus(t);var i=this._doPaintList(t,e);if(this._needsManuallyCompositing){this._compositeManually()}if(!i){var a=this;Br(function(){a._paintList(t,e,r)})}},_compositeManually:function(){var e=this.getLayer(Gi).ctx;var r=this._domRoot.width;var i=this._domRoot.height;e.clearRect(0,0,r,i);this.eachBuiltinLayer(function(t){if(t.virtual){e.drawImage(t.dom,0,0,r,i)}})},_doPaintList:function(t,e){var r=[];for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];var n=this._layers[a];if(n.__builtin__&&n!==this._hoverlayer&&(n.__dirty||e)){r.push(n)}}var o=true;for(var s=0;s<r.length;s++){var n=r[s];var l=n.ctx;var u={};l.save();var h=e?n.__startIndex:n.__drawIndex;var f=!e&&n.incremental&&Date.now;var c=f&&Date.now();if(n.__startIndex===n.__endIndex){n.clear()}else if(h===n.__startIndex){var v=t[h];if(!v.incremental||!v.notClear||e){n.clear()}}if(h===-1){console.error("For some unknown reason. drawIndex is -1");h=n.__startIndex}for(var d=h;d<n.__endIndex;d++){var p=t[d];this._doPaintEl(p,n,e,u);p.__dirty=false;if(f){var g=Date.now()-c;if(g>15){break}}}n.__drawIndex=d;if(n.__drawIndex<n.__endIndex){o=false}if(u.prevElClipPaths){l.restore()}l.restore()}if(m.wxa){L(this._layers,function(t){if(t&&t.ctx&&t.ctx.draw){t.ctx.draw()}})}return o},_doPaintEl:function(t,e,r,i){var a=e.ctx;var n=t.transform;if((e.__dirty||r)&&!t.invisible&&t.style.opacity!==0&&!(n&&!n[0]&&!n[3])&&!(t.culling&&Xi(t,this._width,this._height))){var o=t.__clipPaths;if(!i.prevElClipPaths||Yi(o,i.prevElClipPaths)){if(i.prevElClipPaths){e.ctx.restore();i.prevElClipPaths=null;i.prevEl=null}if(o){a.save();qi(o,a);i.prevElClipPaths=o}}t.beforeBrush&&t.beforeBrush(a);t.brush(a,i.prevEl||null);i.prevEl=t;t.afterBrush&&t.afterBrush(a)}},getLayer:function(t,e){if(this._singleCanvas&&!this._needsManuallyCompositing){t=Gi}var r=this._layers[t];if(!r){r=new Rr("zr_"+t,this,this.dpr);r.zlevel=t;r.__builtin__=true;if(this._layerConfig[t]){y(r,this._layerConfig[t],true)}if(e){r.virtual=e}this.insertLayer(t,r);r.initContext()}return r},insertLayer:function(t,e){var r=this._layers;var i=this._zlevelList;var a=i.length;var n=null;var o=-1;var s=this._domRoot;if(r[t]){nr("ZLevel "+t+" has been used already");return}if(!Zi(e)){nr("Layer of zlevel "+t+" is not valid");return}if(a>0&&t>i[0]){for(o=0;o<a-1;o++){if(i[o]<t&&i[o+1]>t){break}}n=r[i[o]]}i.splice(o+1,0,t);r[t]=e;if(!e.virtual){if(n){var l=n.dom;if(l.nextSibling){s.insertBefore(e.dom,l.nextSibling)}else{s.appendChild(e.dom)}}else{if(s.firstChild){s.insertBefore(e.dom,s.firstChild)}else{s.appendChild(e.dom)}}}},eachLayer:function(t,e){var r=this._zlevelList;var i;var a;for(a=0;a<r.length;a++){i=r[a];t.call(e,this._layers[i],i)}},eachBuiltinLayer:function(t,e){var r=this._zlevelList;var i;var a;var n;for(n=0;n<r.length;n++){a=r[n];i=this._layers[a];if(i.__builtin__){t.call(e,i,a)}}},eachOtherLayer:function(t,e){var r=this._zlevelList;var i;var a;var n;for(n=0;n<r.length;n++){a=r[n];i=this._layers[a];if(!i.__builtin__){t.call(e,i,a)}}},getLayers:function(){return this._layers},_updateLayerStatus:function(t){this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=false});function e(t){if(a){if(a.__endIndex!==t){a.__dirty=true}a.__endIndex=t}}if(this._singleCanvas){for(var r=1;r<t.length;r++){var i=t[r];if(i.zlevel!==t[r-1].zlevel||i.incremental){this._needsManuallyCompositing=true;break}}}var a=null;var n=0;for(var r=0;r<t.length;r++){var i=t[r];var o=i.zlevel;var s;if(i.incremental){s=this.getLayer(o+Wi,this._needsManuallyCompositing);s.incremental=true;n=1}else{s=this.getLayer(o+(n>0?Fi:0),this._needsManuallyCompositing)}if(!s.__builtin__){nr("ZLevel "+o+" has been used by unkown layer "+s.id)}if(s!==a){s.__used=true;if(s.__startIndex!==r){s.__dirty=true}s.__startIndex=r;if(!s.incremental){s.__drawIndex=r}else{s.__drawIndex=-1}e(r);a=s}if(i.__dirty){s.__dirty=true;if(s.incremental&&s.__drawIndex<0){s.__drawIndex=r}}}e(r);this.eachBuiltinLayer(function(t,e){if(!t.__used&&t.getElementCount()>0){t.__dirty=true;t.__startIndex=t.__endIndex=t.__drawIndex=0}if(t.__dirty&&t.__drawIndex<0){t.__drawIndex=t.__startIndex}})},clear:function(){this.eachBuiltinLayer(this._clearLayer);return this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var r=this._layerConfig;if(!r[t]){r[t]=e}else{y(r[t],e,true)}for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Fi){var n=this._layers[a];y(n,r[t],true)}}}},delLayer:function(t){var e=this._layers;var r=this._zlevelList;var i=e[t];if(!i){return}i.dom.parentNode.removeChild(i.dom);delete e[t];r.splice(S(r,t),1)},resize:function(e,r){if(!this._domRoot.style){if(e==null||r==null){return}this._width=e;this._height=r;this.getLayer(Gi).resize(e,r)}else{var t=this._domRoot;t.style.display="none";var i=this._opts;e!=null&&(i.width=e);r!=null&&(i.height=r);e=this._getSize(0);r=this._getSize(1);t.style.display="";if(this._width!=e||r!=this._height){t.style.width=e+"px";t.style.height=r+"px";for(var a in this._layers){if(this._layers.hasOwnProperty(a)){this._layers[a].resize(e,r)}}L(this._progressiveLayers,function(t){t.resize(e,r)});this.refresh(true)}this._width=e;this._height=r}return this},clearLayer:function(t){var e=this._layers[t];if(e){e.clear()}},dispose:function(){this.root.innerHTML="";this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){t=t||{};if(this._singleCanvas&&!this._compositeManually){return this._layers[Gi].dom}var e=new Rr("image",this,t.pixelRatio||this.dpr);e.initContext();e.clearColor=t.backgroundColor;e.clear();if(t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width;var i=e.dom.height;var a=e.ctx;this.eachLayer(function(t){if(t.__builtin__){a.drawImage(t.dom,0,0,r,i)}else if(t.renderToCanvas){e.ctx.save();t.renderToCanvas(e.ctx);e.ctx.restore()}})}else{var n={};var o=this.storage.getDisplayList(true);for(var s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,true,n)}}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts;var r=["width","height"][t];var i=["clientWidth","clientHeight"][t];var a=["paddingLeft","paddingTop"][t];var n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto"){return parseFloat(e[r])}var o=this.root;var s=document.defaultView.getComputedStyle(o);return(o[i]||Hi(s[r])||Hi(o.style[r]))-(Hi(s[a])||0)-(Hi(s[n])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var r=document.createElement("canvas");var i=r.getContext("2d");var a=t.getBoundingRect();var n=t.style;var o=n.shadowBlur*e;var s=n.shadowOffsetX*e;var l=n.shadowOffsetY*e;var u=n.hasStroke()?n.lineWidth:0;var h=Math.max(u/2,-s+o);var f=Math.max(u/2,s+o);var c=Math.max(u/2,-l+o);var v=Math.max(u/2,l+o);var d=a.width+h+f;var p=a.height+c+v;r.width=d*e;r.height=p*e;i.scale(e,e);i.clearRect(0,0,d,p);i.dpr=e;var g={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-a.x,c-a.y];t.rotation=0;t.scale=[1,1];t.updateTransform();if(t){t.brush(i)}var m=Bi;var y=new m({style:{x:0,y:0,image:r}});if(g.position!=null){y.position=t.position=g.position}if(g.rotation!=null){y.rotation=t.rotation=g.rotation}if(g.scale!=null){y.scale=t.scale=g.scale}return y}};var Ji=typeof window!=="undefined"&&!!window.addEventListener;var Qi=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function ta(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function ea(t,e,r,i){r=r||{};if(i||!m.canvasSupported){ra(t,e,r)}else if(m.browser.firefox&&e.layerX!=null&&e.layerX!==e.offsetX){r.zrX=e.layerX;r.zrY=e.layerY}else if(e.offsetX!=null){r.zrX=e.offsetX;r.zrY=e.offsetY}else{ra(t,e,r)}return r}function ra(t,e,r){var i=ta(t);r.zrX=e.clientX-i.left;r.zrY=e.clientY-i.top}function ia(t,e,r){e=e||window.event;if(e.zrX!=null){return e}var i=e.type;var a=i&&i.indexOf("touch")>=0;if(!a){ea(t,e,e,r);e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3}else{var n=i!="touchend"?e.targetTouches[0]:e.changedTouches[0];n&&ea(t,n,e,r)}var o=e.button;if(e.which==null&&o!==undefined&&Qi.test(e.type)){e.which=o&1?1:o&2?3:o&4?2:0}return e}function aa(t,e,r){if(Ji){t.addEventListener(e,r)}else{t.attachEvent("on"+e,r)}}function na(t,e,r){if(Ji){t.removeEventListener(e,r)}else{t.detachEvent("on"+e,r)}}var oa=Ji?function(t){t.preventDefault();t.stopPropagation();t.cancelBubble=true}:function(t){t.returnValue=false;t.cancelBubble=true};function sa(t){return t.which>1}var la=function(t){t=t||{};this.stage=t.stage||{};this.onframe=t.onframe||function(){};this._clips=[];this._running=false;this._time;this._pausedTime;this._pauseStart;this._paused=false;Rt.call(this)};la.prototype={constructor:la,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;var e=t.getClips();for(var r=0;r<e.length;r++){this.addClip(e[r])}},removeClip:function(t){var e=S(this._clips,t);if(e>=0){this._clips.splice(e,1)}},removeAnimator:function(t){var e=t.getClips();for(var r=0;r<e.length;r++){this.removeClip(e[r])}t.animation=null},_update:function(){var t=(new Date).getTime()-this._pausedTime;var e=t-this._time;var r=this._clips;var i=r.length;var a=[];var n=[];for(var o=0;o<i;o++){var s=r[o];var l=s.step(t,e);if(l){a.push(l);n.push(s)}}for(var o=0;o<i;){if(r[o]._needsRemove){r[o]=r[i-1];r.pop();i--}else{o++}}i=a.length;for(var o=0;o<i;o++){n[o].fire(a[o])}this._time=t;this.onframe(e);this.trigger("frame",e);if(this.stage.update){this.stage.update()}},_startLoop:function(){var t=this;this._running=true;function e(){if(t._running){Br(e);!t._paused&&t._update()}}Br(e)},start:function(){this._time=(new Date).getTime();this._pausedTime=0;this._startLoop()},stop:function(){this._running=false},pause:function(){if(!this._paused){this._pauseStart=(new Date).getTime();this._paused=true}},resume:function(){if(this._paused){this._pausedTime+=(new Date).getTime()-this._pauseStart;this._paused=false}},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var r=new tr(t,e.loop,e.getter,e.setter);this.addAnimator(r);return r}};I(la,Rt);var ua=function(){this._track=[]};ua.prototype={constructor:ua,recognize:function(t,e,r){this._doTrack(t,e,r);return this._recognize(t)},clear:function(){this._track.length=0;return this},_doTrack:function(t,e,r){var i=t.touches;if(!i){return}var a={points:[],touches:[],target:e,event:t};for(var n=0,o=i.length;n<o;n++){var s=i[n];var l=ea(r,s,{});a.points.push([l.zrX,l.zrY]);a.touches.push(s)}this._track.push(a)},_recognize:function(t){for(var e in ca){if(ca.hasOwnProperty(e)){var r=ca[e](this._track,t);if(r){return r}}}}};function ha(t){var e=t[1][0]-t[0][0];var r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function fa(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var ca={pinch:function(t,e){var r=t.length;if(!r){return}var i=(t[r-1]||{}).points;var a=(t[r-2]||{}).points||i;if(a&&a.length>1&&i&&i.length>1){var n=ha(i)/ha(a);!isFinite(n)&&(n=1);e.pinchScale=n;var o=fa(i);e.pinchX=o[0];e.pinchY=o[1];return{type:"pinch",target:t[0].target,event:e}}}};var va=300;var da=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];var pa=["touchstart","touchend","touchmove"];var ga={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};var ma=T(da,function(t){var e=t.replace("mouse","pointer");return ga[e]?e:t});function ya(t){return t==="mousewheel"&&m.browser.firefox?"DOMMouseScroll":t}function xa(t,e,r){var i=t._gestureMgr;r==="start"&&i.clear();var a=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);r==="end"&&i.clear();if(a){var n=a.type;e.gestureEvent=n;t.handler.dispatchToElement({target:a.target},n,a.event)}}function _a(t){t._touching=true;clearTimeout(t._touchTimer);t._touchTimer=setTimeout(function(){t._touching=false},700)}var wa={mousemove:function(t){t=ia(this.dom,t);this.trigger("mousemove",t)},mouseout:function(t){t=ia(this.dom,t);var e=t.toElement||t.relatedTarget;if(e!=this.dom){while(e&&e.nodeType!=9){if(e===this.dom){return}e=e.parentNode}}this.trigger("mouseout",t)},touchstart:function(t){t=ia(this.dom,t);t.zrByTouch=true;this._lastTouchMoment=new Date;xa(this,t,"start");wa.mousemove.call(this,t);wa.mousedown.call(this,t);_a(this)},touchmove:function(t){t=ia(this.dom,t);t.zrByTouch=true;xa(this,t,"change");wa.mousemove.call(this,t);_a(this)},touchend:function(t){t=ia(this.dom,t);t.zrByTouch=true;xa(this,t,"end");wa.mouseup.call(this,t);if(+new Date-this._lastTouchMoment<va){wa.click.call(this,t)}_a(this)},pointerdown:function(t){wa.mousedown.call(this,t)},pointermove:function(t){if(!ba(t)){wa.mousemove.call(this,t)}},pointerup:function(t){wa.mouseup.call(this,t)},pointerout:function(t){if(!ba(t)){wa.mouseout.call(this,t)}}};function ba(t){var e=t.pointerType;return e==="pen"||e==="touch"}L(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){wa[e]=function(t){t=ia(this.dom,t);this.trigger(e,t)}});function Sa(e){L(pa,function(t){e._handlers[t]=z(wa[t],e)});L(ma,function(t){e._handlers[t]=z(wa[t],e)});L(da,function(t){e._handlers[t]=r(wa[t],e)});function r(t,e){return function(){if(e._touching){return}return t.apply(e,arguments)}}}function Ma(r){Rt.call(this);this.dom=r;this._touching=false;this._touchTimer;this._gestureMgr=new ua;this._handlers={};Sa(this);if(m.pointerEventsSupported){t(ma,this)}else{if(m.touchEventsSupported){t(pa,this)}t(da,this)}function t(t,e){L(t,function(t){aa(r,ya(t),e._handlers[t])},e)}}var Ia=Ma.prototype;Ia.dispose=function(){var t=da.concat(pa);for(var e=0;e<t.length;e++){var r=t[e];na(this.dom,ya(r),this._handlers[r])}};Ia.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")};I(Ma,Rt);var Da=!m.canvasSupported;var Ta={canvas:Ki};var Aa={};var Ca="4.0.2";function La(t,e){var r=new Oa(i(),t,e);Aa[r.id]=r;return r}function ka(t){if(t){t.dispose()}else{for(var e in Aa){if(Aa.hasOwnProperty(e)){Aa[e].dispose()}}Aa={}}return this}function Pa(t){return Aa[t]}function Na(t,e){Ta[t]=e}function Ea(t){delete Aa[t]}var Oa=function(t,e,r){r=r||{};this.dom=e;this.id=t;var i=this;var a=new Mr;var n=r.renderer;if(Da){if(!Ta.vml){throw new Error("You need to require 'zrender/vml/vml' to support IE8")}n="vml"}else if(!n||!Ta[n]){n="canvas"}var o=new Ta[n](e,a,r,t);this.storage=a;this.painter=o;var s=!m.node&&!m.worker?new Ma(o.getViewportRoot()):null;this.handler=new Wt(a,o,s,o.root);this.animation=new la({stage:{update:z(this.flush,this)}});this.animation.start();this._needsRefresh;var l=a.delFromStorage;var u=a.addToStorage;a.delFromStorage=function(t){l.call(a,t);t&&t.removeSelfFromZr(i)};a.addToStorage=function(t){u.call(a,t);t.addSelfToZr(i)}};Oa.prototype={constructor:Oa,getId:function(){return this.id},add:function(t){this.storage.addRoot(t);this._needsRefresh=true},remove:function(t){this.storage.delRoot(t);this._needsRefresh=true},configLayer:function(t,e){this.painter.configLayer(t,e);this._needsRefresh=true},refreshImmediately:function(){this._needsRefresh=false;this.painter.refresh();this._needsRefresh=false},refresh:function(){this._needsRefresh=true},flush:function(){var t;if(this._needsRefresh){t=true;this.refreshImmediately()}if(this._needsRefreshHover){t=true;this.refreshHoverImmediately()}t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){this.painter.addHover(t,e);this.refreshHover()}},removeHover:function(t){if(this.painter.removeHover){this.painter.removeHover(t);this.refreshHover()}},clearHover:function(){if(this.painter.clearHover){this.painter.clearHover();this.refreshHover()}},refreshHover:function(){this._needsRefreshHover=true},refreshHoverImmediately:function(){this._needsRefreshHover=false;this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{};this.painter.resize(t.width,t.height);this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,r){this.handler.on(t,e,r)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot();this.painter.clear()},dispose:function(){this.animation.stop();this.clear();this.storage.dispose();this.painter.dispose();this.handler.dispose();this.animation=this.storage=this.painter=this.handler=null;Ea(this.id)}};var za=(Object.freeze||Object)({version:Ca,init:La,dispose:ka,getInstance:Pa,registerPainter:Na});var Ra=L;var Ba=F;var Va=B;var Ga="series\0";function Fa(t){return t instanceof Array?t:t==null?[]:[t]}function Wa(t,e,r){if(t){t[e]=t[e]||{};t.emphasis=t.emphasis||{};t.emphasis[e]=t.emphasis[e]||{};for(var i=0,a=r.length;i<a;i++){var n=r[i];if(!t.emphasis[e].hasOwnProperty(n)&&t[e].hasOwnProperty(n)){t.emphasis[e][n]=t[e][n]}}}}var Ha=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Za(t){return Ba(t)&&!Va(t)&&!(t instanceof Date)?t.value:t}function Ua(t){return Ba(t)&&!(t instanceof Array)}function ja(t,a){a=(a||[]).slice();var n=T(t||[],function(t,e){return{exist:t}});Ra(a,function(t,e){if(!Ba(t)){return}for(var r=0;r<n.length;r++){if(!n[r].option&&t.id!=null&&n[r].exist.id===t.id+""){n[r].option=t;a[e]=null;return}}for(var r=0;r<n.length;r++){var i=n[r].exist;if(!n[r].option&&(i.id==null||t.id==null)&&t.name!=null&&!qa(t)&&!qa(i)&&i.name===t.name+""){n[r].option=t;a[e]=null;return}}});Ra(a,function(t,e){if(!Ba(t)){return}var r=0;for(;r<n.length;r++){var i=n[r].exist;if(!n[r].option&&!qa(i)&&t.id==null){n[r].option=t;break}}if(r>=n.length){n.push({option:t})}});return n}function Xa(t){var o=it();Ra(t,function(t,e){var r=t.exist;r&&o.set(r.id,t)});Ra(t,function(t,e){var r=t.option;K(!r||r.id==null||!o.get(r.id)||o.get(r.id)===t,"id duplicates: "+(r&&r.id));r&&r.id!=null&&o.set(r.id,t);!t.keyInfo&&(t.keyInfo={})});Ra(t,function(t,e){var r=t.exist;var i=t.option;var a=t.keyInfo;if(!Ba(i)){return}a.name=i.name!=null?i.name+"":r?r.name:Ga+e;if(r){a.id=r.id}else if(i.id!=null){a.id=i.id+""}else{var n=0;do{a.id="\0"+a.name+"\0"+n++}while(o.get(a.id))}o.set(a.id,t)})}function Ya(t){var e=t.name;return!!(e&&e.indexOf(Ga))}function qa(t){return Ba(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function $a(t,e){var r={};var i={};a(t||[],r);a(e||[],i,r);return[n(r),n(i)];function a(t,e,r){for(var i=0,a=t.length;i<a;i++){var n=t[i].seriesId;var o=Fa(t[i].dataIndex);var s=r&&r[n];for(var l=0,u=o.length;l<u;l++){var h=o[l];if(s&&s[h]){s[h]=null}else{(e[n]||(e[n]={}))[h]=1}}}}function n(t,e){var r=[];for(var i in t){if(t.hasOwnProperty(i)&&t[i]!=null){if(e){r.push(+i)}else{var a=n(t[i],true);a.length&&r.push({seriesId:i,dataIndex:a})}}}return r}}function Ka(e,t){if(t.dataIndexInside!=null){return t.dataIndexInside}else if(t.dataIndex!=null){return B(t.dataIndex)?T(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex)}else if(t.name!=null){return B(t.name)?T(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}}function Ja(){var e="__\0ec_inner_"+Qa+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Qa=0;function tn(s,l,u){if(G(l)){var t={};t[l+"Index"]=0;l=t}var e=u&&u.defaultMainType;if(e&&!en(l,e+"Index")&&!en(l,e+"Id")&&!en(l,e+"Name")){l[e+"Index"]=0}var h={};Ra(l,function(t,e){var t=l[e];if(e==="dataIndex"||e==="dataIndexInside"){h[e]=t;return}var r=e.match(/^(\w+)(Index|Id|Name)$/)||[];var i=r[1];var a=(r[2]||"").toLowerCase();if(!i||!a||t==null||a==="index"&&t==="none"||u&&u.includeMainTypes&&S(u.includeMainTypes,i)<0){return}var n={mainType:i};if(a!=="index"||t!=="all"){n[a]=t}var o=s.queryComponents(n);h[i+"Models"]=o;h[i+"Model"]=o[0]});return h}function en(t,e){return t&&t.hasOwnProperty(e)}function rn(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function an(t,e){return t.getAttribute?t.getAttribute(e):t[e]}var nn=".";var on="___EC__COMPONENT__CONTAINER___";function sn(t){var e={main:"",sub:""};if(t){t=t.split(nn);e.main=t[0]||"";e.sub=t[1]||""}return e}function ln(t){K(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function un(t,i){t.$constructor=t;t.extend=function(e){if(A){L(i,function(t){if(!e[t]){console.warn("Method `"+t+"` should be implemented"+(e.type?" in "+e.type:"")+".")}})}var t=this;var r=function(){if(!e.$constructor){t.apply(this,arguments)}else{e.$constructor.apply(this,arguments)}};N(r.prototype,e);r.extend=this.extend;r.superCall=cn;r.superApply=vn;M(r,this);r.superClass=t;return r}}var hn=0;function fn(t){var e=["__\0is_clz",hn++,Math.random().toFixed(3)].join("_");t.prototype[e]=true;if(A){K(!t.isInstance,'The method "is" can not be defined.')}t.isInstance=function(t){return!!(t&&t[e])}}function cn(t,e){var r=q(arguments,2);return this.superClass.prototype[e].apply(t,r)}function vn(t,e,r){return this.superClass.prototype[e].apply(t,r)}function dn(r,t){t=t||{};var a={};r.registerClass=function(t,e){if(e){ln(e);e=sn(e);if(!e.sub){if(A){if(a[e.main]){console.warn(e.main+" exists.")}}a[e.main]=t}else if(e.sub!==on){var r=i(e);r[e.sub]=t}}return t};r.getClass=function(t,e,r){var i=a[t];if(i&&i[on]){i=e?i[e]:null}if(r&&!i){throw new Error(!e?t+"."+"type should be specified.":"Component "+t+"."+(e||"")+" not exists. Load it first.")}return i};r.getClassesByMainType=function(t){t=sn(t);var r=[];var e=a[t.main];if(e&&e[on]){L(e,function(t,e){e!==on&&r.push(t)})}else{r.push(e)}return r};r.hasClass=function(t){t=sn(t);return!!a[t.main]};r.getAllClassMainTypes=function(){var r=[];L(a,function(t,e){r.push(e)});return r};r.hasSubTypes=function(t){t=sn(t);var e=a[t.main];return e&&e[on]};r.parseClassType=sn;function i(t){var e=a[t.main];if(!e||!e[on]){e=a[t.main]={};e[on]=true}return e}if(t.registerWhenExtend){var n=r.extend;if(n){r.extend=function(t){var e=n.call(this,t);return r.registerClass(e,t.type)}}}return r}var pn=function(s){for(var t=0;t<s.length;t++){if(!s[t][1]){s[t][1]=s[t][0]}}return function(t,e,r){var i={};for(var a=0;a<s.length;a++){var n=s[a][1];if(e&&S(e,n)>=0||r&&S(r,n)<0){continue}var o=t.getShallow(n);if(o!=null){i[s[a][0]]=o}}return i}};var gn=pn([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);var mn={getLineStyle:function(t){var e=gn(this,t);var r=this.getLineDash(e.lineWidth);r&&(e.lineDash=r);return e},getLineDash:function(t){if(t==null){t=1}var e=this.get("type");var r=Math.max(t,2);var i=t*4;return e==="solid"||e==null?null:e==="dashed"?[i,i]:[r,r]}};var yn=pn([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]);var xn={getAreaStyle:function(t,e){return yn(this,t,e)}};var _n=Math.pow;var wn=Math.sqrt;var bn=1e-8;var Sn=1e-4;var Mn=wn(3);var In=1/3;var Dn=lt();var Tn=lt();var An=lt();function Cn(t){return t>-bn&&t<bn}function Ln(t){return t>bn||t<-bn}function kn(t,e,r,i,a){var n=1-a;return n*n*(n*t+3*a*e)+a*a*(a*i+3*n*r)}function Pn(t,e,r,i,a){var n=1-a;return 3*(((e-t)*n+2*(r-e)*a)*n+(i-r)*a*a)}function Nn(t,e,r,i,a,n){var o=i+3*(e-r)-t;var s=3*(r-e*2+t);var l=3*(e-t);var u=t-a;var h=s*s-3*o*l;var f=s*l-9*o*u;var c=l*l-3*s*u;var v=0;if(Cn(h)&&Cn(f)){if(Cn(s)){n[0]=0}else{var d=-l/s;if(d>=0&&d<=1){n[v++]=d}}}else{var p=f*f-4*h*c;if(Cn(p)){var g=f/h;var d=-s/o+g;var m=-g/2;if(d>=0&&d<=1){n[v++]=d}if(m>=0&&m<=1){n[v++]=m}}else if(p>0){var y=wn(p);var x=h*s+1.5*o*(-f+y);var _=h*s+1.5*o*(-f-y);if(x<0){x=-_n(-x,In)}else{x=_n(x,In)}if(_<0){_=-_n(-_,In)}else{_=_n(_,In)}var d=(-s-(x+_))/(3*o);if(d>=0&&d<=1){n[v++]=d}}else{var w=(2*h*s-3*o*f)/(2*wn(h*h*h));var b=Math.acos(w)/3;var S=wn(h);var M=Math.cos(b);var d=(-s-2*S*M)/(3*o);var m=(-s+S*(M+Mn*Math.sin(b)))/(3*o);var I=(-s+S*(M-Mn*Math.sin(b)))/(3*o);if(d>=0&&d<=1){n[v++]=d}if(m>=0&&m<=1){n[v++]=m}if(I>=0&&I<=1){n[v++]=I}}}return v}function En(t,e,r,i,a){var n=6*r-12*e+6*t;var o=9*e+3*i-3*t-9*r;var s=3*e-3*t;var l=0;if(Cn(o)){if(Ln(n)){var u=-s/n;if(u>=0&&u<=1){a[l++]=u}}}else{var h=n*n-4*o*s;if(Cn(h)){a[0]=-n/(2*o)}else if(h>0){var f=wn(h);var u=(-n+f)/(2*o);var c=(-n-f)/(2*o);if(u>=0&&u<=1){a[l++]=u}if(c>=0&&c<=1){a[l++]=c}}}return l}function On(t,e,r,i,a,n){var o=(e-t)*a+t;var s=(r-e)*a+e;var l=(i-r)*a+r;var u=(s-o)*a+o;var h=(l-s)*a+s;var f=(h-u)*a+u;n[0]=t;n[1]=o;n[2]=u;n[3]=f;n[4]=f;n[5]=h;n[6]=l;n[7]=i}function zn(t,e,r,i,a,n,o,s,l,u,h){var f;var c=.005;var v=Infinity;var d;var p;var g;var m;Dn[0]=l;Dn[1]=u;for(var y=0;y<1;y+=.05){Tn[0]=kn(t,r,a,o,y);Tn[1]=kn(e,i,n,s,y);g=Tt(Dn,Tn);if(g<v){f=y;v=g}}v=Infinity;for(var x=0;x<32;x++){if(c<Sn){break}d=f-c;p=f+c;Tn[0]=kn(t,r,a,o,d);Tn[1]=kn(e,i,n,s,d);g=Tt(Tn,Dn);if(d>=0&&g<v){f=d;v=g}else{An[0]=kn(t,r,a,o,p);An[1]=kn(e,i,n,s,p);m=Tt(An,Dn);if(p<=1&&m<v){f=p;v=m}else{c*=.5}}}if(h){h[0]=kn(t,r,a,o,f);h[1]=kn(e,i,n,s,f)}return wn(v)}function Rn(t,e,r,i){var a=1-i;return a*(a*t+2*i*e)+i*i*r}function Bn(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function Vn(t,e,r,i,a){var n=t-2*e+r;var o=2*(e-t);var s=t-i;var l=0;if(Cn(n)){if(Ln(o)){var u=-s/o;if(u>=0&&u<=1){a[l++]=u}}}else{var h=o*o-4*n*s;if(Cn(h)){var u=-o/(2*n);if(u>=0&&u<=1){a[l++]=u}}else if(h>0){var f=wn(h);var u=(-o+f)/(2*n);var c=(-o-f)/(2*n);if(u>=0&&u<=1){a[l++]=u}if(c>=0&&c<=1){a[l++]=c}}}return l}function Gn(t,e,r){var i=t+r-2*e;if(i===0){return.5}else{return(t-e)/i}}function Fn(t,e,r,i,a){var n=(e-t)*i+t;var o=(r-e)*i+e;var s=(o-n)*i+n;a[0]=t;a[1]=n;a[2]=s;a[3]=s;a[4]=o;a[5]=r}function Wn(t,e,r,i,a,n,o,s,l){var u;var h=.005;var f=Infinity;Dn[0]=o;Dn[1]=s;for(var c=0;c<1;c+=.05){Tn[0]=Rn(t,r,a,c);Tn[1]=Rn(e,i,n,c);var v=Tt(Dn,Tn);if(v<f){u=c;f=v}}f=Infinity;for(var d=0;d<32;d++){if(h<Sn){break}var p=u-h;var g=u+h;Tn[0]=Rn(t,r,a,p);Tn[1]=Rn(e,i,n,p);var v=Tt(Tn,Dn);if(p>=0&&v<f){u=p;f=v}else{An[0]=Rn(t,r,a,g);An[1]=Rn(e,i,n,g);var m=Tt(An,Dn);if(g<=1&&m<f){u=g;f=m}else{h*=.5}}}if(l){l[0]=Rn(t,r,a,u);l[1]=Rn(e,i,n,u)}return wn(f)}var Hn=Math.min;var Zn=Math.max;var Un=Math.sin;var jn=Math.cos;var Xn=Math.PI*2;var Yn=lt();var qn=lt();var $n=lt();function Kn(t,e,r){if(t.length===0){return}var i=t[0];var a=i[0];var n=i[0];var o=i[1];var s=i[1];var l;for(l=1;l<t.length;l++){i=t[l];a=Hn(a,i[0]);n=Zn(n,i[0]);o=Hn(o,i[1]);s=Zn(s,i[1])}e[0]=a;e[1]=o;r[0]=n;r[1]=s}function Jn(t,e,r,i,a,n){a[0]=Hn(t,r);a[1]=Hn(e,i);n[0]=Zn(t,r);n[1]=Zn(e,i)}var Qn=[];var to=[];function eo(t,e,r,i,a,n,o,s,l,u){var h=En;var f=kn;var c;var v=h(t,r,a,o,Qn);l[0]=Infinity;l[1]=Infinity;u[0]=-Infinity;u[1]=-Infinity;for(c=0;c<v;c++){var d=f(t,r,a,o,Qn[c]);l[0]=Hn(d,l[0]);u[0]=Zn(d,u[0])}v=h(e,i,n,s,to);for(c=0;c<v;c++){var p=f(e,i,n,s,to[c]);l[1]=Hn(p,l[1]);u[1]=Zn(p,u[1])}l[0]=Hn(t,l[0]);u[0]=Zn(t,u[0]);l[0]=Hn(o,l[0]);u[0]=Zn(o,u[0]);l[1]=Hn(e,l[1]);u[1]=Zn(e,u[1]);l[1]=Hn(s,l[1]);u[1]=Zn(s,u[1])}function ro(t,e,r,i,a,n,o,s){var l=Gn;var u=Rn;var h=Zn(Hn(l(t,r,a),1),0);var f=Zn(Hn(l(e,i,n),1),0);var c=u(t,r,a,h);var v=u(e,i,n,f);o[0]=Hn(t,a,c);o[1]=Hn(e,n,v);s[0]=Zn(t,a,c);s[1]=Zn(e,n,v)}function io(t,e,r,i,a,n,o,s,l){var u=kt;var h=Pt;var f=Math.abs(a-n);if(f%Xn<1e-4&&f>1e-4){s[0]=t-r;s[1]=e-i;l[0]=t+r;l[1]=e+i;return}Yn[0]=jn(a)*r+t;Yn[1]=Un(a)*i+e;qn[0]=jn(n)*r+t;qn[1]=Un(n)*i+e;u(s,Yn,qn);h(l,Yn,qn);a=a%Xn;if(a<0){a=a+Xn}n=n%Xn;if(n<0){n=n+Xn}if(a>n&&!o){n+=Xn}else if(a<n&&o){a+=Xn}if(o){var c=n;n=a;a=c}for(var v=0;v<n;v+=Math.PI/2){if(v>a){$n[0]=jn(v)*r+t;$n[1]=Un(v)*i+e;u(s,$n,s);h(l,$n,l)}}}var ao={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7};var no=[];var oo=[];var so=[];var lo=[];var uo=Math.min;var ho=Math.max;var fo=Math.cos;var co=Math.sin;var vo=Math.sqrt;var po=Math.abs;var go=typeof Float32Array!="undefined";var mo=function(t){this._saveData=!(t||false);if(this._saveData){this.data=[]}this._ctx=null};mo.prototype={constructor:mo,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=po(1/ir/t)||0;this._uy=po(1/ir/e)||0},getContext:function(){return this._ctx},beginPath:function(t){this._ctx=t;t&&t.beginPath();t&&(this.dpr=t.dpr);if(this._saveData){this._len=0}if(this._lineDash){this._lineDash=null;this._dashOffset=0}return this},moveTo:function(t,e){this.addData(ao.M,t,e);this._ctx&&this._ctx.moveTo(t,e);this._x0=t;this._y0=e;this._xi=t;this._yi=e;return this},lineTo:function(t,e){var r=po(t-this._xi)>this._ux||po(e-this._yi)>this._uy||this._len<5;this.addData(ao.L,t,e);if(this._ctx&&r){this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)}if(r){this._xi=t;this._yi=e}return this},bezierCurveTo:function(t,e,r,i,a,n){this.addData(ao.C,t,e,r,i,a,n);if(this._ctx){this._needsDash()?this._dashedBezierTo(t,e,r,i,a,n):this._ctx.bezierCurveTo(t,e,r,i,a,n)}this._xi=a;this._yi=n;return this},quadraticCurveTo:function(t,e,r,i){this.addData(ao.Q,t,e,r,i);if(this._ctx){this._needsDash()?this._dashedQuadraticTo(t,e,r,i):this._ctx.quadraticCurveTo(t,e,r,i)}this._xi=r;this._yi=i;return this},arc:function(t,e,r,i,a,n){this.addData(ao.A,t,e,r,r,i,a-i,0,n?0:1);this._ctx&&this._ctx.arc(t,e,r,i,a,n);this._xi=fo(a)*r+t;this._yi=co(a)*r+t;return this},arcTo:function(t,e,r,i,a){if(this._ctx){this._ctx.arcTo(t,e,r,i,a)}return this},rect:function(t,e,r,i){this._ctx&&this._ctx.rect(t,e,r,i);this.addData(ao.R,t,e,r,i);return this},closePath:function(){this.addData(ao.Z);var t=this._ctx;var e=this._x0;var r=this._y0;if(t){this._needsDash()&&this._dashedLineTo(e,r);t.closePath()}this._xi=e;this._yi=r;return 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;this._dashIdx=0;var e=0;for(var r=0;r<t.length;r++){e+=t[r]}this._dashSum=e}return this},setLineDashOffset:function(t){this._dashOffset=t;return this},len:function(){return this._len},setData:function(t){var e=t.length;if(!(this.data&&this.data.length==e)&&go){this.data=new Float32Array(e)}for(var r=0;r<e;r++){this.data[r]=t[r]}this._len=e},appendPath:function(t){if(!(t instanceof Array)){t=[t]}var e=t.length;var r=0;var i=this._len;for(var a=0;a<e;a++){r+=t[a].len()}if(go&&this.data instanceof Float32Array){this.data=new Float32Array(i+r)}for(var a=0;a<e;a++){var n=t[a].data;for(var o=0;o<n.length;o++){this.data[i++]=n[o]}}this._len=i},addData:function(t){if(!this._saveData){return}var e=this.data;if(this._len+arguments.length>e.length){this._expandData();e=this.data}for(var r=0;r<arguments.length;r++){e[this._len++]=arguments[r]}this._prevCmd=t},_expandData:function(){if(!(this.data instanceof Array)){var t=[];for(var e=0;e<this._len;e++){t[e]=this.data[e]}this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var r=this._dashSum;var i=this._dashOffset;var a=this._lineDash;var n=this._ctx;var o=this._xi;var s=this._yi;var l=t-o;var u=e-s;var h=vo(l*l+u*u);var f=o;var c=s;var v;var d=a.length;var p;l/=h;u/=h;if(i<0){i=r+i}i%=r;f-=i*l;c-=i*u;while(l>0&&f<=t||l<0&&f>=t||l==0&&(u>0&&c<=e||u<0&&c>=e)){p=this._dashIdx;v=a[p];f+=l*v;c+=u*v;this._dashIdx=(p+1)%d;if(l>0&&f<o||l<0&&f>o||u>0&&c<s||u<0&&c>s){continue}n[p%2?"moveTo":"lineTo"](l>=0?uo(f,t):ho(f,t),u>=0?uo(c,e):ho(c,e))}l=f-t;u=c-e;this._dashOffset=-vo(l*l+u*u)},_dashedBezierTo:function(t,e,r,i,a,n){var o=this._dashSum;var s=this._dashOffset;var l=this._lineDash;var u=this._ctx;var h=this._xi;var f=this._yi;var c;var v;var d;var p=kn;var g=0;var m=this._dashIdx;var y=l.length;var x;var _;var w=0;if(s<0){s=o+s}s%=o;for(c=0;c<1;c+=.1){v=p(h,t,r,a,c+.1)-p(h,t,r,a,c);d=p(f,e,i,n,c+.1)-p(f,e,i,n,c);g+=vo(v*v+d*d)}for(;m<y;m++){w+=l[m];if(w>s){break}}c=(w-s)/g;while(c<=1){x=p(h,t,r,a,c);_=p(f,e,i,n,c);m%2?u.moveTo(x,_):u.lineTo(x,_);c+=l[m]/g;m=(m+1)%y}m%2!==0&&u.lineTo(a,n);v=a-x;d=n-_;this._dashOffset=-vo(v*v+d*d)},_dashedQuadraticTo:function(t,e,r,i){var a=r;var n=i;r=(r+2*t)/3;i=(i+2*e)/3;t=(this._xi+2*t)/3;e=(this._yi+2*e)/3;this._dashedBezierTo(t,e,r,i,a,n)},toStatic:function(){var t=this.data;if(t instanceof Array){t.length=this._len;if(go){this.data=new Float32Array(t)}}},getBoundingRect:function(){no[0]=no[1]=so[0]=so[1]=Number.MAX_VALUE;oo[0]=oo[1]=lo[0]=lo[1]=-Number.MAX_VALUE;var t=this.data;var e=0;var r=0;var i=0;var a=0;for(var n=0;n<t.length;){var o=t[n++];if(n==1){e=t[n];r=t[n+1];i=e;a=r}switch(o){case ao.M:i=t[n++];a=t[n++];e=i;r=a;so[0]=i;so[1]=a;lo[0]=i;lo[1]=a;break;case ao.L:Jn(e,r,t[n],t[n+1],so,lo);e=t[n++];r=t[n++];break;case ao.C:eo(e,r,t[n++],t[n++],t[n++],t[n++],t[n],t[n+1],so,lo);e=t[n++];r=t[n++];break;case ao.Q:ro(e,r,t[n++],t[n++],t[n],t[n+1],so,lo);e=t[n++];r=t[n++];break;case ao.A:var s=t[n++];var l=t[n++];var u=t[n++];var h=t[n++];var f=t[n++];var c=t[n++]+f;var v=t[n++];var d=1-t[n++];if(n==1){i=fo(f)*u+s;a=co(f)*h+l}io(s,l,u,h,f,c,d,so,lo);e=fo(c)*u+s;r=co(c)*h+l;break;case ao.R:i=e=t[n++];a=r=t[n++];var p=t[n++];var g=t[n++];Jn(i,a,i+p,a+g,so,lo);break;case ao.Z:e=i;r=a;break}kt(no,no,so);Pt(oo,oo,lo)}if(n===0){no[0]=no[1]=oo[0]=oo[1]=0}return new fr(no[0],no[1],oo[0]-no[0],oo[1]-no[1])},rebuildPath:function(t){var e=this.data;var r,i;var a,n;var o,s;var l=this._ux;var u=this._uy;var h=this._len;for(var f=0;f<h;){var c=e[f++];if(f==1){a=e[f];n=e[f+1];r=a;i=n}switch(c){case ao.M:r=a=e[f++];i=n=e[f++];t.moveTo(a,n);break;case ao.L:o=e[f++];s=e[f++];if(po(o-a)>l||po(s-n)>u||f===h-1){t.lineTo(o,s);a=o;n=s}break;case ao.C:t.bezierCurveTo(e[f++],e[f++],e[f++],e[f++],e[f++],e[f++]);a=e[f-2];n=e[f-1];break;case ao.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]);a=e[f-2];n=e[f-1];break;case ao.A:var v=e[f++];var d=e[f++];var p=e[f++];var g=e[f++];var m=e[f++];var y=e[f++];var x=e[f++];var _=e[f++];var w=p>g?p:g;var b=p>g?1:p/g;var S=p>g?g/p:1;var M=Math.abs(p-g)>.001;var I=m+y;if(M){t.translate(v,d);t.rotate(x);t.scale(b,S);t.arc(0,0,w,m,I,1-_);t.scale(1/b,1/S);t.rotate(-x);t.translate(-v,-d)}else{t.arc(v,d,w,m,I,1-_)}if(f==1){r=fo(m)*p+v;i=co(m)*g+d}a=fo(I)*p+v;n=co(I)*g+d;break;case ao.R:r=a=e[f];i=n=e[f+1];t.rect(e[f++],e[f++],e[f++],e[f++]);break;case ao.Z:t.closePath();a=r;n=i}}}};mo.CMD=ao;function yo(t,e,r,i,a,n,o){if(a===0){return false}var s=a;var l=0;var u=t;if(o>e+s&&o>i+s||o<e-s&&o<i-s||n>t+s&&n>r+s||n<t-s&&n<r-s){return false}if(t!==r){l=(e-i)/(t-r);u=(t*i-r*e)/(t-r)}else{return Math.abs(n-t)<=s/2}var h=l*n-o+u;var f=h*h/(l*l+1);return f<=s/2*s/2}function xo(t,e,r,i,a,n,o,s,l,u,h){if(l===0){return false}var f=l;if(h>e+f&&h>i+f&&h>n+f&&h>s+f||h<e-f&&h<i-f&&h<n-f&&h<s-f||u>t+f&&u>r+f&&u>a+f&&u>o+f||u<t-f&&u<r-f&&u<a-f&&u<o-f){return false}var c=zn(t,e,r,i,a,n,o,s,u,h,null);return c<=f/2}function _o(t,e,r,i,a,n,o,s,l){if(o===0){return false}var u=o;if(l>e+u&&l>i+u&&l>n+u||l<e-u&&l<i-u&&l<n-u||s>t+u&&s>r+u&&s>a+u||s<t-u&&s<r-u&&s<a-u){return false}var h=Wn(t,e,r,i,a,n,s,l,null);return h<=u/2}var wo=Math.PI*2;function bo(t){t%=wo;if(t<0){t+=wo}return t}var So=Math.PI*2;function Mo(t,e,r,i,a,n,o,s,l){if(o===0){return false}var u=o;s-=t;l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>r||h+u<r){return false}if(Math.abs(i-a)%So<1e-4){return true}if(n){var f=i;i=bo(a);a=bo(f)}else{i=bo(i);a=bo(a)}if(i>a){a+=So}var c=Math.atan2(l,s);if(c<0){c+=So}return c>=i&&c<=a||c+So>=i&&c+So<=a}function Io(t,e,r,i,a,n){if(n>e&&n>i||n<e&&n<i){return 0}if(i===e){return 0}var o=i<e?1:-1;var s=(n-e)/(i-e);if(s===1||s===0){o=i<e?.5:-.5}var l=s*(r-t)+t;return l>a?o:0}var Do=mo.CMD;var To=Math.PI*2;var Ao=1e-4;function Co(t,e){return Math.abs(t-e)<Ao}var Lo=[-1,-1,-1];var ko=[-1,-1];function Po(){var t=ko[0];ko[0]=ko[1];ko[1]=t}function No(t,e,r,i,a,n,o,s,l,u){if(u>e&&u>i&&u>n&&u>s||u<e&&u<i&&u<n&&u<s){return 0}var h=Nn(e,i,n,s,u,Lo);if(h===0){return 0}else{var f=0;var c=-1;var v,d;for(var p=0;p<h;p++){var g=Lo[p];var m=g===0||g===1?.5:1;var y=kn(t,r,a,o,g);if(y<l){continue}if(c<0){c=En(e,i,n,s,ko);if(ko[1]<ko[0]&&c>1){Po()}v=kn(e,i,n,s,ko[0]);if(c>1){d=kn(e,i,n,s,ko[1])}}if(c==2){if(g<ko[0]){f+=v<e?m:-m}else if(g<ko[1]){f+=d<v?m:-m}else{f+=s<d?m:-m}}else{if(g<ko[0]){f+=v<e?m:-m}else{f+=s<v?m:-m}}}return f}}function Eo(t,e,r,i,a,n,o,s){if(s>e&&s>i&&s>n||s<e&&s<i&&s<n){return 0}var l=Vn(e,i,n,s,Lo);if(l===0){return 0}else{var u=Gn(e,i,n);if(u>=0&&u<=1){var h=0;var f=Rn(e,i,n,u);for(var c=0;c<l;c++){var v=Lo[c]===0||Lo[c]===1?.5:1;var d=Rn(t,r,a,Lo[c]);if(d<o){continue}if(Lo[c]<u){h+=f<e?v:-v}else{h+=n<f?v:-v}}return h}else{var v=Lo[0]===0||Lo[0]===1?.5:1;var d=Rn(t,r,a,Lo[0]);if(d<o){return 0}return n<e?v:-v}}}function Oo(t,e,r,i,a,n,o,s){s-=e;if(s>r||s<-r){return 0}var l=Math.sqrt(r*r-s*s);Lo[0]=-l;Lo[1]=l;var u=Math.abs(i-a);if(u<1e-4){return 0}if(u%To<1e-4){i=0;a=To;var h=n?1:-1;if(o>=Lo[0]+t&&o<=Lo[1]+t){return h}else{return 0}}if(n){var l=i;i=bo(a);a=bo(l)}else{i=bo(i);a=bo(a)}if(i>a){a+=To}var f=0;for(var c=0;c<2;c++){var v=Lo[c];if(v+t>o){var d=Math.atan2(s,v);var h=n?1:-1;if(d<0){d=To+d}if(d>=i&&d<=a||d+To>=i&&d+To<=a){if(d>Math.PI/2&&d<Math.PI*1.5){h=-h}f+=h}}}return f}function zo(t,e,r,i,a){var n=0;var o=0;var s=0;var l=0;var u=0;for(var h=0;h<t.length;){var f=t[h++];if(f===Do.M&&h>1){if(!r){n+=Io(o,s,l,u,i,a)}}if(h==1){o=t[h];s=t[h+1];l=o;u=s}switch(f){case Do.M:l=t[h++];u=t[h++];o=l;s=u;break;case Do.L:if(r){if(yo(o,s,t[h],t[h+1],e,i,a)){return true}}else{n+=Io(o,s,t[h],t[h+1],i,a)||0}o=t[h++];s=t[h++];break;case Do.C:if(r){if(xo(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,i,a)){return true}}else{n+=No(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],i,a)||0}o=t[h++];s=t[h++];break;case Do.Q:if(r){if(_o(o,s,t[h++],t[h++],t[h],t[h+1],e,i,a)){return true}}else{n+=Eo(o,s,t[h++],t[h++],t[h],t[h+1],i,a)||0}o=t[h++];s=t[h++];break;case Do.A:var c=t[h++];var v=t[h++];var d=t[h++];var p=t[h++];var g=t[h++];var m=t[h++];var y=t[h++];var x=1-t[h++];var _=Math.cos(g)*d+c;var w=Math.sin(g)*p+v;if(h>1){n+=Io(o,s,_,w,i,a)}else{l=_;u=w}var b=(i-c)*p/d+c;if(r){if(Mo(c,v,p,g,g+m,x,e,b,a)){return true}}else{n+=Oo(c,v,p,g,g+m,x,b,a)}o=Math.cos(g+m)*d+c;s=Math.sin(g+m)*p+v;break;case Do.R:l=o=t[h++];u=s=t[h++];var S=t[h++];var M=t[h++];var _=l+S;var w=u+M;if(r){if(yo(l,u,_,u,e,i,a)||yo(_,u,_,w,e,i,a)||yo(_,w,l,w,e,i,a)||yo(l,w,l,u,e,i,a)){return true}}else{n+=Io(_,u,_,w,i,a);n+=Io(l,w,l,u,i,a)}break;case Do.Z:if(r){if(yo(o,s,l,u,e,i,a)){return true}}else{n+=Io(o,s,l,u,i,a)}o=l;s=u;break}}if(!r&&!Co(s,u)){n+=Io(o,s,l,u,i,a)||0}return n!==0}function Ro(t,e,r){return zo(t,0,false,e,r)}function Bo(t,e,r,i){return zo(t,e,true,r,i)}var Vo=Er.prototype.getCanvasPattern;var Go=Math.abs;var Fo=new mo(true);function Wo(t){Ri.call(this,t);this.path=null}Wo.prototype={constructor:Wo,type:"path",__dirtyPath:true,strokeContainThreshold:5,brush:function(t,e){var r=this.style;var i=this.path||Fo;var a=r.hasStroke();var n=r.hasFill();var o=r.fill;var s=r.stroke;var l=n&&!!o.colorStops;var u=a&&!!s.colorStops;var h=n&&!!o.image;var f=a&&!!s.image;r.bind(t,this,e);this.setTransform(t);if(this.__dirty){var c;if(l){c=c||this.getBoundingRect();this._fillGradient=r.getGradient(t,o,c)}if(u){c=c||this.getBoundingRect();this._strokeGradient=r.getGradient(t,s,c)}}if(l){t.fillStyle=this._fillGradient}else if(h){t.fillStyle=Vo.call(o,t)}if(u){t.strokeStyle=this._strokeGradient}else if(f){t.strokeStyle=Vo.call(s,t)}var v=r.lineDash;var d=r.lineDashOffset;var p=!!t.setLineDash;var g=this.getGlobalScale();i.setScale(g[0],g[1]);if(this.__dirtyPath||v&&!p&&a){i.beginPath(t);if(v&&!p){i.setLineDash(v);i.setLineDashOffset(d)}this.buildPath(i,this.shape,false);if(this.path){this.__dirtyPath=false}}else{t.beginPath();this.path.rebuildPath(t)}n&&i.fill(t);if(v&&p){t.setLineDash(v);t.lineDashOffset=d}a&&i.stroke(t);if(v&&p){t.setLineDash([])}if(r.text!=null){this.restoreTransform(t);this.drawRectText(t,this.getBoundingRect())}},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new mo},getBoundingRect:function(){var t=this._rect;var e=this.style;var r=!t;if(r){var i=this.path;if(!i){i=this.path=new mo}if(this.__dirtyPath){i.beginPath();this.buildPath(i,this.shape,false)}t=i.getBoundingRect()}this._rect=t;if(e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){a.copy(t);var n=e.lineWidth;var o=e.strokeNoScale?this.getLineScale():1;if(!e.hasFill()){n=Math.max(n,this.strokeContainThreshold||4)}if(o>1e-10){a.width+=n/o;a.height+=n/o;a.x-=n/o/2;a.y-=n/o/2}}return a}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e);var i=this.getBoundingRect();var a=this.style;t=r[0];e=r[1];if(i.contain(t,e)){var n=this.path.data;if(a.hasStroke()){var o=a.lineWidth;var s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10){if(!a.hasFill()){o=Math.max(o,this.strokeContainThreshold)}if(Bo(n,o/s,t,e)){return true}}}if(a.hasFill()){return Ro(n,t,e)}}return false},dirty:function(t){if(t==null){t=true}if(t){this.__dirtyPath=t;this._rect=null}this.__dirty=true;this.__zr&&this.__zr.refresh();if(this.__clipTarget){this.__clipTarget.dirty()}},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){if(t==="shape"){this.setShape(e);this.__dirtyPath=true;this._rect=null}else{Ri.prototype.attrKV.call(this,t,e)}},setShape:function(t,e){var r=this.shape;if(r){if(F(t)){for(var i in t){if(t.hasOwnProperty(i)){r[i]=t[i]}}}else{r[t]=e}this.dirty(true)}return this},getLineScale:function(){var t=this.transform;return t&&Go(t[0]-1)>1e-10&&Go(t[3]-1)>1e-10?Math.sqrt(Go(t[0]*t[3]-t[2]*t[1])):1}};Wo.extend=function(a){var t=function(t){Wo.call(this,t);if(a.style){this.style.extendFrom(a.style,false)}var e=a.shape;if(e){this.shape=this.shape||{};var r=this.shape;for(var i in e){if(!r.hasOwnProperty(i)&&e.hasOwnProperty(i)){r[i]=e[i]}}}a.init&&a.init.call(this,t)};M(t,Wo);for(var e in a){if(e!=="style"&&e!=="shape"){t.prototype[e]=a[e]}}return t};M(Wo,Ri);var Ho=mo.CMD;var Zo=[[],[],[]];var Uo=Math.sqrt;var jo=Math.atan2;var Xo=function(t,e){var r=t.data;var i;var a;var n;var o;var s;var l;var u=Ho.M;var h=Ho.C;var f=Ho.L;var c=Ho.R;var v=Ho.A;var d=Ho.Q;for(n=0,o=0;n<r.length;){i=r[n++];o=n;a=0;switch(i){case u:a=1;break;case f:a=1;break;case h:a=3;break;case d:a=2;break;case v:var p=e[4];var g=e[5];var m=Uo(e[0]*e[0]+e[1]*e[1]);var y=Uo(e[2]*e[2]+e[3]*e[3]);var x=jo(-e[1]/y,e[0]/m);r[n]*=m;r[n++]+=p;r[n]*=y;r[n++]+=g;r[n++]*=m;r[n++]*=y;r[n++]+=x;r[n++]+=x;n+=2;o=n;break;case c:l[0]=r[n++];l[1]=r[n++];Lt(l,l,e);r[o++]=l[0];r[o++]=l[1];l[0]+=r[n++];l[1]+=r[n++];Lt(l,l,e);r[o++]=l[0];r[o++]=l[1]}for(s=0;s<a;s++){var l=Zo[s];l[0]=r[n++];l[1]=r[n++];Lt(l,l,e);r[o++]=l[0];r[o++]=l[1]}}};var Yo=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];var qo=Math.sqrt;var $o=Math.sin;var Ko=Math.cos;var Jo=Math.PI;var Qo=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])};var ts=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Qo(t)*Qo(e))};var es=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ts(t,e))};function rs(t,e,r,i,a,n,o,s,l,u,h){var f=l*(Jo/180);var c=Ko(f)*(t-r)/2+$o(f)*(e-i)/2;var v=-1*$o(f)*(t-r)/2+Ko(f)*(e-i)/2;var d=c*c/(o*o)+v*v/(s*s);if(d>1){o*=qo(d);s*=qo(d)}var p=(a===n?-1:1)*qo((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0;var g=p*o*v/s;var m=p*-s*c/o;var y=(t+r)/2+Ko(f)*g-$o(f)*m;var x=(e+i)/2+$o(f)*g+Ko(f)*m;var _=es([1,0],[(c-g)/o,(v-m)/s]);var w=[(c-g)/o,(v-m)/s];var b=[(-1*c-g)/o,(-1*v-m)/s];var S=es(w,b);if(ts(w,b)<=-1){S=Jo}if(ts(w,b)>=1){S=0}if(n===0&&S>0){S=S-2*Jo}if(n===1&&S<0){S=S+2*Jo}h.addData(u,y,x,o,s,_,S,f,n)}function is(t){if(!t){return[]}var e=t.replace(/-/g," -").replace(/  /g," ").replace(/ /g,",").replace(/,,/g,",");var r;for(r=0;r<Yo.length;r++){e=e.replace(new RegExp(Yo[r],"g"),"|"+Yo[r])}var i=e.split("|");var a=0;var n=0;var o=new mo;var s=mo.CMD;var l;for(r=1;r<i.length;r++){var u=i[r];var h=u.charAt(0);var f=0;var c=u.slice(1).replace(/e,-/g,"e-").split(",");var v;if(c.length>0&&c[0]===""){c.shift()}for(var d=0;d<c.length;d++){c[d]=parseFloat(c[d])}while(f<c.length&&!isNaN(c[f])){if(isNaN(c[0])){break}var p;var g;var m;var y;var x;var _;var w;var b=a;var S=n;switch(h){case"l":a+=c[f++];n+=c[f++];v=s.L;o.addData(v,a,n);break;case"L":a=c[f++];n=c[f++];v=s.L;o.addData(v,a,n);break;case"m":a+=c[f++];n+=c[f++];v=s.M;o.addData(v,a,n);h="l";break;case"M":a=c[f++];n=c[f++];v=s.M;o.addData(v,a,n);h="L";break;case"h":a+=c[f++];v=s.L;o.addData(v,a,n);break;case"H":a=c[f++];v=s.L;o.addData(v,a,n);break;case"v":n+=c[f++];v=s.L;o.addData(v,a,n);break;case"V":n=c[f++];v=s.L;o.addData(v,a,n);break;case"C":v=s.C;o.addData(v,c[f++],c[f++],c[f++],c[f++],c[f++],c[f++]);a=c[f-2];n=c[f-1];break;case"c":v=s.C;o.addData(v,c[f++]+a,c[f++]+n,c[f++]+a,c[f++]+n,c[f++]+a,c[f++]+n);a+=c[f-2];n+=c[f-1];break;case"S":p=a;g=n;var M=o.len();var I=o.data;if(l===s.C){p+=a-I[M-4];g+=n-I[M-3]}v=s.C;b=c[f++];S=c[f++];a=c[f++];n=c[f++];o.addData(v,p,g,b,S,a,n);break;case"s":p=a;g=n;var M=o.len();var I=o.data;if(l===s.C){p+=a-I[M-4];g+=n-I[M-3]}v=s.C;b=a+c[f++];S=n+c[f++];a+=c[f++];n+=c[f++];o.addData(v,p,g,b,S,a,n);break;case"Q":b=c[f++];S=c[f++];a=c[f++];n=c[f++];v=s.Q;o.addData(v,b,S,a,n);break;case"q":b=c[f++]+a;S=c[f++]+n;a+=c[f++];n+=c[f++];v=s.Q;o.addData(v,b,S,a,n);break;case"T":p=a;g=n;var M=o.len();var I=o.data;if(l===s.Q){p+=a-I[M-4];g+=n-I[M-3]}a=c[f++];n=c[f++];v=s.Q;o.addData(v,p,g,a,n);break;case"t":p=a;g=n;var M=o.len();var I=o.data;if(l===s.Q){p+=a-I[M-4];g+=n-I[M-3]}a+=c[f++];n+=c[f++];v=s.Q;o.addData(v,p,g,a,n);break;case"A":m=c[f++];y=c[f++];x=c[f++];_=c[f++];w=c[f++];b=a,S=n;a=c[f++];n=c[f++];v=s.A;rs(b,S,a,n,_,w,m,y,x,v,o);break;case"a":m=c[f++];y=c[f++];x=c[f++];_=c[f++];w=c[f++];b=a,S=n;a+=c[f++];n+=c[f++];v=s.A;rs(b,S,a,n,_,w,m,y,x,v,o);break}}if(h==="z"||h==="Z"){v=s.Z;o.addData(v)}l=v}o.toStatic();return o}function as(t,e){var r=is(t);e=e||{};e.buildPath=function(t){if(t.setData){t.setData(r.data);var e=t.getContext();if(e){t.rebuildPath(e)}}else{var e=t;r.rebuildPath(e)}};e.applyTransform=function(t){Xo(r,t);this.dirty(true)};return e}function ns(t,e){return new Wo(as(t,e))}function os(t,e){return Wo.extend(as(t,e))}function ss(t,e){var r=[];var i=t.length;for(var a=0;a<i;a++){var n=t[a];if(!n.path){n.createPathProxy()}if(n.__dirtyPath){n.buildPath(n.path,n.shape,true)}r.push(n.path)}var o=new Wo(e);o.createPathProxy();o.buildPath=function(t){t.appendPath(r);var e=t.getContext();if(e){t.rebuildPath(e)}};return o}var ls=function(t){Ri.call(this,t)};ls.prototype={constructor:ls,type:"text",brush:function(t,e){var r=this.style;this.__dirty&&mi(r,true);r.fill=r.stroke=r.shadowBlur=r.shadowColor=r.shadowOffsetX=r.shadowOffsetY=null;var i=r.text;i!=null&&(i+="");r.bind(t,this,e);if(!Ei(i,r)){return}this.setTransform(t);xi(this,t,i,r);this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;this.__dirty&&mi(t,true);if(!this._rect){var e=t.text;e!=null?e+="":e="";var r=Jr(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);r.x+=t.x||0;r.y+=t.y||0;if(Li(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;r.x-=i/2;r.y-=i/2;r.width+=i;r.height+=i}this._rect=r}return this._rect}};M(ls,Ri);var us=Wo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){if(r){t.moveTo(e.cx+e.r,e.cy)}t.arc(e.cx,e.cy,e.r,0,Math.PI*2,true)}});var hs=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var fs=function(l){return m.browser.ie&&m.browser.version>=11?function(){var t=this.__clipPaths;var e=this.style;var r;if(t){for(var i=0;i<t.length;i++){var a=t[i];var n=a&&a.shape;var o=a&&a.type;if(n&&(o==="sector"&&n.startAngle===n.endAngle||o==="rect"&&(!n.width||!n.height))){for(var s=0;s<hs.length;s++){hs[s][2]=e[hs[s][0]];e[hs[s][0]]=hs[s][1]}r=true;break}}}l.apply(this,arguments);if(r){for(var s=0;s<hs.length;s++){e[hs[s][0]]=hs[s][2]}}}:l};var cs=Wo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:true},brush:fs(Wo.prototype.brush),buildPath:function(t,e){var r=e.cx;var i=e.cy;var a=Math.max(e.r0||0,0);var n=Math.max(e.r,0);var o=e.startAngle;var s=e.endAngle;var l=e.clockwise;var u=Math.cos(o);var h=Math.sin(o);t.moveTo(u*a+r,h*a+i);t.lineTo(u*n+r,h*n+i);t.arc(r,i,n,o,s,!l);t.lineTo(Math.cos(s)*a+r,Math.sin(s)*a+i);if(a!==0){t.arc(r,i,a,s,o,l)}t.closePath()}});var vs=Wo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx;var i=e.cy;var a=Math.PI*2;t.moveTo(r+e.r,i);t.arc(r,i,e.r,0,a,false);t.moveTo(r+e.r0,i);t.arc(r,i,e.r0,0,a,true)}});function ds(t,e,r,i,a,n,o){var s=(r-t)*.5;var l=(i-e)*.5;return(2*(e-r)+s+l)*o+(-3*(e-r)-2*s-l)*n+s*a+e}var ps=function(t,e){var r=t.length;var i=[];var a=0;for(var n=1;n<r;n++){a+=Mt(t[n-1],t[n])}var o=a/2;o=o<r?r:o;for(var n=0;n<o;n++){var s=n/(o-1)*(e?r:r-1);var l=Math.floor(s);var u=s-l;var h;var f=t[l%r];var c;var v;if(!e){h=t[l===0?l:l-1];c=t[l>r-2?r-1:l+1];v=t[l>r-3?r-1:l+2]}else{h=t[(l-1+r)%r];c=t[(l+1)%r];v=t[(l+2)%r]}var d=u*u;var p=u*d;i.push([ds(h[0],f[0],c[0],v[0],u,d,p),ds(h[1],f[1],c[1],v[1],u,d,p)])}return i};var gs=function(t,e,r,i){var a=[];var n=[];var o=[];var s=[];var l;var u;var h,f;if(i){h=[Infinity,Infinity];f=[-Infinity,-Infinity];for(var c=0,v=t.length;c<v;c++){kt(h,h,t[c]);Pt(f,f,t[c])}kt(h,h,i[0]);Pt(f,f,i[1])}for(var c=0,v=t.length;c<v;c++){var d=t[c];if(r){l=t[c?c-1:v-1];u=t[(c+1)%v]}else{if(c===0||c===v-1){a.push(ht(t[c]));continue}else{l=t[c-1];u=t[c+1]}}dt(n,u,l);bt(n,n,e);var p=Mt(d,l);var g=Mt(d,u);var m=p+g;if(m!==0){p/=m;g/=m}bt(o,n,-p);bt(s,n,g);var y=ct([],d,o);var x=ct([],d,s);if(i){Pt(y,y,h);kt(y,y,f);Pt(x,x,h);kt(x,x,f)}a.push(y);a.push(x)}if(r){a.push(a.shift())}return a};function ms(t,e,r){var i=e.points;var a=e.smooth;if(i&&i.length>=2){if(a&&a!=="spline"){var n=gs(i,a,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);var o=i.length;for(var s=0;s<(r?o:o-1);s++){var l=n[s*2];var u=n[s*2+1];var h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{if(a==="spline"){i=ps(i,r)}t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++){t.lineTo(i[s][0],i[s][1])}}r&&t.closePath()}}var ys=Wo.extend({type:"polygon",shape:{points:null,smooth:false,smoothConstraint:null},buildPath:function(t,e){ms(t,e,true)}});var xs=Wo.extend({type:"polyline",shape:{points:null,smooth:false,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){ms(t,e,false)}});var _s=Wo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x;var i=e.y;var a=e.width;var n=e.height;if(!e.r){t.rect(r,i,a,n)}else{di(t,e)}t.closePath();return}});var ws=Wo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1;var i=e.y1;var a=e.x2;var n=e.y2;var o=e.percent;if(o===0){return}t.moveTo(r,i);if(o<1){a=r*(1-o)+a*o;n=i*(1-o)+n*o}t.lineTo(a,n)},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});var bs=[];function Ss(t,e,r){var i=t.cpx2;var a=t.cpy2;if(i===null||a===null){return[(r?Pn:kn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?Pn:kn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]}else{return[(r?Bn:Rn)(t.x1,t.cpx1,t.x2,e),(r?Bn:Rn)(t.y1,t.cpy1,t.y2,e)]}}var Ms=Wo.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1;var i=e.y1;var a=e.x2;var n=e.y2;var o=e.cpx1;var s=e.cpy1;var l=e.cpx2;var u=e.cpy2;var h=e.percent;if(h===0){return}t.moveTo(r,i);if(l==null||u==null){if(h<1){Fn(r,o,a,h,bs);o=bs[1];a=bs[2];Fn(i,s,n,h,bs);s=bs[1];n=bs[2]}t.quadraticCurveTo(o,s,a,n)}else{if(h<1){On(r,o,l,a,h,bs);o=bs[1];l=bs[2];a=bs[3];On(i,s,u,n,h,bs);s=bs[1];u=bs[2];n=bs[3]}t.bezierCurveTo(o,s,l,u,a,n)}},pointAt:function(t){return Ss(this.shape,t,false)},tangentAt:function(t){var e=Ss(this.shape,t,true);return St(e,e)}});var Is=Wo.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:true},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.cx;var i=e.cy;var a=Math.max(e.r,0);var n=e.startAngle;var o=e.endAngle;var s=e.clockwise;var l=Math.cos(n);var u=Math.sin(n);t.moveTo(l*a+r,u*a+i);t.arc(r,i,a,n,o,!s)}});var Ds=Wo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){var t=this.__dirtyPath;var e=this.shape.paths;for(var r=0;r<e.length;r++){t=t||e[r].__dirtyPath}this.__dirtyPath=t;this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();var t=this.shape.paths||[];var e=this.getGlobalScale();for(var r=0;r<t.length;r++){if(!t[r].path){t[r].createPathProxy()}t[r].path.setScale(e[0],e[1])}},buildPath:function(t,e){var r=e.paths||[];for(var i=0;i<r.length;i++){r[i].buildPath(t,r[i].shape,true)}},afterBrush:function(){var t=this.shape.paths||[];for(var e=0;e<t.length;e++){t[e].__dirtyPath=false}},getBoundingRect:function(){this._updatePathDirty();return Wo.prototype.getBoundingRect.call(this)}});var Ts=function(t){this.colorStops=t||[]};Ts.prototype={constructor:Ts,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var As=function(t,e,r,i,a,n){this.x=t==null?0:t;this.y=e==null?0:e;this.x2=r==null?1:r;this.y2=i==null?0:i;this.type="linear";this.global=n||false;Ts.call(this,a)};As.prototype={constructor:As};M(As,Ts);var Cs=function(t,e,r,i,a){this.x=t==null?.5:t;this.y=e==null?.5:e;this.r=r==null?.5:r;this.type="radial";this.global=a||false;Ts.call(this,i)};Cs.prototype={constructor:Cs};M(Cs,Ts);function Ls(t){Ri.call(this,t);this._displayables=[];this._temporaryDisplayables=[];this._cursor=0;this.notClear=true}Ls.prototype.incremental=true;Ls.prototype.clearDisplaybles=function(){this._displayables=[];this._temporaryDisplayables=[];this._cursor=0;this.dirty();this.notClear=false};Ls.prototype.addDisplayable=function(t,e){if(e){this._temporaryDisplayables.push(t)}else{this._displayables.push(t)}this.dirty()};Ls.prototype.addDisplayables=function(t,e){e=e||false;for(var r=0;r<t.length;r++){this.addDisplayable(t[r],e)}};Ls.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++){t&&t(this._displayables[e])}for(var e=0;e<this._temporaryDisplayables.length;e++){t&&t(this._temporaryDisplayables[e])}};Ls.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this;e.update();e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this;e.update();e.parent=null}};Ls.prototype.brush=function(t,e){for(var r=this._cursor;r<this._displayables.length;r++){var i=this._temporaryDisplayables[r];i.beforeBrush&&i.beforeBrush(t);i.brush(t,r===this._cursor?null:this._displayables[r-1]);i.afterBrush&&i.afterBrush(t)}this._cursor=r;for(var r=0;r<this._temporaryDisplayables.length;r++){var i=this._temporaryDisplayables[r];i.beforeBrush&&i.beforeBrush(t);i.brush(t,r===0?null:this._temporaryDisplayables[r-1]);i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[];this.notClear=true};var ks=[];Ls.prototype.getBoundingRect=function(){if(!this._rect){var t=new fr(Infinity,Infinity,-Infinity,-Infinity);for(var e=0;e<this._displayables.length;e++){var r=this._displayables[e];var i=r.getBoundingRect().clone();if(r.needLocalTransform()){i.applyTransform(r.getLocalTransform(ks))}t.union(i)}this._rect=t}return this._rect};Ls.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e);var i=this.getBoundingRect();if(i.contain(r[0],r[1])){for(var a=0;a<this._displayables.length;a++){var n=this._displayables[a];if(n.contain(t,e)){return true}}}return false};M(Ls,Ri);var Ps=Math.round;var Ns=Math.max;var Es=Math.min;var Os={};function zs(t){return Wo.extend(t)}function Rs(t,e){return os(t,e)}function Bs(t,e,r,i){var a=ns(t,e);var n=a.getBoundingRect();if(r){if(i==="center"){r=Gs(r,n)}Ws(a,r)}return a}function Vs(t,r,i){var a=new Bi({style:{image:t,x:r.x,y:r.y,width:r.width,height:r.height},onload:function(t){if(i==="center"){var e={width:t.width,height:t.height};a.setStyle(Gs(r,e))}}});return a}function Gs(t,e){var r=e.width/e.height;var i=t.height*r;var a;if(i<=t.width){a=t.height}else{i=t.width;a=i/r}var n=t.x+t.width/2;var o=t.y+t.height/2;return{x:n-i/2,y:o-a/2,width:i,height:a}}var Fs=ss;function Ws(t,e){if(!t.applyTransform){return}var r=t.getBoundingRect();var i=r.calculateTransform(e);t.applyTransform(i)}function Hs(t){var e=t.shape;var r=t.style.lineWidth;if(Ps(e.x1*2)===Ps(e.x2*2)){e.x1=e.x2=Us(e.x1,r,true)}if(Ps(e.y1*2)===Ps(e.y2*2)){e.y1=e.y2=Us(e.y1,r,true)}return t}function Zs(t){var e=t.shape;var r=t.style.lineWidth;var i=e.x;var a=e.y;var n=e.width;var o=e.height;e.x=Us(e.x,r,true);e.y=Us(e.y,r,true);e.width=Math.max(Us(i+n,r,false)-e.x,n===0?0:1);e.height=Math.max(Us(a+o,r,false)-e.y,o===0?0:1);return t}function Us(t,e,r){var i=Ps(t*2);return(i+Ps(e))%2===0?i/2:(i+(r?1:-1))/2}function js(t){return t!=null&&t!="none"}function Xs(t){return typeof t==="string"?Le(t,-.1):t}function Ys(t){if(t.__hoverStlDirty){var e=t.style.stroke;var r=t.style.fill;var i=t.__hoverStl;i.fill=i.fill||(js(r)?Xs(r):null);i.stroke=i.stroke||(js(e)?Xs(e):null);var a={};for(var n in i){if(i[n]!=null){a[n]=t.style[n]}}t.__normalStl=a;t.__hoverStlDirty=false}}function qs(t){if(t.__isHover){return}Ys(t);if(t.useHoverLayer){t.__zr&&t.__zr.addHover(t,t.__hoverStl)}else{var e=t.style;var r=e.insideRollbackOpt;r&&vl(e);e.extendFrom(t.__hoverStl);if(r){cl(e,e.insideOriginalTextPosition,r);if(e.textFill==null){e.textFill=r.autoColor}}t.dirty(false);t.z2+=1}t.__isHover=true}function $s(t){if(!t.__isHover){return}var e=t.__normalStl;if(t.useHoverLayer){t.__zr&&t.__zr.removeHover(t)}else{e&&t.setStyle(e);t.z2-=1}t.__isHover=false}function Ks(t){t.type==="group"?t.traverse(function(t){if(t.type!=="group"){qs(t)}}):qs(t)}function Js(t){t.type==="group"?t.traverse(function(t){if(t.type!=="group"){$s(t)}}):$s(t)}function Qs(t,e){t.__hoverStl=t.hoverStyle||e||{};t.__hoverStlDirty=true;if(t.__isHover){Ys(t)}}function tl(t){if(this.__hoverSilentOnTouch&&t.zrByTouch){return}!this.__isEmphasis&&Ks(this)}function el(t){if(this.__hoverSilentOnTouch&&t.zrByTouch){return}!this.__isEmphasis&&Js(this)}function rl(){this.__isEmphasis=true;Ks(this)}function il(){this.__isEmphasis=false;Js(this)}function al(t,e,r){t.__hoverSilentOnTouch=r&&r.hoverSilentOnTouch;t.type==="group"?t.traverse(function(t){if(t.type!=="group"){Qs(t,e)}}):Qs(t,e);t.on("mouseover",tl).on("mouseout",el);t.on("emphasis",rl).on("normal",il)}function nl(t,e,r,i,a,n,o){a=a||Os;var s=a.labelFetcher;var l=a.labelDataIndex;var u=a.labelDimIndex;var h=r.getShallow("show");var f=i.getShallow("show");var c;if(h||f){if(s){c=s.getFormattedLabel(l,"normal",null,u)}if(c==null){c=V(a.defaultText)?a.defaultText(l,a):a.defaultText}}var v=h?c:null;var d=f?X(s?s.getFormattedLabel(l,"emphasis",null,u):null,c):null;if(v!=null||d!=null){ol(t,r,n,a);ol(e,i,o,a,true)}t.text=v;e.text=d}function ol(t,e,r,i,a){ll(t,e,i,a);r&&N(t,r);t.host&&t.host.dirty&&t.host.dirty(false);return t}function sl(t,e,r){var i={isRectText:true};var a;if(r===false){a=true}else{i.autoColor=r}ll(t,e,i,a);t.host&&t.host.dirty&&t.host.dirty(false)}function ll(t,e,r,i){r=r||Os;if(r.isRectText){var a=e.getShallow("position")||(i?null:"inside");a==="outside"&&(a="top");t.textPosition=a;t.textOffset=e.getShallow("offset");var n=e.getShallow("rotate");n!=null&&(n*=Math.PI/180);t.textRotation=n;t.textDistance=X(e.getShallow("distance"),i?null:5)}var o=e.ecModel;var s=o&&o.option.textStyle;var l=ul(e);var u;if(l){u={};for(var h in l){if(l.hasOwnProperty(h)){var f=e.getModel(["rich",h]);hl(u[h]={},f,s,r,i)}}}t.rich=u;hl(t,e,s,r,i,true);if(r.forceRich&&!r.textStyle){r.textStyle={}}return t}function ul(t){var e;while(t&&t!==t.ecModel){var r=(t.option||Os).rich;if(r){e=e||{};for(var i in r){if(r.hasOwnProperty(i)){e[i]=1}}}t=t.parentModel}return e}function hl(t,e,r,i,a,n){r=!a&&r||Os;t.textFill=fl(e.getShallow("color"),i)||r.color;t.textStroke=fl(e.getShallow("textBorderColor"),i)||r.textBorderColor;t.textStrokeWidth=X(e.getShallow("textBorderWidth"),r.textBorderWidth);if(!a){if(n){var o=t.textPosition;t.insideRollback=cl(t,o,i);t.insideOriginalTextPosition=o;t.insideRollbackOpt=i}if(t.textFill==null){t.textFill=i.autoColor}}t.fontStyle=e.getShallow("fontStyle")||r.fontStyle;t.fontWeight=e.getShallow("fontWeight")||r.fontWeight;t.fontSize=e.getShallow("fontSize")||r.fontSize;t.fontFamily=e.getShallow("fontFamily")||r.fontFamily;t.textAlign=e.getShallow("align");t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline");t.textLineHeight=e.getShallow("lineHeight");t.textWidth=e.getShallow("width");t.textHeight=e.getShallow("height");t.textTag=e.getShallow("tag");if(!n||!i.disableBox){t.textBackgroundColor=fl(e.getShallow("backgroundColor"),i);t.textPadding=e.getShallow("padding");t.textBorderColor=fl(e.getShallow("borderColor"),i);t.textBorderWidth=e.getShallow("borderWidth");t.textBorderRadius=e.getShallow("borderRadius");t.textBoxShadowColor=e.getShallow("shadowColor");t.textBoxShadowBlur=e.getShallow("shadowBlur");t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX");t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")}t.textShadowColor=e.getShallow("textShadowColor")||r.textShadowColor;t.textShadowBlur=e.getShallow("textShadowBlur")||r.textShadowBlur;t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||r.textShadowOffsetX;t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||r.textShadowOffsetY}function fl(t,e){return t!=="auto"?t:e&&e.autoColor?e.autoColor:null}function cl(t,e,r){var i=r.useInsideStyle;var a;if(t.textFill==null&&i!==false&&(i===true||r.isRectText&&e&&typeof e==="string"&&e.indexOf("inside")>=0)){a={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth};t.textFill="#fff";if(t.textStroke==null){t.textStroke=r.autoColor;t.textStrokeWidth==null&&(t.textStrokeWidth=2)}}return a}function vl(t){var e=t.insideRollback;if(e){t.textFill=e.textFill;t.textStroke=e.textStroke;t.textStrokeWidth=e.textStrokeWidth}}function dl(t,e){var r=e||e.getModel("textStyle");return J([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}function pl(t,e,r,i,a,n){if(typeof a==="function"){n=a;a=null}var o=i&&i.isAnimationEnabled();if(o){var s=t?"Update":"";var l=i.getShallow("animationDuration"+s);var u=i.getShallow("animationEasing"+s);var h=i.getShallow("animationDelay"+s);if(typeof h==="function"){h=h(a,i.getAnimationDelayParams?i.getAnimationDelayParams(e,a):null)}if(typeof l==="function"){l=l(a)}l>0?e.animateTo(r,l,h||0,u,n,!!n):(e.stopAnimation(),e.attr(r),n&&n())}else{e.stopAnimation();e.attr(r);n&&n()}}function gl(t,e,r,i,a){pl(true,t,e,r,i,a)}function ml(t,e,r,i,a){pl(false,t,e,r,i,a)}function yl(t,e){var r=jt([]);while(t&&t!==e){Yt(r,t.getLocalTransform(),r);t=t.parent}return r}function xl(t,e,r){if(e&&!O(e)){e=ae.getLocalTransform(e)}if(r){e=Jt([],e)}return Lt([],t,e)}function _l(t,e,r){var i=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]);var a=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]);var n=[t==="left"?-i:t==="right"?i:0,t==="top"?-a:t==="bottom"?a:0];n=xl(n,e,r);return Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function wl(t,e,i,r){if(!t||!e){return}function a(t){var e={};t.traverse(function(t){if(!t.isGroup&&t.anid){e[t.anid]=t}});return e}function n(t){var e={position:ht(t.position),rotation:t.rotation};if(t.shape){e.shape=N({},t.shape)}return e}var o=a(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var r=n(t);t.attr(n(e));gl(t,r,i,t.dataIndex)}}})}function bl(t,i){return T(t,function(t){var e=t[0];e=Ns(e,i.x);e=Es(e,i.x+i.width);var r=t[1];r=Ns(r,i.y);r=Es(r,i.y+i.height);return[e,r]})}function Sl(t,e){var r=Ns(t.x,e.x);var i=Es(t.x+t.width,e.x+e.width);var a=Ns(t.y,e.y);var n=Es(t.y+t.height,e.y+e.height);if(i>=r&&n>=a){return{x:r,y:a,width:i-r,height:n-a}}}function Ml(t,e,r){e=N({rectHover:true},e);var i=e.style={strokeNoScale:true};r=r||{x:-1,y:-1,width:2,height:2};if(t){return t.indexOf("image://")===0?(i.image=t.slice(8),C(i,r),new Bi(e)):Bs(t.replace("path://",""),e,r,"center")}}var Il=(Object.freeze||Object)({extendShape:zs,extendPath:Rs,makePath:Bs,makeImage:Vs,mergePath:Fs,resizePath:Ws,subPixelOptimizeLine:Hs,subPixelOptimizeRect:Zs,subPixelOptimize:Us,setHoverStyle:al,setLabelStyle:nl,setTextStyle:ol,setText:sl,getFont:dl,updateProps:gl,initProps:ml,getTransform:yl,applyTransform:xl,transformDirection:_l,groupTransition:wl,clipPointsByRect:bl,clipRectByRect:Sl,createIcon:Ml,Group:cr,Image:Bi,Text:ls,Circle:us,Sector:cs,Ring:vs,Polygon:ys,Polyline:xs,Rect:_s,Line:ws,BezierCurve:Ms,Arc:Is,IncrementalDisplayable:Ls,CompoundPath:Ds,LinearGradient:As,RadialGradient:Cs,BoundingRect:fr});var Dl=["textStyle","color"];var Tl={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Dl):null)},getFont:function(){return dl({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Jr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}};var Al=pn([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]);var Cl={getItemStyle:function(t,e){var r=Al(this,t,e);var i=this.getBorderLineDash();i&&(r.lineDash=i);return r},getBorderLineDash:function(){var t=this.get("borderType");return t==="solid"||t==null?null:t==="dashed"?[5,5]:[1,1]}};var Ll=I;var kl=Ja();function Pl(t,e,r){this.parentModel=e;this.ecModel=r;this.option=t}Pl.prototype={constructor:Pl,init:null,mergeOption:function(t){y(this.option,t,true)},get:function(t,e){if(t==null){return this.option}return Nl(this.option,this.parsePath(t),!e&&El(this,t))},getShallow:function(t,e){var r=this.option;var i=r==null?r:r[t];var a=!e&&El(this,t);if(i==null&&a){i=a.getShallow(t)}return i},getModel:function(t,e){var r=t==null?this.option:Nl(this.option,t=this.parsePath(t));var i;e=e||(i=El(this,t))&&i.getModel(t);return new Pl(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(P(this.option))},setReadOnly:function(t){},parsePath:function(t){if(typeof t==="string"){t=t.split(".")}return t},customizeGetParent:function(t){kl(this).getParent=t},isAnimationEnabled:function(){if(!m.node){if(this.option.animation!=null){return!!this.option.animation}else if(this.parentModel){return this.parentModel.isAnimationEnabled()}}}};function Nl(t,e,r){for(var i=0;i<e.length;i++){if(!e[i]){continue}t=t&&typeof t==="object"?t[e[i]]:null;if(t==null){break}}if(t==null&&r){t=r.get(e)}return t}function El(t,e){var r=kl(t).getParent;return r?r.call(t,e):t.parentModel}un(Pl);fn(Pl);Ll(Pl,mn);Ll(Pl,xn);Ll(Pl,Tl);Ll(Pl,Cl);var Ol=0;function zl(t){return[t||"",Ol++,Math.random().toFixed(5)].join("_")}function Rl(a){var n={};a.registerSubTypeDefaulter=function(t,e){t=sn(t);n[t.main]=e};a.determineSubType=function(t,e){var r=e.type;if(!r){var i=sn(t).main;if(a.hasSubTypes(t)&&n[i]){r=n[i](e)}}return r};return a}function Bl(t,s){t.topologicalTravel=function(t,e,r,i){if(!t.length){return}var a=v(e);var n=a.graph;var o=a.noEntryList;var s={};L(t,function(t){s[t]=true});while(o.length){var l=o.pop();var u=n[l];var h=!!s[l];if(h){r.call(i,l,u.originalDeps.slice());delete s[l]}L(u.successor,h?c:f)}L(s,function(){throw new Error("Circle dependency may exists")});function f(t){n[t].entryCount--;if(n[t].entryCount===0){o.push(t)}}function c(t){s[t]=true;f(t)}};function v(a){var n={};var o=[];L(a,function(r){var i=l(n,r);var t=i.originalDeps=s(r);var e=u(t,a);i.entryCount=e.length;if(i.entryCount===0){o.push(r)}L(e,function(t){if(S(i.predecessor,t)<0){i.predecessor.push(t)}var e=l(n,t);if(S(e.successor,t)<0){e.successor.push(r)}})});return{graph:n,noEntryList:o}}function l(t,e){if(!t[e]){t[e]={predecessor:[],successor:[]}}return t[e]}function u(t,e){var r=[];L(t,function(t){S(e,t)>=0&&r.push(t)});return r}}var Vl=1e-4;function Gl(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function Fl(t,e,r,i){var a=e[1]-e[0];var n=r[1]-r[0];if(a===0){return n===0?r[0]:(r[0]+r[1])/2}if(i){if(a>0){if(t<=e[0]){return r[0]}else if(t>=e[1]){return r[1]}}else{if(t>=e[0]){return r[0]}else if(t<=e[1]){return r[1]}}}else{if(t===e[0]){return r[0]}if(t===e[1]){return r[1]}}return(t-e[0])/a*n+r[0]}function Wl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}if(typeof t==="string"){if(Gl(t).match(/%$/)){return parseFloat(t)/100*e}return parseFloat(t)}return t==null?NaN:+t}function Hl(t,e,r){if(e==null){e=10}e=Math.min(Math.max(0,e),20);t=(+t).toFixed(e);return r?t:+t}function Zl(t){t.sort(function(t,e){return t-e});return t}function Ul(t){t=+t;if(isNaN(t)){return 0}var e=1;var r=0;while(Math.round(t*e)/e!==t){e*=10;r++}return r}function jl(t){var e=t.toString();var r=e.indexOf("e");if(r>0){var i=+e.slice(r+1);return i<0?-i:0}else{var a=e.indexOf(".");return a<0?0:e.length-1-a}}function Xl(t,e){var r=Math.log;var i=Math.LN10;var a=Math.floor(r(t[1]-t[0])/i);var n=Math.round(r(Math.abs(e[1]-e[0]))/i);var o=Math.min(Math.max(-a+n,0),20);return!isFinite(o)?20:o}function Yl(t,e,r){if(!t[e]){return 0}var i=D(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(i===0){return 0}var a=Math.pow(10,r);var n=T(t,function(t){return(isNaN(t)?0:t)/i*a*100});var o=a*100;var s=T(n,function(t){return Math.floor(t)});var l=D(s,function(t,e){return t+e},0);var u=T(n,function(t,e){return t-s[e]});while(l<o){var h=Number.NEGATIVE_INFINITY;var f=null;for(var c=0,v=u.length;c<v;++c){if(u[c]>h){h=u[c];f=c}}++s[f];u[f]=0;++l}return s[e]/a}var ql=9007199254740991;function $l(t){var e=Math.PI*2;return(t%e+e)%e}function Kl(t){return t>-Vl&&t<Vl}var Jl=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ql(t){if(t instanceof Date){return t}else if(typeof t==="string"){var e=Jl.exec(t);if(!e){return new Date(NaN)}if(!e[8]){return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}else{var r=+e[4]||0;if(e[8].toUpperCase()!=="Z"){r-=e[8].slice(0,3)}return new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,+e[7]||0))}}else if(t==null){return new Date(NaN)}return new Date(Math.round(t))}function tu(t){return Math.pow(10,eu(t))}function eu(t){return Math.floor(Math.log(t)/Math.LN10)}function ru(t,e){var r=eu(t);var i=Math.pow(10,r);var a=t/i;var n;if(e){if(a<1.5){n=1}else if(a<2.5){n=2}else if(a<4){n=3}else if(a<7){n=5}else{n=10}}else{if(a<1){n=1}else if(a<2){n=2}else if(a<3){n=3}else if(a<5){n=5}else{n=10}}t=n*i;return r>=-20?+t.toFixed(r<0?-r:0):t}function iu(t){t.sort(function(t,e){return s(t,e,0)?-1:1});var e=-Infinity;var r=1;for(var i=0;i<t.length;){var a=t[i].interval;var n=t[i].close;for(var o=0;o<2;o++){if(a[o]<=e){a[o]=e;n[o]=!o?1-r:1}e=a[o];r=n[o]}if(a[0]===a[1]&&n[0]*n[1]!==1){t.splice(i,1)}else{i++}}return t;function s(t,e,r){return t.interval[r]<e.interval[r]||t.interval[r]===e.interval[r]&&(t.close[r]-e.close[r]===(!r?1:-1)||!r&&s(t,e,1))}}function au(t){return t-parseFloat(t)>=0}var nu=(Object.freeze||Object)({linearMap:Fl,parsePercent:Wl,round:Hl,asc:Zl,getPrecision:Ul,getPrecisionSafe:jl,getPixelPrecision:Xl,getPercentWithPrecision:Yl,MAX_SAFE_INTEGER:ql,remRadian:$l,isRadianAroundZero:Kl,parseDate:Ql,quantity:tu,nice:ru,reformIntervals:iu,isNumeric:au});function ou(t){if(isNaN(t)){return"-"}t=(t+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function su(t,e){t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()});if(e&&t){t=t.charAt(0).toUpperCase()+t.slice(1)}return t}var lu=$;function uu(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var hu=["a","b","c","d","e","f","g"];var fu=function(t,e){return"{"+t+(e==null?"":e)+"}"};function cu(t,e,r){if(!B(e)){e=[e]}var i=e.length;if(!i){return""}var a=e[0].$vars||[];for(var n=0;n<a.length;n++){var o=hu[n];t=t.replace(fu(o),fu(o,0))}for(var s=0;s<i;s++){for(var l=0;l<a.length;l++){var u=e[s][a[l]];t=t.replace(fu(hu[l],s),r?uu(u):u)}}return t}function vu(r,t,i){L(t,function(t,e){r=r.replace("{"+e+"}",i?uu(t):t)});return r}function du(t,e){t=G(t)?{color:t,extraCssText:e}:t||{};var r=t.color;var i=t.type;var e=t.extraCssText;if(!r){return""}return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;'+"border-radius:4px;width:4px;height:4px;background-color:"+uu(r)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;'+"border-radius:10px;width:10px;height:10px;background-color:"+uu(r)+";"+(e||"")+'"></span>'}function pu(t,e){t+="";return"0000".substr(0,e-t.length)+t}function gu(t,e,r){if(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year"){t="MM-dd\nyyyy"}var i=Ql(e);var a=r?"UTC":"";var n=i["get"+a+"FullYear"]();var o=i["get"+a+"Month"]()+1;var s=i["get"+a+"Date"]();var l=i["get"+a+"Hours"]();var u=i["get"+a+"Minutes"]();var h=i["get"+a+"Seconds"]();var f=i["get"+a+"Milliseconds"]();t=t.replace("MM",pu(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",pu(s,2)).replace("d",s).replace("hh",pu(l,2)).replace("h",l).replace("mm",pu(u,2)).replace("m",u).replace("ss",pu(h,2)).replace("s",h).replace("SSS",pu(f,3));return t}function mu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var yu=ai;var xu=Jr;var _u=(Object.freeze||Object)({addCommas:ou,toCamelCase:su,normalizeCssArray:lu,encodeHTML:uu,formatTpl:cu,formatTplSimple:vu,getTooltipMarker:du,formatTime:gu,capitalFirst:mu,truncateText:yu,getTextRect:xu});var wu=L;var bu=["left","right","top","bottom","width","height"];var Su=[["width","left","right"],["height","top","bottom"]];function Mu(h,f,c,v,d){var p=0;var g=0;if(v==null){v=Infinity}if(d==null){d=Infinity}var m=0;f.eachChild(function(t,e){var r=t.position;var i=t.getBoundingRect();var a=f.childAt(e+1);var n=a&&a.getBoundingRect();var o;var s;if(h==="horizontal"){var l=i.width+(n?-n.x+i.x:0);o=p+l;if(o>v||t.newline){p=0;o=l;g+=m+c;m=i.height}else{m=Math.max(m,i.height)}}else{var u=i.height+(n?-n.y+i.y:0);s=g+u;if(s>d||t.newline){p+=m+c;g=0;s=u;m=i.width}else{m=Math.max(m,i.width)}}if(t.newline){return}r[0]=p;r[1]=g;h==="horizontal"?p=o+c:g=s+c})}var Iu=Mu;var Du=R(Mu,"vertical");var Tu=R(Mu,"horizontal");function Au(t,e,r){var i=e.width;var a=e.height;var n=Wl(t.x,i);var o=Wl(t.y,a);var s=Wl(t.x2,i);var l=Wl(t.y2,a);(isNaN(n)||isNaN(parseFloat(t.x)))&&(n=0);(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=i);(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0);(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a);r=lu(r||0);return{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function Cu(t,e,r){r=lu(r||0);var i=e.width;var a=e.height;var n=Wl(t.left,i);var o=Wl(t.top,a);var s=Wl(t.right,i);var l=Wl(t.bottom,a);var u=Wl(t.width,i);var h=Wl(t.height,a);var f=r[2]+r[0];var c=r[1]+r[3];var v=t.aspect;if(isNaN(u)){u=i-s-c-n}if(isNaN(h)){h=a-l-f-o}if(v!=null){if(isNaN(u)&&isNaN(h)){if(v>i/a){u=i*.8}else{h=a*.8}}if(isNaN(u)){u=v*h}if(isNaN(h)){h=u/v}}if(isNaN(n)){n=i-s-u-c}if(isNaN(o)){o=a-l-h-f}switch(t.left||t.right){case"center":n=i/2-u/2-r[3];break;case"right":n=i-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=a/2-h/2-r[0];break;case"bottom":o=a-h-f;break}n=n||0;o=o||0;if(isNaN(u)){u=i-c-n-(s||0)}if(isNaN(h)){h=a-f-o-(l||0)}var d=new fr(n+r[3],o+r[0],u,h);d.margin=r;return d}function Lu(t,e,r,i,a){var n=!a||!a.hv||a.hv[0];var o=!a||!a.hv||a.hv[1];var s=a&&a.boundingMode||"all";if(!n&&!o){return}var l;if(s==="raw"){l=t.type==="group"?new fr(0,0,+e.width||0,+e.height||0):t.getBoundingRect()}else{l=t.getBoundingRect();if(t.needLocalTransform()){var u=t.getLocalTransform();l=l.clone();l.applyTransform(u)}}e=Cu(C({width:l.width,height:l.height},e),r,i);var h=t.position;var f=n?e.x-l.x:0;var c=o?e.y-l.y:0;t.attr("position",s==="raw"?[f,c]:[h[0]+f,h[1]+c])}function ku(t,e){return t[Su[e][0]]!=null||t[Su[e][1]]!=null&&t[Su[e][2]]!=null}function Pu(u,h,t){!F(t)&&(t={});var f=t.ignoreSize;!B(f)&&(f=[f,f]);var e=i(Su[0],0);var r=i(Su[1],1);a(Su[0],u,e);a(Su[1],u,r);function i(t,e){var r={};var i=0;var a={};var n=0;var o=2;wu(t,function(t){a[t]=u[t]});wu(t,function(t){c(h,t)&&(r[t]=a[t]=h[t]);v(r,t)&&i++;v(a,t)&&n++});if(f[e]){if(v(h,t[1])){a[t[2]]=null}else if(v(h,t[2])){a[t[1]]=null}return a}if(n===o||!i){return a}else if(i>=o){return r}else{for(var s=0;s<t.length;s++){var l=t[s];if(!c(r,l)&&c(u,l)){r[l]=u[l];break}}return r}}function c(t,e){return t.hasOwnProperty(e)}function v(t,e){return t[e]!=null&&t[e]!=="auto"}function a(t,e,r){wu(t,function(t){e[t]=r[t]})}}function Nu(t){return Eu({},t)}function Eu(e,r){r&&e&&wu(bu,function(t){r.hasOwnProperty(t)&&(e[t]=r[t])});return e}var Ou={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}};var zu=Ja();var Ru=Pl.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,r,i){Pl.call(this,t,e,r,i);this.uid=zl("ec_cpt_model")},init:function(t,e,r,i){this.mergeDefaultAndTheme(t,r)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode;var i=r?Nu(t):{};var a=e.getTheme();y(t,a.get(this.mainType));y(t,this.getDefaultOption());if(r){Pu(t,i,r)}},mergeOption:function(t,e){y(this.option,t,true);var r=this.layoutMode;if(r){Pu(this.option,t,r)}},optionUpdated:function(t,e){},getDefaultOption:function(){var t=zu(this);if(!t.defaultOption){var e=[];var r=this.constructor;while(r){var i=r.prototype.defaultOption;i&&e.push(i);r=r.superClass}var a={};for(var n=e.length-1;n>=0;n--){a=y(a,e[n],true)}t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",true),id:this.get(t+"Id",true)})}});dn(Ru,{registerWhenExtend:true});Rl(Ru);Bl(Ru,Bu);function Bu(t){var e=[];L(Ru.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])});e=T(e,function(t){return sn(t).main});if(t!=="dataset"&&S(e,"dataset")<=0){e.unshift("dataset")}return e}I(Ru,Ou);var Vu="";if(typeof navigator!=="undefined"){Vu=navigator.platform||""}var Gu={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Vu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:false};var Fu=Ja();function Wu(t,e){var r=t.length;for(var i=0;i<r;i++){if(t[i].length>e){return t[i]}}return t[r-1]}var Hu={clearColorPalette:function(){Fu(this).colorIdx=0;Fu(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var i=Fu(e);var a=i.colorIdx||0;var n=i.colorNameMap=i.colorNameMap||{};if(n.hasOwnProperty(t)){return n[t]}var o=Fa(this.get("color",true));var s=this.get("colorLayer",true);var l=r==null||!s?o:Wu(s,r);l=l||o;if(!l||!l.length){return}var u=l[a];if(t){n[t]=u}i.colorIdx=(a+1)%l.length;return u}};function Zu(t){var e=t.get("coordinateSystem");var r={coordSysName:e,coordSysDims:[],axisMap:it(),categoryAxisMap:it()};var i=Uu[e];if(i){i(t,r,r.axisMap,r.categoryAxisMap);return r}}var Uu={cartesian2d:function(t,e,r,i){var a=t.getReferringComponents("xAxis")[0];var n=t.getReferringComponents("yAxis")[0];if(A){if(!a){throw new Error('xAxis "'+j(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found')}if(!n){throw new Error('yAxis "'+j(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}}e.coordSysDims=["x","y"];r.set("x",a);r.set("y",n);if(ju(a)){i.set("x",a);e.firstCategoryDimIndex=0}if(ju(n)){i.set("y",n);e.firstCategoryDimIndex=1}},singleAxis:function(t,e,r,i){var a=t.getReferringComponents("singleAxis")[0];if(A){if(!a){throw new Error("singleAxis should be specified.")}}e.coordSysDims=["single"];r.set("single",a);if(ju(a)){i.set("single",a);e.firstCategoryDimIndex=0}},polar:function(t,e,r,i){var a=t.getReferringComponents("polar")[0];var n=a.findAxisModel("radiusAxis");var o=a.findAxisModel("angleAxis");if(A){if(!o){throw new Error("angleAxis option not found")}if(!n){throw new Error("radiusAxis option not found")}}e.coordSysDims=["radius","angle"];r.set("radius",n);r.set("angle",o);if(ju(n)){i.set("radius",n);e.firstCategoryDimIndex=0}if(ju(o)){i.set("angle",o);e.firstCategoryDimIndex=1}},geo:function(t,e,r,i){e.coordSysDims=["lng","lat"]},parallel:function(t,a,n,o){var s=t.ecModel;var e=s.getComponent("parallel",t.get("parallelIndex"));var l=a.coordSysDims=e.dimensions.slice();L(e.parallelAxisIndex,function(t,e){var r=s.getComponent("parallelAxis",t);var i=l[e];n.set(i,r);if(ju(r)&&a.firstCategoryDimIndex==null){o.set(i,r);a.firstCategoryDimIndex=e}})}};function ju(t){return t.get("type")==="category"}var Xu="original";var Yu="arrayRows";var qu="objectRows";var $u="keyedColumns";var Ku="unknown";var Ju="typedArray";var Qu="column";var th="row";function eh(t){this.fromDataset=t.fromDataset;this.data=t.data||(t.sourceFormat===$u?{}:[]);this.sourceFormat=t.sourceFormat||Ku;this.seriesLayoutBy=t.seriesLayoutBy||Qu;this.dimensionsDefine=t.dimensionsDefine;this.encodeDefine=t.encodeDefine&&it(t.encodeDefine);this.startIndex=t.startIndex||0;this.dimensionsDetectCount=t.dimensionsDetectCount}eh.seriesDataToSource=function(t){return new eh({data:t,sourceFormat:H(t)?Ju:Xu,fromDataset:false})};fn(eh);var rh=Ja();function ih(t){var e=t.option.source;var r=Ku;if(H(e)){r=Ju}else if(B(e)){for(var i=0,a=e.length;i<a;i++){var n=e[i];if(n==null){continue}else if(B(n)){r=Yu;break}else if(F(n)){r=qu;break}}}else if(F(e)){for(var o in e){if(e.hasOwnProperty(o)&&O(e[o])){r=$u;break}}}else if(e!=null){throw new Error("Invalid data")}rh(t).sourceFormat=r}function ah(t){return rh(t).source}function nh(t){rh(t).datasetMap=it()}function oh(t){var e=t.option;var r=e.data;var i=H(r)?Ju:Xu;var a=false;var n=e.seriesLayoutBy;var o=e.sourceHeader;var s=e.dimensions;var l=ch(t);if(l){var u=l.option;r=u.source;i=rh(l).sourceFormat;a=true;n=n||u.seriesLayoutBy;o==null&&(o=u.sourceHeader);s=s||u.dimensions}var h=sh(r,i,n,o,s);var f=e.encode;if(!f&&l){f=fh(t,l,r,i,n,h)}rh(t).source=new eh({data:r,fromDataset:a,seriesLayoutBy:n,sourceFormat:i,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:f})}function sh(t,e,r,i,a){if(!t){return{dimensionsDefine:lh(a)}}var n;var o;var s;if(e===Yu){if(i==="auto"||i==null){uh(function(t){if(t!=null&&t!=="-"){if(G(t)){o==null&&(o=1)}else{o=0}}},r,t,10)}else{o=i?1:0}if(!a&&o===1){a=[];uh(function(t,e){a[e]=t!=null?t:""},r,t)}n=a?a.length:r===th?t.length:t[0]?t[0].length:null}else if(e===qu){if(!a){a=hh(t);s=true}}else if(e===$u){if(!a){a=[];s=true;L(t,function(t,e){a.push(e)})}}else if(e===Xu){var l=Za(t[0]);n=B(l)&&l.length||1}else if(e===Ju){if(A){K(!!a,"dimensions must be given if data is TypedArray.")}}var u;if(s){L(a,function(t,e){if((F(t)?t.name:t)==="name"){u=e}})}return{startIndex:o,dimensionsDefine:lh(a),dimensionsDetectCount:n,potentialNameDimIndex:u}}function lh(t){if(!t){return}var i=it();return T(t,function(t,e){t=N({},F(t)?t:{name:t});if(t.name==null){return t}t.name+="";if(t.displayName==null){t.displayName=t.name}var r=i.get(t.name);if(!r){i.set(t.name,{count:1})}else{t.name+="-"+r.count++}return t})}function uh(t,e,r,i){i==null&&(i=Infinity);if(e===th){for(var a=0;a<r.length&&a<i;a++){t(r[a]?r[a][0]:null,a)}}else{var n=r[0]||[];for(var a=0;a<n.length&&a<i;a++){t(n[a],a)}}}function hh(t){var e=0;var r;while(e<t.length&&!(r=t[e++])){}if(r){var i=[];L(r,function(t,e){i.push(e)});return i}}function fh(t,e,r,i,a,n){var o=Zu(t);var s={};var l=[];var u=[];var h=t.subType;var f=it(["pie","map","funnel"]);var c=it(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(o&&c.get(h)!=null){var v=t.ecModel;var d=rh(v).datasetMap;var p=e.uid+"_"+a;var g=d.get(p)||d.set(p,{categoryWayDim:1,valueWayDim:0});L(o.coordSysDims,function(t){if(o.firstCategoryDimIndex==null){var e=g.valueWayDim++;s[t]=e;u.push(e)}else if(o.categoryAxisMap.get(t)){s[t]=0;l.push(0)}else{var e=g.categoryWayDim++;s[t]=e;u.push(e)}})}else if(f.get(h)!=null){var m;for(var y=0;y<5&&m==null;y++){if(!dh(r,i,a,n.dimensionsDefine,n.startIndex,y)){m=y}}if(m!=null){s.value=m;var x=n.potentialNameDimIndex||Math.max(m-1,0);u.push(x);l.push(x)}}l.length&&(s.itemName=l);u.length&&(s.seriesName=u);return s}function ch(t){var e=t.option;var r=e.data;if(!r){return t.ecModel.getComponent("dataset",e.datasetIndex||0)}}function vh(t,e){return dh(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function dh(t,e,r,i,a,n){var o;var s=5;if(H(t)){return false}var l;if(i){l=i[n];l=F(l)?l.name:l}if(e===Yu){if(r===th){var u=t[n];for(var h=0;h<(u||[]).length&&h<s;h++){if((o=d(u[a+h]))!=null){return o}}}else{for(var h=0;h<t.length&&h<s;h++){var f=t[a+h];if(f&&(o=d(f[n]))!=null){return o}}}}else if(e===qu){if(!l){return}for(var h=0;h<t.length&&h<s;h++){var c=t[h];if(c&&(o=d(c[l]))!=null){return o}}}else if(e===$u){if(!l){return}var u=t[l];if(!u||H(u)){return false}for(var h=0;h<u.length&&h<s;h++){if((o=d(u[h]))!=null){return o}}}else if(e===Xu){for(var h=0;h<t.length&&h<s;h++){var c=t[h];var v=Za(c);if(!B(v)){return false}if((o=d(v[n]))!=null){return o}}}function d(t){if(t!=null&&isFinite(t)&&t!==""){return false}else if(G(t)&&t!=="-"){return true}}return false}var ph="\0_ec_inner";var gh=Pl.extend({constructor:gh,init:function(t,e,r,i){r=r||{};this.option=null;this._theme=new Pl(r);this._optionManager=i},setOption:function(t,e){K(!(ph in t),"please use chart.getOption()");this._optionManager.setOption(t,e);this.resetOption(null)},resetOption:function(t){var e=false;var r=this._optionManager;if(!t||t==="recreate"){var i=r.mountOption(t==="recreate");if(!this.option||t==="recreate"){xh.call(this,i)}else{this.restoreData();this.mergeOption(i)}e=true}if(t==="timeline"||t==="media"){this.restoreData()}if(!t||t==="recreate"||t==="timeline"){var a=r.getTimelineOption(this);a&&(this.mergeOption(a),e=true)}if(!t||t==="recreate"||t==="media"){var n=r.getMediaOption(this,this._api);if(n.length){L(n,function(t){this.mergeOption(t,e=true)},this)}}return e},mergeOption:function(i){var l=this.option;var u=this._componentsMap;var r=[];nh(this);L(i,function(t,e){if(t==null){return}if(!Ru.hasClass(e)){l[e]=l[e]==null?P(t):y(l[e],t,true)}else if(e){r.push(e)}});Ru.topologicalTravel(r,Ru.getAllClassMainTypes(),t,this);function t(o,t){var e=Fa(i[o]);var r=ja(u.get(o),e);Xa(r);L(r,function(t,e){var r=t.option;if(F(r)){t.keyInfo.mainType=o;t.keyInfo.subType=wh(o,r,t.exist)}});var s=_h(u,t);l[o]=[];u.set(o,[]);L(r,function(t,e){var r=t.exist;var i=t.option;K(F(i)||r,"Empty component definition");if(!i){r.mergeOption({},this);r.optionUpdated({},false)}else{var a=Ru.getClass(o,t.keyInfo.subType,true);if(r&&r instanceof a){r.name=t.keyInfo.name;r.mergeOption(i,this);r.optionUpdated(i,false)}else{var n=N({dependentModels:s,componentIndex:e},t.keyInfo);r=new a(i,this,this,n);N(r,n);r.init(i,this,this,n);r.optionUpdated(null,true)}}u.get(o)[e]=r;l[o][e]=r.option},this);if(o==="series"){bh(this,u.get("series"))}}this._seriesIndicesMap=it(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=P(this.option);L(i,function(t,e){if(Ru.hasClass(e)){var t=Fa(t);for(var r=t.length-1;r>=0;r--){if(qa(t[r])){t.splice(r,1)}}i[e]=t}});delete i[ph];return i},getTheme:function(){return this._theme},getComponent:function(t,e){var r=this._componentsMap.get(t);if(r){return r[e||0]}},queryComponents:function(t){var e=t.mainType;if(!e){return[]}var r=t.index;var i=t.id;var a=t.name;var n=this._componentsMap.get(e);if(!n||!n.length){return[]}var o;if(r!=null){if(!B(r)){r=[r]}o=k(T(r,function(t){return n[t]}),function(t){return!!t})}else if(i!=null){var s=B(i);o=k(n,function(t){return s&&S(i,t.id)>=0||!s&&t.id===i})}else if(a!=null){var l=B(a);o=k(n,function(t){return l&&S(a,t.name)>=0||!l&&t.name===a})}else{o=n.slice()}return Sh(o,t)},findComponents:function(e){var t=e.query;var a=e.mainType;var r=n(t);var i=r?this.queryComponents(r):this._componentsMap.get(a);return o(Sh(i,e));function n(t){var e=a+"Index";var r=a+"Id";var i=a+"Name";return t&&(t[e]!=null||t[r]!=null||t[i]!=null)?{mainType:a,index:t[e],id:t[r],name:t[i]}:null}function o(t){return e.filter?k(t,e.filter):t}},eachComponent:function(t,i,a){var e=this._componentsMap;if(typeof t==="function"){a=i;i=t;e.each(function(t,r){L(t,function(t,e){i.call(a,r,t,e)})})}else if(G(t)){L(e.get(t),i,a)}else if(F(t)){var r=this.findComponents(t);L(r,i,a)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return k(t,function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return k(t,function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(r,i){Mh(this);L(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];r.call(i,e,t)},this)},eachRawSeries:function(t,e){L(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(r,i,a){Mh(this);L(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];if(e.subType===r){i.call(a,e,t)}},this)},eachRawSeriesByType:function(t,e,r){return L(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){Mh(this);return this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Mh(this);var r=k(this._componentsMap.get("series"),t,e);bh(this,r)},restoreData:function(r){var i=this._componentsMap;bh(this,i.get("series"));var a=[];i.each(function(t,e){a.push(e)});Ru.topologicalTravel(a,Ru.getAllClassMainTypes(),function(e,t){L(i.get(e),function(t){(e!=="series"||!mh(t,r))&&t.restoreData()})})}});function mh(t,e){if(e){var r=e.seiresIndex;var i=e.seriesId;var a=e.seriesName;return r!=null&&t.componentIndex!==r||i!=null&&t.id!==i||a!=null&&t.name!==a}}function yh(r,t){var i=r.color&&!r.colorLayer;L(t,function(t,e){if(e==="colorLayer"&&i){return}if(!Ru.hasClass(e)){if(typeof t==="object"){r[e]=!r[e]?P(t):y(r[e],t,false)}else{if(r[e]==null){r[e]=t}}}})}function xh(t){t=t;this.option={};this.option[ph]=1;this._componentsMap=it({series:[]});this._seriesIndices;this._seriesIndicesMap;yh(t,this._theme.option);y(t,Gu,false);this.mergeOption(t)}function _h(e,t){if(!B(t)){t=t?[t]:[]}var r={};L(t,function(t){r[t]=(e.get(t)||[]).slice()});return r}function wh(t,e,r){var i=e.type?e.type:r?r.subType:Ru.determineSubType(t,e);return i}function bh(t,e){t._seriesIndicesMap=it(t._seriesIndices=T(e,function(t){return t.componentIndex})||[])}function Sh(t,e){return e.hasOwnProperty("subType")?k(t,function(t){return t.subType===e.subType}):t}function Mh(t){if(A){if(!t._seriesIndices){throw new Error("Option should contains series.")}}}I(gh,Hu);var Ih=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Dh(e){L(Ih,function(t){this[t]=z(e[t],e)},this)}var Th={};function Ah(){this._coordinateSystems=[]}Ah.prototype={constructor:Ah,create:function(i,a){var n=[];L(Th,function(t,e){var r=t.create(i,a);n=n.concat(r||[])});this._coordinateSystems=n},update:function(e,r){L(this._coordinateSystems,function(t){t.update&&t.update(e,r)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}};Ah.register=function(t,e){Th[t]=e};Ah.get=function(t){return Th[t]};var Ch=L;var Lh=P;var kh=T;var Ph=y;var Nh=/^(min|max)?(.+)$/;function Eh(t){this._api=t;this._timelineOptions=[];this._mediaList=[];this._mediaDefault;this._currentMediaIndices=[];this._optionBackup;this._newBaseOption}Eh.prototype={constructor:Eh,setOption:function(t,e){if(t){L(Fa(t.series),function(t){t&&t.data&&H(t.data)&&tt(t.data)})}t=Lh(t,true);var r=this._optionBackup;var i=Oh.call(this,t,e,!r);this._newBaseOption=i.baseOption;if(r){Vh(r.baseOption,i.baseOption);if(i.timelineOptions.length){r.timelineOptions=i.timelineOptions}if(i.mediaList.length){r.mediaList=i.mediaList}if(i.mediaDefault){r.mediaDefault=i.mediaDefault}}else{this._optionBackup=i}},mountOption:function(t){var e=this._optionBackup;this._timelineOptions=kh(e.timelineOptions,Lh);this._mediaList=kh(e.mediaList,Lh);this._mediaDefault=Lh(e.mediaDefault);this._currentMediaIndices=[];return Lh(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e;var r=this._timelineOptions;if(r.length){var i=t.getComponent("timeline");if(i){e=Lh(r[i.getCurrentIndex()],true)}}return e},getMediaOption:function(t){var e=this._api.getWidth();var r=this._api.getHeight();var i=this._mediaList;var a=this._mediaDefault;var n=[];var o=[];if(!i.length&&!a){return o}for(var s=0,l=i.length;s<l;s++){if(zh(i[s].query,e,r)){n.push(s)}}if(!n.length&&a){n=[-1]}if(n.length&&!Bh(n,this._currentMediaIndices)){o=kh(n,function(t){return Lh(t===-1?a.option:i[t].option)})}this._currentMediaIndices=n;return o}};function Oh(t,r,i){var e=[];var a=[];var n;var o;var s=t.timeline;if(t.baseOption){o=t.baseOption}if(s||t.options){o=o||{};e=(t.options||[]).slice()}if(t.media){o=o||{};var l=t.media;Ch(l,function(t){if(t&&t.option){if(t.query){a.push(t)}else if(!n){n=t}}})}if(!o){o=t}if(!o.timeline){o.timeline=s}Ch([o].concat(e).concat(T(a,function(t){return t.option})),function(e){Ch(r,function(t){t(e,i)})});return{baseOption:o,timelineOptions:e,mediaDefault:n,mediaList:a}}function zh(t,e,r){var n={width:e,height:r,aspectratio:e/r};var o=true;L(t,function(t,e){var r=e.match(Nh);if(!r||!r[1]||!r[2]){return}var i=r[1];var a=r[2].toLowerCase();if(!Rh(n[a],t,i)){o=false}});return o}function Rh(t,e,r){if(r==="min"){return t>=e}else if(r==="max"){return t<=e}else{return t===e}}function Bh(t,e){return t.join(",")===e.join(",")}function Vh(a,t){t=t||{};Ch(t,function(t,e){if(t==null){return}var r=a[e];if(!Ru.hasClass(e)){a[e]=Ph(r,t,true)}else{t=Fa(t);r=Fa(r);var i=ja(r,t);a[e]=kh(i,function(t){return t.option&&t.exist?Ph(t.exist,t.option,true):t.exist||t.option})}})}var Gh=L;var Fh=F;var Wh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Hh(t){var e=t&&t.itemStyle;if(!e){return}for(var r=0,i=Wh.length;r<i;r++){var a=Wh[r];var n=e.normal;var o=e.emphasis;if(n&&n[a]){t[a]=t[a]||{};if(!t[a].normal){t[a].normal=n[a]}else{y(t[a].normal,n[a])}n[a]=null}if(o&&o[a]){t[a]=t[a]||{};if(!t[a].emphasis){t[a].emphasis=o[a]}else{y(t[a].emphasis,o[a])}o[a]=null}}}function Zh(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal;var a=t[e].emphasis;if(i){if(r){t[e].normal=t[e].emphasis=null;C(t[e],i)}else{t[e]=i}}if(a){t.emphasis=t.emphasis||{};t.emphasis[e]=a}}}function Uh(t){Zh(t,"itemStyle");Zh(t,"lineStyle");Zh(t,"areaStyle");Zh(t,"label");Zh(t,"labelLine");Zh(t,"upperLabel");Zh(t,"edgeLabel")}function jh(t,e){var r=Fh(t)&&t[e];var i=Fh(r)&&r.textStyle;if(i){for(var a=0,n=Ha.length;a<n;a++){var e=Ha[a];if(i.hasOwnProperty(e)){r[e]=i[e]}}}}function Xh(t){if(t){Uh(t);jh(t,"label");t.emphasis&&jh(t.emphasis,"label")}}function Yh(t){if(!Fh(t)){return}Hh(t);Uh(t);jh(t,"label");jh(t,"upperLabel");jh(t,"edgeLabel");if(t.emphasis){jh(t.emphasis,"label");jh(t.emphasis,"upperLabel");jh(t.emphasis,"edgeLabel")}var e=t.markPoint;if(e){Hh(e);Xh(e)}var r=t.markLine;if(r){Hh(r);Xh(r)}var i=t.markArea;if(i){Xh(i)}var a=t.data;if(t.type==="graph"){a=a||t.nodes;var n=t.links||t.edges;if(n&&!H(n)){for(var o=0;o<n.length;o++){Xh(n[o])}}L(t.categories,function(t){Uh(t)})}if(a&&!H(a)){for(var o=0;o<a.length;o++){Xh(a[o])}}var e=t.markPoint;if(e&&e.data){var s=e.data;for(var o=0;o<s.length;o++){Xh(s[o])}}var r=t.markLine;if(r&&r.data){var l=r.data;for(var o=0;o<l.length;o++){if(B(l[o])){Xh(l[o][0]);Xh(l[o][1])}else{Xh(l[o])}}}if(t.type==="gauge"){jh(t,"axisLabel");jh(t,"title");jh(t,"detail")}else if(t.type==="treemap"){Zh(t.breadcrumb,"itemStyle");L(t.levels,function(t){Uh(t)})}}function qh(t){return B(t)?t:t?[t]:[]}function $h(t){return(B(t)?t[0]:t)||{}}var Kh=function(e,t){Gh(qh(e.series),function(t){Fh(t)&&Yh(t)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis");Gh(r,function(t){Gh(qh(e[t]),function(t){if(t){jh(t,"axisLabel");jh(t.axisPointer,"label")}})});Gh(qh(e.parallel),function(t){var e=t&&t.parallelAxisDefault;jh(e,"axisLabel");jh(e&&e.axisPointer,"label")});Gh(qh(e.calendar),function(t){Zh(t,"itemStyle");jh(t,"dayLabel");jh(t,"monthLabel");jh(t,"yearLabel")});Gh(qh(e.radar),function(t){jh(t,"name")});Gh(qh(e.geo),function(t){if(Fh(t)){Xh(t);Gh(qh(t.regions),function(t){Xh(t)})}});Gh(qh(e.timeline),function(t){Xh(t);Zh(t,"label");Zh(t,"itemStyle");Zh(t,"controlStyle",true);var e=t.data;B(e)&&L(e,function(t){if(F(t)){Zh(t,"label");Zh(t,"itemStyle")}})});Gh(qh(e.toolbox),function(t){Zh(t,"iconStyle");Gh(t.feature,function(t){Zh(t,"iconStyle")})});jh($h(e.axisPointer),"label");jh($h(e.tooltip).axisPointer,"label")};function Jh(t,e){e=e.split(",");var r=t;for(var i=0;i<e.length;i++){r=r&&r[e[i]];if(r==null){break}}return r}function Qh(t,e,r,i){e=e.split(",");var a=t;var n;for(var o=0;o<e.length-1;o++){n=e[o];if(a[n]==null){a[n]={}}a=a[n]}if(i||a[e[o]]==null){a[e[o]]=r}}function tf(e){L(ef,function(t){if(t[0]in e&&!(t[1]in e)){e[t[1]]=e[t[0]]}})}var ef=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]];var rf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var af=function(r,t){Kh(r,t);r.series=Fa(r.series);L(r.series,function(t){if(!F(t)){return}var e=t.type;if(e==="pie"||e==="gauge"){if(t.clockWise!=null){t.clockwise=t.clockWise}}if(e==="gauge"){var r=Jh(t,"pointer.color");r!=null&&Qh(t,"itemStyle.normal.color",r)}tf(t)});if(r.dataRange){r.visualMap=r.dataRange}L(rf,function(t){var e=r[t];if(e){if(!B(e)){e=[e]}L(e,function(t){tf(t)})}})};var nf=function(t){var n=it();t.eachSeries(function(t){var e=t.get("stack");if(e){var r=n.get(e)||n.set(e,[]);var i=t.getData();var a={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension)){return}r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel);r.push(a)}});n.each(of)};function of(g){L(g,function(h,f){var c=[];var v=[NaN,NaN];var t=[h.stackResultDimension,h.stackedOverDimension];var d=h.data;var p=h.isStackedByIndex;var e=d.map(t,function(t,e,r){var i=d.get(h.stackedDimension,r);if(isNaN(i)){return v}var a;var n;if(p){n=d.getRawIndex(r)}else{a=d.get(h.stackedByDimension,r)}var o=NaN;for(var s=f-1;s>=0;s--){var l=g[s];if(!p){n=l.data.rawIndexOf(l.stackedByDimension,a)}if(n>=0){var u=l.data.getByRawIndex(l.stackResultDimension,n);if(i>=0&&u>0||i<=0&&u<0){i+=u;o=u;break}}}c[0]=i;c[1]=o;return c});d.hostModel.setData(e);h.data=e})}function sf(t,e){if(!eh.isInstance(t)){t=eh.seriesDataToSource(t)}this._source=t;var r=this._data=t.data;var i=t.sourceFormat;if(i===Ju){if(A){if(e==null){throw new Error("Typed array data must specify dimension size")}}this._offset=0;this._dimSize=e;this._data=r}var a=uf[i===Yu?i+"_"+t.seriesLayoutBy:i];if(A){K(a,"Invalide sourceFormat: "+i)}N(this,a)}var lf=sf.prototype;lf.pure=false;lf.persistent=true;lf.getSource=function(){return this._source};var uf={arrayRows_column:{pure:true,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:cf},arrayRows_row:{pure:true,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;var e=[];var r=this._data;for(var i=0;i<r.length;i++){var a=r[i];e.push(a?a[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:true,count:hf,getItem:ff,appendData:cf},keyedColumns:{pure:true,count:function(){var t=this._source.dimensionsDefine[0].name;var e=this._data[t];return e?e.length:0},getItem:function(t){var e=[];var r=this._source.dimensionsDefine;for(var i=0;i<r.length;i++){var a=this._data[r[i].name];e.push(a?a[t]:null)}return e},appendData:function(t){var a=this._data;L(t,function(t,e){var r=a[e]||(a[e]=[]);for(var i=0;i<(t||[]).length;i++){r.push(t[i])}})}},original:{count:hf,getItem:ff,appendData:cf},typedArray:{persistent:false,pure:true,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t){t=t-this._offset;var e=[];var r=this._dimSize*t;for(var i=0;i<this._dimSize;i++){e[i]=this._data[r+i]}return e},appendData:function(t){if(A){K(H(t),"Added data must be TypedArray if data in initialization is TypedArray")}this._data=t},clean:function(){this._offset+=this.count();this._data=null}}};function hf(){return this._data.length}function ff(t){return this._data[t]}function cf(t){for(var e=0;e<t.length;e++){this._data.push(t[e])}}var vf={arrayRows:df,objectRows:function(t,e,r,i){return r!=null?t[i]:t},keyedColumns:df,original:function(t,e,r,i){var a=Za(t);return r==null||!(a instanceof Array)?a:a[r]},typedArray:df};function df(t,e,r,i){return r!=null?t[r]:t}var pf={arrayRows:gf,objectRows:function(t,e,r,i){return mf(t[e],this._dimensionInfos[e])},keyedColumns:gf,original:function(t,e,r,i){var a=t&&(t.value==null?t:t.value);if(!this._rawData.pure&&Ua(t)){this.hasItemOption=true}return mf(a instanceof Array?a[i]:a,this._dimensionInfos[e])},typedArray:function(t,e,r,i){return t[i]}};function gf(t,e,r,i){return mf(t[i],this._dimensionInfos[e])}function mf(t,e){var r=e&&e.type;if(r==="ordinal"){var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}if(r==="time"&&typeof t!=="number"&&t!=null&&t!=="-"){t=+Ql(t)}return t==null||t===""?NaN:+t}function yf(t,e,r){if(!t){return}var i=t.getRawDataItem(e);if(i==null){return}var a=t.getProvider().getSource().sourceFormat;var n;var o;var s=t.getDimensionInfo(r);if(s){n=s.name;o=s.index}return vf[a](i,e,o,n)}function xf(t,e,r){if(!t){return}var i=t.getProvider().getSource().sourceFormat;if(i!==Xu&&i!==qu){return}var a=t.getRawDataItem(e);if(i===Xu&&!F(a)){a=null}if(a){return a[r]}}var _f=/\{@(.+?)\}/g;var wf={getDataParams:function(t,e){var r=this.getData(e);var i=this.getRawValue(t,e);var a=r.getRawIndex(t);var n=r.getName(t,true);var o=r.getRawDataItem(t);var s=r.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:this.mainType==="series"?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:n,dataIndex:a,data:o,dataType:e,value:i,color:s,marker:du(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,r,a){t=t||"normal";var n=this.getData(e);var o=n.getItemModel(i);var s=this.getDataParams(i,e);if(r!=null&&s.value instanceof Array){s.value=s.value[r]}var l=o.get(t==="normal"?[a||"label","formatter"]:[t,a||"label","formatter"]);if(typeof l==="function"){s.status=t;return l(s)}else if(typeof l==="string"){var u=cu(l,s);return u.replace(_f,function(t,e){var r=e.length;if(e.charAt(0)==="["&&e.charAt(r-1)==="]"){e=+e.slice(1,r-1)}return yf(n,i,e)})}},getRawValue:function(t,e){return yf(this.getData(e),t)},formatTooltip:function(){}};function bf(t){return new Sf(t)}function Sf(t){t=t||{};this._reset=t.reset;this._plan=t.plan;this._count=t.count;this._onDirty=t.onDirty;this._dirty=true;this.context}var Mf=Sf.prototype;Mf.perform=function(t){var e=this._upstream;var r=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}if(this.__pipeline){this.__pipeline.currentTask=this}var a;if(this._plan&&!r){a=this._plan(this.context)}var n;if(this._dirty||a==="reset"){this._dirty=false;n=If(this,r)}var o=t&&t.step;if(e){if(A){K(e._outputDueEnd!=null)}this._dueEnd=e._outputDueEnd}else{if(A){K(!this._progress||this._count)}this._dueEnd=this._count?this._count(this.context):Infinity}if(this._progress){var s=this._dueIndex;var l=Math.min(o!=null?this._dueIndex+o:Infinity,this._dueEnd);!r&&(n||s<l)&&this._progress({start:s,end:l},this.context);this._dueIndex=l;var u=this._settedOutputEnd!=null?this._settedOutputEnd:l;if(A){K(u>=this._outputDueEnd)}this._outputDueEnd=u}else{this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd}return this.unfinished()};Mf.dirty=function(){this._dirty=true;this._onDirty&&this._onDirty(this.context)};function If(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0;t._settedOutputEnd=null;var r;var i;if(!e&&t._reset){r=t._reset(t.context);if(r&&r.progress){i=r.forceFirstProgress;r=r.progress}}t._progress=r;var a=t._downstream;a&&a.dirty();return i}Mf.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd};Mf.pipe=function(t){if(A){K(t&&!t._disposed&&t!==this)}if(this._downstream!==t||this._dirty){this._downstream=t;t._upstream=this;t.dirty()}};Mf.dispose=function(){if(this._disposed){return}this._upstream&&(this._upstream._downstream=null);this._downstream&&(this._downstream._upstream=null);this._dirty=false;this._disposed=true};Mf.getUpstream=function(){return this._upstream};Mf.getDownstream=function(){return this._downstream};Mf.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Df=Ja();var Tf=Ru.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,r,i){this.seriesIndex=this.componentIndex;this.dataTask=bf({count:Lf,reset:kf});this.dataTask.context={model:this};this.mergeDefaultAndTheme(t,r);oh(this);var a=this.getInitialData(t,r);Nf(a,this);this.dataTask.context.data=a;if(A){K(a,"getInitialData returned invalid data.")}Df(this).dataBeforeProcessed=a;Af(this)},mergeDefaultAndTheme:function(t,e){var r=this.layoutMode;var i=r?Nu(t):{};var a=this.subType;if(Ru.hasClass(a)){a+="Series"}y(t,e.getTheme().get(this.subType));y(t,this.getDefaultOption());Wa(t,"label",["show"]);this.fillDataTextStyle(t.data);if(r){Pu(t,i,r)}},mergeOption:function(t,e){t=y(this.option,t,true);this.fillDataTextStyle(t.data);var r=this.layoutMode;if(r){Pu(this.option,t,r)}oh(this);var i=this.getInitialData(t,e);Nf(i,this);this.dataTask.dirty();this.dataTask.context.data=i;Df(this).dataBeforeProcessed=i;Af(this)},fillDataTextStyle:function(t){if(t){var e=["show"];for(var r=0;r<t.length;r++){if(t[r]&&t[r].label){Wa(t[r],"label",e)}}}},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=Of(this);if(e){var r=e.context.data;return t==null?r:r.getLinkedData(t)}else{return Df(this).data}},setData:function(t){var e=Of(this);if(e){var r=e.context;if(r.data!==t&&e.isOverallFilter){e.setOutputEnd(t.count())}r.outputData=t;if(e!==this.dataTask){r.data=t}}Df(this).data=t},getSource:function(){return ah(this)},getRawData:function(){return Df(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(r,l,t){function e(t){var o=D(t,function(t,e,r){var i=u.getDimensionInfo(r);return t|=i&&i.tooltip!==false&&i.displayName!=null},0);var s=[];a.length?L(a,function(t){e(yf(u,r,t),t)}):L(t,e);function e(t,e){var r=u.getDimensionInfo(e);if(!r||r.otherDims.tooltip===false){return}var i=r.type;var a=du({color:h,type:"subItem"});var n=(o?a+uu(r.displayName||"-")+": ":"")+uu(i==="ordinal"?t+"":i==="time"?l?"":gu("yyyy/MM/dd hh:mm:ss",t):ou(t));n&&s.push(n)}return(o?"<br/>":"")+s.join(o?"<br/>":", ")}function i(t){return uu(ou(t))}var u=this.getData();var a=u.mapDimension("defaultedTooltip",true);var n=a.length;var o=this.getRawValue(r);var s=B(o);var h=u.getItemVisual(r,"color");if(F(h)&&h.colorStops){h=(h.colorStops[0]||{}).color}h=h||"transparent";var f=n>1||s&&!n?e(o):n?i(yf(u,r,a[0])):i(s?o[0]:o);var c=du(h);var v=u.getName(r);var d=this.name;if(!Ya(this)){d=""}d=d?uu(d)+(!l?"<br/>":": "):"";return!l?d+c+(v?uu(v)+": "+f:f):c+d+f},isAnimationEnabled:function(){if(m.node){return false}var t=this.getShallow("animation");if(t){if(this.getData().count()>this.getShallow("animationThreshold")){t=false}}return t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,r){var i=this.ecModel;var a=Hu.getColorFromPalette.call(this,t,e,r);if(!a){a=i.getColorFromPalette(t,e,r)}return a},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,true)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});I(Tf,wf);I(Tf,Hu);function Af(t){var e=t.name;if(!Ya(t)){t.name=Cf(t)||e}}function Cf(t){var r=t.getRawData();var e=r.mapDimension("seriesName",true);var i=[];L(e,function(t){var e=r.getDimensionInfo(t);e.displayName&&i.push(e.displayName)});return i.join(" ")}function Lf(t){return t.model.getRawData().count()}function kf(t){var e=t.model;e.setData(e.getRawData().cloneShallow());return Pf}function Pf(t,e){if(t.end>e.outputData.count()){e.model.getRawData().cloneShallow(e.outputData)}}function Nf(e,r){L(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,R(Ef,r))})}function Ef(t){var e=Of(t);if(e){e.setOutputEnd(this.count())}}function Of(t){var e=(t.ecModel||{}).scheduler;var r=e&&e.getPipeline(t.uid);if(r){var i=r.currentTask;if(i){var a=i.agentStubMap;if(a){i=a.get(t.uid)}}return i}}var zf=function(){this.group=new cr;this.uid=zl("viewComponent")};zf.prototype={constructor:zf,init:function(t,e){},render:function(t,e,r,i){},dispose:function(){}};var Rf=zf.prototype;Rf.updateView=Rf.updateLayout=Rf.updateVisual=function(t,e,r,i){};un(zf);dn(zf,{registerWhenExtend:true});var Bf=function(){var s=Ja();return function(t){var e=s(t);var r=t.pipelineContext;var i=e.large;var a=e.canProgressiveRender;var n=e.large=r.large;var o=e.canProgressiveRender=r.canProgressiveRender;return!!(i^n||a^o)&&"reset"}};var Vf=Ja();var Gf=Bf();function Ff(){this.group=new cr;this.uid=zl("viewChart");this.renderTask=bf({plan:Uf,reset:jf});this.renderTask.context={view:this}}Ff.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,i){},highlight:function(t,e,r,i){Zf(t.getData(),i,"emphasis")},downplay:function(t,e,r,i){Zf(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Wf=Ff.prototype;Wf.updateView=Wf.updateLayout=Wf.updateVisual=function(t,e,r,i){this.render(t,e,r,i)};function Hf(t,e){if(t){t.trigger(e);if(t.type==="group"){for(var r=0;r<t.childCount();r++){Hf(t.childAt(r),e)}}}}function Zf(e,t,r){var i=Ka(e,t);if(i!=null){L(Fa(i),function(t){Hf(e.getItemGraphicEl(t),r)})}else{e.eachItemGraphicEl(function(t){Hf(t,r)})}}un(Ff,["dispose"]);dn(Ff,{registerWhenExtend:true});Ff.markUpdateMethod=function(t,e){Vf(t).updateMethod=e};function Uf(t){return Gf(t.model)}function jf(t){var e=t.model;var r=t.ecModel;var i=t.api;var a=t.payload;var n=e.pipelineContext.canProgressiveRender;var o=t.view;var s=a&&Vf(a).updateMethod;var l=n?"incrementalPrepareRender":s&&o[s]?s:"render";if(l!=="render"){o[l](e,r,i,a)}return Xf[l]}var Xf={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:true,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};var Yf="\0__throttleOriginMethod";var qf="\0__throttleRate";var $f="\0__throttleType";function Kf(t,r,i){var a;var n=0;var o=0;var s=null;var l;var u;var h;var f;r=r||0;function c(){o=(new Date).getTime();s=null;t.apply(u,h||[])}var e=function(){a=(new Date).getTime();u=this;h=arguments;var t=f||r;var e=f||i;f=null;l=a-(e?n:o)-t;clearTimeout(s);if(e){s=setTimeout(c,t)}else{if(l>=0){c()}else{s=setTimeout(c,-l)}}n=a};e.clear=function(){if(s){clearTimeout(s);s=null}};e.debounceNextCall=function(t){f=t};return e}function Jf(t,e,r,i){var a=t[e];if(!a){return}var n=a[Yf]||a;var o=a[$f];var s=a[qf];if(s!==r||o!==i){if(r==null||!i){return t[e]=n}a=t[e]=Kf(n,r,i==="debounce");a[Yf]=n;a[$f]=i;a[qf]=r}return a}function Qf(t,e){var r=t[e];if(r&&r[Yf]){t[e]=r[Yf]}}var tc={createOnAllSeries:true,performRawSeries:true,reset:function(e,t){var r=e.getData();var a=(e.visualColorAccessPath||"itemStyle.color").split(".");var i=e.get(a)||e.getColorFromPalette(e.name,null,t.getSeriesCount());r.setVisual("color",i);if(!t.isSeriesFiltered(e)){if(typeof i==="function"&&!(i instanceof Ts)){r.each(function(t){r.setItemVisual(t,"color",i(e.getDataParams(t)))})}var n=function(t,e){var r=t.getItemModel(e);var i=r.get(a,true);if(i!=null){t.setItemVisual(e,"color",i)}};return{dataEach:r.hasItemOption?n:null}}}};var ec={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}};var rc=function(t,e){var n=e.getModel("aria");if(!n.get("show")){return}else if(n.get("description")){t.setAttribute("aria-label",n.get("description"));return}var h=0;e.eachSeries(function(t,e){++h},this);var f=n.get("data.maxCount")||10;var r=n.get("series.maxCount")||10;var c=Math.min(h,r);var i;if(h<1){return}else{var a=s();if(a){i=d(p("general.withTitle"),{title:a})}else{i=p("general.withoutTitle")}var v=[];var o=h>1?"series.multiple.prefix":"series.single.prefix";i+=d(p(o),{seriesCount:h});e.eachSeries(function(t,e){if(e<c){var r;var i=t.get("name");var a="series."+(h>1?"multiple":"single")+".";r=p(i?a+"withName":a+"withoutName");r=d(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:g(t.subType)});var n=t.getData();window.data=n;if(n.count()>f){r+=d(p("data.partialData"),{displayCnt:f})}else{r+=p("data.allData")}var o=[];for(var s=0;s<n.count();s++){if(s<f){var l=n.getName(s);var u=yf(n,s);o.push(d(l?p("data.withName"):p("data.withoutName"),{name:l,value:u}))}}r+=o.join(p("data.separator.middle"))+p("data.separator.end");v.push(r)}});i+=v.join(p("series.multiple.separator.middle"))+p("series.multiple.separator.end");t.setAttribute("aria-label",i)}function d(t,e){if(typeof t!=="string"){return t}var r=t;L(e,function(t,e){r=r.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)});return r}function p(t){var e=n.get(t);if(e==null){var r=t.split(".");var i=ec.aria;for(var a=0;a<r.length;++a){i=i[r[a]]}return i}else{return e}}function s(){var t=e.getModel("title").option;if(t&&t.length){t=t[0]}return t&&t.text}function g(t){return ec.series.typeNames[t]||"自定义图"}};var ic=Math.PI;var ac=function(i,t){t=t||{};C(t,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var a=new _s({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});var n=new Is({shape:{startAngle:-ic/2,endAngle:-ic/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001});var o=new _s({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});n.animateShape(true).when(1e3,{endAngle:ic*3/2}).start("circularInOut");n.animateShape(true).when(1e3,{startAngle:ic*3/2}).delay(300).start("circularInOut");var e=new cr;e.add(n);e.add(o);e.add(a);e.resize=function(){var t=i.getWidth()/2;var e=i.getHeight()/2;n.setShape({cx:t,cy:e});var r=n.shape.r;o.setShape({x:t-r,y:e-r,width:r*2,height:r*2});a.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})};e.resize();return e};function nc(t,e,r,i){this.ecInstance=t;this.api=e;this.unfinished;this._dataProcessorHandlers=r.slice();this._visualHandlers=i.slice();this._stageTaskMap=it()}var oc=nc.prototype;oc.getPerformArgs=function(t,e){if(!t.__pipeline){return}var r=this._pipelineMap.get(t.__pipeline.id);var i=r.context;var a=!e&&r.progressiveEnabled&&(!i||i.canProgressiveRender)&&t.__idxInPipeline>r.bockIndex;return{step:a?r.step:null}};oc.getPipeline=function(t){return this._pipelineMap.get(t)};oc.updateStreamModes=function(t,e){var r=this._pipelineMap.get(t.uid);var i=t.getData();var a=i.count();var n=r.progressiveEnabled&&e.incrementalPrepareRender&&a>=r.threshold;var o=t.get("large")&&a>=t.get("largeThreshold");t.pipelineContext=r.context={canProgressiveRender:n,large:o}};oc.restorePipelines=function(t){var i=this;var a=i._pipelineMap=it();t.eachSeries(function(t){var e=t.getProgressive();var r=t.uid;a.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),bockIndex:-1,step:e||700,count:0});xc(i,t,t.dataTask)})};oc.prepareStageTasks=function(){var r=this._stageTaskMap;var i=this.ecInstance.getModel();var a=this.api;L([this._dataProcessorHandlers,this._visualHandlers],function(t){L(t,function(t){var e=r.get(t.uid)||r.set(t.uid,[]);t.reset&&uc(this,t,e,i,a);t.overallReset&&hc(this,t,e,i,a)},this)},this)};oc.prepareView=function(t,e,r,i){var a=t.renderTask;var n=a.context;n.model=e;n.ecModel=r;n.api=i;a.__block=!t.incrementalPrepareRender;xc(this,e,a)};oc.performDataProcessorTasks=function(t,e){sc(this,this._dataProcessorHandlers,t,e,{block:true})};oc.performVisualTasks=function(t,e,r){sc(this,this._visualHandlers,t,e,r)};function sc(l,t,u,h,f){f=f||{};var c;L(t,function(i,t){if(f.visualType&&f.visualType!==i.visualType){return}var e=l._stageTaskMap.get(i.uid);var r=e.seriesTaskMap;var a=e.overallTask;if(a){var n;var o=a.agentStubMap;o.each(function(t){if(v(f,t)){t.dirty();n=true}});n&&a.dirty();lc(a,h);var s=l.getPerformArgs(a,f.block);o.each(function(t){t.perform(s)});c|=a.perform(s)}else if(r){r.each(function(t,e){if(v(f,t)){t.dirty()}var r=l.getPerformArgs(t,f.block);r.skip=!i.performRawSeries&&u.isSeriesFiltered(t.context.model);lc(t,h);c|=t.perform(r)})}});function v(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}l.unfinished|=c}oc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()});this.unfinished|=e};oc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var lc=oc.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function uc(i,a,t,n,o){var s=t.seriesTaskMap||(t.seriesTaskMap=it());var e=a.seriesType;var r=a.getTargetSeries;if(a.createOnAllSeries){n.eachRawSeries(l)}else if(e){n.eachRawSeriesByType(e,l)}else if(r){r(n,o).each(l)}function l(t){var e=t.uid;var r=s.get(e)||s.set(e,bf({plan:pc,reset:gc,count:yc}));r.context={model:t,ecModel:n,api:o,useClearVisual:a.isVisual&&!a.isLayout,plan:a.plan,reset:a.reset,scheduler:i};xc(i,t,r)}var u=i._pipelineMap;s.each(function(t,e){if(!u.get(e)){t.dispose();s.removeKey(e)}})}function hc(i,t,e,r,a){var n=e.overallTask=e.overallTask||bf({reset:fc});n.context={ecModel:r,api:a,overallReset:t.overallReset,scheduler:i};var o=n.agentStubMap=n.agentStubMap||it();var s=t.seriesType;var l=t.getTargetSeries;var u=true;var h=t.isOverallFilter;if(s){r.eachRawSeriesByType(s,f)}else if(l){l(r,a).each(f)}else{u=false;L(r.getSeries(),f)}function f(t){var e=t.uid;var r=o.get(e)||o.set(e,bf({reset:cc,onDirty:dc}));r.context={model:t,overallProgress:u,isOverallFilter:h};r.agent=n;r.__block=u;xc(i,t,r)}var c=i._pipelineMap;o.each(function(t,e){if(!c.get(e)){t.dispose();o.removeKey(e)}})}function fc(t){t.overallReset(t.ecModel,t.api,t.payload)}function cc(t,e){return t.overallProgress&&vc}function vc(){this.agent.dirty();this.getDownstream().dirty()}function dc(){this.agent&&this.agent.dirty()}function pc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function gc(t){if(t.useClearVisual){t.data.clearAllVisual()}var e=t.resetDefines=Fa(t.reset(t.model,t.ecModel,t.api,t.payload));if(e.length){return mc}}function mc(t,e){var r=e.data;var i=e.resetDefines;for(var a=0;a<i.length;a++){var n=i[a];if(n&&n.dataEach){for(var o=t.start;o<t.end;o++){n.dataEach(r,o)}}else if(n&&n.progress){n.progress(t,r)}}}function yc(t){return t.data.count()}function xc(t,e,r){var i=e.uid;var a=t._pipelineMap.get(i);!a.head&&(a.head=r);a.tail&&a.tail.pipe(r);a.tail=r;r.__idxInPipeline=a.count++;r.__pipeline=a}nc.wrapStageHandler=function(t,e){if(V(t)){t={overallReset:t,seriesType:_c(t)}}t.uid=zl("stageHandler");e&&(t.visualType=e);return t};function _c(t){Sc=null;try{t(wc,bc)}catch(t){}return Sc}var wc={};var bc={};var Sc;Mc(wc,gh);Mc(bc,Dh);wc.eachSeriesByType=wc.eachRawSeriesByType=function(t){Sc=t};wc.eachComponent=function(t){if(t.mainType==="series"&&t.subType){Sc=t.subType}};function Mc(t,e){for(var r in e.prototype){t[r]=nt}}var Ic=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];var Dc={color:Ic,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Ic]};var Tc="#eee";var Ac=function(){return{axisLine:{lineStyle:{color:Tc}},axisTick:{lineStyle:{color:Tc}},axisLabel:{textStyle:{color:Tc}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Tc}}}};var Cc=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"];var Lc={color:Cc,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Tc},crossStyle:{color:Tc}}},legend:{textStyle:{color:Tc}},textStyle:{color:Tc},title:{textStyle:{color:Tc}},toolbox:{iconStyle:{normal:{borderColor:Tc}}},dataZoom:{textStyle:{color:Tc}},visualMap:{textStyle:{color:Tc}},timeline:{lineStyle:{color:Tc},itemStyle:{normal:{color:Cc[1]}},label:{normal:{textStyle:{color:Tc}}},controlStyle:{normal:{color:Tc,borderColor:Tc}}},timeAxis:Ac(),logAxis:Ac(),valueAxis:Ac(),categoryAxis:Ac(),line:{symbol:"circle"},graph:{color:Cc},gauge:{title:{textStyle:{color:Tc}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Lc.categoryAxis.splitLine.show=false;var kc=K;var Pc=L;var Nc=V;var Ec=F;var Oc=Ru.parseClassType;var zc="4.0.3";var Rc={zrender:"4.0.2"};var Bc=1;var Vc=1e3;var Gc=5e3;var Fc=1e3;var Wc=2e3;var Hc=3e3;var Zc=4e3;var Uc=5e3;var jc={PROCESSOR:{FILTER:Vc,STATISTIC:Gc},VISUAL:{LAYOUT:Fc,GLOBAL:Wc,CHART:Hc,COMPONENT:Zc,BRUSH:Uc}};var Xc="__flagInMainProcess";var Yc="__hasGradientOrPatternBg";var qc="__optionUpdated";var $c=/^[a-zA-Z0-9_]+$/;function Kc(i){return function(t,e,r){t=t&&t.toLowerCase();Rt.prototype[i].call(this,t,e,r)}}function Jc(){Rt.call(this)}Jc.prototype.on=Kc("on");Jc.prototype.off=Kc("off");Jc.prototype.one=Kc("one");I(Jc,Rt);function Qc(t,e,r){r=r||{};if(typeof e==="string"){e=Tv[e]}this.id;this.group;this._dom=t;var i="canvas";if(A){i=(typeof window==="undefined"?global:window).__ECHARTS__DEFAULT__RENDERER__||i}var a=this._zr=La(t,{renderer:r.renderer||i,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=Kf(z(a.flush,a),17);var e=P(e);e&&af(e,true);this._theme=e;this._chartsViews=[];this._chartsMap={};this._componentsViews=[];this._componentsMap={};this._coordSysMgr=new Ah;var n=this._api=_v(this);function o(t,e){return t.__prio-e.__prio}br(Dv,o);br(Sv,o);this._scheduler=new nc(this,n,Sv,Dv);Rt.call(this);this._messageCenter=new Jc;this._initEvents();this.resize=z(this.resize,this);this._pendingActions=[];a.animation.on("frame",this._onframe,this);uv(a,this);tt(this)}var tv=Qc.prototype;tv._onframe=function(){if(this._disposed){return}var t=this._scheduler;if(this[qc]){var e=this[qc].silent;this[Xc]=true;iv(this);rv.update.call(this);this[Xc]=false;this[qc]=false;sv.call(this,e);lv.call(this,e)}else if(t.unfinished){var r=Bc;var i=this._model;var a=this._api;t.unfinished=false;do{var n=+new Date;t.performSeriesTasks(i);t.performDataProcessorTasks(i);nv(this,i);t.performVisualTasks(i);dv(this,this._model,a,"remain");r-=+new Date-n}while(r>0&&t.unfinished);if(!t.unfinished){this._zr.flush()}}};tv.getDom=function(){return this._dom};tv.getZr=function(){return this._zr};tv.setOption=function(t,e,r){if(A){kc(!this[Xc],"`setOption` should not be called during main process.")}var i;if(Ec(e)){r=e.lazyUpdate;i=e.silent;e=e.notMerge}this[Xc]=true;if(!this._model||e){var a=new Eh(this._api);var n=this._theme;var o=this._model=new gh(null,null,n,a);o.scheduler=this._scheduler;o.init(null,null,n,a)}this._model.setOption(t,Mv);if(r){this[qc]={silent:i};this[Xc]=false}else{iv(this);rv.update.call(this);this._zr.flush();this[qc]=false;this[Xc]=false;sv.call(this,i);lv.call(this,i)}};tv.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")};tv.getModel=function(){return this._model};tv.getOption=function(){return this._model&&this._model.getOption()};tv.getWidth=function(){return this._zr.getWidth()};tv.getHeight=function(){return this._zr.getHeight()};tv.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1};tv.getRenderedCanvas=function(t){if(!m.canvasSupported){return}t=t||{};t.pixelRatio=t.pixelRatio||1;t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)};tv.getSvgDataUrl=function(){if(!m.svgSupported){return}var t=this._zr;var e=t.storage.getDisplayList();L(e,function(t){t.stopAnimation(true)});return t.painter.pathToSvg()};tv.getDataURL=function(t){t=t||{};var e=t.excludeComponents;var r=this._model;var i=[];var a=this;Pc(e,function(t){r.eachComponent({mainType:t},function(t){var e=a._componentsMap[t.__viewId];if(!e.group.ignore){i.push(e);e.group.ignore=true}})});var n=this._zr.painter.getType()==="svg"?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));Pc(i,function(t){t.group.ignore=false});return n};tv.getConnectedDataURL=function(a){if(!m.canvasSupported){return}var n=this.group;var o=Math.min;var s=Math.max;var t=Infinity;if(Lv[n]){var l=t;var u=t;var h=-t;var f=-t;var c=[];var r=a&&a.pixelRatio||1;L(Cv,function(t,e){if(t.group===n){var r=t.getRenderedCanvas(P(a));var i=t.getDom().getBoundingClientRect();l=o(i.left,l);u=o(i.top,u);h=s(i.right,h);f=s(i.bottom,f);c.push({dom:r,left:i.left,top:i.top})}});l*=r;u*=r;h*=r;f*=r;var e=h-l;var i=f-u;var v=_();v.width=e;v.height=i;var d=La(v);Pc(c,function(t){var e=new Bi({style:{x:t.left*r-l,y:t.top*r-u,image:t.dom}});d.add(e)});d.refreshImmediately();return v.toDataURL("image/"+(a&&a.type||"png"))}else{return this.getDataURL(a)}};tv.convertToPixel=R(ev,"convertToPixel");tv.convertFromPixel=R(ev,"convertFromPixel");function ev(t,e,r){var i=this._model;var a=this._coordSysMgr.getCoordinateSystems();var n;e=tn(i,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&(n=s[t](i,e,r))!=null){return n}}if(A){console.warn("No coordinate system that supports "+t+" found by the given finder.")}}tv.containPixel=function(t,a){var e=this._model;var n;t=tn(e,t);L(t,function(t,i){i.indexOf("Models")>=0&&L(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint){n|=!!e.containPoint(a)}else if(i==="seriesModels"){var r=this._chartsMap[t.__viewId];if(r&&r.containPoint){n|=r.containPoint(a,t)}else{if(A){console.warn(i+": "+(r?"The found component do not support containPoint.":"No view mapping to the found component."))}}}else{if(A){console.warn(i+": containPoint is not supported")}}},this)},this);return!!n};tv.getVisual=function(t,e){var r=this._model;t=tn(r,t,{defaultMainType:"series"});var i=t.seriesModel;if(A){if(!i){console.warn("There is no specified seires model")}}var a=i.getData();var n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?a.indexOfRawIndex(t.dataIndex):null;return n!=null?a.getItemVisual(n,e):a.getVisual(e)};tv.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]};tv.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var rv={prepareAndUpdate:function(t){iv(this);rv.update.call(this,t)},update:function(t){var e=this._model;var r=this._api;var i=this._zr;var a=this._coordSysMgr;var n=this._scheduler;if(!e){return}e.restoreData(t);n.performSeriesTasks(e);a.create(e,r);n.performDataProcessorTasks(e,t);nv(this,e);a.update(e,r);fv(e);n.performVisualTasks(e,t);cv(this,e,r,t);var o=e.get("backgroundColor")||"transparent";var s=i.painter;if(s.isSingleCanvas&&s.isSingleCanvas()){i.configLayer(0,{clearColor:o})}else{if(!m.canvasSupported){var l=Te(o);o=Be(l,"rgb");if(l[3]===0){o="transparent"}}if(o.colorStops||o.image){i.configLayer(0,{clearColor:o});this[Yc]=true;this._dom.style.background="transparent"}else{if(this[Yc]){i.configLayer(0,{clearColor:null})}this[Yc]=false;this._dom.style.background=o}}pv(e,r)},updateTransform:function(a){var n=this._model;var o=this;var s=this._api;if(!n){return}var l=[];n.eachComponent(function(t,e){var r=o.getViewOfComponentModel(e);if(r&&r.__alive){if(r.updateTransform){var i=r.updateTransform(e,n,s,a);i&&i.update&&l.push(r)}else{l.push(r)}}});var i=it();n.eachSeries(function(t){var e=o._chartsMap[t.__viewId];if(e.updateTransform){var r=e.updateTransform(t,n,s,a);r&&r.update&&i.set(t.uid,1)}else{i.set(t.uid,1)}});fv(n);this._scheduler.performVisualTasks(n,a,{setDirty:true,dirtyMap:i});dv(o,n,s,a,i);pv(n,this._api)},updateView:function(t){var e=this._model;if(!e){return}Ff.markUpdateMethod(t,"updateView");fv(e);this._scheduler.performVisualTasks(e,t,{setDirty:true});cv(this,this._model,this._api,t);pv(e,this._api)},updateVisual:function(t){rv.update.call(this,t)},updateLayout:function(t){rv.update.call(this,t)}};function iv(t){var e=t._model;var r=t._scheduler;r.restorePipelines(e);r.prepareStageTasks();hv(t,"component",e,r);hv(t,"chart",e,r);r.plan()}function av(r,e,i,a,t){var n=r._model;if(!a){Pc(r._componentsViews.concat(r._chartsViews),l);return}var o={};o[a+"Id"]=i[a+"Id"];o[a+"Index"]=i[a+"Index"];o[a+"Name"]=i[a+"Name"];var s={mainType:a,query:o};t&&(s.subType=t);n&&n.eachComponent(s,function(t,e){l(r[a==="series"?"_chartsMap":"_componentsMap"][t.__viewId])},r);function l(t){t&&t.__alive&&t[e]&&t[e](t.__model,n,r._api,i)}}tv.resize=function(t){if(A){kc(!this[Xc],"`resize` should not be called during main process.")}this._zr.resize(t);var e=this._model;this._loadingFX&&this._loadingFX.resize();if(!e){return}var r=e.resetOption("media");var i=t&&t.silent;this[Xc]=true;r&&iv(this);rv.update.call(this);this[Xc]=false;sv.call(this,i);lv.call(this,i)};function nv(t,e){var r=t._chartsMap;var i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,r[t.__viewId])})}tv.showLoading=function(t,e){if(Ec(t)){e=t;t=""}t=t||"default";this.hideLoading();if(!Av[t]){if(A){console.warn("Loading effects "+t+" not exists.")}return}var r=Av[t](this._api,e);var i=this._zr;this._loadingFX=r;i.add(r)};tv.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX);this._loadingFX=null};tv.makeActionFromEvent=function(t){var e=N({},t);e.type=bv[t.type];return e};tv.dispatchAction=function(t,e){if(!Ec(e)){e={silent:!!e}}if(!wv[t.type]){return}if(!this._model){return}if(this[Xc]){this._pendingActions.push(t);return}ov.call(this,t,e.silent);if(e.flush){this._zr.flush(true)}else if(e.flush!==false&&m.browser.weChat){this._throttledZrFlush()}sv.call(this,e.silent);lv.call(this,e.silent)};function ov(e,t){var r=e.type;var i=e.escapeConnect;var a=wv[r];var n=a.actionInfo;var o=(n.update||"update").split(":");var s=o.pop();o=o[0]!=null&&Oc(o[0]);this[Xc]=true;var l=[e];var u=false;if(e.batch){u=true;l=T(e.batch,function(t){t=C(N({},t),e);t.batch=null;return t})}var h=[];var f;var c=r==="highlight"||r==="downplay";Pc(l,function(t){f=a.action(t,this._model,this._api);f=f||N({},t);f.type=n.event||f.type;h.push(f);if(c){av(this,s,t,"series")}else if(o){av(this,s,t,o.main,o.sub)}},this);if(s!=="none"&&!c&&!o){if(this[qc]){iv(this);rv.update.call(this,e);this[qc]=false}else{rv[s].call(this,e)}}if(u){f={type:n.event||r,escapeConnect:i,batch:h}}else{f=h[0]}this[Xc]=false;!t&&this._messageCenter.trigger(f.type,f)}function sv(t){var e=this._pendingActions;while(e.length){var r=e.shift();ov.call(this,r,t)}}function lv(t){!t&&this.trigger("updated")}function uv(t,e){t.on("rendered",function(){e.trigger("rendered");if(t.animation.isFinished()&&!e[qc]&&!e._scheduler.unfinished&&!e._pendingActions.length){e.trigger("finished")}})}tv.appendData=function(t){var e=t.seriesIndex;var r=this.getModel();var i=r.getSeriesByIndex(e);if(A){kc(t.data&&i)}i.appendData(t);this._scheduler.unfinished=true};tv.on=Kc("on");tv.off=Kc("off");tv.one=Kc("one");function hv(t,e,n,o){var s=e==="component";var l=s?t._componentsViews:t._chartsViews;var u=s?t._componentsMap:t._chartsMap;var h=t._zr;var f=t._api;for(var r=0;r<l.length;r++){l[r].__alive=false}s?n.eachComponent(function(t,e){t!=="series"&&i(e)}):n.eachSeries(i);function i(t){var e="_ec_"+t.id+"_"+t.type;var r=u[e];if(!r){var i=Oc(t.type);var a=s?zf.getClass(i.main,i.sub):Ff.getClass(i.sub);if(A){kc(a,i.sub+" does not exist.")}r=new a;r.init(n,f);u[e]=r;l.push(r);h.add(r.group)}t.__viewId=r.__id=e;r.__alive=true;r.__model=t;r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex};!s&&o.prepareView(r,t,n,f)}for(var r=0;r<l.length;){var a=l[r];if(!a.__alive){!s&&a.renderTask.dispose();h.remove(a.group);a.dispose(n,f);l.splice(r,1);delete u[a.__id];a.__id=a.group.__ecComponentInfo=null}else{r++}}}function fv(t){t.clearColorPalette();t.eachSeries(function(t){t.clearColorPalette()})}function cv(t,e,r,i){vv(t,e,r,i);Pc(t._chartsViews,function(t){t.__alive=false});dv(t,e,r,i);Pc(t._chartsViews,function(t){if(!t.__alive){t.remove(e,r)}})}function vv(t,r,i,a,e){Pc(e||t._componentsViews,function(t){var e=t.__model;t.render(e,r,i,a);xv(e,t)})}function dv(i,t,e,a,n){var o=i._scheduler;var s;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=true;var r=e.renderTask;o.updatePayload(r,a);if(n&&n.get(t.uid)){r.dirty()}s|=r.perform(o.getPerformArgs(r));e.group.silent=!!t.get("silent");xv(t,e);yv(t,e)});o.unfinished|=s;mv(i._zr,t);rc(i._zr.dom,t)}function pv(e,r){Pc(Iv,function(t){t(e,r)})}var gv=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];tv._initEvents=function(){Pc(gv,function(n){this._zr.on(n,function(t){var e=this.getModel();var r=t.target;var i;if(n==="globalout"){i={}}else if(r&&r.dataIndex!=null){var a=r.dataModel||e.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else if(r&&r.eventData){i=N({},r.eventData)}if(i){i.event=t;i.type=n;this.trigger(n,i)}},this)},this);Pc(bv,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)};tv.isDisposed=function(){return this._disposed};tv.clear=function(){this.setOption({series:[]},true)};tv.dispose=function(){if(this._disposed){if(A){console.warn("Instance "+this.id+" has been disposed")}return}this._disposed=true;rn(this.getDom(),Nv,"");var e=this._api;var r=this._model;Pc(this._componentsViews,function(t){t.dispose(r,e)});Pc(this._chartsViews,function(t){t.dispose(r,e)});this._zr.dispose();delete Cv[this.id]};I(Qc,Rt);function mv(t,e){var r=t.storage;var i=0;r.traverse(function(t){if(!t.isGroup){i++}});if(i>e.get("hoverLayerThreshold")&&!m.node){r.traverse(function(t){if(!t.isGroup){t.useHoverLayer=true}})}}function yv(t,e){var r=t.get("blendMode")||null;if(A){if(!m.canvasSupported&&r&&r!=="source-over"){console.warn("Only canvas support blendMode")}}e.group.traverse(function(t){if(!t.isGroup){if(t.style.blend!==r){t.setStyle("blend",r)}}if(t.eachPendingDisplayable){t.eachPendingDisplayable(function(t){t.setStyle("blend",r)})}})}function xv(t,e){var r=t.get("z");var i=t.get("zlevel");e.group.traverse(function(t){if(t.type!=="group"){r!=null&&(t.z=r);i!=null&&(t.zlevel=i)}})}function _v(r){var t=r._coordSysMgr;return N(new Dh(r),{getCoordinateSystems:z(t.getCoordinateSystems,t),getComponentByElement:function(t){while(t){var e=t.__ecComponentInfo;if(e!=null){return r._model.getComponent(e.mainType,e.index)}t=t.parent}}})}var wv={};var bv={};var Sv=[];var Mv=[];var Iv=[];var Dv=[];var Tv={};var Av={};var Cv={};var Lv={};var kv=new Date-0;var Pv=new Date-0;var Nv="_echarts_instance_";var Ev={};function Ov(i){var a=0;var n=1;var o=2;var s="__connectUpdateStatus";function l(t,e){for(var r=0;r<t.length;r++){var i=t[r];i[s]=e}}Pc(bv,function(t,e){i._messageCenter.on(e,function(t){if(Lv[i.group]&&i[s]!==a){if(t&&t.escapeConnect){return}var e=i.makeActionFromEvent(t);var r=[];Pc(Cv,function(t){if(t!==i&&t.group===i.group){r.push(t)}});l(r,a);Pc(r,function(t){if(t[s]!==n){t.dispatchAction(e)}});l(r,o)}})})}function zv(t,e,r){if(A){if(Ca.replace(".","")-0<Rc.zrender.replace(".","")-0){throw new Error("zrender/src "+Ca+" is too old for ECharts "+zc+". Current version need ZRender "+Rc.zrender+"+")}if(!t){throw new Error("Initialize failed: invalid dom.")}}var i=Fv(t);if(i){if(A){console.warn("There is a chart instance already initialized on the dom.")}return i}if(A){if(Z(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&(!r||r.width==null)||!t.clientHeight&&(!r||r.height==null))){console.warn("Can't get dom width or height")}}var a=new Qc(t,e,r);a.id="ec_"+kv++;Cv[a.id]=a;rn(t,Nv,a.id);Ov(a);return a}function Rv(e){if(B(e)){var t=e;e=null;Pc(t,function(t){if(t.group!=null){e=t.group}});e=e||"g_"+Pv++;Pc(t,function(t){t.group=e})}Lv[e]=true;return e}function Bv(t){Lv[t]=false}var Vv=Bv;function Gv(t){if(typeof t==="string"){t=Cv[t]}else if(!(t instanceof Qc)){t=Fv(t)}if(t instanceof Qc&&!t.isDisposed()){t.dispose()}}function Fv(t){return Cv[an(t,Nv)]}function Wv(t){return Cv[t]}function Hv(t,e){Tv[t]=e}function Zv(t){Mv.push(t)}function Uv(t,e){Jv(Sv,t,e,Vc)}function jv(t){Iv.push(t)}function Xv(t,e,r){if(typeof e==="function"){r=e;e=""}var i=Ec(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase();e=t.event;kc($c.test(i)&&$c.test(e));if(!wv[i]){wv[i]={action:r,actionInfo:t}}bv[e]=i}function Yv(t,e){Ah.register(t,e)}function qv(t){var e=Ah.get(t);if(e){return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()}}function $v(t,e){Jv(Dv,t,e,Fc,"layout")}function Kv(t,e){Jv(Dv,t,e,Hc,"visual")}function Jv(t,e,r,i,a){if(Nc(e)||Ec(e)){r=e;e=i}if(A){if(isNaN(e)||e==null){throw new Error("Illegal priority")}Pc(t,function(t){kc(t.__raw!==r)})}var n=nc.wrapStageHandler(r,a);n.__prio=e;n.__raw=r;t.push(n);return n}function Qv(t,e){Av[t]=e}function td(t){return Ru.extend(t)}function ed(t){return zf.extend(t)}function rd(t){return Tf.extend(t)}function id(t){return Ff.extend(t)}function ad(t){g("createCanvas",t)}function nd(t,e,r){if(e.geoJson&&!e.features){r=e.specialAreas;e=e.geoJson}if(typeof e==="string"){e=typeof JSON!=="undefined"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()}Ev[t]={geoJson:e,specialAreas:r}}function od(t){return Ev[t]}Kv(Wc,tc);Zv(af);Uv(Gc,nf);Qv("default",ac);Xv({type:"highlight",event:"highlight",update:"highlight"},nt);Xv({type:"downplay",event:"downplay",update:"downplay"},nt);Hv("light",Dc);Hv("dark",Lc);var sd={};function ld(t){return t}function ud(t,e,r,i,a){this._old=t;this._new=e;this._oldKeyGetter=r||ld;this._newKeyGetter=i||ld;this.context=a}ud.prototype={constructor:ud,add:function(t){this._add=t;return this},update:function(t){this._update=t;return this},remove:function(t){this._remove=t;return this},execute:function(){var t=this._old;var e=this._new;var r={};var i={};var a=[];var n=[];var o;hd(t,r,a,"_oldKeyGetter",this);hd(e,i,n,"_newKeyGetter",this);for(o=0;o<t.length;o++){var s=a[o];var l=i[s];if(l!=null){var u=l.length;if(u){u===1&&(i[s]=null);l=l.unshift()}else{i[s]=null}this._update&&this._update(l,o)}else{this._remove&&this._remove(o)}}for(var o=0;o<n.length;o++){var s=n[o];if(i.hasOwnProperty(s)){var l=i[s];if(l==null){continue}if(!l.length){this._add&&this._add(l)}else{for(var h=0,u=l.length;h<u;h++){this._add&&this._add(l[h])}}}}}};function hd(t,e,r,i,a){for(var n=0;n<t.length;n++){var o="_ec_"+a[i](t[n],n);var s=e[o];if(s==null){r.push(o);e[o]=n}else{if(!s.length){e[o]=s=[s]}s.push(n)}}}var fd=it(["tooltip","label","itemName","itemId","seriesName"]);function cd(i){var t={};var n=t.encode={};var o=it();var s=[];L(i.dimensions,function(t){var a=i.getDimensionInfo(t);var e=a.coordDim;if(e){if(A){K(fd.get(e)==null)}var r=n[e];if(!n.hasOwnProperty(e)){r=n[e]=[]}r[a.coordDimIndex]=t;if(!a.isExtraCoord){o.set(e,1);if(dd(a.type)){s[0]=t}}}fd.each(function(t,e){var r=n[e];if(!n.hasOwnProperty(e)){r=n[e]=[]}var i=a.otherDims[e];if(i!=null&&i!==false){r[i]=a.name}})});var a=[];var l={};o.each(function(t,e){var r=n[e];l[e]=r[0];a=a.concat(r)});t.dataDimsOnCoord=a;t.encodeFirstDimNotExtra=l;var e=n.label;if(e&&e.length){s=e.slice()}var r=s.slice();var u=n.tooltip;if(u&&u.length){r=u.slice()}n.defaultedLabel=s;n.defaultedTooltip=r;return t}function vd(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function dd(t){return!(t==="ordinal"||t==="time")}var pd=F;var gd="undefined";var md=typeof window===gd?global:window;var yd="e\0\0";var xd={float:typeof md.Float64Array===gd?Array:md.Float64Array,int:typeof md.Int32Array===gd?Array:md.Int32Array,ordinal:Array,number:Array,time:Array};var _d=typeof md.Uint32Array===gd?Array:md.Uint32Array;var wd=typeof md.Uint16Array===gd?Array:md.Uint16Array;function bd(t){return t._rawCount>65535?_d:wd}function Sd(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var Md=["hasItemOption","_nameList","_idList","_calculationInfo","_invertedIndicesMap","_rawData","_rawExtent","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"];function Id(e,r){L(Md.concat(r.__wrappedMethods||[]),function(t){if(r.hasOwnProperty(t)){e[t]=r[t]}});e.__wrappedMethods=r.__wrappedMethods}var Dd=function(t,e){t=t||["x","y"];var r={};var i=[];var a={};for(var n=0;n<t.length;n++){var o=t[n];if(G(o)){o={name:o}}var s=o.name;o.type=o.type||"float";if(!o.coordDim){o.coordDim=s;o.coordDimIndex=0}o.otherDims=o.otherDims||{};i.push(s);r[s]=o;o.index=n;if(o.createInvertedIndices){a[s]=[]}}this.dimensions=i;this._dimensionInfos=r;this.hostModel=e;this.dataType;this._indices=null;this._count=0;this._rawCount=0;this._storage={};this._nameList=[];this._idList=[];this._optionModels=[];this._visual={};this._layout={};this._itemVisuals=[];this.hasItemVisual={};this._itemLayouts=[];this._graphicEls=[];this._chunkSize=1e5;this._chunkCount=0;this._rawData;this._rawExtent={};this._extent={};this._approximateExtent={};this._dimensionsSummary=cd(this);this._invertedIndicesMap=a;this._calculationInfo={}};var Td=Dd.prototype;Td.type="list";Td.hasItemOption=true;Td.getDimension=function(t){if(!isNaN(t)){t=this.dimensions[t]||t}return t};Td.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]};Td.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()};Td.mapDimension=function(t,e){var r=this._dimensionsSummary;if(e==null){return r.encodeFirstDimNotExtra[t]}var i=r.encode[t];return i&&(e===true?i.slice():i[e])};Td.initData=function(t,e,r){var i=eh.isInstance(t)||O(t);if(i){t=new sf(t,this.dimensions.length)}if(A){if(!i&&(typeof t.getItem!="function"||typeof t.count!="function")){throw new Error("Inavlid data provider.")}}this._rawData=t;this._storage={};this._indices=null;this._nameList=e||[];this._idList=[];this._nameRepeatCount={};if(!r){this.hasItemOption=false}this.defaultDimValueGetter=pf[this._rawData.getSource().sourceFormat];this._dimValueGetter=r=r||this.defaultDimValueGetter;this._rawExtent={};this._initDataFromProvider(0,t.count());if(t.pure){this.hasItemOption=false}};Td.getProvider=function(){return this._rawData};Td.appendData=function(t){if(A){K(!this._indices,"appendData can only be called on raw data.")}var e=this._rawData;var r=this.count();e.appendData(t);var i=e.count();if(!e.persistent){i+=r}this._initDataFromProvider(r,i)};Td._initDataFromProvider=function(t,e){if(t>=e){return}var r=this._chunkSize;var i=this._rawData;var a=this._storage;var n=this.dimensions;var o=this._dimensionInfos;var s=this._nameList;var l=this._idList;var u=this._rawExtent;var h=this._nameRepeatCount={};var f;var c=this._chunkCount;var v=c-1;for(var d=0;d<n.length;d++){var p=n[d];if(!u[p]){u[p]=zd()}var g=o[p];if(g.otherDims.itemName===0){f=this._nameDimIdx=d}if(g.otherDims.itemId===0){this._idDimIdx=d}var m=xd[g.type];if(!a[p]){a[p]=[]}var y=a[p][v];if(y&&y.length<r){var x=new m(Math.min(e-v*r,r));for(var _=0;_<y.length;_++){x[_]=y[_]}a[p][v]=x}for(var w=c*r;w<e;w+=r){a[p].push(new m(Math.min(e-w,r)))}this._chunkCount=a[p].length}for(var b=t;b<e;b++){var S=i.getItem(b);var M=Math.floor(b/r);var I=b%r;for(var w=0;w<n.length;w++){var p=n[w];var D=a[p][M];var T=this._dimValueGetter(S,p,b,w);D[I]=T;if(T<u[p][0]){u[p][0]=T}if(T>u[p][1]){u[p][1]=T}}if(!i.pure){var A=s[b];if(S&&!A){if(f!=null){A=this._getNameFromStore(b)}else if(S.name!=null){s[b]=A=S.name}}var C=S==null?null:S.id;if(C==null&&A!=null){h[A]=h[A]||0;C=A;if(h[A]>0){C+="__ec__"+h[A]}h[A]++}C!=null&&(l[b]=C)}}if(!i.persistent&&i.clean){i.clean()}this._rawCount=this._count=e;this._extent={};Ad(this)};function Ad(n){var o=n._invertedIndicesMap;L(o,function(t,e){var r=n._dimensionInfos[e];var i=r.ordinalMeta;if(i){t=o[e]=new _d(i.categories.length);for(var a=0;a<t.length;a++){t[a]=NaN}for(var a=0;a<n._count;a++){t[n.get(e,a)]=a}}})}Td._getNameFromStore=function(t){var e=this._nameDimIdx;if(e!=null){var r=this._chunkSize;var i=Math.floor(t/r);var a=t%r;var n=this.dimensions[e];var o=this._dimensionInfos[n].ordinalMeta;if(o){return o.categories[t]}else{var s=this._storage[n][i];return s&&s[a]}}};Td._getIdFromStore=function(t){var e=this._idDimIdx;if(e!=null){var r=this._chunkSize;var i=Math.floor(t/r);var a=t%r;var n=this.dimensions[e];var o=this._dimensionInfos[n].ordinalMeta;if(o){return o.categories[t]}else{var s=this._storage[n][i];return s&&s[a]}}};Td.count=function(){return this._count};Td.getIndices=function(){if(this._indices){var t=this._indices.constructor;return new t(this._indices.buffer,0,this._count)}var t=bd(this);var e=new t(this.count());for(var r=0;r<e.length;r++){e[r]=r}return e};Td.get=function(t,e){if(!(e>=0&&e<this._count)){return NaN}var r=this._storage;if(!r[t]){return NaN}e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize);var a=e%this._chunkSize;var n=r[t][i];var o=n[a];return o};Td.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount)){return NaN}var r=this._storage[t];if(!r){return NaN}var i=Math.floor(e/this._chunkSize);var a=e%this._chunkSize;var n=r[i];return n[a]};Td._getFast=function(t,e){var r=Math.floor(e/this._chunkSize);var i=e%this._chunkSize;var a=this._storage[t][r];return a[i]};Td.getValues=function(t,e){var r=[];if(!B(t)){e=t;t=this.dimensions}for(var i=0,a=t.length;i<a;i++){r.push(this.get(t[i],e))}return r};Td.hasValue=function(t){var e=this._dimensionsSummary.dataDimsOnCoord;var r=this._dimensionInfos;for(var i=0,a=e.length;i<a;i++){if(r[e[i]].type!=="ordinal"&&isNaN(this.get(e[i],t))){return false}}return true};Td.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t];var r=zd();if(!e){return r}var i=this.count();var a=!this._indices;var n;if(a){return this._rawExtent[t].slice()}n=this._extent[t];if(n){return n.slice()}n=r;var o=n[0];var s=n[1];for(var l=0;l<i;l++){var u=this._getFast(t,this.getRawIndex(l));u<o&&(o=u);u>s&&(s=u)}n=[o,s];this._extent[t]=n;return n};Td.getApproximateExtent=function(t){t=this.getDimension(t);return this._approximateExtent[t]||this.getDataExtent(t)};Td.setApproximateExtent=function(t,e){e=this.getDimension(e);this._approximateExtent[e]=t.slice()};Td.getCalculationInfo=function(t){return this._calculationInfo[t]};Td.setCalculationInfo=function(t,e){pd(t)?N(this._calculationInfo,t):this._calculationInfo[t]=e};Td.getSum=function(t){var e=this._storage[t];var r=0;if(e){for(var i=0,a=this.count();i<a;i++){var n=this.get(t,i);if(!isNaN(n)){r+=n}}}return r};Td.rawIndexOf=function(t,e){var r=t&&this._invertedIndicesMap[t];if(A){if(!r){throw new Error("Do not supported yet")}}var i=r[e];if(i==null||isNaN(i)){return-1}return i};Td.indexOfName=function(t){for(var e=0,r=this.count();e<r;e++){if(this.getName(e)===t){return e}}return-1};Td.indexOfRawIndex=function(t){if(!this._indices){return t}if(t>=this._rawCount||t<0){return-1}var e=this._indices;var r=e[t];if(r!=null&&r<this._count&&r===t){return t}var i=0;var a=this._count-1;while(i<=a){var n=(i+a)/2|0;if(e[n]<t){i=n+1}else if(e[n]>t){a=n-1}else{return n}}return-1};Td.indicesOfNearest=function(t,e,r){var i=this._storage;var a=i[t];var n=[];if(!a){return n}if(r==null){r=Infinity}var o=Number.MAX_VALUE;var s=-1;for(var l=0,u=this.count();l<u;l++){var h=e-this.get(t,l);var f=Math.abs(h);if(h<=r&&f<=o){if(f<o||h>=0&&s<0){o=f;s=h;n.length=0}n.push(l)}}return n};Td.getRawIndex=Cd;function Cd(t){return t}function Ld(t){if(t<this._count&&t>=0){return this._indices[t]}return-1}Td.getRawDataItem=function(t){if(!this._rawData.persistent){var e=[];for(var r=0;r<this.dimensions.length;r++){var i=this.dimensions[r];e.push(this.get(i,t))}return e}else{return this._rawData.getItem(this.getRawIndex(t))}};Td.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||this._getNameFromStore(e)||""};Td.getId=function(t){return kd(this,this.getRawIndex(t))};function kd(t,e){var r=t._idList[e];if(r==null){r=t._getIdFromStore(e)}if(r==null){r=yd+e}return r}function Pd(t){if(!B(t)){t=[t]}return t}function Nd(t,e){for(var r=0;r<e.length;r++){if(!t._dimensionInfos[e[r]]){console.error("Unkown dimension "+e[r])}}}Td.each=function(t,e,r,i){"use strict";if(!this._count){return}if(typeof t==="function"){i=r;r=e;e=t;t=[]}r=r||i||this;t=T(Pd(t),this.getDimension,this);if(A){Nd(this,t)}var a=t.length;for(var n=0;n<this.count();n++){switch(a){case 0:e.call(r,n);break;case 1:e.call(r,this.get(t[0],n),n);break;case 2:e.call(r,this.get(t[0],n),this.get(t[1],n),n);break;default:var o=0;var s=[];for(;o<a;o++){s[o]=this.get(t[o],n)}s[o]=n;e.apply(r,s)}}};Td.filterSelf=function(t,e,r,i){"use strict";if(!this._count){return}if(typeof t==="function"){i=r;r=e;e=t;t=[]}r=r||i||this;t=T(Pd(t),this.getDimension,this);if(A){Nd(this,t)}var a=this.count();var n=bd(this);var o=new n(a);var s=[];var l=t.length;var u=0;var h=t[0];for(var f=0;f<a;f++){var c;var v=this.getRawIndex(f);if(l===0){c=e.call(r,f)}else if(l===1){var d=this._getFast(h,v);c=e.call(r,d,f)}else{for(var p=0;p<l;p++){s[p]=this._getFast(h,v)}s[p]=f;c=e.apply(r,s)}if(c){o[u++]=v}}if(u<a){this._indices=o}this._count=u;this._extent={};this.getRawIndex=this._indices?Ld:Cd;return this};Td.selectRange=function(t){"use strict";if(!this._count){return}var e=[];for(var r in t){if(t.hasOwnProperty(r)){e.push(r)}}if(A){Nd(this,e)}var i=e.length;if(!i){return}var a=this.count();var n=bd(this);var o=new n(a);var s=0;var l=e[0];var u=t[l][0];var h=t[l][1];var f=false;if(!this._indices){var c=0;if(i===1){var v=this._storage[e[0]];for(var d=0;d<this._chunkCount;d++){var p=v[d];var g=Math.min(this._count-d*this._chunkSize,this._chunkSize);for(var m=0;m<g;m++){var y=p[m];if(y>=u&&y<=h){o[s++]=c}c++}}f=true}else if(i===2){var v=this._storage[l];var x=this._storage[e[1]];var _=t[e[1]][0];var w=t[e[1]][1];for(var d=0;d<this._chunkCount;d++){var p=v[d];var b=x[d];var g=Math.min(this._count-d*this._chunkSize,this._chunkSize);for(var m=0;m<g;m++){var y=p[m];var S=b[m];if(y>=u&&y<=h&&S>=_&&S<=w){o[s++]=c}c++}}f=true}}if(!f){if(i===1){for(var m=0;m<a;m++){var M=this.getRawIndex(m);var y=this._getFast(l,M);if(y>=u&&y<=h){o[s++]=M}}}else{for(var m=0;m<a;m++){var I=true;var M=this.getRawIndex(m);for(var d=0;d<i;d++){var D=e[d];var y=this._getFast(r,M);if(y<t[D][0]||y>t[D][1]){I=false}}if(I){o[s++]=this.getRawIndex(m)}}}}if(s<a){this._indices=o}this._count=s;this._extent={};this.getRawIndex=this._indices?Ld:Cd;return this};Td.mapArray=function(t,e,r,i){"use strict";if(typeof t==="function"){i=r;r=e;e=t;t=[]}r=r||i||this;var a=[];this.each(t,function(){a.push(e&&e.apply(this,arguments))},r);return a};function Ed(t,e){var r=t.dimensions;var i=new Dd(T(r,t.getDimensionInfo,t),t.hostModel);Id(i,t);var a=i._storage={};var n=t._storage;var o=N({},t._rawExtent);for(var s=0;s<r.length;s++){var l=r[s];if(n[l]){if(S(e,l)>=0){a[l]=Od(n[l]);o[l]=zd()}else{a[l]=n[l]}}}return i}function Od(t){var e=new Array(t.length);for(var r=0;r<t.length;r++){e[r]=Sd(t[r])}return e}function zd(){return[Infinity,-Infinity]}Td.map=function(t,e,r,i){"use strict";r=r||i||this;t=T(Pd(t),this.getDimension,this);if(A){Nd(this,t)}var a=Ed(this,t);a._indices=this._indices;a.getRawIndex=a._indices?Ld:Cd;var n=a._storage;var o=[];var s=this._chunkSize;var l=t.length;var u=this.count();var h=[];var f=a._rawExtent;for(var c=0;c<u;c++){for(var v=0;v<l;v++){h[v]=this.get(t[v],c)}h[l]=c;var d=e&&e.apply(r,h);if(d!=null){if(typeof d!=="object"){o[0]=d;d=o}var p=this.getRawIndex(c);var g=Math.floor(p/s);var m=p%s;for(var y=0;y<d.length;y++){var x=t[y];var _=d[y];var w=f[x];var b=n[x];if(b){b[g][m]=_}if(_<w[0]){w[0]=_}if(_>w[1]){w[1]=_}}}}return a};Td.downSample=function(t,e,r,i){var a=Ed(this,[t]);var n=a._storage;var o=[];var s=Math.floor(1/e);var l=n[t];var u=this.count();var h=this._chunkSize;var f=a._rawExtent[t];var c=new(bd(this))(u);var v=0;for(var d=0;d<u;d+=s){if(s>u-d){s=u-d;o.length=s}for(var p=0;p<s;p++){var g=this.getRawIndex(d+p);var m=Math.floor(g/h);var y=g%h;o[p]=l[m][y]}var x=r(o);var _=this.getRawIndex(Math.min(d+i(o,x)||0,u-1));var w=Math.floor(_/h);var b=_%h;l[w][b]=x;if(x<f[0]){f[0]=x}if(x>f[1]){f[1]=x}c[v++]=_}a._count=v;a._indices=c;a.getRawIndex=Ld;return a};Td.getItemModel=function(t){var e=this.hostModel;return new Pl(this.getRawDataItem(t),e,e&&e.ecModel)};Td.diff=function(e){var r=this;return new ud(e?e.getIndices():[],this.getIndices(),function(t){return kd(e,t)},function(t){return kd(r,t)})};Td.getVisual=function(t){var e=this._visual;return e&&e[t]};Td.setVisual=function(t,e){if(pd(t)){for(var r in t){if(t.hasOwnProperty(r)){this.setVisual(r,t[r])}}return}this._visual=this._visual||{};this._visual[t]=e};Td.setLayout=function(t,e){if(pd(t)){for(var r in t){if(t.hasOwnProperty(r)){this.setLayout(r,t[r])}}return}this._layout[t]=e};Td.getLayout=function(t){return this._layout[t]};Td.getItemLayout=function(t){return this._itemLayouts[t]};Td.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?N(this._itemLayouts[t]||{},e):e};Td.clearItemLayouts=function(){this._itemLayouts.length=0};Td.getItemVisual=function(t,e,r){var i=this._itemVisuals[t];var a=i&&i[e];if(a==null&&!r){return this.getVisual(e)}return a};Td.setItemVisual=function(t,e,r){var i=this._itemVisuals[t]||{};var a=this.hasItemVisual;this._itemVisuals[t]=i;if(pd(e)){for(var n in e){if(e.hasOwnProperty(n)){i[n]=e[n];a[n]=true}}return}i[e]=r;a[e]=true};Td.clearAllVisual=function(){this._visual={};this._itemVisuals=[];this.hasItemVisual={}};var Rd=function(t){t.seriesIndex=this.seriesIndex;t.dataIndex=this.dataIndex;t.dataType=this.dataType};Td.setItemGraphicEl=function(t,e){var r=this.hostModel;if(e){e.dataIndex=t;e.dataType=this.dataType;e.seriesIndex=r&&r.seriesIndex;if(e.type==="group"){e.traverse(Rd,e)}}this._graphicEls[t]=e};Td.getItemGraphicEl=function(t){return this._graphicEls[t]};Td.eachItemGraphicEl=function(r,i){L(this._graphicEls,function(t,e){if(t){r&&r.call(i,t,e)}})};Td.cloneShallow=function(t){if(!t){var e=T(this.dimensions,this.getDimensionInfo,this);t=new Dd(e,this.hostModel)}t._storage=this._storage;Id(t,this);if(this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else{t._indices=null}t.getRawIndex=t._indices?Ld:Cd;t._extent=P(this._extent);t._approximateExtent=P(this._approximateExtent);return t};Td.wrapMethod=function(t,e){var r=this[t];if(typeof r!=="function"){return}this.__wrappedMethods=this.__wrappedMethods||[];this.__wrappedMethods.push(t);this[t]=function(){var t=r.apply(this,arguments);return e.apply(this,[t].concat(q(arguments)))}};Td.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"];Td.CHANGABLE_METHODS=["filterSelf","selectRange"];function Bd(t,e,r){if(!eh.isInstance(e)){e=eh.seriesDataToSource(e)}r=r||{};t=(t||[]).slice();var i=(r.dimsDef||[]).slice();var l=it(r.encodeDef);var a=it();var n=it();var u=[];var o=Vd(e,t,i,r.dimCount);for(var s=0;s<o;s++){var h=i[s]=N({},F(i[s])?i[s]:{name:i[s]});var f=h.name;var c=u[s]={otherDims:{}};if(f!=null&&a.get(f)==null){c.name=c.displayName=f;a.set(f,s)}h.type!=null&&(c.type=h.type);h.displayName!=null&&(c.displayName=h.displayName)}l.each(function(t,r){t=Fa(t).slice();var i=l.set(r,[]);L(t,function(t,e){G(t)&&(t=a.get(t));if(t!=null&&t<o){i[e]=t;d(u[t],r,e)}})});var v=0;L(t,function(i,t){var a;var i;var n;var o;if(G(i)){a=i;i={}}else{a=i.name;var e=i.ordinalMeta;i.ordinalMeta=null;i=P(i);i.ordinalMeta=e;n=i.dimsDef;o=i.otherDims;i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var r=Fa(l.get(a));if(!r.length){for(var s=0;s<(n&&n.length||1);s++){while(v<u.length&&u[v].coordDim!=null){v++}v<u.length&&r.push(v++)}}L(r,function(t,e){var r=u[t];d(C(r,i),a,e);if(r.name==null&&n){r.name=r.displayName=n[e]}o&&C(r.otherDims,o)})});function d(t,e,r){if(fd.get(e)!=null){t.otherDims[e]=r}else{t.coordDim=e;t.coordDimIndex=r;n.set(e,true)}}var p=r.generateCoord;var g=r.generateCoordCount;var m=g!=null;g=p?g||1:0;var y=p||"value";for(var x=0;x<o;x++){var c=u[x]=u[x]||{};var _=c.coordDim;if(_==null){c.coordDim=Gd(y,n,m);c.coordDimIndex=0;if(!p||g<=0){c.isExtraCoord=true}g--}c.name==null&&(c.name=Gd(c.coordDim,a));if(c.type==null&&vh(e,x,c.name)){c.type="ordinal"}}return u}function Vd(t,e,r,i){var a=Math.max(t.dimensionsDetectCount||1,e.length,r.length,i||0);L(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))});return a}function Gd(t,e,r){if(r||e.get(t)!=null){var i=0;while(e.get(t+i)!=null){i++}t+=i}e.set(t,true);return t}var Fd=function(t,e){e=e||{};return Bd(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function Wd(t,r,e){e=e||{};var i=e.byIndex;var a=e.stackedCoordDimension;var n=!!(t&&t.get("stack"));var o;var s;var l;var u;L(r,function(t,e){if(G(t)){r[e]=t={name:t}}if(n&&!t.isExtraCoord){if(!i&&!o&&t.ordinalMeta){o=t}if(!s&&t.type!=="ordinal"&&t.type!=="time"&&(!a||a===t.coordDim)){s=t}}});if(s&&(i||o)){l="__\0ecstackresult";u="__\0ecstackedover";if(o){o.createInvertedIndices=true}var h=s.coordDim;var f=s.type;var c=0;L(r,function(t){if(t.coordDim===h){c++}});r.push({name:l,coordDim:h,coordDimIndex:c,type:f,isExtraCoord:true,isCalculationCoord:true});c++;r.push({name:u,coordDim:u,coordDimIndex:c,type:f,isExtraCoord:true,isCalculationCoord:true})}return{stackedDimension:s&&s.name,stackedByDimension:o&&o.name,isStackedByIndex:i,stackedOverDimension:u,stackResultDimension:l}}function Hd(t,e,r){return e&&e===t.getCalculationInfo("stackedDimension")&&(r!=null?r===t.getCalculationInfo("stackedByDimension"):t.getCalculationInfo("isStackedByIndex"))}function Zd(t,e,r){r=r||{};if(!eh.isInstance(t)){t=eh.seriesDataToSource(t)}var i=e.get("coordinateSystem");var a=Ah.get(i);var n=Zu(e);var o;if(n){o=T(n.coordSysDims,function(t){var e={name:t};var r=n.axisMap.get(t);if(r){var i=r.get("type");e.type=vd(i)}return e})}if(!o){o=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]}var s=Fd(t,{coordDimensions:o,generateCoord:r.generateCoord});var l;var u;n&&L(s,function(t,e){var r=t.coordDim;var i=n.categoryAxisMap.get(r);if(i){if(l==null){l=e}t.ordinalMeta=i.getOrdinalMeta()}if(t.otherDims.itemName!=null){u=true}});if(!u&&l!=null){s[l].otherDims.itemName=0}var h=Wd(e,s);var f=new Dd(s,e);f.setCalculationInfo(h);var c=l!=null&&Ud(t)?function(t,e,r,i){return i===l?r:this.defaultDimValueGetter(t,e,r,i)}:null;f.hasItemOption=false;f.initData(t,null,c);return f}function Ud(t){if(t.sourceFormat===Xu){var e=jd(t.data||[]);return e!=null&&!B(Za(e))}}function jd(t){var e=0;while(e<t.length&&t[e]==null){e++}return t[e]}function Xd(t){this._setting=t||{};this._extent=[Infinity,-Infinity];this._interval=0;this.init&&this.init.apply(this,arguments)}Xd.prototype.parse=function(t){return t};Xd.prototype.getSetting=function(t){return this._setting[t]};Xd.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]};Xd.prototype.normalize=function(t){var e=this._extent;if(e[1]===e[0]){return.5}return(t-e[0])/(e[1]-e[0])};Xd.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]};Xd.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]);t[1]>e[1]&&(e[1]=t[1])};Xd.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))};Xd.prototype.getExtent=function(){return this._extent.slice()};Xd.prototype.setExtent=function(t,e){var r=this._extent;if(!isNaN(t)){r[0]=t}if(!isNaN(e)){r[1]=e}};Xd.prototype.getTicksLabels=function(){var t=[];var e=this.getTicks();for(var r=0;r<e.length;r++){t.push(this.getLabel(e[r]))}return t};Xd.prototype.isBlank=function(){return this._isBlank},Xd.prototype.setBlank=function(t){this._isBlank=t};un(Xd);dn(Xd,{registerWhenExtend:true});function Yd(t){this.categories=t.categories||[];this._needCollect=t.needCollect;this._deduplication=t.deduplication;this._map}Yd.createByAxisModel=function(t){var e=t.option;var r=e.data;var i=r&&T(r,Kd);return new Yd({categories:i,needCollect:!i,deduplication:e.dedplication!==false})};var qd=Yd.prototype;qd.getOrdinal=function(t){return $d(this).get(t)};qd.parseAndCollect=function(t){var e;var r=this._needCollect;if(typeof t!=="string"&&!r){return t}if(r&&!this._deduplication){e=this.categories.length;this.categories[e]=t;return e}var i=$d(this);e=i.get(t);if(e==null){if(r){e=this.categories.length;this.categories[e]=t;i.set(t,e)}else{e=NaN}}return e};function $d(t){return t._map||(t._map=it(t.categories))}function Kd(t){if(F(t)&&t.value!=null){return t.value}else{return t+""}}var Jd=Xd.prototype;var Qd=Xd.extend({type:"ordinal",init:function(t,e){if(!t||B(t)){t=new Yd({categories:t})}this._ordinalMeta=t;this._extent=e||[0,t.categories.length-1]},parse:function(t){return typeof t==="string"?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){t=this.parse(t);return Jd.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return Jd.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Jd.scale.call(this,t))},getTicks:function(){var t=[];var e=this._extent;var r=e[0];while(r<=e[1]){t.push(r);r++}return t},getLabel:function(t){return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:nt,niceExtent:nt});Qd.create=function(){return new Qd};var tp=Hl;function ep(t,e,r,i){var a={};var n=t[1]-t[0];var o=a.interval=ru(n/e,true);if(r!=null&&o<r){o=a.interval=r}if(i!=null&&o>i){o=a.interval=i}var s=a.intervalPrecision=rp(o);var l=a.niceTickExtent=[tp(Math.ceil(t[0]/o)*o,s),tp(Math.floor(t[1]/o)*o,s)];ap(l,t);return a}function rp(t){return jl(t)+2}function ip(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function ap(t,e){!isFinite(t[0])&&(t[0]=e[0]);!isFinite(t[1])&&(t[1]=e[1]);ip(t,0,e);ip(t,1,e);if(t[0]>t[1]){t[0]=t[1]}}function np(t,e,r,i){var a=[];if(!t){return a}var n=1e4;if(e[0]<r[0]){a.push(e[0])}var o=r[0];while(o<=r[1]){a.push(o);o=tp(o+t,i);if(o===a[a.length-1]){break}if(a.length>n){return[]}}if(e[1]>(a.length?a[a.length-1]:r[1])){a.push(e[1])}return a}var op=Hl;var sp=Xd.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var r=this._extent;if(!isNaN(t)){r[0]=parseFloat(t)}if(!isNaN(e)){r[1]=parseFloat(e)}},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]);t[1]>e[1]&&(e[1]=t[1]);sp.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=rp(t)},getTicks:function(){return np(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){var t=[];var e=this.getTicks();for(var r=0;r<e.length;r++){t.push(this.getLabel(e[r]))}return t},getLabel:function(t,e){if(t==null){return""}var r=e&&e.precision;if(r==null){r=jl(t)||0}else if(r==="auto"){r=this._intervalPrecision}t=op(t,r,true);return ou(t)},niceTicks:function(t,e,r){t=t||5;var i=this._extent;var a=i[1]-i[0];if(!isFinite(a)){return}if(a<0){a=-a;i.reverse()}var n=ep(i,t,e,r);this._intervalPrecision=n.intervalPrecision;this._interval=n.interval;this._niceExtent=n.niceTickExtent},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]){if(e[0]!==0){var r=e[0];if(!t.fixMax){e[1]+=r/2;e[0]-=r/2}else{e[0]-=r/2}}else{e[1]=1}}var i=e[1]-e[0];if(!isFinite(i)){e[0]=0;e[1]=1}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;if(!t.fixMin){e[0]=op(Math.floor(e[0]/a)*a)}if(!t.fixMax){e[1]=op(Math.ceil(e[1]/a)*a)}}});sp.create=function(){return new sp};var lp="__ec_stack_";function up(t){return t.get("stack")||lp+t.seriesIndex}function hp(t){return t.dim+t.index}function fp(t,e){var r=[];var i=t.axis;var a="axis0";if(i.type!=="category"){return}var n=i.getBandWidth();for(var o=0;o<t.count||0;o++){r.push(C({bandWidth:n,axisKey:a,stackId:lp+o},t))}var s=vp(r,e);var l=[];for(var o=0;o<t.count;o++){var u=s[a][lp+o];u.offsetCenter=u.offset+u.width/2;l.push(u)}return l}function cp(t,e){var r=T(t,function(t){var e=t.getData();var r=t.coordinateSystem;var i=r.getBaseAxis();var a=i.getExtent();var n=i.type==="category"?i.getBandWidth():Math.abs(a[1]-a[0])/e.count();var o=Wl(t.get("barWidth"),n);var s=Wl(t.get("barMaxWidth"),n);var l=t.get("barGap");var u=t.get("barCategoryGap");return{bandWidth:n,barWidth:o,barMaxWidth:s,barGap:l,barCategoryGap:u,axisKey:hp(i),stackId:up(t)}});return vp(r,e)}function vp(t,e){var f={};L(t,function(t,e){var r=t.axisKey;var i=t.bandWidth;var a=f[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}};var n=a.stacks;f[r]=a;var o=t.stackId;if(!n[o]){a.autoWidthCount++}n[o]=n[o]||{width:0,maxWidth:0};var s=t.barWidth;if(s&&!n[o].width){n[o].width=s;s=Math.min(a.remainedWidth,s);a.remainedWidth-=s}var l=t.barMaxWidth;l&&(n[o].maxWidth=l);var u=t.barGap;u!=null&&(a.gap=u);var h=t.barCategoryGap;h!=null&&(a.categoryGap=h)});var c={};L(f,function(t,r){c[r]={};var e=t.stacks;var i=t.bandWidth;var a=Wl(t.categoryGap,i);var n=Wl(t.gap,1);var o=t.remainedWidth;var s=t.autoWidthCount;var l=(o-a)/(s+(s-1)*n);l=Math.max(l,0);L(e,function(t,e){var r=t.maxWidth;if(r&&r<l){r=Math.min(r,o);if(t.width){r=Math.min(r,t.width)}o-=r;t.width=r;s--}});l=(o-a)/(s+(s-1)*n);l=Math.max(l,0);var u=0;var h;L(e,function(t,e){if(!t.width){t.width=l}h=t;u+=t.width*(1+n)});if(h){u-=h.width*n}var f=-u/2;L(e,function(t,e){c[r][e]=c[r][e]||{offset:f,width:t.width};f+=t.width*(1+n)})});return c}function dp(t,e,r){var i=k(e.getSeriesByType(t),function(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"});var D=cp(i);var T={};L(i,function(t){var e=t.getData();var r=t.coordinateSystem;var i=r.getBaseAxis();var a=up(t);var n=D[hp(i)][a];var o=n.offset;var s=n.width;var l=r.getOtherAxis(i);var u=t.get("barMinHeight")||0;T[a]=T[a]||[];e.setLayout({offset:o,size:s});var h=e.mapDimension(l.dim);var f=e.mapDimension(i.dim);var c=Hd(e,h,f);var v=l.isHorizontal();var d=i.onZero||c?l.toGlobalCoord(l.dataToCoord(0)):l.getGlobalExtent()[0];for(var p=0,g=e.count();p<g;p++){var m=e.get(h,p);var y=e.get(f,p);if(isNaN(m)){continue}var x=m>=0?"p":"n";var _=d;if(c){if(!T[a][y]){T[a][y]={p:d,n:d}}_=T[a][y][x]}var w;var b;var S;var M;if(v){var I=r.dataToPoint([m,y]);w=_;b=I[1]+o;S=I[0]-d;M=s;if(Math.abs(S)<u){S=(S<0?-1:1)*u}c&&(T[a][y][x]+=S)}else{var I=r.dataToPoint([y,m]);w=I[0]+o;b=_;S=s;M=I[1]-d;if(Math.abs(M)<u){M=(M<=0?-1:1)*u}c&&(T[a][y][x]+=M)}e.setItemLayout(p,{x:w,y:b,width:S,height:M})}},this)}var pp=sp.prototype;var gp=Math.ceil;var mp=Math.floor;var yp=1e3;var xp=yp*60;var _p=xp*60;var wp=_p*24;var bp=function(t,e,r,i){while(r<i){var a=r+i>>>1;if(t[a][1]<e){r=a+1}else{i=a}}return r};var Sp=sp.extend({type:"time",getLabel:function(t){var e=this._stepLvl;var r=new Date(t);return gu(e[0],r,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]){e[0]-=wp;e[1]+=wp}if(e[1]===-Infinity&&e[0]===Infinity){var r=new Date;e[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate());e[0]=e[1]-wp}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;if(!t.fixMin){e[0]=Hl(mp(e[0]/i)*i)}if(!t.fixMax){e[1]=Hl(gp(e[1]/i)*i)}},niceTicks:function(t,e,r){t=t||10;var i=this._extent;var a=i[1]-i[0];var n=a/t;if(e!=null&&n<e){n=e}if(r!=null&&n>r){n=r}var o=Mp.length;var s=bp(Mp,n,0,o);var l=Mp[Math.min(s,o-1)];var u=l[1];if(l[0]==="year"){var h=a/u;var f=ru(h/t,true);u*=f}var c=this.getSetting("useUTC")?0:new Date(+i[0]||+i[1]).getTimezoneOffset()*60*1e3;var v=[Math.round(gp((i[0]-c)/u)*u+c),Math.round(mp((i[1]-c)/u)*u+c)];ap(v,i);this._stepLvl=l;this._interval=u;this._niceExtent=v},parse:function(t){return+Ql(t)}});L(["contain","normalize"],function(e){Sp.prototype[e]=function(t){return pp[e].call(this,this.parse(t))}});var Mp=[["hh:mm:ss",yp],["hh:mm:ss",yp*5],["hh:mm:ss",yp*10],["hh:mm:ss",yp*15],["hh:mm:ss",yp*30],["hh:mm\nMM-dd",xp],["hh:mm\nMM-dd",xp*5],["hh:mm\nMM-dd",xp*10],["hh:mm\nMM-dd",xp*15],["hh:mm\nMM-dd",xp*30],["hh:mm\nMM-dd",_p],["hh:mm\nMM-dd",_p*2],["hh:mm\nMM-dd",_p*6],["hh:mm\nMM-dd",_p*12],["MM-dd\nyyyy",wp],["MM-dd\nyyyy",wp*2],["MM-dd\nyyyy",wp*3],["MM-dd\nyyyy",wp*4],["MM-dd\nyyyy",wp*5],["MM-dd\nyyyy",wp*6],["week",wp*7],["MM-dd\nyyyy",wp*10],["week",wp*14],["week",wp*21],["month",wp*31],["week",wp*42],["month",wp*62],["week",wp*42],["quarter",wp*380/4],["month",wp*31*4],["month",wp*31*5],["half-year",wp*380/2],["month",wp*31*8],["month",wp*31*10],["year",wp*380]];Sp.create=function(t){return new Sp({useUTC:t.ecModel.get("useUTC")})};var Ip=Xd.prototype;var Dp=sp.prototype;var Tp=jl;var Ap=Hl;var Cp=Math.floor;var Lp=Math.ceil;var kp=Math.pow;var Pp=Math.log;var Np=Xd.extend({type:"log",base:10,$constructor:function(){Xd.apply(this,arguments);this._originalScale=new sp},getTicks:function(){var r=this._originalScale;var i=this._extent;var a=r.getExtent();return T(Dp.getTicks.call(this),function(t){var e=Hl(kp(this.base,t));e=t===i[0]&&r.__fixMin?Ep(e,a[0]):e;e=t===i[1]&&r.__fixMax?Ep(e,a[1]):e;return e},this)},getLabel:Dp.getLabel,scale:function(t){t=Ip.scale.call(this,t);return kp(this.base,t)},setExtent:function(t,e){var r=this.base;t=Pp(t)/Pp(r);e=Pp(e)/Pp(r);Dp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base;var e=Ip.getExtent.call(this);e[0]=kp(t,e[0]);e[1]=kp(t,e[1]);var r=this._originalScale;var i=r.getExtent();r.__fixMin&&(e[0]=Ep(e[0],i[0]));r.__fixMax&&(e[1]=Ep(e[1],i[1]));return e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Pp(t[0])/Pp(e);t[1]=Pp(t[1])/Pp(e);Ip.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent;var r=e[1]-e[0];if(r===Infinity||r<=0){return}var i=tu(r);var a=t/r*i;if(a<=.5){i*=10}while(!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0){i*=10}var n=[Hl(Lp(e[0]/i)*i),Hl(Cp(e[1]/i)*i)];this._interval=i;this._niceExtent=n},niceExtent:function(t){Dp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin;e.__fixMax=t.fixMax}});L(["contain","normalize"],function(e){Np.prototype[e]=function(t){t=Pp(t)/Pp(this.base);return Ip[e].call(this,t)}});Np.create=function(){return new Np};function Ep(t,e){return Ap(t,Tp(e))}function Op(t,e){var r=t.type;var i=e.getMin();var a=e.getMax();var n=i!=null;var o=a!=null;var s=t.getExtent();var l;var u;var h;if(r==="ordinal"){l=e.getCategories().length}else{u=e.get("boundaryGap");if(!B(u)){u=[u||0,u||0]}if(typeof u[0]==="boolean"){if(A){console.warn("Boolean type for boundaryGap is only "+"allowed for ordinal axis. Please use string in "+'percentage instead, e.g., "20%". Currently, '+"boundaryGap is set to be 0.")}u=[0,0]}u[0]=Wl(u[0],1);u[1]=Wl(u[1],1);h=s[1]-s[0]||Math.abs(s[0])}if(i==null){i=r==="ordinal"?l?0:NaN:s[0]-u[0]*h}if(a==null){a=r==="ordinal"?l?l-1:NaN:s[1]+u[1]*h}if(i==="dataMin"){i=s[0]}else if(typeof i==="function"){i=i({min:s[0],max:s[1]})}if(a==="dataMax"){a=s[1]}else if(typeof a==="function"){a=a({min:s[0],max:s[1]})}(i==null||!isFinite(i))&&(i=NaN);(a==null||!isFinite(a))&&(a=NaN);t.setBlank(U(i)||U(a));if(e.getNeedCrossZero()){if(i>0&&a>0&&!n){i=0}if(i<0&&a<0&&!o){a=0}}var f=e.ecModel;if(f&&r==="time"){var c=[];var v;L(f.getSeriesByType("bar"),function(t){if(t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"){c.push(t);v|=t.getBaseAxis()===e.axis}});if(v){var d=zp(i,a,e,c);i=d.min;a=d.max}}return[i,a]}function zp(t,e,r,i){var a=r.axis.getExtent();var n=a[1]-a[0];var o=cp(i);var s=r.axis.dim+r.axis.index;var l=o[s];if(l===undefined){return{min:t,max:e}}var u=Infinity;L(l,function(t){u=Math.min(t.offset,u)});var h=-Infinity;L(l,function(t){h=Math.max(t.offset+t.width,h)});u=Math.abs(u);h=Math.abs(h);var f=u+h;var c=e-t;var v=1-(u+h)/n;var d=c/v-c;e+=d*(h/f);t-=d*(u/f);return{min:t,max:e}}function Rp(t,e){var r=Op(t,e);var i=e.getMin()!=null;var a=e.getMax()!=null;var n=e.get("splitNumber");if(t.type==="log"){t.base=e.get("logBase")}var o=t.type;t.setExtent(r[0],r[1]);t.niceExtent({splitNumber:n,fixMin:i,fixMax:a,minInterval:o==="interval"||o==="time"?e.get("minInterval"):null,maxInterval:o==="interval"||o==="time"?e.get("maxInterval"):null});var s=e.get("interval");if(s!=null){t.setInterval&&t.setInterval(s)}}function Bp(t,e){e=e||t.get("type");if(e){switch(e){case"category":return new Qd(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[Infinity,-Infinity]);case"value":return new sp;default:return(Xd.getClass(e)||sp).create(t)}}}function Vp(t){var e=t.scale.getExtent();var r=e[0];var i=e[1];return!(r>0&&i>0||r<0&&i<0)}function Gp(t,e,r,i,a){var n;var o=0;var s=0;var l=(i-a)/180*Math.PI;var u=1;if(e.length>40){u=Math.floor(e.length/40)}for(var h=0;h<t.length;h+=u){var f=t[h];var c=Jr(e[h],r,"center","top");c.x+=f*Math.cos(l);c.y+=f*Math.sin(l);c.width*=1.3;c.height*=1.3;if(!n){n=c.clone()}else if(n.intersect(c)){s++;o=Math.max(o,s)}else{n.union(c);s=0}}if(o===0&&u>1){return u}return(o+1)*u-1}function Fp(r,i){var t=r.scale;var e=t.getTicksLabels();var a=t.getTicks();if(typeof i==="string"){i=function(e){return function(t){return e.replace("{value}",t!=null?t:"")}}(i);return T(e,i)}else if(typeof i==="function"){return T(a,function(t,e){return i(Wp(r,t),e)},this)}else{return e}}function Wp(t,e){return t.type==="category"?t.scale.getLabel(e):e}var Hp={getFormattedLabels:function(){return Fp(this.axis,this.get("axisLabel.formatter"))},getMin:function(t){var e=this.option;var r=!t&&e.rangeStart!=null?e.rangeStart:e.min;if(this.axis&&r!=null&&r!=="dataMin"&&typeof r!=="function"&&!U(r)){r=this.axis.scale.parse(r)}return r},getMax:function(t){var e=this.option;var r=!t&&e.rangeEnd!=null?e.rangeEnd:e.max;if(this.axis&&r!=null&&r!=="dataMax"&&typeof r!=="function"&&!U(r)){r=this.axis.scale.parse(r)}return r},getNeedCrossZero:function(){var t=this.option;return t.rangeStart!=null||t.rangeEnd!=null?false:!t.scale},getCoordSysModel:nt,setRange:function(t,e){this.option.rangeStart=t;this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}};var Zp=zs({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx;var i=e.cy;var a=e.width/2;var n=e.height/2;t.moveTo(r,i-n);t.lineTo(r+a,i+n);t.lineTo(r-a,i+n);t.closePath()}});var Up=zs({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx;var i=e.cy;var a=e.width/2;var n=e.height/2;t.moveTo(r,i-n);t.lineTo(r+a,i);t.lineTo(r,i+n);t.lineTo(r-a,i);t.closePath()}});var jp=zs({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x;var i=e.y;var a=e.width/5*3;var n=Math.max(a,e.height);var o=a/2;var s=o*o/(n-o);var l=i-n+o+s;var u=Math.asin(s/o);var h=Math.cos(u)*o;var f=Math.sin(u);var c=Math.cos(u);var v=o*.6;var d=o*.7;t.moveTo(r-h,l+s);t.arc(r,l,o,Math.PI-u,Math.PI*2+u);t.bezierCurveTo(r+h-f*v,l+s+c*v,r,i-d,r,i);t.bezierCurveTo(r,i-d,r-h+f*v,l+s+c*v,r-h,l+s);t.closePath()}});var Xp=zs({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height;var i=e.width;var a=e.x;var n=e.y;var o=i/3*2;t.moveTo(a,n);t.lineTo(a+o,n+r);t.lineTo(a,n+r/4*3);t.lineTo(a-o,n+r);t.lineTo(a,n);t.closePath()}});var Yp={line:ws,rect:_s,roundRect:_s,square:_s,circle:us,diamond:Up,pin:jp,arrow:Xp,triangle:Zp};var qp={line:function(t,e,r,i,a){a.x1=t;a.y1=e+i/2;a.x2=t+r;a.y2=e+i/2},rect:function(t,e,r,i,a){a.x=t;a.y=e;a.width=r;a.height=i},roundRect:function(t,e,r,i,a){a.x=t;a.y=e;a.width=r;a.height=i;a.r=Math.min(r,i)/4},square:function(t,e,r,i,a){var n=Math.min(r,i);a.x=t;a.y=e;a.width=n;a.height=n},circle:function(t,e,r,i,a){a.cx=t+r/2;a.cy=e+i/2;a.r=Math.min(r,i)/2},diamond:function(t,e,r,i,a){a.cx=t+r/2;a.cy=e+i/2;a.width=r;a.height=i},pin:function(t,e,r,i,a){a.x=t+r/2;a.y=e+i/2;a.width=r;a.height=i},arrow:function(t,e,r,i,a){a.x=t+r/2;a.y=e+i/2;a.width=r;a.height=i},triangle:function(t,e,r,i,a){a.cx=t+r/2;a.cy=e+i/2;a.width=r;a.height=i}};var $p={};L(Yp,function(t,e){$p[e]=new t});var Kp=zs({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;var e=this.shape;if(e.symbolType==="pin"&&t.textPosition==="inside"){t.textPosition=["50%","40%"];t.textAlign="center";t.textVerticalAlign="middle"}},buildPath:function(t,e,r){var i=e.symbolType;var a=$p[i];if(e.symbolType!=="none"){if(!a){i="rect";a=$p[i]}qp[i](e.x,e.y,e.width,e.height,a.shape);a.buildPath(t,a.shape,r)}}});function Jp(t,e){if(this.type!=="image"){var r=this.style;var i=this.shape;if(i&&i.symbolType==="line"){r.stroke=t}else if(this.__isEmptyBrush){r.stroke=t;r.fill=e||"#fff"}else{r.fill&&(r.fill=t);r.stroke&&(r.stroke=t)}this.dirty(false)}}function Qp(t,e,r,i,a,n,o){var s=t.indexOf("empty")===0;if(s){t=t.substr(5,1).toLowerCase()+t.substr(6)}var l;if(t.indexOf("image://")===0){l=Vs(t.slice(8),new fr(e,r,i,a),o?"center":"cover")}else if(t.indexOf("path://")===0){l=Bs(t.slice(7),{},new fr(e,r,i,a),o?"center":"cover")}else{l=new Kp({shape:{symbolType:t,x:e,y:r,width:i,height:a}})}l.__isEmptyBrush=s;l.setColor=Jp;l.setColor(n);return l}function tg(t){return Zd(t.getSource(),t)}var eg={isDimensionStacked:Hd,enableDataStack:Wd};function rg(t,e){var r=e;if(!Pl.isInstance(e)){r=new Pl(e);I(r,Hp)}var i=Bp(r);i.setExtent(t[0],t[1]);Rp(i,r);return i}function ig(t){I(t,Hp)}var ag=(Object.freeze||Object)({createList:tg,getLayoutRect:Cu,dataStack:eg,createScale:rg,mixinAxisModelCommonMethods:ig,completeDimensions:Bd,createDimensions:Fd,createSymbol:Qp});var ng=1e-8;function og(t,e){return Math.abs(t-e)<ng}function sg(t,e,r){var i=0;var a=t[0];if(!a){return false}for(var n=1;n<t.length;n++){var o=t[n];i+=Io(a[0],a[1],o[0],o[1],e,r);a=o}var s=t[0];if(!og(a[0],s[0])||!og(a[1],s[1])){i+=Io(a[0],a[1],s[0],s[1],e,r)}return i!==0}function lg(t,e,r){this.name=t;this.geometries=e;if(!r){var i=this.getBoundingRect();r=[i.x+i.width/2,i.y+i.height/2]}else{r=[r[0],r[1]]}this.center=r}lg.prototype={constructor:lg,properties:null,getBoundingRect:function(){var t=this._rect;if(t){return t}var e=Number.MAX_VALUE;var r=[e,e];var i=[-e,-e];var a=[];var n=[];var o=this.geometries;for(var s=0;s<o.length;s++){if(o[s].type!=="polygon"){continue}var l=o[s].exterior;Kn(l,a,n);kt(r,r,a);Pt(i,i,n)}if(s===0){r[0]=r[1]=i[0]=i[1]=0}return this._rect=new fr(r[0],r[1],i[0]-r[0],i[1]-r[1])},contain:function(t){var e=this.getBoundingRect();var r=this.geometries;if(!e.contain(t[0],t[1])){return false}t:for(var i=0,a=r.length;i<a;i++){if(r[i].type!=="polygon"){continue}var n=r[i].exterior;var o=r[i].interiors;if(sg(n,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++){if(sg(o[s])){continue t}}return true}}return false},transformTo:function(t,e,r,i){var a=this.getBoundingRect();var n=a.width/a.height;if(!r){r=n*i}else if(!i){i=r/n}var o=new fr(t,e,r,i);var s=a.calculateTransform(o);var l=this.geometries;for(var u=0;u<l.length;u++){if(l[u].type!=="polygon"){continue}var h=l[u].exterior;var f=l[u].interiors;for(var c=0;c<h.length;c++){Lt(h[c],h[c],s)}for(var v=0;v<(f?f.length:0);v++){for(var c=0;c<f[v].length;c++){Lt(f[v][c],f[v][c],s)}}}a=this._rect;a.copy(o);this.center=[a.x+a.width/2,a.y+a.height/2]}};function ug(t){if(!t.UTF8Encoding){return t}var e=t.UTF8Scale;if(e==null){e=1024}var r=t.features;for(var i=0;i<r.length;i++){var a=r[i];var n=a.geometry;var o=n.coordinates;var s=n.encodeOffsets;for(var l=0;l<o.length;l++){var u=o[l];if(n.type==="Polygon"){o[l]=hg(u,s[l],e)}else if(n.type==="MultiPolygon"){for(var h=0;h<u.length;h++){var f=u[h];u[h]=hg(f,s[l][h],e)}}}}t.UTF8Encoding=false;return t}function hg(t,e,r){var i=[];var a=e[0];var n=e[1];for(var o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64;var l=t.charCodeAt(o+1)-64;s=s>>1^-(s&1);l=l>>1^-(l&1);s+=a;l+=n;a=s;n=l;i.push([s/r,l/r])}return i}var fg=function(t){ug(t);return T(k(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties;var r=t.geometry;var i=r.coordinates;var a=[];if(r.type==="Polygon"){a.push({type:"polygon",exterior:i[0],interiors:i.slice(1)})}if(r.type==="MultiPolygon"){L(i,function(t){if(t[0]){a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}})}var n=new lg(e.name,a,e.cp);n.properties=e;return n})};var cg=Fl;function vg(t,e){var r=t[1]-t[0];var i=e;var a=r/i/2;t[0]+=a;t[1]-=a}var dg=[0,1];var pg=function(t,e,r){this.dim=t;this.scale=e;this._extent=r||[0,0];this.inverse=false;this.onBand=false;this._labelInterval};pg.prototype={constructor:pg,contain:function(t){var e=this._extent;var r=Math.min(e[0],e[1]);var i=Math.max(e[0],e[1]);return t>=r&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Xl(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var r=this._extent;r[0]=t;r[1]=e},dataToCoord:function(t,e){var r=this._extent;var i=this.scale;t=i.normalize(t);if(this.onBand&&i.type==="ordinal"){r=r.slice();vg(r,i.count())}return cg(t,dg,r,e)},coordToData:function(t,e){var r=this._extent;var i=this.scale;if(this.onBand&&i.type==="ordinal"){r=r.slice();vg(r,i.count())}var a=cg(t,r,dg,e);return this.scale.scale(a)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){var e=this.getBands();var r=[];for(var i=0;i<e.length;i++){r.push(e[i][0])}if(e[i-1]){r.push(e[i-1][1])}return r}else{return T(this.scale.getTicks(),this.dataToCoord,this)}},getLabelsCoords:function(){return T(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){var t=this.getExtent();var e=[];var r=this.scale.count();var i=t[0];var a=t[1];var n=a-i;for(var o=0;o<r;o++){e.push([n*o/r+i,n*(o+1)/r+i])}return e},getBandWidth:function(){var t=this._extent;var e=this.scale.getExtent();var r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/r},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model;var r=e.getModel("axisLabel");t=r.get("interval");if(this.type==="category"&&(t==null||t==="auto")){t=Gp(T(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),r.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,r.get("rotate"))}this._labelInterval=t}return t}};var gg=fg;var mg={};L(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){mg[t]=ot[t]});var yg=td({type:"dataset",defaultOption:{seriesLayoutBy:Qu,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){ih(this)}});ed({type:"dataset"});Tf.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(A){var r=t.coordinateSystem;if(r!=="polar"&&r!=="cartesian2d"){throw new Error("Line not support coordinateSystem besides cartesian and polar")}}return Zd(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:true,hoverAnimation:true,clipOverflow:true,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:false,smooth:false,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:true,showAllSymbol:false,connectNulls:false,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:Infinity}});function xg(t,e){var r=t.mapDimension("defaultedLabel",true);var i=r.length;if(i===1){return yf(t,e,r[0])}else if(i){var a=[];for(var n=0;n<r.length;n++){var o=yf(t,e,r[n]);a.push(o)}return a.join(" ")}}function _g(t,e){var r=t.getItemVisual(e,"symbolSize");return r instanceof Array?r.slice():[+r,+r]}function wg(t){return[t[0]/2,t[1]/2]}function bg(t,e,r){cr.call(this);this.updateData(t,e,r)}var Sg=bg.prototype;function Mg(t,e){this.parent.drift(t,e)}Sg._createSymbol=function(t,e,r,i){this.removeAll();var a=e.getItemVisual(r,"color");var n=Qp(t,-1,-1,2,2,a);n.attr({z2:100,culling:true,scale:wg(i)});n.drift=Mg;this._symbolType=t;this.add(n)};Sg.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)};Sg.getSymbolPath=function(){return this.childAt(0)};Sg.getScale=function(){return this.childAt(0).scale};Sg.highlight=function(){this.childAt(0).trigger("emphasis")};Sg.downplay=function(){this.childAt(0).trigger("normal")};Sg.setZ=function(t,e){var r=this.childAt(0);r.zlevel=t;r.z=e};Sg.setDraggable=function(t){var e=this.childAt(0);e.draggable=t;e.cursor=t?"move":"pointer"};Sg.updateData=function(t,e,r){this.silent=false;var i=t.getItemVisual(e,"symbol")||"circle";var a=t.hostModel;var n=_g(t,e);var o=i!==this._symbolType;if(o){this._createSymbol(i,t,e,n)}else{var s=this.childAt(0);s.silent=false;gl(s,{scale:wg(n)},a,e)}this._updateCommon(t,e,n,r);if(o){var s=this.childAt(0);var l=r&&r.fadeIn;var u={scale:s.scale.slice()};l&&(u.style={opacity:s.style.opacity});s.scale=[0,0];l&&(s.style.opacity=0);ml(s,u,a,e)}this._seriesModel=a};var Ig=["itemStyle"];var Dg=["emphasis","itemStyle"];var Tg=["label"];var Ag=["emphasis","label"];Sg._updateCommon=function(r,t,e,i){var a=this.childAt(0);var n=r.hostModel;var o=r.getItemVisual(t,"color");if(a.type!=="image"){a.useStyle({strokeNoScale:true})}var s=i&&i.itemStyle;var l=i&&i.hoverItemStyle;var u=i&&i.symbolRotate;var h=i&&i.symbolOffset;var f=i&&i.labelModel;var c=i&&i.hoverLabelModel;var v=i&&i.hoverAnimation;var d=i&&i.cursorStyle;if(!i||r.hasItemOption){var p=i&&i.itemModel?i.itemModel:r.getItemModel(t);s=p.getModel(Ig).getItemStyle(["color"]);l=p.getModel(Dg).getItemStyle();u=p.getShallow("symbolRotate");h=p.getShallow("symbolOffset");f=p.getModel(Tg);c=p.getModel(Ag);v=p.getShallow("hoverAnimation");d=p.getShallow("cursor")}else{l=N({},l)}var g=a.style;a.attr("rotation",(u||0)*Math.PI/180||0);if(h){a.attr("position",[Wl(h[0],e[0]),Wl(h[1],e[1])])}d&&a.attr("cursor",d);a.setColor(o,i&&i.symbolInnerColor);a.setStyle(s);var m=r.getItemVisual(t,"opacity");if(m!=null){g.opacity=m}var y=i&&i.useNameLabel;nl(g,l,f,c,{labelFetcher:n,labelDataIndex:t,defaultText:x,isRectText:true,autoColor:o});function x(t,e){return y?r.getName(t):xg(r,t)}a.off("mouseover").off("mouseout").off("emphasis").off("normal");a.hoverStyle=l;al(a);var _=wg(e);if(v&&n.isAnimationEnabled()){var w=function(){if(this.incremental){return}var t=_[1]/_[0];this.animateTo({scale:[Math.max(_[0]*1.1,_[0]+3),Math.max(_[1]*1.1,_[1]+3*t)]},400,"elasticOut")};var b=function(){if(this.incremental){return}this.animateTo({scale:_},400,"elasticOut")};a.on("mouseover",w).on("mouseout",b).on("emphasis",w).on("normal",b)}};Sg.fadeOut=function(t,e){var r=this.childAt(0);this.silent=r.silent=true;!(e&&e.keepLabel)&&(r.style.text=null);gl(r,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)};M(bg,cr);function Cg(t){this.group=new cr;this._symbolCtor=t||bg}var Lg=Cg.prototype;function kg(t,e,r,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(r))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}Lg.updateData=function(a,n){n=Pg(n);var o=this.group;var s=a.hostModel;var l=this._data;var u=this._symbolCtor;var h=Ng(a);if(!l){o.removeAll()}a.diff(l).add(function(t){var e=a.getItemLayout(t);if(kg(a,e,t,n)){var r=new u(a,t,h);r.attr("position",e);a.setItemGraphicEl(t,r);o.add(r)}}).update(function(t,e){var r=l.getItemGraphicEl(e);var i=a.getItemLayout(t);if(!kg(a,i,t,n)){o.remove(r);return}if(!r){r=new u(a,t);r.attr("position",i)}else{r.updateData(a,t,h);gl(r,{position:i},s)}o.add(r);a.setItemGraphicEl(t,r)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){o.remove(e)})}).execute();this._data=a};Lg.isPersistent=function(){return true};Lg.updateLayout=function(){var i=this._data;if(i){i.eachItemGraphicEl(function(t,e){var r=i.getItemLayout(e);t.attr("position",r)})}};Lg.incrementalPrepareUpdate=function(t){this._seriesScope=Ng(t);this._data=null;this.group.removeAll()};Lg.incrementalUpdate=function(t,e,r){r=Pg(r);function i(t){if(!t.isGroup){t.incremental=t.useHoverLayer=true}}for(var a=t.start;a<t.end;a++){var n=e.getItemLayout(a);if(kg(e,n,a,r)){var o=new this._symbolCtor(e,a,this._seriesScope);o.traverse(i);o.attr("position",n);this.group.add(o);e.setItemGraphicEl(a,o)}}};function Pg(t){if(t!=null&&!F(t)){t={isIgnore:t}}return t||{}}Lg.remove=function(t){var e=this.group;var r=this._data;if(r&&t){r.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})})}else{e.removeAll()}};function Ng(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Eg(t,e,r){var i=t.getBaseAxis();var a=t.getOtherAxis(i);var n=Og(a,r);var o=i.dim;var s=a.dim;var l=e.mapDimension(s);var u=e.mapDimension(o);var h=s==="x"||s==="radius"?1:0;var f=Hd(e,l,u);var c=T(t.dimensions,function(t){return e.mapDimension(t)});return{dataDimsForPoint:c,valueStart:n,valueAxisDim:s,baseAxisDim:o,stacked:f,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Og(t,e){var r=0;var i=t.scale.getExtent();if(e==="start"){r=i[0]}else if(e==="end"){r=i[1]}else{if(i[0]>0){r=i[0]}else if(i[1]<0){r=i[1]}}return r}function zg(t,e,r,i){var a=NaN;if(t.stacked){a=r.get(r.getCalculationInfo("stackedOverDimension"),i)}if(isNaN(a)){a=t.valueStart}var n=t.baseDataOffset;var o=[];o[n]=r.get(t.baseDim,i);o[1-n]=a;return e.dataToPoint(o)}function Rg(t,e){var r=[];e.diff(t).add(function(t){r.push({cmd:"+",idx:t})}).update(function(t,e){r.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){r.push({cmd:"-",idx:t})}).execute();return r}var Bg=function(t,e,r,i,a,n,o,s){var l=Rg(t,e);var u=[];var h=[];var f=[];var c=[];var v=[];var d=[];var p=[];var g=Eg(a,e,o);var m=Eg(n,t,s);for(var y=0;y<l.length;y++){var x=l[y];var _=true;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx);var b=e.getItemLayout(x.idx1);if(isNaN(w[0])||isNaN(w[1])){w=b.slice()}u.push(w);h.push(b);f.push(r[x.idx]);c.push(i[x.idx1]);p.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(a.dataToPoint([e.get(g.dataDimsForPoint[0],S),e.get(g.dataDimsForPoint[1],S)]));h.push(e.getItemLayout(S).slice());f.push(zg(g,a,e,S));c.push(i[S]);p.push(e.getRawIndex(S));break;case"-":var S=x.idx;var M=t.getRawIndex(S);if(M!==S){u.push(t.getItemLayout(S));h.push(n.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)]));f.push(r[S]);c.push(zg(m,n,t,S));p.push(M)}else{_=false}}if(_){v.push(x);d.push(d.length)}}d.sort(function(t,e){return p[t]-p[e]});var I=[];var D=[];var T=[];var A=[];var C=[];for(var y=0;y<d.length;y++){var S=d[y];I[y]=u[S];D[y]=h[S];T[y]=f[S];A[y]=c[S];C[y]=v[S]}return{current:I,next:D,stackedOnCurrent:T,stackedOnNext:A,status:C}};var Vg=kt;var Gg=Pt;var Fg=vt;var Wg=ut;var Hg=[];var Zg=[];var Ug=[];function jg(t){return isNaN(t[0])||isNaN(t[1])}function Xg(t,e,r,i,a,n,o,s,l,u,h){if(u==null){if(Yg(e,"x")){return qg(t,e,r,i,a,n,o,s,l,"x",h)}else if(Yg(e,"y")){return qg(t,e,r,i,a,n,o,s,l,"y",h)}else{return $g.apply(this,arguments)}}else if(u!=="none"&&Yg(e,u)){return qg.apply(this,arguments)}else{return $g.apply(this,arguments)}}function Yg(t,e){if(t.length<=1){return true}var r=e==="x"?0:1;var i=t[0][r];var a=0;for(var n=1;n<t.length;++n){var o=t[n][r]-i;if(!isNaN(o)&&!isNaN(a)&&o!==0&&a!==0&&o>=0!==a>=0){return false}if(!isNaN(o)&&o!==0){a=o;i=t[n][r]}}return true}function qg(t,e,r,i,a,n,o,s,l,u,h){var f=0;var c=r;for(var v=0;v<i;v++){var d=e[c];if(c>=a||c<0){break}if(jg(d)){if(h){c+=n;continue}break}if(c===r){t[n>0?"moveTo":"lineTo"](d[0],d[1])}else{if(l>0){var p=e[f];var g=u==="y"?1:0;var m=(d[g]-p[g])*l;Wg(Zg,p);Zg[g]=p[g]+m;Wg(Ug,d);Ug[g]=d[g]-m;t.bezierCurveTo(Zg[0],Zg[1],Ug[0],Ug[1],d[0],d[1])}else{t.lineTo(d[0],d[1])}}f=c;c+=n}return v}function $g(t,e,r,i,a,n,o,s,l,u,h){var f=0;var c=r;for(var v=0;v<i;v++){var d=e[c];if(c>=a||c<0){break}if(jg(d)){if(h){c+=n;continue}break}if(c===r){t[n>0?"moveTo":"lineTo"](d[0],d[1]);Wg(Zg,d)}else{if(l>0){var p=c+n;var g=e[p];if(h){while(g&&jg(e[p])){p+=n;g=e[p]}}var m=.5;var y=e[f];var g=e[p];if(!g||jg(g)){Wg(Ug,d)}else{if(jg(g)&&!h){g=d}dt(Hg,g,y);var x;var _;if(u==="x"||u==="y"){var w=u==="x"?0:1;x=Math.abs(d[w]-y[w]);_=Math.abs(d[w]-g[w])}else{x=It(d,y);_=It(d,g)}m=_/(_+x);Fg(Ug,d,Hg,-l*(1-m))}Vg(Zg,Zg,s);Gg(Zg,Zg,o);Vg(Ug,Ug,s);Gg(Ug,Ug,o);t.bezierCurveTo(Zg[0],Zg[1],Ug[0],Ug[1],d[0],d[1]);Fg(Zg,d,Hg,l*m)}else{t.lineTo(d[0],d[1])}}f=c;c+=n}return v}function Kg(t,e){var r=[Infinity,Infinity];var i=[-Infinity,-Infinity];if(e){for(var a=0;a<t.length;a++){var n=t[a];if(n[0]<r[0]){r[0]=n[0]}if(n[1]<r[1]){r[1]=n[1]}if(n[0]>i[0]){i[0]=n[0]}if(n[1]>i[1]){i[1]=n[1]}}}return{min:e?r:i,max:e?i:r}}var Jg=Wo.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:true,smoothMonotone:null,connectNulls:false},style:{fill:null,stroke:"#000"},brush:fs(Wo.prototype.brush),buildPath:function(t,e){var r=e.points;var i=0;var a=r.length;var n=Kg(r,e.smoothConstraint);if(e.connectNulls){for(;a>0;a--){if(!jg(r[a-1])){break}}for(;i<a;i++){if(!jg(r[i])){break}}}while(i<a){i+=Xg(t,r,i,a,a,1,n.min,n.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}});var Qg=Wo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:true,smoothMonotone:null,connectNulls:false},brush:fs(Wo.prototype.brush),buildPath:function(t,e){var r=e.points;var i=e.stackedOnPoints;var a=0;var n=r.length;var o=e.smoothMonotone;var s=Kg(r,e.smoothConstraint);var l=Kg(i,e.smoothConstraint);if(e.connectNulls){for(;n>0;n--){if(!jg(r[n-1])){break}}for(;a<n;a++){if(!jg(r[a])){break}}}while(a<n){var u=Xg(t,r,a,n,n,1,s.min,s.max,e.smooth,o,e.connectNulls);Xg(t,i,a+u-1,u,n,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls);a+=u+1;t.closePath()}}});function tm(t,e){if(t.length!==e.length){return}for(var r=0;r<t.length;r++){var i=t[r];var a=e[r];if(i[0]!==a[0]||i[1]!==a[1]){return}}return true}function em(t){return typeof t==="number"?t:t?.5:0}function rm(t){var e=t.getGlobalExtent();if(t.onBand){var r=t.getBandWidth()/2-1;var i=e[1]>e[0]?1:-1;e[0]+=i*r;e[1]-=i*r}return e}function im(t,e,r){if(!r.valueDim){return[]}var i=[];for(var a=0,n=e.count();a<n;a++){i.push(zg(r,t,e,a))}return i}function am(t,e,r){var i=rm(t.getAxis("x"));var a=rm(t.getAxis("y"));var n=t.getBaseAxis().isHorizontal();var o=Math.min(i[0],i[1]);var s=Math.min(a[0],a[1]);var l=Math.max(i[0],i[1])-o;var u=Math.max(a[0],a[1])-s;var h=r.get("lineStyle.width")||2;var f=r.get("clipOverflow")?h/2:Math.max(l,u);if(n){s-=f;u+=f*2}else{o-=f;l+=f*2}var c=new _s({shape:{x:o,y:s,width:l,height:u}});if(e){c.shape[n?"width":"height"]=0;ml(c,{shape:{width:l,height:u}},r)}return c}function nm(t,e,r){var i=t.getAngleAxis();var a=t.getRadiusAxis();var n=a.getExtent();var o=i.getExtent();var s=Math.PI/180;var l=new cs({shape:{cx:t.cx,cy:t.cy,r0:n[0],r:n[1],startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:i.inverse}});if(e){l.shape.endAngle=-o[0]*s;ml(l,{shape:{endAngle:-o[1]*s}},r)}return l}function om(t,e,r){return t.type==="polar"?nm(t,e,r):am(t,e,r)}function sm(t,e,r){var i=e.getBaseAxis();var a=i.dim==="x"||i.dim==="radius"?0:1;var n=[];for(var o=0;o<t.length-1;o++){var s=t[o+1];var l=t[o];n.push(l);var u=[];switch(r){case"end":u[a]=s[a];u[1-a]=l[1-a];n.push(u);break;case"middle":var h=(l[a]+s[a])/2;var f=[];u[a]=f[a]=h;u[1-a]=l[1-a];f[1-a]=s[1-a];n.push(u);n.push(f);break;default:u[a]=l[a];u[1-a]=s[1-a];n.push(u)}}t[o]&&n.push(t[o]);return n}function lm(t,e){var r=t.getVisual("visualMeta");if(!r||!r.length||!t.count()){return}if(e.type!=="cartesian2d"){if(A){console.warn("Visual map on line style is only supported on cartesian2d.")}return}var i;var a;for(var n=r.length-1;n>=0;n--){var o=r[n].dimension;var s=t.dimensions[o];var l=t.getDimensionInfo(s);i=l&&l.coordDim;if(i==="x"||i==="y"){a=r[n];break}}if(!a){if(A){console.warn("Visual map on line style only support x or y dimension.")}return}var u=e.getAxis(i);var h=T(a.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}});var f=h.length;var c=a.outerColors.slice();if(f&&h[0].coord>h[f-1].coord){h.reverse();c.reverse()}var v=10;var d=h[0].coord-v;var p=h[f-1].coord+v;var g=p-d;if(g<.001){return"transparent"}L(h,function(t){t.offset=(t.coord-d)/g});h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"});h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new As(0,0,0,0,h,true);m[i]=d;m[i+"2"]=p;return m}Ff.extend({type:"line",init:function(){var t=new cr;var e=new Cg;this.group.add(e.group);this._symbolDraw=e;this._lineGroup=t},render:function(t,e,r){var i=t.coordinateSystem;var a=this.group;var n=t.getData();var o=t.getModel("lineStyle");var s=t.getModel("areaStyle");var l=n.mapArray(n.getItemLayout);var u=i.type==="polar";var h=this._coordSys;var f=this._symbolDraw;var c=this._polyline;var v=this._polygon;var d=this._lineGroup;var p=t.get("animation");var g=!s.isEmpty();var m=s.get("origin");var y=Eg(i,n,m);var x=im(i,n,y);var _=t.get("showSymbol");var w=_&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(n,i);var b=this._data;b&&b.eachItemGraphicEl(function(t,e){if(t.__temp){a.remove(t);b.setItemGraphicEl(e,null)}});if(!_){f.remove()}a.add(d);var S=!u&&t.get("step");if(!(c&&h.type===i.type&&S===this._step)){_&&f.updateData(n,{isIgnore:w,clipShape:om(i,false,t)});if(S){l=sm(l,i,S);x=sm(x,i,S)}c=this._newPolyline(l,i,p);if(g){v=this._newPolygon(l,x,i,p)}d.setClipPath(om(i,true,t))}else{if(g&&!v){v=this._newPolygon(l,x,i,p)}else if(v&&!g){d.remove(v);v=this._polygon=null}var M=om(i,false,t);d.setClipPath(M);_&&f.updateData(n,{isIgnore:w,clipShape:M});n.eachItemGraphicEl(function(t){t.stopAnimation(true)});if(!tm(this._stackedOnPoints,x)||!tm(this._points,l)){if(p){this._updateAnimation(n,x,i,r,S,m)}else{if(S){l=sm(l,i,S);x=sm(x,i,S)}c.setShape({points:l});v&&v.setShape({points:l,stackedOnPoints:x})}}}var I=lm(n,i)||n.getVisual("color");c.useStyle(C(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var D=t.get("smooth");D=em(t.get("smooth"));c.setShape({smooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")});if(v){var T=n.getCalculationInfo("stackedOnSeries");var A=0;v.useStyle(C(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"}));if(T){A=em(T.get("smooth"))}v.setShape({smooth:D,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n;this._coordSys=i;this._stackedOnPoints=x;this._points=l;this._step=S;this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,i){var a=t.getData();var n=Ka(a,i);if(!(n instanceof Array)&&n!=null&&n>=0){var o=a.getItemGraphicEl(n);if(!o){var s=a.getItemLayout(n);if(!s){return}o=new bg(a,n);o.position=s;o.setZ(t.get("zlevel"),t.get("z"));o.ignore=isNaN(s[0])||isNaN(s[1]);o.__temp=true;a.setItemGraphicEl(n,o);o.stopSymbolAnimation(true);this.group.add(o)}o.highlight()}else{Ff.prototype.highlight.call(this,t,e,r,i)}},downplay:function(t,e,r,i){var a=t.getData();var n=Ka(a,i);if(n!=null&&n>=0){var o=a.getItemGraphicEl(n);if(o){if(o.__temp){a.setItemGraphicEl(n,null);this.group.remove(o)}else{o.downplay()}}}else{Ff.prototype.downplay.call(this,t,e,r,i)}},_newPolyline:function(t){var e=this._polyline;if(e){this._lineGroup.remove(e)}e=new Jg({shape:{points:t},silent:true,z2:10});this._lineGroup.add(e);this._polyline=e;return e},_newPolygon:function(t,e){var r=this._polygon;if(r){this._lineGroup.remove(r)}r=new Qg({shape:{points:t,stackedOnPoints:e},silent:true});this._lineGroup.add(r);this._polygon=r;return r},_getSymbolIgnoreFunc:function(t,e){var r=e.getAxesByScale("ordinal")[0];if(r&&r.isLabelIgnored){return z(r.isLabelIgnored,r)}},_updateAnimation:function(t,e,r,i,a,n){var o=this._polyline;var s=this._polygon;var l=t.hostModel;var u=Bg(this._data,t,this._stackedOnPoints,e,this._coordSys,r,this._valueOrigin,n);var h=u.current;var f=u.stackedOnCurrent;var c=u.next;var v=u.stackedOnNext;if(a){h=sm(u.current,r,a);f=sm(u.stackedOnCurrent,r,a);c=sm(u.next,r,a);v=sm(u.stackedOnNext,r,a)}o.shape.__points=u.current;o.shape.points=h;gl(o,{shape:{points:c}},l);if(s){s.setShape({points:h,stackedOnPoints:f});gl(s,{shape:{points:c,stackedOnPoints:v}},l)}var d=[];var p=u.status;for(var g=0;g<p.length;g++){var m=p[g].cmd;if(m==="="){var y=t.getItemGraphicEl(p[g].idx1);if(y){d.push({el:y,ptIdx:g})}}}if(o.animators&&o.animators.length){o.animators[0].during(function(){for(var t=0;t<d.length;t++){var e=d[t].el;e.attr("position",o.shape.__points[d[t].ptIdx])}})}},remove:function(t){var r=this.group;var i=this._data;this._lineGroup.removeAll();this._symbolDraw.remove(true);i&&i.eachItemGraphicEl(function(t,e){if(t.__temp){r.remove(t);i.setItemGraphicEl(e,null)}});this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var um=function(t,o,u){return{seriesType:t,performRawSeries:true,reset:function(s,t,e){var r=s.getData();var i=s.get("symbol")||o;var l=s.get("symbolSize");r.setVisual({legendSymbol:u||i,symbol:i,symbolSize:l});if(t.isSeriesFiltered(s)){return}var a=typeof l==="function";function n(t,e){if(typeof l==="function"){var r=s.getRawValue(e);var i=s.getDataParams(e);t.setItemVisual(e,"symbolSize",l(r,i))}if(t.hasItemOption){var a=t.getItemModel(e);var n=a.getShallow("symbol",true);var o=a.getShallow("symbolSize",true);if(n!=null){t.setItemVisual(e,"symbol",n)}if(o!=null){t.setItemVisual(e,"symbolSize",o)}}}return{dataEach:r.hasItemOption||a?n:null}}}};var hm=function(t){return{seriesType:t,plan:Bf(),reset:function(t){var e=t.getData();var f=t.coordinateSystem;var r=t.pipelineContext;var c=r.large;if(!f){return}var v=T(f.dimensions,function(t){return e.mapDimension(t)}).slice(0,2);var d=v.length;if(Hd(e,v[0],v[1])){v[0]=e.getCalculationInfo("stackResultDimension")}if(Hd(e,v[1],v[0])){v[1]=e.getCalculationInfo("stackResultDimension")}function i(t,e){var r=t.end-t.start;var i=c&&new Float32Array(r*d);for(var a=t.start,n=0,o=[],s=[];a<t.end;a++){var l;if(d===1){var u=e.get(v[0],a,true);l=!isNaN(u)&&f.dataToPoint(u,null,s)}else{var u=o[0]=e.get(v[0],a,true);var h=o[1]=e.get(v[1],a,true);l=!isNaN(u)&&!isNaN(h)&&f.dataToPoint(o,null,s)}if(c){i[n++]=l?l[0]:NaN;i[n++]=l?l[1]:NaN}else{e.setItemLayout(a,l&&l.slice()||[NaN,NaN])}}c&&e.setLayout("symbolPoints",i)}return d&&{progress:i}}}};var fm={average:function(t){var e=0;var r=0;for(var i=0;i<t.length;i++){if(!isNaN(t[i])){e+=t[i];r++}}return r===0?NaN:e/r},sum:function(t){var e=0;for(var r=0;r<t.length;r++){e+=t[r]||0}return e},max:function(t){var e=-Infinity;for(var r=0;r<t.length;r++){t[r]>e&&(e=t[r])}return e},min:function(t){var e=Infinity;for(var r=0;r<t.length;r++){t[r]<e&&(e=t[r])}return e},nearest:function(t){return t[0]}};var cm=function(t,e){return Math.round(t.length/2)};var vm=function(t){return{seriesType:t,reset:function(t,e,r){var i=t.getData();var a=t.get("sampling");var n=t.coordinateSystem;if(n.type==="cartesian2d"&&a){var o=n.getBaseAxis();var s=n.getOtherAxis(o);var l=o.getExtent();var u=l[1]-l[0];var h=Math.round(i.count()/u);if(h>1){var f;if(typeof a==="string"){f=fm[a]}else if(typeof a==="function"){f=a}if(f){t.setData(i.downSample(s.dim,1/h,f,cm))}}}}}};function dm(t){return this._axes[t]}var pm=function(t){this._axes={};this._dimList=[];this.name=t||""};pm.prototype={constructor:pm,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return T(this._dimList,dm,this)},getAxesByScale:function(e){e=e.toLowerCase();return k(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t;this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){var r=this._dimList;var i=t instanceof Array?[]:{};for(var a=0;a<r.length;a++){var n=r[a];var o=this._axes[n];i[n]=o[e](t[n])}return i}};function gm(t){pm.call(this,t)}gm.prototype={constructor:gm,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x");var r=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&r.contain(r.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,r){var i=this.getAxis("x");var a=this.getAxis("y");r=r||[];r[0]=i.toGlobalCoord(i.dataToCoord(t[0]));r[1]=a.toGlobalCoord(a.dataToCoord(t[1]));return r},clampData:function(t,e){var r=this.getAxis("x").scale.getExtent();var i=this.getAxis("y").scale.getExtent();e=e||[];e[0]=Math.min(Math.max(Math.min(r[0],r[1]),t[0]),Math.max(r[0],r[1]));e[1]=Math.min(Math.max(Math.min(i[0],i[1]),t[1]),Math.max(i[0],i[1]));return e},pointToData:function(t,e){var r=this.getAxis("x");var i=this.getAxis("y");e=e||[];e[0]=r.coordToData(r.toLocalCoord(t[0]));e[1]=i.coordToData(i.toLocalCoord(t[1]));return e},getOtherAxis:function(t){return this.getAxis(t.dim==="x"?"y":"x")}};M(gm,pm);var mm=function(t,e,r,i,a){pg.call(this,t,e,r);this.type=i||"value";this.position=a||"bottom"};mm.prototype={constructor:mm,index:0,onZero:false,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},getGlobalExtent:function(t){var e=this.getExtent();e[0]=this.toGlobalCoord(e[0]);e[1]=this.toGlobalCoord(e[1]);t&&e[0]>e[1]&&e.reverse();return e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if(this.type==="category"){var e=this.getLabelInterval();return typeof e==="function"&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),e)},toLocalCoord:null,toGlobalCoord:null};M(mm,pg);var ym={show:true,zlevel:0,z:0,inverse:false,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:false,triggerEvent:false,tooltip:{show:false},axisPointer:{},axisLine:{show:true,onZero:true,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:true,inside:false,length:5,lineStyle:{width:1}},axisLabel:{show:true,inside:false,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:true,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:false,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}};var xm={};xm.categoryAxis=y({boundaryGap:true,deduplication:null,splitLine:{show:false},axisTick:{alignWithLabel:false,interval:"auto"},axisLabel:{interval:"auto"}},ym);xm.valueAxis=y({boundaryGap:[0,0],splitNumber:5},ym);xm.timeAxis=C({scale:true,min:"dataMin",max:"dataMax"},xm.valueAxis);xm.logAxis=C({scale:true,logBase:10},xm.valueAxis);var _m=["value","category","time","log"];var wm=function(o,t,s,e){L(_m,function(n){t.extend({type:o+"Axis."+n,mergeDefaultAndTheme:function(t,e){var r=this.layoutMode;var i=r?Nu(t):{};var a=e.getTheme();y(t,a.get(n+"Axis"));y(t,this.getDefaultOption());t.type=s(o,t);if(r){Pu(t,i,r)}},optionUpdated:function(){var t=this.option;if(t.type==="category"){this.__ordinalMeta=Yd.createByAxisModel(this)}},getCategories:function(){if(this.option.type==="category"){return this.__ordinalMeta.categories}},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:x([{},xm[n+"Axis"],e],true)})});Ru.registerSubTypeDefaulter(o+"Axis",R(s,o))};var bm=Ru.extend({type:"cartesian2dAxis",axis:null,init:function(){bm.superApply(this,"init",arguments);this.resetRange()},mergeOption:function(){bm.superApply(this,"mergeOption",arguments);this.resetRange()},restoreData:function(){bm.superApply(this,"restoreData",arguments);this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Sm(t,e){return e.type||(e.data?"category":"value")}y(bm.prototype,Hp);var Mm={offset:0};wm("x",bm,Sm,Mm);wm("y",bm,Sm,Mm);Ru.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:false,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:false,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Im=L;var Dm=Vp;var Tm=Rp;function Am(t,e,r){return t.getCoordSysModel()===e}function Cm(t,e){var r=e*Math.PI/180;var i=t.plain();var a=i.width;var n=i.height;var o=a*Math.cos(r)+n*Math.sin(r);var s=a*Math.sin(r)+n*Math.cos(r);var l=new fr(i.x,i.y,o,s);return l}function Lm(t){var e=t.model;var r=e.get("axisLabel.show")?e.getFormattedLabels():[];var i=e.getModel("axisLabel");var a;var n=1;var o=r.length;if(o>40){n=Math.ceil(o/40)}for(var s=0;s<o;s+=n){if(!t.isLabelIgnored(s)){var l=i.getTextRect(r[s]);var u=Cm(l,i.get("rotate")||0);a?a.union(u):a=u}}return a}function km(t,e,r){this._coordsMap={};this._coordsList=[];this._axesMap={};this._axesList=[];this._initCartesian(t,e,r);this.model=t}var Pm=km.prototype;Pm.type="grid";Pm.axisPointerEnabled=true;Pm.getRect=function(){return this._rect};Pm.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model);Im(r.x,function(t){Tm(t.scale,t.model)});Im(r.y,function(t){Tm(t.scale,t.model)});Im(r.x,function(t){Nm(r,"y",t)});Im(r.y,function(t){Nm(r,"x",t)});this.resize(this.model,e)};function Nm(t,e,r){var i=t[e];if(!r.onZero){return}var a=r.onZeroAxisIndex;if(a!=null){var n=i[a];if(n&&Em(n)){r.onZero=false}return}for(var o in i){if(i.hasOwnProperty(o)){var n=i[o];if(n&&!Em(n)){a=+o;break}}}if(a==null){r.onZero=false}r.onZeroAxisIndex=a}function Em(t){return t.type==="category"||t.type==="time"||!Dm(t)}Pm.resize=function(t,e,r){var a=Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n();if(!r&&t.get("containLabel")){Im(i,function(t){if(!t.model.get("axisLabel.inside")){var e=Lm(t);if(e){var r=t.isHorizontal()?"height":"width";var i=t.model.get("axisLabel.margin");a[r]-=e[r]+i;if(t.position==="top"){a.y+=e.height+i}else if(t.position==="left"){a.x+=e.width+i}}}});n()}function n(){Im(i,function(t){var e=t.isHorizontal();var r=e?[0,a.width]:[0,a.height];var i=t.inverse?1:0;t.setExtent(r[i],r[1-i]);Om(t,e?a.x:a.y)})}};Pm.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null){if(e==null){for(var i in r){if(r.hasOwnProperty(i)){return r[i]}}}return r[e]}};Pm.getAxes=function(){return this._axesList.slice()};Pm.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}if(F(t)){e=t.yAxisIndex;t=t.xAxisIndex}for(var i=0,a=this._coordsList;i<a.length;i++){if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===e){return a[i]}}};Pm.getCartesians=function(){return this._coordsList.slice()};Pm.convertToPixel=function(t,e,r){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(r):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(r)):null};Pm.convertFromPixel=function(t,e,r){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(r):i.axis?i.axis.coordToData(i.axis.toLocalCoord(r)):null};Pm._findConvertTarget=function(t,e){var r=e.seriesModel;var i=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0];var a=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0];var n=e.gridModel;var o=this._coordsList;var s;var l;if(r){s=r.coordinateSystem;S(o,s)<0&&(s=null)}else if(i&&a){s=this.getCartesian(i.componentIndex,a.componentIndex)}else if(i){l=this.getAxis("x",i.componentIndex)}else if(a){l=this.getAxis("y",a.componentIndex)}else if(n){var u=n.coordinateSystem;if(u===this){s=this._coordsList[0]}}return{cartesian:s,axis:l}};Pm.containPoint=function(t){var e=this._coordsList[0];if(e){return e.containPoint(t)}};Pm._initCartesian=function(o,s,t){var l={left:false,right:false,top:false,bottom:false};var u={x:{},y:{}};var h={x:0,y:0};s.eachComponent("xAxis",e("x"),this);s.eachComponent("yAxis",e("y"),this);if(!h.x||!h.y){this._axesMap={};this._axesList=[];return}this._axesMap=u;Im(u.x,function(a,n){Im(u.y,function(t,e){var r="x"+n+"y"+e;var i=new gm(r);i.grid=this;i.model=o;this._coordsMap[r]=i;this._coordsList.push(i);i.addAxis(a);i.addAxis(t)},this)},this);function e(n){return function(t,e){if(!Am(t,o,s)){return}var r=t.get("position");if(n==="x"){if(r!=="top"&&r!=="bottom"){r="bottom";if(l[r]){r=r==="top"?"bottom":"top"}}}else{if(r!=="left"&&r!=="right"){r="left";if(l[r]){r=r==="left"?"right":"left"}}}l[r]=true;var i=new mm(n,Bp(t),[0,0],t.get("type"),r);var a=i.type==="category";i.onBand=a&&t.get("boundaryGap");i.inverse=t.get("inverse");i.onZero=t.get("axisLine.onZero");i.onZeroAxisIndex=t.get("axisLine.onZeroAxisIndex");t.axis=i;i.model=t;i.grid=this;i.index=e;this._axesList.push(i);u[n][e]=i;h[n]++}}};Pm._updateScale=function(l,u){L(this._axesList,function(t){t.scale.setExtent(Infinity,-Infinity)});l.eachSeries(function(t){if(Bm(t)){var e=Rm(t,l);var r=e[0];var i=e[1];if(!Am(r,u,l)||!Am(i,u,l)){return}var a=this.getCartesian(r.componentIndex,i.componentIndex);var n=t.getData();var o=a.getAxis("x");var s=a.getAxis("y");if(n.type==="list"){h(n,o,t);h(n,s,t)}}},this);function h(e,r,t){Im(e.mapDimension(r.dim,true),function(t){r.scale.unionExtentFromData(e,t)})}};Pm.getTooltipAxes=function(i){var a=[];var n=[];Im(this.getCartesians(),function(t){var e=i!=null&&i!=="auto"?t.getAxis(i):t.getBaseAxis();var r=t.getOtherAxis(e);S(a,e)<0&&a.push(e);S(n,r)<0&&n.push(r)});return{baseAxes:a,otherAxes:n}};function Om(t,e){var r=t.getExtent();var i=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(t){return t+e}:function(t){return i-t+e};t.toLocalCoord=t.dim==="x"?function(t){return t-e}:function(t){return i-t+e}}var zm=["xAxis","yAxis"];function Rm(r,t){return T(zm,function(t){var e=r.getReferringComponents(t)[0];if(A){if(!e){throw new Error(t+' "'+j(r.get(t+"Index"),r.get(t+"Id"),0)+'" not found')}}return e})}function Bm(t){return t.get("coordinateSystem")==="cartesian2d"}km.create=function(o,i){var a=[];o.eachComponent("grid",function(t,e){var r=new km(t,o,i);r.name="grid_"+e;r.resize(t,i,true);t.coordinateSystem=r;a.push(r)});o.eachSeries(function(t){if(!Bm(t)){return}var e=Rm(t,o);var r=e[0];var i=e[1];var a=r.getCoordSysModel();if(A){if(!a){throw new Error('Grid "'+j(r.get("gridIndex"),r.get("gridId"),0)+'" not found')}if(r.getCoordSysModel()!==i.getCoordSysModel()){throw new Error("xAxis and yAxis must use the same grid")}}var n=a.coordinateSystem;t.coordinateSystem=n.getCartesian(r.componentIndex,i.componentIndex)});return a};km.dimensions=km.prototype.dimensions=gm.prototype.dimensions;Ah.register("cartesian2d",km);var Vm=Math.PI;function Gm(t){var e={componentType:t.mainType};e[t.mainType+"Index"]=t.componentIndex;return e}var Fm=function(t,e){this.opt=e;this.axisModel=t;C(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:true});this.group=new cr;var r=new cr({position:e.position.slice(),rotation:e.rotation});r.updateTransform();this._transform=r.transform;this._dumbGroup=r};Fm.prototype={constructor:Fm,hasBuilder:function(t){return!!Wm[t]},add:function(t){Wm[t].call(this)},getGroup:function(){return this.group}};var Wm={axisLine:function(){var n=this.opt;var t=this.axisModel;if(!t.get("axisLine.show")){return}var e=this.axisModel.axis.getExtent();var r=this._transform;var o=[e[0],0];var i=[e[1],0];if(r){Lt(o,o,r);Lt(i,i,r)}var s=N({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ws(Hs({anid:"line",shape:{x1:o[0],y1:o[1],x2:i[0],y2:i[1]},style:s,strokeContainThreshold:n.strokeContainThreshold||5,silent:true,z2:1})));var l=t.get("axisLine.symbol");var a=t.get("axisLine.symbolSize");var u=t.get("axisLine.symbolOffset")||0;if(typeof u==="number"){u=[u,u]}if(l!=null){if(typeof l==="string"){l=[l,l]}if(typeof a==="string"||typeof a==="number"){a=[a,a]}var h=a[0];var f=a[1];L([{rotate:n.rotation+Math.PI/2,offset:u[0],r:0},{rotate:n.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((o[0]-i[0])*(o[0]-i[0])+(o[1]-i[1])*(o[1]-i[1]))}],function(t,e){if(l[e]!=="none"&&l[e]!=null){var r=Qp(l[e],-h/2,-f/2,h,f,s.stroke,true);var i=t.r+t.offset;var a=[o[0]+i*Math.cos(n.rotation),o[1]-i*Math.sin(n.rotation)];r.attr({rotation:t.rotate,position:a,silent:true});this.group.add(r)}},this)}},axisTickLabel:function(){var t=this.axisModel;var e=this.opt;var r=Jm(this,t,e);var i=Qm(this,t,e);jm(t,i,r)},axisName:function(){var t=this.opt;var e=this.axisModel;var r=j(t.axisName,e.get("name"));if(!r){return}var i=e.get("nameLocation");var a=t.nameDirection;var n=e.getModel("nameTextStyle");var o=e.get("nameGap")||0;var s=this.axisModel.axis.getExtent();var l=s[0]>s[1]?-1:1;var u=[i==="start"?s[0]-l*o:i==="end"?s[1]+l*o:(s[0]+s[1])/2,qm(i)?t.labelOffset+a*o:0];var h;var f=e.get("nameRotate");if(f!=null){f=f*Vm/180}var c;if(qm(i)){h=Hm(t.rotation,f!=null?f:t.rotation,a)}else{h=Zm(t,i,f||0,s);c=t.axisNameAvailableWidth;if(c!=null){c=Math.abs(c/Math.sin(h.rotation));!isFinite(c)&&(c=null)}}var v=n.getFont();var d=e.get("nameTruncate",true)||{};var p=d.ellipsis;var g=j(t.nameTruncateMaxWidth,d.maxWidth,c);var m=p!=null&&g!=null?yu(r,g,v,p,{minChar:2,placeholder:d.placeholder}):r;var y=e.get("tooltip",true);var x=e.mainType;var _={componentType:x,name:r,$vars:["name"]};_[x+"Index"]=e.componentIndex;var w=new ls({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:Um(e),z2:1,tooltip:y&&y.show?N({content:r,formatter:function(){return r},formatterParams:_},y):null});ol(w.style,n,{text:m,textFont:v,textFill:n.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:h.textAlign,textVerticalAlign:h.textVerticalAlign});if(e.get("triggerEvent")){w.eventData=Gm(e);w.eventData.targetType="axisName";w.eventData.name=r}this._dumbGroup.add(w);w.updateTransform();this.group.add(w);w.decomposeTransform()}};var Hm=Fm.innerTextLayout=function(t,e,r){var i=$l(e-t);var a;var n;if(Kl(i)){n=r>0?"top":"bottom";a="center"}else if(Kl(i-Vm)){n=r>0?"bottom":"top";a="center"}else{n="middle";if(i>0&&i<Vm){a=r>0?"right":"left"}else{a=r>0?"left":"right"}}return{rotation:i,textAlign:a,textVerticalAlign:n}};function Zm(t,e,r,i){var a=$l(r-t.rotation);var n;var o;var s=i[0]>i[1];var l=e==="start"&&!s||e!=="start"&&s;if(Kl(a-Vm/2)){o=l?"bottom":"top";n="center"}else if(Kl(a-Vm*1.5)){o=l?"top":"bottom";n="center"}else{o="middle";if(a<Vm*1.5&&a>Vm/2){n=l?"left":"right"}else{n=l?"right":"left"}}return{rotation:a,textAlign:n,textVerticalAlign:o}}function Um(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function jm(t,e,r){var i=t.get("axisLabel.showMinLabel");var a=t.get("axisLabel.showMaxLabel");e=e||[];r=r||[];var n=e[0];var o=e[1];var s=e[e.length-1];var l=e[e.length-2];var u=r[0];var h=r[1];var f=r[r.length-1];var c=r[r.length-2];if(i===false){Xm(n);Xm(u)}else if(Ym(n,o)){if(i){Xm(o);Xm(h)}else{Xm(n);Xm(u)}}if(a===false){Xm(s);Xm(f)}else if(Ym(l,s)){if(a){Xm(l);Xm(c)}else{Xm(s);Xm(f)}}}function Xm(t){t&&(t.ignore=true)}function Ym(t,e,r){var i=t&&t.getBoundingRect().clone();var a=e&&e.getBoundingRect().clone();if(!i||!a){return}var n=jt([]);$t(n,n,-t.rotation);i.applyTransform(Yt([],n,t.getLocalTransform()));a.applyTransform(Yt([],n,e.getLocalTransform()));return i.intersect(a)}function qm(t){return t==="middle"||t==="center"}var $m=Fm.ifIgnoreOnTick=function(t,e,r,i,a,n){if(e===0&&a||e===i-1&&n){return false}var o;var s=t.scale;return s.type==="ordinal"&&(typeof r==="function"?(o=s.getTicks()[e],!r(o,s.getLabel(o))):e%(r+1))};var Km=Fm.getInterval=function(t,e){var r=t.get("interval");if(r==null||r=="auto"){r=e}return r};function Jm(t,e,r){var i=e.axis;if(!e.get("axisTick.show")||i.scale.isBlank()){return}var a=e.getModel("axisTick");var n=a.getModel("lineStyle");var o=a.get("length");var s=Km(a,r.labelInterval);var l=i.getTicksCoords(a.get("alignWithLabel"));var u=i.scale.getTicks();var h=e.get("axisLabel.showMinLabel");var f=e.get("axisLabel.showMaxLabel");var c=[];var v=[];var d=t._transform;var p=[];var g=l.length;for(var m=0;m<g;m++){if($m(i,m,s,g,h,f)){continue}var y=l[m];c[0]=y;c[1]=0;v[0]=y;v[1]=r.tickDirection*o;if(d){Lt(c,c,d);Lt(v,v,d)}var x=new ws(Hs({anid:"tick_"+u[m],shape:{x1:c[0],y1:c[1],x2:v[0],y2:v[1]},style:C(n.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:true}));t.group.add(x);p.push(x)}return p}function Qm(l,u,h){var f=u.axis;var t=j(h.axisLabelShow,u.get("axisLabel.show"));if(!t||f.scale.isBlank()){return}var c=u.getModel("axisLabel");var v=c.get("margin");var d=f.scale.getTicks();var p=u.getFormattedLabels();var e=(j(h.labelRotate,c.get("rotate"))||0)*Vm/180;var g=Hm(h.rotation,e,h.labelDirection);var m=u.getCategories();var y=[];var x=Um(u);var _=u.get("triggerEvent");var w=u.get("axisLabel.showMinLabel");var b=u.get("axisLabel.showMaxLabel");L(d,function(t,e){if($m(f,e,h.labelInterval,d.length,w,b)){return}var r=c;if(m&&m[t]&&m[t].textStyle){r=new Pl(m[t].textStyle,c,u.ecModel)}var i=r.getTextColor()||u.get("axisLine.lineStyle.color");var a=f.dataToCoord(t);var n=[a,h.labelOffset+h.labelDirection*v];var o=f.scale.getLabel(t);var s=new ls({anid:"label_"+t,position:n,rotation:g.rotation,silent:x,z2:10});ol(s.style,r,{text:p[e],textAlign:r.getShallow("align",true)||g.textAlign,textVerticalAlign:r.getShallow("verticalAlign",true)||r.getShallow("baseline",true)||g.textVerticalAlign,textFill:typeof i==="function"?i(f.type==="category"?o:f.type==="value"?t+"":t,e):i});if(_){s.eventData=Gm(u);s.eventData.targetType="axisLabel";s.eventData.value=o}l._dumbGroup.add(s);s.updateTransform();y.push(s);l.group.add(s);s.decomposeTransform()});return y}var ty=L;var ey=R;function ry(t,e){var r={axesInfo:{},seriesInvolved:false,coordSysAxesInfo:{},coordSysMap:{}};iy(r,t,e);r.seriesInvolved&&ny(r,t);return r}function iy(d,p,t){var o=p.getComponent("tooltip");var g=p.getComponent("axisPointer");var m=g.get("link",true)||[];var y=[];ty(t.getCoordinateSystems(),function(f){if(!f.axisPointerEnabled){return}var t=cy(f.model);var c=d.coordSysAxesInfo[t]={};d.coordSysMap[t]=f;var e=f.model;var v=e.getModel("tooltip",o);ty(f.getAxes(),ey(n,false,null));if(f.getTooltipAxes&&o&&v.get("show")){var r=v.get("trigger")==="axis";var i=v.get("axisPointer.type")==="cross";var a=f.getTooltipAxes(v.get("axisPointer.axis"));if(r||i){ty(a.baseAxes,ey(n,i?"cross":true,r))}if(i){ty(a.otherAxes,ey(n,"cross",false))}}function n(t,e,r){var i=r.model.getModel("axisPointer",g);var a=i.get("show");if(!a||a==="auto"&&!t&&!fy(i)){return}if(e==null){e=i.get("triggerTooltip")}i=t?ay(r,v,g,p,t,e):i;var n=i.get("snap");var o=cy(r.model);var s=e||n||r.type==="category";var l=d.axesInfo[o]={key:o,axis:r,coordSys:f,axisPointerModel:i,triggerTooltip:e,involveSeries:s,snap:n,useHandle:fy(i),seriesModels:[]};c[o]=l;d.seriesInvolved|=s;var u=oy(m,r);if(u!=null){var h=y[u]||(y[u]={axesInfo:{}});h.axesInfo[o]=l;h.mapper=m[u].mapper;l.linkGroup=h}}})}function ay(t,e,r,i,a,n){var o=e.getModel("axisPointer");var s={};ty(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=P(o.get(t))});s.snap=t.type!=="category"&&!!n;if(o.get("type")==="cross"){s.type="line"}var l=s.label||(s.label={});l.show==null&&(l.show=false);if(a==="cross"){var u=o.get("label.show");l.show=u!=null?u:true;if(!n){var h=s.lineStyle=o.get("crossStyle");h&&C(l,h.textStyle)}}return t.model.getModel("axisPointer",new Pl(s,r,i))}function ny(a,t){t.eachSeries(function(r){var i=r.coordinateSystem;var t=r.get("tooltip.trigger",true);var e=r.get("tooltip.show",true);if(!i||t==="none"||t===false||t==="item"||e===false||r.get("axisPointer.show",true)===false){return}ty(a.coordSysAxesInfo[cy(i.model)],function(t){var e=t.axis;if(i.getAxis(e.dim)===e){t.seriesModels.push(r);t.seriesDataCount==null&&(t.seriesDataCount=0);t.seriesDataCount+=r.getData().count()}})},this)}function oy(t,e){var r=e.model;var i=e.dim;for(var a=0;a<t.length;a++){var n=t[a]||{};if(sy(n[i+"AxisId"],r.id)||sy(n[i+"AxisIndex"],r.componentIndex)||sy(n[i+"AxisName"],r.name)){return a}}}function sy(t,e){return t==="all"||B(t)&&S(t,e)>=0||t===e}function ly(t){var e=uy(t);if(!e){return}var r=e.axisPointerModel;var i=e.axis.scale;var a=r.option;var n=r.get("status");var o=r.get("value");if(o!=null){o=i.parse(o)}var s=fy(r);if(n==null){a.status=s?"show":"hide"}var l=i.getExtent().slice();l[0]>l[1]&&l.reverse();if(o==null||o>l[1]){o=l[1]}if(o<l[0]){o=l[0]}a.value=o;if(s){a.status=e.axis.scale.isBlank()?"hide":"show"}}function uy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[cy(t)]}function hy(t){var e=uy(t);return e&&e.axisPointerModel}function fy(t){return!!t.get("handle.show")}function cy(t){return t.type+"||"+t.id}var vy=ed({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,r,i){this.axisPointerClass&&ly(t);vy.superApply(this,"render",arguments);dy(this,t,e,r,i,true)},updateAxisPointer:function(t,e,r,i,a){dy(this,t,e,r,i,false)},remove:function(t,e){var r=this._axisPointer;r&&r.remove(e);vy.superApply(this,"remove",arguments)},dispose:function(t,e){py(this,e);vy.superApply(this,"dispose",arguments)}});function dy(t,e,r,i,a,n){var o=vy.getAxisPointerClass(t.axisPointerClass);if(!o){return}var s=hy(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,i,n):py(t,i)}function py(t,e,r){var i=t._axisPointer;i&&i.dispose(e,r);t._axisPointer=null}var gy=[];vy.registerAxisPointerClass=function(t,e){if(A){if(gy[t]){throw new Error("axisPointer "+t+" exists")}}gy[t]=e};vy.getAxisPointerClass=function(t){return t&&gy[t]};function my(t,e,r){r=r||{};var i=t.coordinateSystem;var a=e.axis;var n={};var o=a.position;var s=a.onZero?"onZero":o;var l=a.dim;var u=i.getRect();var h=[u.x,u.x+u.width,u.y,u.y+u.height];var f={left:0,right:1,top:0,bottom:1,onZero:2};var c=e.get("offset")||0;var v=l==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(a.onZero){var d=i.getAxis(l==="x"?"y":"x",a.onZeroAxisIndex);var p=d.toGlobalCoord(d.dataToCoord(0));v[f["onZero"]]=Math.max(Math.min(p,v[1]),v[0])}n.position=[l==="y"?v[f[s]]:h[0],l==="x"?v[f[s]]:h[3]];n.rotation=Math.PI/2*(l==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[o];n.labelOffset=a.onZero?v[f[o]]-v[f["onZero"]]:0;if(e.get("axisTick.inside")){n.tickDirection=-n.tickDirection}if(j(r.labelInside,e.get("axisLabel.inside"))){n.labelDirection=-n.labelDirection}var m=e.get("axisLabel.rotate");n.labelRotate=s==="top"?-m:m;n.labelInterval=a.getLabelInterval();n.z2=1;return n}var yy=Fm.ifIgnoreOnTick;var xy=Fm.getInterval;var _y=["axisLine","axisTickLabel","axisName"];var wy=["splitArea","splitLine"];var by=vy.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new cr;this.group.add(this._axisGroup);if(!e.get("show")){return}var n=e.getCoordSysModel();var o=my(n,e);var s=new Fm(e,o);L(_y,s.add,s);this._axisGroup.add(s.getGroup());L(wy,function(t){if(e.get(t+".show")){this["_"+t](e,n,o.labelInterval)}},this);wl(a,this._axisGroup,e);by.superCall(this,"render",e,t,r,i)},_splitLine:function(t,e,r){var i=t.axis;if(i.scale.isBlank()){return}var a=t.getModel("splitLine");var n=a.getModel("lineStyle");var o=n.get("color");var s=xy(a,r);o=B(o)?o:[o];var l=e.coordinateSystem.getRect();var u=i.isHorizontal();var h=0;var f=i.getTicksCoords();var c=i.scale.getTicks();var v=t.get("axisLabel.showMinLabel");var d=t.get("axisLabel.showMaxLabel");var p=[];var g=[];var m=n.getLineStyle();for(var y=0;y<f.length;y++){if(yy(i,y,s,f.length,v,d)){continue}var x=i.toGlobalCoord(f[y]);if(u){p[0]=x;p[1]=l.y;g[0]=x;g[1]=l.y+l.height}else{p[0]=l.x;p[1]=x;g[0]=l.x+l.width;g[1]=x}var _=h++%o.length;this._axisGroup.add(new ws(Hs({anid:"line_"+c[y],shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:C({stroke:o[_]},m),silent:true})))}},_splitArea:function(t,e,r){var i=t.axis;if(i.scale.isBlank()){return}var a=t.getModel("splitArea");var n=a.getModel("areaStyle");var o=n.get("color");var s=e.coordinateSystem.getRect();var l=i.getTicksCoords();var u=i.scale.getTicks();var h=i.toGlobalCoord(l[0]);var f=i.toGlobalCoord(l[0]);var c=0;var v=xy(a,r);var d=n.getAreaStyle();o=B(o)?o:[o];var p=t.get("axisLabel.showMinLabel");var g=t.get("axisLabel.showMaxLabel");for(var m=1;m<l.length;m++){if(yy(i,m,v,l.length,p,g)&&m<l.length-1){continue}var y=i.toGlobalCoord(l[m]);var x;var _;var w;var b;if(i.isHorizontal()){x=h;_=s.y;w=y-x;b=s.height}else{x=s.x;_=f;w=s.width;b=y-_}var S=c++%o.length;this._axisGroup.add(new _s({anid:"area_"+u[m],shape:{x:x,y:_,width:w,height:b},style:C({fill:o[S]},d),silent:true}));h=x+w;f=_+b}}});by.extend({type:"xAxis"});by.extend({type:"yAxis"});ed({type:"grid",render:function(t,e){this.group.removeAll();if(t.get("show")){this.group.add(new _s({shape:t.coordinateSystem.getRect(),style:C({fill:t.get("backgroundColor")},t.getItemStyle()),silent:true,z2:-1}))}}});Zv(function(t){if(t.xAxis&&t.yAxis&&!t.grid){t.grid={}}});Kv(um("line","circle","line"));$v(hm("line"));Uv(jc.PROCESSOR.STATISTIC,vm("line"));var Sy=Tf.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Zd(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var r=e.dataToPoint(e.clampData(t));var i=this.getData();var a=i.getLayout("offset");var n=i.getLayout("size");var o=e.getBaseAxis().isHorizontal()?0:1;r[o]+=a+n/2;return r}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:true,barMinHeight:0,barMinAngle:0,itemStyle:{},emphasis:{}}});Sy.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});function My(t,e,r,i,a,n,o){var s=r.getModel("label");var l=r.getModel("emphasis.label");nl(t,e,s,l,{labelFetcher:a,labelDataIndex:n,defaultText:xg(a.getData(),n),isRectText:true,autoColor:i});Iy(t);Iy(e)}function Iy(t,e){if(t.textPosition==="outside"){t.textPosition=e}}var Dy=pn([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);var Ty={getBarItemStyle:function(t){var e=Dy(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}};var Ay=["itemStyle","barBorderWidth"];N(Pl.prototype,Ty);id({type:"bar",render:function(t,e,r){var i=t.get("coordinateSystem");if(i==="cartesian2d"||i==="polar"){this._render(t,e,r)}else if(A){console.warn("Only cartesian2d and polar supported for bar.")}return this.group},dispose:nt,_render:function(n,t,e){var o=this.group;var s=n.getData();var l=this._data;var u=n.coordinateSystem;var r=u.getBaseAxis();var h;if(u.type==="cartesian2d"){h=r.isHorizontal()}else if(u.type==="polar"){h=r.dim==="angle"}var f=n.isAnimationEnabled()?n:null;s.diff(l).add(function(t){if(!s.hasValue(t)){return}var e=s.getItemModel(t);var r=Py[u.type](s,t,e);var i=Cy[u.type](s,t,e,r,h,f);s.setItemGraphicEl(t,i);o.add(i);Ny(i,s,t,e,r,n,h,u.type==="polar")}).update(function(t,e){var r=l.getItemGraphicEl(e);if(!s.hasValue(t)){o.remove(r);return}var i=s.getItemModel(t);var a=Py[u.type](s,t,i);if(r){gl(r,{shape:a},f,t)}else{r=Cy[u.type](s,t,i,a,h,f,true)}s.setItemGraphicEl(t,r);o.add(r);Ny(r,s,t,i,a,n,h,u.type==="polar")}).remove(function(t){var e=l.getItemGraphicEl(t);if(u.type==="cartesian2d"){e&&Ly(t,f,e)}else{e&&ky(t,f,e)}}).execute();this._data=s},remove:function(e,t){var r=this.group;var i=this._data;if(e.get("animation")){if(i){i.eachItemGraphicEl(function(t){if(t.type==="sector"){ky(t.dataIndex,e,t)}else{Ly(t.dataIndex,e,t)}})}}else{r.removeAll()}}});var Cy={cartesian2d:function(t,e,r,i,a,n,o){var s=new _s({shape:N({},i)});if(n){var l=s.shape;var u=a?"height":"width";var h={};l[u]=0;h[u]=i[u];Il[o?"updateProps":"initProps"](s,{shape:h},n,e)}return s},polar:function(t,e,r,i,a,n,o){var s=i.startAngle<i.endAngle;var l=new cs({shape:C({clockwise:s},i)});if(n){var u=l.shape;var h=a?"r":"endAngle";var f={};u[h]=a?0:i.startAngle;f[h]=i[h];Il[o?"updateProps":"initProps"](l,{shape:f},n,e)}return l}};function Ly(t,e,r){r.style.text=null;gl(r,{shape:{width:0}},e,t,function(){r.parent&&r.parent.remove(r)})}function ky(t,e,r){r.style.text=null;gl(r,{shape:{r:r.shape.r0}},e,t,function(){r.parent&&r.parent.remove(r)})}var Py={cartesian2d:function(t,e,r){var i=t.getItemLayout(e);var a=Ey(r,i);var n=i.width>0?1:-1;var o=i.height>0?1:-1;return{x:i.x+n*a/2,y:i.y+o*a/2,width:i.width-n*a,height:i.height-o*a}},polar:function(t,e,r){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function Ny(t,e,r,i,a,n,o,s){var l=e.getItemVisual(r,"color");var u=e.getItemVisual(r,"opacity");var h=i.getModel("itemStyle");var f=i.getModel("emphasis.itemStyle").getBarItemStyle();if(!s){t.setShape("r",h.get("barBorderRadius")||0)}t.useStyle(C({fill:l,opacity:u},h.getBarItemStyle()));var c=i.getShallow("cursor");c&&t.attr("cursor",c);var v=o?a.height>0?"bottom":"top":a.width>0?"left":"right";if(!s){My(t.style,f,i,l,n,r,v)}al(t,f)}function Ey(t,e){var r=t.get(Ay)||0;return Math.min(r,Math.abs(e.width),Math.abs(e.height))}$v(R(dp,"bar"));Kv(function(t){t.eachSeriesByType("bar",function(t){var e=t.getData();e.setVisual("legendSymbol","roundRect")})});var Oy=function(t,e,r){e=B(e)&&{coordDimensions:e}||N({},e);var i=t.getSource();var a=Fd(i,e);var n=new Dd(a,t);n.initData(i,r);return n};var zy={updateSelectedMap:function(t){this._targetList=B(t)?t.slice():[];this._selectTargetMap=D(t||[],function(t,e){t.set(e.name,e);return t},it())},select:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);var i=this.get("selectedMode");if(i==="single"){this._selectTargetMap.each(function(t){t.selected=false})}r&&(r.selected=true)},unSelect:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);r&&(r.selected=false)},toggleSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);if(r!=null){this[r.selected?"unSelect":"select"](t,e);return r.selected}},isSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);return r&&r.selected}};var Ry=rd({type:"series.pie",init:function(t){Ry.superApply(this,"init",arguments);this.legendDataProvider=function(){return this.getRawData()};this.updateSelectedMap(this._createSelectableList());this._defaultLabelLine(t)},mergeOption:function(t){Ry.superCall(this,"mergeOption",t);this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Oy(this,["value"])},_createSelectableList:function(){var t=this.getRawData();var e=t.mapDimension("value");var r=[];for(var i=0,a=t.count();i<a;i++){r.push({name:t.getName(i),value:t.get(e,i),selected:xf(t,i,"selected")})}return r},getDataParams:function(t){var e=this.getData();var r=Ry.superCall(this,"getDataParams",t);var i=[];e.each(e.mapDimension("value"),function(t){i.push(t)});r.percent=Yl(i,t,e.hostModel.get("percentPrecision"));r.$vars.push("percent");return r},_defaultLabelLine:function(t){Wa(t,"labelLine",["show"]);var e=t.labelLine;var r=t.emphasis.labelLine;e.show=e.show&&t.label.show;r.show=r.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:true,hoverAnimation:true,center:["50%","50%"],radius:[0,"75%"],clockwise:true,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:true,percentPrecision:2,stillShowZeroSum:true,label:{rotate:false,show:true,position:"outer"},labelLine:{show:true,length:15,length2:15,smooth:false,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});I(Ry,zy);function By(t,e,r,i){var a=e.getData();var n=this.dataIndex;var o=a.getName(n);var s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id});a.each(function(t){Vy(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,r)})}function Vy(t,e,r,i,a){var n=(e.startAngle+e.endAngle)/2;var o=Math.cos(n);var s=Math.sin(n);var l=r?i:0;var u=[o*l,s*l];a?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Gy(t,e){cr.call(this);var r=new cs({z2:2});var i=new xs;var a=new ls;this.add(r);this.add(i);this.add(a);this.updateData(t,e,true);function n(){i.ignore=i.hoverIgnore;a.ignore=a.hoverIgnore}function o(){i.ignore=i.normalIgnore;a.ignore=a.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var Fy=Gy.prototype;Fy.updateData=function(t,e,r){var i=this.childAt(0);var a=t.hostModel;var n=t.getItemModel(e);var o=t.getItemLayout(e);var s=N({},o);s.label=null;if(r){i.setShape(s);var l=a.getShallow("animationType");if(l==="scale"){i.shape.r=o.r0;ml(i,{shape:{r:o.r}},a,e)}else{i.shape.endAngle=o.startAngle;gl(i,{shape:{endAngle:o.endAngle}},a,e)}}else{gl(i,{shape:s},a,e)}var u=t.getItemVisual(e,"color");i.useStyle(C({lineJoin:"bevel",fill:u},n.getModel("itemStyle").getItemStyle()));i.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle();var h=n.getShallow("cursor");h&&i.attr("cursor",h);Vy(this,t.getItemLayout(e),a.isSelected(null,e),a.get("selectedOffset"),a.get("animation"));function f(){i.stopAnimation(true);i.animateTo({shape:{r:o.r+a.get("hoverOffset")}},300,"elasticOut")}function c(){i.stopAnimation(true);i.animateTo({shape:{r:o.r}},300,"elasticOut")}i.off("mouseover").off("mouseout").off("emphasis").off("normal");if(n.get("hoverAnimation")&&a.isAnimationEnabled()){i.on("mouseover",f).on("mouseout",c).on("emphasis",f).on("normal",c)}this._updateLabel(t,e);al(this)};Fy._updateLabel=function(t,e){var r=this.childAt(1);var i=this.childAt(2);var a=t.hostModel;var n=t.getItemModel(e);var o=t.getItemLayout(e);var s=o.label;var l=t.getItemVisual(e,"color");gl(r,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},a,e);gl(i,{style:{x:s.x,y:s.y}},a,e);i.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=n.getModel("label");var h=n.getModel("emphasis.label");var f=n.getModel("labelLine");var c=n.getModel("emphasis.labelLine");var l=t.getItemVisual(e,"color");nl(i.style,i.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")});i.ignore=i.normalIgnore=!u.get("show");i.hoverIgnore=!h.get("show");r.ignore=r.normalIgnore=!f.get("show");r.hoverIgnore=!c.get("show");r.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")});r.setStyle(f.getModel("lineStyle").getLineStyle());r.hoverStyle=c.getModel("lineStyle").getLineStyle();var v=f.get("smooth");if(v&&v===true){v=.4}r.setShape({smooth:v})};M(Gy,cr);var Wy=Ff.extend({type:"pie",init:function(){var t=new cr;this._sectorGroup=t},render:function(t,e,r,i){if(i&&i.from===this.uid){return}var a=t.getData();var n=this._data;var o=this.group;var s=e.get("animation");var l=!n;var u=t.get("animationType");var h=R(By,this.uid,t,s,r);var f=t.get("selectedMode");a.diff(n).add(function(t){var e=new Gy(a,t);if(l&&u!=="scale"){e.eachChild(function(t){t.stopAnimation(true)})}f&&e.on("click",h);a.setItemGraphicEl(t,e);o.add(e)}).update(function(t,e){var r=n.getItemGraphicEl(e);r.updateData(a,t);r.off("click");f&&r.on("click",h);o.add(r);a.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);o.remove(e)}).execute();if(s&&l&&a.count()>0&&u!=="scale"){var c=a.getItemLayout(0);var v=Math.max(r.getWidth(),r.getHeight())/2;var d=z(o.removeClipPath,o);o.setClipPath(this._createClipPath(c.cx,c.cy,v,c.startAngle,c.clockwise,d,t))}this._data=a},dispose:function(){},_createClipPath:function(t,e,r,i,a,n,o){var s=new cs({shape:{cx:t,cy:e,r0:0,r:r,startAngle:i,endAngle:i,clockwise:a}});ml(s,{shape:{endAngle:i+(a?1:-1)*Math.PI*2}},o,n);return s},containPoint:function(t,e){var r=e.getData();var i=r.getItemLayout(0);if(i){var a=t[0]-i.cx;var n=t[1]-i.cy;var o=Math.sqrt(a*a+n*n);return o<=i.r&&o>=i.r0}}});var Hy=function(r,t){L(t,function(n){n.update="updateView";Xv(n,function(t,e){var a={};e.eachComponent({mainType:"series",subType:r,query:t},function(r){if(r[n.method]){r[n.method](t.name,t.dataIndex)}var i=r.getData();i.each(function(t){var e=i.getName(t);a[e]=r.isSelected(e)||false})});return{name:t.name,selected:a}})})};var Zy=function(i){return{getTargetSeries:function(t){var e={};var r=it();t.eachSeriesByType(i,function(t){t.__paletteScope=e;r.set(t.uid,t)});return r},reset:function(n,t){var o=n.getRawData();var s={};var l=n.getData();l.each(function(t){var e=l.getRawIndex(t);s[e]=t});o.each(function(t){var e=s[t];var r=e!=null&&l.getItemVisual(e,"color",true);if(!r){var i=o.getItemModel(t);var a=i.get("itemStyle.color")||n.getColorFromPalette(o.getName(t)||t+"",n.__paletteScope,o.count());o.setItemVisual(t,"color",a);if(e!=null){l.setItemVisual(e,"color",a)}}else{o.setItemVisual(t,"color",r)}})}}};function Uy(n,t,e,r,i,a,o){n.sort(function(t,e){return t.y-e.y});function s(t,e,r,i){for(var a=t;a<e;a++){n[a].y+=r;if(a>t&&a+1<e&&n[a+1].y>n[a].y+n[a].height){l(a,r/2);return}}l(e-1,r/2)}function l(t,e){for(var r=t;r>=0;r--){n[r].y-=e;if(r>0&&n[r].y>n[r-1].y+n[r-1].height){break}}}function u(t,e,r,i,a,n){var o=n>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0;for(var s=0,l=t.length;s<l;s++){if(t[s].position==="center"){continue}var u=Math.abs(t[s].y-i);var h=t[s].len;var f=t[s].len2;var c=u<a+h?Math.sqrt((a+h+f)*(a+h+f)-u*u):Math.abs(t[s].x-r);if(e&&c>=o){c=o-10}if(!e&&c<=o){c=o+10}t[s].x=r+c*n;o=c}}var h=0;var f;var c=n.length;var v=[];var d=[];for(var p=0;p<c;p++){f=n[p].y-h;if(f<0){s(p,c,-f,i)}h=n[p].y+n[p].height}if(o-h<0){l(c-1,h-o)}for(var p=0;p<c;p++){if(n[p].y>=e){d.push(n[p])}else{v.push(n[p])}}u(v,false,t,e,r,i);u(d,true,t,e,r,i)}function jy(t,e,r,i,a,n){var o=[];var s=[];for(var l=0;l<t.length;l++){if(t[l].x<e){o.push(t[l])}else{s.push(t[l])}}Uy(s,e,r,i,1,a,n);Uy(o,e,r,i,-1,a,n);for(var l=0;l<t.length;l++){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];if(t[l].x<e){u[2][0]=t[l].x+3}else{u[2][0]=t[l].x-3}u[1][1]=u[2][1]=t[l].y;u[1][0]=u[2][0]+h}}}var Xy=function(D,T,t,e){var A=D.getData();var C=[];var L;var k;var P=false;A.each(function(t){var e=A.getItemLayout(t);var r=A.getItemModel(t);var i=r.getModel("label");var a=i.get("position")||r.get("emphasis.label.position");var n=r.getModel("labelLine");var o=n.get("length");var s=n.get("length2");var l=(e.startAngle+e.endAngle)/2;var u=Math.cos(l);var h=Math.sin(l);var f;var c;var v;var d;L=e.cx;k=e.cy;var p=a==="inside"||a==="inner";if(a==="center"){f=e.cx;c=e.cy;d="center"}else{var g=(p?(e.r+e.r0)/2*u:e.r*u)+L;var m=(p?(e.r+e.r0)/2*h:e.r*h)+k;f=g+u*3;c=m+h*3;if(!p){var y=g+u*(o+T-e.r);var x=m+h*(o+T-e.r);var _=y+(u<0?-1:1)*s;var w=x;f=_+(u<0?-5:5);c=w;v=[[g,m],[y,x],[_,w]]}d=p?"center":u>0?"left":"right"}var b=i.getFont();var S=i.get("rotate")?u<0?-l+Math.PI:-l:0;var M=D.getFormattedLabel(t,"normal")||A.getName(t);var I=Jr(M,b,d,"top");P=!!S;e.label={x:f,y:c,position:a,height:I.height,len:o,len2:s,linePoints:v,textAlign:d,verticalAlign:"middle",rotation:S,inside:p};if(!p){C.push(e.label)}});if(!P&&D.get("avoidLabelOverlap")){jy(C,L,k,T,t,e)}};var Yy=Math.PI*2;var qy=Math.PI/180;var $y=function(t,e,D,r){e.eachSeriesByType(t,function(t){var a=t.getData();var e=a.mapDimension("value");var r=t.get("center");var i=t.get("radius");if(!B(i)){i=[0,i]}if(!B(r)){r=[r,r]}var n=D.getWidth();var o=D.getHeight();var s=Math.min(n,o);var l=Wl(r[0],n);var u=Wl(r[1],o);var h=Wl(i[0],s/2);var f=Wl(i[1],s/2);var c=-t.get("startAngle")*qy;var v=t.get("minAngle")*qy;var d=0;a.each(e,function(t){!isNaN(t)&&d++});var p=a.getSum(e);var g=Math.PI/(p||d)*2;var m=t.get("clockwise");var y=t.get("roseType");var x=t.get("stillShowZeroSum");var _=a.getDataExtent(e);_[0]=0;var w=Yy;var b=0;var S=c;var M=m?1:-1;a.each(e,function(t,e){var r;if(isNaN(t)){a.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:l,cy:u,r0:h,r:y?NaN:f});return}if(y!=="area"){r=p===0&&x?g:t*g}else{r=Yy/d}if(r<v){r=v;w-=v}else{b+=t}var i=S+M*r;a.setItemLayout(e,{angle:r,startAngle:S,endAngle:i,clockwise:m,cx:l,cy:u,r0:h,r:y?Fl(t,_,[h,f]):f});S=i});if(w<Yy&&d){if(w<=.001){var I=Yy/d;a.each(e,function(t,e){if(!isNaN(t)){var r=a.getItemLayout(e);r.angle=I;r.startAngle=c+M*e*I;r.endAngle=c+M*(e+1)*I}})}else{g=w/b;S=c;a.each(e,function(t,e){if(!isNaN(t)){var r=a.getItemLayout(e);var i=r.angle===v?v:t*g;r.startAngle=S;r.endAngle=S+M*i;S+=M*i}})}}Xy(t,f,n,o)})};var Ky=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(!i||!i.length){return}var a=t.getData();a.filterSelf(function(t){var e=a.getName(t);for(var r=0;r<i.length;r++){if(!i[r].isSelected(e)){return false}}return true})}}};Hy("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]);Kv(Zy("pie"));$v(R($y,"pie"));Uv(Ky("pie"));Tf.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return Zd(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;if(t==null){return this.option.large?5e3:this.get("progressive")}return t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;if(t==null){return this.option.large?1e4:this.get("progressiveThreshold")}return t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:true,hoverAnimation:true,symbolSize:10,large:false,largeThreshold:2e3,itemStyle:{opacity:.8},progressive:null}});var Jy=4;var Qy=zs({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var r=e.points;var i=e.size;var a=this.symbolProxy;var n=a.shape;var o=t.getContext?t.getContext():t;var s=o&&i[0]<Jy;if(s){return}for(var l=0;l<r.length;){var u=r[l++];var h=r[l++];if(isNaN(u)||isNaN(h)){continue}n.x=u-i[0]/2;n.y=h-i[1]/2;n.width=i[0];n.height=i[1];a.buildPath(t,n,true)}},afterBrush:function(t){var e=this.shape;var r=e.points;var i=e.size;var a=i[0]<Jy;if(!a){return}this.setTransform(t);for(var n=0;n<r.length;){var o=r[n++];var s=r[n++];if(isNaN(o)||isNaN(s)){continue}t.fillRect(o-i[0]/2,s-i[1]/2,i[0],i[1])}this.restoreTransform(t)},findDataIndex:function(t,e){var r=this.shape;var i=r.points;var a=r.size;var n=Math.max(a[0],4);var o=Math.max(a[1],4);for(var s=i.length/2-1;s>=0;s--){var l=s*2;var u=i[l]-n/2;var h=i[l+1]-o/2;if(t>=u&&e>=h&&t<=u+n&&e<=h+o){return s}}return-1}});function tx(){this.group=new cr}var ex=tx.prototype;ex.isPersistent=function(){return!this._incremental};ex.updateData=function(t){this.group.removeAll();var e=new Qy({rectHover:true,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")});this._setCommon(e,t);this.group.add(e);this._incremental=null};ex.updateLayout=function(t){if(this._incremental){return}var i=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(t.startIndex!=null){var e=(t.endIndex-t.startIndex)*2;var r=t.startIndex*4*2;i=new Float32Array(i.buffer,r,e)}t.setShape("points",i)})};ex.incrementalPrepareUpdate=function(t){this.group.removeAll();this._clearIncremental();if(t.count()>2e6){if(!this._incremental){this._incremental=new Ls({silent:true})}this.group.add(this._incremental)}else{this._incremental=null}};ex.incrementalUpdate=function(t,e){var r;if(this._incremental){r=new Qy;this._incremental.addDisplayable(r,true)}else{r=new Qy({rectHover:true,cursor:"default",startIndex:t.start,endIndex:t.end});r.incremental=true;this.group.add(r)}r.setShape({points:e.getLayout("symbolPoints")});this._setCommon(r,e,!!this._incremental)};ex._setCommon=function(r,t,e){var i=t.hostModel;var a=t.getVisual("symbolSize");r.setShape("size",a instanceof Array?a:[a,a]);r.symbolProxy=Qp(t.getVisual("symbol"),0,0,0,0);r.setColor=r.symbolProxy.setColor;var n=r.shape.size[0]<Jy;r.useStyle(i.getModel("itemStyle").getItemStyle(n?["color","shadowBlur","shadowColor"]:["color"]));var o=t.getVisual("color");if(o){r.setColor(o)}if(!e){r.seriesIndex=i.seriesIndex;r.on("mousemove",function(t){r.dataIndex=null;var e=r.findDataIndex(t.offsetX,t.offsetY);if(e>=0){r.dataIndex=e+(r.startIndex||0)}})}};ex.remove=function(){this._clearIncremental();this._incremental=null;this.group.removeAll()};ex._clearIncremental=function(){var t=this._incremental;if(t){t.clearDisplaybles()}};id({type:"scatter",render:function(t,e,r){var i=t.getData();var a=this._updateSymbolDraw(i,t);a.updateData(i);this._finished=true},incrementalPrepareRender:function(t,e,r){var i=t.getData();var a=this._updateSymbolDraw(i,t);a.incrementalPrepareUpdate(i);this._finished=false},incrementalRender:function(t,e,r){this._symbolDraw.incrementalUpdate(t,e.getData());this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var i=t.getData();this.group.dirty();if(!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent()){return{update:true}}else{var a=hm().reset(t);if(a.progress){a.progress({start:0,end:i.count()},i)}this._symbolDraw.updateLayout(i)}},_updateSymbolDraw:function(t,e){var r=this._symbolDraw;var i=e.pipelineContext;var a=i.large;if(!r||a!==this._isLargeDraw){r&&r.remove();r=this._symbolDraw=a?new tx:new Cg;this._isLargeDraw=a;this.group.removeAll()}this.group.add(r.group);return r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(true);this._symbolDraw=null},dispose:function(){}});Kv(um("scatter","circle"));$v(hm("scatter"));function rx(t,e,r){pg.call(this,t,e,r);this.type="value";this.angle=0;this.name="";this.model}M(rx,pg);function ix(t,e,r){this._model=t;this.dimensions=[];this._indicatorAxes=T(t.getIndicatorModels(),function(t,e){var r="indicator_"+e;var i=new rx(r,new sp);i.name=t.get("name");i.model=t;t.axis=i;this.dimensions.push(r);return i},this);this.resize(t,r);this.cx;this.cy;this.r;this.startAngle}ix.prototype.getIndicatorAxes=function(){return this._indicatorAxes};ix.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)};ix.prototype.coordToPoint=function(t,e){var r=this._indicatorAxes[e];var i=r.angle;var a=this.cx+t*Math.cos(i);var n=this.cy-t*Math.sin(i);return[a,n]};ix.prototype.pointToData=function(t){var e=t[0]-this.cx;var r=t[1]-this.cy;var i=Math.sqrt(e*e+r*r);e/=i;r/=i;var a=Math.atan2(-r,e);var n=Infinity;var o;var s=-1;for(var l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l];var h=Math.abs(a-u.angle);if(h<n){o=u;s=l;n=h}}return[s,+(o&&o.coodToData(i))]};ix.prototype.resize=function(t,e){var r=t.get("center");var i=e.getWidth();var a=e.getHeight();var n=Math.min(i,a)/2;this.cx=Wl(r[0],i);this.cy=Wl(r[1],a);this.startAngle=t.get("startAngle")*Math.PI/180;this.r=Wl(t.get("radius"),n);L(this._indicatorAxes,function(t,e){t.setExtent(0,this.r);var r=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;r=Math.atan2(Math.sin(r),Math.cos(r));t.angle=r},this)};ix.prototype.update=function(i,t){var a=this._indicatorAxes;var n=this._model;L(a,function(t){t.scale.setExtent(Infinity,-Infinity)});i.eachSeriesByType("radar",function(t,e){if(t.get("coordinateSystem")!=="radar"||i.getComponent("radar",t.get("radarIndex"))!==n){return}var r=t.getData();L(a,function(t){t.scale.unionExtentFromData(r,r.mapDimension(t.dim))})},this);var v=n.get("splitNumber");function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10));var r=t/e;if(r===2){r=5}else{r*=2}return r*e}L(a,function(t,e){var r=Op(t.scale,t.model);Rp(t.scale,t.model);var i=t.model;var a=t.scale;var n=i.getMin();var o=i.getMax();var s=a.getInterval();if(n!=null&&o!=null){a.setExtent(+n,+o);a.setInterval((o-n)/v)}else if(n!=null){var l;do{l=n+s*v;a.setExtent(+n,l);a.setInterval(s);s=d(s)}while(l<r[1]&&isFinite(l)&&isFinite(r[1]))}else if(o!=null){var u;do{u=o-s*v;a.setExtent(u,+o);a.setInterval(s);s=d(s)}while(u>r[0]&&isFinite(u)&&isFinite(r[0]))}else{var h=a.getTicks().length-1;if(h>v){s=d(s)}var f=Math.round((r[0]+r[1])/2/s)*s;var c=Math.round(v/2);a.setExtent(Hl(f-c*s),Hl(f+(v-c)*s));a.setInterval(s)}})};ix.dimensions=[];ix.create=function(r,i){var a=[];r.eachComponent("radar",function(t){var e=new ix(t,r,i);a.push(e);t.coordinateSystem=e});r.eachSeriesByType("radar",function(t){if(t.get("coordinateSystem")==="radar"){t.coordinateSystem=a[t.get("radarIndex")||0]}});return a};Ah.register("radar",ix);var ax=xm.valueAxis;function nx(t,e){return C({show:e},t)}var ox=td({type:"radar",optionUpdated:function(){var a=this.get("boundaryGap");var n=this.get("splitNumber");var o=this.get("scale");var s=this.get("axisLine");var l=this.get("axisTick");var u=this.get("axisLabel");var h=this.get("name");var f=this.get("name.show");var c=this.get("name.formatter");var v=this.get("nameGap");var d=this.get("triggerEvent");var t=T(this.get("indicator")||[],function(t){if(t.max!=null&&t.max>0&&!t.min){t.min=0}else if(t.min!=null&&t.min<0&&!t.max){t.max=0}var e=h;if(t.color!=null){e=C({color:t.color},h)}t=y(P(t),{boundaryGap:a,splitNumber:n,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:t.text,nameLocation:"end",nameGap:v,nameTextStyle:e,triggerEvent:d},false);if(!f){t.name=""}if(typeof c==="string"){var r=t.name;t.name=c.replace("{value}",r!=null?r:"")}else if(typeof c==="function"){t.name=c(t.name,t)}var i=N(new Pl(t,null,this.ecModel),Hp);i.mainType="radar";i.componentIndex=this.componentIndex;return i},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:true},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:false,shape:"polygon",axisLine:y({lineStyle:{color:"#bbb"}},ax.axisLine),axisLabel:nx(ax.axisLabel,false),axisTick:nx(ax.axisTick,false),splitLine:nx(ax.splitLine,true),splitArea:nx(ax.splitArea,true),indicator:[]}});var sx=["axisLine","axisTickLabel","axisName"];ed({type:"radar",render:function(t,e,r){var i=this.group;i.removeAll();this._buildAxes(t);this._buildSplitLineAndArea(t)},_buildAxes:function(t){var r=t.coordinateSystem;var e=r.getIndicatorAxes();var i=T(e,function(t){var e=new Fm(t.model,{position:[r.cx,r.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return e});L(i,function(t){L(sx,t.add,t);this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var i=t.coordinateSystem;var e=i.getIndicatorAxes();if(!e.length){return}var r=t.get("shape");var a=t.getModel("splitLine");var n=t.getModel("splitArea");var o=a.getModel("lineStyle");var s=n.getModel("areaStyle");var l=a.get("show");var u=n.get("show");var h=o.get("color");var f=s.get("color");h=B(h)?h:[h];f=B(f)?f:[f];var c=[];var v=[];function d(t,e,r){var i=r%e.length;t[i]=t[i]||[];return i}if(r==="circle"){var p=e[0].getTicksCoords();var g=i.cx;var m=i.cy;for(var y=0;y<p.length;y++){if(l){var x=d(c,h,y);c[x].push(new us({shape:{cx:g,cy:m,r:p[y]}}))}if(u&&y<p.length-1){var x=d(v,f,y);v[x].push(new vs({shape:{cx:g,cy:m,r0:p[y],r:p[y+1]}}))}}}else{var _;var w=T(e,function(t,e){var r=t.getTicksCoords();_=_==null?r.length-1:Math.min(r.length-1,_);return T(r,function(t){return i.coordToPoint(t,e)})});var b=[];for(var y=0;y<=_;y++){var S=[];for(var M=0;M<e.length;M++){S.push(w[M][y])}if(S[0]){S.push(S[0].slice())}else{if(A){console.error("Can't draw value axis "+y)}}if(l){var x=d(c,h,y);c[x].push(new xs({shape:{points:S}}))}if(u&&b){var x=d(v,f,y-1);v[x].push(new ys({shape:{points:S.concat(b)}}))}b=S.slice().reverse()}}var I=o.getLineStyle();var D=s.getAreaStyle();L(v,function(t,e){this.group.add(Fs(t,{style:C({stroke:"none",fill:f[e%f.length]},D),silent:true}))},this);L(c,function(t,e){this.group.add(Fs(t,{style:C({fill:"none",stroke:h[e%h.length]},I),silent:true}))},this)}});var lx=Tf.extend({type:"series.radar",dependencies:["radar"],init:function(t){lx.superApply(this,"init",arguments);this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return Oy(this,{generateCoord:"indicator_",generateCoordCount:Infinity})},formatTooltip:function(i){var a=this.getData();var t=this.coordinateSystem;var e=t.getIndicatorAxes();var r=this.getData().getName(i);return uu(r===""?this.name:r)+"<br/>"+T(e,function(t,e){var r=a.get(a.mapDimension(t.dim),i);return uu(t.name+" : "+r)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:true,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function ux(t){if(!B(t)){t=[+t,+t]}return t}id({type:"radar",render:function(l,t,e){var r=l.coordinateSystem;var m=this.group;var y=l.getData();var s=this._data;function u(t,e){var r=t.getItemVisual(e,"symbol")||"circle";var i=t.getItemVisual(e,"color");if(r==="none"){return}var a=ux(t.getItemVisual(e,"symbolSize"));var n=Qp(r,-1,-1,2,2,i);n.attr({style:{strokeNoScale:true},z2:100,scale:[a[0]/2,a[1]/2]});return n}function h(t,e,r,i,a,n){r.removeAll();for(var o=0;o<e.length-1;o++){var s=u(i,a);if(s){s.__dimIdx=o;if(t[o]){s.attr("position",t[o]);Il[n?"initProps":"updateProps"](s,{position:e[o]},l,a)}else{s.attr("position",e[o])}r.add(s)}}}function f(t){return T(t,function(t){return[r.cx,r.cy]})}y.diff(s).add(function(t){var e=y.getItemLayout(t);if(!e){return}var r=new ys;var i=new xs;var a={shape:{points:e}};r.shape.points=f(e);i.shape.points=f(e);ml(r,a,l,t);ml(i,a,l,t);var n=new cr;var o=new cr;n.add(i);n.add(r);n.add(o);h(i.shape.points,e,o,y,t,true);y.setItemGraphicEl(t,n)}).update(function(t,e){var r=s.getItemGraphicEl(e);var i=r.childAt(0);var a=r.childAt(1);var n=r.childAt(2);var o={shape:{points:y.getItemLayout(t)}};if(!o.shape.points){return}h(i.shape.points,o.shape.points,n,y,t,false);gl(i,o,l);gl(a,o,l);y.setItemGraphicEl(t,r)}).remove(function(t){m.remove(s.getItemGraphicEl(t))}).execute();y.eachItemGraphicEl(function(t,e){var r=y.getItemModel(e);var i=t.childAt(0);var a=t.childAt(1);var n=t.childAt(2);var o=y.getItemVisual(e,"color");m.add(t);i.useStyle(C(r.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:o}));i.hoverStyle=r.getModel("emphasis.lineStyle").getLineStyle();var s=r.getModel("areaStyle");var l=r.getModel("emphasis.areaStyle");var u=s.isEmpty()&&s.parentModel.isEmpty();var h=l.isEmpty()&&l.parentModel.isEmpty();h=h&&u;a.ignore=u;a.useStyle(C(s.getAreaStyle(),{fill:o,opacity:.7}));a.hoverStyle=l.getAreaStyle();var f=r.getModel("itemStyle").getItemStyle(["color"]);var c=r.getModel("emphasis.itemStyle").getItemStyle();var v=r.getModel("label");var d=r.getModel("emphasis.label");n.eachChild(function(t){t.setStyle(f);t.hoverStyle=P(c);nl(t.style,t.hoverStyle,v,d,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:o,isRectText:true})});function p(){a.attr("ignore",h)}function g(){a.attr("ignore",u)}t.off("mouseover").off("mouseout").off("normal").off("emphasis");t.on("emphasis",p).on("mouseover",p).on("normal",g).on("mouseout",g);al(t)});this._data=y},remove:function(){this.group.removeAll();this._data=null},dispose:function(){}});var hx=function(t){t.eachSeriesByType("radar",function(t){var e=t.getData();var r=[];var i=t.coordinateSystem;if(!i){return}function a(t,e){r[e]=r[e]||[];r[e][o]=i.dataToPoint(t,o)}var n=i.getIndicatorAxes();for(var o=0;o<i.getIndicatorAxes().length;o++){e.each(e.mapDimension(n[o].dim),a)}e.each(function(t){r[t][0]&&r[t].push(r[t][0].slice());e.setItemLayout(t,r[t])})})};var fx=function(r){var t=r.polar;if(t){if(!B(t)){t=[t]}var i=[];L(t,function(t,e){if(t.indicator){if(t.type&&!t.shape){t.shape=t.type}r.radar=r.radar||[];if(!B(r.radar)){r.radar=[r.radar]}r.radar.push(t)}else{i.push(t)}});r.polar=i}L(r.series,function(t){if(t&&t.type==="radar"&&t.polarIndex){t.radarIndex=t.polarIndex}})};Kv(Zy("radar"));Kv(um("radar","circle"));$v(hx);Uv(Ky("radar"));Zv(fx);var cx=Lt;function vx(){ae.call(this)}I(vx,ae);function dx(t){this.name=t;this.zoomLimit;ae.call(this);this._roamTransformable=new vx;this._rawTransformable=new vx;this._center;this._zoom}dx.prototype={constructor:dx,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,i){this._rect=new fr(t,e,r,i);return this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,r,i){this.transformTo(t,e,r,i);this._viewRect=new fr(t,e,r,i)},transformTo:function(t,e,r,i){var a=this.getBoundingRect();var n=this._rawTransformable;n.transform=a.calculateTransform(new fr(t,e,r,i));n.decomposeTransform();this._updateTransform()},setCenter:function(t){if(!t){return}this._center=t;this._updateCenterAndZoom()},setZoom:function(t){t=t||1;var e=this.zoomLimit;if(e){if(e.max!=null){t=Math.min(e.max,t)}if(e.min!=null){t=Math.max(e.min,t)}}this._zoom=t;this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();var e=t.x+t.width/2;var r=t.y+t.height/2;return[e,r]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform();var e=this._roamTransformable;var r=this.getDefaultCenter();var i=this.getCenter();var a=this.getZoom();i=Lt([],i,t);r=Lt([],r,t);e.origin=i;e.position=[r[0]-i[0],r[1]-i[1]];e.scale=[a,a];this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable;var e=this._rawTransformable;e.parent=t;t.updateTransform();e.updateTransform();Xt(this.transform||(this.transform=[]),e.transform||Ut());this._rawTransform=e.getLocalTransform();this.invTransform=this.invTransform||[];Jt(this.invTransform,this.transform);this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();t.applyTransform(this.transform);return t},dataToPoint:function(t,e,r){var i=e?this._rawTransform:this.transform;r=r||[];return i?cx(r,t,i):ut(r,t)},pointToData:function(t){var e=this.invTransform;return e?cx([],t,e):[t[0],t[1]]},convertToPixel:R(px,"dataToPoint"),convertFromPixel:R(px,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}};I(dx,ae);function px(t,e,r,i){var a=r.seriesModel;var n=a?a.coordinateSystem:null;return n===this?n[t](i):null}var gx=[126,25];var mx=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var yx=0;yx<mx.length;yx++){for(var xx=0;xx<mx[yx].length;xx++){mx[yx][xx][0]/=10.5;mx[yx][xx][1]/=-10.5/.75;mx[yx][xx][0]+=gx[0];mx[yx][xx][1]+=gx[1]}}var _x=function(t){if(t.map==="china"){t.regions.push(new lg("南海诸岛",T(mx,function(t){return{type:"polygon",exterior:t}}),gx))}};var bx={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var Sx=function(t){L(t.regions,function(t){var e=bx[t.name];if(e){var r=t.center;r[0]+=e[0]/10.5;r[1]+=-e[1]/(10.5/.75)}})};var Mx={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var Ix=function(t){L(t.regions,function(t){var e=Mx[t.name];if(e){var r=t.center;r[0]=e[0];r[1]=e[1]}})};var Dx=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Tx=function(t){if(t.map==="china"){for(var e=0,r=t.regions.length;e<r;++e){if(t.regions[e].name==="台湾"){t.regions[e].geometries.push({type:"polygon",exterior:Dx[0]})}}}};var Ax=[_x,Sx,Ix,Tx];function Cx(t,e,r,i,a){dx.call(this,t);this.map=e;this._nameCoordMap=it();this.loadGeoJson(r,i,a)}Cx.prototype={constructor:Cx,type:"geo",dimensions:["lng","lat"],containCoord:function(t){var e=this.regions;for(var r=0;r<e.length;r++){if(e[r].contain(t)){return true}}return false},loadGeoJson:function(t,e,r){try{this.regions=t?fg(t):[]}catch(t){throw"Invalid geoJson format\n"+t.message}e=e||{};r=r||{};var i=this.regions;var a=it();for(var n=0;n<i.length;n++){var o=i[n].name;o=r.hasOwnProperty(o)?r[o]:o;i[n].name=o;a.set(o,i[n]);this.addGeoCoord(o,i[n].center);var s=e[o];if(s){i[n].transformTo(s.left,s.top,s.width,s.height)}}this._regionsMap=a;this._rect=null;L(Ax,function(t){t(this)},this)},transformTo:function(t,e,r,i){var a=this.getBoundingRect();a=a.clone();a.y=-a.y-a.height;var n=this._rawTransformable;n.transform=a.calculateTransform(new fr(t,e,r,i));n.decomposeTransform();var o=n.scale;o[1]=-o[1];n.updateTransform();this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){var e=this.regions;for(var r=0;r<e.length;r++){if(e[r].contain(t)){return e[r]}}},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){if(this._rect){return this._rect}var t;var e=this.regions;for(var r=0;r<e.length;r++){var i=e[r].getBoundingRect();t=t||i.clone();t.union(i)}return this._rect=t||new fr(0,0,0,0)},dataToPoint:function(t,e,r){if(typeof t==="string"){t=this.getGeoCoord(t)}if(t){return dx.prototype.dataToPoint.call(this,t,e,r)}},convertToPixel:R(Lx,"dataToPoint"),convertFromPixel:R(Lx,"pointToData")};I(Cx,dx);function Lx(t,e,r,i){var a=r.geoModel;var n=r.seriesModel;var o=a?a.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](i):null}function kx(t,e){var r=t.get("boundingCoords");if(r!=null){var i=r[0];var a=r[1];if(isNaN(i[0])||isNaN(i[1])||isNaN(a[0])||isNaN(a[1])){if(A){console.error("Invalid boundingCoords")}}else{this.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1])}}var n=this.getBoundingRect();var o;var s=t.get("layoutCenter");var l=t.get("layoutSize");var u=e.getWidth();var h=e.getHeight();var f=t.get("aspectScale")||.75;var c=n.width/n.height*f;var v=false;if(s&&l){s=[Wl(s[0],u),Wl(s[1],h)];l=Wl(l,Math.min(u,h));if(!isNaN(s[0])&&!isNaN(s[1])&&!isNaN(l)){v=true}else{if(A){console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.")}}}var d;if(v){var d={};if(c>1){d.width=l;d.height=l/c}else{d.height=l;d.width=l*c}d.y=s[1]-d.height/2;d.x=s[0]-d.width/2}else{o=t.getBoxLayoutParams();o.aspect=c;d=Cu(o,{width:u,height:h})}this.setViewRect(d.x,d.y,d.width,d.height);this.setCenter(t.get("center"));this.setZoom(t.get("zoom"))}function Px(r,t){L(t.get("geoCoord"),function(t,e){r.addGeoCoord(e,t)})}if(A){var Nx=function(t){console.error("Map "+t+" not exists. You can download map file on http://echarts.baidu.com/download-map.html")}}var Ex={dimensions:Cx.prototype.dimensions,create:function(t,n){var o=[];t.eachComponent("geo",function(t,e){var r=t.get("map");var i=od(r);if(A){if(!i){Nx(r)}}var a=new Cx(r+e,r,i&&i.geoJson,i&&i.specialAreas,t.get("nameMap"));a.zoomLimit=t.get("scaleLimit");o.push(a);Px(a,t);t.coordinateSystem=a;a.model=t;a.resize=kx;a.resize(t,n)});t.eachSeries(function(t){var e=t.get("coordinateSystem");if(e==="geo"){var r=t.get("geoIndex")||0;t.coordinateSystem=o[r]}});var r={};t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[];r[e].push(t)}});L(r,function(t,e){var r=od(e);if(A){if(!r){Nx(t[0].get("map"))}}var i=T(t,function(t){return t.get("nameMap")});var a=new Cx(e,e,r&&r.geoJson,r&&r.specialAreas,x(i));a.zoomLimit=j.apply(null,T(t,function(t){return t.get("scaleLimit")}));o.push(a);a.resize=kx;a.resize(t[0],n);L(t,function(t){t.coordinateSystem=a;Px(a,t)})});return o},getFilledRegions:function(t,e,r){var i=(t||[]).slice();r=r||{};var a=od(e);var n=a&&a.geoJson;if(!n){if(A){Nx(e)}return t}var o=it();var s=n.features;for(var l=0;l<i.length;l++){o.set(i[l].name,i[l])}for(var l=0;l<s.length;l++){var u=s[l].properties.name;if(!o.get(u)){if(r.hasOwnProperty(u)){u=r[u]}i.push({name:u})}}return i}};Yv("geo",Ex);var Ox=Tf.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:false,seriesGroup:[],init:function(t){Ox.superApply(this,"init",arguments);this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t){return Oy(this,["value"])},mergeOption:function(t){Ox.superApply(this,"mergeOption",arguments);this.updateSelectedMap(this._createSelectableList())},_createSelectableList:function(){var t=this.getRawData();var e=t.mapDimension("value");var r=[];for(var i=0,a=t.count();i<a;i++){r.push({name:t.getName(i),value:t.get(e,i),selected:xf(t,i,"selected")})}r=Ex.getFilledRegions(r,this.getMapType(),this.option.nameMap);return r},getHostGeoModel:function(){var t=this.option.geoIndex;return t!=null?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(t,e){},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){var e=this.getData();var r=ou(this.getRawValue(t));var i=e.getName(t);var a=this.seriesGroup;var n=[];for(var o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(i);var l=e.mapDimension("value");if(!isNaN(a[o].originalData.get(l,s))){n.push(uu(a[o].name))}}return n.join(", ")+"<br />"+uu(i+" : "+r)},getTooltipPosition:function(t){if(t!=null){var e=this.getData().getName(t);var r=this.coordinateSystem;var i=r.getRegion(e);return i&&r.dataToPoint(i.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:true,dataRangeHoverLink:true,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:false,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:true,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});I(Ox,zy);var zx="\0_ec_interaction_mutex";function Rx(t,e,r){var i=Gx(t);i[e]=r}function Bx(t,e,r){var i=Gx(t);var a=i[e];if(a===r){i[e]=null}}function Vx(t,e){return!!Gx(t)[e]}function Gx(t){return t[zx]||(t[zx]={})}Xv({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function Fx(r){this.pointerChecker;this._zr=r;this._opt={};var t=z;var i=t(Wx,this);var a=t(Hx,this);var n=t(Zx,this);var o=t(Ux,this);var s=t(jx,this);Rt.call(this);this.setPointerChecker=function(t){this.pointerChecker=t};this.enable=function(t,e){this.disable();this._opt=C(P(e)||{},{zoomOnMouseWheel:true,moveOnMouseMove:true,preventDefaultMouseMove:true});if(t==null){t=true}if(t===true||(t==="move"||t==="pan")){r.on("mousedown",i);r.on("mousemove",a);r.on("mouseup",n)}if(t===true||(t==="scale"||t==="zoom")){r.on("mousewheel",o);r.on("pinch",s)}};this.disable=function(){r.off("mousedown",i);r.off("mousemove",a);r.off("mouseup",n);r.off("mousewheel",o);r.off("pinch",s)};this.dispose=this.disable;this.isDragging=function(){return this._dragging};this.isPinching=function(){return this._pinching}}I(Fx,Rt);function Wx(t){if(sa(t)||t.target&&t.target.draggable){return}var e=t.offsetX;var r=t.offsetY;if(this.pointerChecker&&this.pointerChecker(t,e,r)){this._x=e;this._y=r;this._dragging=true}}function Hx(t){if(sa(t)||!Yx(this,"moveOnMouseMove",t)||!this._dragging||t.gestureEvent==="pinch"||Vx(this._zr,"globalPan")){return}var e=t.offsetX;var r=t.offsetY;var i=this._x;var a=this._y;var n=e-i;var o=r-a;this._x=e;this._y=r;this._opt.preventDefaultMouseMove&&oa(t.event);this.trigger("pan",n,o,i,a,e,r)}function Zx(t){if(!sa(t)){this._dragging=false}}function Ux(t){if(!Yx(this,"zoomOnMouseWheel",t)||t.wheelDelta===0){return}var e=t.wheelDelta>0?1.1:1/1.1;Xx.call(this,t,e,t.offsetX,t.offsetY)}function jx(t){if(Vx(this._zr,"globalPan")){return}var e=t.pinchScale>1?1.1:1/1.1;Xx.call(this,t,e,t.pinchX,t.pinchY)}function Xx(t,e,r,i){if(this.pointerChecker&&this.pointerChecker(t,r,i)){oa(t.event);this.trigger("zoom",e,r,i)}}function Yx(t,e,r){var i=t._opt[e];return i&&(!G(i)||r.event[i+"Key"])}function qx(t,e,r){var i=t.target;var a=i.position;a[0]+=e;a[1]+=r;i.dirty()}function $x(t,e,r,i){var a=t.target;var n=t.zoomLimit;var o=a.position;var s=a.scale;var l=t.zoom=t.zoom||1;l*=e;if(n){var u=n.min||0;var h=n.max||Infinity;l=Math.max(Math.min(h,l),u)}var f=l/t.zoom;t.zoom=l;o[0]-=(r-o[0])*(f-1);o[1]-=(i-o[1])*(f-1);s[0]*=f;s[1]*=f;a.dirty()}var Kx={axisPointer:1,tooltip:1,brush:1};function Jx(t,e,r){var i=e.getComponentByElement(t.topTarget);var a=i&&i.coordinateSystem;return i&&i!==r&&!Kx[i.mainType]&&(a&&a.model!==r)}function Qx(t,e){var r=t.getItemStyle();var i=t.get("areaColor");if(i!=null){r.fill=i}return r}function t_(i,a,n,o,s){n.off("click");n.off("mousedown");if(a.get("selectedMode")){n.on("mousedown",function(){i._mouseDownFlag=true});n.on("click",function(t){if(!i._mouseDownFlag){return}i._mouseDownFlag=false;var e=t.target;while(!e.__regions){e=e.parent}if(!e){return}var r={type:(a.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:T(e.__regions,function(t){return{name:t.name,from:s.uid}})};r[a.mainType+"Id"]=a.id;o.dispatchAction(r);e_(a,n)})}}function e_(r,t){t.eachChild(function(e){L(e.__regions,function(t){e.trigger(r.isSelected(t.name)?"emphasis":"normal")})})}function r_(t,e){var r=new cr;this._controller=new Fx(t.getZr());this._controllerHost={target:e?r:null};this.group=r;this._updateGroup=e;this._mouseDownFlag}r_.prototype={constructor:r_,draw:function(_,t,e,r,i){var w=_.mainType==="geo";var b=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){if(!b&&t.getHostGeoModel()===_){b=t.getData()}});var a=_.coordinateSystem;var S=this.group;var M=a.scale;var n={position:a.position,scale:M};if(!S.childAt(0)||i){S.attr(n)}else{gl(S,n,_)}S.removeAll();var I=["itemStyle"];var D=["emphasis","itemStyle"];var T=["label"];var A=["emphasis","label"];var C=it();L(a.regions,function(t){var e=C.get(t.name)||C.set(t.name,new cr);var r=new Ds({shape:{paths:[]}});e.add(r);var i=_.getRegionModel(t.name)||_;var a=i.getModel(I);var n=i.getModel(D);var o=Qx(a,M);var s=Qx(n,M);var l=i.getModel(T);var u=i.getModel(A);var h;if(b){h=b.indexOfName(t.name);var f=b.getItemVisual(h,"color",true);if(f){o.fill=f}}L(t.geometries,function(t){if(t.type!=="polygon"){return}r.shape.paths.push(new ys({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++){r.shape.paths.push(new ys({shape:{points:t.interiors[e]}}))}});r.setStyle(o);r.style.strokeNoScale=true;r.culling=true;var c=l.get("show");var v=u.get("show");var d=b&&isNaN(b.get(b.mapDimension("value"),h));var p=b&&b.getItemLayout(h);if(w||d&&(c||v)||p&&p.showLabel){var g=!w?h:t.name;var m;if(!b||h>=0){m=_}var y=new ls({position:t.center.slice(),scale:[1/M[0],1/M[1]],z2:10,silent:true});nl(y.style,y.hoverStyle={},l,u,{labelFetcher:m,labelDataIndex:g,defaultText:t.name,useInsideStyle:false},{textAlign:"center",textVerticalAlign:"middle"});e.add(y)}if(b){b.setItemGraphicEl(h,e)}else{var i=_.getRegionModel(t.name);r.eventData={componentType:"geo",geoIndex:_.componentIndex,name:t.name,region:i&&i.option||{}}}var x=e.__regions||(e.__regions=[]);x.push(t);al(e,s,{hoverSilentOnTouch:!!_.get("selectedMode")});S.add(e)});this._updateController(_,t,e);t_(this,_,S,e,r);e_(_,S)},remove:function(){this.group.removeAll();this._controller.dispose();this._controllerHost={}},_updateController:function(i,t,n){var a=i.coordinateSystem;var e=this._controller;var o=this._controllerHost;o.zoomLimit=i.get("scaleLimit");o.zoom=a.getZoom();e.enable(i.get("roam")||false);var r=i.mainType;function s(){var t={type:"geoRoam",componentType:r};t[r+"Id"]=i.id;return t}e.off("pan").on("pan",function(t,e){this._mouseDownFlag=false;qx(o,t,e);n.dispatchAction(N(s(),{dx:t,dy:e}))},this);e.off("zoom").on("zoom",function(t,e,r){this._mouseDownFlag=false;$x(o,t,e,r);n.dispatchAction(N(s(),{zoom:t,originX:e,originY:r}));if(this._updateGroup){var i=this.group;var a=i.scale;i.traverse(function(t){if(t.type==="text"){t.attr("scale",[1/a[0],1/a[1]])}})}},this);e.setPointerChecker(function(t,e,r){return a.getViewRectAfterRoam().contain(e,r)&&!Jx(t,n,i)})}};id({type:"map",render:function(t,e,r,i){if(i&&i.type==="mapToggleSelect"&&i.from===this.uid){return}var a=this.group;a.removeAll();if(t.getHostGeoModel()){return}if(!(i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===t.id)){if(t.needsDrawMap){var n=this._mapDraw||new r_(r,true);a.add(n.group);n.draw(t,e,r,this,i);this._mapDraw=n}else{this._mapDraw&&this._mapDraw.remove();this._mapDraw=null}}else{var n=this._mapDraw;n&&a.add(n.group)}t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,r)},remove:function(){this._mapDraw&&this._mapDraw.remove();this._mapDraw=null;this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove();this._mapDraw=null},_renderSymbols:function(m,t,e){var y=m.originalData;var x=this.group;y.each(y.mapDimension("value"),function(t,e){if(isNaN(t)){return}var r=y.getItemLayout(e);if(!r||!r.point){return}var i=r.point;var a=r.offset;var n=new us({style:{fill:m.getData().getVisual("color")},shape:{cx:i[0]+a*9,cy:i[1],r:3},silent:true,z2:!a?10:8});if(!a){var o=m.mainSeries.getData();var s=y.getName(e);var l=o.indexOfName(s);var u=y.getItemModel(e);var h=u.getModel("label");var f=u.getModel("emphasis.label");var c=o.getItemGraphicEl(l);var v=X(m.getFormattedLabel(e,"normal"),s);var d=X(m.getFormattedLabel(e,"emphasis"),v);var p=function(){var t=ol({},f,{text:f.get("show")?d:null},{isRectText:true,useInsideStyle:false},true);n.style.extendFrom(t);n.__mapOriginalZ2=n.z2;n.z2+=1};var g=function(){ol(n.style,h,{text:h.get("show")?v:null,textPosition:h.getShallow("position")||"bottom"},{isRectText:true,useInsideStyle:false});if(n.__mapOriginalZ2!=null){n.z2=n.__mapOriginalZ2;n.__mapOriginalZ2=null}};c.on("mouseover",p).on("mouseout",g).on("emphasis",p).on("normal",g);g()}x.add(n)})}});function i_(t,e,r){var i=t.getZoom();var a=t.getCenter();var n=e.zoom;var o=t.dataToPoint(a);if(e.dx!=null&&e.dy!=null){o[0]-=e.dx;o[1]-=e.dy;var a=t.pointToData(o);t.setCenter(a)}if(n!=null){if(r){var s=r.min||0;var l=r.max||Infinity;n=Math.max(Math.min(i*n,l),s)/i}t.scale[0]*=n;t.scale[1]*=n;var u=t.position;var h=(e.originX-u[0])*(n-1);var f=(e.originY-u[1])*(n-1);u[0]-=h;u[1]-=f;t.updateTransform();var a=t.pointToData(o);t.setCenter(a);t.setZoom(n*i)}return{center:t.getCenter(),zoom:t.getZoom()}}Xv({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var a=i.componentType||"series";t.eachComponent({mainType:a,query:i},function(t){var e=t.coordinateSystem;if(e.type!=="geo"){return}var r=i_(e,i,t.get("scaleLimit"));t.setCenter&&t.setCenter(r.center);t.setZoom&&t.setZoom(r.zoom);if(a==="series"){L(t.seriesGroup,function(t){t.setCenter(r.center);t.setZoom(r.zoom)})}})});var a_=function(r){var a={};r.eachSeriesByType("map",function(t){var e=t.getMapType();if(t.getHostGeoModel()||a[e]){return}var l={};L(t.seriesGroup,function(t){var o=t.coordinateSystem;var s=t.originalData;if(t.get("showLegendSymbol")&&r.getComponent("legend")){s.each(s.mapDimension("value"),function(t,e){var r=s.getName(e);var i=o.getRegion(r);if(!i||isNaN(t)){return}var a=l[r]||0;var n=o.dataToPoint(i.center);l[r]=a+1;s.setItemLayout(e,{point:n,offset:a})})}});var i=t.getData();i.each(function(t){var e=i.getName(t);var r=i.getItemLayout(t)||{};r.showLabel=!l[e];i.setItemLayout(t,r)});a[e]=true})};var n_=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color");var r=t.getModel("itemStyle");var i=r.get("areaColor");var a=r.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:a})})};function o_(u,h){var f={};L(u,function(i){i.each(i.mapDimension("value"),function(t,e){var r="ec-"+i.getName(e);f[r]=f[r]||[];if(!isNaN(t)){f[r].push(t)}})});return u[0].map(u[0].mapDimension("value"),function(t,e){var r="ec-"+u[0].getName(e);var i=0;var a=Infinity;var n=-Infinity;var o=f[r].length;for(var s=0;s<o;s++){a=Math.min(a,f[r][s]);n=Math.max(n,f[r][s]);i+=f[r][s]}var l;if(h==="min"){l=a}else if(h==="max"){l=n}else if(h==="average"){l=i/o}else{l=i}return o===0?NaN:l})}var s_=function(t){var i={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel();var r=e?"o"+e.id:"i"+t.getMapType();(i[r]=i[r]||[]).push(t)});L(i,function(t,e){var r=o_(T(t,function(t){return t.getData()}),t[0].get("mapValueCalculation"));for(var i=0;i<t.length;i++){t[i].originalData=t[i].getData()}for(var i=0;i<t.length;i++){t[i].seriesGroup=t;t[i].needsDrawMap=i===0&&!t[i].getHostGeoModel();t[i].setData(r.cloneShallow());t[i].mainSeries=t[0]}})};var l_=function(t){var e=[];L(t.series,function(t){if(t&&t.type==="map"){e.push(t);t.map=t.map||t.mapType;C(t,t.mapLocation)}})};$v(a_);Kv(n_);Uv(jc.PROCESSOR.STATISTIC,s_);Zv(l_);Hy("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var u_=L;var h_="\0__link_datas";var f_="\0__link_mainData";function c_(r){var i=r.mainData;var t=r.datas;if(!t){t={main:i};r.datasAttr={main:"data"}}r.datas=r.mainData=null;y_(i,t,r);u_(t,function(e){u_(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,R(v_,r))})});i.wrapMethod("cloneShallow",R(p_,r));u_(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,R(d_,r))});K(t[i.dataType]===i)}function v_(t,e){if(m_(this)){var r=N({},this[h_]);r[this.dataType]=e;y_(e,r,t)}else{x_(e,this.dataType,this[f_],t)}return e}function d_(t,e){t.struct&&t.struct.update(this);return e}function p_(r,i){u_(i[h_],function(t,e){t!==i&&x_(t.cloneShallow(),e,i,r)});return i}function g_(t){var e=this[f_];return t==null||e==null?e:e[h_][t]}function m_(t){return t[f_]===t}function y_(r,t,i){r[h_]={};u_(t,function(t,e){x_(t,e,r,i)})}function x_(t,e,r,i){r[h_][e]=t;t[f_]=r;t.dataType=e;if(i.struct){t[i.structAttr]=i.struct;i.struct[i.datasAttr[e]]=t}t.getLinkedData=g_}var __=function(t,e){this.name=t||"";this.depth=0;this.height=0;this.parentNode=null;this.dataIndex=-1;this.children=[];this.viewChildren=[];this.hostTree=e};__.prototype={constructor:__,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}t=t||{};if(G(t)){t={order:t}}var i=t.order||"preorder";var a=this[t.attr||"children"];var n;i==="preorder"&&(n=e.call(r,this));for(var o=0;!n&&o<a.length;o++){a[o].eachNode(t,e,r)}i==="postorder"&&e.call(r,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var r=0;r<this.children.length;r++){var i=this.children[r];i.updateDepthAndHeight(t+1);if(i.height>e){e=i.height}}this.height=e+1},getNodeById:function(t){if(this.getId()===t){return this}for(var e=0,r=this.children,i=r.length;e<i;e++){var a=r[e].getNodeById(t);if(a){return a}}},contains:function(t){if(t===this){return true}for(var e=0,r=this.children,i=r.length;e<i;e++){var a=r[e].contains(t);if(a){return a}}},getAncestors:function(t){var e=[];var r=t?this:this.parentNode;while(r){e.push(r);r=r.parentNode}e.reverse();return e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(this.dataIndex<0){return}var e=this.hostTree;var r=e.data.getItemModel(this.dataIndex);var i=this.getLevelModel();var a;if(!i&&(this.children.length===0||this.children.length!==0&&this.isExpand===false)){a=this.getLeavesModel()}return r.getModel(t,(i||a||e.hostModel).getModel(t))},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){var e=t.parentNode;while(e){if(e===this){return true}e=e.parentNode}return false},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}};function w_(e,t,r){this.root;this.data;this._nodes=[];this.hostModel=e;this.levelModels=T(t||[],function(t){return new Pl(t,e,e.ecModel)});this.leavesModel=new Pl(r||{},e,e.ecModel)}w_.prototype={constructor:w_,type:"tree",eachNode:function(t,e,r){this.root.eachNode(t,e,r)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){var t=this.data;var e=this._nodes;for(var r=0,i=e.length;r<i;r++){e[r].dataIndex=-1}for(var r=0,i=t.count();r<i;r++){e[t.getRawIndex(r)].dataIndex=r}},clearLayouts:function(){this.data.clearItemLayouts()}};w_.createTree=function(t,e,r){var o=new w_(e,r.levels,r.leaves);var s=[];var l=1;u(t);function u(t,e){var r=t.value;l=Math.max(l,B(r)?r.length:1);s.push(t);var i=new __(t.name,o);e?b_(i,e):o.root=i;o._nodes.push(i);var a=t.children;if(a){for(var n=0;n<a.length;n++){u(a[n],i)}}}o.root.updateDepthAndHeight(0);var i=Fd(s,{coordDimensions:["value"],dimensionsCount:l});var a=new Dd(i,e);a.initData(s);c_({mainData:a,struct:o,structAttr:"tree"});o.update();return o};function b_(t,e){var r=e.children;if(t.parentNode===e){return}r.push(t);t.parentNode=e}Tf.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data};var r=t.leaves||{};var i={};i.leaves=r;var a=w_.createTree(e,this,i);var n=0;a.eachNode("preorder",function(t){if(t.depth>n){n=t.depth}});var o=t.expandAndCollapse;var s=o&&t.initialTreeDepth>=0?t.initialTreeDepth:n;a.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&e.collapsed!=null?!e.collapsed:t.depth<=s});return a.data},formatTooltip:function(t){var e=this.getData().tree;var r=e.root.children[0];var i=e.getNodeByDataIndex(t);var a=i.getValue();var n=i.name;while(i&&i!==r){n=i.parentNode.name+"."+n;i=i.parentNode}return uu(n+(isNaN(a)||a==null?"":" : "+a))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:true,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:true,color:"#555"},leaves:{label:{show:true}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function S_(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};var e=[t];var r;var i;while(r=e.pop()){i=r.children;if(r.isExpand&&i.length){var a=i.length;for(var n=a-1;n>=0;n--){var o=i[n];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null};e.push(o)}}}}function M_(t,e){var r=t.isExpand?t.children:[];var i=t.parentNode.children;var a=t.hierNode.i?i[t.hierNode.i-1]:null;if(r.length){C_(t);var n=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;if(a){t.hierNode.prelim=a.hierNode.prelim+e(t,a);t.hierNode.modifier=t.hierNode.prelim-n}else{t.hierNode.prelim=n}}else if(a){t.hierNode.prelim=a.hierNode.prelim+e(t,a)}t.parentNode.hierNode.defaultAncestor=L_(t,a,t.parentNode.hierNode.defaultAncestor||i[0],e)}function I_(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},true);t.hierNode.modifier+=t.parentNode.hierNode.modifier}function D_(t){return arguments.length?t:O_}function T_(t,e){var r={};t-=Math.PI/2;r.x=e*Math.cos(t);r.y=e*Math.sin(t);return r}function A_(t,e){return Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function C_(t){var e=t.children;var r=e.length;var i=0;var a=0;while(--r>=0){var n=e[r];n.hierNode.prelim+=i;n.hierNode.modifier+=i;a+=n.hierNode.change;i+=n.hierNode.shift+a}}function L_(t,e,r,i){if(e){var a=t;var n=t;var o=n.parentNode.children[0];var s=e;var l=a.hierNode.modifier;var u=n.hierNode.modifier;var h=o.hierNode.modifier;var f=s.hierNode.modifier;while(s=k_(s),n=P_(n),s&&n){a=k_(a);o=P_(o);a.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+i(s,n);if(c>0){E_(N_(s,t,r),t,c);u+=c;l+=c}f+=s.hierNode.modifier;u+=n.hierNode.modifier;l+=a.hierNode.modifier;h+=o.hierNode.modifier}if(s&&!k_(a)){a.hierNode.thread=s;a.hierNode.modifier+=f-l}if(n&&!P_(o)){o.hierNode.thread=n;o.hierNode.modifier+=u-h;r=t}}return r}function k_(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function P_(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function N_(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function E_(t,e,r){var i=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i;e.hierNode.shift+=r;e.hierNode.modifier+=r;e.hierNode.prelim+=r;t.hierNode.change+=i}function O_(t,e){return t.parentNode===e.parentNode?1:2}id({type:"tree",init:function(t,e){this._oldTree;this._mainGroup=new cr;this.group.add(this._mainGroup)},render:function(i,t,r,e){var a=i.getData();var n=i.layoutInfo;var o=this._mainGroup;var s=i.get("layout");if(s==="radial"){o.attr("position",[n.x+n.width/2,n.y+n.height/2])}else{o.attr("position",[n.x,n.y])}var l=this._data;var u={expandAndCollapse:i.get("expandAndCollapse"),layout:s,orient:i.get("orient"),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:true,fadeIn:true};a.diff(l).add(function(t){if(z_(a,t)){B_(a,t,null,o,i,u)}}).update(function(t,e){var r=l.getItemGraphicEl(e);if(!z_(a,t)){r&&V_(a,t,r,o,i,u);return}B_(a,t,r,o,i,u)}).remove(function(t){var e=l.getItemGraphicEl(t);V_(a,t,e,o,i,u)}).execute();if(u.expandAndCollapse===true){a.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){r.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})})}this._data=a},dispose:function(){},remove:function(){this._mainGroup.removeAll();this._data=null}});function z_(t,e){var r=t.getItemLayout(e);return r&&!isNaN(r.x)&&!isNaN(r.y)&&t.getItemVisual(e,"symbol")!=="none"}function R_(t,e,r){r.itemModel=e;r.itemStyle=e.getModel("itemStyle").getItemStyle();r.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle();r.lineStyle=e.getModel("lineStyle").getLineStyle();r.labelModel=e.getModel("label");r.hoverLabelModel=e.getModel("emphasis.label");if(t.isExpand===false&&t.children.length!==0){r.symbolInnerColor=r.itemStyle.fill}else{r.symbolInnerColor="#fff"}return r}function B_(t,e,r,i,a,n){var o=!r;var s=t.tree.getNodeByDataIndex(e);var l=s.getModel();var n=R_(s,l,n);var u=t.tree.root;var h=s.parentNode===u?s:s.parentNode||s;var f=t.getItemGraphicEl(h.dataIndex);var c=h.getLayout();var v=f?{x:f.position[0],y:f.position[1],rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:c;var d=s.getLayout();if(o){r=new bg(t,e,n);r.attr("position",[v.x,v.y])}else{r.updateData(t,e,n)}r.__radialOldRawX=r.__radialRawX;r.__radialOldRawY=r.__radialRawY;r.__radialRawX=d.rawX;r.__radialRawY=d.rawY;i.add(r);t.setItemGraphicEl(e,r);gl(r,{position:[d.x,d.y]},a);var p=r.getSymbolPath();if(n.layout==="radial"){var g=u.children[0];var m=g.getLayout();var y=g.children.length;var x;var _;if(d.x===m.x&&s.isExpand===true){var w={};w.x=(g.children[0].getLayout().x+g.children[y-1].getLayout().x)/2;w.y=(g.children[0].getLayout().y+g.children[y-1].getLayout().y)/2;x=Math.atan2(w.y-m.y,w.x-m.x);if(x<0){x=Math.PI*2+x}_=w.x<m.x;if(_){x=x-Math.PI}}else{x=Math.atan2(d.y-m.y,d.x-m.x);if(x<0){x=Math.PI*2+x}if(s.children.length===0||s.children.length!==0&&s.isExpand===false){_=d.x<m.x;if(_){x=x-Math.PI}}else{_=d.x>m.x;if(!_){x=x-Math.PI}}}var b=_?"left":"right";p.setStyle({textPosition:b,textRotation:-x,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==u){var S=r.__edge;if(!S){S=r.__edge=new Ms({shape:G_(n,v,v),style:C({opacity:0},n.lineStyle)})}gl(S,{shape:G_(n,c,d),style:{opacity:1}},a);i.add(S)}}function V_(t,e,r,i,a,n){var o=t.tree.getNodeByDataIndex(e);var s=t.tree.root;var l=o.getModel();var n=R_(o,l,n);var u=o.parentNode===s?o:o.parentNode||o;var h;while(h=u.getLayout(),h==null){u=u.parentNode===s?u:u.parentNode||u}gl(r,{position:[h.x+1,h.y+1]},a,function(){i.remove(r);t.setItemGraphicEl(e,null)});r.fadeOut(null,{keepLabel:true});var f=r.__edge;if(f){gl(f,{shape:G_(n,h,h),style:{opacity:0}},a,function(){i.remove(f)})}}function G_(t,e,r){var i;var a;var n;var o;var s=t.orient;if(t.layout==="radial"){var l=e.rawX;var u=e.rawY;var h=r.rawX;var f=r.rawY;var c=T_(l,u);var v=T_(l,u+(f-u)*t.curvature);var d=T_(h,f+(u-f)*t.curvature);var p=T_(h,f);return{x1:c.x,y1:c.y,x2:p.x,y2:p.y,cpx1:v.x,cpy1:v.y,cpx2:d.x,cpy2:d.y}}else{var l=e.x;var u=e.y;var h=r.x;var f=r.y;if(s==="horizontal"){i=l+(h-l)*t.curvature;a=u;n=h+(l-h)*t.curvature;o=f}if(s==="vertical"){i=l;a=u+(f-u)*t.curvature;n=h;o=f+(u-f)*t.curvature}return{x1:l,y1:u,x2:h,y2:f,cpx1:i,cpy1:a,cpx2:n,cpy2:o}}}Xv({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(a,t){t.eachComponent({mainType:"series",subType:"tree",query:a},function(t){var e=a.dataIndex;var r=t.getData().tree;var i=r.getNodeByDataIndex(e);i.isExpand=!i.isExpand})});function F_(t,e,r){var i=[t];var a=[];var n;while(n=i.pop()){a.push(n);if(n.isExpand){var o=n.children;if(o.length){for(var s=0;s<o.length;s++){i.push(o[s])}}}}while(n=a.pop()){e(n,r)}}function W_(t,e){var r=[t];var i;while(i=r.pop()){e(i);if(i.isExpand){var a=i.children;if(a.length){for(var n=a.length-1;n>=0;n--){r.push(a[n])}}}}}var H_=function(t,e){var r=A_(t,e);t.layoutInfo=r;var i=t.get("layout");var a=0;var n=0;var o=null;if(i==="radial"){a=2*Math.PI;n=Math.min(r.height,r.width)/2;o=D_(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})}else{a=r.width;n=r.height;o=D_()}var s=t.getData().tree.root;var l=s.children[0];S_(s);F_(l,M_,o);s.hierNode.modifier=-l.hierNode.prelim;W_(l,I_);var u=l;var h=l;var f=l;W_(l,function(t){var e=t.getLayout().x;if(e<u.getLayout().x){u=t}if(e>h.getLayout().x){h=t}if(t.depth>f.depth){f=t}});var c=u===h?1:o(u,h)/2;var v=c-u.getLayout().x;var d=0;var p=0;var g=0;var m=0;if(i==="radial"){d=a/(h.getLayout().x+c+v);p=n/(f.depth-1||1);W_(l,function(t){g=(t.getLayout().x+v)*d;m=(t.depth-1)*p;var e=T_(g,m);t.setLayout({x:e.x,y:e.y,rawX:g,rawY:m},true)})}else{if(t.get("orient")==="horizontal"){p=n/(h.getLayout().x+c+v);d=a/(f.depth-1||1);W_(l,function(t){m=(t.getLayout().x+v)*p;g=(t.depth-1)*d;t.setLayout({x:g,y:m},true)})}else{d=a/(h.getLayout().x+c+v);p=n/(f.depth-1||1);W_(l,function(t){g=(t.getLayout().x+v)*d;m=(t.depth-1)*p;t.setLayout({x:g,y:m},true)})}}};var Z_=function(t,e){t.eachSeriesByType("tree",function(t){H_(t,e)})};var U_=function(t,e){t.eachSeriesByType("tree",function(t){H_(t,e)})};Kv(um("tree","circle"));$v(Z_);$v(U_);function j_(t,e,r){if(t&&S(e,t.type)>=0){var i=r.getData().tree.root;var a=t.targetNode;if(a&&i.contains(a)){return{node:a}}var n=t.targetNodeId;if(n!=null&&(a=i.getNodeById(n))){return{node:a}}}}function X_(t){var e=[];while(t){t=t.parentNode;t&&e.push(t)}return e.reverse()}function Y_(t,e){var r=X_(t);return S(r,e)>=0}function q_(t,e){var r=[];while(t){var i=t.dataIndex;r.push({name:t.name,dataIndex:i,value:e.getRawValue(i)});t=t.parentNode}r.reverse();return r}Tf.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:Infinity,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:true,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,roam:true,nodeClick:"zoomToNode",animation:true,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:true,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:true,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:true},upperLabel:{show:false,position:[0,"50%"],height:20,color:"#fff",ellipsis:true,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:true,position:[0,"50%"],color:"#fff",ellipsis:true,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 r={name:t.name,children:t.data};$_(r);var i=t.levels||[];i=t.levels=K_(i,e);var a={};a.levels=i;return w_.createTree(r,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData();var r=this.getRawValue(t);var i=B(r)?ou(r[0]):ou(r);var a=e.getName(t);return uu(a+": "+i)},getDataParams:function(t){var e=Tf.prototype.getDataParams.apply(this,arguments);var r=this.getData().tree.getNodeByDataIndex(t);e.treePathInfo=q_(r,this);return e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{};N(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;if(!e){e=this._idIndexMap=it();this._idIndexMapCount=0}var r=e.get(t);if(r==null){e.set(t,r=this._idIndexMapCount++)}return r},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;if(!t||t!==e&&!e.contains(t)){this._viewRoot=e}}});function $_(t){var r=0;L(t.children,function(t){$_(t);var e=t.value;B(e)&&(e=e[0]);r+=e});var e=t.value;if(B(e)){e=e[0]}if(e==null||isNaN(e)){e=r}if(e<0){e=0}B(t.value)?t.value[0]=e:t.value=e}function K_(t,e){var r=e.get("color");if(!r){return}t=t||[];var i;L(t,function(t){var e=new Pl(t);var r=e.get("color");if(e.get("itemStyle.color")||r&&r!=="none"){i=true}});if(!i){var a=t[0]||(t[0]={});a.color=r.slice()}return t}var J_=8;var Q_=8;var tw=5;function ew(t){this.group=new cr;t.add(this.group)}ew.prototype={constructor:ew,render:function(t,e,r,i){var a=t.getModel("breadcrumb");var n=this.group;n.removeAll();if(!a.get("show")||!r){return}var o=a.getModel("itemStyle");var s=o.getModel("textStyle");var 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(r,l,s);this._renderContent(t,l,o,s,i);Lu(n,l.pos,l.box)},_prepare:function(t,e,r){for(var i=t;i;i=i.parentNode){var a=i.getModel().get("name");var n=r.getTextRect(a);var o=Math.max(n.width+J_*2,e.emptyItemWidth);e.totalWidth+=o+Q_;e.renderList.push({node:i,text:a,width:o})}},_renderContent:function(t,e,r,i,a){var n=0;var o=e.emptyItemWidth;var s=t.get("breadcrumb.height");var l=Au(e.pos,e.box);var u=e.totalWidth;var h=e.renderList;for(var f=h.length-1;f>=0;f--){var c=h[f];var v=c.node;var d=c.width;var p=c.text;if(u>l.width){u-=d-o;d=o;p=null}var g=new ys({shape:{points:rw(n,0,d,s,f===h.length-1,f===0)},style:C(r.getItemStyle(),{lineJoin:"bevel",text:p,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:R(a,v)});this.group.add(g);iw(g,t,v);n+=d+Q_}},remove:function(){this.group.removeAll()}};function rw(t,e,r,i,a,n){var o=[[a?t:t-tw,e],[t+r,e],[t+r,e+i],[a?t:t-tw,e+i]];!n&&o.splice(2,0,[t+r+tw,e+i/2]);!a&&o.push([t,e+i/2]);return o}function iw(t,e,r){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&q_(r,e)}}function aw(){var n=[];var o={};var s;return{add:function(t,e,r,i,a){if(G(i)){a=i;i=0}if(o[t.id]){return false}o[t.id]=1;n.push({el:t,target:e,time:r,delay:i,easing:a});return true},done:function(t){s=t;return this},start:function(){var t=n.length;for(var e=0,r=n.length;e<r;e++){var i=n[e];i.el.animateTo(i.target,i.time,i.delay,i.easing,a)}return this;function a(){t--;if(!t){n.length=0;o={};s&&s()}}}}}var nw=z;var ow=cr;var sw=_s;var lw=L;var uw=3;var hw=["label"];var fw=["emphasis","label"];var cw=["upperLabel"];var vw=["emphasis","upperLabel"];var dw=10;var pw=1;var gw=2;var mw=pn([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);var yw=function(t){var e=mw(t);e.stroke=e.fill=e.lineWidth=null;return e};id({type:"treemap",init:function(t,e){this._containerGroup;this._storage=xw();this._oldTree;this._breadcrumb;this._controller;this._state="ready"},render:function(t,e,r,i){var a=e.findComponents({mainType:"series",subType:"treemap",query:i});if(S(a,t)<0){return}this.seriesModel=t;this.api=r;this.ecModel=e;var n=["treemapZoomToNode","treemapRootToNode"];var o=j_(i,n,t);var s=i&&i.type;var l=t.layoutInfo;var u=!this._oldTree;var h=this._storage;var f=s==="treemapRootToNode"&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null;var c=this._giveContainerGroup(l);var v=this._doRender(c,t,f);!u&&(!s||s==="treemapZoomToNode"||s==="treemapRootToNode")?this._doAnimation(c,v,t,f):v.renderFinally();this._resetController(r);this._renderBreadcrumb(t,r,o)},_giveContainerGroup:function(t){var e=this._containerGroup;if(!e){e=this._containerGroup=new ow;this._initEvents(e);this.group.add(e)}e.attr("position",[t.x,t.y]);return e},_doRender:function(t,e,r){var i=e.getData().tree;var a=this._oldTree;var n=xw();var o=xw();var s=this._storage;var l=[];var h=R(_w,e,o,s,r,n,l);f(i.root?[i.root]:[],a&&a.root?[a.root]:[],t,i===a||!a,0);var u=c(s);this._oldTree=i;this._storage=o;return{lastsForAnimation:n,willDeleteEls:u,renderFinally:v};function f(n,o,s,l,u){if(l){o=n;lw(n,function(t,e){!t.isRemoved()&&r(e,e)})}else{new ud(o,n,t,t).add(r).update(r).remove(R(r,null)).execute()}function t(t){return t.getId()}function r(t,e){var r=t!=null?n[t]:null;var i=e!=null?o[e]:null;var a=h(r,i,s,u);a&&f(r&&r.viewChildren||[],i&&i.viewChildren||[],a,l,u+1)}}function c(t){var i=xw();t&&lw(t,function(t,e){var r=i[e];lw(t,function(t){t&&(r.push(t),t.__tmWillDelete=1)})});return i}function v(){lw(u,function(t){lw(t,function(t){t.parent&&t.parent.remove(t)})});lw(l,function(t){t.invisible=true;t.dirty()})}},_doAnimation:function(t,n,e,s){if(!e.get("animation")){return}var l=e.get("animationDurationUpdate");var u=e.get("animationEasing");var h=aw();lw(n.willDeleteEls,function(t,o){lw(t,function(t,e){if(t.invisible){return}var r=t.parent;var i;if(s&&s.direction==="drillDown"){i=r===s.rootNodeGroup?{shape:{x:0,y:0,width:r.__tmNodeWidth,height:r.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}}}else{var a=0;var n=0;if(!r.__tmWillDelete){a=r.__tmNodeWidth/2;n=r.__tmNodeHeight/2}i=o==="nodeGroup"?{position:[a,n],style:{opacity:0}}:{shape:{x:a,y:n,width:0,height:0},style:{opacity:0}}}i&&h.add(t,i,l,u)})});lw(this._storage,function(t,a){lw(t,function(t,e){var r=n.lastsForAnimation[a][e];var i={};if(!r){return}if(a==="nodeGroup"){if(r.old){i.position=t.position.slice();t.attr("position",r.old)}}else{if(r.old){i.shape=N({},t.shape);t.setShape(r.old)}if(r.fadein){t.setStyle("opacity",0);i.style={opacity:1}}else if(t.style.opacity!==1){i.style={opacity:1}}}h.add(t,i,l,u)})},this);this._state="animating";h.done(nw(function(){this._state="ready";n.renderFinally()},this)).start()},_resetController:function(t){var e=this._controller;if(!e){e=this._controller=new Fx(t.getZr());e.enable(this.seriesModel.get("roam"));e.on("pan",nw(this._onPan,this));e.on("zoom",nw(this._onZoom,this))}var i=new fr(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,r){return i.contain(e,r)})},_clearController:function(){var t=this._controller;if(t){t.dispose();t=null}},_onPan:function(t,e){if(this._state!=="animating"&&(Math.abs(t)>uw||Math.abs(e)>uw)){var r=this.seriesModel.getData().tree.root;if(!r){return}var i=r.getLayout();if(!i){return}this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t,y:i.y+e,width:i.width,height:i.height}})}},_onZoom:function(t,e,r){if(this._state!=="animating"){var i=this.seriesModel.getData().tree.root;if(!i){return}var a=i.getLayout();if(!a){return}var n=new fr(a.x,a.y,a.width,a.height);var o=this.seriesModel.layoutInfo;e-=o.x;r-=o.y;var s=Ut();qt(s,s,[-e,-r]);Kt(s,s,[t,t]);qt(s,s,[e,r]);n.applyTransform(s);this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(t){t.on("click",function(t){if(this._state!=="ready"){return}var e=this.seriesModel.get("nodeClick",true);if(!e){return}var r=this.findTarget(t.offsetX,t.offsetY);if(!r){return}var i=r.node;if(i.getLayout().isLeafRoot){this._rootToNode(r)}else{if(e==="zoomToNode"){this._zoomToNode(r)}else if(e==="link"){var a=i.hostTree.data.getItemModel(i.dataIndex);var n=a.get("link",true);var o=a.get("target",true)||"blank";n&&window.open(n,o)}}},this)},_renderBreadcrumb:function(e,t,r){if(!r){r=e.get("leafDepth",true)!=null?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2);if(!r){r={node:e.getData().tree.root}}}(this._breadcrumb||(this._breadcrumb=new ew(this.group))).render(e,t,r.node,nw(i,this));function i(t){if(this._state!=="animating"){Y_(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t})}}},remove:function(){this._clearController();this._containerGroup&&this._containerGroup.removeAll();this._storage=xw();this._state="ready";this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(a,n){var o;var t=this.seriesModel.getViewRoot();t.eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var r=e.transformCoordToLocal(a,n);var i=e.shape;if(i.x<=r[0]&&r[0]<=i.x+i.width&&i.y<=r[1]&&r[1]<=i.y+i.height){o={node:t,offsetX:r[0],offsetY:r[1]}}else{return false}}},this);return o}});function xw(){return{nodeGroup:[],background:[],content:[]}}function _w(c,o,s,l,u,r,v,t,e,i){if(!v){return}var d=v.getLayout();if(!d||!d.isInView){return}var h=d.width;var f=d.height;var p=d.borderWidth;var g=d.invisible;var m=v.getRawIndex();var y=t&&t.getRawIndex();var a=v.viewChildren;var x=d.upperHeight;var n=a&&a.length;var _=v.getModel("itemStyle");var w=v.getModel("emphasis.itemStyle");var b=C("nodeGroup",ow);if(!b){return}e.add(b);b.attr("position",[d.x||0,d.y||0]);b.__tmNodeWidth=h;b.__tmNodeHeight=f;if(d.isAboveViewRoot){return b}var S=C("background",sw,i,pw);S&&I(b,S,n&&d.upperHeight);if(!n){var M=C("content",sw,i,gw);M&&D(b,M)}return b;function I(t,i,a){i.dataIndex=v.dataIndex;i.seriesIndex=c.seriesIndex;i.setShape({x:0,y:0,width:h,height:f});var n=v.getVisual("borderColor",true);var o=w.get("borderColor");T(i,function(){var t=yw(_);t.fill=n;var e=mw(w);e.fill=o;if(a){var r=h-2*p;A(t,e,n,r,x,{x:p,y:0,width:r,height:x})}else{t.text=e.text=null}i.setStyle(t);al(i,e)});t.add(i)}function D(t,r){r.dataIndex=v.dataIndex;r.seriesIndex=c.seriesIndex;var i=Math.max(h-2*p,0);var a=Math.max(f-2*p,0);r.culling=true;r.setShape({x:p,y:p,width:i,height:a});var n=v.getVisual("color",true);T(r,function(){var t=yw(_);t.fill=n;var e=mw(w);A(t,e,n,i,a);r.setStyle(t);al(r,e)});t.add(r)}function T(t,e){if(!g){e();if(!t.__tmWillVisible){t.invisible=false}}else{!t.invisible&&r.push(t)}}function A(t,e,r,i,a,n){var o=v.getModel();var s=j(c.getFormattedLabel(v.dataIndex,"normal",null,null,n?"upperLabel":"label"),o.get("name"));if(!n&&d.isLeafRoot){var l=c.get("drillDownIcon",true);s=l?l+" "+s:s}var u=o.getModel(n?cw:hw);var h=o.getModel(n?vw:fw);var f=u.getShallow("show");nl(t,e,u,h,{defaultText:f?s:null,autoColor:r,isRectText:true});n&&(t.textRect=P(n));t.truncate=f&&u.get("ellipsis")?{outerWidth:i,outerHeight:a,minChar:2}:null}function C(t,e,r,i){var a=y!=null&&s[t][y];var n=u[t];if(a){s[t][y]=null;L(n,a,t)}else if(!g){a=new e({z:ww(r,i)});a.__tmDepth=r;a.__tmStorageName=t;k(n,a,t)}return o[t][m]=a}function L(t,e,r){var i=t[m]={};i.old=r==="nodeGroup"?e.position.slice():N({},e.shape)}function k(t,e,r){var i=t[m]={};var a=v.parentNode;if(a&&(!l||l.direction==="drillDown")){var n=0;var o=0;var s=u.background[a.getRawIndex()];if(!l&&s&&s.old){n=s.old.width;o=s.old.height}i.old=r==="nodeGroup"?[0,o]:{x:n,y:o,width:0,height:0}}i.fadein=r!=="nodeGroup"}}function ww(t,e){var r=t*dw+e;return(r-1)/r}var bw=function(){};var Sw=["treemapZoomToNode","treemapRender","treemapMove"];for(var Mw=0;Mw<Sw.length;Mw++){Xv({type:Sw[Mw],update:"updateView"},bw)}Xv({type:"treemapRootToNode",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"treemap",query:n},e);function e(t,e){var r=["treemapZoomToNode","treemapRootToNode"];var i=j_(n,r,t);if(i){var a=t.getViewRoot();if(a){n.direction=Y_(a,i.node)?"rollUp":"drillDown"}t.resetViewRoot(i.node)}}});var Iw=L;var Dw=F;var Tw=-1;var Aw=function(t){var e=t.mappingMethod;var r=t.type;var i=this.option=P(t);this.type=r;this.mappingMethod=e;this._normalizeData=Fw[e];var a=Cw[r];this.applyVisual=a.applyVisual;this.getColorMapper=a.getColorMapper;this._doMap=a._doMap[e];if(e==="piecewise"){Pw(i);Lw(i)}else if(e==="category"){i.categories?kw(i):Pw(i,true)}else{K(e!=="linear"||i.dataExtent);Pw(i)}};Aw.prototype={constructor:Aw,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return z(this._normalizeData,this)}};var Cw=Aw.visualHandlers={color:{applyVisual:Ow("color"),getColorMapper:function(){var a=this.option;return z(a.mappingMethod==="category"?function(t,e){!e&&(t=this._normalizeData(t));return zw.call(this,t)}:function(t,e,r){var i=!!r;!e&&(t=this._normalizeData(t));r=Pe(t,a.parsedVisual,r);return i?r:Be(r,"rgba")},this)},_doMap:{linear:function(t){return Be(Pe(t,this.option.parsedVisual),"rgba")},category:zw,piecewise:function(t,e){var r=Vw.call(this,e);if(r==null){r=Be(Pe(t,this.option.parsedVisual),"rgba")}return r},fixed:Rw}},colorHue:Nw(function(t,e){return ze(t,e)}),colorSaturation:Nw(function(t,e){return ze(t,null,e)}),colorLightness:Nw(function(t,e){return ze(t,null,null,e)}),colorAlpha:Nw(function(t,e){return Re(t,e)}),opacity:{applyVisual:Ow("opacity"),_doMap:Bw([0,1])},symbol:{applyVisual:function(t,e,r){var i=this.mapValueToVisual(t);if(G(i)){r("symbol",i)}else if(Dw(i)){for(var a in i){if(i.hasOwnProperty(a)){r(a,i[a])}}}},_doMap:{linear:Ew,category:zw,piecewise:function(t,e){var r=Vw.call(this,e);if(r==null){r=Ew.call(this,t)}return r},fixed:Rw}},symbolSize:{applyVisual:Ow("symbolSize"),_doMap:Bw([0,1])}};function Lw(r){var t=r.pieceList;r.hasSpecialVisual=false;L(t,function(t,e){t.originIndex=e;if(t.visual!=null){r.hasSpecialVisual=true}})}function kw(t){var e=t.categories;var r=t.visual;var i=t.categoryMap={};Iw(e,function(t,e){i[t]=e});if(!B(r)){var a=[];if(F(r)){Iw(r,function(t,e){var r=i[e];a[r!=null?r:Tw]=t})}else{a[Tw]=r}r=Gw(t,a)}for(var n=e.length-1;n>=0;n--){if(r[n]==null){delete i[e[n]];e.pop()}}}function Pw(t,e){var r=t.visual;var i=[];if(F(r)){Iw(r,function(t){i.push(t)})}else if(r!=null){i.push(r)}var a={color:1,symbol:1};if(!e&&i.length===1&&!a.hasOwnProperty(t.type)){i[1]=i[0]}Gw(t,i)}function Nw(i){return{applyVisual:function(t,e,r){t=this.mapValueToVisual(t);r("color",i(e("color"),t))},_doMap:Bw([0,1])}}function Ew(t){var e=this.option.visual;return e[Math.round(Fl(t,[0,1],[0,e.length-1],true))]||{}}function Ow(i){return function(t,e,r){r(i,this.mapValueToVisual(t))}}function zw(t){var e=this.option.visual;return e[this.option.loop&&t!==Tw?t%e.length:t]}function Rw(){return this.option.visual[0]}function Bw(i){return{linear:function(t){return Fl(t,i,this.option.visual,true)},category:zw,piecewise:function(t,e){var r=Vw.call(this,e);if(r==null){r=Fl(t,i,this.option.visual,true)}return r},fixed:Rw}}function Vw(t){var e=this.option;var r=e.pieceList;if(e.hasSpecialVisual){var i=Aw.findPieceIndex(t,r);var a=r[i];if(a&&a.visual){return a.visual[this.type]}}}function Gw(t,e){t.visual=e;if(t.type==="color"){t.parsedVisual=T(e,function(t){return Te(t)})}return e}var Fw={linear:function(t){return Fl(t,this.option.dataExtent,[0,1],true)},piecewise:function(t){var e=this.option.pieceList;var r=Aw.findPieceIndex(t,e,true);if(r!=null){return Fl(r,[0,e.length-1],[0,1],true)}},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e==null?Tw:e},fixed:nt};Aw.listVisualTypes=function(){var r=[];L(Cw,function(t,e){r.push(e)});return r};Aw.addVisualHandler=function(t,e){Cw[t]=e};Aw.isValidType=function(t){return Cw.hasOwnProperty(t)};Aw.eachVisual=function(t,e,r){if(F(t)){L(t,e,r)}else{e.call(r,t)}};Aw.mapVisual=function(t,i,a){var n;var o=B(t)?[]:F(t)?{}:(n=true,null);Aw.eachVisual(t,function(t,e){var r=i.call(a,t,e);n?o=r:o[e]=r});return o};Aw.retrieveVisuals=function(r){var i={};var a;r&&Iw(Cw,function(t,e){if(r.hasOwnProperty(e)){i[e]=r[e];a=true}});return a?i:null};Aw.prepareVisualTypes=function(t){if(Dw(t)){var r=[];Iw(t,function(t,e){r.push(e)});t=r}else if(B(t)){t=t.slice()}else{return[]}t.sort(function(t,e){return e==="color"&&t!=="color"&&t.indexOf("color")===0?1:-1});return t};Aw.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e};Aw.findPieceIndex=function(i,t,e){var a;var n=Infinity;for(var r=0,o=t.length;r<o;r++){var s=t[r].value;if(s!=null){if(s===i||typeof s==="string"&&s===i+""){return r}e&&f(s,r)}}for(var r=0,o=t.length;r<o;r++){var l=t[r];var u=l.interval;var h=l.close;if(u){if(u[0]===-Infinity){if(Ww(h[1],i,u[1])){return r}}else if(u[1]===Infinity){if(Ww(h[0],u[0],i)){return r}}else if(Ww(h[0],u[0],i)&&Ww(h[1],i,u[1])){return r}e&&f(u[0],r);e&&f(u[1],r)}}if(e){return i===Infinity?t.length-1:i===-Infinity?0:a}function f(t,e){var r=Math.abs(t-i);if(r<n){n=r;a=e}}};function Ww(t,e,r){return t?e<=r:e<r}var Hw=B;var Zw="itemStyle";var Uw={seriesType:"treemap",reset:function(t,e,r,i){var a=t.getData().tree;var n=a.root;var o=t.getModel(Zw);if(n.isRemoved()){return}var s=T(a.levelModels,function(t){return t?t.get(Zw):null});jw(n,{},s,o,t.getViewRoot().getAncestors(),t)}};function jw(t,e,i,a,n,o){var s=t.getModel();var r=t.getLayout();if(!r||r.invisible||!r.isInView){return}var l=t.getModel(Zw);var u=i[t.depth];var h=Xw(l,e,u,a);var f=l.get("borderColor");var c=l.get("borderColorSaturation");var v;if(c!=null){v=Yw(h,t);f=qw(c,v)}t.setVisual("borderColor",f);var d=t.viewChildren;if(!d||!d.length){v=Yw(h,t);t.setVisual("color",v)}else{var p=Kw(t,s,r,l,h,d);L(d,function(t,e){if(t.depth>=n.length||t===n[t.depth]){var r=Qw(s,h,t,e,p,o);jw(t,r,i,a,n,o)}})}}function Xw(r,i,a,n){var o=N({},i);L(["color","colorAlpha","colorSaturation"],function(t){var e=r.get(t,true);e==null&&a&&(e=a[t]);e==null&&(e=i[t]);e==null&&(e=n.get(t));e!=null&&(o[t]=e)});return o}function Yw(t){var e=$w(t,"color");if(e){var r=$w(t,"colorAlpha");var i=$w(t,"colorSaturation");if(i){e=ze(e,null,null,i)}if(r){e=Re(e,r)}return e}}function qw(t,e){return e!=null?ze(e,null,null,t):null}function $w(t,e){var r=t[e];if(r!=null&&r!=="none"){return r}}function Kw(t,e,r,i,a,n){if(!n||!n.length){return}var o=Jw(e,"color")||a.color!=null&&a.color!=="none"&&(Jw(e,"colorAlpha")||Jw(e,"colorSaturation"));if(!o){return}var s=e.get("visualMin");var l=e.get("visualMax");var u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s);l!=null&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy");var f={type:o.name,dataExtent:u,visual:o.range};if(f.type==="color"&&(h==="index"||h==="id")){f.mappingMethod="category";f.loop=true}else{f.mappingMethod="linear"}var c=new Aw(f);c.__drColorMappingBy=h;return c}function Jw(t,e){var r=t.get(e);return Hw(r)&&r.length?{name:e,range:r}:null}function Qw(t,e,r,i,a,n){var o=N({},e);if(a){var s=a.type;var l=s==="color"&&a.__drColorMappingBy;var u=l==="index"?i:l==="id"?n.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var tb=Math.max;var eb=Math.min;var rb=j;var ib=L;var ab=["itemStyle","borderWidth"];var nb=["itemStyle","gapWidth"];var ob=["upperLabel","show"];var sb=["upperLabel","height"];var lb={seriesType:"treemap",reset:function(t,e,r,i){var a=r.getWidth();var n=r.getHeight();var o=t.option;var s=Cu(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});var l=o.size||[];var u=Wl(rb(s.width,l[0]),a);var h=Wl(rb(s.height,l[1]),n);var f=i&&i.type;var c=["treemapZoomToNode","treemapRootToNode"];var v=j_(i,c,t);var d=f==="treemapRender"||f==="treemapMove"?i.rootRect:null;var p=t.getViewRoot();var g=X_(p);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?gb(t,v,p,u,h):d?[d.width,d.height]:[u,h];var y=o.sort;if(y&&y!=="asc"&&y!=="desc"){y="desc"}var x={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_);ub(p,x,false,0);var _=p.getLayout();ib(g,function(t,e){var r=(g[e+1]||p).getValue();t.setLayout(N({dataExtent:[r,r],borderWidth:0,upperHeight:0},_))})}var w=t.getData().tree.root;w.setLayout(mb(s,d,v),true);t.setLayoutInfo(s);yb(w,new fr(-s.x,-s.y,a,n),g,p,0)}};function ub(t,e,r,i){var a;var n;if(t.isRemoved()){return}var o=t.getLayout();a=o.width;n=o.height;var s=t.getModel();var l=s.get(ab);var u=s.get(nb)/2;var h=xb(s);var f=Math.max(l,h);var c=l-u;var v=f-u;var s=t.getModel();t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:h},true);a=tb(a-2*c,0);n=tb(n-c-v,0);var d=a*n;var p=hb(t,s,d,e,r,i);if(!p.length){return}var g={x:c,y:v,width:a,height:n};var m=eb(a,n);var y=Infinity;var x=[];x.area=0;for(var _=0,w=p.length;_<w;){var b=p[_];x.push(b);x.area+=b.getLayout().area;var S=db(x,m,e.squareRatio);if(S<=y){_++;y=S}else{x.area-=x.pop().getLayout().area;pb(x,m,g,u,false);m=eb(g.width,g.height);x.length=x.area=0;y=Infinity}}if(x.length){pb(x,m,g,u,true)}if(!r){var M=s.get("childrenVisibleMin");if(M!=null&&d<M){r=true}}for(var _=0,w=p.length;_<w;_++){ub(p[_],e,r,i+1)}}function hb(t,e,r,i,a,n){var o=t.children||[];var s=i.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=i.leafDepth!=null&&i.leafDepth<=n;if(a&&!l){return t.viewChildren=[]}o=k(o,function(t){return!t.isRemoved()});cb(o,s);var u=vb(e,o,s);if(u.sum===0){return t.viewChildren=[]}u.sum=fb(e,r,u.sum,s,o);if(u.sum===0){return t.viewChildren=[]}for(var h=0,f=o.length;h<f;h++){var c=o[h].getValue()/u.sum*r;o[h].setLayout({area:c})}if(l){o.length&&t.setLayout({isLeafRoot:true},true);o.length=0}t.viewChildren=o;t.setLayout({dataExtent:u.dataExtent},true);return o}function fb(t,e,r,i,a){if(!i){return r}var n=t.get("visibleMin");var o=a.length;var s=o;for(var l=o-1;l>=0;l--){var u=a[i==="asc"?o-l-1:l].getValue();if(u/r*e<n){s=l;r-=u}}i==="asc"?a.splice(0,o-s):a.splice(s,o-s);return r}function cb(t,i){if(i){t.sort(function(t,e){var r=i==="asc"?t.getValue()-e.getValue():e.getValue()-t.getValue();return r===0?i==="asc"?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:r})}return t}function vb(t,e,r){var i=0;for(var a=0,n=e.length;a<n;a++){i+=e[a].getValue()}var o=t.get("visualDimension");var s;if(!e||!e.length){s=[NaN,NaN]}else if(o==="value"&&r){s=[e[e.length-1].getValue(),e[0].getValue()];r==="asc"&&s.reverse()}else{var s=[Infinity,-Infinity];ib(e,function(t){var e=t.getValue(o);e<s[0]&&(s[0]=e);e>s[1]&&(s[1]=e)})}return{sum:i,dataExtent:s}}function db(t,e,r){var i=0;var a=Infinity;for(var n=0,o,s=t.length;n<s;n++){o=t[n].getLayout().area;if(o){o<a&&(a=o);o>i&&(i=o)}}var l=t.area*t.area;var u=e*e*r;return l?tb(u*i/l,l/(u*a)):Infinity}function pb(t,e,r,i,a){var n=e===r.width?0:1;var o=1-n;var s=["x","y"];var l=["width","height"];var u=r[s[n]];var h=e?t.area/e:0;if(a||h>r[l[o]]){h=r[l[o]]}for(var f=0,c=t.length;f<c;f++){var v=t[f];var d={};var p=h?v.getLayout().area/h:0;var g=d[l[o]]=tb(h-2*i,0);var m=r[s[n]]+r[l[n]]-u;var y=f===c-1||m<p?m:p;var x=d[l[n]]=tb(y-2*i,0);d[s[o]]=r[s[o]]+eb(i,g/2);d[s[n]]=u+eb(i,x/2);u+=y;v.setLayout(d,true)}r[s[o]]+=h;r[l[o]]-=h}function gb(t,e,r,i,a){var n=(e||{}).node;var o=[i,a];if(!n||n===r){return o}var s;var l=i*a;var u=l*t.option.zoomToNodeRatio;while(s=n.parentNode){var h=0;var f=s.children;for(var c=0,v=f.length;c<v;c++){h+=f[c].getValue()}var d=n.getValue();if(d===0){return o}u*=h/d;var p=s.getModel();var g=p.get(ab);var m=Math.max(g,xb(p,g));u+=4*g*g+(3*g+m)*Math.pow(u,.5);u>ql&&(u=ql);n=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,a*y]}function mb(t,e,r){if(e){return{x:e.x,y:e.y}}var i={x:0,y:0};if(!r){return i}var a=r.node;var n=a.getLayout();if(!n){return i}var o=[n.width/2,n.height/2];var s=a;while(s){var l=s.getLayout();o[0]+=l.x;o[1]+=l.y;s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}function yb(t,e,r,i,a){var n=t.getLayout();var o=r[a];var s=o&&o===t;if(o&&!s||a===r.length&&t!==i){return}t.setLayout({isInView:true,invisible:!s&&!e.intersect(n),isAboveViewRoot:s},true);var l=new fr(e.x-n.x,e.y-n.y,e.width,e.height);ib(t.viewChildren||[],function(t){yb(t,l,r,i,a+1)})}function xb(t){return t.get(ob)?t.get(sb):0}Kv(Uw);$v(lb);function _b(t){return"_EC_"+t}var wb=function(t){this._directed=t||false;this.nodes=[];this.edges=[];this._nodesMap={};this._edgesMap={};this.data;this.edgeData};var bb=wb.prototype;bb.type="graph";bb.isDirected=function(){return this._directed};bb.addNode=function(t,e){t=t||""+e;var r=this._nodesMap;if(r[_b(t)]){if(A){console.error("Graph nodes have duplicate name or id")}return}var i=new Sb(t,e);i.hostGraph=this;this.nodes.push(i);r[_b(t)]=i;return i};bb.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]};bb.getNodeById=function(t){return this._nodesMap[_b(t)]};bb.addEdge=function(t,e,r){var i=this._nodesMap;var a=this._edgesMap;if(typeof t==="number"){t=this.nodes[t]}if(typeof e==="number"){e=this.nodes[e]}if(!Sb.isInstance(t)){t=i[_b(t)]}if(!Sb.isInstance(e)){e=i[_b(e)]}if(!t||!e){return}var n=t.id+"-"+e.id;if(a[n]){return}var o=new Mb(t,e,r);o.hostGraph=this;if(this._directed){t.outEdges.push(o);e.inEdges.push(o)}t.edges.push(o);if(t!==e){e.edges.push(o)}this.edges.push(o);a[n]=o;return o};bb.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]};bb.getEdge=function(t,e){if(Sb.isInstance(t)){t=t.id}if(Sb.isInstance(e)){e=e.id}var r=this._edgesMap;if(this._directed){return r[t+"-"+e]}else{return r[t+"-"+e]||r[e+"-"+t]}};bb.eachNode=function(t,e){var r=this.nodes;var i=r.length;for(var a=0;a<i;a++){if(r[a].dataIndex>=0){t.call(e,r[a],a)}}};bb.eachEdge=function(t,e){var r=this.edges;var i=r.length;for(var a=0;a<i;a++){if(r[a].dataIndex>=0&&r[a].node1.dataIndex>=0&&r[a].node2.dataIndex>=0){t.call(e,r[a],a)}}};bb.breadthFirstTraverse=function(t,e,r,i){if(!Sb.isInstance(e)){e=this._nodesMap[_b(e)]}if(!e){return}var a=r==="out"?"outEdges":r==="in"?"inEdges":"edges";for(var n=0;n<this.nodes.length;n++){this.nodes[n].__visited=false}if(t.call(i,e,null)){return}var o=[e];while(o.length){var s=o.shift();var l=s[a];for(var n=0;n<l.length;n++){var u=l[n];var h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(i,h,s)){return}o.push(h);h.__visited=true}}}};bb.update=function(){var t=this.data;var r=this.edgeData;var e=this.nodes;var i=this.edges;for(var a=0,n=e.length;a<n;a++){e[a].dataIndex=-1}for(var a=0,n=t.count();a<n;a++){e[t.getRawIndex(a)].dataIndex=a}r.filterSelf(function(t){var e=i[r.getRawIndex(t)];return e.node1.dataIndex>=0&&e.node2.dataIndex>=0});for(var a=0,n=i.length;a<n;a++){i[a].dataIndex=-1}for(var a=0,n=r.count();a<n;a++){i[r.getRawIndex(a)].dataIndex=a}};bb.clone=function(){var t=new wb(this._directed);var e=this.nodes;var r=this.edges;for(var i=0;i<e.length;i++){t.addNode(e[i].id,e[i].dataIndex)}for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t};function Sb(t,e){this.id=t==null?"":t;this.inEdges=[];this.outEdges=[];this.edges=[];this.hostGraph;this.dataIndex=e==null?-1:e}Sb.prototype={constructor:Sb,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(this.dataIndex<0){return}var e=this.hostGraph;var r=e.data.getItemModel(this.dataIndex);return r.getModel(t)}};function Mb(t,e,r){this.node1=t;this.node2=e;this.dataIndex=r==null?-1:r}Mb.prototype.getModel=function(t){if(this.dataIndex<0){return}var e=this.hostGraph;var r=e.edgeData.getItemModel(this.dataIndex);return r.getModel(t)};var Ib=function(r,i){return{getValue:function(t){var e=this[r][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){this.dataIndex>=0&&this[r][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[r][i].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){this.dataIndex>=0&&this[r][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[r][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][i].getRawIndex(this.dataIndex)}}};I(Sb,Ib("hostGraph","data"));I(Mb,Ib("hostGraph","edgeData"));wb.Node=Sb;wb.Edge=Mb;fn(Sb);fn(Mb);var Db=function(t,e,r,i,a){var n=new wb(i);for(var o=0;o<t.length;o++){n.addNode(j(t[o].id,t[o].name,o),o)}var s=[];var l=[];var u=0;for(var o=0;o<e.length;o++){var h=e[o];var f=h.source;var c=h.target;if(n.addEdge(f,c,u)){l.push(h);s.push(j(h.id,f+" > "+c));u++}}var v=r.get("coordinateSystem");var d;if(v==="cartesian2d"||v==="polar"){d=Zd(t,r)}else{var p=Ah.get(v);var g=Fd(t,{coordDimensions:(p&&p.type!=="view"?p.dimensions||[]:[]).concat(["value"])});d=new Dd(g,r);d.initData(t)}var m=new Dd(["value"],r);m.initData(l,s);a&&a(d,m);c_({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}});n.update();return n};var Tb=rd({type:"series.graph",init:function(t){Tb.superApply(this,"init",arguments);this.legendDataProvider=function(){return this._categoriesData};this.fillDataTextStyle(t.edges||t.links);this._updateCategoriesData()},mergeOption:function(t){Tb.superApply(this,"mergeOption",arguments);this.fillDataTextStyle(t.edges||t.links);this._updateCategoriesData()},mergeDefaultAndTheme:function(t){Tb.superApply(this,"mergeDefaultAndTheme",arguments);Wa(t,["edgeLabel"],["show"])},getInitialData:function(t,n){var e=t.edges||t.links||[];var r=t.data||t.nodes||[];var o=this;if(r&&e){return Db(r,e,this,true,i).data}function i(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels;var r=t.getShallow("category");var i=e[r];if(i){i.parentModel=t.parentModel;t.parentModel=i}return t});var r=o.getModel("edgeLabel");var i=new Pl({label:r.option},r.parentModel,n);e.wrapMethod("getItemModel",function(t){t.customizeGetParent(a);return t});function a(t){t=this.parsePath(t);return t&&t[0]==="label"?i:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var i=this.getData();var a=this.getDataParams(t,r);var n=i.graph.getEdgeByIndex(t);var o=i.getName(n.node1.dataIndex);var s=i.getName(n.node2.dataIndex);var l=[];o!=null&&l.push(o);s!=null&&l.push(s);l=uu(l.join(" > "));if(a.value){l+=" : "+uu(a.value)}return l}else{return Tb.superApply(this,"formatTooltip",arguments)}},_updateCategoriesData:function(){var t=T(this.option.categories||[],function(t){return t.value!=null?t:N({value:0},t)});var e=new Dd(["value"],this);e.initData(t);this._categoriesData=e;this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,true)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return Tb.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:true,hoverAnimation:true,layout:null,focusNodeAdjacency:false,circular:{rotateLabel:false},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:true},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:false,roam:false,center:null,zoom:1,nodeScaleRatio:.6,label:{show:false,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:true}}}});var Ab=ws.prototype;var Cb=Ms.prototype;function Lb(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var kb=zs({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){(Lb(e)?Ab:Cb).buildPath(t,e)},pointAt:function(t){return Lb(this.shape)?Ab.pointAt.call(this,t):Cb.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape;var r=Lb(e)?[e.x2-e.x1,e.y2-e.y1]:Cb.tangentAt.call(this,t);return St(r,r)}});var Pb=["fromSymbol","toSymbol"];function Nb(t){return"_"+t+"Type"}function Eb(t,e,r){var i=e.getItemVisual(r,"color");var a=e.getItemVisual(r,t);var n=e.getItemVisual(r,t+"Size");if(!a||a==="none"){return}if(!B(n)){n=[n,n]}var o=Qp(a,-n[0]/2,-n[1]/2,n[0],n[1],i);o.name=t;return o}function Ob(t){var e=new kb({name:"line"});zb(e.shape,t);return e}function zb(t,e){var r=e[0];var i=e[1];var a=e[2];t.x1=r[0];t.y1=r[1];t.x2=i[0];t.y2=i[1];t.percent=1;if(a){t.cpx1=a[0];t.cpy1=a[1]}else{t.cpx1=NaN;t.cpy1=NaN}}function Rb(){var t=this;var e=t.childOfName("fromSymbol");var r=t.childOfName("toSymbol");var i=t.childOfName("label");if(!e&&!r&&i.ignore){return}var a=1;var n=this.parent;while(n){if(n.scale){a/=n.scale[0]}n=n.parent}var o=t.childOfName("line");if(!this.__dirty&&!o.__dirty){return}var s=o.shape.percent;var l=o.pointAt(0);var u=o.pointAt(s);var h=dt([],u,l);St(h,h);if(e){e.attr("position",l);var f=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0]));e.attr("scale",[a*s,a*s])}if(r){r.attr("position",u);var f=o.tangentAt(1);r.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0]));r.attr("scale",[a*s,a*s])}if(!i.ignore){i.attr("position",u);var c;var v;var d;var p=5*a;if(i.__position==="end"){c=[h[0]*p+u[0],h[1]*p+u[1]];v=h[0]>.8?"left":h[0]<-.8?"right":"center";d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle"}else if(i.__position==="middle"){var g=s/2;var f=o.tangentAt(g);var m=[f[1],-f[0]];var y=o.pointAt(g);if(m[1]>0){m[0]=-m[0];m[1]=-m[1]}c=[y[0]+m[0]*p,y[1]+m[1]*p];v="center";d="bottom";var x=-Math.atan2(f[1],f[0]);if(u[0]<l[0]){x=Math.PI+x}i.attr("rotation",x)}else{c=[-h[0]*p+l[0],-h[1]*p+l[1]];v=h[0]>.8?"right":h[0]<-.8?"left":"center";d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle"}i.attr({style:{textVerticalAlign:i.__verticalAlign||d,textAlign:i.__textAlign||v},position:c,scale:[a,a]})}}function Bb(t,e,r){cr.call(this);this._createLine(t,e,r)}var Vb=Bb.prototype;Vb.beforeUpdate=Rb;Vb._createLine=function(r,i,t){var e=r.hostModel;var a=r.getItemLayout(i);var n=Ob(a);n.shape.percent=0;ml(n,{shape:{percent:1}},e,i);this.add(n);var o=new ls({name:"label"});this.add(o);L(Pb,function(t){var e=Eb(t,r,i);this.add(e);this[Nb(t)]=r.getItemVisual(i,t)},this);this._updateCommonStl(r,i,t)};Vb.updateData=function(a,n,t){var e=a.hostModel;var r=this.childOfName("line");var i=a.getItemLayout(n);var o={shape:{}};zb(o.shape,i);gl(r,o,e,n);L(Pb,function(t){var e=a.getItemVisual(n,t);var r=Nb(t);if(this[r]!==e){this.remove(this.childOfName(t));var i=Eb(t,a,n);this.add(i)}this[r]=e},this);this._updateCommonStl(a,n,t)};Vb._updateCommonStl=function(t,e,r){var i=t.hostModel;var a=this.childOfName("line");var n=r&&r.lineStyle;var o=r&&r.hoverLineStyle;var s=r&&r.labelModel;var l=r&&r.hoverLabelModel;if(!r||t.hasItemOption){var u=t.getItemModel(e);n=u.getModel("lineStyle").getLineStyle();o=u.getModel("emphasis.lineStyle").getLineStyle();s=u.getModel("label");l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color");var f=Y(t.getItemVisual(e,"opacity"),n.opacity,1);a.useStyle(C({strokeNoScale:true,fill:"none",stroke:h,opacity:f},n));a.hoverStyle=o;L(Pb,function(t){var e=this.childOfName(t);if(e){e.setColor(h);e.setStyle({opacity:f})}},this);var c=s.getShallow("show");var v=l.getShallow("show");var d=this.childOfName("label");var p;var g;var m;if(c||v){p=h||"#000";g=i.getFormattedLabel(e,"normal",t.dataType);if(g==null){var y=i.getRawValue(e);g=y==null?t.getName(e):isFinite(y)?Hl(y):y}m=X(i.getFormattedLabel(e,"emphasis",t.dataType),g)}if(c){var x=ol(d.style,s,{text:g},{autoColor:p});d.__textAlign=x.textAlign;d.__verticalAlign=x.textVerticalAlign;d.__position=s.get("position")||"middle"}else{d.setStyle("text",null)}if(v){d.hoverStyle={text:m,textFill:l.getTextColor(true),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}}else{d.hoverStyle={text:null}}d.ignore=!c&&!v;al(this)};Vb.highlight=function(){this.trigger("emphasis")};Vb.downplay=function(){this.trigger("normal")};Vb.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))};Vb.setLinePoints=function(t){var e=this.childOfName("line");zb(e.shape,t);e.dirty()};M(Bb,cr);function Gb(t){this._ctor=t||Bb;this.group=new cr}var Fb=Gb.prototype;Fb.isPersistent=function(){return true};Fb.updateData=function(r){var i=this;var e=i.group;var a=i._lineData;i._lineData=r;if(!a){e.removeAll()}var n=Zb(r);r.diff(a).add(function(t){Wb(i,r,t,n)}).update(function(t,e){Hb(i,a,r,e,t,n)}).remove(function(t){e.remove(a.getItemGraphicEl(t))}).execute()};function Wb(t,e,r,i){var a=e.getItemLayout(r);if(!jb(a)){return}var n=new t._ctor(e,r,i);e.setItemGraphicEl(r,n);t.group.add(n)}function Hb(t,e,r,i,a,n){var o=e.getItemGraphicEl(i);if(!jb(r.getItemLayout(a))){t.group.remove(o);return}if(!o){o=new t._ctor(r,a,n)}else{o.updateData(r,a,n)}r.setItemGraphicEl(a,o);t.group.add(o)}Fb.updateLayout=function(){var r=this._lineData;r.eachItemGraphicEl(function(t,e){t.updateLayout(r,e)},this)};Fb.incrementalPrepareUpdate=function(t){this._seriesScope=Zb(t);this._lineData=null;this.group.removeAll()};Fb.incrementalUpdate=function(t,e){function r(t){if(!t.isGroup){t.incremental=t.useHoverLayer=true}}for(var i=t.start;i<t.end;i++){var a=e.getItemLayout(i);if(jb(a)){var n=new this._ctor(e,i,this._seriesScope);n.traverse(r);this.group.add(n)}}};function Zb(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}Fb.remove=function(){this._clearIncremental();this._incremental=null;this.group.removeAll()};Fb._clearIncremental=function(){var t=this._incremental;if(t){t.clearDisplaybles()}};function Ub(t){return isNaN(t[0])||isNaN(t[1])}function jb(t){return!Ub(t[0])&&!Ub(t[1])}var Xb=[];var Yb=[];var qb=[];var $b=Rn;var Kb=Tt;var Jb=Math.abs;function Qb(t,e,r){var i=t[0];var a=t[1];var n=t[2];var o=Infinity;var s;var l=r*r;var u=.1;for(var h=.1;h<=.9;h+=.1){Xb[0]=$b(i[0],a[0],n[0],h);Xb[1]=$b(i[1],a[1],n[1],h);var f=Jb(Kb(Xb,e)-l);if(f<o){o=f;s=h}}for(var c=0;c<32;c++){var v=s+u;Yb[0]=$b(i[0],a[0],n[0],s);Yb[1]=$b(i[1],a[1],n[1],s);qb[0]=$b(i[0],a[0],n[0],v);qb[1]=$b(i[1],a[1],n[1],v);var f=Kb(Yb,e)-l;if(Jb(f)<.01){break}var d=Kb(qb,e)-l;u/=2;if(f<0){if(d>=0){s=s+u}else{s=s-u}}else{if(d>=0){s=s-u}else{s=s+u}}}return s}var tS=function(t,l){var u=[];var h=Fn;var f=[[],[],[]];var c=[[],[]];var v=[];l/=2;function d(t){var e=t.getVisual("symbolSize");if(e instanceof Array){e=(e[0]+e[1])/2}return e}t.eachEdge(function(t,e){var r=t.getLayout();var i=t.getVisual("fromSymbol");var a=t.getVisual("toSymbol");if(!r.__original){r.__original=[ht(r[0]),ht(r[1])];if(r[2]){r.__original.push(ht(r[2]))}}var n=r.__original;if(r[2]!=null){ut(f[0],n[0]);ut(f[1],n[2]);ut(f[2],n[1]);if(i&&i!="none"){var o=d(t.node1);var s=Qb(f,n[0],o*l);h(f[0][0],f[1][0],f[2][0],s,u);f[0][0]=u[3];f[1][0]=u[4];h(f[0][1],f[1][1],f[2][1],s,u);f[0][1]=u[3];f[1][1]=u[4]}if(a&&a!="none"){var o=d(t.node2);var s=Qb(f,n[1],o*l);h(f[0][0],f[1][0],f[2][0],s,u);f[1][0]=u[1];f[2][0]=u[2];h(f[0][1],f[1][1],f[2][1],s,u);f[1][1]=u[1];f[2][1]=u[2]}ut(r[0],f[0]);ut(r[1],f[2]);ut(r[2],f[1])}else{ut(c[0],n[0]);ut(c[1],n[1]);dt(v,c[1],c[0]);St(v,v);if(i&&i!="none"){var o=d(t.node1);vt(c[0],c[0],v,o*l)}if(a&&a!="none"){var o=d(t.node2);vt(c[1],c[1],v,-o*l)}ut(r[0],c[0]);ut(r[1],c[1])}})};var eS=["itemStyle","opacity"];var rS=["lineStyle","opacity"];function iS(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function aS(t,e,r){var i=t.getGraphicEl();var a=iS(t,e);if(r!=null){a==null&&(a=1);a*=r}i.downplay&&i.downplay();i.traverse(function(t){if(t.type!=="group"){t.setStyle("opacity",a)}})}function nS(t,e){var r=iS(t,e);var i=t.getGraphicEl();i.highlight&&i.highlight();i.traverse(function(t){if(t.type!=="group"){t.setStyle("opacity",r)}})}id({type:"graph",init:function(t,e){var r=new Cg;var i=new Gb;var a=this.group;this._controller=new Fx(e.getZr());this._controllerHost={target:a};a.add(r.group);a.add(i.group);this._symbolDraw=r;this._lineDraw=i;this._firstRender=true},render:function(a,t,n){var e=a.coordinateSystem;this._model=a;this._nodeScaleRatio=a.get("nodeScaleRatio");var r=this._symbolDraw;var i=this._lineDraw;var o=this.group;if(e.type==="view"){var s={position:e.position,scale:e.scale};if(this._firstRender){o.attr(s)}else{gl(o,s,a)}}tS(a.getGraph(),this._getNodeGlobalScale(a));var l=a.getData();r.updateData(l);var u=a.getEdgeData();i.updateData(u);this._updateNodeAndLinkScale();this._updateController(a,t,n);clearTimeout(this._layoutTimeout);var h=a.forceLayout;var f=a.get("force.layoutAnimation");if(h){this._startForceLayoutIteration(h,f)}l.eachItemGraphicEl(function(t,e){var r=l.getItemModel(e);t.off("drag").off("dragend");var i=l.getItemModel(e).get("draggable");if(i){t.on("drag",function(){if(h){h.warmUp();!this._layouting&&this._startForceLayoutIteration(h,f);h.setFixed(e);l.setItemLayout(e,t.position)}},this).on("dragend",function(){if(h){h.setUnfixed(e)}},this)}t.setDraggable(i&&h);t.off("mouseover",t.__focusNodeAdjacency);t.off("mouseout",t.__unfocusNodeAdjacency);if(r.get("focusNodeAdjacency")){t.on("mouseover",t.__focusNodeAdjacency=function(){n.dispatchAction({type:"focusNodeAdjacency",seriesId:a.id,dataIndex:t.dataIndex})});t.on("mouseout",t.__unfocusNodeAdjacency=function(){n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:a.id})})}},this);l.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency);e.off("mouseout",e.__unfocusNodeAdjacency);if(t.getModel().get("focusNodeAdjacency")){e.on("mouseover",e.__focusNodeAdjacency=function(){n.dispatchAction({type:"focusNodeAdjacency",seriesId:a.id,edgeDataIndex:t.dataIndex})});e.on("mouseout",e.__unfocusNodeAdjacency=function(){n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:a.id})})}});var c=a.get("layout")==="circular"&&a.get("circular.rotateLabel");var v=l.getLayout("cx");var d=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var r=t.getSymbolPath();if(c){var i=l.getItemLayout(e);var a=Math.atan2(i[1]-d,i[0]-v);if(a<0){a=Math.PI*2+a}var n=i[0]<v;if(n){a=a-Math.PI}var o=n?"left":"right";r.setStyle({textRotation:-a,textPosition:o,textOrigin:"center"});r.hoverStyle&&(r.hoverStyle.textPosition=o)}else{r.setStyle({textRotation:0})}});this._firstRender=false},dispose:function(){this._controller&&this._controller.dispose();this._controllerHost={}},focusNodeAdjacency:function(t,e,r,i){var a=this._model.getData();var n=a.graph;var o=i.dataIndex;var s=i.edgeDataIndex;var l=n.getNodeByIndex(o);var u=n.getEdgeByIndex(s);if(!l&&!u){return}n.eachNode(function(t){aS(t,eS,.1)});n.eachEdge(function(t){aS(t,rS,.1)});if(l){nS(l,eS);L(l.edges,function(t){if(t.dataIndex<0){return}nS(t,rS);nS(t.node1,eS);nS(t.node2,eS)})}if(u){nS(u,rS);nS(u.node1,eS);nS(u.node2,eS)}},unfocusNodeAdjacency:function(t,e,r,i){var a=this._model.getData().graph;a.eachNode(function(t){aS(t,eS)});a.eachEdge(function(t){aS(t,rS)})},_startForceLayoutIteration:function(t,r){var i=this;(function e(){t.step(function(t){i.updateLayout(i._model);(i._layouting=!t)&&(r?i._layoutTimeout=setTimeout(e,16):e())})})()},_updateController:function(a,t,n){var e=this._controller;var i=this._controllerHost;var o=this.group;e.setPointerChecker(function(t,e,r){var i=o.getBoundingRect();i.applyTransform(o.transform);return i.contain(e,r)&&!Jx(t,n,a)});if(a.coordinateSystem.type!=="view"){e.disable();return}e.enable(a.get("roam"));i.zoomLimit=a.get("scaleLimit");i.zoom=a.coordinateSystem.getZoom();e.off("pan").off("zoom").on("pan",function(t,e){qx(i,t,e);n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:t,dy:e})}).on("zoom",function(t,e,r){$x(i,t,e,r);n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:t,originX:e,originY:r});this._updateNodeAndLinkScale();tS(a.getGraph(),this._getNodeGlobalScale(a));this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model;var e=t.getData();var r=this._getNodeGlobalScale(t);var i=[r,r];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if(e.type!=="view"){return 1}var r=this._nodeScaleRatio;var i=e.scale;var a=i&&i[0]||1;var n=e.getZoom();var o=(n-1)*r+1;return o/a},updateLayout:function(t){tS(t.getGraph(),this._getNodeGlobalScale(t));this._symbolDraw.updateLayout();this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove();this._lineDraw&&this._lineDraw.remove()}});var oS={type:"graphRoam",event:"graphRoam",update:"none"};Xv(oS,function(i,t){t.eachComponent({mainType:"series",query:i},function(t){var e=t.coordinateSystem;var r=i_(e,i);t.setCenter&&t.setCenter(r.center);t.setZoom&&t.setZoom(r.zoom)})});Xv({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},function(){});Xv({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},function(){});var sS=function(t){var o=t.findComponents({mainType:"legend"});if(!o||!o.length){return}t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData();var r=t.getGraph();var a=r.data;var n=e.mapArray(e.getName);a.filterSelf(function(t){var e=a.getItemModel(t);var r=e.getShallow("category");if(r!=null){if(typeof r==="number"){r=n[r]}for(var i=0;i<o.length;i++){if(!o[i].isSelected(r)){return false}}}return true})},this)};var lS=function(t){var s={};t.eachSeriesByType("graph",function(a){var n=a.getCategoriesData();var i=a.getData();var o={};n.each(function(t){var e=n.getName(t);o["ec-"+e]=t;var r=n.getItemModel(t);var i=r.get("itemStyle.color")||a.getColorFromPalette(e,s);n.setItemVisual(t,"color",i)});if(n.count()){i.each(function(t){var e=i.getItemModel(t);var r=e.getShallow("category");if(r!=null){if(typeof r==="string"){r=o["ec-"+r]}if(!i.getItemVisual(t,"color",true)){i.setItemVisual(t,"color",n.getItemVisual(r,"color"))}}})}})};function uS(t){if(!(t instanceof Array)){t=[t,t]}return t}var hS=function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph();var l=t.getEdgeData();var e=uS(t.get("edgeSymbol"));var r=uS(t.get("edgeSymbolSize"));var u="lineStyle.color".split(".");var h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]);l.setVisual("toSymbol",e&&e[1]);l.setVisual("fromSymbolSize",r&&r[0]);l.setVisual("toSymbolSize",r&&r[1]);l.setVisual("color",t.get(u));l.setVisual("opacity",t.get(h));l.each(function(t){var e=l.getItemModel(t);var r=s.getEdgeByIndex(t);var i=uS(e.getShallow("symbol",true));var a=uS(e.getShallow("symbolSize",true));var n=e.get(u);var o=e.get(h);switch(n){case"source":n=r.node1.getVisual("color");break;case"target":n=r.node2.getVisual("color");break}i[0]&&r.setVisual("fromSymbol",i[0]);i[1]&&r.setVisual("toSymbol",i[1]);a[0]&&r.setVisual("fromSymbolSize",a[0]);a[1]&&r.setVisual("toSymbolSize",a[1]);r.setVisual("color",n);r.setVisual("opacity",o)})})};function fS(t){var e=t.coordinateSystem;if(e&&e.type!=="view"){return}var r=t.getGraph();r.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])});cS(r)}function cS(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0;var r=ht(t.node1.getLayout());var i=ht(t.node2.getLayout());var a=[r,i];if(+e){a.push([(r[0]+i[0])/2-(r[1]-i[1])*e,(r[1]+i[1])/2-(i[0]-r[0])*e])}t.setLayout(a)})}var vS=function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout");var r=t.coordinateSystem;if(r&&r.type!=="view"){var i=t.getData();var a=[];L(r.dimensions,function(t){a=a.concat(i.mapDimension(t,true))});for(var n=0;n<i.count();n++){var o=[];var s=false;for(var l=0;l<a.length;l++){var u=i.get(a[l],n);if(!isNaN(u)){s=true}o.push(u)}if(s){i.setItemLayout(n,r.dataToPoint(o))}else{i.setItemLayout(n,[NaN,NaN])}}cS(i.graph)}else if(!e||e==="none"){fS(t)}})};function dS(t){var e=t.coordinateSystem;if(e&&e.type!=="view"){return}var r=e.getBoundingRect();var i=t.getData();var a=i.graph;var n=0;var o=i.getSum("value");var s=Math.PI*2/(o||i.count());var l=r.width/2+r.x;var u=r.height/2+r.y;var h=Math.min(r.width,r.height)/2;a.eachNode(function(t){var e=t.getValue("value");n+=s*(o?e:1)/2;t.setLayout([h*Math.cos(n)+l,h*Math.sin(n)+u]);n+=s*(o?e:1)/2});i.setLayout({cx:l,cy:u});a.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0;var r=ht(t.node1.getLayout());var i=ht(t.node2.getLayout());var a;var n=(r[0]+i[0])/2;var o=(r[1]+i[1])/2;if(+e){e*=3;a=[l*e+n*(1-e),u*e+o*(1-e)]}t.setLayout([r,i,a])})}var pS=function(t){t.eachSeriesByType("graph",function(t){if(t.get("layout")==="circular"){dS(t)}})};var gS=vt;function mS(v,d,t){var e=t.rect;var r=e.width;var i=e.height;var p=[e.x+r/2,e.y+i/2];var g=t.gravity==null?.1:t.gravity;for(var a=0;a<v.length;a++){var n=v[a];if(!n.p){n.p=lt(r*(Math.random()-.5)+p[0],i*(Math.random()-.5)+p[1])}n.pp=ht(n.p);n.edges=null}var m=.6;return{warmUp:function(){m=.5},setFixed:function(t){v[t].fixed=true},setUnfixed:function(t){v[t].fixed=false},step:function(t){var e=[];var r=v.length;for(var i=0;i<d.length;i++){var a=d[i];var n=a.n1;var o=a.n2;dt(e,o.p,n.p);var s=pt(e)-a.d;var l=o.w/(n.w+o.w);if(isNaN(l)){l=0}St(e,e);!n.fixed&&gS(n.p,n.p,e,l*s*m);!o.fixed&&gS(o.p,o.p,e,-(1-l)*s*m)}for(var i=0;i<r;i++){var u=v[i];if(!u.fixed){dt(e,p,u.p);gS(u.p,u.p,e,g*m)}}for(var i=0;i<r;i++){var n=v[i];for(var h=i+1;h<r;h++){var o=v[h];dt(e,o.p,n.p);var s=pt(e);if(s===0){ft(e,Math.random()-.5,Math.random()-.5);s=1}var f=(n.rep+o.rep)/s/s;!n.fixed&&gS(n.pp,n.pp,e,f);!o.fixed&&gS(o.pp,o.pp,e,-f)}}var c=[];for(var i=0;i<r;i++){var u=v[i];if(!u.fixed){dt(c,u.p,u.pp);gS(u.p,u.p,c,m);ut(u.pp,u.p)}}m=m*.992;t&&t(v,d,m<.01)}}}var yS=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(e&&e.type!=="view"){return}if(t.get("layout")==="force"){var f=t.preservedPoints||{};var c=t.getGraph();var v=c.data;var r=c.edgeData;var i=t.getModel("force");var a=i.get("initLayout");if(t.preservedPoints){v.each(function(t){var e=v.getId(t);v.setItemLayout(t,f[e]||[NaN,NaN])})}else if(!a||a==="none"){fS(t)}else if(a==="circular"){dS(t)}var n=v.getDataExtent("value");var o=r.getDataExtent("value");var s=i.get("repulsion");var l=i.get("edgeLength");if(!B(s)){s=[s,s]}if(!B(l)){l=[l,l]}l=[l[1],l[0]];var u=v.mapArray("value",function(t,e){var r=v.getItemLayout(e);var i=Fl(t,n,s);if(isNaN(i)){i=(s[0]+s[1])/2}return{w:i,rep:i,fixed:v.getItemModel(e).get("fixed"),p:!r||isNaN(r[0])||isNaN(r[1])?null:r}});var h=r.mapArray("value",function(t,e){var r=c.getEdgeByIndex(e);var i=Fl(t,o,l);if(isNaN(i)){i=(l[0]+l[1])/2}return{n1:u[r.node1.dataIndex],n2:u[r.node2.dataIndex],d:i,curveness:r.getModel().get("lineStyle.curveness")||0}});var e=t.coordinateSystem;var d=e.getBoundingRect();var p=mS(u,h,{rect:d,gravity:i.get("gravity")});var g=p.step;p.step=function(h){for(var t=0,e=u.length;t<e;t++){if(u[t].fixed){ut(u[t].p,c.getNodeByIndex(t).getLayout())}}g(function(t,e,r){for(var i=0,a=t.length;i<a;i++){if(!t[i].fixed){c.getNodeByIndex(i).setLayout(t[i].p)}f[v.getId(i)]=t[i].p}for(var i=0,a=e.length;i<a;i++){var n=e[i];var o=c.getEdgeByIndex(i);var s=n.n1.p;var l=n.n2.p;var u=o.getLayout();u=u?u.slice():[];u[0]=u[0]||[];u[1]=u[1]||[];ut(u[0],s);ut(u[1],l);if(+n.curveness){u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*n.curveness,(s[1]+l[1])/2-(l[0]-s[0])*n.curveness]}o.setLayout(u)}h&&h(r)})};t.forceLayout=p;t.preservedPoints=f;p.step()}else{t.forceLayout=null}})};function xS(t,e,r){var i=t.getBoxLayoutParams();i.aspect=r;return Cu(i,{width:e.getWidth(),height:e.getHeight()})}var _S=function(t,v){var d=[];t.eachSeriesByType("graph",function(t){var e=t.get("coordinateSystem");if(!e||e==="view"){var r=t.getData();var i=r.mapArray(function(t){var e=r.getItemModel(t);return[+e.get("x"),+e.get("y")]});var a=[];var n=[];Kn(i,a,n);if(n[0]-a[0]===0){n[0]+=1;a[0]-=1}if(n[1]-a[1]===0){n[1]+=1;a[1]-=1}var o=(n[0]-a[0])/(n[1]-a[1]);var s=xS(t,v,o);if(isNaN(o)){a=[s.x,s.y];n=[s.x+s.width,s.y+s.height]}var l=n[0]-a[0];var u=n[1]-a[1];var h=s.width;var f=s.height;var c=t.coordinateSystem=new dx;c.zoomLimit=t.get("scaleLimit");c.setBoundingRect(a[0],a[1],l,u);c.setViewRect(s.x,s.y,h,f);c.setCenter(t.get("center"));c.setZoom(t.get("zoom"));d.push(c)}});return d};Uv(sS);Kv(um("graph","circle",null));Kv(lS);Kv(hS);$v(vS);$v(pS);$v(yS);Yv("graphView",{create:_S});var wS=Tf.extend({type:"series.gauge",getInitialData:function(t,e){var r=t.data||[];if(!B(r)){r=[r]}t.data=r;return Oy(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:true,radius:"75%",startAngle:225,endAngle:-45,clockwise:true,min:0,max:100,splitNumber:10,axisLine:{show:true,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:true,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:true,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:true,distance:5,color:"auto"},pointer:{show:true,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:true,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:true,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var bS=Wo.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var r=Math.cos;var i=Math.sin;var a=e.r;var n=e.width;var o=e.angle;var s=e.x-r(o)*n*(n>=a/3?1:2);var l=e.y-i(o)*n*(n>=a/3?1:2);o=e.angle-Math.PI/2;t.moveTo(s,l);t.lineTo(e.x+r(o)*n,e.y+i(o)*n);t.lineTo(e.x+r(e.angle)*a,e.y+i(e.angle)*a);t.lineTo(e.x-r(o)*n,e.y-i(o)*n);t.lineTo(s,l);return}});function SS(t,e){var r=t.get("center");var i=e.getWidth();var a=e.getHeight();var n=Math.min(i,a);var o=Wl(r[0],e.getWidth());var s=Wl(r[1],e.getHeight());var l=Wl(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function MS(t,e){if(e){if(typeof e==="string"){t=e.replace("{value}",t!=null?t:"")}else if(typeof e==="function"){t=e(t)}}return t}var IS=Math.PI*2;var DS=Ff.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var i=t.get("axisLine.lineStyle.color");var a=SS(t,r);this._renderMain(t,e,r,i,a)},dispose:function(){},_renderMain:function(t,e,r,i,a){var n=this.group;var o=t.getModel("axisLine");var s=o.getModel("lineStyle");var l=t.get("clockwise");var u=-t.get("startAngle")/180*Math.PI;var h=-t.get("endAngle")/180*Math.PI;var f=(h-u)%IS;var c=u;var v=s.get("width");for(var d=0;d<i.length;d++){var p=Math.min(Math.max(i[d][0],0),1);var h=u+f*p;var g=new cs({shape:{startAngle:c,endAngle:h,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-v,r:a.r},silent:true});g.setStyle({fill:i[d][1]});g.setStyle(s.getLineStyle(["color","borderWidth","borderColor"]));n.add(g);c=h}var m=function(t){if(t<=0){return i[0][1]}for(var e=0;e<i.length;e++){if(i[e][0]>=t&&(e===0?0:i[e-1][0])<t){return i[e][1]}}return i[e-1][1]};if(!l){var y=u;u=h;h=y}this._renderTicks(t,e,r,m,a,u,h,l);this._renderPointer(t,e,r,m,a,u,h,l);this._renderTitle(t,e,r,m,a);this._renderDetail(t,e,r,m,a)},_renderTicks:function(t,e,r,i,a,n,o,s){var l=this.group;var u=a.cx;var h=a.cy;var f=a.r;var c=+t.get("min");var v=+t.get("max");var d=t.getModel("splitLine");var p=t.getModel("axisTick");var g=t.getModel("axisLabel");var m=t.get("splitNumber");var y=p.get("splitNumber");var x=Wl(d.get("length"),f);var _=Wl(p.get("length"),f);var w=n;var b=(o-n)/m;var S=b/y;var M=d.getModel("lineStyle").getLineStyle();var I=p.getModel("lineStyle").getLineStyle();for(var D=0;D<=m;D++){var T=Math.cos(w);var A=Math.sin(w);if(d.get("show")){var C=new ws({shape:{x1:T*f+u,y1:A*f+h,x2:T*(f-x)+u,y2:A*(f-x)+h},style:M,silent:true});if(M.stroke==="auto"){C.setStyle({stroke:i(D/m)})}l.add(C)}if(g.get("show")){var L=MS(Hl(D/m*(v-c)+c),g.get("formatter"));var k=g.get("distance");var P=i(D/m);l.add(new ls({style:ol({},g,{text:L,x:T*(f-x-k)+u,y:A*(f-x-k)+h,textVerticalAlign:A<-.4?"top":A>.4?"bottom":"middle",textAlign:T<-.4?"left":T>.4?"right":"center"},{autoColor:P}),silent:true}))}if(p.get("show")&&D!==m){for(var N=0;N<=y;N++){var T=Math.cos(w);var A=Math.sin(w);var E=new ws({shape:{x1:T*f+u,y1:A*f+h,x2:T*(f-_)+u,y2:A*(f-_)+h},silent:true,style:I});if(I.stroke==="auto"){E.setStyle({stroke:i((D+N/y)/m)})}l.add(E);w+=S}w-=S}else{w+=b}}},_renderPointer:function(i,t,e,a,n,r,o,s){var l=this.group;var u=this._data;if(!i.get("pointer.show")){u&&u.eachItemGraphicEl(function(t){l.remove(t)});return}var h=[+i.get("min"),+i.get("max")];var f=[r,o];var c=i.getData();var v=c.mapDimension("value");c.diff(u).add(function(t){var e=new bS({shape:{angle:r}});ml(e,{shape:{angle:Fl(c.get(v,t),h,f,true)}},i);l.add(e);c.setItemGraphicEl(t,e)}).update(function(t,e){var r=u.getItemGraphicEl(e);gl(r,{shape:{angle:Fl(c.get(v,t),h,f,true)}},i);l.add(r);c.setItemGraphicEl(t,r)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute();c.eachItemGraphicEl(function(t,e){var r=c.getItemModel(e);var i=r.getModel("pointer");t.setShape({x:n.cx,y:n.cy,width:Wl(i.get("width"),n.r),r:Wl(i.get("length"),n.r)});t.useStyle(r.getModel("itemStyle").getItemStyle());if(t.style.fill==="auto"){t.setStyle("fill",a(Fl(c.get(v,e),h,[0,1],true)))}al(t,r.getModel("emphasis.itemStyle").getItemStyle())});this._data=c},_renderTitle:function(t,e,r,i,a){var n=t.getData();var o=n.mapDimension("value");var s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter");var u=a.cx+Wl(l[0],a.r);var h=a.cy+Wl(l[1],a.r);var f=+t.get("min");var c=+t.get("max");var v=t.getData().get(o,0);var d=i(Fl(v,[f,c],[0,1],true));this.group.add(new ls({silent:true,style:ol({},s,{x:u,y:h,text:n.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:true})}))}},_renderDetail:function(t,e,r,i,a){var n=t.getModel("detail");var o=+t.get("min");var s=+t.get("max");if(n.get("show")){var l=n.get("offsetCenter");var u=a.cx+Wl(l[0],a.r);var h=a.cy+Wl(l[1],a.r);var f=Wl(n.get("width"),a.r);var c=Wl(n.get("height"),a.r);var v=t.getData();var d=v.get(v.mapDimension("value"),0);var p=i(Fl(d,[o,s],[0,1],true));this.group.add(new ls({silent:true,style:ol({},n,{x:u,y:h,text:MS(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:true})}))}}});var TS=rd({type:"series.funnel",init:function(t){TS.superApply(this,"init",arguments);this.legendDataProvider=function(){return this.getRawData()};this._defaultLabelLine(t)},getInitialData:function(t,e){return Oy(this,["value"])},_defaultLabelLine:function(t){Wa(t,"labelLine",["show"]);var e=t.labelLine;var r=t.emphasis.labelLine;e.show=e.show&&t.label.show;r.show=r.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData();var r=TS.superCall(this,"getDataParams",t);var i=e.mapDimension("value");var a=e.getSum(i);r.percent=!a?0:+(e.get(i,t)/a*100).toFixed(2);r.$vars.push("percent");return r},defaultOption:{zlevel:0,z:2,legendHoverLink:true,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:true,position:"outer"},labelLine:{show:true,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:true}}}});function AS(t,e){cr.call(this);var r=new ys;var i=new xs;var a=new ls;this.add(r);this.add(i);this.add(a);this.updateData(t,e,true);function n(){i.ignore=i.hoverIgnore;a.ignore=a.hoverIgnore}function o(){i.ignore=i.normalIgnore;a.ignore=a.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var CS=AS.prototype;var LS=["itemStyle","opacity"];CS.updateData=function(t,e,r){var i=this.childAt(0);var a=t.hostModel;var n=t.getItemModel(e);var o=t.getItemLayout(e);var s=t.getItemModel(e).get(LS);s=s==null?1:s;i.useStyle({});if(r){i.setShape({points:o.points});i.setStyle({opacity:0});ml(i,{style:{opacity:s}},a,e)}else{gl(i,{style:{opacity:s},shape:{points:o.points}},a,e)}var l=n.getModel("itemStyle");var u=t.getItemVisual(e,"color");i.setStyle(C({lineJoin:"round",fill:u},l.getItemStyle(["opacity"])));i.hoverStyle=l.getModel("emphasis").getItemStyle();this._updateLabel(t,e);al(this)};CS._updateLabel=function(t,e){var r=this.childAt(1);var i=this.childAt(2);var a=t.hostModel;var n=t.getItemModel(e);var o=t.getItemLayout(e);var s=o.label;var l=t.getItemVisual(e,"color");gl(r,{shape:{points:s.linePoints||s.linePoints}},a,e);gl(i,{style:{x:s.x,y:s.y}},a,e);i.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=n.getModel("label");var h=n.getModel("emphasis.label");var f=n.getModel("labelLine");var c=n.getModel("emphasis.labelLine");var l=t.getItemVisual(e,"color");nl(i.style,i.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign});i.ignore=i.normalIgnore=!u.get("show");i.hoverIgnore=!h.get("show");r.ignore=r.normalIgnore=!f.get("show");r.hoverIgnore=!c.get("show");r.setStyle({stroke:l});r.setStyle(f.getModel("lineStyle").getLineStyle());r.hoverStyle=c.getModel("lineStyle").getLineStyle()};M(AS,cr);var kS=Ff.extend({type:"funnel",render:function(t,e,r){var i=t.getData();var a=this._data;var n=this.group;i.diff(a).add(function(t){var e=new AS(i,t);i.setItemGraphicEl(t,e);n.add(e)}).update(function(t,e){var r=a.getItemGraphicEl(e);r.updateData(i,t);n.add(r);i.setItemGraphicEl(t,r)}).remove(function(t){var e=a.getItemGraphicEl(t);n.remove(e)}).execute();this._data=i},remove:function(){this.group.removeAll();this._data=null},dispose:function(){}});function PS(t,e){return Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function NS(t,e){var r=t.mapDimension("value");var i=t.mapArray(r,function(t){return t});var a=[];var n=e==="ascending";for(var o=0,s=t.count();o<s;o++){a[o]=o}if(typeof e==="function"){a.sort(e)}else if(e!=="none"){a.sort(function(t,e){return n?i[t]-i[e]:i[e]-i[t]})}return a}function ES(m){m.each(function(t){var e=m.getItemModel(t);var r=e.getModel("label");var i=r.get("position");var a=e.getModel("labelLine");var n=m.getItemLayout(t);var o=n.points;var s=i==="inner"||i==="inside"||i==="center";var l;var u;var h;var f;if(s){u=(o[0][0]+o[1][0]+o[2][0]+o[3][0])/4;h=(o[0][1]+o[1][1]+o[2][1]+o[3][1])/4;l="center";f=[[u,h],[u,h]]}else{var c;var v;var d;var p=a.get("length");if(i==="left"){c=(o[3][0]+o[0][0])/2;v=(o[3][1]+o[0][1])/2;d=c-p;u=d-5;l="right"}else{c=(o[1][0]+o[2][0])/2;v=(o[1][1]+o[2][1])/2;d=c+p;u=d+5;l="left"}var g=v;f=[[c,v],[d,g]];h=g}n.label={linePoints:f,x:u,y:h,verticalAlign:"middle",textAlign:l,inside:s}})}var OS=function(t,b,e){t.eachSeriesByType("funnel",function(t){var n=t.getData();var o=n.mapDimension("value");var e=t.get("sort");var s=PS(t,b);var r=NS(n,e);var l=[Wl(t.get("minSize"),s.width),Wl(t.get("maxSize"),s.width)];var i=n.getDataExtent(o);var u=t.get("min");var h=t.get("max");if(u==null){u=Math.min(i[0],0)}if(h==null){h=i[1]}var f=t.get("funnelAlign");var a=t.get("gap");var c=(s.height-a*(n.count()-1))/n.count();var v=s.y;var d=function(t,e){var r=n.get(o,t)||0;var i=Fl(r,[u,h],l,true);var a;switch(f){case"left":a=s.x;break;case"center":a=s.x+(s.width-i)/2;break;case"right":a=s.x+s.width-i;break}return[[a,e],[a+i,e]]};if(e==="ascending"){c=-c;a=-a;v+=s.height;r=r.reverse()}for(var p=0;p<r.length;p++){var g=r[p];var m=r[p+1];var y=n.getItemModel(g);var x=y.get("itemStyle.height");if(x==null){x=c}else{x=Wl(x,s.height);if(e==="ascending"){x=-x}}var _=d(g,v);var w=d(m,v+x);v+=x+a;n.setItemLayout(g,{points:_.concat(w.slice().reverse())})}ES(n)})};Kv(Zy("funnel"));$v(OS);Uv(Ky("funnel"));var zS=function(t){RS(t);BS(t)};function RS(t){if(t.parallel){return}var e=false;L(t.series,function(t){if(t&&t.type==="parallel"){e=true}});if(e){t.parallel=[{}]}}function BS(i){var t=Fa(i.parallelAxis);L(t,function(t){if(!F(t)){return}var e=t.parallelIndex||0;var r=Fa(i.parallel)[e];if(r&&r.parallelAxisDefault){y(t,r.parallelAxisDefault,false)}})}var VS=function(t,e,r,i,a){pg.call(this,t,e,r);this.type=i||"value";this.axisIndex=a};VS.prototype={constructor:VS,model:null,isHorizontal:function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"}};M(VS,pg);var GS=function(t,e,r,i,a,n){e[0]=WS(e[0],r);e[1]=WS(e[1],r);t=t||0;var o=r[1]-r[0];if(a!=null){a=WS(a,[0,o])}if(n!=null){n=Math.max(n,a!=null?a:0)}if(i==="all"){a=n=Math.abs(e[1]-e[0]);i=0}var s=FS(e,i);e[i]+=t;var l=a||0;var u=r.slice();s.sign<0?u[0]+=l:u[1]-=l;e[i]=WS(e[i],u);var h=FS(e,i);if(a!=null&&(h.sign!==s.sign||h.span<a)){e[1-i]=e[i]+s.sign*a}var h=FS(e,i);if(n!=null&&h.span>n){e[1-i]=e[i]+h.sign*n}return e};function FS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function WS(t,e){return Math.min(e[1],Math.max(e[0],t))}var HS=L;var ZS=Math.min;var US=Math.max;var jS=Math.floor;var XS=Math.ceil;var YS=Hl;var qS=Math.PI;function $S(t,e,r){this._axesMap=it();this._axesLayout={};this.dimensions=t.dimensions;this._rect;this._model=t;this._init(t,e,r)}$S.prototype={type:"parallel",constructor:$S,_init:function(t,o,e){var r=t.dimensions;var s=t.parallelAxisIndex;HS(r,function(t,e){var r=s[e];var i=o.getComponent("parallelAxis",r);var a=this._axesMap.set(t,new VS(t,Bp(i),[0,0],i.get("type"),r));var n=a.type==="category";a.onBand=n&&i.get("boundaryGap");a.inverse=i.get("inverse");i.axis=a;a.model=i;a.coordinateSystem=i.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo();var r=e.axisBase;var i=e.layoutBase;var a=e.pixelDimIndex;var n=t[1-a];var o=t[a];return n>=r&&n<=r+e.axisLength&&o>=i&&o<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){if(!e.contains(t,i)){return}var r=t.getData();HS(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(r,r.mapDimension(t));Rp(e.scale,e.model)},this)},this)},resize:function(t,e){this._rect=Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model;var e=this._rect;var r=["x","y"];var i=["width","height"];var a=t.get("layout");var n=a==="horizontal"?0:1;var o=e[i[n]];var s=[0,o];var l=this.dimensions.length;var u=KS(t.get("axisExpandWidth"),s);var h=KS(t.get("axisExpandCount")||0,[0,l]);var f=t.get("axisExpandable")&&l>3&&l>h&&h>1&&u>0&&o>0;var c=t.get("axisExpandWindow");var v;if(!c){v=KS(u*(h-1),s);var d=t.get("axisExpandCenter")||jS(l/2);c=[u*d-v/2];c[1]=c[0]+v}else{v=KS(c[1]-c[0],s);c[1]=c[0]+v}var p=(o-v)/(l-h);p<3&&(p=0);var g=[jS(YS(c[0]/u,1))+1,XS(YS(c[1]/u,1))-1];var m=p/u*c[0];return{layout:a,pixelDimIndex:n,layoutBase:e[r[n]],layoutLength:o,axisBase:e[r[1-n]],axisLength:e[i[1-n]],axisExpandable:f,axisExpandWidth:u,axisCollapseWidth:p,axisExpandWindow:c,axisCount:l,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect;var u=this._axesMap;var t=this.dimensions;var h=this._makeLayoutInfo();var f=h.layout;u.each(function(t){var e=[0,h.axisLength];var r=t.inverse?1:0;t.setExtent(e[r],e[1-r])});HS(t,function(t,e){var r=(h.axisExpandable?QS:JS)(e,h);var i={horizontal:{x:r.position,y:h.axisLength},vertical:{x:0,y:r.position}};var a={horizontal:qS/2,vertical:0};var n=[i[f].x+l.x,i[f].y+l.y];var o=a[f];var s=Ut();$t(s,s,o);qt(s,s,n);this._axesLayout[t]={position:n,rotation:o,transform:s,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:u.get(t).getLabelInterval()}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,t,r){var i=this.dimensions;var a=T(i,function(t){return e.mapDimension(t)});var n=this._axesMap;var o=this.hasAxisBrushed();for(var s=0,l=e.count();s<l;s++){var u=e.getValues(a,s);var h;if(!o){h="normal"}else{h="active";for(var f=0,c=i.length;f<c;f++){var v=i[f];var d=n.get(v).model.getActiveState(u[f],f);if(d==="inactive"){h="inactive";break}}}t.call(r,h,s)}},hasAxisBrushed:function(){var t=this.dimensions;var e=this._axesMap;var r=false;for(var i=0,a=t.length;i<a;i++){if(e.get(t[i]).model.getActiveState()!=="normal"){r=true}}return r},axisCoordToPoint:function(t,e){var r=this._axesLayout[e];return xl([t,0],r.transform)},getAxisLayout:function(t){return P(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo();var r=e.pixelDimIndex;var i=e.axisExpandWindow.slice();var a=i[1]-i[0];var n=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t)){return{behavior:"none",axisExpandWindow:i}}var o=t[r]-e.layoutBase-e.axisExpandWindow0Pos;var s;var l="slide";var u=e.axisCollapseWidth;var h=this._model.get("axisExpandSlideTriggerArea");var f=h[0]!=null;if(u){if(f&&u&&o<a*h[0]){l="jump";s=o-a*h[2]}else if(f&&u&&o>a*(1-h[0])){l="jump";s=o-a*(1-h[2])}else{(s=o-a*h[1])>=0&&(s=o-a*(1-h[1]))<=0&&(s=0)}s*=e.axisExpandWidth/u;s?GS(s,i,n,"all"):l="none"}else{var a=i[1]-i[0];var c=n[1]*o/a;i=[US(0,c-a/2)];i[1]=ZS(n[1],i[0]+a);i[0]=i[1]-a}return{axisExpandWindow:i,behavior:l}}};function KS(t,e){return ZS(US(t,e[0]),e[1])}function JS(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:true}}function QS(t,e){var r=e.layoutLength;var i=e.axisExpandWidth;var a=e.axisCount;var n=e.axisCollapseWidth;var o=e.winInnerIndices;var s;var l=n;var u=false;var h;if(t<o[0]){s=t*n;h=n}else if(t<=o[1]){s=e.axisExpandWindow0Pos+t*i-e.axisExpandWindow[0];l=i;u=true}else{s=r-(a-1-t)*n;h=n}return{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:h}}function tM(i,a){var n=[];i.eachComponent("parallel",function(t,e){var r=new $S(t,i,a);r.name="parallel_"+e;r.resize(t,a);t.coordinateSystem=r;r.model=t;n.push(r)});i.eachSeries(function(t){if(t.get("coordinateSystem")==="parallel"){var e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}});return n}Ah.register("parallel",{create:tM});var eM=Ru.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return pn([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=P(t);if(e){for(var r=e.length-1;r>=0;r--){Zl(e[r])}}},getActiveState:function(t){var e=this.activeIntervals;if(!e.length){return"normal"}if(t==null){return"inactive"}for(var r=0,i=e.length;r<i;r++){if(e[r][0]<=t&&t<=e[r][1]){return"active"}}return"inactive"}});var rM={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:true,z:10};y(eM.prototype,Hp);function iM(t,e){return e.type||(e.data?"category":"value")}wm("parallel",eM,iM,rM);Ru.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:false,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){Ru.prototype.init.apply(this,arguments);this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&y(e,t,true);this._initDimensions()},contains:function(t,e){var r=t.get("parallelIndex");return r!=null&&e.getComponent("parallel",r)===this},setAxisExpand:function(e){L(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){if(e.hasOwnProperty(t)){this.option[t]=e[t]}},this)},_initDimensions:function(){var e=this.dimensions=[];var r=this.parallelAxisIndex=[];var t=k(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);L(t,function(t){e.push("dim"+t.get("dim"));r.push(t.componentIndex)})}});var aM={type:"axisAreaSelect",event:"axisAreaSelected"};Xv(aM,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})});Xv("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var nM=R;var oM=L;var sM=T;var lM=Math.min;var uM=Math.max;var hM=Math.pow;var fM=1e4;var cM=6;var vM=6;var dM="globalPan";var pM={w:[0,0],e:[0,1],n:[1,0],s:[1,1]};var gM={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"};var mM={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:true,brushMode:"single",removeOnClick:false};var yM=0;function xM(t){if(A){K(t)}Rt.call(this);this._zr=t;this.group=new cr;this._brushType;this._brushOption;this._panels;this._track=[];this._dragging;this._covers=[];this._creatingCover;this._creatingPanel;this._enableGlobalPan;if(A){this._mounted}this._uid="brushController_"+yM++;this._handlers={};oM(JM,function(t,e){this._handlers[e]=z(t,this)},this)}xM.prototype={constructor:xM,enableBrush:function(t){if(A){K(this._mounted)}this._brushType&&wM(this);t.brushType&&_M(this,t);return this},setPanels:function(t){if(t&&t.length){var e=this._panels={};L(t,function(t){e[t.panelId]=P(t)})}else{this._panels=null}return this},mount:function(t){t=t||{};if(A){this._mounted=true}this._enableGlobalPan=t.enableGlobalPan;var e=this.group;this._zr.add(e);e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]});this._transform=e.getLocalTransform();return this},eachCover:function(t,e){oM(this._covers,t,e)},updateCovers:function(a){if(A){K(this._mounted)}a=T(a,function(t){return y(P(mM),t,true)});var r="\0-brush-index-";var n=this._covers;var o=this._covers=[];var s=this;var l=this._creatingCover;new ud(n,a,t,i).add(e).update(e).remove(u).execute();return this;function i(t,e){return(t.id!=null?t.id:r+e)+"-"+t.brushType}function t(t,e){return i(t.__brushOption,e)}function e(t,e){var r=a[t];if(e!=null&&n[e]===l){o[t]=n[e]}else{var i=o[t]=e!=null?(n[e].__brushOption=r,n[e]):SM(s,bM(s,r));DM(s,i)}}function u(t){if(n[t]!==l){s.group.remove(n[t])}}},unmount:function(){if(A){if(!this._mounted){return}}this.enableBrush(false);LM(this);this._zr.remove(this.group);if(A){this._mounted=false}return this},dispose:function(){this.unmount();this.off()}};I(xM,Rt);function _M(t,e){var r=t._zr;if(!t._enableGlobalPan){Rx(r,dM,t._uid)}oM(t._handlers,function(t,e){r.on(e,t)});t._brushType=e.brushType;t._brushOption=y(P(mM),e,true)}function wM(t){var r=t._zr;Bx(r,dM,t._uid);oM(t._handlers,function(t,e){r.off(e,t)});t._brushType=t._brushOption=null}function bM(t,e){var r=tI[e.brushType].createCover(t,e);r.__brushOption=e;IM(r,e);t.group.add(r);return r}function SM(t,e){var r=TM(e);if(r.endCreating){r.endCreating(t,e);IM(e,e.__brushOption)}return e}function MM(t,e){var r=e.__brushOption;TM(e).updateCoverShape(t,e,r.range,r)}function IM(t,e){var r=e.z;r==null&&(r=fM);t.traverse(function(t){t.z=r;t.z2=r})}function DM(t,e){TM(e).updateCommon(t,e);MM(t,e)}function TM(t){return tI[t.__brushOption.brushType]}function AM(t,e,r){var i=t._panels;if(!i){return true}var a;var n=t._transform;oM(i,function(t){t.isTargetByCursor(e,r,n)&&(a=t)});return a}function CM(t,e){var r=t._panels;if(!r){return true}var i=e.__brushOption.panelId;return i!=null?r[i]:true}function LM(e){var t=e._covers;var r=t.length;oM(t,function(t){e.group.remove(t)},e);t.length=0;return!!r}function kM(t,e){var r=sM(t._covers,function(t){var e=t.__brushOption;var r=P(e.range);return{brushType:e.brushType,panelId:e.panelId,range:r}});t.trigger("brush",r,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function PM(t){var e=t._track;if(!e.length){return false}var r=e[e.length-1];var i=e[0];var a=r[0]-i[0];var n=r[1]-i[1];var o=hM(a*a+n*n,.5);return o>cM}function NM(t){var e=t.length-1;e<0&&(e=0);return[t[0],t[e]]}function EM(e,r,t,i){var a=new cr;a.add(new _s({name:"main",style:BM(t),silent:true,draggable:true,cursor:"move",drift:nM(e,r,a,"nswe"),ondragend:nM(kM,r,{isEnd:true})}));oM(i,function(t){a.add(new _s({name:t,style:{opacity:0},draggable:true,silent:true,invisible:true,drift:nM(e,r,a,t),ondragend:nM(kM,r,{isEnd:true})}))});return a}function OM(t,e,r,i){var a=i.brushStyle.lineWidth||0;var n=uM(a,vM);var o=r[0][0];var s=r[1][0];var l=o-a/2;var u=s-a/2;var h=r[0][1];var f=r[1][1];var c=h-n+a/2;var v=f-n+a/2;var d=h-o;var p=f-s;var g=d+a;var m=p+a;RM(t,e,"main",o,s,d,p);if(i.transformable){RM(t,e,"w",l,u,n,m);RM(t,e,"e",c,u,n,m);RM(t,e,"n",l,u,g,n);RM(t,e,"s",l,v,g,n);RM(t,e,"nw",l,u,n,n);RM(t,e,"ne",c,u,n,n);RM(t,e,"sw",l,v,n,n);RM(t,e,"se",c,v,n,n)}}function zM(i,a){var t=a.__brushOption;var n=t.transformable;var e=a.childAt(0);e.useStyle(BM(t));e.attr({silent:!n,cursor:n?"move":"default"});oM(["w","e","n","s","se","sw","ne","nw"],function(t){var e=a.childOfName(t);var r=FM(i,t);e&&e.attr({silent:!n,invisible:!n,cursor:n?gM[r]+"-resize":null})})}function RM(t,e,r,i,a,n,o){var s=e.childOfName(r);s&&s.setShape(jM(UM(t,e,[[i,a],[i+n,a+o]])))}function BM(t){return C({strokeNoScale:true},t.brushStyle)}function VM(t,e,r,i){var a=[lM(t,r),lM(e,i)];var n=[uM(t,r),uM(e,i)];return[[a[0],n[0]],[a[1],n[1]]]}function GM(t){return yl(t.group)}function FM(t,e){if(e.length>1){e=e.split("");var r=[FM(t,e[0]),FM(t,e[1])];(r[0]==="e"||r[0]==="w")&&r.reverse();return r.join("")}else{var i={w:"left",e:"right",n:"top",s:"bottom"};var a={left:"w",right:"e",top:"n",bottom:"s"};var r=_l(i[e],GM(t));return a[r]}}function WM(t,e,r,i,a,n,o,s){var l=i.__brushOption;var u=t(l.range);var h=ZM(r,n,o);oM(a.split(""),function(t){var e=pM[t];u[e[0]][e[1]]+=h[e[0]]});l.range=e(VM(u[0][0],u[1][0],u[0][1],u[1][1]));DM(r,i);kM(r,{isEnd:false})}function HM(t,e,r,i,a){var n=e.__brushOption.range;var o=ZM(t,r,i);oM(n,function(t){t[0]+=o[0];t[1]+=o[1]});DM(t,e);kM(t,{isEnd:false})}function ZM(t,e,r){var i=t.group;var a=i.transformCoordToLocal(e,r);var n=i.transformCoordToLocal(0,0);return[a[0]-n[0],a[1]-n[1]]}function UM(t,e,r){var i=CM(t,e);return i&&i!==true?i.clipPath(r,t._transform):P(r)}function jM(t){var e=lM(t[0][0],t[1][0]);var r=lM(t[0][1],t[1][1]);var i=uM(t[0][0],t[1][0]);var a=uM(t[0][1],t[1][1]);return{x:e,y:r,width:i-e,height:a-r}}function XM(t,e,r){if(!t._brushType){return}var i=t._zr;var a=t._covers;var n=AM(t,e,r);if(!t._dragging){for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(n&&(n===true||s.panelId===n.panelId)&&tI[s.brushType].contain(a[o],r[0],r[1])){return}}}n&&i.setCursorStyle("crosshair")}function YM(t){var e=t.event;e.preventDefault&&e.preventDefault()}function qM(t,e,r){return t.childOfName("main").contain(e,r)}function $M(t,e,r,i){var a=t._creatingCover;var n=t._creatingPanel;var o=t._brushOption;var s;t._track.push(r.slice());if(PM(t)||a){if(n&&!a){o.brushMode==="single"&&LM(t);var l=P(o);l.brushType=KM(l.brushType,n);l.panelId=n===true?null:n.panelId;a=t._creatingCover=bM(t,l);t._covers.push(a)}if(a){var u=tI[KM(t._brushType,n)];var h=a.__brushOption;h.range=u.getCreatingRange(UM(t,a,t._track));if(i){SM(t,a);u.updateCommon(t,a)}MM(t,a);s={isEnd:i}}}else if(i&&o.brushMode==="single"&&o.removeOnClick){if(AM(t,e,r)&&LM(t)){s={isEnd:i,removeOnClick:true}}}return s}function KM(t,e){if(t==="auto"){if(A){K(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"')}return e.defaultBrushType}return t}var JM={mousedown:function(t){if(this._dragging){QM.call(this,t)}else if(!t.target||!t.target.draggable){YM(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var r=this._creatingPanel=AM(this,t,e);if(r){this._dragging=true;this._track=[e.slice()]}}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);XM(this,t,e);if(this._dragging){YM(t);var r=$M(this,t,e,false);r&&kM(this,r)}},mouseup:QM};function QM(t){if(this._dragging){YM(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);var r=$M(this,t,e,true);this._dragging=false;this._track=[];this._creatingCover=null;r&&kM(this,r)}}var tI={lineX:eI(0),lineY:eI(1),rect:{createCover:function(t,e){return EM(nM(WM,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=NM(t);return VM(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,i){OM(t,e,r,i)},updateCommon:zM,contain:qM},polygon:{createCover:function(t,e){var r=new cr;r.add(new xs({name:"main",style:BM(e),silent:true}));return r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0));e.add(new ys({name:"main",draggable:true,drift:nM(HM,t,e),ondragend:nM(kM,t,{isEnd:true})}))},updateCoverShape:function(t,e,r,i){e.childAt(0).setShape({points:UM(t,e,r)})},updateCommon:zM,contain:qM}};function eI(l){return{createCover:function(t,e){return EM(nM(WM,function(t){var e=[t,[0,100]];l&&e.reverse();return e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=NM(t);var r=lM(e[0][l],e[1][l]);var i=uM(e[0][l],e[1][l]);return[r,i]},updateCoverShape:function(t,e,r,i){var a;var n=CM(t,e);if(n!==true&&n.getLinearBrushOtherExtent){a=n.getLinearBrushOtherExtent(l,t._transform)}else{var o=t._zr;a=[0,[o.getWidth(),o.getHeight()][1-l]]}var s=[r,a];l&&s.reverse();OM(t,e,s,i)},updateCommon:zM,contain:qM}}function rI(r){r=nI(r);return function(t,e){return bl(t,r)}}function iI(a,n){a=nI(a);return function(t){var e=n!=null?n:t;var r=e?a.width:a.height;var i=e?a.x:a.y;return[i,i+(r||0)]}}function aI(i,a,n){i=nI(i);return function(t,e,r){return i.contain(e[0],e[1])&&!Jx(t,a,n)}}function nI(t){return fr.create(t)}var oI=["axisLine","axisTickLabel","axisName"];var sI=ed({type:"parallelAxis",init:function(t,e){sI.superApply(this,"init",arguments);(this._brushController=new xM(e.getZr())).on("brush",z(this._onBrush,this))},render:function(t,e,r,i){if(lI(t,e,i)){return}this.axisModel=t;this.api=r;this.group.removeAll();var a=this._axisGroup;this._axisGroup=new cr;this.group.add(this._axisGroup);if(!t.get("show")){return}var n=hI(t,e);var o=n.coordinateSystem;var s=t.getAreaSelectStyle();var l=s.width;var u=t.axis.dim;var h=o.getAxisLayout(u);var f=N({strokeContainThreshold:l},h);var c=new Fm(t,f);L(oI,c.add,c);this._axisGroup.add(c.getGroup());this._refreshBrushController(f,s,t,n,l,r);var v=i&&i.animation===false?null:t;wl(a,this._axisGroup,v)},_refreshBrushController:function(t,e,r,i,a,n){var o=r.axis.getExtent();var s=o[1]-o[0];var l=Math.min(30,Math.abs(s)*.1);var u=fr.create({x:o[0],y:-a/2,width:s,height:a});u.x-=l;u.width+=2*l;this._brushController.mount({enableGlobalPan:true,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:rI(u),isTargetByCursor:aI(u,n,i),getLinearBrushOtherExtent:iI(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:true}).updateCovers(uI(r))},_onBrush:function(t,e){var r=this.axisModel;var i=r.axis;var a=T(t,function(t){return[i.coordToData(t.range[0],true),i.coordToData(t.range[1],true)]});if(!r.option.realtime===e.isEnd||e.removeOnClick){this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:a})}},dispose:function(){this._brushController.dispose()}});function lI(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function uI(t){var e=t.axis;return T(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],true),e.dataToCoord(t[1],true)]}})}function hI(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var fI=5;ed({type:"parallel",render:function(t,e,r){this._model=t;this._api=r;if(!this._handlers){this._handlers={};L(cI,function(t,e){r.getZr().on(e,this._handlers[e]=z(t,this))},this)}Jf(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,r){L(this._handlers,function(t,e){r.getZr().off(e,t)});this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(N({type:"parallelAxisExpand"},t))}});var cI={mousedown:function(t){if(vI(this,"click")){this._mouseDownPoint=[t.offsetX,t.offsetY]}},mouseup:function(t){var e=this._mouseDownPoint;if(vI(this,"click")&&e){var r=[t.offsetX,t.offsetY];var i=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(i>fI){return}var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(this._mouseDownPoint||!vI(this,"mousemove")){return}var e=this._model;var r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);var i=r.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce"));this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:i==="jump"?null:false})}};function vI(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}Zv(zS);Tf.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){if(this.option.progressive){this.option.animation=false}var r=this.getSource();dI(r,this);return Zd(r,this)},getRawIndicesByActiveState:function(r){var t=this.coordinateSystem;var i=this.getData();var a=[];t.eachActiveState(i,function(t,e){if(r===t){a.push(i.getRawIndex(e))}});return a},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:false},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:false}},progressive:false,smooth:false,animationEasing:"linear"}});function dI(t,e){if(t.encodeDefine){return}var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!r){return}var i=t.encodeDefine=it();L(r.dimensions,function(t){var e=pI(t);i.set(t,e)})}function pI(t){return+t.replace("dim","")}var gI=.3;var mI=Ff.extend({type:"parallel",init:function(){this._dataGroup=new cr;this.group.add(this._dataGroup);this._data},render:function(t,e,r,i){this._renderForNormal(t,i)},dispose:function(){},_renderForNormal:function(n,o){var r=this._dataGroup;var s=n.getData();var l=this._data;var u=n.coordinateSystem;var h=u.dimensions;var t=n.option;var e=t.smooth?gI:null;s.diff(l).add(a).update(f).remove(c).execute();wI(s,e);if(!this._data){var i=yI(u,n,function(){setTimeout(function(){r.removeClipPath()})});r.setClipPath(i)}this._data=s;function a(t){_I(s,r,t,h,u,null,e)}function f(t,e){var r=l.getItemGraphicEl(e);var i=xI(s,t,h,u);s.setItemGraphicEl(t,r);var a=o&&o.animation===false?null:n;gl(r,{shape:{points:i}},a,t)}function c(t){var e=l.getItemGraphicEl(t);r.remove(e)}},remove:function(){this._dataGroup&&this._dataGroup.removeAll();this._data=null}});function yI(t,e,r){var i=t.model;var a=t.getRect();var n=new _s({shape:{x:a.x,y:a.y,width:a.width,height:a.height}});var o=i.get("layout")==="horizontal"?"width":"height";n.setShape(o,0);ml(n,{shape:{width:a.width,height:a.height}},e,r);return n}function xI(t,e,r,i){var a=[];for(var n=0;n<r.length;n++){var o=r[n];var s=t.get(t.mapDimension(o),e);if(!bI(s,i.getAxis(o).type)){a.push(i.dataToPoint(s,o))}}return a}function _I(t,e,r,i,a){var n=xI(t,r,i,a);var o=new xs({shape:{points:n},silent:true,z2:10});e.add(o);t.setItemGraphicEl(r,o)}function wI(a,n){var o=a.hostModel.getModel("lineStyle");var s=o.getLineStyle();a.eachItemGraphicEl(function(t,e){if(a.hasItemOption){var r=a.getItemModel(e);var i=r.getModel("lineStyle",o);s=i.getLineStyle(["color","stroke"])}t.useStyle(N(s,{fill:null,stroke:a.getItemVisual(e,"color"),opacity:a.getItemVisual(e,"opacity")}));t.shape.smooth=n})}function bI(t,e){return e==="category"?t==null:t==null||isNaN(t)}var SI=["lineStyle","normal","opacity"];var MI=function(f){f.eachSeriesByType("parallel",function(t){var e=t.getModel("itemStyle");var r=t.getModel("lineStyle");var i=f.get("color");var a=r.get("color")||e.get("color")||i[t.seriesIndex%i.length];var n=t.get("inactiveOpacity");var o=t.get("activeOpacity");var s=t.getModel("lineStyle").getLineStyle();var l=t.coordinateSystem;var u=t.getData();var h={normal:s.opacity,active:o,inactive:n};l.eachActiveState(u,function(t,e){var r=u.getItemModel(e);var i=h[t];if(t==="normal"){var a=r.get(SI,true);a!=null&&(i=a)}u.setItemVisual(e,"opacity",i)});u.setVisual("color",a)})};Kv(MI);var II=Tf.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links;var r=t.data||t.nodes;if(r&&e){var i=Db(r,e,this,true);return i.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,r){if(r==="edge"){var i=this.getDataParams(t,r);var a=i.data;var n=a.source+" -- "+a.target;if(i.value){n+=" : "+i.value}return uu(n)}return II.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{show:true,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:true},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}});var DI=zs({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var r=e.extent/2;t.moveTo(e.x1,e.y1-r);t.bezierCurveTo(e.cpx1,e.cpy1-r,e.cpx2,e.cpy2-r,e.x2,e.y2-r);t.lineTo(e.x2,e.y2+r);t.bezierCurveTo(e.cpx2,e.cpy2+r,e.cpx1,e.cpy1+r,e.x1,e.y1+r);t.closePath()}});id({type:"sankey",_model:null,render:function(p,t,e){var r=p.getGraph();var g=this.group;var i=p.layoutInfo;var s=p.getData();var m=p.getData("edge");this._model=p;g.removeAll();g.attr("position",[i.x,i.y]);r.eachEdge(function(t){var e=new DI;e.dataIndex=t.dataIndex;e.seriesIndex=p.seriesIndex;e.dataType="edge";var r=t.getModel("lineStyle");var i=r.get("curveness");var a=t.node1.getLayout();var n=t.node2.getLayout();var o=t.getLayout();e.shape.extent=Math.max(1,o.dy);var s=a.x+a.dx;var l=a.y+o.sy+o.dy/2;var u=n.x;var h=n.y+o.ty+o.dy/2;var f=s*(1-i)+u*i;var c=l;var v=s*i+u*(1-i);var d=h;e.setShape({x1:s,y1:l,x2:u,y2:h,cpx1:f,cpy1:c,cpx2:v,cpy2:d});e.setStyle(r.getItemStyle());switch(e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color");break}al(e,t.getModel("emphasis.lineStyle").getItemStyle());g.add(e);m.setItemGraphicEl(t.dataIndex,e)});r.eachNode(function(t){var e=t.getLayout();var r=t.getModel();var i=r.getModel("label");var a=r.getModel("emphasis.label");var n=new _s({shape:{x:e.x,y:e.y,width:t.getLayout().dx,height:t.getLayout().dy},style:r.getModel("itemStyle").getItemStyle()});var o=t.getModel("emphasis.itemStyle").getItemStyle();nl(n.style,o,i,a,{labelFetcher:p,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:true});n.setStyle("fill",t.getVisual("color"));al(n,o);g.add(n);s.setItemGraphicEl(t.dataIndex,n);n.dataType="node"});if(!this._data&&p.get("animation")){g.setClipPath(TI(g.getBoundingRect(),p,function(){g.removeClipPath()}))}this._data=p.getData()},dispose:function(){}});function TI(t,e,r){var i=new _s({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});ml(i,{shape:{width:t.width+20,height:t.height+20}},e,r);return i}function AI(){var u=[];var e=[];function h(t,r){if(r>=u.length){return t}var e=-1;var i=t.length;var a=u[r++];var n={};var o={};while(++e<i){var s=a(t[e]);var l=o[s];if(l){l.push(t[e])}else{o[s]=[t[e]]}}L(o,function(t,e){n[e]=h(t,r)});return n}function n(t,r){if(r>=u.length){return t}var i=[];var a=e[r++];L(t,function(t,e){i.push({key:e,values:n(t,r)})});if(a){return i.sort(function(t,e){return a(t.key,e.key)})}else{return i}}return{key:function(t){u.push(t);return this},sortKeys:function(t){e[u.length-1]=t;return this},entries:function(t){return n(h(t,0),0)}}}var CI=function(t,f,e){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth");var r=t.get("nodeGap");var i=LI(t,f);t.layoutInfo=i;var a=i.width;var n=i.height;var o=t.getGraph();var s=o.nodes;var l=o.edges;PI(s);var u=k(s,function(t){return t.getLayout().value===0});var h=u.length!==0?0:t.get("layoutIterations");kI(s,l,e,r,a,n,h)})};function LI(t,e){return Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function kI(t,e,r,i,a,n,o){NI(t,r,a);zI(t,e,n,i,o);HI(t)}function PI(t){L(t,function(t){var e=jI(t.outEdges,$I);var r=jI(t.inEdges,$I);var i=Math.max(e,r);t.setLayout({value:i},true)})}function NI(t,e,r){var i=t;var a=null;var n=0;var o=0;while(i.length){a=[];for(var s=0,l=i.length;s<l;s++){var u=i[s];u.setLayout({x:n},true);u.setLayout({dx:e},true);for(var h=0,f=u.outEdges.length;h<f;h++){a.push(u.outEdges[h].node2)}}i=a;++n}EI(t,n);o=(r-e)/(n-1);OI(t,o)}function EI(t,e){L(t,function(t){if(!t.outEdges.length){t.setLayout({x:e-1},true)}})}function OI(t,r){L(t,function(t){var e=t.getLayout().x*r;t.setLayout({x:e},true)})}function zI(t,e,r,i,a){var n=AI().key(function(t){return t.getLayout().x}).sortKeys(qI).entries(t).map(function(t){return t.values});RI(t,n,e,r,i);BI(n,i,r);for(var o=1;a>0;a--){o*=.99;VI(n,o);BI(n,i,r);FI(n,o);BI(n,i,r)}}function RI(t,e,r,a,n){var o=[];L(e,function(t){var e=t.length;var r=0;L(t,function(t){r+=t.getLayout().value});var i=(a-(e-1)*n)/r;o.push(i)});o.sort(function(t,e){return t-e});var i=o[0];L(e,function(t){L(t,function(t,e){t.setLayout({y:e},true);var r=t.getLayout().value*i;t.setLayout({dy:r},true)})});L(r,function(t){var e=+t.getValue()*i;t.setLayout({dy:e},true)})}function BI(t,s,l){L(t,function(t){var e;var r;var i=0;var a=t.length;var n;t.sort(YI);for(n=0;n<a;n++){e=t[n];r=i-e.getLayout().y;if(r>0){var o=e.getLayout().y+r;e.setLayout({y:o},true)}i=e.getLayout().y+e.getLayout().dy+s}r=i-s-l;if(r>0){var o=e.getLayout().y-r;e.setLayout({y:o},true);i=e.getLayout().y;for(n=a-2;n>=0;--n){e=t[n];r=e.getLayout().y+e.getLayout().dy+s-i;if(r>0){o=e.getLayout().y-r;e.setLayout({y:o},true)}i=e.getLayout().y}}})}function VI(t,i){L(t.slice().reverse(),function(t){L(t,function(t){if(t.outEdges.length){var e=jI(t.outEdges,GI)/jI(t.outEdges,$I);var r=t.getLayout().y+(e-XI(t))*i;t.setLayout({y:r},true)}})})}function GI(t){return XI(t.node2)*t.getValue()}function FI(t,i){L(t,function(t){L(t,function(t){if(t.inEdges.length){var e=jI(t.inEdges,WI)/jI(t.inEdges,$I);var r=t.getLayout().y+(e-XI(t))*i;t.setLayout({y:r},true)}})})}function WI(t){return XI(t.node1)*t.getValue()}function HI(t){L(t,function(t){t.outEdges.sort(ZI);t.inEdges.sort(UI)});L(t,function(t){var e=0;var r=0;L(t.outEdges,function(t){t.setLayout({sy:e},true);e+=t.getLayout().dy});L(t.inEdges,function(t){t.setLayout({ty:r},true);r+=t.getLayout().dy})})}function ZI(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function UI(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function jI(t,e){var r=0;var i=t.length;var a=-1;while(++a<i){var n=+e.call(t,t[a],a);if(!isNaN(n)){r+=n}}return r}function XI(t){return t.getLayout().y+t.getLayout().dy/2}function YI(t,e){return t.getLayout().y-e.getLayout().y}function qI(t,e){return t<e?-1:t>e?1:t===e?0:NaN}function $I(t){return t.getValue()}var KI=function(t,e){t.eachSeriesByType("sankey",function(n){var t=n.getGraph();var e=t.nodes;e.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var o=e[0].getLayout().value;var s=e[e.length-1].getLayout().value;L(e,function(t){var e=new Aw({type:"color",mappingMethod:"linear",dataExtent:[o,s],visual:n.get("color")});var r=e.mapValueToVisual(t.getLayout().value);t.setVisual("color",r);var i=t.getModel();var a=i.get("itemStyle.color");if(a!=null){t.setVisual("color",a)}})})};$v(CI);Kv(KI);var JI=Wo.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var r in e){if(e.hasOwnProperty(r)&&r.indexOf("ends")===0){var i=e[r];t.moveTo(i[0][0],i[0][1]);t.lineTo(i[1][0],i[1][1])}}}});function QI(t,e,r,i){cr.call(this);this.bodyIndex;this.whiskerIndex;this.styleUpdater=r;this._createContent(t,e,i);this.updateData(t,e,i);this._seriesModel}var tD=QI.prototype;tD._createContent=function(t,e,r){var i=t.getItemLayout(e);var a=i.chartLayout==="horizontal"?1:0;var n=0;this.add(new ys({shape:{points:r?eD(i.bodyEnds,a,i):i.bodyEnds},style:{strokeNoScale:true},z2:100}));this.bodyIndex=n++;var o=T(i.whiskerEnds,function(t){return r?eD(t,a,i):t});this.add(new JI({shape:rD(o),style:{strokeNoScale:true},z2:100}));this.whiskerIndex=n++};function eD(t,e,r){return T(t,function(t){t=t.slice();t[e]=r.initBaseline;return t})}function rD(t){var r={};L(t,function(t,e){r["ends"+e]=t});return r}tD.updateData=function(t,e,r){var i=this._seriesModel=t.hostModel;var a=t.getItemLayout(e);var n=Il[r?"initProps":"updateProps"];n(this.childAt(this.bodyIndex),{shape:{points:a.bodyEnds}},i,e);n(this.childAt(this.whiskerIndex),{shape:rD(a.whiskerEnds)},i,e);this.styleUpdater.call(null,this,t,e)};M(QI,cr);function iD(t){this.group=new cr;this.styleUpdater=t}var aD=iD.prototype;aD.updateData=function(i){var a=this.group;var n=this._data;var o=this.styleUpdater;if(!this._data){a.removeAll()}i.diff(n).add(function(t){if(i.hasValue(t)){var e=new QI(i,t,o,true);i.setItemGraphicEl(t,e);a.add(e)}}).update(function(t,e){var r=n.getItemGraphicEl(e);if(!i.hasValue(t)){a.remove(r);return}if(!r){r=new QI(i,t,o)}else{r.updateData(i,t)}a.add(r);i.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&a.remove(e)}).execute();this._data=i};aD.incrementalPrepareUpdate=function(t,e,r){this.group.removeAll();this._data=null};aD.incrementalUpdate=function(t,e,r,i){var a=e.getData();for(var n=t.start;n<t.end;n++){var o=new QI(a,n,this.styleUpdater,true);o.incremental=true;this.group.add(o)}};aD.remove=function(){var e=this.group;var t=this._data;this._data=null;t&&t.eachItemGraphicEl(function(t){t&&e.remove(t)})};var nD={_baseAxisDim:null,getInitialData:function(t,e){var r;var i=e.getComponent("xAxis",this.get("xAxisIndex"));var a=e.getComponent("yAxis",this.get("yAxisIndex"));var n=i.get("type");var o=a.get("type");var s;if(n==="category"){t.layout="horizontal";r=i.getOrdinalMeta();s=true}else if(o==="category"){t.layout="vertical";r=a.getOrdinalMeta();s=true}else{t.layout=t.layout||"horizontal"}var l=["x","y"];var u=t.layout==="horizontal"?0:1;var h=this._baseAxisDim=l[u];var f=l[1-u];var c=[i,a];var v=c[u].get("type");var d=c[1-u].get("type");var p=t.data;if(p&&s){var g=[];L(p,function(t,e){var r;if(t.value&&B(t.value)){r=t.value.slice();t.value.unshift(e)}else if(B(t)){r=t.slice();t.unshift(e)}else{r=t}g.push(r)});t.data=g}var m=this.defaultValueDimensions;return Oy(this,{coordDimensions:[{name:h,type:vd(v),ordinalMeta:r,otherDims:{tooltip:false,itemName:0},dimsDef:["base"]},{name:f,type:vd(d),dimsDef:m.slice()}],dimensionsCount:m.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};var oD={init:function(){var t=this._whiskerBoxDraw=new iD(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,r){this._whiskerBoxDraw.updateData(t.getData())},incrementalPrepareRender:function(t,e,r){this._whiskerBoxDraw.incrementalPrepareUpdate(t,e,r)},incrementalRender:function(t,e,r,i){this._whiskerBoxDraw.incrementalUpdate(t,e,r,i)},remove:function(t){this._whiskerBoxDraw.remove()}};var sD=Tf.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:true,hoverAnimation:true,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});I(sD,nD,true);var lD=Ff.extend({type:"boxplot",getStyleUpdater:function(){return fD},dispose:nt});I(lD,oD,true);var uD=["itemStyle"];var hD=["emphasis","itemStyle"];function fD(t,e,r){var i=e.getItemModel(r);var a=i.getModel(uD);var n=e.getItemVisual(r,"color");var o=a.getItemStyle(["borderColor"]);var s=t.childAt(t.whiskerIndex);s.style.set(o);s.style.stroke=n;s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(o);l.style.stroke=n;l.dirty();var u=i.getModel(hD).getItemStyle();al(t,u)}var cD=["itemStyle","borderColor"];var vD=function(i,t){var a=i.get("color");i.eachRawSeriesByType("boxplot",function(t){var e=a[t.seriesIndex%a.length];var r=t.getData();r.setVisual({legendSymbol:"roundRect",color:t.get(cD)||e});if(!i.isSeriesFiltered(t)){r.each(function(t){var e=r.getItemModel(t);r.setItemVisual(t,{color:e.get(cD,true)})})}})};var dD=L;var pD=function(t){var e=gD(t);dD(e,function(r){var t=r.seriesModels;if(!t.length){return}mD(r);dD(t,function(t,e){yD(t,r.boxOffsetList[e],r.boxWidthList[e])})})};function gD(t){var i=[];var a=[];t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis();var r=S(a,e);if(r<0){r=a.length;a[r]=e;i[r]={axis:e,seriesModels:[]}}i[r].seriesModels.push(t)});return i}function mD(t){var e;var r=t.axis;var i=t.seriesModels;var a=i.length;var n=t.boxWidthList=[];var o=t.boxOffsetList=[];var s=[];var l;if(r.type==="category"){l=r.getBandWidth()}else{var u=0;dD(i,function(t){u=Math.max(u,t.getData().count())});e=r.getExtent(),Math.abs(e[1]-e[0])/u}dD(i,function(t){var e=t.get("boxWidth");if(!B(e)){e=[e,e]}s.push([Wl(e[0],l)||0,Wl(e[1],l)||0])});var h=l*.8-2;var f=h/a*.3;var c=(h-f*(a-1))/a;var v=c/2-h/2;dD(i,function(t,e){o.push(v);v+=f+c;n.push(Math.min(Math.max(c,s[e][0]),s[e][1]))})}function yD(t,f,e){var c=t.coordinateSystem;var v=t.getData();var d=e/2;var p=t.get("layout");var g=p==="horizontal"?0:1;var m=1-g;var i=["x","y"];var y=[];var a;L(v.dimensions,function(t){var e=v.getDimensionInfo(t);var r=e.coordDim;if(r===i[m]){y.push(t)}else if(r===i[g]){a=t}});if(a==null||y.length<5){return}v.each([a].concat(y),function(){var t=arguments;var i=t[0];var e=t[y.length+1];var r=l(t[3]);var a=l(t[1]);var n=l(t[5]);var o=[[a,l(t[2])],[n,l(t[4])]];h(a);h(n);h(r);var s=[];u(o[0][1],0);u(o[1][1],1);v.setItemLayout(e,{chartLayout:p,initBaseline:r[m],median:r,bodyEnds:s,whiskerEnds:o});function l(t){var e=[];e[g]=i;e[m]=t;var r;if(isNaN(i)||isNaN(t)){r=[NaN,NaN]}else{r=c.dataToPoint(e);r[g]+=f}return r}function u(t,e){var r=t.slice();var i=t.slice();r[g]+=d;i[g]-=d;e?s.push(r,i):s.push(i,r)}function h(t){var e=[t.slice(),t.slice()];e[0][g]-=d;e[1][g]+=d;o.push(e)}})}Kv(vD);$v(pD);var xD=Tf.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:true,hoverAnimation:true,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:false,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,r){var i=e.getItemLayout(t);return r.rect(i.brushRect)}});I(xD,nD,true);var _D=Ff.extend({type:"candlestick",getStyleUpdater:function(){return SD},dispose:nt});I(_D,oD,true);var wD=["itemStyle"];var bD=["emphasis","itemStyle"];function SD(t,e,r){var i=e.getItemModel(r);var a=i.getModel(wD);var n=e.getItemVisual(r,"color");var o=e.getItemVisual(r,"borderColor")||n;var s=a.getItemStyle(["color","color0","borderColor","borderColor0"]);var l=t.childAt(t.whiskerIndex);l.useStyle(s);l.style.stroke=o;var u=t.childAt(t.bodyIndex);u.useStyle(s);u.style.fill=n;u.style.stroke=o;var h=i.getModel(bD).getItemStyle();al(t,h)}var MD=function(t){if(!t||!B(t.series)){return}L(t.series,function(t){if(F(t)&&t.type==="k"){t.type="candlestick"}})};var ID=["itemStyle","borderColor"];var DD=["itemStyle","borderColor0"];var TD=["itemStyle","color"];var AD=["itemStyle","color0"];var CD=function(e,t){e.eachRawSeriesByType("candlestick",function(t){var i=t.getData();i.setVisual({legendSymbol:"roundRect"});if(!e.isSeriesFiltered(t)){i.each(function(t){var e=i.getItemModel(t);var r=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(r>0?TD:AD),borderColor:e.get(r>0?ID:DD)})})}})};var LD=X;var kD=function(t){t.eachSeriesByType("candlestick",function(t){var _=t.coordinateSystem;var w=t.getData();var b=PD(t,w);var S=t.get("layout");var M=S==="horizontal"?0:1;var I=1-M;var i=["x","y"];var D=[];var a;L(w.dimensions,function(t){var e=w.getDimensionInfo(t);var r=e.coordDim;if(r===i[I]){D.push(t)}else if(r===i[M]){a=t}});if(a==null||D.length<4){return}var T=0;w.each([a].concat(D),function(){var t=arguments;var r=t[0];var e=t[D.length+1];var i=t[1];var a=t[2];var n=t[3];var o=t[4];var s=Math.min(i,a);var l=Math.max(i,a);var u=g(s);var h=g(l);var f=g(n);var c=g(o);var v=[[x(c),x(h)],[x(f),x(u)]];var d=[];m(h,0);m(u,1);var p;if(i>a){p=-1}else if(i<a){p=1}else{if(T>0){p=w.getItemModel(T-1).get()[2]<=a?1:-1}else{p=1}}w.setItemLayout(e,{chartLayout:S,sign:p,initBaseline:i>a?h[I]:u[I],bodyEnds:d,whiskerEnds:v,brushRect:y()});++T;function g(t){var e=[];e[M]=r;e[I]=t;return isNaN(r)||isNaN(t)?[NaN,NaN]:_.dataToPoint(e)}function m(t,e){var r=t.slice();var i=t.slice();r[M]=Us(r[M]+b/2,1,false);i[M]=Us(i[M]-b/2,1,true);e?d.push(r,i):d.push(i,r)}function y(){var t=g(Math.min(i,a,n,o));var e=g(Math.max(i,a,n,o));t[M]-=b/2;e[M]-=b/2;return{x:t[0],y:t[1],width:I?b:e[0]-t[0],height:I?e[1]-t[1]:b}}function x(t){t[M]=Us(t[M],1);return t}})})};function PD(t,e){var r=t.getBaseAxis();var i;var a=r.type==="category"?r.getBandWidth():(i=r.getExtent(),Math.abs(i[1]-i[0])/e.count());var n=Wl(LD(t.get("barMaxWidth"),a),a);var o=Wl(LD(t.get("barMinWidth"),1),a);var s=t.get("barWidth");return s!=null?Wl(s,a):Math.max(Math.min(a/2,n),o)}Zv(MD);Kv(CD);$v(kD);Tf.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return Zd(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:true,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var ND=3;function ED(t){if(!B(t)){t=[+t,+t]}return t}function OD(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?e.color:null,fill:e.brushType==="fill"?e.color:null}})})}function zD(t,e){cr.call(this);var r=new bg(t,e);var i=new cr;this.add(r);this.add(i);i.beforeUpdate=function(){this.attr(r.getScale())};this.updateData(t,e)}var RD=zD.prototype;RD.stopEffectAnimation=function(){this.childAt(1).removeAll()};RD.startEffectAnimation=function(t){var e=t.symbolType;var r=t.color;var i=this.childAt(1);for(var a=0;a<ND;a++){var n=Qp(e,-1,-1,2,2,r);n.attr({style:{strokeNoScale:true},z2:99,silent:true,scale:[.5,.5]});var o=-a/ND*t.period+t.effectOffset;n.animate("",true).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start();n.animateStyle(true).when(t.period,{opacity:0}).delay(o).start();i.add(n)}OD(i,t)};RD.updateEffectAnimation=function(t){var e=this._effectCfg;var r=this.childAt(1);var i=["symbolType","period","rippleScale"];for(var a=0;a<i.length;a++){var n=i[a];if(e[n]!==t[n]){this.stopEffectAnimation();this.startEffectAnimation(t);return}}OD(r,t)};RD.highlight=function(){this.trigger("emphasis")};RD.downplay=function(){this.trigger("normal")};RD.updateData=function(t,e){var r=t.hostModel;this.childAt(0).updateData(t,e);var i=this.childAt(1);var a=t.getItemModel(e);var n=t.getItemVisual(e,"symbol");var o=ED(t.getItemVisual(e,"symbolSize"));var s=t.getItemVisual(e,"color");i.attr("scale",o);i.traverse(function(t){t.attr({fill:s})});var l=a.getShallow("symbolOffset");if(l){var u=i.position;u[0]=Wl(l[0],o[0]);u[1]=Wl(l[1],o[1])}i.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};h.showEffectOn=r.get("showEffectOn");h.rippleScale=a.get("rippleEffect.scale");h.brushType=a.get("rippleEffect.brushType");h.period=a.get("rippleEffect.period")*1e3;h.effectOffset=e/t.count();h.z=a.getShallow("z")||0;h.zlevel=a.getShallow("zlevel")||0;h.symbolType=n;h.color=s;this.off("mouseover").off("mouseout").off("emphasis").off("normal");if(h.showEffectOn==="render"){this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h);this._effectCfg=h}else{this._effectCfg=null;this.stopEffectAnimation();var f=this.childAt(0);var c=function(){f.highlight();if(h.showEffectOn!=="render"){this.startEffectAnimation(h)}};var v=function(){f.downplay();if(h.showEffectOn!=="render"){this.stopEffectAnimation()}};this.on("mouseover",c,this).on("mouseout",v,this).on("emphasis",c,this).on("normal",v,this)}this._effectCfg=h};RD.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal");t&&t()};M(zD,cr);id({type:"effectScatter",init:function(){this._symbolDraw=new Cg(zD)},render:function(t,e,r){var i=t.getData();var a=this._symbolDraw;a.updateData(i);this.group.add(a.group)},updateTransform:function(t,e,r){var i=t.getData();this.group.dirty();var a=hm().reset(t);if(a.progress){a.progress({start:0,end:i.count()},i)}this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(t){var e=t.coordinateSystem;if(e&&e.getRoamTransform){this.group.transform=Qt(e.getRoamTransform());this.group.decomposeTransform()}},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}});Kv(um("effectScatter","circle"));$v(hm("effectScatter"));var BD=typeof window==="undefined"?global:window;var VD=BD.Uint32Array||Array;var GD=BD.Float64Array||Array;function FD(t){var e=t.data;if(e&&e[0]&&e[0][0]&&e[0][0].coord){if(A){console.warn("Lines data configuration has been changed to"+" { coords:[[1,2],[2,3]] }")}t.data=T(e,function(t){var e=[t[0].coord,t[1].coord];var r={coords:e};if(t[0].name){r.fromName=t[0].name}if(t[1].name){r.toName=t[1].name}return x([r,t[0],t[1]])})}}var WD=Tf.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){FD(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords;this._flatCoordsOffset=e.flatCoordsOffset;if(e.flatCoords){t.data=new Float32Array(e.count)}WD.superApply(this,"init",arguments)},mergeOption:function(t){FD(t);if(t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords;this._flatCoordsOffset=e.flatCoordsOffset;if(e.flatCoords){t.data=new Float32Array(e.count)}}WD.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);if(e.flatCoords){if(!this._flatCoords){this._flatCoords=e.flatCoords;this._flatCoordsOffset=e.flatCoordsOffset}else{this._flatCoords=at(this._flatCoords,e.flatCoords);this._flatCoordsOffset=at(this._flatCoordsOffset,e.flatCoordsOffset)}t.data=new Float32Array(e.count)}this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);var r=e.option instanceof Array?e.option:e.getShallow("coords");if(A){if(!(r instanceof Array&&r.length>0&&r[0]instanceof Array)){throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.")}}return r},getLineCoordsCount:function(t){if(this._flatCoordsOffset){return this._flatCoordsOffset[t*2+1]}else{return this._getCoordsFromItemModel(t).length}},getLineCoords:function(t,e){if(this._flatCoordsOffset){var r=this._flatCoordsOffset[t*2];var i=this._flatCoordsOffset[t*2+1];for(var a=0;a<i;a++){e[a]=e[a]||[];e[a][0]=this._flatCoords[r+a*2];e[a][1]=this._flatCoords[r+a*2+1]}return i}else{var n=this._getCoordsFromItemModel(t);for(var a=0;a<n.length;a++){e[a]=e[a]||[];e[a][0]=n[a][0];e[a][1]=n[a][1]}return n.length}},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords){e=this._flatCoords.length}if(typeof t[0]==="number"){var r=t.length;var i=new VD(r);var a=new GD(r);var n=0;var o=0;var s=0;for(var l=0;l<r;){s++;var u=t[l++];i[o++]=n+e;i[o++]=u;for(var h=0;h<u;h++){var f=t[l++];var c=t[l++];a[n++]=f;a[n++]=c;if(l>r){if(A){throw new Error("Invalid data format.")}}}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){if(A){var r=Ah.get(t.coordinateSystem);if(!r){throw new Error("Unkown coordinate system "+t.coordinateSystem)}}var n=new Dd(["value"],this);n.hasItemOption=false;n.initData(t.data,[],function(t,e,r,i){if(t instanceof Array){return NaN}else{n.hasItemOption=true;var a=t.value;if(a!=null){return a instanceof Array?a[i]:a}}});return n},formatTooltip:function(t){var e=this.getData();var r=e.getItemModel(t);var i=r.get("name");if(i){return i}var a=r.get("fromName");var n=r.get("toName");var o=[];a!=null&&o.push(a);n!=null&&o.push(n);return uu(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;if(t==null){return this.option.large?1e4:this.get("progressive")}return t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;if(t==null){return this.option.large?2e4:this.get("progressiveThreshold")}return t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:true,hoverAnimation:true,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:false,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:true,trailLength:.2},large:false,largeThreshold:2e3,polyline:false,label:{show:false,position:"end"},lineStyle:{opacity:.5}}});function HD(t,e,r){cr.call(this);this.add(this.createLine(t,e,r));this._updateEffectSymbol(t,e)}var ZD=HD.prototype;ZD.createLine=function(t,e,r){return new Bb(t,e,r)};ZD._updateEffectSymbol=function(t,e){var r=t.getItemModel(e);var i=r.getModel("effect");var a=i.get("symbolSize");var n=i.get("symbol");if(!B(a)){a=[a,a]}var o=i.get("color")||t.getItemVisual(e,"color");var s=this.childAt(1);if(this._symbolType!==n){this.remove(s);s=Qp(n,-.5,-.5,1,1,o);s.z2=100;s.culling=true;this.add(s)}if(!s){return}s.setStyle("shadowColor",o);s.setStyle(i.getItemStyle(["color"]));s.attr("scale",a);s.setColor(o);s.attr("scale",a);this._symbolType=n;this._updateEffectAnimation(t,i,e)};ZD._updateEffectAnimation=function(e,t,r){var i=this.childAt(1);if(!i){return}var a=this;var n=e.getItemLayout(r);var o=t.get("period")*1e3;var s=t.get("loop");var l=t.get("constantSpeed");var u=j(t.get("delay"),function(t){return t/e.count()*o/3});var h=typeof u==="function";i.ignore=true;this.updateAnimationPoints(i,n);if(l>0){o=this.getLineLength(i)/l*1e3}if(o!==this._period||s!==this._loop){i.stopAnimation();var f=u;if(h){f=u(r)}if(i.__t>0){f=-o*i.__t}i.__t=0;var c=i.animate("",s).when(o,{__t:1}).delay(f).during(function(){a.updateSymbolPosition(i)});if(!s){c.done(function(){a.remove(i)})}c.start()}this._period=o;this._loop=s};ZD.getLineLength=function(t){return It(t.__p1,t.__cp1)+It(t.__cp1,t.__p2)};ZD.updateAnimationPoints=function(t,e){t.__p1=e[0];t.__p2=e[1];t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]};ZD.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r);this._updateEffectSymbol(t,e)};ZD.updateSymbolPosition=function(t){var e=t.__p1;var r=t.__p2;var i=t.__cp1;var a=t.__t;var n=t.position;var o=Rn;var s=Bn;n[0]=o(e[0],i[0],r[0],a);n[1]=o(e[1],i[1],r[1],a);var l=s(e[0],i[0],r[0],a);var u=s(e[1],i[1],r[1],a);t.rotation=-Math.atan2(u,l)-Math.PI/2;t.ignore=false};ZD.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var r=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,r,e)};M(HD,cr);function UD(t,e,r){cr.call(this);this._createPolyline(t,e,r)}var jD=UD.prototype;jD._createPolyline=function(t,e,r){var i=t.getItemLayout(e);var a=new xs({shape:{points:i}});this.add(a);this._updateCommonStl(t,e,r)};jD.updateData=function(t,e,r){var i=t.hostModel;var a=this.childAt(0);var n={shape:{points:t.getItemLayout(e)}};gl(a,n,i,e);this._updateCommonStl(t,e,r)};jD._updateCommonStl=function(t,e,r){var i=this.childAt(0);var a=t.getItemModel(e);var n=t.getItemVisual(e,"color");var o=r&&r.lineStyle;var s=r&&r.hoverLineStyle;if(!r||t.hasItemOption){o=a.getModel("lineStyle").getLineStyle();s=a.getModel("emphasis.lineStyle").getLineStyle()}i.useStyle(C({strokeNoScale:true,fill:"none",stroke:n},o));i.hoverStyle=s;al(this)};jD.updateLayout=function(t,e){var r=this.childAt(0);r.setShape("points",t.getItemLayout(e))};M(UD,cr);function XD(t,e,r){HD.call(this,t,e,r);this._lastFrame=0;this._lastFramePercent=0}var YD=XD.prototype;YD.createLine=function(t,e,r){return new UD(t,e,r)};YD.updateAnimationPoints=function(t,e){this._points=e;var r=[0];var i=0;for(var a=1;a<e.length;a++){var n=e[a-1];var o=e[a];i+=It(n,o);r.push(i)}if(i===0){return}for(var a=0;a<r.length;a++){r[a]/=i}this._offsets=r;this._length=i};YD.getLineLength=function(t){return this._length};YD.updateSymbolPosition=function(t){var e=t.__t;var r=this._points;var i=this._offsets;var a=r.length;if(!i){return}var n=this._lastFrame;var o;if(e<this._lastFramePercent){var s=Math.min(n+1,a-1);for(o=s;o>=0;o--){if(i[o]<=e){break}}o=Math.min(o,a-2)}else{for(var o=n;o<a;o++){if(i[o]>e){break}}o=Math.min(o-1,a-2)}Ct(t.position,r[o],r[o+1],(e-i[o])/(i[o+1]-i[o]));var l=r[o+1][0]-r[o][0];var u=r[o+1][1]-r[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2;this._lastFrame=o;this._lastFramePercent=e;t.ignore=false};M(XD,HD);var qD=zs({shape:{polyline:false,curveness:0,segs:[]},buildPath:function(t,e){var r=e.segs;var i=e.curveness;if(e.polyline){for(var a=0;a<r.length;){var n=r[a++];if(n>0){t.moveTo(r[a++],r[a++]);for(var o=1;o<n;o++){t.lineTo(r[a++],r[a++])}}}}else{for(var a=0;a<r.length;){var s=r[a++];var l=r[a++];var u=r[a++];var h=r[a++];t.moveTo(s,l);if(i>0){var f=(s+u)/2-(l-h)*i;var c=(l+h)/2-(u-s)*i;t.quadraticCurveTo(f,c,u,h)}else{t.lineTo(u,h)}}}},findDataIndex:function(t,e){var r=this.shape;var i=r.segs;var a=r.curveness;if(r.polyline){var n=0;for(var o=0;o<i.length;){var s=i[o++];if(s>0){var l=i[o++];var u=i[o++];for(var h=1;h<s;h++){var f=i[o++];var c=i[o++];if(yo(l,u,f,c)){return n}}}n++}}else{var n=0;for(var o=0;o<i.length;){var l=i[o++];var u=i[o++];var f=i[o++];var c=i[o++];if(a>0){var v=(l+f)/2-(u-c)*a;var d=(u+c)/2-(f-l)*a;if(_o(l,u,v,d,f,c)){return n}}else{if(yo(l,u,f,c)){return n}}n++}}return-1}});function $D(){this.group=new cr}var KD=$D.prototype;KD.isPersistent=function(){return!this._incremental};KD.updateData=function(t){this.group.removeAll();var e=new qD({rectHover:true,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")});this._setCommon(e,t);this.group.add(e);this._incremental=null};KD.incrementalPrepareUpdate=function(t){this.group.removeAll();this._clearIncremental();if(t.count()>5e5){if(!this._incremental){this._incremental=new Ls({silent:true})}this.group.add(this._incremental)}else{this._incremental=null}};KD.incrementalUpdate=function(t,e){var r=new qD;r.setShape({segs:e.getLayout("linesPoints")});this._setCommon(r,e,!!this._incremental);if(!this._incremental){r.rectHover=true;r.cursor="default";r.__startIndex=t.start;this.group.add(r)}else{this._incremental.addDisplayable(r,true)}};KD.remove=function(){this._clearIncremental();this._incremental=null;this.group.removeAll()};KD._setCommon=function(r,t,e){var i=t.hostModel;r.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")});r.useStyle(i.getModel("lineStyle").getLineStyle());r.style.strokeNoScale=true;var a=t.getVisual("color");if(a){r.setStyle("stroke",a)}r.setStyle("fill");if(!e){r.seriesIndex=i.seriesIndex;r.on("mousemove",function(t){r.dataIndex=null;var e=r.findDataIndex(t.offsetX,t.offsetY);if(e>0){r.dataIndex=e+r.__startIndex}})}};KD._clearIncremental=function(){var t=this._incremental;if(t){t.clearDisplaybles()}};var JD={seriesType:"lines",plan:Bf(),reset:function(p){var g=p.coordinateSystem;var m=p.get("polyline");var y=p.pipelineContext.large;function t(t,e){var r=[];if(y){var i;var a=t.end-t.start;if(m){var n=0;for(var o=t.start;o<t.end;o++){n+=p.getLineCoordsCount(o)}i=new Float32Array(a+n*2)}else{i=new Float32Array(a*2)}var s=0;var l=[];for(var o=t.start;o<t.end;o++){var u=p.getLineCoords(o,r);if(m){i[s++]=u}for(var h=0;h<u;h++){l=g.dataToPoint(r[h],false,l);i[s++]=l[0];i[s++]=l[1]}}e.setLayout("linesPoints",i)}else{for(var o=t.start;o<t.end;o++){var f=e.getItemModel(o);var u=p.getLineCoords(o,r);var c=[];if(m){for(var v=0;v<u;v++){c.push(g.dataToPoint(r[v]))}}else{c[0]=g.dataToPoint(r[0]);c[1]=g.dataToPoint(r[1]);var d=f.get("lineStyle.curveness");if(+d){c[2]=[(c[0][0]+c[1][0])/2-(c[0][1]-c[1][1])*d,(c[0][1]+c[1][1])/2-(c[1][0]-c[0][0])*d]}}e.setItemLayout(o,c)}}}return{progress:t}}};id({type:"lines",init:function(){},render:function(e,t,r){var i=e.getData();var a=this._updateLineDraw(i,e);var n=e.get("zlevel");var o=e.get("effect.trailLength");var s=r.getZr();var l=s.painter.getType()==="svg";if(!l){s.painter.getLayer(n).clear(true)}if(this._lastZlevel!=null&&!l){s.configLayer(this._lastZlevel,{motionBlur:false})}if(this._showEffect(e)&&o){if(A){var u=false;t.eachSeries(function(t){if(t!==e&&t.get("zlevel")===n){u=true}});u&&console.warn("Lines with trail effect should have an individual zlevel")}if(!l){s.configLayer(n,{motionBlur:true,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})}}a.updateData(i);this._lastZlevel=n;this._finished=true},incrementalPrepareRender:function(t,e,r){var i=t.getData();var a=this._updateLineDraw(i,t);a.incrementalPrepareUpdate(i);this._clearLayer(r);this._finished=false},incrementalRender:function(t,e,r){this._lineDraw.incrementalUpdate(t,e.getData());this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var i=t.getData();if(!this._finished||t.pipelineContext.large){return{update:true}}else{var a=JD.reset(t);if(a.progress){a.progress({start:0,end:i.count()},i)}this._lineDraw.updateLayout();this._clearLayer(r)}},_updateLineDraw:function(t,e){var r=this._lineDraw;var i=this._showEffect(e);var a=!!e.get("polyline");var n=e.pipelineContext;var o=n.large;if(A){if(i&&o){console.warn("Large lines not support effect")}}if(!r||i!==this._hasEffet||a!==this._isPolyline||o!==this._isLargeDraw){if(r){r.remove()}r=this._lineDraw=o?new $D:new Gb(a?i?XD:UD:i?HD:Bb);this._hasEffet=i;this._isPolyline=a;this._isLargeDraw=o;this.group.removeAll()}this.group.add(r.group);return r},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();var r=e.painter.getType()==="svg";if(!r&&this._lastZlevel!=null){e.painter.getLayer(this._lastZlevel).clear(true)}},remove:function(t,e){this._lineDraw&&this._lineDraw.remove();this._lineDraw=null;this._clearLayer(e)},dispose:function(){}});function QD(t){if(!(t instanceof Array)){t=[t,t]}return t}var tT="lineStyle.opacity".split(".");var eT={seriesType:"lines",reset:function(t,e,r){var i=QD(t.get("symbol"));var a=QD(t.get("symbolSize"));var n=t.getData();n.setVisual("fromSymbol",i&&i[0]);n.setVisual("toSymbol",i&&i[1]);n.setVisual("fromSymbolSize",a&&a[0]);n.setVisual("toSymbolSize",a&&a[1]);n.setVisual("opacity",t.get(tT));function o(t,e){var r=t.getItemModel(e);var i=QD(r.getShallow("symbol",true));var a=QD(r.getShallow("symbolSize",true));var n=r.get(tT);i[0]&&t.setItemVisual(e,"fromSymbol",i[0]);i[1]&&t.setItemVisual(e,"toSymbol",i[1]);a[0]&&t.setItemVisual(e,"fromSymbolSize",a[0]);a[1]&&t.setItemVisual(e,"toSymbolSize",a[1]);t.setItemVisual(e,"opacity",n)}return{dataEach:n.hasItemOption?o:null}}};$v(JD);Kv(eT);Tf.extend({type:"series.heatmap",getInitialData:function(t,e){return Zd(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Ah.get(this.get("coordinateSystem"));if(t&&t.dimensions){return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"}},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var rT=256;function iT(){var t=_();this.canvas=t;this.blurSize=30;this.pointSize=20;this.maxOpacity=1;this.minOpacity=0;this._gradientPixels={}}iT.prototype={update:function(t,e,r,i,a,n){var o=this._getBrush();var s=this._getGradient(t,a,"inRange");var l=this._getGradient(t,a,"outOfRange");var u=this.pointSize+this.blurSize;var h=this.canvas;var f=h.getContext("2d");var c=t.length;h.width=e;h.height=r;for(var v=0;v<c;++v){var d=t[v];var p=d[0];var g=d[1];var m=d[2];var y=i(m);f.globalAlpha=y;f.drawImage(o,p-u,g-u)}if(!h.width||!h.height){return h}var x=f.getImageData(0,0,h.width,h.height);var _=x.data;var w=0;var b=_.length;var S=this.minOpacity;var M=this.maxOpacity;var I=M-S;while(w<b){var y=_[w+3]/256;var D=Math.floor(y*(rT-1))*4;if(y>0){var T=n(y)?s:l;y>0&&(y=y*I+S);_[w++]=T[D];_[w++]=T[D+1];_[w++]=T[D+2];_[w++]=T[D+3]*y*256}else{w+=4}}f.putImageData(x,0,0);return h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=_());var e=this.pointSize+this.blurSize;var r=e*2;t.width=r;t.height=r;var i=t.getContext("2d");i.clearRect(0,0,r,r);i.shadowOffsetX=r;i.shadowBlur=this.blurSize;i.shadowColor="#000";i.beginPath();i.arc(-e,e,this.pointSize,0,Math.PI*2,true);i.closePath();i.fill();return t},_getGradient:function(t,e,r){var i=this._gradientPixels;var a=i[r]||(i[r]=new Uint8ClampedArray(256*4));var n=[0,0,0,0];var o=0;for(var s=0;s<256;s++){e[r](s/255,true,n);a[o++]=n[0];a[o++]=n[1];a[o++]=n[2];a[o++]=n[3]}return a}};function aT(e,i,a){var r=e[1]-e[0];i=T(i,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var n=i.length;var o=0;return function(t){for(var e=o;e<n;e++){var r=i[e].interval;if(r[0]<=t&&t<=r[1]){o=e;break}}if(e===n){for(var e=o-1;e>=0;e--){var r=i[e].interval;if(r[0]<=t&&t<=r[1]){o=e;break}}}return e>=0&&e<n&&a[e]}}function nT(t,e){var r=t[1]-t[0];e=[(e[0]-t[0])/r,(e[1]-t[0])/r];return function(t){return t>=e[0]&&t<=e[1]}}function oT(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}id({type:"heatmap",render:function(r,t,e){var i;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){if(t===r){i=e}})});if(A){if(!i){throw new Error("Heatmap must use with visualMap")}}this.group.removeAll();this._incrementalDisplayable=null;var a=r.coordinateSystem;if(a.type==="cartesian2d"||a.type==="calendar"){this._renderOnCartesianAndCalendar(r,e,0,r.getData().count())}else if(oT(a)){this._renderOnGeo(a,r,i,e)}},incrementalPrepareRender:function(t,e,r){this.group.removeAll()},incrementalRender:function(t,e,r,i){var a=e.coordinateSystem;if(a){this._renderOnCartesianAndCalendar(e,i,t.start,t.end,true)}},_renderOnCartesianAndCalendar:function(t,e,r,i,a){var n=t.coordinateSystem;var o;var s;if(n.type==="cartesian2d"){var l=n.getAxis("x");var u=n.getAxis("y");if(A){if(!(l.type==="category"&&u.type==="category")){throw new Error("Heatmap on cartesian must have two category axes")}if(!(l.onBand&&u.onBand)){throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}}o=l.getBandWidth();s=u.getBandWidth()}var h=this.group;var f=t.getData();var c="itemStyle";var v="emphasis.itemStyle";var d="label";var p="emphasis.label";var g=t.getModel(c).getItemStyle(["color"]);var m=t.getModel(v).getItemStyle();var y=t.getModel(d);var x=t.getModel(p);var _=n.type;var w=_==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")];for(var b=r;b<i;b++){var S;if(_==="cartesian2d"){if(isNaN(f.get(w[2],b))){continue}var M=n.dataToPoint([f.get(w[0],b),f.get(w[1],b)]);S=new _s({shape:{x:M[0]-o/2,y:M[1]-s/2,width:o,height:s},style:{fill:f.getItemVisual(b,"color"),opacity:f.getItemVisual(b,"opacity")}})}else{if(isNaN(f.get(w[1],b))){continue}S=new _s({z2:1,shape:n.dataToRect([f.get(w[0],b)]).contentShape,style:{fill:f.getItemVisual(b,"color"),opacity:f.getItemVisual(b,"opacity")}})}var I=f.getItemModel(b);if(f.hasItemOption){g=I.getModel(c).getItemStyle(["color"]);m=I.getModel(v).getItemStyle();y=I.getModel(d);x=I.getModel(p)}var D=t.getRawValue(b);var T="-";if(D&&D[2]!=null){T=D[2]}nl(g,m,y,x,{labelFetcher:t,labelDataIndex:b,defaultText:T,isRectText:true});S.setStyle(g);al(S,f.hasItemOption?m:N({},m));S.incremental=a;if(a){S.useHoverLayer=true}h.add(S);f.setItemGraphicEl(b,S)}},_renderOnGeo:function(a,t,e,r){var i=e.targetVisuals.inRange;var n=e.targetVisuals.outOfRange;var o=t.getData();var s=this._hmLayer||(this._hmLayer||new iT);s.blurSize=t.get("blurSize");s.pointSize=t.get("pointSize");s.minOpacity=t.get("minOpacity");s.maxOpacity=t.get("maxOpacity");var l=a.getViewRect().clone();var u=a.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0);var f=Math.max(l.y,0);var c=Math.min(l.width+l.x,r.getWidth());var v=Math.min(l.height+l.y,r.getHeight());var d=c-h;var p=v-f;var g=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")];var m=o.mapArray(g,function(t,e,r){var i=a.dataToPoint([t,e]);i[0]-=h;i[1]-=f;i.push(r);return i});var y=e.getExtent();var x=e.type==="visualMap.continuous"?nT(y,e.option.range):aT(y,e.getPieceList(),e.option.selected);s.update(m,d,p,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:n.color.getColorMapper()},x);var _=new Bi({style:{width:d,height:p,x:h,y:f,image:s.canvas},silent:true});this.group.add(_)},dispose:function(){}});var sT=Sy.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:false,symbolRepeatDirection:"end",symbolClip:false,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:false},getInitialData:function(t){t.stack=null;return sT.superApply(this,"getInitialData",arguments)}});var lT=["itemStyle","borderWidth"];var uT=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}];var hT=new us;var fT=id({type:"pictorialBar",render:function(t,e,r){var o=this.group;var s=t.getData();var l=this._data;var i=t.coordinateSystem;var a=i.getBaseAxis();var n=!!a.isHorizontal();var u=i.grid.getRect();var h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:n,valueDim:uT[+n],categoryDim:uT[1-n]};s.diff(l).add(function(t){if(!s.hasValue(t)){return}var e=ST(s,t);var r=cT(s,t,e,h);var i=TT(s,h,r);s.setItemGraphicEl(t,i);o.add(i);NT(i,h,r)}).update(function(t,e){var r=l.getItemGraphicEl(e);if(!s.hasValue(t)){o.remove(r);return}var i=ST(s,t);var a=cT(s,t,i,h);var n=LT(s,a);if(r&&n!==r.__pictorialShapeStr){o.remove(r);s.setItemGraphicEl(t,null);r=null}if(r){AT(r,h,a)}else{r=TT(s,h,a,true)}s.setItemGraphicEl(t,r);r.__pictorialSymbolMeta=a;o.add(r);NT(r,h,a)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&CT(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute();this._data=s;return this.group},dispose:nt,remove:function(e,t){var r=this.group;var i=this._data;if(e.get("animation")){if(i){i.eachItemGraphicEl(function(t){CT(i,t.dataIndex,e,t)})}}else{r.removeAll()}}});function cT(t,e,r,i){var a=t.getItemLayout(e);var n=r.get("symbolRepeat");var o=r.get("symbolClip");var s=r.get("symbolPosition")||"start";var l=r.get("symbolRotate");var u=(l||0)*Math.PI/180||0;var h=r.get("symbolPatternSize")||2;var f=r.isAnimationEnabled();var c={dataIndex:e,layout:a,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:o,symbolRepeat:n,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:f?r:null,hoverAnimation:f&&r.get("hoverAnimation"),z2:r.getShallow("z",true)||0};vT(r,n,a,i,c);pT(t,e,a,n,o,c.boundingLength,c.pxSign,h,i,c);gT(r,c.symbolScale,u,i,c);var v=c.symbolSize;var d=r.get("symbolOffset");if(B(d)){d=[Wl(d[0],v[0]),Wl(d[1],v[1])]}mT(r,v,a,n,o,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c);return c}function vT(t,e,r,i,a){var n=i.valueDim;var o=t.get("symbolBoundingData");var s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis());var l=s.toGlobalCoord(s.dataToCoord(0));var u=1-+(r[n.wh]<=0);var h;if(B(o)){var f=[dT(s,o[0])-l,dT(s,o[1])-l];f[1]<f[0]&&f.reverse();h=f[u]}else if(o!=null){h=dT(s,o)-l}else if(e){h=i.coordSysExtent[n.index][u]-l}else{h=r[n.wh]}a.boundingLength=h;if(e){a.repeatCutLength=r[n.wh]}a.pxSign=h>0?1:h<0?-1:0}function dT(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function pT(t,e,r,i,a,n,o,s,l,u){var h=l.valueDim;var f=l.categoryDim;var c=Math.abs(r[f.wh]);var v=t.getItemVisual(e,"symbolSize");if(B(v)){v=v.slice()}else{if(v==null){v="100%"}v=[v,v]}v[f.index]=Wl(v[f.index],c);v[h.index]=Wl(v[h.index],i?c:Math.abs(n));u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function gT(t,e,r,i,a){var n=t.get(lT)||0;if(n){hT.attr({scale:e.slice(),rotation:r});hT.updateTransform();n/=hT.getLineScale();n*=e[i.valueDim.index]}a.valueLineWidth=n}function mT(t,e,r,i,a,n,o,s,l,u,h,f){var c=h.categoryDim;var v=h.valueDim;var d=f.pxSign;var p=Math.max(e[v.index]+s,0);var g=p;if(i){var m=Math.abs(l);var y=j(t.get("symbolMargin"),"15%")+"";var x=false;if(y.lastIndexOf("!")===y.length-1){x=true;y=y.slice(0,y.length-1)}y=Wl(y,e[v.index]);var _=Math.max(p+y*2,0);var w=x?0:y*2;var b=au(i);var S=b?i:ET((m+w)/_);var M=m-S*p;y=M/2/(x?S:S-1);_=p+y*2;w=x?0:y*2;if(!b&&i!=="fixed"){S=u?ET((Math.abs(u)+w)/_):0}g=S*_-w;f.repeatTimes=S;f.symbolMargin=y}var I=d*(g/2);var D=f.pathPosition=[];D[c.index]=r[c.wh]/2;D[v.index]=o==="start"?I:o==="end"?l-I:l/2;if(n){D[0]+=n[0];D[1]+=n[1]}var T=f.bundlePosition=[];T[c.index]=r[c.xy];T[v.index]=r[v.xy];var A=f.barRectShape=N({},r);A[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(D[v.index]+I));A[c.wh]=r[c.wh];var C=f.clipShape={};C[c.xy]=-r[c.xy];C[c.wh]=h.ecSize[c.wh];C[v.xy]=0;C[v.wh]=r[v.wh]}function yT(t){var e=t.symbolPatternSize;var r=Qp(t.symbolType,-e/2,-e/2,e,e,t.color);r.attr({culling:true});r.type!=="image"&&r.setStyle({strokeNoScale:true});return r}function xT(t,e,a,r){var i=t.__pictorialBundle;var n=a.symbolSize;var o=a.valueLineWidth;var s=a.pathPosition;var l=e.valueDim;var u=a.repeatTimes||0;var h=0;var f=n[e.valueDim.index]+o+a.symbolMargin*2;kT(t,function(t){t.__pictorialAnimationIndex=h;t.__pictorialRepeatTimes=u;if(h<u){PT(t,null,d(h),a,r)}else{PT(t,null,{scale:[0,0]},a,r,function(){i.remove(t)})}DT(t,a);h++});for(;h<u;h++){var c=yT(a);c.__pictorialAnimationIndex=h;c.__pictorialRepeatTimes=u;i.add(c);var v=d(h);PT(c,{position:v.position,scale:[0,0]},{scale:v.scale,rotation:v.rotation},a,r);c.on("mouseover",p).on("mouseout",g);DT(c,a)}function d(t){var e=s.slice();var r=a.pxSign;var i=t;if(a.symbolRepeatDirection==="start"?r>0:r<0){i=u-1-t}e[l.index]=f*(i-u/2+.5)+s[l.index];return{position:e,scale:a.symbolScale.slice(),rotation:a.rotation}}function p(){kT(t,function(t){t.trigger("emphasis")})}function g(){kT(t,function(t){t.trigger("normal")})}}function _T(t,e,r,i){var a=t.__pictorialBundle;var n=t.__pictorialMainPath;if(!n){n=t.__pictorialMainPath=yT(r);a.add(n);PT(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,i);n.on("mouseover",o).on("mouseout",s)}else{PT(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,i)}DT(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function wT(t,e,r){var i=N({},e.barRectShape);var a=t.__pictorialBarRect;if(!a){a=t.__pictorialBarRect=new _s({z2:2,shape:i,silent:true,style:{stroke:"transparent",fill:"transparent",lineWidth:0}});t.add(a)}else{PT(a,null,{shape:i},e,r)}}function bT(t,e,r,i){if(r.symbolClip){var a=t.__pictorialClipPath;var n=N({},r.clipShape);var o=e.valueDim;var s=r.animationModel;var l=r.dataIndex;if(a){gl(a,{shape:n},s,l)}else{n[o.wh]=0;a=new _s({shape:n});t.__pictorialBundle.setClipPath(a);t.__pictorialClipPath=a;var u={};u[o.wh]=r.clipShape[o.wh];Il[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function ST(t,e){var r=t.getItemModel(e);r.getAnimationDelayParams=MT;r.isAnimationEnabled=IT;return r}function MT(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function IT(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function DT(t,e){t.off("emphasis").off("normal");var r=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[r[0]*1.1,r[1]*1.1]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:r.slice()},400,"elasticOut")})}function TT(t,e,r,i){var a=new cr;var n=new cr;a.add(n);a.__pictorialBundle=n;n.attr("position",r.bundlePosition.slice());if(r.symbolRepeat){xT(a,e,r)}else{_T(a,e,r)}wT(a,r,i);bT(a,e,r,i);a.__pictorialShapeStr=LT(t,r);a.__pictorialSymbolMeta=r;return a}function AT(t,e,r){var i=r.animationModel;var a=r.dataIndex;var n=t.__pictorialBundle;gl(n,{position:r.bundlePosition.slice()},i,a);if(r.symbolRepeat){xT(t,e,r,true)}else{_T(t,e,r,true)}wT(t,r,true);bT(t,e,r,true)}function CT(t,e,r,i){var a=i.__pictorialBarRect;a&&(a.style.text=null);var n=[];kT(i,function(t){n.push(t)});i.__pictorialMainPath&&n.push(i.__pictorialMainPath);i.__pictorialClipPath&&(r=null);L(n,function(t){gl(t,{scale:[0,0]},r,e,function(){i.parent&&i.parent.remove(i)})});t.setItemGraphicEl(e,null)}function LT(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function kT(e,r,i){L(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&r.call(i,t)})}function PT(t,e,r,i,a,n){e&&t.attr(e);if(i.symbolClip&&!a){r&&t.attr(r)}else{r&&Il[a?"updateProps":"initProps"](t,r,i.animationModel,i.dataIndex,n)}}function NT(t,e,r){var i=r.color;var a=r.dataIndex;var n=r.itemModel;var o=n.getModel("itemStyle").getItemStyle(["color"]);var s=n.getModel("emphasis.itemStyle").getItemStyle();var l=n.getShallow("cursor");kT(t,function(t){t.setColor(i);t.setStyle(C({fill:i,opacity:r.opacity},o));al(t,s);l&&(t.cursor=l);t.z2=r.z2});var u={};var h=e.valueDim.posDesc[+(r.boundingLength>0)];var f=t.__pictorialBarRect;My(f.style,u,n,i,e.seriesModel,a,h);al(f,u)}function ET(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}$v(R(dp,"pictorialBar"));Kv(um("pictorialBar","roundRect"));var OT=function(t,e,r,i,a){pg.call(this,t,e,r);this.type=i||"value";this.position=a||"bottom";this.orient=null;this._labelInterval=null};OT.prototype={constructor:OT,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null};M(OT,pg);function zT(t,e,r){this.dimension="single";this.dimensions=["single"];this._axis=null;this._rect;this._init(t,e,r);this.model=t}zT.prototype={type:"singleAxis",axisPointerEnabled:true,constructor:zT,_init:function(t,e,r){var i=this.dimension;var a=new OT(i,Bp(t),[0,0],t.get("type"),t.get("position"));var n=a.type==="category";a.onBand=n&&t.get("boundaryGap");a.inverse=t.get("inverse");a.orient=t.get("orient");t.axis=a;a.model=t;a.coordinateSystem=this;this._axis=a},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();L(e.mapDimension(this.dimension,true),function(t){this._axis.scale.unionExtentFromData(e,t)},this);Rp(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Cu({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()});this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect;var e=this._axis;var r=e.isHorizontal();var i=r?[0,t.width]:[0,t.height];var a=e.reverse?1:0;e.setExtent(i[a],i[1-a]);this._updateAxisTransform(e,r?t.x:t.y)},_updateAxisTransform:function(t,e){var r=t.getExtent();var i=r[0]+r[1];var a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return i-t+e};t.toLocalCoord=a?function(t){return t-e}:function(t){return i-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect();var r=this.getAxis();var i=r.orient;if(i==="horizontal"){return r.contain(r.toLocalCoord(t[0]))&&(t[1]>=e.y&&t[1]<=e.y+e.height)}else{return r.contain(r.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[e.orient==="horizontal"?0:1]))]},dataToPoint:function(t){var e=this.getAxis();var r=this.getRect();var i=[];var a=e.orient==="horizontal"?0:1;if(t instanceof Array){t=t[0]}i[a]=e.toGlobalCoord(e.dataToCoord(+t));i[1-a]=a===0?r.y+r.height/2:r.x+r.width/2;return i}};function RT(i,a){var n=[];i.eachComponent("singleAxis",function(t,e){var r=new zT(t,i,a);r.name="single_"+e;r.resize(t,a);t.coordinateSystem=r;n.push(r)});i.eachSeries(function(t){if(t.get("coordinateSystem")==="singleAxis"){var e=i.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}});return n}Ah.register("single",{create:RT,dimensions:zT.prototype.dimensions});function BT(t,e){e=e||{};var r=t.coordinateSystem;var i=t.axis;var a={};var n=i.position;var o=i.orient;var s=r.getRect();var l=[s.x,s.x+s.width,s.y,s.y+s.height];var u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=f[n];if(t.get("axisTick.inside")){a.tickDirection=-a.tickDirection}if(j(e.labelInside,t.get("axisLabel.inside"))){a.labelDirection=-a.labelDirection}var c=e.rotate;c==null&&(c=t.get("axisLabel.rotate"));a.labelRotation=n==="top"?-c:c;a.labelInterval=i.getLabelInterval();a.z2=1;return a}var VT=Fm.getInterval;var GT=Fm.ifIgnoreOnTick;var FT=["axisLine","axisTickLabel","axisName"];var WT="splitLine";var HT=vy.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,i){var a=this.group;a.removeAll();var n=BT(t);var o=new Fm(t,n);L(FT,o.add,o);a.add(o.getGroup());if(t.get(WT+".show")){this["_"+WT](t,n.labelInterval)}HT.superCall(this,"render",t,e,r,i)},_splitLine:function(t,e){var r=t.axis;if(r.scale.isBlank()){return}var i=t.getModel("splitLine");var a=i.getModel("lineStyle");var n=a.get("width");var o=a.get("color");var s=VT(i,e);o=o instanceof Array?o:[o];var l=t.coordinateSystem.getRect();var u=r.isHorizontal();var h=[];var f=0;var c=r.getTicksCoords();var v=[];var d=[];var p=t.get("axisLabel.showMinLabel");var g=t.get("axisLabel.showMaxLabel");for(var m=0;m<c.length;++m){if(GT(r,m,s,c.length,p,g)){continue}var y=r.toGlobalCoord(c[m]);if(u){v[0]=y;v[1]=l.y;d[0]=y;d[1]=l.y+l.height}else{v[0]=l.x;v[1]=y;d[0]=l.x+l.width;d[1]=y}var x=f++%o.length;h[x]=h[x]||[];h[x].push(new ws(Hs({shape:{x1:v[0],y1:v[1],x2:d[0],y2:d[1]},style:{lineWidth:n},silent:true})))}for(var m=0;m<h.length;++m){this.group.add(Fs(h[m],{style:{stroke:o[m%o.length],lineDash:a.getLineDash(n),lineWidth:n},silent:true}))}}});var ZT=Ru.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});var UT={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:true,lineStyle:{width:2,type:"solid"}},tooltip:{show:true},axisTick:{show:true,length:6,lineStyle:{width:2}},axisLabel:{show:true,interval:"auto"},splitLine:{show:true,lineStyle:{type:"dashed",opacity:.2}}};function jT(t,e){return e.type||(e.data?"category":"value")}y(ZT.prototype,Hp);wm("single",ZT,jT,UT);var XT=function(t,e){var r=[];var i=t.seriesIndex;var a;if(i==null||!(a=e.getSeriesByIndex(i))){return{point:[]}}var n=a.getData();var o=Ka(n,t);if(o==null||o<0||B(o)){return{point:[]}}var s=n.getItemGraphicEl(o);var l=a.coordinateSystem;if(a.getTooltipPosition){r=a.getTooltipPosition(o)||[]}else if(l&&l.dataToPoint){r=l.dataToPoint(n.getValues(T(l.dimensions,function(t){return n.mapDimension(t)}),o,true))||[]}else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform);r=[u.x+u.width/2,u.y+u.height/2]}return{point:r,el:s}};var YT=L;var qT=R;var $T=Ja();var KT=function(t,e,r){var i=t.currTrigger;var o=[t.x,t.y];var a=t;var n=t.dispatchAction||z(r.dispatchAction,r);var s=e.getComponent("axisPointer").coordSysAxesInfo;if(!s){return}if(sA(o)){o=XT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point}var l=sA(o);var u=a.axesInfo;var h=s.axesInfo;var f=i==="leave"||sA(o);var c={};var v={};var d={list:[],map:{}};var p={showPointer:qT(tA,v),showTooltip:qT(eA,d)};YT(s.coordSysMap,function(t,e){var n=l||t.containPoint(o);YT(s.coordSysAxesInfo[e],function(t,e){var r=t.axis;var i=nA(u,t);if(!f&&n&&(!u||i)){var a=i&&i.value;if(a==null&&!l){a=r.pointToData(o)}a!=null&&JT(t,a,p,false,c)}})});var g={};YT(h,function(a,t){var n=a.linkGroup;if(n&&!v[t]){YT(n.axesInfo,function(t,e){var r=v[e];if(t!==a&&r){var i=r.value;n.mapper&&(i=a.axis.scale.parse(n.mapper(i,oA(t),oA(a))));g[a.key]=i}})}});YT(g,function(t,e){JT(h[e],t,p,true,c)});rA(v,h,c);iA(d,o,t,n);aA(h,n,r);return c};function JT(t,e,r,i,a){var n=t.axis;if(n.scale.isBlank()||!n.containData(e)){return}if(!t.involveSeries){r.showPointer(t,e);return}var o=QT(e,t);var s=o.payloadBatch;var l=o.snapToValue;if(s[0]&&a.seriesIndex==null){N(a,s[0])}if(!i&&t.snap){if(n.containData(l)&&l!=null){e=l}}r.showPointer(t,e,s,a);r.showTooltip(t,o,l)}function QT(l,t){var u=t.axis;var h=u.dim;var f=l;var c=[];var v=Number.MAX_VALUE;var d=-1;YT(t.seriesModels,function(e,t){var r=e.getData().mapDimension(h,true);var i;var a;if(e.getAxisTooltipData){var n=e.getAxisTooltipData(r,l,u);a=n.dataIndices;i=n.nestestValue}else{a=e.getData().indicesOfNearest(r[0],l,u.type==="category"?.5:null);if(!a.length){return}i=e.getData().get(r[0],a[0])}if(i==null||!isFinite(i)){return}var o=l-i;var s=Math.abs(o);if(s<=v){if(s<v||o>=0&&d<0){v=s;d=o;f=i;c.length=0}YT(a,function(t){c.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})}});return{payloadBatch:c,snapToValue:f}}function tA(t,e,r,i){t[e.key]={value:r,payloadBatch:i}}function eA(t,e,r,i){var a=r.payloadBatch;var n=e.axis;var o=n.model;var s=e.axisPointerModel;if(!e.triggerTooltip||!a.length){return}var l=e.coordSys.model;var u=cy(l);var h=t.map[u];if(!h){h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]};t.list.push(h)}h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}function rA(a,t,e){var n=e.axesInfo=[];YT(t,function(t,e){var r=t.axisPointerModel.option;var i=a[e];if(i){!t.useHandle&&(r.status="show");r.value=i.value;r.seriesDataIndices=(i.payloadBatch||[]).slice()}else{!t.useHandle&&(r.status="hide")}r.status==="show"&&n.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})})}function iA(t,e,r,i){if(sA(e)||!t.list.length){i({type:"hideTip"});return}var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:true,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}function aA(t,e,r){var i=r.getZr();var a="axisPointerLastHighlights";var n=$T(i)[a]||{};var o=$T(i)[a]={};YT(t,function(t,e){var r=t.axisPointerModel.option;r.status==="show"&&YT(r.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var s=[];var l=[];L(n,function(t,e){!o[e]&&l.push(t)});L(o,function(t,e){!n[e]&&s.push(t)});l.length&&r.dispatchAction({type:"downplay",escapeConnect:true,batch:l});s.length&&r.dispatchAction({type:"highlight",escapeConnect:true,batch:s})}function nA(t,e){for(var r=0;r<(t||[]).length;r++){var i=t[r];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex){return i}}}function oA(t){var e=t.axis.model;var r={};var i=r.axisDim=t.axis.dim;r.axisIndex=r[i+"AxisIndex"]=e.componentIndex;r.axisName=r[i+"AxisName"]=e.name;r.axisId=r[i+"AxisId"]=e.id;return r}function sA(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var lA=td({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:false,triggerTooltip:true,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:true,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:false,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var uA=Ja();var hA=L;function fA(t,e,r){if(m.node){return}var i=e.getZr();uA(i).records||(uA(i).records={});cA(i,e);var a=uA(i).records[t]||(uA(i).records[t]={});a.handler=r}function cA(a,n){if(uA(a).initialized){return}uA(a).initialized=true;t("click",R(pA,"click"));t("mousemove",R(pA,"mousemove"));t("globalout",dA);function t(t,i){a.on(t,function(e){var r=gA(n);hA(uA(a).records,function(t){t&&i(t,e,r.dispatchAction)});vA(r.pendings,n)})}}function vA(t,e){var r=t.showTip.length;var i=t.hideTip.length;var a;if(r){a=t.showTip[r-1]}else if(i){a=t.hideTip[i-1]}if(a){a.dispatchAction=null;e.dispatchAction(a)}}function dA(t,e,r){t.handler("leave",null,r)}function pA(t,e,r,i){e.handler(t,r,i)}function gA(r){var i={showTip:[],hideTip:[]};var a=function(t){var e=i[t.type];if(e){e.push(t)}else{t.dispatchAction=a;r.dispatchAction(t)}};return{dispatchAction:a,pendings:i}}function mA(t,e){if(m.node){return}var r=e.getZr();var i=(uA(r).records||{})[t];if(i){uA(r).records[t]=null}}var yA=ed({type:"axisPointer",render:function(t,e,r){var i=e.getComponent("tooltip");var a=t.get("triggerOn")||(i&&i.get("triggerOn")||"mousemove|click");fA("axisPointer",r,function(t,e,r){if(a!=="none"&&(t==="leave"||a.indexOf(t)>=0)){r({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}})},remove:function(t,e){mA(e.getZr(),"axisPointer");yA.superApply(this._model,"remove",arguments)},dispose:function(t,e){mA("axisPointer",e);yA.superApply(this._model,"dispose",arguments)}});var xA=Ja();var _A=P;var wA=z;function bA(){}bA.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:false,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,r,i){var a=e.get("value");var n=e.get("status");this._axisModel=t;this._axisPointerModel=e;this._api=r;if(!i&&this._lastValue===a&&this._lastStatus===n){return}this._lastValue=a;this._lastStatus=n;var o=this._group;var s=this._handle;if(!n||n==="hide"){o&&o.hide();s&&s.hide();return}o&&o.show();s&&s.show();var l={};this.makeElOption(l,a,t,e,r);var u=l.graphicKey;if(u!==this._lastGraphicKey){this.clear(r)}this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o){o=this._group=new cr;this.createPointerEl(o,l,t,e);this.createLabelEl(o,l,t,e);r.getZr().add(o)}else{var f=R(SA,e,h);this.updatePointerEl(o,l,f,e);this.updateLabelEl(o,l,f,e)}TA(o,e,true);this._renderHandle(a)},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var r=e.get("animation");var i=t.axis;var a=i.type==="category";var n=e.get("snap");if(!n&&!a){return false}if(r==="auto"||r==null){var o=this.animationThreshold;if(a&&i.getBandWidth()>o){return true}if(n){var s=uy(t).seriesDataCount;var l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return false}return r===true},makeElOption:function(t,e,r,i,a){},createPointerEl:function(t,e,r,i){var a=e.pointer;if(a){var n=xA(t).pointerEl=new Il[a.type](_A(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,i){if(e.label){var a=xA(t).labelEl=new _s(_A(e.label));t.add(a);IA(a,i)}},updatePointerEl:function(t,e,r){var i=xA(t).pointerEl;if(i){i.setStyle(e.pointer.style);r(i,{shape:e.pointer.shape})}},updateLabelEl:function(t,e,r,i){var a=xA(t).labelEl;if(a){a.setStyle(e.label.style);r(a,{shape:e.label.shape,position:e.label.position});IA(a,i)}},_renderHandle:function(t){if(this._dragging||!this.updateHandleTransform){return}var e=this._axisPointerModel;var r=this._api.getZr();var i=this._handle;var a=e.getModel("handle");var n=e.get("status");if(!a.get("show")||!n||n==="hide"){i&&r.remove(i);this._handle=null;return}var o;if(!this._handle){o=true;i=this._handle=Ml(a.get("icon"),{cursor:"move",draggable:true,onmousemove:function(t){oa(t.event)},onmousedown:wA(this._onHandleDragMove,this,0,0),drift:wA(this._onHandleDragMove,this),ondragend:wA(this._onHandleDragEnd,this)});r.add(i)}TA(i,e,false);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(a.getItemStyle(null,s));var l=a.get("size");if(!B(l)){l=[l,l]}i.attr("scale",[l[0]/2,l[1]/2]);Jf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate");this._moveHandleToValue(t,o)},_moveHandleToValue:function(t,e){SA(this._axisPointerModel,!e&&this._moveAnimation,this._handle,DA(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!r){return}this._dragging=true;var i=this.updateHandleTransform(DA(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i;r.stopAnimation();r.attr(DA(i));xA(r).lastProp=null;this._doDispatchAxisPointer()},_doDispatchAxisPointer:function(){var t=this._handle;if(!t){return}var e=this._payloadInfo;var r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})},_onHandleDragEnd:function(t){this._dragging=false;var e=this._handle;if(!e){return}var r=this._axisPointerModel.get("value");this._moveHandleToValue(r);this._api.dispatchAction({type:"hideTip"})},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null;this._lastStatus=null;var e=t.getZr();var r=this._group;var i=this._handle;if(e&&r){this._lastGraphicKey=null;r&&e.remove(r);i&&e.remove(i);this._group=null;this._handle=null;this._payloadInfo=null}},doClear:function(){},buildLabel:function(t,e,r){r=r||0;return{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}};bA.prototype.constructor=bA;function SA(t,e,r,i){if(!MA(xA(r).lastProp,i)){xA(r).lastProp=i;e?gl(r,i,t):(r.stopAnimation(),r.attr(i))}}function MA(r,t){if(F(r)&&F(t)){var i=true;L(t,function(t,e){i=i&&MA(r[e],t)});return!!i}else{return r===t}}function IA(t,e){t[e.get("label.show")?"show":"hide"]()}function DA(t){return{position:t.position.slice(),rotation:t.rotation||0}}function TA(t,e,r){var i=e.get("z");var a=e.get("zlevel");t&&t.traverse(function(t){if(t.type!=="group"){i!=null&&(t.z=i);a!=null&&(t.zlevel=a);t.silent=r}})}un(bA);function AA(t){var e=t.get("type");var r=t.getModel(e+"Style");var i;if(e==="line"){i=r.getLineStyle();i.fill=null}else if(e==="shadow"){i=r.getAreaStyle();i.stroke=null}return i}function CA(t,e,r,i,a){var n=r.get("value");var o=kA(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")});var s=r.getModel("label");var l=lu(s.get("padding")||0);var u=s.getFont();var h=Jr(o,u);var f=a.position;var c=h.width+l[1]+l[3];var v=h.height+l[0]+l[2];var d=a.align;d==="right"&&(f[0]-=c);d==="center"&&(f[0]-=c/2);var p=a.verticalAlign;p==="bottom"&&(f[1]-=v);p==="middle"&&(f[1]-=v/2);LA(f,c,v,i);var g=s.get("backgroundColor");if(!g||g==="auto"){g=e.get("axisLine.lineStyle.color")}t.label={shape:{x:0,y:0,width:c,height:v,r:s.get("borderRadius")},position:f.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",fill:g,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function LA(t,e,r,i){var a=i.getWidth();var n=i.getHeight();t[0]=Math.min(t[0]+e,a)-e;t[1]=Math.min(t[1]+r,n)-r;t[0]=Math.max(t[0],0);t[1]=Math.max(t[1],0)}function kA(t,e,a,r,i){var n=e.scale.getLabel(t,{precision:i.precision});var o=i.formatter;if(o){var s={value:Wp(e,t),seriesData:[]};L(r,function(t){var e=a.getSeriesByIndex(t.seriesIndex);var r=t.dataIndexInside;var i=e&&e.getDataParams(r);i&&s.seriesData.push(i)});if(G(o)){n=o.replace("{value}",n)}else if(V(o)){n=o(s)}}return n}function PA(t,e,r){var i=Ut();$t(i,i,r.rotation);qt(i,i,r.position);return xl([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],i)}function NA(t,e,r,i,a,n){var o=Fm.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=a.get("label.margin");CA(e,i,a,n,{position:PA(i.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function EA(t,e,r){r=r||0;return{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function OA(t,e,r){r=r||0;return{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function zA(t,e,r,i,a,n){return{cx:t,cy:e,r0:r,r:i,startAngle:a,endAngle:n,clockwise:true}}var RA=bA.extend({makeElOption:function(t,e,r,i,a){var n=r.axis;var o=n.grid;var s=i.get("type");var l=BA(o,n).getOtherAxis(n).getGlobalExtent();var u=n.toGlobalCoord(n.dataToCoord(e,true));if(s&&s!=="none"){var h=AA(i);var f=VA[s](n,u,l,h);f.style=h;t.graphicKey=f.type;t.pointer=f}var c=my(o.model,r);NA(e,t,c,r,i,a)},getHandleTransform:function(t,e,r){var i=my(e.axis.grid.model,e,{labelInside:false});i.labelMargin=r.get("handle.margin");return{position:PA(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,i){var a=r.axis;var n=a.grid;var o=a.getGlobalExtent(true);var s=BA(n,a).getOtherAxis(a).getGlobalExtent();var l=a.dim==="x"?0:1;var u=t.position;u[l]+=e[l];u[l]=Math.min(o[1],u[l]);u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2;var f=[h,h];f[l]=u[l];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:f,tooltipOption:c[l]}}});function BA(t,e){var r={};r[e.dim+"AxisIndex"]=e.index;return t.getCartesian(r)}var VA={line:function(t,e,r,i){var a=EA([e,r[0]],[e,r[1]],GA(t));Hs({shape:a,style:i});return{type:"Line",shape:a}},shadow:function(t,e,r,i){var a=t.getBandWidth();var n=r[1]-r[0];return{type:"Rect",shape:OA([e-a/2,r[0]],[a,n],GA(t))}}};function GA(t){return t.dim==="x"?0:1}vy.registerAxisPointerClass("CartesianAxisPointer",RA);Zv(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;if(e&&!B(e)){t.axisPointer.link=[e]}}});Uv(jc.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ry(t,e)});Xv({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},KT);var FA=["x","y"];var WA=["width","height"];var HA=bA.extend({makeElOption:function(t,e,r,i,a){var n=r.axis;var o=n.coordinateSystem;var s=jA(o,1-UA(n));var l=o.dataToPoint(e)[0];var u=i.get("type");if(u&&u!=="none"){var h=AA(i);var f=ZA[u](n,l,s,h);f.style=h;t.graphicKey=f.type;t.pointer=f}var c=BT(r);NA(e,t,c,r,i,a)},getHandleTransform:function(t,e,r){var i=BT(e,{labelInside:false});i.labelMargin=r.get("handle.margin");return{position:PA(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,i){var a=r.axis;var n=a.coordinateSystem;var o=UA(a);var s=jA(n,o);var l=t.position;l[o]+=e[o];l[o]=Math.min(s[1],l[o]);l[o]=Math.max(s[0],l[o]);var u=jA(n,1-o);var h=(u[1]+u[0])/2;var f=[h,h];f[o]=l[o];return{position:l,rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}}});var ZA={line:function(t,e,r,i){var a=EA([e,r[0]],[e,r[1]],UA(t));Hs({shape:a,style:i});return{type:"Line",shape:a}},shadow:function(t,e,r,i){var a=t.getBandWidth();var n=r[1]-r[0];return{type:"Rect",shape:OA([e-a/2,r[0]],[a,n],UA(t))}}};function UA(t){return t.isHorizontal()?0:1}function jA(t,e){var r=t.getRect();return[r[FA[e]],r[FA[e]]+r[WA[e]]]}vy.registerAxisPointerClass("SingleAxisPointer",HA);ed({type:"single"});var XA=2;var YA=Tf.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){YA.superApply(this,"init",arguments);this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length;var r=AI().key(function(t){return t[2]}).entries(t);var i=T(r,function(t){return{name:t.key,dataList:t.values}});var a=i.length;var n=-1;var o=-1;for(var s=0;s<a;++s){var l=i[s].dataList.length;if(l>n){n=l;o=s}}for(var u=0;u<a;++u){if(u===o){continue}var h=i[u].name;for(var f=0;f<n;++f){var c=i[o].dataList[f][0];var v=i[u].dataList.length;var d=-1;for(var p=0;p<v;++p){var g=i[u].dataList[p][0];if(g===c){d=p;break}}if(d===-1){t[e]=[];t[e][0]=c;t[e][1]=0;t[e][2]=h;e++}}}return t},getInitialData:function(t,e){var r=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0];var i=r.get("type");var a=k(t.data,function(t){return t[2]!==undefined});var n=this.fixData(a||[]);var o=[];var s=this.nameMap=it();var l=0;for(var u=0;u<n.length;++u){o.push(n[u][XA]);if(!s.get(n[u][XA])){s.set(n[u][XA],l);l++}}var h=Fd(n,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:vd(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}});var f=new Dd(h,this);f.initData(n);return f},getLayerSeries:function(){var r=this.getData();var t=r.count();var e=[];for(var i=0;i<t;++i){e[i]=i}var a=AI().key(function(t){return r.get("name",t)}).entries(e);var n=T(a,function(t){return{name:t.key,indices:t.values}});var o=r.mapDimension("single");for(var s=0;s<n.length;++s){n[s].indices.sort(l)}function l(t,e){return r.get(o,t)-r.get(o,e)}return n},getAxisTooltipData:function(t,e,r){if(!B(t)){t=t?[t]:[]}var i=this.getData();var a=this.getLayerSeries();var n=[];var o=a.length;var s;for(var l=0;l<o;++l){var u=Number.MAX_VALUE;var h=-1;var f=a[l].indices.length;for(var c=0;c<f;++c){var v=i.get(t[0],a[l].indices[c]);var d=Math.abs(v-e);if(d<=u){s=v;u=d;h=a[l].indices[c]}}n.push(h)}return{dataIndices:n,nestestValue:s}},formatTooltip:function(t){var e=this.getData();var r=e.getName(t);var i=e.get(e.mapDimension("value"),t);if(isNaN(i)||i==null){i="-"}return uu(r+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,textAlign:"right",show:true,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:true}}}});id({type:"themeRiver",init:function(){this._layers=[]},render:function(b,t,e){var S=b.getData();var M=this.group;var I=b.getLayerSeries();var r=S.getLayout("layoutInfo");var i=r.rect;var a=r.boundaryGap;M.attr("position",[0,i.y+a[0]]);function n(t){return t.name}var o=new ud(this._layersSeries||[],I,n,n);var D={};o.add(z(s,this,"add")).update(z(s,this,"update")).remove(z(s,this,"remove")).execute();function s(t,e,r){var i=this._layers;if(t==="remove"){M.remove(i[e]);return}var a=[];var n=[];var o;var s=I[e].indices;for(var l=0;l<s.length;l++){var u=S.getItemLayout(s[l]);var h=u.x;var f=u.y0;var c=u.y;a.push([h,f]);n.push([h,f+c]);o=S.getItemVisual(s[l],"color")}var v;var d;var p=S.getItemLayout(s[0]);var g=S.getItemModel(s[l-1]);var m=g.getModel("label");var y=m.get("margin");if(t==="add"){var x=D[e]=new cr;v=new Qg({shape:{points:a,stackedOnPoints:n,smooth:.4,stackedOnSmooth:.4,smoothConstraint:false},z2:0});d=new ls({style:{x:p.x-y,y:p.y0+p.y/2}});x.add(v);x.add(d);M.add(x);v.setClipPath(qA(v.getBoundingRect(),b,function(){v.removeClipPath()}))}else{var x=i[r];v=x.childAt(0);d=x.childAt(1);M.add(x);D[e]=x;gl(v,{shape:{points:a,stackedOnPoints:n}},b);gl(d,{style:{x:p.x-y,y:p.y0+p.y/2}},b)}var _=g.getModel("emphasis.itemStyle");var w=g.getModel("itemStyle");ol(d.style,m,{text:m.get("show")?b.getFormattedLabel(s[l-1],"normal")||S.getName(s[l-1]):null,textVerticalAlign:"middle"});v.setStyle(N({fill:o},w.getItemStyle(["color"])));al(v,_.getItemStyle())}this._layersSeries=I;this._layers=D},dispose:function(){}});function qA(t,e,r){var i=new _s({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});ml(i,{shape:{width:t.width+20,height:t.height+20}},e,r);return i}var $A=function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData();var r=t.coordinateSystem;var i={};var a=r.getRect();i.rect=a;var n=t.get("boundaryGap");var o=r.getAxis();i.boundaryGap=n;if(o.orient==="horizontal"){n[0]=Wl(n[0],a.height);n[1]=Wl(n[1],a.height);var s=a.height-n[0]-n[1];KA(e,t,s)}else{n[0]=Wl(n[0],a.width);n[1]=Wl(n[1],a.width);var l=a.width-n[0]-n[1];KA(e,t,l)}e.setLayout("layoutInfo",i)})};function KA(r,t,e){if(!r.count()){return}var i=t.coordinateSystem;var a=t.getLayerSeries();var n=r.mapDimension("single");var o=r.mapDimension("value");var s=T(a,function(t){return T(t.indices,function(t){var e=i.dataToPoint(r.get(n,t));e[1]=r.get(o,t);return e})});var l=JA(s);var u=l.y0;var h=e/l.max;var f=a.length;var c=a[0].indices.length;var v;for(var d=0;d<c;++d){v=u[d]*h;r.setItemLayout(a[0].indices[d],{layerIndex:0,x:s[0][d][0],y0:v,y:s[0][d][1]*h});for(var p=1;p<f;++p){v+=s[p-1][d][1]*h;r.setItemLayout(a[p].indices[d],{layerIndex:p,x:s[p][d][0],y0:v,y:s[p][d][1]*h})}}}function JA(t){var e=t.length;var r=t[0].length;var i=[];var a=[];var n=0;var o;var s={};for(var l=0;l<r;++l){for(var u=0,o=0;u<e;++u){o+=t[u][l][1]}if(o>n){n=o}i.push(o)}for(var h=0;h<r;++h){a[h]=(n-i[h])/2}n=0;for(var f=0;f<r;++f){var c=i[f]+a[f];if(c>n){n=c}}s.y0=a;s.max=n;return s}var QA=function(t){t.eachSeriesByType("themeRiver",function(a){var n=a.getData();var o=a.getRawData();var s=a.get("color");var l=it();n.each(function(t){l.set(n.getRawIndex(t),t)});o.each(function(t){var e=o.getName(t);var r=s[(a.nameMap.get(e)-1)%s.length];o.setItemVisual(t,"color",r);var i=l.get(t);if(i!=null){n.setItemVisual(i,"color",r)}})})};$v($A);Kv(QA);Uv(Ky("themeRiver"));Tf.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};tC(r);var i=t.levels||[];var a={};a.levels=i;return w_.createTree(r,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Tf.prototype.getDataParams.apply(this,arguments);var r=this.getData().tree.getNodeByDataIndex(t);e.treePathInfo=q_(r,this);return e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:true,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:true,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:false,label:{rotate:"radial",show:true,opacity:1,align:"center",position:"inside",distance:5,silent:true,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;if(!t||t!==e&&!e.contains(t)){this._viewRoot=e}}});function tC(t){var r=0;L(t.children,function(t){tC(t);var e=t.value;B(e)&&(e=e[0]);r+=e});var e=t.value;if(B(e)){e=e[0]}if(e==null||isNaN(e)){e=r}if(e<0){e=0}B(t.value)?t.value[0]=e:t.value=e}var eC={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"};var rC=2;var iC=4;function aC(t,e,r){cr.call(this);var i=new cs({z2:rC});var a=new ls({z2:iC,silent:t.getModel("label").get("silent")});this.add(i);this.add(a);this.updateData(true,t,"normal",e,r);function n(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var nC=aC.prototype;nC.updateData=function(t,e,r,i,a){this.node=e;e.piece=this;i=i||this._seriesModel;a=a||this._ecModel;var n=this.childAt(0);n.dataIndex=e.dataIndex;var o=e.getModel();var s=e.getLayout();var l=N({},s);l.label=null;var u=oC(e,i,a);var h=o.getModel("itemStyle").getItemStyle();var f;if(r==="normal"){f=h}else{var c=o.getModel(r+".itemStyle").getItemStyle();f=y(c,h)}f=C({lineJoin:"bevel",fill:f.fill||u},f);if(t){n.setShape(l);n.shape.r=s.r0;gl(n,{shape:{r:s.r}},i,e.dataIndex);n.useStyle(f)}else if(typeof f.fill==="object"&&f.fill.type||typeof n.style.fill==="object"&&n.style.fill.type){gl(n,{shape:l},i);n.useStyle(f)}else{gl(n,{shape:l,style:f},i)}this._updateLabel(i,u,r);var v=o.getShallow("cursor");v&&n.attr("cursor",v);if(t){var d=i.getShallow("highlightPolicy");this._initEvents(n,e,i,d)}this._seriesModel=i||this._seriesModel;this._ecModel=a||this._ecModel};nC.onEmphasis=function(e){var r=this;this.node.hostTree.root.eachNode(function(t){if(t.piece){if(r.node===t){t.piece.updateData(false,t,"emphasis")}else if(lC(t,r.node,e)){t.piece.childAt(0).trigger("highlight")}else if(e!==eC.NONE){t.piece.childAt(0).trigger("downplay")}}})};nC.onNormal=function(){this.node.hostTree.root.eachNode(function(t){if(t.piece){t.piece.updateData(false,t,"normal")}})};nC.onHighlight=function(){this.updateData(false,this.node,"highlight")};nC.onDownplay=function(){this.updateData(false,this.node,"downplay")};nC._updateLabel=function(t,e,r){var i=this.node.getModel();var a=i.getModel("label");var n=r==="normal"||r==="emphasis"?a:i.getModel(r+".label");var o=i.getModel("emphasis.label");var s=j(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);if(S("show")===false){s=""}var l=this.node.getLayout();var u=n.get("minAngle");if(u==null){u=a.get("minAngle")}u=u/180*Math.PI;var h=l.endAngle-l.startAngle;if(u!=null&&Math.abs(h)<u){s=""}var f=this.childAt(1);nl(f.style,f.hoverStyle||{},a,o,{defaultText:n.getShallow("show")?s:null,autoColor:e,useInsideStyle:true});var c=(l.startAngle+l.endAngle)/2;var v=Math.cos(c);var d=Math.sin(c);var p;var g=S("position");var m=S("distance")||0;var y=S("align");if(g==="outside"){p=l.r+m;y=c>Math.PI/2?"right":"left"}else{if(!y||y==="center"){p=(l.r+l.r0)/2;y="center"}else if(y==="left"){p=l.r0+m;if(c>Math.PI/2){y="right"}}else if(y==="right"){p=l.r-m;if(c>Math.PI/2){y="left"}}}f.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=p*v+l.cx;var _=p*d+l.cy;f.attr("position",[x,_]);var w=S("rotate");var b=0;if(w==="radial"){b=-c;if(b<-Math.PI/2){b+=Math.PI}}else if(w==="tangential"){b=Math.PI/2-c;if(b>Math.PI/2){b-=Math.PI}else if(b<-Math.PI/2){b+=Math.PI}}else if(typeof w==="number"){b=w*Math.PI/180}f.attr("rotation",b);function S(t){var e=n.get(t);if(e==null){return a.get(t)}else{return e}}};nC._initEvents=function(t,e,r,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this;var n=function(){a.onEmphasis(i)};var o=function(){a.onNormal()};var s=function(){a.onDownplay()};var l=function(){a.onHighlight()};if(r.isAnimationEnabled()){t.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o).on("downplay",s).on("highlight",l)}};M(aC,cr);function oC(t,e,r){var i=t.getVisual("color");var a=t.getVisual("visualMeta");if(!a||a.length===0){i=null}var n=t.getModel("itemStyle").get("color");if(n){return n}else if(i){return i}else if(t.depth===0){return r.option.color[0]}else{var o=r.option.color.length;n=r.option.color[sC(t)%o]}return n}function sC(t){var e=t;while(e.depth>1){e=e.parentNode}var r=t.getAncestors()[0];return S(r.children,e)}function lC(t,e,r){if(r===eC.NONE){return false}else if(r===eC.SELF){return t===e}else if(r===eC.ANCESTOR){return t===e||t.isAncestorOf(e)}else{return t===e||t.isDescendantOf(e)}}var uC="sunburstRootToNode";var hC=Ff.extend({type:"sunburst",init:function(){},render:function(i,a,t,e){var n=this;this.seriesModel=i;this.api=t;this.ecModel=a;var o=i.getData();var s=o.tree.root;var r=i.getViewRoot();var l=this.group;var u=i.get("renderLabelForZeroData");var h=[];r.eachNode(function(t){h.push(t)});var f=this._oldChildren||[];d(h,f);m(s,r);if(e&&e.highlight&&e.highlight.piece){var c=i.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(c)}else if(e&&e.unhighlight){var v=s.piece;if(!v&&s.children.length){v=s.children[0].piece}if(v){v.onNormal()}}this._initEvents();this._oldChildren=h;function d(a,n){if(a.length===0&&n.length===0){return}new ud(n,a,t,t).add(e).update(e).remove(R(e,null)).execute();function t(t){return t.getId()}function e(t,e){var r=t==null?null:a[t];var i=e==null?null:n[e];p(r,i)}}function p(t,e){if(!u&&t&&!t.getValue()){t=null}if(t!==s&&e!==s){if(e&&e.piece){if(t){e.piece.updateData(false,t,"normal",i,a);o.setItemGraphicEl(t.dataIndex,e.piece)}else{g(e)}}else if(t){var r=new aC(t,i,a);l.add(r);o.setItemGraphicEl(t.dataIndex,r)}}}function g(t){if(!t){return}if(t.piece){l.remove(t.piece);t.piece=null}}function m(t,e){if(e.depth>0){if(t.piece){t.piece.updateData(false,t,"normal",i,a)}else{t.piece=new aC(t,i,a);l.add(t.piece)}if(e.piece._onclickEvent){e.piece.off("click",e.piece._onclickEvent)}var r=function(t){n._rootToNode(e.parentNode)};e.piece._onclickEvent=r;t.piece.on("click",r)}else if(t.piece){l.remove(t.piece);t.piece=null}}},dispose:function(){},_initEvents:function(){var s=this;var t=function(n){var o=false;var t=s.seriesModel.getViewRoot();t.eachNode(function(t){if(!o&&t.piece&&t.piece.childAt(0)===n.target){var e=t.getModel().get("nodeClick");if(e==="rootToNode"){s._rootToNode(t)}else if(e==="link"){var r=t.getModel();var i=r.get("link");if(i){var a=r.get("target",true)||"_blank";window.open(i,a)}}o=true}})};if(this.group._onclickEvent){this.group.off("click",this.group._onclickEvent)}this.group.on("click",t);this.group._onclickEvent=t},_rootToNode:function(t){if(t!==this.seriesModel.getViewRoot()){this.api.dispatchAction({type:uC,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})}},containPoint:function(t,e){var r=e.getData();var i=r.getItemLayout(0);if(i){var a=t[0]-i.cx;var n=t[1]-i.cy;var o=Math.sqrt(a*a+n*n);return o<=i.r&&o>=i.r0}}});var fC="sunburstRootToNode";Xv({type:fC,update:"updateView"},function(a,t){t.eachComponent({mainType:"series",subType:"sunburst",query:a},e);function e(t,e){var r=j_(a,[fC],t);if(r){var i=t.getViewRoot();if(i){a.direction=Y_(i,r.node)?"rollUp":"drillDown"}t.resetViewRoot(r.node)}}});var cC="sunburstHighlight";Xv({type:cC,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},e);function e(t,e){var r=j_(i,[cC],t);if(r){i.highlight=r.node}}});var vC="sunburstUnhighlight";Xv({type:vC,update:"updateView"},function(r,t){t.eachComponent({mainType:"series",subType:"sunburst",query:r},e);function e(t,e){r.unhighlight=true}});var dC=Math.PI/180;var pC=function(t,e,C,r){e.eachSeriesByType(t,function(t){var e=t.get("center");var r=t.get("radius");if(!B(r)){r=[0,r]}if(!B(e)){e=[e,e]}var i=C.getWidth();var a=C.getHeight();var h=Math.min(i,a);var f=Wl(e[0],i);var c=Wl(e[1],a);var v=Wl(r[0],h/2);var n=Wl(r[1],h/2);var o=-t.get("startAngle")*dC;var d=t.get("minAngle")*dC;var p=t.getData().tree.root;var s=t.getViewRoot();var g=s.depth;var l=t.get("sort");if(l!=null){gC(s,l)}var u=0;L(s.children,function(t){!isNaN(t.getValue())&&u++});var m=s.getValue();var y=Math.PI/(m||u)*2;var x=s.depth>0;var _=s.height-(x?-1:1);var w=(n-v)/(_||1);var b=t.get("clockwise");var S=t.get("stillShowZeroSum");var M=b?1:-1;var I=function(t,e){if(!t){return}var r=e;if(t!==p){var i=t.getValue();var a=m===0&&S?y:i*y;if(a<d){a=d}else{}r=e+M*a;var n=t.depth-g-(x?-1:1);var o=v+w*n;var s=v+w*(n+1);var l=t.getModel();if(l.get("r0")!=null){o=Wl(l.get("r0"),h/2)}if(l.get("r")!=null){s=Wl(l.get("r"),h/2)}t.setLayout({angle:a,startAngle:e,endAngle:r,clockwise:b,cx:f,cy:c,r0:o,r:s})}if(t.children&&t.children.length){var u=0;L(t.children,function(t){u+=I(t,e+u)})}return r-e};if(x){var D=v;var T=v+w;var A=Math.PI*2;p.setLayout({angle:A,startAngle:o,endAngle:o+A,clockwise:b,cx:f,cy:c,r0:D,r:T})}I(s,o)})};function gC(t,e){var r=t.children||[];t.children=mC(r,e);if(r.length){L(t.children,function(t){gC(t,e)})}}function mC(t,e){if(typeof e==="function"){return t.sort(e)}else{var i=e==="asc";return t.sort(function(t,e){var r=(t.getValue()-e.getValue())*(i?1:-1);return r===0?(t.dataIndex-e.dataIndex)*(i?-1:1):r})}}Kv(R(Zy,"sunburst"));$v(R(pC,"sunburst"));Uv(R(Ky,"sunburst"));function yC(n,o){o=o||[0,0];return T(["x","y"],function(t,e){var r=this.getAxis(t);var i=o[e];var a=n[e]/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(i-a)-r.dataToCoord(i+a))},this)}var xC=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:z(yC,e)}}};function _C(n,o){o=o||[0,0];return T([0,1],function(t){var e=o[t];var r=n[t]/2;var i=[];var a=[];i[t]=e-r;a[t]=e+r;i[1-t]=a[1-t]=o[1-t];return Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(a)[t])},this)}var wC=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:z(_C,e)}}};function bC(t,e){var r=this.getAxis();var i=e instanceof Array?e[0]:e;var a=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(i-a)-r.dataToCoord(i+a))}var SC=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:z(bC,e)}}};function MC(s,l){return T(["Radius","Angle"],function(t,e){var r=this["get"+t+"Axis"]();var i=l[e];var a=s[e]/2;var n="dataTo"+t;var o=r.type==="category"?r.getBandWidth():Math.abs(r[n](i-a)-r[n](i+a));if(t==="Angle"){o=o*Math.PI/180}return o},this)}var IC=function(a){var n=a.getRadiusAxis();var o=a.getAngleAxis();var t=n.getExtent();t[0]>t[1]&&t.reverse();return{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:t[1],r0:t[0]},api:{coord:z(function(t){var e=n.dataToRadius(t[0]);var r=o.dataToAngle(t[1]);var i=a.coordToPoint([e,r]);i.push(e,r*Math.PI/180);return i}),size:z(MC,a)}}};var DC=function(r){var t=r.getRect();var e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return r.dataToPoint(t,e)}}}};var TC=["itemStyle"];var AC=["emphasis","itemStyle"];var CC=["label"];var LC=["emphasis","label"];var kC="e\0\0";var PC={cartesian2d:xC,geo:wC,singleAxis:SC,polar:IC,calendar:DC};rd({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:true},getInitialData:function(t,e){return Zd(this.getSource(),this)}});id({type:"custom",_data:null,render:function(i,t,e){var a=this._data;var n=i.getData();var o=this.group;var s=zC(i,n,t,e);this.group.removeAll();n.diff(a).add(function(t){BC(null,t,s(t),i,o,n)}).update(function(t,e){var r=a.getItemGraphicEl(e);BC(r,t,s(t),i,o,n)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute();this._data=n},incrementalPrepareRender:function(t,e,r){this.group.removeAll();this._data=null},incrementalRender:function(t,e,r,i){var a=e.getData();var n=zC(e,a,r,i);function o(t){if(!t.isGroup){t.incremental=true;t.useHoverLayer=true}}for(var s=t.start;s<t.end;s++){var l=BC(null,s,n(s),e,this.group,a);l.traverse(o)}},dispose:nt});function NC(t){var e=t.type;var r;if(e==="path"){var i=t.shape;r=Bs(i.pathData,null,{x:i.x||0,y:i.y||0,width:i.width||0,height:i.height||0},"center");r.__customPathData=t.pathData}else if(e==="image"){r=new Bi({});r.__customImagePath=t.style.image}else if(e==="text"){r=new ls({});r.__customText=t.style.text}else{var a=Il[e.charAt(0).toUpperCase()+e.slice(1)];if(A){K(a,'graphic type "'+e+'" can not be found.')}r=new a}r.__customGraphicType=e;r.name=t.name;return r}function EC(e,t,r,i,a,n){var o={};var s=r.style||{};r.shape&&(o.shape=P(r.shape));r.position&&(o.position=r.position.slice());r.scale&&(o.scale=r.scale.slice());r.origin&&(o.origin=r.origin.slice());r.rotation&&(o.rotation=r.rotation);if(e.type==="image"&&r.style){var l=o.style={};L(["x","y","width","height"],function(t){OC(t,l,s,e.style,n)})}if(e.type==="text"&&r.style){var l=o.style={};L(["x","y"],function(t){OC(t,l,s,e.style,n)});!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill);!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke)}if(e.type!=="group"){e.useStyle(s);if(n){e.style.opacity=0;var u=s.opacity;u==null&&(u=1);ml(e,{style:{opacity:u}},i,t)}}if(n){e.attr(o)}else{gl(e,o,i,t)}e.attr({z2:r.z2||0,silent:r.silent});r.styleEmphasis!==false&&al(e,r.styleEmphasis)}function OC(t,e,r,i,a){if(r[t]!=null&&!a){e[t]=r[t];r[t]=i[t]}}function zC(a,n,e,r){var i=a.get("renderItem");var o=a.coordinateSystem;var t={};if(o){if(A){K(i,"series.render is required.");K(o.prepareCustoms||PC[o.type],"This coordSys does not support custom series.")}t=o.prepareCustoms?o.prepareCustoms():PC[o.type](o)}var s=C({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:g,style:m,styleEmphasis:y,visual:x,barLayout:_,currentSeriesIndices:w,font:b},t.api||{});var l={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:t.coordSys,dataInsideLength:n.count(),encode:RC(a.getData())};var u;var h=true;var f;var c;var v;var d;return function(t){u=t;h=true;return i&&i(C({dataIndexInside:t,dataIndex:n.getRawIndex(t)},l),s)||{}};function p(t){t==null&&(t=u);if(h){f=n.getItemModel(t);c=f.getModel(CC);v=f.getModel(LC);d=n.getItemVisual(t,"color");h=false}}function g(t,e){e==null&&(e=u);return n.get(n.getDimension(t||0),e)}function m(t,e){e==null&&(e=u);p(e);var r=f.getModel(TC).getItemStyle();d!=null&&(r.fill=d);var i=n.getItemVisual(e,"opacity");i!=null&&(r.opacity=i);ol(r,c,null,{autoColor:d,isRectText:true});r.text=c.getShallow("show")?X(a.getFormattedLabel(e,"normal"),xg(n,e)):null;t&&N(r,t);return r}function y(t,e){e==null&&(e=u);p(e);var r=f.getModel(AC).getItemStyle();ol(r,v,null,{isRectText:true},true);r.text=v.getShallow("show")?Y(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),xg(n,e)):null;t&&N(r,t);return r}function x(t,e){e==null&&(e=u);return n.getItemVisual(e,t)}function _(t){if(o.getBaseAxis){var e=o.getBaseAxis();return fp(C({axis:e},t),r)}}function w(){return e.getCurrentSeriesIndices()}function b(t){return dl(t,e)}}function RC(n){var o={};L(n.dimensions,function(t,e){var r=n.getDimensionInfo(t);if(!r.isExtraCoord){var i=r.coordDim;var a=o[i]=o[i]||[];a[r.coordDimIndex]=e}});return o}function BC(t,e,r,i,a,n){t=VC(t,e,r,i,a,n);t&&n.setItemGraphicEl(e,t);return t}function VC(t,e,r,i,a,n){var o=r.type;if(t&&o!==t.__customGraphicType&&(o!=="path"||r.pathData!==t.__customPathData)&&(o!=="image"||r.style.image!==t.__customImagePath)&&(o!=="text"||r.style.text!==t.__customText)){a.remove(t);t=null}if(o==null){return}var s=!t;!t&&(t=NC(r));EC(t,e,r,i,n,s);if(o==="group"){var l=t.children()||[];var u=r.children||[];if(r.diffChildrenByName){GC({oldChildren:l,newChildren:u,dataIndex:e,animatableModel:i,group:t,data:n})}else{var h=0;for(;h<u.length;h++){VC(t.childAt(h),e,u[h],i,t,n)}for(;h<l.length;h++){l[h]&&t.remove(l[h])}}}a.add(t);return t}function GC(t){new ud(t.oldChildren,t.newChildren,FC,FC,t).add(WC).update(WC).remove(HC).execute()}function FC(t,e){var r=t&&t.name;return r!=null?r:kC+e}function WC(t,e){var r=this.context;var i=t!=null?r.newChildren[t]:null;var a=e!=null?r.oldChildren[e]:null;VC(a,r.dataIndex,i,r.animatableModel,r.group,r.data)}function HC(t){var e=this.context;var r=e.oldChildren[t];r&&e.group.remove(r)}Zv(function(t){var e=t.graphic;if(B(e)){if(!e[0]||!e[0].elements){t.graphic=[{elements:e}]}else{t.graphic=[t.graphic[0]]}}else if(e&&!e.elements){t.graphic=[{elements:[e]}]}});var ZC=td({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null;ZC.superApply(this,"mergeOption",arguments);this.option.elements=e},optionUpdated:function(t,e){var r=this.option;var i=(e?r:t).elements;var a=r.elements=e?[]:r.elements;var n=[];this._flatten(i,n);var o=ja(a,n);Xa(o);var s=this._elOptionsToUpdate=[];L(o,function(t,e){var r=t.option;if(A){K(F(r)||t.exist,"Empty graphic option definition")}if(!r){return}s.push(r);qC(t,r);$C(a,e,r);KC(a[e],r)},this);for(var l=a.length-1;l>=0;l--){if(a[l]==null){a.splice(l,1)}else{delete a[l].$action}}},_flatten:function(t,r,i){L(t,function(t){if(!t){return}if(i){t.parentOption=i}r.push(t);var e=t.children;if(t.type==="group"&&e){this._flatten(e,r,t)}delete t.children},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;this._elOptionsToUpdate=null;return t}});ed({type:"graphic",init:function(t,e){this._elMap=it();this._lastGraphicModel},render:function(t,e,r){if(t!==this._lastGraphicModel){this._clear()}this._lastGraphicModel=t;this._updateElements(t,r);this._relocate(t,r)},_updateElements:function(t,e){var r=t.useElOptionsToUpdate();if(!r){return}var u=this._elMap;var h=this.group;L(r,function(t){var e=t.$action;var r=t.id;var i=u.get(r);var a=t.parentId;var n=a!=null?u.get(a):h;if(t.type==="text"){var o=t.style;if(t.hv&&t.hv[1]){o.textVerticalAlign=o.textBaseline=null}!o.hasOwnProperty("textFill")&&o.fill&&(o.textFill=o.fill);!o.hasOwnProperty("textStroke")&&o.stroke&&(o.textStroke=o.stroke)}var s=XC(t);if(A){i&&K(n===i.parent,"Changing parent is not supported.")}if(!e||e==="merge"){i?i.attr(s):UC(r,n,s,u)}else if(e==="replace"){jC(i,u);UC(r,n,s,u)}else if(e==="remove"){jC(i,u)}var l=u.get(r);if(l){l.__ecGraphicWidth=t.width;l.__ecGraphicHeight=t.height}})},_relocate:function(t,e){var r=t.option.elements;var i=this.group;var a=this._elMap;for(var n=r.length-1;n>=0;n--){var o=r[n];var s=a.get(o.id);if(!s){continue}var l=s.parent;var u=l===i?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};Lu(s,o,u,null,{hv:o.hv,boundingMode:o.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){jC(t,e)});this._elMap=it()},dispose:function(){this._clear()}});function UC(t,e,r,i){var a=r.type;if(A){K(a,"graphic type MUST be set")}var n=Il[a.charAt(0).toUpperCase()+a.slice(1)];if(A){K(n,"graphic type can not be found")}var o=new n(r);e.add(o);i.set(t,o);o.__ecGraphicId=t}function jC(t,e){var r=t&&t.parent;if(r){t.type==="group"&&t.traverse(function(t){jC(t,e)});e.removeKey(t.__ecGraphicId);r.remove(t)}}function XC(e){e=N({},e);L(["id","parentId","$action","hv","bounding"].concat(bu),function(t){delete e[t]});return e}function YC(e,t){var r;L(t,function(t){e[t]!=null&&e[t]!=="auto"&&(r=true)});return r}function qC(t,e){var r=t.exist;e.id=t.keyInfo.id;!e.type&&r&&(e.type=r.type);if(e.parentId==null){var i=e.parentOption;if(i){e.parentId=i.id}else if(r){e.parentId=r.parentId}}e.parentOption=null}function $C(t,e,r){var i=N({},r);var a=t[e];var n=r.$action||"merge";if(n==="merge"){if(a){if(A){var o=r.type;K(!o||a.type===o,'Please set $action: "replace" to change `type`')}y(a,i,true);Pu(a,i,{ignoreSize:true});Eu(r,a)}else{t[e]=i}}else if(n==="replace"){t[e]=i}else if(n==="remove"){a&&(t[e]=null)}}function KC(t,e){if(!t){return}t.hv=e.hv=[YC(e,["left","right"]),YC(e,["top","bottom"])];if(t.type==="group"){t.width==null&&(t.width=e.width=0);t.height==null&&(t.height=e.height=0)}}var JC=td({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:true},init:function(t,e,r){this.mergeDefaultAndTheme(t,r);t.selected=t.selected||{}},mergeOption:function(t){JC.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){var e=false;for(var r=0;r<t.length;r++){var i=t[r].get("name");if(this.isSelected(i)){this.select(i);e=true;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(n){var o=[];var s=[];n.eachRawSeries(function(t){var e=t.name;s.push(e);var r;if(t.legendDataProvider){var i=t.legendDataProvider();var a=i.mapArray(i.getName);if(!n.isSeriesFiltered(t)){s=s.concat(a)}if(a.length){o=o.concat(a)}else{r=true}}else{r=true}if(r&&Ya(t)){o.push(t.name)}});this._availableNames=s;var t=this.get("data")||o;var e=T(t,function(t){if(typeof t==="string"||typeof t==="number"){t={name:t}}return new Pl(t,this,this.ecModel)},this);this._data=e},getData:function(){return this._data},select:function(t){var e=this.option.selected;var r=this.get("selectedMode");if(r==="single"){var i=this._data;L(i,function(t){e[t.get("name")]=false})}e[t]=true},unSelect:function(t){if(this.get("selectedMode")!=="single"){this.option.selected[t]=false}},toggleSelected:function(t){var e=this.option.selected;if(!e.hasOwnProperty(t)){e[t]=true}this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&S(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:true,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:true,tooltip:{show:false}}});function QC(e,r,t){var a={};var n=e==="toggleSelected";var o;t.eachComponent("legend",function(i){if(n&&o!=null){i[o?"select":"unSelect"](r.name)}else{i[e](r.name);o=i.isSelected(r.name)}var t=i.getData();L(t,function(t){var e=t.get("name");if(e==="\n"||e===""){return}var r=i.isSelected(e);if(a.hasOwnProperty(e)){a[e]=a[e]&&r}else{a[e]=r}})});return{name:r.name,selected:a}}Xv("legendToggleSelect","legendselectchanged",R(QC,"toggleSelected"));Xv("legendSelect","legendselected",R(QC,"select"));Xv("legendUnSelect","legendunselected",R(QC,"unSelect"));function tL(t,e,r){var i=e.getBoxLayoutParams();var a=e.get("padding");var n={width:r.getWidth(),height:r.getHeight()};var o=Cu(i,n,a);Iu(e.get("orient"),t,e.get("itemGap"),o.width,o.height);Lu(t,i,n,a)}function eL(t,e){var r=lu(e.get("padding"));var i=e.getItemStyle(["color","opacity"]);i.fill=e.get("backgroundColor");var t=new _s({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:i,silent:true,z2:-1});return t}var rL=R;var iL=L;var aL=cr;var nL=ed({type:"legend.plain",newlineDisabled:false,init:function(){this.group.add(this._contentGroup=new aL);this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,r){this.resetInner();if(!t.get("show",true)){return}var i=t.get("align");if(!i||i==="auto"){i=t.get("left")==="right"&&t.get("orient")==="vertical"?"right":"left"}this.renderInner(i,t,e,r);var a=t.getBoxLayoutParams();var n={width:r.getWidth(),height:r.getHeight()};var o=t.get("padding");var s=Cu(a,n,o);var l=this.layoutInner(t,i,s);var u=Cu(C({width:l.width,height:l.height},a),n,o);this.group.attr("position",[u.x-l.x,u.y-l.y]);this.group.add(this._backgroundEl=eL(l,t))},resetInner:function(){this.getContentGroup().removeAll();this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(u,h,f,c){var v=this.getContentGroup();var d=it();var p=h.get("selectedMode");iL(h.getData(),function(o,s){var l=o.get("name");if(!this.newlineDisabled&&(l===""||l==="\n")){v.add(new aL({newline:true}));return}var t=f.getSeriesByName(l)[0];if(d.get(l)){return}if(t){var e=t.getData();var r=e.getVisual("color");if(typeof r==="function"){r=r(t.getDataParams(0))}var i=e.getVisual("legendSymbol")||"roundRect";var a=e.getVisual("symbol");var n=this._createItem(l,s,o,h,i,a,u,r,p);n.on("click",rL(oL,l,c)).on("mouseover",rL(sL,t,null,c)).on("mouseout",rL(lL,t,null,c));d.set(l,true)}else{f.eachRawSeries(function(t){if(d.get(l)){return}if(t.legendDataProvider){var e=t.legendDataProvider();var r=e.indexOfName(l);if(r<0){return}var i=e.getItemVisual(r,"color");var a="roundRect";var n=this._createItem(l,s,o,h,a,null,u,i,p);n.on("click",rL(oL,l,c)).on("mouseover",rL(sL,t,l,c)).on("mouseout",rL(lL,t,l,c));d.set(l,true)}},this)}if(A){if(!d.get(l)){console.warn(l+" series not exists. Legend data should be same with series name or data name.")}}},this)},_createItem:function(t,e,r,i,a,n,o,s,l){var u=i.get("itemWidth");var h=i.get("itemHeight");var f=i.get("inactiveColor");var c=i.isSelected(t);var v=new aL;var d=r.getModel("textStyle");var p=r.get("icon");var g=r.getModel("tooltip");var m=g.parentModel;a=p||a;v.add(Qp(a,0,0,u,h,c?s:f,true));if(!p&&n&&(n!==a||n=="none")){var y=h*.8;if(n==="none"){n="circle"}v.add(Qp(n,(u-y)/2,(h-y)/2,y,y,c?s:f))}var x=o==="left"?u+5:-5;var _=o;var w=i.get("formatter");var b=t;if(typeof w==="string"&&w){b=w.replace("{name}",t!=null?t:"")}else if(typeof w==="function"){b=w(t)}v.add(new ls({style:ol({},d,{text:b,x:x,y:h/2,textFill:c?d.getTextColor():f,textAlign:_,textVerticalAlign:"middle"})}));var S=new _s({shape:v.getBoundingRect(),invisible:true,tooltip:g.get("show")?N({content:t,formatter:m.get("formatter",true)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},g.option):null});v.add(S);v.eachChild(function(t){t.silent=true});S.silent=!l;this.getContentGroup().add(v);al(v);v.__legendDataIndex=e;return v},layoutInner:function(t,e,r){var i=this.getContentGroup();Iu(t.get("orient"),i,t.get("itemGap"),r.width,r.height);var a=i.getBoundingRect();i.attr("position",[-a.x,-a.y]);return this.group.getBoundingRect()}});function oL(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function sL(t,e,r){var i=r.getZr().storage.getDisplayList()[0];if(!(i&&i.useHoverLayer)){t.get("legendHoverLink")&&r.dispatchAction({type:"highlight",seriesName:t.name,name:e})}}function lL(t,e,r){var i=r.getZr().storage.getDisplayList()[0];if(!(i&&i.useHoverLayer)){t.get("legendHoverLink")&&r.dispatchAction({type:"downplay",seriesName:t.name,name:e})}}var uL=function(t){var r=t.findComponents({mainType:"legend"});if(r&&r.length){t.filterSeries(function(t){for(var e=0;e<r.length;e++){if(!r[e].isSelected(t.name)){return false}}return true})}};Uv(uL);Ru.registerSubTypeDefaulter("legend",function(){return"plain"});var hL=JC.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,r,i){var a=Nu(t);hL.superCall(this,"init",t,e,r,i);fL(this,t,a)},mergeOption:function(t,e){hL.superCall(this,"mergeOption",t,e);fL(this,this.option,t)},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function fL(t,e,r){var i=t.getOrient();var a=[1,1];a[i.index]=0;Pu(e,r,{type:"box",ignoreSize:a})}var cL=cr;var vL=["width","height"];var dL=["x","y"];var pL=nL.extend({type:"legend.scroll",newlineDisabled:true,init:function(){pL.superCall(this,"init");this._currentIndex=0;this.group.add(this._containerGroup=new cL);this._containerGroup.add(this.getContentGroup());this.group.add(this._controllerGroup=new cL);this._showController},resetInner:function(){pL.superCall(this,"resetInner");this._controllerGroup.removeAll();this._containerGroup.removeClipPath();this._containerGroup.__rectSize=null},renderInner:function(t,a,e,n){var o=this;pL.superCall(this,"renderInner",t,a,e,n);var s=this._controllerGroup;var l=a.get("pageIconSize",true);if(!B(l)){l=[l,l]}i("pagePrev",0);var r=a.getModel("pageTextStyle");s.add(new ls({name:"pageText",style:{textFill:r.getTextColor(),font:r.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:true}));i("pageNext",1);function i(t,e){var r=t+"DataIndex";var i=Ml(a.get("pageIcons",true)[a.getOrient().name][e],{onclick:z(o._pageGo,o,r,a,n)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});i.name=t;s.add(i)}},layoutInner:function(t,e,r){var i=this.getContentGroup();var a=this._containerGroup;var n=this._controllerGroup;var o=t.getOrient().index;var s=vL[o];var l=vL[1-o];var u=dL[1-o];Iu(t.get("orient"),i,t.get("itemGap"),!o?null:r.width,o?null:r.height);Iu("horizontal",n,t.get("pageButtonItemGap",true));var h=i.getBoundingRect();var f=n.getBoundingRect();var c=this._showController=h[s]>r[s];var v=[-h.x,-h.y];v[o]=i.position[o];var d=[0,0];var p=[-f.x,-f.y];var g=X(t.get("pageButtonGap",true),t.get("itemGap",true));if(c){var m=t.get("pageButtonPosition",true);if(m==="end"){p[o]+=r[s]-f[s]}else{d[o]+=f[s]+g}}p[1-o]+=h[l]/2-f[l]/2;i.attr("position",v);a.attr("position",d);n.attr("position",p);var y=this.group.getBoundingRect();var y={x:0,y:0};y[s]=c?r[s]:h[s];y[l]=Math.max(h[l],f[l]);y[u]=Math.min(0,f[u]+p[1-o]);a.__rectSize=r[s];if(c){var x={x:0,y:0};x[s]=Math.max(r[s]-f[s]-g,0);x[l]=y[l];a.setClipPath(new _s({shape:x}));a.__rectSize=x[s]}else{n.eachChild(function(t){t.attr({invisible:true,silent:true})})}var _=this._getPageInfo(t);_.pageIndex!=null&&gl(i,{position:_.contentPosition},c?t:false);this._updatePageInfoView(t,_);return y},_pageGo:function(t,e,r){var i=this._getPageInfo(e)[t];i!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,a){var n=this._controllerGroup;L(["pagePrev","pageNext"],function(t){var e=a[t+"DataIndex"]!=null;var r=n.childOfName(t);if(r){r.setStyle("fill",e?i.get("pageIconColor",true):i.get("pageIconInactiveColor",true));r.cursor=e?"pointer":"default"}});var t=n.childOfName("pageText");var e=i.get("pageFormatter");var r=a.pageIndex;var o=r!=null?r+1:0;var s=a.pageCount;t&&e&&t.setStyle("text",G(e)?e.replace("{current}",o).replace("{total}",s):e({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",true);var r=this.getContentGroup();var i=r.getBoundingRect();var a=this._containerGroup.__rectSize;var n=t.getOrient().index;var o=vL[n];var s=vL[1-n];var l=dL[n];var u=r.position.slice();var h;var f;var c;var v;if(this._showController){r.eachChild(function(t){if(t.__legendDataIndex===e){v=t}})}else{v=r.childAt(0)}var d=a?Math.ceil(i[o]/a):0;if(v){var p=v.getBoundingRect();var g=v.position[n]+p[l];u[n]=-g-i[l];h=Math.floor(d*(g+p[l]+a/2)/i[o]);h=i[o]&&d?Math.max(0,Math.min(d-1,h)):-1;var m={x:0,y:0};m[o]=a;m[s]=i[s];m[l]=-u[n]-i[l];var y;var x=r.children();r.eachChild(function(t,e){var r=b(t);if(r.intersect(m)){y==null&&(y=e);c=t.__legendDataIndex}if(e===x.length-1&&r[l]+r[o]<=m[l]+m[o]){c=null}});if(y!=null){var _=x[y];var w=b(_);m[l]=w[l]+w[o]-m[o];if(y<=0&&w[l]>=m[l]){f=null}else{while(y>0&&b(x[y-1]).intersect(m)){y--}f=x[y].__legendDataIndex}}}return{contentPosition:u,pageIndex:h,pageCount:d,pagePrevDataIndex:f,pageNextDataIndex:c};function b(t){var e=t.getBoundingRect().clone();e[l]+=t.position[n];return e}}});Xv("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(r)})});td({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:true,showContent:true,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:false,displayMode:"single",confine:false,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:false,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var gL=L;var mL=su;var yL=["","-webkit-","-moz-","-o-"];var xL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function _L(t){var e="cubic-bezier(0.23, 1, 0.32, 1)";var r="left "+t+"s "+e+","+"top "+t+"s "+e;return T(yL,function(t){return t+"transition:"+r}).join(";")}function wL(r){var i=[];var t=r.get("fontSize");var e=r.getTextColor();e&&i.push("color:"+e);i.push("font:"+r.getFont());t&&i.push("line-height:"+Math.round(t*3/2)+"px");gL(["decoration","align"],function(t){var e=r.get(t);e&&i.push("text-"+t+":"+e)});return i.join(";")}function bL(a){var n=[];var t=a.get("transitionDuration");var e=a.get("backgroundColor");var r=a.getModel("textStyle");var i=a.get("padding");t&&n.push(_L(t));if(e){if(m.canvasSupported){n.push("background-Color:"+e)}else{n.push("background-Color:#"+ke(e));n.push("filter:alpha(opacity=70)")}}gL(["width","color","radius"],function(t){var e="border-"+t;var r=mL(e);var i=a.get(r);i!=null&&n.push(e+":"+i+(t==="color"?"":"px"))});n.push(wL(r));if(i!=null){n.push("padding:"+lu(i).join("px ")+"px")}return n.join(";")+";"}function SL(r,t){if(m.wxa){return null}var e=document.createElement("div");var i=this._zr=t.getZr();this.el=e;this._x=t.getWidth()/2;this._y=t.getHeight()/2;r.appendChild(e);this._container=r;this._show=false;this._hideTimeout;var a=this;e.onmouseenter=function(){if(a._enterable){clearTimeout(a._hideTimeout);a._show=true}a._inContent=true};e.onmousemove=function(t){t=t||window.event;if(!a._enterable){var e=i.handler;ia(r,t,true);e.dispatch("mousemove",t)}};e.onmouseleave=function(){if(a._enterable){if(a._show){a.hideLater(a._hideDelay)}}a._inContent=false}}SL.prototype={constructor:SL,_enterable:true,update:function(){var t=this._container;var e=t.currentStyle||document.defaultView.getComputedStyle(t);var r=t.style;if(r.position!=="absolute"&&e.position!=="absolute"){r.position="relative"}},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=xL+bL(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||"");e.style.display=e.innerHTML?"block":"none";this._show=true},setContent:function(t){this.el.innerHTML=t==null?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var r=this._zr;var i;if(r&&r.painter&&(i=r.painter.getViewportRootOffset())){t+=i.offsetLeft;e+=i.offsetTop}var a=this.el.style;a.left=t+"px";a.top=e+"px";this._x=t;this._y=e},hide:function(){this.el.style.display="none";this._show=false},hideLater:function(t){if(this._show&&!(this._inContent&&this._enterable)){if(t){this._hideDelay=t;this._show=false;this._hideTimeout=setTimeout(z(this.hide,this),t)}else{this.hide()}}},isShow:function(){return this._show}};var ML=z;var IL=L;var DL=Wl;var TL=new _s({shape:{x:-1,y:-1,width:2,height:2}});ed({type:"tooltip",init:function(t,e){if(m.node){return}var r=new SL(e.getDom(),e);this._tooltipContent=r},render:function(t,e,r){if(m.node||m.wxa){return}this.group.removeAll();this._tooltipModel=t;this._ecModel=e;this._api=r;this._lastDataByCoordSys=null;this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update();i.setEnterable(t.get("enterable"));this._initGlobalListener();this._keepShow()},_initGlobalListener:function(){var t=this._tooltipModel;var i=t.get("triggerOn");fA("itemTooltip",this._api,ML(function(t,e,r){if(i!=="none"){if(i.indexOf(t)>=0){this._tryShow(e,r)}else if(t==="leave"){this._hide(r)}}},this))},_keepShow:function(){var t=this._tooltipModel;var e=this._ecModel;var r=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var i=this;clearTimeout(this._refreshUpdateTimeout);this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,r,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,r,i){if(i.from===this.uid||m.node){return}var a=CL(i,r);this._ticket="";var n=i.dataByCoordSys;if(i.tooltip&&i.x!=null&&i.y!=null){var o=TL;o.position=[i.x,i.y];o.update();o.tooltip=i.tooltip;this._tryShow({offsetX:i.x,offsetY:i.y,target:o},a)}else if(n){this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},a)}else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,e,r,i)){return}var s=XT(i,e);var l=s.point[0];var u=s.point[1];if(l!=null&&u!=null){this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},a)}}else if(i.x!=null&&i.y!=null){r.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y});this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:r.getZr().findHover(i.x,i.y).target,event:{}},a)}},manuallyHideTip:function(t,e,r,i){var a=this._tooltipContent;if(!this._alwaysShowContent&&this._tooltipModel){a.hideLater(this._tooltipModel.get("hideDelay"))}this._lastX=this._lastY=null;if(i.from!==this.uid){this._hide(CL(i,r))}},_manuallyAxisShowTip:function(t,e,r,i){var a=i.seriesIndex;var n=i.dataIndex;var o=e.getComponent("axisPointer").coordSysAxesInfo;if(a==null||n==null||o==null){return}var s=e.getSeriesByIndex(a);if(!s){return}var l=s.getData();var t=AL([l.getItemModel(n),s,(s.coordinateSystem||{}).model,t]);if(t.get("trigger")!=="axis"){return}r.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:n,position:i.position});return true},_tryShow:function(t,e){var r=t.target;var i=this._tooltipModel;if(!i){return}this._lastX=t.offsetX;this._lastY=t.offsetY;var a=t.dataByCoordSys;if(a&&a.length){this._showAxisTooltip(a,t)}else if(r&&r.dataIndex!=null){this._lastDataByCoordSys=null;this._showSeriesItemTooltip(t,r,e)}else if(r&&r.tooltip){this._lastDataByCoordSys=null;this._showComponentItemTooltip(t,r,e)}else{this._lastDataByCoordSys=null;this._hide(e)}},_showOrMove:function(t,e){var r=t.get("showDelay");e=z(e,this);clearTimeout(this._showTimout);r>0?this._showTimout=setTimeout(e,r):e()},_showAxisTooltip:function(t,e){var u=this._ecModel;var r=this._tooltipModel;var i=[e.offsetX,e.offsetY];var h=[];var f=[];var a=AL([e.tooltipOption,r]);IL(t,function(t){IL(t.dataByAxis,function(a){var n=u.getComponent(a.axisDim+"Axis",a.axisIndex);var o=a.value;var s=[];if(!n||o==null){return}var l=kA(o,n.axis,u,a.seriesDataIndices,a.valueLabelOpt);L(a.seriesDataIndices,function(t){var e=u.getSeriesByIndex(t.seriesIndex);var r=t.dataIndexInside;var i=e&&e.getDataParams(r);i.axisDim=a.axisDim;i.axisIndex=a.axisIndex;i.axisType=a.axisType;i.axisId=a.axisId;i.axisValue=Wp(n.axis,o);i.axisValueLabel=l;if(i){f.push(i);s.push(e.formatTooltip(r,true))}});var t=l;h.push((t?uu(t)+"<br />":"")+s.join("<br />"))})},this);h.reverse();h=h.join("<br /><br />");var n=e.position;this._showOrMove(a,function(){if(this._updateContentNotChangedOnAxis(t)){this._updatePosition(a,n,i[0],i[1],this._tooltipContent,f)}else{this._showTooltipContent(a,h,f,Math.random(),i[0],i[1],n)}})},_showSeriesItemTooltip:function(t,e,r){var i=this._ecModel;var a=e.seriesIndex;var n=i.getSeriesByIndex(a);var o=e.dataModel||n;var s=e.dataIndex;var l=e.dataType;var u=o.getData();var h=AL([u.getItemModel(s),o,n&&(n.coordinateSystem||{}).model,this._tooltipModel]);var f=h.get("trigger");if(f!=null&&f!=="item"){return}var c=o.getDataParams(s,l);var v=o.formatTooltip(s,false,l);var d="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,v,c,d,t.offsetX,t.offsetY,t.position,t.target)});r({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})},_showComponentItemTooltip:function(t,e,r){var i=e.tooltip;if(typeof i==="string"){var a=i;i={content:a,formatter:a}}var n=new Pl(i,this._tooltipModel,this._ecModel);var o=n.get("content");var s=Math.random();this._showOrMove(n,function(){this._showTooltipContent(n,o,n.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)});r({type:"showTip",from:this.uid})},_showTooltipContent:function(r,t,i,e,a,n,o,s){this._ticket="";if(!r.get("showContent")||!r.get("show")){return}var l=this._tooltipContent;var u=r.get("formatter");o=o||r.get("position");var h=t;if(u&&typeof u==="string"){h=cu(u,i,true)}else if(typeof u==="function"){var f=ML(function(t,e){if(t===this._ticket){l.setContent(e);this._updatePosition(r,o,a,n,l,i,s)}},this);this._ticket=e;h=u(i,e,f)}l.setContent(h);l.show(r);this._updatePosition(r,o,a,n,l,i,s)},_updatePosition:function(t,e,r,i,a,n,o){var s=this._api.getWidth();var l=this._api.getHeight();e=e||t.get("position");var u=a.getSize();var h=t.get("align");var f=t.get("verticalAlign");var c=o&&o.getBoundingRect().clone();o&&c.applyTransform(o.transform);if(typeof e==="function"){e=e([r,i],n,a.el,c,{viewSize:[s,l],contentSize:u.slice()})}if(B(e)){r=DL(e[0],s);i=DL(e[1],l)}else if(F(e)){e.width=u[0];e.height=u[1];var v=Cu(e,{width:s,height:l});r=v.x;i=v.y;h=null;f=null}else if(typeof e==="string"&&o){var d=NL(e,c,u);r=d[0];i=d[1]}else{var d=LL(r,i,a.el,s,l,h?null:20,f?null:20);r=d[0];i=d[1]}h&&(r-=EL(h)?u[0]/2:h==="right"?u[0]:0);f&&(i-=EL(f)?u[1]/2:f==="bottom"?u[1]:0);if(t.get("confine")){var d=kL(r,i,a.el,s,l);r=d[0];i=d[1]}a.moveTo(r,i)},_updateContentNotChangedOnAxis:function(a){var t=this._lastDataByCoordSys;var o=!!t&&t.length===a.length;o&&IL(t,function(t,e){var r=t.dataByAxis||{};var i=a[e]||{};var n=i.dataByAxis||[];o&=r.length===n.length;o&&IL(r,function(t,e){var r=n[e]||{};var i=t.seriesDataIndices||[];var a=r.seriesDataIndices||[];o&=t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&i.length===a.length;o&&IL(i,function(t,e){var r=a[e];o&=t.seriesIndex===r.seriesIndex&&t.dataIndex===r.dataIndex})})});this._lastDataByCoordSys=a;return!!o},_hide:function(t){this._lastDataByCoordSys=null;t({type:"hideTip",from:this.uid})},dispose:function(t,e){if(m.node){return}this._tooltipContent.hide();mA("itemTooltip",e)}});function AL(t){var e=t.pop();while(t.length){var r=t.pop();if(r){if(Pl.isInstance(r)){r=r.get("tooltip",true)}if(typeof r==="string"){r={formatter:r}}e=new Pl(r,e,e.ecModel)}}return e}function CL(t,e){return t.dispatchAction||z(e.dispatchAction,e)}function LL(t,e,r,i,a,n,o){var s=PL(r);var l=s.width;var u=s.height;if(n!=null){if(t+l+n>i){t-=l+n}else{t+=n}}if(o!=null){if(e+u+o>a){e-=u+o}else{e+=o}}return[t,e]}function kL(t,e,r,i,a){var n=PL(r);var o=n.width;var s=n.height;t=Math.min(t+o,i)-o;e=Math.min(e+s,a)-s;t=Math.max(t,0);e=Math.max(e,0);return[t,e]}function PL(t){var e=t.clientWidth;var r=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);if(i){e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10);r+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)}}return{width:e,height:r}}function NL(t,e,r){var i=r[0];var a=r[1];var n=5;var o=0;var s=0;var l=e.width;var u=e.height;switch(t){case"inside":o=e.x+l/2-i/2;s=e.y+u/2-a/2;break;case"top":o=e.x+l/2-i/2;s=e.y-a-n;break;case"bottom":o=e.x+l/2-i/2;s=e.y+u+n;break;case"left":o=e.x-i-n;s=e.y+u/2-a/2;break;case"right":o=e.x+l+n;s=e.y+u/2-a/2}return[o,s]}function EL(t){return t==="center"||t==="middle"}Xv({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){});Xv({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});function OL(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function zL(t){return t.dim}function RL(t,e,r){var P=r.getWidth();var N=r.getHeight();var E={};var O=BL(k(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&t.coordinateSystem.type==="polar"}));e.eachSeriesByType(t,function(t){if(t.coordinateSystem.type!=="polar"){return}var e=t.getData();var r=t.coordinateSystem;var i=r.getBaseAxis();var a=OL(t);var n=O[zL(i)][a];var o=n.offset;var s=n.width;var l=r.getOtherAxis(i);var u=t.get("center")||["50%","50%"];var h=Wl(u[0],P);var f=Wl(u[1],N);var c=t.get("barMinHeight")||0;var v=t.get("barMinAngle")||0;E[a]=E[a]||[];var d=e.mapDimension(l.dim);var p=e.mapDimension(i.dim);var g=Hd(e,d,p);var m=l.getExtent()[0];for(var y=0,x=e.count();y<x;y++){var _=e.get(d,y);var w=e.get(p,y);if(isNaN(_)){continue}var b=_>=0?"p":"n";var S=m;if(g){if(!E[a][w]){E[a][w]={p:m,n:m}}S=E[a][w][b]}var M;var I;var D;var T;if(l.dim==="radius"){var A=l.dataToRadius(_)-m;var C=i.dataToAngle(w);if(Math.abs(A)<c){A=(A<0?-1:1)*c}M=S;I=S+A;D=C-o;T=D-s;g&&(E[a][w][b]=I)}else{var L=l.dataToAngle(_,true)-m;var k=i.dataToRadius(w);if(Math.abs(L)<v){L=(L<0?-1:1)*v}M=k+o;I=M+s;D=S;T=S+L;g&&(E[a][w][b]=T)}e.setItemLayout(y,{cx:h,cy:f,r0:M,r:I,startAngle:-D*Math.PI/180,endAngle:-T*Math.PI/180})}},this)}function BL(t,e){var d={};L(t,function(t,e){var r=t.getData();var i=t.coordinateSystem;var a=i.getBaseAxis();var n=a.getExtent();var o=a.type==="category"?a.getBandWidth():Math.abs(n[1]-n[0])/r.count();var s=d[zL(a)]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}};var l=s.stacks;d[zL(a)]=s;var u=OL(t);if(!l[u]){s.autoWidthCount++}l[u]=l[u]||{width:0,maxWidth:0};var h=Wl(t.get("barWidth"),o);var f=Wl(t.get("barMaxWidth"),o);var c=t.get("barGap");var v=t.get("barCategoryGap");if(h&&!l[u].width){h=Math.min(s.remainedWidth,h);l[u].width=h;s.remainedWidth-=h}f&&(l[u].maxWidth=f);c!=null&&(s.gap=c);v!=null&&(s.categoryGap=v)});var c={};L(d,function(t,r){c[r]={};var e=t.stacks;var i=t.bandWidth;var a=Wl(t.categoryGap,i);var n=Wl(t.gap,1);var o=t.remainedWidth;var s=t.autoWidthCount;var l=(o-a)/(s+(s-1)*n);l=Math.max(l,0);L(e,function(t,e){var r=t.maxWidth;if(r&&r<l){r=Math.min(r,o);if(t.width){r=Math.min(r,t.width)}o-=r;t.width=r;s--}});l=(o-a)/(s+(s-1)*n);l=Math.max(l,0);var u=0;var h;L(e,function(t,e){if(!t.width){t.width=l}h=t;u+=t.width*(1+n)});if(h){u-=h.width*n}var f=-u/2;L(e,function(t,e){c[r][e]=c[r][e]||{offset:f,width:t.width};f+=t.width*(1+n)})});return c}function VL(t,e){pg.call(this,"radius",t,e);this.type="category"}VL.prototype={constructor:VL,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToRadius:pg.prototype.dataToCoord,radiusToData:pg.prototype.coordToData};M(VL,pg);function GL(t,e){e=e||[0,360];pg.call(this,"angle",t,e);this.type="category"}GL.prototype={constructor:GL,pointToData:function(t,e){return this.polar.pointToData(t,e)[this.dim==="radius"?0:1]},dataToAngle:pg.prototype.dataToCoord,angleToData:pg.prototype.coordToData};M(GL,pg);var FL=function(t){this.name=t||"";this.cx=0;this.cy=0;this._radiusAxis=new VL;this._angleAxis=new GL;this._radiusAxis.polar=this._angleAxis.polar=this};FL.prototype={type:"polar",axisPointerEnabled:true,constructor:FL,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[];var r=this._angleAxis;var i=this._radiusAxis;r.scale.type===t&&e.push(r);i.scale.type===t&&e.push(i);return e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],e),this._angleAxis.angleToData(r[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx;var r=t[1]-this.cy;var i=this.getAngleAxis();var a=i.getExtent();var n=Math.min(a[0],a[1]);var o=Math.max(a[0],a[1]);i.inverse?n=o-360:o=n+360;var s=Math.sqrt(e*e+r*r);e/=s;r/=s;var l=Math.atan2(-r,e)/Math.PI*180;var u=l<n?1:-1;while(l<n||l>o){l+=u*360}return[s,l]},coordToPoint:function(t){var e=t[0];var r=t[1]/180*Math.PI;var i=Math.cos(r)*e+this.cx;var a=-Math.sin(r)*e+this.cy;return[i,a]}};var WL=Ru.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});y(WL.prototype,Hp);var HL={angle:{startAngle:90,clockwise:true,splitNumber:12,axisLabel:{rotate:false}},radius:{splitNumber:5}};function ZL(t,e){return e.type||(e.data?"category":"value")}wm("angle",WL,ZL,HL.angle);wm("radius",WL,ZL,HL.radius);td({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;var r=this.ecModel;r.eachComponent(t,function(t){if(t.getCoordSysModel()===this){e=t}},this);return e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});function UL(t,e,r){var i=e.get("center");var a=r.getWidth();var n=r.getHeight();t.cx=Wl(i[0],a);t.cy=Wl(i[1],n);var o=t.getRadiusAxis();var s=Math.min(a,n)/2;var l=Wl(e.get("radius"),s);o.inverse?o.setExtent(l,0):o.setExtent(0,l)}function jL(t,e){var r=this;var i=r.getAngleAxis();var a=r.getRadiusAxis();i.scale.setExtent(Infinity,-Infinity);a.scale.setExtent(Infinity,-Infinity);t.eachSeries(function(t){if(t.coordinateSystem===r){var e=t.getData();L(e.mapDimension("radius",true),function(t){a.scale.unionExtentFromData(e,t)});L(e.mapDimension("angle",true),function(t){i.scale.unionExtentFromData(e,t)})}});Rp(i.scale,i.model);Rp(a.scale,a.model);if(i.type==="category"&&!i.onBand){var n=i.getExtent();var o=360/i.scale.count();i.inverse?n[1]+=o:n[1]-=o;i.setExtent(n[0],n[1])}}function XL(t,e){t.type=e.get("type");t.scale=Bp(e);t.onBand=e.get("boundaryGap")&&t.type==="category";t.inverse=e.get("inverse");if(e.mainType==="angleAxis"){t.inverse^=e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t;t.model=e}var YL={dimensions:FL.prototype.dimensions,create:function(r,s){var l=[];r.eachComponent("polar",function(t,e){var r=new FL(e);r.update=jL;var i=r.getRadiusAxis();var a=r.getAngleAxis();var n=t.findAxisModel("radiusAxis");var o=t.findAxisModel("angleAxis");XL(i,n);XL(a,o);UL(r,t,s);l.push(r);t.coordinateSystem=r;r.model=t});r.eachSeries(function(t){if(t.get("coordinateSystem")==="polar"){var e=r.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];if(A){if(!e){throw new Error('Polar "'+j(t.get("polarIndex"),t.get("polarId"),0)+'" not found')}}t.coordinateSystem=e.coordinateSystem}});return l}};Ah.register("polar",YL);var qL=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function $L(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],r]);var a=t.coordToPoint([e[1],r]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function KL(t){var e=t.getRadiusAxis();return e.inverse?0:1}vy.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){this.group.removeAll();if(!e.get("show")){return}var r=e.axis;var i=r.polar;var a=i.getRadiusAxis().getExtent();var n=r.getTicksCoords();if(r.type!=="category"){n.pop()}L(qL,function(t){if(e.get(t+".show")&&(!r.scale.isBlank()||t==="axisLine")){this["_"+t](e,i,n,a)}},this)},_axisLine:function(t,e,r,i){var a=t.getModel("axisLine.lineStyle");var n=new us({shape:{cx:e.cx,cy:e.cy,r:i[KL(e)]},style:a.getLineStyle(),z2:1,silent:true});n.style.fill=null;this.group.add(n)},_axisTick:function(t,e,r,i){var a=t.getModel("axisTick");var n=(a.get("inside")?-1:1)*a.get("length");var o=i[KL(e)];var s=T(r,function(t){return new ws({shape:$L(e,[o,o+n],t)})});this.group.add(Fs(s,{style:C(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,r,i){var a=t.axis;var n=t.getCategories();var o=t.getModel("axisLabel");var s=t.getFormattedLabels();var l=o.get("margin");var u=a.getLabelsCoords();for(var h=0;h<r.length;h++){var f=i[KL(e)];var c=e.coordToPoint([f+l,u[h]]);var v=e.cx;var d=e.cy;var p=Math.abs(c[0]-v)/f<.3?"center":c[0]>v?"left":"right";var g=Math.abs(c[1]-d)/f<.3?"middle":c[1]>d?"top":"bottom";if(n&&n[h]&&n[h].textStyle){o=new Pl(n[h].textStyle,o,o.ecModel)}var m=new ls({silent:true});this.group.add(m);ol(m.style,o,{x:c[0],y:c[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[h],textAlign:p,textVerticalAlign:g})}},_splitLine:function(t,e,r,i){var a=t.getModel("splitLine");var n=a.getModel("lineStyle");var o=n.get("color");var s=0;o=o instanceof Array?o:[o];var l=[];for(var u=0;u<r.length;u++){var h=s++%o.length;l[h]=l[h]||[];l[h].push(new ws({shape:$L(e,i,r[u])}))}for(var u=0;u<l.length;u++){this.group.add(Fs(l[u],{style:C({stroke:o[u%o.length]},n.getLineStyle()),silent:true,z:t.get("z")}))}},_splitArea:function(t,e,r,i){var a=t.getModel("splitArea");var n=a.getModel("areaStyle");var o=n.get("color");var s=0;o=o instanceof Array?o:[o];var l=[];var u=Math.PI/180;var h=-r[0]*u;var f=Math.min(i[0],i[1]);var c=Math.max(i[0],i[1]);var v=t.get("clockwise");for(var d=1;d<r.length;d++){var p=s++%o.length;l[p]=l[p]||[];l[p].push(new cs({shape:{cx:e.cx,cy:e.cy,r0:f,r:c,startAngle:h,endAngle:-r[d]*u,clockwise:v},silent:true}));h=-r[d]*u}for(var d=0;d<l.length;d++){this.group.add(Fs(l[d],{style:C({fill:o[d%o.length]},n.getAreaStyle()),silent:true}))}}});var JL=["axisLine","axisTickLabel","axisName"];var QL=["splitLine","splitArea"];vy.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){this.group.removeAll();if(!e.get("show")){return}var r=e.axis;var i=r.polar;var a=i.getAngleAxis();var n=r.getTicksCoords();var o=a.getExtent()[0];var s=r.getExtent();var l=tk(i,e,o);var u=new Fm(e,l);L(JL,u.add,u);this.group.add(u.getGroup());L(QL,function(t){if(e.get(t+".show")&&!r.scale.isBlank()){this["_"+t](e,i,o,s,n)}},this)},_splitLine:function(t,e,r,i,a){var n=t.getModel("splitLine");var o=n.getModel("lineStyle");var s=o.get("color");var l=0;s=s instanceof Array?s:[s];var u=[];for(var h=0;h<a.length;h++){var f=l++%s.length;u[f]=u[f]||[];u[f].push(new us({shape:{cx:e.cx,cy:e.cy,r:a[h]},silent:true}))}for(var h=0;h<u.length;h++){this.group.add(Fs(u[h],{style:C({stroke:s[h%s.length],fill:null},o.getLineStyle()),silent:true}))}},_splitArea:function(t,e,r,i,a){var n=t.getModel("splitArea");var o=n.getModel("areaStyle");var s=o.get("color");var l=0;s=s instanceof Array?s:[s];var u=[];var h=a[0];for(var f=1;f<a.length;f++){var c=l++%s.length;u[c]=u[c]||[];u[c].push(new cs({shape:{cx:e.cx,cy:e.cy,r0:h,r:a[f],startAngle:0,endAngle:Math.PI*2},silent:true}));h=a[f]}for(var f=0;f<u.length;f++){this.group.add(Fs(u[f],{style:C({fill:s[f%s.length]},o.getAreaStyle()),silent:true}))}}});function tk(t,e,r){return{position:[t.cx,t.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}var ek=bA.extend({makeElOption:function(t,e,r,i,a){var n=r.axis;if(n.dim==="angle"){this.animationThreshold=Math.PI/18}var o=n.polar;var s=o.getOtherAxis(n);var l=s.getExtent();var u;u=n["dataTo"+mu(n.dim)](e);var h=i.get("type");if(h&&h!=="none"){var f=AA(i);var c=ik[h](n,o,u,l,f);c.style=f;t.graphicKey=c.type;t.pointer=c}var v=i.get("label.margin");var d=rk(e,r,i,o,v);CA(t,r,i,a,d)}});function rk(t,e,r,i,a){var n=e.axis;var o=n.dataToCoord(t);var s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=i.getRadiusAxis().getExtent();var u;var h;var f;if(n.dim==="radius"){var c=Ut();$t(c,c,s);qt(c,c,[i.cx,i.cy]);u=xl([o,-a],c);var v=e.getModel("axisLabel").get("rotate")||0;var d=Fm.innerTextLayout(s,v*Math.PI/180,-1);h=d.textAlign;f=d.textVerticalAlign}else{var p=l[1];u=i.coordToPoint([p+a,o]);var g=i.cx;var m=i.cy;h=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right";f=Math.abs(u[1]-m)/p<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var ik={line:function(t,e,r,i,a){return t.dim==="angle"?{type:"Line",shape:EA(e.coordToPoint([i[0],r]),e.coordToPoint([i[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:r}}},shadow:function(t,e,r,i,a){var n=t.getBandWidth();var o=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:zA(e.cx,e.cy,i[0],i[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:zA(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};vy.registerAxisPointerClass("PolarAxisPointer",ek);$v(R(RL,"bar"));ed({type:"polar"});var ak=Ru.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){Ru.prototype.init.apply(this,arguments);Wa(t,"label",["show"])},optionUpdated:function(){var t=this.option;var r=this;t.regions=Ex.getFilledRegions(t.regions,t.map,t.nameMap);this._optionModelMap=D(t.regions||[],function(t,e){if(e.name){t.set(e.name,new Pl(e,r))}return t},it());this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:true,left:"center",top:"center",aspectScale:.75,silent:false,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:false,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:true,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Pl(null,this,this.ecModel)},getFormattedLabel:function(t,e){var r=this.getRegionModel(t);var i=r.get("label."+e+".formatter");var a={name:t};if(typeof i==="function"){a.status=e;return i(a)}else if(typeof i==="string"){return i.replace("{a}",t!=null?t:"")}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});I(ak,zy);ed({type:"geo",init:function(t,e){var r=new r_(e,true);this._mapDraw=r;this.group.add(r.group)},render:function(t,e,r,i){if(i&&i.type==="geoToggleSelect"&&i.from===this.uid){return}var a=this._mapDraw;if(t.get("show")){a.draw(t,e,r,this,i)}else{this._mapDraw.group.removeAll()}this.group.silent=t.get("silent")},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function nk(a,t){t.update="updateView";Xv(t,function(r,t){var i={};t.eachComponent({mainType:"geo",query:r},function(e){e[a](r.name);var t=e.coordinateSystem;L(t.regions,function(t){i[t.name]=e.isSelected(t.name)||false})});return{selected:i,name:r.name}})}nk("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"});nk("select",{type:"geoSelect",event:"geoselected"});nk("unSelect",{type:"geoUnSelect",event:"geounselected"});var ok=["rect","polygon","keep","clear"];var sk=function(t,e){var r=t&&t.brush;if(!B(r)){r=r?[r]:[]}if(!r.length){return}var i=[];L(r,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];if(e instanceof Array){i=i.concat(e)}});var a=t&&t.toolbox;if(B(a)){a=a[0]}if(!a){a={feature:{}};t.toolbox=[a]}var n=a.feature||(a.feature={});var o=n.brush||(n.brush={});var s=o.type||(o.type=[]);s.push.apply(s,i);lk(s);if(e&&!s.length){s.push.apply(s,ok)}};function lk(r){var e={};L(r,function(t){e[t]=1});r.length=0;L(e,function(t,e){r.push(e)})}var uk=L;function hk(t){if(t){for(var e in t){if(t.hasOwnProperty(e)){return true}}}}function fk(t,e,n){var r={};uk(e,function(i){var a=r[i]=o();uk(t[i],function(t,e){if(!Aw.isValidType(e)){return}var r={type:e,visual:t};n&&n(r,i);a[e]=new Aw(r);if(e==="opacity"){r=P(r);r.type="colorAlpha";a.__hidden.__alphaForOpacity=new Aw(r)}})});return r;function o(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}}function ck(e,r,t){var i;L(t,function(t){if(r.hasOwnProperty(t)&&hk(r[t])){i=true}});i&&L(t,function(t){if(r.hasOwnProperty(t)&&hk(r[t])){e[t]=P(r[t])}else{delete e[t]}})}function vk(t,u,h,f,c,v){var d={};L(t,function(t){var e=Aw.prepareVisualTypes(u[t]);d[t]=e});var p;function g(t){return h.getItemVisual(p,t)}function m(t,e){h.setItemVisual(p,t,e)}if(v==null){h.each(e)}else{h.each([v],e)}function e(t,e){p=v==null?t:e;var r=h.getRawDataItem(p);if(r&&r.visualMap===false){return}var i=f.call(c,t);var a=u[i];var n=d[i];for(var o=0,s=n.length;o<s;o++){var l=n[o];a[l]&&a[l].applyVisual(t,g,m)}}}function dk(t,v,d,p){var g={};L(t,function(t){var e=Aw.prepareVisualTypes(v[t]);g[t]=e});function e(t,r){if(p!=null){p=r.getDimension(p)}function e(t){return r.getItemVisual(a,t)}function i(t,e){r.setItemVisual(a,t,e)}for(var a=t.start;a<t.end;a++){var n=r.getRawDataItem(a);if(n&&n.visualMap===false){return}var o=p!=null?r.get(p,a,true):a;var s=d(o);var l=v[s];var u=g[s];for(var h=0,f=u.length;h<f;h++){var c=u[h];l[c]&&l[c].applyVisual(o,e,i)}}}return{progress:e}}var pk={lineX:gk(0),lineY:gk(1),rect:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])},rect:function(t,e,r){return t&&r.boundingRect.intersect(t)}},polygon:{point:function(t,e,r){return t&&r.boundingRect.contain(t[0],t[1])&&sg(r.range,t[0],t[1])},rect:function(t,e,r){var i=r.range;if(!t||i.length<=1){return false}var a=t.x;var n=t.y;var o=t.width;var s=t.height;var l=i[0];if(sg(i,a,n)||sg(i,a+o,n)||sg(i,a,n+s)||sg(i,a+o,n+s)||fr.create(t).contain(l[0],l[1])||yk(a,n,a+o,n,i)||yk(a,n,a,n+s,i)||yk(a+o,n,a+o,n+s,i)||yk(a,n+s,a+o,n+s,i)){return true}}}};function gk(n){var o=["x","y"];var s=["width","height"];return{point:function(t,e,r){if(t){var i=r.range;var a=t[n];return mk(a,i)}},rect:function(t,e,r){if(t){var i=r.range;var a=[t[o[n]],t[o[n]]+t[s[n]]];a[1]<a[0]&&a.reverse();return mk(a[0],i)||mk(a[1],i)||mk(i[0],a)||mk(i[1],a)}}}}function mk(t,e){return e[0]<=t&&t<=e[1]}function yk(t,e,r,i,a){for(var n=0,o=a[a.length-1];n<a.length;n++){var s=a[n];if(xk(t,e,r,i,s[0],s[1],o[0],o[1])){return true}o=s}}function xk(t,e,r,i,a,n,o,s){var l=wk(r-t,a-o,i-e,n-s);if(_k(l)){return false}var u=wk(a-t,a-o,n-e,n-s)/l;if(u<0||u>1){return false}var h=wk(r-t,a-t,i-e,n-e)/l;if(h<0||h>1){return false}return true}function _k(t){return t<=1e-6&&t>=-1e-6}function wk(t,e,r,i){return t*i-e*r}var bk=L;var Sk=S;var Mk=R;var Ik=["dataToPoint","pointToData"];var Dk=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Tk(t,e,r){var i=this._targetInfoList=[];var a={};var n=Lk(e,t);bk(kk,function(t,e){if(!r||!r.include||Sk(r.include,e)>=0){t(n,i,a)}})}var Ak=Tk.prototype;Ak.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,r){(t.coordRanges||(t.coordRanges=[])).push(e);if(!t.coordRange){t.coordRange=e;var i=Ek[t.brushType](0,r,e);t.__rangeOffset={offset:zk[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})};Ak.matchOutputRanges=function(t,i,a){bk(t,function(r){var t=this.findTargetInfo(r,i);if(t&&t!==true){L(t.coordSyses,function(t){var e=Ek[r.brushType](1,t,r.range);a(r,e.values,t,i)})}},this)};Ak.setInputRanges=function(t,a){bk(t,function(t){var e=this.findTargetInfo(t,a);if(A){K(!e||e===true||t.coordRange,"coordRange must be specified when coord index specified.");K(!e||e!==true||t.range,"range must be specified in global brush.")}t.range=t.range||[];if(e&&e!==true){t.panelId=e.panelId;var r=Ek[t.brushType](0,e.coordSys,t.coordRange);var i=t.__rangeOffset;t.range=i?zk[t.brushType](r.values,i.offset,Bk(r.xyMinMax,i.xyMinMax)):r.values}},this)};Ak.makePanelOpts=function(r,i){return T(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:rI(e),isTargetByCursor:aI(e,r,t.coordSysModel),getLinearBrushOtherExtent:iI(e)}})};Ak.controlSeries=function(t,e,r){var i=this.findTargetInfo(t,r);return i===true||i&&Sk(i.coordSyses,e.coordinateSystem)>=0};Ak.findTargetInfo=function(t,e){var r=this._targetInfoList;var i=Lk(e,t);for(var a=0;a<r.length;a++){var n=r[a];var o=t.panelId;if(o){if(n.panelId===o){return n}}else{for(var a=0;a<Pk.length;a++){if(Pk[a](i,n)){return n}}}}return true};function Ck(t){t[0]>t[1]&&t.reverse();return t}function Lk(t,e){return tn(t,e,{includeMainTypes:Dk})}var kk={grid:function(t,i){var a=t.xAxisModels;var n=t.yAxisModels;var e=t.gridModels;var r=it();var o={};var s={};if(!a&&!n&&!e){return}bk(a,function(t){var e=t.axis.grid.model;r.set(e.id,e);o[e.id]=true});bk(n,function(t){var e=t.axis.grid.model;r.set(e.id,e);s[e.id]=true});bk(e,function(t){r.set(t.id,t);o[t.id]=true;s[t.id]=true});r.each(function(t){var e=t.coordinateSystem;var r=[];bk(e.getCartesians(),function(t,e){if(Sk(a,t.getAxis("x").model)>=0||Sk(n,t.getAxis("y").model)>=0){r.push(t)}});i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:Nk.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})})},geo:function(t,r){bk(t.geoModels,function(t){var e=t.coordinateSystem;r.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:Nk.geo})})}};var Pk=[function(t,e){var r=t.xAxisModel;var i=t.yAxisModel;var a=t.gridModel;!a&&r&&(a=r.axis.grid.model);!a&&i&&(a=i.axis.grid.model);return a&&a===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}];var Nk={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys;var e=t.getBoundingRect().clone();e.applyTransform(yl(t));return e}};var Ek={lineX:Mk(Ok,0),lineY:Mk(Ok,1),rect:function(t,e,r){var i=e[Ik[t]]([r[0][0],r[1][0]]);var a=e[Ik[t]]([r[0][1],r[1][1]]);var n=[Ck([i[0],a[0]]),Ck([i[1],a[1]])];return{values:n,xyMinMax:n}},polygon:function(r,i,t){var a=[[Infinity,-Infinity],[Infinity,-Infinity]];var e=T(t,function(t){var e=i[Ik[r]](t);a[0][0]=Math.min(a[0][0],e[0]);a[1][0]=Math.min(a[1][0],e[1]);a[0][1]=Math.max(a[0][1],e[0]);a[1][1]=Math.max(a[1][1],e[1]);return e});return{values:e,xyMinMax:a}}};function Ok(t,e,r,i){if(A){K(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.")}var a=r.getAxis(["x","y"][t]);var n=Ck(T([0,1],function(t){return e?a.coordToData(a.toLocalCoord(i[t])):a.toGlobalCoord(a.dataToCoord(i[t]))}));var o=[];o[t]=n;o[1-t]=[NaN,NaN];return{values:n,xyMinMax:o}}var zk={lineX:Mk(Rk,0),lineY:Mk(Rk,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,r,i){return T(t,function(t,e){return[t[0]-i[0]*r[e][0],t[1]-i[1]*r[e][1]]})}};function Rk(t,e,r,i){return[e[0]-i[t]*r[0],e[1]-i[t]*r[1]]}function Bk(t,e){var r=Vk(t);var i=Vk(e);var a=[r[0]/i[0],r[1]/i[1]];isNaN(a[0])&&(a[0]=1);isNaN(a[1])&&(a[1]=1);return a}function Vk(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var Gk=["inBrush","outOfBrush"];var Fk="__ecBrushSelect";var Wk="__ecInBrushSelectEvent";var Hk=jc.VISUAL.BRUSH;$v(Hk,function(r,t,i){r.eachComponent({mainType:"brush"},function(t){i&&i.type==="takeGlobalCursor"&&t.setBrushOption(i.key==="brush"?i.brushOption:{brushType:false});var e=t.brushTargetManager=new Tk(t.option,r);e.setInputRanges(t.areas,r)})});Kv(Hk,function(p,t,e){var g=[];var m;var y;p.eachComponent({mainType:"brush"},function(n,t){var s={brushId:n.id,brushIndex:t,brushName:n.name,areas:P(n.areas),selected:[]};g.push(s);var e=n.option;var r=e.brushLink;var i=[];var l=[];var u=[];var h=0;if(!t){m=e.throttleType;y=e.throttleDelay}var o=T(n.areas,function(t){return qk(C({boundingRect:$k[t.brushType](t)},t))});var f=fk(n.option,Gk,function(t){t.mappingMethod="fixed"});B(r)&&L(r,function(t){i[t]=1});function c(t){return r==="all"||i[t]}function v(t){return!!t.length}p.eachSeries(function(t,e){var r=u[e]=[];t.subType==="parallel"?a(t,e,r):d(t,e,r)});function a(t,e){var r=t.coordinateSystem;h|=r.hasAxisBrushed();c(e)&&r.eachActiveState(t.getData(),function(t,e){t==="active"&&(l[e]=1)})}function d(e,t,r){var i=Xk(e);if(!i||Yk(n,t)){return}L(o,function(t){i[t.brushType]&&n.brushTargetManager.controlSeries(t,e,p)&&r.push(t);h|=v(r)});if(c(t)&&v(r)){var a=e.getData();a.each(function(t){if(jk(i,r,a,t)){l[t]=1}})}}p.eachSeries(function(t,e){var r={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};s.selected.push(r);var i=Xk(t);var a=u[e];var n=t.getData();var o=c(e)?function(t){return l[t]?(r.dataIndex.push(n.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return jk(i,a,n,t)?(r.dataIndex.push(n.getRawIndex(t)),"inBrush"):"outOfBrush"};(c(e)?h:v(a))&&vk(Gk,f,n,o)})});Zk(t,m,y,g,e)});function Zk(t,e,r,i,a){if(!a){return}var n=t.getZr();if(n[Wk]){return}if(!n[Fk]){n[Fk]=Uk}var o=Jf(n,Fk,r,e);o(t,i)}function Uk(t,e){if(!t.isDisposed()){var r=t.getZr();r[Wk]=true;t.dispatchAction({type:"brushSelect",batch:e});r[Wk]=false}}function jk(t,e,r,i){for(var a=0,n=e.length;a<n;a++){var o=e[a];if(t[o.brushType](i,r,o.selectors,o)){return true}}}function Xk(t){var o=t.brushSelector;if(G(o)){var e=[];L(pk,function(n,t){e[t]=function(t,e,r,i){var a=e.getItemLayout(t);return n[o](a,r,i)}});return e}else if(V(o)){var r={};L(pk,function(t,e){r[e]=o});return r}return o}function Yk(t,e){var r=t.option.seriesIndex;return r!=null&&r!=="all"&&(B(r)?S(r,e)<0:e!==r)}function qk(r){var i=r.selectors={};L(pk[r.brushType],function(e,t){i[t]=function(t){return e(t,i,r)}});return r}var $k={lineX:nt,lineY:nt,rect:function(t){return Kk(t.range)},polygon:function(t){var e;var r=t.range;for(var i=0,a=r.length;i<a;i++){e=e||[[Infinity,-Infinity],[Infinity,-Infinity]];var n=r[i];n[0]<e[0][0]&&(e[0][0]=n[0]);n[0]>e[0][1]&&(e[0][1]=n[0]);n[1]<e[1][0]&&(e[1][0]=n[1]);n[1]>e[1][1]&&(e[1][1]=n[1])}return e&&Kk(e)}};function Kk(t){return new fr(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Jk=["#ddd"];var Qk=td({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:true,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:true,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var r=this.option;!e&&ck(r,t,["inBrush","outOfBrush"]);r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Jk}},setAreas:function(t){if(A){K(B(t));L(t,function(t){K(t.brushType,"Illegal areas")})}if(!t){return}this.areas=T(t,function(t){return tP(this.option,t)},this)},setBrushOption:function(t){this.brushOption=tP(this.option,t);this.brushType=this.brushOption.brushType}});function tP(t,e){return y({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Pl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,true)}ed({type:"brush",init:function(t,e){this.ecModel=t;this.api=e;this.model;(this._brushController=new xM(e.getZr())).on("brush",z(this._onBrush,this)).mount()},render:function(t){this.model=t;return eP.apply(this,arguments)},updateTransform:eP,updateView:eP,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var r=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:P(t),$from:r})}});function eP(t,e,r,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Xv({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})});Xv({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var rP={};function iP(t,e){rP[t]=e}function aP(t){return rP[t]}var nP=ec.toolbox.brush;function oP(t,e,r){this.model=t;this.ecModel=e;this.api=r;this._brushType;this._brushMode}oP.defaultOption={show:true,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:P(nP.title)};var sP=oP.prototype;sP.render=sP.updateView=function(e,t,r){var i;var a;var n;t.eachComponent({mainType:"brush"},function(t){i=t.brushType;a=t.brushOption.brushMode||"single";n|=t.areas.length});this._brushType=i;this._brushMode=a;L(e.get("type",true),function(t){e.setIconStatus(t,(t==="keep"?a==="multiple":t==="clear"?n:t===i)?"emphasis":"normal")})};sP.getIcons=function(){var t=this.model;var e=t.get("icon",true);var r={};L(t.get("type",true),function(t){if(e[t]){r[t]=e[t]}});return r};sP.onclick=function(t,e,r){var i=this._brushType;var a=this._brushMode;if(r==="clear"){e.dispatchAction({type:"axisAreaSelect",intervals:[]});e.dispatchAction({type:"brush",command:"clear",areas:[]})}else{e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?i:i===r?false:r,brushMode:r==="keep"?a==="multiple"?"single":"multiple":a}})}};iP("brush",oP);Zv(sk);var lP=864e5;function uP(t,e,r){this._model=t}uP.prototype={constructor:uP,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=Ql(t);var e=t.getFullYear();var r=t.getMonth()+1;r=r<10?"0"+r:r;var i=t.getDate();i=i<10?"0"+i:i;var a=t.getDay();a=Math.abs((a+7-this.getFirstDayOfWeek())%7);return{y:e,m:r,d:i,day:a,time:t.getTime(),formatedDate:e+"-"+r+"-"+i,date:t}},getNextNDay:function(t,e){e=e||0;if(e===0){return this.getDateInfo(t)}t=new Date(this.getDateInfo(t).time);t.setDate(t.getDate()+e);return this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay");this._orient=this._model.get("orient");this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0;this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1;var i=["width","height"];var a=this._model.get("cellSize").slice();var n=this._model.getBoxLayoutParams();var o=this._orient==="horizontal"?[r,7]:[7,r];L([0,1],function(t){if(u(a,t)){n[i[t]]=a[t]*o[t]}});var s={width:e.getWidth(),height:e.getHeight()};var l=this._rect=Cu(n,s);L([0,1],function(t){if(!u(a,t)){a[t]=l[i[t]]/o[t]}});function u(t,e){return t[e]!=null&&t[e]!=="auto"}this._sw=a[0];this._sh=a[1]},dataToPoint:function(t,e){B(t)&&(t=t[0]);e==null&&(e=true);var r=this.getDateInfo(t);var i=this._rangeInfo;var a=r.formatedDate;if(e&&!(r.time>=i.start.time&&r.time<=i.end.time)){return[NaN,NaN]}var n=r.day;var o=this._getRangeInfo([i.start.time,a]).nthWeek;if(this._orient==="vertical"){return[this._rect.x+n*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]}return[this._rect.x+o*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var r=this.dataToPoint(t,e);return{contentShape:{x:r[0]-(this._sw-this._lineWidth)/2,y:r[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:r,tl:[r[0]-this._sw/2,r[1]-this._sh/2],tr:[r[0]+this._sw/2,r[1]-this._sh/2],br:[r[0]+this._sw/2,r[1]+this._sh/2],bl:[r[0]-this._sw/2,r[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1;var r=Math.floor((t[1]-this._rect.y)/this._sh)+1;var i=this._rangeInfo.range;if(this._orient==="vertical"){return this._getDateByWeeksAndDay(r,e-1,i)}return this._getDateByWeeksAndDay(e,r-1,i)},convertToPixel:R(hP,"dataToPoint"),convertFromPixel:R(hP,"pointToData"),_initRangeOption:function(){var t=this._model.get("range");var e=t;if(B(e)&&e.length===1){e=e[0]}if(/^\d{4}$/.test(e)){t=[e+"-01-01",e+"-12-31"]}if(/^\d{4}[\/|-]\d{1,2}$/.test(e)){var r=this.getDateInfo(e);var i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}if(/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)){t=[e,e]}var n=this._getRangeInfo(t);if(n.start.time>n.end.time){t.reverse()}return t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;if(t[0].time>t[1].time){e=true;t.reverse()}var r=Math.floor(t[1].time/lP)-Math.floor(t[0].time/lP)+1;var i=new Date(t[0].time);var a=i.getDate();var n=t[1].date.getDate();i.setDate(a+r-1);if(i.getDate()!==n){var o=i.getTime()-t[1].time>0?1:-1;while(i.getDate()!==n&&(i.getTime()-t[1].time)*o>0){r-=o;i.setDate(a+r-1)}}var s=Math.floor((r+t[0].day+6)/7);var l=e?-s+1:s-1;e&&t.reverse();return{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,r){var i=this._getRangeInfo(r);if(t>i.weeks||t===0&&e<i.fweek||t===i.weeks&&e>i.lweek){return false}var a=(t-1)*7-i.fweek+e;var n=new Date(i.start.time);n.setDate(i.start.d+a);return this.getDateInfo(n)}};uP.dimensions=uP.prototype.dimensions;uP.getDimensionsInfo=uP.prototype.getDimensionsInfo;uP.create=function(r,i){var a=[];r.eachComponent("calendar",function(t){var e=new uP(t,r,i);a.push(e);t.coordinateSystem=e});r.eachSeries(function(t){if(t.get("coordinateSystem")==="calendar"){t.coordinateSystem=a[t.get("calendarIndex")||0]}});return a};function hP(t,e,r,i){var a=r.calendarModel;var n=r.seriesModel;var o=a?a.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](i):null}Ah.register("calendar",uP);var fP=Ru.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:true,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:true,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:true,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:true,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,r,i){var a=Nu(t);fP.superApply(this,"init",arguments);cP(t,a)},mergeOption:function(t,e){fP.superApply(this,"mergeOption",arguments);cP(this.option,t)}});function cP(t,e){var r=t.cellSize;if(!B(r)){r=t.cellSize=[r,r]}else if(r.length===1){r[1]=r[0]}var i=T([0,1],function(t){if(ku(e,t)){r[t]="auto"}return r[t]!=null&&r[t]!=="auto"});Pu(t,e,{type:"box",ignoreSize:i})}var vP={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]};var dP={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};ed({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,r){var i=this.group;i.removeAll();var a=t.coordinateSystem;var n=a.getRangeInfo();var o=a.getOrient();this._renderDayRect(t,n,i);this._renderLines(t,n,o,i);this._renderYearText(t,n,o,i);this._renderMonthText(t,o,i);this._renderWeekText(t,n,o,i)},_renderDayRect:function(t,e,r){var i=t.coordinateSystem;var a=t.getModel("itemStyle").getItemStyle();var n=i.getCellWidth();var o=i.getCellHeight();for(var s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],false).tl;var u=new _s({shape:{x:l[0],y:l[1],width:n,height:o},cursor:"default",style:a});r.add(u)}},_renderLines:function(r,t,i,a){var n=this;var o=r.coordinateSystem;var s=r.getModel("splitLine.lineStyle").getLineStyle();var l=r.get("splitLine.show");var e=s.lineWidth;this._tlpoints=[];this._blpoints=[];this._firstDayOfMonth=[];this._firstDayPoints=[];var u=t.start;for(var h=0;u.time<=t.end.time;h++){c(u.formatedDate);if(h===0){u=o.getDateInfo(t.start.y+"-"+t.start.m)}var f=u.date;f.setMonth(f.getMonth()+1);u=o.getDateInfo(f)}c(o.getNextNDay(t.end.time,1).formatedDate);function c(t){n._firstDayOfMonth.push(o.getDateInfo(t));n._firstDayPoints.push(o.dataToRect([t],false).tl);var e=n._getLinePointsOfOneWeek(r,t,i);n._tlpoints.push(e[0]);n._blpoints.push(e[e.length-1]);l&&n._drawSplitline(e,s,a)}l&&this._drawSplitline(n._getEdgesPoints(n._tlpoints,e,i),s,a);l&&this._drawSplitline(n._getEdgesPoints(n._blpoints,e,i),s,a)},_getEdgesPoints:function(t,e,r){var i=[t[0].slice(),t[t.length-1].slice()];var a=r==="horizontal"?0:1;i[0][a]=i[0][a]-e/2;i[1][a]=i[1][a]+e/2;return i},_drawSplitline:function(t,e,r){var i=new xs({z2:20,shape:{points:t},style:e});r.add(i)},_getLinePointsOfOneWeek:function(t,e,r){var i=t.coordinateSystem;e=i.getDateInfo(e);var a=[];for(var n=0;n<7;n++){var o=i.getNextNDay(e.time,n);var s=i.dataToRect([o.time],false);a[2*o.day]=s.tl;a[2*o.day+1]=s[r==="horizontal"?"bl":"tr"]}return a},_formatterLabel:function(t,e){if(typeof t==="string"&&t){return vu(t,e)}if(typeof t==="function"){return t(e)}return e.nameMap},_yearTextPositionControl:function(t,e,r,i,a){e=e.slice();var n=["center","bottom"];if(i==="bottom"){e[1]+=a;n=["center","top"]}else if(i==="left"){e[0]-=a}else if(i==="right"){e[0]+=a;n=["center","top"]}else{e[1]-=a}var o=0;if(i==="left"||i==="right"){o=Math.PI/2}return{rotation:o,position:e,style:{textAlign:n[0],textVerticalAlign:n[1]}}},_renderYearText:function(t,e,r,i){var a=t.getModel("yearLabel");if(!a.get("show")){return}var n=a.get("margin");var o=a.get("position");if(!o){o=r!=="horizontal"?"top":"left"}var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]];var l=(s[0][0]+s[1][0])/2;var u=(s[0][1]+s[1][1])/2;var h=r==="horizontal"?0:1;var f={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]};var c=e.start.y;if(+e.end.y>+e.start.y){c=c+"-"+e.end.y}var v=a.get("formatter");var d={start:e.start.y,end:e.end.y,nameMap:c};var p=this._formatterLabel(v,d);var g=new ls({z2:30});ol(g.style,a,{text:p}),g.attr(this._yearTextPositionControl(g,f[o],r,o,n));i.add(g)},_monthTextPositionControl:function(t,e,r,i,a){var n="left";var o="top";var s=t[0];var l=t[1];if(r==="horizontal"){l=l+a;if(e){n="center"}if(i==="start"){o="bottom"}}else{s=s+a;if(e){o="middle"}if(i==="start"){n="right"}}return{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderMonthText:function(t,e,r){var i=t.getModel("monthLabel");if(!i.get("show")){return}var a=i.get("nameMap");var n=i.get("margin");var o=i.get("position");var s=i.get("align");var l=[this._tlpoints,this._blpoints];if(G(a)){a=vP[a.toUpperCase()]||[]}var u=o==="start"?0:1;var h=e==="horizontal"?0:1;n=o==="start"?-n:n;var f=s==="center";for(var c=0;c<l[u].length-1;c++){var v=l[u][c].slice();var d=this._firstDayOfMonth[c];if(f){var p=this._firstDayPoints[c];v[h]=(p[h]+l[0][c+1][h])/2}var g=i.get("formatter");var m=a[+d.m-1];var y={yyyy:d.y,yy:(d.y+"").slice(2),MM:d.m,M:+d.m,nameMap:m};var x=this._formatterLabel(g,y);var _=new ls({z2:30});N(ol(_.style,i,{text:x}),this._monthTextPositionControl(v,f,e,o,n));r.add(_)}},_weekTextPositionControl:function(t,e,r,i,a){var n="center";var o="middle";var s=t[0];var l=t[1];var u=r==="start";if(e==="horizontal"){s=s+i+(u?1:-1)*a[0]/2;n=u?"right":"left"}else{l=l+i+(u?1:-1)*a[1]/2;o=u?"bottom":"top"}return{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderWeekText:function(t,e,r,i){var a=t.getModel("dayLabel");if(!a.get("show")){return}var n=t.coordinateSystem;var o=a.get("position");var s=a.get("nameMap");var l=a.get("margin");var u=n.getFirstDayOfWeek();if(G(s)){s=dP[s.toUpperCase()]||[]}var h=n.getNextNDay(e.end.time,7-e.lweek).time;var f=[n.getCellWidth(),n.getCellHeight()];l=Wl(l,f[r==="horizontal"?0:1]);if(o==="start"){h=n.getNextNDay(e.start.time,-(7+e.fweek)).time;l=-l}for(var c=0;c<7;c++){var v=n.getNextNDay(h,c);var d=n.dataToRect([v.time],false).center;var p=c;p=Math.abs((c+u)%7);var g=new ls({z2:30});N(ol(g.style,a,{text:s[p]}),this._weekTextPositionControl(d,r,o,l,f));i.add(g)}}});td({type:"title",layoutMode:{type:"box",ignoreSize:true},defaultOption:{zlevel:0,z:6,show:true,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"}}});ed({type:"title",render:function(t,e,r){this.group.removeAll();if(!t.get("show")){return}var i=this.group;var a=t.getModel("textStyle");var n=t.getModel("subtextStyle");var o=t.get("textAlign");var s=t.get("textBaseline");var l=new ls({style:ol({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:true}),z2:10});var u=l.getBoundingRect();var h=t.get("subtext");var f=new ls({style:ol({},n,{text:h,textFill:n.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:true}),z2:10});var c=t.get("link");var v=t.get("sublink");l.silent=!c;f.silent=!v;if(c){l.on("click",function(){window.open(c,"_"+t.get("target"))})}if(v){f.on("click",function(){window.open(v,"_"+t.get("subtarget"))})}i.add(l);h&&i.add(f);var d=i.getBoundingRect();var p=t.getBoxLayoutParams();p.width=d.width;p.height=d.height;var g=Cu(p,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));if(!o){o=t.get("left")||t.get("right");if(o==="middle"){o="center"}if(o==="right"){g.x+=g.width}else if(o==="center"){g.x+=g.width/2}}if(!s){s=t.get("top")||t.get("bottom");if(s==="center"){s="middle"}if(s==="bottom"){g.y+=g.height}else if(s==="middle"){g.y+=g.height/2}s=s||"top"}i.attr("position",[g.x,g.y]);var m={textAlign:o,textVerticalAlign:s};l.setStyle(m);f.setStyle(m);d=i.getBoundingRect();var y=g.margin;var x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new _s({shape:{x:d.x-y[3],y:d.y-y[0],width:d.width+y[1]+y[3],height:d.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:true});Zs(_);i.add(_)}});Ru.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var pP=["x","y","z","radius","angle","single"];var gP=["cartesian2d","polar","singleAxis"];function mP(t){return S(gP,t)>=0}function yP(t,o){t=t.slice();var s=T(t,mu);o=(o||[]).slice();var l=T(o,mu);return function(a,n){L(t,function(t,e){var r={name:t,capital:s[e]};for(var i=0;i<o.length;i++){r[o[i]]=t+l[i]}a.call(n,r)})}}var xP=yP(pP,["axisIndex","axis","index","id"]);function _P(a,n,o){return function(t){var e={nodes:[],records:{}};n(function(t){e.records[t.name]={}});if(!t){return e}u(t,e);var r;do{r=false;a(i)}while(r);function i(t){if(!s(t,e)&&l(t,e)){u(t,e);r=true}}return e};function s(t,e){return S(e.nodes,t)>=0}function l(t,r){var i=false;n(function(e){L(o(t,e)||[],function(t){r.records[e.name][t]&&(i=true)})});return i}function u(t,r){r.nodes.push(t);n(function(e){L(o(t,e)||[],function(t){r.records[e.name][t]=true})})}}var wP=L;var bP=Zl;var SP=function(t,e,r,i){this._dimName=t;this._axisIndex=e;this._valueWindow;this._percentWindow;this._dataExtent;this._minMaxSpan;this.ecModel=i;this._dataZoomModel=r};SP.prototype={constructor:SP,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var i=[];var a=this.ecModel;a.eachSeries(function(t){if(mP(t.get("coordinateSystem"))){var e=this._dimName;var r=a.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];if(this._axisIndex===(r&&r.componentIndex)){i.push(t)}}},this);return i},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t=this._dimName;var e=this.ecModel;var r=this.getAxisModel();var i=t==="x"||t==="y";var a;var n;if(i){n="gridIndex";a=t==="x"?"y":"x"}else{n="polarIndex";a=t==="angle"?"radius":"angle"}var o;e.eachComponent(a+"Axis",function(t){if((t.get(n)||0)===(r.get(n)||0)){o=t}});return o},getMinMaxSpan:function(){return P(this._minMaxSpan)},calculateDataWindow:function(e){var i=this._dataExtent;var t=this.getAxisModel();var a=t.axis.scale;var n=this._dataZoomModel.getRangePropMode();var o=[0,100];var s=[e.start,e.end];var l=[];wP(["startValue","endValue"],function(t){l.push(e[t]!=null?a.parse(e[t]):null)});wP([0,1],function(t){var e=l[t];var r=s[t];if(n[t]==="percent"){if(r==null){r=o[t]}e=a.parse(Fl(r,o,i,true))}else{r=Fl(e,i,o,true)}l[t]=e;s[t]=r});return{valueWindow:bP(l),percentWindow:bP(s)}},reset:function(t){if(t!==this._dataZoomModel){return}var e=this.getTargetSeriesModels();this._dataExtent=MP(this,this._dimName,e);var r=this.calculateDataWindow(t.option);this._valueWindow=r.valueWindow;this._percentWindow=r.percentWindow;TP(this);DP(this)},restore:function(t){if(t!==this._dataZoomModel){return}this._valueWindow=this._percentWindow=null;DP(this,true)},filterData:function(t,e){if(t!==this._dataZoomModel){return}var i=this._dimName;var r=this.getTargetSeriesModels();var a=t.get("filterMode");var f=this._valueWindow;if(a==="none"){return}wP(r,function(r){var u=r.getData();var h=u.mapDimension(i,true);if(a==="weakFilter"){u.filterSelf(function(t){var e;var r;var i;for(var a=0;a<h.length;a++){var n=u.get(h[a],t);var o=!isNaN(n);var s=n<f[0];var l=n>f[1];if(o&&!s&&!l){return true}o&&(i=true);s&&(e=true);l&&(r=true)}return i&&e&&r})}else{wP(h,function(t){if(a==="empty"){r.setData(u.map(t,function(t){return!n(t)?NaN:t}))}else{var e={};e[t]=f;u.selectRange(e)}})}wP(h,function(t){u.setApproximateExtent(f,t)})});function n(t){return t>=f[0]&&t<=f[1]}}};function MP(t,e,r){var i=[Infinity,-Infinity];wP(r,function(t){var r=t.getData();if(r){wP(r.mapDimension(e,true),function(t){var e=r.getApproximateExtent(t);e[0]<i[0]&&(i[0]=e[0]);e[1]>i[1]&&(i[1]=e[1])})}});if(i[1]<i[0]){i=[NaN,NaN]}IP(t,i);return i}function IP(t,e){var r=t.getAxisModel();var i=r.getMin(true);var a=r.get("type")==="category";var n=a&&r.getCategories().length;if(i!=null&&i!=="dataMin"&&typeof i!=="function"){e[0]=i}else if(a){e[0]=n>0?0:NaN}var o=r.getMax(true);if(o!=null&&o!=="dataMax"&&typeof o!=="function"){e[1]=o}else if(a){e[1]=n>0?n-1:NaN}if(!r.get("scale",true)){e[0]>0&&(e[0]=0);e[1]<0&&(e[1]=0)}return e}function DP(t,e){var r=t.getAxisModel();var i=t._percentWindow;var a=t._valueWindow;if(!i){return}var n=Xl(a,[0,500]);n=Math.min(n,20);var o=e||i[0]===0&&i[1]===100;r.setRange(o?null:+a[0].toFixed(n),o?null:+a[1].toFixed(n))}function TP(i){var a=i._minMaxSpan={};var n=i._dataZoomModel;wP(["min","max"],function(t){a[t+"Span"]=n.get(t+"Span");var e=n.get(t+"ValueSpan");if(e!=null){a[t+"ValueSpan"]=e;e=i.getAxisModel().axis.scale.parse(e);if(e!=null){var r=i._dataExtent;a[t+"Span"]=Fl(r[0]+e,r,[0,100],true)}}})}var AP=L;var CP=xP;var LP=td({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,r){this._dataIntervalByAxis={};this._dataInfo={};this._axisProxies={};this.textStyleModel;this._autoThrottle=true;this._rangePropMode=["percent","percent"];var i=kP(t);this.mergeDefaultAndTheme(t,r);this.doInit(i)},mergeOption:function(t){var e=kP(t);y(this.option,t,true);this.doInit(e)},doInit:function(t){var r=this.option;if(!m.canvasSupported){r.realtime=false}this._setDefaultThrottle(t);PP(this,t);AP([["start","startValue"],["end","endValue"]],function(t,e){if(this._rangePropMode[e]==="value"){r[t[0]]=null}},this);this.textStyleModel=this.getModel("textStyle");this._resetTarget();this._giveAxisProxies()},_giveAxisProxies:function(){var o=this._axisProxies;this.eachTargetAxis(function(t,e,r,i){var a=this.dependentModels[t.axis][e];var n=a.__dzAxisProxy||(a.__dzAxisProxy=new SP(t.name,e,this,i));o[t.name+"_"+e]=n},this)},_resetTarget:function(){var r=this.option;var t=this._judgeAutoMode();CP(function(t){var e=t.axisIndex;r[e]=Fa(r[e])},this);if(t==="axisIndex"){this._autoSetAxisIndex()}else if(t==="orient"){this._autoSetOrient()}},_judgeAutoMode:function(){var e=this.option;var r=false;CP(function(t){if(e[t.axisIndex]!=null){r=true}},this);var t=e.orient;if(t==null&&r){return"orient"}else if(!r){if(t==null){e.orient="horizontal"}return"axisIndex"}},_autoSetAxisIndex:function(){var n=true;var e=this.get("orient",true);var o=this.option;var t=this.dependentModels;if(n){var r=e==="vertical"?"y":"x";if(t[r+"Axis"].length){o[r+"AxisIndex"]=[0];n=false}else{AP(t.singleAxis,function(t){if(n&&t.get("orient",true)===e){o.singleAxisIndex=[t.componentIndex];n=false}})}}if(n){CP(function(t){if(!n){return}var e=[];var r=this.dependentModels[t.axis];if(r.length&&!e.length){for(var i=0,a=r.length;i<a;i++){if(r[i].get("type")==="category"){e.push(i)}}}o[t.axisIndex]=e;if(e.length){n=false}},this)}if(n){this.ecModel.eachSeries(function(n){if(this._isSeriesHasAllAxesTypeOf(n,"value")){CP(function(t){var e=o[t.axisIndex];var r=n.get(t.axisIndex);var i=n.get(t.axisId);var a=n.ecModel.queryComponents({mainType:t.axis,index:r,id:i})[0];if(A){if(!a){throw new Error(t.axis+' "'+j(r,i,0)+'" not found')}}r=a.componentIndex;if(S(e,r)<0){e.push(r)}})}},this)}},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){!e&&(e=t.name)},this);this.option.orient=e==="y"?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(i,a){var n=true;CP(function(t){var e=i.get(t.axisIndex);var r=this.dependentModels[t.axis][e];if(!r||r.get("type")!==a){n=false}},this);return n},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")){this._autoThrottle=false}if(this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var r;CP(function(t){if(r==null){var e=this.get(t.axisIndex);if(e.length){r=this.dependentModels[t.axis][e[0]]}}},this);return r},eachTargetAxis:function(r,i){var a=this.ecModel;CP(function(e){AP(this.get(e.axisIndex),function(t){r.call(i,e,t,this,a)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var r=this.getAxisProxy(t,e);return r&&r.getAxisModel()},setRawRange:function(e,t){var r=this.option;AP([["start","startValue"],["end","endValue"]],function(t){if(e[t[0]]!=null||e[t[1]]!=null){r[t[0]]=e[t[0]];r[t[1]]=e[t[1]]}},this);!t&&PP(this,e)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t){return t.getDataPercentWindow()}},getValueRange:function(t,e){if(t==null&&e==null){var r=this.findRepresentativeAxisProxy();if(r){return r.getDataValueWindow()}}else{return this.getAxisProxy(t,e).getDataValueWindow()}},findRepresentativeAxisProxy:function(t){if(t){return t.__dzAxisProxy}var e=this._axisProxies;for(var r in e){if(e.hasOwnProperty(r)&&e[r].hostedBy(this)){return e[r]}}for(var r in e){if(e.hasOwnProperty(r)&&!e[r].hostedBy(this)){return e[r]}}},getRangePropMode:function(){return this._rangePropMode.slice()}});function kP(e){var r={};AP(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(r[t]=e[t])});return r}function PP(t,a){var n=t._rangePropMode;var o=t.get("rangeMode");AP([["start","startValue"],["end","endValue"]],function(t,e){var r=a[t[0]]!=null;var i=a[t[1]]!=null;if(r&&!i){n[e]="percent"}else if(!r&&i){n[e]="value"}else if(o){n[e]=o[e]}else if(r){n[e]="percent"}})}var NP=zf.extend({type:"dataZoom",render:function(t,e,r,i){this.dataZoomModel=t;this.ecModel=e;this.api=r},getTargetCoordInfo:function(){var t=this.dataZoomModel;var a=this.ecModel;var n={};t.eachTargetAxis(function(t,e){var r=a.getComponent(t.axis,e);if(r){var i=r.getCoordSysModel();i&&o(i,r,n[i.mainType]||(n[i.mainType]=[]),i.componentIndex)}},this);function o(t,e,r,i){var a;for(var n=0;n<r.length;n++){if(r[n].model===t){a=r[n];break}}if(!a){r.push(a={model:t,axisModels:[],coordIndex:i})}a.axisModels.push(e)}return n}});var EP=LP.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:true,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:true,showDataShadow:"auto",realtime:true,zoomLock:false,textStyle:{color:"#333"}}});var OP=_s;var zP=Fl;var RP=Zl;var BP=z;var VP=L;var GP=7;var FP=1;var WP=30;var HP="horizontal";var ZP="vertical";var UP=5;var jP=["line","bar","candlestick","scatter"];var XP=NP.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,r,i){XP.superApply(this,"render",arguments);Jf(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate");this._orient=t.get("orient");if(this.dataZoomModel.get("show")===false){this.group.removeAll();return}if(!i||i.type!=="dataZoom"||i.from!==this.uid){this._buildView()}this._updateView()},remove:function(){XP.superApply(this,"remove",arguments);Qf(this,"_dispatchZoomAction")},dispose:function(){XP.superApply(this,"dispose",arguments);Qf(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll();this._resetLocation();this._resetInterval();var e=this._displayables.barGroup=new cr;this._renderBackground();this._renderHandle();this._renderDataShadow();t.add(e);this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel;var e=this.api;var r=this._findCoordRect();var i={width:e.getWidth(),height:e.getHeight()};var a=this._orient===HP?{right:i.width-r.x-r.width,top:i.height-WP-GP,width:r.width,height:WP}:{right:GP,top:r.y,width:WP,height:r.height};var n=Nu(t.option);L(["right","top","width","height"],function(t){if(n[t]==="ph"){n[t]=a[t]}});var o=Cu(n,i,t.padding);this._location={x:o.x,y:o.y};this._size=[o.width,o.height];this._orient===ZP&&this._size.reverse()},_positionGroup:function(){var t=this.group;var e=this._location;var r=this._orient;var i=this.dataZoomModel.getFirstTargetAxisModel();var a=i&&i.get("inverse");var n=this._displayables.barGroup;var o=(this._dataShadowInfo||{}).otherAxisInverse;n.attr(r===HP&&!a?{scale:o?[1,1]:[1,-1]}:r===HP&&a?{scale:o?[-1,1]:[-1,-1]}:r===ZP&&!a?{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2});var s=t.getBoundingRect([n]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel;var e=this._size;var r=this._displayables.barGroup;r.add(new OP({silent:true,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));r.add(new OP({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:z(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(!t){return}var e=this._size;var r=t.series;var i=r.getRawData();var a=r.getShadowDim?r.getShadowDim():t.otherDim;if(a==null){return}var n=i.getDataExtent(a);var o=(n[1]-n[0])*.3;n=[n[0]-o,n[1]+o];var s=[0,e[1]];var l=[0,e[0]];var u=[[e[0],0],[0,0]];var h=[];var f=l[1]/(i.count()-1);var c=0;var v=Math.round(i.count()/e[0]);var d;i.each([a],function(t,e){if(v>0&&e%v){c+=f;return}var r=t==null||isNaN(t)||t==="";var i=r?0:zP(t,n,s,true);if(r&&!d&&e){u.push([u[u.length-1][0],0]);h.push([h[h.length-1][0],0])}else if(!r&&d){u.push([c,0]);h.push([c,0])}u.push([c,i]);h.push([c,i]);c+=f;d=r});var p=this.dataZoomModel;this._displayables.barGroup.add(new ys({shape:{points:u},style:C({fill:p.get("dataBackgroundColor")},p.getModel("dataBackground.areaStyle").getAreaStyle()),silent:true,z2:-20}));this._displayables.barGroup.add(new xs({shape:{points:h},style:p.getModel("dataBackground.lineStyle").getLineStyle(),silent:true,z2:-19}))},_prepareDataShadowInfo:function(){var e=this.dataZoomModel;var s=e.get("showDataShadow");if(s===false){return}var l;var u=this.ecModel;e.eachTargetAxis(function(n,o){var t=e.getAxisProxy(n.name,o).getTargetSeriesModels();L(t,function(t){if(l){return}if(s!==true&&S(jP,t.get("type"))<0){return}var e=u.getComponent(n.axis,o).axis;var r=YP(n.name);var i;var a=t.coordinateSystem;if(r!=null&&a.getOtherAxis){i=a.getOtherAxis(e).inverse}r=t.getData().mapDimension(r);l={thisAxis:e,series:t,thisDim:n.name,otherDim:r,otherAxisInverse:i}},this)},this);return l},_renderHandle:function(){var t=this._displayables;var n=t.handles=[];var o=t.handleLabels=[];var s=this._displayables.barGroup;var e=this._size;var l=this.dataZoomModel;s.add(t.filler=new OP({draggable:true,cursor:qP(this._orient),drift:BP(this._onDragMove,this,"all"),onmousemove:function(t){oa(t.event)},ondragstart:BP(this._showDataInfo,this,true),ondragend:BP(this._onDragEnd,this),onmouseover:BP(this._showDataInfo,this,true),onmouseout:BP(this._showDataInfo,this,false),style:{fill:l.get("fillerColor"),textPosition:"inside"}}));s.add(new OP(Zs({silent:true,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:FP,fill:"rgba(0,0,0,0)"}})));VP([0,1],function(t){var e=Ml(l.get("handleIcon"),{cursor:qP(this._orient),draggable:true,drift:BP(this._onDragMove,this,t),onmousemove:function(t){oa(t.event)},ondragend:BP(this._onDragEnd,this),onmouseover:BP(this._showDataInfo,this,true),onmouseout:BP(this._showDataInfo,this,false)},{x:-1,y:0,width:2,height:2});var r=e.getBoundingRect();this._handleHeight=Wl(l.get("handleSize"),this._size[1]);this._handleWidth=r.width/r.height*this._handleHeight;e.setStyle(l.getModel("handleStyle").getItemStyle());var i=l.get("handleColor");if(i!=null){e.style.fill=i}s.add(n[t]=e);var a=l.textStyleModel;this.group.add(o[t]=new ls({silent:true,invisible:true,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:a.getTextColor(),textFont:a.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange();var e=this._getViewExtent();this._handleEnds=[zP(t[0],[0,100],e,true),zP(t[1],[0,100],e,true)]},_updateInterval:function(t,e){var r=this.dataZoomModel;var i=this._handleEnds;var a=this._getViewExtent();var n=r.findRepresentativeAxisProxy().getMinMaxSpan();var o=[0,100];GS(e,i,a,r.get("zoomLock")?"all":t,n.minSpan!=null?zP(n.minSpan,o,a,true):null,n.maxSpan!=null?zP(n.maxSpan,o,a,true):null);this._range=RP([zP(i[0],a,o,true),zP(i[1],a,o,true)])},_updateView:function(t){var i=this._displayables;var a=this._handleEnds;var e=RP(a.slice());var n=this._size;VP([0,1],function(t){var e=i.handles[t];var r=this._handleHeight;e.attr({scale:[r/2,r/2],position:[a[t],n[1]/2-r/2]})},this);i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:n[1]});this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel;var n=this._displayables;var o=n.handleLabels;var s=this._orient;var l=["",""];if(e.get("showDetail")){var r=e.findRepresentativeAxisProxy();if(r){var i=r.getAxisModel().axis;var a=this._range;var u=t?r.calculateDataWindow({start:a[0],end:a[1]}).valueWindow:r.getDataValueWindow();l=[this._formatLabel(u[0],i),this._formatLabel(u[1],i)]}}var h=RP(this._handleEnds.slice());f.call(this,0);f.call(this,1);function f(t){var e=yl(n.handles[t].parent,this.group);var r=_l(t===0?"right":"left",e);var i=this._handleWidth/2+UP;var a=xl([h[t]+(t===0?-i:i),this._size[1]/2],e);o[t].setStyle({x:a[0],y:a[1],textVerticalAlign:s===HP?"middle":r,textAlign:s===HP?r:"center",text:l[t]})}},_formatLabel:function(t,e){var r=this.dataZoomModel;var i=r.get("labelFormatter");var a=r.get("labelPrecision");if(a==null||a==="auto"){a=e.getPixelPrecision()}var n=t==null||isNaN(t)?"":e.type==="category"||e.type==="time"?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return V(i)?i(t,n):G(i)?i.replace("{value}",n):n},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t);e[1].attr("invisible",!t)},_onDragMove:function(t,e,r){this._dragging=true;var i=this._displayables.barGroup.getLocalTransform();var a=xl([e,r],i,true);this._updateInterval(t,a[0]);var n=this.dataZoomModel.get("realtime");this._updateView(!n);n&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=false;this._showDataInfo(false);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size;var r=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(r[0]<0||r[0]>e[0]||r[1]<0||r[1]>e[1]){return}var i=this._handleEnds;var a=(i[0]+i[1])/2;this._updateInterval("all",r[0]-a);this._updateView();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 r;VP(this.getTargetCoordInfo(),function(t){if(!r&&t.length){var e=t[0].model.coordinateSystem;r=e.getRect&&e.getRect()}});if(!r){var t=this.api.getWidth();var e=this.api.getHeight();r={x:t*.2,y:e*.2,width:t*.6,height:e*.6}}return r}});function YP(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function qP(t){return t==="vertical"?"ns-resize":"ew-resize"}LP.extend({type:"dataZoom.inside",defaultOption:{disabled:false,zoomLock:false,zoomOnMouseWheel:true,moveOnMouseMove:true,preventDefaultMouseMove:true}});var $P=R;var KP="\0_ec_dataZoom_roams";function JP(t,i){var e=rN(t);var a=i.dataZoomId;var n=i.coordId;L(e,function(t,e){var r=t.dataZoomInfos;if(r[a]&&S(i.allCoordIds,n)<0){delete r[a];t.count--}});aN(e);var r=e[n];if(!r){r=e[n]={coordId:n,dataZoomInfos:{},count:0};r.controller=iN(t,r);r.dispatchAction=R(lN,t)}!r.dataZoomInfos[a]&&r.count++;r.dataZoomInfos[a]=i;var o=uN(r.dataZoomInfos);r.controller.enable(o.controlType,o.opt);r.controller.setPointerChecker(i.containsPoint);Jf(r,"dispatchAction",i.throttleRate,"fixRate")}function QP(t,r){var e=rN(t);L(e,function(t){t.controller.dispose();var e=t.dataZoomInfos;if(e[r]){delete e[r];t.count--}});aN(e)}function tN(t,e){if(t&&t.type==="dataZoom"&&t.batch){for(var r=0,i=t.batch.length;r<i;r++){if(t.batch[r].dataZoomId===e){return false}}}return true}function eN(t){return t.type+"\0_"+t.id}function rN(t){var e=t.getZr();return e[KP]||(e[KP]={})}function iN(t,e){var r=new Fx(t.getZr());r.on("pan",$P(nN,e));r.on("zoom",$P(oN,e));return r}function aN(r){L(r,function(t,e){if(!t.count){t.controller.dispose();delete r[e]}})}function nN(e,r,i,a,n,o,s){sN(e,function(t){return t.panGetRange(e.controller,r,i,a,n,o,s)})}function oN(e,r,i,a){sN(e,function(t){return t.zoomGetRange(e.controller,r,i,a)})}function sN(t,r){var i=[];L(t.dataZoomInfos,function(t){var e=r(t);!t.disabled&&e&&i.push({dataZoomId:t.dataZoomId,start:e[0],end:e[1]})});t.dispatchAction(i)}function lN(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function uN(t){var r;var i={};var a="type_";var n={type_true:2,type_move:1,type_false:0,type_undefined:-1};L(t,function(t){var e=t.disabled?false:t.zoomLock?"move":true;if(n[a+e]>n[a+r]){r=e}N(i,t.roamControllerOpt)});return{controlType:r,opt:i}}var hN=z;var fN=NP.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(n,t,o,e){fN.superApply(this,"render",arguments);if(tN(e,n.id)){this._range=n.getPercentRange()}L(this.getTargetCoordInfo(),function(t,r){var a=T(t,function(t){return eN(t.model)});L(t,function(t){var i=t.model;var e=n.option;JP(o,{coordId:eN(i),allCoordIds:a,containsPoint:function(t,e,r){return i.coordinateSystem.containPoint([e,r])},dataZoomId:n.id,throttleRate:n.get("throttle",true),panGetRange:hN(this._onPan,this,t,r),zoomGetRange:hN(this._onZoom,this,t,r),zoomLock:e.zoomLock,disabled:e.disabled,roamControllerOpt:{zoomOnMouseWheel:e.zoomOnMouseWheel,moveOnMouseMove:e.moveOnMouseMove,preventDefaultMouseMove:e.preventDefaultMouseMove}})},this)},this)},dispose:function(){QP(this.api,this.dataZoomModel.id);fN.superApply(this,"dispose",arguments);this._range=null},_onPan:function(t,e,r,i,a,n,o,s,l){var u=this._range.slice();var h=t.axisModels[0];if(!h){return}var f=cN[e]([n,o],[s,l],h,r,t);var c=f.signal*(u[1]-u[0])*f.pixel/f.pixelLength;GS(c,u,[0,100],"all");return this._range=u},_onZoom:function(t,e,r,i,a,n){var o=this._range.slice();var s=t.axisModels[0];if(!s){return}var l=cN[e](null,[a,n],s,r,t);var u=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0];i=Math.max(1/i,0);o[0]=(o[0]-u)*i+u;o[1]=(o[1]-u)*i+u;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();GS(0,o,[0,100],0,h.minSpan,h.maxSpan);return this._range=o}});var cN={grid:function(t,e,r,i,a){var n=r.axis;var o={};var s=a.model.coordinateSystem.getRect();t=t||[0,0];if(n.dim==="x"){o.pixel=e[0]-t[0];o.pixelLength=s.width;o.pixelStart=s.x;o.signal=n.inverse?1:-1}else{o.pixel=e[1]-t[1];o.pixelLength=s.height;o.pixelStart=s.y;o.signal=n.inverse?-1:1}return o},polar:function(t,e,r,i,a){var n=r.axis;var o={};var s=a.model.coordinateSystem;var l=s.getRadiusAxis().getExtent();var u=s.getAngleAxis().getExtent();t=t?s.pointToCoord(t):[0,0];e=s.pointToCoord(e);if(r.mainType==="radiusAxis"){o.pixel=e[0]-t[0];o.pixelLength=l[1]-l[0];o.pixelStart=l[0];o.signal=n.inverse?1:-1}else{o.pixel=e[1]-t[1];o.pixelLength=u[1]-u[0];o.pixelStart=u[0];o.signal=n.inverse?-1:1}return o},singleAxis:function(t,e,r,i,a){var n=r.axis;var o=a.model.coordinateSystem.getRect();var s={};t=t||[0,0];if(n.orient==="horizontal"){s.pixel=e[0]-t[0];s.pixelLength=o.width;s.pixelStart=o.x;s.signal=n.inverse?1:-1}else{s.pixel=e[1]-t[1];s.pixelLength=o.height;s.pixelStart=o.y;s.signal=n.inverse?-1:1}return s}};Uv({getTargetSeries:function(t){var a=it();t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,r){var i=r.getAxisProxy(t.name,e);L(i.getTargetSeriesModels(),function(t){a.set(t.uid,t)})})});return a},isOverallFilter:true,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,r){r.getAxisProxy(t.name,e).reset(r,i)});t.eachTargetAxis(function(t,e,r){r.getAxisProxy(t.name,e).filterData(r,i)})});t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();var r=e.getDataPercentWindow();var i=e.getDataValueWindow();t.setRawRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]},true)})}});Xv("dataZoom",function(r,t){var i=_P(z(t.eachComponent,t,"dataZoom"),xP,function(t,e){return t.get(e.axisIndex)});var a=[];t.eachComponent({mainType:"dataZoom",query:r},function(t,e){a.push.apply(a,i(t).nodes)});L(a,function(t,e){t.setRawRange({start:r.start,end:r.end,startValue:r.startValue,endValue:r.endValue})})});var vN=L;var dN=function(t){var e=t&&t.visualMap;if(!B(e)){e=e?[e]:[]}vN(e,function(t){if(!t){return}if(pN(t,"splitList")&&!pN(t,"pieces")){t.pieces=t.splitList;delete t.splitList}var e=t.pieces;if(e&&B(e)){vN(e,function(t){if(F(t)){if(pN(t,"start")&&!pN(t,"min")){t.min=t.start}if(pN(t,"end")&&!pN(t,"max")){t.max=t.end}}})}})};function pN(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}Ru.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var gN=jc.VISUAL.COMPONENT;Kv(gN,{createOnAllSeries:true,reset:function(e,t){var r=[];t.eachComponent("visualMap",function(t){if(!t.isTargetSeries(e)){return}r.push(dk(t.stateList,t.targetVisuals,z(t.getValueState,t),t.getDataDimension(e.getData())))});return r}});Kv(gN,{createOnAllSeries:true,reset:function(a,t){var n=a.getData();var o=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(a)){var e=t.getVisualMeta(z(mN,null,a,t))||{stops:[],outerColors:[]};var r=t.getDataDimension(n);var i=n.getDimensionInfo(r);if(i!=null){e.dimension=i.index;o.push(e)}}});a.getData().setVisual("visualMeta",o)}});function mN(t,e,r,i){var a=e.targetVisuals[i];var n=Aw.prepareVisualTypes(a);var o={color:t.getData().getVisual("color")};for(var s=0,l=n.length;s<l;s++){var u=n[s];var h=a[u==="opacity"?"__alphaForOpacity":u];h&&h.applyVisual(r,f,c)}return o.color;function f(t){return o[t]}function c(t,e){o[t]=e}}var yN={get:function(t,e,r){var i=P((xN[t]||{})[e]);return r?B(i)?i[i.length-1]:i:i}};var xN={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};var _N=Aw.mapVisual;var wN=Aw.eachVisual;var bN=B;var SN=L;var MN=Zl;var IN=Fl;var DN=nt;var TN=td({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-Infinity,Infinity],layoutMode:{type:"box",ignoreSize:true},defaultOption:{show:true,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:false,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,r){this._dataExtent;this.targetVisuals={};this.controllerVisuals={};this.textStyleModel;this.itemSize;this.mergeDefaultAndTheme(t,r)},optionUpdated:function(t,e){var r=this.option;if(!m.canvasSupported){r.realtime=false}!e&&ck(r,t,this.replacableOptionKeys);this.textStyleModel=this.getModel("textStyle");this.resetItemSize();this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=z(t,this);this.controllerVisuals=fk(this.option.controller,e,t);this.targetVisuals=fk(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex;var r=[];if(t==null||t==="all"){this.ecModel.eachSeries(function(t,e){r.push(e)})}else{r=Fa(t)}return r},eachTargetSeries:function(e,r){L(this.getTargetSeriesIndices(),function(t){e.call(r,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var r=false;this.eachTargetSeries(function(t){t===e&&(r=true)});return r},formatValueText:function(t,e,r){var i=this.option;var a=i.precision;var n=this.dataBound;var o=i.formatter;var s;var l;r=r||["<",">"];if(B(t)){t=t.slice();s=true}l=e?t:s?[u(t[0]),u(t[1])]:u(t);if(G(o)){return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l)}else if(V(o)){return s?o(t[0],t[1]):o(t)}if(s){if(t[0]===n[0]){return r[0]+" "+l[1]}else if(t[1]===n[1]){return r[1]+" "+l[0]}else{return l[0]+" - "+l[1]}}else{return l}function u(t){return t===n[0]?"min":t===n[1]?"max":(+t).toFixed(Math.min(a,20))}},resetExtent:function(){var t=this.option;var e=MN([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;var r=t.dimensions;if(e==null&&!r.length){return}if(e!=null){return t.getDimension(e)}var i=t.dimensions;for(var a=i.length-1;a>=0;a--){var n=i[a];var o=t.getDimensionInfo(n);if(!o.isCalculationCoord){return n}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel;var e=this.option;var r={inRange:e.inRange,outOfRange:e.outOfRange};var i=e.target||(e.target={});var a=e.controller||(e.controller={});y(i,r);y(a,r);var u=this.isCategory();n.call(this,i);n.call(this,a);o.call(this,i,"inRange","outOfRange");s.call(this,a);function n(i){if(bN(e.color)&&!i.inRange){i.inRange={color:e.color.slice().reverse()}}i.inRange=i.inRange||{color:t.get("gradientColor")};SN(this.stateList,function(t){var e=i[t];if(G(e)){var r=yN.get(e,"active",u);if(r){i[t]={};i[t][e]=r}else{delete i[t]}}},this)}function o(t,e,r){var i=t[e];var a=t[r];if(i&&!a){a=t[r]={};SN(i,function(t,e){if(!Aw.isValidType(e)){return}var r=yN.get(e,"inactive",u);if(r!=null){a[e]=r;if(e==="color"&&!a.hasOwnProperty("opacity")&&!a.hasOwnProperty("colorAlpha")){a.opacity=[0,0]}}})}}function s(n){var o=(n.inRange||{}).symbol||(n.outOfRange||{}).symbol;var s=(n.inRange||{}).symbolSize||(n.outOfRange||{}).symbolSize;var l=this.get("inactiveColor");SN(this.stateList,function(t){var e=this.itemSize;var r=n[t];if(!r){r=n[t]={color:u?l:[l]}}if(r.symbol==null){r.symbol=o&&P(o)||(u?"roundRect":["roundRect"])}if(r.symbolSize==null){r.symbolSize=s&&P(s)||(u?e[0]:[e[0],e[0]])}r.symbol=_N(r.symbol,function(t){return t==="none"||t==="square"?"roundRect":t});var i=r.symbolSize;if(i!=null){var a=-Infinity;wN(i,function(t){t>a&&(a=t)});r.symbolSize=_N(i,function(t){return IN(t,[0,a],[0,e[0]],true)})}},this)}},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:DN,getValueState:DN,getVisualMeta:DN});var AN=[20,140];var CN=TN.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:false,range:null,realtime:true,itemHeight:null,itemWidth:null,hoverLink:true,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){CN.superApply(this,"optionUpdated",arguments);this.resetExtent();this.resetVisual(function(t){t.mappingMethod="linear";t.dataExtent=this.getExtent()});this._resetRange()},resetItemSize:function(){CN.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse();(t[0]==null||isNaN(t[0]))&&(t[0]=AN[0]);(t[1]==null||isNaN(t[1]))&&(t[1]=AN[1])},_resetRange:function(){var t=this.getExtent();var e=this.option.range;if(!e||e.auto){t.auto=1;this.option.range=t}else if(B(e)){if(e[0]>e[1]){e.reverse()}e[0]=Math.max(e[0],t[0]);e[1]=Math.min(e[1],t[1])}},completeVisualOption:function(){TN.prototype.completeVisualOption.apply(this,arguments);L(this.stateList,function(t){var e=this.option.controller[t].symbolSize;if(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();var e=Zl((this.get("range")||[]).slice());e[0]>t[1]&&(e[0]=t[1]);e[1]>t[1]&&(e[1]=t[1]);e[0]<t[0]&&(e[0]=t[0]);e[1]<t[0]&&(e[1]=t[0]);return e},getValueState:function(t){var e=this.option.range;var r=this.getExtent();return(e[0]<=r[0]||e[0]<=t)&&(e[1]>=r[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var a=[];this.eachTargetSeries(function(t){var r=[];var e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&r.push(e)},this);a.push({seriesId:t.id,dataIndex:r})},this);return a},getVisualMeta:function(r){var t=LN(this,"outOfRange",this.getExtent());var e=LN(this,"inRange",this.option.range.slice());var i=[];function a(t,e){i.push({value:t,color:r(t,e)})}var n=0;var o=0;var s=e.length;var l=t.length;for(;o<l&&(!e.length||t[o]<=e[0]);o++){if(t[o]<e[n]){a(t[o],"outOfRange")}}for(var u=1;n<s;n++,u=0){u&&i.length&&a(e[n],"outOfRange");a(e[n],"inRange")}for(var u=1;o<l;o++){if(!e.length||e[e.length-1]<t[o]){if(u){i.length&&a(i[i.length-1].value,"outOfRange");u=0}a(t[o],"outOfRange")}}var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}}});function LN(t,e,r){if(r[0]===r[1]){return r.slice()}var i=200;var a=(r[1]-r[0])/i;var n=r[0];var o=[];for(var s=0;s<=i&&n<r[1];s++){o.push(n);n+=a}o.push(r[1]);return o}var kN=ed({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t;this.api=e;this.visualMapModel},render:function(t,e,r,i){this.visualMapModel=t;if(t.get("show")===false){this.group.removeAll();return}this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel;var r=lu(e.get("padding")||0);var i=t.getBoundingRect();t.add(new _s({z2:-1,silent:true,shape:{x:i.x-r[3],y:i.y-r[0],width:i.width+r[3]+r[1],height:i.height+r[0]+r[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(r,i,a){a=a||{};var t=a.forceState;var e=this.visualMapModel;var n={};if(i==="symbol"){n.symbol=e.get("itemSymbol")}if(i==="color"){var o=e.get("contentColor");n.color=o}function s(t){return n[t]}function l(t,e){n[t]=e}var u=e.controllerVisuals[t||e.getValueState(r)];var h=Aw.prepareVisualTypes(u);L(h,function(t){var e=u[t];if(a.convertOpacityToAlpha&&t==="opacity"){t="colorAlpha";e=u.__alphaForOpacity}if(Aw.dependsOn(t,i)){e&&e.applyVisual(r,s,l)}});return n[i]},positionGroup:function(t){var e=this.visualMapModel;var r=this.api;Lu(t,e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},doRender:nt});function PN(t,e,r){var i=t.option;var a=i.align;if(a!=null&&a!=="auto"){return a}var n={width:e.getWidth(),height:e.getHeight()};var o=i.orient==="horizontal"?1:0;var s=[["left","right","width"],["top","bottom","height"]];var l=s[o];var u=[0,null,10];var h={};for(var f=0;f<3;f++){h[s[1-o][f]]=u[f];h[l[f]]=f===2?r[0]:i[l[f]]}var c=[["x","width",3],["y","height",0]][o];var v=Cu(h,n,i.padding);return l[(v.margin[c[2]]||0)+v[c[0]]+v[c[1]]*.5<n[c[1]]*.5?0:1]}function NN(e){L(e||[],function(t){if(e.dataIndex!=null){e.dataIndexInside=e.dataIndex;e.dataIndex=null}});return e}var EN=Fl;var ON=L;var zN=Math.min;var RN=Math.max;var BN=12;var VN=6;var GN=kN.extend({type:"visualMap.continuous",init:function(){GN.superApply(this,"init",arguments);this._shapes={};this._dataInterval=[];this._handleEnds=[];this._orient;this._useHandle;this._hoverLinkDataIndices=[];this._dragging;this._hovering},doRender:function(t,e,r,i){if(!i||i.type!=="selectDataRange"||i.from!==this.uid){this._buildView()}},_buildView:function(){this.group.removeAll();var t=this.visualMapModel;var e=this.group;this._orient=t.get("orient");this._useHandle=t.get("calculable");this._resetInterval();this._renderBar(e);var r=t.get("text");this._renderEndsText(e,r,0);this._renderEndsText(e,r,1);this._updateView(true);this.renderBackground(e);this._updateView();this._enableHoverLinkToSeries();this._enableHoverLinkFromSeries();this.positionGroup(e)},_renderEndsText:function(t,e,r){if(!e){return}var i=e[1-r];i=i!=null?i+"":"";var a=this.visualMapModel;var n=a.get("textGap");var o=a.itemSize;var s=this._shapes.barGroup;var l=this._applyTransform([o[0]/2,r===0?-n:o[1]+n],s);var u=this._applyTransform(r===0?"bottom":"top",s);var h=this._orient;var f=this.visualMapModel.textStyleModel;this.group.add(new ls({style:{x:l[0],y:l[1],textVerticalAlign:h==="horizontal"?"middle":u,textAlign:h==="horizontal"?u:"center",text:i,textFont:f.getFont(),textFill:f.getTextColor()}}))},_renderBar:function(t){var e=this.visualMapModel;var r=this._shapes;var i=e.itemSize;var a=this._orient;var n=this._useHandle;var o=PN(e,this.api,i);var s=r.barGroup=this._createBarGroup(o);s.add(r.outOfRange=FN());s.add(r.inRange=FN(null,n?jN(this._orient):null,z(this._dragHandle,this,"all",false),z(this._dragHandle,this,"all",true)));var l=e.textStyleModel.getTextRect("国");var u=RN(l.width,l.height);if(n){r.handleThumbs=[];r.handleLabels=[];r.handleLabelPoints=[];this._createHandle(s,0,i,u,a,o);this._createHandle(s,1,i,u,a,o)}this._createIndicator(s,i,u,a);t.add(s)},_createHandle:function(t,e,r,i,a){var n=z(this._dragHandle,this,e,false);var o=z(this._dragHandle,this,e,true);var s=FN(WN(e,i),jN(this._orient),n,o);s.position[0]=r[0];t.add(s);var l=this.visualMapModel.textStyleModel;var u=new ls({draggable:true,drift:n,onmousemove:function(t){oa(t.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=[a==="horizontal"?i/2:i*1.5,a==="horizontal"?e===0?-(i*1.5):i*1.5:e===0?-i/2:i/2];var f=this._shapes;f.handleThumbs[e]=s;f.handleLabelPoints[e]=h;f.handleLabels[e]=u},_createIndicator:function(t,e,r,i){var a=FN([[0,0]],"move");a.position[0]=e[0];a.attr({invisible:true,silent:true});t.add(a);var n=this.visualMapModel.textStyleModel;var o=new ls({silent:true,invisible:true,style:{x:0,y:0,text:"",textFont:n.getFont(),textFill:n.getTextColor()}});this.group.add(o);var s=[i==="horizontal"?r/2:VN+3,0];var l=this._shapes;l.indicator=a;l.indicatorLabel=o;l.indicatorLabelPoint=s},_dragHandle:function(t,e,r,i){if(!this._useHandle){return}this._dragging=!e;if(!e){var a=this._applyTransform([r,i],this._shapes.barGroup,true);this._updateInterval(t,a[1]);this._updateView()}if(e===!this.visualMapModel.get("realtime")){this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()})}if(e){!this._hovering&&this._clearHoverLinkToSeries()}else if(UN(this.visualMapModel)){this._doHoverLinkToSeries(this._handleEnds[t],false)}},_resetInterval:function(){var t=this.visualMapModel;var e=this._dataInterval=t.getSelected();var r=t.getExtent();var i=[0,t.itemSize[1]];this._handleEnds=[EN(e[0],r,i,true),EN(e[1],r,i,true)]},_updateInterval:function(t,e){e=e||0;var r=this.visualMapModel;var i=this._handleEnds;var a=[0,r.itemSize[1]];GS(e,i,a,t,0);var n=r.getExtent();this._dataInterval=[EN(i[0],a,n,true),EN(i[1],a,n,true)]},_updateView:function(t){var e=this.visualMapModel;var r=e.getExtent();var i=this._shapes;var a=[0,e.itemSize[1]];var n=t?a:this._handleEnds;var o=this._createBarVisual(this._dataInterval,r,n,"inRange");var s=this._createBarVisual(r,r,a,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints);i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints);this._updateHandle(n,o)},_createBarVisual:function(t,e,r,i){var a={forceState:i,convertOpacityToAlpha:true};var n=this._makeColorGradient(t,a);var o=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)];var s=this._createBarPoints(r,o);return{barColor:new As(0,0,0,1,n),barPoints:s,handlesColor:[n[0].color,n[n.length-1].color]}},_makeColorGradient:function(t,e){var r=100;var i=[];var a=(t[1]-t[0])/r;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var n=1;n<r;n++){var o=t[0]+a*n;if(o>t[1]){break}i.push({color:this.getControllerVisual(o,"color",e),offset:n/r})}i.push({color:this.getControllerVisual(t[1],"color",e),offset:1});return i},_createBarPoints:function(t,e){var r=this.visualMapModel.itemSize;return[[r[0]-e[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient;var r=this.visualMapModel.get("inverse");return new cr(e==="horizontal"&&!r?{scale:t==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:e==="horizontal"&&r?{scale:t==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:e==="vertical"&&!r?{scale:t==="left"?[1,-1]:[-1,-1]}:{scale:t==="left"?[1,1]:[-1,1]})},_updateHandle:function(i,a){if(!this._useHandle){return}var n=this._shapes;var o=this.visualMapModel;var s=n.handleThumbs;var l=n.handleLabels;ON([0,1],function(t){var e=s[t];e.setStyle("fill",a.handlesColor[t]);e.position[1]=i[t];var r=xl(n.handleLabelPoints[t],yl(e,this.group));l[t].setStyle({x:r[0],y:r[1],text:o.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?t===0?"bottom":"top":"left",n.barGroup)})},this)},_showIndicator:function(t,e,r,i){var a=this.visualMapModel;var n=a.getExtent();var o=a.itemSize;var s=[0,o[1]];var l=EN(t,n,s,true);var u=this._shapes;var h=u.indicator;if(!h){return}h.position[1]=l;h.attr("invisible",false);h.setShape("points",HN(!!r,i,l,o[1]));var f={convertOpacityToAlpha:true};var c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=xl(u.indicatorLabelPoint,yl(h,this.group));var d=u.indicatorLabel;d.attr("invisible",false);var p=this._applyTransform("left",u.barGroup);var g=this._orient;d.setStyle({text:(r?r:"")+a.formatValueText(e),textVerticalAlign:g==="horizontal"?p:"middle",textAlign:g==="horizontal"?"center":p,x:v[0],y:v[1]})},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){i._hovering=true;if(!i._dragging){var e=i.visualMapModel.itemSize;var r=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,true,true);r[1]=zN(RN(0,r[1]),e[1]);i._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=e[0])}}).on("mouseout",function(){i._hovering=false;!i._dragging&&i._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();if(this.visualMapModel.option.hoverLink){t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this);t.on("mouseout",this._hideIndicator,this)}else{this._clearHoverLinkFromSeries()}},_doHoverLinkToSeries:function(t,e){var r=this.visualMapModel;var i=r.itemSize;if(!r.option.hoverLink){return}var a=[0,i[1]];var n=r.getExtent();t=zN(RN(a[0],t),a[1]);var o=ZN(r,n,a);var s=[t-o,t+o];var l=EN(t,a,n,true);var u=[EN(s[0],a,n,true),EN(s[1],a,n,true)];s[0]<a[0]&&(u[0]=-Infinity);s[1]>a[1]&&(u[1]=Infinity);if(e){if(u[0]===-Infinity){this._showIndicator(l,u[1],"< ",o)}else if(u[1]===Infinity){this._showIndicator(l,u[0],"> ",o)}else{this._showIndicator(l,l,"≈ ",o)}}var h=this._hoverLinkDataIndices;var f=[];if(e||UN(r)){f=this._hoverLinkDataIndices=r.findTargetDataIndices(u)}var c=$a(h,f);this._dispatchHighDown("downplay",NN(c[0]));this._dispatchHighDown("highlight",NN(c[1]))},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target;var r=this.visualMapModel;if(!e||e.dataIndex==null){return}var i=this.ecModel.getSeriesByIndex(e.seriesIndex);if(!r.isTargetSeries(i)){return}var a=i.getData(e.dataType);var n=a.get(r.getDataDimension(a),e.dataIndex,true);if(!isNaN(n)){this._showIndicator(n,n)}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",true);t.indicatorLabel&&t.indicatorLabel.attr("invisible",true)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",NN(t));t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver);t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,r,i){var a=yl(e,i?null:this.group);return Il[B(t)?"applyTransform":"transformDirection"](t,a,r)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries();this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries();this._clearHoverLinkToSeries()}});function FN(t,e,r,i){return new ys({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(t){oa(t.event)},ondragend:i})}function WN(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function HN(t,e,r,i){return t?[[0,-zN(e,RN(r,0))],[VN,0],[0,zN(e,RN(i-r,0))]]:[[0,0],[5,-5],[5,5]]}function ZN(t,e,r){var i=BN/2;var a=t.get("hoverLinkDataSize");if(a){i=EN(a,e,r,true)/2}return i}function UN(t){var e=t.get("hoverLinkOnHandle");return!!(e==null?t.get("realtime"):e)}function jN(t){return t==="vertical"?"ns-resize":"ew-resize"}var XN={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Xv(XN,function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})});Zv(dN);var YN=TN.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:false,maxOpen:false,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:true,showLabel:null},optionUpdated:function(t,e){YN.superApply(this,"optionUpdated",arguments);this._pieceList=[];this.resetExtent();var r=this._mode=this._determineMode();qN[this._mode].call(this);this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){if(r==="categories"){t.mappingMethod="category";t.categories=P(i)}else{t.dataExtent=this.getExtent();t.mappingMethod="piecewise";t.pieceList=T(this._pieceList,function(t){var t=P(t);if(e!=="inRange"){t.visual=null}return t})}})},completeVisualOption:function(){var i=this.option;var r={};var t=Aw.listVisualTypes();var a=this.isCategory();L(i.pieces,function(e){L(t,function(t){if(e.hasOwnProperty(t)){r[t]=1}})});L(r,function(t,e){var r=0;L(this.stateList,function(t){r|=n(i,t,e)||n(i.target,t,e)},this);!r&&L(this.stateList,function(t){(i[t]||(i[t]={}))[e]=yN.get(e,t==="inRange"?"active":"inactive",a)})},this);function n(t,e,r){return t&&t[e]&&(F(t[e])?t[e].hasOwnProperty(r):t[e]===r)}TN.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var r=this.option;var i=this._pieceList;var a=(e?r:t).selected||{};r.selected=a;L(i,function(t,e){var r=this.getSelectedMapKey(t);if(!a.hasOwnProperty(r)){a[r]=true}},this);if(r.selectedMode==="single"){var n=false;L(i,function(t,e){var r=this.getSelectedMapKey(t);if(a[r]){n?a[r]=false:n=true}},this)}},getSelectedMapKey:function(t){return this._mode==="categories"?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=P(t)},getValueState:function(t){var e=Aw.findPieceIndex(t,this._pieceList);return e!=null?this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange":"outOfRange"},findTargetDataIndices:function(a){var r=[];this.eachTargetSeries(function(t){var i=[];var e=t.getData();e.each(this.getDataDimension(e),function(t,e){var r=Aw.findPieceIndex(t,this._pieceList);r===a&&i.push(e)},this);r.push({seriesId:t.id,dataIndex:i})},this);return r},getRepresentValue:function(t){var e;if(this.isCategory()){e=t.value}else{if(t.value!=null){e=t.value}else{var r=t.interval||[];e=r[0]===-Infinity&&r[1]===Infinity?0:(r[0]+r[1])/2}}return e},getVisualMeta:function(a){if(this.isCategory()){return}var n=[];var o=[];var s=this;function r(t,e){var r=s.getRepresentValue({interval:t});if(!e){e=s.getValueState(r)}var i=a(r,e);if(t[0]===-Infinity){o[0]=i}else if(t[1]===Infinity){o[1]=i}else{n.push({value:t[0],color:i},{value:t[1],color:i})}}var t=this._pieceList.slice();if(!t.length){t.push({interval:[-Infinity,Infinity]})}else{var e=t[0].interval[0];e!==-Infinity&&t.unshift({interval:[-Infinity,e]});e=t[t.length-1].interval[1];e!==Infinity&&t.push({interval:[e,Infinity]})}var i=-Infinity;L(t,function(t){var e=t.interval;if(e){e[0]>i&&r([i,e[0]],"outOfRange");r(e.slice());i=e[1]}},this);return{stops:n,outerColors:o}}});var qN={splitNumber:function(){var t=this.option;var e=this._pieceList;var r=Math.min(t.precision,20);var i=this.getExtent();var a=t.splitNumber;a=Math.max(parseInt(a,10),1);t.splitNumber=a;var n=(i[1]-i[0])/a;while(+n.toFixed(r)!==n&&r<5){r++}t.precision=r;n=+n.toFixed(r);var o=0;if(t.minOpen){e.push({index:o++,interval:[-Infinity,i[0]],close:[0,0]})}for(var s=i[0],l=o+a;o<l;s+=n){var u=o===a-1?i[1]:s+n;e.push({index:o++,interval:[s,u],close:[1,1]})}if(t.maxOpen){e.push({index:o++,interval:[i[1],Infinity],close:[0,0]})}iu(e);L(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;L(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,true),value:t})},this);$N(t,this._pieceList)},pieces:function(){var t=this.option;var c=this._pieceList;L(t.pieces,function(t,e){if(!F(t)){t={value:t}}var r={text:"",index:e};if(t.label!=null){r.text=t.label}if(t.hasOwnProperty("value")){var i=r.value=t.value;r.interval=[i,i];r.close=[1,1]}else{var a=r.interval=[];var n=r.close=[0,0];var o=[1,0,1];var s=[-Infinity,Infinity];var l=[];for(var u=0;u<2;u++){var h=[["gte","gt","min"],["lte","lt","max"]][u];for(var f=0;f<3&&a[u]==null;f++){a[u]=t[h[f]];n[u]=o[f];l[u]=f===2}a[u]==null&&(a[u]=s[u])}l[0]&&a[1]===Infinity&&(n[0]=0);l[1]&&a[0]===-Infinity&&(n[1]=0);if(A){if(a[0]>a[1]){console.warn("Piece "+e+"is illegal: "+a+" lower bound should not greater then uppper bound.")}}if(a[0]===a[1]&&n[0]&&n[1]){r.value=a[0]}}r.visual=Aw.retrieveVisuals(t);c.push(r)},this);$N(t,c);iu(c);L(c,function(t){var e=t.close;var r=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,false,r)},this)}};function $N(t,e){var r=t.inverse;if(t.orient==="vertical"?!r:r){e.reverse()}}var KN=kN.extend({type:"visualMap.piecewise",doRender:function(){var n=this.group;n.removeAll();var o=this.visualMapModel;var s=o.get("textGap");var t=o.textStyleModel;var l=t.getFont();var u=t.getTextColor();var h=this._getItemAlign();var f=o.itemSize;var e=this._getViewData();var r=e.endsText;var c=j(o.get("showLabel",true),!r);r&&this._renderEndsText(n,r[0],f,c,h);L(e.viewPieceList,i,this);r&&this._renderEndsText(n,r[1],f,c,h);Iu(o.get("orient"),n,o.get("itemGap"));this.renderBackground(n);this.positionGroup(n);function i(t){var e=t.piece;var r=new cr;r.onclick=z(this._onItemClick,this,e);this._enableHoverLink(r,t.indexInModelPieceList);var i=o.getRepresentValue(e);this._createItemSymbol(r,i,[0,0,f[0],f[1]]);if(c){var a=this.visualMapModel.getValueState(i);r.add(new ls({style:{x:h==="right"?-s:f[0]+s,y:f[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:a==="outOfRange"?.5:1}}))}n.add(r)}},_enableHoverLink:function(t,r){t.on("mouseover",z(e,this,"highlight")).on("mouseout",z(e,this,"downplay"));function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:NN(e.findTargetDataIndices(r))})}},_getItemAlign:function(){var t=this.visualMapModel;var e=t.option;if(e.orient==="vertical"){return PN(t,this.api,t.itemSize)}else{var r=e.align;if(!r||r==="auto"){r="left"}return r}},_renderEndsText:function(t,e,r,i,a){if(!e){return}var n=new cr;var o=this.visualMapModel.textStyleModel;n.add(new ls({style:{x:i?a==="right"?r[0]:0:r[0]/2,y:r[1]/2,textVerticalAlign:"middle",textAlign:i?a:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}}));t.add(n)},_getViewData:function(){var t=this.visualMapModel;var e=T(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}});var r=t.get("text");var i=t.get("orient");var a=t.get("inverse");if(i==="horizontal"?a:!a){e.reverse()}else if(r){r=r.slice().reverse()}return{viewPieceList:e,endsText:r}},_createItemSymbol:function(t,e,r){t.add(Qp(this.getControllerVisual(e,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel;var r=e.option;var i=P(r.selected);var a=e.getSelectedMapKey(t);if(r.selectedMode==="single"){i[a]=true;L(i,function(t,e){i[e]=e===a})}else{i[a]=!i[a]}this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}});Zv(dN);var JN=ou;var QN=uu;function tE(t){Wa(t,"label",["show"])}var eE=td({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,r,i){if(A){if(this.type==="marker"){throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.")}}this.mergeDefaultAndTheme(t,r);this.mergeOption(t,r,i.createdBySelf,true)},isAnimationEnabled:function(){if(m.node){return false}var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,a){var n=this.constructor;var o=this.mainType+"Model";if(!e){i.eachSeries(function(t){var e=t.get(this.mainType);var r=t[o];if(!e||!e.data){t[o]=null;return}if(!r){if(a){tE(e)}L(e.data,function(t){if(t instanceof Array){tE(t[0]);tE(t[1])}else{tE(t)}});r=new n(e,this,i);N(r,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:true});r.__hostSeries=t}else{r.mergeOption(e,i,true)}t[o]=r},this)}},formatTooltip:function(t){var e=this.getData();var r=this.getRawValue(t);var i=B(r)?T(r,JN).join(", "):JN(r);var a=e.getName(t);var n=QN(this.name);if(r!=null||a){n+="<br />"}if(a){n+=QN(a);if(r!=null){n+=" : "}}if(r!=null){n+=QN(i)}return n},getData:function(){return this._data},setData:function(t){this._data=t}});I(eE,wf);eE.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:true,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:true}}}});var rE=S;function iE(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function aE(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function nE(t,e,r,i,a,n){var o=[];var s=Hd(e,i,r);var l=s?e.getCalculationInfo("stackResultDimension"):i;var u=vE(e,l,t);var h=e.indicesOfNearest(l,u)[0];o[a]=e.get(r,h);o[n]=e.get(i,h);var f=Ul(e.get(i,h));f=Math.min(f,20);if(f>=0){o[n]=+o[n].toFixed(f)}return o}var oE=R;var sE={min:oE(nE,"min"),max:oE(nE,"max"),average:oE(nE,"average")};function lE(t,e){var r=t.getData();var i=t.coordinateSystem;if(e&&!aE(e)&&!B(e.coord)&&i){var a=i.dimensions;var n=uE(e,r,i,t);e=P(e);if(e.type&&sE[e.type]&&n.baseAxis&&n.valueAxis){var o=rE(a,n.baseAxis.dim);var s=rE(a,n.valueAxis.dim);e.coord=sE[e.type](r,n.baseDataDim,n.valueDataDim,o,s);e.value=e.coord[s]}else{var l=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis];for(var u=0;u<2;u++){if(sE[l[u]]){l[u]=vE(r,r.mapDimension(a[u]),l[u])}}e.coord=l}}return e}function uE(t,e,r,i){var a={};if(t.valueIndex!=null||t.valueDim!=null){a.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim;a.valueAxis=r.getAxis(hE(i,a.valueDataDim));a.baseAxis=r.getOtherAxis(a.valueAxis);a.baseDataDim=e.mapDimension(a.baseAxis.dim)}else{a.baseAxis=i.getBaseAxis();a.valueAxis=r.getOtherAxis(a.baseAxis);a.baseDataDim=e.mapDimension(a.baseAxis.dim);a.valueDataDim=e.mapDimension(a.valueAxis.dim)}return a}function hE(t,e){var r=t.getData();var i=r.dimensions;e=r.getDimension(e);for(var a=0;a<i.length;a++){var n=r.getDimensionInfo(i[a]);if(n.name===e){return n.coordDim}}}function fE(t,e){return t&&t.containData&&e.coord&&!iE(e)?t.containData(e.coord):true}function cE(t,e,r,i){if(i<2){return t.coord&&t.coord[i]}return t.value}function vE(t,e,r){if(r==="average"){var i=0;var a=0;t.each(e,function(t,e){if(!isNaN(t)){i+=t;a++}});return i/a}else{return t.getDataExtent(e,true)[r==="max"?1:0]}}var dE=ed({type:"marker",init:function(){this.markerGroupMap=it()},render:function(t,r,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=false});var a=this.type+"Model";r.eachSeries(function(t){var e=t[a];e&&this.renderSeries(t,e,r,i)},this);e.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});function pE(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e=s.getItemModel(t);var r;var i=Wl(e.get("x"),u.getWidth());var a=Wl(e.get("y"),u.getHeight());if(!isNaN(i)&&!isNaN(a)){r=[i,a]}else if(l.getMarkerPosition){r=l.getMarkerPosition(s.getValues(s.dimensions,t))}else if(h){var n=s.get(h.dimensions[0],t);var o=s.get(h.dimensions[1],t);r=h.dataToPoint([n,o])}if(!isNaN(i)){r[0]=i}if(!isNaN(a)){r[1]=a}s.setItemLayout(t,r)})}dE.extend({type:"markPoint",updateTransform:function(t,e,r){e.eachSeries(function(t){var e=t.markPointModel;if(e){pE(e.getData(),t,r);this.markerGroupMap.get(t.id).updateLayout(e)}},this)},renderSeries:function(t,i,e,r){var a=t.coordinateSystem;var n=t.id;var o=t.getData();var s=this.markerGroupMap;var l=s.get(n)||s.set(n,new Cg);var u=gE(a,t,i);i.setData(u);pE(i.getData(),t,r);u.each(function(t){var e=u.getItemModel(t);var r=e.getShallow("symbolSize");if(typeof r==="function"){r=r(i.getRawValue(t),i.getDataParams(t))}u.setItemVisual(t,{symbolSize:r,color:e.get("itemStyle.color")||o.getVisual("color"),symbol:e.getShallow("symbol")})});l.updateData(u);this.group.add(l.group);u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})});l.__keep=true;l.group.silent=i.get("silent")||t.get("silent")}});function gE(t,r,e){var i;if(t){i=T(t&&t.dimensions,function(t){var e=r.getData().getDimensionInfo(r.getData().mapDimension(t))||{};return C({name:t},e)})}else{i=[{name:"value",type:"float"}]}var a=new Dd(i,e);var n=T(e.get("data"),R(lE,r));if(t){n=k(n,R(fE,t))}a.initData(n,null,t?cE:function(t){return t.value});return a}Zv(function(t){t.markPoint=t.markPoint||{}});eE.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:true,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:true},lineStyle:{width:3}},animationEasing:"linear"}});var mE=function(t,e,r,i){var a=t.getData();var n=i.type;if(!B(i)&&(n==="min"||n==="max"||n==="average"||(i.xAxis!=null||i.yAxis!=null))){var o;var s;var l;if(i.yAxis!=null||i.xAxis!=null){s=i.yAxis!=null?"y":"x";o=e.getAxis(s);l=j(i.yAxis,i.xAxis)}else{var u=uE(i,a,e,t);s=u.valueDataDim;o=u.valueAxis;l=vE(a,s,n)}var h=s==="x"?0:1;var f=1-h;var c=P(i);var v={};c.type=null;c.coord=[];v.coord=[];c.coord[f]=-Infinity;v.coord[f]=Infinity;var d=r.get("precision");if(d>=0&&typeof l==="number"){l=+l.toFixed(Math.min(d,20))}c.coord[h]=v.coord[h]=l;i=[c,v,{type:n,valueIndex:i.valueIndex,value:l}]}i=[lE(t,i[0]),lE(t,i[1]),N({},i[2])];i[2].type=i[2].type||"";y(i[2],i[0]);y(i[2],i[1]);return i};function yE(t){return!isNaN(t)&&!isFinite(t)}function xE(t,e,r,i){var a=1-t;var n=i.dimensions[t];return yE(e[a])&&yE(r[a])&&e[t]===r[t]&&i.getAxis(n).containData(e[t])}function _E(t,e){if(t.type==="cartesian2d"){var r=e[0].coord;var i=e[1].coord;if(r&&i&&(xE(1,r,i,t)||xE(0,r,i,t))){return true}}return fE(t,e[0])&&fE(t,e[1])}function wE(t,e,r,i,a){var n=i.coordinateSystem;var o=t.getItemModel(e);var s;var l=Wl(o.get("x"),a.getWidth());var u=Wl(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u)){s=[l,u]}else{if(i.getMarkerPosition){s=i.getMarkerPosition(t.getValues(t.dimensions,e))}else{var h=n.dimensions;var f=t.get(h[0],e);var c=t.get(h[1],e);s=n.dataToPoint([f,c])}if(n.type==="cartesian2d"){var v=n.getAxis("x");var d=n.getAxis("y");var h=n.dimensions;if(yE(t.get(h[0],e))){s[0]=v.toGlobalCoord(v.getExtent()[r?0:1])}else if(yE(t.get(h[1],e))){s[1]=d.toGlobalCoord(d.getExtent()[r?0:1])}}if(!isNaN(l)){s[0]=l}if(!isNaN(u)){s[1]=u}}t.setItemLayout(e,s)}dE.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries(function(e){var t=e.markLineModel;if(t){var r=t.getData();var i=t.__from;var a=t.__to;i.each(function(t){wE(i,t,true,e,n);wE(a,t,false,e,n)});r.each(function(t){r.setItemLayout(t,[i.getItemLayout(t),a.getItemLayout(t)])});this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(a,r,t,n){var e=a.coordinateSystem;var i=a.id;var o=a.getData();var s=this.markerGroupMap;var l=s.get(i)||s.set(i,new Gb);this.group.add(l.group);var u=bE(e,a,r);var h=u.from;var f=u.to;var c=u.line;r.__from=h;r.__to=f;r.setData(c);var v=r.get("symbol");var d=r.get("symbolSize");if(!B(v)){v=[v,v]}if(typeof d==="number"){d=[d,d]}u.from.each(function(t){p(h,t,true);p(f,t,false)});c.each(function(t){var e=c.getItemModel(t).get("lineStyle.color");c.setItemVisual(t,{color:e||h.getItemVisual(t,"color")});c.setItemLayout(t,[h.getItemLayout(t),f.getItemLayout(t)]);c.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:f.getItemVisual(t,"symbolSize"),toSymbol:f.getItemVisual(t,"symbol")})});l.updateData(c);u.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=r})});function p(t,e,r){var i=t.getItemModel(e);wE(t,e,r,a,n);t.setItemVisual(e,{symbolSize:i.get("symbolSize")||d[r?0:1],symbol:i.get("symbol",true)||v[r?0:1],color:i.get("itemStyle.color")||o.getVisual("color")})}l.__keep=true;l.group.silent=r.get("silent")||a.get("silent")}});function bE(t,r,e){var i;if(t){i=T(t&&t.dimensions,function(t){var e=r.getData().getDimensionInfo(r.getData().mapDimension(t))||{};return C({name:t},e)})}else{i=[{name:"value",type:"float"}]}var a=new Dd(i,e);var n=new Dd(i,e);var o=new Dd([],e);var s=T(e.get("data"),R(mE,r,t,e));if(t){s=k(s,R(_E,t))}var l=t?cE:function(t){return t.value};a.initData(T(s,function(t){return t[0]}),null,l);n.initData(T(s,function(t){return t[1]}),null,l);o.initData(T(s,function(t){return t[2]}));o.hasItemOption=true;return{from:a,to:n,line:o}}Zv(function(t){t.markLine=t.markLine||{}});eE.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:false,label:{show:true,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:true,position:"top"}}}});var SE=function(t,e,r,i){var a=lE(t,i[0]);var n=lE(t,i[1]);var o=j;var s=a.coord;var l=n.coord;s[0]=o(s[0],-Infinity);s[1]=o(s[1],-Infinity);l[0]=o(l[0],Infinity);l[1]=o(l[1],Infinity);var u=x([{},a,n]);u.coord=[a.coord,n.coord];u.x0=a.x;u.y0=a.y;u.x1=n.x;u.y1=n.y;return u};function ME(t){return!isNaN(t)&&!isFinite(t)}function IE(t,e,r,i){var a=1-t;return ME(e[a])&&ME(r[a])}function DE(t,e){var r=e.coord[0];var i=e.coord[1];if(t.type==="cartesian2d"){if(r&&i&&(IE(1,r,i,t)||IE(0,r,i,t))){return true}}return fE(t,{coord:r,x:e.x0,y:e.y0})||fE(t,{coord:i,x:e.x1,y:e.y1})}function TE(t,e,r,i,a){var n=i.coordinateSystem;var o=t.getItemModel(e);var s;var l=Wl(o.get(r[0]),a.getWidth());var u=Wl(o.get(r[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u)){s=[l,u]}else{if(i.getMarkerPosition){s=i.getMarkerPosition(t.getValues(r,e))}else{var h=t.get(r[0],e);var f=t.get(r[1],e);var c=[h,f];n.clampData&&n.clampData(c,c);s=n.dataToPoint(c,true)}if(n.type==="cartesian2d"){var v=n.getAxis("x");var d=n.getAxis("y");var h=t.get(r[0],e);var f=t.get(r[1],e);if(ME(h)){s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1])}else if(ME(f)){s[1]=d.toGlobalCoord(d.getExtent()[r[1]==="y0"?0:1])}}if(!isNaN(l)){s[0]=l}if(!isNaN(u)){s[1]=u}}return s}var AE=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];dE.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries(function(i){var t=i.markAreaModel;if(t){var a=t.getData();a.each(function(e){var t=T(AE,function(t){return TE(a,e,t,i,n)});a.setItemLayout(e,t);var r=a.getItemGraphicEl(e);r.setShape("points",t)})}},this)},renderSeries:function(r,o,t,i){var e=r.coordinateSystem;var a=r.name;var n=r.getData();var s=this.markerGroupMap;var l=s.get(a)||s.set(a,{group:new cr});this.group.add(l.group);l.__keep=true;var u=CE(e,r,o);o.setData(u);u.each(function(e){u.setItemLayout(e,T(AE,function(t){return TE(u,e,t,r,i)}));u.setItemVisual(e,{color:n.getVisual("color")})});u.diff(l.__data).add(function(t){var e=new ys({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e);l.group.add(e)}).update(function(t,e){var r=l.__data.getItemGraphicEl(e);gl(r,{shape:{points:u.getItemLayout(t)}},o,t);l.group.add(r);u.setItemGraphicEl(t,r)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute();u.eachItemGraphicEl(function(t,e){var r=u.getItemModel(e);var i=r.getModel("label");var a=r.getModel("emphasis.label");var n=u.getItemVisual(e,"color");t.useStyle(C(r.getModel("itemStyle").getItemStyle(),{fill:Re(n,.4),stroke:n}));t.hoverStyle=r.getModel("emphasis.itemStyle").getItemStyle();nl(t.style,t.hoverStyle,i,a,{labelFetcher:o,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:true,autoColor:n});al(t,{});t.dataModel=o});l.__data=u;l.group.silent=o.get("silent")||r.get("silent")}});function CE(t,i,e){var r;var a;var n=["x0","y0","x1","y1"];if(t){r=T(t&&t.dimensions,function(t){var e=i.getData();var r=e.getDimensionInfo(e.mapDimension(t))||{};return C({name:t},r)});a=new Dd(T(n,function(t,e){return{name:t,type:r[e%2].type}}),e)}else{r=[{name:"value",type:"float"}];a=new Dd(r,e)}var o=T(e.get("data"),R(SE,i,t,e));if(t){o=k(o,R(DE,t))}var s=t?function(t,e,r,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};a.initData(o,null,s);a.hasItemOption=true;return a}Zv(function(t){t.markArea=t.markArea||{}});var LE=function(t){var e=t&&t.timeline;if(!B(e)){e=e?[e]:[]}L(e,function(t){if(!t){return}kE(t)})};function kE(t){var e=t.type;var r={number:"value",time:"time"};if(r[e]){t.axisType=r[e];delete t.type}PE(t);if(NE(t,"controlPosition")){var i=t.controlStyle||(t.controlStyle={});if(!NE(i,"position")){i.position=t.controlPosition}if(i.position==="none"&&!NE(i,"show")){i.show=false;delete i.position}delete t.controlPosition}L(t.data||[],function(t){if(F(t)&&!B(t)){if(!NE(t,"value")&&NE(t,"name")){t.value=t.name}PE(t)}})}function PE(t){var e=t.itemStyle||(t.itemStyle={});var r=e.emphasis||(e.emphasis={});var i=t.label||(t.label||{});var a=i.normal||(i.normal={});var n={normal:1,emphasis:1};L(i,function(t,e){if(!n[e]&&!NE(a,e)){a[e]=t}});if(r.label&&!NE(i,"emphasis")){i.emphasis=r.label;delete r.label}}function NE(t,e){return t.hasOwnProperty(e)}Ru.registerSubTypeDefaulter("timeline",function(){return"slider"});Xv({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var r=e.getComponent("timeline");if(r&&t.currentIndex!=null){r.setCurrentIndex(t.currentIndex);if(!r.get("loop",true)&&r.isIndexMax()){r.setPlayState(false)}}e.resetOption("timeline");return C({currentIndex:r.option.currentIndex},t)});Xv({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");if(r&&t.playState!=null){r.setPlayState(t.playState)}});var EE=Ru.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:true,axisType:"time",realtime:true,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:false,rewind:false,loop:true,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,r){this._data;this._names;this.mergeDefaultAndTheme(t,r);this._initData()},mergeOption:function(t){EE.superApply(this,"mergeOption",arguments);this._initData()},setCurrentIndex:function(t){if(t==null){t=this.option.currentIndex}var e=this._data.count();if(this.option.loop){t=(t%e+e)%e}else{t>=e&&(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;var e=t.data||[];var r=t.axisType;var a=this._names=[];if(r==="category"){var n=[];L(e,function(t,e){var r=Za(t);var i;if(F(t)){i=P(t);i.value=e}else{i=e}n.push(i);if(!G(r)&&(r==null||isNaN(r))){r=""}a.push(r+"")});e=n}var i={category:"ordinal",time:"time"}[r]||"number";var o=this._data=new Dd([{name:"value",type:i}],this);o.initData(e,a)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category"){return this._names.slice()}}});var OE=EE.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:false,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:true,width:2,color:"#304654"},label:{position:"auto",show:true,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:true,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:true,showPlayBtn:true,showPrevBtn:true,showNextBtn:true,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:true,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});I(OE,wf);var zE=zf.extend({type:"timeline"});var RE=function(t,e,r,i){pg.call(this,t,e,r);this.type=i||"value";this._autoLabelInterval;this.model=null};RE.prototype={constructor:RE,getLabelInterval:function(){var t=this.model;var e=t.getModel("label");var r=e.get("interval");if(r!=null&&r!="auto"){return r}var r=this._autoLabelInterval;if(!r){r=this._autoLabelInterval=Gp(T(this.scale.getTicks(),this.dataToCoord,this),Fp(this,e.get("formatter")),e.getFont(),t.get("orient")==="horizontal"?0:90,e.get("rotate"))}return r},isLabelIgnored:function(t){if(this.type==="category"){var e=this.getLabelInterval();return typeof e==="function"&&!e(t,this.scale.getLabel(t))||t%(e+1)}}};M(RE,pg);var BE=z;var VE=L;var GE=Math.PI;zE.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,r,i){this.model=e;this.api=r;this.ecModel=t;this.group.removeAll();if(e.get("show",true)){var a=this._layout(e,r);var n=this._createGroup("mainGroup");var o=this._createGroup("labelGroup");var s=this._axis=this._createAxis(a,e);e.formatTooltip=function(t){return uu(s.scale.getLabel(t))};VE(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](a,n,s,e)},this);this._renderAxisLabel(a,o,s,e);this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer();this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var r=t.get("label.position");var i=t.get("orient");var a=FE(t,e);if(r==null||r==="auto"){r=i==="horizontal"?a.y+a.height/2<e.getHeight()/2?"-":"+":a.x+a.width/2<e.getWidth()/2?"+":"-"}else if(isNaN(r)){r={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][r]}var n={horizontal:"center",vertical:r>=0||r==="+"?"left":"right"};var o={horizontal:r>=0||r==="+"?"top":"bottom",vertical:"middle"};var s={horizontal:0,vertical:GE/2};var l=i==="vertical"?a.height:a.width;var u=t.getModel("controlStyle");var h=u.get("show",true);var f=h?u.get("itemSize"):0;var c=h?u.get("itemGap"):0;var v=f+c;var d=t.get("label.rotate")||0;d=d*GE/180;var p;var g;var m;var y;var x=u.get("position",true);var _=h&&u.get("showPlayBtn",true);var w=h&&u.get("showPrevBtn",true);var b=h&&u.get("showNextBtn",true);var S=0;var M=l;if(x==="left"||x==="bottom"){_&&(p=[0,0],S+=v);w&&(g=[S,0],S+=v);b&&(m=[M-f,0],M-=v)}else{_&&(p=[M-f,0],M-=v);w&&(g=[0,0],S+=v);b&&(m=[M-f,0],M-=v)}y=[S,M];if(t.get("inverse")){y.reverse()}return{viewRect:a,mainLength:l,orient:i,rotation:s[i],labelRotation:d,labelPosOpt:r,labelAlign:t.get("label.align")||n[i],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||o[i],playPosition:p,prevBtnPosition:g,nextBtnPosition:m,axisExtent:y,controlSize:f,controlGap:c}},_position:function(t,e){var r=this._mainGroup;var i=this._labelGroup;var a=t.viewRect;if(t.orient==="vertical"){var n=Ut();var o=a.x;var s=a.y+a.height;qt(n,n,[-o,-s]);$t(n,n,-GE/2);qt(n,n,[o,s]);a=a.clone();a.applyTransform(n)}var l=g(a);var u=g(r.getBoundingRect());var h=g(i.getBoundingRect());var f=r.position;var c=i.position;c[0]=f[0]=l[0][0];var v=t.labelPosOpt;if(isNaN(v)){var d=v==="+"?0:1;m(f,u,l,1,d);m(c,h,l,1,1-d)}else{var d=v>=0?0:1;m(f,u,l,1,d);c[1]=f[1]+v}r.attr("position",f);i.attr("position",c);r.rotation=i.rotation=t.rotation;p(r);p(i);function p(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function g(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,r,i,a){t[i]+=r[i][a]-e[i][a]}},_createAxis:function(t,e){var r=e.getData();var i=e.get("axisType");var a=Bp(e,i);var n=r.getDataExtent("value");a.setExtent(n[0],n[1]);this._customizeScale(a,r);a.niceTicks();var o=new RE("value",a,t.axisExtent,i);o.model=e;return o},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],function(t){return t})};t.getTicksLabels=function(){return T(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new cr;this.group.add(e);return e},_renderAxisLine:function(t,e,r,i){var a=r.getExtent();if(!i.get("lineStyle.show")){return}e.add(new ws({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:N({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:true,z2:1}))},_renderAxisTick:function(t,l,u,h){var f=h.getData();var e=u.scale.getTicks();VE(e,function(t,e){var r=u.dataToCoord(t);var i=f.getItemModel(e);var a=i.getModel("itemStyle");var n=i.getModel("emphasis.itemStyle");var o={position:[r,0],onclick:BE(this._changeTimeline,this,e)};var s=HE(i,a,l,o);al(s,n.getItemStyle());if(i.get("tooltip")){s.dataIndex=e;s.dataModel=h}else{s.dataIndex=s.dataModel=null}},this)},_renderAxisLabel:function(s,l,u,t){var e=t.getModel("label");if(!e.get("show")){return}var h=t.getData();var r=u.scale.getTicks();var f=Fp(u,e.get("formatter"));var c=u.getLabelInterval();VE(r,function(t,e){if(u.isLabelIgnored(e,c)){return}var r=h.getItemModel(e);var i=r.getModel("label");var a=r.getModel("emphasis.label");var n=u.dataToCoord(t);var o=new ls({position:[n,0],rotation:s.labelRotation-s.rotation,onclick:BE(this._changeTimeline,this,e),silent:false});ol(o.style,i,{text:f[e],textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline});l.add(o);al(o,ol({},a))},this)},_renderControl:function(t,o,e,s){var l=t.controlSize;var u=t.rotation;var h=s.getModel("controlStyle").getItemStyle();var f=s.getModel("emphasis.controlStyle").getItemStyle();var c=[0,-l/2,l,l];var r=s.getPlayState();var i=s.get("inverse",true);a(t.nextBtnPosition,"controlStyle.nextIcon",BE(this._changeTimeline,this,i?"-":"+"));a(t.prevBtnPosition,"controlStyle.prevIcon",BE(this._changeTimeline,this,i?"+":"-"));a(t.playPosition,"controlStyle."+(r?"stopIcon":"playIcon"),BE(this._handlePlayClick,this,!r),true);function a(t,e,r,i){if(!t){return}var a={position:t,origin:[l/2,0],rotation:i?-u:0,rectHover:true,style:h,onclick:r};var n=WE(s,e,c,a);o.add(n);al(n,f)}},_renderCurrentPointer:function(t,e,r,i){var a=i.getData();var n=i.getCurrentIndex();var o=a.getItemModel(n).getModel("checkpointStyle");var s=this;var l={onCreate:function(t){t.draggable=true;t.drift=BE(s._handlePointerDrag,s);t.ondragend=BE(s._handlePointerDragend,s);ZE(t,n,r,i,true)},onUpdate:function(t){ZE(t,n,r,i)}};this._currentPointer=HE(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer();this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,r){this._clearTimer();this._pointerChangeTimeline([r.offsetX,r.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],true)},_pointerChangeTimeline:function(t,e){var r=this._toAxisCoord(t)[0];var i=this._axis;var a=Zl(i.getExtent().slice());r>a[1]&&(r=a[1]);r<a[0]&&(r=a[0]);this._currentPointer.position[0]=r;this._currentPointer.dirty();var n=this._findNearestTick(r);var o=this.model;if(e||n!==o.getCurrentIndex()&&o.get("realtime")){this._changeTimeline(n)}},_doPlayStop:function(){this._clearTimer();if(this.model.getPlayState()){this._timer=setTimeout(BE(t,this),this.model.get("playInterval"))}function t(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",true)?-1:1))}},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return xl(t,e,true)},_findNearestTick:function(a){var t=this.model.getData();var n=Infinity;var o;var s=this._axis;t.each(["value"],function(t,e){var r=s.dataToCoord(t);var i=Math.abs(r-a);if(i<n){n=i;o=e}});return o},_clearTimer:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}},_changeTimeline:function(t){var e=this.model.getCurrentIndex();if(t==="+"){t=e+1}else if(t==="-"){t=e-1}this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}});function FE(t,e){return Cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function WE(t,e,r,i){var a=Bs(t.get(e).replace(/^path:\/\//,""),P(i||{}),new fr(r[0],r[1],r[2],r[3]),"center");return a}function HE(t,e,r,i,a,n){var o=e.get("color");if(!a){var s=t.get("symbol");a=Qp(s,-1,-1,2,2,o);a.setStyle("strokeNoScale",true);r.add(a);n&&n.onCreate(a)}else{a.setColor(o);r.add(a);n&&n.onUpdate(a)}var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l);i=y({rectHover:true,z2:100},i,true);var u=t.get("symbolSize");u=u instanceof Array?u.slice():[+u,+u];u[0]/=2;u[1]/=2;i.scale=u;var h=t.get("symbolOffset");if(h){var f=i.position=i.position||[0,0];f[0]+=Wl(h[0],u[0]);f[1]+=Wl(h[1],u[1])}var c=t.get("symbolRotate");i.rotation=(c||0)*Math.PI/180||0;a.attr(i);a.updateTransform();return a}function ZE(t,e,r,i,a){if(t.dragging){return}var n=i.getModel("checkpointStyle");var o=r.dataToCoord(i.getData().get(["value"],e));if(a||!n.get("animation",true)){t.attr({position:[o,0]})}else{t.stopAnimation(true);t.animateTo({position:[o,0]},n.get("animationDuration",true),n.get("animationEasing",true))}}Zv(LE);var UE=td({type:"toolbox",layoutMode:{type:"box",ignoreSize:true},mergeDefaultAndTheme:function(t){UE.superApply(this,"mergeDefaultAndTheme",arguments);L(this.option.feature,function(t,e){var r=aP(e);r&&y(t,r.defaultOption)})},defaultOption:{show:true,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:true,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});ed({type:"toolbox",render:function(h,f,c,l){var v=this.group;v.removeAll();if(!h.get("show")){return}var d=+h.get("itemSize");var u=h.get("feature")||{};var p=this._features||(this._features={});var g=[];L(u,function(t,e){g.push(e)});new ud(this._featureNames||[],g).add(t).update(t).remove(R(t,null)).execute();this._featureNames=g;function t(t,e){var r=g[t];var i=g[e];var a=u[r];var n=new Pl(a,h,h.ecModel);var o;if(r&&!i){if(jE(r)){o={model:n,onclick:n.option.onclick,featureName:r}}else{var s=aP(r);if(!s){return}o=new s(n,f,c)}p[r]=o}else{o=p[i];if(!o){return}o.model=n;o.ecModel=f;o.api=c}if(!r&&i){o.dispose&&o.dispose(f,c);return}if(!n.get("show")||o.unusable){o.remove&&o.remove(f,c);return}m(n,o,r);n.setIconStatus=function(t,e){var r=this.option;var i=this.iconPaths;r.iconStatus=r.iconStatus||{};r.iconStatus[t]=e;i[t]&&i[t].trigger(e)};if(o.render){o.render(n,f,c,l)}}function m(i,a,t){var n=i.getModel("iconStyle");var o=i.getModel("emphasis.iconStyle");var e=a.getIcons?a.getIcons():i.get("icon");var s=i.get("title")||{};if(typeof e==="string"){var r=e;var l=s;e={};s={};e[t]=r;s[t]=l}var u=i.iconPaths={};L(e,function(t,e){var r=Ml(t,{},{x:-d/2,y:-d/2,width:d,height:d});r.setStyle(n.getItemStyle());r.hoverStyle=o.getItemStyle();al(r);if(h.get("showTitle")){r.__title=s[e];r.on("mouseover",function(){var t=o.getItemStyle();r.setStyle({text:s[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){r.setStyle({textFill:null})})}r.trigger(i.get("iconStatus."+e)||"normal");v.add(r);r.on("click",z(a.onclick,a,f,c,e));u[e]=r})}tL(v,h,c);v.add(eL(v.getBoundingRect(),h));v.eachChild(function(t){var e=t.__title;var r=t.hoverStyle;if(r&&e){var i=Jr(e,vi(r));var a=t.position[0]+v.position[0];var n=t.position[1]+v.position[1]+d;var o=false;if(n+i.height>c.getHeight()){r.textPosition="top";o=true}var s=o?-5-i.height:d+8;if(a+i.width/2>c.getWidth()){r.textPosition=["100%",s];r.textAlign="right"}else if(a-i.width/2<0){r.textPosition=[0,s];r.textAlign="left"}}})},updateView:function(t,e,r,i){L(this._features,function(t){t.updateView&&t.updateView(t.model,e,r,i)})},remove:function(e,r){L(this._features,function(t){t.remove&&t.remove(e,r)});this.group.removeAll()},dispose:function(e,r){L(this._features,function(t){t.dispose&&t.dispose(e,r)})}});function jE(t){return t.indexOf("my")===0}var XE=ec.toolbox.saveAsImage;function YE(t){this.model=t}YE.defaultOption={show:true,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:XE.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:XE.lang.slice()};YE.prototype.unusable=!m.canvasSupported;var qE=YE.prototype;qE.onclick=function(t,e){var r=this.model;var i=r.get("name")||t.get("title.0.text")||"echarts";var a=document.createElement("a");var n=r.get("type",true)||"png";a.download=i+"."+n;a.target="_blank";var o=e.getConnectedDataURL({type:n,backgroundColor:r.get("backgroundColor",true)||t.get("backgroundColor")||"#fff",excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")});a.href=o;if(typeof MouseEvent==="function"&&!m.browser.ie&&!m.browser.edge){var s=new MouseEvent("click",{view:window,bubbles:true,cancelable:false});a.dispatchEvent(s)}else{if(window.navigator.msSaveOrOpenBlob){var l=atob(o.split(",")[1]);var u=l.length;var h=new Uint8Array(u);while(u--){h[u]=l.charCodeAt(u)}var f=new Blob([h]);window.navigator.msSaveOrOpenBlob(f,i+"."+n)}else{var c=r.get("lang");var v=""+'<body style="margin:0;">'+'<img src="'+o+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" />'+"</body>";var d=window.open();d.document.write(v)}}};iP("saveAsImage",YE);var $E=ec.toolbox.magicType;function KE(t){this.model=t}KE.defaultOption={show:true,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:P($E.title),option:{},seriesIndex:{}};var JE=KE.prototype;JE.getIcons=function(){var t=this.model;var e=t.get("icon");var r={};L(t.get("type"),function(t){if(e[t]){r[t]=e[t]}});return r};var QE={line:function(t,e,r,i){if(t==="bar"){return y({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},i.get("option.line")||{},true)}},bar:function(t,e,r,i){if(t==="line"){return y({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},i.get("option.bar")||{},true)}},stack:function(t,e,r,i){if(t==="line"||t==="bar"){return y({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},true)}},tiled:function(t,e,r,i){if(t==="line"||t==="bar"){return y({id:e,stack:""},i.get("option.tiled")||{},true)}}};var tO=[["line","bar"],["stack","tiled"]];JE.onclick=function(f,t,c){var v=this.model;var e=v.get("seriesIndex."+c);if(!QE[c]){return}var d={series:[]};var r=function(t){var e=t.subType;var r=t.id;var i=QE[c](e,r,t,v);if(i){C(i,t.option);d.series.push(i)}var a=t.coordinateSystem;if(a&&a.type==="cartesian2d"&&(c==="line"||c==="bar")){var n=a.getAxesByScale("ordinal")[0];if(n){var o=n.dim;var s=o+"Axis";var l=f.queryComponents({mainType:s,index:t.get(name+"Index"),id:t.get(name+"Id")})[0];var u=l.componentIndex;d[s]=d[s]||[];for(var h=0;h<=u;h++){d[s][u]=d[s][u]||{}}d[s][u].boundaryGap=c==="bar"?true:false}}};L(tO,function(t){if(S(t,c)>=0){L(t,function(t){v.setIconStatus(t,"normal")})}});v.setIconStatus(c,"emphasis");f.eachComponent({mainType:"series",query:e==null?null:{seriesIndex:e}},r);t.dispatchAction({type:"changeMagicType",currentType:c,newOption:d})};Xv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});iP("magicType",KE);var eO=ec.toolbox.dataView;var rO=new Array(60).join("-");var iO="\t";function aO(t){var a={};var n=[];var o=[];t.eachRawSeries(function(t){var e=t.coordinateSystem;if(e&&(e.type==="cartesian2d"||e.type==="polar")){var r=e.getBaseAxis();if(r.type==="category"){var i=r.dim+"_"+r.index;if(!a[i]){a[i]={categoryAxis:r,valueAxis:e.getOtherAxis(r),series:[]};o.push({axisDim:r.dim,axisIndex:r.index})}a[i].series.push(t)}else{n.push(t)}}else{n.push(t)}});return{seriesGroupByCategoryAxis:a,other:n,meta:o}}function nO(t){var f=[];L(t,function(t,e){var r=t.categoryAxis;var i=t.valueAxis;var a=i.dim;var n=[" "].concat(T(t.series,function(t){return t.name}));var o=[r.model.getCategories()];L(t.series,function(t){o.push(t.getRawData().mapArray(a,function(t){return t}))});var s=[n.join(iO)];for(var l=0;l<o[0].length;l++){var u=[];for(var h=0;h<o.length;h++){u.push(o[h][l])}s.push(u.join(iO))}f.push(s.join("\n"))});return f.join("\n\n"+rO+"\n\n")}function oO(t){return T(t,function(t){var a=t.getRawData();var n=[t.name];var o=[];a.each(a.dimensions,function(){var t=arguments.length;var e=arguments[t-1];var r=a.getName(e);for(var i=0;i<t-1;i++){o[i]=arguments[i]}n.push((r?r+iO:"")+o.join(iO))});return n.join("\n")}).join("\n\n"+rO+"\n\n")}function sO(t){var e=aO(t);return{value:k([nO(e.seriesGroupByCategoryAxis),oO(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+rO+"\n\n"),meta:e.meta}}function lO(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function uO(t){var e=t.slice(0,t.indexOf("\n"));if(e.indexOf(iO)>=0){return true}}var hO=new RegExp("["+iO+"]+","g");function fO(t){var e=t.split(/\n+/g);var r=lO(e.shift()).split(hO);var i=[];var a=T(r,function(t){return{name:t,data:[]}});for(var n=0;n<e.length;n++){var o=lO(e[n]).split(hO);i.push(o.shift());for(var s=0;s<o.length;s++){a[s]&&(a[s].data[n]=o[s])}}return{series:a,categories:i}}function cO(t){var e=t.split(/\n+/g);var r=lO(e.shift());var i=[];for(var a=0;a<e.length;a++){var n=lO(e[a]).split(hO);var o="";var s;var l=false;if(isNaN(n[0])){l=true;o=n[0];n=n.slice(1);i[a]={name:o,value:[]};s=i[a].value}else{s=i[a]=[]}for(var u=0;u<n.length;u++){s.push(+n[u])}if(s.length===1){l?i[a].value=s[0]:i[a]=s[0]}}return{name:r,data:i}}function vO(t,n){var e=t.split(new RegExp("\n*"+rO+"\n*","g"));var o={series:[]};L(e,function(t,e){if(uO(t)){var r=fO(t);var i=n[e];var a=i.axisDim+"Axis";if(i){o[a]=o[a]||[];o[a][i.axisIndex]={data:r.categories};o.series=o.series.concat(r.series)}}else{var r=cO(t);o.series.push(r)}});return o}function dO(t){this._dom=null;this.model=t}dO.defaultOption={show:true,readOnly:false,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:P(eO.title),lang:P(eO.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};dO.prototype.onclick=function(t,e){var r=e.getDom();var i=this.model;if(this._dom){r.removeChild(this._dom)}var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;";a.style.backgroundColor=i.get("backgroundColor")||"#fff";var n=document.createElement("h4");var o=i.get("lang")||[];n.innerHTML=o[0]||i.get("title");n.style.cssText="margin: 10px 20px;";n.style.color=i.get("textColor");var s=document.createElement("div");var l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent");var h=i.get("contentToOption");var f=sO(t);if(typeof u==="function"){var c=u(e.getOption());if(typeof c==="string"){s.innerHTML=c}else if(Z(c)){s.appendChild(c)}}else{s.appendChild(l);l.readOnly=i.get("readOnly");l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;";l.style.color=i.get("textColor");l.style.borderColor=i.get("textareaBorderColor");l.style.backgroundColor=i.get("textareaColor");l.value=f.value}var v=f.meta;var d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var p="float:right;margin-right:20px;border:none;"+"cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px";var g=document.createElement("div");var m=document.createElement("div");p+=";background-color:"+i.get("buttonColor");p+=";color:"+i.get("buttonTextColor");var y=this;function x(){r.removeChild(a);y._dom=null}aa(g,"click",x);aa(m,"click",function(){var t;try{if(typeof h==="function"){t=h(s,e.getOption())}else{t=vO(l.value,v)}}catch(t){x();throw new Error("Data view format error "+t)}if(t){e.dispatchAction({type:"changeDataView",newOption:t})}x()});g.innerHTML=o[1];m.innerHTML=o[2];m.style.cssText=p;g.style.cssText=p;!i.get("readOnly")&&d.appendChild(m);d.appendChild(g);aa(l,"keydown",function(t){if((t.keyCode||t.which)===9){var e=this.value;var r=this.selectionStart;var i=this.selectionEnd;this.value=e.substring(0,r)+iO+e.substring(i);this.selectionStart=this.selectionEnd=r+1;oa(t)}});a.appendChild(n);a.appendChild(s);a.appendChild(d);s.style.height=r.clientHeight-80+"px";r.appendChild(a);this._dom=a};dO.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)};dO.prototype.dispose=function(t,e){this.remove(t,e)};function pO(t,i){return T(t,function(t,e){var r=i&&i[e];if(F(r)&&!B(r)){if(F(t)&&!B(t)){t=t.value}return C({value:t},r)}else{return t}})}iP("dataView",dO);Xv({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,i){var a=[];L(t.newOption.series,function(t){var e=i.getSeriesByName(t.name)[0];if(!e){a.push(N({type:"scatter"},t))}else{var r=e.get("data");a.push({name:t.name,data:pO(t.data,r)})}});i.mergeOption(C({series:a},t.newOption))});var gO=L;var mO="\0_ec_hist_store";function yO(o,t){var s=bO(o);gO(t,function(t,e){var r=s.length-1;for(;r>=0;r--){var i=s[r];if(i[e]){break}}if(r<0){var a=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(a){var n=a.getPercentRange();s[0][e]={dataZoomId:e,start:n[0],end:n[1]}}}});s.push(t)}function xO(t){var i=bO(t);var e=i[i.length-1];i.length>1&&i.pop();var a={};gO(e,function(t,e){for(var r=i.length-1;r>=0;r--){var t=i[r][e];if(t){a[e]=t;break}}});return a}function _O(t){t[mO]=null}function wO(t){return bO(t).length}function bO(t){var e=t[mO];if(!e){e=t[mO]=[{}]}return e}LP.extend({type:"dataZoom.select"});NP.extend({type:"dataZoom.select"});var SO=ec.toolbox.dataZoom;var MO=L;var IO="\0_ec_\0toolbox-dataZoom_";function DO(t,e,r){(this._brushController=new xM(r.getZr())).on("brush",z(this._onBrush,this)).mount();this._isZoomActive}DO.defaultOption={show:true,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:P(SO.title)};var TO=DO.prototype;TO.render=function(t,e,r,i){this.model=t;this.ecModel=e;this.api=r;kO(t,e,this,i,r);LO(t,e)};TO.onclick=function(t,e,r){AO[r].call(this)};TO.remove=function(t,e){this._brushController.unmount()};TO.dispose=function(t,e){this._brushController.dispose()};var AO={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(xO(this.ecModel))}};TO._onBrush=function(t,e){if(!e.isEnd||!t.length){return}var s={};var l=this.ecModel;this._brushController.updateCovers([]);var r=new Tk(CO(this.model.option),l,{include:["grid"]});r.matchOutputRanges(t,l,function(t,e,r){if(r.type!=="cartesian2d"){return}var i=t.brushType;if(i==="rect"){a("x",r,e[0]);a("y",r,e[1])}else{a({lineX:"x",lineY:"y"}[i],r,e)}});yO(l,s);this._dispatchZoomAction(s);function a(t,e,r){var i=e.getAxis(t);var a=i.model;var n=u(t,a,l);var o=n.findRepresentativeAxisProxy(a).getMinMaxSpan();if(o.minValueSpan!=null||o.maxValueSpan!=null){r=GS(0,r.slice(),i.scale.getExtent(),0,o.minValueSpan,o.maxValueSpan)}n&&(s[n.id]={dataZoomId:n.id,startValue:r[0],endValue:r[1]})}function u(r,i,t){var a;t.eachComponent({mainType:"dataZoom",subType:"select"},function(t){var e=t.getAxisModel(r,i.componentIndex);e&&(a=t)});return a}};TO._dispatchZoomAction=function(t){var r=[];MO(t,function(t,e){r.push(P(t))});r.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:r})};function CO(e){var r={};L(["xAxisIndex","yAxisIndex"],function(t){r[t]=e[t];r[t]==null&&(r[t]="all");(r[t]===false||r[t]==="none")&&(r[t]=[])});return r}function LO(t,e){t.setIconStatus("back",wO(e)>1?"emphasis":"normal")}function kO(t,e,r,i,a){var n=r._isZoomActive;if(i&&i.type==="takeGlobalCursor"){n=i.key==="dataZoomSelect"?i.dataZoomSelectActive:false}r._isZoomActive=n;t.setIconStatus("zoom",n?"emphasis":"normal");var o=new Tk(CO(t.option),e,{include:["grid"]});r._brushController.setPanels(o.makePanelOpts(a,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(n?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:false)}iP("dataZoom",DO);Zv(function(i){if(!i){return}var o=i.dataZoom||(i.dataZoom=[]);if(!B(o)){i.dataZoom=o=[o]}var t=i.toolbox;if(t){if(B(t)){t=t[0]}if(t&&t.feature){var e=t.feature.dataZoom;r("xAxis",e);r("yAxis",e)}}function r(i,t){if(!t){return}var a=i+"Index";var n=t[a];if(n!=null&&n!="all"&&!B(n)){n=n===false||n==="none"?[]:[n]}s(i,function(t,e){if(n!=null&&n!="all"&&S(n,e)===-1){return}var r={type:"select",$fromToolbox:true,id:IO+i+e};r[a]=e;o.push(r)})}function s(t,e){var r=i[t];if(!B(r)){r=r?[r]:[]}MO(r,e)}});var PO=ec.toolbox.restore;function NO(t){this.model=t}NO.defaultOption={show:true,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:PO.title};var EO=NO.prototype;EO.onclick=function(t,e,r){_O(t);e.dispatchAction({type:"restore",from:this.uid})};iP("restore",NO);Xv({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var OO="urn:schemas-microsoft-com:vml";var zO=typeof window==="undefined"?null:window;var RO=false;var BO=zO&&zO.document;function VO(t){return GO(t)}var GO;if(BO&&!m.canvasSupported){try{!BO.namespaces.zrvml&&BO.namespaces.add("zrvml",OO);GO=function(t){return BO.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){GO=function(t){return BO.createElement("<"+t+' xmlns="'+OO+'" class="zrvml">')}}}function FO(){if(RO||!BO){return}RO=true;var t=BO.styleSheets;if(t.length<31){BO.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)")}else{t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var WO=mo.CMD;var HO=Math.round;var ZO=Math.sqrt;var UO=Math.abs;var jO=Math.cos;var XO=Math.sin;var YO=Math.max;if(!m.canvasSupported){var qO=",";var $O="progid:DXImageTransform.Microsoft";var KO=21600;var JO=KO/2;var QO=1e5;var tz=1e3;var ez=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;";t.coordsize=KO+","+KO;t.coordorigin="0,0"};var rz=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")};var iz=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"};var az=function(t,e){if(e&&t&&e.parentNode!==t){t.appendChild(e)}};var nz=function(t,e){if(e&&t&&e.parentNode===t){t.removeChild(e)}};var oz=function(t,e,r){return(parseFloat(t)||0)*QO+(parseFloat(e)||0)*tz+r};var sz=function(t,e){if(typeof t==="string"){if(t.lastIndexOf("%")>=0){return parseFloat(t)/100*e}return parseFloat(t)}return t};var lz=function(t,e,r){var i=Te(e);r=+r;if(isNaN(r)){r=1}if(i){t.color=iz(i[0],i[1],i[2]);t.opacity=r*i[3]}};var uz=function(t){var e=Te(t);return[iz(e[0],e[1],e[2]),e[3]]};var hz=function(t,e,r){var i=e.fill;if(i!=null){if(i instanceof Ts){var a;var n=0;var o=[0,0];var s=0;var l=1;var u=r.getBoundingRect();var h=u.width;var f=u.height;if(i.type==="linear"){a="gradient";var c=r.transform;var v=[i.x*h,i.y*f];var d=[i.x2*h,i.y2*f];if(c){Lt(v,v,c);Lt(d,d,c)}var p=d[0]-v[0];var g=d[1]-v[1];n=Math.atan2(p,g)*180/Math.PI;if(n<0){n+=360}if(n<1e-6){n=0}}else{a="gradientradial";var v=[i.x*h,i.y*f];var c=r.transform;var m=r.scale;var y=h;var x=f;o=[(v[0]-u.x)/y,(v[1]-u.y)/x];if(c){Lt(v,v,c)}y/=m[0]*KO;x/=m[1]*KO;var _=YO(y,x);s=2*0/_;l=2*i.r/_-s}var w=i.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});var b=w.length;var S=[];var M=[];for(var I=0;I<b;I++){var D=w[I];var T=uz(D.color);M.push(D.offset*l+s+" "+T[0]);if(I===0||I===b-1){S.push(T)}}if(b>=2){var A=S[0][0];var C=S[1][0];var L=S[0][1]*e.opacity;var k=S[1][1]*e.opacity;t.type=a;t.method="none";t.focus="100%";t.angle=n;t.color=A;t.color2=C;t.colors=M.join(",");t.opacity=k;t.opacity2=L}if(a==="radial"){t.focusposition=o.join(",")}}else{lz(t,i,e.opacity)}}};var fz=function(t,e){if(e.lineDash!=null){t.dashstyle=e.lineDash.join(" ")}if(e.stroke!=null&&!(e.stroke instanceof Ts)){lz(t,e.stroke,e.opacity)}};var cz=function(t,e,r,i){var a=e=="fill";var n=t.getElementsByTagName(e)[0];if(r[e]!=null&&r[e]!=="none"&&(a||!a&&r.lineWidth)){t[a?"filled":"stroked"]="true";if(r[e]instanceof Ts){nz(t,n)}if(!n){n=VO(e)}a?hz(n,r,i):fz(n,r);az(t,n)}else{t[a?"filled":"stroked"]="false";nz(t,n)}};var vz=[[],[],[]];var dz=function(t,e){var r=WO.M;var i=WO.C;var a=WO.L;var n=WO.A;var o=WO.Q;var s=[];var l;var u;var h;var f;var c;var v;var d=t.data;var p=t.len();for(f=0;f<p;){h=d[f++];u="";l=0;switch(h){case r:u=" m ";l=1;c=d[f++];v=d[f++];vz[0][0]=c;vz[0][1]=v;break;case a:u=" l ";l=1;c=d[f++];v=d[f++];vz[0][0]=c;vz[0][1]=v;break;case o:case i:u=" c ";l=3;var g=d[f++];var m=d[f++];var y=d[f++];var x=d[f++];var _;var w;if(h===o){_=y;w=x;y=(y+2*g)/3;x=(x+2*m)/3;g=(c+2*g)/3;m=(v+2*m)/3}else{_=d[f++];w=d[f++]}vz[0][0]=g;vz[0][1]=m;vz[1][0]=y;vz[1][1]=x;vz[2][0]=_;vz[2][1]=w;c=_;v=w;break;case n:var b=0;var S=0;var M=1;var I=1;var D=0;if(e){b=e[4];S=e[5];M=ZO(e[0]*e[0]+e[1]*e[1]);I=ZO(e[2]*e[2]+e[3]*e[3]);D=Math.atan2(-e[1]/I,e[0]/M)}var T=d[f++];var A=d[f++];var C=d[f++];var L=d[f++];var k=d[f++]+D;var P=d[f++]+k+D;f++;var N=d[f++];var E=T+jO(k)*C;var O=A+XO(k)*L;var g=T+jO(P)*C;var m=A+XO(P)*L;var z=N?" wa ":" at ";if(Math.abs(E-g)<1e-4){if(Math.abs(P-k)>.01){if(N){E+=270/KO}}else{if(Math.abs(O-A)<1e-4){if(N&&E<T||!N&&E>T){m-=270/KO}else{m+=270/KO}}else if(N&&O<A||!N&&O>A){g+=270/KO}else{g-=270/KO}}}s.push(z,HO(((T-C)*M+b)*KO-JO),qO,HO(((A-L)*I+S)*KO-JO),qO,HO(((T+C)*M+b)*KO-JO),qO,HO(((A+L)*I+S)*KO-JO),qO,HO((E*M+b)*KO-JO),qO,HO((O*I+S)*KO-JO),qO,HO((g*M+b)*KO-JO),qO,HO((m*I+S)*KO-JO));c=g;v=m;break;case WO.R:var R=vz[0];var B=vz[1];R[0]=d[f++];R[1]=d[f++];B[0]=R[0]+d[f++];B[1]=R[1]+d[f++];if(e){Lt(R,R,e);Lt(B,B,e)}R[0]=HO(R[0]*KO-JO);B[0]=HO(B[0]*KO-JO);R[1]=HO(R[1]*KO-JO);B[1]=HO(B[1]*KO-JO);s.push(" m ",R[0],qO,R[1]," l ",B[0],qO,R[1]," l ",B[0],qO,B[1]," l ",R[0],qO,B[1]);break;case WO.Z:s.push(" x ")}if(l>0){s.push(u);for(var V=0;V<l;V++){var G=vz[V];e&&Lt(G,G,e);s.push(HO(G[0]*KO-JO),qO,HO(G[1]*KO-JO),V<l-1?qO:"")}}}return s.join("")};Wo.prototype.brushVML=function(t){var e=this.style;var r=this._vmlEl;if(!r){r=VO("shape");ez(r);this._vmlEl=r}cz(r,"fill",e,this);cz(r,"stroke",e,this);var i=this.transform;var a=i!=null;var n=r.getElementsByTagName("stroke")[0];if(n){var o=e.lineWidth;if(a&&!e.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=ZO(UO(s))}n.weight=o+"px"}var l=this.path||(this.path=new mo);if(this.__dirtyPath){l.beginPath();this.buildPath(l,this.shape);l.toStatic();this.__dirtyPath=false}r.path=dz(l,this.transform);r.style.zIndex=oz(this.zlevel,this.z,this.z2);az(t,r);if(e.text!=null){this.drawRectText(t,this.getBoundingRect())}else{this.removeRectText(t)}};Wo.prototype.onRemove=function(t){nz(t,this._vmlEl);this.removeRectText(t)};Wo.prototype.onAdd=function(t){az(t,this._vmlEl);this.appendRectText(t)};var pz=function(t){return typeof t==="object"&&t.tagName&&t.tagName.toUpperCase()==="IMG"};Bi.prototype.brushVML=function(t){var e=this.style;var r=e.image;var i;var a;if(pz(r)){var n=r.src;if(n===this._imageSrc){i=this._imageWidth;a=this._imageHeight}else{var o=r.runtimeStyle;var s=o.width;var l=o.height;o.width="auto";o.height="auto";i=r.width;a=r.height;o.width=s;o.height=l;this._imageSrc=n;this._imageWidth=i;this._imageHeight=a}r=n}else{if(r===this._imageSrc){i=this._imageWidth;a=this._imageHeight}}if(!r){return}var u=e.x||0;var h=e.y||0;var f=e.width;var c=e.height;var v=e.sWidth;var d=e.sHeight;var p=e.sx||0;var g=e.sy||0;var m=v&&d;var y=this._vmlEl;if(!y){y=BO.createElement("div");ez(y);this._vmlEl=y}var x=y.style;var _=false;var w;var b=1;var S=1;if(this.transform){w=this.transform;b=ZO(w[0]*w[0]+w[1]*w[1]);S=ZO(w[2]*w[2]+w[3]*w[3]);_=w[1]||w[2]}if(_){var M=[u,h];var I=[u+f,h];var D=[u,h+c];var T=[u+f,h+c];Lt(M,M,w);Lt(I,I,w);Lt(D,D,w);Lt(T,T,w);var A=YO(M[0],I[0],D[0],T[0]);var C=YO(M[1],I[1],D[1],T[1]);var L=[];L.push("M11=",w[0]/b,qO,"M12=",w[2]/S,qO,"M21=",w[1]/b,qO,"M22=",w[3]/S,qO,"Dx=",HO(u*b+w[4]),qO,"Dy=",HO(h*S+w[5]));x.padding="0 "+HO(A)+"px "+HO(C)+"px 0";x.filter=$O+".Matrix("+L.join("")+", SizingMethod=clip)"}else{if(w){u=u*b+w[4];h=h*S+w[5]}x.filter="";x.left=HO(u)+"px";x.top=HO(h)+"px"}var k=this._imageEl;var P=this._cropEl;if(!k){k=BO.createElement("div");this._imageEl=k}var N=k.style;if(m){if(!(i&&a)){var E=new Image;var O=this;E.onload=function(){E.onload=null;i=E.width;a=E.height;N.width=HO(b*i*f/v)+"px";N.height=HO(S*a*c/d)+"px";O._imageWidth=i;O._imageHeight=a;O._imageSrc=r};E.src=r}else{N.width=HO(b*i*f/v)+"px";N.height=HO(S*a*c/d)+"px"}if(!P){P=BO.createElement("div");P.style.overflow="hidden";this._cropEl=P}var z=P.style;z.width=HO((f+p*f/v)*b);z.height=HO((c+g*c/d)*S);z.filter=$O+".Matrix(Dx="+-p*f/v*b+",Dy="+-g*c/d*S+")";if(!P.parentNode){y.appendChild(P)}if(k.parentNode!=P){P.appendChild(k)}}else{N.width=HO(b*f)+"px";N.height=HO(S*c)+"px";y.appendChild(k);if(P&&P.parentNode){y.removeChild(P);this._cropEl=null}}var R="";var B=e.opacity;if(B<1){R+=".Alpha(opacity="+HO(B*100)+") "}R+=$O+".AlphaImageLoader(src="+r+", SizingMethod=scale)";N.filter=R;y.style.zIndex=oz(this.zlevel,this.z,this.z2);az(t,y);if(e.text!=null){this.drawRectText(t,this.getBoundingRect())}};Bi.prototype.onRemove=function(t){nz(t,this._vmlEl);this._vmlEl=null;this._cropEl=null;this._imageEl=null;this.removeRectText(t)};Bi.prototype.onAdd=function(t){az(t,this._vmlEl);this.appendRectText(t)};var gz="normal";var mz={};var yz=0;var xz=100;var _z=document.createElement("div");var wz=function(t){var e=mz[t];if(!e){if(yz>xz){yz=0;mz={}}var r=_z.style;var i;try{r.font=t;i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||gz,variant:r.fontVariant||gz,weight:r.fontWeight||gz,size:parseFloat(r.fontSize||12)|0,family:i||"Microsoft YaHei"};mz[t]=e;yz++}return e};var bz;$r("measureText",function(t,e){var r=BO;if(!bz){bz=r.createElement("div");bz.style.cssText="position:absolute;top:-20000px;left:0;"+"padding:0;margin:0;border:none;white-space:pre;";BO.body.appendChild(bz)}try{bz.style.font=e}catch(t){}bz.innerHTML="";bz.appendChild(r.createTextNode(t));return{width:bz.offsetWidth}});var Sz=new fr;var Mz=function(t,e,r,i){var a=this.style;this.__dirty&&mi(a,true);var n=a.text;n!=null&&(n+="");if(!n){return}if(a.rich){var o=fi(n,a);n=[];for(var s=0;s<o.lines.length;s++){var l=o.lines[s].tokens;var u=[];for(var h=0;h<l.length;h++){u.push(l[h].text)}n.push(u.join(""))}n=n.join("\n")}var f;var c;var v=a.textAlign;var d=a.textVerticalAlign;var p=wz(a.font);var g=p.style+" "+p.variant+" "+p.weight+" "+p.size+'px "'+p.family+'"';r=r||Jr(n,g,v,d);var m=this.transform;if(m&&!i){Sz.copy(e);Sz.applyTransform(m);e=Sz}if(!i){var y=a.textPosition;var x=a.textDistance;if(y instanceof Array){f=e.x+sz(y[0],e.width);c=e.y+sz(y[1],e.height);v=v||"left"}else{var _=ii(y,e,x);f=_.x;c=_.y;v=v||_.textAlign;d=d||_.textVerticalAlign}}else{f=e.x;c=e.y}f=ei(f,r.width,v);c=ri(c,r.height,d);c+=r.height/2;var w=VO;var b=this._textVmlEl;var S;var M;var I;if(!b){b=w("line");S=w("path");M=w("textpath");I=w("skew");M.style["v-text-align"]="left";ez(b);S.textpathok=true;M.on=true;b.from="0 0";b.to="1000 0.05";az(b,I);az(b,S);az(b,M);this._textVmlEl=b}else{I=b.firstChild;S=I.nextSibling;M=S.nextSibling}var D=[f,c];var T=b.style;if(m&&i){Lt(D,D,m);I.on=true;I.matrix=m[0].toFixed(3)+qO+m[2].toFixed(3)+qO+m[1].toFixed(3)+qO+m[3].toFixed(3)+",0,0";I.offset=(HO(D[0])||0)+","+(HO(D[1])||0);I.origin="0 0";T.left="0px";T.top="0px"}else{I.on=false;T.left=HO(f)+"px";T.top=HO(c)+"px"}M.string=rz(n);try{M.style.font=g}catch(t){}cz(b,"fill",{fill:a.textFill,opacity:a.opacity},this);cz(b,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash},this);b.style.zIndex=oz(this.zlevel,this.z,this.z2);az(t,b)};var Iz=function(t){nz(t,this._textVmlEl);this._textVmlEl=null};var Dz=function(t){az(t,this._textVmlEl)};var Tz=[zi,Ri,Bi,Wo,ls];for(var Az=0;Az<Tz.length;Az++){var Cz=Tz[Az].prototype;Cz.drawRectText=Mz;Cz.removeRectText=Iz;Cz.appendRectText=Dz}ls.prototype.brushVML=function(t){var e=this.style;if(e.text!=null){this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),true)}else{this.removeRectText(t)}};ls.prototype.onRemove=function(t){this.removeRectText(t)};ls.prototype.onAdd=function(t){this.appendRectText(t)}}function Lz(t){return parseInt(t,10)}function kz(t,e){FO();this.root=t;this.storage=e;var r=document.createElement("div");var i=document.createElement("div");r.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;";i.style.cssText="position:absolute;left:0;top:0;";t.appendChild(r);this._vmlRoot=i;this._vmlViewport=r;this.resize();var a=e.delFromStorage;var n=e.addToStorage;e.delFromStorage=function(t){a.call(e,t);if(t){t.onRemove&&t.onRemove(i)}};e.addToStorage=function(t){t.onAdd&&t.onAdd(i);n.call(e,t)};this._firstPaint=true}kz.prototype={constructor:kz,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t){return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}}},refresh:function(){var t=this.storage.getDisplayList(true,true);this._paintList(t)},_paintList:function(t){var e=this._vmlRoot;for(var r=0;r<t.length;r++){var i=t[r];if(i.invisible||i.ignore){if(!i.__alreadyNotVisible){i.onRemove(e)}i.__alreadyNotVisible=true}else{if(i.__alreadyNotVisible){i.onAdd(e)}i.__alreadyNotVisible=false;if(i.__dirty){i.beforeBrush&&i.beforeBrush();(i.brushVML||i.brush).call(i,e);i.afterBrush&&i.afterBrush()}}i.__dirty=false}if(this._firstPaint){this._vmlViewport.appendChild(e);this._firstPaint=false}},resize:function(t,e){var t=t==null?this._getWidth():t;var e=e==null?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t;this._height=e;var r=this._vmlViewport.style;r.width=t+"px";r.height=e+"px"}},dispose:function(){this.root.innerHTML="";this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){if(this._vmlViewport){this.root.removeChild(this._vmlViewport)}},_getWidth:function(){var t=this.root;var e=t.currentStyle;return(t.clientWidth||Lz(e.width))-Lz(e.paddingLeft)-Lz(e.paddingRight)|0},_getHeight:function(){var t=this.root;var e=t.currentStyle;return(t.clientHeight||Lz(e.height))-Lz(e.paddingTop)-Lz(e.paddingBottom)|0}};function Pz(t){return function(){nr('In IE8.0 VML mode painter not support method "'+t+'"')}}L(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){kz.prototype[t]=Pz(t)});Na("vml",kz);var Nz="http://www.w3.org/2000/svg";function Ez(t){return document.createElementNS(Nz,t)}var Oz=mo.CMD;var zz=Array.prototype.join;var Rz="none";var Bz=Math.round;var Vz=Math.sin;var Gz=Math.cos;var Fz=Math.PI;var Wz=Math.PI*2;var Hz=180/Fz;var Zz=1e-4;function Uz(t){return Bz(t*1e4)/1e4}function jz(t){return t<Zz&&t>-Zz}function Xz(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==Rz}function Yz(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==Rz}function qz(t,e){if(e){$z(t,"transform","matrix("+zz.call(e,",")+")")}}function $z(t,e,r){if(!r||r.type!=="linear"&&r.type!=="radial"){t.setAttribute(e,r)}}function Kz(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function Jz(t,e,r){if(Xz(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?Rz:i;if(t.getAttribute("clip-path")!=="none"&&i===Rz){i="rgba(0, 0, 0, 0.002)"}$z(t,"fill",i);$z(t,"fill-opacity",e.opacity)}else{$z(t,"fill",Rz)}if(Yz(e,r)){var a=r?e.textStroke:e.stroke;a=a==="transparent"?Rz:a;$z(t,"stroke",a);var n=r?e.textStrokeWidth:e.lineWidth;var o=!r&&e.strokeNoScale?e.host.getLineScale():1;$z(t,"stroke-width",n/o);$z(t,"paint-order",r?"stroke":"fill");$z(t,"stroke-opacity",e.opacity);var s=e.lineDash;if(s){$z(t,"stroke-dasharray",e.lineDash.join(","));$z(t,"stroke-dashoffset",Bz(e.lineDashOffset||0))}else{$z(t,"stroke-dasharray","")}e.lineCap&&$z(t,"stroke-linecap",e.lineCap);e.lineJoin&&$z(t,"stroke-linejoin",e.lineJoin);e.miterLimit&&$z(t,"stroke-miterlimit",e.miterLimit)}else{$z(t,"stroke",Rz)}}function Qz(t){var e=[];var r=t.data;var i=t.len();for(var a=0;a<i;){var n=r[a++];var o="";var s=0;switch(n){case Oz.M:o="M";s=2;break;case Oz.L:o="L";s=2;break;case Oz.Q:o="Q";s=4;break;case Oz.C:o="C";s=6;break;case Oz.A:var l=r[a++];var u=r[a++];var h=r[a++];var f=r[a++];var c=r[a++];var v=r[a++];var d=r[a++];var p=r[a++];var g=Math.abs(v);var m=jz(g-Wz)&&!jz(g);var y=false;if(g>=Wz){y=true}else if(jz(g)){y=false}else{y=(v>-Fz&&v<0||v>Fz)===!!p}var x=Uz(l+h*Gz(c));var _=Uz(u+f*Vz(c));if(m){if(p){v=Wz-1e-4}else{v=-Wz+1e-4}y=true;if(a===9){e.push("M",x,_)}}var w=Uz(l+h*Gz(c+v));var b=Uz(u+f*Vz(c+v));e.push("A",Uz(h),Uz(f),Bz(d*Hz),+y,+p,w,b);break;case Oz.Z:o="Z";break;case Oz.R:var w=Uz(r[a++]);var b=Uz(r[a++]);var S=Uz(r[a++]);var M=Uz(r[a++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b);break}o&&e.push(o);for(var I=0;I<s;I++){e.push(Uz(r[a++]))}}return e.join(" ")}var tR={};tR.brush=function(t){var e=t.style;var r=t.__svgEl;if(!r){r=Ez("path");t.__svgEl=r}if(!t.path){t.createPathProxy()}var i=t.path;if(t.__dirtyPath){i.beginPath();t.buildPath(i,t.shape);t.__dirtyPath=false;var a=Qz(i);if(a.indexOf("NaN")<0){$z(r,"d",a)}}Jz(r,e);qz(r,t.transform);if(e.text!=null){aR(t,t.getBoundingRect())}};var eR={};eR.brush=function(t){var e=t.style;var r=e.image;if(r instanceof HTMLImageElement){var i=r.src;r=i}if(!r){return}var a=e.x||0;var n=e.y||0;var o=e.width;var s=e.height;var l=t.__svgEl;if(!l){l=Ez("image");t.__svgEl=l}if(r!==t.__imageSrc){Kz(l,"href",r);t.__imageSrc=r}$z(l,"width",o);$z(l,"height",s);$z(l,"x",a);$z(l,"y",n);qz(l,t.transform);if(e.text!=null){aR(t,t.getBoundingRect())}};var rR={};var iR=new fr;var aR=function(t,e,r){var i=t.style;t.__dirty&&mi(i,true);var a=i.text;if(a==null){return}else{a+=""}var n=t.__textSvgEl;if(!n){n=Ez("text");t.__textSvgEl=n}var o;var s;var l=i.textPosition;var u=i.textDistance;var h=i.textAlign||"left";if(typeof i.fontSize==="number"){i.fontSize+="px"}var f=i.font||[i.fontStyle||"",i.fontWeight||"",i.fontSize||"",i.fontFamily||""].join(" ")||Yr;var c=nR(i.textVerticalAlign);r=Jr(a,f,h,c);var v=r.lineHeight;if(l instanceof Array){o=e.x+l[0];s=e.y+l[1]}else{var d=ii(l,e,u);o=d.x;s=d.y;c=nR(d.textVerticalAlign);h=d.textAlign}$z(n,"alignment-baseline",c);if(f){n.style.font=f}var p=i.textPadding;$z(n,"x",o);$z(n,"y",s);Jz(n,i,true);if(t instanceof ls||t.style.transformText){qz(n,t.transform)}else{if(t.transform){iR.copy(e);iR.applyTransform(t.transform);e=iR}else{var g=t.transformCoordToGlobal(e.x,e.y);e.x=g[0];e.y=g[1]}var m=i.textOrigin;if(m==="center"){o=r.width/2+o;s=r.height/2+s}else if(m){o=m[0]+o;s=m[1]+s}var y=-i.textRotation*180/Math.PI;$z(n,"transform","rotate("+y+","+o+","+s+")")}var x=a.split("\n");var _=x.length;var w=h;if(w==="left"){w="start";p&&(o+=p[3])}else if(w==="right"){w="end";p&&(o-=p[1])}else if(w==="center"){w="middle";p&&(o+=(p[3]-p[1])/2)}var b=0;if(c==="baseline"){b=-r.height+v;p&&(b-=p[2])}else if(c==="middle"){b=(-r.height+v)/2;p&&(s+=(p[0]-p[2])/2)}else{p&&(b+=p[0])}if(t.__text!==a||t.__textFont!==f){var S=t.__tspanList||[];t.__tspanList=S;for(var M=0;M<_;M++){var I=S[M];if(!I){I=S[M]=Ez("tspan");n.appendChild(I);$z(I,"alignment-baseline",c);$z(I,"text-anchor",w)}else{I.innerHTML=""}$z(I,"x",o);$z(I,"y",s+M*v+b);I.appendChild(document.createTextNode(x[M]))}for(;M<S.length;M++){n.removeChild(S[M])}S.length=_;t.__text=a;t.__textFont=f}else if(t.__tspanList.length){var D=t.__tspanList.length;for(var M=0;M<D;++M){var I=t.__tspanList[M];if(I){$z(I,"x",o);$z(I,"y",s+M*v+b)}}}};function nR(t){if(t==="middle"){return"middle"}else if(t==="bottom"){return"baseline"}else{return"hanging"}}rR.drawRectText=aR;rR.brush=function(t){var e=t.style;if(e.text!=null){e.textPosition=[0,0];aR(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect())}};function oR(){}oR.prototype={diff:function(s,l,t){if(!t){t=function(t,e){return t===e}}this.equals=t;var u=this;s=s.slice();l=l.slice();var h=l.length;var f=s.length;var c=1;var e=h+f;var v=[{newPos:-1,components:[]}];var r=this.extractCommon(v[0],l,s,0);if(v[0].newPos+1>=h&&r+1>=f){var i=[];for(var a=0;a<l.length;a++){i.push(a)}return[{indices:i,count:l.length}]}function n(){for(var t=-1*c;t<=c;t+=2){var e;var r=v[t-1];var i=v[t+1];var a=(i?i.newPos:0)-t;if(r){v[t-1]=undefined}var n=r&&r.newPos+1<h;var o=i&&0<=a&&a<f;if(!n&&!o){v[t]=undefined;continue}if(!n||o&&r.newPos<i.newPos){e=lR(i);u.pushComponent(e.components,undefined,true)}else{e=r;e.newPos++;u.pushComponent(e.components,true,undefined)}a=u.extractCommon(e,l,s,t);if(e.newPos+1>=h&&a+1>=f){return sR(u,e.components,l,s)}else{v[t]=e}}c++}while(c<=e){var o=n();if(o){return o}}},pushComponent:function(t,e,r){var i=t[t.length-1];if(i&&i.added===e&&i.removed===r){t[t.length-1]={count:i.count+1,added:e,removed:r}}else{t.push({count:1,added:e,removed:r})}},extractCommon:function(t,e,r,i){var a=e.length;var n=r.length;var o=t.newPos;var s=o-i;var l=0;while(o+1<a&&s+1<n&&this.equals(e[o+1],r[s+1])){o++;s++;l++}if(l){t.components.push({count:l})}t.newPos=o;return s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};function sR(t,e,r,i){var a=0;var n=e.length;var o=0;var s=0;for(;a<n;a++){var l=e[a];if(!l.removed){var u=[];for(var h=o;h<o+l.count;h++){u.push(h)}l.indices=u;o+=l.count;if(!l.added){s+=l.count}}else{var u=[];for(var h=s;h<s+l.count;h++){u.push(h)}l.indices=u;s+=l.count}}return e}function lR(t){return{newPos:t.newPos,components:t.components.slice(0)}}var uR=new oR;var hR=function(t,e,r){return uR.diff(t,e,r)};var fR="0";var cR="1";function vR(t,e,r,i,a){this._zrId=t;this._svgRoot=e;this._tagNames=typeof r==="string"?[r]:r;this._markLabel=i;this._domName=a||"_dom";this.nextId=0}vR.prototype.createElement=Ez;vR.prototype.getDefs=function(t){var e=this._svgRoot;var i=this._svgRoot.getElementsByTagName("defs");if(i.length===0){if(t){i=e.insertBefore(this.createElement("defs"),e.firstChild);if(!i.contains){i.contains=function(t){var e=i.children;if(!e){return false}for(var r=e.length-1;r>=0;--r){if(e[r]===t){return true}}return false}}return i}else{return null}}else{return i[0]}};vR.prototype.update=function(t,e){if(!t){return}var r=this.getDefs(false);if(t[this._domName]&&r.contains(t[this._domName])){if(typeof e==="function"){e(t)}}else{var i=this.add(t);if(i){t[this._domName]=i}}};vR.prototype.addDom=function(t){var e=this.getDefs(true);e.appendChild(t)};vR.prototype.removeDom=function(t){var e=this.getDefs(false);if(e&&t[this._domName]){e.removeChild(t[this._domName]);t[this._domName]=null}};vR.prototype.getDoms=function(){var r=this.getDefs(false);if(!r){return[]}var i=[];L(this._tagNames,function(t){var e=r.getElementsByTagName(t);i=i.concat([].slice.call(e))});return i};vR.prototype.markAllUnused=function(){var t=this.getDoms();var e=this;L(t,function(t){t[e._markLabel]=fR})};vR.prototype.markUsed=function(t){if(t){t[this._markLabel]=cR}};vR.prototype.removeUnused=function(){var e=this.getDefs(false);if(!e){return}var t=this.getDoms();var r=this;L(t,function(t){if(t[r._markLabel]!==cR){e.removeChild(t)}})};vR.prototype.getSvgProxy=function(t){if(t instanceof Wo){return tR}else if(t instanceof Bi){return eR}else if(t instanceof ls){return rR}else{return tR}};vR.prototype.getTextSvgElement=function(t){return t.__textSvgEl};vR.prototype.getSvgElement=function(t){return t.__svgEl};function dR(t,e){vR.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}M(dR,vR);dR.prototype.addWithoutUpdate=function(n,o){if(o&&o.style){var s=this;L(["fill","stroke"],function(t){if(o.style[t]&&(o.style[t].type==="linear"||o.style[t].type==="radial")){var e=o.style[t];var r=s.getDefs(true);var i;if(e._dom){i=e._dom;if(!r.contains(e._dom)){s.addDom(i)}}else{i=s.add(e)}s.markUsed(o);var a=i.getAttribute("id");n.setAttribute(t,"url(#"+a+")")}})}};dR.prototype.add=function(t){var e;if(t.type==="linear"){e=this.createElement("linearGradient")}else if(t.type==="radial"){e=this.createElement("radialGradient")}else{nr("Illegal gradient type.");return null}t.id=t.id||this.nextId++;e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id);this.updateDom(t,e);this.addDom(e);return e};dR.prototype.update=function(r){var i=this;vR.prototype.update.call(this,r,function(){var t=r.type;var e=r._dom.tagName;if(t==="linear"&&e==="linearGradient"||t==="radial"&&e==="radialGradient"){i.updateDom(r,r._dom)}else{i.removeDom(r);i.add(r)}})};dR.prototype.updateDom=function(t,e){if(t.type==="linear"){e.setAttribute("x1",t.x);e.setAttribute("y1",t.y);e.setAttribute("x2",t.x2);e.setAttribute("y2",t.y2)}else if(t.type==="radial"){e.setAttribute("cx",t.x);e.setAttribute("cy",t.y);e.setAttribute("r",t.r)}else{nr("Illegal gradient type.");return}if(t.global){e.setAttribute("gradientUnits","userSpaceOnUse")}else{e.setAttribute("gradientUnits","objectBoundingBox")}e.innerHTML="";var r=t.colorStops;for(var i=0,a=r.length;i<a;++i){var n=this.createElement("stop");n.setAttribute("offset",r[i].offset*100+"%");n.setAttribute("stop-color",r[i].color);e.appendChild(n)}t._dom=e};dR.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;if(e&&e._dom){vR.prototype.markUsed.call(this,e._dom)}e=t.style.stroke;if(e&&e._dom){vR.prototype.markUsed.call(this,e._dom)}}};function pR(t,e){vR.call(this,t,e,"clipPath","__clippath_in_use__")}M(pR,vR);pR.prototype.update=function(t){var e=this.getSvgElement(t);if(e){this.updateDom(e,t.__clipPaths,false)}var r=this.getTextSvgElement(t);if(r){this.updateDom(r,t.__clipPaths,true)}this.markUsed(t)};pR.prototype.updateDom=function(t,e,r){if(e&&e.length>0){var i=this.getDefs(true);var a=e[0];var n;var o;var s=r?"_textDom":"_dom";if(a[s]){o=a[s].getAttribute("id");n=a[s];if(!i.contains(n)){i.appendChild(n)}}else{o="zr"+this._zrId+"-clip-"+this.nextId;++this.nextId;n=this.createElement("clipPath");n.setAttribute("id",o);i.appendChild(n);a[s]=n}var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!r){var u=Array.prototype.slice.call(a.transform);Yt(a.transform,a.parent.invTransform,a.transform);l.brush(a);a.transform=u}else{l.brush(a)}var h=this.getSvgElement(a);n.innerHTML="";n.appendChild(h.cloneNode());t.setAttribute("clip-path","url(#"+o+")");if(e.length>1){this.updateDom(n,e.slice(1),r)}}else{if(t){t.setAttribute("clip-path","none")}}};pR.prototype.markUsed=function(t){var e=this;if(t.__clipPaths&&t.__clipPaths.length>0){L(t.__clipPaths,function(t){if(t._dom){vR.prototype.markUsed.call(e,t._dom)}if(t._textDom){vR.prototype.markUsed.call(e,t._textDom)}})}};function gR(t,e){vR.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}M(gR,vR);gR.prototype.addWithoutUpdate=function(t,e){if(e&&mR(e.style)){var r=e.style;var i;if(r._shadowDom){i=r._shadowDom;var a=this.getDefs(true);if(!a.contains(r._shadowDom)){this.addDom(i)}}else{i=this.add(e)}this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}};gR.prototype.add=function(t){var e=this.createElement("filter");var r=t.style;r._shadowDomId=r._shadowDomId||this.nextId++;e.setAttribute("id","zr"+this._zrId+"-shadow-"+r._shadowDomId);this.updateDom(t,e);this.addDom(e);return e};gR.prototype.update=function(t,e){var r=e.style;if(mR(r)){var i=this;vR.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else{this.remove(t,r)}};gR.prototype.remove=function(t,e){if(e._shadowDomId!=null){this.removeDom(e);t.style.filter=""}};gR.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");if(r.length===0){r=this.createElement("feDropShadow")}else{r=r[0]}var i=t.style;var a=t.scale?t.scale[0]||1:1;var n=t.scale?t.scale[1]||1:1;var o,s,l,u;if(i.shadowBlur||i.shadowOffsetX||i.shadowOffsetY){o=i.shadowOffsetX||0;s=i.shadowOffsetY||0;l=i.shadowBlur;u=i.shadowColor}else if(i.textShadowBlur){o=i.textShadowOffsetX||0;s=i.textShadowOffsetY||0;l=i.textShadowBlur;u=i.textShadowColor}else{this.removeDom(e,i);return}r.setAttribute("dx",o/a);r.setAttribute("dy",s/n);r.setAttribute("flood-color",u);var h=l/2/a;var f=l/2/n;var c=h+" "+f;r.setAttribute("stdDeviation",c);e.setAttribute("x","-100%");e.setAttribute("y","-100%");e.setAttribute("width",Math.ceil(l/2*200)+"%");e.setAttribute("height",Math.ceil(l/2*200)+"%");e.appendChild(r);i._shadowDom=e};gR.prototype.markUsed=function(t){var e=t.style;if(e&&e._shadowDom){vR.prototype.markUsed.call(this,e._shadowDom)}};function mR(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function yR(t){return parseInt(t,10)}function xR(t){if(t instanceof Wo){return tR}else if(t instanceof Bi){return eR}else if(t instanceof ls){return rR}else{return tR}}function _R(t,e){return e&&t&&e.parentNode!==t}function wR(t,e,r){if(_R(t,e)&&r){var i=r.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function bR(t,e){if(_R(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function SR(t,e){if(e&&t&&e.parentNode===t){t.removeChild(e)}}function MR(t){return t.__textSvgEl}function IR(t){return t.__svgEl}var DR=function(t,e,r,i){this.root=t;this.storage=e;this._opts=r=N({},r||{});var a=Ez("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg");a.setAttribute("version","1.1");a.setAttribute("baseProfile","full");a.style.cssText="user-select:none;position:absolute;left:0;top:0;";this.gradientManager=new dR(i,a);this.clipPathManager=new pR(i,a);this.shadowManager=new gR(i,a);var n=document.createElement("div");n.style.cssText="overflow:hidden;position:relative";this._svgRoot=a;this._viewport=n;t.appendChild(n);n.appendChild(a);this.resize(r.width,r.height);this._visibleList=[]};DR.prototype={constructor:DR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t){return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}}},refresh:function(){var t=this.storage.getDisplayList(true);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused();this.clipPathManager.markAllUnused();this.shadowManager.markAllUnused();var e=this._svgRoot;var r=this._visibleList;var i=t.length;var a=[];var n;for(n=0;n<i;n++){var o=t[n];var s=xR(o);var l=IR(o)||MR(o);if(!o.invisible){if(o.__dirty){s&&s.brush(o);this.clipPathManager.update(o);if(o.style){this.gradientManager.update(o.style.fill);this.gradientManager.update(o.style.stroke);this.shadowManager.update(l,o)}o.__dirty=false}a.push(o)}}var u=hR(r,a);var h;for(n=0;n<u.length;n++){var f=u[n];if(f.removed){for(var c=0;c<f.count;c++){var o=r[f.indices[c]];var l=IR(o);var v=MR(o);SR(e,l);SR(e,v)}}}for(n=0;n<u.length;n++){var f=u[n];if(f.added){for(var c=0;c<f.count;c++){var o=a[f.indices[c]];var l=IR(o);var v=MR(o);h?wR(e,l,h):bR(e,l);if(l){wR(e,v,l)}else if(h){wR(e,v,h)}else{bR(e,v)}wR(e,v,l);h=v||l||h;this.gradientManager.addWithoutUpdate(l,o);this.shadowManager.addWithoutUpdate(h,o);this.clipPathManager.markUsed(o)}}else if(!f.removed){for(var c=0;c<f.count;c++){var o=a[f.indices[c]];h=l=MR(o)||IR(o)||h;this.gradientManager.markUsed(o);this.gradientManager.addWithoutUpdate(l,o);this.shadowManager.markUsed(o);this.shadowManager.addWithoutUpdate(l,o);this.clipPathManager.markUsed(o)}}}this.gradientManager.removeUnused();this.clipPathManager.removeUnused();this.shadowManager.removeUnused();this._visibleList=a},_getDefs:function(t){var e=this._svgRoot;var i=this._svgRoot.getElementsByTagName("defs");if(i.length===0){if(t){var i=e.insertBefore(Ez("defs"),e.firstChild);if(!i.contains){i.contains=function(t){var e=i.children;if(!e){return false}for(var r=e.length-1;r>=0;--r){if(e[r]===t){return true}}return false}}return i}else{return null}}else{return i[0]}},resize:function(t,e){var r=this._viewport;r.style.display="none";var i=this._opts;t!=null&&(i.width=t);e!=null&&(i.height=e);t=this._getSize(0);e=this._getSize(1);r.style.display="";if(this._width!==t||this._height!==e){this._width=t;this._height=e;var a=r.style;a.width=t+"px";a.height=e+"px";var n=this._svgRoot;n.setAttribute("width",t);n.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts;var r=["width","height"][t];var i=["clientWidth","clientHeight"][t];var a=["paddingLeft","paddingTop"][t];var n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto"){return parseFloat(e[r])}var o=this.root;var s=document.defaultView.getComputedStyle(o);return(o[i]||yR(s[r])||yR(o.style[r]))-(yR(s[a])||0)-(yR(s[n])||0)|0},dispose:function(){this.root.innerHTML="";this._svgRoot=this._viewport=this.storage=null},clear:function(){if(this._viewport){this.root.removeChild(this._viewport)}},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}};function TR(t){return function(){nr('In SVG mode painter not support method "'+t+'"')}}L(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){DR.prototype[t]=TR(t)});Na("svg",DR);t.version=zc;t.dependencies=Rc;t.PRIORITY=jc;t.init=zv;t.connect=Rv;t.disConnect=Bv;t.disconnect=Vv;t.dispose=Gv;t.getInstanceByDom=Fv;t.getInstanceById=Wv;t.registerTheme=Hv;t.registerPreprocessor=Zv;t.registerProcessor=Uv;t.registerPostUpdate=jv;t.registerAction=Xv;t.registerCoordinateSystem=Yv;t.getCoordinateSystemDimensions=qv;t.registerLayout=$v;t.registerVisual=Kv;t.registerLoading=Qv;t.extendComponentModel=td;t.extendComponentView=ed;t.extendSeriesModel=rd;t.extendChartView=id;t.setCanvasCreator=ad;t.registerMap=nd;t.getMap=od;t.dataTool=sd;t.zrender=za;t.graphic=Il;t.number=nu;t.format=_u;t.throttle=Kf;t.helper=ag;t.matrix=te;t.vector=Nt;t.color=Ve;t.parseGeoJSON=fg;t.parseGeoJson=gg;t.util=mg;t.List=Dd;t.Model=Pl;t.Axis=pg;t.env=m;return t});