File: /www/wwwroot/h3.iyingtaos.cn/wp-content/plugins/wposs/layui/lay/extends/echarts.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):window.layui&&layui.define?layui.define(function(t){t("echarts",e(t))}):e(t.echarts={})}(this,function(t){"use strict";var e;"undefined"!=typeof window?e=window.__DEV__:"undefined"!=typeof global&&(e=global.__DEV__),void 0===e&&(e=!0);var D=e,n=2311,i=function(){return n++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,o=Array.prototype,r=o.forEach,h=o.filter,a=o.slice,c=o.map,d=o.reduce,p={};function g(t,e){"createCanvas"===t&&(x=null),p[t]=e}function k(t){if(null==t||"object"!=typeof t)return t;var e=t,n=u.call(t);if("[object Array]"===n){if(!Q(t)){e=[];for(var i=0,o=t.length;i<o;i++)e[i]=k(t[i])}}else if(l[n]){if(!Q(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(i=0,o=t.length;i<o;i++)e[i]=k(t[i])}}}else if(!s[n]&&!Q(t)&&!W(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=k(t[r]));return e}function m(t,e,n){if(!V(e)||!V(t))return n?k(e):t;for(var i in e){var o,a;e.hasOwnProperty(i)&&(o=t[i],!V(a=e[i])||!V(o)||C(a)||C(o)||W(a)||W(o)||G(a)||G(o)||Q(a)||Q(o)?!n&&i in t||(t[i]=k(e[i])):m(o,a,n))}return t}function f(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=m(n,t[i],e);return n}function P(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function O(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function y(){return p.createCanvas()}var x;function _(){return x=x||y().getContext("2d")}function M(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function w(t,e){var n=t.prototype;function i(){}for(var o in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(o)&&(t.prototype[o]=n[o]);(t.prototype.constructor=t).superClass=e}function b(t,e,n){O(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)}function E(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function R(t,e,n){if(t&&e)if(t.forEach&&t.forEach===r)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function z(t,e,n){if(t&&e){if(t.map&&t.map===c)return t.map(e,n);for(var i=[],o=0,a=t.length;o<a;o++)i.push(e.call(n,t[o],o,t));return i}}function S(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,n,i);for(var o=0,a=t.length;o<a;o++)n=e.call(i,n,t[o],o,t);return n}}function I(t,e,n){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,n);for(var i=[],o=0,a=t.length;o<a;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}}function T(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]}function N(t,e){var n=a.call(arguments,2);return function(){return t.apply(e,n.concat(a.call(arguments)))}}function B(t){var e=a.call(arguments,1);return function(){return t.apply(this,e.concat(a.call(arguments)))}}function C(t){return"[object Array]"===u.call(t)}function A(t){return"function"==typeof t}function L(t){return"[object String]"===u.call(t)}function V(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function G(t){return!!s[u.call(t)]}function F(t){return!!l[u.call(t)]}function W(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function H(t){return t!=t}function Z(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]}function U(t,e){return null!=t?t:e}function X(t,e,n){return null!=t?t:null!=e?e:n}function Y(){return Function.call.apply(a,arguments)}function j(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function q(t,e){if(!t)throw new Error(e)}function K(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}p.createCanvas=function(){return document.createElement("canvas")};var $="__ec_primitive__";function J(t){t[$]=!0}function Q(t){return t[$]}function tt(t){var n=C(t);this.data={};var i=this;function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof tt?t.each(e):t&&R(t,e)}function et(t){return new tt(t)}function nt(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n}function it(){}tt.prototype={constructor:tt,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=N(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var ot=(Object.freeze||Object)({$override:g,clone:k,merge:m,mergeAll:f,extend:P,defaults:O,createCanvas:y,getContext:_,indexOf:M,inherits:w,mixin:b,isArrayLike:E,each:R,map:z,reduce:S,filter:I,find:T,bind:N,curry:B,isArray:C,isFunction:A,isString:L,isObject:V,isBuiltInObject:G,isTypedArray:F,isDom:W,eqNaN:H,retrieve:Z,retrieve2:U,retrieve3:X,slice:Y,normalizeCssArray:j,assert:q,trim:K,setAsPrimitive:J,isPrimitive:Q,createHashMap:et,concatArray:nt,noop:it}),at="undefined"==typeof Float32Array?Array:Float32Array;function rt(t,e){var n=new at(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function st(t,e){return t[0]=e[0],t[1]=e[1],t}function lt(t){var e=new at(2);return e[0]=t[0],e[1]=t[1],e}function ut(t,e,n){return t[0]=e,t[1]=n,t}function ht(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ct(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function dt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function pt(t){return Math.sqrt(gt(t))}function gt(t){return t[0]*t[0]+t[1]*t[1]}function ft(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function mt(t,e){var n=pt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var yt=vt;function xt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var _t=xt;function wt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function bt(t,e,n){var i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o+n[4],t[1]=n[1]*i+n[3]*o+n[5],t}function St(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Mt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var It=(Object.freeze||Object)({create:rt,copy:st,clone:lt,set:ut,add:ht,scaleAndAdd:ct,sub:dt,len:pt,length:pt,lenSquare:gt,lengthSquare:gt,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:ft,normalize:mt,distance:vt,dist:yt,distanceSquare:xt,distSquare:_t,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:wt,applyTransform:bt,min:St,max:Mt});function Tt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}Tt.prototype={constructor:Tt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(At(e,t),"dragstart",t.event))},_drag:function(t){var e,n,i,o,a,r,s=this._draggingTarget;s&&(e=t.offsetX,n=t.offsetY,i=e-this._x,o=n-this._y,this._x=e,this._y=n,s.drift(i,o,t),this.dispatchToElement(At(s,t),"drag",t.event),a=this.findHover(e,n,s).target,r=this._dropTarget,s!==(this._dropTarget=a)&&(r&&a!==r&&this.dispatchToElement(At(r,t),"dragleave",t.event),a&&a!==r&&this.dispatchToElement(At(a,t),"dragenter",t.event)))},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(At(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(At(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Dt=Array.prototype.slice,Ct=function(t){this._$handlers={},this._$eventProcessor=t};function Lt(t,e,n,i,o,a){var r,s,l=t._$handlers;if("function"==typeof n&&(o=i,i=n,n=null),!i||!e)return t;r=n,s=t._$eventProcessor,null!=r&&s&&s.normalizeQuery&&(r=s.normalizeQuery(r)),n=r,l[e]||(l[e]=[]);for(var u=0;u<l[e].length;u++)if(l[e][u].h===i)return t;var h={h:i,one:a,query:n,ctx:o||t,callAtLast:i.zrEventfulCallAtLast},c=l[e].length-1,d=l[e][c];return d&&d.callAtLast?l[e].splice(c,0,h):l[e].push(h),t}Ct.prototype={constructor:Ct,one:function(t,e,n,i){return Lt(this,t,e,n,i,!0)},on:function(t,e,n,i){return Lt(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],o=0,a=n[t].length;o<a;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,o=i.length;3<o&&(i=Dt.call(i,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(r,1),a--):r++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,o=i.length;4<o&&(i=Dt.call(i,1,i.length-1));for(var a=i[i.length-1],r=e.length,s=0;s<r;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),r--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var kt=Math.log(2);function Pt(t,e,n,i,o,a){var r=i+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/kt);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,d=0,p=0;d<s;d++){var g=1<<d;g&o||(c+=(p%2?-1:1)*t[n][d]*Pt(t,e-1,h,u,o|g,a),p++)}return a[r]=c}function Nt(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},o=Pt(n,8,0,0,0,i);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Pt(n,7,0===r?1:0,1<<r,1<<s,i)/o*e[r];return function(t,e,n){var i=e*a[6]+n*a[7]+1;t[0]=(e*a[0]+n*a[1]+a[2])/i,t[1]=(e*a[3]+n*a[4]+a[5])/i}}}var Ot="___zrEVENTSAVED",Et=[];function Rt(t,e,n,i,o){if(e.getBoundingClientRect&&v.domSupported&&!zt(e)){var a=e[Ot]||(e[Ot]={}),r=function(t,e,n){for(var i=n?"invTrans":"trans",o=e[i],a=e.srcCoords,r=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,p=h.top;s.push(d,p),r=r&&a&&d===a[c]&&p===a[1+c],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&o?o:(e.srcCoords=s,e[i]=n?Nt(l,s):Nt(s,l))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=r.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[u]+":0",i[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),n.push(r)}return n}(e,a),a,o);if(r)return r(t,n,i),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,n,i){return n=n||{},i||!v.canvasSupported?Wt(t,e,n):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Wt(t,e,n),n}function Wt(t,e,n){if(v.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=o-a.top)}if(Rt(Gt,t,i,o))return n.zrX=Gt[0],void(n.zrY=Gt[1])}n.zrX=n.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,n){if(null!=(e=Ht(e)).zrX)return e;var i,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&Ft(t,i,e,n):(Ft(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3);var a=e.button;return null==e.which&&void 0!==a&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,n,i){Bt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}jt.prototype={constructor:jt,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},a=0,r=i.length;a<r;a++){var s=i[a],l=Ft(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Kt)if(Kt.hasOwnProperty(e)){var n=Kt[e](this._track,t);if(n)return n}}};var Kt={pinch:function(t,e){var n=t.length;if(n){var i,o=(t[n-1]||{}).points,a=(t[n-2]||{}).points||o;if(a&&1<a.length&&o&&1<o.length){var r=qt(o)/qt(a);isFinite(r)||(r=1),e.pinchScale=r;var s=[((i=o)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},$t="silent";function Jt(){Xt(this.event)}function Qt(){}Qt.prototype.dispose=function(){};function te(t,e,n,i){Ct.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new Qt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Tt.call(this),this.setHandlerProxy(n)}var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function ne(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(R(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=ne(this,e,n),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.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,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o,a,r="on"+e,s={type:e,event:a=n,target:(o=t).target,topTarget:o.topTarget,cancelBubble:!1,offsetX:a.zrX,offsetY:a.zrY,gestureEvent:a.gestureEvent,pinchX:a.pinchX,pinchY:a.pinchY,pinchScale:a.pinchScale,wheelDelta:a.zrDelta,zrByTouch:a.zrByTouch,which:a.which,stop:Jt};i&&(i[r]&&(s.cancelBubble=i[r].call(i,s)),i.trigger(e,s),i=i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,n){for(var i,o=this.storage.getDisplayList(),a={x:t,y:e},r=o.length-1;0<=r;r--){if(o[r]!==n&&!o[r].ignore&&(i=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,n))return!1;o.silent&&(i=!0),o=o.parent}return!i||$t}return!1}(o[r],t,e))&&(a.topTarget||(a.topTarget=o[r]),i!==$t)){a.target=o[r];break}}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var n=this._gestureMgr;"start"===e&&n.clear();var i,o=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&n.clear(),o&&(i=o.type,t.gestureEvent=i,this.dispatchToElement({target:o.target},i,o.event))}},R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,n,i=t.zrX,o=t.zrY,a=ne(this,i,o);if("mouseup"===r&&a||(n=(e=this.findHover(i,o)).target),"mousedown"===r)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===r)this._upEl=n;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<yt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),b(te,Ct),b(te,Tt);var ie="undefined"==typeof Float32Array?Array:Float32Array;function oe(){var t=new ie(6);return ae(t),t}function ae(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function se(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],r=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function le(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function ue(t,e,n){var i=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+r*u,t[1]=-i*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function he(t,e,n){var i=n[0],o=n[1];return t[0]=e[0]*i,t[1]=e[1]*o,t[2]=e[2]*i,t[3]=e[3]*o,t[4]=e[4]*i,t[5]=e[5]*o,t}function ce(t,e){var n=e[0],i=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=n*r-a*i;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-r*o)*l,t[5]=(a*o-n*s)*l,t):null}function de(t){var e=oe();return re(e,t),e}var pe=(Object.freeze||Object)({create:oe,identity:ae,copy:re,mul:se,translate:le,rotate:ue,scale:he,invert:ce,clone:de}),ge=ae;function fe(t){return 5e-5<t||t<-5e-5}var me=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ve=me.prototype;ve.transform=null,ve.needLocalTransform=function(){return fe(this.rotation)||fe(this.position[0])||fe(this.position[1])||fe(this.scale[0]-1)||fe(this.scale[1]-1)};var ye=[];ve.updateTransform=function(){var t,e,n,i,o,a=this.parent,r=a&&a.transform,s=this.needLocalTransform(),l=this.transform;s||r?(l=l||oe(),s?this.getLocalTransform(l):ge(l),r&&(s?se(l,a.transform,l):re(l,a.transform)),this.transform=l,null!=(t=this.globalScaleRatio)&&1!==t&&(this.getGlobalScale(ye),i=((ye[0]-(e=ye[0]<0?-1:1))*t+e)/ye[0]||0,o=((ye[1]-(n=ye[1]<0?-1:1))*t+n)/ye[1]||0,l[0]*=i,l[1]*=i,l[2]*=o,l[3]*=o),this.invTransform=this.invTransform||oe(),ce(this.invTransform,l)):l&&ge(l)},ve.getLocalTransform=function(t){return me.getLocalTransform(this,t)},ve.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},ve.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var xe=[],_e=oe();ve.setLocalTransform=function(t){var e,n,i,o;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,o=this.scale,fe(e-1)&&(e=Math.sqrt(e)),fe(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],o[0]=e,o[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e))},ve.decomposeTransform=function(){var t,e,n;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(se(xe,t.invTransform,e),e=xe),(n=this.origin)&&(n[0]||n[1])&&(_e[4]=n[0],_e[5]=n[1],se(xe,e,_e),xe[4]-=n[0],xe[5]-=n[1],e=xe),this.setLocalTransform(e))},ve.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},ve.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&bt(n,n,i),n},ve.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&bt(n,n,i),n},me.getLocalTransform=function(t,e){ge(e=e||[]);var n=t.origin,i=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),he(e,e,i),o&&ue(e,e,o),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var we={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.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){return(t*=2)<1?.5*t*t*t*t:-.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){return(t*=2)<1?.5*t*t*t*t*t:.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 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-we.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*we.bounceIn(2*t):.5*we.bounceOut(2*t-1)+.5}};function be(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&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=!1}be.prototype={constructor:be,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,o="string"==typeof i?we[i]:i,a="function"==typeof o?o(n):n;return this.fire("frame",a),1===n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function Se(){this.head=null,this.tail=null,this._len=0}var Me=Se.prototype;Me.insert=function(t){var e=new Te(t);return this.insertEntry(e),e},Me.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Me.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Me.len=function(){return this._len},Me.clear=function(){this.head=this.tail=null,this._len=0};function Ie(t){this._list=new Se,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Te=function(t){this.value=t,this.next,this.prev},Ae=Ie.prototype;Ae.put=function(t,e){var n,i,o,a=this._list,r=this._map,s=null;return null==r[t]&&(n=a.len(),i=this._lastRemovedEntry,n>=this._maxSize&&0<n&&(o=a.head,a.remove(o),delete r[o.key],s=o.value,this._lastRemovedEntry=o),i?i.value=e:i=new Te(e),i.key=t,a.insertEntry(i),r[t]=i),s},Ae.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},Ae.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 Ce(t){return(t=Math.round(t))<0?0:255<t?255:t}function Le(t){return t<0?0:1<t?1:t}function ke(t){return t.length&&"%"===t.charAt(t.length-1)?Ce(parseFloat(t)/100*255):Ce(parseInt(t,10))}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?Le(parseFloat(t)/100):Le(parseFloat(t))}function Ne(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Oe(t,e,n){return t+(e-t)*n}function Ee(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function Re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ze=new Ie(20),Be=null;function Ve(t,e){Be&&Re(Be,e),Be=ze.put(t,Be||e.slice())}function Ge(t,e){if(t){e=e||[];var n=ze.get(t);if(n)return Re(e,n);var i,o=(t+="").replace(/ /g,"").toLowerCase();if(o in De)return Re(e,De[o]),Ve(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(i=parseInt(o.substr(1),16))&&i<=4095?(Ee(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Ve(t,e),e):void Ee(e,0,0,0,1):7===o.length?0<=(i=parseInt(o.substr(1),16))&&i<=16777215?(Ee(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Ve(t,e),e):void Ee(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Ee(e,0,0,0,1);u=Pe(l.pop());case"rgb":return 3!==l.length?void Ee(e,0,0,0,1):(Ee(e,ke(l[0]),ke(l[1]),ke(l[2]),u),Ve(t,e),e);case"hsla":return 4!==l.length?void Ee(e,0,0,0,1):(l[3]=Pe(l[3]),Fe(l,e),Ve(t,e),e);case"hsl":return 3!==l.length?void Ee(e,0,0,0,1):(Fe(l,e),Ve(t,e),e);default:return}}Ee(e,0,0,0,1)}}function Fe(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Pe(t[1]),o=Pe(t[2]),a=o<=.5?o*(i+1):o+i-o*i,r=2*o-a;return Ee(e=e||[],Ce(255*Ne(r,a,n+1/3)),Ce(255*Ne(r,a,n)),Ce(255*Ne(r,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function We(t,e){var n=Ge(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:t[i]<0&&(n[i]=0);return je(n,4===n.length?"rgba":"rgb")}}function He(t){var e=Ge(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ze(t,e,n){if(e&&e.length&&0<=t&&t<=1){n=n||[];var i=t*(e.length-1),o=Math.floor(i),a=Math.ceil(i),r=e[o],s=e[a],l=i-o;return n[0]=Ce(Oe(r[0],s[0],l)),n[1]=Ce(Oe(r[1],s[1],l)),n[2]=Ce(Oe(r[2],s[2],l)),n[3]=Le(Oe(r[3],s[3],l)),n}}function Ue(t,e,n){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),o=Math.floor(i),a=Math.ceil(i),r=Ge(e[o]),s=Ge(e[a]),l=i-o,u=je([Ce(Oe(r[0],s[0],l)),Ce(Oe(r[1],s[1],l)),Ce(Oe(r[2],s[2],l)),Le(Oe(r[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:a,value:i}:u}}function Xe(t,e,n,i){if(t=Ge(t))return t=function(t){if(t){var e,n,i,o,a,r=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.min(r,s,l),h=Math.max(r,s,l),c=h-u,d=(h+u)/2;0==c?n=e=0:(n=d<.5?c/(h+u):c/(2-h-u),i=((h-r)/6+c/2)/c,o=((h-s)/6+c/2)/c,a=((h-l)/6+c/2)/c,r===h?e=a-o:s===h?e=1/3+i-a:l===h&&(e=2/3+o-i),e<0&&(e+=1),1<e&&--e);var p=[360*e,n,d];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(o=e,(o=Math.round(o))<0?0:360<o?360:o)),null!=n&&(t[1]=Pe(n)),null!=i&&(t[2]=Pe(i)),je(Fe(t),"rgba");var o}function Ye(t,e){if((t=Ge(t))&&null!=e)return t[3]=Le(e),je(t,"rgba")}function je(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}var qe=(Object.freeze||Object)({parse:Ge,lift:We,toHex:He,fastLerp:Ze,fastMapToColor:Ze,lerp:Ue,mapToColor:Ue,modifyHSL:Xe,modifyAlpha:Ye,stringify:je}),Ke=Array.prototype.slice;function $e(t,e){return t[e]}function Je(t,e,n){t[e]=n}function Qe(t,e,n){return(e-t)*n+t}function tn(t,e,n){return.5<n?e:t}function en(t,e,n,i,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)i[r]=Qe(t[r],e[r],n);else for(var s=a&&t[0].length,r=0;r<a;r++)for(var l=0;l<s;l++)i[r][l]=Qe(t[r][l],e[r][l],n)}function nn(t,e,n){var i=t.length,o=e.length;if(i!==o)if(o<i)t.length=o;else for(var a=i;a<o;a++)t.push(1===n?e[a]:Ke.call(e[a]));for(var r=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===n)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function on(t,e,n,i,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=an(t[h],e[h],n[h],i[h],o,a,r);else for(var c=t[0].length,h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=an(t[h][d],e[h][d],n[h][d],i[h][d],o,a,r)}function an(t,e,n,i,o,a,r){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*r+(-3*(e-n)-2*s-l)*a+s*o+e}function rn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function sn(t,e,n,i,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=i.length;if(u){var h,c,d,p=E(i[0].value),g=!1,f=!1,m=p?E((c=(h=i)[h.length-1].value)&&c[0])?2:1:0;i.sort(function(t,e){return t.time-e.time}),d=i[u-1].time;for(var v=[],y=[],x=i[0].value,_=!0,w=0;w<u;w++){v.push(i[w].time/d);var b,S=i[w].value;p&&function(t,e,n){if(t===e)return 1;var i=t.length;if(i===e.length){if(1===n){for(var o=0;o<i;o++)if(t[o]!==e[o])return}else for(var a=t[0].length,o=0;o<i;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return;return 1}}(S,x,m)||!p&&S===x||(_=!1),"string"==typeof(x=S)&&((b=Ge(S))?(S=b,g=!0):f=!0),y.push(S)}if(o||!_){for(var M=y[u-1],w=0;w<u-1;w++)p?nn(y[w],M,m):!isNaN(y[w])||isNaN(M)||f||g||(y[w]=M);p&&nn(r(t._target,a),M,m);var I,T,A,D,C,L,k=0,P=0;g&&(L=[0,0,0,0]);var N=new be({target:t._target,life:d,loop:t._loop,delay:t._delay,onframe:function(t,e){var n;if(e<0)n=0;else if(e<P){for(n=Math.min(k+1,u-1);0<=n&&!(v[n]<=e);n--);n=Math.min(n,u-2)}else{for(n=k;n<u&&!(v[n]>e);n++);n=Math.min(n-1,u-2)}P=e;var i,o=v[(k=n)+1]-v[n];if(0!=o)if(I=(e-v[n])/o,l)if(A=y[n],T=y[0===n?n:n-1],D=y[u-2<n?u-1:n+1],C=y[u-3<n?u-1:n+2],p)on(T,A,D,C,I,I*I,I*I*I,r(t,a),m);else{if(g)i=on(T,A,D,C,I,I*I,I*I*I,L,1),i=rn(L);else{if(f)return.5<I?D:A;i=an(T,A,D,C,I,I*I,I*I*I)}s(t,a,i)}else if(p)en(y[n],y[n+1],I,r(t,a),m);else{if(g)en(y[n],y[n+1],I,L,1),i=rn(L);else{if(f)return tn(y[n],y[n+1],I);i=Qe(y[n],y[n+1],I)}s(t,a,i)}},ondestroy:n});return e&&"spline"!==e&&(N.easing=e),N}}}function ln(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||$e,this._setter=i||Je,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}ln.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var o=this._getter(this._target,i);if(null==o)continue;0!==t&&n[i].push({time:0,value:function(t){if(E(t)){var e=t.length;if(E(t[0])){for(var n=[],i=0;i<e;i++)n.push(Ke.call(t[i]));return n}return Ke.call(t)}return t}(o)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){function n(){--s||r._doneCallback()}var i,o,a,r=this,s=0;for(var l in this._tracks){this._tracks.hasOwnProperty(l)&&((o=sn(this,t,n,this._tracks[l],l,e))&&(this._clipList.push(o),s++,this.animation&&this.animation.addClip(o),i=o))}return i&&(a=i.onframe,i.onframe=function(t,e){a(t,e);for(var n=0;n<r._onframeList.length;n++)r._onframeList[n](t,e)}),s||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var o=e[i];t&&o.onframe(this._target,1),n&&n.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var un=1;"undefined"!=typeof window&&(un=Math.max(window.devicePixelRatio||1,1));var hn=un,cn=function(){};function dn(){this.animators=[]}var pn=cn;function gn(t,e,n,i,o,a,r,s){L(i)?(a=o,o=i,i=0):A(o)?(a=o,o="linear",i=0):A(i)?(a=i,i=0):n=A(n)?(a=n,500):n||500,t.stopAnimation(),function t(e,n,i,o,a,r,s){var l={};var u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=i[h]?V(o[h])&&!E(o[h])?t(e,n?n+"."+h:h,i[h],o[h],a,r,s):(s?(l[h]=i[h],fn(e,n,h,o[h])):l[h]=o[h],u++):null==o[h]||s||fn(e,n,h,o[h]));0<u&&e.animate(n,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,n,i,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function fn(t,e,n,i){var o;e?((o={})[e]={},o[e][n]=i,t.attr(o)):t.attr(n,i)}dn.prototype={constructor:dn,animate:function(t,e){var n,i=!1,o=this,a=this.__zr;if(t){for(var r=t.split("."),s=o,i="shape"===r[0],l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(n=s)}else n=o;if(n){var h=o.animators,c=new ln(n,e);return c.during(function(t){o.dirty(i)}).done(function(){h.splice(M(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}pn('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,o,a){gn(this,t,e,n,i,o,a)},animateFrom:function(t,e,n,i,o,a){gn(this,t,e,n,i,o,a,!0)}};var mn=function(t){me.call(this,t),Ct.call(this,t),dn.call(this,t),this.id=t.id||i()};mn.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;(n=n||(this.transform=[1,0,0,1,0,0]))[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){var n;"position"===t||"scale"===t||"origin"===t?e&&((n=(n=this[t])||(this[t]=[]))[0]=e[0],n[1]=e[1]):this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(V(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},b(mn,dn),b(mn,me),b(mn,Ct);var vn,yn,xn,_n,wn=bt,bn=Math.min,Sn=Math.max;function Mn(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}Mn.prototype={constructor:Mn,union:function(t){var e=bn(t.x,this.x),n=bn(t.y,this.y);this.width=Sn(t.x+t.width,this.x+this.width)-e,this.height=Sn(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(vn=[],yn=[],xn=[],_n=[],function(t){var e,n;t&&(vn[0]=xn[0]=this.x,vn[1]=_n[1]=this.y,yn[0]=_n[0]=this.x+this.width,yn[1]=xn[1]=this.y+this.height,wn(vn,vn,t),wn(yn,yn,t),wn(xn,xn,t),wn(_n,_n,t),this.x=bn(vn[0],yn[0],xn[0],_n[0]),this.y=bn(vn[1],yn[1],xn[1],_n[1]),e=Sn(vn[0],yn[0],xn[0],_n[0]),n=Sn(vn[1],yn[1],xn[1],_n[1]),this.width=e-this.x,this.height=n-this.y)}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=oe();return le(i,i,[-this.x,-this.y]),he(i,i,[e,n]),le(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof Mn||(t=Mn.create(t));var e=this,n=e.x,i=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(i<r||s<n||a<l||u<o)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new Mn(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}}},Mn.create=function(t){return new Mn(t.x,t.y,t.width,t.height)};var In=function(t){for(var e in t=t||{},mn.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};In.prototype={constructor:In,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){var n,i;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&(0<=(i=(n=this._children).indexOf(e))&&(n.splice(i,0,t),this._doAdd(t))),this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof In&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,o=M(i,t);return o<0||(i.splice(o,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof In&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){for(var t,e=this._children,n=this.__storage,i=0;i<e.length;i++)t=e[i],n&&(n.delFromStorage(t),t instanceof In&&t.delChildrenFromStorage(n)),t.parent=null;return e.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof In&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof In&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Mn(0,0,0,0),i=t||this._children,o=[],a=0;a<i.length;a++){var r,s,l=i[a];l.ignore||l.invisible||(r=l.getBoundingRect(),(s=l.getLocalTransform(o))?(n.copy(r),n.applyTransform(s),(e=e||n.clone()).union(n)):(e=e||r.clone()).union(r))}return e||n}},w(In,mn);var Tn=32,An=7;function Dn(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;!function(t,e,n){n--;for(;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,o)}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function Cn(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var a,r=t[i],s=e,l=i;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Ln(t,e,n,i,o,a){var r=0,s=0,l=1;if(0<a(t,e[n+o])){for(s=i-o;l<s&&0<a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[n+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r,r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[n+h])?r=h+1:l=h}return l}function kn(t,e,n,i,o,a){var r=0,s=0,l=1;if(a(t,e[n+o])<0){for(s=o+1;l<s&&a(t,e[n+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r,r=o-l,l=o-u}else{for(s=i-o;l<s&&0<=a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[n+h])<0?l=h:r=h+1}return l}function Pn(g,f){var r,s,m=An,l=0,v=[];function e(t){var e=r[t],n=s[t],i=r[t+1],o=s[t+1];s[t]=n+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=kn(g[i],g,e,n,0,f);e+=a,0!=(n-=a)&&0!==(o=Ln(g[e+n-1],g,i,o,o-1,f))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;o<e;o++)v[o]=g[t+o];var a=0,r=n,s=t;if(g[s++]=g[r++],0==--i){for(o=0;o<e;o++)g[s+o]=v[a+o];return}if(1===e){for(o=0;o<i;o++)g[s+o]=g[r+o];return g[s+i]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(f(g[r],v[a])<0){if(g[s++]=g[r++],u++,(l=0)==--i){h=!0;break}}else if(g[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=kn(g[r],v,a,e,0,f))){for(o=0;o<l;o++)g[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(g[s++]=g[r++],0==--i){h=!0;break}if(0!==(u=Ln(v[a],g,r,i,0,f))){for(o=0;o<u;o++)g[s+o]=g[r+o];if(s+=u,r+=u,0===(i-=u)){h=!0;break}}if(g[s++]=v[a++],1==--e){h=!0;break}c--}while(An<=l||An<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<i;o++)g[s+o]=g[r+o];g[s+i]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)g[s+o]=v[a+o]}}:function(t,e,n,i){var o=0;for(o=0;o<i;o++)v[o]=g[n+o];var a=t+e-1,r=i-1,s=n+i-1,l=0,u=0;if(g[s--]=g[a--],0==--e){for(l=s-(i-1),o=0;o<i;o++)g[l+o]=v[o];return}if(1===i){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)g[u+o]=g[l+o];return g[s]=v[r]}var h=m;for(;;){var c=0,d=0,p=!1;do{if(f(v[r],g[a])<0){if(g[s--]=g[a--],c++,(d=0)==--e){p=!0;break}}else if(g[s--]=v[r--],d++,c=0,1==--i){p=!0;break}}while((c|d)<h);if(p)break;do{if(0!==(c=e-kn(v[r],g,t,e,e-1,f))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)g[u+o]=g[l+o];if(0===e){p=!0;break}}if(g[s--]=v[r--],1==--i){p=!0;break}if(0!==(d=i-Ln(g[a],v,0,i,i-1,f))){for(i-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)g[u+o]=v[l+o];if(i<=1){p=!0;break}}if(g[s--]=g[a--],0==--e){p=!0;break}h--}while(An<=c||An<=d);if(p)break;h<0&&(h=0),h+=2}(m=h)<1&&(m=1);if(1===i){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)g[u+o]=g[l+o];g[s]=v[r]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)g[l+o]=v[o]}})(e,n,i,o)}r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function Nn(t,e,n,i){n=n||0;var o=(i=i||t.length)-n;if(!(o<2)){var a=0;if(o<Tn)Cn(t,n,i,n+(a=Dn(t,n,i,e)),e);else{var r,s=new Pn(t,e),l=function(t){for(var e=0;Tn<=t;)e|=1&t,t>>=1;return t+e}(o);do{(a=Dn(t,n,i,e))<l&&(l<(r=o)&&(r=l),Cn(t,n,n+r,n+a,e),a=r),s.pushRun(n,a),s.mergeRuns(),o-=a,n+=a}while(0!==o);s.forceMergeRuns()}}}function On(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function En(){this._roots=[],this._displayList=[],this._displayListLen=0}En.prototype={constructor:En,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,v.canvasSupported&&Nn(n,On)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var o=i,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof In&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof In&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var o=M(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof In&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:On};var Rn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},zn=function(t,e,n){return Rn.hasOwnProperty(e)?n*t.dpr:n},Bn={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Vn=9,Gn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Fn=function(t){this.extendFrom(t,!1)};function Wn(t,e,n){var i=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,r=r*n.height+n.y),i=isNaN(i)?0:i,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(i,a,o,r)}function Hn(t,e,n){var i=n.width,o=n.height,a=Math.min(i,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*i+n.x,s=s*o+n.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}Fn.prototype={constructor:Fn,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,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:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,o=n&&n.style,a=!o||t.__attrCachedBy!==Bn.STYLE_BIND;t.__attrCachedBy=Bn.STYLE_BIND;for(var r,s=0;s<Gn.length;s++){var l=Gn[s],u=l[0];!a&&i[u]===o[u]||(t[u]=zn(t,u,i[u]||l[1]))}!a&&i.fill===o.fill||(t.fillStyle=i.fill),!a&&i.stroke===o.stroke||(t.strokeStyle=i.stroke),!a&&i.opacity===o.opacity||(t.globalAlpha=null==i.opacity?1:i.opacity),!a&&i.blend===o.blend||(t.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()&&(r=i.lineWidth,t.lineWidth=r/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1))},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?Hn:Wn)(t,e,n),o=e.colorStops,a=0;a<o.length;a++)i.addColorStop(o[a].offset,o[a].color);return i}};for(var Zn=Fn.prototype,Un=0;Un<Gn.length;Un++){var Xn=Gn[Un];Xn[0]in Zn||(Zn[Xn[0]]=Xn[1])}Fn.getGradient=Zn.getGradient;function Yn(t,e){this.image=t,this.repeat=e,this.type="pattern"}function jn(){return!1}function qn(t,e,n){var i=y(),o=e.getWidth(),a=e.getHeight(),r=i.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=a*n,i}function Kn(t,e,n){var i;n=n||hn,"string"==typeof t?i=qn(t,e,n):V(t)&&(t=(i=t).id),this.id=t;var o=(this.dom=i).style;o&&(i.onselectstart=jn,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n}Kn.prototype={constructor:Kn,__dirty:!0,__used:!(Yn.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,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=qn("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,o=i.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,i,o=this.dom,a=this.ctx,r=o.width,s=o.height,e=e||this.clearColor,l=this.motionBlur&&!t,u=this.lastFrameAlpha,h=this.dpr;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,r/h,s/h)),a.clearRect(0,0,r,s),e&&"transparent"!==e&&(e.colorStops?(n=e.__canvasGradient||Fn.getGradient(a,e,{x:0,y:0,width:r,height:s}),e.__canvasGradient=n):e.image&&(n=Yn.prototype.getCanvasPattern.call(e,a)),a.save(),a.fillStyle=n||e,a.fillRect(0,0,r,s),a.restore()),l&&(i=this.domBack,a.save(),a.globalAlpha=u,a.drawImage(i,0,0,r,s),a.restore())}};var $n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Jn=new Ie(50);function Qn(t,e,n,i,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var a=Jn.get(t),r={hostEl:n,cb:i,cbPayload:o};return a?ei(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=ti,Jn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function ti(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function ei(t){return t&&t.width&&t.height}var ni={},ii=0,oi=5e3,ai=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,ri="12px sans-serif",si={};function li(t,e){var n=t+":"+(e=e||ri);if(ni[n])return ni[n];for(var i,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((i=a[s],o=e,si.measureText(i,o)).width,r);return oi<ii&&(ii=0,ni={}),ii++,ni[n]=r}function ui(t,e,n,i,o,a,r,s){return r?(u=i,h=yi(t,{rich:r,truncate:s,font:e,textAlign:l=n,textPadding:o,textLineHeight:a}),c=h.outerWidth,d=h.outerHeight,p=hi(0,c,l),g=ci(0,d,u),new Mn(p,g,c,d)):function(t,e,n,i,o,a,r){var s=vi(t,e,o,a,r),l=li(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=hi(0,l,n),c=ci(0,u,i),d=new Mn(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,n,i,o,a,s);var l,u,h,c,d,p,g}function hi(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ci(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function di(t,e,n){var i=e.textPosition,o=e.textDistance,a=n.x,r=n.y,o=o||0,s=n.height,l=n.width,u=s/2,h="left",c="top";switch(i){case"left":a-=o,r+=u,h="right",c="middle";break;case"right":a+=o+l,r+=u,c="middle";break;case"top":a+=l/2,r-=o,h="center",c="bottom";break;case"bottom":a+=l/2,r+=s+o,h="center";break;case"inside":a+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":a+=o,r+=u,c="middle";break;case"insideRight":a+=l-o,r+=u,h="right",c="middle";break;case"insideTop":a+=l/2,r+=o,h="center";break;case"insideBottom":a+=l/2,r+=s-o,h="center",c="bottom";break;case"insideTopLeft":a+=o,r+=o;break;case"insideTopRight":a+=l-o,r+=o,h="right";break;case"insideBottomLeft":a+=o,r+=s-o,c="bottom";break;case"insideBottomRight":a+=l-o,r+=s-o,h="right",c="bottom"}return(t=t||{}).x=a,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function pi(t,e,n,i,o){if(!e)return"";var a=(t+"").split("\n");o=gi(e,n,i,o);for(var r=0,s=a.length;r<s;r++)a[r]=fi(a[r],o);return a.join("\n")}function gi(t,e,n,i){(i=P({},i)).font=e;n=U(n,"...");i.maxIterations=U(i.maxIterations,2);var o=i.minChar=U(i.minChar,0);i.cnCharWidth=li("国",e);var a=i.ascCharWidth=li("a",e);i.placeholder=U(i.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=li(n,e);return r<l&&(n="",l=0),r=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=r,i.containerWidth=t,i}function fi(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";if((s=li(t,i))<=n)return t;for(var a=0;;a++){if(s<=o||a>=e.maxIterations){t+=e.ellipsis;break}var r=0===a?function(t,e,n,i){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?n:i}return a}(t,o,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*o/s):0,s=li(t=t.substr(0,r),i)}return""===t&&(t=e.placeholder),t}function mi(t){return li("国",t)}function vi(t,e,n,i,o){null!=t&&(t+="");var a=U(i,mi(e)),r=t?t.split("\n"):[],s=r.length*a,l=s,u=!0;if(n&&(l+=n[0]+n[2]),t&&o){u=!1;var h=o.outerHeight,c=o.outerWidth;if(null!=h&&h<l)t="",r=[];else if(null!=c)for(var d=gi(c-(n?n[1]+n[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),p=0,g=r.length;p<g;p++)r[p]=fi(r[p],d)}return{lines:r,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function yi(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,o=ai.lastIndex=0;null!=(i=ai.exec(t));){var a=i.index;o<a&&xi(n,t.substring(o,a)),xi(n,i[2],i[1]),o=ai.lastIndex}o<t.length&&xi(n,t.substring(o,t.length));var r=n.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=p&&(p-=h[0]+h[2]));for(var g=0;g<r.length;g++){for(var f=r[g],m=0,v=0,y=0;y<f.tokens.length;y++){var x=(C=f.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=U(x.textHeight,mi(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=X(x.textLineHeight,e.textLineHeight,b),C.textAlign=x&&x.textAlign||e.textAlign,C.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+C.lineHeight>p)return{lines:[],width:0,height:0};C.textWidth=li(C.text,w);var S,M,I,T,A=x.textWidth,D=null==A||"auto"===A;"string"==typeof A&&"%"===A.charAt(A.length-1)?(C.percentWidth=A,u.push(C),A=0):(D&&(A=C.textWidth,(M=(S=x.textBackgroundColor)&&S.image)&&ei(M=function(t){if("string"!=typeof t)return t;var e=Jn.get(t);return e&&e.image}(M))&&(A=Math.max(A,M.width*b/M.height))),A+=I=_?_[1]+_[3]:0,null!=(T=null!=d?d-v:null)&&T<A&&(!D||T<I?(C.text="",C.textWidth=A=0):(C.text=pi(C.text,T-I,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=li(C.text,w),A=C.textWidth+I))),v+=C.width=A,x&&(m=Math.max(m,C.lineHeight))}f.width=v,s+=f.lineHeight=m,l=Math.max(l,v)}n.outerWidth=n.width=U(e.textWidth,l),n.outerHeight=n.height=U(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(g=0;g<u.length;g++){var C,L=(C=u[g]).percentWidth;C.width=parseInt(L,10)/100*l}return n}function xi(t,e,n){for(var i=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s,l,u=o[r],h={styleName:n,text:u,isLineHolder:!u&&!i};r?a.push({tokens:[h]}):1===(l=(s=(a[a.length-1]||(a[0]={tokens:[]})).tokens).length)&&s[0].isLineHolder?s[0]=h:!u&&l&&!i||s.push(h)}}function _i(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&K(e)||t.textFont||t.font}function wi(t,e){var n,i,o,a,r,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=o=a=c:c instanceof Array?1===c.length?n=i=o=a=c[0]:2===c.length?(n=o=c[0],i=a=c[1]):3===c.length?(n=c[0],i=a=c[1],o=c[2]):(n=c[0],i=c[1],o=c[2],a=c[3]):n=i=o=a=0,u<n+i&&(n*=u/(r=n+i),i*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<i+o&&(i*=h/(r=i+o),o*=h/r),h<n+a&&(n*=h/(r=n+a),a*=h/r),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}si.measureText=function(t,e){var n=_();return n.font=e||ri,n.measureText(t)};var bi=ri,Si={left:1,right:1,center:1},Mi={top:1,bottom:1,middle:1},Ii=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Ti={},Ai={};function Di(t){return Ci(t),R(t.rich,Ci),t}function Ci(t){var e,n;t&&(t.font=_i(t),"middle"===(e=t.textAlign)&&(e="center"),t.textAlign=null==e||Si[e]?e:"left","center"===(n=t.textVerticalAlign||t.textBaseline)&&(n="middle"),t.textVerticalAlign=null==n||Mi[n]?n:"top",t.textPadding&&(t.textPadding=j(t.textPadding)))}function Li(t,e,n,i,o,a){(i.rich?function(t,e,n,i,o,a){a!==Vn&&(e.__attrCachedBy=Bn.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=yi(n,i));!function(t,e,n,i,o){var a=n.width,r=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Ri(Ai,t,i,o),h=u.baseX,c=u.baseY,d=u.textAlign,p=u.textVerticalAlign;ki(e,i,o,h,c);var g=hi(h,r,d),f=ci(c,s,p),m=g,v=f;l&&(m+=l[3],v+=l[0]);var y=m+a;Ni(i)&&Oi(t,e,i,g,f,r,s);for(var x,_=0;_<n.lines.length;_++){for(var w=n.lines[_],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(x=b[T]).textAlign||"left"===x.textAlign);)Pi(t,e,x,i,M,v,A,"left"),I-=x.width,A+=x.width,T++;for(;0<=C&&"right"===(x=b[C]).textAlign;)Pi(t,e,x,i,M,v,D,"right"),I-=x.width,D-=x.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)x=b[T],Pi(t,e,x,i,M,v,A+x.width/2,"center"),A+=x.width,T++;v+=M}}(t,e,r,i,o)}:function(t,e,n,i,o,a){var r,s=Ni(i),l=!1,u=e.__attrCachedBy===Bn.PLAIN_TEXT;a!==Vn?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?Bn.NONE:Bn.PLAIN_TEXT):u&&(e.__attrCachedBy=Bn.NONE);var h=i.font||bi;l&&h===(r.font||bi)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=i.textPadding,p=i.textLineHeight,g=t.__textCotentBlock;g&&!t.__dirtyText||(g=t.__textCotentBlock=vi(n,c,d,p,i.truncate));var f=g.outerHeight,m=g.lines,v=g.lineHeight,y=Ri(Ai,t,i,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ki(e,i,o,x,_);var S=ci(_,f,b),M=x,I=S;{var T,A;(s||d)&&(T=li(n,c),d&&(T+=d[1]+d[3]),A=hi(x,T,w),s&&Oi(t,e,i,A,S,T,f),d&&(M=Fi(x,w,d),I+=d[0]))}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(var D=0;D<Ii.length;D++){var C=Ii[D],L=C[0],k=C[1],P=i[L];l&&P===r[L]||(e[k]=zn(e,k,P||C[2]))}I+=v/2;var N=i.textStrokeWidth,O=l?r.textStrokeWidth:null,E=!l||N!==O,R=!l||E||i.textStroke!==r.textStroke,z=Bi(i.textStroke,N),B=Vi(i.textFill);z&&(E&&(e.lineWidth=N),R&&(e.strokeStyle=z));B&&(l&&i.textFill===r.textFill||(e.fillStyle=B));if(1===m.length)z&&e.strokeText(m[0],M,I),B&&e.fillText(m[0],M,I);else for(D=0;D<m.length;D++)z&&e.strokeText(m[D],M,I),B&&e.fillText(m[D],M,I),I+=v})(t,e,n,i,o,a)}function ki(t,e,n,i,o){var a;n&&e.textRotation&&("center"===(a=e.textOrigin)?(i=n.width/2+n.x,o=n.height/2+n.y):a&&(i=a[0]+n.x,o=a[1]+n.y),t.translate(i,o),t.rotate(-e.textRotation),t.translate(-i,-o))}function Pi(t,e,n,i,o,a,r,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+o/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+o-n.height/2),!n.isLineHolder&&Ni(l)&&Oi(t,e,l,"right"===s?r-n.width:"center"===s?r-n.width/2:r,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(r=Fi(r,s,c),h-=n.height/2-c[2]-n.textHeight/2),zi(e,"shadowBlur",X(l.textShadowBlur,i.textShadowBlur,0)),zi(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),zi(e,"shadowOffsetX",X(l.textShadowOffsetX,i.textShadowOffsetX,0)),zi(e,"shadowOffsetY",X(l.textShadowOffsetY,i.textShadowOffsetY,0)),zi(e,"textAlign",s),zi(e,"textBaseline","middle"),zi(e,"font",n.font||bi);var d=Bi(l.textStroke||i.textStroke,void 0),p=Vi(l.textFill||i.textFill),g=U(l.textStrokeWidth,i.textStrokeWidth);d&&(zi(e,"lineWidth",g),zi(e,"strokeStyle",d),e.strokeText(n.text,r,h)),p&&(zi(e,"fillStyle",p),e.fillText(n.text,r,h))}function Ni(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Oi(t,e,n,i,o,a,r){var s,l,u,h=n.textBackgroundColor,c=n.textBorderWidth,d=n.textBorderColor,p=L(h);zi(e,"shadowBlur",n.textBoxShadowBlur||0),zi(e,"shadowColor",n.textBoxShadowColor||"transparent"),zi(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),zi(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),(p||c&&d)&&(e.beginPath(),(s=n.textBorderRadius)?wi(e,{x:i,y:o,width:a,height:r,r:s}):e.rect(i,o,a,r),e.closePath()),p?(zi(e,"fillStyle",h),null!=n.fillOpacity?(u=e.globalAlpha,e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=u):e.fill()):!V(h)||(l=Qn(l=h.image,null,t,Ei,h))&&ei(l)&&e.drawImage(l,i,o,a,r),c&&d&&(zi(e,"lineWidth",c),zi(e,"strokeStyle",d),null!=n.strokeOpacity?(u=e.globalAlpha,e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=u):e.stroke())}function Ei(t,e){e.image=t}function Ri(t,e,n,i){var o,a,r,s=n.x||0,l=n.y||0,u=n.textAlign,h=n.textVerticalAlign;return i&&((o=n.textPosition)instanceof Array?(s=i.x+Gi(o[0],i.width),l=i.y+Gi(o[1],i.height)):(s=(a=e&&e.calculateTextPosition?e.calculateTextPosition(Ti,n,i):di(Ti,n,i)).x,l=a.y,u=u||a.textAlign,h=h||a.textVerticalAlign),(r=n.textOffset)&&(s+=r[0],l+=r[1])),(t=t||{}).baseX=s,t.baseY=l,t.textAlign=u,t.textVerticalAlign=h,t}function zi(t,e,n){return t[e]=zn(t,e,n),t[e]}function Bi(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Vi(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Gi(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Fi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Wi(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Hi(){}var Zi=new Mn;function Ui(t){for(var e in t=t||{},mn.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Fn(t.style,this),this._rect=null,this.__clipPaths=null}function Xi(t){Ui.call(this,t)}Ui.prototype={constructor:Ui,type:"displayable",__dirty:!0,invisible:!(Hi.prototype={constructor:Hi,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&Di(n);var i,o=n.text;null!=o&&(o+=""),Wi(o,n)&&(t.save(),i=this.transform,n.transformText?this.setTransform(t):i&&(Zi.copy(e),Zi.applyTransform(i),e=Zi),Li(this,t,o,n,e,Vn),t.restore())}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,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 n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?mn.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Fn(t,this),this.dirty(!1),this},calculateTextPosition:null},w(Ui,mn),b(Ui,Hi),Xi.prototype={constructor:Xi,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var o,a,r,s,l,u,h,c,d,p=this._image=Qn(i,this._image,this,this.onload);p&&ei(p)&&(o=n.x||0,a=n.y||0,r=n.width,s=n.height,l=p.width/p.height,null==r&&null!=s?r=s*l:null==s&&null!=r?s=r/l:null==r&&null==s&&(r=p.width,s=p.height),this.setTransform(t),n.sWidth&&n.sHeight?(u=n.sx||0,h=n.sy||0,t.drawImage(p,u,h,n.sWidth,n.sHeight,o,a,r,s)):n.sx&&n.sy?(c=r-(u=n.sx),d=s-(h=n.sy),t.drawImage(p,u,h,c,d,o,a,r,s)):t.drawImage(p,o,a,r,s),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect())))},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Mn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},w(Xi,Ui);var Yi=314159;function ji(t){return parseInt(t,10)}var qi=new Mn(0,0,0,0),Ki=new Mn(0,0,0,0);function $i(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||hn,this._singleCanvas=i;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a,r,s,l,u,h,c,d=this._zlevelList=[],p=this._layers={};this._layerConfig={},this._needsManuallyCompositing=!1,i?(a=t.width,r=t.height,null!=n.width&&(a=n.width),null!=n.height&&(r=n.height),this.dpr=n.devicePixelRatio||1,t.width=a*this.dpr,t.height=r*this.dpr,this._width=a,this._height=r,(s=new Kn(t,this,this.dpr)).__builtin__=!0,s.initContext(),(p[Yi]=s).zlevel=Yi,d.push(Yi),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),l=this._domRoot=(u=this._width,h=this._height,(c=document.createElement("div")).style.cssText=["position:relative","width:"+u+"px","height:"+h+"px","padding:0","margin:0","border-width:0"].join(";")+";",c),t.appendChild(l)),this._hoverlayer=null,this._hoverElements=[]}$i.prototype={constructor:$i,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(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var o,a=n[i],r=this._layers[a];!r.__builtin__&&r.refresh&&(o=0===i?this._backgroundColor:null,r.refresh(o))}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(n.__from=t).__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=M(n,e);0<=i&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n<e.length;n++){var i=e[n].__from;i&&(i.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){Nn(t,this.storage.displayableSortFunc);var i={};(n=n||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(o,1),r.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,n){var i,o;this._redrawId===n&&(e=e||!1,this._updateLayerStatus(t),i=this._doPaintList(t,e),this._needsManuallyCompositing&&this._compositeManually(),i||(o=this,$n(function(){o._paintList(t,e,n)})))},_compositeManually:function(){var e=this.getLayer(Yi).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var a=!0,r=0;r<n.length;r++){var s,l=(s=n[r]).ctx,u={};l.save();var h,c=e?s.__startIndex:s.__drawIndex,d=!e&&s.incremental&&Date.now,p=d&&Date.now(),g=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;s.__startIndex===s.__endIndex?s.clear(!1,g):c===s.__startIndex&&((h=t[c]).incremental&&h.notClear&&!e||s.clear(!1,g)),-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var f=c;f<s.__endIndex;f++){var m=t[f];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,d)if(15<Date.now()-p)break}s.__drawIndex=f,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return v.wxa&&R(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,n,i){var o,a,r,s,l,u=e.ctx,h=t.transform;!e.__dirty&&!n||t.invisible||0===t.style.opacity||h&&!h[0]&&!h[3]||t.culling&&(r=t,s=this._width,l=this._height,qi.copy(r.getBoundingRect()),r.transform&&qi.applyTransform(r.transform),Ki.width=s,Ki.height=l,!qi.intersect(Ki))||(o=t.__clipPaths,(a=i.prevElClipPaths)&&!function(t,e){if(t!==e){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}(o,a)||(a&&(u.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(u.save(),function(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}(o,u),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(u),t.brush(u,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(u))},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Yi);var n=this._layers[t];return n||((n=new Kn("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?m(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&m(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n,i=this._layers,o=this._zlevelList,a=o.length,r=null,s=-1,l=this._domRoot;if(i[t])pn("ZLevel "+t+" has been used already");else if(function(t){if(t){if(t.__builtin__)return 1;if("function"==typeof t.resize&&"function"==typeof t.refresh)return 1}}(e)){if(0<a&&t>o[0]){for(s=0;s<a-1&&!(o[s]<t&&o[s+1]>t);s++);r=i[o[s]]}o.splice(s+1,0,t),(i[t]=e).virtual||(r?(n=r.dom).nextSibling?l.insertBefore(e.dom,n.nextSibling):l.appendChild(e.dom):l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom))}else pn("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){for(var n,i=this._zlevelList,o=0;o<i.length;o++)n=i[o],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((r=t[n]).zlevel!==t[n-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}for(var i,o=null,a=0,n=0;n<t.length;n++){var r,s,l=(r=t[n]).zlevel;i!==l&&(i=l,a=0),r.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(0<a?.01:0),this._needsManuallyCompositing),s.__builtin__||pn("ZLevel "+l+" has been used by unkown layer "+s.id),s!==o&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,e(n),o=s),r.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?m(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||m(this._layers[o],n[t],!0)}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(M(n,t),1))},resize:function(e,n){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=n&&(i.height=n),e=this._getSize(0),n=this._getSize(1),t.style.display="",this._width!==e||n!==this._height){for(var o in t.style.width=e+"px",t.style.height=n+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,n);R(this._progressiveLayers,function(t){t.resize(e,n)}),this.refresh(!0)}this._width=e,this._height=n}else{if(null==e||null==n)return;this._width=e,this._height=n,this.getLayer(Yi).resize(e,n)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Yi].dom;var e=new Kn("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[i]||ji(s[n])||ji(r.style[n]))-(ji(s[o])||0)-(ji(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),p=Math.max(u/2,l+r),g=o.width+h+c,f=o.height+d+p;n.width=g*e,n.height=f*e,i.scale(e,e),i.clearRect(0,0,g,f),i.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var v=new Xi({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};function Ji(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Ct.call(this)}Ji.prototype={constructor:Ji,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=M(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,o=[],a=[],r=0;r<i;r++){var s=n[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<i;)n[r]._needsRemove?(n[r]=n[i-1],n.pop(),i--):r++;i=o.length;for(r=0;r<i;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,$n(function t(){e._running&&($n(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var n=new ln(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},b(Ji,Ct);var Qi,to,eo=v.domSupported,no=(to={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Qi=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:z(Qi,function(t){var e=t.replace("mouse","pointer");return to.hasOwnProperty(e)?e:t})}),io={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function oo(t){return"mousewheel"===t&&v.browser.firefox?"DOMMouseScroll":t}function ao(t){var e=t.pointerType;return"pen"===e||"touch"===e}function ro(t){t&&(t.zrByTouch=!0)}function so(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}function lo(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var uo=lo.prototype;uo.stopPropagation=uo.stopImmediatePropagation=uo.preventDefault=it;var ho={mousedown:function(t){t=Zt(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Zt(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||vo(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Zt(this.dom,t),vo(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Zt(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=so(this,e),this.trigger("mouseout",t)},touchstart:function(t){ro(t=Zt(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),ho.mousemove.call(this,t),ho.mousedown.call(this,t)},touchmove:function(t){ro(t=Zt(this.dom,t)),this.handler.processGesture(t,"change"),ho.mousemove.call(this,t)},touchend:function(t){ro(t=Zt(this.dom,t)),this.handler.processGesture(t,"end"),ho.mouseup.call(this,t),new Date-this._lastTouchMoment<300&&ho.click.call(this,t)},pointerdown:function(t){ho.mousedown.call(this,t)},pointermove:function(t){ao(t)||ho.mousemove.call(this,t)},pointerup:function(t){ho.mouseup.call(this,t)},pointerout:function(t){ao(t)||ho.mouseout.call(this,t)}};R(["click","mousewheel","dblclick","contextmenu"],function(e){ho[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var co={pointermove:function(t){ao(t)||co.mousemove.call(this,t)},pointerup:function(t){co.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;vo(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function po(i,o){var a=o.domHandlers;v.pointerEventsSupported?R(no.pointer,function(e){fo(o,e,function(t){a[e].call(i,t)})}):(v.touchEventsSupported&&R(no.touch,function(n){fo(o,n,function(t){var e;a[n].call(i,t),(e=o).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),R(no.mouse,function(e){fo(o,e,function(t){t=Ht(t),o.touching||a[e].call(i,t)})}))}function go(o,a){function t(i){fo(a,i,function(t){var e,n;t=Ht(t),so(o,t.target)||(n=t,t=Zt((e=o).dom,new lo(e,n),!0),a.domHandlers[i].call(o,t))},{capture:!0})}v.pointerEventsSupported?R(io.pointer,t):v.touchEventsSupported||R(io.mouse,t)}function fo(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Ut(t.domTarget,oo(e),n,i)}function mo(t){var e,n,i,o,a=t.mounted;for(var r in a)a.hasOwnProperty(r)&&(e=t.domTarget,n=oo(r),i=a[r],o=t.listenerOpts[r],Bt?e.removeEventListener(n,i,o):e.detachEvent("on"+n,i));t.mounted={}}function vo(t,e){var n;t._mayPointerCapture=null,eo&&t._pointerCapturing^e&&(t._pointerCapturing=e,n=t._globalHandlerScope,e?go(t,n):mo(n))}function yo(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function xo(t,e){Ct.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new yo(t,ho),eo&&(this._globalHandlerScope=new yo(document,co)),this._pointerCapturing=!1,this._mayPointerCapture=null,po(this,this._localHandlerScope)}var _o=xo.prototype;_o.dispose=function(){mo(this._localHandlerScope),eo&&mo(this._globalHandlerScope)},_o.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},b(xo,Ct);var wo=!v.canvasSupported,bo={canvas:$i},So={},Mo="4.3.1";function Io(t,e){var n=new Ao(i(),t,e);return So[n.id]=n}function To(t,e){bo[t]=e}var Ao=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,o=new En,a=n.renderer;if(wo){if(!bo.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&bo[a]||(a="canvas");var r=new bo[a](e,o,n,t);this.storage=o,this.painter=r;var s=v.node||v.worker?null:new xo(r.getViewportRoot(),r.root);this.handler=new te(o,r,s,r.root),this.animation=new Ji({stage:{update:N(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(i)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(i)}};Ao.prototype={constructor:Ao,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,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,n){this.handler.on(t,e,n)},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(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete So[t]}};var Do=(Object.freeze||Object)({version:Mo,init:Io,dispose:function(t){if(t)t.dispose();else{for(var e in So)So.hasOwnProperty(e)&&So[e].dispose();So={}}return this},getInstance:function(t){return So[t]},registerPainter:To}),Co=R,Lo=V,ko=C,Po="series\0";function No(t){return t instanceof Array?t:null==t?[]:[t]}function Oo(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Eo=["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 Ro(t){return!Lo(t)||ko(t)||t instanceof Date?t:t.value}function zo(t,o){o=(o||[]).slice();var a=z(t||[],function(t,e){return{exist:t}});return Co(o,function(t,e){if(Lo(t)){for(var n=0;n<a.length;n++)if(!a[n].option&&null!=t.id&&a[n].exist.id===t.id+"")return a[n].option=t,void(o[e]=null);for(n=0;n<a.length;n++){var i=a[n].exist;if(!(a[n].option||null!=i.id&&null!=t.id||null==t.name||Go(t)||Go(i)||i.name!==t.name+""))return a[n].option=t,void(o[e]=null)}}}),Co(o,function(t,e){if(Lo(t)){for(var n=0;n<a.length;n++){var i=a[n].exist;if(!a[n].option&&!Go(i)&&null==t.id){a[n].option=t;break}}n>=a.length&&a.push({option:t})}}),a}function Bo(t){var r=et();Co(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),Co(t,function(t,e){var n=t.option;q(!n||null==n.id||!r.get(n.id)||r.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&r.set(n.id,t),t.keyInfo||(t.keyInfo={})}),Co(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if(Lo(i)){if(o.name=null!=i.name?i.name+"":n?n.name:Po+e,n)o.id=n.id;else if(null!=i.id)o.id=i.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Vo(t){var e=t.name;return e&&e.indexOf(Po)}function Go(t){return Lo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Fo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?C(t.dataIndex)?z(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?C(t.name)?z(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Wo(){var e="__\0ec_inner_"+Ho+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Ho=0;function Zo(s,l,u){var t;L(l)&&((t={})[l+"Index"]=0,l=t);var e=u&&u.defaultMainType;!e||Uo(l,e+"Index")||Uo(l,e+"Id")||Uo(l,e+"Name")||(l[e+"Index"]=0);var h={};return Co(l,function(t,e){var n,i,o,a,r,t=l[e];"dataIndex"!==e&&"dataIndexInside"!==e?(i=(n=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],o=(n[2]||"").toLowerCase(),!i||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&M(u.includeMainTypes,i)<0||(a={mainType:i},"index"===o&&"all"===t||(a[o]=t),r=s.queryComponents(a),h[i+"Models"]=r,h[i+"Model"]=r[0])):h[e]=t}),h}function Uo(t,e){return t&&t.hasOwnProperty(e)}function Xo(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Yo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function jo(t,n){var i=et(),o=[];return R(t,function(t){var e=n(t);(i.get(e)||(o.push(e),i.set(e,[]))).push(t)}),{keys:o,buckets:i}}var qo=".",Ko="___EC__COMPONENT__CONTAINER___";function $o(t){var e={main:"",sub:""};return t&&(t=t.split(qo),e.main=t[0]||"",e.sub=t[1]||""),e}function Jo(t,i){(t.$constructor=t).extend=function(e){D&&R(i,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?" in "+e.type:"")+".")});function t(){e.$constructor?e.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return P(t.prototype,e),t.extend=this.extend,t.superCall=ea,t.superApply=na,w(t,this),t.superClass=n,t}}var Qo=0;function ta(t){var e=["__\0is_clz",Qo++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,D&&q(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function ea(t,e){var n=Y(arguments,2);return this.superClass.prototype[e].apply(t,n)}function na(t,e,n){return this.superClass.prototype[e].apply(t,n)}function ia(n,t){t=t||{};var i,o={};return n.registerClass=function(t,e){var n;return e&&(q(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=e),'componentType "'+n+'" illegal'),(e=$o(e)).sub?e.sub!==Ko&&(function(t){var e=o[t.main];e&&e[Ko]||((e=o[t.main]={})[Ko]=!0);return e}(e)[e.sub]=t):(D&&o[e.main]&&console.warn(e.main+" exists."),o[e.main]=t)),t},n.getClass=function(t,e,n){var i=o[t];if(i&&i[Ko]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=$o(t);var n=[],e=o[t.main];return e&&e[Ko]?R(e,function(t,e){e!==Ko&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=$o(t),!!o[t.main]},n.getAllClassMainTypes=function(){var n=[];return R(o,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=$o(t);var e=o[t.main];return e&&e[Ko]},n.parseClassType=$o,!t.registerWhenExtend||(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)}),n}function oa(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,n){for(var i={},o=0;o<s.length;o++){var a,r=s[o][1];e&&0<=M(e,r)||n&&M(n,r)<0||null!=(a=t.getShallow(r))&&(i[s[o][0]]=a)}return i}}var aa=oa([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),ra={getLineStyle:function(t){var e=aa(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[i,i]:[n,n])}},sa=oa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),la={getAreaStyle:function(t,e){return sa(this,t,e)}},ua=Math.pow,ha=Math.sqrt,ca=1e-8,da=1e-4,pa=ha(3),ga=1/3,fa=rt(),ma=rt(),va=rt();function ya(t){return-ca<t&&t<ca}function xa(t){return ca<t||t<-ca}function _a(t,e,n,i,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*i+3*a*n)}function wa(t,e,n,i,o){var a=1-o;return 3*(((e-t)*a+2*(n-e)*o)*a+(i-n)*o*o)}function ba(t,e,n,i,o){var a,r,s,l,u=6*n-12*e+6*t,h=9*e+3*i-3*t-9*n,c=3*e-3*t,d=0;return ya(h)?xa(u)&&0<=(s=-c/u)&&s<=1&&(o[d++]=s):ya(a=u*u-4*h*c)?o[0]=-u/(2*h):0<a&&(l=(-u-(r=ha(a)))/(2*h),0<=(s=(-u+r)/(2*h))&&s<=1&&(o[d++]=s),0<=l&&l<=1&&(o[d++]=l)),d}function Sa(t,e,n,i,o,a){var r=(e-t)*o+t,s=(n-e)*o+e,l=(i-n)*o+n,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function Ma(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Ia(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Ta(t,e,n){var i=t+n-2*e;return 0==i?.5:(t-e)/i}function Aa(t,e,n,i,o){var a=(e-t)*i+t,r=(n-e)*i+e,s=(r-a)*i+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=n}var Da=Math.min,Ca=Math.max,La=Math.sin,ka=Math.cos,Pa=2*Math.PI,Na=rt(),Oa=rt(),Ea=rt();function Ra(t,e,n){if(0!==t.length){for(var i=t[0],o=i[0],a=i[0],r=i[1],s=i[1],l=1;l<t.length;l++)i=t[l],o=Da(o,i[0]),a=Ca(a,i[0]),r=Da(r,i[1]),s=Ca(s,i[1]);e[0]=o,e[1]=r,n[0]=a,n[1]=s}}function za(t,e,n,i,o,a){o[0]=Da(t,n),o[1]=Da(e,i),a[0]=Ca(t,n),a[1]=Ca(e,i)}var Ba=[],Va=[];var Ga={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Fa=[],Wa=[],Ha=[],Za=[],Ua=Math.min,Xa=Math.max,Ya=Math.cos,ja=Math.sin,qa=Math.sqrt,Ka=Math.abs,$a="undefined"!=typeof Float32Array,Ja=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function Qa(t,e,n,i,o,a,r){if(0!==o){var s=o,l=0;if(!(e+s<r&&i+s<r||r<e-s&&r<i-s||t+s<a&&n+s<a||a<t-s&&a<n-s)){if(t===n)return Math.abs(a-t)<=s/2;var u=(l=(e-i)/(t-n))*a-r+(t*i-n*e)/(t-n);return u*u/(l*l+1)<=s/2*s/2}}}function tr(t,e,n,i,o,a,r,s,l,u,h){if(0!==l){var c=l;if(!(e+c<h&&i+c<h&&a+c<h&&s+c<h||h<e-c&&h<i-c&&h<a-c&&h<s-c||t+c<u&&n+c<u&&o+c<u&&r+c<u||u<t-c&&u<n-c&&u<o-c&&u<r-c))return function(t,e,n,i,o,a,r,s,l,u,h){var c,d,p,g,f,m=.005,v=1/0;fa[0]=l,fa[1]=u;for(var y=0;y<1;y+=.05)ma[0]=_a(t,n,o,r,y),ma[1]=_a(e,i,a,s,y),(g=_t(fa,ma))<v&&(c=y,v=g);v=1/0;for(var x=0;x<32&&!(m<da);x++)d=c-m,p=c+m,ma[0]=_a(t,n,o,r,d),ma[1]=_a(e,i,a,s,d),g=_t(ma,fa),0<=d&&g<v?(c=d,v=g):(va[0]=_a(t,n,o,r,p),va[1]=_a(e,i,a,s,p),f=_t(va,fa),p<=1&&f<v?(c=p,v=f):m*=.5);return h&&(h[0]=_a(t,n,o,r,c),h[1]=_a(e,i,a,s,c)),ha(v)}(t,e,n,i,o,a,r,s,u,h,null)<=c/2}}function er(t,e,n,i,o,a,r,s,l){if(0!==r){var u=r;if(!(e+u<l&&i+u<l&&a+u<l||l<e-u&&l<i-u&&l<a-u||t+u<s&&n+u<s&&o+u<s||s<t-u&&s<n-u&&s<o-u))return function(t,e,n,i,o,a,r,s,l){var u,h=.005,c=1/0;fa[0]=r,fa[1]=s;for(var d=0;d<1;d+=.05){ma[0]=Ma(t,n,o,d),ma[1]=Ma(e,i,a,d),(v=_t(fa,ma))<c&&(u=d,c=v)}c=1/0;for(var p=0;p<32&&!(h<da);p++){var g=u-h,f=u+h;ma[0]=Ma(t,n,o,g),ma[1]=Ma(e,i,a,g);var m,v=_t(ma,fa);0<=g&&v<c?(u=g,c=v):(va[0]=Ma(t,n,o,f),va[1]=Ma(e,i,a,f),m=_t(va,fa),f<=1&&m<c?(u=f,c=m):h*=.5)}return l&&(l[0]=Ma(t,n,o,u),l[1]=Ma(e,i,a,u)),ha(c)}(t,e,n,i,o,a,s,l,null)<=u/2}}Ja.prototype={constructor:Ja,_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,n){n=n||0,this._ux=Ka(n/hn/t)||0,this._uy=Ka(n/hn/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(Ga.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Ka(t-this._xi)>this._ux||Ka(e-this._yi)>this._uy||this._len<5;return this.addData(Ga.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,o,a){return this.addData(Ga.C,t,e,n,i,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,o,a):this._ctx.bezierCurveTo(t,e,n,i,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Ga.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,o,a){return this.addData(Ga.A,t,e,n,n,i,o-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,a),this._xi=Ya(o)*n+t,this._yi=ja(o)*n+e,this},arcTo:function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ga.R,t,e,n,i),this},closePath:function(){this.addData(Ga.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!$a||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();$a&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[i++]=a[r];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=qa(h*h+c*c),p=l,g=u,f=r.length;for(a<0&&(a=o+a),p-=(a%=o)*(h/=d),g-=a*(c/=d);0<h&&p<=t||h<0&&t<=p||0===h&&(0<c&&g<=e||c<0&&e<=g);)p+=h*(n=r[i=this._dashIdx]),g+=c*n,this._dashIdx=(i+1)%f,0<h&&p<l||h<0&&l<p||0<c&&g<u||c<0&&u<g||s[i%2?"moveTo":"lineTo"]((0<=h?Ua:Xa)(p,t),(0<=c?Ua:Xa)(g,e));h=p-t,c=g-e,this._dashOffset=-qa(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,f=this._xi,m=this._yi,v=_a,y=0,x=this._dashIdx,_=p.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(f,t,n,o,r+.1)-v(f,t,n,o,r),l=v(m,e,i,a,r+.1)-v(m,e,i,a,r),y+=qa(s*s+l*l);for(;x<_&&!(d<(w+=p[x]));x++);for(r=(w-d)/y;r<=1;)u=v(f,t,n,o,r),h=v(m,e,i,a,r),x%2?g.moveTo(u,h):g.lineTo(u,h),r+=p[x]/y,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-qa(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var o=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,$a&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Fa[0]=Fa[1]=Ha[0]=Ha[1]=Number.MAX_VALUE,Wa[0]=Wa[1]=Za[0]=Za[1]=-Number.MAX_VALUE;for(var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g=this.data,f=0,m=0,v=0,y=0,x=0;x<g.length;){var _=g[x++];switch(1===x&&(v=f=g[x],y=m=g[x+1]),_){case Ga.M:f=v=g[x++],m=y=g[x++],Ha[0]=v,Ha[1]=y,Za[0]=v,Za[1]=y;break;case Ga.L:za(f,m,g[x],g[x+1],Ha,Za),f=g[x++],m=g[x++];break;case Ga.C:!function(t,e,n,i,o,a,r,s,l,u){var h,c=ba,d=_a,p=c(t,n,o,r,Ba);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<p;h++){var g=d(t,n,o,r,Ba[h]);l[0]=Da(g,l[0]),u[0]=Ca(g,u[0])}for(p=c(e,i,a,s,Va),h=0;h<p;h++){var f=d(e,i,a,s,Va[h]);l[1]=Da(f,l[1]),u[1]=Ca(f,u[1])}l[0]=Da(t,l[0]),u[0]=Ca(t,u[0]),l[0]=Da(r,l[0]),u[0]=Ca(r,u[0]),l[1]=Da(e,l[1]),u[1]=Ca(e,u[1]),l[1]=Da(s,l[1]),u[1]=Ca(s,u[1])}(f,m,g[x++],g[x++],g[x++],g[x++],g[x],g[x+1],Ha,Za),f=g[x++],m=g[x++];break;case Ga.Q:t=f,e=m,n=g[x++],i=g[x++],o=g[x],a=g[x+1],r=Ha,s=Za,p=d=c=h=u=l=void 0,u=Ma,h=Ca(Da((l=Ta)(t,n,o),1),0),c=Ca(Da(l(e,i,a),1),0),d=u(t,n,o,h),p=u(e,i,a,c),r[0]=Da(t,o,d),r[1]=Da(e,a,p),s[0]=Ca(t,o,d),s[1]=Ca(e,a,p),f=g[x++],m=g[x++];break;case Ga.A:var w=g[x++],b=g[x++],S=g[x++],M=g[x++],I=g[x++],T=g[x++]+I;x+=1;var A=1-g[x++];1===x&&(v=Ya(I)*S+w,y=ja(I)*M+b),function(t,e,n,i,o,a,r,s,l){var u,h=St,c=Mt,d=Math.abs(o-a);if(d%Pa<1e-4&&1e-4<d)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;Na[0]=ka(o)*n+t,Na[1]=La(o)*i+e,Oa[0]=ka(a)*n+t,Oa[1]=La(a)*i+e,h(s,Na,Oa),c(l,Na,Oa),(o%=Pa)<0&&(o+=Pa),(a%=Pa)<0&&(a+=Pa),a<o&&!r?a+=Pa:o<a&&r&&(o+=Pa),r&&(u=a,a=o,o=u);for(var p=0;p<a;p+=Math.PI/2)o<p&&(Ea[0]=ka(p)*n+t,Ea[1]=La(p)*i+e,h(s,Ea,s),c(l,Ea,l))}(w,b,S,M,I,T,A,Ha,Za),f=Ya(T)*S+w,m=ja(T)*M+b;break;case Ga.R:za(v=f=g[x++],y=m=g[x++],v+g[x++],y+g[x++],Ha,Za);break;case Ga.Z:f=v,m=y}St(Fa,Fa,Ha),Mt(Wa,Wa,Za)}return 0===x&&(Fa[0]=Fa[1]=Wa[0]=Wa[1]=0),new Mn(Fa[0],Fa[1],Wa[0]-Fa[0],Wa[1]-Fa[1])},rebuildPath:function(t){for(var e,n,i,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=i=s[c],n=o=s[c+1]),d){case Ga.M:e=i=s[c++],n=o=s[c++],t.moveTo(i,o);break;case Ga.L:a=s[c++],r=s[c++],(Ka(a-i)>l||Ka(r-o)>u||c===h-1)&&(t.lineTo(a,r),i=a,o=r);break;case Ga.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Ga.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Ga.A:var p=s[c++],g=s[c++],f=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<f?f:m,b=m<f?1:f/m,S=m<f?m/f:1,M=v+y;.001<Math.abs(f-m)?(t.translate(p,g),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-p,-g)):t.arc(p,g,w,v,M,1-_),1===c&&(e=Ya(v)*f+p,n=ja(v)*m+g),i=Ya(M)*f+p,o=ja(M)*m+g;break;case Ga.R:e=i=s[c],n=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Ga.Z:t.closePath(),i=e,o=n}}}},Ja.CMD=Ga;var nr=2*Math.PI;function ir(t){return(t%=nr)<0&&(t+=nr),t}var or=2*Math.PI;function ar(t,e,n,i,o,a){if(e<a&&i<a||a<e&&a<i)return 0;if(i===e)return 0;var r=i<e?1:-1,s=(a-e)/(i-e);1!=s&&0!=s||(r=i<e?.5:-.5);var l=s*(n-t)+t;return l===o?1/0:o<l?r:0}var rr=Ja.CMD,sr=2*Math.PI,lr=1e-4;var ur=[-1,-1,-1],hr=[-1,-1];function cr(t,e,n,i,o,a,r,s,l,u){if(e<u&&i<u&&a<u&&s<u||u<e&&u<i&&u<a&&u<s)return 0;var h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T,A,D,C,L,k,P,N,O=(p=ur,k=(A=3*((d=a)-2*(c=i)+(h=e)))*(D=3*(c-h))-9*(T=s+3*(c-d)-h)*(C=h-u),P=D*D-3*A*C,N=0,ya(L=A*A-3*T*D)&&ya(k)?ya(A)?p[0]=0:0<=(S=-D/A)&&S<=1&&(p[N++]=S):ya(g=k*k-4*L*P)?(M=-(f=k/L)/2,0<=(S=-A/T+f)&&S<=1&&(p[N++]=S),0<=M&&M<=1&&(p[N++]=M)):0<g?(y=L*A+1.5*T*(-k-(m=ha(g))),0<=(S=(-A-((v=(v=L*A+1.5*T*(-k+m))<0?-ua(-v,ga):ua(v,ga))+(y=y<0?-ua(-y,ga):ua(y,ga))))/(3*T))&&S<=1&&(p[N++]=S)):(x=(2*L*A-3*T*k)/(2*ha(L*L*L)),_=Math.acos(x)/3,S=(-A-2*(w=ha(L))*(b=Math.cos(_)))/(3*T),M=(-A+w*(b+pa*Math.sin(_)))/(3*T),I=(-A+w*(b-pa*Math.sin(_)))/(3*T),0<=S&&S<=1&&(p[N++]=S),0<=M&&M<=1&&(p[N++]=M),0<=I&&I<=1&&(p[N++]=I)),N);if(0===O)return 0;for(var E,R,z,B=0,V=-1,G=0;G<O;G++){var F=ur[G],W=0===F||1===F?.5:1;_a(t,n,o,r,F)<l||(V<0&&(V=ba(e,i,a,s,hr),hr[1]<hr[0]&&1<V&&(z=void 0,z=hr[0],hr[0]=hr[1],hr[1]=z),E=_a(e,i,a,s,hr[0]),1<V&&(R=_a(e,i,a,s,hr[1]))),2===V?F<hr[0]?B+=E<e?W:-W:F<hr[1]?B+=R<E?W:-W:B+=s<R?W:-W:F<hr[0]?B+=E<e?W:-W:B+=s<E?W:-W)}return B}function dr(t,e,n,i,o,a,r,s){if(e<s&&i<s&&a<s||s<e&&s<i&&s<a)return 0;var l,u,h,c,d,p,g,f,m,v,y,x=(h=ur,m=2*((u=i)-(l=e)),v=l-s,y=0,ya(f=l-2*u+a)?xa(m)&&0<=(p=-v/m)&&p<=1&&(h[y++]=p):ya(c=m*m-4*f*v)?0<=(p=-m/(2*f))&&p<=1&&(h[y++]=p):0<c&&(g=(-m-(d=ha(c)))/(2*f),0<=(p=(-m+d)/(2*f))&&p<=1&&(h[y++]=p),0<=g&&g<=1&&(h[y++]=g)),y);if(0===x)return 0;var _=Ta(e,i,a);if(0<=_&&_<=1){for(var w=0,b=Ma(e,i,a,_),S=0;S<x;S++){var M=0===ur[S]||1===ur[S]?.5:1;Ma(t,n,o,ur[S])<r||(ur[S]<_?w+=b<e?M:-M:w+=a<b?M:-M)}return w}M=0===ur[0]||1===ur[0]?.5:1;return Ma(t,n,o,ur[0])<r?0:a<e?M:-M}function pr(t,e,n,i,o){for(var a,r,s=0,l=0,u=0,h=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===rr.M&&1<d&&(n||(s+=ar(l,u,h,c,i,o))),1===d&&(h=l=t[d],c=u=t[d+1]),p){case rr.M:l=h=t[d++],u=c=t[d++];break;case rr.L:if(n){if(Qa(l,u,t[d],t[d+1],e,i,o))return!0}else s+=ar(l,u,t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case rr.C:if(n){if(tr(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=cr(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case rr.Q:if(n){if(er(l,u,t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=dr(l,u,t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case rr.A:var g=t[d++],f=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++];d+=1;var _=1-t[d++],w=Math.cos(y)*m+g,b=Math.sin(y)*v+f;1<d?s+=ar(l,u,w,b,i,o):(h=w,c=b);var S=(i-g)*v/m+g;if(n){if(function(t,e,n,i,o,a,r,s,l){if(0!==r){var u=r;s-=t,l-=e;var h,c=Math.sqrt(s*s+l*l);if(!(n<c-u||c+u<n)){if(Math.abs(i-o)%or<1e-4)return 1;(o=a?(h=i,i=ir(o),ir(h)):(i=ir(i),ir(o)))<i&&(o+=or);var d=Math.atan2(l,s);return d<0&&(d+=or),i<=d&&d<=o||i<=d+or&&d+or<=o}}}(g,f,v,y,y+x,_,e,S,o))return!0}else s+=function(t,e,n,i,o,a,r,s){if(n<(s-=e)||s<-n)return 0;var l=Math.sqrt(n*n-s*s);ur[0]=-l,ur[1]=l;var u=Math.abs(i-o);if(u<1e-4)return 0;if(u%sr<1e-4){o=sr;var h=a?1:-1;return r>=ur[i=0]+t&&r<=ur[1]+t?h:0}(o=a?(l=i,i=ir(o),ir(l)):(i=ir(i),ir(o)))<i&&(o+=sr);for(var c=0,d=0;d<2;d++){var p,g=ur[d];r<g+t&&(h=a?1:-1,(p=Math.atan2(s,g))<0&&(p=sr+p),(i<=p&&p<=o||i<=p+sr&&p+sr<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h))}return c}(g,f,v,y,y+x,_,S,o);l=Math.cos(y+x)*m+g,u=Math.sin(y+x)*v+f;break;case rr.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(Qa(h,c,w,c,e,i,o)||Qa(w,c,w,b,e,i,o)||Qa(w,b,h,b,e,i,o)||Qa(h,b,h,c,e,i,o))return!0}else s+=ar(w,c,w,b,i,o),s+=ar(h,b,h,c,i,o);break;case rr.Z:if(n){if(Qa(l,u,h,c,e,i,o))return!0}else s+=ar(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)<lr)||(s+=ar(l,u,h,c,i,o)||0),0!==s}var gr=Yn.prototype.getCanvasPattern,fr=Math.abs,mr=new Ja(!0);function vr(t){Ui.call(this,t),this.path=null}vr.prototype={constructor:vr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var n,i=this.style,o=this.path||mr,a=i.hasStroke(),r=i.hasFill(),s=i.fill,l=i.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;i.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,n))),u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=gr.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=gr.call(l,t));var p,g=i.lineDash,f=i.lineDashOffset,m=!!t.setLineDash,v=this.getGlobalScale();o.setScale(v[0],v[1],this.segmentIgnoreThreshold),this.__dirtyPath||g&&!m&&a?(o.beginPath(t),g&&!m&&(o.setLineDash(g),o.setLineDashOffset(f)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&(null!=i.fillOpacity?(p=t.globalAlpha,t.globalAlpha=i.fillOpacity*i.opacity,o.fill(t),t.globalAlpha=p):o.fill(t)),g&&m&&(t.setLineDash(g),t.lineDashOffset=f),a&&(null!=i.strokeOpacity?(p=t.globalAlpha,t.globalAlpha=i.strokeOpacity*i.opacity,o.stroke(t),t.globalAlpha=p):o.stroke(t)),g&&m&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new Ja},getBoundingRect:function(){var t,e=this._rect,n=this.style,i=!e;if(i&&(t=(t=this.path)||(this.path=new Ja),this.__dirtyPath&&(t.beginPath(),this.buildPath(t,this.shape,!1)),e=t.getBoundingRect()),this._rect=e,n.hasStroke()){var o,a,r=this._rectWithStroke||(this._rectWithStroke=e.clone());return(this.__dirty||i)&&(r.copy(e),o=n.lineWidth,a=n.strokeNoScale?this.getLineScale():1,n.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),1e-10<a&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)),r}return e},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),pr(a,r/s,!0,t,e)))return!0}if(o.hasFill())return pr(a,0,!1,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Ui.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(V(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<fr(t[0]-1)&&1e-10<fr(t[3]-1)?Math.sqrt(fr(t[0]*t[3]-t[2]*t[1])):1}},vr.extend=function(o){function t(t){vr.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var n=this.shape;for(var i in e)!n.hasOwnProperty(i)&&e.hasOwnProperty(i)&&(n[i]=e[i])}o.init&&o.init.call(this,t)}for(var e in w(t,vr),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},w(vr,Ui);function yr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var xr=Ja.CMD,_r=[[],[],[]],wr=Math.sqrt,br=Math.atan2,Sr=function(t,e){for(var n,i,o,a,r=t.data,s=xr.M,l=xr.C,u=xr.L,h=xr.R,c=xr.A,d=xr.Q,p=0,g=0;p<r.length;){switch(n=r[p++],g=p,i=0,n){case s:case u:i=1;break;case l:i=3;break;case d:i=2;break;case c:var f=e[4],m=e[5],v=wr(e[0]*e[0]+e[1]*e[1]),y=wr(e[2]*e[2]+e[3]*e[3]),x=br(-e[1]/y,e[0]/v);r[p]*=v,r[p++]+=f,r[p]*=y,r[p++]+=m,r[p++]*=v,r[p++]*=y,r[p++]+=x,r[p++]+=x,g=p+=2;break;case h:a[0]=r[p++],a[1]=r[p++],bt(a,a,e),r[g++]=a[0],r[g++]=a[1],a[0]+=r[p++],a[1]+=r[p++],bt(a,a,e),r[g++]=a[0],r[g++]=a[1]}for(o=0;o<i;o++){(a=_r[o])[0]=r[p++],a[1]=r[p++],bt(a,a,e),r[g++]=a[0],r[g++]=a[1]}}},Mr=Math.sqrt,Ir=Math.sin,Tr=Math.cos,Ar=Math.PI,Dr=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(yr(t)*yr(e))},Cr=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Dr(t,e))};function Lr(t,e,n,i,o,a,r,s,l,u,h){var c=l*(Ar/180),d=Tr(c)*(t-n)/2+Ir(c)*(e-i)/2,p=-1*Ir(c)*(t-n)/2+Tr(c)*(e-i)/2,g=d*d/(r*r)+p*p/(s*s);1<g&&(r*=Mr(g),s*=Mr(g));var f=(o===a?-1:1)*Mr((r*r*(s*s)-r*r*(p*p)-s*s*(d*d))/(r*r*(p*p)+s*s*(d*d)))||0,m=f*r*p/s,v=f*-s*d/r,y=(t+n)/2+Tr(c)*m-Ir(c)*v,x=(e+i)/2+Ir(c)*m+Tr(c)*v,_=Cr([1,0],[(d-m)/r,(p-v)/s]),w=[(d-m)/r,(p-v)/s],b=[(-1*d-m)/r,(-1*p-v)/s],S=Cr(w,b);Dr(w,b)<=-1&&(S=Ar),1<=Dr(w,b)&&(S=0),0===a&&0<S&&(S-=2*Ar),1===a&&S<0&&(S+=2*Ar),h.addData(u,y,x,r,s,_,S,c,a)}var kr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Nr(t,e){var n=function(t){if(!t)return new Ja;for(var e,n=0,i=0,o=n,a=i,r=new Ja,s=Ja.CMD,l=t.match(kr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),p=c.match(Pr)||[],g=p.length,f=0;f<g;f++)p[f]=parseFloat(p[f]);for(var m=0;m<g;){var v,y,x,_,w,b,S,M=n,I=i;switch(d){case"l":n+=p[m++],i+=p[m++],h=s.L,r.addData(h,n,i);break;case"L":n=p[m++],i=p[m++],h=s.L,r.addData(h,n,i);break;case"m":n+=p[m++],i+=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="l";break;case"M":n=p[m++],i=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="L";break;case"h":n+=p[m++],h=s.L,r.addData(h,n,i);break;case"H":n=p[m++],h=s.L,r.addData(h,n,i);break;case"v":i+=p[m++],h=s.L,r.addData(h,n,i);break;case"V":i=p[m++],h=s.L,r.addData(h,n,i);break;case"C":h=s.C,r.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],i=p[m-1];break;case"c":h=s.C,r.addData(h,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i),n+=p[m-2],i+=p[m-1];break;case"S":v=n,y=i;var T=r.len(),A=r.data;e===s.C&&(v+=n-A[T-4],y+=i-A[T-3]),h=s.C,M=p[m++],I=p[m++],n=p[m++],i=p[m++],r.addData(h,v,y,M,I,n,i);break;case"s":v=n,y=i;T=r.len(),A=r.data;e===s.C&&(v+=n-A[T-4],y+=i-A[T-3]),h=s.C,M=n+p[m++],I=i+p[m++],n+=p[m++],i+=p[m++],r.addData(h,v,y,M,I,n,i);break;case"Q":M=p[m++],I=p[m++],n=p[m++],i=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"q":M=p[m++]+n,I=p[m++]+i,n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"T":v=n,y=i;T=r.len(),A=r.data;e===s.Q&&(v+=n-A[T-4],y+=i-A[T-3]),n=p[m++],i=p[m++],h=s.Q,r.addData(h,v,y,n,i);break;case"t":v=n,y=i;T=r.len(),A=r.data;e===s.Q&&(v+=n-A[T-4],y+=i-A[T-3]),n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,v,y,n,i);break;case"A":x=p[m++],_=p[m++],w=p[m++],b=p[m++],S=p[m++],Lr(M=n,I=i,n=p[m++],i=p[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=p[m++],_=p[m++],w=p[m++],b=p[m++],S=p[m++],Lr(M=n,I=i,n+=p[m++],i+=p[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),n=o,i=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){var e;t.setData?(t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e)):(e=t,n.rebuildPath(e))},e.applyTransform=function(t){Sr(n,t),this.dirty(!0)},e}function Or(t,e){return new vr(Nr(t,e))}var Er=function(t){Ui.call(this,t)};Er.prototype={constructor:Er,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&Di(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),Wi(i,n)?(this.setTransform(t),Li(this,t,i,n,null,e),this.restoreTransform(t)):t.__attrCachedBy=Bn.NONE},getBoundingRect:function(){var t,e,n=this.style;return this.__dirty&&Di(n),this._rect||(null!=n.text?0:0,(t=ui(n.text+"",n.font,n.textAlign,n.textVerticalAlign,n.textPadding,n.textLineHeight,n.rich)).x+=n.x||0,t.y+=n.y||0,Bi(n.textStroke,n.textStrokeWidth)&&(e=n.textStrokeWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect}},w(Er,Ui);function Rr(l){return v.browser.ie&&11<=v.browser.version?function(){var t,e=this.__clipPaths,n=this.style;if(e)for(var i=0;i<e.length;i++){var o=e[i],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(var s=0;s<Br.length;s++)Br[s][2]=n[Br[s][0]],n[Br[s][0]]=Br[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<Br.length;s++)n[Br[s][0]]=Br[s][2]}:l}var zr=vr.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Br=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Vr=vr.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Rr(vr.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+n,h*o+i),t.lineTo(u*a+n,h*a+i),t.arc(n,i,a,r,s,!l),t.lineTo(Math.cos(s)*o+n,Math.sin(s)*o+i),0!==o&&t.arc(n,i,o,s,r,l),t.closePath()}}),Gr=vr.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)}});function Fr(t,e,n,i,o,a,r){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*r+(-3*(e-n)-2*s-l)*a+s*o+e}function Wr(t,e,n){var i=e.points,o=e.smooth;if(i&&2<=i.length){if(o&&"spline"!==o){var a=function(t,e,n,i){var o,a,r,s,l=[],u=[],h=[],c=[];if(i){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)St(r,r,t[d]),Mt(s,s,t[d]);St(r,r,i[0]),Mt(s,s,i[1])}for(d=0,p=t.length;d<p;d++){var g=t[d];if(n)o=t[d?d-1:p-1],a=t[(d+1)%p];else{if(0===d||d===p-1){l.push(lt(t[d]));continue}o=t[d-1],a=t[d+1]}dt(u,a,o),ft(u,u,e);var f=vt(g,o),m=vt(g,a),v=f+m;0!==v&&(f/=v,m/=v),ft(h,u,-f),ft(c,u,m);var y=ht([],g,h),x=ht([],g,c);i&&(Mt(y,y,r),St(y,y,s),Mt(x,x,r),St(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,o,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var r=i.length,s=0;s<(n?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(i=function(t,e){for(var n=t.length,i=[],o=0,a=1;a<n;a++)o+=vt(t[a-1],t[a]);for(var r=(r=o/2)<n?n:r,a=0;a<r;a++){var s,l,u=a/(r-1)*(e?n:n-1),h=Math.floor(u),c=u-h,d=t[h%n],p=e?(s=t[(h-1+n)%n],l=t[(h+1)%n],t[(h+2)%n]):(s=t[0===h?h:h-1],l=t[n-2<h?n-1:h+1],t[n-3<h?n-1:h+2]),g=c*c,f=c*g;i.push([Fr(s[0],d[0],l[0],p[0],c,g,f),Fr(s[1],d[1],l[1],p[1],c,g,f)])}return i}(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}var Hr=vr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Wr(t,e,!0)}}),Zr=vr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Wr(t,e,!1)}}),Ur=Math.round;function Xr(t,e,n){var i,o,a,r,s;e&&(i=e.x1,o=e.x2,a=e.y1,r=e.y2,t.x1=i,t.x2=o,t.y1=a,t.y2=r,(s=n&&n.lineWidth)&&(Ur(2*i)===Ur(2*o)&&(t.x1=t.x2=jr(i,s,!0)),Ur(2*a)===Ur(2*r)&&(t.y1=t.y2=jr(a,s,!0))))}function Yr(t,e,n){var i,o,a,r,s;e&&(i=e.x,o=e.y,a=e.width,r=e.height,t.x=i,t.y=o,t.width=a,t.height=r,(s=n&&n.lineWidth)&&(t.x=jr(i,s,!0),t.y=jr(o,s,!0),t.width=Math.max(jr(i+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(jr(o+r,s,!1)-t.y,0===r?0:1)))}function jr(t,e,n){if(!e)return t;var i=Ur(2*t);return(i+Ur(e))%2==0?i/2:(i+(n?1:-1))/2}var qr={},Kr=vr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,i,o,a;this.subPixelOptimize?(Yr(qr,e,this.style),n=qr.x,i=qr.y,o=qr.width,a=qr.height,qr.r=e.r,e=qr):(n=e.x,i=e.y,o=e.width,a=e.height),e.r?wi(t,e):t.rect(n,i,o,a),t.closePath()}}),$r={},Jr=vr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n,i,o,a=this.subPixelOptimize?(Xr($r,e,this.style),n=$r.x1,i=$r.y1,o=$r.x2,$r.y2):(n=e.x1,i=e.y1,o=e.x2,e.y2),r=e.percent;0!==r&&(t.moveTo(n,i),r<1&&(o=n*(1-r)+o*r,a=i*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Qr=[];function ts(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?wa:_a)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?wa:_a)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Ia:Ma)(t.x1,t.cpx1,t.x2,e),(n?Ia:Ma)(t.y1,t.cpy1,t.y2,e)]}function es(t){this.colorStops=t||[]}var ns=vr.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 n=e.x1,i=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(h<1&&(Aa(n,r,o,h,Qr),r=Qr[1],o=Qr[2],Aa(i,s,a,h,Qr),s=Qr[1],a=Qr[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(Sa(n,r,l,o,h,Qr),r=Qr[1],l=Qr[2],o=Qr[3],Sa(i,s,u,a,h,Qr),s=Qr[1],u=Qr[2],a=Qr[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return ts(this.shape,t,!1)},tangentAt:function(t){var e=ts(this.shape,t,!0);return mt(e,e)}}),is=vr.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+n,u*o+i),t.arc(n,i,o,a,r,!s)}}),os=vr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),vr.prototype.getBoundingRect.call(this)}});es.prototype={constructor:es,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function as(t,e,n,i,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,es.call(this,o)}as.prototype={constructor:as},w(as,es);function rs(t,e,n,i,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=o||!1,es.call(this,i)}function ss(t){Ui.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}rs.prototype={constructor:rs},w(rs,es),ss.prototype.incremental=!0,ss.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},ss.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},ss.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},ss.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},ss.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(var e,t=0;t<this._temporaryDisplayables.length;t++){(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},ss.prototype.brush=function(t,e){for(var n=this._cursor;n<this._displayables.length;n++){(i=this._displayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(t)}this._cursor=n;for(var i,n=0;n<this._temporaryDisplayables.length;n++){(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var ls=[];ss.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Mn(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ls)),t.union(i)}this._rect=t}return this._rect},ss.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(t,e))return!0}return!1},w(ss,Ui);var us=Math.max,hs=Math.min,cs={},ds=1,ps={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},gs="emphasis",fs="normal",ms=1,vs={},ys={};function xs(t){return vr.extend(t)}function _s(t,e){ys[t]=e}function ws(t){if(ys.hasOwnProperty(t))return ys[t]}function bs(t,e,n,i){var o=Or(t,e);return n&&("center"===i&&(n=Ms(n,o.getBoundingRect())),Ts(o,n)),o}function Ss(t,n,i){var o=new Xi({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){var e;"center"===i&&(e={width:t.width,height:t.height},o.setStyle(Ms(n,e)))}});return o}function Ms(t,e){var n=e.width/e.height,i=t.height*n,o=i<=t.width?t.height:(i=t.width)/n;return{x:t.x+t.width/2-i/2,y:t.y+t.height/2-o/2,width:i,height:o}}var Is=function(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var r=new vr(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},r};function Ts(t,e){var n;t.applyTransform&&(n=t.getBoundingRect().calculateTransform(e),t.applyTransform(n))}var As=jr;function Ds(t){return null!=t&&"none"!==t}var Cs=et(),Ls=0;function ks(t){var e,n,i,o,a=t.__hoverStl;a&&!t.__highlighted&&(e=t.__zr,n=t.useHoverLayer&&e&&"canvas"===e.painter.type,t.__highlighted=n?"layer":"plain",t.isGroup||!e&&t.useHoverLayer||(o=(i=t).style,n&&(o=(i=e.addHover(t)).style),Js(o),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var o in e)null!=e[o]&&(n[o]=i[o]);n.fill=i.fill,n.stroke=i.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(i),o.extendFrom(a),Ps(o,a,"fill"),Ps(o,a,"stroke"),$s(o),n||(t.dirty(!1),t.z2+=ds)))}function Ps(t,e,n){!Ds(e[n])&&Ds(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=Cs.get(t);return e||(e=We(t,-.1),Ls<1e4&&(Cs.set(t,e),Ls++)),e}(t[n]))}function Ns(t){var e,n,i,o=t.__highlighted;o&&(t.__highlighted=!1,t.isGroup||("layer"===o?t.__zr&&t.__zr.removeHover(t):(e=t.style,(n=t.__cachedNormalStl)&&(Js(e),t.setStyle(n),$s(e)),null!=(i=t.__cachedNormalZ2)&&t.z2-i===ds&&(t.z2=i))))}function Os(t,e,n){var i,o=fs,a=fs;t.__highlighted&&(o=gs,i=!0),e(t,n),t.__highlighted&&(a=gs,i=!0),t.isGroup&&t.traverse(function(t){t.isGroup||e(t,n)}),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(o,a)}function Es(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Ns(t),ks(t))}function Rs(t){Gs(this,t)||this.__highByOuter||Os(this,ks)}function zs(t){Gs(this,t)||this.__highByOuter||Os(this,Ns)}function Bs(t){this.__highByOuter|=1<<(t||0),Os(this,ks)}function Vs(t){(this.__highByOuter&=~(1<<(t||0)))||Os(this,Ns)}function Gs(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Fs(t,e){Ws(t,!0),Os(t,Es,e)}function Ws(t,e){var n,i=!1===e;t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,i&&!t.__highDownDispatcher||(t[n=i?"off":"on"]("mouseover",Rs)[n]("mouseout",zs),t[n]("emphasis",Bs)[n]("normal",Vs),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i)}function Hs(t){return!(!t||!t.__highDownDispatcher)}function Zs(t){var e=vs[t];return null==e&&ms<=32&&(e=vs[t]=ms++),e}function Us(t,e,n,i,o,a,r){var s,l=(o=o||cs).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=o.labelProp,d=n.getShallow("show"),p=i.getShallow("show");(d||p)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=A(o.defaultText)?o.defaultText(u,o):o.defaultText));var g=d?s:null,f=p?U(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==g&&null==f||(Ys(t,n,a,o),Ys(e,i,r,o,!0)),t.text=g,e.text=f}function Xs(t,e,n){var i=t.style;e&&(Js(i),t.setStyle(e),$s(i)),i=t.__hoverStl,n&&i&&(Js(i),P(i,n),$s(i))}function Ys(t,e,n,i,o){return js(t,e,i,o),n&&P(t,n),t}function js(t,e,n,i){var o,a;(n=n||cs).isRectText&&(n.getTextPosition?o=n.getTextPosition(e,i):"outside"===(o=e.getShallow("position")||(i?null:"inside"))&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset"),null!=(a=e.getShallow("rotate"))&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=U(e.getShallow("distance"),i?null:5));var r,s,l=e.ecModel,u=l&&l.option.textStyle,h=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||cs).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(h)for(var c in r={},h){h.hasOwnProperty(c)&&(s=e.getModel(["rich",c]),qs(r[c]={},s,u,n,i))}return t.rich=r,qs(t,e,u,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function qs(t,e,n,i,o,a){n=!o&&n||cs,t.textFill=Ks(e.getShallow("color"),i)||n.color,t.textStroke=Ks(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=U(e.getShallow("textBorderWidth"),n.textBorderWidth),o||(a&&(t.insideRollbackOpt=i,$s(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.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"),a&&i.disableBox||(t.textBackgroundColor=Ks(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ks(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")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Ks(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function $s(t){var e,n,i,o,a,r,s=t.textPosition,l=t.insideRollbackOpt;l&&null==t.textFill&&(n=l.autoColor,i=l.isRectText,r=!(a=!1!==(o=l.useInsideStyle)&&(!0===o||i&&s&&"string"==typeof s&&0<=s.indexOf("inside")))&&null!=n,(a||r)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),a&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=n,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),r&&(t.textFill=n)),t.insideRollback=e}function Js(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Qs(t,e){var n=e&&e.getModel("textStyle");return K([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function tl(t,e,n,i,o,a){var r,s,l,u;"function"==typeof o&&(a=o,o=null),i&&i.isAnimationEnabled()?(r=t?"Update":"",s=i.getShallow("animationDuration"+r),l=i.getShallow("animationEasing"+r),"function"==typeof(u=i.getShallow("animationDelay"+r))&&(u=u(o,i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),0<s?e.animateTo(n,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())):(e.stopAnimation(),e.attr(n),a&&a())}function el(t,e,n,i,o){tl(!0,t,e,n,i,o)}function nl(t,e,n,i,o){tl(!1,t,e,n,i,o)}function il(t,e){for(var n=ae([]);t&&t!==e;)se(n,t.getLocalTransform(),n),t=t.parent;return n}function ol(t,e,n){return e&&!E(e)&&(e=me.getLocalTransform(e)),n&&(e=ce([],e)),bt([],t,e)}function al(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=ol(a=["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function rl(t,e,i,n){var o,a;function r(t){var e={position:lt(t.position),rotation:t.rotation};return t.shape&&(e.shape=P({},t.shape)),e}t&&e&&(a={},t.traverse(function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)}),o=a,e.traverse(function(t){var e,n;t.isGroup||!t.anid||(e=o[t.anid])&&(n=r(t),t.attr(r(e)),el(t,n,i,t.dataIndex))}))}function sl(t,i){return z(t,function(t){var e=t[0],e=us(e,i.x);e=hs(e,i.x+i.width);var n=t[1],n=us(n,i.y);return[e,hs(n,i.y+i.height)]})}function ll(t,e,n){var i=(e=P({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),O(i,n),new Xi(e)):bs(t.replace("path://",""),e,n,"center")}function ul(t,e,n,i,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(hl(t,e,n,i,s[0],s[1],r[0],r[1]))return!0;r=s}}function hl(t,e,n,i,o,a,r,s){var l,u=n-t,h=i-e,c=r-o,d=s-a,p=c*h-u*d;if((l=p)<=1e-6&&-1e-6<=l)return!1;var g=t-o,f=e-a,m=(g*h-u*f)/p;if(m<0||1<m)return!1;var v=(g*d-c*f)/p;return!(v<0||1<v)}_s("circle",zr),_s("sector",Vr),_s("ring",Gr),_s("polygon",Hr),_s("polyline",Zr),_s("rect",Kr),_s("line",Jr),_s("bezierCurve",ns),_s("arc",is);var cl=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ds,CACHED_LABEL_STYLE_PROPERTIES:ps,extendShape:xs,extendPath:function(t,e){return vr.extend(Nr(t,e))},registerShape:_s,getShapeClass:ws,makePath:bs,makeImage:Ss,mergePath:Is,resizePath:Ts,subPixelOptimizeLine:function(t){return Xr(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Yr(t.shape,t.shape,t.style),t},subPixelOptimize:As,setElementHoverStyle:Es,setHoverStyle:Fs,setAsHighDownDispatcher:Ws,isHighDownDispatcher:Hs,getHighlightDigit:Zs,setLabelStyle:Us,modifyLabelStyle:Xs,setTextStyle:Ys,setText:function(t,e,n){var i,o={isRectText:!0};!1===n?i=!0:o.autoColor=n,js(t,e,o,i)},getFont:Qs,updateProps:el,initProps:nl,getTransform:il,applyTransform:ol,transformDirection:al,groupTransition:rl,clipPointsByRect:sl,clipRectByRect:function(t,e){var n=us(t.x,e.x),i=hs(t.x+t.width,e.x+e.width),o=us(t.y,e.y),a=hs(t.y+t.height,e.y+e.height);if(n<=i&&o<=a)return{x:n,y:o,width:i-n,height:a-o}},createIcon:ll,linePolygonIntersect:ul,lineLineIntersect:hl,Group:In,Image:Xi,Text:Er,Circle:zr,Sector:Vr,Ring:Gr,Polygon:Hr,Polyline:Zr,Rect:Kr,Line:Jr,BezierCurve:ns,Arc:is,IncrementalDisplayable:ss,CompoundPath:os,LinearGradient:as,RadialGradient:rs,BoundingRect:Mn}),dl=["textStyle","color"],pl={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(dl):null)},getFont:function(){return Qs({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ui(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},gl=oa([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),fl={getItemStyle:function(t,e){var n=gl(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},ml=b,vl=Wo();function yl(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function xl(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==typeof t?t[e[i]]:null));i++);return null==t&&n&&(t=n.get(e)),t}function _l(t,e){var n=vl(t).getParent;return n?n.call(t,e):t.parentModel}yl.prototype={constructor:yl,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:xl(this.option,this.parsePath(t),!e&&_l(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],o=!e&&_l(this,t);return null==i&&o&&(i=o.getShallow(t)),i},getModel:function(t,e){var n;return new yl(null==t?this.option:xl(this.option,t=this.parsePath(t)),e=e||(n=_l(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(k(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){vl(this).getParent=t},isAnimationEnabled:function(){if(!v.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Jo(yl),ta(yl),ml(yl,ra),ml(yl,la),ml(yl,pl),ml(yl,fl);var wl=0;function bl(t){return[t||"",wl++,Math.random().toFixed(5)].join("_")}var Sl=1e-4;function Ml(t,e,n,i){var o=e[1]-e[0],a=n[1]-n[0];if(0==o)return 0==a?n[0]:(n[0]+n[1])/2;if(i)if(0<o){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*a+n[0]}function Il(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Tl(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Al(t){return t.sort(function(t,e){return t-e}),t}function Dl(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Cl(t){var e=t.toString(),n=e.indexOf("e");if(0<n){var i=+e.slice(n+1);return i<0?-i:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Ll(t,e){var n=Math.log,i=Math.LN10,o=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function kl(t,e,n){if(!t[e])return 0;var i=S(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),a=z(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,s=z(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=z(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,p=u.length;d<p;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Pl=9007199254740991;function Nl(t){var e=2*Math.PI;return(t%e+e)%e}function Ol(t){return-Sl<t&&t<Sl}var El=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Rl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=El.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function zl(t){return Math.pow(10,Bl(t))}function Bl(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Vl(t,e){var n=Bl(t),i=Math.pow(10,n),o=t/i,a=e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10;return t=a*i,-20<=n?+t.toFixed(n<0?-n:0):t}function Gl(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var o=t[i].interval,a=t[i].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-n),e=o[r],n=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(i,1):i++}return t}function Fl(t){return 0<=t-parseFloat(t)}var Wl=(Object.freeze||Object)({linearMap:Ml,parsePercent:Il,round:Tl,asc:Al,getPrecision:Dl,getPrecisionSafe:Cl,getPixelPrecision:Ll,getPercentWithPrecision:kl,MAX_SAFE_INTEGER:Pl,remRadian:Nl,isRadianAroundZero:Ol,parseDate:Rl,quantity:zl,quantityExponent:Bl,nice:Vl,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),o=+t[i-1],a=n-i;return a?o+a*(t[i]-o):o},reformIntervals:Gl,isNumeric:Fl});function Hl(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Zl(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Ul=j,Xl=/([&<>"'])/g,Yl={"&":"&","<":"<",">":">",'"':""","'":"'"};function jl(t){return null==t?"":(t+"").replace(Xl,function(t,e){return Yl[e]})}function ql(t,e){return"{"+t+(null==e?"":e)+"}"}var Kl=["a","b","c","d","e","f","g"];function $l(t,e,n){C(e)||(e=[e]);var i=e.length;if(!i)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=Kl[a];t=t.replace(ql(r),ql(r,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(ql(Kl[l],s),n?jl(u):u)}return t}function Jl(n,t,i){return R(t,function(t,e){n=n.replace("{"+e+"}",i?jl(t):t)}),n}function Ql(t,e){var n=(t=L(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,e=t.extraCssText,o=t.renderMode||"html",a=t.markerId||"X";return n?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+jl(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+jl(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:n}}:""}function tu(t,e){return"0000".substr(0,e-(t+="").length)+t}function eu(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Rl(e),o=n?"UTC":"",a=i["get"+o+"FullYear"](),r=i["get"+o+"Month"]()+1,s=i["get"+o+"Date"](),l=i["get"+o+"Hours"](),u=i["get"+o+"Minutes"](),h=i["get"+o+"Seconds"](),c=i["get"+o+"Milliseconds"]();return t=t.replace("MM",tu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",tu(s,2)).replace("d",s).replace("hh",tu(l,2)).replace("h",l).replace("mm",tu(u,2)).replace("m",u).replace("ss",tu(h,2)).replace("s",h).replace("SSS",tu(c,3))}function nu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var iu=pi;function ou(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location=t):window.open(t,e)}var au=(Object.freeze||Object)({addCommas:Hl,toCamelCase:Zl,normalizeCssArray:Ul,encodeHTML:jl,formatTpl:$l,formatTplSimple:Jl,getTooltipMarker:Ql,formatTime:eu,capitalFirst:nu,truncateText:iu,getTextBoundingRect:function(t){return ui(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,n,i,o,a,r,s){return ui(t,e,n,i,o,s,a,r)},windowOpen:ou}),ru=R,su=["left","right","top","bottom","width","height"],lu=[["width","left","right"],["height","top","bottom"]];function uu(h,c,d,p,g){var f=0,m=0;null==p&&(p=1/0),null==g&&(g=1/0);var v=0;c.eachChild(function(t,e){var n,i,o,a,r=t.position,s=t.getBoundingRect(),l=c.childAt(e+1),u=l&&l.getBoundingRect();v="horizontal"===h?(n=s.width+(u?-u.x+s.x:0),p<(i=f+n)||t.newline?(f=0,i=n,m+=v+d,s.height):Math.max(v,s.height)):(o=s.height+(u?-u.y+s.y:0),g<(a=m+o)||t.newline?(f+=v+d,m=0,a=o,s.width):Math.max(v,s.width)),t.newline||(r[0]=f,r[1]=m,"horizontal"===h?f=i+d:m=a+d)})}var hu=uu;B(uu,"vertical"),B(uu,"horizontal");function cu(t,e,n){n=Ul(n||0);var i=e.width,o=e.height,a=Il(t.left,i),r=Il(t.top,o),s=Il(t.right,i),l=Il(t.bottom,o),u=Il(t.width,i),h=Il(t.height,o),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=p&&(isNaN(u)&&isNaN(h)&&(i/o<p?u=.8*i:h=.8*o),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(a)&&(a=i-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-n[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var g=new Mn(a+n[3],r+n[0],u,h);return g.margin=n,g}function du(t,e,n,i,o){var a,r,s,l,u,h=!o||!o.hv||o.hv[0],c=!o||!o.hv||o.hv[1],d=o&&o.boundingMode||"all";(h||c)&&("raw"===d?r="group"===t.type?new Mn(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(a=t.getLocalTransform(),(r=r.clone()).applyTransform(a))),e=cu(O({width:r.width,height:r.height},e),n,i),s=t.position,l=h?e.x-r.x:0,u=c?e.y-r.y:0,t.attr("position","raw"===d?[l,u]:[s[0]+l,s[1]+u]))}function pu(l,u,t){V(t)||(t={});var h=t.ignoreSize;C(h)||(h=[h,h]);var e=i(lu[0],0),n=i(lu[1],1);function i(t,e){var n={},i=0,o={},a=0;if(ru(t,function(t){o[t]=l[t]}),ru(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),d(n,t)&&i++,d(o,t)&&a++}),h[e])return d(u,t[1])?o[t[2]]=null:d(u,t[2])&&(o[t[1]]=null),o;if(2!==a&&i){if(2<=i)return n;for(var r=0;r<t.length;r++){var s=t[r];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return o}function c(t,e){return t.hasOwnProperty(e)}function d(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,n){ru(t,function(t){e[t]=n[t]})}o(lu[0],l,e),o(lu[1],l,n)}function gu(t){return fu({},t)}function fu(e,n){return n&&e&&ru(su,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}var mu,vu,yu,xu=Wo(),_u=yl.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){yl.call(this,t,e,n,i),this.uid=bl("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?gu(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),n&&pu(t,i,n)},mergeOption:function(t,e){m(this.option,t,!0);var n=this.layoutMode;n&&pu(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=xu(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var o={},a=e.length-1;0<=a;a--)o=m(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function wu(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}ia(_u,{registerWhenExtend:!0}),vu={},(mu=_u).registerSubTypeDefaulter=function(t,e){t=$o(t),vu[t.main]=e},mu.determineSubType=function(t,e){var n,i=e.type;return i||(n=$o(t).main,mu.hasSubTypes(t)&&vu[n]&&(i=vu[n](e))),i},yu=function(t){var e=[];R(_u.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=z(e,function(t){return $o(t).main}),"dataset"!==t&&M(e,"dataset")<=0&&e.unshift("dataset");return e},_u.topologicalTravel=function(t,e,n,i){if(t.length){var r,s,l,o=(s={},l=[],R(r=e,function(n){var e,i,o=wu(s,n),t=o.originalDeps=yu(n),a=(e=r,i=[],R(t,function(t){0<=M(e,t)&&i.push(t)}),i);o.entryCount=a.length,0===o.entryCount&&l.push(n),R(a,function(t){M(o.predecessor,t)<0&&o.predecessor.push(t);var e=wu(s,t);M(e.successor,t)<0&&e.successor.push(n)})}),{graph:s,noEntryList:l}),a=o.graph,u=o.noEntryList,h={};for(R(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=a[c],p=!!h[c];p&&(n.call(i,c,d.originalDeps.slice()),delete h[c]),R(d.successor,p?f:g)}R(h,function(){throw new Error("Circle dependency may exists")})}function g(t){a[t].entryCount--,0===a[t].entryCount&&u.push(t)}function f(t){h[t]=!0,g(t)}},b(_u,{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 bu="";"undefined"!=typeof navigator&&(bu=navigator.platform||"");var Su={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:bu.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:!1},Mu=Wo();var Iu={clearColorPalette:function(){Mu(this).colorIdx=0,Mu(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=Mu(e=e||this),o=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=No(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(s,n):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),i.colorIdx=(o+1)%l.length,u}}},Tu="original",Au="arrayRows",Du="objectRows",Cu="keyedColumns",Lu="unknown",ku="typedArray",Pu="column",Nu="row";function Ou(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Cu?{}:[]),this.sourceFormat=t.sourceFormat||Lu,this.seriesLayoutBy=t.seriesLayoutBy||Pu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&et(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Ou.seriesDataToSource=function(t){return new Ou({data:t,sourceFormat:F(t)?ku:Tu,fromDataset:!1})},ta(Ou);var Eu={Must:1,Might:2,Not:3},Ru=Wo();function zu(t){var e,n=t.option,i=n.data,o=F(i)?ku:Tu,a=!1,r=n.seriesLayoutBy,s=n.sourceHeader,l=n.dimensions,u=Wu(t);u&&(i=(e=u.option).source,o=Ru(u).sourceFormat,a=!0,r=r||e.seriesLayoutBy,null==s&&(s=e.sourceHeader),l=l||e.dimensions);var h=function(t,e,n,i,o){if(!t)return{dimensionsDefine:Bu(o)};var a,r;{var s;e===Au?("auto"===i||null==i?Vu(function(t){null!=t&&"-"!==t&&(L(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],Vu(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===Nu?t.length:t[0]?t[0].length:null):e===Du?o=o||function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return R(e,function(t,e){i.push(e)}),i}}(t):e===Cu?o||(o=[],R(t,function(t,e){o.push(e)})):e===Tu?(s=Ro(t[0]),a=C(s)&&s.length||1):e===ku&&D&&q(!!o,"dimensions must be given if data is TypedArray.")}return{startIndex:r,dimensionsDefine:Bu(o),dimensionsDetectCount:a}}(i,o,r,s,l);Ru(t).source=new Ou({data:i,fromDataset:a,seriesLayoutBy:r,sourceFormat:o,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:n.encode})}function Bu(t){if(t){var i=et();return z(t,function(t,e){if(null==(t=P({},V(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=i.get(t.name);return n?t.name+="-"+n.count++:i.set(t.name,{count:1}),t})}}function Vu(t,e,n,i){if(null==i&&(i=1/0),e===Nu)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var a=n[0]||[],o=0;o<a.length&&o<i;o++)t(a[o],o)}function Gu(n,t,e){var a={},i=Wu(t);if(!i||!n)return a;var r,o,s=[],l=[],u=t.ecModel,h=Ru(u).datasetMap,c=i.uid+"_"+e.seriesLayoutBy;R(n=n.slice(),function(t,e){V(t)||(n[e]={name:t}),"ordinal"===t.type&&null==r&&(o=g(n[r=e])),a[t.name]=[]});var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function p(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function g(t){var e=t.dimsDef;return e?e.length:1}return R(n,function(t,e){var n,i=t.name,o=g(t);null==r?(n=d.valueWayDim,p(a[i],n,o),p(l,n,o),d.valueWayDim+=o):r===e?(p(a[i],0,o),p(s,0,o)):(n=d.categoryWayDim,p(a[i],n,o),p(l,n,o),d.categoryWayDim+=o)}),s.length&&(a.itemName=s),l.length&&(a.seriesName=l),a}function Fu(t,l,u){var e={};if(!Wu(t))return e;var h,c=l.sourceFormat,d=l.dimensionsDefine;c!==Du&&c!==Cu||R(d,function(t,e){"name"===(V(t)?t.name:t)&&(h=e)});var n,i=function(){for(var t={},e={},n=[],i=0,o=Math.min(5,u);i<o;i++){var a=Hu(l.data,c,l.seriesLayoutBy,d,l.startIndex,i);n.push(a);var r=a===Eu.Not;if(r&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(r||n[t.n]!==Eu.Not)||(t.n=i),s(t)&&n[t.n]!==Eu.Not)return t;r||(a===Eu.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v||(e.n=i))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();return i&&(e.value=i.v,n=null!=h?h:i.n,e.itemName=[n],e.seriesName=[n]),e}function Wu(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Hu(t,e,n,i,o,a){var r,s,l,u;if(F(t))return Eu.Not;if(i&&(V(u=i[a])?(s=u.name,l=u.type):L(u)&&(s=u)),null!=l)return"ordinal"===l?Eu.Must:Eu.Not;if(e===Au)if(n===Nu){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(r=f(h[o+c])))return r}else for(c=0;c<t.length&&c<5;c++){var d=t[o+c];if(d&&null!=(r=f(d[a])))return r}else if(e===Du){if(!s)return Eu.Not;for(c=0;c<t.length&&c<5;c++){if((p=t[c])&&null!=(r=f(p[s])))return r}}else if(e===Cu){if(!s)return Eu.Not;if(!(h=t[s])||F(h))return Eu.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(r=f(h[c])))return r}else if(e===Tu)for(c=0;c<t.length&&c<5;c++){var p,g=Ro(p=t[c]);if(!C(g))return Eu.Not;if(null!=(r=f(g[a])))return r}function f(t){var e=L(t);return null!=t&&isFinite(t)&&""!==t?e?Eu.Might:Eu.Not:e&&"-"!==t?Eu.Must:void 0}return Eu.Not}var Zu="\0_ec_inner",Uu=yl.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new yl(n),this._optionManager=i},setOption:function(t,e){q(!(Zu in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e,n,i,o=!1,a=this._optionManager;return t&&"recreate"!==t||(e=a.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(e)):function(t){this.option={},this.option[Zu]=1,this._componentsMap=et({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(n,t){var i=n.color&&!n.colorLayer;R(t,function(t,e){"colorLayer"===e&&i||_u.hasClass(e)||("object"==typeof t?n[e]=n[e]?m(n[e],t,!1):k(t):null==n[e]&&(n[e]=t))})}(t,this._theme.option),m(t,Su,!1),this.mergeOption(t)}.call(this,e),o=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=a.getTimelineOption(this))&&(this.mergeOption(n),o=!0),t&&"recreate"!==t&&"media"!==t||(i=a.getMediaOption(this,this._api)).length&&R(i,function(t){this.mergeOption(t,o=!0)},this),o},mergeOption:function(i){var l=this.option,u=this._componentsMap,n=[];Ru(this).datasetMap=et(),R(i,function(t,e){null!=t&&(_u.hasClass(e)?e&&n.push(e):l[e]=null==l[e]?k(t):m(l[e],t,!0))}),_u.topologicalTravel(n,_u.getAllClassMainTypes(),function(r,t){var e=No(i[r]),n=zo(u.get(r),e);Bo(n),R(n,function(t,e){var n,i,o,a=t.option;V(a)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(n=r,i=a,o=t.exist,i.type?i.type:o?o.subType:_u.determineSubType(n,i)))});var s=function(e,t){C(t)||(t=t?[t]:[]);var n={};return R(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(u,t);l[r]=[],u.set(r,[]),R(n,function(t,e){var n,i,o=t.exist,a=t.option;q(V(a)||o,"Empty component definition"),a?(n=_u.getClass(r,t.keyInfo.subType,!0),o&&o.constructor===n?(o.name=t.keyInfo.name,o.mergeOption(a,this),o.optionUpdated(a,!1)):(i=P({dependentModels:s,componentIndex:e},t.keyInfo),P(o=new n(a,this,this,i),i),o.init(a,this,this,i),o.optionUpdated(null,!0))):(o.mergeOption({},this),o.optionUpdated({},!1)),u.get(r)[e]=o,l[r][e]=o.option},this),"series"===r&&Xu(this,u.get("series"))},this),this._seriesIndicesMap=et(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=k(this.option);return R(i,function(t,e){if(_u.hasClass(e)){for(var n=(t=No(t)).length-1;0<=n;n--)Go(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Zu],i},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i,o=t.index,a=t.id,r=t.name,s=this._componentsMap.get(e);return s&&s.length?Yu(null!=o?(C(o)||(o=[o]),I(z(o,function(t){return s[t]}),function(t){return!!t})):null!=a?(n=C(a),I(s,function(t){return n&&0<=M(a,t.id)||!n&&t.id===a})):null!=r?(i=C(r),I(s,function(t){return i&&0<=M(r,t.name)||!i&&t.name===r})):s.slice(),t):[]},findComponents:function(t){var e,n,i,o,a,r=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",o=s+"Name",!(e=r)||null==e[n]&&null==e[i]&&null==e[o]?null:{mainType:s,index:e[n],id:e[i],name:e[o]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=Yu(u,t),t.filter?I(a,t.filter):a},eachComponent:function(t,i,o){var e=this._componentsMap;"function"==typeof t?(o=i,i=t,e.each(function(t,n){R(t,function(t,e){i.call(o,n,t,e)})})):L(t)?R(e.get(t),i,o):V(t)&&R(this.findComponents(t),i,o)},getSeriesByName:function(e){return I(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return I(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){ju(this),R(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){R(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){ju(this),R(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,n){return R(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return ju(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){ju(this);var n=I(this._componentsMap.get("series"),t,e);Xu(this,n)},restoreData:function(n){var i=this._componentsMap;Xu(this,i.get("series"));var o=[];i.each(function(t,e){o.push(e)}),_u.topologicalTravel(o,_u.getAllClassMainTypes(),function(e,t){R(i.get(e),function(t){"series"===e&&function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,o=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=o&&t.name!==o}}(t,n)||t.restoreData()})})}});function Xu(t,e){t._seriesIndicesMap=et(t._seriesIndices=z(e,function(t){return t.componentIndex})||[])}function Yu(t,e){return e.hasOwnProperty("subType")?I(t,function(t){return t.subType===e.subType}):t}function ju(t){if(D&&!t._seriesIndices)throw new Error("Option should contains series.")}b(Uu,Iu);var qu=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Ku(e){R(qu,function(t){this[t]=N(e[t],e)},this)}var $u={};function Ju(){this._coordinateSystems=[]}Ju.prototype={constructor:Ju,create:function(i,o){var a=[];R($u,function(t,e){var n=t.create(i,o);a=a.concat(n||[])}),this._coordinateSystems=a},update:function(e,n){R(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Ju.register=function(t,e){$u[t]=e},Ju.get=function(t){return $u[t]};var Qu=R,th=k,eh=z,nh=m,ih=/^(min|max)?(.+)$/;function oh(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}oh.prototype={constructor:oh,setOption:function(t,e){t&&R(No(t.series),function(t){t&&t.data&&F(t.data)&&J(t.data)}),t=th(t);var o,n,i=this._optionBackup,a=function(t,n,i){var e,o,a=[],r=[],s=t.timeline;t.baseOption&&(o=t.baseOption);(s||t.options)&&(o=o||{},a=(t.options||[]).slice());{var l;t.media&&(o=o||{},l=t.media,Qu(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)}))}o=o||t;o.timeline||(o.timeline=s);return Qu([o].concat(a).concat(z(r,function(t){return t.option})),function(e){Qu(n,function(t){t(e,i)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!i);this._newBaseOption=a.baseOption,i?(o=i.baseOption,n=a.baseOption,Qu(n=n||{},function(t,e){var n,i;null!=t&&(n=o[e],_u.hasClass(e)?(t=No(t),i=zo(n=No(n),t),o[e]=eh(i,function(t){return t.option&&t.exist?nh(t.exist,t.option,!0):t.exist||t.option})):o[e]=nh(n,t,!0))}),a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=eh(e.timelineOptions,th),this._mediaList=eh(e.mediaList,th),this._mediaDefault=th(e.mediaDefault),this._currentMediaIndices=[],th(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n,i=this._timelineOptions;return!i.length||(n=t.getComponent("timeline"))&&(e=th(i[n.getCurrentIndex()],!0)),e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!i.length&&!o)return r;for(var s,l,u=0,h=i.length;u<h;u++)!function(t,e,n){var l={width:e,height:n,aspectratio:e/n},u=!0;return R(t,function(t,e){var n,i,o,a,r,s=e.match(ih);s&&s[1]&&s[2]&&(n=s[1],i=s[2].toLowerCase(),o=l[i],a=t,("min"===(r=n)?a<=o:"max"===r?o<=a:o===a)||(u=!1))}),u}(i[u].query,e,n)||a.push(u);return!a.length&&o&&(a=[-1]),a.length&&(s=a,l=this._currentMediaIndices,s.join(",")!==l.join(","))&&(r=eh(a,function(t){return th(-1===t?o.option:i[t].option)})),this._currentMediaIndices=a,r}};var ah=R,rh=V,sh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function lh(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=sh.length;n<i;n++){var o=sh[n],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?m(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?m(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function uh(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,O(t[e],i)):t[e]=i),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o))}function hh(t){uh(t,"itemStyle"),uh(t,"lineStyle"),uh(t,"areaStyle"),uh(t,"label"),uh(t,"labelLine"),uh(t,"upperLabel"),uh(t,"edgeLabel")}function ch(t,e){var n=rh(t)&&t[e],i=rh(n)&&n.textStyle;if(i)for(var o=0,a=Eo.length;o<a;o++){e=Eo[o];i.hasOwnProperty(e)&&(n[e]=i[e])}}function dh(t){t&&(hh(t),ch(t,"label"),t.emphasis&&ch(t.emphasis,"label"))}function ph(t){return C(t)?t:t?[t]:[]}function gh(t){return(C(t)?t[0]:t)||{}}function fh(e,t){ah(ph(e.series),function(t){rh(t)&&function(t){if(rh(t)){lh(t),hh(t),ch(t,"label"),ch(t,"upperLabel"),ch(t,"edgeLabel"),t.emphasis&&(ch(t.emphasis,"label"),ch(t.emphasis,"upperLabel"),ch(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(lh(e),dh(e));var n=t.markLine;n&&(lh(n),dh(n));var i=t.markArea;i&&dh(i);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!F(a))for(var r=0;r<a.length;r++)dh(a[r]);R(t.categories,function(t){hh(t)})}if(o&&!F(o))for(r=0;r<o.length;r++)dh(o[r]);if((e=t.markPoint)&&e.data)for(var s=e.data,r=0;r<s.length;r++)dh(s[r]);if((n=t.markLine)&&n.data)for(var l=n.data,r=0;r<l.length;r++)C(l[r])?(dh(l[r][0]),dh(l[r][1])):dh(l[r]);"gauge"===t.type?(ch(t,"axisLabel"),ch(t,"title"),ch(t,"detail")):"treemap"===t.type?(uh(t.breadcrumb,"itemStyle"),R(t.levels,function(t){hh(t)})):"tree"===t.type&&hh(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),ah(n,function(t){ah(ph(e[t]),function(t){t&&(ch(t,"axisLabel"),ch(t.axisPointer,"label"))})}),ah(ph(e.parallel),function(t){var e=t&&t.parallelAxisDefault;ch(e,"axisLabel"),ch(e&&e.axisPointer,"label")}),ah(ph(e.calendar),function(t){uh(t,"itemStyle"),ch(t,"dayLabel"),ch(t,"monthLabel"),ch(t,"yearLabel")}),ah(ph(e.radar),function(t){ch(t,"name")}),ah(ph(e.geo),function(t){rh(t)&&(dh(t),ah(ph(t.regions),function(t){dh(t)}))}),ah(ph(e.timeline),function(t){dh(t),uh(t,"label"),uh(t,"itemStyle"),uh(t,"controlStyle",!0);var e=t.data;C(e)&&R(e,function(t){V(t)&&(uh(t,"label"),uh(t,"itemStyle"))})}),ah(ph(e.toolbox),function(t){uh(t,"iconStyle"),ah(t.feature,function(t){uh(t,"iconStyle")})}),ch(gh(e.axisPointer),"label"),ch(gh(e.tooltip).axisPointer,"label")}function mh(e){R(vh,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var vh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],yh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],xh=function(n,t){fh(n,t),n.series=No(n.series),R(n.series,function(t){var e,n;V(t)&&("line"===(e=t.type)?null!=t.clipOverflow&&(t.clip=t.clipOverflow):"pie"===e||"gauge"===e?null!=t.clockWise&&(t.clockwise=t.clockWise):"gauge"===e&&null!=(n=function(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}(t,"pointer.color"))&&function(t,e,n,i){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];!i&&null!=a[e[r]]||(a[e[r]]=n)}(t,"itemStyle.color",n),mh(t))}),n.dataRange&&(n.visualMap=n.dataRange),R(yh,function(t){var e=n[t];e&&(C(e)||(e=[e]),R(e,function(t){mh(t)}))})};function _h(m){R(m,function(h,c){var d=[],p=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],g=h.data,f=h.isStackedByIndex,e=g.map(t,function(t,e,n){var i,o,a=g.get(h.stackedDimension,n);if(isNaN(a))return p;f?o=g.getRawIndex(n):i=g.get(h.stackedByDimension,n);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(f||(o=l.data.rawIndexOf(l.stackedByDimension,i)),0<=o){var u=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<u||a<=0&&u<0){a+=u,r=u;break}}}return d[0]=a,d[1]=r,d});g.hostModel.setData(e),h.data=e})}function wh(t,e){Ou.isInstance(t)||(t=Ou.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;if(i===ku){if(D&&null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=n}var o=Sh[i===Au?i+"_"+t.seriesLayoutBy:i];D&&q(o,"Invalide sourceFormat: "+i),P(this,o)}var bh=wh.prototype;bh.pure=!1;var Sh={arrayRows_column:{pure:bh.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Th},arrayRows_row:{pure:!0,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;for(var e=[],n=this._data,i=0;i<n.length;i++){var o=n[i];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Mh,getItem:Ih,appendData:Th},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var o=this._data[n[i].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;R(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:Mh,getItem:Ih,appendData:Th},typedArray:{persistent:!(bh.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){D&&q(F(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 Mh(){return this._data.length}function Ih(t){return this._data[t]}function Th(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Ah={arrayRows:Dh,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Dh,original:function(t,e,n,i){var o=Ro(t);return null!=n&&o instanceof Array?o[n]:o},typedArray:Dh};function Dh(t,e,n,i){return null!=n?t[n]:t}var Ch={arrayRows:Lh,objectRows:function(t,e,n,i){return kh(t[e],this._dimensionInfos[e])},keyedColumns:Lh,original:function(t,e,n,i){var o,a=t&&(null==t.value?t:t.value);return this._rawData.pure||(!Lo(o=t)||o instanceof Array)||(this.hasItemOption=!0),kh(a instanceof Array?a[i]:a,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}};function Lh(t,e,n,i){return kh(t[i],this._dimensionInfos[e])}function kh(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Rl(t)),null==t||""===t?NaN:+t;var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}function Ph(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(o=s.name,a=s.index),Ah[r](i,e,a,o)}}}function Nh(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===Tu||i===Du){var o=t.getRawDataItem(e);return i!==Tu||V(o)||(o=null),o?o[n]:void 0}}}var Oh=/\{@(.+?)\}/g,Eh={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),a=n.getName(t),r=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=n.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=Yo(u&&u.get("renderMode")),c=this.mainType,d="series"===c,p=n.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Ql({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,n,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(i),s=this.getDataParams(i,e);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=n,l(s)):"string"==typeof l?$l(l,s).replace(Oh,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Ph(a,i,e)}):void 0},getRawValue:function(t,e){return Ph(this.getData(e),t)},formatTooltip:function(){}};function Rh(t){return new zh(t)}function zh(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Bh=zh.prototype;Bh.perform=function(t){var e,n,i=this._upstream,o=t&&t.skip;this._dirty&&i&&((e=this.context).data=e.outputData=i.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!o&&(n=this._plan(this.context));var a,r=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return 1<=t||(t=1),t}r===l&&s===u||(n="reset"),!this._dirty&&"reset"!==n||(this._dirty=!1,a=function(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),C(n)&&!n.length&&(n=null));t._progress=n,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),i}(this,o)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(i?(D&&q(null!=i._outputDueEnd),this._dueEnd=i._outputDueEnd):(D&&q(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,p=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!o&&(a||d<p)){var g=this._progress;if(C(g))for(var f=0;f<g.length;f++)jh(this,g[f],d,p,l,u);else jh(this,g,d,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;D&&q(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Vh,Gh,Fh,Wh,Hh,Zh,Uh=Zh={reset:function(t,e,n,i){Gh=t,Vh=e,Fh=n,Wh=i,Hh=Math.ceil(Wh/Fh),Zh.next=1<Fh&&0<Wh?Yh:Xh}};function Xh(){return Gh<Vh?Gh++:null}function Yh(){var t=Gh%Hh*Fh+Math.ceil(Gh/Hh),e=Vh<=Gh?null:t<Wh?t:Gh;return Gh++,e}function jh(t,e,n,i,o,a){Uh.reset(n,i,o,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:Uh.next},t.context)}Bh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Bh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Bh.pipe=function(t){D&&q(t&&!t._disposed&&t!==this),this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},Bh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Bh.getUpstream=function(){return this._upstream},Bh.getDownstream=function(){return this._downstream},Bh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var qh=Wo(),Kh=_u.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Rh({count:Jh,reset:Qh}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),zu(this);var o=this.getInitialData(t,n);ec(o,this),this.dataTask.context.data=o,D&&q(o,"getInitialData returned invalid data."),qh(this).dataBeforeProcessed=o,$h(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?gu(t):{},o=this.subType;_u.hasClass(o),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),Oo(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&pu(t,i,n)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&pu(this.option,t,n),zu(this);var i=this.getInitialData(t,e);ec(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,qh(this).dataBeforeProcessed=i,$h(this)},fillDataTextStyle:function(t){if(t&&!F(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Oo(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=ic(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return qh(this).data},setData:function(t){var e,n=ic(this);n&&((e=n.context).data!==t&&n.modifyOutputEnd&&n.setOutputEnd(t.count()),e.outputData=t,n!==this.dataTask&&(e.data=t)),qh(this).data=t},getSource:function(){return Ru(this).source},getRawData:function(){return qh(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(o,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",p="richText"===c,g={},f=0;function n(t){return{renderMode:c,content:jl(Hl(t)),style:g}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),i=a.length,r=this.getRawValue(o),s=C(r),v=m.getItemVisual(o,"color");V(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1<i||s&&!i?function(t){var l=S(t,function(t,e,n){var i=m.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)},0),u=[];function e(t,e){var n,i,o,a,r,s=m.getDimensionInfo(e);s&&!1!==s.otherDims.tooltip&&(n=s.type,i="sub"+d.seriesIndex+"at"+f,a="string"==typeof(o=Ql({color:v,type:"subItem",renderMode:c,markerId:i}))?o:o.content,(r=(l?a+jl(s.displayName||"-")+": ":"")+jl("ordinal"===n?t+"":"time"===n?h?"":eu("yyyy/MM/dd hh:mm:ss",t):Hl(t)))&&u.push(r),p&&(g[i]=v,++f))}a.length?R(a,function(t){e(Ph(m,o,t),t)}):R(t,e);var n=l?p?"\n":"<br/>":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:g}}(r):n(i?Ph(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+f,y=Ql({color:v,type:"item",renderMode:c,markerId:u});g[u]=v,++f;var x=m.getName(o),_=this.name;Vo(this)||(_=""),_=_?jl(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?jl(x)+": "+l:l),markers:g}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel;return Iu.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function $h(t){var n,e,i,o=t.name;Vo(t)||(t.name=(n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[],R(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")||o))}function Jh(t){return t.model.getRawData().count()}function Qh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),tc}function tc(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ec(e,n){R(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,B(nc,n))})}function nc(t){var e=ic(t);e&&e.setOutputEnd(this.count())}function ic(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i,o=n.currentTask;return!o||(i=o.agentStubMap)&&(o=i.get(t.uid)),o}}b(Kh,Eh),b(Kh,Iu);var oc=function(){this.group=new In,this.uid=bl("viewComponent")};oc.prototype={constructor:oc,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var ac=oc.prototype;ac.updateView=ac.updateLayout=ac.updateVisual=function(t,e,n,i){},Jo(oc),ia(oc,{registerWhenExtend:!0});function rc(){var s=Wo();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,o=e.progressiveRender,a=e.large=n&&n.large,r=e.progressiveRender=n&&n.progressiveRender;return!!(i^a||o^r)&&"reset"}}var sc=Wo(),lc=rc();function uc(){this.group=new In,this.uid=bl("viewChart"),this.renderTask=Rh({plan:pc,reset:gc}),this.renderTask.context={view:this}}var hc=uc.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){dc(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){dc(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function cc(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!Hs(t)))for(var i=0,o=t.childCount();i<o;i++)cc(t.childAt(i),e,n)}function dc(e,t,n){var i=Fo(e,t),o=t&&null!=t.highlightKey?Zs(t.highlightKey):null;null!=i?R(No(i),function(t){cc(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){cc(t,n,o)})}function pc(t){return lc(t.model)}function gc(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&sc(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,n,i,o),fc[l]}hc.updateView=hc.updateLayout=hc.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Jo(uc,["dispose"]),ia(uc,{registerWhenExtend:!0}),uc.markUpdateMethod=function(t,e){sc(t).updateMethod=e};var fc={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},mc="\0__throttleOriginMethod",vc="\0__throttleRate",yc="\0__throttleType";function xc(t,n,i){var o,a,r,s,l,u=0,h=0,c=null;function d(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}n=n||0;function e(){o=(new Date).getTime(),r=this,s=arguments;var t=l||n,e=l||i;l=null,a=o-(e?u:h)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),u=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function _c(t,e,n,i){var o=t[e];if(o){var a=o[mc]||o,r=o[yc];if(o[vc]!==n||r!==i){if(null==n||!i)return t[e]=a;(o=t[e]=xc(a,n,"debounce"===i))[mc]=a,o[yc]=i,o[vc]=n}return o}}function wc(t,e){var n=t[e];n&&n[mc]&&(t[e]=n[mc])}var bc={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),i=e.get(a),o=!A(i)||i instanceof es?null:i;i&&!o||(i=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",i);var r=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(r);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){o&&n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))});return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.get(a,!0),o=n.get(r,!0);null!=i&&t.setItemVisual(e,"color",i),null!=o&&t.setItemVisual(e,"borderColor",o)}:null}}}},Sc={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},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:""}}}},Mc=function(t,e){var c,d,n,p,i,o,g,a=e.getModel("aria");function f(t,e){if("string"!=typeof t)return t;var n=t;return R(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function m(t){var e=a.get(t);if(null!=e)return e;for(var n=t.split("."),i=Sc.aria,o=0;o<n.length;++o)i=i[n[o]];return i}a.get("show")&&(a.get("description")?t.setAttribute("aria-label",a.get("description")):(c=0,e.eachSeries(function(t,e){++c},this),d=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,p=Math.min(c,n),c<1||(o=(i=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}())?f(m("general.withTitle"),{title:i}):m("general.withoutTitle"),g=[],o+=f(m(1<c?"series.multiple.prefix":"series.single.prefix"),{seriesCount:c}),e.eachSeries(function(t,e){if(e<p){var n=t.get("name"),i="series."+(1<c?"multiple":"single")+".",o=m(n?i+"withName":i+"withoutName");o=f(o,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(h=t.subType,Sc.series.typeNames[h]||"自定义图")});var a=t.getData();(window.data=a).count()>d?o+=f(m("data.partialData"),{displayCnt:d}):o+=m("data.allData");for(var r,s,l=[],u=0;u<a.count();u++){u<d&&(r=a.getName(u),s=Ph(a,u),l.push(f(m(r?"data.withName":"data.withoutName"),{name:r,value:s})))}o+=l.join(m("data.separator.middle"))+m("data.separator.end"),g.push(o)}var h}),o+=g.join(m("series.multiple.separator.middle"))+m("series.multiple.separator.end"),t.setAttribute("aria-label",o))))},Ic=Math.PI;function Tc(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=et()}var Ac=Tc.prototype;function Dc(l,t,u,h,c){var d;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}c=c||{},R(t,function(i,t){var e,n,o,a,r,s;c.visualType&&c.visualType!==i.visualType||(n=(e=l._stageTaskMap.get(i.uid)).seriesTaskMap,(o=e.overallTask)?((r=o.agentStubMap).each(function(t){p(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),Cc(o,h),s=l.getPerformArgs(o,c.block),r.each(function(t){t.perform(s)}),d|=o.perform(s)):n&&n.each(function(t,e){p(c,t)&&t.dirty();var n=l.getPerformArgs(t,c.block);n.skip=!i.performRawSeries&&u.isSeriesFiltered(t.context.model),Cc(t,h),d|=t.perform(n)}))}),l.unfinished|=d}Ac.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Ac.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,o=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},Ac.getPipeline=function(t){return this._pipelineMap.get(t)},Ac.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:r,large:a}},Ac.restorePipelines=function(t){var i=this,o=i._pipelineMap=et();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Vc(i,t,t.dataTask)})},Ac.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),o=this.api;R(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=et()),e=o.seriesType,n=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):n&&n(a,r).each(l);function l(t){var e=t.uid,n=s.get(e)||s.set(e,Rh({plan:Oc,reset:Ec,count:Bc}));n.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:i},Vc(i,t,n)}var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,o),t.overallReset&&function(i,t,e,n,o){var a=e.overallTask=e.overallTask||Rh({reset:Lc});a.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:i};var r=a.agentStubMap=a.agentStubMap||et(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,o).each(c):(u=!1,R(n.getSeries(),c));function c(t){var e=t.uid,n=r.get(e);n||(n=r.set(e,Rh({reset:kc,onDirty:Nc})),a.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,Vc(i,t,n)}var d=i._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,i,o)},this)},Ac.prepareView=function(t,e,n,i){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=n,a.api=i,o.__block=!t.incrementalPrepareRender,Vc(this,e,o)},Ac.performDataProcessorTasks=function(t,e){Dc(this,this._dataProcessorHandlers,t,e,{block:!0})},Ac.performVisualTasks=function(t,e,n){Dc(this,this._visualHandlers,t,e,n)},Ac.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Ac.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Cc=Ac.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Lc(t){t.overallReset(t.ecModel,t.api,t.payload)}function kc(t,e){return t.overallProgress&&Pc}function Pc(){this.agent.dirty(),this.getDownstream().dirty()}function Nc(){this.agent&&this.agent.dirty()}function Oc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Ec(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=No(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?z(e,function(t,e){return zc(e)}):Rc}var Rc=zc(0);function zc(a){return function(t,e){var n=e.data,i=e.resetDefines[a];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function Bc(t){return t.data.count()}function Vc(t,e,n){var i=e.uid,o=t._pipelineMap.get(i);o.head||(o.head=n),o.tail&&o.tail.pipe(n),(o.tail=n).__idxInPipeline=o.count++,n.__pipeline=o}Tc.wrapStageHandler=function(t,e){return A(t)&&(t={overallReset:t,seriesType:function(t){Gc=null;try{t(Fc,Wc)}catch(t){}return Gc}(t)}),t.uid=bl("stageHandler"),e&&(t.visualType=e),t};var Gc,Fc={},Wc={};function Hc(t,e){for(var n in e.prototype)t[n]=it}Hc(Fc,Uu),Hc(Wc,Ku),Fc.eachSeriesByType=Fc.eachRawSeriesByType=function(t){Gc=t},Fc.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Gc=t.subType)};function Zc(){return{axisLine:{lineStyle:{color:Yc}},axisTick:{lineStyle:{color:Yc}},axisLabel:{textStyle:{color:Yc}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Yc}}}}var Uc=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Xc={color:Uc,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Uc]},Yc="#eee",jc=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],qc={color:jc,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Yc},crossStyle:{color:Yc},label:{color:"#000"}}},legend:{textStyle:{color:Yc}},textStyle:{color:Yc},title:{textStyle:{color:Yc}},toolbox:{iconStyle:{normal:{borderColor:Yc}}},dataZoom:{textStyle:{color:Yc}},visualMap:{textStyle:{color:Yc}},timeline:{lineStyle:{color:Yc},itemStyle:{normal:{color:jc[1]}},label:{normal:{textStyle:{color:Yc}}},controlStyle:{normal:{color:Yc,borderColor:Yc}}},timeAxis:Zc(),logAxis:Zc(),valueAxis:Zc(),categoryAxis:Zc(),line:{symbol:"circle"},graph:{color:jc},gauge:{title:{textStyle:{color:Yc}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};qc.categoryAxis.splitLine.show=!1,_u.extend({type:"dataset",defaultOption:{seriesLayoutBy:Pu,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,n=Lu;if(F(e))n=ku;else if(C(e)){0===e.length&&(n=Au);for(var i=0,o=e.length;i<o;i++){var a=e[i];if(null!=a){if(C(a)){n=Au;break}if(V(a)){n=Du;break}}}}else if(V(e)){for(var r in e)if(e.hasOwnProperty(r)&&E(e[r])){n=Cu;break}}else if(null!=e)throw new Error("Invalid data");Ru(t).sourceFormat=n}(this)}}),oc.extend({type:"dataset"});var Kc=vr.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-s,n-r,i-a,n,i-a),t.bezierCurveTo(n+r,i-a,n+o,i-s,n+o,i),t.bezierCurveTo(n+o,i+s,n+r,i+a,n,i+a),t.bezierCurveTo(n-r,i+a,n-o,i+s,n-o,i),t.closePath()}}),$c=/[\s,]+/;function Jc(t){for(L(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Qc(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Qc.prototype.parse=function(t,e){e=e||{};var n=Jc(t);if(!n)throw new Error("Illegal svg");var i=new In;this._root=i;var o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),r=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),ad(n,i,null,!0);for(var s,l,u,h,c=n.firstChild;c;)this._parseNode(c,i),c=c.nextSibling;return!o||4<=(l=K(o).split($c)).length&&(s={x:parseFloat(l[0]||0),y:parseFloat(l[1]||0),width:parseFloat(l[2]),height:parseFloat(l[3])}),s&&null!=a&&null!=r&&(h=hd(s,a,r),e.ignoreViewBox||(u=i,(i=new In).add(u),u.scale=h.scale.slice(),u.position=h.position.slice())),e.ignoreRootClip||null==a||null==r||i.setClipPath(new Kr({shape:{x:0,y:0,width:a,height:r}})),{root:i,width:a,height:r,viewBoxRect:s,viewBoxTransform:h}},Qc.prototype._parseNode=function(t,e){var n,i,o,a,r=t.nodeName.toLowerCase();"defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine?(a=ed[r])&&(i=a.call(this,t),(o=t.getAttribute("id"))&&(this._defs[o]=i)):(a=td[r])&&(n=a.call(this,t,e),e.add(n));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},Qc.prototype._parseText=function(t,e){var n,i;1===t.nodeType&&(n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0,this._textX+=parseFloat(n),this._textY+=parseFloat(i));var o=new Er({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});nd(e,o),ad(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var td={g:function(t,e){var n=new In;return nd(e,n),ad(t,n,this._defs),n},rect:function(t,e){var n=new Kr;return nd(e,n),ad(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new zr;return nd(e,n),ad(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new Jr;return nd(e,n),ad(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new Kc;return nd(e,n),ad(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=(n=t.getAttribute("points"))&&id(n),i=new Hr({shape:{points:n||[]}});return nd(e,i),ad(t,i,this._defs),i},polyline:function(t,e){var n=new vr;nd(e,n),ad(t,n,this._defs);var i=(i=t.getAttribute("points"))&&id(i);return new Zr({shape:{points:i||[]}})},image:function(t,e){var n=new Xi;return nd(e,n),ad(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(a);var r=new In;return nd(e,r),ad(t,r,this._defs),r},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new In;return nd(e,r),ad(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var n=Or(t.getAttribute("d")||"");return nd(e,n),ad(t,n,this._defs),n}},ed={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new as(e,n,i,o);return function(t,e){var n=t.firstChild;for(;n;){var i,o;1===n.nodeType&&(i=0<(i=n.getAttribute("offset")).indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0,o=n.getAttribute("stop-color")||"#000000",e.addColorStop(i,o)),n=n.nextSibling}}(t,a),a},radialgradient:function(t){}};function nd(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),O(e.__inheritedStyle,t.__inheritedStyle))}function id(t){for(var e=K(t).split($c),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([o,a])}return n}var od={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function ad(t,e,n,i){var o,a=e.__inheritedStyle||{},r="text"===e.type;if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,o=[];n.replace(ld,function(t,e,n){o.push(e,n)});for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(i=i||oe(),s){case"translate":r=K(r).split($c),le(i,i,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=K(r).split($c),he(i,i,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=K(r).split($c),ue(i,i,parseFloat(r[0]));break;case"skew":r=K(r).split($c),console.warn("Skew transform is not supported yet");break;case"matrix":r=K(r).split($c);i[0]=parseFloat(r[0]),i[1]=parseFloat(r[1]),i[2]=parseFloat(r[2]),i[3]=parseFloat(r[3]),i[4]=parseFloat(r[4]),i[5]=parseFloat(r[5])}}e.setLocalTransform(i)}}(t,e),P(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,o={};ud.lastIndex=0;for(;null!=(i=ud.exec(e));)o[i[1]]=i[2];for(var a in od)od.hasOwnProperty(a)&&null!=o[a]&&(n[od[a]]=o[a]);return n}(t)),!i))for(var s in od){!od.hasOwnProperty(s)||null!=(o=t.getAttribute(s))&&(a[od[s]]=o)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";e.style=e.style||new Fn;var h=e.style;null!=a.fill&&h.set(l,sd(a.fill,n)),null!=a.stroke&&h.set(u,sd(a.stroke,n)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&r?"textStrokeWidth":t;null!=a[t]&&h.set(e,parseFloat(a[t]))}),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&h.set(t,a[t])}),a.lineDash&&(e.style.lineDash=K(a.lineDash).split($c)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=a}var rd=/url\(\s*#(.*?)\)/;function sd(t,e){var n=e&&t&&t.match(rd);return n?e[K(n[1])]:t}var ld=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var ud=/([^\s:;]+)\s*:\s*([^:;]+)/g;function hd(t,e,n){var i=e/t.width,o=n/t.height,a=Math.min(i,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2]}}var cd=et(),dd={registerMap:function(t,e,n){var i=C(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:n}]);return R(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=pd[e];D&&q(n,"Illegal map type: "+e),n(t)}),cd.set(t,i)},retrieveMap:function(t){return cd.get(t)}},pd={geoJSON:function(t){var e=t.source;t.geoJSON=L(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Jc(t.source)}},gd=q,fd=R,md=A,vd=V,yd=_u.parseClassType,xd={zrender:"4.3.1"},_d={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},wd="__flagInMainProcess",bd="__optionUpdated",Sd=/^[a-zA-Z0-9_]+$/;function Md(i,o){return function(t,e,n){o||!this._disposed?(t=t&&t.toLowerCase(),Ct.prototype[i].call(this,t,e,n)):Wd(this.id)}}function Id(){Ct.call(this)}function Td(t,e,n){n=n||{},"string"==typeof e&&(e=$d[e]),this.id,this.group,this._dom=t;var i="canvas";D&&(i=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||i);var o=this._zr=Io(t,{renderer:n.renderer||i,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=xc(N(o.flush,o),17),(e=k(e))&&xh(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Ju;var a,r,s,l,u=this._api=(r=(a=this)._coordSysMgr,P(new Ku(a),{getCoordinateSystems:N(r.getCoordinateSystems,r),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));function h(t,e){return t.__prio-e.__prio}Nn(Kd,h),Nn(Yd,h),this._scheduler=new Tc(this,u,Yd,Kd),Ct.call(this,this._ecEventProcessor=new Zd),this._messageCenter=new Id,this._initEvents(),this.resize=N(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),l=this,(s=o).on("rendered",function(){l.trigger("rendered"),!s.animation.isFinished()||l[bd]||l._scheduler.unfinished||l._pendingActions.length||l.trigger("finished")}),J(this)}Id.prototype.on=Md("on",!0),Id.prototype.off=Md("off",!0),Id.prototype.one=Md("one",!0),b(Id,Ct);var Ad=Td.prototype;function Dd(t,e,n){if(this._disposed)Wd(this.id);else{var i,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Zo(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(i=s[t](o,e,n)))return i}D&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}}Ad._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[bd]){var e=this[bd].silent;this[wd]=!0,Ld(this),Cd.update.call(this),this[wd]=!1,this[bd]=!1,Od.call(this,e),Ed.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Pd(this,i),t.performVisualTasks(i),Vd(this,this._model,0,"remain"),n-=new Date-a}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},Ad.getDom=function(){return this._dom},Ad.getZr=function(){return this._zr},Ad.setOption=function(t,e,n){var i,o,a,r;D&&gd(!this[wd],"`setOption` should not be called during main process."),this._disposed?Wd(this.id):(vd(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[wd]=!0,this._model&&!e||(o=new oh(this._api),a=this._theme,(r=this._model=new Uu).scheduler=this._scheduler,r.init(null,null,a,o)),this._model.setOption(t,jd),n?(this[bd]={silent:i},this[wd]=!1):(Ld(this),Cd.update.call(this),this._zr.flush(),this[bd]=!1,this[wd]=!1,Od.call(this,i),Ed.call(this,i)))},Ad.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Ad.getModel=function(){return this._model},Ad.getOption=function(){return this._model&&this._model.getOption()},Ad.getWidth=function(){return this._zr.getWidth()},Ad.getHeight=function(){return this._zr.getHeight()},Ad.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Ad.getRenderedCanvas=function(t){if(v.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},Ad.getSvgDataURL=function(){if(v.svgSupported){var t=this._zr;return R(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},Ad.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;fd(e,function(t){n.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return fd(i,function(t){t.group.ignore=!1}),a}Wd(this.id)},Ad.getConnectedDataURL=function(o){if(this._disposed)Wd(this.id);else if(v.canvasSupported){var a="svg"===o.type,r=this.group,s=Math.min,l=Math.max;if(tp[r]){var u=1/0,h=1/0,c=-1/0,d=-1/0,p=[],n=o&&o.pixelRatio||1;R(Qd,function(t,e){var n,i;t.group===r&&(n=a?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(k(o)),i=t.getDom().getBoundingClientRect(),u=s(i.left,u),h=s(i.top,h),c=l(i.right,c),d=l(i.bottom,d),p.push({dom:n,left:i.left,top:i.top}))});var t=(c*=n)-(u*=n),e=(d*=n)-(h*=n),i=y(),g=Io(i,{renderer:a?"svg":"canvas"});if(g.resize({width:t,height:e}),a){var f="";return fd(p,function(t){var e=t.left-u,n=t.top-h;f+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=f,o.connectedBackgroundColor&&g.painter.setBackgroundColor(o.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return o.connectedBackgroundColor&&g.add(new Kr({shape:{x:0,y:0,width:t,height:e},style:{fill:o.connectedBackgroundColor}})),fd(p,function(t){var e=new Xi({style:{x:t.left*n-u,y:t.top*n-h,image:t.dom}});g.add(e)}),g.refreshImmediately(),i.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},Ad.convertToPixel=B(Dd,"convertToPixel"),Ad.convertFromPixel=B(Dd,"convertFromPixel"),Ad.containPixel=function(t,o){var a;if(!this._disposed)return R(t=Zo(this._model,t),function(t,i){0<=i.indexOf("Models")&&R(t,function(t){var e,n=t.coordinateSystem;n&&n.containPoint?a|=!!n.containPoint(o):"seriesModels"===i?(e=this._chartsMap[t.__viewId])&&e.containPoint?a|=e.containPoint(o,t):D&&console.warn(i+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):D&&console.warn(i+": containPoint is not supported")},this)},this),!!a;Wd(this.id)},Ad.getVisual=function(t,e){var n=(t=Zo(this._model,t,{defaultMainType:"series"})).seriesModel;D&&(n||console.warn("There is no specified seires model"));var i=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=o?i.getItemVisual(o,e):i.getVisual(e)},Ad.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Ad.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Cd={prepareAndUpdate:function(t){Ld(this),Cd.update.call(this,t)},update:function(t){var e,n,i=this._model,o=this._api,a=this._zr,r=this._coordSysMgr,s=this._scheduler;i&&(s.restoreData(i,t),s.performSeriesTasks(i),r.create(i,o),s.performDataProcessorTasks(i,t),Pd(this,i),r.update(i,o),zd(i),s.performVisualTasks(i,t),Bd(this,i,o,t),n=i.get("backgroundColor")||"transparent",v.canvasSupported?a.setBackgroundColor(n):(n=je(e=Ge(n),"rgb"),0===e[3]&&(n="transparent")),Gd(i,o))},updateTransform:function(o){var a,i,r=this._model,s=this,l=this._api;r&&(a=[],r.eachComponent(function(t,e){var n,i=s.getViewOfComponentModel(e);i&&i.__alive&&(!i.updateTransform||(n=i.updateTransform(e,r,l,o))&&n.update)&&a.push(i)}),i=et(),r.eachSeries(function(t){var e,n=s._chartsMap[t.__viewId];(!n.updateTransform||(e=n.updateTransform(t,r,l,o))&&e.update)&&i.set(t.uid,1)}),zd(r),this._scheduler.performVisualTasks(r,o,{setDirty:!0,dirtyMap:i}),Vd(s,r,0,o,i),Gd(r,this._api))},updateView:function(t){var e=this._model;e&&(uc.markUpdateMethod(t,"updateView"),zd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Bd(this,this._model,this._api,t),Gd(e,this._api))},updateVisual:function(t){Cd.update.call(this,t)},updateLayout:function(t){Cd.update.call(this,t)}};function Ld(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Rd(t,"component",e,n),Rd(t,"chart",e,n),n.plan()}function kd(e,n,i,o,t){var a,r,s,l=e._model;function u(t){t&&t.__alive&&t[n]&&t[n](t.__model,l,e._api,i)}o?((a={})[o+"Id"]=i[o+"Id"],a[o+"Index"]=i[o+"Index"],a[o+"Name"]=i[o+"Name"],r={mainType:o,query:a},t&&(r.subType=t),null!=(s=i.excludeSeriesId)&&(s=et(No(s))),l&&l.eachComponent(r,function(t){s&&null!=s.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)):fd(e._componentsViews.concat(e._chartsViews),u)}function Pd(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Nd(e,t){var n=e.type,i=e.escapeConnect,o=Ud[n],a=o.actionInfo,r=(s=(a.update||"update").split(":")).pop(),s=null!=s[0]&&yd(s[0]);this[wd]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=z(e.batch,function(t){return(t=O(P({},t),e)).batch=null,t}));var h,c=[],d="highlight"===n||"downplay"===n;fd(l,function(t){(h=(h=o.action(t,this._model,this._api))||P({},t)).type=a.event||h.type,c.push(h),d?kd(this,r,t,"series"):s&&kd(this,r,t,s.main,s.sub)},this),"none"===r||d||s||(this[bd]?(Ld(this),Cd.update.call(this,e),this[bd]=!1):Cd[r].call(this,e)),h=u?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[wd]=!1,t||this._messageCenter.trigger(h.type,h)}function Od(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Nd.call(this,n,t)}}function Ed(t){t||this.trigger("updated")}function Rd(t,e,a,r){for(var s="component"===e,l=s?t._componentsViews:t._chartsViews,u=s?t._componentsMap:t._chartsMap,h=t._zr,c=t._api,n=0;n<l.length;n++)l[n].__alive=!1;function i(t){var e,n,i="_ec_"+t.id+"_"+t.type,o=u[i];o||(e=yd(t.type),n=s?oc.getClass(e.main,e.sub):uc.getClass(e.sub),D&&gd(n,e.sub+" does not exist."),(o=new n).init(a,c),u[i]=o,l.push(o),h.add(o.group)),t.__viewId=o.__id=i,o.__alive=!0,o.__model=t,o.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},s||r.prepareView(o,t,a,c)}s?a.eachComponent(function(t,e){"series"!==t&&i(e)}):a.eachSeries(i);for(n=0;n<l.length;){var o=l[n];o.__alive?n++:(s||o.renderTask.dispose(),h.remove(o.group),o.dispose(a,c),l.splice(n,1),delete u[o.__id],o.__id=o.group.__ecComponentInfo=null)}}function zd(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Bd(t,e,n,i){var o,a,r,s,l;o=t,a=e,r=n,s=i,fd(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),Hd(e,t)}),fd(t._chartsViews,function(t){t.__alive=!1}),Vd(t,e,0,i),fd(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Vd(i,t,e,o,a){var r,n,s,l,u,h=i._scheduler;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=!0;var n=e.renderTask;h.updatePayload(n,o),a&&a.get(t.uid)&&n.dirty(),r|=n.perform(h.getPerformArgs(n)),e.group.silent=!!t.get("silent"),Hd(t,e),function(t,e){var n=t.get("blendMode")||null;D&&!v.canvasSupported&&n&&"source-over"!==n&&console.warn("Only canvas support blendMode");e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}(t,e)}),h.unfinished|=r,s=t,l=(n=i)._zr.storage,u=0,l.traverse(function(t){u++}),u>s.get("hoverLayerThreshold")&&!v.node&&s.eachSeries(function(t){var e;t.preventUsingHoverLayer||(e=n._chartsMap[t.__viewId]).__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}),Mc(i._zr.dom,t)}function Gd(e,n){fd(qd,function(t){t(e,n)})}Ad.resize=function(t){var e,n,i;D&&gd(!this[wd],"`resize` should not be called during main process."),this._disposed?Wd(this.id):(this._zr.resize(t),e=this._model,this._loadingFX&&this._loadingFX.resize(),e&&(n=e.resetOption("media"),i=t&&t.silent,this[wd]=!0,n&&Ld(this),Cd.update.call(this),this[wd]=!1,Od.call(this,i),Ed.call(this,i)))},Ad.showLoading=function(t,e){var n,i;this._disposed?Wd(this.id):(vd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Jd[t]?(n=Jd[t](this._api,e),i=this._zr,this._loadingFX=n,i.add(n)):D&&console.warn("Loading effects "+t+" not exists."))},Ad.hideLoading=function(){this._disposed?Wd(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},Ad.makeActionFromEvent=function(t){var e=P({},t);return e.type=Xd[t.type],e},Ad.dispatchAction=function(t,e){this._disposed?Wd(this.id):(vd(e)||(e={silent:!!e}),Ud[t.type]&&this._model&&(this[wd]?this._pendingActions.push(t):(Nd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Od.call(this,e.silent),Ed.call(this,e.silent))))},Ad.appendData=function(t){var e,n;this._disposed?Wd(this.id):(e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e),D&&gd(t.data&&n),n.appendData(t),this._scheduler.unfinished=!0)},Ad.on=Md("on",!1),Ad.off=Md("off",!1),Ad.one=Md("one",!1);var Fd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Wd(t){D&&console.warn("Instance "+t+" has been disposed")}function Hd(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Zd(){this.eventInfo}Ad._initEvents=function(){fd(Fd,function(h){function t(t){var e,n,i,o,a,r,s=this.getModel(),l=t.target,u="globalout"===h;u?n={}:l&&null!=l.dataIndex?n=(e=l.dataModel||s.getSeriesByIndex(l.seriesIndex))&&e.getDataParams(l.dataIndex,l.dataType,l)||{}:l&&l.eventData&&(n=P({},l.eventData)),n&&(i=n.componentType,o=n.componentIndex,"markLine"!==i&&"markPoint"!==i&&"markArea"!==i||(i="series",o=n.seriesIndex),r=(a=i&&null!=o&&s.getComponent(i,o))&&this["series"===a.mainType?"_chartsMap":"_componentsMap"][a.__viewId],D&&(u||a&&r||console.warn("model or view can not be found by params")),n.event=t,n.type=h,this._ecEventProcessor.eventInfo={targetEl:l,packedEvent:n,model:a,view:r},this.trigger(h,n))}t.zrEventfulCallAtLast=!0,this._zr.on(h,t,this)},this),fd(Xd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Ad.isDisposed=function(){return this._disposed},Ad.clear=function(){this._disposed?Wd(this.id):this.setOption({series:[]},!0)},Ad.dispose=function(){var e,n;this._disposed?Wd(this.id):(this._disposed=!0,Xo(this.getDom(),ip,""),e=this._api,n=this._model,fd(this._componentsViews,function(t){t.dispose(n,e)}),fd(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Qd[this.id])},b(Td,Ct),Zd.prototype={constructor:Zd,normalizeQuery:function(t){var e,s,l,u={},h={},c={};return L(t)?(e=yd(t),u.mainType=e.main||null,u.subType=e.sub||null):(s=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1},R(t,function(t,e){for(var n=!1,i=0;i<s.length;i++){var o,a=s[i],r=e.lastIndexOf(a);0<r&&r===e.length-a.length&&("data"!==(o=e.slice(0,r))&&(u.mainType=o,u[a.toLowerCase()]=t,n=!0))}l.hasOwnProperty(e)&&(h[e]=t,n=!0),n||(c[e]=t)})),{cptQuery:u,dataQuery:h,otherQuery:c}},filter:function(t,e,n){var i=this.eventInfo;if(!i)return!0;var o=i.targetEl,a=i.packedEvent,r=i.model,s=i.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,r,"mainType")&&h(l,r,"subType")&&h(l,r,"index","componentIndex")&&h(l,r,"name")&&h(l,r,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a));function h(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var Ud={},Xd={},Yd=[],jd=[],qd=[],Kd=[],$d={},Jd={},Qd={},tp={},ep=+new Date,np=+new Date,ip="_echarts_instance_";function op(t){tp[t]=!1}var ap=op;function rp(t){return Qd[n=ip,(e=t).getAttribute?e.getAttribute(n):e[n]];var e,n}function sp(t,e){$d[t]=e}function lp(t){jd.push(t)}function up(t,e){gp(Yd,t,e,1e3)}function hp(t,e,n){"function"==typeof e&&(n=e,e="");var i=vd(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,gd(Sd.test(i)&&Sd.test(e)),Ud[i]||(Ud[i]={action:n,actionInfo:t}),Xd[e]=i}function cp(t,e){Ju.register(t,e)}function dp(t,e){gp(Kd,t,e,1e3,"layout")}function pp(t,e){gp(Kd,t,e,3e3,"visual")}function gp(t,e,n,i,o){if((md(e)||vd(e))&&(n=e,e=i),D){if(isNaN(e)||null==e)throw new Error("Illegal priority");fd(t,function(t){gd(t.__raw!==n)})}var a=Tc.wrapStageHandler(n,o);return a.__prio=e,a.__raw=n,t.push(a),a}function fp(t,e){Jd[t]=e}function mp(t){return _u.extend(t)}function vp(t){return oc.extend(t)}function yp(t){return Kh.extend(t)}function xp(t){return uc.extend(t)}pp(2e3,bc),lp(xh),up(900,function(t){var a=et();t.eachSeries(function(t){var e=t.get("stack");if(e){var n=a.get(e)||a.set(e,[]),i=t.getData(),o={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(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&i.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),a.each(_h)}),fp("default",function(o,a){O(a=a||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new In,r=new Kr({style:{fill:a.maskColor},zlevel:a.zlevel,z:1e4});t.add(r);var s,l=a.fontSize+" sans-serif",u=new Kr({style:{fill:"none",text:a.text,font:l,textPosition:"right",textDistance:10,textFill:a.textColor},zlevel:a.zlevel,z:10001});return t.add(u),a.showSpinner&&((s=new is({shape:{startAngle:-Ic/2,endAngle:-Ic/2+.1,r:a.spinnerRadius},style:{stroke:a.color,lineCap:"round",lineWidth:a.lineWidth},zlevel:a.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Ic/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:3*Ic/2}).delay(300).start("circularInOut"),t.add(s)),t.resize=function(){var t=li(a.text,l),e=a.showSpinner?a.spinnerRadius:0,n=(o.getWidth()-2*e-(a.showSpinner&&t?10:0)-t)/2-(a.showSpinner?0:t/2),i=o.getHeight()/2;a.showSpinner&&s.setShape({cx:n,cy:i}),u.setShape({x:n-e,y:i-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:o.getWidth(),height:o.getHeight()})},t.resize(),t}),hp({type:"highlight",event:"highlight",update:"highlight"},it),hp({type:"downplay",event:"downplay",update:"downplay"},it),sp("light",Xc),sp("dark",qc);function _p(t){return t}function wp(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||_p,this._newKeyGetter=i||_p,this.context=o}function bp(t,e,n,i,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[i](t[a],a),s=e[r];null==s?(n.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}wp.prototype={constructor:wp,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],o=[];for(bp(t,{},i,"_oldKeyGetter",this),bp(e,n,o,"_newKeyGetter",this),a=0;a<t.length;a++){null!=(r=n[s=i[a]])?((u=r.length)?(1===u&&(n[s]=null),r=r.shift()):n[s]=null,this._update&&this._update(r,a)):this._remove&&this._remove(a)}for(var a=0;a<o.length;a++){var r,s=o[a];if(n.hasOwnProperty(s)){if(null==(r=n[s]))continue;if(r.length)for(var l=0,u=r.length;l<u;l++)this._add&&this._add(r[l]);else this._add&&this._add(r)}}}};var Sp=et(["tooltip","label","itemName","itemId","seriesName"]);function Mp(a){var t={},r=t.encode={},s=et(),l=[],u=[],h=t.userOutput={dimensionNames:a.dimensions.slice(),encode:{}};R(a.dimensions,function(t){var e,n,o=a.getDimensionInfo(t),i=o.coordDim;i&&(D&&q(null==Sp.get(i)),e=o.coordDimIndex,Ip(r,i)[e]=t,o.isExtraCoord||(s.set(i,1),"ordinal"!==(n=o.type)&&"time"!==n&&(l[0]=t),Ip(h.encode,i)[e]=o.index),o.defaultTooltip&&u.push(t)),Sp.each(function(t,e){var n=Ip(r,e),i=o.otherDims[e];null!=i&&!1!==i&&(n[i]=o.name)})});var i=[],o={};s.each(function(t,e){var n=r[e];o[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=o;var e=r.label;e&&e.length&&(l=e.slice());var n=r.tooltip;return n&&n.length?u=n.slice():u.length||(u=l.slice()),r.defaultedLabel=l,r.defaultedTooltip=u,t}function Ip(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Tp(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Ap(t){null!=t&&P(this,t),this.otherDims={}}var Dp=V,Cp="undefined",Lp={float:typeof Float64Array==Cp?Array:Float64Array,int:typeof Int32Array==Cp?Array:Int32Array,ordinal:Array,number:Array,time:Array},kp=typeof Uint32Array==Cp?Array:Uint32Array,Pp=typeof Int32Array==Cp?Array:Int32Array,Np=typeof Uint16Array==Cp?Array:Uint16Array;function Op(t){return 65535<t._rawCount?kp:Np}var Ep=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Rp=["_extent","_approximateExtent","_rawExtent"];function zp(e,n){R(Ep.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,R(Rp,function(t){e[t]=k(n[t])}),e._calculationInfo=P(n._calculationInfo)}var Bp=function(t,e){t=t||["x","y"];for(var n={},i=[],o={},a=0;a<t.length;a++){var r=t[a];L(r)?r=new Ap({name:r}):r instanceof Ap||(r=new Ap(r));var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},i.push(s),(n[s]=r).index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=i,this._dimensionInfos=n,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=Mp(this),this._invertedIndicesMap=o,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Vp=Bp.prototype;function Gp(t,e,n,i,o){var a=Lp[e.type],r=i-1,s=e.name,l=t[s][r];if(l&&l.length<n){for(var u=new a(Math.min(o-r*n,n)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=i*n;c<o;c+=n)t[s].push(new a(Math.min(o-c,n)))}function Fp(o){var a=o._invertedIndicesMap;R(a,function(t,e){var n=o._dimensionInfos[e].ordinalMeta;if(n){t=a[e]=new Pp(n.categories.length);for(var i=0;i<t.length;i++)t[i]=-1;for(i=0;i<o._count;i++)t[o.get(e,i)]=i}})}function Wp(t,e,n){var i,o,a,r,s,l,u;return null!=e&&(o=t._chunkSize,a=Math.floor(n/o),r=n%o,s=t.dimensions[e],(l=t._storage[s][a])&&(i=l[r],(u=t._dimensionInfos[s].ordinalMeta)&&u.categories.length&&(i=u.categories[i]))),i}function Hp(t){return t}function Zp(t){return t<this._count&&0<=t?this._indices[t]:-1}function Up(t,e){var n=t._idList[e];return null==n&&(n=Wp(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function Xp(t){return C(t)||(t=[t]),t}function Yp(t,e){for(var n=0;n<e.length;n++)t._dimensionInfos[e[n]]||console.error("Unkown dimension "+e[n])}function jp(t,e){var n=t.dimensions,i=new Bp(z(n,t.getDimensionInfo,t),t.hostModel);zp(i,t);for(var o=i._storage={},a=t._storage,r=0;r<n.length;r++){var s=n[r];a[s]&&(0<=M(e,s)?(o[s]=function(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=function(t){var e=t.constructor;return e===Array?t.slice():new e(t)}(t[n]);return e}(a[s]),i._rawExtent[s]=qp(),i._extent[s]=null):o[s]=a[s])}return i}function qp(){return[1/0,-1/0]}Vp.type="list",Vp.hasItemOption=!0,Vp.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},Vp.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Vp.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Vp.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return!0===e?(i||[]).slice():i&&i[e]},Vp.initData=function(t,e,n){var i=Ou.isInstance(t)||E(t);if(i&&(t=new wh(t,this.dimensions.length)),D&&!i&&("function"!=typeof t.getItem||"function"!=typeof t.count))throw new Error("Inavlid data provider.");this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Ch[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Ch.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Vp.getProvider=function(){return this._rawData},Vp.appendData=function(t){D&&q(!this._indices,"appendData can only be called on raw data.");var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},Vp.appendValues=function(t,e){for(var n=this._chunkSize,i=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){r[v=o[h]]||(r[v]=qp()),i[v]||(i[v]=[]),Gp(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var p=d-s,g=Math.floor(d/n),f=d%n,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[p]||c,v,p,m);i[v][g][f]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[p])}this._rawCount=this._count=l,this._extent={},Fp(this)},Vp._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,g=0;g<s;g++){c[T=r[g]]||(c[T]=qp());var f=l[T];0===f.otherDims.itemName&&(n=this._nameDimIdx=g),0===f.otherDims.itemId&&(this._idDimIdx=g),a[T]||(a[T]=[]),Gp(a,f,i,p,e),this._chunkCount=a[T].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y,x,_,w,b,S=Math.floor(v/i),M=v%i,I=0;I<s;I++){var T,A=a[T=r[I]][S],D=this._dimValueGetter(m,T,v,I);A[M]=D;var C=c[T];D<C[0]&&(C[0]=D),D>C[1]&&(C[1]=D)}o.pure||(y=u[v],m&&null==y&&(null!=m.name?u[v]=y=m.name:null==n||(_=a[x=r[n]][S])&&(y=_[M],(w=l[x].ordinalMeta)&&w.categories.length&&(y=w.categories[y]))),null==(b=null==m?null:m.id)&&null!=y&&(d[y]=d[y]||0,0<d[b=y]&&(b+="__ec__"+d[y]),d[y]++),null!=b&&(h[v]=b))}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},Fp(this)}},Vp.count=function(){return this._count},Vp.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){o=new e(n);for(var i=0;i<n;i++)o[i]=t[i]}else o=new e(t.buffer,0,n)}else for(var o=new(e=Op(this))(this.count()),i=0;i<o.length;i++)o[i]=i;return o},Vp.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return n[t][i][o]},Vp.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var i=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return n[i][o]},Vp._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},Vp.getValues=function(t,e){var n=[];C(t)||(e=t,t=this.dimensions);for(var i=0,o=t.length;i<o;i++)n.push(this.get(t[i],e));return n},Vp.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},Vp.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=qp();if(!e)return n;var i,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var a=(i=n)[0],r=i[1],s=0;s<o;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),r<l&&(r=l)}return i=[a,r],this._extent[t]=i},Vp.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Vp.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Vp.getCalculationInfo=function(t){return this._calculationInfo[t]},Vp.setCalculationInfo=function(t,e){Dp(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},Vp.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},Vp.getMedian=function(t){var n=[];this.each(t,function(t,e){isNaN(t)||n.push(t)});var e=[].concat(n).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?e[(i-1)/2]:(e[i/2]+e[i/2-1])/2},Vp.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t];if(D&&!n)throw new Error("Do not supported yet");var i=n[e];return null==i||isNaN(i)?-1:i},Vp.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},Vp.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var a=(i+o)/2|0;if(e[a]<t)i=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},Vp.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=n&&((h<o||h===o&&0<=u&&a<0)&&(o=h,a=u,r=0),u===a&&(i[r++]=s))}return i.length=r,i},Vp.getRawIndex=Hp,Vp.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},Vp.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Wp(this,this._nameDimIdx,e)||""},Vp.getId=function(t){return Up(this,this.getRawIndex(t))},Vp.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=z(Xp(t),this.getDimension,this),D&&Yp(this,t);for(var o=t.length,a=0;a<this.count();a++)switch(o){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(n,s)}}},Vp.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=z(Xp(t),this.getDimension,this),D&&Yp(this,t);for(var o=this.count(),a=new(Op(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c=this.getRawIndex(h);if(0===s)p=e.call(n,h);else if(1===s)var d=this._getFast(u,c),p=e.call(n,d,h);else{for(var g=0;g<s;g++)r[g]=this._getFast(u,c);r[g]=h,p=e.apply(n,r)}p&&(a[l++]=c)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Zp:Hp,this}},Vp.selectRange=function(t){if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);D&&Yp(this,e);var i=e.length;if(i){var o=this.count(),a=new(Op(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===i){for(var d=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=d[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++){(l<=(w=g[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++}h=!0}else if(2===i){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=d[p],_=v[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++){var w=g[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===i)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){for(var M=!0,S=this.getRawIndex(m),p=0;p<i;p++){var I=e[p];((w=this._getFast(n,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?Zp:Hp,this}}},Vp.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},n),o},Vp.map=function(t,e,n,i){n=n||i||this,t=z(Xp(t),this.getDimension,this),D&&Yp(this,t);var o=jp(this,t);o._indices=this._indices,o.getRawIndex=o._indices?Zp:Hp;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)h[p]=this.get(t[p],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var f=this.getRawIndex(d),m=Math.floor(f/s),v=f%s,y=0;y<g.length;y++){var x=t[y],_=g[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},Vp.downSample=function(t,e,n,i){for(var o=jp(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Op(this))(u),p=0,g=0;g<u;g+=s){u-g<s&&(s=u-g,r.length=s);for(var f=0;f<s;f++){var m=this.getRawIndex(g+f),v=Math.floor(m/h),y=m%h;r[f]=l[v][y]}var x=n(r),_=this.getRawIndex(Math.min(g+i(r,x)||0,u-1)),w=_%h;(l[Math.floor(_/h)][w]=x)<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[p++]=_}return o._count=p,o._indices=d,o.getRawIndex=Zp,o},Vp.getItemModel=function(t){var e=this.hostModel;return new yl(this.getRawDataItem(t),e,e&&e.ecModel)},Vp.diff=function(e){var n=this;return new wp(e?e.getIndices():[],this.getIndices(),function(t){return Up(e,t)},function(t){return Up(n,t)})},Vp.getVisual=function(t){var e=this._visual;return e&&e[t]},Vp.setVisual=function(t,e){if(Dp(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Vp.setLayout=function(t,e){if(Dp(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Vp.getLayout=function(t){return this._layout[t]},Vp.getItemLayout=function(t){return this._itemLayouts[t]},Vp.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?P(this._itemLayouts[t]||{},e):e},Vp.clearItemLayouts=function(){this._itemLayouts.length=0},Vp.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],o=i&&i[e];return null!=o||n?o:this.getVisual(e)},Vp.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,Dp(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},Vp.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Kp(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function $p(t,e,n){Ou.isInstance(e)||(e=Ou.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s,l=(n.dimsDef||[]).slice(),u=et(),h=et(),c=[],d=(i=e,o=t,a=l,r=n.dimCount,s=Math.max(i.dimensionsDetectCount||1,o.length,a.length,r||0),R(o,function(t){var e=t.dimsDef;e&&(s=Math.max(s,e.length))}),s),p=0;p<d;p++){var g=l[p]=P({},V(l[p])?l[p]:{name:l[p]}),f=g.name,m=c[p]=new Ap;null!=f&&null==u.get(f)&&(m.name=m.displayName=f,u.set(f,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}var v=n.encodeDef;!v&&n.encodeDefaulter&&(v=n.encodeDefaulter(e,d)),(v=et(v)).each(function(t,n){var i;1===(t=No(t).slice()).length&&!L(t[0])&&t[0]<0?v.set(n,!1):(i=v.set(n,[]),R(t,function(t,e){L(t)&&(t=u.get(t)),null!=t&&t<d&&(i[e]=t,x(c[t],n,e))}))});var y=0;function x(t,e,n){null!=Sp.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,h.set(e,!0))}R(t,function(o,t){var a,r,s,e;L(o)?(a=o,o={}):(a=o.name,e=o.ordinalMeta,o.ordinalMeta=null,(o=k(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var n=v.get(a);if(!1!==n){if(!(n=No(n)).length)for(var i=0;i<(r&&r.length||1);i++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&n.push(y++)}R(n,function(t,e){var n,i=c[t];x(O(i,o),a,e),null==i.name&&r&&(V(n=r[e])||(n={name:n}),i.name=i.displayName=n.name,i.defaultTooltip=n.defaultTooltip),s&&O(i.otherDims,s)})}});for(var _,w,b=n.generateCoord,S=null!=(M=n.generateCoordCount),M=b?M||1:0,I=b||"value",T=0;T<d;T++){null==(m=c[T]=c[T]||new Ap).coordDim&&(m.coordDim=Jp(I,h,S),m.coordDimIndex=0,(!b||M<=0)&&(m.isExtraCoord=!0),M--),null==m.name&&(m.name=Jp(m.coordDim,u)),null==m.type&&(_=e,w=T,m.name,Hu(_.data,_.sourceFormat,_.seriesLayoutBy,_.dimensionsDefine,_.startIndex,w)===Eu.Must||m.isExtraCoord&&(null!=m.otherDims.itemName||null!=m.otherDims.seriesName))&&(m.type="ordinal")}return c}function Jp(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}Vp.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Kp,e)),this._graphicEls[t]=e},Vp.getItemGraphicEl=function(t){return this._graphicEls[t]},Vp.eachItemGraphicEl=function(n,i){R(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},Vp.cloneShallow=function(t){var e,n;return t||(e=z(this.dimensions,this.getDimensionInfo,this),t=new Bp(e,this.hostModel)),t._storage=this._storage,zp(t,this),this._indices?(n=this._indices.constructor,t._indices=new n(this._indices)):t._indices=null,t.getRawIndex=t._indices?Zp:Hp,t},Vp.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(Y(arguments)))})},Vp.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Vp.CHANGABLE_METHODS=["filterSelf","selectRange"];var Qp=function(t,e){return $p((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function tg(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=et(),this.categoryAxisMap=et(),this.firstCategoryDimIndex=null}var eg={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(D){if(!o)throw new Error('xAxis "'+Z(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+Z(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),ng(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),ng(a)&&(i.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis")[0];if(D&&!o)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",o),ng(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");if(D){if(!r)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",r),ng(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),ng(r)&&(i.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();R(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),ng(n)&&null==o.firstCategoryDimIndex&&(r.set(i,n),o.firstCategoryDimIndex=e)})}};function ng(t){return"category"===t.get("type")}function ig(t,n,e){var i,o,a,r,s,l,u,h=(e=e||{}).byIndex,c=e.stackedCoordDimension,d=!(!t||!t.get("stack"));return R(n,function(t,e){L(t)&&(n[e]=t={name:t}),d&&!t.isExtraCoord&&(h||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||c&&c!==t.coordDim||(o=t))}),!o||h||i||(h=!0),o&&(a="__\0ecstackresult",r="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,l=o.type,u=0,R(n,function(t){t.coordDim===s&&u++}),n.push({name:a,coordDim:s,coordDimIndex:u,type:l,isExtraCoord:!0,isCalculationCoord:!0}),u++,n.push({name:r,coordDim:r,coordDimIndex:u,type:l,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:h,stackedOverDimension:r,stackResultDimension:a}}function og(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ag(t,e){return og(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rg(t,e,n){n=n||{},Ou.isInstance(t)||(t=Ou.seriesDataToSource(t));var i,o=e.get("coordinateSystem"),a=Ju.get(o),r=function(t){var e=t.get("coordinateSystem"),n=new tg(e),i=eg[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e);r&&(i=z(r.coordSysDims,function(t){var e,n={name:t},i=r.axisMap.get(t);return i&&(e=i.get("type"),n.type=Tp(e)),n})),i=i||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=Qp(t,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?B(Gu,i,e):null});r&&R(u,function(t,e){var n=t.coordDim,i=r.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=ig(e,u),c=new Bp(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===Tu){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!C(Ro(e))}}(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function sg(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function lg(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}sg.prototype.parse=function(t){return t},sg.prototype.getSetting=function(t){return this._setting[t]},sg.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},sg.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},sg.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},sg.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},sg.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},sg.prototype.getExtent=function(){return this._extent.slice()},sg.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},sg.prototype.isBlank=function(){return this._isBlank},sg.prototype.setBlank=function(t){this._isBlank=t},sg.prototype.getLabel=null,Jo(sg),ia(sg,{registerWhenExtend:!0}),lg.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&z(n,cg);return new lg({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var ug=lg.prototype;function hg(t){return t._map||(t._map=et(t.categories))}function cg(t){return V(t)&&null!=t.value?t.value:t+""}ug.getOrdinal=function(t){return hg(this).get(t)},ug.parseAndCollect=function(t){var e=this._needCollect;if("string"!=typeof t&&!e)return t;if(e&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var n,i=hg(this);return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n};var dg=sg.prototype,pg=sg.extend({type:"ordinal",init:function(t,e){t&&!C(t)||(t=new lg({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),dg.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return dg.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(dg.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:it,niceExtent:it});pg.create=function(){return new pg};var gg=Tl;function fg(t){return Cl(t)+2}function mg(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function vg(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),mg(t,0,e),mg(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var yg=Tl,xg=sg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[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]),xg.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=fg(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;n[0]<i[0]&&(t?a.push(yg(i[0]-e,o)):a.push(n[0]));for(var r=i[0];r<=i[1]&&(a.push(r),(r=yg(r+e,o))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:i[1];return n[1]>s&&(t?a.push(yg(s+e,o)):a.push(n[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var a=e[o],r=e[o-1],s=0,l=[],u=(a-r)/t;s<t-1;){var h=Tl(r+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Cl(t)||0:"auto"===n&&(n=this._intervalPrecision),Hl(t=yg(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i,o=this._extent,a=o[1]-o[0];isFinite(a)&&(a<0&&o.reverse(),i=function(t,e,n,i){var o={},a=t[1]-t[0],r=o.interval=Vl(a/e,!0);null!=n&&r<n&&(r=o.interval=n),null!=i&&i<r&&(r=o.interval=i);var s=o.intervalPrecision=fg(r);return vg(o.niceTickExtent=[gg(Math.ceil(t[0]/r)*r,s),gg(Math.floor(t[1]/r)*r,s)],t),o}(o,t,e,n),this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent)},niceExtent:function(t){var e,n=this._extent;n[0]===n[1]&&(0!==n[0]?(e=n[0],t.fixMax||(n[1]+=e/2),n[0]-=e/2):n[1]=1);var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=yg(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=yg(Math.ceil(n[1]/o)*o))}});xg.create=function(){return new xg};var _g="__ec_stack_",wg="undefined"!=typeof Float32Array?Float32Array:Array;function bg(t){return t.get("stack")||_g+t.seriesIndex}function Sg(t){return t.dim+t.index}function Mg(t,e){var n=[];return e.eachSeriesByType(t,function(t){Lg(t)&&!kg(t)&&n.push(t)}),n}function Ig(t){var f=function(t){var l={};R(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var n=t.getData(),i=e.dim+"_"+e.index,o=n.mapDimension(e.dim),a=0,r=n.count();a<r;++a){var s=n.get(o,a);l[i]?l[i].push(s):l[i]=[s]}});var e=[];for(var n in l)if(l.hasOwnProperty(n)){var i=l[n];if(i){i.sort(function(t,e){return t-e});for(var o=null,a=1;a<i.length;++a){var r=i[a]-i[a-1];0<r&&(o=null===o?r:Math.min(o,r))}e[n]=o}}return e}(t),m=[];return R(t,function(t){var e,n,i,o,a,r,s,l=t.coordinateSystem.getBaseAxis(),u=l.getExtent();r="category"===l.type?l.getBandWidth():"value"===l.type||"time"===l.type?(e=l.dim+"_"+l.index,n=f[e],i=Math.abs(u[1]-u[0]),o=l.scale.getExtent(),a=Math.abs(o[1]-o[0]),n?i/a*n:i):(s=t.getData(),Math.abs(u[1]-u[0])/s.count());var h=Il(t.get("barWidth"),r),c=Il(t.get("barMaxWidth"),r),d=Il(t.get("barMinWidth")||1,r),p=t.get("barGap"),g=t.get("barCategoryGap");m.push({bandWidth:r,barWidth:h,barMaxWidth:c,barMinWidth:d,barGap:p,barCategoryGap:g,axisKey:Sg(l),stackId:bg(t)})}),Tg(m)}function Tg(t){var d={};R(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=d[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;d[n]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barMinWidth;u&&(a[r].minWidth=u);var h=t.barGap;null!=h&&(o.gap=h);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var p={};return R(d,function(t,n){p[n]={};var e=t.stacks,i=t.bandWidth,o=Il(t.categoryGap,i),a=Il(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);R(e,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,r-=e+a*e,s--):(e=l,n&&n<e&&(e=Math.min(n,r)),i&&e<i&&(e=i),e!==l&&(t.width=e,r-=e+a*e,s--))}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;R(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;R(e,function(t,e){p[n][e]=p[n][e]||{bandWidth:i,offset:c,width:t.width},c+=t.width*(1+a)})}),p}function Ag(t,e,n){if(t&&e){var i=t[Sg(e)];return null!=i&&null!=n&&(i=i[bg(n)]),i}}function Dg(t,e){var n=Mg(t,e),T=Ig(n),A={};R(n,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=bg(t),a=T[Sg(i)][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;A[o]=A[o]||[],e.setLayout({bandWidth:a.bandWidth,offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),d=og(e,h),p=l.isHorizontal(),g=Pg(0,l),f=0,m=e.count();f<m;f++){var v,y,x,_,w,b=e.get(h,f),S=e.get(c,f),M=0<=b?"p":"n",I=g;d&&(A[o][S]||(A[o][S]={p:g,n:g}),I=A[o][S][M]),p?(v=I,y=(w=n.dataToPoint([b,S]))[1]+r,x=w[0]-g,_=s,Math.abs(x)<u&&(x=(x<0?-1:1)*u),isNaN(x)||d&&(A[o][S][M]+=x)):(v=(w=n.dataToPoint([S,b]))[0]+r,y=I,x=s,_=w[1]-g,Math.abs(_)<u&&(_=(_<=0?-1:1)*u),isNaN(_)||d&&(A[o][S][M]+=_)),e.setItemLayout(f,{x:v,y:y,width:x,height:_})}},this)}var Cg={seriesType:"bar",plan:rc(),reset:function(t){if(Lg(t)&&kg(t)){var e=t.getData(),c=t.coordinateSystem,d=c.grid.getRect(),n=c.getBaseAxis(),p=c.getOtherAxis(n),g=e.mapDimension(p.dim),f=e.mapDimension(n.dim),m=p.isHorizontal(),v=m?0:1,y=Ag(Ig([t]),n,t).width;return.5<y||(y=.5),{progress:function(t,e){var n,i=t.count,o=new wg(2*i),a=new wg(2*i),r=new wg(i),s=[],l=[],u=0,h=0;for(;null!=(n=t.next());)l[v]=e.get(g,n),l[1-v]=e.get(f,n),s=c.dataToPoint(l,null,s),a[u]=m?d.x+d.width:s[0],o[u++]=s[0],a[u]=m?s[1]:d.y+d.height,o[u++]=s[1],r[h++]=n;e.setLayout({largePoints:o,largeDataIndices:r,largeBackgroundPoints:a,barWidth:y,valueAxisStart:Pg(0,p),backgroundStart:m?d.x:d.y,valueAxisHorizontal:m})}}}}};function Lg(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function kg(t){return t.pipelineContext&&t.pipelineContext.large}function Pg(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Ng=xg.prototype,Og=Math.ceil,Eg=Math.floor,Rg=36e5,zg=864e5,Bg=xg.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return eu(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=zg,n[1]+=zg),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-zg),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(n[0]=Tl(Eg(n[0]/i)*i)),t.fixMax||(n[1]=Tl(Og(n[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,o=i[1]-i[0],a=o/t;null!=e&&a<e&&(a=e),null!=n&&n<a&&(a=n);var r=Vg.length,s=function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(Vg,a,0,r),l=Vg[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Vl(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Og((i[0]-h)/u)*u+h),Math.round(Eg((i[1]-h)/u)*u+h)];vg(c,i),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Rl(t)}});R(["contain","normalize"],function(e){Bg.prototype[e]=function(t){return Ng[e].call(this,this.parse(t))}});var Vg=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Rg],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*Rg],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",zg],["MM-dd\nyyyy",2*zg],["MM-dd\nyyyy",3*zg],["MM-dd\nyyyy",4*zg],["MM-dd\nyyyy",5*zg],["MM-dd\nyyyy",6*zg],["week",7*zg],["MM-dd\nyyyy",864e6],["week",14*zg],["week",21*zg],["month",31*zg],["week",42*zg],["month",62*zg],["week",70*zg],["quarter",95*zg],["month",31*zg*4],["month",13392e6],["half-year",16416e6],["month",31*zg*8],["month",26784e6],["year",380*zg]];Bg.create=function(t){return new Bg({useUTC:t.ecModel.get("useUTC")})};var Gg=sg.prototype,Fg=xg.prototype,Wg=Cl,Hg=Tl,Zg=Math.floor,Ug=Math.ceil,Xg=Math.pow,Yg=Math.log,jg=sg.extend({type:"log",base:10,$constructor:function(){sg.apply(this,arguments),this._originalScale=new xg},getTicks:function(t){var n=this._originalScale,i=this._extent,o=n.getExtent();return z(Fg.getTicks.call(this,t),function(t){var e=Tl(Xg(this.base,t)),e=t===i[0]&&n.__fixMin?qg(e,o[0]):e;return e=t===i[1]&&n.__fixMax?qg(e,o[1]):e},this)},getMinorTicks:Fg.getMinorTicks,getLabel:Fg.getLabel,scale:function(t){return t=Gg.scale.call(this,t),Xg(this.base,t)},setExtent:function(t,e){var n=this.base;t=Yg(t)/Yg(n),e=Yg(e)/Yg(n),Fg.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Gg.getExtent.call(this);e[0]=Xg(t,e[0]),e[1]=Xg(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=qg(e[0],i[0])),n.__fixMax&&(e[1]=qg(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Yg(t[0])/Yg(e),t[1]=Yg(t[1])/Yg(e),Gg.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=zl(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;var o=[Tl(Ug(e[0]/i)*i),Tl(Zg(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},niceExtent:function(t){Fg.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function qg(t,e){return Hg(t,Wg(e))}function Kg(t,e){var n,i,o,a=t.type,r=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?n=e.getCategories().length:(C(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(D&&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.'),i=[0,0]),i[0]=Il(i[0],1),i[1]=Il(i[1],1),o=l[1]-l[0]||Math.abs(l[0])),"dataMin"===r?r=l[0]:"function"==typeof r&&(r=r({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=r,h=null!=s;null==r&&(r="ordinal"===a?n?0:NaN:l[0]-i[0]*o),null==s&&(s="ordinal"===a?n?n-1:NaN:l[1]+i[1]*o),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(H(r)||H(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!u&&(r=0),r<0&&s<0&&!h&&(s=0));var c,d,p,g,f=e.ecModel;return f&&"time"===a&&(R(c=Mg("bar",f),function(t){d|=t.getBaseAxis()===e.axis}),d&&(p=Ig(c),r=(g=function(t,e,n,i){var o=n.axis.getExtent(),a=o[1]-o[0],r=Ag(i,n.axis);if(void 0===r)return{min:t,max:e};var s=1/0;R(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;R(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p)).min,s=g.max)),{extent:[r,s],fixMin:u,fixMax:h}}function $g(t,e){var n=Kg(t,e),i=n.extent,o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var r=e.get("interval");null!=r&&t.setInterval&&t.setInterval(r)}function Jg(t,e){if(e=e||t.get("type"))switch(e){case"category":return new pg(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new xg;default:return(sg.getClass(e)||xg).create(t)}}function Qg(n){var e,i=n.getLabelModel().get("formatter"),o="category"===n.type?n.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(t){return t=n.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=o&&(e=t-o),i(tf(n,t),e)}:function(t){return n.scale.getLabel(t)}}function tf(t,e){return"category"===t.type?t.scale.getLabel(e):e}function ef(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,o,a="category"===t.type,r=n.getExtent(),s=a?n.count():(i=n.getTicks()).length,l=t.getLabelModel(),u=Qg(t),h=1;40<s&&(h=Math.ceil(s/40));for(var c,d,p,g,f,m,v,y,x=0;x<s;x+=h){var _=u(i?i[x]:r[0]+x),w=l.getTextRect(_),b=(c=w,d=l.get("rotate")||0,y=v=m=f=g=p=void 0,p=d*Math.PI/180,g=c.plain(),f=g.width,m=g.height,v=f*Math.cos(p)+m*Math.sin(p),y=f*Math.sin(p)+m*Math.cos(p),new Mn(g.x,g.y,v,y));o?o.union(b):o=b}return o}}function nf(t){var e=t.get("interval");return null==e?"auto":e}function of(t){return"category"===t.type&&0===nf(t.getLabelModel())}R(["contain","normalize"],function(e){jg.prototype[e]=function(t){return t=Yg(t)/Yg(this.base),Gg[e].call(this,t)}}),jg.create=function(){return new jg};var af={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!H(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!H(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:it,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},rf=xs({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+o,i+a),t.lineTo(n-o,i+a),t.closePath()}}),sf=xs({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+o,i),t.lineTo(n,i+a),t.lineTo(n-o,i),t.closePath()}}),lf=xs({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=i-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),p=.6*r,g=.7*r;t.moveTo(n-h,l+s),t.arc(n,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-g,n,i),t.bezierCurveTo(n,i-g,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),uf=xs({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,a=e.y,r=i/3*2;t.moveTo(o,a),t.lineTo(o+r,a+n),t.lineTo(o,a+n/4*3),t.lineTo(o-r,a+n),t.lineTo(o,a),t.closePath()}}),hf={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){var a=Math.min(n,i);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},cf={};R({line:Jr,rect:Kr,roundRect:Kr,square:Kr,circle:zr,diamond:sf,pin:lf,arrow:uf,triangle:rf},function(t,e){cf[e]=new t});var df=xs({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=di(t,e,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i,o=e.symbolType;"none"!==o&&(i=(i=cf[o])||cf[o="rect"],hf[o](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}});function pf(t,e){var n,i;"image"!==this.type&&(n=this.style,(i=this.shape)&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1))}function gf(t,e,n,i,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ss(t.slice(8),new Mn(e,n,i,o),r?"center":"cover"):0===t.indexOf("path://")?bs(t.slice(7),{},new Mn(e,n,i,o),r?"center":"cover"):new df({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=pf,s.setColor(a),s}var ff={isDimensionStacked:og,enableDataStack:ig,getStackedDimension:ag};var mf=(Object.freeze||Object)({createList:function(t){return rg(t.getSource(),t)},getLayoutRect:cu,dataStack:ff,createScale:function(t,e){var n=e;yl.isInstance(e)||b(n=new yl(e),af);var i=Jg(n);return i.setExtent(t[0],t[1]),$g(i,n),i},mixinAxisModelCommonMethods:function(t){b(t,af)},completeDimensions:$p,createDimensions:Qp,createSymbol:gf}),vf=1e-8;function yf(t,e){return Math.abs(t-e)<vf}function xf(t,e,n){var i=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];i+=ar(o[0],o[1],r[0],r[1],e,n),o=r}var s=t[0];return yf(o[0],s[0])&&yf(o[1],s[1])||(i+=ar(o[0],o[1],s[0],s[1],e,n)),0!==i}function _f(t,e,n){var i;this.name=t,this.geometries=e,n=n?[n[0],n[1]]:[(i=this.getBoundingRect()).x+i.width/2,i.y+i.height/2],this.center=n}function wf(t,e,n){for(var i=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=(s=t.charCodeAt(r)-64)>>1^-(1&s),l=(l=t.charCodeAt(r+1)-64)>>1^-(1&l),o=s+=o,a=l+=a;i.push([s/n,l/n])}return i}_f.prototype={constructor:_f,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++){"polygon"===r[s].type&&(Ra(r[s].exterior,o,a),St(n,n,o),Mt(i,i,a))}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Mn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++)if("polygon"===n[i].type){var a=n[i].exterior,r=n[i].interiors;if(xf(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(xf(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=o.width/o.height;n?i=i||n/a:n=a*i;for(var r=new Mn(t,e,n,i),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)bt(h[d],h[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)bt(c[p][d],c[p][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new _f(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function bf(t,r){return function(t){if(!t.UTF8Encoding)return;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var o=n[i].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=wf(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=wf(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),z(I(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,o=[];"Polygon"===n.type&&o.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&R(i,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new _f(e[r||"name"],o,e.cp);return a.properties=e,a})}var Sf=Wo();function Mf(t){return"category"===t.type?(a=(o=t).getLabelModel(),r=Tf(o,a),!a.get("show")||o.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(e=(n=t).scale.getTicks(),i=Qg(n),{labels:z(e,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,e,i,o,a,r}function If(t,e){return"category"===t.type?function(t,e){var n,i,o=Af(t,"ticks"),a=nf(e),r=Df(o,a);if(r)return r;e.get("show")&&!t.scale.isBlank()||(n=[]);{var s;n=A(a)?kf(t,a,!0):"auto"===a?(s=Tf(t,t.getLabelModel()),i=s.labelCategoryInterval,z(s.labels,function(t){return t.tickValue})):Lf(t,i=a,!0)}return Cf(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}}function Tf(t,e){var n,i,o,a=Af(t,"labels"),r=nf(e),s=Df(a,r);return s||Cf(a,r,{labels:A(r)?kf(t,r):Lf(t,n="auto"===r?null!=(o=Sf(i=t).autoInterval)?o:Sf(i).autoInterval=i.calculateCategoryInterval():r),labelCategoryInterval:n})}function Af(t,e){return Sf(t)[e]||(Sf(t)[e]=[])}function Df(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function Cf(t,e,n){return t.push({key:e,value:n}),n}function Lf(t,e,n){var i=Qg(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=o.count();0!==u&&1<l&&2<h/l&&(u=Math.round(Math.ceil(u/l)*l));var c=of(t),d=r.get("showMinLabel")||c,p=r.get("showMaxLabel")||c;d&&u!==a[0]&&f(a[0]);for(var g=u;g<=a[1];g+=l)f(g);function f(t){s.push(n?t:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:t})}return p&&g-l!==a[1]&&f(a[1]),s}function kf(t,n,i){var o=t.scale,a=Qg(t),r=[];return R(o.getTicks(),function(t){var e=o.getLabel(t);n(t,e)&&r.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}var Pf=[0,1],Nf=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Of(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}Nf.prototype={constructor:Nf,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return n<=t&&t<=i},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Ll(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Of(n=n.slice(),i.count()),Ml(t,Pf,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Of(n=n.slice(),i.count());var o=Ml(t,n,Pf,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=z(If(this,e).ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this);return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var a,r,s=t.getExtent();{var l,u,h;1===o?(e[0].coord=s[0],a=e[1]={coord:s[0]}):(l=e[o-1].tickValue-e[0].tickValue,u=(e[o-1].coord-e[0].coord)/l,R(e,function(t){t.coord-=u/2}),h=t.scale.getExtent(),r=1+h[1]-e[o-1].tickValue,a={coord:e[o-1].coord+u*r},e.push(a))}var c=s[0]>s[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(i?a.coord=s[1]:e.pop());i&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Tl(t),e=Tl(e),c?e<t:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),z(this.scale.getMinorTicks(t),function(t){return z(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},getViewLabels:function(){return Mf(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e,n,i=(n=(e=t).getLabelModel(),{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),o=Qg(t),a=(i.axisRotate-i.labelRotate)/180*Math.PI,r=t.scale,s=r.getExtent(),l=r.count();if(s[1]-s[0]<1)return 0;var u=1;40<l&&(u=Math.max(1,Math.floor(l/40)));for(var h=s[0],c=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(c*Math.cos(a)),p=Math.abs(c*Math.sin(a)),g=0,f=0;h<=s[1];h+=u)var m=ui(o(h),i.font,"center","top"),v=1.3*m.width,y=1.3*m.height,g=Math.max(g,v,7),f=Math.max(f,y,7);var x=g/d,_=f/p;isNaN(x)&&(x=1/0),isNaN(_)&&(_=1/0);var w=Math.max(0,Math.floor(Math.min(x,_))),b=Sf(t.model),S=t.getExtent(),M=b.lastAutoInterval,I=b.lastTickCount;return null!=M&&null!=I&&Math.abs(M-w)<=1&&Math.abs(I-l)<=1&&w<M&&b.axisExtend0===S[0]&&b.axisExtend1===S[1]?w=M:(b.lastTickCount=l,b.lastAutoInterval=w,b.axisExtend0=S[0],b.axisExtend1=S[1]),w}(this)}};var Ef=bf,Rf={};R(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Rf[t]=ot[t]});var zf={};function Bf(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ph(t,e,n[0]);if(i){for(var o=[],a=0;a<n.length;a++){var r=Ph(t,e,n[a]);o.push(r)}return o.join(" ")}}function Vf(t,e,n){In.call(this),this.updateData(t,e,n)}R(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){zf[t]=cl[t]}),Kh.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){if(D){var n=t.coordinateSystem;if("polar"!==n&&"cartesian2d"!==n)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return rg(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Gf=Vf.prototype,Ff=Vf.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function Wf(t){return[t[0]/2,t[1]/2]}function Hf(t,e){this.parent.drift(t,e)}Gf._createSymbol=function(t,e,n,i,o){this.removeAll();var a=gf(t,-1,-1,2,2,e.getItemVisual(n,"color"),o);a.attr({z2:100,culling:!0,scale:Wf(i)}),a.drift=Hf,this._symbolType=t,this.add(a)},Gf.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Gf.getSymbolPath=function(){return this.childAt(0)},Gf.getScale=function(){return this.childAt(0).scale},Gf.highlight=function(){this.childAt(0).trigger("emphasis")},Gf.downplay=function(){this.childAt(0).trigger("normal")},Gf.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},Gf.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Gf.updateData=function(t,e,n){this.silent=!1;var i,o,a,r,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=Ff(t,e),h=s!==this._symbolType;h?(i=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,i)):((o=this.childAt(0)).silent=!1,el(o,{scale:Wf(u)},l,e)),this._updateCommon(t,e,u,n),h&&(o=this.childAt(0),a=n&&n.fadeIn,r={scale:o.scale.slice()},a&&(r.style={opacity:o.style.opacity}),o.scale=[0,0],a&&(o.style.opacity=0),nl(o,r,l,e)),this._seriesModel=l};var Zf=["itemStyle"],Uf=["emphasis","itemStyle"],Xf=["label"],Yf=["emphasis","label"];function jf(t,e){var n,i,o;this.incremental||this.useHoverLayer||("emphasis"===e?(i=(n=this.__symbolOriginalScale)[1]/n[0],o={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]},this.animateTo(o,400,"elasticOut")):"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut"))}function qf(t){this.group=new In,this._symbolCtor=t||Vf}Gf._updateCommon=function(n,t,e,i){var o=this.childAt(0),a=n.hostModel,r=n.getItemVisual(t,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s,l=i&&i.itemStyle,u=i&&i.hoverItemStyle,h=i&&i.symbolOffset,c=i&&i.labelModel,d=i&&i.hoverLabelModel,p=i&&i.hoverAnimation,g=i&&i.cursorStyle;!i||n.hasItemOption?(l=(s=i&&i.itemModel?i.itemModel:n.getItemModel(t)).getModel(Zf).getItemStyle(["color"]),u=s.getModel(Uf).getItemStyle(),h=s.getShallow("symbolOffset"),c=s.getModel(Xf),d=s.getModel(Yf),p=s.getShallow("hoverAnimation"),g=s.getShallow("cursor")):u=P({},u);var f=o.style,m=n.getItemVisual(t,"symbolRotate");o.attr("rotation",(m||0)*Math.PI/180||0),h&&o.attr("position",[Il(h[0],e[0]),Il(h[1],e[1])]),g&&o.attr("cursor",g),o.setColor(r,i&&i.symbolInnerColor),o.setStyle(l);var v=n.getItemVisual(t,"opacity");null!=v&&(f.opacity=v);var y=n.getItemVisual(t,"liftZ"),x=o.__z2Origin;null!=y?null==x&&(o.__z2Origin=o.z2,o.z2+=y):null!=x&&(o.z2=x,o.__z2Origin=null);var _=i&&i.useNameLabel;Us(f,u,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return _?n.getName(t):Bf(n,t)},isRectText:!0,autoColor:r}),o.__symbolOriginalScale=Wf(e),o.hoverStyle=u,o.highDownOnUpdate=p&&a.isAnimationEnabled()?jf:null,Fs(o)},Gf.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),el(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},w(Vf,In);var Kf=qf.prototype;function $f(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Jf(t){return null==t||V(t)||(t={isIgnore:t}),t||{}}function Qf(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 tm(t,e,n){var i,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=function(t,e){var n=0,i=t.scale.getExtent();"start"===e?n=i[0]:"end"===e?n=i[1]:0<i[0]?n=i[0]:i[1]<0&&(n=i[1]);return n}(a,n),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=z(t.dimensions,function(t){return e.mapDimension(t)}),p=e.getCalculationInfo("stackResultDimension");return(i|=og(e,d[0]))&&(d[0]=p),(i|=og(e,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function em(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=n.get(t.baseDim,i),r[1-a]=o,e.dataToPoint(r)}Kf.updateData=function(o,a){a=Jf(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=Qf(o);l||r.removeAll(),o.diff(l).add(function(t){var e,n=o.getItemLayout(t);$f(o,n,t,a)&&((e=new u(o,t,h)).attr("position",n),o.setItemGraphicEl(t,e),r.add(e))}).update(function(t,e){var n=l.getItemGraphicEl(e),i=o.getItemLayout(t);$f(o,i,t,a)?(n?(n.updateData(o,t,h),el(n,{position:i},s)):(n=new u(o,t)).attr("position",i),r.add(n),o.setItemGraphicEl(t,n)):r.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},Kf.isPersistent=function(){return!0},Kf.updateLayout=function(){var i=this._data;i&&i.eachItemGraphicEl(function(t,e){var n=i.getItemLayout(e);t.attr("position",n)})},Kf.incrementalPrepareUpdate=function(t){this._seriesScope=Qf(t),this._data=null,this.group.removeAll()},Kf.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=Jf(n);for(var o=t.start;o<t.end;o++){var a,r=e.getItemLayout(o);$f(e,r,o,n)&&((a=new this._symbolCtor(e,o,this._seriesScope)).traverse(i),a.attr("position",r),this.group.add(a),e.setItemGraphicEl(o,a))}},Kf.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};function nm(t,e,n,i,o,a,r,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],d=[],p=[],g=[],f=[],m=[],v=[],y=tm(o,e,r),x=tm(a,t,s),_=0;_<h.length;_++){var w=h[_],b=!0;switch(w.cmd){case"=":var S=t.getItemLayout(w.idx),M=e.getItemLayout(w.idx1);(isNaN(S[0])||isNaN(S[1]))&&(S=M.slice()),c.push(S),d.push(M),p.push(n[w.idx]),g.push(i[w.idx1]),v.push(e.getRawIndex(w.idx1));break;case"+":var I=w.idx;c.push(o.dataToPoint([e.get(y.dataDimsForPoint[0],I),e.get(y.dataDimsForPoint[1],I)])),d.push(e.getItemLayout(I).slice()),p.push(em(y,o,e,I)),g.push(i[I]),v.push(e.getRawIndex(I));break;case"-":var I=w.idx,T=t.getRawIndex(I);T!==I?(c.push(t.getItemLayout(I)),d.push(a.dataToPoint([t.get(x.dataDimsForPoint[0],I),t.get(x.dataDimsForPoint[1],I)])),p.push(n[I]),g.push(em(x,a,t,I)),v.push(T)):b=!1}b&&(f.push(w),m.push(m.length))}m.sort(function(t,e){return v[t]-v[e]});for(var A=[],D=[],C=[],L=[],k=[],_=0;_<m.length;_++){I=m[_];A[_]=c[I],D[_]=d[I],C[_]=p[I],L[_]=g[I],k[_]=f[I]}return{current:A,next:D,stackedOnCurrent:C,stackedOnNext:L,status:k}}var im=St,om=Mt,am=ct,rm=st,sm=[],lm=[],um=[];function hm(t){return isNaN(t[0])||isNaN(t[1])}function cm(t,e,n,i,o,a,r,s,l,u){return"none"!==u&&u?function(t,e,n,i,o,a,r,s,l,u,h){for(var c=0,d=n,p=0;p<i;p++){var g,f,m,v=e[d];if(o<=d||d<0)break;if(hm(v)){if(h){d+=a;continue}break}d===n?t[0<a?"moveTo":"lineTo"](v[0],v[1]):0<l?(g=e[c],m=(v[f="y"===u?1:0]-g[f])*l,rm(lm,g),lm[f]=g[f]+m,rm(um,v),um[f]=v[f]-m,t.bezierCurveTo(lm[0],lm[1],um[0],um[1],v[0],v[1])):t.lineTo(v[0],v[1]),c=d,d+=a}return p}.apply(this,arguments):function(t,e,n,i,o,a,r,s,l,u,h){for(var c,d,p=0,g=n,f=0;f<i;f++){var m=e[g];if(o<=g||g<0)break;if(hm(m)){if(h){g+=a;continue}break}if(g===n)t[0<a?"moveTo":"lineTo"](m[0],m[1]),rm(lm,m);else if(0<l){var v=g+a,y=e[v];if(h)for(;y&&hm(e[v]);)y=e[v+=a];var x,_=.5,w=e[p];!(y=e[v])||hm(y)?rm(um,m):(hm(y)&&!h&&(y=m),dt(sm,y,w),d="x"===u||"y"===u?(x="x"===u?0:1,c=Math.abs(m[x]-w[x]),Math.abs(m[x]-y[x])):(c=yt(m,w),yt(m,y)),am(um,m,sm,-l*(1-(_=d/(d+c))))),im(lm,lm,s),om(lm,lm,r),im(um,um,s),om(um,um,r),t.bezierCurveTo(lm[0],lm[1],um[0],um[1],m[0],m[1]),am(lm,m,sm,l*_)}else t.lineTo(m[0],m[1]);p=g,g+=a}return f}.apply(this,arguments)}function dm(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var pm=vr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Rr(vr.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=dm(n,e.smoothConstraint);if(e.connectNulls){for(;0<o&&hm(n[o-1]);o--);for(;i<o&&hm(n[i]);i++);}for(;i<o;)i+=cm(t,n,i,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),gm=vr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Rr(vr.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,a=n.length,r=e.smoothMonotone,s=dm(n,e.smoothConstraint),l=dm(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&hm(n[a-1]);a--);for(;o<a&&hm(n[o]);o++);}for(;o<a;){var u=cm(t,n,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);cm(t,i,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function fm(t,e,n){var i=t.getArea(),o=t.getBaseAxis().isHorizontal(),a=i.x,r=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;a-=u/2,r-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var h=new Kr({shape:{x:a,y:r,width:s,height:l}});return e&&(h.shape[o?"width":"height"]=0,nl(h,{shape:{width:s,height:l}},n)),h}function mm(t,e,n){var i=t.getArea(),o=new Vr({shape:{cx:Tl(t.cx,1),cy:Tl(t.cy,1),r0:Tl(i.r0,1),r:Tl(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&(o.shape.endAngle=i.startAngle,nl(o,{shape:{endAngle:i.endAngle}},n)),o}function vm(t,e,n){return t?"polar"===t.type?mm(t,e,n):"cartesian2d"===t.type?fm(t,e,n):null:null}function ym(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i[0]!==o[0]||i[1]!==o[1])return}return 1}}function xm(t,e){var n=[],i=[],o=[],a=[];return Ra(t,n,i),Ra(e,o,a),Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]))}function _m(t){return"number"==typeof t?t:t?.5:0}function wm(t,e,n){for(var i=e.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(n){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function bm(t,e,n){var i=t.get("showAllSymbol"),o="auto"===i;if(!i||o){var a=n.getAxesByScale("ordinal")[0];if(a&&(!o||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*Vf.getSymbolSize(e,r)[t.isHorizontal()?1:0]>i)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Sm(t,e,n){if("cartesian2d"!==t.type)return mm(t,e,n);var i,o,a=t.getBaseAxis().isHorizontal(),r=fm(t,e,n);return n.get("clip",!0)||(i=r.shape,o=Math.max(i.width,i.height),a?(i.y-=o,i.height+=2*o):(i.x-=o,i.width+=2*o)),r}uc.extend({type:"line",init:function(){var t=new In,e=new qf;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,f=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],o=0,a=e.count();o<a;o++)i.push(em(n,t,e,o));return i}(i,a,tm(i,a,v)),x=t.get("showSymbol"),_=x&&!u&&bm(t,a,i),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(g);var b,S=!u&&t.get("step");i&&i.getArea&&t.get("clip",!0)&&(null!=(b=i.getArea()).width?(b.x-=.1,b.y-=.1,b.width+=.2,b.height+=.2):b.r0&&(b.r0-=.5,b.r1+=.5)),this._clipShapeForSymbol=b,d&&h.type===i.type&&S===this._step?(m&&!p?p=this._newPolygon(l,y,i,f):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(Sm(i,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:b}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),ym(this._stackedOnPoints,y)&&ym(this._points,l)||(f?this._updateAnimation(a,y,i,n,S,v):(S&&(l=wm(l,i,S),y=wm(y,i,S)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:b}),S&&(l=wm(l,i,S),y=wm(y,i,S)),d=this._newPolyline(l,i,f),m&&(p=this._newPolygon(l,y,i,f)),g.setClipPath(Sm(i,!0,t)));var M=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count())if("cartesian2d"===e.type){for(var i,o=n.length-1;0<=o;o--){var a,r=n[o].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(a=l&&l.coordDim)||"y"===a){i=n[o];break}}if(i){var u=e.getAxis(a),h=z(i.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=i.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var p=h[0].coord-10,g=h[c-1].coord+10,f=g-p;if(f<.001)return"transparent";R(h,function(t){t.offset=(t.coord-p)/f}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new as(0,0,0,0,h,!0);return m[a]=p,m[a+"2"]=g,m}D&&console.warn("Visual map on line style only support x or y dimension.")}else D&&console.warn("Visual map on line style is only supported on cartesian2d.")}(a,i)||a.getVisual("color");d.useStyle(O(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I,T,A=t.get("smooth"),A=_m(t.get("smooth"));d.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(I=a.getCalculationInfo("stackedOnSeries"),T=0,p.useStyle(O(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),I&&(T=_m(I.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=Fo(o,i);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Vf(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else uc.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=Fo(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):uc.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new pm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new gm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=nm(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;if(o&&(h=wm(u.current,n,o),c=wm(u.stackedOnCurrent,n,o),d=wm(u.next,n,o),p=wm(u.stackedOnNext,n,o)),3e3<xm(h,d)||s&&3e3<xm(c,p))return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:p}));r.shape.__points=u.current,r.shape.points=h,el(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),el(s,{shape:{points:d,stackedOnPoints:p}},l));for(var g,f=[],m=u.status,v=0;v<m.length;v++){"="!==m[v].cmd||(g=t.getItemGraphicEl(m[v].idx1))&&f.push({el:g,ptIdx:v})}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<f.length;t++){f[t].el.attr("position",r.shape.__points[f[t].ptIdx])}})},remove:function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});function Mm(t,r,s){return{seriesType:t,performRawSeries:!0,reset:function(u,t,e){var n=u.getData(),h=u.get("symbol"),c=u.get("symbolSize"),i=u.get("symbolKeepAspect"),d=u.get("symbolRotate"),p=A(h),g=A(c),f=A(d),m=p||g||f,o=!p&&h?h:r,a=g?null:c;if(n.setVisual({legendSymbol:s||o,symbol:o,symbolSize:a,symbolKeepAspect:i,symbolRotate:d}),!t.isSeriesFiltered(u))return{dataEach:n.hasItemOption||m?function(t,e){var n,i,o,a,r,s,l;m&&(n=u.getRawValue(e),i=u.getDataParams(e),p&&t.setItemVisual(e,"symbol",h(n,i)),g&&t.setItemVisual(e,"symbolSize",c(n,i)),f&&t.setItemVisual(e,"symbolRotate",d(n,i))),t.hasItemOption&&(a=(o=t.getItemModel(e)).getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolRotate",!0),l=o.getShallow("symbolKeepAspect",!0),null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolRotate",s),null!=l&&t.setItemVisual(e,"symbolKeepAspect",l))}:null}}}}function Im(t){return{seriesType:t,plan:rc(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var p=z(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),g=p.length,n=e.getCalculationInfo("stackResultDimension");return og(e,p[0])&&(p[0]=n),og(e,p[1])&&(p[1]=n),g&&{progress:function(t,e){for(var n,i,o,a=t.end-t.start,r=d&&new Float32Array(a*g),s=t.start,l=0,u=[],h=[];s<t.end;s++){n=1===g?(i=e.get(p[0],s),!isNaN(i)&&c.dataToPoint(i,null,h)):(i=u[0]=e.get(p[0],s),o=u[1]=e.get(p[1],s),!isNaN(i)&&!isNaN(o)&&c.dataToPoint(u,null,h)),d?(r[l++]=n?n[0]:NaN,r[l++]=n?n[1]:NaN):e.setItemLayout(s,n&&n.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",r)}}}}}}function Tm(t,e){return Math.round(t.length/2)}var Am={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function Dm(t){return this._axes[t]}function Cm(t){this._axes={},this._dimList=[],this.name=t||""}function Lm(t){Cm.call(this,t)}Cm.prototype={constructor:Cm,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return z(this._dimList,Dm,this)},getAxesByScale:function(e){return e=e.toLowerCase(),I(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){for(var n=this._dimList,i=t instanceof Array?[]:{},o=0;o<n.length;o++){var a=n[o],r=this._axes[a];i[a]=r[e](t[a])}return i}},Lm.prototype={constructor:Lm,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"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),o=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=o.toGlobalCoord(o.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),a=i.getExtent(),r=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]);return new Mn(n,i,Math.max(t[0],t[1])-n,Math.max(e[0],e[1])-i)}},w(Lm,Cm);function km(t,e,n,i,o){Nf.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"}km.prototype={constructor:km,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(km,Nf);var Pm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Nm={};Nm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Pm),Nm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Pm),Nm.timeAxis=O({scale:!0,min:"dataMin",max:"dataMax"},Nm.valueAxis),Nm.logAxis=O({scale:!0,logBase:10},Nm.valueAxis);function Om(a,t,r,e){R(Em,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?gu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),n&&pu(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=lg.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:f([{},Nm[o+"Axis"],e],!0)})}),_u.registerSubTypeDefaulter(a+"Axis",B(r,a))}var Em=["value","category","time","log"],Rm=_u.extend({type:"cartesian2dAxis",axis:null,init:function(){Rm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Rm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Rm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function zm(t,e){return e.type||(e.data?"category":"value")}m(Rm.prototype,af);var Bm={offset:0};function Vm(t,e){return t.getCoordSysModel()===e}function Gm(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}Om("x",Rm,zm,Bm),Om("y",Rm,zm,Bm),_u.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Fm=Gm.prototype;function Wm(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=n.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Hm(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Hm(a[u])&&!i[h(a[u])]){o=a[u];break}o&&(i[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Hm(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=t.scale.getExtent(),n=e[0],i=e[1],!(0<n&&0<i||n<0&&i<0));var e,n,i}Fm.type="grid",Fm.axisPointerEnabled=!0,Fm.getRect=function(){return this._rect},Fm.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),R(n.x,function(t){$g(t.scale,t.model)}),R(n.y,function(t){$g(t.scale,t.model)});var i={};R(n.x,function(t){Wm(n,"y",t,i)}),R(n.y,function(t){Wm(n,"x",t,i)}),this.resize(this.model,e)},Fm.resize=function(t,e,n){var l=cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var i=this._axesList;function o(){R(i,function(t){var e,n,i,o,a=t.isHorizontal(),r=a?[0,l.width]:[0,l.height],s=t.inverse?1:0;t.setExtent(r[s],r[1-s]),e=t,n=a?l.x:l.y,i=e.getExtent(),o=i[0]+i[1],e.toGlobalCoord="x"===e.dim?function(t){return t+n}:function(t){return o-t+n},e.toLocalCoord="x"===e.dim?function(t){return t-n}:function(t){return o-t+n}})}o(),!n&&t.get("containLabel")&&(R(i,function(t){var e,n,i;t.model.get("axisLabel.inside")||(e=ef(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin"),l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i))}),o())},Fm.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},Fm.getAxes=function(){return this._axesList.slice()},Fm.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}V(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},Fm.getCartesians=function(){return this._coordsList.slice()},Fm.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},Fm.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},Fm._findConvertTarget=function(t,e){var n,i,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;return o?M(l,n=o.coordinateSystem)<0&&(n=null):a&&r?n=this.getCartesian(a.componentIndex,r.componentIndex):a?i=this.getAxis("x",a.componentIndex):r?i=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},Fm.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Fm._initCartesian=function(r,t,e){var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function n(a){return function(t,e){var n,i,o;Vm(t,r)&&(n=t.get("position"),"x"===a?"top"!==n&&"bottom"!==n&&(n=s.bottom?"top":"bottom"):"left"!==n&&"right"!==n&&(n=s.left?"right":"left"),s[n]=!0,o="category"===(i=new km(a,Jg(t),[0,0],t.get("type"),n)).type,i.onBand=o&&t.get("boundaryGap"),i.inverse=t.get("inverse"),(t.axis=i).model=t,i.grid=this,i.index=e,this._axesList.push(i),l[a][e]=i,u[a]++)}}R((this._axesMap=l).x,function(o,a){R(l.y,function(t,e){var n="x"+a+"y"+e,i=new Lm(n);i.grid=this,i.model=r,this._coordsMap[n]=i,this._coordsList.push(i),i.addAxis(o),i.addAxis(t)},this)},this)},Fm._updateScale=function(t,l){function u(e,n){R(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,ag(e,t))})}R(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(Xm(t)){var e=Um(t),n=e[0],i=e[1];if(!Vm(n,l)||!Vm(i,l))return;var o=this.getCartesian(n.componentIndex,i.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(u(a,r),u(a,s))}},this)},Fm.getTooltipAxes=function(i){var o=[],a=[];return R(this.getCartesians(),function(t){var e=null!=i&&"auto"!==i?t.getAxis(i):t.getBaseAxis(),n=t.getOtherAxis(e);M(o,e)<0&&o.push(e),M(a,n)<0&&a.push(n)}),{baseAxes:o,otherAxes:a}};var Zm=["xAxis","yAxis"];function Um(n){return z(Zm,function(t){var e=n.getReferringComponents(t)[0];if(D&&!e)throw new Error(t+' "'+Z(n.get(t+"Index"),n.get(t+"Id"),0)+'" not found');return e})}function Xm(t){return"cartesian2d"===t.get("coordinateSystem")}Gm.create=function(i,o){var a=[];return i.eachComponent("grid",function(t,e){var n=new Gm(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){if(Xm(t)){var e=Um(t),n=e[0],i=e[1],o=n.getCoordSysModel();if(D){if(!o)throw new Error('Grid "'+Z(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==i.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var a=o.coordinateSystem;t.coordinateSystem=a.getCartesian(n.componentIndex,i.componentIndex)}}),a},Gm.dimensions=Gm.prototype.dimensions=Lm.prototype.dimensions,Ju.register("cartesian2d",Gm);function Ym(t,e){this.opt=e,this.axisModel=t,O(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new In;var n=new In({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n}var jm=Math.PI;Ym.prototype={constructor:Ym,hasBuilder:function(t){return!!qm[t]},add:function(t){qm[t].call(this)},getGroup:function(){return this.group}};var qm={axisLine:function(){var t,e,a,n,r,s,i,o,l,u,h=this.opt,c=this.axisModel;c.get("axisLine.show")&&(t=this.axisModel.axis.getExtent(),e=this._transform,a=[t[0],0],n=[t[1],0],e&&(bt(a,a,e),bt(n,n,e)),r=P({lineCap:"round"},c.getModel("axisLine.lineStyle").getLineStyle()),this.group.add(new Jr({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:n[0],y2:n[1]},style:r,strokeContainThreshold:h.strokeContainThreshold||5,silent:!0,z2:1})),s=c.get("axisLine.symbol"),i=c.get("axisLine.symbolSize"),"number"==typeof(o=c.get("axisLine.symbolOffset")||0)&&(o=[o,o]),null!=s&&("string"==typeof s&&(s=[s,s]),"string"!=typeof i&&"number"!=typeof i||(i=[i,i]),l=i[0],u=i[1],R([{rotate:h.rotation+Math.PI/2,offset:o[0],r:0},{rotate:h.rotation-Math.PI/2,offset:o[1],r:Math.sqrt((a[0]-n[0])*(a[0]-n[0])+(a[1]-n[1])*(a[1]-n[1]))}],function(t,e){var n,i,o;"none"!==s[e]&&null!=s[e]&&(n=gf(s[e],-l/2,-u/2,l,u,r.stroke,!0),i=t.r+t.offset,o=[a[0]+i*Math.cos(h.rotation),a[1]-i*Math.sin(h.rotation)],n.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(n))},this)))},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var i=e.axis,o=e.getModel("axisTick");if(!o.get("show")||i.scale.isBlank())return;for(var a=o.getModel("lineStyle"),r=n.tickDirection*o.get("length"),s=nv(i.getTicksCoords(),t._transform,r,O(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e);!function(t,e,n){if(of(t.axis))return;var i=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");n=n||[];var a=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(Qm(a),Qm(u)):tv(a,r)&&(i?(Qm(r),Qm(h)):(Qm(a),Qm(u)));!1===o?(Qm(s),Qm(c)):tv(l,s)&&(o?(Qm(l),Qm(d)):(Qm(s),Qm(c)))}(t,function(u,h,c){var d=h.axis;if(!Z(c.axisLabelShow,h.get("axisLabel.show"))||d.scale.isBlank())return;var p=h.getModel("axisLabel"),g=p.get("margin"),t=d.getViewLabels(),e=(Z(c.labelRotate,p.get("rotate"))||0)*jm/180,f=$m(c.rotation,e,c.labelDirection),m=h.getCategories&&h.getCategories(!0),v=[],y=Jm(h),x=h.get("triggerEvent");return R(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,o=t.rawLabel,a=p;m&&m[n]&&m[n].textStyle&&(a=new yl(m[n].textStyle,p,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(n),c.labelOffset+c.labelDirection*g],l=new Er({anid:"label_"+n,position:s,rotation:f.rotation,silent:y,z2:10});Ys(l.style,a,{text:i,textAlign:a.getShallow("align",!0)||f.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||f.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?n+"":n,e):r}),x&&(l.eventData=Km(h),l.eventData.targetType="axisLabel",l.eventData.value=o),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}(this,t,e),n),function(t,e,n){var i=e.axis,o=e.getModel("minorTick");if(!o.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var r=o.getModel("lineStyle"),s=n.tickDirection*o.get("length"),l=O(r.getLineStyle(),O(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=nv(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x=this.opt,_=this.axisModel,w=Z(x.axisName,_.get("name"));w&&(t=_.get("nameLocation"),e=x.nameDirection,n=_.getModel("nameTextStyle"),i=_.get("nameGap")||0,a=(o=this.axisModel.axis.getExtent())[0]>o[1]?-1:1,r=["start"===t?o[0]-a*i:"end"===t?o[1]+a*i:(o[0]+o[1])/2,ev(t)?x.labelOffset+e*i:0],null!=(l=_.get("nameRotate"))&&(l=l*jm/180),ev(t)?s=$m(x.rotation,null!=l?l:x.rotation,e):(s=function(t,e,n,i){var o,a,r=Nl(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;o=Ol(r-jm/2)?(a=l?"bottom":"top","center"):Ol(r-1.5*jm)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*jm&&jm/2<r?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:o,textVerticalAlign:a}}(x,t,l||0,o),null!=(u=x.axisNameAvailableWidth)&&(u=Math.abs(u/Math.sin(s.rotation)),isFinite(u)||(u=null))),h=n.getFont(),d=(c=_.get("nameTruncate",!0)||{}).ellipsis,p=Z(x.nameTruncateMaxWidth,c.maxWidth,u),g=null!=d&&null!=p?iu(w,p,h,d,{minChar:2,placeholder:c.placeholder}):w,f=_.get("tooltip",!0),(v={componentType:m=_.mainType,name:w,$vars:["name"]})[m+"Index"]=_.componentIndex,Ys((y=new Er({anid:"name",__fullText:w,__truncatedText:g,position:r,rotation:s.rotation,silent:Jm(_),z2:1,tooltip:f&&f.show?P({content:w,formatter:function(){return w},formatterParams:v},f):null})).style,n,{text:g,textFont:h,textFill:n.getTextColor()||_.get("axisLine.lineStyle.color"),textAlign:n.get("align")||s.textAlign,textVerticalAlign:n.get("verticalAlign")||s.textVerticalAlign}),_.get("triggerEvent")&&(y.eventData=Km(_),y.eventData.targetType="axisName",y.eventData.name=w),this._dumbGroup.add(y),y.updateTransform(),this.group.add(y),y.decomposeTransform())}},Km=Ym.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},$m=Ym.innerTextLayout=function(t,e,n){var i,o=Nl(e-t),a=Ol(o)?(i=0<n?"top":"bottom","center"):Ol(o-jm)?(i=0<n?"bottom":"top","center"):(i="middle",0<o&&o<jm?0<n?"right":"left":0<n?"left":"right");return{rotation:o,textAlign:a,textVerticalAlign:i}};var Jm=Ym.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function Qm(t){t&&(t.ignore=!0)}function tv(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=ae([]);return ue(o,o,-t.rotation),n.applyTransform(se([],o,t.getLocalTransform())),i.applyTransform(se([],o,e.getLocalTransform())),n.intersect(i)}}function ev(t){return"middle"===t||"center"===t}function nv(t,e,n,i,o){for(var a=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,s[r[1]=0]=u,s[1]=n,e&&(bt(r,r,e),bt(s,s,e));var h=new Jr({anid:o+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});a.push(h)}return a}var iv=R,ov=B;function av(t,e){var g,f,n,a,m,v,y,i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return g=i,n=e,a=(f=t).getComponent("tooltip"),m=f.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[],iv(n.getCoordinateSystems(),function(c){var t,d,p,e,n,i;function o(t,e,n){var i,o,a,r,s,l,u=n.model.getModel("axisPointer",m),h=u.get("show");h&&("auto"!==h||t||lv(u))&&(null==e&&(e=u.get("triggerTooltip")),i=(u=t?function(t,e,n,i,o,a){var r=e.getModel("axisPointer"),s={};iv(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=k(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});{var u,h;null==l.show&&(l.show=!1),"cross"===o&&(u=r.get("label.show"),l.show=null==u||u,a||(h=s.lineStyle=r.get("crossStyle"))&&O(l,h.textStyle))}return t.model.getModel("axisPointer",new yl(s,n,i))}(n,p,m,f,t,e):u).get("snap"),o=uv(n.model),a=e||i||"category"===n.type,r=g.axesInfo[o]={key:o,axis:n,coordSys:c,axisPointerModel:u,triggerTooltip:e,involveSeries:a,snap:i,useHandle:lv(u),seriesModels:[]},d[o]=r,g.seriesInvolved|=a,null!=(s=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(rv(a[i+"AxisId"],n.id)||rv(a[i+"AxisIndex"],n.componentIndex)||rv(a[i+"AxisName"],n.name))return o}}(v,n))&&((l=y[s]||(y[s]={axesInfo:{}})).axesInfo[o]=r,l.mapper=v[s].mapper,r.linkGroup=l))}c.axisPointerEnabled&&(t=uv(c.model),d=g.coordSysAxesInfo[t]={},p=(g.coordSysMap[t]=c).model.getModel("tooltip",a),iv(c.getAxes(),ov(o,!1,null)),c.getTooltipAxes&&a&&p.get("show")&&(e="axis"===p.get("trigger"),n="cross"===p.get("axisPointer.type"),i=c.getTooltipAxes(p.get("axisPointer.axis")),(e||n)&&iv(i.baseAxes,ov(o,!n||"cross",e)),n&&iv(i.otherAxes,ov(o,"cross",!1))))}),i.seriesInvolved&&function(o,t){t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get("tooltip.trigger",!0),e=n.get("tooltip.show",!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get("axisPointer.show",!0)&&iv(o.coordSysAxesInfo[uv(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})},this)}(i,t),i}function rv(t,e){return"all"===t||C(t)&&0<=M(t,e)||t===e}function sv(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[uv(t)]}function lv(t){return!!t.get("handle.show")}function uv(t){return t.type+"||"+t.id}var hv=vp({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){var o,a,r,s,l,u,h,c;!this.axisPointerClass||(c=sv(t))&&(o=c.axisPointerModel,a=c.axis.scale,r=o.option,s=o.get("status"),null!=(l=o.get("value"))&&(l=a.parse(l)),u=lv(o),null==s&&(r.status=u?"show":"hide"),(h=a.getExtent().slice())[0]>h[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l<h[0]&&(l=h[0]),r.value=l,u&&(r.status=c.axis.scale.isBlank()?"hide":"show")),hv.superApply(this,"render",arguments),cv(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,o){cv(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),hv.superApply(this,"remove",arguments)},dispose:function(t,e){dv(this,e),hv.superApply(this,"dispose",arguments)}});function cv(t,e,n,i,o,a){var r,s,l=hv.getAxisPointerClass(t.axisPointerClass);l&&((r=(s=sv(e))&&s.axisPointerModel)?(t._axisPointer||(t._axisPointer=new l)).render(e,r,i,a):dv(t,i))}function dv(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var pv=[];function gv(t,e,n){n=n||{};var i,o=t.coordinateSystem,a=e.axis,r={},s=a.getAxesOnZeroOf()[0],l=a.position,u=s?"onZero":l,h=a.dim,c=o.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},g=e.get("offset")||0,f="x"===h?[d[2]-g,d[3]+g]:[d[0]-g,d[1]+g];s&&(i=s.toGlobalCoord(s.dataToCoord(0)),f[p.onZero]=Math.max(Math.min(i,f[1]),f[0])),r.position=["y"===h?f[p[u]]:d[0],"x"===h?f[p[u]]:d[3]],r.rotation=Math.PI/2*("x"===h?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],r.labelOffset=s?f[p[l]]-f[p.onZero]:0,e.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),Z(n.labelInside,e.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=e.get("axisLabel.rotate");return r.labelRotate="top"===u?-m:m,r.z2=1,r}function fv(t,e,n,i){var o=n.axis;if(!o.scale.isBlank()){var a=n.getModel("splitArea"),r=a.getModel("areaStyle"),s=r.get("color"),l=i.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=et(),p=0;if(c)for(var g=0;g<u.length;g++){var f=c.get(u[g].tickValue);if(null!=f){p=(f+(h-1)*g)%h;break}}for(var m=o.toGlobalCoord(u[0].coord),v=r.getAreaStyle(),s=C(s)?s:[s],g=1;g<u.length;g++){var y,x,_,w,b=o.toGlobalCoord(u[g].coord),m=o.isHorizontal()?(y=m,x=l.y,_=b-y,w=l.height,y+_):(y=l.x,x=m,_=l.width,x+(w=b-x)),S=u[g-1].tickValue;null!=S&&d.set(S,p),e.add(new Kr({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:w},style:O({fill:s[p]},v),silent:!0})),p=(p+1)%h}t.__splitAreaColors=d}}}function mv(t){t.__splitAreaColors=null}hv.registerAxisPointerClass=function(t,e){if(D&&pv[t])throw new Error("axisPointer "+t+" exists");pv[t]=e},hv.getAxisPointerClass=function(t){return t&&pv[t]};var vv=["axisLine","axisTickLabel","axisName"],yv=["splitArea","splitLine","minorSplitLine"],xv=hv.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var o,a,r,s=this._axisGroup;this._axisGroup=new In,this.group.add(this._axisGroup),e.get("show")&&(a=gv(o=e.getCoordSysModel(),e),r=new Ym(e,a),R(vv,r.add,r),this._axisGroup.add(r.getGroup()),R(yv,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),rl(s,this._axisGroup,e),xv.superCall(this,"render",e,t,n,i))},remove:function(){mv(this)},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank())for(var i=t.getModel("splitLine"),o=i.getModel("lineStyle"),a=C(a=o.get("color"))?a:[a],r=e.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),h=[],c=[],d=o.getLineStyle(),p=0;p<u.length;p++){var g=n.toGlobalCoord(u[p].coord);s?(h[0]=g,h[1]=r.y,c[0]=g,c[1]=r.y+r.height):(h[0]=r.x,h[1]=g,c[0]=r.x+r.width,c[1]=g);var f=l++%a.length,m=u[p].tickValue;this._axisGroup.add(new Jr({anid:null!=m?"line_"+u[p].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:O({stroke:a[f]},d),silent:!0}))}},_minorSplitLine:function(t,e){var n=t.axis,i=t.getModel("minorSplitLine").getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=n.isHorizontal(),r=n.getMinorTicksCoords();if(r.length)for(var s=[],l=[],u=i.getLineStyle(),h=0;h<r.length;h++)for(var c=0;c<r[h].length;c++){var d=n.toGlobalCoord(r[h][c].coord);a?(s[0]=d,s[1]=o.y,l[0]=d,l[1]=o.y+o.height):(s[0]=o.x,s[1]=d,l[0]=o.x+o.width,l[1]=d),this._axisGroup.add(new Jr({anid:"minor_line_"+r[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){fv(this,this._axisGroup,t,e)}});xv.extend({type:"xAxis"}),xv.extend({type:"yAxis"}),vp({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Kr({shape:t.coordinateSystem.getRect(),style:O({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),lp(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),pp(Mm("line","circle","line")),dp(Im("line")),up(_d.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t,e,n){var i,o,a,r,s,l,u=t.getData(),h=t.get("sampling"),c=t.coordinateSystem;"cartesian2d"===c.type&&h&&(i=c.getBaseAxis(),o=c.getOtherAxis(i),r=(a=i.getExtent())[1]-a[0],1<(s=Math.round(u.count()/r))&&("string"==typeof h?l=Am[h]:"function"==typeof h&&(l=h),l&&t.setData(u.downSample(u.mapDimension(o.dim),1/s,l,Tm))))}});var _v=Kh.extend({type:"series.__base_bar__",getInitialData:function(t,e){return rg(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),o=i.getLayout("offset"),a=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function wv(t,e,n,i,o,a){Us(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Bf(o.getData(),a),isRectText:!0,autoColor:i}),bv(t),bv(e)}function bv(t,e){"outside"===t.textPosition&&(t.textPosition=e)}_v.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var Sv=oa([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Mv={getBarItemStyle:function(t){var e,n=Sv(this,t);return!this.getBorderLineDash||(e=this.getBorderLineDash())&&(n.lineDash=e),n}},Iv=xs({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),p=Math.cos(u),g=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+n,d*o+i),t.arc(c*s+n,d*s+i,r,-Math.PI+l,l,!h)),t.arc(n,i,a,l,u,!h),t.moveTo(p*a+n,g*a+i),t.arc(p*s+n,g*s+i,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(n,i,o,u,l,h),t.moveTo(c*o+n,g*o+i)),t.closePath()}}),Tv=["itemStyle","barBorderWidth"],Av=[0,0];P(yl.prototype,Mv),xp({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"===i||"polar"===i?this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n):D&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(u,t,e){var h,c=this.group,d=u.getData(),s=this._data,p=u.coordinateSystem,n=p.getBaseAxis();"cartesian2d"===p.type?h=n.isHorizontal():"polar"===p.type&&(h="angle"===n.dim);var i,o,a,r,l,g=u.isAnimationEnabled()?u:null,f=u.get("clip",!0),m=(o=d,l=(i=p).getArea&&i.getArea(),"cartesian2d"===i.type&&("category"===(a=i.getBaseAxis()).type&&a.onBand||(r=o.getLayout("bandWidth"),a.isHorizontal()?(l.x-=r,l.width+=2*r):(l.y-=r,l.height+=2*r))),l);c.removeClipPath();var v=u.get("roundCap",!0),y=u.get("showBackground",!0),x=u.getModel("backgroundStyle"),_=x.get("barBorderRadius")||0,w=[],b=this._backgroundEls||[];d.diff(s).add(function(t){var e,n,i,o,a,r=d.getItemModel(t),s=Ov[p.type](d,t,r);if(y&&(e=Ov[p.type](d,t),o=h,a=e,(n=new("polar"===(i=p).type?Vr:Kr)({shape:Gv(o,a,i),silent:!0,z2:0})).useStyle(x.getBarItemStyle()),"cartesian2d"===p.type&&n.setShape("r",_),w[t]=n),d.hasValue(t)){if(f)if(Lv[p.type](m,s))return void c.remove(l);var l=kv[p.type](t,s,h,g,!1,v);d.setItemGraphicEl(t,l),c.add(l),Rv(l,d,t,r,s,u,h,"polar"===p.type)}}).update(function(t,e){var n,i,o=d.getItemModel(t),a=Ov[p.type](d,t,o);y&&((n=b[e]).useStyle(x.getBarItemStyle()),"cartesian2d"===p.type&&n.setShape("r",_),w[t]=n,i=Ov[p.type](d,t),el(n,{shape:Gv(h,i,p)},g,t));var r=s.getItemGraphicEl(e);if(d.hasValue(t)){if(f)if(Lv[p.type](m,a))return void c.remove(r);r?el(r,{shape:a},g,t):r=kv[p.type](t,a,h,g,!0,v),d.setItemGraphicEl(t,r),c.add(r),Rv(r,d,t,o,a,u,h,"polar"===p.type)}else c.remove(r)}).remove(function(t){var e=s.getItemGraphicEl(t);"cartesian2d"===p.type?e&&Pv(t,g,e):e&&Nv(t,g,e)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new In);S.removeAll();for(var M=0;M<w.length;++M)S.add(w[M]);c.add(S),this._backgroundEls=w,this._data=d},_renderLarge:function(t,e,n){this._clear(),Bv(t,this.group);var i=t.get("clip",!0)?vm(t.coordinateSystem,!1,t):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Bv(e,this.group,!0)},dispose:it,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){("sector"===t.type?Nv:Pv)(t.dataIndex,e,t)})):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Dv=Math.max,Cv=Math.min,Lv={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=Dv(e.x,t.x),a=Cv(e.x+e.width,t.x+t.width),r=Dv(e.y,t.y),s=Cv(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},kv={cartesian2d:function(t,e,n,i,o){var a,r,s=new Kr({shape:P({},e),z2:1});return s.name="item",i&&(a=n?"height":"width",r={},s.shape[a]=0,r[a]=e[a],cl[o?"updateProps":"initProps"](s,{shape:r},i,t)),s},polar:function(t,e,n,i,o,a){var r,s,l=e.startAngle<e.endAngle,u=new(!n&&a?Iv:Vr)({shape:O({clockwise:l},e),z2:1});return u.name="item",i&&(r=n?"r":"endAngle",s={},u.shape[r]=n?0:e.startAngle,s[r]=e[r],cl[o?"updateProps":"initProps"](u,{shape:s},i,t)),u}};function Pv(t,e,n){n.style.text=null,el(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function Nv(t,e,n){n.style.text=null,el(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}var Ov={cartesian2d:function(t,e,n){var i,o,a,r,s=t.getItemLayout(e),l=n?(i=s,o=n.get(Tv)||0,a=isNaN(i.width)?Number.MAX_VALUE:Math.abs(i.width),r=isNaN(i.height)?Number.MAX_VALUE:Math.abs(i.height),Math.min(o,a,r)):0,u=0<s.width?1:-1,h=0<s.height?1:-1;return{x:s.x+u*l/2,y:s.y+h*l/2,width:s.width-u*l,height:s.height-h*l}},polar:function(t,e,n){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 Ev(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Rv(t,e,n,i,o,a,r,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),h=e.getVisual("borderColor"),c=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(O({stroke:Ev(o)?"none":h,fill:Ev(o)?"none":l,opacity:u},c.getBarItemStyle()));var p=i.getShallow("cursor");p&&t.attr("cursor",p);r?o.height:o.width;s||wv(t.style,d,i,l,a,n),Ev(o)&&(d.fill=d.stroke="none"),Fs(t,d)}var zv=vr.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__baseDimIdx,a=0;a<n.length;a+=2)i[o]=n[a+o],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}});function Bv(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0;o[1-a]=i.getLayout("valueAxisStart");var r,s,l,u,h,c,d,p,g=i.getLayout("largeDataIndices"),f=i.getLayout("barWidth"),m=t.getModel("backgroundStyle");t.get("showBackground",!0)&&(r=i.getLayout("largeBackgroundPoints"),(s=[])[1-a]=i.getLayout("backgroundStart"),l=new zv({shape:{points:r},incremental:!!n,__startPoint:s,__baseDimIdx:a,__largeDataIndices:g,__barWidth:f,silent:!0,z2:0}),u=l,c=i,d=(h=m).get("borderColor")||h.get("color"),p=h.getItemStyle(["color","borderColor"]),u.useStyle(p),u.style.fill=null,u.style.stroke=d,u.style.lineWidth=c.getLayout("barWidth"),e.add(l));var v,y,x,_,w,b=new zv({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:o,__baseDimIdx:a,__largeDataIndices:g,__barWidth:f});e.add(b),v=b,y=t,_=(x=i).getVisual("borderColor")||x.getVisual("color"),w=y.getModel("itemStyle").getItemStyle(["color","borderColor"]),v.useStyle(w),v.style.fill=null,v.style.stroke=_,v.style.lineWidth=x.getLayout("barWidth"),b.seriesIndex=t.seriesIndex,t.get("silent")||(b.on("mousedown",Vv),b.on("mousemove",Vv))}var Vv=xc(function(t){var e=function(t,e,n){var i=t.__baseDimIdx,o=1-i,a=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];Av[0]=e,Av[1]=n;for(var u=Av[i],h=Av[1-i],c=u-s,d=u+s,p=0,g=a.length/2;p<g;p++){var f=2*p,m=a[f+i],v=a[f+o];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return r[p]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null},30,!1);function Gv(t,e,n){var i="polar"===n.type,o=i?n.getArea():n.grid.getRect();return i?{cx:o.cx,cy:o.cy,r0:t?o.r0:e.r0,r:t?o.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:o.x,y:t?o.y:e.y,width:t?e.width:o.width,height:t?o.height:e.height}}dp(_d.VISUAL.LAYOUT,B(Dg,"bar")),dp(_d.VISUAL.PROGRESSIVE_LAYOUT,Cg),pp({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function Fv(t,e,n){e=C(e)?{coordDimensions:e}:P({},e);var i=t.getSource(),o=Qp(i,e),a=new Bp(o,t);return a.initData(i,n),a}var Wv={updateSelectedMap:function(t){this._targetList=C(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},et())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}};function Hv(n,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(t){return n().indexOfName(t)},this.getItemVisual=function(t,e){return n().getItemVisual(t,e)}}var Zv=yp({type:"series.pie",init:function(t){Zv.superApply(this,"init",arguments),this.legendVisualProvider=new Hv(N(this.getData,this),N(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Zv.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Fv(this,{coordDimensions:["value"],encodeDefaulter:B(Fu,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,o=t.count();i<o;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Nh(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=Zv.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=kl(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){Oo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function Uv(t,e,n,i){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Xv(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,n)})}function Xv(t,e,n,i,o){var a=(e.startAngle+e.endAngle)/2,r=n?i:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Yv(t,e){In.call(this);var n=new Vr({z2:2}),i=new Zr,o=new Er;this.add(n),this.add(i),this.add(o),this.updateData(t,e,!0)}b(Zv,Wv);var jv=Yv.prototype;jv.updateData=function(t,e,n){var i=this.childAt(0),o=this.childAt(1),a=this.childAt(2),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=P({},l);u.label=null;var h=r.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===r.getShallow("animationType")?(i.shape.r=l.r0,nl(i,{shape:{r:l.r}},r,e)):(i.shape.endAngle=l.startAngle,el(i,{shape:{endAngle:l.endAngle}},r,e))):"expansion"===h?i.setShape(u):el(i,{shape:u},r,e);var c=t.getItemVisual(e,"color");i.useStyle(O({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),Xv(this,t.getItemLayout(e),r.isSelected(t.getName(e)),r.get("selectedOffset"),r.get("animation"));var p=!n&&"transition"===h;this._updateLabel(t,e,p),this.highDownOnUpdate=r.get("silent")?null:function(t,e){var n=r.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},Fs(this)},jv._updateLabel=function(t,e,n){var i,o,a,r,s,l,u,h=this.childAt(1),c=this.childAt(2),d=t.hostModel,p=t.getItemModel(e),g=t.getItemLayout(e).label,f=t.getItemVisual(e,"color");!g||isNaN(g.x)||isNaN(g.y)?c.ignore=c.normalIgnore=c.hoverIgnore=h.ignore=h.normalIgnore=h.hoverIgnore=!0:(i={points:g.linePoints||[[g.x,g.y],[g.x,g.y],[g.x,g.y]]},o={x:g.x,y:g.y},n?(el(h,{shape:i},d,e),el(c,{style:o},d,e)):(h.attr({shape:i}),c.attr({style:o})),c.attr({rotation:g.rotation,origin:[g.x,g.y],z2:10}),a=p.getModel("label"),r=p.getModel("emphasis.label"),s=p.getModel("labelLine"),l=p.getModel("emphasis.labelLine"),f=t.getItemVisual(e,"color"),Us(c.style,c.hoverStyle={},a,r,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:g.text,autoColor:f,useInsideStyle:!!g.inside},{textAlign:g.textAlign,textVerticalAlign:g.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),c.ignore=c.normalIgnore=!a.get("show"),c.hoverIgnore=!r.get("show"),h.ignore=h.normalIgnore=!s.get("show"),h.hoverIgnore=!l.get("show"),h.setStyle({stroke:f,opacity:t.getItemVisual(e,"opacity")}),h.setStyle(s.getModel("lineStyle").getLineStyle()),h.hoverStyle=l.getModel("lineStyle").getLineStyle(),(u=s.get("smooth"))&&!0===u&&(u=.4),h.setShape({smooth:u}))},w(Yv,In);function qv(n,t){R(t,function(a){a.update="updateView",hp(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:n,query:t},function(n){n[a.method]&&n[a.method](t.name,t.dataIndex);var i=n.getData();i.each(function(t){var e=i.getName(t);o[e]=n.isSelected(e)||!1})}),{name:t.name,selected:o,seriesId:t.seriesId}})})}function Kv(i){return{getTargetSeries:function(t){var e={},n=et();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(s,t){var l=s.getRawData(),u={},h=s.getData();h.each(function(t){var e=h.getRawIndex(t);u[e]=t}),l.each(function(t){var e,n,i,o=u[t],a=null!=o&&h.getItemVisual(o,"color",!0),r=null!=o&&h.getItemVisual(o,"borderColor",!0);a&&r||(e=l.getItemModel(t)),a||(n=e.get("itemStyle.color")||s.getColorFromPalette(l.getName(t)||t+"",s.__paletteScope,l.count()),null!=o&&h.setItemVisual(o,"color",n)),r||(i=e.get("itemStyle.borderColor"),null!=o&&h.setItemVisual(o,"borderColor",i))})}}}uc.extend({type:"pie",init:function(){var t=new In;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=B(Uv,this.uid,t,s,n),d=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new Yv(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);l||"transition"===h||n.eachChild(function(t){t.stopAnimation(!0)}),n.updateData(o,t),n.off("click"),d&&n.on("click",c),r.add(n),o.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&0<o.count()&&(l?"scale"!==u:"transition"!==h)){for(var p=o.getItemLayout(0),g=1;isNaN(p.startAngle)&&g<o.count();++g)p=o.getItemLayout(g);var f=Math.max(n.getWidth(),n.getHeight())/2,m=N(r.removeClipPath,r);r.setClipPath(this._createClipPath(p.cx,p.cy,f,p.startAngle,p.clockwise,m,t,l))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,n,i,o,a,r,s){var l=new Vr({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:o}});return(s?nl:el)(l,{shape:{endAngle:i+(o?1:-1)*Math.PI*2}},r,a),l},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(i*i+o*o);return a<=n.r&&a>=n.r0}}});var $v=Math.PI/180;function Jv(o,t,e,n,i,a,r,s,l,u){function h(t,e){for(var n=t;0<=n&&!(o[n].y-e<l)&&(o[n].y-=e,!(0<n&&o[n].y>o[n-1].y+o[n-1].height));n--);}function c(t,e,n,i,o,a){for(var r,s,l,u,h=e?Number.MAX_VALUE:0,c=0,d=t.length;c<d;c++){"none"===t[c].labelAlignTo&&(r=Math.abs(t[c].y-i),s=t[c].len,l=t[c].len2,u=r<o+s?Math.sqrt((o+s+l)*(o+s+l)-r*r):Math.abs(t[c].x-n),e&&h<=u&&(u=h-10),!e&&u<=h&&(u=h+10),t[c].x=n+u*a,h=u)}}o.sort(function(t,e){return t.y-e.y});for(var d,p,g=0,f=o.length,m=[],v=[],y=0;y<f;y++){"outer"===o[y].position&&"labelLine"===o[y].labelAlignTo&&(p=o[y].x-u,o[y].linePoints[1][0]+=p,o[y].x=u),(d=o[y].y-g)<0&&function(t,e,n){for(var i=t;i<e&&!(o[i].y+n>l+r);i++)if(o[i].y+=n,t<i&&i+1<e&&o[i+1].y>o[i].y+o[i].height)return h(i,n/2);h(e-1,n/2)}(y,f,-d),g=o[y].y+o[y].height}r-g<0&&h(f-1,g-r);for(y=0;y<f;y++)o[y].y>=e?v.push(o[y]):m.push(o[y]);c(m,!1,t,e,n,i),c(v,!0,t,e,n,i)}function Qv(t){return"center"===t.position}function ty(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*$v;R.each(function(t){var e,n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y=R.getItemLayout(t),x=R.getItemModel(t),_=x.getModel("label"),w=_.get("position")||x.get("emphasis.label.position"),b=_.get("distanceToLabelLine"),S=_.get("alignTo"),M=Il(_.get("margin"),P),I=_.get("bleedMargin"),T=_.getFont(),A=x.getModel("labelLine"),D=Il(D=A.get("length"),P),C=Il(C=A.get("length2"),P);y.angle<V||(e=(y.startAngle+y.endAngle)/2,n=Math.cos(e),i=Math.sin(e),O=y.cx,E=y.cy,a=ui(o=L.getFormattedLabel(t,"normal")||R.getName(t),T,f,"top"),r="inside"===w||"inner"===w,f="center"===w?(d=y.cx,p=y.cy,"center"):(d=(s=(r?(y.r+y.r0)/2*n:y.r*n)+O)+3*n,p=(l=(r?(y.r+y.r0)/2*i:y.r*i)+E)+3*i,r||(u=s+n*(D+k-y.r),h=l+i*(D+k-y.r),c=u+(n<0?-1:1)*C,d="edge"===S?n<0?N+M:N+P-M:c+(n<0?-b:b),g=[[s,l],[u,p=h],[c,h]]),r?"center":"edge"===S?0<n?"right":"left":0<n?"left":"right"),v="number"==typeof(m=_.get("rotate"))?m*(Math.PI/180):m?n<0?-e+Math.PI:-e:0,B=!!v,y.label={x:d,y:p,position:w,height:a.height,len:D,len2:C,linePoints:g,textAlign:f,verticalAlign:"middle",rotation:v,inside:r,labelDistance:b,labelAlignTo:S,labelMargin:M,bleedMargin:I,textRect:a,text:o,font:T},r||z.push(y.label))}),!B&&L.get("avoidLabelOverlap")&&function(t,e,n,i,o,a,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)Qv(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(Jv(u,e,n,i,1,0,a,0,s,c),Jv(l,e,n,i,-1,0,a,0,s,h),d=0;d<t.length;d++){var p,g,f,m,v,y=t[d];Qv(y)||(p=y.linePoints)&&(g="edge"===y.labelAlignTo,f=y.textRect.width,(m=g?y.x<e?p[2][0]-y.labelDistance-r-y.labelMargin:r+o-y.labelMargin-p[2][0]-y.labelDistance:y.x<e?y.x-r-y.bleedMargin:r+o-y.x-y.bleedMargin)<y.textRect.width&&(y.text=pi(y.text,m,y.font),"edge"===y.labelAlignTo&&(f=li(y.text,y.font))),v=p[1][0]-p[2][0],g?y.x<e?p[2][0]=r+y.labelMargin+f+y.labelDistance:p[2][0]=r+o-y.labelMargin-f-y.labelDistance:(y.x<e?p[2][0]=y.x+y.labelDistance:p[2][0]=y.x-y.labelDistance,p[1][0]=p[2][0]+v),p[1][1]=p[2][1]=y.y)}}(z,O,E,k,P,t,N,e)}var ey=2*Math.PI,ny=Math.PI/180;function iy(t){return{seriesType:t,reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}}}qv("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),pp(Kv("pie")),dp(B(function(t,e,D,n){e.eachSeriesByType(t,function(t){var e,o=t.getData(),n=o.mapDimension("value"),a=(e=D,cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),i=t.get("center"),r=t.get("radius");C(r)||(r=[0,r]),C(i)||(i=[i,i]);var s=Il(a.width,D.getWidth()),l=Il(a.height,D.getHeight()),u=Math.min(s,l),h=Il(i[0],s)+a.x,c=Il(i[1],l)+a.y,d=Il(r[0],u/2),p=Il(r[1],u/2),g=-t.get("startAngle")*ny,f=t.get("minAngle")*ny,m=0;o.each(n,function(t){isNaN(t)||m++});var v=o.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=o.getDataExtent(n);b[0]=0;var S,M=ey,I=0,T=g,A=x?1:-1;o.each(n,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:c,r0:d,r:_?NaN:p,viewRect:a}):((n="area"!==_?0===v&&w?y:t*y:ey/m)<f?M-=n=f:I+=t,i=T+A*n,o.setItemLayout(e,{angle:n,startAngle:T,endAngle:i,clockwise:x,cx:h,cy:c,r0:d,r:_?Ml(t,b,[d,p]):p,viewRect:a}),T=i)}),M<ey&&m&&(M<=.001?(S=ey/m,o.each(n,function(t,e){var n;isNaN(t)||((n=o.getItemLayout(e)).angle=S,n.startAngle=g+A*e*S,n.endAngle=g+A*(e+1)*S)})):(y=M/I,T=g,o.each(n,function(t,e){var n,i;isNaN(t)||(i=(n=o.getItemLayout(e)).angle===f?f:t*y,n.startAngle=T,n.endAngle=T+A*i,T+=A*i)}))),ty(t,p,a.width,a.height,a.x,a.y)})},"pie")),up(iy("pie")),Kh.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return rg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var oy=xs({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&i[0]<4))for(var r=0;r<n.length;){var s=n[r++],l=n[r++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-i[0]/2,a.y=l-i[1]/2,a.width=i[0],a.height=i[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,i=e.size;if(i[0]<4){this.setTransform(t);for(var o=0;o<n.length;){var a=n[o++],r=n[o++];isNaN(a)||isNaN(r)||this.softClipShape&&!this.softClipShape.contain(a,r)||t.fillRect(a-i[0]/2,r-i[1]/2,i[0],i[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,i=n.points,o=n.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=i.length/2-1;0<=s;s--){var l=2*s,u=i[l]-a/2,h=i[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}});function ay(){this.group=new In}var ry=ay.prototype;function sy(t,e,n){Nf.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function ly(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=z(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new sy(n,new("log"===t.get("axisType")?jg:xg));return i.name=t.get("name"),(i.model=t).axis=i,this.dimensions.push(n),i},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}ry.isPersistent=function(){return!this._incremental},ry.updateData=function(t,e){this.group.removeAll();var n=new oy({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},ry.updateLayout=function(t){var i;this._incremental||(i=t.getLayout("symbolPoints"),this.group.eachChild(function(t){var e,n;null!=t.startIndex&&(e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2,i=new Float32Array(i.buffer,n,e)),t.setShape("points",i)}))},ry.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new ss({silent:!0})),this.group.add(this._incremental)):this._incremental=null},ry.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new oy,this._incremental.addDisplayable(i,!0)):((i=new oy({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental,n)},ry._setCommon=function(n,t,e,i){var o=t.hostModel;i=i||{};var a=t.getVisual("symbolSize");n.setShape("size",a instanceof Array?a:[a,a]),n.softClipShape=i.clipShape||null,n.symbolProxy=gf(t.getVisual("symbol"),0,0,0,0),n.setColor=n.symbolProxy.setColor;var r=n.shape.size[0]<4;n.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&n.setColor(s),e||(n.seriesIndex=o.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<=e&&(n.dataIndex=e+(n.startIndex||0))}))},ry.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},ry._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},xp({type:"scatter",render:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||1e4<i.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=Im().reset(t);o.progress&&o.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=new(i?ay:qf),this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),pp(Mm("scatter","circle")),dp(Im("scatter")),w(sy,Nf),ly.prototype.getIndicatorAxes=function(){return this._indicatorAxes},ly.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},ly.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},ly.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var o,a=Math.atan2(-n,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coordToData(i))]},ly.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),a=Math.min(i,o)/2;this.cx=Il(n[0],i),this.cy=Il(n[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Il(r[0],a),this.r=Il(r[1],a),R(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length,n=Math.atan2(Math.sin(n),Math.cos(n));t.angle=n},this)},ly.prototype.update=function(i,t){var o=this._indicatorAxes,a=this._model;R(o,function(t){t.scale.setExtent(1/0,-1/0)}),i.eachSeriesByType("radar",function(t,e){var n;"radar"===t.get("coordinateSystem")&&i.getComponent("radar",t.get("radarIndex"))===a&&(n=t.getData(),R(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this);var c=a.get("splitNumber");function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}R(o,function(t,e){var n=Kg(t.scale,t.model).extent;$g(t.scale,t.model);var i=t.model,o=t.scale,a=i.getMin(),r=i.getMax(),s=o.getInterval();if(null!=a&&null!=r)o.setExtent(+a,+r),o.setInterval((r-a)/c);else if(null!=a)for(;u=a+s*c,o.setExtent(+a,u),o.setInterval(s),s=d(s),u<n[1]&&isFinite(u)&&isFinite(n[1]););else if(null!=r)for(;h=r-s*c,o.setExtent(h,+r),o.setInterval(s),s=d(s),h>n[0]&&isFinite(h)&&isFinite(n[0]););else{var l=o.getTicks().length-1;c<l&&(s=d(s));var u,h=Tl((u=Math.ceil(n[1]/s)*s)-s*c);o.setExtent(h,u),o.setInterval(s)}})},ly.dimensions=[],ly.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new ly(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Ju.register("radar",ly);var uy=Nm.valueAxis;function hy(t,e){return O({show:e},t)}mp({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),p=this.get("name.formatter"),g=this.get("nameGap"),f=this.get("triggerEvent"),t=z(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e,n=c;null!=t.color&&(n=O({color:t.color},c)),t=m(k(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisType:u,axisLabel:h,name:t.text,nameLocation:"end",nameGap:g,nameTextStyle:n,triggerEvent:f},!1),d||(t.name=""),"string"==typeof p?(e=t.name,t.name=p.replace("{value}",null!=e?e:"")):"function"==typeof p&&(t.name=p(t.name,t));var i=P(new yl(t,null,this.ecModel),af);return i.mainType="radar",i.componentIndex=this.componentIndex,i},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:m({lineStyle:{color:"#bbb"}},uy.axisLine),axisLabel:hy(uy.axisLabel,!1),axisTick:hy(uy.axisTick,!1),axisType:"interval",splitLine:hy(uy.splitLine,!0),splitArea:hy(uy.splitArea,!0),indicator:[]}});var cy=["axisLine","axisTickLabel","axisName"];vp({type:"radar",render:function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;R(z(e.getIndicatorAxes(),function(t){return new Ym(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){R(cy,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var i=t.coordinateSystem,e=i.getIndicatorAxes();if(e.length){var n=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),r=o.getModel("lineStyle"),s=a.getModel("areaStyle"),l=o.get("show"),u=a.get("show"),h=r.get("color"),c=s.get("color"),h=C(h)?h:[h],c=C(c)?c:[c],d=[],p=[];if("circle"===n)for(var g=e[0].getTicksCoords(),f=i.cx,m=i.cy,v=0;v<g.length;v++){l&&d[I(d,h,v)].push(new zr({shape:{cx:f,cy:m,r:g[v].coord}})),u&&v<g.length-1&&p[I(p,c,v)].push(new Gr({shape:{cx:f,cy:m,r0:g[v].coord,r:g[v+1].coord}}))}else for(var y,x=z(e,function(t,e){var n=t.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),z(n,function(t){return i.coordToPoint(t.coord,e)})}),_=[],v=0;v<=y;v++){for(var w=[],b=0;b<e.length;b++)w.push(x[b][v]);w[0]?w.push(w[0].slice()):D&&console.error("Can't draw value axis "+v),l&&d[I(d,h,v)].push(new Zr({shape:{points:w}})),u&&_&&p[I(p,c,v-1)].push(new Hr({shape:{points:w.concat(_)}})),_=w.slice().reverse()}var S=r.getLineStyle(),M=s.getAreaStyle();R(p,function(t,e){this.group.add(Is(t,{style:O({stroke:"none",fill:c[e%c.length]},M),silent:!0}))},this),R(d,function(t,e){this.group.add(Is(t,{style:O({fill:"none",stroke:h[e%h.length]},S),silent:!0}))},this)}function I(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}}});var dy=Kh.extend({type:"series.radar",dependencies:["radar"],init:function(t){dy.superApply(this,"init",arguments),this.legendVisualProvider=new Hv(N(this.getData,this),N(this.getRawData,this))},getInitialData:function(t,e){return Fv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(i){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(i);return jl(""===e?this.name:e)+"<br/>"+z(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return jl(t.name+" : "+n)}).join("<br />")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(z(n.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=i.length;o<a;o++)if(!isNaN(i[o])){var r=n.getIndicatorAxes();return n.coordToPoint(r[o].dataToCoord(i[o]),o)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});xp({type:"radar",render:function(l,t,e){var n=l.coordinateSystem,f=this.group,m=l.getData(),s=this._data;function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n){var o,a=(C(o=t.getItemVisual(e,"symbolSize"))||(o=[+o,+o]),o),r=gf(n,-1,-1,2,2,i);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function h(t,e,n,i,o,a){n.removeAll();for(var r=0;r<e.length-1;r++){var s=u(i,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),cl[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),n.add(s))}}function c(t){return z(t,function(t){return[n.cx,n.cy]})}m.diff(s).add(function(t){var e,n,i,o,a,r=m.getItemLayout(t);r&&(e=new Hr,n=new Zr,i={shape:{points:r}},e.shape.points=c(r),n.shape.points=c(r),nl(e,i,l,t),nl(n,i,l,t),o=new In,a=new In,o.add(n),o.add(e),o.add(a),h(n.shape.points,r,a,m,t,!0),m.setItemGraphicEl(t,o))}).update(function(t,e){var n=s.getItemGraphicEl(e),i=n.childAt(0),o=n.childAt(1),a=n.childAt(2),r={shape:{points:m.getItemLayout(t)}};r.shape.points&&(h(i.shape.points,r.shape.points,a,m,t,!1),el(i,r,l),el(o,r,l),m.setItemGraphicEl(t,n))}).remove(function(t){f.remove(s.getItemGraphicEl(t))}).execute(),m.eachItemGraphicEl(function(t,n){var e=m.getItemModel(n),i=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=m.getItemVisual(n,"color");f.add(t),i.useStyle(O(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),i.hoverStyle=e.getModel("emphasis.lineStyle").getLineStyle();var s=e.getModel("areaStyle"),l=e.getModel("emphasis.areaStyle"),u=s.isEmpty()&&s.parentModel.isEmpty(),h=(h=l.isEmpty()&&l.parentModel.isEmpty())&&u;o.ignore=u,o.useStyle(O(s.getAreaStyle(),{fill:r,opacity:.7})),o.hoverStyle=l.getAreaStyle();var c=e.getModel("itemStyle").getItemStyle(["color"]),d=e.getModel("emphasis.itemStyle").getItemStyle(),p=e.getModel("label"),g=e.getModel("emphasis.label");a.eachChild(function(t){t.setStyle(c),t.hoverStyle=k(d);var e=m.get(m.dimensions[t.__dimIdx],n);null!=e&&!isNaN(e)||(e=""),Us(t.style,t.hoverStyle,p,g,{labelFetcher:m.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:e,autoColor:r,isRectText:!0})}),t.highDownOnUpdate=function(t,e){o.attr("ignore","emphasis"===e?h:u)},Fs(t)}),this._data=m},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function py(t){return!isNaN(t[0])&&!isNaN(t[1])}function gy(t){return[t.cx,t.cy]}pp(Kv("radar")),pp(Mm("radar","circle")),dp(function(t){t.eachSeriesByType("radar",function(t){var e,n=t.getData(),o=[],a=t.coordinateSystem;a&&(R(e=a.getIndicatorAxes(),function(t,i){n.each(n.mapDimension(e[i].dim),function(t,e){o[e]=o[e]||[];var n=a.dataToPoint(t,i);o[e][i]=py(n)?n:gy(a)})}),n.each(function(t){var e=T(o[t],py)||gy(a);o[t].push(e.slice()),n.setItemLayout(t,o[t])}))})}),up(iy("radar")),lp(function(n){var i,t=n.polar;t&&(C(t)||(t=[t]),i=[],R(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],C(n.radar)||(n.radar=[n.radar]),n.radar.push(t)):i.push(t)}),n.polar=i),R(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var fy=[126,25],my=[[[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]]],vy=0;vy<my.length;vy++)for(var yy=0;yy<my[vy].length;yy++)my[vy][yy][0]/=10.5,my[vy][yy][1]/=-14,my[vy][yy][0]+=fy[0],my[vy][yy][1]+=fy[1];var xy={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},_y={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},wy=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],by=Wo(),Sy={load:function(h,t,e){var n=by(t).parsed;if(n)return n;var i,o,c=t.specialAreas||{},a=t.geoJSON;try{i=a?bf(a,e):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return o=i,"china"===h&&o.push(new _f("南海诸岛",z(my,function(t){return{type:"polygon",exterior:t}}),fy)),R(i,function(t){var e,n,i,o,a,r,s,l=t.name;e=t,"china"!==h||(n=xy[e.name])&&((i=e.center)[0]+=n[0]/10.5,i[1]+=-n[1]/14),o=t,"world"!==h||(a=_y[o.name])&&((r=o.center)[0]=a[0],r[1]=a[1]),s=t,"china"===h&&"台湾"===s.name&&s.geometries.push({type:"polygon",exterior:wy[0]});var u=c[l];u&&t.transformTo(u.left,u.top,u.width,u.height)}),by(t).parsed={regions:i,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(i)}}};var My=Wo();function Iy(t,e){var n,i,o,a=t.svgXML;try{q(null!=(l=(n=a&&(i=a,o={ignoreViewBox:!0,ignoreRootClip:!0},(new Qc).parse(i,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var r,s,l,u=n.width,h=n.height,c=n.viewBoxRect;return e||(e=null==u||null==h?l.getBoundingRect():new Mn(0,0,0,0),null!=u&&(e.width=u),null!=h&&(e.height=h)),c&&(r=hd(c,e.width,e.height),s=l,(l=new In).add(s),s.scale=r.scale,s.position=r.position),l.setClipPath(new Kr({shape:e.plain()})),{root:l,boundingRect:e}}var Ty={geoJSON:Sy,svg:{load:function(t,e){var n=My(e).originRoot;if(n)return{root:n,boundingRect:My(e).boundingRect};var i=Iy(e);return My(e).originRoot=i.root,My(e).boundingRect=i.boundingRect,i},makeGraphic:function(t,e,n){var i=My(e),o=i.rootMap||(i.rootMap=et());if(s=o.get(n))return s;var a=i.originRoot,r=i.boundingRect,s=i.originRootHostKey?Iy(e,r).root:(i.originRootHostKey=n,a);return o.set(n,s)},removeGraphic:function(t,e,n){var i=My(e),o=i.rootMap;o&&o.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},Ay={load:function(i,o,a){var r,s=[],l=et(),u=et();return R(Cy(i),function(t){var e=Ty[t.type].load(i,t,a);R(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),s.push(t),l.set(e,t),u.set(e,t.center)});var n=e.boundingRect;n&&(r?r.union(n):r=n.clone())}),{regions:s,regionsMap:l,nameCoordMap:u,boundingRect:r||new Mn(0,0,0,0)}},makeGraphic:Dy("makeGraphic"),removeGraphic:Dy("removeGraphic")};function Dy(a){return function(n,i){var t=Cy(n),o=[];return R(t,function(t){var e=Ty[t.type][a];e&&o.push(e(n,t,i))}),o}}function Cy(t){var e,n=dd.retrieveMap(t)||[];return D&&(n.length||(e=t,D&&console.error("Map "+e+" not exists. The GeoJSON of the map must be provided."))),n}b(Kh.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Fv(this,{coordDimensions:["value"],encodeDefaulter:B(Fu,this)}),n=e.mapDimension("value"),i=et(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);i.set(l,!0),o.push({name:l,value:e.get(n,r),selected:Nh(e,r,"selected")})}return R(Ay.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){var e=t.name;i.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},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){for(var e=this.getData(),n=Hl(this.getRawValue(t)),i=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(i),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(jl(o[r].name))}return a.join(", ")+"<br />"+jl(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.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:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}}),Wv);var Ly="\0_ec_interaction_mutex";function ky(t,e){return Py(t)[e]}function Py(t){return t[Ly]||(t[Ly]={})}function Ny(n){this.pointerChecker,this._zr=n,this._opt={};var t=N,i=t(Oy,this),o=t(Ey,this),a=t(Ry,this),r=t(zy,this),s=t(By,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=O(k(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",r),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",a),n.off("mousewheel",r),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Oy(t){var e,n;Yt(t)||t.target&&t.target.draggable||(e=t.offsetX,n=t.offsetY,this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0))}function Ey(t){var e,n,i,o,a,r;this._dragging&&Fy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!ky(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,a=e-(i=this._x),r=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Xt(t.event),Gy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:i,oldY:o,newX:e,newY:n}))}function Ry(t){Yt(t)||(this._dragging=!1)}function zy(t){var e,n,i=Fy("zoomOnMouseWheel",t,this._opt),o=Fy("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,r=Math.abs(a),s=t.offsetX,l=t.offsetY;0!==a&&(i||o)&&(i&&(e=3<r?1.4:1<r?1.2:1.1,Vy(this,"zoom","zoomOnMouseWheel",t,{scale:0<a?e:1/e,originX:s,originY:l})),o&&Vy(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<a?1:-1)*(3<(n=Math.abs(a))?.4:1<n?.15:.05),originX:s,originY:l}))}function By(t){ky(this._zr,"globalPan")||Vy(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Vy(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(Xt(i.event),Gy(t,e,n,i,o))}function Gy(t,e,n,i,o){o.isAvailableBehavior=N(Fy,null,n,i),t.trigger(e,o)}function Fy(t,e,n){var i=n[t];return!t||i&&(!L(i)||e.event[i+"Key"])}function Wy(t,e,n){var i=t.target,o=i.position;o[0]+=e,o[1]+=n,i.dirty()}function Hy(t,e,n,i){var o,a,r=t.target,s=t.zoomLimit,l=r.position,u=r.scale,h=t.zoom=t.zoom||1;h*=e,s&&(o=s.min||0,a=s.max||1/0,h=Math.max(Math.min(a,h),o));var c=h/t.zoom;t.zoom=h,l[0]-=(n-l[0])*(c-1),l[1]-=(i-l[1])*(c-1),u[0]*=c,u[1]*=c,r.dirty()}hp({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),b(Ny,Ct);var Zy={axisPointer:1,tooltip:1,brush:1};function Uy(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!Zy[i.mainType]&&o&&o.model!==n}function Xy(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function Yy(n,t){t.eachChild(function(e){R(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function jy(t,e){var n=new In;this.uid=bl("ec_map_draw"),this._controller=new Ny(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new In),n.add(this._backgroundGroup=new In)}jy.prototype={constructor:jy,draw:function(_,t,e,n,i){var w="geo"===_.mainType,b=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){b||t.getHostGeoModel()!==_||(b=t.getData())});var o=_.coordinateSystem;this._updateBackground(o);var a,r,S,M=this._regionsGroup,I=this.group,s=o.getTransformInfo(),T=!M.childAt(0)||i;T?(I.transform=s.roamTransform,I.decomposeTransform(),I.dirty()):((a=new me).transform=s.roamTransform,a.decomposeTransform(),r={scale:a.scale,position:a.position},S=a.scale,el(I,r,_));var A=s.rawScale,D=s.rawPosition;M.removeAll();var l,u,h,c,d,C=["itemStyle"],L=["emphasis","itemStyle"],k=["label"],P=["emphasis","label"],N=et();R(o.regions,function(t){var e=N.get(t.name)||N.set(t.name,new In),a=new os({segmentIgnoreThreshold:1,shape:{paths:[]}});e.add(a);var n,i,o=_.getRegionModel(t.name)||_,r=o.getModel(C),s=o.getModel(L),l=Xy(r),u=Xy(s),h=o.getModel(k),c=o.getModel(P);b&&(n=b.indexOfName(t.name),(i=b.getItemVisual(n,"color",!0))&&(l.fill=i));function d(t){return[t[0]*A[0]+D[0],t[1]*A[1]+D[1]]}R(t.geometries,function(t){if("polygon"===t.type){for(var e=[],n=0;n<t.exterior.length;++n)e.push(d(t.exterior[n]));a.shape.paths.push(new Hr({segmentIgnoreThreshold:1,shape:{points:e}}));for(n=0;n<(t.interiors?t.interiors.length:0);++n){for(var i=t.interiors[n],e=[],o=0;o<i.length;++o)e.push(d(i[o]));a.shape.paths.push(new Hr({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),a.setStyle(l),a.style.strokeNoScale=!0,a.culling=!0;var p,g,f,m=h.get("show"),v=c.get("show"),y=b&&isNaN(b.get(b.mapDimension("value"),n)),x=b&&b.getItemLayout(n);(w||y&&(m||v)||x&&x.showLabel)&&(p=w?t.name:n,(!b||0<=n)&&(g=_),Us((f=new Er({position:d(t.center.slice()),scale:[1/I.scale[0],1/I.scale[1]],z2:10,silent:!0})).style,f.hoverStyle={},h,c,{labelFetcher:g,labelDataIndex:p,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),T||el(f,{scale:[1/S[0],1/S[1]]},_),e.add(f)),b?b.setItemGraphicEl(n,e):(o=_.getRegionModel(t.name),a.eventData={componentType:"geo",componentIndex:_.componentIndex,geoIndex:_.componentIndex,name:t.name,region:o&&o.option||{}}),(e.__regions||(e.__regions=[])).push(t),e.highDownSilentOnTouch=!!_.get("selectedMode"),Fs(e,u),M.add(e)}),this._updateController(_,t,e),l=this,u=_,c=e,d=n,(h=M).off("click"),h.off("mousedown"),u.get("selectedMode")&&(h.on("mousedown",function(){l._mouseDownFlag=!0}),h.on("click",function(t){if(l._mouseDownFlag){l._mouseDownFlag=!1;for(var e,n=t.target;!n.__regions;)n=n.parent;n&&((e={type:("geo"===u.mainType?"geo":"map")+"ToggleSelect",batch:z(n.__regions,function(t){return{name:t.name,from:d.uid}})})[u.mainType+"Id"]=u.id,c.dispatchAction(e),Yy(u,h))}})),Yy(_,M)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Ay.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&R(Ay.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(i,t,o){var a=i.coordinateSystem,e=this._controller,n=this._controllerHost;n.zoomLimit=i.get("scaleLimit"),n.zoom=a.getZoom(),e.enable(i.get("roam")||!1);var r=i.mainType;function s(){var t={type:"geoRoam",componentType:r};return t[r+"Id"]=i.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,Wy(n,t.dx,t.dy),o.dispatchAction(P(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){var e;this._mouseDownFlag=!1,Hy(n,t.scale,t.originX,t.originY),o.dispatchAction(P(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup&&(e=this.group.scale,this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))},this),e.setPointerChecker(function(t,e,n){return a.getViewRectAfterRoam().contain(e,n)&&!Uy(t,o,i)})}};var qy="__seriesMapHighDown",Ky="__seriesMapCallKey";function $y(t){var e=this[qy];e&&e.recordVersion===this[Ky]&&Jy(e,t)}function Jy(t,e){var n=t.circle,i=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(n.style.extendFrom(Ys({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=ds):(Ys(n.style,i,{text:i.get("show")?r:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}function Qy(t,e,n){var i,o,a,r,s,l=t.getZoom(),u=t.getCenter(),h=e.zoom,c=t.dataToPoint(u);return null!=e.dx&&null!=e.dy&&(c[0]-=e.dx,c[1]-=e.dy,u=t.pointToData(c),t.setCenter(u)),null!=h&&(n&&(i=n.min||0,o=n.max||1/0,h=Math.max(Math.min(l*h,o),i)/l),t.scale[0]*=h,t.scale[1]*=h,a=t.position,r=(e.originX-a[0])*(h-1),s=(e.originY-a[1])*(h-1),a[0]-=r,a[1]-=s,t.updateTransform(),u=t.pointToData(c),t.setCenter(u),t.setZoom(h*l)),{center:t.getCenter(),zoom:t.getZoom()}}xp({type:"map",render:function(t,e,n,i){var o,a;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel()||(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(a=this._mapDraw)&&o.add(a.group):t.needsDrawMap?(a=this._mapDraw||new jy(n,!0),o.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)))},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(x,t,e){var _=x.originalData,w=this.group;_.each(_.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y;isNaN(t)||(n=_.getItemLayout(e))&&n.point&&(i=n.point,o=n.offset,a=new zr({style:{fill:x.getData().getVisual("color")},shape:{cx:i[0]+9*o,cy:i[1],r:3},silent:!0,z2:8+(o?0:ds+1)}),o||(r=x.mainSeries.getData(),s=_.getName(e),l=r.indexOfName(s),h=(u=_.getItemModel(e)).getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),p=U(x.getFormattedLabel(l,"normal"),s),g=U(x.getFormattedLabel(l,"emphasis"),p),f=d[qy],m=Math.random(),f||(f=d[qy]={},v=B($y,!0),y=B($y,!1),d.on("mouseover",v).on("mouseout",y).on("emphasis",v).on("normal",y)),P(f,{recordVersion:d[Ky]=m,circle:a,labelModel:h,hoverLabelModel:c,emphasisText:g,normalText:p}),Jy(f,!1)),w.add(a))})}}),hp({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=Qy(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&R(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})});var tx=bt;function ex(){me.call(this)}function nx(t){this.name=t,this.zoomLimit,me.call(this),this._roamTransformable=new ex,this._rawTransformable=new ex,this._center,this._zoom}function ix(t,e,n,i){var o=n.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](i):null}function ox(t,e,n,i){nx.call(this,t),this.map=e;var o=Ay.load(e,n);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==i||i,this.regions=o.regions,this._rect=o.boundingRect}function ax(t,e,n,i){var o=n.geoModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](i):null}function rx(t,e){var n,i,o=t.get("boundingCoords");null!=o&&(n=o[0],i=o[1],isNaN(n[0])||isNaN(n[1])||isNaN(i[0])||isNaN(i[1])?D&&console.error("Invalid boundingCoords"):this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1]));var a,r,s=this.getBoundingRect(),l=t.get("layoutCenter"),u=t.get("layoutSize"),h=e.getWidth(),c=e.getHeight(),d=s.width/s.height*this.aspectScale,p=!1;l&&u&&(l=[Il(l[0],h),Il(l[1],c)],u=Il(u,Math.min(h,c)),isNaN(l[0])||isNaN(l[1])||isNaN(u)?D&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):p=!0),p?(r={},1<d?(r.width=u,r.height=u/d):(r.height=u,r.width=u*d),r.y=l[1]-r.height/2,r.x=l[0]-r.width/2):((a=t.getBoxLayoutParams()).aspect=d,r=cu(a,{width:h,height:c})),this.setViewRect(r.x,r.y,r.width,r.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function sx(n,t){R(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}b(ex,me),nx.prototype={constructor:nx,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new Mn(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new Mn(t,e,n,i)},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Mn(t,e,n,i)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},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(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom(),i=bt([],i,t),n=bt([],n,t);e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),re(this.transform||(this.transform=[]),e.transform||oe()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ce(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?Y(t):oe(),rawScale:Y(e.scale),rawPosition:Y(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?tx(n,t,i):st(n,t)},pointToData:function(t){var e=this.invTransform;return e?tx([],t,e):[t[0],t[1]]},convertToPixel:B(ix,"dataToPoint"),convertFromPixel:B(ix,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},b(nx,me),ox.prototype={constructor:ox,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._invertLongitute,o=o.clone();a&&(o.y=-o.y-o.height);var r,s=this._rawTransformable;s.transform=o.calculateTransform(new Mn(t,e,n,i)),s.decomposeTransform(),a&&((r=s.scale)[1]=-r[1]),s.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,n){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return nx.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:B(ax,"dataToPoint"),convertFromPixel:B(ax,"pointToData")},b(ox,nx);var lx={dimensions:ox.prototype.dimensions,create:function(t,s){var l=[];t.eachComponent("geo",function(t,e){var n=t.get("map"),i=t.get("aspectScale"),o=!0,a=dd.retrieveMap(n);a&&a[0]&&"svg"===a[0].type?(null==i&&(i=1),o=!1):null==i&&(i=.75);var r=new ox(n+e,n,t.get("nameMap"),o);r.aspectScale=i,r.zoomLimit=t.get("scaleLimit"),l.push(r),sx(r,t),(t.coordinateSystem=r).model=t,r.resize=rx,r.resize(t,s)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=l[e])});var n={};return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),R(n,function(t,e){var n=new ox(e,e,f(z(t,function(t){return t.get("nameMap")})));n.zoomLimit=Z.apply(null,z(t,function(t){return t.get("scaleLimit")})),l.push(n),n.resize=rx,n.aspectScale=t[0].get("aspectScale"),n.resize(t[0],s),R(t,function(t){sx(t.coordinateSystem=n,t)})}),l},getFilledRegions:function(t,e,n){for(var i=(t||[]).slice(),o=et(),a=0;a<i.length;a++)o.set(i[a].name,i[a]);return R(Ay.load(e,n).regions,function(t){var e=t.name;o.get(e)||i.push({name:e})}),i}};cp("geo",lx);dp(function(n){var o={};n.eachSeriesByType("map",function(t){var l,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(l={},R(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var n,i,o=s.getName(e),a=r.getRegion(o);a&&!isNaN(t)&&(n=l[o]||0,i=r.dataToPoint(a.center),l[o]=n+1,s.setItemLayout(e,{point:i,offset:n}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!l[e],i.setItemLayout(t,n)}),o[e]=!0)})}),pp(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),o=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:o})})}),up(_d.PROCESSOR.STATISTIC,function(t){var i={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),n=e?"o"+e.id:"i"+t.getMapType();(i[n]=i[n]||[]).push(t)}),R(i,function(t,e){for(var u,h,c,n=(u=z(t,function(t){return t.getData()}),h=t[0].get("mapValueCalculation"),c={},R(u,function(i){i.each(i.mapDimension("value"),function(t,e){var n="ec-"+i.getName(e);c[n]=c[n]||[],isNaN(t)||c[n].push(t)})}),u[0].map(u[0].mapDimension("value"),function(t,e){for(var n,i="ec-"+u[0].getName(e),o=0,a=1/0,r=-1/0,s=c[i].length,l=0;l<s;l++)a=Math.min(a,c[i][l]),r=Math.max(r,c[i][l]),o+=c[i][l];return n="min"===h?a:"max"===h?r:"average"===h?o/s:o,0===s?NaN:n})),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(i=0;i<t.length;i++)(t[i].seriesGroup=t)[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}),lp(function(t){var e=[];R(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,O(t,t.mapLocation))})}),qv("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var ux=R,hx="\0__link_datas",cx="\0__link_mainData";function dx(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,vx(i,t,n),ux(t,function(e){ux(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,B(px,n))})}),i.wrapMethod("cloneShallow",B(fx,n)),ux(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,B(gx,n))}),q(t[i.dataType]===i)}function px(t,e){var n,i;return(i=this)[cx]===i?vx((n=P({},this[hx]))[this.dataType]=e,n,t):yx(e,this.dataType,this[cx],t),e}function gx(t,e){return t.struct&&t.struct.update(this),e}function fx(n,i){return ux(i[hx],function(t,e){t!==i&&yx(t.cloneShallow(),e,i,n)}),i}function mx(t){var e=this[cx];return null==t||null==e?e:e[hx][t]}function vx(n,t,i){n[hx]={},ux(t,function(t,e){yx(t,e,n,i)})}function yx(t,e,n,i){(n[hx][e]=t)[cx]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=mx}function xx(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function _x(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=z(t||[],function(t){return new yl(t,e,e.ecModel)})}function bx(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}function Sx(t,e){var n,i=t.isExpand?t.children:[],o=t.parentNode.children,a=t.hierNode.i?o[t.hierNode.i-1]:null;i.length?(function(t){var e=t.children,n=e.length,i=0,o=0;for(;0<=--n;){var a=e[n];a.hierNode.prelim+=i,a.hierNode.modifier+=i,o+=a.hierNode.change,i+=a.hierNode.shift+o}}(t),n=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2,a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n):a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a)),t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Ax(s),a=Dx(a),s&&a;){o=Ax(o),r=Dx(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+i(s,a);0<d&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}(function(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Ax(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Dx(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,n=t)}return n}(t,a,t.parentNode.hierNode.defaultAncestor||o[0],e)}function Mx(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Ix(t){return arguments.length?t:Cx}function Tx(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function Ax(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Dx(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Cx(t,e){return t.parentNode===e.parentNode?1:2}xx.prototype={constructor:xx,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),L(t=t||{})&&(t={order:t});var i,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var r=0;!i&&r<a.length;r++)a[r].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree.data.getItemModel(this.dataIndex),n=this.getLevelModel();return n?e.getModel(t,n.getModel(t)):e.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){0<=this.dataIndex&&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){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},_x.prototype={constructor:_x,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},_x.createTree=function(t,e,n,i){var s=new _x(e,n&&n.levels),l=[],u=1;!function t(e,n){var i=e.value;u=Math.max(u,C(i)?i.length:1);l.push(e);var o=new xx(e.name,s);n?bx(o,n):s.root=o;s._nodes.push(o);var a=e.children;if(a)for(var r=0;r<a.length;r++)t(a[r],o)}(t),s.root.updateDepthAndHeight(0);var o=Qp(l,{coordDimensions:["value"],dimensionsCount:u}),a=new Bp(o,e);return a.initData(l),i&&i(a),dx({mainData:a,struct:s,structAttr:"tree"}),s.update(),s},Kh.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=new yl(t.leaves||{},this,this.ecModel),o=_x.createTree(e,this,{},function(t){t.wrapMethod("getItemModel",function(t,e){var n=o.getNodeByDataIndex(e);return n.children.length&&n.isExpand||(t.parentModel=i),t})});var n=0;o.eachNode("preorder",function(t){t.depth>n&&(n=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:n;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),o=i.getValue(),a=i.name;i&&i!==n;)a=i.parentNode.name+"."+a,i=i.parentNode;return jl(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var Lx=xs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,a=n[0],r=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Il(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;d<i-1;d++){var p=n[d];t.moveTo(p[0],p[1]),c[l]=p[l],t.lineTo(c[0],c[1])}}});function kx(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function Px(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function Nx(t,e,n,i,o,a){var r=!n,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),a=Px(s,l,a),u=t.tree.root,h=s.parentNode!==u&&s.parentNode||s,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,g=s.getLayout();r?(n=new Vf(t,e,a)).attr("position",[p.x,p.y]):n.updateData(t,e,a),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),t.setItemGraphicEl(e,n),el(n,{position:[g.x,g.y]},o);var f,m,v,y,x,_,w,b,S,M=n.getSymbolPath();"radial"===a.layout&&(m=(f=u.children[0]).getLayout(),v=f.children.length,g.x===m.x&&!0===s.isExpand?((_={}).x=(f.children[0].getLayout().x+f.children[v-1].getLayout().x)/2,_.y=(f.children[0].getLayout().y+f.children[v-1].getLayout().y)/2,(y=Math.atan2(_.y-m.y,_.x-m.x))<0&&(y=2*Math.PI+y),(x=_.x<m.x)&&(y-=Math.PI)):((y=Math.atan2(g.y-m.y,g.x-m.x))<0&&(y=2*Math.PI+y),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(x=g.x<m.x)&&(y-=Math.PI):(x=g.x>m.x)||(y-=Math.PI)),w=x?"left":"right",S=(b=a.labelModel.get("rotate"))*(Math.PI/180),M.setStyle({textPosition:a.labelModel.get("position")||w,textRotation:null==b?-y:S,textOrigin:"center",verticalAlign:"middle"})),function(t,e,n,i,o,a,r,s,l){var u=l.edgeShape,h=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&el(h=h||(i.__edge=new ns({shape:Ex(l,o,o),style:O({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Ex(l,a,r),style:{opacity:1}},t);else if("polyline"===u)if("orthogonal"===l.layout){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],p=0;p<c.length;p++){var g=c[p].getLayout();d.push([g.x,g.y])}el(h=h||(i.__edge=new Lx({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:O({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:{parentPoint:[r.x,r.y],childPoints:d},style:{opacity:1}},t)}}else if(D)throw new Error("The polyline edgeShape can only be used in orthogonal layout");s.add(h)}(o,s,u,n,p,d,g,i,a)}function Ox(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),a=Px(s,u,a),h=s.parentNode!==l&&s.parentNode||s,c=a.edgeShape;null==(r=h.getLayout());)h=h.parentNode!==l&&h.parentNode||h;el(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var d=t.getItemGraphicEl(h.dataIndex).__edge,p=n.__edge||(!1===h.isExpand||1===h.children.length?d:void 0),c=a.edgeShape;p&&("curve"===c?el(p,{shape:Ex(a,r,r),style:{opacity:0}},o,function(){i.remove(p)}):"polyline"===c&&"orthogonal"===a.layout&&el(p,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},o,function(){i.remove(p)}))}function Ex(t,e,n){var i,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=n.x,h=n.y,"LR"!==c&&"RL"!==c||(i=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(i=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:i,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=n.rawX,h=n.rawY;var d=Tx(s,u),p=Tx(s,u+(h-u)*t.curvature),g=Tx(l,h+(u-h)*t.curvature),f=Tx(l,h);return{x1:d.x,y1:d.y,x2:f.x,y2:f.y,cpx1:p.x,cpy1:p.y,cpx2:g.x,cpy2:g.y}}function Rx(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var a=o.length-1;0<=a;a--)i.push(o[a])}}xp({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new In,this._controller=new Ny(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n,e){var o=i.getData(),a=i.layoutInfo,r=this._mainGroup,s=i.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(i,a,s),this._updateController(i,t,n);var l=this._data,u={expandAndCollapse:i.get("expandAndCollapse"),layout:s,edgeShape:i.get("edgeShape"),edgeForkPosition:i.get("edgeForkPosition"),orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){kx(o,t)&&Nx(o,t,null,r,i,u)}).update(function(t,e){var n=l.getItemGraphicEl(e);kx(o,t)?Nx(o,t,n,r,i,u):n&&Ox(l,e,n,r,i,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Ox(l,t,e,r,i,u)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var e=[],o=[];Ra(i,e,o);var a=this._min,r=this._max;o[0]-e[0]==0&&(e[0]=a?a[0]:e[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-e[1]==0&&(e[1]=a?a[1]:e[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new nx;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=o},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Uy(t,a,o)}),e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Wy(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Hy(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),hp({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=i.dataIndex,n=t.getData().tree.getNodeByDataIndex(e);n.isExpand=!n.isExpand})}),hp({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=Qy(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function zx(t,e,n){if(t&&0<=M(e,t.type)){var i=n.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=i.getNodeById(o)),o&&i.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=i.getNodeById(a)))return{node:o}}}function Bx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Vx(t,e){return 0<=M(Bx(t),e)}function Gx(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}pp(Mm("tree","circle")),dp(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,a=0,r=null;r="radial"===i?(o=2*Math.PI,a=Math.min(n.height,n.width)/2,Ix(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,a=n.height,Ix());var s=t.getData().tree.root,l=s.children[0];{var u,h,c,d,p,g,f,m,v,y;l&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var a=n[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(s),function(t,e,n){for(var i,o=[t],a=[];i=o.pop();)if(a.push(i),i.isExpand){var r=i.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;i=a.pop();)e(i,n)}(l,Sx,r),s.hierNode.modifier=-l.hierNode.prelim,Rx(l,Mx),Rx(c=h=u=l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}),d=u===h?1:r(u,h)/2,p=d-u.getLayout().x,v=m=f=g=0,"radial"===i?(g=o/(h.getLayout().x+d+p),f=a/(c.depth-1||1),Rx(l,function(t){m=(t.getLayout().x+p)*g,v=(t.depth-1)*f;var e=Tx(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)})):"RL"===(y=t.getOrient())||"LR"===y?(f=a/(h.getLayout().x+d+p),g=o/(c.depth-1||1),Rx(l,function(t){v=(t.getLayout().x+p)*f,m="LR"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(g=o/(h.getLayout().x+d+p),f=a/(c.depth-1||1),Rx(l,function(t){m=(t.getLayout().x+p)*g,v="TB"===y?(t.depth-1)*f:a-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)})))}}(t,e)})}),Kh.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data};!function n(t){var i=0;R(t.children,function(t){n(t);var e=t.value;C(e)&&(e=e[0]),i+=e});var e=t.value;C(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=i);e<0&&(e=0);C(t.value)?t.value[0]=e:t.value=e}(n);var i=t.levels||[],o=z((i=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;{R(t=t||[],function(t){var e=new yl(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)}),i||((t[0]||(t[0]={})).color=n.slice())}return t}(i,e))||[],function(t){return new yl(t,this,e)},this),a=_x.createTree(n,this,null,function(t){t.wrapMethod("getItemModel",function(t,e){var n=a.getNodeByDataIndex(e),i=o[n.depth];return i&&(t.parentModel=i),t})});return a.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=C(n)?Hl(n[0]):Hl(n);return jl(e.getName(t)+": "+i)},getDataParams:function(t){var e=Kh.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Gx(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=et(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Fx=5;function Wx(t){this.group=new In,t.add(this.group)}Wx.prototype={constructor:Wx,render:function(t,e,n,i){var o,a,r,s=t.getModel("breadcrumb"),l=this.group;l.removeAll(),s.get("show")&&n&&(a=(o=s.getModel("itemStyle")).getModel("textStyle"),r={pos:{left:s.get("left"),right:s.get("right"),top:s.get("top"),bottom:s.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:s.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,r,a),this._renderContent(t,r,o,a,i),du(l,r.pos,r.box))},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var o=i.getModel().get("name"),a=n.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},_renderContent:function(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b=0,S=e.emptyItemWidth,M=t.get("breadcrumb.height"),I=(a=e.pos,r=e.box,l=r.width,u=r.height,h=Il(a.x,l),c=Il(a.y,u),d=Il(a.x2,l),p=Il(a.y2,u),(isNaN(h)||isNaN(parseFloat(a.x)))&&(h=0),(isNaN(d)||isNaN(parseFloat(a.x2)))&&(d=l),(isNaN(c)||isNaN(parseFloat(a.y)))&&(c=0),(isNaN(p)||isNaN(parseFloat(a.y2)))&&(p=u),s=Ul(s||0),{width:Math.max(d-h-s[1]-s[3],0),height:Math.max(p-c-s[0]-s[2],0)}),T=e.totalWidth,A=e.renderList,D=A.length-1;0<=D;D--){var C=A[D],L=C.node,k=C.width,P=C.text;I.width<T&&(T-=k-S,k=S,P=null);var N=new Hr({shape:{points:(m=b,v=0,y=k,x=M,_=D===A.length-1,w=void 0,w=[[_?m:m-Fx,v],[m+y,v],[m+y,v+x],[_?m:m-Fx,v+x]],0===D||w.splice(2,0,[m+y+Fx,v+x/2]),_||w.push([m,v+x/2]),w)},style:O(n.getItemStyle(),{lineJoin:"bevel",text:P,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:B(o,L)});this.group.add(N),g=t,f=L,N.eventData={componentType:"series",componentSubType:"treemap",componentIndex:g.componentIndex,seriesIndex:g.componentIndex,seriesName:g.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:f&&f.dataIndex,name:f&&f.name},treePathInfo:f&&Gx(f,g)},b+=k+8}},remove:function(){this.group.removeAll()}};function Hx(t){var e=Qx(t);return e.stroke=e.fill=e.lineWidth=null,e}var Zx=N,Ux=In,Xx=Kr,Yx=R,jx=["label"],qx=["emphasis","label"],Kx=["upperLabel"],$x=["emphasis","upperLabel"],Jx=10,Qx=oa([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function t_(){return{nodeGroup:[],background:[],content:[]}}function e_(h,u,c,d,p,e,g,t,n,i){if(g){var f=g.getLayout(),o=h.getData();if(o.setItemGraphicEl(g.dataIndex,null),f&&f.isInView){var l=f.width,m=f.height,v=f.borderWidth,y=f.invisible,x=g.getRawIndex(),_=t&&t.getRawIndex(),a=g.viewChildren,w=f.upperHeight,r=a&&a.length,b=g.getModel("itemStyle"),S=g.getModel("emphasis.itemStyle"),s=L("nodeGroup",Ux);if(s){if(n.add(s),s.attr("position",[f.x||0,f.y||0]),s.__tmNodeWidth=l,s.__tmNodeHeight=m,f.isAboveViewRoot)return s;var M,I=g.getModel(),T=L("background",Xx,i,1);return T&&function(t,e,n){{var i,o,a,r,s;e.dataIndex=g.dataIndex,e.seriesIndex=h.seriesIndex,e.setShape({x:0,y:0,width:l,height:m}),y?A(e):(e.invisible=!1,i=g.getVisual("borderColor",!0),o=S.get("borderColor"),(a=Hx(b)).fill=i,(r=Qx(S)).fill=o,n?D(a,r,i,s=l-2*v,w,{x:v,y:0,width:s,height:w}):a.text=r.text=null,e.setStyle(a),Es(e,r))}t.add(e)}(s,T,r&&f.upperLabelHeight),r?(Hs(s)&&Ws(s,!1),T&&(Ws(T,!0),o.setItemGraphicEl(g.dataIndex,T))):((M=L("content",Xx,i,2))&&function(t,e){e.dataIndex=g.dataIndex,e.seriesIndex=h.seriesIndex;var n=Math.max(l-2*v,0),i=Math.max(m-2*v,0);{var o,a,r;e.culling=!0,e.setShape({x:v,y:v,width:n,height:i}),y?A(e):(e.invisible=!1,o=g.getVisual("color",!0),(a=Hx(b)).fill=o,r=Qx(S),D(a,r,o,n,i),e.setStyle(a),Es(e,r))}t.add(e)}(s,M),T&&Hs(T)&&Ws(T,!1),Ws(s,!0),o.setItemGraphicEl(g.dataIndex,s)),s}}}function A(t){t.invisible||e.push(t)}function D(t,e,n,i,o,a){var r=I.get("name"),s=I.getModel(a?Kx:jx),l=I.getModel(a?$x:qx),u=s.getShallow("show");Us(t,e,s,l,{defaultText:u?r:null,autoColor:n,isRectText:!0,labelFetcher:h,labelDataIndex:g.dataIndex,labelProp:a?"upperLabel":"label"}),C(t,a,f),C(e,a,f),a&&(t.textRect=k(a)),t.truncate=u&&s.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function C(t,e,n){var i,o=t.text;!e&&n.isLeafRoot&&null!=o&&(i=h.get("drillDownIcon",!0),t.text=i?i+" "+o:o)}function L(t,e,n,i){var o,a,r,s=null!=_&&c[t][_],l=p[t];return s?(c[t][_]=null,a=s,r=t,(l[x]={}).old="nodeGroup"===r?a.position.slice():P({},a.shape)):y||((s=new e({z:((o=n*Jx+i)-1)/o})).__tmDepth=n,function(t,e){var n=t[x]={},i=g.parentNode;{var o,a,r;!i||d&&"drillDown"!==d.direction||(a=o=0,r=p.background[i.getRawIndex()],!d&&r&&r.old&&(o=r.old.width,a=r.old.height),n.old="nodeGroup"===e?[0,a]:{x:o,y:a,width:0,height:0})}n.fadein="nodeGroup"!==e}(l,s.__tmStorageName=t)),u[t][x]=s}}xp({type:"treemap",init:function(t,e){this._containerGroup,this._storage=t_(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,i){var o,a,r,s,l,u,h,c;M(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,o=zx(i,["treemapZoomToNode","treemapRootToNode"],t),a=i&&i.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u),s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(n),this._renderBreadcrumb(t,n,o))},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Ux,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){var i=e.getData().tree,o=this._oldTree,a=t_(),r=t_(),s=this._storage,l=[],c=B(e_,e,r,s,n,a,l);!function a(r,s,l,u,h){u?Yx(s=r,function(t,e){t.isRemoved()||n(e,e)}):new wp(s,r,t,t).add(n).update(n).remove(B(n,null)).execute();function t(t){return t.getId()}function n(t,e){var n=null!=t?r[t]:null,i=null!=e?s[e]:null,o=c(n,i,l,h);o&&a(n&&n.viewChildren||[],i&&i.viewChildren||[],o,u,h+1)}}(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var u,h,d=(h=t_(),(u=s)&&Yx(u,function(t,e){var n=h[e];Yx(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=i,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){Yx(d,function(t){Yx(t,function(t){t.parent&&t.parent.remove(t)})}),Yx(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){var l,u,h,r,c,d;e.get("animation")&&(l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),c=[],d={},h={add:function(t,e,n,i,o){return L(i)&&(o=i,i=0),!d[t.id]&&(d[t.id]=1,c.push({el:t,target:e,time:n,delay:i,easing:o}),!0)},done:function(t){return r=t,this},start:function(){for(var t=c.length,e=0,n=c.length;e<n;e++){var i=c[e];i.el.animateTo(i.target,i.time,i.delay,i.easing,o)}return this;function o(){--t||(c.length=0,d={},r&&r())}}},Yx(a.willDeleteEls,function(t,r){Yx(t,function(t,e){var n,i,o,a;t.invisible||(n=t.parent,(a=s&&"drillDown"===s.direction?n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}}:(o=i=0,n.__tmWillDelete||(i=n.__tmNodeWidth/2,o=n.__tmNodeHeight/2),"nodeGroup"===r?{position:[i,o],style:{opacity:0}}:{shape:{x:i,y:o,width:0,height:0},style:{opacity:0}}))&&h.add(t,a,l,u))})}),Yx(this._storage,function(t,o){Yx(t,function(t,e){var n=a.lastsForAnimation[o][e],i={};n&&("nodeGroup"===o?n.old&&(i.position=t.position.slice(),t.attr("position",n.old)):(n.old&&(i.shape=P({},t.shape),t.setShape(n.old)),n.fadein?(t.setStyle("opacity",0),i.style={opacity:1}):1!==t.style.opacity&&(i.style={opacity:1})),h.add(t,i,l,u))})},this),this._state="animating",h.done(Zx(function(){this._state="ready",a.renderFinally()},this)).start())},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Ny(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Zx(this._onPan,this)),e.on("zoom",Zx(this._onZoom,this)));var i=new Mn(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},_onZoom:function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var a=new Mn(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,n-=r.y;var s=oe();le(s,s,[-e,-n]),he(s,s,[t.scale,t.scale]),le(s,s,[e,n]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){var e,n,i,o,a,r;"ready"===this._state&&(!(e=this.seriesModel.get("nodeClick",!0))||(n=this.findTarget(t.offsetX,t.offsetY))&&((i=n.node).getLayout().isLeafRoot?this._rootToNode(n):"zoomToNode"===e?this._zoomToNode(n):"link"===e&&(a=(o=i.hostTree.data.getItemModel(i.dataIndex)).get("link",!0),r=o.get("target",!0)||"blank",a&&ou(a,r))))},this)},_renderBreadcrumb:function(e,t,n){n=n||((n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Wx(this.group))).render(e,t,n.node,Zx(function(t){"animating"!==this._state&&(Vx(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=t_(),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(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(o,a),i=e.shape;if(!(i.x<=n[0]&&n[0]<=i.x+i.width&&i.y<=n[1]&&n[1]<=i.y+i.height))return!1;r={node:t,offsetX:n[0],offsetY:n[1]}}},this),r}});for(var n_=function(){},i_=["treemapZoomToNode","treemapRender","treemapMove"],o_=0;o_<i_.length;o_++)hp({type:i_[o_],update:"updateView"},n_);hp({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n=zx(o,["treemapZoomToNode","treemapRootToNode"],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=Vx(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var a_=R,r_=V,s_=-1,l_=function(t){var e=t.mappingMethod,n=t.type,i=this.option=k(t);this.type=n,this.mappingMethod=e,this._normalizeData=x_[e];var o,a,r=u_[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(h_(i),a=(o=i).pieceList,o.hasSpecialVisual=!1,R(a,function(t,e){t.originIndex=e,null!=t.visual&&(o.hasSpecialVisual=!0)})):"category"===e?i.categories?function(t){var e=t.categories,n=t.visual,i=t.categoryMap={};{var o;a_(e,function(t,e){i[t]=e}),C(n)||(o=[],V(n)?a_(n,function(t,e){var n=i[e];o[null!=n?n:s_]=t}):o[s_]=n,n=y_(t,o))}for(var a=e.length-1;0<=a;a--)null==n[a]&&(delete i[e[a]],e.pop())}(i):h_(i,!0):(q("linear"!==e||i.dataExtent),h_(i))};l_.prototype={constructor:l_,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return N(this._normalizeData,this)}};var u_=l_.visualHandlers={color:{applyVisual:p_("color"),getColorMapper:function(){var o=this.option;return N("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),g_.call(this,t)}:function(t,e,n){var i=!!n;return e||(t=this._normalizeData(t)),n=Ze(t,o.parsedVisual,n),i?n:je(n,"rgba")},this)},_doMap:{linear:function(t){return je(Ze(t,this.option.parsedVisual),"rgba")},category:g_,piecewise:function(t,e){var n=v_.call(this,e);return null==n&&(n=je(Ze(t,this.option.parsedVisual),"rgba")),n},fixed:f_}},colorHue:c_(function(t,e){return Xe(t,e)}),colorSaturation:c_(function(t,e){return Xe(t,null,e)}),colorLightness:c_(function(t,e){return Xe(t,null,null,e)}),colorAlpha:c_(Ye),opacity:{applyVisual:p_("opacity"),_doMap:m_([0,1])},liftZ:{applyVisual:p_("liftZ"),_doMap:{linear:f_,category:f_,piecewise:f_,fixed:f_}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(L(i))n("symbol",i);else if(r_(i))for(var o in i)i.hasOwnProperty(o)&&n(o,i[o])},_doMap:{linear:d_,category:g_,piecewise:function(t,e){var n=v_.call(this,e);return null==n&&(n=d_.call(this,t)),n},fixed:f_}},symbolSize:{applyVisual:p_("symbolSize"),_doMap:m_([0,1])}};function h_(t,e){var n=t.visual,i=[];V(n)?a_(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),y_(t,i)}function c_(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:m_([0,1])}}function d_(t){var e=this.option.visual;return e[Math.round(Ml(t,[0,1],[0,e.length-1],!0))]||{}}function p_(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function g_(t){var e=this.option.visual;return e[this.option.loop&&t!==s_?t%e.length:t]}function f_(){return this.option.visual[0]}function m_(i){return{linear:function(t){return Ml(t,i,this.option.visual,!0)},category:g_,piecewise:function(t,e){var n=v_.call(this,e);return null==n&&(n=Ml(t,i,this.option.visual,!0)),n},fixed:f_}}function v_(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[l_.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function y_(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=z(e,function(t){return Ge(t)})),e}var x_={linear:function(t){return Ml(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=l_.findPieceIndex(t,e,!0);if(null!=n)return Ml(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?s_:e},fixed:it};function __(t,e,n){return t?e<=n:e<n}l_.listVisualTypes=function(){var n=[];return R(u_,function(t,e){n.push(e)}),n},l_.addVisualHandler=function(t,e){u_[t]=e},l_.isValidType=function(t){return u_.hasOwnProperty(t)},l_.eachVisual=function(t,e,n){V(t)?R(t,e,n):e.call(n,t)},l_.mapVisual=function(t,i,o){var a,r=C(t)?[]:V(t)?{}:(a=!0,null);return l_.eachVisual(t,function(t,e){var n=i.call(o,t,e);a?r=n:r[e]=n}),r},l_.retrieveVisuals=function(n){var i,o={};return n&&a_(u_,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},l_.prepareVisualTypes=function(t){if(r_(t)){var n=[];a_(t,function(t,e){n.push(e)}),t=n}else{if(!C(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},l_.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},l_.findPieceIndex=function(i,t,e){for(var o,a=1/0,n=0,r=t.length;n<r;n++){var s=t[n].value;if(null!=s){if(s===i||"string"==typeof s&&s===i+"")return n;e&&c(s,n)}}for(n=0,r=t.length;n<r;n++){var l=t[n],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(__(h[1],i,u[1]))return n}else if(u[1]===1/0){if(__(h[0],u[0],i))return n}else if(__(h[0],u[0],i)&&__(h[1],i,u[1]))return n;e&&c(u[0],n),e&&c(u[1],n)}}if(e)return i===1/0?t.length-1:i===-1/0?0:o;function c(t,e){var n=Math.abs(t-i);n<a&&(a=n,o=e)}};var w_=C,b_="itemStyle",S_={seriesType:"treemap",reset:function(t,e,n,i){var o=t.getData().tree,a=o.root,r=t.getModel(b_);a.isRemoved()||!function i(t,e,o,a,r,s){var l=t.getModel();var n=t.getLayout();if(!n||n.invisible||!n.isInView)return;var u=t.getModel(b_);var h=o[t.depth];var c=M_(u,e,h,a);var d=u.get("borderColor");var p=u.get("borderColorSaturation");var g;null!=p&&(g=I_(c),f=p,d=null!=(m=g)?Xe(m,null,null,f):null);var f,m;t.setVisual("borderColor",d);var v=t.viewChildren;{var y;v&&v.length?(y=A_(0,l,n,0,c,v),R(v,function(t,e){var n;(t.depth>=r.length||t===r[t.depth])&&(n=C_(l,c,t,e,y,s),i(t,n,o,a,r,s))})):(g=I_(c),t.setVisual("color",g))}}(a,{},z(o.levelModels,function(t){return t?t.get(b_):null}),r,t.getViewRoot().getAncestors(),t)}};function M_(n,i,o,a){var r=P({},i);return R(["color","colorAlpha","colorSaturation"],function(t){var e=n.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=i[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function I_(t){var e=T_(t,"color");if(e){var n=T_(t,"colorAlpha"),i=T_(t,"colorSaturation");return i&&(e=Xe(e,null,null,i)),n&&(e=Ye(e,n)),e}}function T_(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function A_(t,e,n,i,o,a){if(a&&a.length){var r=D_(e,"color")||null!=o.color&&"none"!==o.color&&(D_(e,"colorAlpha")||D_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new l_(c);return d.__drColorMappingBy=h,d}}}function D_(t,e){var n=t.get(e);return w_(n)&&n.length?{name:e,range:n}:null}function C_(t,e,n,i,o,a){var r,s,l,u=P({},e);return o&&(l="index"===(s="color"===(r=o.type)&&o.__drColorMappingBy)?i:"id"===s?a.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),u[r]=o.mapValueToVisual(l)),u}var L_=Math.max,k_=Math.min,P_=Z,N_=R,O_=["itemStyle","borderWidth"],E_=["itemStyle","gapWidth"],R_=["upperLabel","show"],z_=["upperLabel","height"],B_={seriesType:"treemap",reset:function(t,e,n,i){var o,a,r,s,l=n.getWidth(),u=n.getHeight(),h=t.option,c=cu(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),d=h.size||[],p=Il(P_(c.width,d[0]),l),g=Il(P_(c.height,d[1]),u),f=i&&i.type,m=zx(i,["treemapZoomToNode","treemapRootToNode"],t),v="treemapRender"===f||"treemapMove"===f?i.rootRect:null,y=t.getViewRoot(),x=Bx(y);"treemapMove"!==f&&(o="treemapZoomToNode"===f?function(t,e,n,i,o){var a,r=(e||{}).node,s=[i,o];if(!r||r===n)return s;var l=i*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,p=c.length;d<p;d++)h+=c[d].getValue();var g=r.getValue();if(0===g)return s;u*=h/g;var f=a.getModel(),m=f.get(O_),v=Math.max(m,W_(f));u+=4*m*m+(3*m+v)*Math.pow(u,.5),Pl<u&&(u=Pl),r=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,o*y]}(t,m,y,p,g):v?[v.width,v.height]:[p,g],(a=h.sort)&&"asc"!==a&&"desc"!==a&&(a="desc"),r={squareRatio:h.squareRatio,sort:a,leafDepth:h.leafDepth},y.hostTree.clearLayouts(),s={x:0,y:0,width:o[0],height:o[1],area:o[0]*o[1]},y.setLayout(s),function t(e,n,i,o){var a;var r;if(e.isRemoved())return;var s=e.getLayout();a=s.width;r=s.height;var l=e.getModel();var u=l.get(O_);var h=l.get(E_)/2;var c=W_(l);var d=Math.max(u,c);var p=u-h;var g=d-h;var l=e.getModel();e.setLayout({borderWidth:u,upperHeight:d,upperLabelHeight:c},!0);a=L_(a-2*p,0);r=L_(r-p-g,0);var f=a*r;var m=V_(e,l,f,n,i,o);if(!m.length)return;var v={x:p,y:g,width:a,height:r};var y=k_(a,r);var x=1/0;var _=[];_.area=0;for(var w=0,b=m.length;w<b;){var S=m[w];_.push(S),_.area+=S.getLayout().area;var M=G_(_,y,n.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,F_(_,y,v,h,!1),y=k_(v.width,v.height),1/(_.length=_.area=0))}_.length&&F_(_,y,v,h,!0);{var I;i||null!=(I=l.get("childrenVisibleMin"))&&f<I&&(i=!0)}for(var w=0,b=m.length;w<b;w++)t(m[w],n,i,o+1)}(y,r,!1,0),s=y.getLayout(),N_(x,function(t,e){var n=(x[e+1]||y).getValue();t.setLayout(P({dataExtent:[n,n],borderWidth:0,upperHeight:0},s))}));var _=t.getData().tree.root;_.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var o=n.node,a=o.getLayout();if(!a)return i;var r=[a.width/2,a.height/2],s=o;for(;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(c,v,m),!0),t.setLayoutInfo(c),function e(t,n,i,o,a){var r=t.getLayout();var s=i[a];var l=s&&s===t;if(s&&!l||a===i.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!n.intersect(r),isAboveViewRoot:l},!0);var u=new Mn(n.x-r.x,n.y-r.y,n.width,n.height);N_(t.viewChildren||[],function(t){e(t,u,i,o,a+1)})}(_,new Mn(-c.x,-c.y,l,u),x,y,0)}};function V_(t,e,n,i,o,a){var r=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l,u,h=null!=i.leafDepth&&i.leafDepth<=a;if(o&&!h)return t.viewChildren=[];r=I(r,function(t){return!t.isRemoved()}),l=r,(u=s)&&l.sort(function(t,e){var n="asc"===u?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===u?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var c=function(t,e,n){for(var i=0,o=0,a=e.length;o<a;o++)i+=e[o].getValue();var r=t.get("visualDimension");{var s;e&&e.length?"value"===r&&n?(s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&s.reverse()):(s=[1/0,-1/0],N_(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})):s=[NaN,NaN]}return{sum:i,dataExtent:s}}(e,r,s);if(0===c.sum)return t.viewChildren=[];if(c.sum=function(t,e,n,i,o){if(!i)return n;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===i?r-l-1:l].getValue();u/n*e<a&&(s=l,n-=u)}return"asc"===i?o.splice(0,r-s):o.splice(s,r-s),n}(e,n,c.sum,s,r),0===c.sum)return t.viewChildren=[];for(var d=0,p=r.length;d<p;d++){var g=r[d].getValue()/c.sum*n;r[d].setLayout({area:g})}return h&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:c.dataExtent},!0),r}function G_(t,e,n){for(var i,o=0,a=1/0,r=0,s=t.length;r<s;r++)(i=t[r].getLayout().area)&&(i<a&&(a=i),o<i&&(o=i));var l=t.area*t.area,u=e*e*n;return l?L_(u*o/l,l/(u*a)):1/0}function F_(t,e,n,i,o){var a=e===n.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=n[s[a]],h=e?t.area/e:0;(o||h>n[l[r]])&&(h=n[l[r]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],g={},f=h?p.getLayout().area/h:0,m=g[l[r]]=L_(h-2*i,0),v=n[s[a]]+n[l[a]]-u,y=c===d-1||v<f?v:f,x=g[l[a]]=L_(y-2*i,0);g[s[r]]=n[s[r]]+k_(i,m/2),g[s[a]]=u+k_(i,x/2),u+=y,p.setLayout(g,!0)}n[s[r]]+=h,n[l[r]]-=h}function W_(t){return t.get(R_)?t.get(z_):0}function H_(t){return"_EC_"+t}pp(S_),dp(B_);function Z_(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var U_=Z_.prototype;function X_(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Y_(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}U_.type="graph",U_.isDirected=function(){return this._directed},U_.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[H_(t)]){var i=new X_(t,e);return(i.hostGraph=this).nodes.push(i),n[H_(t)]=i}D&&console.error("Graph nodes have duplicate name or id")},U_.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},U_.getNodeById=function(t){return this._nodesMap[H_(t)]},U_.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),X_.isInstance(t)||(t=i[H_(t)]),X_.isInstance(e)||(e=i[H_(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new Y_(t,e,n);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},U_.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},U_.getEdge=function(t,e){X_.isInstance(t)&&(t=t.id),X_.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},U_.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&t.call(e,n[o],o)},U_.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&0<=n[o].node1.dataIndex&&0<=n[o].node2.dataIndex&&t.call(e,n[o],o)},U_.breadthFirstTraverse=function(t,e,n,i){if(X_.isInstance(e)||(e=this._nodesMap[H_(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(i,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[o],a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(i,h,s))return;r.push(h),h.__visited=!0}}}},U_.update=function(){for(var t=this.data,n=this.edgeData,e=this.nodes,i=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;n.filterSelf(function(t){var e=i[n.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(o=0,a=n.count();o<a;o++)i[n.getRawIndex(o)].dataIndex=o},U_.clone=function(){for(var t=new Z_(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var o=n[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},X_.prototype={constructor:X_,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 this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},Y_.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function j_(n,i){return{getValue:function(t){var e=this[n][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[n][i].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}}b(X_,j_("hostGraph","data")),b(Y_,j_("hostGraph","edgeData")),Z_.Node=X_,Z_.Edge=Y_,ta(X_),ta(Y_);function q_(t,e,n,i,o){for(var a=new Z_(i),r=0;r<t.length;r++)a.addNode(Z(t[r].id,t[r].name,r),r);for(var s=[],l=[],u=0,r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(Z(h.id,c+" > "+d)),u++)}var p,g,f,m,v=n.get("coordinateSystem");"cartesian2d"===v||"polar"===v?m=rg(t,n):(M(g=(p=Ju.get(v))&&"view"!==p.type&&p.dimensions||[],"value")<0&&g.concat(["value"]),f=Qp(t,{coordDimensions:g}),(m=new Bp(f,n)).initData(t));var y=new Bp(["value"],n);return y.initData(l,s),o&&o(m,y),dx({mainData:m,struct:a,structAttr:"graph",datas:{node:m,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var K_=yp({type:"series.graph",init:function(t){K_.superApply(this,"init",arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new Hv(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){K_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){K_.superApply(this,"mergeDefaultAndTheme",arguments),Oo(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],n=t.data||t.nodes||[],l=this;if(n&&e)return q_(n,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=l.getModel("edgeLabel"),i=new yl({label:n.option},n.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new yl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?i:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return K_.superApply(this,"formatTooltip",arguments);var i=this.getData(),o=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),r=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=jl(l.join(" > ")),o.value&&(l+=" : "+jl(o.value)),l},_updateCategoriesData:function(){var t=z(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new Bp(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return K_.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),$_=Jr.prototype,J_=ns.prototype;function Q_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var tw=xs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Q_(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:$_.buildPath,_buildPathCurve:J_.buildPath,pointAt:function(t){return this[Q_(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:$_.pointAt,_pointAtCurve:J_.pointAt,tangentAt:function(t){var e=this.shape,n=Q_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(n,n)},_tangentAtCurve:J_.tangentAt}),ew=["fromSymbol","toSymbol"];function nw(t){return"_"+t+"Type"}function iw(t,e,n){var i=e.getItemVisual(n,"color"),o=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(o&&"none"!==o){C(a)||(a=[a,a]);var r=gf(o,-a[0]/2,-a[1]/2,a[0],a[1],i);return r.name=t,r}}function ow(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var n=e[2];n?(t.cpx1=n[0],t.cpy1=n[1]):(t.cpx1=NaN,t.cpy1=NaN)}function aw(t,e,n){In.call(this),this._createLine(t,e,n)}var rw=aw.prototype;function sw(t){this._ctor=t||aw,this.group=new In}rw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,o=this.parent;o;)o.scale&&(i/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r,s,l,u,h=a.shape.percent,c=a.pointAt(0),d=a.pointAt(h),p=dt([],d,c);if(mt(p,p),t&&(t.attr("position",c),g=a.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(g[1],g[0])),t.attr("scale",[i*h,i*h])),e&&(e.attr("position",d),g=a.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(g[1],g[0])),e.attr("scale",[i*h,i*h])),!n.ignore){n.attr("position",d);var g,f=n.__labelDistance,m=f[0]*i,v=f[1]*i,y=h/2,x=[(g=a.tangentAt(y))[1],-g[0]],_=a.pointAt(y);0<x[1]&&(x[0]=-x[0],x[1]=-x[1]);var w,b,S=g[0]<0?-1:1;switch("start"!==n.__position&&"end"!==n.__position&&(w=-Math.atan2(g[1],g[0]),d[0]<c[0]&&(w=Math.PI+w),n.attr("rotation",w)),n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-v,l="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=v,l="top";break;default:b=0,l="middle"}switch(n.__position){case"end":r=[p[0]*m+d[0],p[1]*v+d[1]],s=.8<p[0]?"left":p[0]<-.8?"right":"center",l=.8<p[1]?"top":p[1]<-.8?"bottom":"middle";break;case"start":r=[-p[0]*m+c[0],-p[1]*v+c[1]],s=.8<p[0]?"right":p[0]<-.8?"left":"center",l=.8<p[1]?"bottom":p[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r=[m*S+c[0],c[1]+b],s=g[0]<0?"right":"left",u=[-m*S,-b];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r=[_[0],_[1]+b],s="center",u=[0,-b];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r=[-m*S+d[0],d[1]+b],s=0<=g[0]?"right":"left",u=[m*S,-b]}n.attr({style:{textVerticalAlign:n.__verticalAlign||l,textAlign:n.__textAlign||s},position:r,scale:[i,i],origin:u})}}}},rw._createLine=function(n,i,t){var e,o,a=n.hostModel,r=n.getItemLayout(i),s=(e=r,ow((o=new tw({name:"line",subPixelOptimize:!0})).shape,e),o);s.shape.percent=0,nl(s,{shape:{percent:1}},a,i),this.add(s);var l=new Er({name:"label",lineLabelOriginalOpacity:1});this.add(l),R(ew,function(t){var e=iw(t,n,i);this.add(e),this[nw(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},rw.updateData=function(o,a,t){var e=o.hostModel,n=this.childOfName("line"),i=o.getItemLayout(a),r={shape:{}};ow(r.shape,i),el(n,r,e,a),R(ew,function(t){var e,n=o.getItemVisual(a,t),i=nw(t);this[i]!==n&&(this.remove(this.childOfName(t)),e=iw(t,o,a),this.add(e)),this[i]=n},this),this._updateCommonStl(o,a,t)},rw._updateCommonStl=function(t,e,n){var i,o=t.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,s=n&&n.hoverLineStyle,l=n&&n.labelModel,u=n&&n.hoverLabelModel;n&&!t.hasItemOption||(r=(i=t.getItemModel(e)).getModel("lineStyle").getLineStyle(),s=i.getModel("emphasis.lineStyle").getLineStyle(),l=i.getModel("label"),u=i.getModel("emphasis.label"));var h=t.getItemVisual(e,"color"),c=X(t.getItemVisual(e,"opacity"),r.opacity,1);a.useStyle(O({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},r)),a.hoverStyle=s,R(ew,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,p,g,f=l.getShallow("show"),m=u.getShallow("show"),v=this.childOfName("label");(f||m)&&(g=h||"#000",null==(p=o.getFormattedLabel(e,"normal",t.dataType))&&(p=null==(d=o.getRawValue(e))?t.getName(e):isFinite(d)?Tl(d):d));var y,x=f?p:null,_=m?U(o.getFormattedLabel(e,"emphasis",t.dataType),p):null,w=v.style;null==x&&null==_||(Ys(v.style,l,{text:x},{autoColor:g}),v.__textAlign=w.textAlign,v.__verticalAlign=w.textVerticalAlign,v.__position=l.get("position")||"middle",C(y=l.get("distance"))||(y=[y,y]),v.__labelDistance=y),v.hoverStyle=null!=_?{text:_,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},v.ignore=!f&&!m,Fs(this)},rw.highlight=function(){this.trigger("emphasis")},rw.downplay=function(){this.trigger("normal")},rw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},rw.setLinePoints=function(t){var e=this.childOfName("line");ow(e.shape,t),e.dirty()},w(aw,In);var lw=sw.prototype;function uw(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")}}function hw(t){return isNaN(t[0])||isNaN(t[1])}function cw(t){return!hw(t[0])&&!hw(t[1])}function dw(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o}function pw(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}lw.isPersistent=function(){return!0},lw.updateData=function(n){var i=this,e=i.group,o=i._lineData;i._lineData=n,o||e.removeAll();var a=uw(n);n.diff(o).add(function(t){!function(t,e,n,i){if(!cw(e.getItemLayout(n)))return;var o=new t._ctor(e,n,i);e.setItemGraphicEl(n,o),t.group.add(o)}(i,n,t,a)}).update(function(t,e){!function(t,e,n,i,o,a){var r=e.getItemGraphicEl(i);if(!cw(n.getItemLayout(o)))return t.group.remove(r);r?r.updateData(n,o,a):r=new t._ctor(n,o,a);n.setItemGraphicEl(o,r),t.group.add(r)}(i,o,n,e,t,a)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},lw.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},lw.incrementalPrepareUpdate=function(t){this._seriesScope=uw(t),this._lineData=null,this.group.removeAll()},lw.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&0<e.animators.length||(t.incremental=t.useHoverLayer=!0)}for(var i,o=t.start;o<t.end;o++){cw(e.getItemLayout(o))&&((i=new this._ctor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))}},lw.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},lw._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var gw=[],fw=[],mw=[],vw=Ma,yw=_t,xw=Math.abs;function _w(t,e,n){for(var i,o=t[0],a=t[1],r=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1){gw[0]=vw(o[0],a[0],r[0],h),gw[1]=vw(o[1],a[1],r[1],h),(p=xw(yw(gw,e)-l))<s&&(s=p,i=h)}for(var c=0;c<32;c++){var d=i+u;fw[0]=vw(o[0],a[0],r[0],i),fw[1]=vw(o[1],a[1],r[1],i),mw[0]=vw(o[0],a[0],r[0],d),mw[1]=vw(o[1],a[1],r[1],d);var p=yw(fw,e)-l;if(xw(p)<.01)break;var g=yw(mw,e)-l;u/=2,p<0?0<=g?i+=u:i-=u:0<=g?i-=u:i+=u}return i}function ww(t,l){var u=[],h=Aa,c=[[],[],[]],d=[[],[]],p=[];l/=2,t.eachEdge(function(t,e){var n=t.getLayout(),i=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");n.__original||(n.__original=[lt(n[0]),lt(n[1])],n[2]&&n.__original.push(lt(n[2])));var a,r,s=n.__original;null!=n[2]?(st(c[0],s[0]),st(c[1],s[2]),st(c[2],s[1]),i&&"none"!==i&&(r=pw(t.node1),a=_w(c,s[0],r*l),h(c[0][0],c[1][0],c[2][0],a,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],a,u),c[0][1]=u[3],c[1][1]=u[4]),o&&"none"!==o&&(r=pw(t.node2),a=_w(c,s[1],r*l),h(c[0][0],c[1][0],c[2][0],a,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],a,u),c[1][1]=u[1],c[2][1]=u[2]),st(n[0],c[0]),st(n[1],c[2]),st(n[2],c[1])):(st(d[0],s[0]),st(d[1],s[1]),dt(p,d[1],d[0]),mt(p,p),i&&"none"!==i&&(r=pw(t.node1),ct(d[0],d[0],p,r*l)),o&&"none"!==o&&(r=pw(t.node2),ct(d[1],d[1],p,-r*l)),st(n[0],d[0]),st(n[1],d[1]))})}var bw="__focusNodeAdjacency",Sw="__unfocusNodeAdjacency",Mw=["itemStyle","opacity"],Iw=["lineStyle","opacity"];function Tw(t,e){var n=t.getVisual("opacity");return null!=n?n:t.getModel().get(e)}function Aw(t,e,n){var i=t.getGraphicEl(),o=Tw(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){var e;t.isGroup||(null!=(e=t.lineLabelOriginalOpacity)&&null==n||(e=o),t.setStyle("opacity",e))})}function Dw(t,e){var n=Tw(t,e),i=t.getGraphicEl();i.traverse(function(t){t.isGroup||t.setStyle("opacity",n)}),i.highlight&&i.highlight()}xp({type:"graph",init:function(t,e){var n=new qf,i=new sw,o=this.group;this._controller=new Ny(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(o,t,a){var r=this,e=o.coordinateSystem;this._model=o;var n,i=this._symbolDraw,s=this._lineDraw,l=this.group;"view"===e.type&&(n={position:e.position,scale:e.scale},this._firstRender?l.attr(n):el(l,n,o)),ww(o.getGraph(),dw(o));var u=o.getData();i.updateData(u);var h=o.getEdgeData();s.updateData(h),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var c=o.forceLayout,d=o.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e);t.off("drag").off("dragend");var i=n.get("draggable");i&&t.on("drag",function(){c&&(c.warmUp(),this._layouting||this._startForceLayoutIteration(c,d),c.setFixed(e),u.setItemLayout(e,t.position))},this).on("dragend",function(){c&&c.setUnfixed(e)},this),t.setDraggable(i&&c),t[bw]&&t.off("mouseover",t[bw]),t[Sw]&&t.off("mouseout",t[Sw]),n.get("focusNodeAdjacency")&&(t.on("mouseover",t[bw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[Sw]=function(){r._dispatchUnfocus(a)}))},this),u.graph.eachEdge(function(t){var e=t.getGraphicEl();e[bw]&&e.off("mouseover",e[bw]),e[Sw]&&e.off("mouseout",e[Sw]),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e[bw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e[Sw]=function(){r._dispatchUnfocus(a)}))});var p="circular"===o.get("layout")&&o.get("circular.rotateLabel"),g=u.getLayout("cx"),f=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var n,i,o,a,r=u.getItemModel(e).get("label.rotate")||0,s=t.getSymbolPath();p?(n=u.getItemLayout(e),(i=Math.atan2(n[1]-f,n[0]-g))<0&&(i=2*Math.PI+i),(o=n[0]<g)&&(i-=Math.PI),Xs(s,{textRotation:-i,textPosition:a=o?"left":"right",textOrigin:"center"},{textPosition:a})):Xs(s,{textRotation:r*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){n._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,n,i){var o=t.getData().graph,a=i.dataIndex,r=i.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){Aw(t,Mw,.1)}),o.eachEdge(function(t){Aw(t,Iw,.1)}),s&&(Dw(s,Mw),R(s.edges,function(t){t.dataIndex<0||(Dw(t,Iw),Dw(t.node1,Mw),Dw(t.node2,Mw))})),l&&(Dw(l,Iw),Dw(l.node1,Mw),Dw(l.node2,Mw)))},unfocusNodeAdjacency:function(t,e,n,i){var o=t.getData().graph;o.eachNode(function(t){Aw(t,Mw)}),o.eachEdge(function(t){Aw(t,Iw)})},_startForceLayoutIteration:function(t,n){var i=this;!function e(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Uy(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Wy(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Hy(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),ww(o.getGraph(),dw(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),n=dw(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},updateLayout:function(t){ww(t.getGraph(),dw(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),hp({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),hp({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});hp({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=Qy(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Cw(t){return t instanceof Array||(t=[t,t]),t}function Lw(t){var e,n=t.coordinateSystem;n&&"view"!==n.type||((e=t.getGraph()).eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),kw(e))}function kw(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=lt(t.node1.getLayout()),i=lt(t.node2.getLayout()),o=[n,i];+e&&o.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(o)})}var Pw=Math.PI,Nw=[];function Ow(t,e){var n,i,o,s,l,a,r,u=t.coordinateSystem;u&&"view"!==u.type||(n=u.getBoundingRect(),o=(i=t.getData()).graph,s=n.width/2+n.x,l=n.height/2+n.y,a=Math.min(n.width,n.height)/2,r=i.count(),i.setLayout({cx:s,cy:l}),r&&(Ew[e](t,u,o,i,a,s,l,r),o.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=lt(t.node1.getLayout()),o=lt(t.node2.getLayout()),a=(i[0]+o[0])/2,r=(i[1]+o[1])/2;+n&&(e=[s*(n*=3)+a*(1-n),l*n+r*(1-n)]),t.setLayout([i,o,e])})))}var Ew={value:function(t,e,n,i,o,a,r,s){var l=0,u=i.getSum("value"),h=2*Math.PI/(u||s);n.eachNode(function(t){var e=t.getValue("value"),n=h*(u?e:1)/2;l+=n,t.setLayout([o*Math.cos(l)+a,o*Math.sin(l)+r]),l+=n})},symbolSize:function(t,e,n,i,o,a,r,s){var l=0;Nw.length=s;var u=dw(t);n.eachNode(function(t){var e=pw(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var n=Math.asin(e/2/o);isNaN(n)&&(n=Pw/2),Nw[t.dataIndex]=n,l+=2*n});var h=(2*Pw-l)/s/2,c=0;n.eachNode(function(t){var e=h+Nw[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e})}},Rw=ct;up(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,o=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var n=0;n<a.length;n++)if(!a[n].isSelected(e))return!1}return!0})},this)}),pp(Mm("graph","circle",null)),pp(function(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),o=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var n=l.getItemModel(t),i=n.get("itemStyle.color")||s.getColorFromPalette(e,h);l.setItemVisual(t,"color",i);for(var o=["opacity","symbol","symbolSize","symbolKeepAspect"],a=0;a<o.length;a++){var r=n.getShallow(o[a],!0);null!=r&&l.setItemVisual(t,o[a],r)}}),l.count()&&o.each(function(t){var e=o.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);for(var n=["color","opacity","symbol","symbolSize","symbolKeepAspect"],i=0;i<n.length;i++)null==o.getItemVisual(t,n[i],!0)&&o.setItemVisual(t,n[i],l.getItemVisual(e,n[i]))}})})}),pp(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=Cw(t.get("edgeSymbol")),n=Cw(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",n&&n[0]),l.setVisual("toSymbolSize",n&&n[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(h)),l.each(function(t){var e=l.getItemModel(t),n=s.getEdgeByIndex(t),i=Cw(e.getShallow("symbol",!0)),o=Cw(e.getShallow("symbolSize",!0)),a=e.get(u),r=e.get(h);switch(a){case"source":a=n.node1.getVisual("color");break;case"target":a=n.node2.getVisual("color")}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),o[0]&&n.setVisual("fromSymbolSize",o[0]),o[1]&&n.setVisual("toSymbolSize",o[1]),n.setVisual("color",a),n.setVisual("opacity",r)})})}),dp(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];R(n.dimensions,function(t){o=o.concat(i.mapDimension(t,!0))});for(var a=0;a<i.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=i.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?i.setItemLayout(a,n.dataToPoint(r)):i.setItemLayout(a,[NaN,NaN])}kw(i.graph)}else e&&"none"!==e||Lw(t)})}),dp(_d.VISUAL.POST_CHART_LAYOUT,function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Ow(t,"symbolSize")})}),dp(function(t){t.eachSeriesByType("graph",function(t){var c,d,p,e,n,i,o,a,r,s,l,u,h,g,f,m=t.coordinateSystem;m&&"view"!==m.type||("force"===t.get("layout")?(c=t.preservedPoints||{},d=t.getGraph(),p=d.data,e=d.edgeData,i=(n=t.getModel("force")).get("initLayout"),t.preservedPoints?p.each(function(t){var e=p.getId(t);p.setItemLayout(t,c[e]||[NaN,NaN])}):i&&"none"!==i?"circular"===i&&Ow(t,"value"):Lw(t),o=p.getDataExtent("value"),a=e.getDataExtent("value"),r=n.get("repulsion"),s=n.get("edgeLength"),C(r)||(r=[r,r]),C(s)||(s=[s,s]),s=[s[1],s[0]],l=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),i=Ml(t,o,r);return isNaN(i)&&(i=(r[0]+r[1])/2),{w:i,rep:i,fixed:p.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),u=e.mapArray("value",function(t,e){var n=d.getEdgeByIndex(e),i=Ml(t,a,s);isNaN(i)&&(i=(s[0]+s[1])/2);var o=n.getModel();return{n1:l[n.node1.dataIndex],n2:l[n.node2.dataIndex],d:i,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),h=(m=t.coordinateSystem).getBoundingRect(),g=function(p,g,t){for(var e=t.rect,n=e.width,i=e.height,f=[e.x+n/2,e.y+i/2],m=null==t.gravity?.1:t.gravity,o=0;o<p.length;o++){var a=p[o];a.p||(a.p=rt(n*(Math.random()-.5)+f[0],i*(Math.random()-.5)+f[1])),a.pp=lt(a.p),a.edges=null}var r=null==t.friction?.6:t.friction,v=r;return{warmUp:function(){v=.8*r},setFixed:function(t){p[t].fixed=!0},setUnfixed:function(t){p[t].fixed=!1},step:function(t){for(var e=[],n=p.length,i=0;i<g.length;i++){var o,a=g[i];a.ignoreForceLayout||(l=a.n1,dt(e,(r=a.n2).p,l.p),s=pt(e)-a.d,o=r.w/(l.w+r.w),isNaN(o)&&(o=0),mt(e,e),l.fixed||Rw(l.p,l.p,e,o*s*v),r.fixed||Rw(r.p,r.p,e,-(1-o)*s*v))}for(i=0;i<n;i++){(c=p[i]).fixed||(dt(e,f,c.p),Rw(c.p,c.p,e,m*v))}for(i=0;i<n;i++)for(var r,s,l=p[i],u=i+1;u<n;u++){dt(e,(r=p[u]).p,l.p),0===(s=pt(e))&&(ut(e,Math.random()-.5,Math.random()-.5),s=1);var h=(l.rep+r.rep)/s/s;l.fixed||Rw(l.pp,l.pp,e,h),r.fixed||Rw(r.pp,r.pp,e,-h)}for(var c,d=[],i=0;i<n;i++){(c=p[i]).fixed||(dt(d,c.p,c.pp),Rw(c.p,c.p,d,v),st(c.pp,c.p))}v*=.992,t&&t(p,g,v<.01)}}}(l,u,{rect:h,gravity:n.get("gravity"),friction:n.get("friction")}),f=g.step,g.step=function(h){for(var t=0,e=l.length;t<e;t++)l[t].fixed&&st(l[t].p,d.getNodeByIndex(t).getLayout());f(function(t,e,n){for(var i=0,o=t.length;i<o;i++)t[i].fixed||d.getNodeByIndex(i).setLayout(t[i].p),c[p.getId(i)]=t[i].p;for(i=0,o=e.length;i<o;i++){var a=e[i],r=d.getEdgeByIndex(i),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],st(u[0],s),st(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(n)})},t.forceLayout=g,t.preservedPoints=c,g.step()):t.forceLayout=null)})}),cp("graphView",{create:function(t,f){var m=[];return t.eachSeriesByType("graph",function(t){var n,e,i,o,a,r,s,l,u,h,c,d,p,g=t.get("coordinateSystem");g&&"view"!==g||(e=[],i=[],Ra((n=t.getData()).mapArray(function(t){var e=n.getItemModel(t);return[+e.get("x"),+e.get("y")]}),e,i),i[0]-e[0]==0&&(i[0]+=1,--e[0]),i[1]-e[1]==0&&(i[1]+=1,--e[1]),o=(i[0]-e[0])/(i[1]-e[1]),c=f,d=o,(p=t.getBoxLayoutParams()).aspect=d,a=cu(p,{width:c.getWidth(),height:c.getHeight()}),isNaN(o)&&(e=[a.x,a.y],i=[a.x+a.width,a.y+a.height]),r=i[0]-e[0],s=i[1]-e[1],l=a.width,u=a.height,(h=t.coordinateSystem=new nx).zoomLimit=t.get("scaleLimit"),h.setBoundingRect(e[0],e[1],r,s),h.setViewRect(a.x,a.y,l,u),h.setCenter(t.get("center")),h.setZoom(t.get("zoom")),m.push(h))}),m}});Kh.extend({type:"series.gauge",getInitialData:function(t,e){return Fv(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,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 zw=vr.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-n(r)*a*(o/3<=a?1:2),l=e.y-i(r)*a*(o/3<=a?1:2),r=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(r)*a,e.y+i(r)*a),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(r)*a,e.y-i(r)*a),t.lineTo(s,l)}});function Bw(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var Vw=2*Math.PI,Gw=(uc.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i,o,a,r,s,l,u=t.get("axisLine.lineStyle.color"),h=(o=n,a=(i=t).get("center"),r=o.getWidth(),s=o.getHeight(),l=Math.min(r,s),{cx:Il(a[0],o.getWidth()),cy:Il(a[1],o.getHeight()),r:Il(i.get("radius"),l/2)});this._renderMain(t,e,n,u,h)},dispose:function(){},_renderMain:function(t,e,n,i,o){for(var a=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((f=-t.get("endAngle")/180*Math.PI)-u)%Vw,c=u,d=s.get("width"),p=r.get("show"),g=0;p&&g<i.length;g++){var f,m=Math.min(Math.max(i[g][0],0),1),v=new Vr({shape:{startAngle:c,endAngle:f=u+h*m,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});v.setStyle({fill:i[g][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=f}function y(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]}var x;l||(x=u,u=f,f=x),this._renderTicks(t,e,n,y,o,u,f,l),this._renderPointer(t,e,n,y,o,u,f,l),this._renderTitle(t,e,n,y,o),this._renderDetail(t,e,n,y,o)},_renderTicks:function(t,e,n,i,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),p=+t.get("max"),g=t.getModel("splitLine"),f=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=f.get("splitNumber"),x=Il(g.get("length"),c),_=Il(f.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=g.getModel("lineStyle").getLineStyle(),I=f.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A,D,C,L,k=Math.cos(w),P=Math.sin(w);if(g.get("show")&&(A=new Jr({shape:{x1:k*c+u,y1:P*c+h,x2:k*(c-x)+u,y2:P*(c-x)+h},style:M,silent:!0}),"auto"===M.stroke&&A.setStyle({stroke:i(T/v)}),l.add(A)),m.get("show")&&(D=Bw(Tl(T/v*(p-d)+d),m.get("formatter")),C=m.get("distance"),L=i(T/v),l.add(new Er({style:Ys({},m,{text:D,x:k*(c-x-C)+u,y:P*(c-x-C)+h,textVerticalAlign:P<-.4?"top":.4<P?"bottom":"middle",textAlign:k<-.4?"left":.4<k?"right":"center"},{autoColor:L}),silent:!0}))),f.get("show")&&T!==v){for(var N=0;N<=y;N++){var k=Math.cos(w),P=Math.sin(w),O=new Jr({shape:{x1:k*c+u,y1:P*c+h,x2:k*(c-_)+u,y2:P*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:i((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(i,t,e,o,a,n,r,s){var l,u,h,c,d=this.group,p=this._data;i.get("pointer.show")?(l=[+i.get("min"),+i.get("max")],u=[n,r],h=i.getData(),c=h.mapDimension("value"),h.diff(p).add(function(t){var e=new zw({shape:{angle:n}});nl(e,{shape:{angle:Ml(h.get(c,t),l,u,!0)}},i),d.add(e),h.setItemGraphicEl(t,e)}).update(function(t,e){var n=p.getItemGraphicEl(e);el(n,{shape:{angle:Ml(h.get(c,t),l,u,!0)}},i),d.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=p.getItemGraphicEl(t);d.remove(e)}).execute(),h.eachItemGraphicEl(function(t,e){var n=h.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Il(i.get("width"),a.r),r:Il(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(Ml(h.get(c,e),l,[0,1],!0))),Fs(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=h):p&&p.eachItemGraphicEl(function(t){d.remove(t)})},_renderTitle:function(t,e,n,i,o){var a,r,s,l,u,h,c=t.getData(),d=c.mapDimension("value"),p=t.getModel("title");p.get("show")&&(a=p.get("offsetCenter"),r=o.cx+Il(a[0],o.r),s=o.cy+Il(a[1],o.r),l=+t.get("min"),u=+t.get("max"),h=i(Ml(t.getData().get(d,0),[l,u],[0,1],!0)),this.group.add(new Er({silent:!0,style:Ys({},p,{x:r,y:s,text:c.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:h,forceRich:!0})})))},_renderDetail:function(t,e,n,i,o){var a,r,s,l,u,h,c,d,p=t.getModel("detail"),g=+t.get("min"),f=+t.get("max");p.get("show")&&(a=p.get("offsetCenter"),r=o.cx+Il(a[0],o.r),s=o.cy+Il(a[1],o.r),l=Il(p.get("width"),o.r),u=Il(p.get("height"),o.r),d=i(Ml(c=(h=t.getData()).get(h.mapDimension("value"),0),[g,f],[0,1],!0)),this.group.add(new Er({silent:!0,style:Ys({},p,{x:r,y:s,text:Bw(c,p.get("formatter")),textWidth:isNaN(l)?null:l,textHeight:isNaN(u)?null:u,textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})})))}}),yp({type:"series.funnel",init:function(t){Gw.superApply(this,"init",arguments),this.legendVisualProvider=new Hv(N(this.getData,this),N(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Fv(this,{coordDimensions:["value"],encodeDefaulter:B(Fu,this)})},_defaultLabelLine:function(t){Oo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=Gw.superCall(this,"getDataParams",t),i=e.mapDimension("value"),o=e.getSum(i);return n.percent=o?+(e.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function Fw(t,e){In.call(this);var n=new Hr,i=new Zr,o=new Er;this.add(n),this.add(i),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(i.ignore=i.hoverIgnore,o.ignore=o.hoverIgnore):(i.ignore=i.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(t,e,!0)}var Ww=Fw.prototype,Hw=["itemStyle","opacity"];Ww.updateData=function(t,e,n){var i=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=null==(s=t.getItemModel(e).get(Hw))?1:s;i.useStyle({}),n?(i.setShape({points:r.points}),i.setStyle({opacity:0}),nl(i,{style:{opacity:s}},o,e)):el(i,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");i.setStyle(O({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Fs(this)},Ww._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");el(n,{shape:{points:r.linePoints||r.linePoints}},o,e),el(i,{style:{x:r.x,y:r.y}},o,e),i.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");Us(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!c.get("show"),n.setStyle({stroke:s}),n.setStyle(h.getModel("lineStyle").getLineStyle()),n.hoverStyle=c.getModel("lineStyle").getLineStyle()},w(Fw,In);uc.extend({type:"funnel",render:function(t,e,n){var i=t.getData(),o=this._data,a=this.group;i.diff(o).add(function(t){var e=new Fw(i,t);i.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var n=o.getItemGraphicEl(e);n.updateData(i,t),a.add(n),i.setItemGraphicEl(t,n)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});pp(Kv("funnel")),dp(function(t,S,e){t.eachSeriesByType("funnel",function(t){var e,o=t.getData(),a=o.mapDimension("value"),n=t.get("sort"),r=(e=S,cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?i[t]-i[e]:i[e]-i[t]}),o}(o,n),s=[Il(t.get("minSize"),r.width),Il(t.get("maxSize"),r.width)],l=o.getDataExtent(a),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);function c(t,e){var n,i=Ml(o.get(a,t)||0,[u,h],s,!0);switch(d){case"left":n=r.x;break;case"center":n=r.x+(r.width-i)/2;break;case"right":n=r.x+r.width-i}return[[n,e],[n+i,e]]}var d=t.get("funnelAlign"),p=t.get("gap"),g=(r.height-p*(o.count()-1))/o.count(),f=r.y;"ascending"===n&&(g=-g,p=-p,f+=r.height,i=i.reverse());for(var m,v=0;v<i.length;v++){var y=i[v],x=i[v+1],_=o.getItemModel(y).get("itemStyle.height");null==_?_=g:(_=Il(_,r.height),"ascending"===n&&(_=-_));var w=c(y,f),b=c(x,f+_);f+=_+p,o.setItemLayout(y,{points:w.concat(b.slice().reverse())})}(m=o).each(function(t){var e,n,i,o,a,r,s,l,u=m.getItemModel(t),h=u.getModel("label").get("position"),c=u.getModel("labelLine"),d=m.getItemLayout(t),p=d.points,g="inner"===h||"inside"===h||"center"===h||"insideLeft"===h||"insideRight"===h;g?(r="insideLeft"===h?(e=(p[0][0]+p[3][0])/2+5,l=(p[0][1]+p[3][1])/2,"left"):"insideRight"===h?(e=(p[1][0]+p[2][0])/2-5,l=(p[1][1]+p[2][1])/2,"right"):(e=(p[0][0]+p[1][0]+p[2][0]+p[3][0])/4,l=(p[0][1]+p[1][1]+p[2][1]+p[3][1])/4,"center"),s=[[e,l],[e,l]]):(a=c.get("length"),r="left"===h?(n=(p[3][0]+p[0][0])/2,i=(p[3][1]+p[0][1])/2,e=(o=n-a)-5,"right"):"right"===h?(n=(p[1][0]+p[2][0])/2,i=(p[1][1]+p[2][1])/2,e=(o=n+a)+5,"left"):"rightTop"===h?(n=p[1][0],i=p[1][1],e=(o=n+a)+5,"top"):"rightBottom"===h?(n=p[2][0],i=p[2][1],e=(o=n+a)+5,"bottom"):"leftTop"===h?(n=p[0][0],i=p[1][1],e=(o=n-a)-5,"right"):"leftBottom"===h?(n=p[3][0],i=p[2][1],e=(o=n-a)-5,"right"):(n=(p[1][0]+p[2][0])/2,i=(p[1][1]+p[2][1])/2,e=(o=n+a)+5,"left"),s=[[n,i],[o,i]],l=i),d.label={linePoints:s,x:e,y:l,verticalAlign:"middle",textAlign:r,inside:g}})})}),up(iy("funnel"));function Zw(t,e,n,i,o){Nf.call(this,t,e,n),this.type=i||"value",this.axisIndex=o}Zw.prototype={constructor:Zw,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},w(Zw,Nf);function Uw(t,e,n,i,o,a){t=t||0;var r,s=n[1]-n[0];null!=o&&(o=Yw(o,[0,s])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===i&&(r=Yw(r=Math.abs(e[1]-e[0]),[0,s]),o=a=Yw(r,[o,a]),i=0),e[0]=Yw(e[0],n),e[1]=Yw(e[1],n);var l=Xw(e,i);e[i]+=t;var u=o||0,h=n.slice();l.sign<0?h[0]+=u:h[1]-=u,e[i]=Yw(e[i],h);var c=Xw(e,i);return null!=o&&(c.sign!==l.sign||c.span<o)&&(e[1-i]=e[i]+l.sign*o),c=Xw(e,i),null!=a&&c.span>a&&(e[1-i]=e[i]+c.sign*a),e}function Xw(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0<n||!(n<0)&&e?-1:1}}function Yw(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var jw=R,qw=Math.min,Kw=Math.max,$w=Math.floor,Jw=Math.ceil,Qw=Tl,tb=Math.PI;function eb(t,e,n){this._axesMap=et(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function nb(t,e){return qw(Kw(t,e[0]),e[1])}eb.prototype={type:"parallel",constructor:eb,_init:function(t,r,e){var n=t.dimensions,s=t.parallelAxisIndex;jw(n,function(t,e){var n=s[e],i=r.getComponent("parallelAxis",n),o=this._axesMap.set(t,new Zw(t,Jg(i),[0,0],i.get("type"),n)),a="category"===o.type;o.onBand=a&&i.get("boundaryGap"),o.inverse=i.get("inverse"),(i.axis=o).model=i,o.coordinateSystem=i.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return n<=a&&a<=n+e.axisLength&&i<=r&&r<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),jw(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),$g(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,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=n[o[r]],l=[0,s],u=this.dimensions.length,h=nb(e.get("axisExpandWidth"),l),c=nb(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,p=e.get("axisExpandWindow");p?(t=nb(p[1]-p[0],l),p[1]=p[0]+t):(t=nb(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||$w(u/2))-t/2])[1]=p[0]+t);var g=(s-t)/(u-c);g<3&&(g=0);var f=[$w(Qw(p[0]/h,1))+1,Jw(Qw(p[1]/h,1))-1],m=g/h*p[0];return{layout:a,pixelDimIndex:r,layoutBase:n[i[r]],layoutLength:s,axisBase:n[i[1-r]],axisLength:n[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:p,axisCount:u,winInnerIndices:f,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),h=u.layout;t.each(function(t){var e=[0,u.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),jw(e,function(t,e){var n=(u.axisExpandable?function(t,e){var n,i,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(n=o-(r-1-t)*s,i=s);return{position:n,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:i}}:function(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}})(e,u),i={horizontal:{x:n.position,y:u.axisLength},vertical:{x:0,y:n.position}},o={horizontal:tb/2,vertical:0},a=[i[h].x+l.x,i[h].y+l.y],r=o[h],s=oe();ue(s,s,r),le(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:n.axisNameAvailableWidth,axisLabelShow:n.axisLabelShow,nameTruncateMaxWidth:n.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},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,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];R(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l,u=this.hasAxisBrushed(),h=n;h<i;h++){if(u){l="active";for(var c=e.getValues(r,h),d=0,p=a.length;d<p;d++){if("inactive"===s[d].getActiveState(c[d])){l="inactive";break}}}else l="normal";t(l,h)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(t,e){return ol([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return k(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var r,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];return u?(c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Uw(r,i,a,"all"):l="none"):(o=i[1]-i[0],(i=[Kw(0,a[1]*s/o-o/2)])[1]=qw(a[1],i[0]+o),i[0]=i[1]-o),{axisExpandWindow:i,behavior:l}}},Ju.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new eb(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,a.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0],t.coordinateSystem=e.coordinateSystem)}),a}});var ib=_u.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return oa([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=k(t);if(e)for(var n=e.length-1;0<=n;n--)Al(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});m(ib.prototype,af),Om("parallel",ib,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),_u.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:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){_u.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&m(e,t,!0),this._initDimensions()},contains:function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},setAxisExpand:function(e){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];R(I(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})}});hp({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),hp("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var ob=B,ab=R,rb=z,sb=Math.min,lb=Math.max,ub=Math.pow,hb=1e4,cb=6,db=6,pb="globalPan",gb={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},fb={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},mb={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},vb=0;function yb(t){D&&q(t),Ct.call(this),this._zr=t,this.group=new In,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,D&&this._mounted,this._uid="brushController_"+vb++,this._handlers={},ab(Zb,function(t,e){this._handlers[e]=N(t,this)},this)}function xb(t,e){var n=Xb[e.brushType].createCover(t,e);return n.__brushOption=e,bb(n,e),t.group.add(n),n}function _b(t,e){var n=Mb(e);return n.endCreating&&(n.endCreating(t,e),bb(e,e.__brushOption)),e}function wb(t,e){var n=e.__brushOption;Mb(e).updateCoverShape(t,e,n.range,n)}function bb(t,e){var n=e.z;null==n&&(n=hb),t.traverse(function(t){t.z=n,t.z2=n})}function Sb(t,e){Mb(e).updateCommon(t,e),wb(t,e)}function Mb(t){return Xb[t.__brushOption.brushType]}function Ib(t,e,n){var i,o=t._panels;if(!o)return!0;var a=t._transform;return ab(o,function(t){t.isTargetByCursor(e,n,a)&&(i=t)}),i}function Tb(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function Ab(e){var t=e._covers,n=t.length;return ab(t,function(t){e.group.remove(t)},e),t.length=0,n}function Db(t,e){var n=rb(t._covers,function(t){var e=t.__brushOption,n=k(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Cb(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Lb(e,n,t,i){var o=new In;return o.add(new Kr({name:"main",style:Ob(t),silent:!0,draggable:!0,cursor:"move",drift:ob(e,n,o,"nswe"),ondragend:ob(Db,n,{isEnd:!0})})),ab(i,function(t){o.add(new Kr({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ob(e,n,o,t),ondragend:ob(Db,n,{isEnd:!0})}))}),o}function kb(t,e,n,i){var o=i.brushStyle.lineWidth||0,a=lb(o,db),r=n[0][0],s=n[1][0],l=r-o/2,u=s-o/2,h=n[0][1],c=n[1][1],d=h-a+o/2,p=c-a+o/2,g=h-r,f=c-s,m=g+o,v=f+o;Nb(t,e,"main",r,s,g,f),i.transformable&&(Nb(t,e,"w",l,u,a,v),Nb(t,e,"e",d,u,a,v),Nb(t,e,"n",l,u,m,a),Nb(t,e,"s",l,p,m,a),Nb(t,e,"nw",l,u,a,a),Nb(t,e,"ne",d,u,a,a),Nb(t,e,"sw",l,p,a,a),Nb(t,e,"se",d,p,a,a))}function Pb(i,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Ob(t)),e.attr({silent:!a,cursor:a?"move":"default"}),ab(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),n=function t(e,n){{if(1<n.length){n=n.split("");var i=[t(e,n[0]),t(e,n[1])];return"e"!==i[0]&&"w"!==i[0]||i.reverse(),i.join("")}var o={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=al(o[n],il(e.group));return a[i]}}(i,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?fb[n]+"-resize":null})})}function Nb(t,e,n,i,o,a,r){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=Vb(t,e,[[i,o],[i+a,o+r]]),l=sb(s[0][0],s[1][0]),u=sb(s[0][1],s[1][1]),h=lb(s[0][0],s[1][0]),c=lb(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function Ob(t){return O({strokeNoScale:!0},t.brushStyle)}function Eb(t,e,n,i){var o=[sb(t,n),sb(e,i)],a=[lb(t,n),lb(e,i)];return[[o[0],a[0]],[o[1],a[1]]]}function Rb(t,e,n,i,o,a,r,s){var l=i.__brushOption,u=t(l.range),h=Bb(n,a,r);ab(o.split(""),function(t){var e=gb[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Eb(u[0][0],u[1][0],u[0][1],u[1][1])),Sb(n,i),Db(n,{isEnd:!1})}function zb(t,e,n,i,o){var a=e.__brushOption.range,r=Bb(t,n,i);ab(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Sb(t,e),Db(t,{isEnd:!1})}function Bb(t,e,n){var i=t.group,o=i.transformCoordToLocal(e,n),a=i.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function Vb(t,e,n){var i=Tb(t,e);return i&&!0!==i?i.clipPath(n,t._transform):k(n)}function Gb(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Fb(t,e,n){return t.childOfName("main").contain(e,n)}function Wb(t,e,n,i){var o,a,r,s=t._creatingCover,l=t._creatingPanel,u=t._brushOption;return t._track.push(n.slice()),function(t){var e=t._track;if(e.length){var n=e[e.length-1],i=e[0],o=n[0]-i[0],a=n[1]-i[1],r=ub(o*o+a*a,.5);return cb<r}}(t)||s?(l&&!s&&("single"===u.brushMode&&Ab(t),(a=k(u)).brushType=Hb(a.brushType,l),a.panelId=!0===l?null:l.panelId,s=t._creatingCover=xb(t,a),t._covers.push(s)),s&&(r=Xb[Hb(t._brushType,l)],s.__brushOption.range=r.getCreatingRange(Vb(t,s,t._track)),i&&(_b(t,s),r.updateCommon(t,s)),wb(t,s),o={isEnd:i})):i&&"single"===u.brushMode&&u.removeOnClick&&Ib(t,e,n)&&Ab(t)&&(o={isEnd:i,removeOnClick:!0}),o}function Hb(t,e){return"auto"===t?(D&&q(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}yb.prototype={constructor:yb,enableBrush:function(t){var e,n;return D&&q(this._mounted),this._brushType&&(function(t,e,n){var i=Py(t);i[e]===n&&(i[e]=null)}(n=(e=this)._zr,pb,e._uid),function(n,t){ab(t,function(t,e){n.off(e,t)})}(n,e._handlers),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var n=t._zr;t._enableGlobalPan||function(t,e,n){Py(t)[e]=n}(n,pb,t._uid);(function(n,t){ab(t,function(t,e){n.on(e,t)})})(n,t._handlers),t._brushType=e.brushType,t._brushOption=m(k(mb),e,!0)}(this,t),this},setPanels:function(t){var e;return t&&t.length?(e=this._panels={},R(t,function(t){e[t.panelId]=k(t)})):this._panels=null,this},mount:function(t){t=t||{},D&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){ab(this._covers,t,e)},updateCovers:function(o){D&&q(this._mounted),o=z(o,function(t){return m(k(mb),t,!0)});var n="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new wp(a,o,function(t,e){return i(t.__brushOption,e)},i).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this;function i(t,e){return(null!=t.id?t.id:n+e)+"-"+t.brushType}function t(t,e){var n,i=o[t];null!=e&&a[e]===l?r[t]=a[e]:(n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):_b(s,xb(s,i)),Sb(s,n))}},unmount:function(){if(!D||this._mounted)return this.enableBrush(!1),Ab(this),this._zr.remove(this.group),D&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},b(yb,Ct);var Zb={mousedown:function(t){var e;this._dragging?Ub(this,t):t.target&&t.target.draggable||(Gb(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=Ib(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e,n=t.offsetX,i=t.offsetY,o=this.group.transformCoordToLocal(n,i);!function(t,e,n){if(t._brushType&&(i=e,a=t._zr,!(i<0||i>a.getWidth()||o<0||o>a.getHeight()))){var i,o,a,r=t._zr,s=t._covers,l=Ib(t,e,n);if(!t._dragging)for(var u=0;u<s.length;u++){var h=s[u].__brushOption;if(l&&(!0===l||h.panelId===l.panelId)&&Xb[h.brushType].contain(s[u],n[0],n[1]))return}l&&r.setCursorStyle("crosshair")}}(this,t,o),this._dragging&&(Gb(t),(e=Wb(this,t,o,!1))&&Db(this,e))},mouseup:function(t){Ub(this,t)}};function Ub(t,e){var n,i,o,a;t._dragging&&(Gb(e),n=e.offsetX,i=e.offsetY,o=t.group.transformCoordToLocal(n,i),a=Wb(t,e,o,!0),t._dragging=!1,t._track=[],t._creatingCover=null,a&&Db(t,a))}var Xb={lineX:Yb(0),lineY:Yb(1),rect:{createCover:function(t,e){return Lb(ob(Rb,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Cb(t);return Eb(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){kb(t,e,n,i)},updateCommon:Pb,contain:Fb},polygon:{createCover:function(t,e){var n=new In;return n.add(new Zr({name:"main",style:Ob(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Hr({name:"main",draggable:!0,drift:ob(zb,t,e),ondragend:ob(Db,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:Vb(t,e,n)})},updateCommon:Pb,contain:Fb}};function Yb(s){return{createCover:function(t,e){return Lb(ob(Rb,function(t){var e=[t,[0,100]];return s&&e.reverse(),e},function(t){return t[s]}),t,e,[["w","e"],["n","s"]][s])},getCreatingRange:function(t){var e=Cb(t);return[sb(e[0][s],e[1][s]),lb(e[0][s],e[1][s])]},updateCoverShape:function(t,e,n,i){var o,a=Tb(t,e),r=[n,!0!==a&&a.getLinearBrushOtherExtent?a.getLinearBrushOtherExtent(s,t._transform):[0,[(o=t._zr).getWidth(),o.getHeight()][1-s]]];s&&r.reverse(),kb(t,e,r,i)},updateCommon:Pb,contain:Fb}}function jb(n){return n=$b(n),function(t,e){return sl(t,n)}}function qb(o,a){return o=$b(o),function(t){var e=null!=a?a:t,n=e?o.width:o.height,i=e?o.x:o.y;return[i,i+(n||0)]}}function Kb(i,o,a){return i=$b(i),function(t,e,n){return i.contain(e[0],e[1])&&!Uy(t,o,a)}}function $b(t){return Mn.create(t)}var Jb=["axisLine","axisTickLabel","axisName"],Qb=vp({type:"parallelAxis",init:function(t,e){Qb.superApply(this,"init",arguments),(this._brushController=new yb(e.getZr())).on("brush",N(this._onBrush,this))},render:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m;o=t,a=e,(r=i)&&"axisAreaSelect"===r.type&&a.findComponents({mainType:"parallelAxis",query:r})[0]===o||(this.axisModel=t,this.api=n,this.group.removeAll(),s=this._axisGroup,this._axisGroup=new In,this.group.add(this._axisGroup),t.get("show")&&(u=t,h=(l=e.getComponent("parallel",u.get("parallelIndex"))).coordinateSystem,d=(c=t.getAreaSelectStyle()).width,p=t.axis.dim,g=P({strokeContainThreshold:d},h.getAxisLayout(p)),f=new Ym(t,g),R(Jb,f.add,f),this._axisGroup.add(f.getGroup()),this._refreshBrushController(g,c,t,l,d,n),m=i&&!1===i.animation?null:t,rl(s,this._axisGroup,m)))},_refreshBrushController:function(t,e,n,i,o,a){var r,s,l=n.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,.1*Math.abs(u)),c=Mn.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:jb(c),isTargetByCursor:Kb(c,a,i),getLinearBrushOtherExtent:qb(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((s=(r=n).axis,z(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[s.dataToCoord(t[0],!0),s.dataToCoord(t[1],!0)]}})))},_onBrush:function(t,e){var n=this.axisModel,i=n.axis,o=z(t,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});!n.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},dispose:function(){this._brushController.dispose()}});vp({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},R(tS,function(t,e){n.getZr().on(e,this._handlers[e]=N(t,this))},this)),_c(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){R(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))}});var tS={mousedown:function(t){eS(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(eS(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){var e,n,i;!this._mouseDownPoint&&eS(this,"mousemove")&&("jump"===(i=(n=(e=this._model).coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY])).behavior)&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null}))}};function eS(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}lp(function(t){var i;!function(t){if(t.parallel)return;var e=!1;R(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),R(No((i=t).parallelAxis),function(t){var e,n;V(t)&&(e=t.parallelIndex||0,(n=No(i.parallel)[e])&&n.parallelAxisDefault&&m(t,n.parallelAxisDefault,!1))})}),Kh.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var n=this.getSource();return function(t,e){if(t.encodeDefine)return;var n=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!n)return;var i=t.encodeDefine=et();R(n.dimensions,function(t){var e=+t.replace("dim","");i.set(t,e)})}(n,this),rg(n,this)},getRawIndicesByActiveState:function(n){var t=this.coordinateSystem,i=this.getData(),o=[];return t.eachActiveState(i,function(t,e){n===t&&o.push(i.getRawIndex(e))}),o},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});uc.extend({type:"parallel",init:function(){this._dataGroup=new In,this.group.add(this._dataGroup),this._data,this._initialized},render:function(a,t,e,r){var n,i,o,s,l,u,h,c,d=this._dataGroup,p=a.getData(),g=this._data,f=a.coordinateSystem,m=f.dimensions,v=oS(a);p.diff(g).add(function(t){aS(iS(p,d,t,m,f),p,t,v)}).update(function(t,e){var n=g.getItemGraphicEl(e),i=nS(p,t,m,f);p.setItemGraphicEl(t,n);var o=r&&!1===r.animation?null:a;el(n,{shape:{points:i}},o,t),aS(n,p,t,v)}).remove(function(t){var e=g.getItemGraphicEl(t);d.remove(e)}).execute(),this._initialized||(this._initialized=!0,o=a,s=function(){setTimeout(function(){d.removeClipPath()})},l=(i=f).model,u=i.getRect(),h=new Kr({shape:{x:u.x,y:u.y,width:u.width,height:u.height}}),c="horizontal"===l.get("layout")?"width":"height",h.setShape(c,0),nl(h,{shape:{width:u.width,height:u.height}},o,s),n=h,d.setClipPath(n)),this._data=p},incrementalPrepareRender:function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=oS(e),s=t.start;s<t.end;s++){var l=iS(i,this._dataGroup,s,a,o);l.incremental=!0,aS(l,i,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function nS(t,e,n,i){for(var o,a=[],r=0;r<n.length;r++){var s=n[r],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(i.dataToPoint(l,s))}return a}function iS(t,e,n,i,o){var a=nS(t,n,i,o),r=new Zr({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(n,r),r}function oS(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function aS(t,e,n,i){var o=i.lineStyle;e.hasItemOption&&(o=e.getItemModel(n).getModel("lineStyle").getLineStyle()),t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(n,"color"),a.opacity=e.getItemVisual(n,"opacity"),i.smooth&&(t.shape.smooth=i.smooth)}var rS=["lineStyle","normal","opacity"];pp({seriesType:"parallel",reset:function(t,e,n){var i=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||i.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,o){h.eachActiveState(o,function(t,e){var n,i=d[t];"normal"!==t||!o.hasItemOption||null!=(n=o.getItemModel(e).get(rS,!0))&&(i=n),o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var sS=Kh.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels,a=this.levelModels={},r=0;r<o.length;r++)if(null!=o[r].depth&&0<=o[r].depth)a[o[r].depth]=new yl(o[r],this,e);else if(D)throw new Error("levels[i].depth is mandatory and should be natural number");if(i&&n)return q_(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,i){return t.customizeGetParent(function(t){var e=this.parentModel,n=e.getData().getItemLayout(i).depth;return e.levelModels[n]||this.parentModel}),t}),e.wrapMethod("getItemModel",function(t,i){return t.customizeGetParent(function(t){var e=this.parentModel,n=e.getGraph().getEdgeByIndex(i).node1.getLayout().depth;return e.levelModels[n]||this.parentModel}),t})}).data},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){if("edge"===n){var i=this.getDataParams(t,n),o=i.data,a=o.source+" -- "+o.target;return i.value&&(a+=" : "+i.value),jl(a)}if("node"!==n)return sS.superCall(this,"formatTooltip",t,e);var r=this.getGraph().getNodeByIndex(t).getLayout().value,s=this.getDataParams(t,n).data.name;return r&&(a=s+" : "+r),jl(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var n,i=sS.superCall(this,"getDataParams",t,e);return null==i.value&&"node"===e&&(n=this.getGraph().getNodeByIndex(t).getLayout().value,i.value=n),i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),lS=["itemStyle","opacity"],uS=["emphasis","itemStyle","opacity"],hS=["lineStyle","opacity"],cS=["emphasis","lineStyle","opacity"];function dS(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function pS(t,e,n){var i=t.getGraphicEl(),o=dS(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function gS(t,e){var n=dS(t,e),i=t.getGraphicEl();i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)}),i.highlight&&i.highlight()}var fS=xs({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});xp({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(w,t,i){var e,n,o,a,r=this,s=w.getGraph(),b=this.group,l=w.layoutInfo,S=l.width,M=l.height,u=w.getData(),I=w.getData("edge"),T=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[l.x,l.y]),s.eachEdge(function(t){var e=new fS;e.dataIndex=t.dataIndex,e.seriesIndex=w.seriesIndex,e.dataType="edge";var n,i,o,a,r,s,l,u,h=t.getModel("lineStyle"),c=h.get("curveness"),d=t.node1.getLayout(),p=t.node1.getModel(),g=p.get("localX"),f=p.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),y=v.get("localX"),x=v.get("localY"),_=t.getLayout();switch(e.shape.extent=Math.max(1,_.dy),u="vertical"===(e.shape.orient=T)?(n=(null!=g?g*S:d.x)+_.sy,i=(null!=f?f*M:d.y)+d.dy,o=(null!=y?y*S:m.x)+_.ty,r=n,s=i*(1-c)+(a=null!=x?x*M:m.y)*c,l=o,i*c+a*(1-c)):(n=(null!=g?g*S:d.x)+d.dx,i=(null!=f?f*M:d.y)+_.sy,r=n*(1-c)+(o=null!=y?y*S:m.x)*c,s=i,l=n*c+o*(1-c),a=(null!=x?x*M:m.y)+_.ty),e.setShape({x1:n,y1:i,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:u}),e.setStyle(h.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}Fs(e,t.getModel("emphasis.lineStyle").getItemStyle()),b.add(e),I.setItemGraphicEl(t.dataIndex,e)}),s.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),a=n.getModel("label"),r=n.getModel("emphasis.label"),s=new Kr({shape:{x:null!=i?i*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();Us(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),Fs(s,l),b.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),u.eachItemGraphicEl(function(t,n){var e=u.getItemModel(n);e.get("draggable")&&(t.drift=function(t,e){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:w.id,dataIndex:u.getRawIndex(n),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),e.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))}),I.eachItemGraphicEl(function(t,e){var n=I.getItemModel(e);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),n.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){r._focusAdjacencyDisabled||(r._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){r._focusAdjacencyDisabled||r._dispatchUnfocus(i)}))}),!this._data&&w.get("animation")&&b.setClipPath((e=b.getBoundingRect(),n=w,o=function(){b.removeClipPath()},nl(a=new Kr({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}}),{shape:{width:e.width+20}},n,o),a)),this._data=w.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,n,i){var o,a,r,s=t.getData(),l=s.graph,u=i.dataIndex,h=s.getItemModel(u),c=i.edgeDataIndex;null==u&&null==c||(o=l.getNodeByIndex(u),a=l.getEdgeByIndex(c),l.eachNode(function(t){pS(t,lS,.1)}),l.eachEdge(function(t){pS(t,hS,.1)}),o&&(gS(o,uS),"outEdges"===(r=h.get("focusNodeAdjacency"))?R(o.outEdges,function(t){t.dataIndex<0||(gS(t,cS),gS(t.node2,uS))}):"inEdges"===r?R(o.inEdges,function(t){t.dataIndex<0||(gS(t,cS),gS(t.node1,uS))}):"allEdges"===r&&R(o.edges,function(t){t.dataIndex<0||(gS(t,cS),t.node1!==o&&gS(t.node1,uS),t.node2!==o&&gS(t.node2,uS))})),a&&(gS(a,cS),gS(a.node1,uS),gS(a.node2,uS)))},unfocusNodeAdjacency:function(t,e,n,i){var o=t.getGraph();o.eachNode(function(t){pS(t,lS)}),o.eachEdge(function(t){pS(t,hS)})}}),hp({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})});function mS(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&0<=e.depth}function vS(t,l,u,h,c){var d="vertical"===c?"x":"y";R(t,function(t){var e,n;t.sort(function(t,e){return t.getLayout()[d]-e.getLayout()[d]});for(var i,o=0,a=t.length,r="vertical"===c?"dx":"dy",s=0;s<a;s++)0<(i=o-(n=t[s]).getLayout()[d])&&(e=n.getLayout()[d]+i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[d]+n.getLayout()[r]+l;if(0<(i=o-l-("vertical"===c?h:u)))for(e=n.getLayout()[d]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0),o=e,s=a-2;0<=s;--s)0<(i=(n=t[s]).getLayout()[d]+n.getLayout()[r]+l-o)&&(e=n.getLayout()[d]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[d]})}function yS(t,e){return bS(t.node2,e)*t.getValue()}function xS(t,e){return bS(t.node2,e)}function _S(t,e){return bS(t.node1,e)*t.getValue()}function wS(t,e){return bS(t.node1,e)}function bS(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function SS(t){return t.getValue()}function MS(t,e,n){for(var i=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],n);isNaN(r)||(i+=r)}return i}dp(function(t,_,e){t.eachSeriesByType("sankey",function(t){var e,n=t.get("nodeWidth"),i=t.get("nodeGap"),o=(e=_,cu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),a=(t.layoutInfo=o).width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;R(l,function(t){var e=MS(t.outEdges,SS),n=MS(t.inEdges,SS),i=t.getValue()||0,o=Math.max(e,n,i);t.setLayout({value:o},!0)});var h,c,d,p,g,f,m,v=0!==I(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),y=t.get("orient"),x=t.get("nodeAlign");d=i,f=v,function(t,e,n,i,o,a,r){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&u.push(t[d]);var p=-1;for(;u.length;){for(var g=0;g<u.length;g++){var f=u[g],m=f.hostGraph.data.getRawDataItem(f.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>p&&(p=m.depth),f.setLayout({depth:v?m.depth:c},!0),"vertical"===a?f.setLayout({dy:n},!0):f.setLayout({dx:n},!0);for(var y=0;y<f.outEdges.length;y++){var x=f.outEdges[y],_=e.indexOf(x);s[_]=0;var w=x.node2,b=t.indexOf(w);0==--l[b]&&h.indexOf(w)<0&&h.push(w)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=c-1<p?p:c-1;r&&"left"!==r&&function(t,e,n){if("right"===e){for(var i=[],o=t,a=0;o.length;){for(var r=0;r<o.length;r++){var s=o[r];s.setLayout({skNodeHeight:a},!0);for(var l=0;l<s.inEdges.length;l++){var u=s.inEdges[l];i.indexOf(u.node1)<0&&i.push(u.node1)}}o=i,i=[],++a}R(t,function(t){mS(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){R(t,function(t){mS(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,r,S);!function(t,n,i){R(t,function(t){var e=t.getLayout().depth*n;"vertical"===i?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===a?(o-n)/S:(i-n)/S,a)}(h=l,c=u,n,p=a,g=r,m=y,x),function(t,e,n,i,o,a,r){var s=function(t,e){var n=[],i="vertical"===e?"y":"x",o=jo(t,function(t){return t.getLayout()[i]});return o.keys.sort(function(t,e){return t-e}),R(o.keys,function(t){n.push(o.buckets.get(t))}),n}(t,r);(function(t,e,o,a,r,s){var l=1/0;R(t,function(t){var e=t.length,n=0;R(t,function(t){n+=t.getLayout().value});var i="vertical"===s?(a-(e-1)*r)/n:(o-(e-1)*r)/n;i<l&&(l=i)}),R(t,function(t){R(t,function(t,e){var n=t.getLayout().value*l;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),R(e,function(t){var e=t.getValue()*l;t.setLayout({dy:e},!0)})})(s,e,n,i,o,r),vS(s,o,n,i,r);for(var l=1;0<a;a--)(function(t,a,r){R(t.slice().reverse(),function(t){R(t,function(t){var e,n,i,o;t.outEdges.length&&(n=MS(t.outEdges,yS,r)/MS(t.outEdges,SS,r),isNaN(n)&&(n=(e=t.outEdges.length)?MS(t.outEdges,xS,r)/e:0),"vertical"===r?(i=t.getLayout().x+(n-bS(t,r))*a,t.setLayout({x:i},!0)):(o=t.getLayout().y+(n-bS(t,r))*a,t.setLayout({y:o},!0)))})})})(s,l*=.99,r),vS(s,o,n,i,r),function(t,a,r){R(t,function(t){R(t,function(t){var e,n,i,o;t.inEdges.length&&(n=MS(t.inEdges,_S,r)/MS(t.inEdges,SS,r),isNaN(n)&&(n=(e=t.inEdges.length)?MS(t.inEdges,wS,r)/e:0),"vertical"===r?(i=t.getLayout().x+(n-bS(t,r))*a,t.setLayout({x:i},!0)):(o=t.getLayout().y+(n-bS(t,r))*a,t.setLayout({y:o},!0)))})})}(s,l,r),vS(s,o,n,i,r)}(h,c,g,p,d,f,m),function(t,e){var n="vertical"===e?"x":"y";R(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),R(t,function(t){var e=0,n=0;R(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),R(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(h,m)})}),pp(function(t,e){t.eachSeriesByType("sankey",function(i){var o,a,t=i.getGraph().nodes;t.length&&(o=1/0,a=-1/0,R(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),R(t,function(t){var e=new l_({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:i.get("color")}).mapValueToVisual(t.getLayout().value),n=t.getModel().get("itemStyle.color");null!=n?t.setVisual("color",n):t.setVisual("color",e)}))})});var IS={_baseAxisDim:null,getInitialData:function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=a.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l,u=["x","y"],h="horizontal"===t.layout?0:1,c=this._baseAxisDim=u[h],d=u[1-h],p=[o,a],g=p[h].get("type"),f=p[1-h].get("type"),m=t.data;m&&i&&(l=[],R(m,function(t,e){var n;t.value&&C(t.value)?(n=t.value.slice(),t.value.unshift(e)):C(t)?(n=t.slice(),t.unshift(e)):n=t,l.push(n)}),t.data=l);var v=this.defaultValueDimensions,y=[{name:c,type:Tp(g),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:Tp(f),dimsDef:v.slice()}];return Fv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:B(Gu,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};b(Kh.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,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}}),IS,!0);var TS=["itemStyle"],AS=["emphasis","itemStyle"],DS=(uc.extend({type:"boxplot",render:function(t,e,n){var o=t.getData(),a=this.group,r=this._data;this._data||a.removeAll();var s="horizontal"===t.get("layout")?1:0;o.diff(r).add(function(t){var e;o.hasValue(t)&&(e=CS(o.getItemLayout(t),o,t,s,!0),o.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var n,i=r.getItemGraphicEl(e);o.hasValue(t)?(n=o.getItemLayout(t),i?LS(n,i,o,t):i=CS(n,o,t,s),a.add(i),o.setItemGraphicEl(t,i)):a.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},remove:function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:it}),vr.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])}}));function CS(t,e,n,i,o){var a,r,s=t.ends,l=new DS({shape:{points:o?(a=i,r=t,z(s,function(t){return(t=t.slice())[a]=r.initBaseline,t})):s}});return LS(t,l,e,n,o),l}function LS(t,e,n,i,o){var a=n.hostModel;(0,cl[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,i);var r=n.getItemModel(i),s=r.getModel(TS),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,Fs(e,r.getModel(AS).getItemStyle())}var kS=["itemStyle","borderColor"],PS=R;pp(function(i,t){var o=i.get("color");i.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],n=t.getData();n.setVisual({legendSymbol:"roundRect",color:t.get(kS)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get(kS,!0)})})})}),dp(function(t){var i,o,e=(i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=M(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),i);PS(e,function(n){var t=n.seriesModels;t.length&&(function(t){var e,n,i=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];{var u;"category"===i.type?n=i.getBandWidth():(u=0,PS(o,function(t){u=Math.max(u,t.getData().count())}),e=i.getExtent(),Math.abs(e[1]-e[0]))}PS(o,function(t){var e=t.get("boxWidth");C(e)||(e=[e,e]),l.push([Il(e[0],n)||0,Il(e[1],n)||0])});var h=.8*n-2,c=h/a*.3,d=(h-c*(a-1))/a,p=d/2-h/2;PS(o,function(t,e){s.push(p),p+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(n),PS(t,function(t,e){!function(t,r,e){var s=t.coordinateSystem,l=t.getData(),a=e/2,u="horizontal"===t.get("layout")?0:1,h=1-u,n=["x","y"],i=l.mapDimension(n[u]),o=l.mapDimension(n[h],!0);if(null==i||o.length<5)return;for(var c=0;c<l.count();c++){var d=l.get(i,c),p=x(d,o[2],c),g=x(d,o[0],c),f=x(d,o[1],c),m=x(d,o[3],c),v=x(d,o[4],c),y=[];_(y,f,0),_(y,m,1),y.push(g,f,v,m),w(y,g),w(y,v),w(y,p),l.setItemLayout(c,{initBaseline:p[h],ends:y})}function x(t,e,n){var i,o=l.get(e,n),a=[];return a[u]=t,a[h]=o,isNaN(t)||isNaN(o)?i=[NaN,NaN]:(i=s.dataToPoint(a))[u]+=r,i}function _(t,e,n){var i=e.slice(),o=e.slice();i[u]+=a,o[u]-=a,n?t.push(i,o):t.push(o,i)}function w(t,e){var n=e.slice(),i=e.slice();n[u]-=a,i[u]+=a,t.push(n,i)}}(t,n.boxOffsetList[e],n.boxWidthList[e])}))})}),b(Kh.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)}}),IS,!0);var NS=["itemStyle"],OS=["emphasis","itemStyle"],ES=["color","color0","borderColor","borderColor0"],RS=(uc.extend({type:"candlestick",render:function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(o){var a=o.getData(),r=this._data,s=this.group,l=a.getLayout("isSimpleBox"),u=o.get("clip",!0),t=o.coordinateSystem,h=t.getArea&&t.getArea();this._data||s.removeAll(),a.diff(r).add(function(t){if(a.hasValue(t)){var e,n=a.getItemLayout(t);if(u&&BS(h,n))return;nl(e=zS(n,0,!0),{shape:{points:n.ends}},o,t),VS(e,a,t,l),s.add(e),a.setItemGraphicEl(t,e)}}).update(function(t,e){var n,i=r.getItemGraphicEl(e);a.hasValue(t)?(n=a.getItemLayout(t),u&&BS(h,n)?s.remove(i):(i?el(i,{shape:{points:n.ends}},o,t):i=zS(n),VS(i,a,t,l),s.add(i),a.setItemGraphicEl(t,i))):s.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},_renderLarge:function(t){this._clear(),FS(t,this.group);var e=t.get("clip",!0)?vm(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var a=zS(i.getItemLayout(n));VS(a,i,n,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){FS(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:it}),vr.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))}}));function zS(t,e,n){var i,o=t.ends;return new RS({shape:{points:n?(i=t,z(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function BS(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function VS(t,e,n,i){var o=e.getItemModel(n),a=o.getModel(NS),r=e.getItemVisual(n,"color"),s=e.getItemVisual(n,"borderColor")||r,l=a.getItemStyle(ES);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=i,Fs(t,o.getModel(OS).getItemStyle())}var GS=vr.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var n,i=e.points,o=0;o<i.length;){this.__sign===i[o++]?(n=i[o++],t.moveTo(n,i[o++]),t.lineTo(n,i[o++])):o+=3}}});function FS(t,e,n){var i=t.getData(),o=i.getLayout("largePoints"),a=new GS({shape:{points:o},__sign:1});e.add(a);var r=new GS({shape:{points:o},__sign:-1});e.add(r),WS(1,a,t,i),WS(-1,r,t,i),n&&(a.incremental=!0,r.incremental=!0)}function WS(t,e,n,i){var o=0<t?"P":"N",a=i.getVisual("borderColor"+o)||i.getVisual("color"+o),r=n.getModel(NS).getItemStyle(ES);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var HS=["itemStyle","borderColor"],ZS=["itemStyle","borderColor0"],US=["itemStyle","color"],XS=["itemStyle","color0"],YS={seriesType:"candlestick",plan:rc(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var n;for(;null!=(n=t.next());){var i=e.getItemModel(n),o=e.getItemLayout(n).sign;e.setItemVisual(n,{color:a(o,i),borderColor:r(o,i)})}}};function a(t,e){return e.get(0<t?US:XS)}function r(t,e){return e.get(0<t?HS:ZS)}}},jS="undefined"!=typeof Float32Array?Float32Array:Array,qS={seriesType:"candlestick",plan:rc(),reset:function(t){var e,n,i,o,a,r,s,l,y=t.coordinateSystem,u=t.getData(),x=(n=u,o=(e=t).getBaseAxis(),a="category"===o.type?o.getBandWidth():(i=o.getExtent(),Math.abs(i[1]-i[0])/n.count()),r=Il(U(e.get("barMaxWidth"),a),a),s=Il(U(e.get("barMinWidth"),1),a),null!=(l=e.get("barWidth"))?Il(l,a):Math.max(Math.min(a/2,r),s)),h=["x","y"],_=u.mapDimension(h[0]),c=u.mapDimension(h[1],!0),w=c[0],b=c[1],S=c[2],M=c[3];if(u.setLayout({candleWidth:x,isSimpleBox:x<=1.3}),!(null==_||c.length<4))return{progress:t.pipelineContext.large?function(t,e){var n,i,o=new jS(4*t.count),a=0,r=[],s=[];for(;null!=(i=t.next());){var l=e.get(_,i),u=e.get(w,i),h=e.get(b,i),c=e.get(S,i),d=e.get(M,i);isNaN(l)||isNaN(c)||isNaN(d)?(o[a++]=NaN,a+=3):(o[a++]=KS(e,i,u,h,b),r[0]=l,r[1]=c,n=y.dataToPoint(r,null,s),o[a++]=n?n[0]:NaN,o[a++]=n?n[1]:NaN,r[1]=d,n=y.dataToPoint(r,null,s),o[a++]=n?n[1]:NaN)}e.setLayout("largePoints",o)}:function(t,e){var n;for(;null!=(n=t.next());){var i=e.get(_,n),o=e.get(w,n),a=e.get(b,n),r=e.get(S,n),s=e.get(M,n),l=Math.min(o,a),u=Math.max(o,a),h=f(l,i),c=f(u,i),d=f(r,i),p=f(s,i),g=[];m(g,c,0),m(g,h,1),g.push(v(p),v(c),v(d),v(h)),e.setItemLayout(n,{sign:KS(e,n,o,a,b),initBaseline:a<o?c[1]:h[1],ends:g,brushRect:function(t,e,n){var i=f(t,n),o=f(e,n);return i[0]-=x/2,o[0]-=x/2,{x:i[0],y:i[1],width:x,height:o[1]-i[1]}}(r,s,i)})}function f(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:y.dataToPoint(n)}function m(t,e,n){var i=e.slice(),o=e.slice();i[0]=As(i[0]+x/2,1,!1),o[0]=As(o[0]-x/2,1,!0),n?t.push(i,o):t.push(o,i)}function v(t){return t[0]=As(t[0],1),t}}}}};function KS(t,e,n,i,o){var a=!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1;return a}lp(function(t){t&&C(t.series)&&R(t.series,function(t){V(t)&&"k"===t.type&&(t.type="candlestick")})}),pp(YS),dp(qS),Kh.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return rg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});function $S(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}function JS(t,e){In.call(this);var n=new Vf(t,e),i=new In;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}var QS=JS.prototype;QS.stopEffectAnimation=function(){this.childAt(1).removeAll()},QS.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),o=0;o<3;o++){var a=gf(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),i.add(a)}$S(i,t)},QS.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],o=0;o<i.length;o++){var a=i[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}$S(n,t)},QS.highlight=function(){this.trigger("emphasis")},QS.downplay=function(){this.trigger("normal")},QS.updateData=function(t,e){var n=t.hostModel;this.childAt(0).updateData(t,e);var i,o=this.childAt(1),a=t.getItemModel(e),r=t.getItemVisual(e,"symbol"),s=(C(i=t.getItemVisual(e,"symbolSize"))||(i=[+i,+i]),i),l=t.getItemVisual(e,"color");o.attr("scale",s),o.traverse(function(t){t.attr({fill:l})});var u,h=a.getShallow("symbolOffset");h&&((u=o.position)[0]=Il(h[0],s[0]),u[1]=Il(h[1],s[1]));var c=t.getItemVisual(e,"symbolRotate");o.rotation=(c||0)*Math.PI/180||0;var d,p,g,f={};f.showEffectOn=n.get("showEffectOn"),f.rippleScale=a.get("rippleEffect.scale"),f.brushType=a.get("rippleEffect.brushType"),f.period=1e3*a.get("rippleEffect.period"),f.effectOffset=e/t.count(),f.z=a.getShallow("z")||0,f.zlevel=a.getShallow("zlevel")||0,f.symbolType=r,f.color=l,f.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===f.showEffectOn?(this._effectCfg?this.updateEffectAnimation(f):this.startEffectAnimation(f),this._effectCfg=f):(this._effectCfg=null,this.stopEffectAnimation(),d=this.childAt(0),p=function(){d.highlight(),"render"!==f.showEffectOn&&this.startEffectAnimation(f)},g=function(){d.downplay(),"render"!==f.showEffectOn&&this.stopEffectAnimation()},this.on("mouseover",p,this).on("mouseout",g,this).on("emphasis",p,this).on("normal",g,this)),this._effectCfg=f},QS.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},w(JS,In),xp({type:"effectScatter",init:function(){this._symbolDraw=new qf(JS)},render:function(t,e,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i),this.group.add(o.group)},updateTransform:function(t,e,n){var i=t.getData();this.group.dirty();var o=Im().reset(t);o.progress&&o.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=de(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),pp(Mm("effectScatter","circle")),dp(Im("effectScatter"));var tM="undefined"==typeof Uint32Array?Array:Uint32Array,eM="undefined"==typeof Float64Array?Array:Float64Array;function nM(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(D&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=z(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),f([e,t[0],t[1]])}))}var iM=Kh.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],nM(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),iM.superApply(this,"init",arguments)},mergeOption:function(t){var e;t.data=t.data||[],nM(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))),iM.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=nt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=nt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");if(D&&!(n instanceof Array&&0<n.length&&n[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(n)+". Lines must have 2d coords array in data item.");return n},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}for(var a=this._getCoordsFromItemModel(t),o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var n=t.length,i=new tM(n),o=new eM(n),a=0,r=0,s=0,l=0;l<n;){s++;var u=t[l++];i[r++]=a+e,i[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];if(o[a++]=c,o[a++]=d,n<l&&D)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){if(D&&!Ju.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var a=new Bp(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[i]:o:void 0}),a},formatTooltip:function(t){var e=this.getData().getItemModel(t),n=e.get("name");if(n)return n;var i=e.get("fromName"),o=e.get("toName"),a=[];return null!=i&&a.push(i),null!=o&&a.push(o),jl(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function oM(t,e,n){In.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}var aM=oM.prototype;function rM(t,e,n){In.call(this),this._createPolyline(t,e,n)}aM.createLine=function(t,e,n){return new aw(t,e,n)},aM._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");C(i)||(i=[i,i]);var a=n.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=gf(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.attr("scale",i),r.setColor(a),r.attr("scale",i),this._symbolType=o,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},aM._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,u,h,c,d=this.childAt(1);d&&(i=this,o=e.getItemLayout(n),a=1e3*t.get("period"),r=t.get("loop"),s=t.get("constantSpeed"),u="function"==typeof(l=Z(t.get("delay"),function(t){return t/e.count()*a/3})),d.ignore=!0,this.updateAnimationPoints(d,o),0<s&&(a=this.getLineLength(d)/s*1e3),a===this._period&&r===this._loop||(d.stopAnimation(),h=l,u&&(h=l(n)),0<d.__t&&(h=-a*d.__t),d.__t=0,c=d.animate("",r).when(a,{__t:1}).delay(h).during(function(){i.updateSymbolPosition(d)}),r||c.done(function(){i.remove(d)}),c.start()),this._period=a,this._loop=r)},aM.getLineLength=function(t){return yt(t.__p1,t.__cp1)+yt(t.__cp1,t.__p2)},aM.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]},aM.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},aM.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,a=t.position,r=[a[0],a[1]],s=Ma,l=Ia;a[0]=s(e[0],i[0],n[0],o),a[1]=s(e[1],i[1],n[1],o);var u,h=l(e[0],i[0],n[0],o),c=l(e[1],i[1],n[1],o);t.rotation=-Math.atan2(c,h)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(u=1.05*yt(r,a),t.attr("scale",[t.scale[0],u]),1===o&&(a[0]=r[0]+(a[0]-r[0])/2,a[1]=r[1]+(a[1]-r[1])/2)):1===t.__lastT?(u=2*yt(e,a),t.attr("scale",[t.scale[0],u])):t.attr("scale",this._symbolScale)),t.__lastT=t.__t,t.ignore=!1},aM.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},w(oM,In);var sM=rM.prototype;function lM(t,e,n){oM.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}sM._createPolyline=function(t,e,n){var i=t.getItemLayout(e),o=new Zr({shape:{points:i}});this.add(o),this._updateCommonStl(t,e,n)},sM.updateData=function(t,e,n){var i=t.hostModel;el(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},sM._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(O({strokeNoScale:!0,fill:"none",stroke:a},r)),i.hoverStyle=s,Fs(this)},sM.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},w(rM,In);var uM=lM.prototype;uM.createLine=function(t,e,n){return new rM(t,e,n)},uM.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];i+=yt(a,r),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}},uM.getLineLength=function(t){return this._length},uM.updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(i[r]>e);r++);r=Math.min(r-1,o-2)}wt(t.position,n[r],n[r+1],(e-i[r])/(i[r+1]-i[r]));var s=n[r+1][0]-n[r][0],l=n[r+1][1]-n[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(lM,oM);var hM=xs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o<n.length;){var a=n[o++];if(0<a){t.moveTo(n[o++],n[o++]);for(var r=1;r<a;r++)t.lineTo(n[o++],n[o++])}}else for(o=0;o<n.length;){var s,l,u=n[o++],h=n[o++],c=n[o++],d=n[o++];t.moveTo(u,h),0<i?(s=(u+c)/2-(h-d)*i,l=(h+d)/2-(c-u)*i,t.quadraticCurveTo(s,l,c,d)):t.lineTo(c,d)}},findDataIndex:function(t,e){var n=this.shape,i=n.segs,o=n.curveness;if(n.polyline)for(var a=0,r=0;r<i.length;){var s=i[r++];if(0<s)for(var l=i[r++],u=i[r++],h=1;h<s;h++){if(Qa(l,u,c=i[r++],d=i[r++]))return a}a++}else for(a=0,r=0;r<i.length;){var l=i[r++],u=i[r++],c=i[r++],d=i[r++];if(0<o){if(er(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(Qa(l,u,c,d))return a;a++}return-1}});function cM(){this.group=new In}var dM=cM.prototype;dM.isPersistent=function(){return!this._incremental},dM.updateData=function(t){this.group.removeAll();var e=new hM({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},dM.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new ss({silent:!0})),this.group.add(this._incremental)):this._incremental=null},dM.incrementalUpdate=function(t,e){var n=new hM;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},dM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},dM._setCommon=function(n,t,e){var i=t.hostModel;n.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),n.useStyle(i.getModel("lineStyle").getLineStyle()),n.style.strokeNoScale=!0;var o=t.getVisual("color");o&&n.setStyle("stroke",o),n.setStyle("fill"),e||(n.seriesIndex=i.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<e&&(n.dataIndex=e+n.__startIndex)}))},dM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var pM={seriesType:"lines",plan:rc(),reset:function(f){var m=f.coordinateSystem,v=f.get("polyline"),y=f.pipelineContext.large;return{progress:function(t,e){var n=[];if(y){var i,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=f.getLineCoordsCount(r);i=new Float32Array(o+2*a)}else i=new Float32Array(4*o);for(var s=0,l=[],r=t.start;r<t.end;r++){var u=f.getLineCoords(r,n);v&&(i[s++]=u);for(var h=0;h<u;h++)l=m.dataToPoint(n[h],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(r=t.start;r<t.end;r++){var c=e.getItemModel(r),u=f.getLineCoords(r,n),d=[];if(v)for(var p=0;p<u;p++)d.push(m.dataToPoint(n[p]));else{d[0]=m.dataToPoint(n[0]),d[1]=m.dataToPoint(n[1]);var g=c.get("lineStyle.curveness");+g&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*g,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*g])}e.setItemLayout(r,d)}}}}};function gM(t){return t instanceof Array||(t=[t,t]),t}xp({type:"lines",init:function(){},render:function(e,t,n){var i,o=e.getData(),a=this._updateLineDraw(o,e),r=e.get("zlevel"),s=e.get("effect.trailLength"),l=n.getZr(),u="svg"===l.painter.getType();u||l.painter.getLayer(r).clear(!0),null==this._lastZlevel||u||l.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&s&&(D&&(i=!1,t.eachSeries(function(t){t!==e&&t.get("zlevel")===r&&(i=!0)}),i&&console.warn("Lines with trail effect should have an individual zlevel")),u||l.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),a.updateData(o);var h=e.get("clip",!0)&&vm(e.coordinateSystem,!1,e);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=pM.reset(t);a.progress&&a.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return D&&i&&a&&console.warn("Large lines not support effect"),n&&i===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=a?new cM:new sw(o?i?lM:rM:i?oM:aw),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var fM="lineStyle.opacity".split("."),mM={seriesType:"lines",reset:function(t,e,n){var i=gM(t.get("symbol")),o=gM(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(fM)),{dataEach:a.hasItemOption?function(t,e){var n=t.getItemModel(e),i=gM(n.getShallow("symbol",!0)),o=gM(n.getShallow("symbolSize",!0)),a=n.get(fM);i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};dp(pM),pp(mM),Kh.extend({type:"series.heatmap",getInitialData:function(t,e){return rg(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Ju.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function vM(){var t=y();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}vM.prototype={update:function(t,e,n,i,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p<d;++p){var g=t[p],f=g[0],m=g[1],v=i(g[2]);c.globalAlpha=v,c.drawImage(r,f-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){var M,v=x[_+3]/256,I=4*Math.floor(255*v);0<v?(M=a(v)?s:l,0<v&&(v=v*S+b),x[_++]=M[I],x[_++]=M[1+I],x[_++]=M[2+I],x[_++]=M[3+I]*v*256):_+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=y()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},_getGradient:function(t,e,n){for(var i=this._gradientPixels,o=i[n]||(i[n]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[n](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},xp({type:"heatmap",render:function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),D&&!i)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var o,a=n.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):"lng"===(o=a.dimensions)[0]&&"lat"===o[1]&&this._renderOnGeo(a,n,i,e)},incrementalPrepareRender:function(t,e,n){this.group.removeAll()},incrementalRender:function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,i,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");if(D){if("category"!==l.type||"category"!==u.type)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")}a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",p="emphasis.label",g=t.getModel("itemStyle").getItemStyle(["color"]),f=t.getModel(d).getItemStyle(),m=t.getModel("label"),v=t.getModel(p),y=s.type,x="cartesian2d"===y?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],_=n;_<i;_++){if("cartesian2d"===y){if(isNaN(c.get(x[2],_)))continue;var w=s.dataToPoint([c.get(x[0],_),c.get(x[1],_)]),b=new Kr({shape:{x:Math.floor(Math.round(w[0])-a/2),y:Math.floor(Math.round(w[1])-r/2),width:Math.ceil(a),height:Math.ceil(r)},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;b=new Kr({z2:1,shape:s.dataToRect([c.get(x[0],_)]).contentShape,style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}var S=c.getItemModel(_);c.hasItemOption&&(g=S.getModel("itemStyle").getItemStyle(["color"]),f=S.getModel(d).getItemStyle(),m=S.getModel("label"),v=S.getModel(p));var M=t.getRawValue(_),I="-";M&&null!=M[2]&&(I=M[2]),Us(g,f,m,v,{labelFetcher:t,labelDataIndex:_,defaultText:I,isRectText:!0}),b.setStyle(g),Fs(b,c.hasItemOption?f:P({},f)),(b.incremental=o)&&(b.useHoverLayer=!0),h.add(b),c.setItemGraphicEl(_,b)}},_renderOnGeo:function(o,t,e,n){var i=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new vM;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),u=o.getRoamTransform();l.applyTransform(u);var h,c,d,p,g,f,m,v,y,x=Math.max(l.x,0),_=Math.max(l.y,0),w=Math.min(l.width+l.x,n.getWidth()),b=Math.min(l.height+l.y,n.getHeight()),S=w-x,M=b-_,I=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],T=r.mapArray(I,function(t,e,n){var i=o.dataToPoint([t,e]);return i[0]-=x,i[1]-=_,i.push(n),i}),A=e.getExtent(),D="visualMap.continuous"===e.type?(m=A,v=e.option.range,y=m[1]-m[0],v=[(v[0]-m[0])/y,(v[1]-m[0])/y],function(t){return t>=v[0]&&t<=v[1]}):(h=A,c=e.getPieceList(),d=e.option.selected,p=h[1]-h[0],g=(c=z(c,function(t){return{interval:[(t.interval[0]-h[0])/p,(t.interval[1]-h[0])/p]}})).length,f=0,function(t){for(var e=f;e<g;e++)if((n=c[e].interval)[0]<=t&&t<=n[1]){f=e;break}if(e===g)for(var n,e=f-1;0<=e;e--)if((n=c[e].interval)[0]<=t&&t<=n[1]){f=e;break}return 0<=e&&e<g&&d[e]});s.update(T,S,M,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},D);var C=new Xi({style:{width:S,height:M,x:x,y:_,image:s.canvas},silent:!0});this.group.add(C)},dispose:function(){}});var yM=_v.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,yM.superApply(this,"getInitialData",arguments)}}),xM=["itemStyle","borderWidth"],_M=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],wM=new zr;xp({type:"pictorialBar",render:function(t,e,n){var r=this.group,s=t.getData(),l=this._data,i=t.coordinateSystem,o=!!i.getBaseAxis().isHorizontal(),a=i.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:_M[+o],categoryDim:_M[1-o]};return s.diff(l).add(function(t){var e,n,i;s.hasValue(t)&&(e=CM(s,t),n=bM(s,t,e,u),i=NM(s,u,n),s.setItemGraphicEl(t,i),r.add(i),BM(i,u,n))}).update(function(t,e){var n,i,o,a=l.getItemGraphicEl(e);s.hasValue(t)?(n=CM(s,t),i=bM(s,t,n,u),o=EM(s,i),a&&o!==a.__pictorialShapeStr&&(r.remove(a),s.setItemGraphicEl(t,null),a=null),a?function(t,e,n){var i=n.animationModel,o=n.dataIndex;el(t.__pictorialBundle,{position:n.bundlePosition.slice()},i,o),(n.symbolRepeat?IM:TM)(t,e,n,!0);AM(t,n,!0),DM(t,e,n,!0)}(a,u,i):a=NM(s,u,i,!0),s.setItemGraphicEl(t,a),a.__pictorialSymbolMeta=i,r.add(a),BM(a,u,i)):r.remove(a)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&OM(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:it,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){OM(i,t.dataIndex,e,t)}):n.removeAll()}});function bM(t,e,n,i){var o=t.getItemLayout(e),a=n.get("symbolRepeat"),r=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,h=n.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?n:null,hoverAnimation:h&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};!function(t,e,n,i,o){var a,r=i.valueDim,s=t.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-(n[r.wh]<=0);{var c;a=C(s)?((c=[SM(l,s[0])-u,SM(l,s[1])-u])[1]<c[0]&&c.reverse(),c[h]):null!=s?SM(l,s)-u:e?i.coordSysExtent[r.index][h]-u:n[r.wh]}o.boundingLength=a,e&&(o.repeatCutLength=n[r.wh]);o.pxSign=0<a?1:a<0?-1:0}(n,a,o,i,c),function(t,e,n,i,o,a,r,s,l){var u=s.valueDim,h=s.categoryDim,c=Math.abs(n[h.wh]),d=t.getItemVisual(e,"symbolSize");d=C(d)?d.slice():(null==d&&(d="100%"),[d,d]);d[h.index]=Il(d[h.index],c),d[u.index]=Il(d[u.index],i?c:Math.abs(o)),l.symbolSize=d,(l.symbolScale=[d[0]/r,d[1]/r])[u.index]*=(s.isHorizontal?-1:1)*a}(t,e,o,a,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,o){var a=t.get(xM)||0;a&&(wM.attr({scale:e.slice(),rotation:n}),wM.updateTransform(),a/=wM.getLineScale(),a*=e[i.valueDim.index]);o.valueLineWidth=a}(n,c.symbolScale,l,i,c);var d=c.symbolSize,p=n.get("symbolOffset");return C(p)&&(p=[Il(p[0],d[0]),Il(p[1],d[1])]),function(t,e,n,i,o,a,r,s,l,u,h){var c=u.categoryDim,d=u.valueDim,p=h.pxSign,g=Math.max(e[d.index]+r,0),f=g;{var m,v,y,x,_,w,b;i&&(m=Math.abs(s),v=Z(t.get("symbolMargin"),"15%")+"",y=!1,v.lastIndexOf("!")===v.length-1&&(y=!0,v=v.slice(0,v.length-1)),v=Il(v,e[d.index]),x=Math.max(g+2*v,0),_=y?0:2*v,w=Fl(i),b=w?i:VM((m+_)/x),x=g+2*(v=(m-b*g)/2/(y?b:b-1)),_=y?0:2*v,w||"fixed"===i||(b=l?VM((Math.abs(l)+_)/x):0),f=b*x-_,h.repeatTimes=b,h.symbolMargin=v)}var S=p*(f/2),M=h.pathPosition=[];M[c.index]=n[c.wh]/2,M[d.index]="start"===a?S:"end"===a?s-S:s/2,o&&(M[0]+=o[0],M[1]+=o[1]);var I=h.bundlePosition=[];I[c.index]=n[c.xy],I[d.index]=n[d.xy];var T=h.barRectShape=P({},n);T[d.wh]=p*Math.max(Math.abs(n[d.wh]),Math.abs(M[d.index]+S)),T[c.wh]=n[c.wh];var A=h.clipShape={};A[c.xy]=-n[c.xy],A[c.wh]=u.ecSize[c.wh],A[d.xy]=0,A[d.wh]=n[d.wh]}(n,d,o,a,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function SM(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function MM(t){var e=t.symbolPatternSize,n=gf(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function IM(t,e,o,n){var i=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(RM(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?zM(t,null,g(h),o,n):zM(t,null,{scale:[0,0]},o,n,function(){i.remove(t)}),PM(t,o),h++});h<u;h++){var d=MM(o);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,i.add(d);var p=g(h);zM(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},o,n),d.on("mouseover",f).on("mouseout",m),PM(d,o)}function g(t){var e=s.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=u-1-t),e[l.index]=c*(i-u/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function f(){RM(t,function(t){t.trigger("emphasis")})}function m(){RM(t,function(t){t.trigger("normal")})}}function TM(t,e,n,i){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?zM(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=MM(n),o.add(a),zM(a,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),PM(a,n)}function AM(t,e,n){var i=P({},e.barRectShape),o=t.__pictorialBarRect;o?zM(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new Kr({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function DM(t,e,n,i){var o,a,r,s,l,u;n.symbolClip&&(o=t.__pictorialClipPath,a=P({},n.clipShape),r=e.valueDim,s=n.animationModel,l=n.dataIndex,o?el(o,{shape:a},s,l):(a[r.wh]=0,o=new Kr({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(u={})[r.wh]=n.clipShape[r.wh],cl[i?"updateProps":"initProps"](o,{shape:u},s,l)))}function CM(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=LM,n.isAnimationEnabled=kM,n}function LM(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function kM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function PM(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:n.slice()},400,"elasticOut")})}function NM(t,e,n,i){var o=new In,a=new In;return o.add(a),(o.__pictorialBundle=a).attr("position",n.bundlePosition.slice()),n.symbolRepeat?IM(o,e,n):TM(o,0,n),AM(o,n,i),DM(o,e,n,i),o.__pictorialShapeStr=EM(t,n),o.__pictorialSymbolMeta=n,o}function OM(t,e,n,i){var o=i.__pictorialBarRect;o&&(o.style.text=null);var a=[];RM(i,function(t){a.push(t)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),R(a,function(t){el(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function EM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function RM(e,n,i){R(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function zM(t,e,n,i,o,a){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&cl[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,a)}function BM(t,e,n){var i=n.color,o=n.dataIndex,a=n.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");RM(t,function(t){t.setColor(i),t.setStyle(O({fill:i,opacity:n.opacity},r)),Fs(t,s),l&&(t.cursor=l),t.z2=n.z2});var u={},h=(e.valueDim.posDesc[+(0<n.boundingLength)],t.__pictorialBarRect);wv(h.style,u,a,i,e.seriesModel,o),Fs(h,u)}function VM(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}dp(B(Dg,"pictorialBar")),pp(Mm("pictorialBar","roundRect"));function GM(t,e,n,i,o){Nf.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom",this.orient=null}function FM(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function WM(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},a=i.position,r=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),Z(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-h:h,o.z2=1,o}GM.prototype={constructor:GM,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},w(GM,Nf),Ju.register("single",{create:function(i,o){var a=[];return i.eachComponent("singleAxis",function(t,e){var n=new FM(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0],t.coordinateSystem=e&&e.coordinateSystem)}),a},dimensions:(FM.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:FM,_init:function(t,e,n){var i=this.dimension,o=new GM(i,Jg(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),(t.axis=o).model=t,(o.coordinateSystem=this)._axis=o},update:function(t,e){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(R((e=t.getData()).mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),$g(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,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=o?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(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i}}).dimensions});var HM=["axisLine","axisTickLabel","axisName"],ZM=["splitArea","splitLine"],UM=hv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,n,i){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new In;var r=WM(e),s=new Ym(e,r);R(HM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),R(ZM,function(t){e.get(t+".show")&&this["_"+t](e)},this),rl(a,this._axisGroup,e),UM.superCall(this,"render",e,t,n,i)},remove:function(){mv(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){for(var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),o=i.get("width"),a=(a=i.get("color"))instanceof Array?a:[a],r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;p<h.length;++p){var g=e.toGlobalCoord(h[p].coord);s?(c[0]=g,c[1]=r.y,d[0]=g,d[1]=r.y+r.height):(c[0]=r.x,c[1]=g,d[0]=r.x+r.width,d[1]=g);var f=u++%a.length;l[f]=l[f]||[],l[f].push(new Jr({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0}))}for(p=0;p<l.length;++p)this.group.add(Is(l[p],{style:{stroke:a[p%a.length],lineDash:i.getLineDash(o),lineWidth:o},silent:!0}))}},_splitArea:function(t){fv(this,this._axisGroup,t,t)}}),XM=_u.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});m(XM.prototype,af),Om("single",XM,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function YM(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var a=n.getData(),r=Fo(a,t);if(null==r||r<0||C(r))return{point:[]};var s,l=a.getItemGraphicEl(r),u=n.coordinateSystem;return n.getTooltipPosition?i=n.getTooltipPosition(r)||[]:u&&u.dataToPoint?i=u.dataToPoint(a.getValues(z(u.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[]:l&&((s=l.getBoundingRect().clone()).applyTransform(l.transform),i=[s.x+s.width/2,s.y+s.height/2]),{point:i,el:l}}var jM=R,qM=B,KM=Wo();function $M(t,e,n,i,o){var a,l,r,u,h,c,d,p,g,s,f,m=t.axis;!m.scale.isBlank()&&m.containData(e)&&(t.involveSeries?(f=(a=(l=e,u=(r=t).axis,h=u.dim,c=l,d=[],p=Number.MAX_VALUE,g=-1,jM(r.seriesModels,function(e,t){var n,i,o=e.getData().mapDimension(h,!0);if(e.getAxisTooltipData)var a=e.getAxisTooltipData(o,l,u),r=a.dataIndices,s=a.nestestValue;else{if(!(r=e.getData().indicesOfNearest(o[0],l,"category"===u.type?.5:null)).length)return;s=e.getData().get(o[0],r[0])}null!=s&&isFinite(s)&&(n=l-s,(i=Math.abs(n))<=p&&((i<p||0<=n&&g<0)&&(p=i,g=n,c=s,d.length=0),jM(r,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}),{payloadBatch:d,snapToValue:c})).snapToValue,(s=a.payloadBatch)[0]&&null==o.seriesIndex&&P(o,s[0]),!i&&t.snap&&m.containData(f)&&null!=f&&(e=f),n.showPointer(t,e,s,o),n.showTooltip(t,a,f)):n.showPointer(t,e))}function JM(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function QM(t,e,n,i){var o,a,r,s=n.payloadBatch,l=e.axis,u=l.model,h=e.axisPointerModel;e.triggerTooltip&&s.length&&(a=uv(o=e.coordSys.model),(r=t.map[a])||(r=t.map[a]={coordSysId:o.id,coordSysIndex:o.componentIndex,coordSysType:o.type,coordSysMainType:o.mainType,dataByAxis:[]},t.list.push(r)),r.dataByAxis.push({axisDim:l.dim,axisIndex:u.componentIndex,axisType:u.type,axisId:u.id,value:i,valueLabelOpt:{precision:h.get("label.precision"),formatter:h.get("label.formatter")},seriesDataIndices:s.slice()}))}function tI(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function eI(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}mp({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,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:!0,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:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var nI=Wo(),iI=R;function oI(t,e,n){var i;v.node||(i=e.getZr(),nI(i).records||(nI(i).records={}),function(s,l){if(nI(s).initialized)return;function t(t,r){s.on(t,function(e){var n,i,o,a=(n=l,{dispatchAction:o=function(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=o,n.dispatchAction(t))},pendings:i={showTip:[],hideTip:[]}});iI(nI(s).records,function(t){t&&r(t,e,a.dispatchAction)}),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(a.pendings,l)})}nI(s).initialized=!0,t("click",B(rI,"click")),t("mousemove",B(rI,"mousemove")),t("globalout",aI)}(i,e),(nI(i).records[t]||(nI(i).records[t]={})).handler=n)}function aI(t,e,n){t.handler("leave",null,n)}function rI(t,e,n,i){e.handler(t,n,i)}function sI(t,e){var n;v.node||(n=e.getZr(),(nI(n).records||{})[t]&&(nI(n).records[t]=null))}var lI=vp({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";oI("axisPointer",n,function(t,e,n){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){sI(e.getZr(),"axisPointer"),lI.superApply(this._model,"remove",arguments)},dispose:function(t,e){sI("axisPointer",e),lI.superApply(this._model,"dispose",arguments)}}),uI=Wo(),hI=k,cI=N;function dI(){}function pI(t,e,n,i){!function n(i,t){{if(V(i)&&V(t)){var o=!0;return R(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}}(uI(n).lastProp,i)&&(uI(n).lastProp=i,e?el(n,i,t):(n.stopAnimation(),n.attr(i)))}function gI(t,e){t[e.get("label.show")?"show":"hide"]()}function fI(t){return{position:t.position.slice(),rotation:t.rotation||0}}function mI(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function vI(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function yI(t,e,n,i,o){var a=xI(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),r=n.getModel("label"),s=Ul(r.get("padding")||0),l=r.getFont(),u=ui(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=o.align;"right"===p&&(h[0]-=c),"center"===p&&(h[0]-=c/2);var g,f,m,v,y,x,_=o.verticalAlign;"bottom"===_&&(h[1]-=d),"middle"===_&&(h[1]-=d/2),g=h,f=c,m=d,y=(v=i).getWidth(),x=v.getHeight(),g[0]=Math.min(g[0]+f,y)-f,g[1]=Math.min(g[1]+m,x)-m,g[0]=Math.max(g[0],0),g[1]=Math.max(g[1],0);var w=r.get("backgroundColor");w&&"auto"!==w||(w=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",textPadding:s,fill:w,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function xI(t,e,o,n,i){t=e.scale.parse(t);var a,r=e.scale.getLabel(t,{precision:i.precision}),s=i.formatter;return s&&(a={value:tf(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},R(n,function(t){var e=o.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i&&a.seriesData.push(i)}),L(s)?r=s.replace("{value}",r):A(s)&&(r=s(a))),r}function _I(t,e,n){var i=oe();return ue(i,i,n.rotation),le(i,i,n.position),ol([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function wI(t,e,n,i,o,a){var r=Ym.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get("label.margin"),yI(e,i,o,a,{position:_I(i.axis,t,n),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function bI(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function SI(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function MI(t,e,n,i,o,a){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:a,clockwise:!0}}Jo((dI.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h,c=this._moveAnimation=this.determineAnimation(t,e);r?(h=B(pI,e,c),this.updatePointerEl(r,l,h,e),this.updateLabelEl(r,l,h,e)):(r=this._group=new In,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),n.getZr().add(r)),mI(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"!==n&&null!=n)return!0===n;var r=this.animationThreshold;if(o&&i.getBandWidth()>r)return!0;if(a){var s=sv(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,n,i,o){},createPointerEl:function(t,e,n,i){var o,a=e.pointer;a&&(o=uI(t).pointerEl=new cl[a.type](hI(e.pointer)),t.add(o))},createLabelEl:function(t,e,n,i){var o;e.label&&(o=uI(t).labelEl=new Kr(hI(e.label)),t.add(o),gI(o,i))},updatePointerEl:function(t,e,n){var i=uI(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var o=uI(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{shape:e.label.shape,position:e.label.position}),gI(o,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),r=n.get("status");if(!a.get("show")||!r||"hide"===r)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=ll(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:cI(this._onHandleDragMove,this,0,0),drift:cI(this._onHandleDragMove,this),ondragend:cI(this._onHandleDragEnd,this)}),i.add(o)),mI(o,n,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");C(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),_c(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){pI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fI(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n,i=this._handle;i&&(this._dragging=!0,n=this.updateHandleTransform(fI(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=n,i.stopAnimation(),i.attr(fI(n)),uI(i).lastProp=null,this._doDispatchAxisPointer())},_doDispatchAxisPointer:function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},_onHandleDragEnd:function(t){var e;this._dragging=!1,this._handle&&(e=this._axisPointerModel.get("value"),this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"}))},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=dI);var II=dI.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.grid,u=i.get("type"),h=TI(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0));u&&"none"!==u&&(a=vI(i),(r=AI[u](s,c,h)).style=a,t.graphicKey=r.type,t.pointer=r),wI(e,t,gv(l.model,n),n,i,o)},getHandleTransform:function(t,e,n){var i=gv(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:_I(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var o=n.axis,a=o.grid,r=o.getGlobalExtent(!0),s=TI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function TI(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var AI={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bI([e,n[0]],[e,n[1]],DI(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:SI([e-i/2,n[0]],[i,o],DI(t))}}};function DI(t){return"x"===t.dim?0:1}hv.registerAxisPointerClass("CartesianAxisPointer",II),lp(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!C(e)&&(t.axisPointer.link=[e]))}),up(_d.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=av(t,e)}),hp({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||N(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){eI(r)&&(r=YM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=eI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||eI(r),d={},p={},g={list:[],map:{}},f={showPointer:qM(JM,p),showTooltip:qM(QM,g)};jM(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);jM(s.coordSysAxesInfo[e],function(t,e){var n,i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);c||!a||u&&!o||(null!=(n=o&&o.value)||l||(n=i.pointToData(r)),null!=n&&$M(t,n,f,!1,d))})});var m,v,y,x={};return jM(h,function(o,t){var a=o.linkGroup;a&&!p[t]&&jM(a.axesInfo,function(t,e){var n,i=p[e];t!==o&&i&&(n=i.value,a.mapper&&(n=o.axis.scale.parse(a.mapper(n,tI(t),tI(o)))),x[o.key]=n)})}),jM(x,function(t,e){$M(h[e],t,f,!0,d)}),m=p,v=h,y=d.axesInfo=[],jM(v,function(t,e){var n=t.axisPointerModel.option,i=m[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(eI(e)||!t.list.length)return i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(g,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=KM(n)[i]||{},a=KM(n)[i]={};jM(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&jM(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];R(o,function(t,e){a[e]||s.push(t)}),R(a,function(t,e){o[e]||r.push(t)}),s.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}(h,n),d}});var CI=["x","y"],LI=["width","height"],kI=dI.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.coordinateSystem,u=OI(l,1-NI(s)),h=l.dataToPoint(e)[0],c=i.get("type");c&&"none"!==c&&(a=vI(i),(r=PI[c](s,h,u)).style=a,t.graphicKey=r.type,t.pointer=r),wI(e,t,WM(n),n,i,o)},getHandleTransform:function(t,e,n){var i=WM(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:_I(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var o=n.axis,a=o.coordinateSystem,r=NI(o),s=OI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=OI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),PI={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bI([e,n[0]],[e,n[1]],NI(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:SI([e-i/2,n[0]],[i,o],NI(t))}}};function NI(t){return t.isHorizontal()?0:1}function OI(t,e){var n=t.getRect();return[n[CI[e]],n[CI[e]]+n[LI[e]]]}hv.registerAxisPointerClass("SingleAxisPointer",kI),vp({type:"single"});var EI=Kh.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){EI.superApply(this,"init",arguments),this.legendVisualProvider=new Hv(N(this.getData,this),N(this.getRawData,this))},fixData:function(t){var e=t.length,n=jo(t,function(t){return t[2]}),i=[];n.buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var o=i.length,a=-1,r=-1,s=0;s<o;++s){var l=i[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=i[u].name,c=0;c<a;++c){for(var d=i[r].dataList[c][0],p=i[u].dataList.length,g=-1,f=0;f<p;++f){if(i[u].dataList[f][0]===d){g=f;break}}-1===g&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=I(t.data,function(t){return void 0!==t[2]}),o=this.fixData(i||[]),a=[],r=this.nameMap=et(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=Qp(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Tp(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new Bp(u,this);return h.initData(o),h},getLayerSeries:function(){for(var n=this.getData(),t=n.count(),e=[],i=0;i<t;++i)e[i]=i;var o=n.mapDimension("single"),a=jo(e,function(t){return n.get("name",t)}),r=[];return a.buckets.each(function(t,e){t.sort(function(t,e){return n.get(o,t)-n.get(o,e)}),r.push({name:e,indices:t})}),r},getAxisTooltipData:function(t,e,n){C(t)||(t=t?[t]:[]);for(var i,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var p=o.get(t[0],a[l].indices[d]),g=Math.abs(p-e);g<=u&&(i=p,u=g,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),i=e.get(e.mapDimension("value"),t);return!isNaN(i)&&null!=i||(i="-"),jl(n+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});xp({type:"themeRiver",init:function(){this._layers=[]},render:function(T,t,e){var A=T.getData(),D=this.group,C=T.getLayerSeries(),n=A.getLayout("layoutInfo"),i=n.rect,o=n.boundaryGap;function a(t){return t.name}D.attr("position",[0,i.y+o[0]]);var r=new wp(this._layersSeries||[],C,a,a),L={};function s(t,e,n){var i=this._layers;if("remove"!==t){for(var o,a=[],r=[],s=C[e].indices,l=0;l<s.length;l++){var u=A.getItemLayout(s[l]),h=u.x,c=u.y0,d=u.y;a.push([h,c]),r.push([h,c+d]),o=A.getItemVisual(s[l],"color")}var p,g,f,m,v,y,x,_=A.getItemLayout(s[0]),w=A.getItemModel(s[l-1]),b=w.getModel("label"),S=b.get("margin");"add"===t?(f=L[e]=new In,p=new gm({shape:{points:a,stackedOnPoints:r,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),g=new Er({style:{x:_.x-S,y:_.y0+_.y/2}}),f.add(p),f.add(g),D.add(f),p.setClipPath((m=p.getBoundingRect(),v=T,y=function(){p.removeClipPath()},nl(x=new Kr({shape:{x:m.x-10,y:m.y-10,width:0,height:m.height+20}}),{shape:{width:m.width+20,height:m.height+20}},v,y),x))):(f=i[n],p=f.childAt(0),g=f.childAt(1),D.add(f),L[e]=f,el(p,{shape:{points:a,stackedOnPoints:r}},T),el(g,{style:{x:_.x-S,y:_.y0+_.y/2}},T));var M=w.getModel("emphasis.itemStyle"),I=w.getModel("itemStyle");Ys(g.style,b,{text:b.get("show")?T.getFormattedLabel(s[l-1],"normal")||A.getName(s[l-1]):null,textVerticalAlign:"middle"}),p.setStyle(P({fill:o},I.getItemStyle(["color"]))),Fs(p,M.getItemStyle())}else D.remove(i[e])}r.add(N(s,this,"add")).update(N(s,this,"update")).remove(N(s,this,"remove")).execute(),this._layersSeries=C,this._layers=L},dispose:function(){}});function RI(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,a=t.getLayerSeries(),r=n.mapDimension("single"),s=n.mapDimension("value"),l=z(a,function(t){return z(t.indices,function(t){var e=o.dataToPoint(n.get(r,t));return e[1]=n.get(s,t),e})}),u=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],a=0,r={},s=0;s<n;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),i.push(u)}for(var h=0;h<n;++h)o[h]=(a-i[h])/2;for(var c=a=0;c<n;++c){var d=i[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=e/u.max,d=a.length,p=a[0].indices.length,g=0;g<p;++g){i=h[g]*c,n.setItemLayout(a[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:i,y:l[0][g][1]*c});for(var f=1;f<d;++f)i+=l[f-1][g][1]*c,n.setItemLayout(a[f].indices[g],{layerIndex:f,x:l[f][g][0],y0:i,y:l[f][g][1]*c})}}dp(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var a=t.get("boundaryGap"),r=n.getAxis();i.boundaryGap=a,"horizontal"===r.orient?(a[0]=Il(a[0],o.height),a[1]=Il(a[1],o.height),RI(e,t,o.height-a[0]-a[1])):(a[0]=Il(a[0],o.width),a[1]=Il(a[1],o.width),RI(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",i)})}),pp(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=et();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),n=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",n);var i=l.get(t);null!=i&&a.setItemVisual(i,"color",n)})})}),up(iy("themeRiver")),Kh.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var n={name:t.name,children:t.data};!function n(t){var i=0;R(t.children,function(t){n(t);var e=t.value;C(e)&&(e=e[0]),i+=e});var e=t.value;C(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=i);e<0&&(e=0);C(t.value)?t.value[0]=e:t.value=e}(n);var i=t.levels||[],o={};return o.levels=i,_x.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Kh.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Gx(n,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},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;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var zI="none",BI="ancestor",VI="self",GI=2,FI=4;function WI(t,e,n){In.call(this);var i=new Vr({z2:GI});i.seriesIndex=e.seriesIndex;var o=new Er({z2:FI,silent:t.getModel("label").get("silent")});function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(i),this.add(o),this.updateData(!0,t,"normal",e,n),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var HI=WI.prototype;HI.updateData=function(t,e,n,i,o){(this.node=e).piece=this,i=i||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=P({},s);l.label=null;var u,h,c=function(t,e){var n=t.getVisual("color"),i=t.getVisual("visualMeta");i&&0!==i.length||(n=null);var o=t.getModel("itemStyle").get("color");{if(o)return o;if(n)return n;if(0===t.depth)return e.option.color[0];var a=e.option.color.length;o=e.option.color[function(t){var e=t;for(;1<e.depth;)e=e.parentNode;return M(t.getAncestors()[0].children,e)}(t)%a]}return o}(e,o);u=e,h=c,i.getData().setItemVisual(u.dataIndex,"color",h);var d,p=r.getModel("itemStyle").getItemStyle();d=O({lineJoin:"bevel",fill:(d="normal"===n?p:m(r.getModel(n+".itemStyle").getItemStyle(),p)).fill||c},d),t?(a.setShape(l),a.shape.r=s.r0,el(a,{shape:{r:s.r}},i,e.dataIndex),a.useStyle(d)):"object"==typeof d.fill&&d.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(el(a,{shape:l},i),a.useStyle(d)):el(a,{shape:l,style:d},i),this._updateLabel(i,c,n);var g,f=r.getShallow("cursor");f&&a.attr("cursor",f),t&&(g=i.getShallow("highlightPolicy"),this._initEvents(a,e,i,g)),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel,Fs(this)},HI.onEmphasis=function(o){var a=this;this.node.hostTree.root.eachNode(function(t){var e,n,i;t.piece&&(a.node===t?t.piece.updateData(!1,t,"emphasis"):(e=t,n=a.node,(i=o)!==zI&&(i===VI?e===n:i===BI?e===n||e.isAncestorOf(n):e===n||e.isDescendantOf(n))?t.piece.childAt(0).trigger("highlight"):o!==zI&&t.piece.childAt(0).trigger("downplay")))})},HI.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},HI.onHighlight=function(){this.updateData(!1,this.node,"highlight")},HI.onDownplay=function(){this.updateData(!1,this.node,"downplay")},HI._updateLabel=function(t,e,n){var i=this.node.getModel(),o=i.getModel("label"),a="normal"===n||"emphasis"===n?o:i.getModel(n+".label"),r=i.getModel("emphasis.label"),s=Z(t.getFormattedLabel(this.node.dataIndex,n,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=o.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;null!=u&&Math.abs(h)<u&&(s="");var c=this.childAt(1);Us(c.style,c.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var d,p=(l.startAngle+l.endAngle)/2,g=Math.cos(p),f=Math.sin(p),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=p>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,p>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,p>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*g+l.cx,_=d*f+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-p)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-p)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},HI._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(i)}function a(){r.onNormal()}var r=this;n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(WI,In);uc.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var i=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,n=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];n.eachNode(function(t){h.push(t)});var c,d,p=this._oldChildren||[];!function(n,i){if(0===n.length&&0===i.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);{var n;t!==s&&e!==s&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e):t&&(n=new WI(t,o,a),l.add(n),r.setItemGraphicEl(t.dataIndex,n)))}}(null==t?null:n[t],null==e?null:i[e])}new wp(i,n,t,t).add(e).update(e).remove(B(e,null)).execute()}(h,p),function(t,e){{var n;0<e.depth?(i.virtualPiece?i.virtualPiece.updateData(!1,t,"normal",o,a):(i.virtualPiece=new WI(t,o,a),l.add(i.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent),n=function(t){i._rootToNode(e.parentNode)},e.piece._onclickEvent=n,i.virtualPiece.on("click",n)):i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}}(s,n),e&&e.highlight&&e.highlight.piece?(c=o.getShallow("highlightPolicy"),e.highlight.piece.onEmphasis(c)):e&&e.unhighlight&&(!(d=this.virtualPiece)&&s.children.length&&(d=s.children[0].piece),d&&d.onNormal()),this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){function t(o){var a=!1;r.seriesModel.getViewRoot().eachNode(function(t){var e,n,i;!a&&t.piece&&t.piece.childAt(0)===o.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?r._rootToNode(t):"link"!==e||(i=(n=t.getModel()).get("link"))&&ou(i,n.get("target",!0)||"_blank"),a=!0)})}var r=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(i*i+o*o);return a<=n.r&&a>=n.r0}}});var ZI="sunburstRootToNode";hp({type:ZI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=zx(o,[ZI],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=Vx(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var UI="sunburstHighlight";hp({type:UI,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){var n=zx(i,[UI],t);n&&(i.highlight=n.node)})});hp({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})});var XI=Math.PI/180;function YI(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0==n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function jI(a,r){return r=r||[0,0],z(["x","y"],function(t,e){var n=this.getAxis(t),i=r[e],o=a[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}pp(B(Kv,"sunburst")),dp(B(function(t,e,D,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");C(n)||(n=[0,n]),C(e)||(e=[e,e]);var i=D.getWidth(),o=D.getHeight(),h=Math.min(i,o),c=Il(e[0],i),d=Il(e[1],o),p=Il(n[0],h/2),a=Il(n[1],h/2),r=-t.get("startAngle")*XI,g=t.get("minAngle")*XI,f=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,n){var i=t.children||[];t.children=YI(i,n);i.length&&R(t.children,function(t){e(t,n)})}(s,l);var u=0;R(s.children,function(t){isNaN(t.getValue())||u++});var v,y,x=s.getValue(),_=Math.PI/(x||u)*2,w=0<s.depth,b=s.height-(w?-1:1),S=(a-p)/(b||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),T=M?1:-1,A=function(t,e){if(t){var n,i,o,a,r,s,l,u=e;return t!==f&&(n=t.getValue(),(i=0===x&&I?_:n*_)<g&&(i=g),u=e+T*i,o=t.depth-m-(w?-1:1),a=p+S*o,r=p+S*(1+o),null!=(s=t.getModel()).get("r0")&&(a=Il(s.get("r0"),h/2)),null!=s.get("r")&&(r=Il(s.get("r"),h/2)),t.setLayout({angle:i,startAngle:e,endAngle:u,clockwise:M,cx:c,cy:d,r0:a,r:r})),t.children&&t.children.length&&(l=0,R(t.children,function(t){l+=A(t,e+l)})),u-e}};w&&(v=p+S,y=2*Math.PI,f.setLayout({angle:y,startAngle:r,endAngle:r+y,clockwise:M,cx:c,cy:d,r0:p,r:v})),A(s,r)})},"sunburst")),up(B(iy,"sunburst"));function qI(a,r){return r=r||[0,0],z([0,1],function(t){var e=r[t],n=a[t]/2,i=[],o=[];return i[t]=e-n,o[t]=e+n,i[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function KI(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function $I(s,l){return z(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=l[e],o=s[e]/2,a="dataTo"+t,r="category"===n.type?n.getBandWidth():Math.abs(n[a](i-o)-n[a](i+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}var JI=ps,QI=["itemStyle"],tT=["emphasis","itemStyle"],eT=["label"],nT=["emphasis","label"],iT="e\0\0",oT={cartesian2d: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:N(jI,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:N(qI,e)}}},singleAxis: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:N(KI,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:N(function(t){var e=a.dataToRadius(t[0]),n=r.dataToAngle(t[1]),i=o.coordToPoint([e,n]);return i.push(e,n*Math.PI/180),i}),size:N($I,o)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};function aT(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function rT(a,r,e,t){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(D&&(q(n,"series.render is required."),q(i.prepareCustoms||oT[i.type],"This coordSys does not support custom series.")),o=i.prepareCustoms?i.prepareCustoms():oT[i.type](i));var s,l,u,h,c,d,p,g=O({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=u),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(QI).getItemStyle();null!=p&&(n.fill=p);var i=r.getItemVisual(e,"opacity");null!=i&&(n.opacity=i);var o=t?cT(t,c):c;return Ys(n,o,null,{autoColor:p,isRectText:!0}),n.text=o.getShallow("show")?U(a.getFormattedLabel(e,"normal"),Bf(r,e)):null,t&&dT(n,t),n},styleEmphasis:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(tT).getItemStyle(),i=t?cT(t,d):d;return Ys(n,i,null,{isRectText:!0},!0),n.text=i.getShallow("show")?X(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Bf(r,e)):null,t&&dT(n,t),n},visual:function(t,e){return null==e&&(e=u),r.getItemVisual(e,t)},barLayout:function(t){if(i.getBaseAxis){return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<t.count;o++)e.push(O({bandWidth:i,axisKey:"axis0",stackId:_g+o},t));for(var a=Tg(e),r=[],o=0;o<t.count;o++){var s=a.axis0[_g+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(O({axis:i.getBaseAxis()},t))}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return Qs(t,e)}},o.api||{}),f={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:r.count(),encode:(s=a.getData(),l={},R(s.dimensions,function(t,e){var n,i=s.getDimensionInfo(t);i.isExtraCoord||(n=i.coordDim,(l[n]=l[n]||[])[i.coordDimIndex]=e)}),l)},m=!0;return function(t,e){return u=t,m=!0,n&&n(O({dataIndexInside:t,dataIndex:r.getRawIndex(t),actionType:e?e.type:null},f),g)};function v(t){null==t&&(t=u),m&&(h=r.getItemModel(t),c=h.getModel(eT),d=h.getModel(nT),p=r.getItemVisual(t,"color"),m=!1)}}function sT(t,e,n,i,o,a){return(t=lT(t,e,n,i,o,a,!0))&&a.setItemGraphicEl(e,t),t}function lT(t,e,n,i,o,a,r){var s,l=!n,u=(n=n||{}).type,h=n.shape,c=n.style;if(t&&(l||null!=u&&u!==t.__customGraphicType||"path"===u&&((s=h)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&gT(h)!==t.__customPathData||"image"===u&&fT(c,"image")&&c.image!==t.__customImagePath||"text"===u&&fT(h,"text")&&c.text!==t.__customText)&&(o.remove(t),t=null),!l){var d=!t;return function(e,t,n,i,o,a){var r,s,l={},u=n.style||{};n.shape&&(l.shape=k(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===e.type&&n.style&&(r=l.style={},R(["x","y","width","height"],function(t){aT(t,r,u,e.style,o)})),"text"===e.type&&n.style&&(r=l.style={},R(["x","y"],function(t){aT(t,r,u,e.style,o)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)),"group"!==e.type&&(e.useStyle(u),o&&(e.style.opacity=0,null==(s=u.opacity)&&(s=1),nl(e,{style:{opacity:s}},i,t))),o?e.attr(l):el(e,l,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis;Es(e,h),a&&Ws(e,!1!==h)}(t=t||function(t){var e=t.type;if("path"===e){var n,i=t.shape,o=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,a=gT(i);(n=bs(a,null,o,i.layout||"center")).__customPathData=a}else if("image"===e)(n=new Xi({})).__customImagePath=t.style.image;else if("text"===e)(n=new Er({})).__customText=t.style.text;else if("group"===e)n=new In;else{if("compoundPath"===e)throw new Error('"compoundPath" is not supported yet.');var r=ws(e);D&&q(r,'graphic type "'+e+'" can not be found.'),n=new r}return n.__customGraphicType=e,n.name=t.name,n}(n),e,n,i,d,r),"group"===u&&function(t,e,n,i,o){var a=n.children,r=a?a.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(!r&&!l&&!u)return;if(l)return function(t){new wp(t.oldChildren,t.newChildren,uT,uT,t).add(hT).update(hT).remove(pT).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:i,group:t,data:o});u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&lT(t.childAt(h),e,a[h],i,t,o);D&&q(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}(t,e,n,i,a),o.add(t),t}}function uT(t,e){var n=t&&t.name;return null!=n?n:iT+e}function hT(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null;lT(null!=e?n.oldChildren[e]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function cT(n,t){var i=new yl({},t);return R(JI,function(t,e){n.hasOwnProperty(t)&&(i.option[e]=n[t])}),i}function dT(t,e){for(var n in e)!e.hasOwnProperty(n)&&JI.hasOwnProperty(n)||(t[n]=e[n])}function pT(t){var e=this.context,n=e.oldChildren[t];n&&e.group.remove(n)}function gT(t){return t&&(t.pathData||t.d)}function fT(t,e){return t&&t.hasOwnProperty(e)}function mT(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function vT(t,e){return e.dim+t.model.componentIndex}function yT(t,e){Nf.call(this,"radius",t,e),this.type="category"}Kh.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return rg(this.getSource(),this)},getDataParams:function(t,e,n){var i=Kh.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),uc.extend({type:"custom",_data:null,render:function(n,t,e,i){var o=this._data,a=n.getData(),r=this.group,s=rT(n,a,t,e);a.diff(o).add(function(t){sT(null,t,s(t,i),n,r,a)}).update(function(t,e){sT(o.getItemGraphicEl(e),t,s(t,i),n,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=n.get("clip",!0)?vm(n.coordinateSystem,!1,n):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(t,e,n){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i,o){var a=e.getData(),r=rT(e,a,n,i);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){sT(null,l,r(l,o),e,this.group,a).traverse(s)}},dispose:it,filterForExposedEvent:function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1}}),yT.prototype={constructor:yT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Nf.prototype.dataToCoord,radiusToData:Nf.prototype.coordToData},w(yT,Nf);var xT=Wo();function _T(t,e){e=e||[0,360],Nf.call(this,"angle",t,e),this.type="category"}_T.prototype={constructor:_T,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Nf.prototype.dataToCoord,angleToData:Nf.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var o=n[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=ui(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=xT(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-i)<=1&&u<c?u=c:(h.lastTickCount=i,h.lastAutoInterval=u),u}},w(_T,Nf);function wT(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new yT,this._angleAxis=new _T,this._radiusAxis.polar=this._angleAxis.polar=this}wT.prototype={type:"polar",axisPointerEnabled:!0,constructor:wT,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=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),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=null!=t&&"auto"!==t?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 n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);i.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=l<a?1:-1;l<a||r<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,o=n*n+i*i,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var bT=_u.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(bT.prototype,af);var ST={splitNumber:5};function MT(t,e){return e.type||(e.data?"category":"value")}function IT(t,e){var n,i,o=this,a=o.getAngleAxis(),r=o.getRadiusAxis();a.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===o&&(R((e=t.getData()).mapDimension("radius",!0),function(t){r.scale.unionExtentFromData(e,ag(e,t))}),R(e.mapDimension("angle",!0),function(t){a.scale.unionExtentFromData(e,ag(e,t))}))}),$g(a.scale,a.model),$g(r.scale,r.model),"category"!==a.type||a.onBand||(n=a.getExtent(),i=360/a.scale.count(),a.inverse?n[1]+=i:n[1]-=i,a.setExtent(n[0],n[1]))}function TT(t,e){var n;t.type=e.get("type"),t.scale=Jg(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse^=e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}Om("angle",bT,MT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Om("radius",bT,MT,ST),mp({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),Ju.register("polar",{dimensions:wT.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n=new wT(e);n.update=IT;var i=n.getRadiusAxis(),o=n.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");TT(i,a),TT(o,r),function(t,e,n){var i=e.get("center"),o=n.getWidth(),a=n.getHeight();t.cx=Il(i[0],o),t.cy=Il(i[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:C(l)||(l=[0,l]),l=[Il(l[0],s),Il(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(n,t,s),l.push(n),(t.coordinateSystem=n).model=t}),n.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];if(D&&!e)throw new Error('Polar "'+Z(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}});var AT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function DT(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function CT(t){return t.getRadiusAxis().inverse?0:1}function LT(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}hv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){var n,i,o,a,r,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),r=n.getMinorTicksCoords(),LT(s=z(n.getViewLabels(),function(t){return(t=k(t)).coord=n.dataToCoord(t.tickValue),t})),LT(a),R(AT,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,a,r,o,s)},this))},_axisLine:function(t,e,n,i,o){var a=t.getModel("axisLine.lineStyle"),r=CT(e),s=r?0:1,l=0===o[s]?new zr({shape:{cx:e.cx,cy:e.cy,r:o[r]},style:a.getLineStyle(),z2:1,silent:!0}):new Gr({shape:{cx:e.cx,cy:e.cy,r:o[r],r0:o[s]},style:a.getLineStyle(),z2:1,silent:!0});l.style.fill=null,this.group.add(l)},_axisTick:function(t,e,n,i,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[CT(e)],l=z(n,function(t){return new Jr({shape:DT(e,[s,s+r],t.coord)})});this.group.add(Is(l,{style:O(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,n,i,o){if(i.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[CT(e)],u=[],h=0;h<i.length;h++)for(var c=0;c<i[h].length;c++)u.push(new Jr({shape:DT(e,[l,l+s],i[h][c].coord)}));this.group.add(Is(u,{style:O(r.getModel("lineStyle").getLineStyle(),O(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(c,d,t,e,p,n){var g=c.getCategories(!0),f=c.getModel("axisLabel"),m=f.get("margin"),v=c.get("triggerEvent");R(n,function(t,e){var n=f,i=t.tickValue,o=p[CT(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";g&&g[i]&&g[i].textStyle&&(n=new yl(g[i].textStyle,f,f.ecModel));var h=new Er({silent:Ym.isLabelSilent(c)});this.group.add(h),Ys(h.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Ym.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,n,i,o){for(var a=t.getModel("splitLine").getModel("lineStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=0;u<n.length;u++){var h=r++%s.length;l[h]=l[h]||[],l[h].push(new Jr({shape:DT(e,o,n[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(Is(l[u],{style:O({stroke:s[u%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,n,i,o){if(i.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),r=[],s=0;s<i.length;s++)for(var l=0;l<i[s].length;l++)r.push(new Jr({shape:DT(e,o,i[s][l].coord)}));this.group.add(Is(r,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,n,i,o){if(n.length){for(var a=t.getModel("splitArea").getModel("areaStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=Math.PI/180,h=-n[0].coord*u,c=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),p=t.get("clockwise"),g=1;g<n.length;g++){var f=r++%s.length;l[f]=l[f]||[],l[f].push(new Vr({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-n[g].coord*u,clockwise:p},silent:!0})),h=-n[g].coord*u}for(g=0;g<l.length;g++)this.group.add(Is(l[g],{style:O({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}});var kT=["axisLine","axisTickLabel","axisName"],PT=["splitLine","splitArea","minorSplitLine"];hv.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){var n,i,o,a,r,s,l,u,h,c,d,p;this.group.removeAll(),e.get("show")&&(n=e.axis,o=(i=n.polar).getAngleAxis(),a=n.getTicksCoords(),r=n.getMinorTicksCoords(),s=o.getExtent()[0],l=n.getExtent(),c=e,d=s,u={position:[(h=i).cx,h.cy],rotation:d/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:c.getModel("axisLabel").get("rotate"),z2:1},p=new Ym(e,u),R(kT,p.add,p),this.group.add(p.getGroup()),R(PT,function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,s,l,a,r)},this))},_splitLine:function(t,e,n,i,o){for(var a=t.getModel("splitLine").getModel("lineStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=0;u<o.length;u++){var h=r++%s.length;l[h]=l[h]||[],l[h].push(new zr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(Is(l[u],{style:O({stroke:s[u%s.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,n,i,o,a){if(a.length){for(var r=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new zr({shape:{cx:e.cx,cy:e.cy,r:a[l][u].coord}}));this.group.add(Is(s,{style:O({fill:null},r.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,n,i,o){if(o.length){for(var a=t.getModel("splitArea").getModel("areaStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=o[0].coord,h=1;h<o.length;h++){var c=r++%s.length;l[c]=l[c]||[],l[c].push(new Vr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Is(l[h],{style:O({fill:s[h%s.length]},a.getAreaStyle()),silent:!0}))}}});var NT=dI.extend({makeElOption:function(t,e,n,i,o){var a=n.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s,l=a.polar,u=l.getOtherAxis(a).getExtent(),h=a["dataTo"+nu(a.dim)](e),c=i.get("type");c&&"none"!==c&&(r=vI(i),(s=OT[c](a,l,h,u,r)).style=r,t.graphicKey=s.type,t.pointer=s);var d=i.get("label.margin");yI(t,n,i,o,function(t,e,n,i){var o=e.axis,a=o.dataToCoord(t),r=n.getAngleAxis().getExtent()[0];r=r/180*Math.PI;var s,l,u,h=n.getRadiusAxis().getExtent();{var c,d,p,g,f,m;u="radius"===o.dim?(ue(c=oe(),c,r),le(c,c,[n.cx,n.cy]),s=ol([a,-i],c),d=e.getModel("axisLabel").get("rotate")||0,p=Ym.innerTextLayout(r,d*Math.PI/180,-1),l=p.textAlign,p.textVerticalAlign):(g=h[1],s=n.coordToPoint([g+i,a]),f=n.cx,m=n.cy,l=Math.abs(s[0]-f)/g<.3?"center":s[0]>f?"left":"right",Math.abs(s[1]-m)/g<.3?"middle":s[1]>m?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,l,d))}});var OT={line:function(t,e,n,i,o){return"angle"===t.dim?{type:"Line",shape:bI(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:MI(e.cx,e.cy,i[0],i[1],(-n-a/2)*r,(a/2-n)*r)}:{type:"Sector",shape:MI(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};function ET(i,t){t.update="updateView",hp(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),R(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}hv.registerAxisPointerClass("PolarAxisPointer",NT),dp(B(function(t,e,n){var N={},O=function(t){var f={};R(t,function(t,e){var n=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),a=vT(i,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/n.count(),l=f[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;f[a]=l;var h=mT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Il(t.get("barWidth"),s),d=Il(t.get("barMaxWidth"),s),p=t.get("barGap"),g=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=p&&(l.gap=p),null!=g&&(l.categoryGap=g)});var d={};return R(f,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Il(t.categoryGap,i),a=Il(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);R(e,function(t,e){var n=t.maxWidth;n&&n<l&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;R(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;R(e,function(t,e){d[n][e]=d[n][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(I(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=vT(n,i),a=mT(t),r=O[o][a],s=r.offset,l=r.width,u=n.getOtherAxis(i),h=t.coordinateSystem.cx,c=t.coordinateSystem.cy,d=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;N[a]=N[a]||[];for(var g=e.mapDimension(u.dim),f=e.mapDimension(i.dim),m=og(e,g),v="radius"!==i.dim||!t.get("roundCap",!0),y=u.getExtent()[0],x=0,_=e.count();x<_;x++){var w,b,S,M,I,T,A,D,C=e.get(g,x),L=e.get(f,x),k=0<=C?"p":"n",P=y;m&&(N[a][L]||(N[a][L]={p:y,n:y}),P=N[a][L][k]),"radius"===u.dim?(I=u.dataToRadius(C)-y,T=i.dataToAngle(L),Math.abs(I)<d&&(I=(I<0?-1:1)*d),b=(w=P)+I,M=(S=T-s)-l,m&&(N[a][L][k]=b)):(A=u.dataToAngle(C,v)-y,D=i.dataToRadius(L),Math.abs(A)<p&&(A=(A<0?-1:1)*p),b=(w=D+s)+l,M=(S=P)+A,m&&(N[a][L][k]=M)),e.setItemLayout(x,{cx:h,cy:c,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180})}}},this)},"bar")),vp({type:"polar"}),b(_u.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){_u.prototype.init.apply(this,arguments),Oo(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=lx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=S(t.regions||[],function(t,e){return e.name&&t.set(e.name,new yl(e,n)),t},et()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new yl(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label"+("normal"===e?".":e+".")+"formatter"),i={name:t};return"function"==typeof n?(i.status=e,n(i)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),Wv),vp({type:"geo",init:function(t,e){var n=new jy(e,!0);this._mapDraw=n,this.group.add(n.group)},render:function(t,e,n,i){var o;i&&"geoToggleSelect"===i.type&&i.from===this.uid||(o=this._mapDraw,t.get("show")?o.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent"))},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),ET("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),ET("select",{type:"geoSelect",event:"geoselected"}),ET("unSelect",{type:"geoUnSelect",event:"geounselected"});function RT(t,e,n){this._model=t}function zT(t,e,n,i){var o=n.calendarModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](i):null}RT.prototype={constructor:RT,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){var e=(t=Rl(t)).getFullYear(),n=(n=t.getMonth()+1)<10?"0"+n:n,i=(i=t.getDate())<10?"0"+i:i,o=t.getDay();return{y:e,m:n,d:i,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),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 n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[n,7]:[7,n];R([0,1],function(t){u(o,t)&&(a[i[t]]=o[t]*r[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=cu(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}R([0,1],function(t){u(o,t)||(o[t]=l[i[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){C(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,o=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];var a=n.day,r=this._getRangeInfo([i.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},convertToPixel:B(zT,"dataToPoint"),convertFromPixel:B(zT,"pointToData"),_initRangeOption:function(){var t,e,n,i=this._model.get("range"),o=i;C(o)&&1===o.length&&(o=o[0]),/^\d{4}$/.test(o)&&(i=[o+"-01-01",o+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(o)&&((e=(t=this.getDateInfo(o)).date).setMonth(e.getMonth()+1),n=this.getNextNDay(e,-1),i=[t.formatedDate,n.formatedDate]),/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(o)&&(i=[o,o]);var a=this._getRangeInfo(i);return a.start.time>a.end.time&&i.reverse(),i},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();i.setDate(o+n-1);var r=i.getDate();if(r!==a)for(var s=0<i.getTime()-t[1].time?1:-1;(r=i.getDate())!==a&&0<(i.getTime()-t[1].time)*s;)n-=s,i.setDate(r-s);var l=Math.floor((n+t[0].day+6)/7),u=e?1-l:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return!1;var o=7*(t-1)-i.fweek+e,a=new Date(i.start.time);return a.setDate(i.start.d+o),this.getDateInfo(a)}},RT.dimensions=RT.prototype.dimensions,RT.getDimensionsInfo=RT.prototype.getDimensionsInfo,RT.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new RT(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},Ju.register("calendar",RT);var BT=_u.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,i){var o=gu(t);BT.superApply(this,"init",arguments),VT(t,o)},mergeOption:function(t,e){BT.superApply(this,"mergeOption",arguments),VT(this.option,t)}});function VT(t,i){var o=t.cellSize;C(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o];var e=z([0,1],function(t){var e,n;return(null!=(e=i)[lu[n=t][0]]||null!=e[lu[n][1]]&&null!=e[lu[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});pu(t,i,{type:"box",ignoreSize:e})}var GT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},FT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};vp({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,i),this._renderLines(t,a,r,i),this._renderYearText(t,a,r,i),this._renderMonthText(t,r,i),this._renderWeekText(t,a,r,i)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=i.getCellWidth(),r=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Kr({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(u)}},_renderLines:function(n,t,i,o){var a=this,r=n.coordinateSystem,s=n.getModel("splitLine.lineStyle").getLineStyle(),l=n.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(n,t,i);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,i),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,i),s,o)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},_drawSplitline:function(t,e,n){var i=new Zr({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=i.getNextNDay(e.time,a),s=i.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===n?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?Jl(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,o){e=e.slice();var a=["center","bottom"];"bottom"===i?(e[1]+=o,a=["center","top"]):"left"===i?e[0]-=o:"right"===i?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==i&&"right"!==i||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m=t.getModel("yearLabel");m.get("show")&&(o=m.get("margin"),a=(a=m.get("position"))||("horizontal"!==n?"top":"left"),s=((r=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+r[1][0])/2,l=(r[0][1]+r[1][1])/2,h={top:[s,r[u="horizontal"===n?0:1][1]],bottom:[s,r[1-u][1]],left:[r[1-u][0],l],right:[r[u][0],l]},c=e.start.y,+e.end.y>+e.start.y&&(c=c+"-"+e.end.y),d=m.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(d,p),Ys((f=new Er({z2:30})).style,m,{text:g}),f.attr(this._yearTextPositionControl(f,h[a],n,a,o)),i.add(f))},_monthTextPositionControl:function(t,e,n,i,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(a="center"),"start"===i&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===i&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),r=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];L(o)&&(o=GT[o.toUpperCase()]||[]);for(var u="start"===r?0:1,h="horizontal"===e?0:1,a="start"===r?-a:a,c="center"===s,d=0;d<l[u].length-1;d++){var p,g=l[u][d].slice(),f=this._firstDayOfMonth[d];c&&(p=this._firstDayPoints[d],g[h]=(p[h]+l[0][d+1][h])/2);var m=i.get("formatter"),v=o[f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new Er({z2:30});P(Ys(_.style,i,{text:x}),this._monthTextPositionControl(g,c,e,r,a)),n.add(_)}}},_weekTextPositionControl:function(t,e,n,i,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===n;return"horizontal"===e?(s=s+i+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+i+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,n,i){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();L(s)&&(s=FT[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()],l=Il(l,c["horizontal"===n?0:1]);"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center,f=Math.abs((d+u)%7),m=new Er({z2:30});P(Ys(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,n,r,l,c)),i.add(m)}}}});var WT={path:null,compoundPath:null,group:In,image:Xi,text:Er};lp(function(t){var e=t.graphic;C(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var HT=mp({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,HT.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,o=n.elements=e?[]:n.elements,a=[];this._flatten(i,a);var r=zo(o,a);Bo(r);var s=this._elOptionsToUpdate=[];R(r,function(t,e){var n=t.option;D&&q(V(n)||t.exist,"Empty graphic option definition"),n&&(s.push(n),function(t,e){var n=t.exist;{var i;e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId&&((i=e.parentOption)?e.parentId=i.id:n&&(e.parentId=n.parentId))}e.parentOption=null}(t,n),function(t,e,n){var i=P({},n),o=t[e],a=n.$action||"merge";{var r;"merge"===a?o?(D&&q(!(r=n.type)||o.type===r,'Please set $action: "replace" to change `type`'),m(o,i,!0),pu(o,i,{ignoreSize:!0}),fu(n,o)):t[e]=i:"replace"===a?t[e]=i:"remove"===a&&o&&(t[e]=null)}}(o,e,n),function(t,e){if(!t)return;t.hv=e.hv=[XT(e,["left","right"]),XT(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(o[e],n))},this);for(var l=o.length-1;0<=l;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,n,i){R(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function ZT(t,e,n,i){var o=n.type;D&&q(o,"graphic type MUST be set");var a=WT.hasOwnProperty(o)?WT[o]:ws(o);D&&q(a,"graphic type can not be found");var r=new a(n);e.add(r),i.set(t,r),r.__ecGraphicId=t}function UT(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){UT(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function XT(e,t){var n;return R(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}vp({type:"graphic",init:function(t,e){this._elMap=et(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(h){var c,d,t=h.useElOptionsToUpdate();t&&(c=this._elMap,d=this.group,R(t,function(t){var e=t.$action,n=t.id,i=c.get(n),o=t.parentId,a=null!=o?c.get(o):d,r=t.style;"text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke));var s,l=(s=P({},s=t),R(["id","parentId","$action","hv","bounding"].concat(su),function(t){delete s[t]}),s);D&&i&&q(a===i.parent,"Changing parent is not supported."),e&&"merge"!==e?"replace"===e?(UT(i,c),ZT(n,a,l,c)):"remove"===e&&UT(i,c):i?i.attr(l):ZT(n,a,l,c);var u=c.get(n);u&&(u.__ecGraphicWidthOption=t.width,u.__ecGraphicHeightOption=t.height,function(t,e){var n=t.eventData;t.silent||t.ignore||n||(n=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});n&&(n.info=t.info)}(u,h))}))},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s<n.length;s++){var l,u=n[s];(h=o.get(u.id))&&h.isGroup&&(l=(c=h.parent)===i,h.__ecGraphicWidth=Il(h.__ecGraphicWidthOption,l?a:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=Il(h.__ecGraphicHeightOption,l?r:c.__ecGraphicHeight)||0)}for(s=n.length-1;0<=s;s--){var h,c,u=n[s];(h=o.get(u.id))&&du(h,u,(c=h.parent)===i?{width:a,height:r}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:u.hv,boundingMode:u.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){UT(t,e)}),this._elMap=et()},dispose:function(){this._clear()}});var YT={};function jT(t,e){YT[t]=e}function qT(t){return YT[t]}var KT=mp({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){KT.superApply(this,"optionUpdated",arguments),R(this.option.feature,function(t,e){var n=qT(e);n&&m(t,n.defaultOption)})},defaultOption:{show:!0,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:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function $T(t,e){var n=Ul(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Kr({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}vp({type:"toolbox",render:function(h,c,d,l){var p,u,g,f,t,e,n,i,o,a,r,m=this.group;function s(t,e){var n,i=f[t],o=f[e],a=u[i],r=new yl(a,h,h.ecModel);if(l&&null!=l.newTitle&&l.featureName===i&&(a.title=l.newTitle),i&&!o){if(0===i.indexOf("my"))n={model:r,onclick:r.option.onclick,featureName:i};else{var s=qT(i);if(!s)return;n=new s(r,c,d)}g[i]=n}else{if(!(n=g[o]))return;n.model=r,n.ecModel=c,n.api=d}i||!o?r.get("show")&&!n.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};{var n,i;"string"==typeof e&&(n=e,i=l,l={},(e={})[t]=n,l[t]=i)}var u=o.iconPaths={};R(e,function(t,e){var n=ll(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(r.getItemStyle()),n.hoverStyle=s.getItemStyle(),n.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var i=h.getModel("tooltip");i&&i.get("show")&&n.attr("tooltip",P({content:l[e],formatter:i.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:i.get("position",!0)||"bottom"},i.option)),Fs(n),h.get("showTitle")&&(n.__title=l[e],n.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";n.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){n.setStyle({textFill:null,textBackgroundColor:null})})),n.trigger(o.get("iconStatus."+e)||"normal"),m.add(n),n.on("click",N(a.onclick,a,c,d,e)),u[e]=n})}(r,n,i),r.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},n.render&&n.render(r,c,d,l)):n.remove&&n.remove(c,d):n.dispose&&n.dispose(c,d)}m.removeAll(),h.get("show")&&(p=+h.get("itemSize"),u=h.get("feature")||{},g=this._features||(this._features={}),f=[],R(u,function(t,e){f.push(e)}),new wp(this._featureNames||[],f).add(s).update(s).remove(B(s,null)).execute(),this._featureNames=f,t=m,n=d,i=(e=h).getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},r=cu(i,a,o),hu(e.get("orient"),t,e.get("itemGap"),r.width,r.height),du(t,i,a,o),m.add($T(m.getBoundingRect(),h)),m.eachChild(function(t){var e,n,i,o,a=t.__title,r=t.hoverStyle;r&&a&&(e=ui(a,_i(r)),n=t.position[0]+m.position[0],i=!1,t.position[1]+m.position[1]+p+e.height>d.getHeight()&&(r.textPosition="top",i=!0),o=i?-5-e.height:p+8,n+e.width/2>d.getWidth()?(r.textPosition=["100%",o],r.textAlign="right"):n-e.width/2<0&&(r.textPosition=[0,o],r.textAlign="left"))}))},updateView:function(t,e,n,i){R(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){R(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){R(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var JT=Sc.toolbox.saveAsImage;function QT(t){this.model=t}QT.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:JT.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:JT.lang.slice()},QT.prototype.unusable=!v.canvasSupported,QT.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType()?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+o)}else{var h=n.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=i+"."+o,d.target="_blank",d.href=a;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(p)}},jT("saveAsImage",QT);var tA=Sc.toolbox.magicType,eA="__ec_magicType_stack__";function nA(t){this.model=t}nA.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:k(tA.title),option:{},seriesIndex:{}};var iA=nA.prototype;iA.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return R(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var oA={line:function(t,e,n,i){if("bar"===t)return m({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(t,e,n,i){if("line"===t)return m({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(t,e,n,i){var o=n.get("stack")===eA;if("line"===t||"bar"===t)return i.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":eA},i.get("option.stack")||{},!0)}},aA=[["line","bar"],["stack"]];iA.onclick=function(u,t,h){var c,e,d=this.model,n=d.get("seriesIndex."+h);oA[h]&&(c={series:[]},R(aA,function(t){0<=M(t,h)&&R(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==n?null:{seriesIndex:n}},function(t){var e=t.subType,n=t.id,i=oA[h](e,n,t,d);i&&(O(i,t.option),c.series.push(i));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;c[r]=c[r]||[];for(var l=0;l<=s;l++)c[r][s]=c[r][s]||{};c[r][s].boundaryGap="bar"===h}}}),"stack"===h&&(e=c.series&&c.series[0]&&c.series[0].stack===eA?m({stack:tA.title.tiled},tA.title):k(tA.title)),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:c,newTitle:e,featureName:"magicType"}))},hp({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),jT("magicType",nA);var rA=Sc.toolbox.dataView,sA=new Array(60).join("-"),lA="\t";function uA(t){var o,a,r,h,e=(o={},a=[],r=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;!i||"cartesian2d"!==i.type&&"polar"!==i.type||"category"!==(e=i.getBaseAxis()).type?a.push(t):(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},r.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t))}),{seriesGroupByCategoryAxis:o,other:a,meta:r});return{value:I([(h=[],R(e.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(z(t.series,function(t){return t.name})),a=[n.model.getCategories()];R(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))});for(var r=[o.join(lA)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(lA))}h.push(r.join("\n"))}),h.join("\n\n"+sA+"\n\n")),z(e.other,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],n=o.getName(e),i=0;i<t-1;i++)r[i]=arguments[i];a.push((n?n+lA:"")+r.join(lA))}),a.join("\n")}).join("\n\n"+sA+"\n\n")],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+sA+"\n\n"),meta:e.meta}}function hA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var cA=new RegExp("["+lA+"]+","g");function dA(t,r){var e=t.split(new RegExp("\n*"+sA+"\n*","g")),s={series:[]};return R(e,function(t,e){var n,i,o,a;0<=(a=t).slice(0,a.indexOf("\n")).indexOf(lA)?(o=function(t){for(var e=t.split(/\n+/g),n=[],i=z(hA(e.shift()).split(cA),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=hA(e[o]).split(cA);n.push(a.shift());for(var r=0;r<a.length;r++)i[r]&&(i[r].data[o]=a[r])}return{series:i,categories:n}}(t),i=(n=r[e]).axisDim+"Axis",n&&(s[i]=s[i]||[],s[i][n.axisIndex]={data:o.categories},s.series=s.series.concat(o.series))):(o=function(t){for(var e=t.split(/\n+/g),n=hA(e.shift()),i=[],o=0;o<e.length;o++){for(var a,r=hA(e[o]).split(cA),s=!1,l=isNaN(r[0])?(s=!0,a=r[0],r=r.slice(1),i[o]={name:a,value:[]},i[o].value):i[o]=[],u=0;u<r.length;u++)l.push(+r[u]);1===l.length&&(s?i[o].value=l[0]:i[o]=l[0])}return{name:n,data:i}}(t),s.series.push(o))}),s}function pA(t){this._dom=null,this.model=t}pA.defaultOption={show:!0,readOnly:!1,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:k(rA.title),lang:k(rA.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},pA.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var a=document.createElement("h4"),r=i.get("lang")||[];a.innerHTML=r[0]||i.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u,h=i.get("optionToContent"),c=i.get("contentToOption"),d=uA(t);"function"==typeof h?"string"==typeof(u=h(e.getOption()))?s.innerHTML=u:W(u)&&s.appendChild(u):(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=d.value);var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var f="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");f+=";background-color:"+i.get("buttonColor"),f+=";color:"+i.get("buttonTextColor");var y=this;function x(){n.removeChild(o),y._dom=null}Ut(m,"click",x),Ut(v,"click",function(){var t;try{t="function"==typeof c?c(s,e.getOption()):dA(l.value,p)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=f,m.style.cssText=f,i.get("readOnly")||g.appendChild(v),g.appendChild(m),o.appendChild(a),o.appendChild(s),o.appendChild(g),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},pA.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},pA.prototype.dispose=function(t,e){this.remove(t,e)},jT("dataView",pA),hp({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var r=[];R(t.newOption.series,function(t){var e,n,i,o=a.getSeriesByName(t.name)[0];o?(e=o.get("data"),r.push({name:t.name,data:(n=t.data,i=e,z(n,function(t,e){var n=i&&i[e];return V(n)&&!C(n)?(V(t)&&!C(t)&&(t=t.value),O({value:t},n)):t}))})):r.push(P({type:"scatter"},t))}),a.mergeOption(O({series:r},t.newOption))});var gA=R,fA=M,mA=B,vA=["dataToPoint","pointToData"],yA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function xA(t,e,n){var i=this._targetInfoList=[],o={},a=bA(e,t);gA(SA,function(t,e){n&&n.include&&!(0<=fA(n.include,e))||t(a,i,o)})}var _A=xA.prototype;function wA(t){return t[0]>t[1]&&t.reverse(),t}function bA(t,e){return Zo(t,e,{includeMainTypes:yA})}_A.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){var i;(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,i=TA[t.brushType](0,n,e),t.__rangeOffset={offset:DA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax})})},_A.matchOutputRanges=function(t,i,o){gA(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&R(t.coordSyses,function(t){var e=TA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},_A.setInputRanges=function(t,u){gA(t,function(t){var e,n,i,o,a,r,s,l=this.findTargetInfo(t,u);D&&(q(!l||!0===l||t.coordRange,"coordRange must be specified when coord index specified."),q(!l||!0!==l||t.range,"range must be specified in global brush.")),t.range=t.range||[],l&&!0!==l&&(t.panelId=l.panelId,e=TA[t.brushType](0,l.coordSys,t.coordRange),n=t.__rangeOffset,t.range=n?DA[t.brushType](e.values,n.offset,(i=e.xyMinMax,o=n.xyMinMax,a=LA(i),r=LA(o),s=[a[0]/r[0],a[1]/r[1]],isNaN(s[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):e.values)},this)},_A.makePanelOpts=function(n,i){return z(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:jb(e),isTargetByCursor:Kb(e,n,t.coordSysModel),getLinearBrushOtherExtent:qb(e)}})},_A.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=fA(i.coordSyses,e.coordinateSystem)},_A.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=bA(e,t),o=0;o<n.length;o++){var a=n[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<MA.length;o++)if(MA[o](i,a))return a}return!0};var SA={grid:function(t,i){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,n=et(),r={},s={};(o||a||e)&&(gA(o,function(t){var e=t.axis.grid.model;n.set(e.id,e),r[e.id]=!0}),gA(a,function(t){var e=t.axis.grid.model;n.set(e.id,e),s[e.id]=!0}),gA(e,function(t){n.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),n.each(function(t){var e=t.coordinateSystem,n=[];gA(e.getCartesians(),function(t,e){(0<=fA(o,t.getAxis("x").model)||0<=fA(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:IA.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){gA(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:IA.geo})})}},MA=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],IA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(il(t)),e}},TA={lineX:mA(AA,0),lineY:mA(AA,1),rect:function(t,e,n){var i=e[vA[t]]([n[0][0],n[1][0]]),o=e[vA[t]]([n[0][1],n[1][1]]),a=[wA([i[0],o[0]]),wA([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(n,i,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:z(t,function(t){var e=i[vA[n]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}};function AA(t,e,n,i){D&&q("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),a=wA(z([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}var DA={lineX:mA(CA,0),lineY:mA(CA,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return z(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function CA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function LA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var kA=R,PA="\0_ec_hist_store";function NA(t){return t[PA]||(t[PA]=[{}])}_u.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var OA=["cartesian2d","polar","singleAxis"];var EA,RA,zA,BA,VA=(RA=["axisIndex","axis","index","id"],zA=z(EA=(EA=["x","y","z","radius","angle","single"]).slice(),nu),BA=z(RA=(RA||[]).slice(),nu),function(o,a){R(EA,function(t,e){for(var n={name:t,capital:zA[e]},i=0;i<RA.length;i++)n[RA[i]]=t+BA[i];o.call(a,n)})});function GA(n,s,l){return function(t){var a,r={nodes:[],records:{}};if(s(function(t){r.records[t.name]={}}),!t)return r;for(u(t,r);a=!1,n(e),a;);function e(t){var n,i,o,e;e=t,0<=M(r.nodes,e)||(n=t,i=r,o=!1,s(function(e){R(l(n,e)||[],function(t){i.records[e.name][t]&&(o=!0)})}),!o)||(u(t,r),a=!0)}return r};function u(t,n){n.nodes.push(t),s(function(e){R(l(t,e)||[],function(t){n.records[e.name][t]=!0})})}}function FA(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n}var WA=R,HA=Al;function ZA(t,e){var n,i,o=t.getAxisModel(),a=t._percentWindow,r=t._valueWindow;a&&(n=Ll(r,[0,500]),n=Math.min(n,20),i=e||0===a[0]&&100===a[1],o.setRange(i?null:+r[0].toFixed(n),i?null:+r[1].toFixed(n)))}FA.prototype={constructor:FA,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var o=[],a=this.ecModel;return a.eachSeries(function(t){var e,n,i;i=t.get("coordinateSystem"),0<=M(OA,i)&&(e=this._dimName,n=a.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0],this._axisIndex===(n&&n.componentIndex)&&o.push(t))},this),o},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,n,t=this._dimName,i=this.ecModel,o=this.getAxisModel(),a="x"===t||"y"===t?(e="gridIndex","x"===t?"y":"x"):(e="polarIndex","angle"===t?"radius":"angle");return i.eachComponent(a+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return k(this._minMaxSpan)},calculateDataWindow:function(o){var a,r=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];WA(["start","end"],function(t,e){var n=o[t],i=o[t+"Value"];"percent"===l[e]?(null==n&&(n=u[e]),i=s.parse(Ml(n,u,r))):(a=!0,n=Ml(i=null==i?r[e]:s.parse(i),r,u)),c[e]=i,h[e]=n}),HA(c),HA(h);var d=this._minMaxSpan;function t(t,e,n,i,o){var a=o?"Span":"ValueSpan";Uw(0,t,n,"all",d["min"+a],d["max"+a]);for(var r=0;r<2;r++)e[r]=Ml(t[r],n,i,!0),o&&(e[r]=s.parse(e[r]))}return a?t(c,h,r,u,!1):t(h,c,u,r,!0),{valueWindow:c,percentWindow:h}},reset:function(t){var e,i,o,a,r,n;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=function(t,e,n){var i=[1/0,-1/0];WA(n,function(t){var n=t.getData();n&&WA(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1])})}),i[1]<i[0]&&(i=[NaN,NaN]);return function(t,e){var n=t.getAxisModel(),i=n.getMin(!0),o="category"===n.get("type"),a=o&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:o&&(e[0]=0<a?0:NaN);var r=n.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN);n.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,i),i}(this,this._dimName,e),o=(i=this)._minMaxSpan={},a=i._dataZoomModel,r=i._dataExtent,WA(["min","max"],function(t){var e=a.get(t+"Span"),n=a.get(t+"ValueSpan");null!=n&&(n=i.getAxisModel().axis.scale.parse(n)),null!=n?e=Ml(r[0]+n,r,[0,100],!0):null!=e&&(n=Ml(e,[0,100],r,!0)-r[0]),o[t+"Span"]=e,o[t+"ValueSpan"]=n}),n=this.calculateDataWindow(t.settledOption),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,ZA(this))},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,ZA(this,!0))},filterData:function(t,e){var i,n,o,c;t===this._dataZoomModel&&(i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),c=this._valueWindow,"none"!==o&&WA(n,function(n){var u=n.getData(),h=u.mapDimension(i,!0);h.length&&("weakFilter"===o?u.filterSelf(function(t){for(var e,n,i,o=0;o<h.length;o++){var a=u.get(h[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):WA(h,function(t){var e;"empty"===o?n.setData(u=u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,u.selectRange(e))}),WA(h,function(t){u.setApproximateExtent(c,t)}))}))}};var UA=R,XA=VA,YA=mp({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,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=jA(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=jA(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var n=this.option;v.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),qA(this,t);var i=this.settledOption;UA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new FA(t.name,e,this,i));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();XA(function(t){var e=t.axisIndex;n[e]=No(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;XA(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t,a=!0,e=this.get("orient",!0),r=this.option,n=this.dependentModels;a&&(n[(t="vertical"===e?"y":"x")+"Axis"].length?(r[t+"AxisIndex"]=[0],a=!1):UA(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&XA(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,o=n.length;i<o;i++)"category"===n[i].get("type")&&e.push(i);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(a){this._isSeriesHasAllAxesTypeOf(a,"value")&&XA(function(t){var e=r[t.axisIndex],n=a.get(t.axisIndex),i=a.get(t.axisId),o=a.ecModel.queryComponents({mainType:t.axis,index:n,id:i})[0];if(D&&!o)throw new Error(t.axis+' "'+Z(n,i,0)+'" not found');M(e,n=o.componentIndex)<0&&e.push(n)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(i,o){var a=!0;return XA(function(t){var e=i.get(t.axisIndex),n=this.dependentModels[t.axis][e];n&&n.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){var e;t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(e=this.ecModel.option,this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20)},getFirstTargetAxisModel:function(){var n;return XA(function(t){var e;null!=n||(e=this.get(t.axisIndex)).length&&(n=this.dependentModels[t.axis][e[0]])},this),n},eachTargetAxis:function(n,i){var o=this.ecModel;XA(function(e){UA(this.get(e.axisIndex),function(t){n.call(i,e,t,this,o)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(e){var n=this.option,i=this.settledOption;UA([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),qA(this,e)},setCalculatedRange:function(e){var n=this.option;UA(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function jA(e){var n={};return UA(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function qA(t,o){var a=t._rangePropMode,r=t.get("rangeMode");UA([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=o[t[0]],i=null!=o[t[1]];n&&!i?a[e]="percent":!n&&i?a[e]="value":r?a[e]=r[e]:n&&(a[e]="percent")})}var KA=oc.extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var n,i=o.getComponent(t.axis,e);i&&(n=i.getCoordSysModel())&&function(t,e,n,i){for(var o,a=0;a<n.length;a++)if(n[a].model===t){o=n[a];break}o||n.push(o={model:t,axisModels:[],coordIndex:i});o.axisModels.push(e)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)},this),a}});YA.extend({type:"dataZoom.select"}),KA.extend({type:"dataZoom.select"}),up({getTargetSeries:function(t){var i=et();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){R(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})})}}),hp("dataZoom",function(n,t){var i=GA(N(t.eachComponent,t,"dataZoom"),VA,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:n},function(t,e){o.push.apply(o,i(t).nodes)}),R(o,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})});var $A=Sc.toolbox.dataZoom,JA=R;function QA(t,e,n){(this._brushController=new yb(n.getZr())).on("brush",N(this._onBrush,this)).mount(),this._isZoomActive}QA.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:k($A.title)};var tD=QA.prototype;tD.render=function(t,e,n,i){var o;this.model=t,this.ecModel=e,this.api=n,function(t,e,n,i,o){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new xA(nD(t.option),e,{include:["grid"]});n._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,i,n),o=e,t.setIconStatus("back",1<function(t){return NA(t).length}(o)?"emphasis":"normal")},tD.onclick=function(t,e,n){eD[n].call(this)},tD.remove=function(t,e){this._brushController.unmount()},tD.dispose=function(t,e){this._brushController.dispose()};var eD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=NA(t),e=i[i.length-1];1<i.length&&i.pop();var o={};return kA(e,function(t,e){for(var n=i.length-1;0<=n;n--){if(t=i[n][e]){o[e]=t;break}}}),o}(this.ecModel))}};function nD(e){var n={};return R(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),!1!==n[t]&&"none"!==n[t]||(n[t]=[])}),n}tD._onBrush=function(t,e){var h,c,a,n,r;function o(t,e,n){var i,o,a,r=e.getAxis(t),s=r.model,l=(i=t,o=s,c.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(a=t)}),a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(n=Uw(0,n.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(h[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}e.isEnd&&t.length&&(h={},c=this.ecModel,this._brushController.updateCovers([]),new xA(nD(this.model.option),c,{include:["grid"]}).matchOutputRanges(t,c,function(t,e,n){var i;"cartesian2d"===n.type&&("rect"===(i=t.brushType)?(o("x",n,e[0]),o("y",n,e[1])):o({lineX:"x",lineY:"y"}[i],n,e))}),n=h,r=NA(a=c),kA(n,function(t,e){for(var n,i,o=r.length-1;0<=o;o--){if(r[o][e])break}o<0&&((n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(i=n.getPercentRange(),r[0][e]={dataZoomId:e,start:i[0],end:i[1]}))}),r.push(n),this._dispatchZoomAction(h))},tD._dispatchZoomAction=function(t){var n=[];JA(t,function(t,e){n.push(k(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},jT("dataZoom",QA),lp(function(s){var l,t,e;function n(i,o){var a,r;o&&(null==(r=o[a=i+"Index"])||"all"===r||C(r)||(r=!1===r||"none"===r?[]:[r]),function(t,e){var n=s[t];C(n)||(n=n?[n]:[]);JA(n,e)}(i,function(t,e){var n;null!=r&&"all"!==r&&-1===M(r,e)||((n={type:"select",$fromToolbox:!0,filterMode:o.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+e})[a]=e,l.push(n))}))}s&&(C(l=s.dataZoom||(s.dataZoom=[]))||(s.dataZoom=l=[l]),(t=s.toolbox)&&(C(t)&&(t=t[0]),t&&t.feature&&(n("xAxis",e=t.feature.dataZoom),n("yAxis",e))))});var iD=Sc.toolbox.restore;function oD(t){this.model=t}oD.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:iD.title},oD.prototype.onclick=function(t,e,n){t[PA]=null,e.dispatchAction({type:"restore",from:this.uid})},jT("restore",oD),hp({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),mp({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,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 aD=R,rD=Zl,sD=["","-webkit-","-moz-","-o-"];function lD(o){var t,e,n,i,a,r,s,l=[],u=o.get("transitionDuration"),h=o.get("backgroundColor"),c=o.getModel("textStyle"),d=o.get("padding");return u&&l.push((n="left "+(t=u)+"s "+(e="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+t+"s "+e,z(sD,function(t){return t+"transition:"+n}).join(";"))),h&&(v.canvasSupported?l.push("background-Color:"+h):(l.push("background-Color:#"+He(h)),l.push("filter:alpha(opacity=70)"))),aD(["width","color","radius"],function(t){var e="border-"+t,n=rD(e),i=o.get(n);null!=i&&l.push(e+":"+i+("color"===t?"":"px"))}),l.push((a=[],r=(i=c).get("fontSize"),(s=i.getTextColor())&&a.push("color:"+s),a.push("font:"+i.getFont()),r&&a.push("line-height:"+Math.round(3*r/2)+"px"),aD(["decoration","align"],function(t){var e=i.get(t);e&&a.push("text-"+t+":"+e)}),a.join(";"))),null!=d&&l.push("padding:"+Ul(d).join("px ")+"px"),l.join(";")+";"}function uD(t,e,n,i,o){var a,r,s,l,u,h=e&&e.painter;n?(a=h&&h.getViewportRoot())&&(s=t,l=a,u=document.body,Rt(Et,l,i,o,!0)&&Rt(s,u,Et[0],Et[1])):(t[0]=i,t[1]=o,(r=h&&h.getViewportRootOffset())&&(t[0]+=r.offsetLeft,t[1]+=r.offsetTop))}function hD(t,e,n){if(v.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var o=this._zr=e.getZr(),a=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],uD(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(i):t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(t){var e;t=t||window.event,r._enterable||(e=o.handler,Zt(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t))},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function cD(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}hD.prototype={constructor:hD,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+lD(t)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n=this._styleCoord;uD(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(N(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t,e=this.el.clientWidth,n=this.el.clientHeight;return document.defaultView&&document.defaultView.getComputedStyle&&((t=document.defaultView.getComputedStyle(this.el))&&(e+=parseInt(t.borderLeftWidth,10)+parseInt(t.borderRightWidth,10),n+=parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10))),{width:e,height:n}}},cD.prototype={constructor:cD,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},o=t,a="{marker",r=o.indexOf(a);0<=r;){var s=o.indexOf("|}"),l=o.substr(r+a.length,s-r-a.length);-1<l.indexOf("sub")?i["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:i["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},r=(o=o.substr(s+1)).indexOf("{marker")}this.el=new Er({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(N(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var dD=N,pD=R,gD=Il,fD=new Kr({shape:{x:-1,y:-1,width:2,height:2}});function mD(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(yl.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new yl(n,e,e.ecModel))}return e}function vD(t,e){return t.dispatchAction||N(e.dispatchAction,e)}function yD(t){return"center"===t||"middle"===t}vp({type:"tooltip",init:function(t,e){var n,i,o;v.node||(i=(n=t.getComponent("tooltip")).get("renderMode"),this._renderMode=Yo(i),"html"===this._renderMode?(o=new hD(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(o=new cD(e),this._newLine="\n"),this._tooltipContent=o)},render:function(t,e,n){var i;v.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent"),(i=this._tooltipContent).update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow())},_initGlobalListener:function(){var i=this._tooltipModel.get("triggerOn");oI("itemTooltip",this._api,dD(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api;null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY})}))},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!v.node){var o=vD(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var r=fD;r.position=[i.x,i.y],r.update(),r.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:r},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=YM(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},manuallyHideTip:function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(vD(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var o=i.seriesIndex,a=i.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s)if("axis"===(t=mD([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:i.position}),!0}},_tryShow:function(t,e){var n,i=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e)))},_showOrMove:function(t,e){var n=t.get("showDelay");e=N(e,this),clearTimeout(this._showTimout),0<n?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],o=[],p=[],a=mD([e.tooltipOption,n]),g=this._renderMode,r=this._newLine,f={};pD(t,function(t){pD(t.dataByAxis,function(s){var l,t,u=d.getComponent(s.axisDim+"Axis",s.axisIndex),h=s.value,c=[];u&&null!=h&&(l=xI(h,u.axis,d,s.seriesDataIndices,s.valueLabelOpt),R(s.seriesDataIndices,function(t){var e,n,i,o=d.getSeriesByIndex(t.seriesIndex),a=t.dataIndexInside,r=o&&o.getDataParams(a);r.axisDim=s.axisDim,r.axisIndex=s.axisIndex,r.axisType=s.axisType,r.axisId=s.axisId,r.axisValue=tf(u.axis,h),r.axisValueLabel=l,r&&(p.push(r),V(e=o.formatTooltip(a,!0,null,g))?(n=e.html,i=e.markers,m(f,i)):n=e,c.push(n))}),t=l,"html"!==g?o.push(c.join(r)):o.push((t?jl(t)+r:"")+c.join(r)))})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,i[0],i[1],this._tooltipContent,p):this._showTooltipContent(a,o,p,Math.random(),i[0],i[1],s,void 0,f)})},_showSeriesItemTooltip:function(t,e,n){var i,o,a,r,s,l=this._ecModel,u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,d=e.dataIndex,p=e.dataType,g=c.getData(p),f=mD([g.getItemModel(d),c,h&&(h.coordinateSystem||{}).model,this._tooltipModel]),m=f.get("trigger");null!=m&&"item"!==m||(i=c.getDataParams(d,p),o=c.formatTooltip(d,!1,p,this._renderMode),r=V(o)?(a=o.html,o.markers):(a=o,null),s="item_"+c.name+"_"+d,this._showOrMove(f,function(){this._showTooltipContent(f,a,i,s,t.offsetX,t.offsetY,t.position,t.target,r)}),n({type:"showTip",dataIndexInside:d,dataIndex:g.getRawIndex(d),seriesIndex:u,from:this.uid}))},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;"string"==typeof i&&(i={content:i,formatter:i});var o=new yl(i,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(n,t,i,e,o,a,r,s,l){var u,h,c,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),r=r||n.get("position"),c=t,h&&"string"==typeof h?c=$l(h,i,!0):"function"==typeof h&&(d=dD(function(t,e){t===this._ticket&&(u.setContent(e,l,n),this._updatePosition(n,r,o,a,u,i,s))},this),this._ticket=e,c=h(i,e,d)),u.setContent(c,l,n),u.show(n),this._updatePosition(n,r,o,a,u,i,s))},_updatePosition:function(t,e,n,i,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h,c,d,p,g,f,m,v,y=o.getSize(),x=t.get("align"),_=t.get("verticalAlign"),w=r&&r.getBoundingRect().clone();r&&w.applyTransform(r.transform),"function"==typeof e&&(e=e([n,i],a,o.el,w,{viewSize:[s,l],contentSize:y.slice()})),C(e)?(n=gD(e[0],s),i=gD(e[1],l)):V(e)?(e.width=y[0],e.height=y[1],n=(u=cu(e,{width:s,height:l})).x,i=u.y,_=x=null):i=(n="string"==typeof e&&r?(h=function(t,e,n){var i=n[0],o=n[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-i/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-i/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-i/2,r=e.y+l+5;break;case"left":a=e.x-i-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,w,y))[0]:(h=function(t,e,n,i,o,a,r){var s=n.getOuterSize(),l=s.width,u=s.height;null!=a&&(i<t+l+a?t-=l+a:t+=a);null!=r&&(o<e+u+r?e-=u+r:e+=r);return[t,e]}(n,i,o,s,l,x?null:20,_?null:20))[0],h[1]),x&&(n-=yD(x)?y[0]/2:"right"===x?y[0]:0),_&&(i-=yD(_)?y[1]/2:"bottom"===_?y[1]:0),t.get("confine")&&(n=(h=(c=n,d=i,p=s,g=l,f=o.getOuterSize(),m=f.width,v=f.height,c=Math.min(c+m,p)-m,d=Math.min(d+v,g)-v,c=Math.max(c,0),d=Math.max(d,0),[c,d]))[0],i=h[1]),o.moveTo(n,i)},_updateContentNotChangedOnAxis:function(i){var t=this._lastDataByCoordSys,r=!!t&&t.length===i.length;return r&&pD(t,function(t,e){var n=t.dataByAxis||{},a=(i[e]||{}).dataByAxis||[];(r&=n.length===a.length)&&pD(n,function(t,e){var n=a[e]||{},i=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(r&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&i.length===o.length)&&pD(i,function(t,e){var n=o[e];r&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=i,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){v.node||(this._tooltipContent.dispose(),sI("itemTooltip",e))}}),hp({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),hp({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var xD=["rect","polygon","keep","clear"];var _D=R;function wD(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function bD(e,t,a){var n={};return _D(t,function(i){var o=n[i]=(t.prototype.__hidden=t.prototype,new t);function t(){}_D(e[i],function(t,e){var n;l_.isValidType(e)&&(n={type:e,visual:t},a&&a(n,i),o[e]=new l_(n),"opacity"===e&&((n=k(n)).type="colorAlpha",o.__hidden.__alphaForOpacity=new l_(n)))})}),n}function SD(e,n,t){var i;R(t,function(t){n.hasOwnProperty(t)&&wD(n[t])&&(i=!0)}),i&&R(t,function(t){n.hasOwnProperty(t)&&wD(n[t])?e[t]=k(n[t]):delete e[t]})}function MD(t,p,g,f){var m={};return R(t,function(t){var e=l_.prepareVisualTypes(p[t]);m[t]=e}),{progress:function(t,n){function e(t){return n.getItemVisual(o,t)}function i(t,e){n.setItemVisual(o,t,e)}var o;for(null!=f&&(f=n.getDimension(f));null!=(o=t.next());){var a=n.getRawDataItem(o);if(!a||!1!==a.visualMap)for(var r=null!=f?n.get(f,o,!0):o,s=g(r),l=p[s],u=m[s],h=0,c=u.length;h<c;h++){var d=u[h];l[d]&&l[d].applyVisual(r,e,i)}}}}}var ID={lineX:TD(0),lineY:TD(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&xf(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=i[0];return!!(xf(i,o,a)||xf(i,o+r,a)||xf(i,o,a+s)||xf(i,o+r,a+s)||Mn.create(t).contain(l[0],l[1])||ul(o,a,o+r,a,i)||ul(o,a,o,a+s,i)||ul(o+r,a,o+r,a+s,i)||ul(o,a+s,o+r,a+s,i))||void 0}}};function TD(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,n){if(t){var i=n.range;return AD(t[a],i)}},rect:function(t,e,n){if(t){var i=n.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),AD(o[0],i)||AD(o[1],i)||AD(i[0],o)||AD(i[1],o)}}}}function AD(t,e){return e[0]<=t&&t<=e[1]}var DD=["inBrush","outOfBrush"],CD="__ecBrushSelect",LD="__ecInBrushSelectEvent",kD=_d.VISUAL.BRUSH;function PD(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new xA(t.option,e)).setInputRanges(t.areas,e)})}function ND(t,e){var n;t.isDisposed()||((n=t.getZr())[LD]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[LD]=!1)}function OD(t,e,n,i){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](i,n,r.selectors,r))return 1}}function ED(t){var r=t.brushSelector;if(L(r)){var e=[];return R(ID,function(a,t){e[t]=function(t,e,n,i){var o=e.getItemLayout(t);return a[r](o,n,i)}}),e}if(A(r)){var n={};return R(ID,function(t,e){n[e]=r}),n}return r}dp(kD,function(t,e,n){t.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})}),PD(t)}),pp(kD,function(u,t,e){var o,a,h=[];u.eachComponent({mainType:"brush"},function(r,t){var l={brushId:r.id,brushIndex:t,brushName:r.name,areas:k(r.areas),selected:[]};h.push(l);var e=r.option,n=e.brushLink,i=[],y=[],x=[],_=0;t||(o=e.throttleType,a=e.throttleDelay);var s=z(r.areas,function(t){return n=O({boundingRect:RD[t.brushType](t)},t),i=n.selectors={},R(ID[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n;var n,i}),w=bD(r.option,DD,function(t){t.mappingMethod="fixed"});function b(t){return"all"===n||i[t]}function S(t){return!!t.length}C(n)&&R(n,function(t){i[t]=1}),u.eachSeries(function(t,e){var n,i,o,a=x[e]=[];"parallel"===t.subType?(i=e,o=(n=t).coordinateSystem,_|=o.hasAxisBrushed(),b(i)&&o.eachActiveState(n.getData(),function(t,e){"active"===t&&(y[e]=1)})):function(e,t,n){var i=ED(e);if(!i||function(t,e){var n=t.option.seriesIndex;return null!=n&&"all"!==n&&(C(n)?M(n,e)<0:e!==n)}(r,t))return;{var o;R(s,function(t){i[t.brushType]&&r.brushTargetManager.controlSeries(t,e,u)&&n.push(t),_|=S(n)}),b(t)&&S(n)&&(o=e.getData()).each(function(t){OD(i,n,o,t)&&(y[t]=1)})}}(t,e,a)}),u.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};l.selected.push(n);var u,h,c,d,p,g,f,i=ED(t),o=x[e],a=t.getData(),r=b(e)?function(t){return y[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return OD(i,o,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};function m(t){return h.getItemVisual(g,t)}function v(t,e){h.setItemVisual(g,t,e)}function s(t,e){g=null==p?t:e;var n=h.getRawDataItem(g);if(!n||!1!==n.visualMap)for(var i=c.call(d,t),o=u[i],a=f[i],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,m,v)}}(b(e)?_:S(o))&&(u=w,h=a,c=r,f={},R(DD,function(t){var e=l_.prepareVisualTypes(u[t]);f[t]=e}),null==p?h.each(s):h.each([p],s))})}),function(t,e,n,i,o){if(!o)return;var a=t.getZr();if(a[LD])return;a[CD]||(a[CD]=ND);_c(a,CD,n,e)(t,i)}(t,o,a,h,e)});var RD={lineX:it,lineY:it,rect:function(t){return zD(t.range)},polygon:function(t){for(var e,n=t.range,i=0,o=n.length;i<o;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=n[i];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&zD(e)}};function zD(t){return new Mn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var BD=["#ddd"];mp({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;e||SD(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:BD},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){D&&(q(C(t)),R(t,function(t){q(t.brushType,"Illegal areas")})),t&&(this.areas=z(t,function(t){return VD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=VD(this.option,t),this.brushType=this.brushOption.brushType}});function VD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new yl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function GD(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}vp({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new yb(e.getZr())).on("brush",N(this._onBrush,this)).mount()},render:function(t){return this.model=t,GD.apply(this,arguments)},updateTransform:function(t,e){return PD(e),GD.apply(this,arguments)},updateView:GD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:k(t),$from:n}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:k(t),$from:n})}}),hp({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),hp({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),hp({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var FD=Sc.toolbox.brush;function WD(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}WD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:k(FD.title)};var HD=WD.prototype;HD.render=HD.updateView=function(e,t,n){var i,o,a;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=o,R(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},HD.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return R(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},HD.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},jT("brush",WD),lp(function(t,e){var n,i,o,a,r,s,l,u=t&&t.brush;C(u)||(u=u?[u]:[]),u.length&&(n=[],R(u,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}),C(i=t&&t.toolbox)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]),(r=(a=(o=i.feature||(i.feature={})).brush||(o.brush={})).type||(a.type=[])).push.apply(r,n),l={},R(s=r,function(t){l[t]=1}),s.length=0,R(l,function(t,e){s.push(e)}),e&&!r.length&&r.push.apply(r,xD))}),mp({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),vp({type:"title",render:function(t,e,n){var i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w;this.group.removeAll(),t.get("show")&&(i=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=U(t.get("textBaseline"),t.get("textVerticalAlign")),u=(l=new Er({style:Ys({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),h=t.get("subtext"),c=new Er({style:Ys({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0),l.silent=!d&&!g,c.silent=!p&&!g,d&&l.on("click",function(){ou(d,"_"+t.get("target"))}),p&&c.on("click",function(){ou(d,"_"+t.get("subtarget"))}),l.eventData=c.eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c),f=i.getBoundingRect(),(m=t.getBoxLayoutParams()).width=f.width,m.height=f.height,v=cu(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]),y={textAlign:r,textVerticalAlign:s},l.setStyle(y),c.setStyle(y),f=i.getBoundingRect(),x=v.margin,(_=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),w=new Kr({shape:{x:f.x-x[3],y:f.y-x[0],width:f.width+x[1]+x[3],height:f.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0}),i.add(w))}});function ZD(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},o=i.normal||(i.normal={}),a={normal:1,emphasis:1};R(i,function(t,e){a[e]||UD(o,e)||(o[e]=t)}),n.label&&!UD(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function UD(t,e){return t.hasOwnProperty(e)}_u.registerSubTypeDefaulter("timeline",function(){return"slider"}),hp({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline"),O({currentIndex:n.option.currentIndex},t)}),hp({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)});var XD=_u.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){XD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var o,t=this.option,e=t.data||[],n=t.axisType,a=this._names=[];"category"===n&&(o=[],R(e,function(t,e){var n,i=Ro(t);V(t)?(n=k(t)).value=e:n=e,o.push(n),L(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o);var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new Bp([{name:"value",type:i}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(XD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Eh);function YD(t,e,n,i){Nf.call(this,t,e,n),this.type=i||"value",this.model=null}var jD=oc.extend({type:"timeline"});YD.prototype={constructor:YD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(YD,Nf);var qD=N,KD=R,$D=Math.PI;function JD(t,e,n,i,o,a){var r=e.get("color");o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=gf(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),n.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),i=m({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,i.scale=l;var u,h=t.get("symbolOffset");h&&((u=i.position=i.position||[0,0])[0]+=Il(h[0],l[0]),u[1]+=Il(h[1],l[1]));var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function QD(t,e,n,i,o){var a,r;t.dragging||(a=i.getModel("checkpointStyle"),r=n.dataToCoord(i.getData().get(["value"],e)),o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0))))}jD.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,n,i){var o,a,r,s;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(o=this._layout(e,n),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e),e.formatTooltip=function(t){return jl(s.scale.getLabel(t))},KD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)),this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n,i,o=t.get("label.position"),a=t.get("orient"),r=(i=e,cu((n=t).getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},n.get("padding")));null==o||"auto"===o?o="horizontal"===a?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.width/2<e.getWidth()/2?"+":"-":isNaN(o)&&(o={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][o]);var s,l,u,h,c={horizontal:"center",vertical:0<=o||"+"===o?"left":"right"},d={horizontal:0<=o||"+"===o?"top":"bottom",vertical:"middle"},p={horizontal:0,vertical:$D/2},g="vertical"===a?r.height:r.width,f=t.getModel("controlStyle"),m=f.get("show",!0),v=m?f.get("itemSize"):0,y=m?f.get("itemGap"):0,x=v+y,_=(_=t.get("label.rotate")||0)*$D/180,w=f.get("position",!0),b=m&&f.get("showPlayBtn",!0),S=m&&f.get("showPrevBtn",!0),M=m&&f.get("showNextBtn",!0),I=0,T=g;return"left"===w||"bottom"===w?(b&&(s=[0,0],I+=x),S&&(l=[I,0],I+=x)):(b&&(s=[T-v,0],T-=x),S&&(l=[0,0],I+=x)),M&&(u=[T-v,0],T-=x),h=[I,T],t.get("inverse")&&h.reverse(),{viewRect:r,mainLength:g,orient:a,rotation:p[a],labelRotation:_,labelPosOpt:o,labelAlign:t.get("label.align")||c[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||d[a],playPosition:s,prevBtnPosition:l,nextBtnPosition:u,axisExtent:h,controlSize:v,controlGap:y}},_position:function(t,e){var n,i,o,a=this._mainGroup,r=this._labelGroup,s=t.viewRect;"vertical"===t.orient&&(le(n=oe(),n,[-(i=s.x),-(o=s.y+s.height)]),ue(n,n,-$D/2),le(n,n,[i,o]),(s=s.clone()).applyTransform(n));var l=m(s),u=m(a.getBoundingRect()),h=m(r.getBoundingRect()),c=a.position,d=r.position;d[0]=c[0]=l[0][0];var p,g=t.labelPosOpt;function f(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}isNaN(g)?(v(c,u,l,1,p="+"===g?0:1),v(d,h,l,1,1-p)):(v(c,u,l,1,p=0<=g?0:1),d[1]=c[1]+g),a.attr("position",c),r.attr("position",d),a.rotation=r.rotation=t.rotation,f(a),f(r)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),o=Jg(e,i);o.getTicks=function(){return n.mapArray(["value"],function(t){return t})};var a=n.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new YD("value",o,t.axisExtent,i);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new In;return this.group.add(e),e},_renderAxisLine:function(t,e,n,i){var o=n.getExtent();i.get("lineStyle.show")&&e.add(new Jr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();KD(e,function(t){var e=l.dataToCoord(t),n=h.getItemModel(t),i=n.getModel("itemStyle"),o=n.getModel("emphasis.itemStyle"),a={position:[e,0],onclick:qD(this._changeTimeline,this,t)},r=JD(n,i,s,a);Fs(r,o.getItemStyle()),n.get("tooltip")?(r.dataIndex=t,r.dataModel=u):r.dataIndex=r.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){var h,e;u.getLabelModel().get("show")&&(h=t.getData(),e=u.getViewLabels(),KD(e,function(t){var e=t.tickValue,n=h.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=u.dataToCoord(t.tickValue),r=new Er({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:qD(this._changeTimeline,this,e),silent:!1});Ys(r.style,i,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),Fs(r,Ys({},o))},this))},_renderControl:function(t,l,e,u){var h=t.controlSize,c=t.rotation,d=u.getModel("controlStyle").getItemStyle(),p=u.getModel("emphasis.controlStyle").getItemStyle(),g=[0,-h/2,h,h],n=u.getPlayState(),i=u.get("inverse",!0);function o(t,e,n,i){var o,a,r,s;t&&(a=e,r=g,s={position:t,origin:[h/2,0],rotation:i?-c:0,rectHover:!0,style:d,onclick:n},o=bs(u.get(a).replace(/^path:\/\//,""),k(s||{}),new Mn(r[0],r[1],r[2],r[3]),"center"),l.add(o),Fs(o,p))}o(t.nextBtnPosition,"controlStyle.nextIcon",qD(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",qD(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,"controlStyle."+(n?"stopIcon":"playIcon"),qD(this._handlePlayClick,this,!n),!0)},_renderCurrentPointer:function(t,e,n,i){var o=i.getData(),a=i.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=qD(s._handlePointerDrag,s),t.ondragend=qD(s._handlePointerDragend,s),QD(t,a,n,i,!0)},onUpdate:function(t){QD(t,a,n,i)}};this._currentPointer=JD(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],i=Al(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var o=this._findNearestTick(n),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(qD(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return ol(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var n=s.dataToCoord(t),i=Math.abs(n-o);i<r&&(r=i,a=e)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),lp(function(t){var e=t&&t.timeline;C(e)||(e=e?[e]:[]),R(e,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);{var i;ZD(t),UD(t,"controlPosition")&&(UD(i=t.controlStyle||(t.controlStyle={}),"position")||(i.position=t.controlPosition),"none"!==i.position||UD(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition)}R(t.data||[],function(t){V(t)&&!C(t)&&(!UD(t,"value")&&UD(t,"name")&&(t.value=t.name),ZD(t))})}(t)})});var tC=Hl,eC=jl;function nC(t){Oo(t,"label",["show"])}var iC=mp({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){if(D&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,i,e,o){var a=this.constructor,r=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[r];e&&e.data?(n?n._mergeOption(e,i,!0):(o&&nC(e),R(e.data,function(t){t instanceof Array?(nC(t[0]),nC(t[1])):nC(t)}),P(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[r]=n):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=C(n)?z(n,tC).join(", "):tC(n),o=e.getName(t),a=eC(this.name);return null==n&&!o||(a+="<br />"),o&&(a+=eC(o),null!=n&&(a+=" : ")),null!=n&&(a+=eC(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(iC,Eh),iC.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var oC=M;function aC(t,e,n,i,o,a){var r=[],s=og(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=dC(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(n,u),r[a]=e.get(s,u);var h=e.get(i,u),c=Dl(e.get(i,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var rC=B,sC={min:rC(aC,"min"),max:rC(aC,"max"),average:rC(aC,"average")};function lC(t,e){var n,i=t.getData(),o=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!C(e.coord)&&o){var a=o.dimensions,r=uC(e,i,o,t);if((e=k(e)).type&&sC[e.type]&&r.baseAxis&&r.valueAxis){var s=oC(a,r.baseAxis.dim),l=oC(a,r.valueAxis.dim),u=sC[e.type](i,r.baseDataDim,r.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)sC[h[c]]&&(h[c]=dC(i,i.mapDimension(a[c]),h[c]));e.coord=h}}return e}function uC(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var o=0;o<i.length;o++){var a=n.getDimensionInfo(i[o]);if(a.name===e)return a.coordDim}}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function hC(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y))))||t.containData(e.coord);var n}function cC(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function dC(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0];var i=0,o=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o}var pC=vp({type:"marker",init:function(){this.markerGroupMap=et()},render:function(t,n,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";n.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});function gC(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,n,i,o=s.getItemModel(t),a=Il(o.get("x"),u.getWidth()),r=Il(o.get("y"),u.getHeight());isNaN(a)||isNaN(r)?l.getMarkerPosition?i=l.getMarkerPosition(s.getValues(s.dimensions,t)):h&&(e=s.get(h.dimensions[0],t),n=s.get(h.dimensions[1],t),i=h.dataToPoint([e,n])):i=[a,r],isNaN(a)||(i[0]=a),isNaN(r)||(i[1]=r),s.setItemLayout(t,i)})}pC.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(gC(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,l,e,n){var i=t.coordinateSystem,o=t.id,u=t.getData(),a=this.markerGroupMap,r=a.get(o)||a.set(o,new qf),h=function(t,e,n){var i;i=t?z(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Bp(i,n),a=z(n.get("data"),B(lC,e));t&&(a=I(a,B(hC,t)));return o.initData(a,null,t?cC:function(t){return t.value}),o}(i,t,l);l.setData(h),gC(l.getData(),t,n),h.each(function(t){var e,n,i=h.getItemModel(t),o=i.getShallow("symbol"),a=i.getShallow("symbolSize"),r=A(o),s=A(a);(r||s)&&(e=l.getRawValue(t),n=l.getDataParams(t),r&&(o=o(e,n)),s&&(a=a(e,n))),h.setItemVisual(t,{symbol:o,symbolSize:a,color:i.get("itemStyle.color")||u.getVisual("color")})}),r.updateData(h),this.group.add(r.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=l})}),r.__keep=!0,r.group.silent=l.get("silent")||t.get("silent")}}),lp(function(t){t.markPoint=t.markPoint||{}}),iC.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function fC(t,e,n,i){var o,a,r,s,l,u,h,c,d=t.getData(),p=i.type;return C(i)||"min"!==p&&"max"!==p&&"average"!==p&&"median"!==p&&null==i.xAxis&&null==i.yAxis||(r=null!=i.yAxis||null!=i.xAxis?(a=e.getAxis(null!=i.yAxis?"y":"x"),Z(i.yAxis,i.xAxis)):(a=(o=uC(i,d,e,t)).valueAxis,dC(d,ag(d,o.valueDataDim),p)),l=1-(s="x"===a.dim?0:1),h={},(u=k(i)).type=null,u.coord=[],h.coord=[],u.coord[l]=-1/0,h.coord[l]=1/0,0<=(c=n.get("precision"))&&"number"==typeof r&&(r=+r.toFixed(Math.min(c,20))),u.coord[s]=h.coord[s]=r,i=[u,h,{type:p,valueIndex:i.valueIndex,value:r}]),(i=[lC(t,i[0]),lC(t,i[1]),P({},i[2])])[2].type=i[2].type||"",m(i[2],i[0]),m(i[2],i[1]),i}function mC(t){return!isNaN(t)&&!isFinite(t)}function vC(t,e,n,i){var o=1-t,a=i.dimensions[t];return mC(e[o])&&mC(n[o])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function yC(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(vC(1,n,i,t)||vC(0,n,i,t)))return!0}return hC(t,e[0])&&hC(t,e[1])}function xC(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Il(d.get("x"),o.getWidth()),g=Il(d.get("y"),o.getHeight());isNaN(p)||isNaN(g)?(s=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(h=c.dimensions,a=t.get(h[0],e),r=t.get(h[1],e),c.dataToPoint([a,r])),"cartesian2d"===c.type&&(l=c.getAxis("x"),u=c.getAxis("y"),h=c.dimensions,mC(t.get(h[0],e))?s[0]=l.toGlobalCoord(l.getExtent()[n?0:1]):mC(t.get(h[1],e))&&(s[1]=u.toGlobalCoord(u.getExtent()[n?0:1]))),isNaN(p)||(s[0]=p),isNaN(g)||(s[1]=g)):s=[p,g],t.setItemLayout(e,s)}pC.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var n,i,o,t=e.markLineModel;t&&(n=t.getData(),i=t.__from,o=t.__to,i.each(function(t){xC(i,t,!0,e,a),xC(o,t,!1,e,a)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},renderSeries:function(o,n,t,a){var e=o.coordinateSystem,i=o.id,r=o.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new sw);this.group.add(l.group);var u=function(t,e,n){var i;i=t?z(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Bp(i,n),a=new Bp(i,n),r=new Bp([],n),s=z(n.get("data"),B(fC,e,t,n));t&&(s=I(s,B(yC,t)));var l=t?cC:function(t){return t.value};return o.initData(z(s,function(t){return t[0]}),null,l),a.initData(z(s,function(t){return t[1]}),null,l),r.initData(z(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(e,o,n),h=u.from,c=u.to,d=u.line;n.__from=h,n.__to=c,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize");function f(t,e,n){var i=t.getItemModel(e);xC(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||g[n?0:1],symbol:i.get("symbol",!0)||p[n?0:1],color:i.get("itemStyle.color")||r.getVisual("color")})}C(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){f(h,t,!0),f(c,t,!1)}),d.each(function(t){var e=d.getItemModel(t).get("lineStyle.color");d.setItemVisual(t,{color:e||h.getItemVisual(t,"color")}),d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),l.__keep=!0,l.group.silent=n.get("silent")||o.get("silent")}}),lp(function(t){t.markLine=t.markLine||{}}),iC.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});function _C(t,e,n,i){var o=lC(t,i[0]),a=lC(t,i[1]),r=Z,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=f([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}function wC(t){return!isNaN(t)&&!isFinite(t)}function bC(t,e,n){var i=1-t;return wC(e[i])&&wC(n[i])}function SC(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!bC(1,n,i)&&!bC(0,n,i))||(hC(t,{coord:n,x:e.x0,y:e.y0})||hC(t,{coord:i,x:e.x1,y:e.y1}))}function MC(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Il(d.get(n[0]),o.getWidth()),g=Il(d.get(n[1]),o.getHeight());return isNaN(p)||isNaN(g)?(h=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),"cartesian2d"===c.type&&(r=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),wC(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):wC(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(p)||(h[0]=p),isNaN(g)||(h[1]=g)):h=[p,g],h}var IC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];pC.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(n){var i,t=n.markAreaModel;t&&(i=t.getData()).each(function(e){var t=z(IC,function(t){return MC(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},renderSeries:function(n,r,t,i){var e=n.coordinateSystem,o=n.id,a=n.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new In});this.group.add(l.group),l.__keep=!0;var u=function(t,n,e){var i,o;o=t?(i=z(t&&t.dimensions,function(t){var e=n.getData();return O({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Bp(z(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new Bp(i=[{name:"value",type:"float"}],e);var a=z(e.get("data"),B(_C,n,t,e));t&&(a=I(a,B(SC,t)));var r=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,n,r);r.setData(u),u.each(function(e){u.setItemLayout(e,z(IC,function(t){return MC(u,e,t,n,i)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new Hr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var n=l.__data.getItemGraphicEl(e);el(n,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(O(n.getModel("itemStyle").getItemStyle(),{fill:Ye(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Us(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),Fs(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||n.get("silent")}}),lp(function(t){t.markArea=t.markArea||{}});var TC=Sc.legend.selector,AC={all:{type:"all",title:k(TC.all)},inverse:{type:"inverse",title:k(TC.inverse)}},DC=mp({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){DC.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var n=t.selector;!0===n&&(n=t.selector=["all","inverse"]),C(n)&&R(n,function(t,e){L(t)&&(t={type:t}),n[e]=m(t,AC[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(o){var a=[],r=[];o.eachRawSeries(function(t){var e,n,i=t.name;r.push(i),t.legendVisualProvider?(n=t.legendVisualProvider.getAllNames(),o.isSeriesFiltered(t)||(r=r.concat(n)),n.length?a=a.concat(n):e=!0):e=!0,e&&Vo(t)&&a.push(t.name)}),this._availableNames=r;var t=z(this.get("data")||a,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new yl(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&R(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;R(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,n=this.option.selected;R(t,function(t){var e=t.get("name",!0);n.hasOwnProperty(e)||(n[e]=!0),n[e]=!n[e]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=M(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function CC(t,e,n){var o,a={},r="toggleSelected"===t;return n.eachComponent("legend",function(i){r&&null!=o?i[o?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),o=i.isSelected(e.name)),R(i.getData(),function(t){var e,n=t.get("name");"\n"!==n&&""!==n&&(e=i.isSelected(n),a.hasOwnProperty(n)?a[n]=a[n]&&e:a[n]=e)})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}hp("legendToggleSelect","legendselectchanged",B(CC,"toggleSelected")),hp("legendAllSelect","legendselectall",B(CC,"allSelect")),hp("legendInverseSelect","legendinverseselect",B(CC,"inverseSelect")),hp("legendSelect","legendselected",B(CC,"select")),hp("legendUnSelect","legendunselected",B(CC,"unSelect"));var LC=B,kC=R,PC=In,NC=vp({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new PC),this._backgroundEl,this.group.add(this._selectorGroup=new PC),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,n){var i,o,a,r,s,l,u,h,c,d,p=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&(i=t.get("align"),o=t.get("orient"),i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===o?"right":"left"),a=t.get("selector",!0),r=t.get("selectorPosition",!0),!a||r&&"auto"!==r||(r="horizontal"===o?"end":"start"),this.renderInner(i,t,e,n,a,o,r),h=cu(s=t.getBoxLayoutParams(),l={width:n.getWidth(),height:n.getHeight()},u=t.get("padding")),d=cu(O({width:(c=this.layoutInner(t,i,h,p,a,r)).width,height:c.height},s),l,u),this.group.attr("position",[d.x-c.x,d.y-c.y]),this.group.add(this._backgroundEl=$T(c,t)))},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(u,h,c,d,t,e,n){var p=this.getContentGroup(),g=et(),f=h.get("selectedMode"),m=[];c.eachRawSeries(function(t){t.get("legendHoverLink")||m.push(t.id)}),kC(h.getData(),function(a,r){var t,e,n,i,o,s,l=a.get("name");this.newlineDisabled||""!==l&&"\n"!==l?(t=c.getSeriesByName(l)[0],g.get(l)||(t?(n=(e=t.getData()).getVisual("color"),i=e.getVisual("borderColor"),"function"==typeof n&&(n=n(t.getDataParams(0))),"function"==typeof i&&(i=i(t.getDataParams(0))),o=e.getVisual("legendSymbol")||"roundRect",s=e.getVisual("symbol"),this._createItem(l,r,a,h,o,s,u,n,i,f).on("click",LC(EC,l,null,d,m)).on("mouseover",LC(RC,t.name,null,d,m)).on("mouseout",LC(zC,t.name,null,d,m)),g.set(l,!0)):c.eachRawSeries(function(t){if(!g.get(l)&&t.legendVisualProvider){var e=t.legendVisualProvider;if(!e.containName(l))return;var n=e.indexOfName(l),i=e.getItemVisual(n,"color"),o=e.getItemVisual(n,"borderColor");this._createItem(l,r,a,h,"roundRect",null,u,i,o,f).on("click",LC(EC,null,l,d,m)).on("mouseover",LC(RC,null,l,d,m)).on("mouseout",LC(zC,null,l,d,m)),g.set(l,!0)}},this),D&&(g.get(l)||console.warn(l+" series not exists. Legend data should be same with series name or data name.")))):p.add(new PC({newline:!0}))},this),t&&this._createSelector(t,h,d,e,n)},_createSelector:function(t,a,r,e,n){var s=this.getSelectorGroup();kC(t,function(t){!function(t){var e=t.type,n=new Er({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});s.add(n);var i=a.getModel("selectorLabel"),o=a.getModel("emphasis.selectorLabel");Us(n.style,n.hoverStyle={},i,o,{defaultText:t.title,isRectText:!1}),Fs(n)}(t)})},_createItem:function(t,e,n,i,o,a,r,s,l,u){var h,c,d=i.get("itemWidth"),p=i.get("itemHeight"),g=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),m=i.get("symbolKeepAspect"),v=i.getModel("itemStyle"),y=i.isSelected(t),x=new PC,_=n.getModel("textStyle"),w=n.get("icon"),b=n.getModel("tooltip"),S=b.parentModel,M=gf(o=w||o,0,0,d,p,y?s:g,null==m||m);x.add(OC(M,o,v,l,f,y)),w||!a||a===o&&"none"!==a||("none"===a&&(a="circle"),c=gf(a,(d-(h=.8*p))/2,(p-h)/2,h,h,y?s:g,null==m||m),x.add(OC(c,a,v,l,f,y)));var I="left"===r?d+5:-5,T=r,A=i.get("formatter"),D=t;"string"==typeof A&&A?D=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(D=A(t)),x.add(new Er({style:Ys({},_,{text:D,x:I,y:p/2,textFill:y?_.getTextColor():g,textAlign:T,textVerticalAlign:"middle"})}));var C=new Kr({shape:x.getBoundingRect(),invisible:!0,tooltip:b.get("show")?P({content:t,formatter:S.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},b.option):null});return x.add(C),x.eachChild(function(t){t.silent=!0}),C.silent=!u,this.getContentGroup().add(x),Fs(x),x.__legendDataIndex=e,x},layoutInner:function(t,e,n,i,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();hu(t.get("orient"),r,t.get("itemGap"),n.width,n.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){hu("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=0===p?"width":"height",f=0===p?"height":"width",m=0===p?"y":"x";"end"===a?c[p]+=l[g]+d:u[p]+=h[g]+d,c[1-p]+=l[f]/2-h[f]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[g]=l[g]+d+h[g],v[f]=Math.max(l[f],h[f]),v[m]=Math.min(0,h[m]+c[1-p]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function OC(t,e,n,i,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=n.getItemStyle(),t.style.stroke=i,a||(r.stroke=o)):r=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function EC(t,e,n,i){zC(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),RC(t,e,n,i)}function RC(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function zC(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}up(_d.PROCESSOR.SERIES_FILTER,function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}),_u.registerSubTypeDefaulter("legend",function(){return"plain"});var BC=DC.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,n,i){var o=gu(t);BC.superCall(this,"init",t,e,n,i),VC(this,t,o)},mergeOption:function(t,e){BC.superCall(this,"mergeOption",t,e),VC(this,this.option,t)}});function VC(t,e,n){var i=[1,1];i[t.getOrient().index]=0,pu(e,n,{type:"box",ignoreSize:i})}var GC=In,FC=["width","height"],WC=["x","y"],HC=NC.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){HC.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new GC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new GC),this._showController},resetInner:function(){HC.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a,n,i,r){var s=this;HC.superCall(this,"renderInner",t,o,e,a,n,i,r);var l=this._controllerGroup,u=o.get("pageIconSize",!0);C(u)||(u=[u,u]),c("pagePrev",0);var h=o.getModel("pageTextStyle");function c(t,e){var n=t+"DataIndex",i=ll(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:N(s._pageGo,s,n,o,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});i.name=t,l.add(i)}l.add(new Er({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,n,i,o,a){var r=this.getSelectorGroup(),s=t.getOrient().index,l=FC[s],u=WC[s],h=FC[1-s],c=WC[1-s];o&&hu("horizontal",r,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),p=r.getBoundingRect(),g=[-p.x,-p.y],f=k(n);o&&(f[l]=n[l]-p[l]-d);var m,v=this._layoutContentAndController(t,i,f,s,l,h,c);return o&&("end"===a?g[s]+=v[l]+d:(m=p[l]+d,g[s]-=m,v[u]-=m),v[l]+=p[l]+d,g[1-s]+=v[c]+v[h]/2-p[h]/2,v[h]=Math.max(v[h],p[h]),v[c]=Math.min(v[c],p[c]+g[1-s]),r.attr("position",g)),v},_layoutContentAndController:function(t,e,n,i,o,a,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;hu(t.get("orient"),s,t.get("itemGap"),i?n.width:null,i?null:n.height),hu("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[o]>n[o],p=[-h.x,-h.y];e||(p[i]=s.position[i]);var g=[0,0],f=[-c.x,-c.y],m=U(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?f[i]+=n[o]-c[o]:g[i]+=c[o]+m),f[1-i]+=h[a]/2-c[a]/2,s.attr("position",p),l.attr("position",g),u.attr("position",f);var v,y={x:0,y:0};y[o]=d?n[o]:h[o],y[a]=Math.max(h[a],c[a]),y[r]=Math.min(0,c[r]+f[1-i]),l.__rectSize=n[o],d?((v={x:0,y:0})[o]=Math.max(n[o]-c[o]-m,0),v[a]=y[a],l.setClipPath(new Kr({shape:v})),l.__rectSize=v[o]):u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&el(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,o){var a=this._controllerGroup;R(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],n=a.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=i.get("pageFormatter"),n=o.pageIndex,r=null!=n?n+1:0,s=o.pageCount;t&&e&&t.setStyle("text",L(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,a=FC[o],r=WC[o],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:n.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[o]=-p.s;for(var g=s+1,f=p,m=p,v=null;g<=h;++g)(!(v=y(l[g]))&&m.e>f.s+i||v&&!x(v,f.s))&&(f=m.i>f.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=f.i),++d.pageCount),m=v;for(g=s-1,f=p,m=p,v=null;-1<=g;--g)(v=y(l[g]))&&x(m,v.s)||!(f.i<m.i)||(m=f,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=f.i),++d.pageCount,++d.pageIndex),f=v;return d;function y(t){if(t){var e=t.getBoundingRect(),n=e[r]+t.position[o];return{s:n,e:n+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+i}},_findTargetItemIndex:function(i){return this._showController?(this.getContentGroup().eachChild(function(t,e){var n=t.__legendDataIndex;null==a&&null!=n&&(a=e),n===i&&(o=e)}),null!=o?o:a):0;var o,a}});hp("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})});YA.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var ZC=Kr,UC=Ml,XC=Al,YC=N,jC=R,qC="horizontal",KC="vertical",$C=["line","bar","candlestick","scatter"],JC=KA.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,n,i){JC.superApply(this,"render",arguments),_c(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){JC.superApply(this,"remove",arguments),wc(this,"_dispatchZoomAction")},dispose:function(){JC.superApply(this,"dispose",arguments),wc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new In;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},o=this._orient===qC?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},a=gu(t.option);R(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=cu(a,i,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===KC&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n!==qC||o?n===qC&&o?{scale:r?[-1,1]:[-1,-1]}:n!==KC||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new ZC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new ZC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:N(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g,f=this._dataShadowInfo=this._prepareDataShadowInfo();f&&(t=this._size,n=(e=f.series).getRawData(),null!=(i=e.getShadowDim?e.getShadowDim():f.otherDim)&&(o=.3*((a=n.getDataExtent(i))[1]-a[0]),a=[a[0]-o,a[1]+o],r=[0,t[1]],s=[0,t[0]],l=[[t[0],0],[0,0]],u=[],h=s[1]/(n.count()-1),c=0,d=Math.round(n.count()/t[0]),n.each([i],function(t,e){var n,i;0<d&&e%d?c+=h:(i=(n=null==t||isNaN(t)||""===t)?0:UC(t,a,r,!0),n&&!p&&e?(l.push([l[l.length-1][0],0]),u.push([u[u.length-1][0],0])):!n&&p&&(l.push([c,0]),u.push([c,0])),l.push([c,i]),u.push([c,i]),c+=h,p=n)}),g=this.dataZoomModel,this._displayables.barGroup.add(new Hr({shape:{points:l},style:O({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Zr({shape:{points:u},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))))},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(a,r){R(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){var e,n,i,o;l||!0!==s&&M($C,t.get("type"))<0||(e=u.getComponent(a.axis,r).axis,n={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],o=t.coordinateSystem,null!=n&&o.getOtherAxis&&(i=o.getOtherAxis(e).inverse),n=t.getData().mapDimension(n),l={thisAxis:e,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:i})},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new ZC({draggable:!0,cursor:QC(this._orient),drift:YC(this._onDragMove,this,"all"),ondragstart:YC(this._showDataInfo,this,!0),ondragend:YC(this._onDragEnd,this),onmouseover:YC(this._showDataInfo,this,!0),onmouseout:YC(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new ZC({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),jC([0,1],function(t){var e=ll(l.get("handleIcon"),{cursor:QC(this._orient),draggable:!0,drift:YC(this._onDragMove,this,t),ondragend:YC(this._onDragEnd,this),onmouseover:YC(this._showDataInfo,this,!0),onmouseout:YC(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect();this._handleHeight=Il(l.get("handleSize"),this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var i=l.get("handleColor");null!=i&&(e.style.fill=i),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new Er({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[UC(t[0],[0,100],e,!0),UC(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Uw(e,i,o,n.get("zoomLock")?"all":t,null!=a.minSpan?UC(a.minSpan,r,o,!0):null,null!=a.maxSpan?UC(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=XC([UC(i[0],o,r,!0),UC(i[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var i=this._displayables,o=this._handleEnds,e=XC(o.slice()),a=this._size;jC([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scale:[n/2,n/2],position:[o[t],a[1]/2-n/2]})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e,n,i,o,a=this.dataZoomModel,r=this._displayables,s=r.handleLabels,l=this._orient,u=["",""];!a.get("showDetail")||(e=a.findRepresentativeAxisProxy())&&(n=e.getAxisModel().axis,i=this._range,o=t?e.calculateDataWindow({start:i[0],end:i[1]}).valueWindow:e.getDataValueWindow(),u=[this._formatLabel(o[0],n),this._formatLabel(o[1],n)]);var h=XC(this._handleEnds.slice());function c(t){var e=il(r.handles[t].parent,this.group),n=al(0===t?"right":"left",e),i=this._handleWidth/2+5,o=ol([h[t]+(0===t?-i:i),this._size[1]/2],e);s[t].setStyle({x:o[0],y:o[1],textVerticalAlign:l===qC?"middle":n,textAlign:l===qC?n:"center",text:u[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return A(i)?i(t,a):L(i)?i.replace("{value}",a):a},_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,n,i){this._dragging=!0,Xt(i.event);var o=ol([e,n],this._displayables.barGroup.getLocalTransform(),!0),a=this._updateInterval(t,o[0]),r=this.dataZoomModel.get("realtime");this._updateView(!r),a&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e,n,i,o=this._size,a=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);a[0]<0||a[0]>o[0]||a[1]<0||a[1]>o[1]||(n=((e=this._handleEnds)[0]+e[1])/2,i=this._updateInterval("all",a[0]-n),this._updateView(),i&&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 t,e,n;return jC(this.getTargetCoordInfo(),function(t){var e;!n&&t.length&&(e=t[0].model.coordinateSystem,n=e.getRect&&e.getRect())}),n||(t=this.api.getWidth(),e=this.api.getHeight(),n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}),n}});function QC(t){return"vertical"===t?"ns-resize":"ew-resize"}YA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var tL="\0_ec_dataZoom_roams";function eL(t,i){var e=iL(t),o=i.dataZoomId,a=i.coordId;R(e,function(t,e){var n=t.dataZoomInfos;n[o]&&M(i.allCoordIds,a)<0&&(delete n[o],t.count--)}),oL(e);var r,n,s=e[a];s||((s=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=(r=s,n=new Ny(t.getZr()),R(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];R(r.dataZoomInfos,function(t){var e,n;i.isAvailableBehavior(t.dataZoomModel.option)&&(n=(e=(t.getRange||{})[a])&&e(r.controller,i),!t.dataZoomModel.get("disabled",!0)&&n&&o.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]}))}),o.length&&r.dispatchAction(o)})}),n),s.dispatchAction=B(aL,t)),s.dataZoomInfos[o]||s.count++,s.dataZoomInfos[o]=i;var l,u,h,c,d=(l=s.dataZoomInfos,h={type_true:2,type_move:1,type_false:0,type_undefined:-1},c=!0,R(l,function(t){var e=t.dataZoomModel,n=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");h["type_"+u]<h["type_"+n]&&(u=n),c&=e.get("preventDefaultMouseMove",!0)}),{controlType:u,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!c}});s.controller.enable(d.controlType,d.opt),s.controller.setPointerChecker(i.containsPoint),_c(s,"dispatchAction",i.dataZoomModel.get("throttle",!0),"fixRate")}function nL(t){return t.type+"\0_"+t.id}function iL(t){var e=t.getZr();return e[tL]||(e[tL]={})}function oL(n){R(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function aL(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var rL=N,sL=KA.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(r,t,s,e){sL.superApply(this,"render",arguments),this._range=r.getPercentRange(),R(this.getTargetCoordInfo(),function(t,o){var a=z(t,function(t){return nL(t.model)});R(t,function(e){var i=e.model,n={};R(["pan","zoom","scrollMove"],function(t){n[t]=rL(lL[t],this,e,o)},this),eL(s,{coordId:nL(i),allCoordIds:a,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:r.id,dataZoomModel:r,getRange:n})},this)},this)},dispose:function(){var t,n,e;t=this.api,n=this.dataZoomModel.id,R(e=iL(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),oL(e),sL.superApply(this,"dispose",arguments),this._range=null}}),lL={zoom:function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=cL[e](null,[i.originX,i.originY],r,n,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Uw(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:uL(function(t,e,n,i,o,a){var r=cL[i]([a.oldX,a.oldY],[a.newX,a.newY],e,o,n);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:uL(function(t,e,n,i,o,a){return cL[i]([0,0],[a.scrollDelta,a.scrollDelta],e,o,n).signal*(t[1]-t[0])*a.scrollDelta})};function uL(l){return function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=l(a,r,t,e,n,i);return Uw(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function hL(t){var e=t&&t.visualMap;C(e)||(e=e?[e]:[]),dL(e,function(t){var e;t&&(pL(t,"splitList")&&!pL(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),(e=t.pieces)&&C(e)&&dL(e,function(t){V(t)&&(pL(t,"start")&&!pL(t,"min")&&(t.min=t.start),pL(t,"end")&&!pL(t,"max")&&(t.max=t.end))}))})}var cL={grid:function(t,e,n,i,o){var a=n.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,n,i,o){var a=n.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,n,i,o){var a=n.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}},dL=R;function pL(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}_u.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var gL=_d.VISUAL.COMPONENT;function fL(t,e,n,i){for(var o=e.targetVisuals[i],a=l_.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(n,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}pp(gL,{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push(MD(t.stateList,t.targetVisuals,N(t.getValueState,t),t.getDataDimension(n.getData())))}),i}}),pp(gL,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){var e,n,i;t.isTargetSeries(o)&&(e=t.getVisualMeta(N(fL,null,o,t))||{stops:[],outerColors:[]},n=t.getDataDimension(a),null!=(i=a.getDimensionInfo(n))&&(e.dimension=i.index,r.push(e)))}),o.getData().setVisual("visualMeta",r)}});var mL=function(t,e,n){var i=k((vL[t]||{})[e]);return n&&C(i)?i[i.length-1]:i},vL={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]}},yL=l_.mapVisual,xL=l_.eachVisual,_L=C,wL=R,bL=Al,SL=Ml,ML=mp({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,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:!1,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,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;v.canvasSupported||(n.realtime=!1),e||SD(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=N(t,this),this.controllerVisuals=bD(this.option.controller,e,t),this.targetVisuals=bD(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=No(t),n},eachTargetSeries:function(e,n){R(this.getTargetSeriesIndices(),function(t){e.call(n,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},formatValueText:function(t,e,n){var i,o,a=this.option,r=a.precision,s=this.dataBound,l=a.formatter;return n=n||["<",">"],C(t)&&(t=t.slice(),i=!0),o=e?t:i?[u(t[0]),u(t[1])]:u(t),L(l)?l.replace("{value}",i?o[0]:o).replace("{value2}",i?o[1]:o):A(l)?i?l(t[0],t[1]):l(t):i?t[0]===s[0]?n[0]+" "+o[1]:t[1]===s[1]?n[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=bL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var a=i[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={});m(i,n),m(o,n);var u=this.isCategory();function a(i){_L(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},wL(this.stateList,function(t){var e,n=i[t];L(n)&&((e=mL(n,"active",u))?(i[t]={},i[t][n]=e):delete i[t])},this)}a.call(this,i),a.call(this,o),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},wL(i,function(t,e){var n;!l_.isValidType(e)||null!=(n=mL(e,"inactive",u))&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");wL(this.stateList,function(t){var e=this.itemSize,n=a[t];null==(n=n||(a[t]={color:u?l:[l]})).symbol&&(n.symbol=r&&k(r)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&k(s)||(u?e[0]:[e[0],e[0]])),n.symbol=yL(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,o=n.symbolSize;null!=o&&(i=-1/0,xL(o,function(t){i<t&&(i=t)}),n.symbolSize=yL(o,function(t){return SL(t,[0,i],[0,e[0]],!0)}))},this)}.call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:it,getValueState:it,getVisualMeta:it}),IL=[20,140],TL=ML.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){TL.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){TL.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=IL[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=IL[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):C(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){ML.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Al((this.get("range")||[]).slice());return 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]),e},getValueState:function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getVisualMeta:function(n){var t=AL(0,0,this.getExtent()),e=AL(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;r<l&&(!e.length||t[r]<=e[0]);r++)t[r]<e[a]&&o(t[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&i.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(u=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(t[r],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}}});function AL(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],a=[],r=0;r<=200&&o<n[1];r++)a.push(o),o+=i;return a.push(n[1]),a}var DL=vp({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,n,i){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,n=Ul(e.get("padding")||0),i=t.getBoundingRect();t.add(new Kr({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(n,i,o){var t,e=(o=o||{}).forceState,a=this.visualMapModel,r={};function s(t){return r[t]}function l(t,e){r[t]=e}"symbol"===i&&(r.symbol=a.get("itemSymbol")),"color"===i&&(t=a.get("contentColor"),r.color=t);var u=a.controllerVisuals[e||a.getValueState(n)];return R(l_.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),l_.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),r[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;du(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:it});function CL(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?n[0]:i[l[c]];var d=[["x","width",3],["y","height",0]][r],p=cu(h,a,i.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*a[d[1]]?0:1]}function LL(t,e){return R(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var kL=Ml,PL=R,NL=Math.min,OL=Math.max,EL=DL.extend({type:"visualMap.continuous",init:function(){EL.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){var i,o,a,r,s,l,u,h,c;e&&(i=null!=(i=e[1-n])?i+"":"",a=(o=this.visualMapModel).get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===n?-a:r[1]+a],s),u=this._applyTransform(0===n?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel,this.group.add(new Er({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:i,textFont:c.getFont(),textFill:c.getTextColor()}})))},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,a=this._useHandle,r=CL(e,this.api,i),s=n.barGroup=this._createBarGroup(r);s.add(n.outOfRange=RL()),s.add(n.inRange=RL(null,a?BL(this._orient):null,N(this._dragHandle,this,"all",!1),N(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=OL(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,o,r),this._createHandle(s,1,i,u,o,r)),this._createIndicator(s,i,u,o),t.add(s)},_createHandle:function(t,e,n,i,o){var a,r=N(this._dragHandle,this,e,!1),s=N(this._dragHandle,this,e,!0),l=RL((a=i,0===e?[[0,0],[a,0],[a,-a]]:[[0,0],[a,0],[a,a]]),BL(this._orient),r,s);l.position[0]=n[0],t.add(l);var u=this.visualMapModel.textStyleModel,h=new Er({draggable:!0,drift:r,onmousemove:function(t){Xt(t.event)},ondragend:s,style:{x:0,y:0,text:"",textFont:u.getFont(),textFill:u.getTextColor()}});this.group.add(h);var c=["horizontal"===o?i/2:1.5*i,"horizontal"===o?0===e?-1.5*i:1.5*i:0===e?-i/2:i/2],d=this._shapes;d.handleThumbs[e]=l,d.handleLabelPoints[e]=c,d.handleLabels[e]=h},_createIndicator:function(t,e,n,i){var o=RL([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new Er({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,n,i){var o;this._useHandle&&(this._dragging=!e,e||(o=this._applyTransform([n,i],this._shapes.barGroup,!0),this._updateInterval(t,o[1]),this._updateView()),e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():zL(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1))},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[kL(e[0],n,i,!0),kL(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];Uw(e,i,o,t,0);var a=n.getExtent();this._dataInterval=[kL(i[0],o,a,!0),kL(i[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,n,a,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(n,r);return{barColor:new as(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+i*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new In("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(i,o){var a,r,s,l;this._useHandle&&(a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels,PL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=i[t];var n=ol(a.handleLabelPoints[t],il(e,this.group));l[t].setStyle({x:n[0],y:n[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this))},_showIndicator:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p=this.visualMapModel,g=p.getExtent(),f=p.itemSize,m=[0,f[1]],v=kL(t,g,m,!0),y=this._shapes,x=y.indicator;x&&(x.position[1]=v,x.attr("invisible",!1),x.setShape("points",(o=!!n,a=i,r=v,s=f[1],o?[[0,-NL(a,OL(r,0))],[6,0],[0,NL(a,OL(s-r,0))]]:[[0,0],[5,-5],[5,5]])),l=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),x.setStyle("fill",l),u=ol(y.indicatorLabelPoint,il(x,this.group)),(h=y.indicatorLabel).attr("invisible",!1),c=this._applyTransform("left",y.barGroup),d=this._orient,h.setStyle({text:(n||"")+p.formatValueText(e),textVerticalAlign:"horizontal"===d?c:"middle",textAlign:"horizontal"===d?"center":c,x:u[0],y:u[1]}))},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){var e,n;i._hovering=!0,i._dragging||(e=i.visualMapModel.itemSize,(n=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,!0,!0))[1]=NL(OL(0,n[1]),e[1]),i._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=e[0]))}).on("mouseout",function(){i._hovering=!1,i._dragging||i._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g=this.visualMapModel,f=g.itemSize;function m(t,e,n){for(var i=0,o=t.length;i<o;i++)for(var a=t[i].seriesId,r=No(t[i].dataIndex),s=n&&n[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function v(t,e){var n,i=[];for(var o in t){t.hasOwnProperty(o)&&null!=t[o]&&(e?i.push(+o):(n=v(t[o],!0)).length&&i.push({seriesId:o,dataIndex:n}))}return i}g.option.hoverLink&&(n=[0,f[1]],i=g.getExtent(),a=[(t=NL(OL(n[0],t),n[1]))-(o=function(t,e,n){var i=6,o=t.get("hoverLinkDataSize");o&&(i=kL(o,e,n,!0)/2);return i}(g,i,n)),t+o],r=kL(t,n,i,!0),s=[kL(a[0],n,i,!0),kL(a[1],n,i,!0)],a[0]<n[0]&&(s[0]=-1/0),n[1]<a[1]&&(s[1]=1/0),e&&(s[0]===-1/0?this._showIndicator(r,s[1],"< ",o):s[1]===1/0?this._showIndicator(r,s[0],"> ",o):this._showIndicator(r,r,"≈ ",o)),l=this._hoverLinkDataIndices,u=[],(e||zL(g))&&(u=this._hoverLinkDataIndices=g.findTargetDataIndices(s)),c=u,p={},m(l||[],d={}),m(c||[],p,d),h=[v(d),v(p)],this._dispatchHighDown("downplay",LL(h[0],g)),this._dispatchHighDown("highlight",LL(h[1],g)))},_hoverLinkFromSeriesMouseOver:function(t){var e,n,i,o=t.target,a=this.visualMapModel;o&&null!=o.dataIndex&&(e=this.ecModel.getSeriesByIndex(o.seriesIndex),a.isTargetSeries(e)&&(i=(n=e.getData(o.dataType)).get(a.getDataDimension(n),o.dataIndex,!0),isNaN(i)||this._showIndicator(i,i)))},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",LL(t,this.visualMapModel)),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,n,i){var o=il(e,i?null:this.group);return cl[C(t)?"applyTransform":"transformDirection"](t,o,n)},_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 RL(t,e,n,i){return new Hr({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Xt(t.event)},ondragend:i})}function zL(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function BL(t){return"vertical"===t?"ns-resize":"ew-resize"}hp({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),lp(hL);var VL=ML.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){VL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();GL[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=k(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=z(this._pieceList,function(t){t=k(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var i=this.option,n={},t=l_.listVisualTypes(),o=this.isCategory();function a(t,e,n){return t&&t[e]&&(V(t[e])?t[e].hasOwnProperty(n):t[e]===n)}R(i.pieces,function(e){R(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(t,e){var n=0;R(this.stateList,function(t){n|=a(i,t,e)||a(i.target,t,e)},this),n||R(this.stateList,function(t){(i[t]||(i[t]={}))[e]=mL(e,"inRange"===t?"active":"inactive",o)})},this),ML.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i,n=this.option,o=this._pieceList,a=(e?n:t).selected||{};n.selected=a,R(o,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode&&(i=!1,R(o,function(t,e){var n=this.getSelectedMapKey(t);a[n]&&(i?a[n]=!1:i=!0)},this))},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=k(t)},getValueState:function(t){var e=l_.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){l_.findPieceIndex(t,this._pieceList)===i&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getRepresentValue:function(t){var e;return this.isCategory()||null!=t.value?t.value:(e=t.interval||[])[0]===-1/0&&e[1]===1/0?0:(e[0]+e[1])/2},getVisualMeta:function(o){if(!this.isCategory()){var t,a=[],r=[],s=this,e=this._pieceList.slice();e.length?((t=e[0].interval[0])!==-1/0&&e.unshift({interval:[-1/0,t]}),(t=e[e.length-1].interval[1])!==1/0&&e.push({interval:[t,1/0]})):e.push({interval:[-1/0,1/0]});var n=-1/0;return R(e,function(t){var e=t.interval;e&&(e[0]>n&&i([n,e[0]],"outOfRange"),i(e.slice()),n=e[1])},this),{stops:a,outerColors:r}}function i(t,e){var n=s.getRepresentValue({interval:t});e=e||s.getValueState(n);var i=o(n,e);t[0]===-1/0?r[0]=i:t[1]===1/0?r[1]=i:a.push({value:t[0],color:i},{value:t[1],color:i})}}}),GL={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber,o=Math.max(parseInt(o,10),1);t.splitNumber=o;for(var a=(i[1]-i[0])/o;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,i[0]],close:[0,0]});for(var r=0,s=i[0];r<o;s+=a,r++){var l=r===o-1?i[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[i[1],1/0],close:[0,0]}),Gl(e),R(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;R(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),FL(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;R(t.pieces,function(t,e){V(t)||(t={value:t});var n={text:"",index:e};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),D&&o[0]>o[1]&&console.warn("Piece "+e+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=l_.retrieveVisuals(t),d.push(n)},this),FL(t,d),Gl(d),R(d,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};function FL(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}DL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),n=e.endsText,d=Z(r.get("showLabel",!0),!n);n&&this._renderEndsText(a,n[0],c,d,h),R(e.viewPieceList,function(t){var e=t.piece,n=new In;n.onclick=N(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);var i=r.getRepresentValue(e);{var o;this._createItemSymbol(n,i,[0,0,c[0],c[1]]),d&&(o=this.visualMapModel.getValueState(i),n.add(new Er({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}})))}a.add(n)},this),n&&this._renderEndsText(a,n[1],c,d,h),hu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:LL(e.findTargetDataIndices(n),e)})}t.on("mouseover",N(e,this,"highlight")).on("mouseout",N(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return CL(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,o){var a,r;e&&(a=new In,r=this.visualMapModel.textStyleModel,a.add(new Er({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a))},_getViewData:function(){var t=this.visualMapModel,e=z(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return("horizontal"===i?o:!o)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(gf(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=k(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,R(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}});lp(hL);var WL,HL="urn:schemas-microsoft-com:vml",ZL="undefined"==typeof window?null:window,UL=!1,XL=ZL&&ZL.document;function YL(t){return WL(t)}if(XL&&!v.canvasSupported)try{XL.namespaces.zrvml||XL.namespaces.add("zrvml",HL),WL=function(t){return XL.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){WL=function(t){return XL.createElement("<"+t+' xmlns="'+HL+'" class="zrvml">')}}var jL=Ja.CMD,qL=Math.round,KL=Math.sqrt,$L=Math.abs,JL=Math.cos,QL=Math.sin,tk=Math.max;if(!v.canvasSupported){var ek=",",nk="progid:DXImageTransform.Microsoft",ik=21600,ok=ik/2,ak=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=ik+","+ik,t.coordorigin="0,0"},rk=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},sk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},lk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},uk=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},hk=Gi,ck=function(t,e,n){var i=Ge(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=rk(i[0],i[1],i[2]),t.opacity=n*i[3])},dk=function(t,e,n){var i,o,a=e.fill;if(null!=a)if(a instanceof es){var r,s,l,u,h,c,d,p,g,f,m=0,v=[0,0],y=0,x=1,_=n.getBoundingRect(),w=_.width,b=_.height;"linear"===a.type?(r="gradient",c=n.transform,h=[a.x*w,a.y*b],s=[a.x2*w,a.y2*b],c&&(bt(h,h,c),bt(s,s,c)),l=s[0]-h[0],u=s[1]-h[1],(m=180*Math.atan2(l,u)/Math.PI)<0&&(m+=360),m<1e-6&&(m=0)):(r="gradientradial",h=[a.x*w,a.y*b],c=n.transform,d=n.scale,p=w,g=b,v=[(h[0]-_.x)/p,(h[1]-_.y)/g],c&&bt(h,h,c),p/=d[0]*ik,g/=d[1]*ik,y=0/(f=tk(p,g)),x=2*a.r/f-y);var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M,I,T,A,D=S.length,C=[],L=[],k=0;k<D;k++){var P=S[k],N=(i=P.color,o=void 0,o=Ge(i),[rk(o[0],o[1],o[2]),o[3]]);L.push(P.offset*x+y+" "+N[0]),0!==k&&k!==D-1||C.push(N)}2<=D&&(M=C[0][0],I=C[1][0],T=C[0][1]*e.opacity,A=C[1][1]*e.opacity,t.type=r,t.method="none",t.focus="100%",t.angle=m,t.color=M,t.color2=I,t.colors=L.join(","),t.opacity=A,t.opacity2=T),"radial"===r&&(t.focusposition=v.join(","))}else ck(t,a,e.opacity)},pk=function(t,e,n,i){var o,a,r="fill"===e,s=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof es&&lk(t,s),s=s||YL(e),r?dk(s,n,i):(o=s,(a=n).lineDash&&(o.dashstyle=a.lineDash.join(" ")),null==a.stroke||a.stroke instanceof es||ck(o,a.stroke,a.opacity)),sk(t,s)):(t[r?"filled":"stroked"]="false",lk(t,s))},gk=[[],[],[]];vr.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(n=YL("shape"),ak(n),this._vmlEl=n),pk(n,"fill",e,this),pk(n,"stroke",e,this);var i,o,a=this.transform,r=null!=a,s=n.getElementsByTagName("stroke")[0];s&&(i=e.lineWidth,r&&!e.strokeNoScale&&(o=a[0]*a[3]-a[1]*a[2],i*=KL($L(o))),s.weight=i+"px");var l=this.path||(this.path=new Ja);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(t,e){for(var n,i,o,a,r,s=jL.M,l=jL.C,u=jL.L,h=jL.A,c=jL.Q,d=[],p=t.data,g=t.len(),f=0;f<g;){switch(i="",n=0,o=p[f++]){case s:i=" m ",n=1,a=p[f++],r=p[f++],gk[0][0]=a,gk[0][1]=r;break;case u:i=" l ",n=1,a=p[f++],r=p[f++],gk[0][0]=a,gk[0][1]=r;break;case c:case l:i=" c ",n=3;var m,v,y=p[f++],x=p[f++],_=p[f++],w=p[f++];o===c?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(a+2*y)/3,x=(r+2*x)/3):(m=p[f++],v=p[f++]),gk[0][0]=y,gk[0][1]=x,gk[1][0]=_,gk[1][1]=w,a=gk[2][0]=m,r=gk[2][1]=v;break;case h:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=KL(e[0]*e[0]+e[1]*e[1]),I=KL(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[f++],D=p[f++],C=p[f++],L=p[f++],k=p[f++]+T,P=p[f++]+k+T;f++;var N=p[f++],O=A+JL(k)*C,E=D+QL(k)*L,y=A+JL(P)*C,x=D+QL(P)*L,R=N?" wa ":" at ";Math.abs(O-y)<1e-4&&(.01<Math.abs(P-k)?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&A<O?x-=.0125:x+=.0125:N&&E<D||!N&&D<E?y+=.0125:y-=.0125),d.push(R,qL(((A-C)*M+b)*ik-ok),ek,qL(((D-L)*I+S)*ik-ok),ek,qL(((A+C)*M+b)*ik-ok),ek,qL(((D+L)*I+S)*ik-ok),ek,qL((O*M+b)*ik-ok),ek,qL((E*I+S)*ik-ok),ek,qL((y*M+b)*ik-ok),ek,qL((x*I+S)*ik-ok)),a=y,r=x;break;case jL.R:var z=gk[0],B=gk[1];z[0]=p[f++],z[1]=p[f++],B[0]=z[0]+p[f++],B[1]=z[1]+p[f++],e&&(bt(z,z,e),bt(B,B,e)),z[0]=qL(z[0]*ik-ok),B[0]=qL(B[0]*ik-ok),z[1]=qL(z[1]*ik-ok),B[1]=qL(B[1]*ik-ok),d.push(" m ",z[0],ek,z[1]," l ",B[0],ek,z[1]," l ",B[0],ek,B[1]," l ",z[0],ek,B[1]);break;case jL.Z:d.push(" x ")}if(0<n){d.push(i);for(var V=0;V<n;V++){var G=gk[V];e&&bt(G,G,e),d.push(qL(G[0]*ik-ok),ek,qL(G[1]*ik-ok),V<n-1?ek:"")}}}return d.join("")}(l,this.transform),n.style.zIndex=uk(this.zlevel,this.z,this.z2),sk(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},vr.prototype.onRemove=function(t){lk(t,this._vmlEl),this.removeRectText(t)},vr.prototype.onAdd=function(t){sk(t,this._vmlEl),this.appendRectText(t)};Xi.prototype.brushVML=function(t){var e,n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T,A,D,C,L,k,P,N,O,E,R,z,B=this.style,V=B.image;"object"==typeof(s=V)&&s.tagName&&"IMG"===s.tagName.toUpperCase()?((i=V.src)===this._imageSrc?(e=this._imageWidth,n=this._imageHeight):(a=(o=V.runtimeStyle).width,r=o.height,o.width="auto",o.height="auto",e=V.width,n=V.height,o.width=a,o.height=r,this._imageSrc=i,this._imageWidth=e,this._imageHeight=n),V=i):V===this._imageSrc&&(e=this._imageWidth,n=this._imageHeight),V&&(l=B.x||0,u=B.y||0,h=B.width,c=B.height,d=B.sWidth,p=B.sHeight,g=B.sx||0,f=B.sy||0,m=d&&p,(v=this._vmlEl)||(v=XL.createElement("div"),ak(v),this._vmlEl=v),y=v.style,x=!1,b=w=1,this.transform&&(_=this.transform,w=KL(_[0]*_[0]+_[1]*_[1]),b=KL(_[2]*_[2]+_[3]*_[3]),x=_[1]||_[2]),x?(M=[l+h,u],I=[l,u+c],T=[l+h,u+c],bt(S=[l,u],S,_),bt(M,M,_),bt(I,I,_),bt(T,T,_),A=tk(S[0],M[0],I[0],T[0]),D=tk(S[1],M[1],I[1],T[1]),(C=[]).push("M11=",_[0]/w,ek,"M12=",_[2]/b,ek,"M21=",_[1]/w,ek,"M22=",_[3]/b,ek,"Dx=",qL(l*w+_[4]),ek,"Dy=",qL(u*b+_[5])),y.padding="0 "+qL(A)+"px "+qL(D)+"px 0",y.filter=nk+".Matrix("+C.join("")+", SizingMethod=clip)"):(_&&(l=l*w+_[4],u=u*b+_[5]),y.filter="",y.left=qL(l)+"px",y.top=qL(u)+"px"),L=this._imageEl,k=this._cropEl,L||(L=XL.createElement("div"),this._imageEl=L),P=L.style,m?(e&&n?(P.width=qL(w*e*h/d)+"px",P.height=qL(b*n*c/p)+"px"):(N=new Image,O=this,N.onload=function(){N.onload=null,e=N.width,n=N.height,P.width=qL(w*e*h/d)+"px",P.height=qL(b*n*c/p)+"px",O._imageWidth=e,O._imageHeight=n,O._imageSrc=V},N.src=V),k||((k=XL.createElement("div")).style.overflow="hidden",this._cropEl=k),(E=k.style).width=qL((h+g*h/d)*w),E.height=qL((c+f*c/p)*b),E.filter=nk+".Matrix(Dx="+-g*h/d*w+",Dy="+-f*c/p*b+")",k.parentNode||v.appendChild(k),L.parentNode!==k&&k.appendChild(L)):(P.width=qL(w*h)+"px",P.height=qL(b*c)+"px",v.appendChild(L),k&&k.parentNode&&(v.removeChild(k),this._cropEl=null)),R="",(z=B.opacity)<1&&(R+=".Alpha(opacity="+qL(100*z)+") "),R+=nk+".AlphaImageLoader(src="+V+", SizingMethod=scale)",P.filter=R,v.style.zIndex=uk(this.zlevel,this.z,this.z2),sk(t,v),null!=B.text&&this.drawRectText(t,this.getBoundingRect()))},Xi.prototype.onRemove=function(t){lk(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Xi.prototype.onAdd=function(t){sk(t,this._vmlEl),this.appendRectText(t)};var fk,mk="normal",vk={},yk=0,xk=document.createElement("div");si.measureText=function(t,e){var n=XL;fk||((fk=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",XL.body.appendChild(fk));try{fk.style.font=e}catch(t){}return fk.innerHTML="",fk.appendChild(n.createTextNode(t)),{width:fk.offsetWidth}};for(var _k=new Mn,wk=function(t,e,n,i){var o=this.style;if(this.__dirty&&Di(o),null!=(r=o.text)&&(r+=""),r){if(o.rich){for(var a=yi(r,o),r=[],s=0;s<a.lines.length;s++){for(var l=a.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);r.push(u.join(""))}r=r.join("\n")}var c=o.textAlign,d=o.textVerticalAlign,p=function(t){var e=vk[t];if(!e){100<yk&&(yk=0,vk={});var n,i=xk.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(t){}e={style:i.fontStyle||mk,variant:i.fontVariant||mk,weight:i.fontWeight||mk,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},vk[t]=e,yk++}return e}(o.font),g=p.style+" "+p.variant+" "+p.weight+" "+p.size+'px "'+p.family+'"';n=n||ui(r,g,c,d,o.textPadding,o.textLineHeight);var f,m,v,y,x=this.transform;x&&!i&&(_k.copy(e),_k.applyTransform(x),e=_k),i?(v=e.x,y=e.y):(f=o.textPosition)instanceof Array?(v=e.x+hk(f[0],e.width),y=e.y+hk(f[1],e.height),c=c||"left"):(v=(m=this.calculateTextPosition?this.calculateTextPosition({},o,e):di({},o,e)).x,y=m.y,c=c||m.textAlign,d=d||m.textVerticalAlign),v=hi(v,n.width,c),y=ci(y,n.height,d),y+=n.height/2;var _,w,b,S=YL,M=this._textVmlEl;M?w=(_=(b=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),w=S("textpath"),b=S("skew"),w.style["v-text-align"]="left",ak(M),_.textpathok=!0,w.on=!0,M.from="0 0",M.to="1000 0.05",sk(M,b),sk(M,_),sk(M,w),this._textVmlEl=M);var I=[v,y],T=M.style;x&&i?(bt(I,I,x),b.on=!0,b.matrix=x[0].toFixed(3)+ek+x[2].toFixed(3)+ek+x[1].toFixed(3)+ek+x[3].toFixed(3)+",0,0",b.offset=(qL(I[0])||0)+","+(qL(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=qL(v)+"px",T.top=qL(y)+"px"),w.string=String(r).replace(/&/g,"&").replace(/"/g,""");try{w.style.font=g}catch(t){}pk(M,"fill",{fill:o.textFill,opacity:o.opacity},this),pk(M,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash||null},this),M.style.zIndex=uk(this.zlevel,this.z,this.z2),sk(t,M)}},bk=function(t){lk(t,this._textVmlEl),this._textVmlEl=null},Sk=function(t){sk(t,this._textVmlEl)},Mk=[Hi,Ui,Xi,vr,Er],Ik=0;Ik<Mk.length;Ik++){var Tk=Mk[Ik].prototype;Tk.drawRectText=wk,Tk.removeRectText=bk,Tk.appendRectText=Sk}Er.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},Er.prototype.onRemove=function(t){this.removeRectText(t)},Er.prototype.onAdd=function(t){this.appendRectText(t)}}function Ak(t){return parseInt(t,10)}function Dk(t,e){var n;!UL&&XL&&(UL=!0,(n=XL.styleSheets).length<31?XL.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):n[0].addRule(".zrvml","behavior:url(#default#VML)")),this.root=t,this.storage=e;var i=document.createElement("div"),o=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",o.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=o,this._vmlViewport=i,this.resize();var a=e.delFromStorage,r=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(o)},e.addToStorage=function(t){t.onAdd&&t.onAdd(o),r.call(e,t)},this._firstPaint=!0}Dk.prototype={constructor:Dk,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(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,n=0;n<t.length;n++){var i=t[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(e),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(e),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,e),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var n,t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;this._width===t&&this._height===e||(this._width=t,this._height=e,(n=this._vmlViewport.style).width=t+"px",n.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(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Ak(e.width))-Ak(e.paddingLeft)-Ak(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Ak(e.height))-Ak(e.paddingTop)-Ak(e.paddingBottom)|0}},R(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;Dk.prototype[t]=(e=t,function(){pn('In IE8.0 VML mode painter not support method "'+e+'"')})}),To("vml",Dk);function Ck(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var Lk=Ja.CMD,kk=Array.prototype.join,Pk="none",Nk=Math.round,Ok=Math.sin,Ek=Math.cos,Rk=Math.PI,zk=2*Math.PI,Bk=180/Rk,Vk=1e-4;function Gk(t){return Nk(1e4*t)/1e4}function Fk(t){return t<Vk&&-Vk<t}function Wk(t,e){e&&Hk(t,"transform","matrix("+kk.call(e,",")+")")}function Hk(t,e,n){n&&("linear"===n.type||"radial"===n.type)||t.setAttribute(e,n)}function Zk(t,e,n,i){var o,a,r,s,l,u;a=e,null!=(r=n?a.textFill:a.fill)&&r!==Pk?(Hk(t,"fill",o="transparent"===(o=n?e.textFill:e.fill)?Pk:o),Hk(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)):Hk(t,"fill",Pk),l=e,null!=(u=n?l.textStroke:l.stroke)&&u!==Pk?(Hk(t,"stroke",s="transparent"===(s=n?e.textStroke:e.stroke)?Pk:s),Hk(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?i.getLineScale():1)),Hk(t,"paint-order",n?"stroke":"fill"),Hk(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(Hk(t,"stroke-dasharray",e.lineDash.join(",")),Hk(t,"stroke-dashoffset",Nk(e.lineDashOffset||0))):Hk(t,"stroke-dasharray",""),e.lineCap&&Hk(t,"stroke-linecap",e.lineCap),e.lineJoin&&Hk(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Hk(t,"stroke-miterlimit",e.miterLimit)):Hk(t,"stroke",Pk)}var Uk={};Uk.brush=function(t){var e=t.style,n=t.__svgEl;n||(n=Ck("path"),t.__svgEl=n),t.path||t.createPathProxy();var i,o=t.path;t.__dirtyPath&&(o.beginPath(),o.subPixelOptimize=!1,t.buildPath(o,t.shape),t.__dirtyPath=!1,(i=function(t){for(var e=[],n=t.data,i=t.len(),o=0;o<i;){var a="",r=0;switch(n[o++]){case Lk.M:a="M",r=2;break;case Lk.L:a="L",r=2;break;case Lk.Q:a="Q",r=4;break;case Lk.C:a="C",r=6;break;case Lk.A:var s=n[o++],l=n[o++],u=n[o++],h=n[o++],c=n[o++],d=n[o++],p=n[o++],g=n[o++],f=Math.abs(d),m=Fk(f-zk)||(g?zk<=d:zk<=-d),v=!1,v=!!m||!Fk(f)&&Rk<=(0<d?d%zk:d%zk+zk)==!!g,y=Gk(s+u*Ek(c)),x=Gk(l+h*Ok(c));m&&(d=g?zk-1e-4:1e-4-zk,v=!0,9===o&&e.push("M",y,x));var _=Gk(s+u*Ek(c+d)),w=Gk(l+h*Ok(c+d));e.push("A",Gk(u),Gk(h),Nk(p*Bk),+v,+g,_,w);break;case Lk.Z:a="Z";break;case Lk.R:var _=Gk(n[o++]),w=Gk(n[o++]),b=Gk(n[o++]),S=Gk(n[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M<r;M++)e.push(Gk(n[o++]))}return e.join(" ")}(o)).indexOf("NaN")<0&&Hk(n,"d",i)),Zk(n,e,!1,t),Wk(n,t.transform),null!=e.text?Jk(t,t.getBoundingRect()):tP(t)};var Xk={brush:function(t){var e,n,i,o,a,r,s,l=t.style,u=l.image;u instanceof HTMLImageElement&&(u=u.src),u&&(e=l.x||0,n=l.y||0,i=l.width,o=l.height,(a=t.__svgEl)||(a=Ck("image"),t.__svgEl=a),u!==t.__imageSrc&&(r="href",s=u,a.setAttributeNS("http://www.w3.org/1999/xlink",r,s),t.__imageSrc=u),Hk(a,"width",i),Hk(a,"height",o),Hk(a,"x",e),Hk(a,"y",n),Wk(a,t.transform),null!=l.text?Jk(t,t.getBoundingRect()):tP(t))}},Yk={},jk=new Mn,qk={},Kk=[],$k={left:"start",right:"end",center:"middle",middle:"middle"},Jk=function(t,e){var n=t.style,i=t.transform,o=t instanceof Er||n.transformText;t.__dirty&&Di(n);var a=n.text;if(null!=a&&(a+=""),Wi(a,n)){null==a&&(a=""),!o&&i&&(jk.copy(e),jk.applyTransform(i),e=jk);var r=t.__textSvgEl;r||(r=Ck("text"),t.__textSvgEl=r);var s=r.style,l=n.font||ri,u=r.__computedFont;l!==r.__styleFont&&(s.font=r.__styleFont=l,u=r.__computedFont=s.font);var h=n.textPadding,c=n.textLineHeight,d=t.__textCotentBlock;d&&!t.__dirtyText||(d=t.__textCotentBlock=vi(a,u,h,c,n.truncate));var p=d.outerHeight,g=d.lineHeight;Ri(qk,t,n,e);var f=qk.baseX,m=qk.baseY,v=qk.textAlign||"left",y=qk.textVerticalAlign;!function(t,e,n,i,o,a,r){ae(Kk),e&&n&&re(Kk,n);var s=i.textRotation;{var l;o&&s&&("center"===(l=i.textOrigin)?(a=o.width/2+o.x,r=o.height/2+o.y):l&&(a=l[0]+o.x,r=l[1]+o.y),Kk[4]-=a,Kk[5]-=r,ue(Kk,Kk,s),Kk[4]+=a,Kk[5]+=r)}Wk(t,Kk)}(r,o,i,n,e,f,m);var x,_,w,b=f,S=ci(m,p,y);h&&(x=f,w=h,b="right"===(_=v)?x-w[1]:"center"===_?x+w[3]/2-w[1]/2:x+w[3],S+=h[0]),S+=g/2,Zk(r,n,!0,t);var M=d.canCacheByTextString,I=t.__tspanList||(t.__tspanList=[]),T=I.length;if(M&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&T)for(var A=0;A<T;++A)Qk(I[A],v,b,S+A*g)}else{t.__text=a,t.__canCacheByTextString=M;for(var D=d.lines,C=D.length,A=0;A<C;A++){var L=I[A],k=D[A];L?L.__zrText!==k&&(L.innerHTML="",L.appendChild(document.createTextNode(k))):(L=I[A]=Ck("tspan"),r.appendChild(L),L.appendChild(document.createTextNode(k))),Qk(L,v,b,S+A*g)}if(C<T){for(;A<T;A++)r.removeChild(I[A]);I.length=C}}}};function Qk(t,e,n,i){Hk(t,"dominant-baseline","middle"),Hk(t,"text-anchor",$k[e]),Hk(t,"x",n),Hk(t,"y",i)}function tP(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function eP(){}Yk.drawRectText=Jk,Yk.brush=function(t){null!=t.style.text?Jk(t,!1):tP(t)},eP.prototype={diff:function(l,u,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;l=l.slice();var c=(u=u.slice()).length,d=l.length,p=1,e=c+d,g=[{newPos:-1,components:[]}],n=this.extractCommon(g[0],u,l,0);if(g[0].newPos+1>=c&&d<=n+1){for(var i=[],o=0;o<u.length;o++)i.push(o);return[{indices:i,count:u.length}]}for(;p<=e;){var a=function(){for(var t,e=-1*p;e<=p;e+=2){var n,i=g[e-1],o=g[e+1],a=(o?o.newPos:0)-e;i&&(g[e-1]=void 0);var r=i&&i.newPos+1<c,s=o&&0<=a&&a<d;if(r||s){if(!r||s&&i.newPos<o.newPos?(n={newPos:(t=o).newPos,components:t.components.slice(0)},h.pushComponent(n.components,void 0,!0)):((n=i).newPos++,h.pushComponent(n.components,!0,void 0)),a=h.extractCommon(n,u,l,e),n.newPos+1>=c&&d<=a+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e<n;e++){var a=t[e];if(a.removed){for(r=[],s=o;s<o+a.count;s++)r.push(s);a.indices=r,o+=a.count}else{for(var r=[],s=i;s<i+a.count;s++)r.push(s);a.indices=r,i+=a.count,a.added||(o+=a.count)}}return t}(n.components);g[e]=n}else g[e]=void 0}p++}();if(a)return a}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var o=e.length,a=n.length,r=t.newPos,s=r-i,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],n[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var nP=new eP;function iP(t,e,n,i,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=o||"_dom",this.nextId=0}function oP(t,e){iP.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function aP(t,e){iP.call(this,t,e,"clipPath","__clippath_in_use__")}function rP(t,e){iP.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function sP(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function lP(t){return parseInt(t,10)}function uP(t,e){return e&&t&&e.parentNode!==t}function hP(t,e,n){var i;uP(t,e)&&n&&((i=n.nextSibling)?t.insertBefore(e,i):t.appendChild(e))}function cP(t,e){var n;uP(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function dP(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function pP(t){return t.__textSvgEl}function gP(t){return t.__svgEl}iP.prototype.createElement=Ck,iP.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},iP.prototype.update=function(t,e){var n,i;t&&(n=this.getDefs(!1),t[this._domName]&&n.contains(t[this._domName])?"function"==typeof e&&e(t):(i=this.add(t))&&(t[this._domName]=i))},iP.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},iP.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},iP.prototype.getDoms=function(){var n=this.getDefs(!1);if(!n)return[];var i=[];return R(this._tagNames,function(t){var e=n.getElementsByTagName(t);i=i.concat([].slice.call(e))}),i},iP.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;R(t,function(t){t[e._markLabel]="0"})},iP.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},iP.prototype.removeUnused=function(){var t,e,n=this.getDefs(!1);n&&(t=this.getDoms(),e=this,R(t,function(t){"1"!==t[e._markLabel]&&n.removeChild(t)}))},iP.prototype.getSvgProxy=function(t){return t instanceof vr?Uk:t instanceof Xi?Xk:t instanceof Er?Yk:Uk},iP.prototype.getTextSvgElement=function(t){return t.__textSvgEl},iP.prototype.getSvgElement=function(t){return t.__svgEl},w(oP,iP),oP.prototype.addWithoutUpdate=function(a,r){var s;r&&r.style&&(s=this,R(["fill","stroke"],function(t){var e,n,i,o;!r.style[t]||"linear"!==r.style[t].type&&"radial"!==r.style[t].type||(e=r.style[t],n=s.getDefs(!0),e._dom?(i=e._dom,n.contains(e._dom)||s.addDom(i)):i=s.add(e),s.markUsed(r),o=i.getAttribute("id"),a.setAttribute(t,"url(#"+o+")"))}))},oP.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return pn("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},oP.prototype.update=function(n){var i=this;iP.prototype.update.call(this,n,function(){var t=n.type,e=n._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?i.updateDom(n,n._dom):(i.removeDom(n),i.add(n))})},oP.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void pn("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,o=n.length;i<o;++i){var a=this.createElement("stop");a.setAttribute("offset",100*n[i].offset+"%");var r,s,l=n[i].color;l.indexOf(!1)?(r=Ge(l)[3],s=He(l),a.setAttribute("stop-color","#"+s),a.setAttribute("stop-opacity",r)):a.setAttribute("stop-color",n[i].color),e.appendChild(a)}t._dom=e},oP.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e._dom&&iP.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&iP.prototype.markUsed.call(this,e._dom))},w(aP,iP),aP.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},aP.prototype.updateDom=function(t,e,n){var i,o,a,r,s,l,u,h;e&&0<e.length?(i=this.getDefs(!0),(o=e[0])[s=n?"_textDom":"_dom"]?(r=o[s].getAttribute("id"),a=o[s],i.contains(a)||i.appendChild(a)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(a=this.createElement("clipPath")).setAttribute("id",r),i.appendChild(a),o[s]=a),l=this.getSvgProxy(o),o.transform&&o.parent.invTransform&&!n?(u=Array.prototype.slice.call(o.transform),se(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u):l.brush(o),h=this.getSvgElement(o),a.innerHTML="",a.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),1<e.length&&this.updateDom(a,e.slice(1),n)):t&&t.setAttribute("clip-path","none")},aP.prototype.markUsed=function(t){var e=this;t.__clipPaths&&R(t.__clipPaths,function(t){t._dom&&iP.prototype.markUsed.call(e,t._dom),t._textDom&&iP.prototype.markUsed.call(e,t._textDom)})},w(rP,iP),rP.prototype.addWithoutUpdate=function(t,e){var n,i;e&&sP(e.style)&&(e._shadowDom?(n=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(n)):n=this.add(e),this.markUsed(e),i=n.getAttribute("id"),t.style.filter="url(#"+i+")")},rP.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},rP.prototype.update=function(t,e){var n;sP(e.style)?(n=this,iP.prototype.update.call(this,e,function(){n.updateDom(e,e._shadowDom)})):this.remove(t,e)},rP.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},rP.prototype.updateDom=function(t,e){var n,i,o,a,r=0===(r=e.getElementsByTagName("feDropShadow")).length?this.createElement("feDropShadow"):r[0],s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,i=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}r.setAttribute("dx",n/l),r.setAttribute("dy",i/u),r.setAttribute("flood-color",a);var h=o/2/l+" "+o/2/u;r.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(r),t._shadowDom=e},rP.prototype.markUsed=function(t){t._shadowDom&&iP.prototype.markUsed.call(this,t._shadowDom)};function fP(t,e,n,i){this.root=t,this.storage=e,this._opts=n=P({},n||{});var o=Ck("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var a=Ck("g");o.appendChild(a);var r=Ck("g");o.appendChild(r),this.gradientManager=new oP(i,r),this.clipPathManager=new aP(i,r),this.shadowManager=new rP(i,r);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=r,this._backgroundRoot=a,this._viewport=s,t.appendChild(s),s.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}return fP.prototype={constructor:fP,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=Ck("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();for(var e,n=this._svgRoot,i=this._visibleList,o=t.length,a=[],r=0;r<o;r++){var s=t[r],l=(e=s)instanceof vr?Uk:e instanceof Xi?Xk:e instanceof Er?Yk:Uk,u=gP(s)||pP(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),a.push(s))}var h,c,d,p,g,f=(h=i,c=a,nP.diff(h,c,d));for(r=0;r<f.length;r++){if((g=f[r]).removed)for(var m=0;m<g.count;m++){var u=gP(s=i[g.indices[m]]),v=pP(s);dP(n,u),dP(n,v)}}for(r=0;r<f.length;r++){if((g=f[r]).added)for(m=0;m<g.count;m++){u=gP(s=a[g.indices[m]]),v=pP(s);p?hP(n,u,p):cP(n,u),u?hP(n,v,u):p?hP(n,v,p):cP(n,v),hP(n,v,u),p=v||u||p,this.gradientManager.addWithoutUpdate(u||v,s),this.shadowManager.addWithoutUpdate(u||v,s),this.clipPathManager.markUsed(s)}else if(!g.removed)for(m=0;m<g.count;m++){u=gP(s=a[g.indices[m]]),v=pP(s),u=gP(s),v=pP(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||v,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||v,s),this.clipPathManager.markUsed(s),v&&hP(n,v,u),p=u||v||p}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgDom,i=e.getElementsByTagName("defs");return 0!==i.length?i[0]:t?((i=e.insertBefore(Ck("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null},resize:function(t,e){var n=this._viewport;n.style.display="none";var i,o,a=this._opts;null!=t&&(a.width=t),null!=e&&(a.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(i=n.style).width=t+"px",i.height=e+"px",(o=this._svgDom).setAttribute("width",t),o.setAttribute("height",e)),this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[i]||lP(s[n])||lP(r.style[n]))-(lP(s[o])||0)-(lP(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},R(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){var e;fP.prototype[t]=(e=t,function(){pn('In SVG mode painter not support method "'+e+'"')})}),To("svg",fP),t.version="4.8.0",t.dependencies=xd,t.PRIORITY=_d,t.init=function(t,e,n){if(D){if(+Mo.replace(".","")<+xd.zrender.replace(".",""))throw new Error("zrender/src 4.3.1 is too old for ECharts 4.8.0. Current version need ZRender "+xd.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var i=rp(t);if(i)return D&&console.warn("There is a chart instance already initialized on the dom."),i;D&&(!W(t)||"CANVAS"===t.nodeName.toUpperCase()||(t.clientWidth||n&&null!=n.width)&&(t.clientHeight||n&&null!=n.height)||console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload."));var o,a,r=new Td(t,e,n);function s(t,e){for(var n=0;n<t.length;n++){t[n][a]=e}}return r.id="ec_"+ep++,Qd[r.id]=r,Xo(t,ip,r.id),o=r,a="__connectUpdateStatus",fd(Xd,function(t,e){o._messageCenter.on(e,function(t){if(tp[o.group]&&0!==o[a]){if(t&&t.escapeConnect)return;var e=o.makeActionFromEvent(t),n=[];fd(Qd,function(t){t!==o&&t.group===o.group&&n.push(t)}),s(n,0),fd(n,function(t){1!==t[a]&&t.dispatchAction(e)}),s(n,2)}})}),r},t.connect=function(e){var t;return C(e)&&(t=e,e=null,fd(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+np++,fd(t,function(t){t.group=e})),tp[e]=!0,e},t.disConnect=op,t.disconnect=ap,t.dispose=function(t){"string"==typeof t?t=Qd[t]:t instanceof Td||(t=rp(t)),t instanceof Td&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=rp,t.getInstanceById=function(t){return Qd[t]},t.registerTheme=sp,t.registerPreprocessor=lp,t.registerProcessor=up,t.registerPostUpdate=function(t){qd.push(t)},t.registerAction=hp,t.registerCoordinateSystem=cp,t.getCoordinateSystemDimensions=function(t){var e=Ju.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=dp,t.registerVisual=pp,t.registerLoading=fp,t.extendComponentModel=mp,t.extendComponentView=vp,t.extendSeriesModel=yp,t.extendChartView=xp,t.setCanvasCreator=function(t){g("createCanvas",t)},t.registerMap=function(t,e,n){dd.registerMap(t,e,n)},t.getMap=function(t){var e=dd.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=Do,t.number=Wl,t.format=au,t.throttle=xc,t.helper=mf,t.matrix=pe,t.vector=It,t.color=qe,t.parseGeoJSON=bf,t.parseGeoJson=Ef,t.util=Rf,t.graphic=zf,t.List=Bp,t.Model=yl,t.Axis=Nf,t.env=v,t.parseGeoJson=Ef,t});