2 lines
726 KiB
JavaScript
2 lines
726 KiB
JavaScript
/* 2020-9-22 15:23:28 | 版权所有 军懋国兴 */
|
||
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e;"undefined"!=typeof window?e=window.__DEV__:"undefined"!=typeof global&&(e=global.__DEV__),void 0===e&&(e=!0);var T=e,n=2311,i=function(){return n++},v="object"===("undefined"==typeof wx?"undefined":_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 f(t,e){"createCanvas"===t&&(x=null),p[t]=e}function D(t){if(null==t||"object"!=_typeof(t))return t;var e=t,n=u.call(t);if("[object Array]"===n){if(!J(t)){e=[];for(var i=0,o=t.length;i<o;i++)e[i]=D(t[i])}}else if(l[n]){if(!J(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]=D(t[i])}}}else if(!s[n]&&!J(t)&&!F(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=D(t[r]));return e}function m(t,e,n){if(!B(e)||!B(t))return n?D(e):t;for(var i in e){var o,a;e.hasOwnProperty(i)&&(o=t[i],!B(a=e[i])||!B(o)||C(a)||C(o)||F(a)||F(o)||V(a)||V(o)||J(a)||J(o)?!n&&i in t||(t[i]=D(e[i])):m(o,a,n))}return t}function g(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=m(n,t[i],e);return n}function k(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,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)t.prototype[n]=i[n];(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 z(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 L(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 P(t,e){var n=a.call(arguments,2);return function(){return t.apply(e,n.concat(a.call(arguments)))}}function R(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 N(t){return"[object String]"===u.call(t)}function B(t){var e=_typeof(t);return"function"===e||!!t&&"object"==e}function V(t){return!!s[u.call(t)]}function G(t){return!!l[u.call(t)]}function F(t){return"object"===_typeof(t)&&"number"==typeof t.nodeType&&"object"===_typeof(t.ownerDocument)}function W(t){return t!=t}function H(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]}function Z(t,e){return null!=t?t:e}function U(t,e,n){return null!=t?t:null!=e?e:n}function X(){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 Y(t,e){if(!t)throw new Error(e)}function q(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 K="__ec_primitive__";function $(t){t[K]=!0}function J(t){return t[K]}function Q(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 Q?t.each(e):t&&z(t,e)}function tt(t){return new Q(t)}function et(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 nt(){}Q.prototype={constructor:Q,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=P(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:f,clone:D,merge:m,mergeAll:g,extend:k,defaults:O,createCanvas:y,getContext:_,indexOf:M,inherits:w,mixin:b,isArrayLike:E,each:z,map:L,reduce:S,filter:I,find:function(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]},bind:P,curry:R,isArray:C,isFunction:A,isString:N,isObject:B,isBuiltInObject:V,isTypedArray:G,isDom:F,eqNaN:W,retrieve:H,retrieve2:Z,retrieve3:U,slice:X,normalizeCssArray:j,assert:Y,trim:q,setAsPrimitive:$,isPrimitive:J,createHashMap:tt,concatArray:et,noop:nt}),ot="undefined"==typeof Float32Array?Array:Float32Array;function at(t,e){var n=new ot(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function rt(t,e){return t[0]=e[0],t[1]=e[1],t}function st(t){var e=new ot(2);return e[0]=t[0],e[1]=t[1],e}function lt(t,e,n){return t[0]=e,t[1]=n,t}function ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ht(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function dt(t){return Math.sqrt(pt(t))}function pt(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 gt(t,e){var n=dt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function mt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var vt=mt;function yt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var xt=yt;function _t(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 wt(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 bt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function St(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Mt=(Object.freeze||Object)({create:at,copy:rt,clone:st,set:lt,add:ut,scaleAndAdd:ht,sub:ct,len:dt,length:dt,lenSquare:pt,lengthSquare:pt,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:gt,distance:mt,dist:vt,distanceSquare:yt,distSquare:xt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:_t,applyTransform:wt,min:bt,max:St});function It(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}It.prototype={constructor:It,_dragStart:function(t){var e=t.target;e&&e.draggable&&((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 Tt=Array.prototype.slice,Dt=function(t){this._$handlers={},this._$eventProcessor=t};function Ct(t,e){var n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}Dt.prototype={constructor:Dt,one:function(t,e,n,i){var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;e=Ct(this,e),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;return o[t].push({h:n,one:!0,query:e,ctx:i||this}),this},on:function(t,e,n,i){var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;e=Ct(this,e),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;return o[t].push({h:n,one:!1,query:e,ctx:i||this}),this},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=Tt.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=Tt.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 Lt="undefined"!=typeof window&&!!window.addEventListener,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function Pt(t,e,n,i){return n=n||{},i||!v.canvasSupported?Nt(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):Nt(t,e,n),n}function Nt(t,e,n){var i,o=(i=t).getBoundingClientRect?i.getBoundingClientRect():{left:0,top:0};n.zrX=e.clientX-o.left,n.zrY=e.clientY-o.top}function Ot(t,e,n){if(null!=(e=e||window.event).zrX)return e;var i,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!=o?e.targetTouches[0]:e.changedTouches[0])&&Pt(t,i,e,n):(Pt(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&&kt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Et(t,e,n){Lt?t.addEventListener(e,n):t.attachEvent("on"+e,n)}var Rt=Lt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function zt(t){return 1<t.which}var Bt="silent";function Vt(t){Rt(this.event)}function Gt(){}Gt.prototype.dispose=function(){};function Ft(t,e,n,i){Dt.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new Gt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,It.call(this),this.setHandlerProxy(n)}var Wt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];Ft.prototype={constructor:Ft,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(z(Wt,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=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=this.findHover(e,n),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,n=t.toElement||t.relatedTarget;(n=n&&n.parentNode)&&9!=n.nodeType&&!(e=n===this.painterRoot););e||this.trigger("globalout",{event:t})},resize:function(){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:Vt};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||Bt}return!1}(o[r],t,e))&&(a.topTarget||(a.topTarget=o[r]),i!==Bt)){a.target=o[r];break}}return a}},z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){Ft.prototype[i]=function(t){var e=this.findHover(t.zrX,t.zrY),n=e.target;if("mousedown"===i)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===i)this._upEl=n;else if("click"===i){if(this._downEl!==this._upEl||!this._downPoint||4<vt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,i,t)}}),b(Ft,Dt),b(Ft,It);var Ht="undefined"==typeof Float32Array?Array:Float32Array;function Zt(){var t=new Ht(6);return Ut(t),t}function Ut(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Xt(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 jt(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 Yt(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 qt(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 Kt(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 $t(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 Jt(t){var e=Zt();return Xt(e,t),e}var Qt=(Object.freeze||Object)({create:Zt,identity:Ut,copy:Xt,mul:jt,translate:Yt,rotate:qt,scale:Kt,invert:$t,clone:Jt}),te=Ut;function ee(t){return 5e-5<t||t<-5e-5}var ne=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},ie=ne.prototype;ie.transform=null,ie.needLocalTransform=function(){return ee(this.rotation)||ee(this.position[0])||ee(this.position[1])||ee(this.scale[0]-1)||ee(this.scale[1]-1)};var oe=[];ie.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||Zt(),s?this.getLocalTransform(l):te(l),r&&(s?jt(l,a.transform,l):Xt(l,a.transform)),this.transform=l,null!=(t=this.globalScaleRatio)&&1!==t&&(this.getGlobalScale(oe),i=((oe[0]-(e=oe[0]<0?-1:1))*t+e)/oe[0]||0,o=((oe[1]-(n=oe[1]<0?-1:1))*t+n)/oe[1]||0,l[0]*=i,l[1]*=i,l[2]*=o,l[3]*=o),this.invTransform=this.invTransform||Zt(),$t(this.invTransform,l)):l&&te(l)},ie.getLocalTransform=function(t){return ne.getLocalTransform(this,t)},ie.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)},ie.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var ae=[],re=Zt();ie.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,ee(e-1)&&(e=Math.sqrt(e)),ee(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))},ie.decomposeTransform=function(){var t,e,n;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(jt(ae,t.invTransform,e),e=ae),(n=this.origin)&&(n[0]||n[1])&&(re[4]=n[0],re[5]=n[1],jt(ae,e,re),ae[4]-=n[0],ae[5]-=n[1],e=ae),this.setLocalTransform(e))},ie.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},ie.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&wt(n,n,i),n},ie.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&wt(n,n,i),n},ne.getLocalTransform=function(t,e){te(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]),Kt(e,e,i),o&&qt(e,e,o),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var se={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-se.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*se.bounceIn(2*t):.5*se.bounceOut(2*t-1)+.5}};function le(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}le.prototype={constructor:le,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?se[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 ue(){this.head=null,this.tail=null,this._len=0}var he=ue.prototype;he.insert=function(t){var e=new de(t);return this.insertEntry(e),e},he.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++},he.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--},he.len=function(){return this._len},he.clear=function(){this.head=this.tail=null,this._len=0};function ce(t){this._list=new ue,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var de=function(t){this.value=t,this.next,this.prev},pe=ce.prototype;pe.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 de(e),i.key=t,a.insertEntry(i),r[t]=i),s},pe.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},pe.clear=function(){this._list.clear(),this._map={}};var fe={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 ge(t){return(t=Math.round(t))<0?0:255<t?255:t}function me(t){return t<0?0:1<t?1:t}function ve(t){return t.length&&"%"===t.charAt(t.length-1)?ge(parseFloat(t)/100*255):ge(parseInt(t,10))}function ye(t){return t.length&&"%"===t.charAt(t.length-1)?me(parseFloat(t)/100):me(parseFloat(t))}function xe(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 _e(t,e,n){return t+(e-t)*n}function we(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function be(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Se=new ce(20),Me=null;function Ie(t,e){Me&&be(Me,e),Me=Se.put(t,Me||e.slice())}function Ae(t,e){if(t){e=e||[];var n=Se.get(t);if(n)return be(e,n);var i,o=(t+="").replace(/ /g,"").toLowerCase();if(o in fe)return be(e,fe[o]),Ie(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(i=parseInt(o.substr(1),16))&&i<=4095?(we(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Ie(t,e),e):void we(e,0,0,0,1):7===o.length?0<=(i=parseInt(o.substr(1),16))&&i<=16777215?(we(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Ie(t,e),e):void we(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 we(e,0,0,0,1);u=ye(l.pop());case"rgb":return 3!==l.length?void we(e,0,0,0,1):(we(e,ve(l[0]),ve(l[1]),ve(l[2]),u),Ie(t,e),e);case"hsla":return 4!==l.length?void we(e,0,0,0,1):(l[3]=ye(l[3]),Te(l,e),Ie(t,e),e);case"hsl":return 3!==l.length?void we(e,0,0,0,1):(Te(l,e),Ie(t,e),e);default:return}}we(e,0,0,0,1)}}function Te(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ye(t[1]),o=ye(t[2]),a=o<=.5?o*(i+1):o+i-o*i,r=2*o-a;return we(e=e||[],ge(255*xe(r,a,n+1/3)),ge(255*xe(r,a,n)),ge(255*xe(r,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function De(t,e){var n=Ae(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 Oe(n,4===n.length?"rgba":"rgb")}}function Ce(t){var e=Ae(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Le(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]=ge(_e(r[0],s[0],l)),n[1]=ge(_e(r[1],s[1],l)),n[2]=ge(_e(r[2],s[2],l)),n[3]=me(_e(r[3],s[3],l)),n}}function ke(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=Ae(e[o]),s=Ae(e[a]),l=i-o,u=Oe([ge(_e(r[0],s[0],l)),ge(_e(r[1],s[1],l)),ge(_e(r[2],s[2],l)),me(_e(r[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:a,value:i}:u}}function Pe(t,e,n,i){if(t=Ae(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]=ye(n)),null!=i&&(t[2]=ye(i)),Oe(Te(t),"rgba");var o}function Ne(t,e){if((t=Ae(t))&&null!=e)return t[3]=me(e),Oe(t,"rgba")}function Oe(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 Ee=(Object.freeze||Object)({parse:Ae,lift:De,toHex:Ce,fastLerp:Le,fastMapToColor:Le,lerp:ke,mapToColor:ke,modifyHSL:Pe,modifyAlpha:Ne,stringify:Oe}),Re=Array.prototype.slice;function ze(t,e){return t[e]}function Be(t,e,n){t[e]=n}function Ve(t,e,n){return(e-t)*n+t}function Ge(t,e,n){return.5<n?e:t}function Fe(t,e,n,i,o){var a=t.length;if(1==o)for(var r=0;r<a;r++)i[r]=Ve(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]=Ve(t[r][l],e[r][l],n)}function We(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]:Re.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 He(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]=Ze(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]=Ze(t[h][d],e[h][d],n[h][d],i[h][d],o,a,r)}function Ze(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 Ue(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Xe(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),f=!1,g=!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=Ae(S))?(S=b,f=!0):g=!0),y.push(S)}if(o||!_){for(var M=y[u-1],w=0;w<u-1;w++)p?We(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||f||(y[w]=M);p&&We(r(t._target,a),M,m);var I,A,T,D,C,L,k=0,P=0;f&&(L=[0,0,0,0]);var N=new le({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(T=y[n],A=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)He(A,T,D,C,I,I*I,I*I*I,r(t,a),m);else{if(f)i=He(A,T,D,C,I,I*I,I*I*I,L,1),i=Ue(L);else{if(g)return.5<I?D:T;i=Ze(A,T,D,C,I,I*I,I*I*I)}s(t,a,i)}else if(p)Fe(y[n],y[n+1],I,r(t,a),m);else{if(f)Fe(y[n],y[n+1],I,L,1),i=Ue(L);else{if(g)return Ge(y[n],y[n+1],I);i=Ve(y[n],y[n+1],I)}s(t,a,i)}},ondestroy:n});return e&&"spline"!==e&&(N.easing=e),N}}}function je(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||ze,this._setter=i||Be,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}je.prototype={when:function(t,e){var n,i=this._tracks;for(n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].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(Re.call(t[i]));return n}return Re.call(t)}return t}(o)})}i[n].push({time:t,value:e[n]})}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(){--l||s._doneCallback()}var i,o,a,r,s=this,l=0;for(o in this._tracks){this._tracks.hasOwnProperty(o)&&((a=Xe(this,t,n,this._tracks[o],o,e))&&(this._clipList.push(a),l++,this.animation&&this.animation.addClip(a),i=a))}return i&&(r=i.onframe,i.onframe=function(t,e){r(t,e);for(var n=0;n<s._onframeList.length;n++)s._onframeList[n](t,e)}),l||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 Ye=1;"undefined"!=typeof window&&(Ye=Math.max(window.devicePixelRatio||1,1));var qe=Ye,Ke=function(){};function $e(){this.animators=[]}var Je=Ke;function Qe(t,e,n,i,o,a,r,s){N(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]?B(o[h])&&!E(o[h])?t(e,n?n+"."+h:h,i[h],o[h],a,r,s):(s?(l[h]=i[h],tn(e,n,h,o[h])):l[h]=o[h],u++):null==o[h]||s||tn(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 tn(t,e,n,i){var o;e?((o={})[e]={},o[e][n]=i,t.attr(o)):t.attr(n,i)}$e.prototype={constructor:$e,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 je(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}Je('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){Qe(this,t,e,n,i,o,a)},animateFrom:function(t,e,n,i,o,a){Qe(this,t,e,n,i,o,a,!0)}};var en=function(t){ne.call(this,t),Dt.call(this,t),$e.call(this,t),this.id=t.id||i()};en.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(){},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(B(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(en,$e),b(en,ne),b(en,Dt);var nn,on,an,rn,sn=wt,ln=Math.min,un=Math.max;function hn(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}hn.prototype={constructor:hn,union:function(t){var e=ln(t.x,this.x),n=ln(t.y,this.y);this.width=un(t.x+t.width,this.x+this.width)-e,this.height=un(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(nn=[],on=[],an=[],rn=[],function(t){var e,n;t&&(nn[0]=an[0]=this.x,nn[1]=rn[1]=this.y,on[0]=rn[0]=this.x+this.width,on[1]=an[1]=this.y+this.height,sn(nn,nn,t),sn(on,on,t),sn(an,an,t),sn(rn,rn,t),this.x=ln(nn[0],on[0],an[0],rn[0]),this.y=ln(nn[1],on[1],an[1],rn[1]),e=un(nn[0],on[0],an[0],rn[0]),n=un(nn[1],on[1],an[1],rn[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=Zt();return Yt(i,i,[-this.x,-this.y]),Kt(i,i,[e,n]),Yt(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof hn||(t=hn.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 hn(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}}},hn.create=function(t){return new hn(t.x,t.y,t.width,t.height)};var cn=function(t){for(var e in t=t||{},en.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};cn.prototype={constructor:cn,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 cn&&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 cn&&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 cn&&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 cn&&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 cn&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new hn(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(cn,en);var dn=32,pn=7;function fn(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 gn(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 mn(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 vn(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 yn(f,g){var r,s,m=pn,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=vn(f[i],f,e,n,0,g);e+=a,0!=(n-=a)&&0!==(o=mn(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;o<e;o++)v[o]=f[t+o];var a=0,r=n,s=t;if(f[s++]=f[r++],0==--i){for(o=0;o<e;o++)f[s+o]=v[a+o];return}if(1===e){for(o=0;o<i;o++)f[s+o]=f[r+o];return f[s+i]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(g(f[r],v[a])<0){if(f[s++]=f[r++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=vn(f[r],v,a,e,0,g))){for(o=0;o<l;o++)f[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[r++],0==--i){h=!0;break}if(0!==(u=mn(v[a],f,r,i,0,g))){for(o=0;o<u;o++)f[s+o]=f[r+o];if(s+=u,r+=u,0===(i-=u)){h=!0;break}}if(f[s++]=v[a++],1==--e){h=!0;break}c--}while(pn<=l||pn<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<i;o++)f[s+o]=f[r+o];f[s+i]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)f[s+o]=v[a+o]}}:function(t,e,n,i){var o=0;for(o=0;o<i;o++)v[o]=f[n+o];var a=t+e-1,r=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[a--],0==--e){for(l=s-(i-1),o=0;o<i;o++)f[l+o]=v[o];return}if(1===i){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)f[u+o]=f[l+o];return f[s]=v[r]}var h=m;for(;;){var c=0,d=0,p=!1;do{if(g(v[r],f[a])<0){if(f[s--]=f[a--],c++,(d=0)==--e){p=!0;break}}else if(f[s--]=v[r--],d++,c=0,1==--i){p=!0;break}}while((c|d)<h);if(p)break;do{if(0!==(c=e-vn(v[r],f,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)f[u+o]=f[l+o];if(0===e){p=!0;break}}if(f[s--]=v[r--],1==--i){p=!0;break}if(0!==(d=i-mn(f[a],v,0,i,i-1,g))){for(i-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)f[u+o]=v[l+o];if(i<=1){p=!0;break}}if(f[s--]=f[a--],0==--e){p=!0;break}h--}while(pn<=c||pn<=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--)f[u+o]=f[l+o];f[s]=v[r]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)f[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 xn(t,e,n,i){n=n||0;var o=(i=i||t.length)-n;if(!(o<2)){var a=0;if(o<dn)gn(t,n,i,n+(a=fn(t,n,i,e)),e);else{var r,s=new yn(t,e),l=function(t){for(var e=0;dn<=t;)e|=1&t,t>>=1;return t+e}(o);do{(a=fn(t,n,i,e))<l&&(l<(r=o)&&(r=l),gn(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 _n(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function wn(){this._roots=[],this._displayList=[],this._displayListLen=0}wn.prototype={constructor:wn,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&&xn(n,_n)},_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 cn&&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 cn&&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 cn&&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:_n};var bn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Sn=function(t,e,n){return bn.hasOwnProperty(e)?n*t.dpr:n},Mn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],In=function(t){this.extendFrom(t,!1)};function An(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 Tn(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)}In.prototype={constructor:In,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){for(var i,o=this,a=n&&n.style,r=!a,s=0;s<Mn.length;s++){var l=Mn[s],u=l[0];!r&&o[u]===a[u]||(t[u]=Sn(t,u,o[u]||l[1]))}!r&&o.fill===a.fill||(t.fillStyle=o.fill),!r&&o.stroke===a.stroke||(t.strokeStyle=o.stroke),!r&&o.opacity===a.opacity||(t.globalAlpha=null==o.opacity?1:o.opacity),!r&&o.blend===a.blend||(t.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()&&(i=o.lineWidth,t.lineWidth=i/(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?Tn:An)(t,e,n),o=e.colorStops,a=0;a<o.length;a++)i.addColorStop(o[a].offset,o[a].color);return i}};for(var Dn=In.prototype,Cn=0;Cn<Mn.length;Cn++){var Ln=Mn[Cn];Ln[0]in Dn||(Dn[Ln[0]]=Ln[1])}In.getGradient=Dn.getGradient;function kn(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Pn(){return!1}function Nn(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 On(t,e,n){var i;n=n||qe,"string"==typeof t?i=Nn(t,e,n):B(t)&&(t=(i=t).id),this.id=t;var o=(this.dom=i).style;o&&(i.onselectstart=Pn,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}On.prototype={constructor:On,__dirty:!0,__used:!(kn.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=Nn("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||In.getGradient(a,e,{x:0,y:0,width:r,height:s}),e.__canvasGradient=n):e.image&&(n=kn.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 En="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Rn=new ce(50);function zn(t,e,n,i,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var a=Rn.get(t),r={hostEl:n,cb:i,cbPayload:o};return a?Vn(e=a.image)||a.pending.push(r):((e=e||new Image).onload=e.onerror=Bn,Rn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function Bn(){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 Vn(t){return t&&t.width&&t.height}var Gn={},Fn=0,Wn=5e3,Hn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Zn="12px sans-serif",Un={};function Xn(t,e){var n=t+":"+(e=e||Zn);if(Gn[n])return Gn[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,Un.measureText(i,o)).width,r);return Wn<Fn&&(Fn=0,Gn={}),Fn++,Gn[n]=r}function jn(t,e,n,i,o,a,r){return a?(l=i,u=ni(t,{rich:a,truncate:r,font:e,textAlign:s=n,textPadding:o}),h=u.outerWidth,c=u.outerHeight,d=Yn(0,h,s),p=qn(0,c,l),new hn(d,p,h,c)):function(t,e,n,i,o,a){var r=ei(t,e,o,a),s=Xn(t,e);o&&(s+=o[1]+o[3]);var l=r.outerHeight,u=Yn(0,s,n),h=qn(0,l,i),c=new hn(u,h,s,l);return c.lineHeight=r.lineHeight,c}(t,e,n,i,o,r);var s,l,u,h,c,d,p}function Yn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function qn(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Kn(t,e,n){var i=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":i-=n,o+=s,l="right",u="middle";break;case"right":i+=n+r,o+=s,u="middle";break;case"top":i+=r/2,o-=n,l="center",u="bottom";break;case"bottom":i+=r/2,o+=a+n,l="center";break;case"inside":i+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":i+=n,o+=s,u="middle";break;case"insideRight":i+=r-n,o+=s,l="right",u="middle";break;case"insideTop":i+=r/2,o+=n,l="center";break;case"insideBottom":i+=r/2,o+=a-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,o+=n;break;case"insideTopRight":i+=r-n,o+=n,l="right";break;case"insideBottomLeft":i+=n,o+=a-n,u="bottom";break;case"insideBottomRight":i+=r-n,o+=a-n,l="right",u="bottom"}return{x:i,y:o,textAlign:l,textVerticalAlign:u}}function $n(t,e,n,i,o){if(!e)return"";var a=(t+"").split("\n");o=Jn(e,n,i,o);for(var r=0,s=a.length;r<s;r++)a[r]=Qn(a[r],o);return a.join("\n")}function Jn(t,e,n,i){(i=k({},i)).font=e;n=Z(n,"...");i.maxIterations=Z(i.maxIterations,2);var o=i.minChar=Z(i.minChar,0);i.cnCharWidth=Xn("国",e);var a=i.ascCharWidth=Xn("a",e);i.placeholder=Z(i.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=Xn(n);return r<l&&(n="",l=0),r=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=r,i.containerWidth=t,i}function Qn(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";if((s=Xn(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=Xn(t=t.substr(0,r),i)}return""===t&&(t=e.placeholder),t}function ti(t){return Xn("国",t)}function ei(t,e,n,i){null!=t&&(t+="");var o=ti(e),a=t?t.split("\n"):[],r=a.length*o,s=r;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,u=i.outerWidth;if(null!=l&&l<s)t="",a=[];else if(null!=u)for(var h=Jn(u-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=a.length;c<d;c++)a[c]=Qn(a[c],h)}return{lines:a,height:r,outerHeight:s,lineHeight:o}}function ni(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,o=Hn.lastIndex=0;null!=(i=Hn.exec(t));){var a=i.index;o<a&&ii(n,t.substring(o,a)),ii(n,i[2],i[1]),o=Hn.lastIndex}o<t.length&&ii(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 f=0;f<r.length;f++){for(var g=r[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(C=g.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=Z(x.textHeight,ti(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=U(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=Xn(C.text,w);var S,M,I,A,T=x.textWidth,D=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(C.percentWidth=T,u.push(C),T=0):(D&&(T=C.textWidth,(M=(S=x.textBackgroundColor)&&S.image)&&Vn(M=function(t){if("string"!=typeof t)return t;var e=Rn.get(t);return e&&e.image}(M))&&(T=Math.max(T,M.width*b/M.height))),T+=I=_?_[1]+_[3]:0,null!=(A=null!=d?d-v:null)&&A<T&&(!D||A<I?(C.text="",C.textWidth=T=0):(C.text=$n(C.text,A-I,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=Xn(C.text,w),T=C.textWidth+I))),v+=C.width=T,x&&(m=Math.max(m,C.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}n.outerWidth=n.width=Z(e.textWidth,l),n.outerHeight=n.height=Z(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(f=0;f<u.length;f++){var C,L=(C=u[f]).percentWidth;C.width=parseInt(L,10)/100*l}return n}function ii(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 oi(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&q(e)||t.textFont||t.font}function ai(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)}Un.measureText=function(t,e){var n=_();return n.font=e||Zn,n.measureText(t)};var ri={left:1,right:1,center:1},si={top:1,bottom:1,middle:1},li=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function ui(t){return hi(t),z(t.rich,hi),t}function hi(t){var e,n;t&&(t.font=oi(t),"middle"===(e=t.textAlign)&&(e="center"),t.textAlign=null==e||ri[e]?e:"left","center"===(n=t.textVerticalAlign||t.textBaseline)&&(n="middle"),t.textVerticalAlign=null==n||si[n]?n:"top",t.textPadding&&(t.textPadding=j(t.textPadding)))}function ci(t,e,n,i,o,a){i.rich?function(t,e,n,i,o){var a=t.__textCotentBlock;a&&!t.__dirtyText||(a=t.__textCotentBlock=ni(n,i));!function(t,e,n,i,o){var a=n.width,r=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=vi(0,i,o),h=u.baseX,c=u.baseY,d=u.textAlign,p=u.textVerticalAlign;di(e,i,o,h,c);var f=Yn(h,r,d),g=qn(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;fi(i)&&gi(t,e,i,f,g,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,A=0,T=m,D=y,C=S-1;A<S&&(!(x=b[A]).textAlign||"left"===x.textAlign);)pi(t,e,x,i,M,v,T,"left"),I-=x.width,T+=x.width,A++;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(T+=(a-(T-m)-(y-D)-I)/2;A<=C;)x=b[A],pi(t,e,x,i,M,v,T+x.width/2,"center"),T+=x.width,A++;v+=M}}(t,e,a,i,o)}(t,e,n,i,o):function(t,e,n,i,o,a){var r=a&&a.style,s=r&&"text"===a.type,l=i.font||Zn;s&&l===(r.font||Zn)||(e.font=l);var u=t.__computedFont;t.__styleFont!==l&&(t.__styleFont=l,u=t.__computedFont=e.font);var h=i.textPadding,c=t.__textCotentBlock;c&&!t.__dirtyText||(c=t.__textCotentBlock=ei(n,u,h,i.truncate));var d=c.outerHeight,p=c.lines,f=c.lineHeight,g=vi(0,i,o),m=g.baseX,v=g.baseY,y=g.textAlign||"left",x=g.textVerticalAlign;di(e,i,o,m,v);var _=qn(v,d,x),w=m,b=_,S=fi(i);{var M,I;(S||h)&&(M=Xn(n,u),h&&(M+=h[1]+h[3]),I=Yn(m,M,y),S&&gi(t,e,i,I,_,M,d),h&&(w=bi(m,y,h),b+=h[0]))}e.textAlign=y,e.textBaseline="middle";for(var A=0;A<li.length;A++){var T=li[A],D=T[0],C=T[1],L=i[D];s&&L===r[D]||(e[C]=Sn(e,C,L||T[2]))}b+=f/2;var k=i.textStrokeWidth,P=s?r.textStrokeWidth:null,N=!s||k!==P,O=!s||N||i.textStroke!==r.textStroke,E=xi(i.textStroke,k),R=_i(i.textFill);E&&(N&&(e.lineWidth=k),O&&(e.strokeStyle=E));R&&(s&&i.textFill===r.textFill&&!r.textBackgroundColor||(e.fillStyle=R));if(1===p.length)E&&e.strokeText(p[0],w,b),R&&e.fillText(p[0],w,b);else for(A=0;A<p.length;A++)E&&e.strokeText(p[A],w,b),R&&e.fillText(p[A],w,b),b+=f}(t,e,n,i,o,a)}function di(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&&fi(l)&&gi(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=bi(r,s,c),h-=n.height/2-c[2]-n.textHeight/2),yi(e,"shadowBlur",U(l.textShadowBlur,i.textShadowBlur,0)),yi(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),yi(e,"shadowOffsetX",U(l.textShadowOffsetX,i.textShadowOffsetX,0)),yi(e,"shadowOffsetY",U(l.textShadowOffsetY,i.textShadowOffsetY,0)),yi(e,"textAlign",s),yi(e,"textBaseline","middle"),yi(e,"font",n.font||Zn);var d=xi(l.textStroke||i.textStroke,void 0),p=_i(l.textFill||i.textFill),f=Z(l.textStrokeWidth,i.textStrokeWidth);d&&(yi(e,"lineWidth",f),yi(e,"strokeStyle",d),e.strokeText(n.text,r,h)),p&&(yi(e,"fillStyle",p),e.fillText(n.text,r,h))}function fi(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function gi(t,e,n,i,o,a,r){var s,l,u,h=n.textBackgroundColor,c=n.textBorderWidth,d=n.textBorderColor,p=N(h);yi(e,"shadowBlur",n.textBoxShadowBlur||0),yi(e,"shadowColor",n.textBoxShadowColor||"transparent"),yi(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),yi(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),(p||c&&d)&&(e.beginPath(),(s=n.textBorderRadius)?ai(e,{x:i,y:o,width:a,height:r,r:s}):e.rect(i,o,a,r),e.closePath()),p?(yi(e,"fillStyle",h),null!=n.fillOpacity?(u=e.globalAlpha,e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=u):e.fill()):A(h)?(yi(e,"fillStyle",h(n)),e.fill()):!B(h)||(l=zn(l=h.image,null,t,mi,h))&&Vn(l)&&e.drawImage(l,i,o,a,r),c&&d&&(yi(e,"lineWidth",c),yi(e,"strokeStyle",d),null!=n.strokeOpacity?(u=e.globalAlpha,e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=u):e.stroke())}function mi(t,e){e.image=t}function vi(t,e,n){var i,o,a,r=e.x||0,s=e.y||0,l=e.textAlign,u=e.textVerticalAlign;return n&&((i=e.textPosition)instanceof Array?(r=n.x+wi(i[0],n.width),s=n.y+wi(i[1],n.height)):(r=(o=Kn(i,n,e.textDistance)).x,s=o.y,l=l||o.textAlign,u=u||o.textVerticalAlign),(a=e.textOffset)&&(r+=a[0],s+=a[1])),{baseX:r,baseY:s,textAlign:l,textVerticalAlign:u}}function yi(t,e,n){return t[e]=Sn(t,e,n),t[e]}function xi(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function _i(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function wi(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function bi(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Si(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Mi(){}var Ii=new hn;function Ai(t){for(var e in t=t||{},en.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new In(t.style,this),this._rect=null,this.__clipPaths=[]}function Ti(t){Ai.call(this,t)}Ai.prototype={constructor:Ai,type:"displayable",__dirty:!0,invisible:!(Mi.prototype={constructor:Mi,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&ui(n);var i,o=n.text;null!=o&&(o+=""),Si(o,n)&&(t.save(),i=this.transform,n.transformText?this.setTransform(t):i&&(Ii.copy(e),Ii.applyTransform(i),e=Ii),ci(this,t,o,n,e),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(){},afterBrush:function(){},brush:function(){},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?en.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 In(t,this),this.dirty(!1),this}},w(Ai,en),b(Ai,Mi),Ti.prototype={constructor:Ti,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=zn(i,this._image,this,this.onload);p&&Vn(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 hn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},w(Ti,Ai);var Di=314159;function Ci(t){return parseInt(t,10)}var Li=new hn(0,0,0,0),ki=new hn(0,0,0,0);function Pi(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=k({},n||{}),this.dpr=n.devicePixelRatio||qe,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 On(t,this,this.dpr)).__builtin__=!0,s.initContext(),(p[Di]=s).zlevel=Di,d.push(Di),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","overflow:hidden","width:"+u+"px","height:"+h+"px","padding:0","margin:0","border-width:0"].join(";")+";",c),t.appendChild(l)),this._hoverlayer=null,this._hoverElements=[]}Pi.prototype={constructor:Pi,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(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){xn(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,En(function(){o._paintList(t,e,n)})))},_compositeManually:function(){var e=this.getLayer(Di).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(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;s.__startIndex===s.__endIndex?s.clear(!1,f):c===s.__startIndex&&((h=t[c]).incremental&&h.notClear&&!e||s.clear(!1,f)),-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,d)if(15<Date.now()-p)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return v.wxa&&z(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=e.ctx,u=t.transform;!e.__dirty&&!n||t.invisible||0===t.style.opacity||u&&!u[0]&&!u[3]||t.culling&&(a=t,r=this._width,s=this._height,Li.copy(a.getBoundingRect()),a.transform&&Li.applyTransform(a.transform),ki.width=r,ki.height=s,!Li.intersect(ki))||(o=t.__clipPaths,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,i.prevElClipPaths)||(i.prevElClipPaths&&(e.ctx.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(l.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,l),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(l),t.brush(l,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(l))},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Di);var n=this._layers[t];return n||((n=new On("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&m(n,this._layerConfig[t],!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])Je("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 Je("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){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((a=t[n]).zlevel!==t[n-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}for(var i=null,o=0,n=0;n<t.length;n++){var a,r,s=(a=t[n]).zlevel;a.incremental?((r=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,o=1):r=this.getLayer(s+(0<o?.01:0),this._needsManuallyCompositing),r.__builtin__||Je("ZLevel "+s+" has been used by unkown layer "+r.id),r!==i&&(r.__used=!0,r.__startIndex!==n&&(r.__dirty=!0),r.__startIndex=n,r.incremental?r.__drawIndex=-1:r.__drawIndex=n,e(n),i=r),a.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawIndex<0&&(r.__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);z(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(Di).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[Di].dom;var e=new On("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]||Ci(s[n])||Ci(r.style[n]))-(Ci(s[o])||0)-(Ci(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),f=o.width+h+c,g=o.height+d+p;n.width=f*e,n.height=g*e,i.scale(e,e),i.clearRect(0,0,f,g),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 Ti({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 Ni(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,Dt.call(this)}Ni.prototype={constructor:Ni,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,En(function t(){e._running&&(En(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 je(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},b(Ni,Dt);function Oi(){this._track=[]}function Ei(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}Oi.prototype={constructor:Oi,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=Pt(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Ri)if(Ri.hasOwnProperty(e)){var n=Ri[e](this._track,t);if(n)return n}}};var Ri={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=Ei(o)/Ei(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}}}}},zi=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Bi=["touchstart","touchend","touchmove"],Vi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Gi=L(zi,function(t){var e=t.replace("mouse","pointer");return Vi[e]?e:t});function Fi(t){return"mousewheel"===t&&v.browser.firefox?"DOMMouseScroll":t}function Wi(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var o,a=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);"end"===n&&i.clear(),a&&(o=a.type,e.gestureEvent=o,t.handler.dispatchToElement({target:a.target},o,a.event))}function Hi(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var Zi={mousemove:function(t){t=Ot(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ot(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Ot(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Wi(this,t,"start"),Zi.mousemove.call(this,t),Zi.mousedown.call(this,t),Hi(this)},touchmove:function(t){(t=Ot(this.dom,t)).zrByTouch=!0,Wi(this,t,"change"),Zi.mousemove.call(this,t),Hi(this)},touchend:function(t){(t=Ot(this.dom,t)).zrByTouch=!0,Wi(this,t,"end"),Zi.mouseup.call(this,t),new Date-this._lastTouchMoment<300&&Zi.click.call(this,t),Hi(this)},pointerdown:function(t){Zi.mousedown.call(this,t)},pointermove:function(t){Ui(t)||Zi.mousemove.call(this,t)},pointerup:function(t){Zi.mouseup.call(this,t)},pointerout:function(t){Ui(t)||Zi.mouseout.call(this,t)}};function Ui(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Xi(i){z(Bi,function(t){i._handlers[t]=P(Zi[t],i)}),z(Gi,function(t){i._handlers[t]=P(Zi[t],i)}),z(zi,function(t){var e,n;i._handlers[t]=(e=Zi[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})})}function ji(n){function t(t,e){z(t,function(t){Et(n,Fi(t),e._handlers[t])},e)}Dt.call(this),this.dom=n,this._touching=!1,this._touchTimer,this._gestureMgr=new Oi,this._handlers={},Xi(this),v.pointerEventsSupported?t(Gi,this):(v.touchEventsSupported&&t(Bi,this),t(zi,this))}z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Zi[e]=function(t){t=Ot(this.dom,t),this.trigger(e,t)}});var Yi=ji.prototype;Yi.dispose=function(){for(var t,e,n,i=zi.concat(Bi),o=0;o<i.length;o++){var a=i[o];t=this.dom,e=Fi(a),n=this._handlers[a],Lt?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}},Yi.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},b(ji,Dt);var qi=!v.canvasSupported,Ki={canvas:Pi},$i={},Ji="4.0.5";function Qi(t,e){var n=new eo(i(),t,e);return $i[n.id]=n}function to(t,e){Ki[t]=e}var eo=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,o=new wn,a=n.renderer;if(qi){if(!Ki.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Ki[a]||(a="canvas");var r=new Ki[a](e,o,n,t);this.storage=o,this.painter=r;var s=v.node||v.worker?null:new ji(r.getViewportRoot());this.handler=new Ft(o,r,s,r.root),this.animation=new Ni({stage:{update:P(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)}};eo.prototype={constructor:eo,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=!1,this.painter.refresh(),this._needsRefresh=!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 $i[t]}};var no=(Object.freeze||Object)({version:Ji,init:Qi,dispose:function(t){if(t)t.dispose();else{for(var e in $i)$i.hasOwnProperty(e)&&$i[e].dispose();$i={}}return this},getInstance:function(t){return $i[t]},registerPainter:to}),io=z,oo=B,ao=C,ro="series\0";function so(t){return t instanceof Array?t:null==t?[]:[t]}function lo(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 uo=["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 ho(t){return!oo(t)||ao(t)||t instanceof Date?t:t.value}function co(t,o){o=(o||[]).slice();var a=L(t||[],function(t,e){return{exist:t}});return io(o,function(t,e){if(oo(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)}}}),io(o,function(t,e){if(oo(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 po(t){var r=tt();io(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),io(t,function(t,e){var n=t.option;Y(!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={})}),io(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if(oo(i)){if(o.name=null!=i.name?i.name+"":n?n.name:ro+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 fo(t){var e=t.name;return e&&e.indexOf(ro)}function go(t){return oo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function mo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?C(t.dataIndex)?L(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?C(t.name)?L(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function vo(){var e="__\0ec_inner_"+yo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var yo=0;function xo(s,l,u){var t;N(l)&&((t={})[l+"Index"]=0,l=t);var e=u&&u.defaultMainType;!e||_o(l,e+"Index")||_o(l,e+"Id")||_o(l,e+"Name")||(l[e+"Index"]=0);var h={};return io(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 _o(t,e){return t&&t.hasOwnProperty(e)}function wo(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function bo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}var So=".",Mo="___EC__COMPONENT__CONTAINER___";function Io(t){var e={main:"",sub:""};return t&&(t=t.split(So),e.main=t[0]||"",e.sub=t[1]||""),e}function Ao(t,i){(t.$constructor=t).extend=function(e){T&&z(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 k(t.prototype,e),t.extend=this.extend,t.superCall=Co,t.superApply=Lo,w(t,this),t.superClass=n,t}}var To=0;function Do(t){var e=["__\0is_clz",To++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,T&&Y(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function Co(t,e){var n=X(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Lo(t,e,n){return this.superClass.prototype[e].apply(t,n)}function ko(n,t){t=t||{};var i,o={};return n.registerClass=function(t,e){var n;return e&&(Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=e),'componentType "'+n+'" illegal'),(e=Io(e)).sub?e.sub!==Mo&&(function(t){var e=o[t.main];e&&e[Mo]||((e=o[t.main]={})[Mo]=!0);return e}(e)[e.sub]=t):(T&&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[Mo]&&(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=Io(t);var n=[],e=o[t.main];return e&&e[Mo]?z(e,function(t,e){e!==Mo&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=Io(t),!!o[t.main]},n.getAllClassMainTypes=function(){var n=[];return z(o,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=Io(t);var e=o[t.main];return e&&e[Mo]},n.parseClassType=Io,!t.registerWhenExtend||(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)}),n}function Po(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 No=Po([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Oo={getLineStyle:function(t){var e=No(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),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?null:"dashed"===e?[i,i]:[n,n]}},Eo=Po([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ro={getAreaStyle:function(t,e){return Eo(this,t,e)}},zo=Math.pow,Bo=Math.sqrt,Vo=1e-8,Go=1e-4,Fo=Bo(3),Wo=1/3,Ho=at(),Zo=at(),Uo=at();function Xo(t){return-Vo<t&&t<Vo}function jo(t){return Vo<t||t<-Vo}function Yo(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 qo(t,e,n,i,o){var a=1-o;return 3*(((e-t)*a+2*(n-e)*o)*a+(i-n)*o*o)}function Ko(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 Xo(h)?jo(u)&&0<=(s=-c/u)&&s<=1&&(o[d++]=s):Xo(a=u*u-4*h*c)?o[0]=-u/(2*h):0<a&&(l=(-u-(r=Bo(a)))/(2*h),0<=(s=(-u+r)/(2*h))&&s<=1&&(o[d++]=s),0<=l&&l<=1&&(o[d++]=l)),d}function $o(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 Jo(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Qo(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 ea(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 na=Math.min,ia=Math.max,oa=Math.sin,aa=Math.cos,ra=2*Math.PI,sa=at(),la=at(),ua=at();function ha(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=na(o,i[0]),a=ia(a,i[0]),r=na(r,i[1]),s=ia(s,i[1]);e[0]=o,e[1]=r,n[0]=a,n[1]=s}}function ca(t,e,n,i,o,a){o[0]=na(t,n),o[1]=na(e,i),a[0]=ia(t,n),a[1]=ia(e,i)}var da=[],pa=[];var fa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ga=[],ma=[],va=[],ya=[],xa=Math.min,_a=Math.max,wa=Math.cos,ba=Math.sin,Sa=Math.sqrt,Ma=Math.abs,Ia="undefined"!=typeof Float32Array,Aa=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function Ta(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 Da(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,f,g,m=.005,v=1/0;Ho[0]=l,Ho[1]=u;for(var y=0;y<1;y+=.05)Zo[0]=Yo(t,n,o,r,y),Zo[1]=Yo(e,i,a,s,y),(f=xt(Ho,Zo))<v&&(c=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Go);x++)d=c-m,p=c+m,Zo[0]=Yo(t,n,o,r,d),Zo[1]=Yo(e,i,a,s,d),f=xt(Zo,Ho),0<=d&&f<v?(c=d,v=f):(Uo[0]=Yo(t,n,o,r,p),Uo[1]=Yo(e,i,a,s,p),g=xt(Uo,Ho),p<=1&&g<v?(c=p,v=g):m*=.5);return h&&(h[0]=Yo(t,n,o,r,c),h[1]=Yo(e,i,a,s,c)),Bo(v)}(t,e,n,i,o,a,r,s,u,h,null)<=c/2}}function Ca(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;Ho[0]=r,Ho[1]=s;for(var d=0;d<1;d+=.05){Zo[0]=Jo(t,n,o,d),Zo[1]=Jo(e,i,a,d),(v=xt(Ho,Zo))<c&&(u=d,c=v)}c=1/0;for(var p=0;p<32&&!(h<Go);p++){var f=u-h,g=u+h;Zo[0]=Jo(t,n,o,f),Zo[1]=Jo(e,i,a,f);var m,v=xt(Zo,Ho);0<=f&&v<c?(u=f,c=v):(Uo[0]=Jo(t,n,o,g),Uo[1]=Jo(e,i,a,g),m=xt(Uo,Ho),g<=1&&m<c?(u=g,c=m):h*=.5)}return l&&(l[0]=Jo(t,n,o,u),l[1]=Jo(e,i,a,u)),Bo(c)}(t,e,n,i,o,a,s,l,null)<=u/2}}Aa.prototype={constructor:Aa,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Ma(1/qe/t)||0,this._uy=Ma(1/qe/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(fa.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=Ma(t-this._xi)>this._ux||Ma(e-this._yi)>this._uy||this._len<5;return this.addData(fa.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(fa.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(fa.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(fa.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=wa(o)*n+t,this._yi=ba(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(fa.R,t,e,n,i),this},closePath:function(){this.addData(fa.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||!Ia||(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();Ia&&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=Sa(h*h+c*c),p=l,f=u,g=r.length;for(a<0&&(a=o+a),p-=(a%=o)*(h/=d),f-=a*(c/=d);0<h&&p<=t||h<0&&t<=p||0==h&&(0<c&&f<=e||c<0&&e<=f);)p+=h*(n=r[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,0<h&&p<l||h<0&&l<p||0<c&&f<u||c<0&&u<f||s[i%2?"moveTo":"lineTo"]((0<=h?xa:_a)(p,t),(0<=c?xa:_a)(f,e));h=p-t,c=f-e,this._dashOffset=-Sa(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,f=this._ctx,g=this._xi,m=this._yi,v=Yo,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(g,t,n,o,r+.1)-v(g,t,n,o,r),l=v(m,e,i,a,r+.1)-v(m,e,i,a,r),y+=Sa(s*s+l*l);for(;x<_&&!(d<(w+=p[x]));x++);for(r=(w-d)/y;r<=1;)u=v(g,t,n,o,r),h=v(m,e,i,a,r),x%2?f.moveTo(u,h):f.lineTo(u,h),r+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-Sa(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,Ia&&(this.data=new Float32Array(t)))},getBoundingRect:function(){ga[0]=ga[1]=va[0]=va[1]=Number.MAX_VALUE,ma[0]=ma[1]=ya[0]=ya[1]=-Number.MAX_VALUE;for(var t,e,n,i,o,a,r,s,l,u,h,c,d,p,f=this.data,g=0,m=0,v=0,y=0,x=0;x<f.length;){var _=f[x++];switch(1==x&&(v=g=f[x],y=m=f[x+1]),_){case fa.M:g=v=f[x++],m=y=f[x++],va[0]=v,va[1]=y,ya[0]=v,ya[1]=y;break;case fa.L:ca(g,m,f[x],f[x+1],va,ya),g=f[x++],m=f[x++];break;case fa.C:!function(t,e,n,i,o,a,r,s,l,u){var h,c=Ko,d=Yo,p=c(t,n,o,r,da);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<p;h++){var f=d(t,n,o,r,da[h]);l[0]=na(f,l[0]),u[0]=ia(f,u[0])}for(p=c(e,i,a,s,pa),h=0;h<p;h++){var g=d(e,i,a,s,pa[h]);l[1]=na(g,l[1]),u[1]=ia(g,u[1])}l[0]=na(t,l[0]),u[0]=ia(t,u[0]),l[0]=na(r,l[0]),u[0]=ia(r,u[0]),l[1]=na(e,l[1]),u[1]=ia(e,u[1]),l[1]=na(s,l[1]),u[1]=ia(s,u[1])}(g,m,f[x++],f[x++],f[x++],f[x++],f[x],f[x+1],va,ya),g=f[x++],m=f[x++];break;case fa.Q:t=g,e=m,n=f[x++],i=f[x++],o=f[x],a=f[x+1],r=va,s=ya,p=d=c=h=u=l=void 0,u=Jo,h=ia(na((l=ta)(t,n,o),1),0),c=ia(na(l(e,i,a),1),0),d=u(t,n,o,h),p=u(e,i,a,c),r[0]=na(t,o,d),r[1]=na(e,a,p),s[0]=ia(t,o,d),s[1]=ia(e,a,p),g=f[x++],m=f[x++];break;case fa.A:var w=f[x++],b=f[x++],S=f[x++],M=f[x++],I=f[x++],A=f[x++]+I,T=(f[x++],1-f[x++]);1==x&&(v=wa(I)*S+w,y=ba(I)*M+b),function(t,e,n,i,o,a,r,s,l){var u,h=bt,c=St,d=Math.abs(o-a);if(d%ra<1e-4&&1e-4<d)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;sa[0]=aa(o)*n+t,sa[1]=oa(o)*i+e,la[0]=aa(a)*n+t,la[1]=oa(a)*i+e,h(s,sa,la),c(l,sa,la),(o%=ra)<0&&(o+=ra),(a%=ra)<0&&(a+=ra),a<o&&!r?a+=ra:o<a&&r&&(o+=ra),r&&(u=a,a=o,o=u);for(var p=0;p<a;p+=Math.PI/2)o<p&&(ua[0]=aa(p)*n+t,ua[1]=oa(p)*i+e,h(s,ua,s),c(l,ua,l))}(w,b,S,M,I,A,T,va,ya),g=wa(A)*S+w,m=ba(A)*M+b;break;case fa.R:ca(v=g=f[x++],y=m=f[x++],v+f[x++],y+f[x++],va,ya);break;case fa.Z:g=v,m=y}bt(ga,ga,va),St(ma,ma,ya)}return 0===x&&(ga[0]=ga[1]=ma[0]=ma[1]=0),new hn(ga[0],ga[1],ma[0]-ga[0],ma[1]-ga[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 fa.M:e=i=s[c++],n=o=s[c++],t.moveTo(i,o);break;case fa.L:a=s[c++],r=s[c++],(Ma(a-i)>l||Ma(r-o)>u||c===h-1)&&(t.lineTo(a,r),i=a,o=r);break;case fa.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 fa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case fa.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(t.translate(p,f),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,-f)):t.arc(p,f,w,v,M,1-_),1==c&&(e=wa(v)*g+p,n=ba(v)*m+f),i=wa(M)*g+p,o=ba(M)*m+f;break;case fa.R:e=i=s[c],n=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case fa.Z:t.closePath(),i=e,o=n}}}},Aa.CMD=fa;var La=2*Math.PI;function ka(t){return(t%=La)<0&&(t+=La),t}var Pa=2*Math.PI;function Na(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 Oa=Aa.CMD,Ea=2*Math.PI,Ra=1e-4;var za=[-1,-1,-1],Ba=[-1,-1];function Va(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,f,g,m,v,y,x,_,w,b,S,M,I,A,T,D,C,L,k,P,N,O=(p=za,k=(T=3*((d=a)-2*(c=i)+(h=e)))*(D=3*(c-h))-9*(A=s+3*(c-d)-h)*(C=h-u),P=D*D-3*T*C,N=0,Xo(L=T*T-3*A*D)&&Xo(k)?Xo(T)?p[0]=0:0<=(S=-D/T)&&S<=1&&(p[N++]=S):Xo(f=k*k-4*L*P)?(M=-(g=k/L)/2,0<=(S=-T/A+g)&&S<=1&&(p[N++]=S),0<=M&&M<=1&&(p[N++]=M)):0<f?(y=L*T+1.5*A*(-k-(m=Bo(f))),0<=(S=(-T-((v=(v=L*T+1.5*A*(-k+m))<0?-zo(-v,Wo):zo(v,Wo))+(y=y<0?-zo(-y,Wo):zo(y,Wo))))/(3*A))&&S<=1&&(p[N++]=S)):(x=(2*L*T-3*A*k)/(2*Bo(L*L*L)),_=Math.acos(x)/3,S=(-T-2*(w=Bo(L))*(b=Math.cos(_)))/(3*A),M=(-T+w*(b+Fo*Math.sin(_)))/(3*A),I=(-T+w*(b-Fo*Math.sin(_)))/(3*A),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=za[G],W=0===F||1===F?.5:1;Yo(t,n,o,r,F)<l||(V<0&&(V=Ko(e,i,a,s,Ba),Ba[1]<Ba[0]&&1<V&&(z=void 0,z=Ba[0],Ba[0]=Ba[1],Ba[1]=z),E=Yo(e,i,a,s,Ba[0]),1<V&&(R=Yo(e,i,a,s,Ba[1]))),2==V?F<Ba[0]?B+=E<e?W:-W:F<Ba[1]?B+=R<E?W:-W:B+=s<R?W:-W:F<Ba[0]?B+=E<e?W:-W:B+=s<E?W:-W)}return B}function Ga(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,f,g,m,v,y,x=(h=za,m=2*((u=i)-(l=e)),v=l-s,y=0,Xo(g=l-2*u+a)?jo(m)&&0<=(p=-v/m)&&p<=1&&(h[y++]=p):Xo(c=m*m-4*g*v)?0<=(p=-m/(2*g))&&p<=1&&(h[y++]=p):0<c&&(f=(-m-(d=Bo(c)))/(2*g),0<=(p=(-m+d)/(2*g))&&p<=1&&(h[y++]=p),0<=f&&f<=1&&(h[y++]=f)),y);if(0===x)return 0;var _=ta(e,i,a);if(0<=_&&_<=1){for(var w=0,b=Jo(e,i,a,_),S=0;S<x;S++){var M=0===za[S]||1===za[S]?.5:1;Jo(t,n,o,za[S])<r||(za[S]<_?w+=b<e?M:-M:w+=a<b?M:-M)}return w}M=0===za[0]||1===za[0]?.5:1;return Jo(t,n,o,za[0])<r?0:a<e?M:-M}function Fa(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===Oa.M&&1<d&&(n||(s+=Na(l,u,h,c,i,o))),1==d&&(h=l=t[d],c=u=t[d+1]),p){case Oa.M:l=h=t[d++],u=c=t[d++];break;case Oa.L:if(n){if(Ta(l,u,t[d],t[d+1],e,i,o))return!0}else s+=Na(l,u,t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Oa.C:if(n){if(Da(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=Va(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 Oa.Q:if(n){if(Ca(l,u,t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=Ga(l,u,t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Oa.A:var f=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++],_=(t[d++],1-t[d++]),w=Math.cos(y)*m+f,b=Math.sin(y)*v+g;1<d?s+=Na(l,u,w,b,i,o):(h=w,c=b);var S=(i-f)*v/m+f;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)%Pa<1e-4)return 1;(o=a?(h=i,i=ka(o),ka(h)):(i=ka(i),ka(o)))<i&&(o+=Pa);var d=Math.atan2(l,s);return d<0&&(d+=Pa),i<=d&&d<=o||i<=d+Pa&&d+Pa<=o}}}(f,g,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);za[0]=-l,za[1]=l;var u=Math.abs(i-o);if(u<1e-4)return 0;if(u%Ea<1e-4){o=Ea;var h=a?1:-1;return r>=za[i=0]+t&&r<=za[1]+t?h:0}(o=a?(l=i,i=ka(o),ka(l)):(i=ka(i),ka(o)))<i&&(o+=Ea);for(var c=0,d=0;d<2;d++){var p,f=za[d];r<f+t&&(h=a?1:-1,(p=Math.atan2(s,f))<0&&(p=Ea+p),(i<=p&&p<=o||i<=p+Ea&&p+Ea<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h))}return c}(f,g,v,y,y+x,_,S,o);l=Math.cos(y+x)*m+f,u=Math.sin(y+x)*v+g;break;case Oa.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(Ta(h,c,w,c,e,i,o)||Ta(w,c,w,b,e,i,o)||Ta(w,b,h,b,e,i,o)||Ta(h,b,h,c,e,i,o))return!0}else s+=Na(w,c,w,b,i,o),s+=Na(h,b,h,c,i,o);break;case Oa.Z:if(n){if(Ta(l,u,h,c,e,i,o))return!0}else s+=Na(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)<Ra)||(s+=Na(l,u,h,c,i,o)||0),0!==s}var Wa=kn.prototype.getCanvasPattern,Ha=Math.abs,Za=new Aa(!0);function Ua(t){Ai.call(this,t),this.path=null}Ua.prototype={constructor:Ua,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n,i=this.style,o=this.path||Za,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=Wa.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Wa.call(l,t));var p,f=i.lineDash,g=i.lineDashOffset,m=!!t.setLineDash,v=this.getGlobalScale();o.setScale(v[0],v[1]),this.__dirtyPath||f&&!m&&a?(o.beginPath(t),f&&!m&&(o.setLineDash(f),o.setLineDashOffset(g)),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)),f&&m&&(t.setLineDash(f),t.lineDashOffset=g),a&&(null!=i.strokeOpacity?(p=t.globalAlpha,t.globalAlpha=i.strokeOpacity*i.opacity,o.stroke(t),t.globalAlpha=p):o.stroke(t)),f&&m&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Aa},getBoundingRect:function(){var t,e=this._rect,n=this.style,i=!e;if(i&&(t=(t=this.path)||(this.path=new Aa),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)),Fa(a,r/s,!0,t,e)))return!0}if(o.hasFill())return Fa(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):Ai.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(B(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<Ha(t[0]-1)&&1e-10<Ha(t[3]-1)?Math.sqrt(Ha(t[0]*t[3]-t[2]*t[1])):1}},Ua.extend=function(o){function t(t){Ua.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var n,i=this.shape;for(n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in w(t,Ua),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},w(Ua,Ai);function Xa(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var ja=Aa.CMD,Ya=[[],[],[]],qa=Math.sqrt,Ka=Math.atan2,$a=function(t,e){for(var n,i,o,a,r=t.data,s=ja.M,l=ja.C,u=ja.L,h=ja.R,c=ja.A,d=ja.Q,p=0,f=0;p<r.length;){switch(n=r[p++],f=p,i=0,n){case s:case u:i=1;break;case l:i=3;break;case d:i=2;break;case c:var g=e[4],m=e[5],v=qa(e[0]*e[0]+e[1]*e[1]),y=qa(e[2]*e[2]+e[3]*e[3]),x=Ka(-e[1]/y,e[0]/v);r[p]*=v,r[p++]+=g,r[p]*=y,r[p++]+=m,r[p++]*=v,r[p++]*=y,r[p++]+=x,r[p++]+=x,f=p+=2;break;case h:a[0]=r[p++],a[1]=r[p++],wt(a,a,e),r[f++]=a[0],r[f++]=a[1],a[0]+=r[p++],a[1]+=r[p++],wt(a,a,e),r[f++]=a[0],r[f++]=a[1]}for(o=0;o<i;o++){(a=Ya[o])[0]=r[p++],a[1]=r[p++],wt(a,a,e),r[f++]=a[0],r[f++]=a[1]}}},Ja=Math.sqrt,Qa=Math.sin,tr=Math.cos,er=Math.PI,nr=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Xa(t)*Xa(e))},ir=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(nr(t,e))};function or(t,e,n,i,o,a,r,s,l,u,h){var c=l*(er/180),d=tr(c)*(t-n)/2+Qa(c)*(e-i)/2,p=-1*Qa(c)*(t-n)/2+tr(c)*(e-i)/2,f=d*d/(r*r)+p*p/(s*s);1<f&&(r*=Ja(f),s*=Ja(f));var g=(o===a?-1:1)*Ja((r*r*(s*s)-r*r*(p*p)-s*s*(d*d))/(r*r*(p*p)+s*s*(d*d)))||0,m=g*r*p/s,v=g*-s*d/r,y=(t+n)/2+tr(c)*m-Qa(c)*v,x=(e+i)/2+Qa(c)*m+tr(c)*v,_=ir([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=ir(w,b);nr(w,b)<=-1&&(S=er),1<=nr(w,b)&&(S=0),0===a&&0<S&&(S-=2*er),1===a&&S<0&&(S+=2*er),h.addData(u,y,x,r,s,_,S,c,a)}var ar=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,rr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function sr(t,e){var n=function(t){if(!t)return new Aa;for(var e,n=0,i=0,o=n,a=i,r=new Aa,s=Aa.CMD,l=t.match(ar),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),p=c.match(rr)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){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 A=r.len(),T=r.data;e===s.C&&(v+=n-T[A-4],y+=i-T[A-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;A=r.len(),T=r.data;e===s.C&&(v+=n-T[A-4],y+=i-T[A-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;A=r.len(),T=r.data;e===s.Q&&(v+=n-T[A-4],y+=i-T[A-3]),n=p[m++],i=p[m++],h=s.Q,r.addData(h,v,y,n,i);break;case"t":v=n,y=i;A=r.len(),T=r.data;e===s.Q&&(v+=n-T[A-4],y+=i-T[A-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++],or(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++],or(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){$a(n,t),this.dirty(!0)},e}function lr(t,e){return new Ua(sr(t,e))}var ur=function(t){Ai.call(this,t)};ur.prototype={constructor:ur,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&ui(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),Si(i,n)&&(this.setTransform(t),ci(this,t,i,n,null,e),this.restoreTransform(t))},getBoundingRect:function(){var t,e,n=this.style;return this.__dirty&&ui(n),this._rect||(null!=n.text?0:0,(t=jn(n.text+"",n.font,n.textAlign,n.textVerticalAlign,n.textPadding,n.rich)).x+=n.x||0,t.y+=n.y||0,xi(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(ur,Ai);function hr(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<dr.length;s++)dr[s][2]=n[dr[s][0]],n[dr[s][0]]=dr[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<dr.length;s++)n[dr[s][0]]=dr[s][2]}:l}var cr=Ua.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)}}),dr=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],pr=Ua.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:hr(Ua.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()}}),fr=Ua.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 gr(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 mr(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++)bt(r,r,t[d]),St(s,s,t[d]);bt(r,r,i[0]),St(s,s,i[1])}for(d=0,p=t.length;d<p;d++){var f=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(st(t[d]));continue}o=t[d-1],a=t[d+1]}ct(u,a,o),ft(u,u,e);var g=mt(f,o),m=mt(f,a),v=g+m;0!==v&&(g/=v,m/=v),ft(h,u,-g),ft(c,u,m);var y=ut([],f,h),x=ut([],f,c);i&&(St(y,y,r),bt(y,y,s),St(x,x,r),bt(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+=mt(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]),f=c*c,g=c*f;i.push([gr(s[0],d[0],l[0],p[0],c,f,g),gr(s[1],d[1],l[1],p[1],c,f,g)])}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 vr=Ua.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){mr(t,e,!0)}}),yr=Ua.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){mr(t,e,!1)}}),xr=Ua.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width,a=e.height;e.r?ai(t,e):t.rect(n,i,o,a),t.closePath()}}),_r=Ua.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=e.x1,i=e.y1,o=e.x2,a=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]}}),wr=[];function br(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?qo:Yo)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?qo:Yo)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Qo:Jo)(t.x1,t.cpx1,t.x2,e),(n?Qo:Jo)(t.y1,t.cpy1,t.y2,e)]}function Sr(t){this.colorStops=t||[]}var Mr=Ua.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&&(ea(n,r,o,h,wr),r=wr[1],o=wr[2],ea(i,s,a,h,wr),s=wr[1],a=wr[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&($o(n,r,l,o,h,wr),r=wr[1],l=wr[2],o=wr[3],$o(i,s,u,a,h,wr),s=wr[1],u=wr[2],a=wr[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return br(this.shape,t,!1)},tangentAt:function(t){var e=br(this.shape,t,!0);return gt(e,e)}}),Ir=Ua.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)}}),Ar=Ua.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])},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(),Ua.prototype.getBoundingRect.call(this)}});Sr.prototype={constructor:Sr,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function Tr(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,Sr.call(this,o)}Tr.prototype={constructor:Tr},w(Tr,Sr);function Dr(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,Sr.call(this,i)}function Cr(t){Ai.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Dr.prototype={constructor:Dr},w(Dr,Sr),Cr.prototype.incremental=!0,Cr.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Cr.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Cr.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Cr.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])},Cr.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}},Cr.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 Lr=[];Cr.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new hn(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(Lr)),t.union(i)}this._rect=t}return this._rect},Cr.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(Cr,Ai);var kr=Math.round,Pr=Math.max,Nr=Math.min,Or={};function Er(t){return Ua.extend(t)}function Rr(t,e,n,i){var o=lr(t,e);return n&&("center"===i&&(n=Br(n,o.getBoundingRect())),Gr(o,n)),o}function zr(t,n,i){var o=new Ti({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(Br(n,e)))}});return o}function Br(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 Vr=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 Ua(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},r};function Gr(t,e){var n;t.applyTransform&&(n=t.getBoundingRect().calculateTransform(e),t.applyTransform(n))}function Fr(t){var e=t.shape,n=t.style.lineWidth;return kr(2*e.x1)===kr(2*e.x2)&&(e.x1=e.x2=Hr(e.x1,n,!0)),kr(2*e.y1)===kr(2*e.y2)&&(e.y1=e.y2=Hr(e.y1,n,!0)),t}function Wr(t){var e=t.shape,n=t.style.lineWidth,i=e.x,o=e.y,a=e.width,r=e.height;return e.x=Hr(e.x,n,!0),e.y=Hr(e.y,n,!0),e.width=Math.max(Hr(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(Hr(o+r,n,!1)-e.y,0===r?0:1),t}function Hr(t,e,n){var i=kr(2*t);return(i+kr(e))%2==0?i/2:(i+(n?1:-1))/2}function Zr(t){return null!=t&&"none"!==t}var Ur=tt(),Xr=0;function jr(t){var e,n,i,o,a=t.__hoverStl;a&&!t.__highlighted&&(e=t.useHoverLayer,t.__highlighted=e?"layer":"plain",!(n=t.__zr)&&e||(o=(i=t).style,e&&(o=(i=n.addHover(t)).style),cs(o),e||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n,i=t.__normalStl={},o=t.style;for(n in e)null!=e[n]&&(i[n]=o[n]);i.fill=o.fill,i.stroke=o.stroke}else t.__normalStl=null}}(i),o.extendFrom(a),Yr(o,a,"fill"),Yr(o,a,"stroke"),hs(o),e||(t.dirty(!1),t.z2+=1)))}function Yr(t,e,n){!Zr(e[n])&&Zr(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=Ur.get(t);return e||(e=De(t,-.1),Xr<1e4&&(Ur.set(t,e),Xr++)),e}(t[n]))}function qr(t){t.__highlighted&&(function(t){var e=t.__highlighted;{var n,i;"layer"===e?t.__zr&&t.__zr.removeHover(t):e&&(n=t.style,(i=t.__normalStl)&&(cs(n),t.setStyle(i),hs(n),--t.z2))}}(t),t.__highlighted=!1)}function Kr(t,e){t.isGroup?t.traverse(function(t){t.isGroup||e(t)}):e(t)}function $r(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(qr(t),jr(t))}function Jr(t){return t&&t.__isEmphasisEntered}function Qr(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||Kr(this,jr)}function ts(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||Kr(this,qr)}function es(){this.__isEmphasisEntered=!0,Kr(this,jr)}function ns(){this.__isEmphasisEntered=!1,Kr(this,qr)}function is(t,e,n){t.isGroup?t.traverse(function(t){t.isGroup||$r(t,t.hoverStyle||e)}):$r(t,t.hoverStyle||e),os(t,n)}function os(t,e){var n,i=!1===e;t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,i&&!t.__hoverStyleTrigger||(t[n=i?"off":"on"]("mouseover",Qr)[n]("mouseout",ts),t[n]("emphasis",es)[n]("normal",ns),t.__hoverStyleTrigger=!i)}function as(t,e,n,i,o,a,r){var s,l=(o=o||Or).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=A(o.defaultText)?o.defaultText(u,o):o.defaultText));var p=c?s:null,f=d?Z(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==p&&null==f||(rs(t,n,a,o),rs(e,i,r,o,!0)),t.text=p,e.text=f}function rs(t,e,n,i,o){return ss(t,e,i,o),n&&k(t,n),t}function ss(t,e,n,i){var o,a;(n=n||Or).isRectText&&("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=Z(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||Or).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]),ls(r[c]={},s,u,n,i))}return t.rich=r,ls(t,e,u,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function ls(t,e,n,i,o,a){n=!o&&n||Or,t.textFill=us(e.getShallow("color"),i)||n.color,t.textStroke=us(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=Z(e.getShallow("textBorderWidth"),n.textBorderWidth),t.insideRawTextPosition=t.textPosition,o||(a&&(t.insideRollbackOpt=i,hs(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=us(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=us(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 us(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function hs(t){var e,n,i,o,a=t.insideRollbackOpt;a&&null==t.textFill&&(e=a.useInsideStyle,n=t.insideRawTextPosition,o=a.autoColor,!1!==e&&(!0===e||a.isRectText&&n&&"string"==typeof n&&0<=n.indexOf("inside"))?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=o&&(i={textFill:null},t.textFill=o),i&&(t.insideRollback=i))}function cs(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ds(t,e){var n=e||e.getModel("textStyle");return q([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 ps(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 fs(t,e,n,i,o){ps(!0,t,e,n,i,o)}function gs(t,e,n,i,o){ps(!1,t,e,n,i,o)}function ms(t,e){for(var n=Ut([]);t&&t!==e;)jt(n,t.getLocalTransform(),n),t=t.parent;return n}function vs(t,e,n){return e&&!E(e)&&(e=ne.getLocalTransform(e)),n&&(e=$t([],e)),wt([],t,e)}function ys(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=vs(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 xs(t,e,i,n){var o,a;function r(t){var e={position:st(t.position),rotation:t.rotation};return t.shape&&(e.shape=k({},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)),fs(t,n,i,t.dataIndex))}))}function _s(t,i){return L(t,function(t){var e=t[0],e=Pr(e,i.x);e=Nr(e,i.x+i.width);var n=t[1],n=Pr(n,i.y);return[e,Nr(n,i.y+i.height)]})}function ws(t,e,n){var i=(e=k({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 Ti(e)):Rr(t.replace("path://",""),e,n,"center")}var bs=(Object.freeze||Object)({extendShape:Er,extendPath:function(t,e){return Ua.extend(sr(t,e))},makePath:Rr,makeImage:zr,mergePath:Vr,resizePath:Gr,subPixelOptimizeLine:Fr,subPixelOptimizeRect:Wr,subPixelOptimize:Hr,setElementHoverStyle:$r,isInEmphasis:Jr,setHoverStyle:is,setAsHoverStyleTrigger:os,setLabelStyle:as,setTextStyle:rs,setText:function(t,e,n){var i,o={isRectText:!0};!1===n?i=!0:o.autoColor=n,ss(t,e,o,i)},getFont:ds,updateProps:fs,initProps:gs,getTransform:ms,applyTransform:vs,transformDirection:ys,groupTransition:xs,clipPointsByRect:_s,clipRectByRect:function(t,e){var n=Pr(t.x,e.x),i=Nr(t.x+t.width,e.x+e.width),o=Pr(t.y,e.y),a=Nr(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:ws,Group:cn,Image:Ti,Text:ur,Circle:cr,Sector:pr,Ring:fr,Polygon:vr,Polyline:yr,Rect:xr,Line:_r,BezierCurve:Mr,Arc:Ir,IncrementalDisplayable:Cr,CompoundPath:Ar,LinearGradient:Tr,RadialGradient:Dr,BoundingRect:hn}),Ss=["textStyle","color"],Ms={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ss):null)},getFont:function(){return ds({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return jn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Is=Po([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),As={getItemStyle:function(t,e){var n=Is(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]}},Ts=b,Ds=vo();function Cs(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Ls(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 ks(t,e){var n=Ds(t).getParent;return n?n.call(t,e):t.parentModel}Cs.prototype={constructor:Cs,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ls(this.option,this.parsePath(t),!e&&ks(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],o=!e&&ks(this,t);return null==i&&o&&(i=o.getShallow(t)),i},getModel:function(t,e){var n;return new Cs(null==t?this.option:Ls(this.option,t=this.parsePath(t)),e=e||(n=ks(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(D(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Ds(this).getParent=t},isAnimationEnabled:function(){if(!v.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Ao(Cs),Do(Cs),Ts(Cs,Oo),Ts(Cs,Ro),Ts(Cs,Ms),Ts(Cs,As);var Ps=0;function Ns(t){return[t||"",Ps++,Math.random().toFixed(5)].join("_")}var Os=1e-4;function Es(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 Rs(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+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zs(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Bs(t){return t.sort(function(t,e){return t-e}),t}function Vs(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 Gs(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 Fs(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 Ws(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=L(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,s=L(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=L(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 Hs=9007199254740991;function Zs(t){var e=2*Math.PI;return(t%e+e)%e}function Us(t){return-Os<t&&t<Os}var Xs=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function js(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Xs.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 Ys(t){return Math.pow(10,qs(t))}function qs(t){return Math.floor(Math.log(t)/Math.LN10)}function Ks(t,e){var n=qs(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 $s(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 Js(t){return 0<=t-parseFloat(t)}var Qs=(Object.freeze||Object)({linearMap:Es,parsePercent:Rs,round:zs,asc:Bs,getPrecision:Vs,getPrecisionSafe:Gs,getPixelPrecision:Fs,getPercentWithPrecision:Ws,MAX_SAFE_INTEGER:Hs,remRadian:Zs,isRadianAroundZero:Us,parseDate:js,quantity:Ys,nice:Ks,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:$s,isNumeric:Js});function tl(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function el(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 nl=j,il=/([&<>"'])/g,ol={"&":"&","<":"<",">":">",'"':""","'":"'"};function al(t){return null==t?"":(t+"").replace(il,function(t,e){return ol[e]})}function rl(t,e){return"{"+t+(null==e?"":e)+"}"}var sl=["a","b","c","d","e","f","g"];function ll(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=sl[a];t=t.replace(rl(r),rl(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(rl(sl[l],s),n?al(u):u)}return t}function ul(n,t,i){return z(t,function(t,e){n=n.replace("{"+e+"}",i?al(t):t)}),n}function hl(t,e){var n=(t=N(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:'+al(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+al(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:n}}:""}function cl(t,e){return"0000".substr(0,e-(t+="").length)+t}function dl(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=js(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",cl(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cl(s,2)).replace("d",s).replace("hh",cl(l,2)).replace("h",l).replace("mm",cl(u,2)).replace("m",u).replace("ss",cl(h,2)).replace("s",h).replace("SSS",cl(c,3))}function pl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var fl=$n,gl=(Object.freeze||Object)({addCommas:tl,toCamelCase:el,normalizeCssArray:nl,encodeHTML:al,formatTpl:ll,formatTplSimple:ul,getTooltipMarker:hl,formatTime:dl,capitalFirst:pl,truncateText:fl,getTextRect:jn}),ml=z,vl=["left","right","top","bottom","width","height"],yl=[["width","left","right"],["height","top","bottom"]];function xl(h,c,d,p,f){var g=0,m=0;null==p&&(p=1/0),null==f&&(f=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=g+n)||t.newline?(g=0,i=n,m+=v+d,s.height):Math.max(v,s.height)):(o=s.height+(u?-u.y+s.y:0),f<(a=m+o)||t.newline?(g+=v+d,m=0,a=o,s.width):Math.max(v,s.width)),t.newline||(r[0]=g,r[1]=m,"horizontal"===h?g=i+d:m=a+d)})}var _l=xl;R(xl,"vertical"),R(xl,"horizontal");function wl(t,e,n){n=nl(n||0);var i=e.width,o=e.height,a=Rs(t.left,i),r=Rs(t.top,o),s=Rs(t.right,i),l=Rs(t.bottom,o),u=Rs(t.width,i),h=Rs(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 f=new hn(a+n[3],r+n[0],u,h);return f.margin=n,f}function bl(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 hn(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(a=t.getLocalTransform(),(r=r.clone()).applyTransform(a))),e=wl(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 Sl(l,u,t){B(t)||(t={});var h=t.ignoreSize;C(h)||(h=[h,h]);var e=i(yl[0],0),n=i(yl[1],1);function i(t,e){var n={},i=0,o={},a=0;if(ml(t,function(t){o[t]=l[t]}),ml(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){ml(t,function(t){e[t]=n[t]})}o(yl[0],l,e),o(yl[1],l,n)}function Ml(t){return Il({},t)}function Il(e,n){return n&&e&&ml(vl,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}var Al,Tl,Dl,Cl=vo(),Ll=Cs.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){Cs.call(this,t,e,n,i),this.uid=Ns("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Ml(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),n&&Sl(t,i,n)},mergeOption:function(t){m(this.option,t,!0);var e=this.layoutMode;e&&Sl(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=Cl(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 kl(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}ko(Ll,{registerWhenExtend:!0}),Tl={},(Al=Ll).registerSubTypeDefaulter=function(t,e){t=Io(t),Tl[t.main]=e},Al.determineSubType=function(t,e){var n,i=e.type;return i||(n=Io(t).main,Al.hasSubTypes(t)&&Tl[n]&&(i=Tl[n](e))),i},Dl=function(t){var e=[];z(Ll.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=L(e,function(t){return Io(t).main}),"dataset"!==t&&M(e,"dataset")<=0&&e.unshift("dataset");return e},Ll.topologicalTravel=function(t,e,n,i){if(t.length){var r,s,l,o=(s={},l=[],z(r=e,function(n){var e,i,o=kl(s,n),t=o.originalDeps=Dl(n),a=(e=r,i=[],z(t,function(t){0<=M(e,t)&&i.push(t)}),i);o.entryCount=a.length,0===o.entryCount&&l.push(n),z(a,function(t){M(o.predecessor,t)<0&&o.predecessor.push(t);var e=kl(s,t);M(e.successor,t)<0&&e.successor.push(n)})}),{graph:s,noEntryList:l}),a=o.graph,u=o.noEntryList,h={};for(z(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]),z(d.successor,p?g:f)}z(h,function(){throw new Error("Circle dependency may exists")})}function f(t){a[t].entryCount--,0===a[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}},b(Ll,{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 Pl="";"undefined"!=typeof navigator&&(Pl=navigator.platform||"");var Nl={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Pl.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},Ol=vo();var El={clearColorPalette:function(){Ol(this).colorIdx=0,Ol(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=Ol(e=e||this),o=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=so(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}}};function Rl(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:tt(),categoryAxisMap:tt()},i=zl[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}var zl={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(T){if(!o)throw new Error('xAxis "'+H(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+H(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),Bl(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),Bl(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis")[0];if(T&&!o)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",o),Bl(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(T){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),Bl(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Bl(r)&&(i.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e){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();z(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),Bl(n)&&null==o.firstCategoryDimIndex&&(r.set(i,n),o.firstCategoryDimIndex=e)})}};function Bl(t){return"category"===t.get("type")}var Vl="original",Gl="arrayRows",Fl="objectRows",Wl="keyedColumns",Hl="unknown",Zl="typedArray",Ul="column",Xl="row";function jl(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Wl?{}:[]),this.sourceFormat=t.sourceFormat||Hl,this.seriesLayoutBy=t.seriesLayoutBy||Ul,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&tt(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}jl.seriesDataToSource=function(t){return new jl({data:t,sourceFormat:G(t)?Zl:Vl,fromDataset:!1})},Do(jl);var Yl=vo();function ql(t){var e,n=t.option,i=n.data,o=G(i)?Zl:Vl,a=!1,r=n.seriesLayoutBy,s=n.sourceHeader,l=n.dimensions,u=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);u&&(i=(e=u.option).source,o=Yl(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:Kl(o)};var a,r,s,l;{var u;e===Gl?("auto"===i||null==i?$l(function(t){null!=t&&"-"!==t&&(N(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],$l(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===Xl?t.length:t[0]?t[0].length:null):e===Fl?o||(o=function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return z(e,function(t,e){i.push(e)}),i}}(t),s=!0):e===Wl?o||(o=[],s=!0,z(t,function(t,e){o.push(e)})):e===Vl?(u=ho(t[0]),a=C(u)&&u.length||1):e===Zl&&T&&Y(!!o,"dimensions must be given if data is TypedArray.")}s&&z(o,function(t,e){"name"===(B(t)?t.name:t)&&(l=e)});return{startIndex:r,dimensionsDefine:Kl(o),dimensionsDetectCount:a,potentialNameDimIndex:l}}(i,o,r,s,l),c=n.encode;!c&&u&&(c=function(t,e,n,i,o,a){var r,s=Rl(t),l={},u=[],h=[],c=t.subType,d=tt(["pie","map","funnel"]),p=tt(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(s&&null!=p.get(c)){var f=t.ecModel,g=Yl(f).datasetMap,m=e.uid+"_"+o,v=g.get(m)||g.set(m,{categoryWayDim:1,valueWayDim:0});z(s.coordSysDims,function(t){var e;null==s.firstCategoryDimIndex?(e=v.valueWayDim++,l[t]=e,h.push(e)):s.categoryAxisMap.get(t)?(l[t]=0,u.push(0)):(e=v.categoryWayDim++,l[t]=e,h.push(e))})}else if(null!=d.get(c)){for(var y,x=0;x<5&&null==r;x++)Jl(n,i,o,a.dimensionsDefine,a.startIndex,x)||(r=x);null!=r&&(l.value=r,y=a.potentialNameDimIndex||Math.max(r-1,0),h.push(y),u.push(y))}return u.length&&(l.itemName=u),h.length&&(l.seriesName=h),l}(t,u,i,o,r,h)),Yl(t).source=new jl({data:i,fromDataset:a,seriesLayoutBy:r,sourceFormat:o,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function Kl(t){if(t){var i=tt();return L(t,function(t,e){if(null==(t=k({},B(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 $l(t,e,n,i){if(null==i&&(i=1/0),e===Xl)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 Jl(t,e,n,i,o,a){var r,s;if(G(t))return!1;if(i&&(s=B(s=i[a])?s.name:s),e===Gl)if(n===Xl){for(var l=t[a],u=0;u<(l||[]).length&&u<5;u++)if(null!=(r=p(l[o+u])))return r}else for(u=0;u<t.length&&u<5;u++){var h=t[o+u];if(h&&null!=(r=p(h[a])))return r}else if(e===Fl){if(!s)return;for(u=0;u<t.length&&u<5;u++){if((c=t[u])&&null!=(r=p(c[s])))return r}}else if(e===Wl){if(!s)return;if(!(l=t[s])||G(l))return!1;for(u=0;u<l.length&&u<5;u++)if(null!=(r=p(l[u])))return r}else if(e===Vl)for(u=0;u<t.length&&u<5;u++){var c,d=ho(c=t[u]);if(!C(d))return!1;if(null!=(r=p(d[a])))return r}function p(t){return(null==t||!isFinite(t)||""===t)&&(!(!N(t)||"-"===t)||void 0)}return!1}var Ql="\0_ec_inner",tu=Cs.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new Cs(n),this._optionManager=i},setOption:function(t,e){Y(!(Ql 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[Ql]=1,this._componentsMap=tt({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(n,t){var i=n.color&&!n.colorLayer;z(t,function(t,e){"colorLayer"===e&&i||Ll.hasClass(e)||("object"===_typeof(t)?n[e]=n[e]?m(n[e],t,!1):D(t):null==n[e]&&(n[e]=t))})}(t,this._theme.option),m(t,Nl,!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&&z(i,function(t){this.mergeOption(t,o=!0)},this),o},mergeOption:function(i){var l=this.option,u=this._componentsMap,n=[];Yl(this).datasetMap=tt(),z(i,function(t,e){null!=t&&(Ll.hasClass(e)?e&&n.push(e):l[e]=null==l[e]?D(t):m(l[e],t,!0))}),Ll.topologicalTravel(n,Ll.getAllClassMainTypes(),function(r,t){var e=so(i[r]),n=co(u.get(r),e);po(n),z(n,function(t,e){var n,i,o,a=t.option;B(a)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(n=r,i=a,o=t.exist,i.type?i.type:o?o.subType:Ll.determineSubType(n,i)))});var s=function(e,t){C(t)||(t=t?[t]:[]);var n={};return z(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(u,t);l[r]=[],u.set(r,[]),z(n,function(t,e){var n,i,o=t.exist,a=t.option;Y(B(a)||o,"Empty component definition"),a?(n=Ll.getClass(r,t.keyInfo.subType,!0),o&&o instanceof n?(o.name=t.keyInfo.name,o.mergeOption(a,this),o.optionUpdated(a,!1)):(i=k({dependentModels:s,componentIndex:e},t.keyInfo),k(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&&eu(this,u.get("series"))},this),this._seriesIndicesMap=tt(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=D(this.option);return z(i,function(t,e){if(Ll.hasClass(e)){for(var n=(t=so(t)).length-1;0<=n;n--)go(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Ql],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?nu(null!=o?(C(o)||(o=[o]),I(L(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=nu(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){z(t,function(t,e){i.call(o,n,t,e)})})):N(t)?z(e.get(t),i,o):B(t)&&z(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){iu(this),z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){z(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){iu(this),z(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 z(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return iu(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){iu(this);var n=I(this._componentsMap.get("series"),t,e);eu(this,n)},restoreData:function(n){var i=this._componentsMap;eu(this,i.get("series"));var o=[];i.each(function(t,e){o.push(e)}),Ll.topologicalTravel(o,Ll.getAllClassMainTypes(),function(e,t){z(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 eu(t,e){t._seriesIndicesMap=tt(t._seriesIndices=L(e,function(t){return t.componentIndex})||[])}function nu(t,e){return e.hasOwnProperty("subType")?I(t,function(t){return t.subType===e.subType}):t}function iu(t){if(T&&!t._seriesIndices)throw new Error("Option should contains series.")}b(tu,El);var ou=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function au(e){z(ou,function(t){this[t]=P(e[t],e)},this)}var ru={};function su(){this._coordinateSystems=[]}su.prototype={constructor:su,create:function(i,o){var a=[];z(ru,function(t,e){var n=t.create(i,o);a=a.concat(n||[])}),this._coordinateSystems=a},update:function(e,n){z(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},su.register=function(t,e){ru[t]=e},su.get=function(t){return ru[t]};var lu=z,uu=D,hu=L,cu=m,du=/^(min|max)?(.+)$/;function pu(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}pu.prototype={constructor:pu,setOption:function(t,e){t&&z(so(t.series),function(t){t&&t.data&&G(t.data)&&$(t.data)}),t=uu(t,!0);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,lu(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)}))}o=o||t;o.timeline||(o.timeline=s);return lu([o].concat(a).concat(L(r,function(t){return t.option})),function(e){lu(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,lu(n=n||{},function(t,e){var n,i;null!=t&&(n=o[e],Ll.hasClass(e)?(t=so(t),i=co(n=so(n),t),o[e]=hu(i,function(t){return t.option&&t.exist?cu(t.exist,t.option,!0):t.exist||t.option})):o[e]=cu(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=hu(e.timelineOptions,uu),this._mediaList=hu(e.mediaList,uu),this._mediaDefault=uu(e.mediaDefault),this._currentMediaIndices=[],uu(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n,i=this._timelineOptions;return!i.length||(n=t.getComponent("timeline"))&&(e=uu(i[n.getCurrentIndex()],!0)),e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,o=[],a=[];if(!n.length&&!i)return a;for(var r,s,l=0,u=n.length;l<u;l++)!function(t,e,n){var l={width:e,height:n,aspectratio:e/n},u=!0;return z(t,function(t,e){var n,i,o,a,r,s=e.match(du);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}(n[l].query,t,e)||o.push(l);return!o.length&&i&&(o=[-1]),o.length&&(r=o,s=this._currentMediaIndices,r.join(",")!==s.join(","))&&(a=hu(o,function(t){return uu(-1===t?i.option:n[t].option)})),this._currentMediaIndices=o,a}};var fu=z,gu=B,mu=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function vu(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=mu.length;n<i;n++){var o=mu[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 yu(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 xu(t){yu(t,"itemStyle"),yu(t,"lineStyle"),yu(t,"areaStyle"),yu(t,"label"),yu(t,"labelLine"),yu(t,"upperLabel"),yu(t,"edgeLabel")}function _u(t,e){var n=gu(t)&&t[e],i=gu(n)&&n.textStyle;if(i)for(var o=0,a=uo.length;o<a;o++){e=uo[o];i.hasOwnProperty(e)&&(n[e]=i[e])}}function wu(t){t&&(xu(t),_u(t,"label"),t.emphasis&&_u(t.emphasis,"label"))}function bu(t){return C(t)?t:t?[t]:[]}function Su(t){return(C(t)?t[0]:t)||{}}function Mu(e,t){fu(bu(e.series),function(t){gu(t)&&function(t){if(gu(t)){vu(t),xu(t),_u(t,"label"),_u(t,"upperLabel"),_u(t,"edgeLabel"),t.emphasis&&(_u(t.emphasis,"label"),_u(t.emphasis,"upperLabel"),_u(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(vu(e),wu(e));var n=t.markLine;n&&(vu(n),wu(n));var i=t.markArea;i&&wu(i);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!G(a))for(var r=0;r<a.length;r++)wu(a[r]);z(t.categories,function(t){xu(t)})}if(o&&!G(o))for(r=0;r<o.length;r++)wu(o[r]);if((e=t.markPoint)&&e.data)for(var s=e.data,r=0;r<s.length;r++)wu(s[r]);if((n=t.markLine)&&n.data)for(var l=n.data,r=0;r<l.length;r++)C(l[r])?(wu(l[r][0]),wu(l[r][1])):wu(l[r]);"gauge"===t.type?(_u(t,"axisLabel"),_u(t,"title"),_u(t,"detail")):"treemap"===t.type?(yu(t.breadcrumb,"itemStyle"),z(t.levels,function(t){xu(t)})):"tree"===t.type&&xu(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),fu(n,function(t){fu(bu(e[t]),function(t){t&&(_u(t,"axisLabel"),_u(t.axisPointer,"label"))})}),fu(bu(e.parallel),function(t){var e=t&&t.parallelAxisDefault;_u(e,"axisLabel"),_u(e&&e.axisPointer,"label")}),fu(bu(e.calendar),function(t){yu(t,"itemStyle"),_u(t,"dayLabel"),_u(t,"monthLabel"),_u(t,"yearLabel")}),fu(bu(e.radar),function(t){_u(t,"name")}),fu(bu(e.geo),function(t){gu(t)&&(wu(t),fu(bu(t.regions),function(t){wu(t)}))}),fu(bu(e.timeline),function(t){wu(t),yu(t,"label"),yu(t,"itemStyle"),yu(t,"controlStyle",!0);var e=t.data;C(e)&&z(e,function(t){B(t)&&(yu(t,"label"),yu(t,"itemStyle"))})}),fu(bu(e.toolbox),function(t){yu(t,"iconStyle"),fu(t.feature,function(t){yu(t,"iconStyle")})}),_u(Su(e.axisPointer),"label"),_u(Su(e.tooltip).axisPointer,"label")}function Iu(e){z(Au,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Au=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Tu=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Du=function(n,t){Mu(n,t),n.series=so(n.series),z(n.series,function(t){var e,n;B(t)&&("pie"!==(e=t.type)&&"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.normal.color",n),Iu(t))}),n.dataRange&&(n.visualMap=n.dataRange),z(Tu,function(t){var e=n[t];e&&(C(e)||(e=[e]),z(e,function(t){Iu(t)}))})};function Cu(m){z(m,function(h,c){var d=[],p=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],f=h.data,g=h.isStackedByIndex,e=f.map(t,function(t,e,n){var i,o,a=f.get(h.stackedDimension,n);if(isNaN(a))return p;g?o=f.getRawIndex(n):i=f.get(h.stackedByDimension,n);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(g||(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});f.hostModel.setData(e),h.data=e})}function Lu(t,e){jl.isInstance(t)||(t=jl.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;if(i===Zl){if(T&&null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=n}var o=Pu[i===Gl?i+"_"+t.seriesLayoutBy:i];T&&Y(o,"Invalide sourceFormat: "+i),k(this,o)}var ku=Lu.prototype;ku.pure=!1;var Pu={arrayRows_column:{pure:ku.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:Eu},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:Nu,getItem:Ou,appendData:Eu},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;z(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:Nu,getItem:Ou,appendData:Eu},typedArray:{persistent:!(ku.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){T&&Y(G(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 Nu(){return this._data.length}function Ou(t){return this._data[t]}function Eu(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Ru={arrayRows:zu,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:zu,original:function(t,e,n){var i=ho(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:zu};function zu(t,e,n,i){return null!=n?t[n]:t}var Bu={arrayRows:Vu,objectRows:function(t,e){return Gu(t[e],this._dimensionInfos[e])},keyedColumns:Vu,original:function(t,e,n,i){var o,a=t&&(null==t.value?t:t.value);return this._rawData.pure||(!oo(o=t)||o instanceof Array)||(this.hasItemOption=!0),Gu(a instanceof Array?a[i]:a,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}};function Vu(t,e,n,i){return Gu(t[i],this._dimensionInfos[e])}function Gu(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+js(t)),null==t||""===t?NaN:+t;var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}function Fu(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),Ru[r](i,e,a,o)}}}function Wu(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===Vl||i===Fl){var o=t.getRawDataItem(e);return i!==Vl||B(o)||(o=null),o?o[n]:void 0}}}var Hu=/\{@(.+?)\}/g,Zu={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=this.ecModel.getComponent("tooltip"),u=bo(l&&l.get("renderMode")),h=this.mainType,c="series"===h;return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:i,color:s,marker:hl({color:s,renderMode:u}),$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,l(s)):"string"==typeof l?ll(l,s).replace(Hu,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Fu(a,i,e)}):void 0},getRawValue:function(t,e){return Fu(this.getData(e),t)},formatTooltip:function(){}};function Uu(t){return new Xu(t)}function Xu(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 ju=Xu.prototype;ju.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?(T&&Y(null!=i._outputDueEnd),this._dueEnd=i._outputDueEnd):(T&&Y(!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 f=this._progress;if(C(f))for(var g=0;g<f.length;g++)ih(this,f[g],d,p,l,u);else ih(this,f,d,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;T&&Y(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Yu,qu,Ku,$u,Ju,Qu,th=Qu={reset:function(t,e,n,i){qu=t,Yu=e,Ku=n,$u=i,Ju=Math.ceil($u/Ku),Qu.next=1<Ku&&0<$u?nh:eh}};function eh(){return qu<Yu?qu++:null}function nh(){var t=qu%Ju*Ku+Math.ceil(qu/Ju),e=Yu<=qu?null:t<$u?t:qu;return qu++,e}function ih(t,e,n,i,o,a){th.reset(n,i,o,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:th.next},t.context)}ju.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},ju.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},ju.pipe=function(t){T&&Y(t&&!t._disposed&&t!==this),this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},ju.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},ju.getUpstream=function(){return this._upstream},ju.getDownstream=function(){return this._downstream},ju.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var oh=vo(),ah=Ll.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Uu({count:sh,reset:lh}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),ql(this);var i=this.getInitialData(t,n);hh(i,this),this.dataTask.context.data=i,T&&Y(i,"getInitialData returned invalid data."),oh(this).dataBeforeProcessed=i,rh(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Ml(t):{},o=this.subType;Ll.hasClass(o),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),lo(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Sl(t,i,n)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&Sl(this.option,t,n),ql(this);var i=this.getInitialData(t,e);hh(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,oh(this).dataBeforeProcessed=i,rh(this)},fillDataTextStyle:function(t){if(t&&!G(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&lo(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=dh(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return oh(this).data},setData:function(t){var e,n=dh(this);n&&((e=n.context).data!==t&&n.modifyOutputEnd&&n.setOutputEnd(t.count()),e.outputData=t,n!==this.dataTask&&(e.data=t)),oh(this).data=t},getSource:function(){return Yl(this).source},getRawData:function(){return oh(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,f={},g=0;function n(t){return{renderMode:c,content:al(tl(t)),style:f}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),i=a.length,r=this.getRawValue(o),s=C(r),v=m.getItemVisual(o,"color");B(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"+g,a="string"==typeof(o=hl({color:v,type:"subItem",renderMode:c,markerId:i}))?o:o.content,(r=(l?a+al(s.displayName||"-")+": ":"")+al("ordinal"===n?t+"":"time"===n?h?"":dl("yyyy/MM/dd hh:mm:ss",t):tl(t)))&&u.push(r),p&&(f[i]=v,++g))}a.length?z(a,function(t){e(Fu(m,o,t),t)}):z(t,e);var n=l?p?"\n":"<br/>":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:f}}(r):n(i?Fu(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hl({color:v,type:"item",renderMode:c,markerId:u});f[u]=v,++g;var x=m.getName(o),_=this.name;fo(this)||(_=""),_=_?al(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?al(x)+": "+l:l),markers:f}},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 El.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 rh(t){var n,e,i,o=t.name;fo(t)||(t.name=(n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[],z(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")||o))}function sh(t){return t.model.getRawData().count()}function lh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),uh}function uh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function hh(e,n){z(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,R(ch,n))})}function ch(t){var e=dh(t);e&&e.setOutputEnd(this.count())}function dh(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(ah,Zu),b(ah,El);var ph=function(){this.group=new cn,this.uid=Ns("viewComponent")};ph.prototype={constructor:ph,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var fh=ph.prototype;fh.updateView=fh.updateLayout=fh.updateVisual=function(t,e,n,i){},Ao(ph),ko(ph,{registerWhenExtend:!0});function gh(){var s=vo();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,o=e.progressiveRender,a=e.large=n.large,r=e.progressiveRender=n.progressiveRender;return!!(i^a||o^r)&&"reset"}}var mh=vo(),vh=gh();function yh(){this.group=new cn,this.uid=Ns("viewChart"),this.renderTask=Uu({plan:bh,reset:Sh}),this.renderTask.context={view:this}}var xh=yh.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){wh(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){wh(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function _h(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)_h(t.childAt(n),e)}function wh(e,t,n){var i=mo(e,t);null!=i?z(so(i),function(t){_h(e.getItemGraphicEl(t),n)}):e.eachItemGraphicEl(function(t){_h(t,n)})}function bh(t){return vh(t.model)}function Sh(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&mh(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,n,i,o),Mh[l]}xh.updateView=xh.updateLayout=xh.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ao(yh,["dispose"]),ko(yh,{registerWhenExtend:!0}),yh.markUpdateMethod=function(t,e){mh(t).updateMethod=e};var Mh={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)}}},Ih="\0__throttleOriginMethod",Ah="\0__throttleRate",Th="\0__throttleType";function Dh(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 Ch(t,e,n,i){var o=t[e];if(o){var a=o[Ih]||o,r=o[Th];if(o[Ah]!==n||r!==i){if(null==n||!i)return t[e]=a;(o=t[e]=Dh(a,n,"debounce"===i))[Ih]=a,o[Th]=i,o[Ah]=n}return o}}function Lh(t,e){var n=t[e];n&&n[Ih]&&(t[e]=n[Ih])}var kh={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(i)||e.getColorFromPalette(e.name,null,t.getSeriesCount());if(n.setVisual("color",o),!t.isSeriesFiltered(e)){"function"!=typeof o||o instanceof Sr||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))});return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}}},Ph={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:""}}}},Nh=function(t,e){var c,d,n,p,i,o,f,a=e.getModel("aria");function g(t,e){if("string"!=typeof t)return t;var n=t;return z(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=Ph.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}())?g(m("general.withTitle"),{title:i}):m("general.withoutTitle"),f=[],o+=g(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=g(o,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(h=t.subType,Ph.series.typeNames[h]||"自定义图")});var a=t.getData();(window.data=a).count()>d?o+=g(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=Fu(a,u),l.push(g(m(r?"data.withName":"data.withoutName"),{name:r,value:s})))}o+=l.join(m("data.separator.middle"))+m("data.separator.end"),f.push(o)}var h}),o+=f.join(m("series.multiple.separator.middle"))+m("series.multiple.separator.end"),t.setAttribute("aria-label",o))))},Oh=Math.PI;function Eh(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=tt()}var Rh=Eh.prototype;function zh(l,t,u,h,c){var d;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}c=c||{},z(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(),Bh(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),Bh(t,h),d|=t.perform(n)}))}),l.unfinished|=d}Rh.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Rh.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}}},Rh.getPipeline=function(t){return this._pipelineMap.get(t)},Rh.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}},Rh.restorePipelines=function(t){var i=this,o=i._pipelineMap=tt();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}),Yh(i,t,t.dataTask)})},Rh.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),o=this.api;z(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=tt()),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,Uu({plan:Hh,reset:Zh,count:jh}));n.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:i},Yh(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||Uu({reset:Vh});a.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:i};var r=a.agentStubMap=a.agentStubMap||tt(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,o).each(c):(u=!1,z(n.getSeries(),c));function c(t){var e=t.uid,n=r.get(e);n||(n=r.set(e,Uu({reset:Gh,onDirty:Wh})),a.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,Yh(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)},Rh.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,Yh(this,e,o)},Rh.performDataProcessorTasks=function(t,e){zh(this,this._dataProcessorHandlers,t,e,{block:!0})},Rh.performVisualTasks=function(t,e,n){zh(this,this._visualHandlers,t,e,n)},Rh.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Rh.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 Bh=Rh.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Vh(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gh(t,e){return t.overallProgress&&Fh}function Fh(){this.agent.dirty(),this.getDownstream().dirty()}function Wh(){this.agent&&this.agent.dirty()}function Hh(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zh(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=so(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?L(e,function(t,e){return Xh(e)}):Uh}var Uh=Xh(0);function Xh(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 jh(t){return t.data.count()}function Yh(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}Eh.wrapStageHandler=function(t,e){return A(t)&&(t={overallReset:t,seriesType:function(t){qh=null;try{t(Kh,$h)}catch(t){}return qh}(t)}),t.uid=Ns("stageHandler"),e&&(t.visualType=e),t};var qh,Kh={},$h={};function Jh(t,e){for(var n in e.prototype)t[n]=nt}Jh(Kh,tu),Jh($h,au),Kh.eachSeriesByType=Kh.eachRawSeriesByType=function(t){qh=t},Kh.eachComponent=function(t){"series"===t.mainType&&t.subType&&(qh=t.subType)};function Qh(){return{axisLine:{lineStyle:{color:nc}},axisTick:{lineStyle:{color:nc}},axisLabel:{textStyle:{color:nc}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:nc}}}}var tc=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],ec={color:tc,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],tc]},nc="#eee",ic=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],oc={color:ic,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:nc},crossStyle:{color:nc}}},legend:{textStyle:{color:nc}},textStyle:{color:nc},title:{textStyle:{color:nc}},toolbox:{iconStyle:{normal:{borderColor:nc}}},dataZoom:{textStyle:{color:nc}},visualMap:{textStyle:{color:nc}},timeline:{lineStyle:{color:nc},itemStyle:{normal:{color:ic[1]}},label:{normal:{textStyle:{color:nc}}},controlStyle:{normal:{color:nc,borderColor:nc}}},timeAxis:Qh(),logAxis:Qh(),valueAxis:Qh(),categoryAxis:Qh(),line:{symbol:"circle"},graph:{color:ic},gauge:{title:{textStyle:{color:nc}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};oc.categoryAxis.splitLine.show=!1,Ll.extend({type:"dataset",defaultOption:{seriesLayoutBy:Ul,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,n=Hl;if(G(e))n=Zl;else if(C(e)){0===e.length&&(n=Gl);for(var i=0,o=e.length;i<o;i++){var a=e[i];if(null!=a){if(C(a)){n=Gl;break}if(B(a)){n=Fl;break}}}}else if(B(e)){for(var r in e)if(e.hasOwnProperty(r)&&E(e[r])){n=Wl;break}}else if(null!=e)throw new Error("Invalid data");Yl(t).sourceFormat=n}(this)}}),ph.extend({type:"dataset"});var ac=Ua.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()}}),rc=/[\s,]+/;function sc(t){for(N(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 lc(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}lc.prototype.parse=function(t,e){e=e||{};var n=sc(t);if(!n)throw new Error("Illegal svg");var i=new cn;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),fc(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=q(o).split(rc)).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=xc(s,a,r),e.ignoreViewBox||(u=i,(i=new cn).add(u),u.scale=h.scale.slice(),u.position=h.position.slice())),e.ignoreRootClip||null==a||null==r||i.setClipPath(new xr({shape:{x:0,y:0,width:a,height:r}})),{root:i,width:a,height:r,viewBoxRect:s,viewBoxTransform:h}},lc.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=hc[r])&&(i=a.call(this,t),(o=t.getAttribute("id"))&&(this._defs[o]=i)):(a=uc[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)},lc.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 ur({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});cc(e,o),fc(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 uc={g:function(t,e){var n=new cn;return cc(e,n),fc(t,n,this._defs),n},rect:function(t,e){var n=new xr;return cc(e,n),fc(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 cr;return cc(e,n),fc(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 _r;return cc(e,n),fc(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 ac;return cc(e,n),fc(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"))&&dc(n),i=new vr({shape:{points:n||[]}});return cc(e,i),fc(t,i,this._defs),i},polyline:function(t,e){var n=new Ua;cc(e,n),fc(t,n,this._defs);var i=(i=t.getAttribute("points"))&&dc(i),o=new yr({shape:{points:i||[]}});return o},image:function(t,e){var n=new Ti;return cc(e,n),fc(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 cn;return cc(e,r),fc(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 cn;return cc(e,r),fc(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var n=lr(t.getAttribute("d")||"");return cc(e,n),fc(t,n,this._defs),n}},hc={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 Tr(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(){}};function cc(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),O(e.__inheritedStyle,t.__inheritedStyle))}function dc(t){for(var e=q(t).split(rc),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 pc={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 fc(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(vc,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||Zt(),s){case"translate":r=q(r).split(rc),Yt(i,i,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=q(r).split(rc),Kt(i,i,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=q(r).split(rc),qt(i,i,parseFloat(r[0]));break;case"skew":r=q(r).split(rc),console.warn("Skew transform is not supported yet");break;case"matrix":r=q(r).split(rc);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),k(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,o,a={};yc.lastIndex=0;for(;null!=(i=yc.exec(e));)a[i[1]]=i[2];for(o in pc)pc.hasOwnProperty(o)&&null!=a[o]&&(n[pc[o]]=a[o]);return n}(t)),!i))for(var s in pc){!pc.hasOwnProperty(s)||null!=(o=t.getAttribute(s))&&(a[pc[s]]=o)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";e.style=e.style||new In;var h=e.style;null!=a.fill&&h.set(l,mc(a.fill,n)),null!=a.stroke&&h.set(u,mc(a.stroke,n)),z(["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"),z(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&h.set(t,a[t])}),a.lineDash&&(e.style.lineDash=q(a.lineDash).split(rc)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=a}var gc=/url\(\s*#(.*?)\)/;function mc(t,e){var n=e&&t&&t.match(gc);return n?e[q(n[1])]:t}var vc=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var yc=/([^\s:;]+)\s*:\s*([^:;]+)/g;function xc(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 _c=tt(),wc={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 z(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var n=bc[e];T&&Y(n,"Illegal map type: "+e),n(t)}),_c.set(t,i)},retrieveMap:function(t){return _c.get(t)}},bc={geoJSON:function(t){var e=t.source;t.geoJSON=N(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=sc(t.source)}},Sc=Y,Mc=z,Ic=A,Ac=B,Tc=Ll.parseClassType,Dc={zrender:"4.0.5"},Cc={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},Lc="__flagInMainProcess",kc="__optionUpdated",Pc=/^[a-zA-Z0-9_]+$/;function Nc(i){return function(t,e,n){t=t&&t.toLowerCase(),Dt.prototype[i].call(this,t,e,n)}}function Oc(){Dt.call(this)}function Ec(t,e,n){n=n||{},"string"==typeof e&&(e=ad[e]),this.id,this.group,this._dom=t;var i="canvas";T&&(i=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||i);var o=this._zr=Qi(t,{renderer:n.renderer||i,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Dh(P(o.flush,o),17),(e=D(e))&&Du(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new su;var a,r,s,l,u=this._api=(r=(a=this)._coordSysMgr,k(new au(a),{getCoordinateSystems:P(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}xn(od,h),xn(ed,h),this._scheduler=new Eh(this,u,ed,od),Dt.call(this,this._ecEventProcessor=new Jc),this._messageCenter=new Oc,this._initEvents(),this.resize=P(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[kc]||l._scheduler.unfinished||l._pendingActions.length||l.trigger("finished")}),$(this)}Oc.prototype.on=Nc("on"),Oc.prototype.off=Nc("off"),Oc.prototype.one=Nc("one"),b(Oc,Dt);var Rc=Ec.prototype;function zc(t,e,n){var i,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=xo(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}T&&console.warn("No coordinate system that supports "+t+" found by the given finder.")}Rc._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[kc]){var e=this[kc].silent;this[Lc]=!0,Vc(this),Bc.update.call(this),this[Lc]=!1,this[kc]=!1,Hc.call(this,e),Zc.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),Fc(this,i),t.performVisualTasks(i),Yc(this,this._model,0,"remain"),n-=new Date-a}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},Rc.getDom=function(){return this._dom},Rc.getZr=function(){return this._zr},Rc.setOption=function(t,e,n){var i,o,a,r;T&&Sc(!this[Lc],"`setOption` should not be called during main process."),Ac(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[Lc]=!0,this._model&&!e||(o=new pu(this._api),a=this._theme,(r=this._model=new tu(null,null,a,o)).scheduler=this._scheduler,r.init(null,null,a,o)),this._model.setOption(t,nd),n?(this[kc]={silent:i},this[Lc]=!1):(Vc(this),Bc.update.call(this),this._zr.flush(),this[kc]=!1,this[Lc]=!1,Hc.call(this,i),Zc.call(this,i))},Rc.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Rc.getModel=function(){return this._model},Rc.getOption=function(){return this._model&&this._model.getOption()},Rc.getWidth=function(){return this._zr.getWidth()},Rc.getHeight=function(){return this._zr.getHeight()},Rc.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Rc.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)},Rc.getSvgDataUrl=function(){if(v.svgSupported){var t=this._zr;return z(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},Rc.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;Mc(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 Mc(i,function(t){t.group.ignore=!1}),a},Rc.getConnectedDataURL=function(o){if(v.canvasSupported){var a=this.group,r=Math.min,s=Math.max;if(ld[a]){var l=1/0,u=1/0,h=-1/0,c=-1/0,d=[],n=o&&o.pixelRatio||1;z(sd,function(t,e){var n,i;t.group===a&&(n=t.getRenderedCanvas(D(o)),i=t.getDom().getBoundingClientRect(),l=r(i.left,l),u=r(i.top,u),h=s(i.right,h),c=s(i.bottom,c),d.push({dom:n,left:i.left,top:i.top}))});var t=(h*=n)-(l*=n),e=(c*=n)-(u*=n),i=y();i.width=t,i.height=e;var p=Qi(i);return Mc(d,function(t){var e=new Ti({style:{x:t.left*n-l,y:t.top*n-u,image:t.dom}});p.add(e)}),p.refreshImmediately(),i.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},Rc.convertToPixel=R(zc,"convertToPixel"),Rc.convertFromPixel=R(zc,"convertFromPixel"),Rc.containPixel=function(t,o){var a;return z(t=xo(this._model,t),function(t,i){0<=i.indexOf("Models")&&z(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):T&&console.warn(i+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):T&&console.warn(i+": containPoint is not supported")},this)},this),!!a},Rc.getVisual=function(t,e){var n=(t=xo(this._model,t,{defaultMainType:"series"})).seriesModel;T&&(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)},Rc.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Rc.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Bc={prepareAndUpdate:function(t){Vc(this),Bc.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),Fc(this,i),r.update(i,o),Xc(i),s.performVisualTasks(i,t),jc(this,i,o,t),n=i.get("backgroundColor")||"transparent",v.canvasSupported?a.setBackgroundColor(n):(n=Oe(e=Ae(n),"rgb"),0===e[3]&&(n="transparent")),qc(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=tt(),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)}),Xc(r),this._scheduler.performVisualTasks(r,o,{setDirty:!0,dirtyMap:i}),Yc(s,r,0,o,i),qc(r,this._api))},updateView:function(t){var e=this._model;e&&(yh.markUpdateMethod(t,"updateView"),Xc(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),jc(this,this._model,this._api,t),qc(e,this._api))},updateVisual:function(t){Bc.update.call(this,t)},updateLayout:function(t){Bc.update.call(this,t)}};function Vc(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Uc(t,"component",e,n),Uc(t,"chart",e,n),n.plan()}function Gc(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=tt(so(s))),l&&l.eachComponent(r,function(t){s&&null!=s.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)):Mc(e._componentsViews.concat(e._chartsViews),u)}function Fc(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Wc(e,t){var n=e.type,i=e.escapeConnect,o=Qc[n],a=o.actionInfo,r=(s=(a.update||"update").split(":")).pop(),s=null!=s[0]&&Tc(s[0]);this[Lc]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=L(e.batch,function(t){return(t=O(k({},t),e)).batch=null,t}));var h,c=[],d="highlight"===n||"downplay"===n;Mc(l,function(t){(h=(h=o.action(t,this._model,this._api))||k({},t)).type=a.event||h.type,c.push(h),d?Gc(this,r,t,"series"):s&&Gc(this,r,t,s.main,s.sub)},this),"none"===r||d||s||(this[kc]?(Vc(this),Bc.update.call(this,e),this[kc]=!1):Bc[r].call(this,e)),h=u?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[Lc]=!1,t||this._messageCenter.trigger(h.type,h)}function Hc(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Wc.call(this,n,t)}}function Zc(t){t||this.trigger("updated")}function Uc(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=Tc(t.type),n=s?ph.getClass(e.main,e.sub):yh.getClass(e.sub),T&&Sc(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 Xc(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function jc(t,e,n,i){var o,a,r,s,l;o=t,a=e,r=n,s=i,Mc(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),$c(e,t)}),Mc(t._chartsViews,function(t){t.__alive=!1}),Yc(t,e,0,i),Mc(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Yc(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"),$c(t,e),function(t,e){var n=t.get("blendMode")||null;T&&!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,n=i._zr,s=t,l=n.storage,u=0,l.traverse(function(t){t.isGroup||u++}),u>s.get("hoverLayerThreshold")&&!v.node&&l.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),Nh(i._zr.dom,t)}function qc(e,n){Mc(id,function(t){t(e,n)})}Rc.resize=function(t){T&&Sc(!this[Lc],"`resize` should not be called during main process."),this._zr.resize(t);var e,n,i=this._model;this._loadingFX&&this._loadingFX.resize(),i&&(e=i.resetOption("media"),n=t&&t.silent,this[Lc]=!0,e&&Vc(this),Bc.update.call(this),this[Lc]=!1,Hc.call(this,n),Zc.call(this,n))},Rc.showLoading=function(t,e){var n,i;Ac(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),rd[t]?(n=rd[t](this._api,e),i=this._zr,this._loadingFX=n,i.add(n)):T&&console.warn("Loading effects "+t+" not exists.")},Rc.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Rc.makeActionFromEvent=function(t){var e=k({},t);return e.type=td[t.type],e},Rc.dispatchAction=function(t,e){Ac(e)||(e={silent:!!e}),Qc[t.type]&&this._model&&(this[Lc]?this._pendingActions.push(t):(Wc.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Hc.call(this,e.silent),Zc.call(this,e.silent)))},Rc.appendData=function(t){var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);T&&Sc(t.data&&n),n.appendData(t),this._scheduler.unfinished=!0},Rc.on=Nc("on"),Rc.off=Nc("off"),Rc.one=Nc("one");var Kc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function $c(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 Jc(){this.eventInfo}Rc._initEvents=function(){Mc(Kc,function(h){this._zr.on(h,function(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=k({},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],T&&(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))},this)},this),Mc(td,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Rc.isDisposed=function(){return this._disposed},Rc.clear=function(){this.setOption({series:[]},!0)},Rc.dispose=function(){var e,n;this._disposed?T&&console.warn("Instance "+this.id+" has been disposed"):(this._disposed=!0,wo(this.getDom(),cd,""),e=this._api,n=this._model,Mc(this._componentsViews,function(t){t.dispose(n,e)}),Mc(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete sd[this.id])},b(Ec,Dt),Jc.prototype={constructor:Jc,normalizeQuery:function(t){var e,s,l,u={},h={},c={};return N(t)?(e=Tc(t),u.mainType=e.main||null,u.subType=e.sub||null):(s=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1},z(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){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,a=n.model,r=n.view;if(!a||!r)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,a,"mainType")&&u(s,a,"subType")&&u(s,a,"index","componentIndex")&&u(s,a,"name")&&u(s,a,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!r.filterForExposedEvent||r.filterForExposedEvent(t,e.otherQuery,i,o));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var Qc={},td={},ed=[],nd=[],id=[],od=[],ad={},rd={},sd={},ld={},ud=+new Date,hd=+new Date,cd="_echarts_instance_";function dd(t){ld[t]=!1}var pd=dd;function fd(t){return sd[n=cd,(e=t).getAttribute?e.getAttribute(n):e[n]];var e,n}function gd(t,e){ad[t]=e}function md(t){nd.push(t)}function vd(t,e){bd(ed,t,e,1e3)}function yd(t,e,n){"function"==typeof e&&(n=e,e="");var i=Ac(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,Sc(Pc.test(i)&&Pc.test(e)),Qc[i]||(Qc[i]={action:n,actionInfo:t}),td[e]=i}function xd(t,e){su.register(t,e)}function _d(t,e){bd(od,t,e,1e3,"layout")}function wd(t,e){bd(od,t,e,3e3,"visual")}function bd(t,e,n,i,o){if((Ic(e)||Ac(e))&&(n=e,e=i),T){if(isNaN(e)||null==e)throw new Error("Illegal priority");Mc(t,function(t){Sc(t.__raw!==n)})}var a=Eh.wrapStageHandler(n,o);return a.__prio=e,a.__raw=n,t.push(a),a}function Sd(t,e){rd[t]=e}function Md(t){return Ll.extend(t)}function Id(t){return ph.extend(t)}function Ad(t){return ah.extend(t)}function Td(t){return yh.extend(t)}wd(2e3,kh),md(Du),vd(5e3,function(t){var a=tt();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(Cu)}),Sd("default",function(i,t){O(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var o=new xr({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new Ir({shape:{startAngle:-Oh/2,endAngle:-Oh/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new xr({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*Oh/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Oh/2}).delay(300).start("circularInOut");var e=new cn;return e.add(a),e.add(r),e.add(o),e.resize=function(){var t=i.getWidth()/2,e=i.getHeight()/2;a.setShape({cx:t,cy:e});var n=a.shape.r;r.setShape({x:t-n,y:e-n,width:2*n,height:2*n}),o.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},e.resize(),e}),yd({type:"highlight",event:"highlight",update:"highlight"},nt),yd({type:"downplay",event:"downplay",update:"downplay"},nt),gd("light",ec),gd("dark",oc);function Dd(t){return t}function Cd(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Dd,this._newKeyGetter=i||Dd,this.context=o}function Ld(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))}}Cd.prototype={constructor:Cd,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(Ld(t,{},i,"_oldKeyGetter",this),Ld(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.unshift()):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 kd=tt(["tooltip","label","itemName","itemId","seriesName"]);function Pd(a){var t={},r=t.encode={},s=tt(),l=[],u=[];z(a.dimensions,function(t){var e,n,o=a.getDimensionInfo(t),i=o.coordDim;i&&(T&&Y(null==kd.get(i)),e=r[i],r.hasOwnProperty(i)||(e=r[i]=[]),e[o.coordDimIndex]=t,o.isExtraCoord||(s.set(i,1),"ordinal"===(n=o.type)||"time"===n||(l[0]=t)),o.defaultTooltip&&u.push(t)),kd.each(function(t,e){var n=r[e];r.hasOwnProperty(e)||(n=r[e]=[]);var 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 Nd(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Od=B,Ed="undefined",Rd={float:("undefined"==typeof Float64Array?"undefined":_typeof(Float64Array))===Ed?Array:Float64Array,int:("undefined"==typeof Int32Array?"undefined":_typeof(Int32Array))===Ed?Array:Int32Array,ordinal:Array,number:Array,time:Array},zd=("undefined"==typeof Uint32Array?"undefined":_typeof(Uint32Array))===Ed?Array:Uint32Array,Bd=("undefined"==typeof Uint16Array?"undefined":_typeof(Uint16Array))===Ed?Array:Uint16Array;function Vd(t){return 65535<t._rawCount?zd:Bd}var Gd=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Fd=["_extent","_approximateExtent","_rawExtent"];function Wd(e,n){z(Gd.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,z(Fd,function(t){e[t]=D(n[t])}),e._calculationInfo=k(n._calculationInfo)}var Hd=function(t,e){t=t||["x","y"];for(var n={},i=[],o={},a=0;a<t.length;a++){var r=t[a];N(r)&&(r={name: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=Pd(this),this._invertedIndicesMap=o,this._calculationInfo={}},Zd=Hd.prototype;function Ud(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 Xd(t){return t}function jd(t){return t<this._count&&0<=t?this._indices[t]:-1}function Yd(t,e){var n=t._idList[e];return null==n&&(n=Ud(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function qd(t){return C(t)||(t=[t]),t}function Kd(t,e){for(var n=0;n<e.length;n++)t._dimensionInfos[e[n]]||console.error("Unkown dimension "+e[n])}function $d(t,e){var n=t.dimensions,i=new Hd(L(n,t.getDimensionInfo,t),t.hostModel);Wd(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]=Jd(),i._extent[s]=null):o[s]=a[s])}return i}function Jd(){return[1/0,-1/0]}Zd.type="list",Zd.hasItemOption=!0,Zd.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},Zd.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Zd.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Zd.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]},Zd.initData=function(t,e,n){var i=jl.isInstance(t)||E(t);if(i&&(t=new Lu(t,this.dimensions.length)),T&&!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=Bu[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Zd.getProvider=function(){return this._rawData},Zd.appendData=function(t){T&&Y(!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)},Zd._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,f=p-1,g=0;g<s;g++){c[N=r[g]]||(c[N]=Jd());var m=l[N];0===m.otherDims.itemName&&(n=this._nameDimIdx=g),0===m.otherDims.itemId&&(this._idDimIdx=g);var v=Rd[m.type];a[N]||(a[N]=[]);var y=a[N][f];if(y&&y.length<i){for(var x=new v(Math.min(e-f*i,i)),_=0;_<y.length;_++)x[_]=y[_];a[N][f]=x}for(var w=p*i;w<e;w+=i)a[N].push(new v(Math.min(e-w,i)));this._chunkCount=a[N].length}for(var b,S,M=new Array(s),I=t;I<e;I++){M=o.getItem(I,M);for(var A,T,D,C,L,k=Math.floor(I/i),P=I%i,w=0;w<s;w++){var N,O=a[N=r[w]][k],E=this._dimValueGetter(M,N,I,w);O[P]=E;var R=c[N];E<R[0]&&(R[0]=E),E>R[1]&&(R[1]=E)}o.pure||(A=u[I],M&&null==A&&(null!=M.name?u[I]=A=M.name:null==n||(D=a[T=r[n]][k])&&(A=D[P],(C=l[T].ordinalMeta)&&C.categories.length&&(A=C.categories[A]))),null==(L=null==M?null:M.id)&&null!=A&&(d[A]=d[A]||0,0<d[L=A]&&(L+="__ec__"+d[A]),d[A]++),null!=L&&(h[I]=L))}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},z(S=(b=this)._invertedIndicesMap,function(t,e){var n=b._dimensionInfos[e].ordinalMeta;if(n){t=S[e]=new zd(n.categories.length);for(var i=0;i<t.length;i++)t[i]=NaN;for(i=0;i<b._count;i++)t[b.get(e,i)]=i}})}},Zd.count=function(){return this._count},Zd.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=Vd(this))(this.count()),i=0;i<o.length;i++)o[i]=i;return o},Zd.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]},Zd.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]},Zd._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},Zd.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},Zd.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,o=e.length;i<o;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},Zd.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Jd();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},Zd.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Zd.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Zd.getCalculationInfo=function(t){return this._calculationInfo[t]},Zd.setCalculationInfo=function(t,e){Od(t)?k(this._calculationInfo,t):this._calculationInfo[t]=e},Zd.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},Zd.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},Zd.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t];if(T&&!n)throw new Error("Do not supported yet");var i=n[e];return null==i||isNaN(i)?-1:i},Zd.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},Zd.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;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},Zd.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r<s;r++){var l=e-this.get(t,r),u=Math.abs(l);l<=n&&u<=o&&((u<o||0<=l&&a<0)&&(o=u,a=l,i.length=0),i.push(r))}return i},Zd.getRawIndex=Xd,Zd.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},Zd.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Ud(this,this._nameDimIdx,e)||""},Zd.getId=function(t){return Yd(this,this.getRawIndex(t))},Zd.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=L(qd(t),this.getDimension,this),T&&Kd(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)}}},Zd.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=L(qd(t),this.getDimension,this),T&&Kd(this,t);for(var o=this.count(),a=new(Vd(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 f=0;f<s;f++)r[f]=this._getFast(u,c);r[f]=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?jd:Xd,this}},Zd.selectRange=function(t){if(this._count){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);T&&Kd(this,n);var i=n.length;if(i){var o=this.count(),a=new(Vd(this))(o),r=0,s=n[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[n[0]],p=0;p<this._chunkCount;p++)for(var f=d[p],g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){(l<=(w=f[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++}h=!0}else if(2===i){for(var d=this._storage[s],v=this._storage[n[1]],y=t[n[1]][0],x=t[n[1]][1],p=0;p<this._chunkCount;p++)for(var f=d[p],_=v[p],g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=f[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=n[p];((w=this._getFast(e,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?jd:Xd,this}}},Zd.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},Zd.map=function(t,e,n,i){n=n||i||this,t=L(qd(t),this.getDimension,this),T&&Kd(this,t);var o=$d(this,t);o._indices=this._indices,o.getRawIndex=o._indices?jd:Xd;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 f=e&&e.apply(n,h);if(null!=f){"object"!==_typeof(f)&&(r[0]=f,f=r);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<f.length;y++){var x=t[y],_=f[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},Zd.downSample=function(t,e,n,i){for(var o=$d(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(Vd(this))(u),p=0,f=0;f<u;f+=s){u-f<s&&(s=u-f,r.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(f+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=n(r),_=this.getRawIndex(Math.min(f+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=jd,o},Zd.getItemModel=function(t){var e=this.hostModel;return new Cs(this.getRawDataItem(t),e,e&&e.ecModel)},Zd.diff=function(e){var n=this;return new Cd(e?e.getIndices():[],this.getIndices(),function(t){return Yd(e,t)},function(t){return Yd(n,t)})},Zd.getVisual=function(t){var e=this._visual;return e&&e[t]},Zd.setVisual=function(t,e){if(Od(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Zd.setLayout=function(t,e){if(Od(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Zd.getLayout=function(t){return this._layout[t]},Zd.getItemLayout=function(t){return this._itemLayouts[t]},Zd.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?k(this._itemLayouts[t]||{},e):e},Zd.clearItemLayouts=function(){this._itemLayouts.length=0},Zd.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],o=i&&i[e];return null!=o||n?o:this.getVisual(e)},Zd.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,Od(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},Zd.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Qd(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function tp(t,e,n){jl.isInstance(e)||(e=jl.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s,l=(n.dimsDef||[]).slice(),u=tt(n.encodeDef),h=tt(),c=tt(),d=[],p=(i=e,o=t,a=l,r=n.dimCount,s=Math.max(i.dimensionsDetectCount||1,o.length,a.length,r||0),z(o,function(t){var e=t.dimsDef;e&&(s=Math.max(s,e.length))}),s),f=0;f<p;f++){var g=l[f]=k({},B(l[f])?l[f]:{name:l[f]}),m=g.name,v=d[f]={otherDims:{}};null!=m&&null==h.get(m)&&(v.name=v.displayName=m,h.set(m,f)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}u.each(function(t,n){var i;1===(t=so(t).slice()).length&&t[0]<0?u.set(n,!1):(i=u.set(n,[]),z(t,function(t,e){N(t)&&(t=h.get(t)),null!=t&&t<p&&(i[e]=t,x(d[t],n,e))}))});var y=0;function x(t,e,n){null!=kd.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,c.set(e,!0))}z(t,function(o,t){var a,r,s,e;N(o)?(a=o,o={}):(a=o.name,e=o.ordinalMeta,o.ordinalMeta=null,(o=D(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var n=u.get(a);if(!1!==n){if(!(n=so(n)).length)for(var i=0;i<(r&&r.length||1);i++){for(;y<d.length&&null!=d[y].coordDim;)y++;y<d.length&&n.push(y++)}z(n,function(t,e){var n,i=d[t];x(O(i,o),a,e),null==i.name&&r&&(B(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",A=0;A<p;A++){null==(v=d[A]=d[A]||{}).coordDim&&(v.coordDim=ep(I,c,S),v.coordDimIndex=0,(!b||M<=0)&&(v.isExtraCoord=!0),M--),null==v.name&&(v.name=ep(v.coordDim,h)),null==v.type&&(_=e,w=A,v.name,Jl(_.data,_.sourceFormat,_.seriesLayoutBy,_.dimensionsDefine,_.startIndex,w))&&(v.type="ordinal")}return d}function ep(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}Zd.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(Qd,e)),this._graphicEls[t]=e},Zd.getItemGraphicEl=function(t){return this._graphicEls[t]},Zd.eachItemGraphicEl=function(n,i){z(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},Zd.cloneShallow=function(t){var e,n;return t||(e=L(this.dimensions,this.getDimensionInfo,this),t=new Hd(e,this.hostModel)),t._storage=this._storage,Wd(t,this),this._indices?(n=this._indices.constructor,t._indices=new n(this._indices)):t._indices=null,t.getRawIndex=t._indices?jd:Xd,t},Zd.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(X(arguments)))})},Zd.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Zd.CHANGABLE_METHODS=["filterSelf","selectRange"];var np=function(t,e){return tp((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function ip(t,n,e){var i,o,a,r,s,l,u,h=(e=e||{}).byIndex,c=e.stackedCoordDimension,d=!(!t||!t.get("stack"));return z(n,function(t,e){N(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,z(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 op(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function ap(t,e){return op(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rp(t,e,n){n=n||{},jl.isInstance(t)||(t=jl.seriesDataToSource(t));var i,o=e.get("coordinateSystem"),a=su.get(o),r=Rl(e);r&&(i=L(r.coordSysDims,function(t){var e,n={name:t},i=r.axisMap.get(t);return i&&(e=i.get("type"),n.type=Nd(e)),n})),i=i||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=np(t,{coordDimensions:i,generateCoord:n.generateCoord});r&&z(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=ip(e,u),c=new Hd(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===Vl){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!C(ho(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 sp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function lp(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}sp.prototype.parse=function(t){return t},sp.prototype.getSetting=function(t){return this._setting[t]},sp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},sp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},sp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},sp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},sp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},sp.prototype.getExtent=function(){return this._extent.slice()},sp.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},sp.prototype.isBlank=function(){return this._isBlank},sp.prototype.setBlank=function(t){this._isBlank=t},sp.prototype.getLabel=null,Ao(sp),ko(sp,{registerWhenExtend:!0}),lp.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&L(n,cp);return new lp({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var up=lp.prototype;function hp(t){return t._map||(t._map=tt(t.categories))}function cp(t){return B(t)&&null!=t.value?t.value:t+""}up.getOrdinal=function(t){return hp(this).get(t)},up.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=hp(this);return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n};var dp=sp.prototype,pp=sp.extend({type:"ordinal",init:function(t,e){t&&!C(t)||(t=new lp({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),dp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return dp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(dp.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:nt,niceExtent:nt});pp.create=function(){return new pp};var fp=zs;function gp(t){return Gs(t)+2}function mp(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function vp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),mp(t,0,e),mp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var yp=zs,xp=sp.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]),xp.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=gp(t)},getTicks:function(){return function(t,e,n,i){var o=[];if(!t)return o;e[0]<n[0]&&o.push(e[0]);for(var a=n[0];a<=n[1]&&(o.push(a),(a=fp(a+t,i))!==o[o.length-1]);)if(1e4<o.length)return[];return e[1]>(o.length?o[o.length-1]:n[1])&&o.push(e[1]),o}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Gs(t)||0:"auto"===n&&(n=this._intervalPrecision),tl(t=yp(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=Ks(a/e,!0);null!=n&&r<n&&(r=o.interval=n),null!=i&&i<r&&(r=o.interval=i);var s=o.intervalPrecision=gp(r);return vp(o.niceTickExtent=[fp(Math.ceil(t[0]/r)*r,s),fp(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]=yp(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=yp(Math.ceil(n[1]/o)*o))}});xp.create=function(){return new xp};var _p="__ec_stack_",wp="undefined"!=typeof Float32Array?Float32Array:Array;function bp(t){return t.get("stack")||_p+t.seriesIndex}function Sp(t){return t.dim+t.index}function Mp(t,e){var n=[];return e.eachSeriesByType(t,function(t){Lp(t)&&!kp(t)&&n.push(t)}),n}function Ip(t){var u=[];return z(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),o="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),a=Rs(t.get("barWidth"),o),r=Rs(t.get("barMaxWidth"),o),s=t.get("barGap"),l=t.get("barCategoryGap");u.push({bandWidth:o,barWidth:a,barMaxWidth:r,barGap:s,barCategoryGap:l,axisKey:Sp(n),stackId:bp(t)})}),Ap(u)}function Ap(t){var c={};z(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=c[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;c[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.barGap;null!=u&&(o.gap=u);var h=t.barCategoryGap;null!=h&&(o.categoryGap=h)});var d={};return z(c,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Rs(t.categoryGap,i),a=Rs(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(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;z(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;z(e,function(t,e){d[n][e]=d[n][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}function Tp(t,e,n){if(t&&e){var i=t[Sp(e)];return null!=i&&null!=n&&(i=i[bp(n)]),i}}function Dp(t,e){var n=Mp(t,e),A=Ip(n),T={};z(n,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=bp(t),a=A[Sp(i)][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;T[o]=T[o]||[],e.setLayout({offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),d=op(e,h),p=l.isHorizontal(),f=Pp(0,l),g=0,m=e.count();g<m;g++){var v,y,x,_,w,b,S,M=e.get(h,g),I=e.get(c,g);isNaN(M)||(v=0<=M?"p":"n",y=f,d&&(T[o][I]||(T[o][I]={p:f,n:f}),y=T[o][I][v]),p?(x=y,_=(S=n.dataToPoint([M,I]))[1]+r,w=S[0]-f,b=s,Math.abs(w)<u&&(w=(w<0?-1:1)*u),d&&(T[o][I][v]+=w)):(x=(S=n.dataToPoint([I,M]))[0]+r,_=y,w=s,b=S[1]-f,Math.abs(b)<u&&(b=(b<=0?-1:1)*u),d&&(T[o][I][v]+=b)),e.setItemLayout(g,{x:x,y:_,width:w,height:b}))}},this)}var Cp={seriesType:"bar",plan:gh(),reset:function(t){if(Lp(t)&&kp(t)){var e=t.getData(),s=t.coordinateSystem,n=s.getBaseAxis(),l=s.getOtherAxis(n),u=e.mapDimension(l.dim),h=e.mapDimension(n.dim),c=l.isHorizontal(),d=c?0:1,p=Tp(Ip([t]),n,t).width;return.5<p||(p=.5),{progress:function(t,e){var n,i=new wp(2*t.count),o=[],a=[],r=0;for(;null!=(n=t.next());)a[d]=e.get(u,n),a[1-d]=e.get(h,n),o=s.dataToPoint(a,null,o),i[r++]=o[0],i[r++]=o[1];e.setLayout({largePoints:i,barWidth:p,valueAxisStart:Pp(0,l),valueAxisHorizontal:c})}}}}};function Lp(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function kp(t){return t.pipelineContext&&t.pipelineContext.large}function Pp(t,e){var n,i=e.getGlobalExtent(),o=i[0]>i[1]?(n=i[1],i[0]):(n=i[0],i[1]),a=e.toGlobalCoord(e.dataToCoord(0));return a<n&&(a=n),o<a&&(a=o),a}var Np=xp.prototype,Op=Math.ceil,Ep=Math.floor,Rp=36e5,zp=864e5,Bp=xp.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return dl(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=zp,n[1]+=zp),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]-zp),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(n[0]=zs(Ep(n[0]/i)*i)),t.fixMax||(n[1]=zs(Op(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=Vp.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}(Vp,a,0,r),l=Vp[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Ks(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Op((i[0]-h)/u)*u+h),Math.round(Ep((i[1]-h)/u)*u+h)];vp(c,i),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+js(t)}});z(["contain","normalize"],function(e){Bp.prototype[e]=function(t){return Np[e].call(this,this.parse(t))}});var Vp=[["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",Rp],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*Rp],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",zp],["MM-dd\nyyyy",2*zp],["MM-dd\nyyyy",3*zp],["MM-dd\nyyyy",4*zp],["MM-dd\nyyyy",5*zp],["MM-dd\nyyyy",6*zp],["week",7*zp],["MM-dd\nyyyy",864e6],["week",14*zp],["week",21*zp],["month",31*zp],["week",42*zp],["month",62*zp],["week",70*zp],["quarter",95*zp],["month",31*zp*4],["month",13392e6],["half-year",16416e6],["month",31*zp*8],["month",26784e6],["year",380*zp]];Bp.create=function(t){return new Bp({useUTC:t.ecModel.get("useUTC")})};var Gp=sp.prototype,Fp=xp.prototype,Wp=Gs,Hp=zs,Zp=Math.floor,Up=Math.ceil,Xp=Math.pow,jp=Math.log,Yp=sp.extend({type:"log",base:10,$constructor:function(){sp.apply(this,arguments),this._originalScale=new xp},getTicks:function(){var n=this._originalScale,i=this._extent,o=n.getExtent();return L(Fp.getTicks.call(this),function(t){var e=zs(Xp(this.base,t)),e=t===i[0]&&n.__fixMin?qp(e,o[0]):e;return e=t===i[1]&&n.__fixMax?qp(e,o[1]):e},this)},getLabel:Fp.getLabel,scale:function(t){return t=Gp.scale.call(this,t),Xp(this.base,t)},setExtent:function(t,e){var n=this.base;t=jp(t)/jp(n),e=jp(e)/jp(n),Fp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Gp.getExtent.call(this);e[0]=Xp(t,e[0]),e[1]=Xp(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=qp(e[0],i[0])),n.__fixMax&&(e[1]=qp(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=jp(t[0])/jp(e),t[1]=jp(t[1])/jp(e),Gp.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=Ys(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;var o=[zs(Up(e[0]/i)*i),zs(Zp(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},niceExtent:function(t){Fp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function qp(t,e){return Hp(t,Wp(e))}function Kp(t,e){var n,i,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?n=e.getCategories().length:(C(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(T&&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]=Rs(i[0],1),i[1]=Rs(i[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?n?0:NaN:h[0]-i[0]*o),null==s&&(s="ordinal"===a?n?n-1:NaN:h[1]+i[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(W(r)||W(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c,d,p,f,g=e.ecModel;return g&&"time"===a&&(z(c=Mp("bar",g),function(t){d|=t.getBaseAxis()===e.axis}),d&&(p=Ip(c),r=(f=function(t,e,n,i){var o=n.axis.getExtent(),a=o[1]-o[0],r=Tp(i,n.axis);if(void 0===r)return{min:t,max:e};var s=1/0;z(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;z(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=f.max)),[r,s]}function $p(t,e){var n=Kp(t,e),i=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Jp(t,e){if(e=e||t.get("type"))switch(e){case"category":return new pp(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new xp;default:return(sp.getClass(e)||xp).create(t)}}function Qp(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=Qp(t),h=1;40<s&&(h=Math.ceil(s/40));for(var c,d,p,f,g,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=g=f=p=void 0,p=d*Math.PI/180,f=c.plain(),g=f.width,m=f.height,v=g*Math.cos(p)+m*Math.sin(p),y=g*Math.sin(p)+m*Math.cos(p),new hn(f.x,f.y,v,y));o?o.union(b):o=b}return o}}z(["contain","normalize"],function(e){Yp.prototype[e]=function(t){return t=jp(t)/jp(this.base),Gp[e].call(this,t)}}),Yp.create=function(){return new Yp};var nf={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&&!W(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&&!W(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:nt,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},of=Er({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()}}),af=Er({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()}}),rf=Er({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,f=.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-f,n,i),t.bezierCurveTo(n,i-f,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),sf=Er({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()}}),lf={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}},uf={};z({line:_r,rect:xr,roundRect:xr,square:xr,circle:cr,diamond:af,pin:rf,arrow:sf,triangle:of},function(t,e){uf[e]=new t});var hf=Er({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,o=uf[i];"none"!==e.symbolType&&(o=o||uf[i="rect"],lf[i](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,n))}});function cf(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 df(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://")?zr(t.slice(8),new hn(e,n,i,o),r?"center":"cover"):0===t.indexOf("path://")?Rr(t.slice(7),{},new hn(e,n,i,o),r?"center":"cover"):new hf({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=cf,s.setColor(a),s}var pf={isDimensionStacked:op,enableDataStack:ip,getStackedDimension:ap};var ff=(Object.freeze||Object)({createList:function(t){return rp(t.getSource(),t)},getLayoutRect:wl,dataStack:pf,createScale:function(t,e){var n=e;Cs.isInstance(e)||b(n=new Cs(e),nf);var i=Jp(n);return i.setExtent(t[0],t[1]),$p(i,n),i},mixinAxisModelCommonMethods:function(t){b(t,nf)},completeDimensions:tp,createDimensions:np,createSymbol:df}),gf=1e-8;function mf(t,e){return Math.abs(t-e)<gf}function vf(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+=Na(o[0],o[1],r[0],r[1],e,n),o=r}var s=t[0];return mf(o[0],s[0])&&mf(o[1],s[1])||(i+=Na(o[0],o[1],s[0],s[1],e,n)),0!==i}function yf(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 xf(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}yf.prototype={constructor:yf,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&&(ha(r[s].exterior,o,a),bt(n,n,o),St(i,i,a))}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new hn(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(vf(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(vf(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 hn(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++)wt(h[d],h[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)wt(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 yf(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function _f(t){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]=xf(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=xf(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),L(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&&z(i,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new yf(e.name,o,e.cp);return a.properties=e,a})}var wf=vo();function bf(t){return"category"===t.type?(a=(o=t).getLabelModel(),r=Mf(o,a),!a.get("show")||o.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(e=(n=t).scale.getTicks(),i=Qp(n),{labels:L(e,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,e,i,o,a,r}function Sf(t,e){return"category"===t.type?function(t,e){var n,i,o=If(t,"ticks"),a=Lf(e),r=Af(o,a);if(r)return r;e.get("show")&&!t.scale.isBlank()||(n=[]);{var s;n=A(a)?Cf(t,a,!0):"auto"===a?(s=Mf(t,t.getLabelModel()),i=s.labelCategoryInterval,L(s.labels,function(t){return t.tickValue})):Df(t,i=a,!0)}return Tf(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}}function Mf(t,e){var n,i,o,a=If(t,"labels"),r=Lf(e),s=Af(a,r);return s||Tf(a,r,{labels:A(r)?Cf(t,r):Df(t,n="auto"===r?null!=(o=wf(i=t).autoInterval)?o:wf(i).autoInterval=i.calculateCategoryInterval():r),labelCategoryInterval:n})}function If(t,e){return wf(t)[e]||(wf(t)[e]=[])}function Af(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function Tf(t,e,n){return t.push({key:e,value:n}),n}function Df(t,e,n){var i=Qp(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=r.get("showMinLabel"),d=r.get("showMaxLabel");c&&u!==a[0]&&f(a[0]);for(var p=u;p<=a[1];p+=l)f(p);function f(t){s.push(n?t:{formattedLabel:i(t),rawLabel:o.getLabel(t),tickValue:t})}return d&&p!==a[1]&&f(a[1]),s}function Cf(t,n,i){var o=t.scale,a=Qp(t),r=[];return z(o.getTicks(),function(t){var e=o.getLabel(t);n(t,e)&&r.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}function Lf(t){var e=t.get("interval");return null==e?"auto":e}var kf=[0,1],Pf=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Nf(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}Pf.prototype={constructor:Pf,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.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fs(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&&Nf(n=n.slice(),i.count()),Es(t,kf,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Nf(n=n.slice(),i.count());var o=Es(t,n,kf,e);return this.scale.scale(o)},pointToData:function(){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=Sf(this,e),i=L(n.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var a,r=t.getExtent();{var s;1===o?(e[0].coord=r[0],a=e[1]={coord:r[0]}):(s=e[1].coord-e[0].coord,z(e,function(t){t.coord-=s/2}),a={coord:e[o-1].coord+s},e.push(a))}var l=r[0]>r[1];u(e[0].coord,r[0])&&(i?e[0].coord=r[0]:e.shift());i&&u(r[0],e[0].coord)&&e.unshift({coord:r[0]});u(r[1],a.coord)&&(i?a.coord=r[1]:e.pop());i&&u(a.coord,r[1])&&e.push({coord:r[1]});function u(t,e){return l?e<t:t<e}}(this,i,(n.tickCategoryInterval,o),t.clamp),i},getViewLabels:function(){return bf(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=Qp(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)),f=0,g=0;h<=s[1];h+=u)var m=jn(o(h),i.font,"center","top"),v=1.3*m.width,y=1.3*m.height,f=Math.max(f,v,7),g=Math.max(g,y,7);var x=f/d,_=g/p;isNaN(x)&&(x=1/0),isNaN(_)&&(_=1/0);var w=Math.max(0,Math.floor(Math.min(x,_))),b=wf(t.model),S=b.lastAutoInterval,M=b.lastTickCount;return null!=S&&null!=M&&Math.abs(S-w)<=1&&Math.abs(M-l)<=1&&w<S?w=S:(b.lastTickCount=l,b.lastAutoInterval=w),w}(this)}};var Of=_f,Ef={};z(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Ef[t]=it[t]});var Rf={};function zf(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Fu(t,e,n[0]);if(i){for(var o=[],a=0;a<n.length;a++){var r=Fu(t,e,n[a]);o.push(r)}return o.join(" ")}}function Bf(t,e,n){cn.call(this),this.updateData(t,e,n)}z(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){Rf[t]=bs[t]}),ah.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t){if(T){var e=t.coordinateSystem;if("polar"!==e&&"cartesian2d"!==e)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return rp(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!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 Vf=Bf.prototype,Gf=Bf.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function Ff(t){return[t[0]/2,t[1]/2]}function Wf(t,e){this.parent.drift(t,e)}Vf._createSymbol=function(t,e,n,i,o){this.removeAll();var a=df(t,-1,-1,2,2,e.getItemVisual(n,"color"),o);a.attr({z2:100,culling:!0,scale:Ff(i)}),a.drift=Wf,this._symbolType=t,this.add(a)},Vf.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Vf.getSymbolPath=function(){return this.childAt(0)},Vf.getScale=function(){return this.childAt(0).scale},Vf.highlight=function(){this.childAt(0).trigger("emphasis")},Vf.downplay=function(){this.childAt(0).trigger("normal")},Vf.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},Vf.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},Vf.updateData=function(t,e,n){this.silent=!1;var i,o,a,r,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=Gf(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,fs(o,{scale:Ff(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),gs(o,r,l,e)),this._seriesModel=l};var Hf=["itemStyle"],Zf=["emphasis","itemStyle"],Uf=["label"],Xf=["emphasis","label"];function jf(){Jr(this)||qf.call(this)}function Yf(){Jr(this)||Kf.call(this)}function qf(){var t,e;this.incremental||this.useHoverLayer||(e=(t=this.__symbolOriginalScale)[1]/t[0],this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut"))}function Kf(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function $f(t){this.group=new cn,this._symbolCtor=t||Bf}Vf._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});var s,l=i&&i.itemStyle,u=i&&i.hoverItemStyle,h=i&&i.symbolRotate,c=i&&i.symbolOffset,d=i&&i.labelModel,p=i&&i.hoverLabelModel,f=i&&i.hoverAnimation,g=i&&i.cursorStyle;!i||n.hasItemOption?(l=(s=i&&i.itemModel?i.itemModel:n.getItemModel(t)).getModel(Hf).getItemStyle(["color"]),u=s.getModel(Zf).getItemStyle(),h=s.getShallow("symbolRotate"),c=s.getShallow("symbolOffset"),d=s.getModel(Uf),p=s.getModel(Xf),f=s.getShallow("hoverAnimation"),g=s.getShallow("cursor")):u=k({},u);var m=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Rs(c[0],e[0]),Rs(c[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&&(m.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;as(m,u,d,p,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return _?n.getName(t):zf(n,t)},isRectText:!0,autoColor:r}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,is(o),o.__symbolOriginalScale=Ff(e),f&&a.isAnimationEnabled()&&o.on("mouseover",jf).on("mouseout",Yf).on("emphasis",qf).on("normal",Kf)},Vf.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),fs(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},w(Bf,cn);var Jf=$f.prototype;function Qf(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 tg(t){return null==t||B(t)||(t={isIgnore:t}),t||{}}function eg(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 ng(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=L(t.dimensions,function(t){return e.mapDimension(t)}),p=e.getCalculationInfo("stackResultDimension");return(i|=op(e,d[0]))&&(d[0]=p),(i|=op(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 ig(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)}Jf.updateData=function(o,a){a=tg(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=eg(o);l||r.removeAll(),o.diff(l).add(function(t){var e,n=o.getItemLayout(t);Qf(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);Qf(o,i,t,a)?(n?(n.updateData(o,t,h),fs(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},Jf.isPersistent=function(){return!0},Jf.updateLayout=function(){var i=this._data;i&&i.eachItemGraphicEl(function(t,e){var n=i.getItemLayout(e);t.attr("position",n)})},Jf.incrementalPrepareUpdate=function(t){this._seriesScope=eg(t),this._data=null,this.group.removeAll()},Jf.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=tg(n);for(var o=t.start;o<t.end;o++){var a,r=e.getItemLayout(o);Qf(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))}},Jf.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var og=bt,ag=St,rg=ht,sg=rt,lg=[],ug=[],hg=[];function cg(t){return isNaN(t[0])||isNaN(t[1])}function dg(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 f,g,m,v=e[d];if(o<=d||d<0)break;if(cg(v)){if(h){d+=a;continue}break}d===n?t[0<a?"moveTo":"lineTo"](v[0],v[1]):0<l?(f=e[c],m=(v[g="y"===u?1:0]-f[g])*l,sg(ug,f),ug[g]=f[g]+m,sg(hg,v),hg[g]=v[g]-m,t.bezierCurveTo(ug[0],ug[1],hg[0],hg[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,f=n,g=0;g<i;g++){var m=e[f];if(o<=f||f<0)break;if(cg(m)){if(h){f+=a;continue}break}if(f===n)t[0<a?"moveTo":"lineTo"](m[0],m[1]),sg(ug,m);else if(0<l){var v=f+a,y=e[v];if(h)for(;y&&cg(e[v]);)y=e[v+=a];var x,_=.5,w=e[p];!(y=e[v])||cg(y)?sg(hg,m):(cg(y)&&!h&&(y=m),ct(lg,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=vt(m,w),vt(m,y)),rg(hg,m,lg,-l*(1-(_=d/(d+c))))),og(ug,ug,s),ag(ug,ug,r),og(hg,hg,s),ag(hg,hg,r),t.bezierCurveTo(ug[0],ug[1],hg[0],hg[1],m[0],m[1]),rg(ug,m,lg,l*_)}else t.lineTo(m[0],m[1]);p=f,f+=a}return g}.apply(this,arguments)}function pg(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 fg=Ua.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:hr(Ua.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=pg(n,e.smoothConstraint);if(e.connectNulls){for(;0<o&&cg(n[o-1]);o--);for(;i<o&&cg(n[i]);i++);}for(;i<o;)i+=dg(t,n,i,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),gg=Ua.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:hr(Ua.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,a=n.length,r=e.smoothMonotone,s=pg(n,e.smoothConstraint),l=pg(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&cg(n[a-1]);a--);for(;o<a&&cg(n[o]);o++);}for(;o<a;){var u=dg(t,n,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);dg(t,i,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function mg(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 vg(t){return"number"==typeof t?t:t?.5:0}function yg(t){var e,n,i=t.getGlobalExtent();return t.onBand&&(e=t.getBandWidth()/2-1,n=i[1]>i[0]?1:-1,i[0]+=n*e,i[1]-=n*e),i}function xg(t,e,n,i){return("polar"===t.type?function(t,e,n,i){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;n&&(a[0]-=.5,a[1]+=.5);var l=new pr({shape:{cx:zs(t.cx,1),cy:zs(t.cy,1),r0:zs(a[0],1),r:zs(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,gs(l,{shape:{endAngle:-r[1]*s}},i)),l}:function(t,e,n,i){var o,a,r=yg(t.getAxis("x")),s=yg(t.getAxis("y")),l=t.getBaseAxis().isHorizontal(),u=Math.min(r[0],r[1]),h=Math.min(s[0],s[1]),c=Math.max(r[0],r[1])-u,d=Math.max(s[0],s[1])-h;n?(u-=.5,c+=.5,h-=.5,d+=.5):(o=i.get("lineStyle.width")||2,a=i.get("clipOverflow")?o/2:Math.max(c,d),l?(h-=a,d+=2*a):(u-=a,c+=2*a));var p=new xr({shape:{x:u,y:h,width:c,height:d}});return e&&(p.shape[l?"width":"height"]=0,gs(p,{shape:{width:c,height:d}},i)),p})(t,e,n,i)}function _g(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 wg(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*Bf.getSymbolSize(e,r)[t.isHorizontal()?1:0]>i)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}yh.extend({type:"line",init:function(){var t=new cn,e=new $f;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,f=this._lineGroup,g=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(ig(n,t,e,o));return i}(i,a,ng(i,a,v)),x=t.get("showSymbol"),_=x&&!u&&wg(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(f);var b=!u&&t.get("step");d&&h.type===i.type&&b===this._step?(m&&!p?p=this._newPolygon(l,y,i,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(xg(i,!1,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:xg(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),mg(this._stackedOnPoints,y)&&mg(this._points,l)||(g?this._updateAnimation(a,y,i,n,b,v):(b&&(l=_g(l,i,b),y=_g(y,i,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:xg(i,!1,!0,t)}),b&&(l=_g(l,i,b),y=_g(y,i,b)),d=this._newPolyline(l,i,g),m&&(p=this._newPolygon(l,y,i,g)),f.setClipPath(xg(i,!0,!1,t)));var S=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=L(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,f=h[c-1].coord+10,g=f-p;if(g<.001)return"transparent";z(h,function(t){t.offset=(t.coord-p)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new Tr(0,0,0,0,h,!0);return m[a]=p,m[a+"2"]=f,m}T&&console.warn("Visual map on line style only support x or y dimension.")}else T&&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:S,lineJoin:"bevel"}));var M,I,A=t.get("smooth"),A=vg(t.get("smooth"));d.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(M=a.getCalculationInfo("stackedOnSeries"),I=0,p.useStyle(O(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(I=vg(M.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=b,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=mo(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;(r=new Bf(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 yh.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=mo(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):yh.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new fg({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 gg({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=function(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=[],f=[],g=[],m=[],v=[],y=ng(o,e,r),x=ng(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]),f.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(ig(y,o,e,I)),f.push(i[I]),v.push(e.getRawIndex(I));break;case"-":var I=w.idx,A=t.getRawIndex(I);A!==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]),f.push(ig(x,a,t,I)),v.push(A)):b=!1}b&&(g.push(w),m.push(m.length))}m.sort(function(t,e){return v[t]-v[e]});for(var T=[],D=[],C=[],L=[],k=[],_=0;_<m.length;_++){I=m[_];T[_]=c[I],D[_]=d[I],C[_]=p[I],L[_]=f[I],k[_]=g[I]}return{current:T,next:D,stackedOnCurrent:C,stackedOnNext:L,status:k}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;o&&(h=_g(u.current,n,o),c=_g(u.stackedOnCurrent,n,o),d=_g(u.next,n,o),p=_g(u.stackedOnNext,n,o)),r.shape.__points=u.current,r.shape.points=h,fs(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),fs(s,{shape:{points:d,stackedOnPoints:p}},l));for(var f,g=[],m=u.status,v=0;v<m.length;v++){"="!==m[v].cmd||(f=t.getItemGraphicEl(m[v].idx1))&&g.push({el:f,ptIdx:v})}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<g.length;t++){g[t].el.attr("position",r.shape.__points[g[t].ptIdx])}})},remove:function(){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 bg(t,a,r){return{seriesType:t,performRawSeries:!0,reset:function(l,t){var e=l.getData(),n=l.get("symbol")||a,u=l.get("symbolSize"),i=l.get("symbolKeepAspect");if(e.setVisual({legendSymbol:r||n,symbol:n,symbolSize:u,symbolKeepAspect:i}),!t.isSeriesFiltered(l)){var o="function"==typeof u;return{dataEach:e.hasItemOption||o?function(t,e){var n,i,o,a,r,s;"function"==typeof u&&(n=l.getRawValue(e),i=l.getDataParams(e),t.setItemVisual(e,"symbolSize",u(n,i))),t.hasItemOption&&(a=(o=t.getItemModel(e)).getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolKeepAspect",!0),null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s))}:null}}}}}function Sg(t){return{seriesType:t,plan:gh(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var p=L(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),f=p.length,n=e.getCalculationInfo("stackResultDimension");return op(e,p[0])&&(p[0]=n),op(e,p[1])&&(p[1]=n),f&&{progress:function(t,e){for(var n,i,o,a=t.end-t.start,r=d&&new Float32Array(a*f),s=t.start,l=0,u=[],h=[];s<t.end;s++){n=1===f?(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 Mg(t){return Math.round(t.length/2)}var Ig={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 Ag(t){return this._axes[t]}function Tg(t){this._axes={},this._dimList=[],this.name=t||""}function Dg(t){Tg.call(this,t)}Tg.prototype={constructor:Tg,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return L(this._dimList,Ag,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}},Dg.prototype={constructor:Dg,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")}},w(Dg,Tg);function Cg(t,e,n,i,o){Pf.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"}Cg.prototype={constructor:Cg,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(Cg,Pf);var Lg={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)"]}}},kg={};kg.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Lg),kg.valueAxis=m({boundaryGap:[0,0],splitNumber:5},Lg),kg.timeAxis=O({scale:!0,min:"dataMin",max:"dataMax"},kg.valueAxis),kg.logAxis=O({scale:!0,logBase:10},kg.valueAxis);function Pg(a,t,r,e){z(Ng,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Ml(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),n&&Sl(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=lp.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:g([{},kg[o+"Axis"],e],!0)})}),Ll.registerSubTypeDefaulter(a+"Axis",R(r,a))}var Ng=["value","category","time","log"],Og=Ll.extend({type:"cartesian2dAxis",axis:null,init:function(){Og.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Og.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Og.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Eg(t,e){return e.type||(e.data?"category":"value")}m(Og.prototype,nf);var Rg={offset:0};function zg(t,e){return t.getCoordSysModel()===e}function Bg(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}Pg("x",Og,Eg,Rg),Pg("y",Og,Eg,Rg),Ll.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 Vg=Bg.prototype;function Gg(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)Fg(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Fg(a[u])&&!i[h(a[u])]){o=a[u];break}o&&(i[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Fg(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}Vg.type="grid",Vg.axisPointerEnabled=!0,Vg.getRect=function(){return this._rect},Vg.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),z(n.x,function(t){$p(t.scale,t.model)}),z(n.y,function(t){$p(t.scale,t.model)});var i={};z(n.x,function(t){Gg(n,"y",t,i)}),z(n.y,function(t){Gg(n,"x",t,i)}),this.resize(this.model,e)},Vg.resize=function(t,e,n){var l=wl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var i=this._axesList;function o(){z(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")&&(z(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())},Vg.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]}},Vg.getAxes=function(){return this._axesList.slice()},Vg.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}B(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]},Vg.getCartesians=function(){return this._coordsList.slice()},Vg.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},Vg.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},Vg._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}},Vg.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Vg._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;zg(t,r)&&(n=t.get("position"),"x"===a?"top"!==n&&"bottom"!==n&&s[n="bottom"]&&(n="top"===n?"bottom":"top"):"left"!==n&&"right"!==n&&s[n="left"]&&(n="left"===n?"right":"left"),s[n]=!0,o="category"===(i=new Cg(a,Jp(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]++)}}z((this._axesMap=l).x,function(o,a){z(l.y,function(t,e){var n="x"+a+"y"+e,i=new Dg(n);i.grid=this,i.model=r,this._coordsMap[n]=i,this._coordsList.push(i),i.addAxis(o),i.addAxis(t)},this)},this)},Vg._updateScale=function(t,l){function u(e,n){z(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,ap(e,t))})}z(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(Zg(t)){var e=Hg(t),n=e[0],i=e[1];if(!zg(n,l)||!zg(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)},Vg.getTooltipAxes=function(i){var o=[],a=[];return z(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 Wg=["xAxis","yAxis"];function Hg(n){return L(Wg,function(t){var e=n.getReferringComponents(t)[0];if(T&&!e)throw new Error(t+' "'+H(n.get(t+"Index"),n.get(t+"Id"),0)+'" not found');return e})}function Zg(t){return"cartesian2d"===t.get("coordinateSystem")}Bg.create=function(i,o){var a=[];return i.eachComponent("grid",function(t,e){var n=new Bg(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){if(Zg(t)){var e=Hg(t),n=e[0],i=e[1],o=n.getCoordSysModel();if(T){if(!o)throw new Error('Grid "'+H(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},Bg.dimensions=Bg.prototype.dimensions=Dg.prototype.dimensions,su.register("cartesian2d",Bg);var Ug=Math.PI;function Xg(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function jg(t,e){this.opt=e,this.axisModel=t,O(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new cn;var n=new cn({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n}jg.prototype={constructor:jg,hasBuilder:function(t){return!!Yg[t]},add:function(t){Yg[t].call(this)},getGroup:function(){return this.group}};var Yg={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&&(wt(a,a,e),wt(n,n,e)),r=k({lineCap:"round"},c.getModel("axisLine.lineStyle").getLineStyle()),this.group.add(new _r(Fr({anid:"line",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],z([{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=df(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}),this.group.add(n))},this)))},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var i=e.axis;if(!e.get("axisTick.show")||i.scale.isBlank())return;for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),r=o.get("length"),s=i.getTicksCoords(),l=[],u=[],h=t._transform,c=[],d=0;d<s.length;d++){var p=s[d].coord;l[0]=p,l[1]=0,u[0]=p,u[1]=n.tickDirection*r,h&&(wt(l,l,h),wt(u,u,h));var f=new _r(Fr({anid:"tick_"+s[d].tickValue,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:O(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(f),c.push(f)}return c}(this,t,e);!function(t,e,n){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?($g(a),$g(u)):Jg(a,r)&&(i?($g(r),$g(h)):($g(a),$g(u)));!1===o?($g(s),$g(c)):Jg(l,s)&&(o?($g(l),$g(d)):($g(s),$g(c)))}(t,function(u,h,c){var d=h.axis;if(!H(c.axisLabelShow,h.get("axisLabel.show"))||d.scale.isBlank())return;var p=h.getModel("axisLabel"),f=p.get("margin"),t=d.getViewLabels(),e=(H(c.labelRotate,p.get("rotate"))||0)*Ug/180,g=qg(c.rotation,e,c.labelDirection),m=h.getCategories(!0),v=[],y=Kg(h),x=h.get("triggerEvent");return z(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,o=t.rawLabel,a=p;m&&m[n]&&m[n].textStyle&&(a=new Cs(m[n].textStyle,p,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(n),c.labelOffset+c.labelDirection*f],l=new ur({anid:"label_"+n,position:s,rotation:g.rotation,silent:y,z2:10});rs(l.style,a,{text:i,textAlign:a.getShallow("align",!0)||g.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?n+"":n,e):r}),x&&(l.eventData=Xg(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)},axisName:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,f,g,m,v,y,x=this.opt,_=this.axisModel,w=H(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,Qg(t)?x.labelOffset+e*i:0],null!=(l=_.get("nameRotate"))&&(l=l*Ug/180),Qg(t)?s=qg(x.rotation,null!=l?l:x.rotation,e):(s=function(t,e,n,i){var o,a,r=Zs(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;o=Us(r-Ug/2)?(a=l?"bottom":"top","center"):Us(r-1.5*Ug)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*Ug&&Ug/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=H(x.nameTruncateMaxWidth,c.maxWidth,u),f=null!=d&&null!=p?fl(w,p,h,d,{minChar:2,placeholder:c.placeholder}):w,g=_.get("tooltip",!0),(v={componentType:m=_.mainType,name:w,$vars:["name"]})[m+"Index"]=_.componentIndex,rs((y=new ur({anid:"name",__fullText:w,__truncatedText:f,position:r,rotation:s.rotation,silent:Kg(_),z2:1,tooltip:g&&g.show?k({content:w,formatter:function(){return w},formatterParams:v},g):null})).style,n,{text:f,textFont:h,textFill:n.getTextColor()||_.get("axisLine.lineStyle.color"),textAlign:s.textAlign,textVerticalAlign:s.textVerticalAlign}),_.get("triggerEvent")&&(y.eventData=Xg(_),y.eventData.targetType="axisName",y.eventData.name=w),this._dumbGroup.add(y),y.updateTransform(),this.group.add(y),y.decomposeTransform())}},qg=jg.innerTextLayout=function(t,e,n){var i,o=Zs(e-t),a=Us(o)?(i=0<n?"top":"bottom","center"):Us(o-Ug)?(i=0<n?"bottom":"top","center"):(i="middle",0<o&&o<Ug?0<n?"right":"left":0<n?"left":"right");return{rotation:o,textAlign:a,textVerticalAlign:i}};function Kg(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function $g(t){t&&(t.ignore=!0)}function Jg(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=Ut([]);return qt(o,o,-t.rotation),n.applyTransform(jt([],o,t.getLocalTransform())),i.applyTransform(jt([],o,e.getLocalTransform())),n.intersect(i)}}function Qg(t){return"middle"===t||"center"===t}var tm=z,em=R;function nm(t,e){var f,g,n,a,m,v,y,i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return f=i,n=e,a=(g=t).getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[],tm(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||am(u))&&(null==e&&(e=u.get("triggerTooltip")),i=(u=t?function(t,e,n,i,o,a){var r=e.getModel("axisPointer"),s={};tm(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=D(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 Cs(s,n,i))}(n,p,m,g,t,e):u).get("snap"),o=rm(n.model),a=e||i||"category"===n.type,r=f.axesInfo[o]={key:o,axis:n,coordSys:c,axisPointerModel:u,triggerTooltip:e,involveSeries:a,snap:i,useHandle:am(u),seriesModels:[]},d[o]=r,f.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(im(a[i+"AxisId"],n.id)||im(a[i+"AxisIndex"],n.componentIndex)||im(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=rm(c.model),d=f.coordSysAxesInfo[t]={},p=(f.coordSysMap[t]=c).model.getModel("tooltip",a),tm(c.getAxes(),em(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)&&tm(i.baseAxes,em(o,!n||"cross",e)),n&&tm(i.otherAxes,em(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)&&tm(o.coordSysAxesInfo[rm(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 im(t,e){return"all"===t||C(t)&&0<=M(t,e)||t===e}function om(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[rm(t)]}function am(t){return!!t.get("handle.show")}function rm(t){return t.type+"||"+t.id}var sm=Id({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){var o,a,r,s,l,u,h,c;!this.axisPointerClass||(c=om(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=am(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")),sm.superApply(this,"render",arguments),lm(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i){lm(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),sm.superApply(this,"remove",arguments)},dispose:function(t,e){um(this,e),sm.superApply(this,"dispose",arguments)}});function lm(t,e,n,i,o,a){var r,s,l=sm.getAxisPointerClass(t.axisPointerClass);l&&((r=(s=om(e))&&s.axisPointerModel)?(t._axisPointer||(t._axisPointer=new l)).render(e,r,i,a):um(t,i))}function um(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}var hm=[];function cm(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},f=e.get("offset")||0,g="x"===h?[d[2]-f,d[3]+f]:[d[0]-f,d[1]+f];s&&(i=s.toGlobalCoord(s.dataToCoord(0)),g[p.onZero]=Math.max(Math.min(i,g[1]),g[0])),r.position=["y"===h?g[p[u]]:d[0],"x"===h?g[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?g[p[l]]-g[p.onZero]:0,e.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),H(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}sm.registerAxisPointerClass=function(t,e){if(T&&hm[t])throw new Error("axisPointer "+t+" exists");hm[t]=e},sm.getAxisPointerClass=function(t){return t&&hm[t]};var dm=["axisLine","axisTickLabel","axisName"],pm=["splitArea","splitLine"],fm=sm.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var o,a,r,s=this._axisGroup;this._axisGroup=new cn,this.group.add(this._axisGroup),e.get("show")&&(a=cm(o=e.getCoordSysModel(),e),r=new jg(e,a),z(dm,r.add,r),this._axisGroup.add(r.getGroup()),z(pm,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),xs(s,this._axisGroup,e),fm.superCall(this,"render",e,t,n,i))},remove:function(){this._splitAreaColors=null},_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 f=n.toGlobalCoord(u[p].coord);s?(h[0]=f,h[1]=r.y,c[0]=f,c[1]=r.y+r.height):(h[0]=r.x,h[1]=f,c[0]=r.x+r.width,c[1]=f);var g=l++%a.length,m=u[p].tickValue;this._axisGroup.add(new _r(Fr({anid:null!=m?"line_"+u[p].tickValue:null,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:O({stroke:a[g]},d),silent:!0})))}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),a=o.get("color"),r=e.coordinateSystem.getRect(),s=n.getTicksCoords({tickModel:i,clamp:!0});if(s.length){var l=a.length,u=this._splitAreaColors,h=tt(),c=0;if(u)for(var d=0;d<s.length;d++){var p=u.get(s[d].tickValue);if(null!=p){c=(p+(l-1)*d)%l;break}}for(var f=n.toGlobalCoord(s[0].coord),g=o.getAreaStyle(),a=C(a)?a:[a],d=1;d<s.length;d++){var m,v,y,x,_=n.toGlobalCoord(s[d].coord),f=n.isHorizontal()?(m=f,v=r.y,y=_-m,x=r.height,m+y):(m=r.x,v=f,y=r.width,v+(x=_-v)),w=s[d-1].tickValue;null!=w&&h.set(w,c),this._axisGroup.add(new xr({anid:null!=w?"area_"+w:null,shape:{x:m,y:v,width:y,height:x},style:O({fill:a[c]},g),silent:!0})),c=(c+1)%l}this._splitAreaColors=h}}}});fm.extend({type:"xAxis"}),fm.extend({type:"yAxis"}),Id({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new xr({shape:t.coordinateSystem.getRect(),style:O({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),md(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),wd(bg("line","circle","line")),_d(Sg("line")),vd(Cc.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t){var e,n,i,o,a,r,s=t.getData(),l=t.get("sampling"),u=t.coordinateSystem;"cartesian2d"===u.type&&l&&(e=u.getBaseAxis(),n=u.getOtherAxis(e),o=(i=e.getExtent())[1]-i[0],1<(a=Math.round(s.count()/o))&&("string"==typeof l?r=Ig[l]:"function"==typeof l&&(r=l),r&&t.setData(s.downSample(s.mapDimension(n.dim),1/a,r,Mg))))}});var gm=ah.extend({type:"series.__base_bar__",getInitialData:function(){return rp(this.getSource(),this)},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 mm(t,e,n,i,o,a){as(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:zf(o.getData(),a),isRectText:!0,autoColor:i}),vm(t),vm(e)}function vm(t,e){"outside"===t.textPosition&&(t.textPosition=e)}gm.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}});var ym=Po([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),xm=["itemStyle","barBorderWidth"];k(Cs.prototype,{getBarItemStyle:function(t){var e,n=ym(this,t);return!this.getBorderLineDash||(e=this.getBorderLineDash())&&(n.lineDash=e),n}}),Td({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):T&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){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(a){var r,s=this.group,l=a.getData(),u=this._data,h=a.coordinateSystem,t=h.getBaseAxis();"cartesian2d"===h.type?r=t.isHorizontal():"polar"===h.type&&(r="angle"===t.dim);var c=a.isAnimationEnabled()?a:null;l.diff(u).add(function(t){var e,n,i;l.hasValue(t)&&(e=l.getItemModel(t),n=Sm[h.type](l,t,e),i=_m[h.type](l,t,e,n,r,c),l.setItemGraphicEl(t,i),s.add(i),Mm(i,l,t,e,n,a,r,"polar"===h.type))}).update(function(t,e){var n,i,o=u.getItemGraphicEl(e);l.hasValue(t)?(n=l.getItemModel(t),i=Sm[h.type](l,t,n),o?fs(o,{shape:i},c,t):o=_m[h.type](l,t,n,i,r,c,!0),l.setItemGraphicEl(t,o),s.add(o),Mm(o,l,t,n,i,a,r,"polar"===h.type)):s.remove(o)}).remove(function(t){var e=u.getItemGraphicEl(t);"cartesian2d"===h.type?e&&wm(t,c,e):e&&bm(t,c,e)}).execute(),this._data=l},_renderLarge:function(t){this._clear(),Am(t,this.group)},_incrementalRenderLarge:function(t,e){Am(e,this.group,!0)},dispose:nt,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(t){("sector"===t.type?bm:wm)(t.dataIndex,e,t)}):t.removeAll(),this._data=null}});var _m={cartesian2d:function(t,e,n,i,o,a,r){var s,l,u=new xr({shape:k({},i)});return a&&(s=o?"height":"width",l={},u.shape[s]=0,l[s]=i[s],bs[r?"updateProps":"initProps"](u,{shape:l},a,e)),u},polar:function(t,e,n,i,o,a,r){var s,l,u=i.startAngle<i.endAngle,h=new pr({shape:O({clockwise:u},i)});return a&&(s=o?"r":"endAngle",l={},h.shape[s]=o?0:i.startAngle,l[s]=i[s],bs[r?"updateProps":"initProps"](h,{shape:l},a,e)),h}};function wm(t,e,n){n.style.text=null,fs(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function bm(t,e,n){n.style.text=null,fs(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}var Sm={cartesian2d:function(t,e,n){var i,o,a=t.getItemLayout(e),r=(i=a,o=n.get(xm)||0,Math.min(o,Math.abs(i.width),Math.abs(i.height))),s=0<a.width?1:-1,l=0<a.height?1:-1;return{x:a.x+s*r/2,y:a.y+l*r/2,width:a.width-s*r,height:a.height-l*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Mm(t,e,n,i,o,a,r,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),h=i.getModel("itemStyle"),c=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",h.get("barBorderRadius")||0),t.useStyle(O({fill:l,opacity:u},h.getBarItemStyle()));var d=i.getShallow("cursor");d&&t.attr("cursor",d);r?o.height:o.width;s||mm(t.style,c,i,l,a,n),is(t,c)}var Im=Ua.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__valueIdx,a=0;a<n.length;a+=2)i[this.__valueIdx]=n[a+o],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}});function Am(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=new Im({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:o,__valueIdx:a});e.add(c),r=c,s=t,u=(l=i).getVisual("borderColor")||l.getVisual("color"),h=s.getModel("itemStyle").getItemStyle(["color","borderColor"]),r.useStyle(h),r.style.fill=null,r.style.stroke=u,r.style.lineWidth=l.getLayout("barWidth")}_d(R(Dp,"bar")),_d(Cp),wd({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function Tm(t,e,n){e=C(e)?{coordDimensions:e}:k({},e);var i=t.getSource(),o=np(i,e),a=new Hd(o,t);return a.initData(i,n),a}var Dm={updateSelectedMap:function(t){this._targetList=C(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},tt())},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}},Cm=Ad({type:"series.pie",init:function(t){Cm.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Cm.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return Tm(this,["value"])},_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:Wu(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=Cm.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Ws(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){lo(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,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});function Lm(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){km(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,n)})}function km(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 Pm(t,e){cn.call(this);var n=new pr({z2:2}),i=new yr,o=new ur;function a(){i.ignore=i.hoverIgnore,o.ignore=o.hoverIgnore}function r(){i.ignore=i.normalIgnore,o.ignore=o.normalIgnore}this.add(n),this.add(i),this.add(o),this.updateData(t,e,!0),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}b(Cm,Dm);var Nm=Pm.prototype;Nm.updateData=function(t,e,n){var i=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=k({},r);s.label=null,n?(i.setShape(s),"scale"===o.getShallow("animationType")?(i.shape.r=r.r0,gs(i,{shape:{r:r.r}},o,e)):(i.shape.endAngle=r.startAngle,fs(i,{shape:{endAngle:r.endAngle}},o,e))):fs(i,{shape:s},o,e);var l=t.getItemVisual(e,"color");i.useStyle(O({lineJoin:"bevel",fill:l},a.getModel("itemStyle").getItemStyle())),i.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle();var u=a.getShallow("cursor");function h(){i.stopAnimation(!0),i.animateTo({shape:{r:r.r+o.get("hoverOffset")}},300,"elasticOut")}function c(){i.stopAnimation(!0),i.animateTo({shape:{r:r.r}},300,"elasticOut")}u&&i.attr("cursor",u),km(this,t.getItemLayout(e),o.isSelected(null,e),o.get("selectedOffset"),o.get("animation")),i.off("mouseover").off("mouseout").off("emphasis").off("normal"),a.get("hoverAnimation")&&o.isAnimationEnabled()&&i.on("mouseover",h).on("mouseout",c).on("emphasis",h).on("normal",c),this._updateLabel(t,e),is(this)},Nm._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");fs(n,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),fs(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");as(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,opacity:t.getItemVisual(e,"opacity")}),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,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(h.getModel("lineStyle").getLineStyle()),n.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=h.get("smooth");d&&!0===d&&(d=.4),n.setShape({smooth:d})},w(Pm,cn);function Om(n,t){z(t,function(a){a.update="updateView",yd(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}})})}function Em(i){return{getTargetSeries:function(t){var e={},n=tt();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(o){var a=o.getRawData(),r={},s=o.getData();s.each(function(t){var e=s.getRawIndex(t);r[e]=t}),a.each(function(t){var e,n=r[t],i=null!=n&&s.getItemVisual(n,"color",!0);i?a.setItemVisual(t,"color",i):(e=a.getItemModel(t).get("itemStyle.color")||o.getColorFromPalette(a.getName(t)||t+"",o.__paletteScope,a.count()),a.setItemVisual(t,"color",e),null!=n&&s.setItemVisual(n,"color",e))})}}}yh.extend({type:"pie",init:function(){var t=new cn;this._sectorGroup=t},render:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,f;i&&i.from===this.uid||(o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=R(Lm,this.uid,t,s,n),c=t.get("selectedMode"),o.diff(a).add(function(t){var e=new Pm(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",h),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(o,t),n.off("click"),c&&n.on("click",h),r.add(n),o.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&l&&0<o.count()&&"scale"!==u?(d=o.getItemLayout(0),p=Math.max(n.getWidth(),n.getHeight())/2,f=P(r.removeClipPath,r),r.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,f,t))):r.removeClipPath(),this._data=o)},dispose:function(){},_createClipPath:function(t,e,n,i,o,a,r){var s=new pr({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:o}});return gs(s,{shape:{endAngle:i+(o?1:-1)*Math.PI*2}},r,a),s},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}}});function Rm(o,t,e,n,i,a,r){function s(t,e){for(var n=t;0<=n&&(o[n].y-=e,!(0<n&&o[n].y>o[n-1].y+o[n-1].height));n--);}function l(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++){"center"!==t[c].position&&(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 u,h=0,c=o.length,d=[],p=[],f=0;f<c;f++)(u=o[f].y-h)<0&&function(t,e,n){for(var i=t;i<e;i++)if(o[i].y+=n,t<i&&i+1<e&&o[i+1].y>o[i].y+o[i].height)return s(i,n/2);s(e-1,n/2)}(f,c,-u),h=o[f].y+o[f].height;r-h<0&&s(c-1,h-r);for(f=0;f<c;f++)o[f].y>=e?p.push(o[f]):d.push(o[f]);l(d,!1,t,e,n,i),l(p,!0,t,e,n,i)}function zm(M,I,t,e){var A,T,D=M.getData(),C=[],L=!1;D.each(function(t){var e=D.getItemLayout(t),n=D.getItemModel(t),i=n.getModel("label"),o=i.get("position")||n.get("emphasis.label.position"),a=n.getModel("labelLine"),r=a.get("length"),s=a.get("length2"),l=(e.startAngle+e.endAngle)/2,u=Math.cos(l),h=Math.sin(l);A=e.cx,T=e.cy;var c,d,p,f,g,m,v,y,x="inside"===o||"inner"===o,_="center"===o?(m=e.cx,v=e.cy,"center"):(m=(c=(x?(e.r+e.r0)/2*u:e.r*u)+A)+3*u,v=(d=(x?(e.r+e.r0)/2*h:e.r*h)+T)+3*h,x||(m=(g=(p=c+u*(r+I-e.r))+(u<0?-1:1)*s)+(u<0?-5:5),y=[[c,d],[p,v=f=d+h*(r+I-e.r)],[g,f]]),x?"center":0<u?"left":"right"),w=i.getFont(),b=i.get("rotate")?u<0?-l+Math.PI:-l:0,S=jn(M.getFormattedLabel(t,"normal")||D.getName(t),w,_,"top");L=!!b,e.label={x:m,y:v,position:o,height:S.height,len:r,len2:s,linePoints:y,textAlign:_,verticalAlign:"middle",rotation:b,inside:x},x||C.push(e.label)}),!L&&M.get("avoidLabelOverlap")&&function(t,e,n,i,o){for(var a=[],r=[],s=0;s<t.length;s++)t[s].x<e?a.push(t[s]):r.push(t[s]);for(Rm(r,e,n,i,1,0,o),Rm(a,e,n,i,-1,0,o),s=0;s<t.length;s++){var l,u=t[s].linePoints;u&&(l=u[1][0]-u[2][0],t[s].x<e?u[2][0]=t[s].x+3:u[2][0]=t[s].x-3,u[1][1]=u[2][1]=t[s].y,u[1][0]=u[2][0]+l)}}(C,A,T,I,e)}function Bm(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})}}}var Vm=2*Math.PI,Gm=Math.PI/180;Om("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),wd(Em("pie")),_d(R(function(t,e,A){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),n=t.get("center"),i=t.get("radius");C(i)||(i=[0,i]),C(n)||(n=[n,n]);var a=A.getWidth(),r=A.getHeight(),s=Math.min(a,r),l=Rs(n[0],a),u=Rs(n[1],r),h=Rs(i[0],s/2),c=Rs(i[1],s/2),d=-t.get("startAngle")*Gm,p=t.get("minAngle")*Gm,f=0;o.each(e,function(t){isNaN(t)||f++});var g=o.getSum(e),m=Math.PI/(g||f)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=o.getDataExtent(e);_[0]=0;var w,b=Vm,S=0,M=d,I=v?1:-1;o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:l,cy:u,r0:h,r:y?NaN:c}):((n="area"!==y?0===g&&x?m:t*m:Vm/f)<p?b-=n=p:S+=t,i=M+I*n,o.setItemLayout(e,{angle:n,startAngle:M,endAngle:i,clockwise:v,cx:l,cy:u,r0:h,r:y?Es(t,_,[h,c]):c}),M=i)}),b<Vm&&f&&(b<=.001?(w=Vm/f,o.each(e,function(t,e){var n;isNaN(t)||((n=o.getItemLayout(e)).angle=w,n.startAngle=d+I*e*w,n.endAngle=d+I*(e+1)*w)})):(m=b/S,M=d,o.each(e,function(t,e){var n,i;isNaN(t)||(i=(n=o.getItemLayout(e)).angle===p?p:t*m,n.startAngle=M,n.endAngle=M+I*i,M+=I*i)}))),zm(t,c,0,r)})},"pie")),vd(Bm("pie")),ah.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return rp(this.getSource(),this)},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}}});var Fm=Er({shape:{points:null},symbolProxy: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)||(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)||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 Wm(){this.group=new cn}var Hm=Wm.prototype;function Zm(t,e,n){Pf.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function Um(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=L(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new Zm(n,new xp);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}Hm.isPersistent=function(){return!this._incremental},Hm.updateData=function(t){this.group.removeAll();var e=new Fm({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Hm.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)}))},Hm.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Cr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Hm.incrementalUpdate=function(t,e){var n;this._incremental?(n=new Fm,this._incremental.addDisplayable(n,!0)):((n=new Fm({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},Hm._setCommon=function(n,t,e){var i=t.hostModel,o=t.getVisual("symbolSize");n.setShape("size",o instanceof Array?o:[o,o]),n.symbolProxy=df(t.getVisual("symbol"),0,0,0,0),n.setColor=n.symbolProxy.setColor;var a=n.shape.size[0]<4;n.useStyle(i.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=t.getVisual("color");r&&n.setColor(r),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||0))}))},Hm.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hm._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Td({type:"scatter",render:function(t){var e=t.getData();this._updateSymbolDraw(e,t).updateData(e),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData();this._updateSymbolDraw(e,t).incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||1e4<e.count()||!this._symbolDraw.isPersistent())return{update:!0};var n=Sg().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_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?Wm:$f),this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),wd(bg("scatter","circle")),_d(Sg("scatter")),w(Zm,Pf),Um.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Um.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},Um.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},Um.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.coodToData(i))]},Um.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),a=Math.min(i,o)/2;this.cx=Rs(n[0],i),this.cy=Rs(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=Rs(r[0],a),this.r=Rs(r[1],a),z(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)},Um.prototype.update=function(i,t){var o=this._indicatorAxes,a=this._model;z(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(),z(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this);var p=a.get("splitNumber");function f(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}z(o,function(t,e){var n=Kp(t.scale,t.model);$p(t.scale,t.model);var i,o,a=t.model,r=t.scale,s=a.getMin(),l=a.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/p);else if(null!=s)for(;i=s+u*p,r.setExtent(+s,i),r.setInterval(u),u=f(u),i<n[1]&&isFinite(i)&&isFinite(n[1]););else if(null!=l)for(;o=l-u*p,r.setExtent(o,+l),r.setInterval(u),u=f(u),o>n[0]&&isFinite(o)&&isFinite(n[0]););else{var h=r.getTicks().length-1;p<h&&(u=f(u));var c=Math.round((n[0]+n[1])/2/u)*u,d=Math.round(p/2);r.setExtent(zs(c-d*u),zs(c+(p-d)*u)),r.setInterval(u)}})},Um.dimensions=[],Um.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new Um(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},su.register("radar",Um);var Xm=kg.valueAxis;function jm(t,e){return O({show:e},t)}Md({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("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),f=this.get("triggerEvent"),t=L(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=h;null!=t.color&&(n=O({color:t.color},h)),t=m(D(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisLabel:u,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:n,triggerEvent:f},!1),c||(t.name=""),"string"==typeof d?(e=t.name,t.name=d.replace("{value}",null!=e?e:"")):"function"==typeof d&&(t.name=d(t.name,t));var i=k(new Cs(t,null,this.ecModel),nf);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"}},Xm.axisLine),axisLabel:jm(Xm.axisLabel,!1),axisTick:jm(Xm.axisTick,!1),splitLine:jm(Xm.splitLine,!0),splitArea:jm(Xm.splitArea,!0),indicator:[]}});var Ym=["axisLine","axisTickLabel","axisName"];Id({type:"radar",render:function(t){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;z(L(e.getIndicatorAxes(),function(t){return new jg(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){z(Ym,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 f=e[0].getTicksCoords(),g=i.cx,m=i.cy,v=0;v<f.length;v++){l&&d[I(d,h,v)].push(new cr({shape:{cx:g,cy:m,r:f[v].coord}})),u&&v<f.length-1&&p[I(p,c,v)].push(new fr({shape:{cx:g,cy:m,r0:f[v].coord,r:f[v+1].coord}}))}else for(var y,x=L(e,function(t,e){var n=t.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),L(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()):T&&console.error("Can't draw value axis "+v),l&&d[I(d,h,v)].push(new yr({shape:{points:w}})),u&&_&&p[I(p,c,v-1)].push(new vr({shape:{points:w.concat(_)}})),_=w.slice().reverse()}var S=r.getLineStyle(),M=s.getAreaStyle();z(p,function(t,e){this.group.add(Vr(t,{style:O({stroke:"none",fill:c[e%c.length]},M),silent:!0}))},this),z(d,function(t,e){this.group.add(Vr(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 qm=ah.extend({type:"series.radar",dependencies:["radar"],init:function(t){qm.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(){return Tm(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(i){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(i);return al(""===e?this.name:e)+"<br/>"+L(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return al(t.name+" : "+n)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Td({type:"radar",render:function(l){var e=l.coordinateSystem,v=this.group,y=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=df(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]),bs[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),n.add(s))}}function c(t){return L(t,function(t){return[e.cx,e.cy]})}y.diff(s).add(function(t){var e,n,i,o,a,r=y.getItemLayout(t);r&&(e=new vr,n=new yr,i={shape:{points:r}},e.shape.points=c(r),n.shape.points=c(r),gs(e,i,l,t),gs(n,i,l,t),o=new cn,a=new cn,o.add(n),o.add(e),o.add(a),h(n.shape.points,r,a,y,t,!0),y.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:y.getItemLayout(t)}};r.shape.points&&(h(i.shape.points,r.shape.points,a,y,t,!1),fs(i,r,l),fs(o,r,l),y.setItemGraphicEl(t,n))}).remove(function(t){v.remove(s.getItemGraphicEl(t))}).execute(),y.eachItemGraphicEl(function(t,e){var n=y.getItemModel(e),i=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=y.getItemVisual(e,"color");v.add(t),i.useStyle(O(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var s=n.getModel("areaStyle"),l=n.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=n.getModel("itemStyle").getItemStyle(["color"]),d=n.getModel("emphasis.itemStyle").getItemStyle(),p=n.getModel("label"),f=n.getModel("emphasis.label");function g(){o.attr("ignore",h)}function m(){o.attr("ignore",u)}a.eachChild(function(t){t.setStyle(c),t.hoverStyle=D(d),as(t.style,t.hoverStyle,p,f,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:r,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",g).on("mouseover",g).on("normal",m).on("mouseout",m),is(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});wd(Em("radar")),wd(bg("radar","circle")),_d(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){for(var o=i.getIndicatorAxes(),a=0;a<o.length;a++)e.each(e.mapDimension(o[a].dim),r);e.each(function(t){n[t][0]&&n[t].push(n[t][0].slice()),e.setItemLayout(t,n[t])})}function r(t,e){n[e]=n[e]||[],n[e][a]=i.dataToPoint(t,a)}})}),vd(Bm("radar")),md(function(n){var i,t=n.polar;t&&(C(t)||(t=[t]),i=[],z(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),z(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});var Km=wt;function $m(){ne.call(this)}function Jm(t){this.name=t,this.zoomLimit,ne.call(this),this._roamTransformable=new $m,this._rawTransformable=new $m,this._center,this._zoom}function Qm(t,e,n,i){var o=n.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](i):null}b($m,ne),Jm.prototype={constructor:Jm,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new hn(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 hn(t,e,n,i)},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new hn(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=wt([],i,t),n=wt([],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(),Xt(this.transform||(this.transform=[]),e.transform||Zt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],$t(this.invTransform,this.transform),this.decomposeTransform()},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?Km(n,t,i):rt(n,t)},pointToData:function(t){var e=this.invTransform;return e?Km([],t,e):[t[0],t[1]]},convertToPixel:R(Qm,"dataToPoint"),convertFromPixel:R(Qm,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},b(Jm,ne);for(var tv=[126,25],ev=[[[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]]],nv=0;nv<ev.length;nv++)for(var iv=0;iv<ev[nv].length;iv++)ev[nv][iv][0]/=10.5,ev[nv][iv][1]/=-14,ev[nv][iv][0]+=tv[0],ev[nv][iv][1]+=tv[1];var ov={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},av={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},rv=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],sv=vo(),lv={load:function(h,t){var e=sv(t).parsed;if(e)return e;var n,i,c=t.specialAreas||{},o=t.geoJSON;try{n=o?_f(o):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return z(n,function(t){var e,n,i,o,a,r,s,l=t.name;e=t,"china"!==h||(n=ov[e.name])&&((i=e.center)[0]+=n[0]/10.5,i[1]+=-n[1]/14),o=t,"world"!==h||(a=av[o.name])&&((r=o.center)[0]=a[0],r[1]=a[1]),s=t,"china"===h&&"台湾"===s.name&&s.geometries.push({type:"polygon",exterior:rv[0]});var u=c[l];u&&t.transformTo(u.left,u.top,u.width,u.height)}),i=n,"china"===h&&i.push(new yf("南海诸岛",L(ev,function(t){return{type:"polygon",exterior:t}}),tv)),sv(t).parsed={regions:n,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}(n)}}};var uv=vo();function hv(t,e){var n,i,o,a=t.svgXML;try{Y(null!=(l=(n=a&&(i=a,o={ignoreViewBox:!0,ignoreRootClip:!0},(new lc).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 hn(0,0,0,0),null!=u&&(e.width=u),null!=h&&(e.height=h)),c&&(r=xc(c,e.width,e.height),s=l,(l=new cn).add(s),s.scale=r.scale,s.position=r.position),l.setClipPath(new xr({shape:e.plain()})),{root:l,boundingRect:e}}var cv={geoJSON:lv,svg:{load:function(t,e){var n=uv(e).originRoot;if(n)return{root:n,boundingRect:uv(e).boundingRect};var i=hv(e);return uv(e).originRoot=i.root,uv(e).boundingRect=i.boundingRect,i},makeGraphic:function(t,e,n){var i=uv(e),o=i.rootMap||(i.rootMap=tt());if(s=o.get(n))return s;var a=i.originRoot,r=i.boundingRect,s=i.originRootHostKey?hv(e,r).root:(i.originRootHostKey=n,a);return o.set(n,s)},removeGraphic:function(t,e,n){var i=uv(e),o=i.rootMap;o&&o.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},dv={load:function(i,o){var a,r=[],s=tt(),l=tt();return z(fv(i),function(t){var e=cv[t.type].load(i,t);z(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),r.push(t),s.set(e,t),l.set(e,t.center)});var n=e.boundingRect;n&&(a?a.union(n):a=n.clone())}),{regions:r,regionsMap:s,nameCoordMap:l,boundingRect:a||new hn(0,0,0,0)}},makeGraphic:pv("makeGraphic"),removeGraphic:pv("removeGraphic")};function pv(a){return function(n,i){var t=fv(n),o=[];return z(t,function(t){var e=cv[t.type][a];e&&o.push(e(n,t,i))}),o}}function fv(t){var e,n=wc.retrieveMap(t)||[];return T&&(n.length||(e=t,T&&console.error("Map "+e+" not exists. You can download map file on http://echarts.baidu.com/download-map.html"))),n}function gv(t,e,n,i){Jm.call(this,t),this.map=e;var o=dv.load(e,n);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.nameCoordMap,this._invertLongitute=null==i||i,this.regions=o.regions,this._rect=o.boundingRect}function mv(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 vv(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])?T&&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=[Rs(l[0],h),Rs(l[1],c)],u=Rs(u,Math.min(h,c)),isNaN(l[0])||isNaN(l[1])||isNaN(u)?T&&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=wl(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 yv(n,t){z(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}gv.prototype={constructor:gv,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 hn(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 Jm.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:R(mv,"dataToPoint"),convertFromPixel:R(mv,"pointToData")},b(gv,Jm);var xv={dimensions:gv.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=wc.retrieveMap(n);a&&a[0]&&"svg"===a[0].type?(null==i&&(i=1),o=!1):null==i&&(i=.75);var r=new gv(n+e,n,t.get("nameMap"),o);r.aspectScale=i,r.zoomLimit=t.get("scaleLimit"),l.push(r),yv(r,t),(t.coordinateSystem=r).model=t,r.resize=vv,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))}),z(n,function(t,e){var n=new gv(e,e,g(L(t,function(t){return t.get("nameMap")})));n.zoomLimit=H.apply(null,L(t,function(t){return t.get("scaleLimit")})),l.push(n),n.resize=vv,n.aspectScale=t[0].get("aspectScale"),n.resize(t[0],s),z(t,function(t){yv(t.coordinateSystem=n,t)})}),l},getFilledRegions:function(t,e,n){for(var i=(t||[]).slice(),o=tt(),a=0;a<i.length;a++)o.set(i[a].name,i[a]);return z(dv.load(e,n).regions,function(t){var e=t.name;o.get(e)||i.push({name:e})}),i}};xd("geo",xv);var _v=ah.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){_v.superApply(this,"init",arguments),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return Tm(this,["value"])},mergeOption:function(t){_v.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this._createSelectableList())},_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:Wu(t,i,"selected")});return n=xv.getFilledRegions(n,this.getMapType(),this.option.nameMap)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(){},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=tl(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(al(o[r].name))}return a.join(", ")+"<br />"+al(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)"}}}});b(_v,Dm);var wv="\0_ec_interaction_mutex";function bv(t,e){return Sv(t)[e]}function Sv(t){return t[wv]||(t[wv]={})}function Mv(n){this.pointerChecker,this._zr=n,this._opt={};var t=P,i=t(Iv,this),o=t(Av,this),a=t(Tv,this),r=t(Dv,this),s=t(Cv,this);Dt.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=O(D(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 Iv(t){var e,n;zt(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 Av(t){var e,n,i,o,a,r;!zt(t)&&Pv("moveOnMouseMove",t,this._opt)&&this._dragging&&"pinch"!==t.gestureEvent&&!bv(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&&Rt(t.event),kv(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:i,oldY:o,newX:e,newY:n}))}function Tv(t){zt(t)||(this._dragging=!1)}function Dv(t){var e,n,i=Pv("zoomOnMouseWheel",t,this._opt),o=Pv("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,Lv(this,"zoom","zoomOnMouseWheel",t,{scale:0<a?e:1/e,originX:s,originY:l})),o&&Lv(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<a?1:-1)*(3<(n=Math.abs(a))?.4:1<n?.15:.05),originX:s,originY:l}))}function Cv(t){bv(this._zr,"globalPan")||Lv(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Lv(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(Rt(i.event),kv(t,e,n,i,o))}function kv(t,e,n,i,o){o.isAvailableBehavior=P(Pv,null,n,i),t.trigger(e,o)}function Pv(t,e,n){var i=n[t];return!t||i&&(!N(i)||e.event[i+"Key"])}function Nv(t,e,n){var i=t.target,o=i.position;o[0]+=e,o[1]+=n,i.dirty()}function Ov(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()}yd({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),b(Mv,Dt);var Ev={axisPointer:1,tooltip:1,brush:1};function Rv(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!Ev[i.mainType]&&o&&o.model!==n}function zv(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function Bv(n,t){t.eachChild(function(e){z(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function Vv(t,e){var n=new cn;this.uid=Ns("ec_map_draw"),this._controller=new Mv(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 cn),n.add(this._backgroundGroup=new cn)}function Gv(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()}}Vv.prototype={constructor:Vv,draw:function(x,t,e,n,i){var _="geo"===x.mainType,w=x.getData&&x.getData();_&&t.eachComponent({mainType:"series",subType:"map"},function(t){w||t.getHostGeoModel()!==x||(w=t.getData())});var o=x.coordinateSystem;this._updateBackground(o);var b=this._regionsGroup,a=this.group,S=o.scale,r={position:o.position,scale:S};!b.childAt(0)||i?a.attr(r):fs(a,r,x),b.removeAll();var s,l,u,h,c,M=["itemStyle"],I=["emphasis","itemStyle"],A=["label"],T=["emphasis","label"],D=tt();z(o.regions,function(t){var e=D.get(t.name)||D.set(t.name,new cn),n=new Ar({shape:{paths:[]}});e.add(n);var i,o,a=x.getRegionModel(t.name)||x,r=a.getModel(M),s=a.getModel(I),l=zv(r),u=zv(s),h=a.getModel(A),c=a.getModel(T);w&&(i=w.indexOfName(t.name),(o=w.getItemVisual(i,"color",!0))&&(l.fill=o)),z(t.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new vr({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new vr({shape:{points:t.interiors[e]}}))}}),n.setStyle(l),n.style.strokeNoScale=!0,n.culling=!0;var d,p,f,g=h.get("show"),m=c.get("show"),v=w&&isNaN(w.get(w.mapDimension("value"),i)),y=w&&w.getItemLayout(i);(_||v&&(g||m)||y&&y.showLabel)&&(d=_?t.name:i,(!w||0<=i)&&(p=x),as((f=new ur({position:t.center.slice(),scale:[1/S[0],1/S[1]],z2:10,silent:!0})).style,f.hoverStyle={},h,c,{labelFetcher:p,labelDataIndex:d,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(f)),w?w.setItemGraphicEl(i,e):(a=x.getRegionModel(t.name),n.eventData={componentType:"geo",componentIndex:x.componentIndex,geoIndex:x.componentIndex,name:t.name,region:a&&a.option||{}}),(e.__regions||(e.__regions=[])).push(t),is(e,u,{hoverSilentOnTouch:!!x.get("selectedMode")}),b.add(e)}),this._updateController(x,t,e),s=this,l=x,h=e,c=n,(u=b).off("click"),u.off("mousedown"),l.get("selectedMode")&&(u.on("mousedown",function(){s._mouseDownFlag=!0}),u.on("click",function(t){if(s._mouseDownFlag){s._mouseDownFlag=!1;for(var e,n=t.target;!n.__regions;)n=n.parent;n&&((e={type:("geo"===l.mainType?"geo":"map")+"ToggleSelect",batch:L(n.__regions,function(t){return{name:t.name,from:c.uid}})})[l.mainType+"Id"]=l.id,h.dispatchAction(e),Bv(l,u))}})),Bv(x,b)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&dv.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&z(dv.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,Nv(n,t.dx,t.dy),o.dispatchAction(k(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){var e;this._mouseDownFlag=!1,Ov(n,t.scale,t.originX,t.originY),o.dispatchAction(k(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)&&!Rv(t,o,i)})}},Td({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 Vv(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(v){var y=v.originalData,x=this.group;y.each(y.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,f,g,m;isNaN(t)||(n=y.getItemLayout(e))&&n.point&&(i=n.point,o=n.offset,a=new cr({style:{fill:v.getData().getVisual("color")},shape:{cx:i[0]+9*o,cy:i[1],r:3},silent:!0,z2:o?8:10}),o||(r=v.mainSeries.getData(),s=y.getName(e),l=r.indexOfName(s),u=y.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),p=Z(v.getFormattedLabel(e,"normal"),s),f=Z(v.getFormattedLabel(e,"emphasis"),p),g=function(){var t=rs({},c,{text:c.get("show")?f:null},{isRectText:!0,useInsideStyle:!1},!0);a.style.extendFrom(t),a.__mapOriginalZ2=a.z2,a.z2+=1},m=function(){rs(a.style,h,{text:h.get("show")?p:null,textPosition:h.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=a.__mapOriginalZ2&&(a.z2=a.__mapOriginalZ2,a.__mapOriginalZ2=null)},d.on("mouseover",g).on("mouseout",m).on("emphasis",g).on("normal",m),m()),x.add(a))})}}),yd({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=Gv(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&z(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})});_d(function(n){var o={};n.eachSeriesByType("map",function(t){var l,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(l={},z(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)})}),wd(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})})}),vd(Cc.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)}),z(i,function(t,e){for(var u,h,c,n=(u=L(t,function(t){return t.getData()}),h=t[0].get("mapValueCalculation"),c={},z(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]})}),md(function(t){var e=[];z(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,O(t,t.mapLocation))})}),Om("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Fv=z,Wv="\0__link_datas",Hv="\0__link_mainData";function Zv(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,qv(i,t,n),Fv(t,function(e){Fv(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,R(Uv,n))})}),i.wrapMethod("cloneShallow",R(jv,n)),Fv(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,R(Xv,n))}),Y(t[i.dataType]===i)}function Uv(t,e){var n,i;return(i=this)[Hv]===i?qv((n=k({},this[Wv]))[this.dataType]=e,n,t):Kv(e,this.dataType,this[Hv],t),e}function Xv(t,e){return t.struct&&t.struct.update(this),e}function jv(n,i){return Fv(i[Wv],function(t,e){t!==i&&Kv(t.cloneShallow(),e,i,n)}),i}function Yv(t){var e=this[Hv];return null==t||null==e?e:e[Wv][t]}function qv(n,t,i){n[Wv]={},Fv(t,function(t,e){Kv(t,e,n,i)})}function Kv(t,e,n,i){(n[Wv][e]=t)[Hv]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Yv}function $v(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 Jv(e,t,n){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=L(t||[],function(t){return new Cs(t,e,e.ecModel)}),this.leavesModel=new Cs(n||{},e,e.ecModel)}function Qv(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}function ty(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=oy(s),a=ay(a),s&&a;){o=oy(o),r=ay(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&&!oy(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!ay(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,n=t)}return n}(t,a,t.parentNode.hierNode.defaultAncestor||o[0],e)}function ey(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function ny(t){return arguments.length?t:ry}function iy(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function oy(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function ay(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function ry(t,e){return t.parentNode===e.parentNode?1:2}function sy(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function ly(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 uy(t,e,n,i,o,a){var r=!n,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),a=ly(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,f=s.getLayout();r?(n=new Bf(t,e,a)).attr("position",[p.x,p.y]):n.updateData(t,e,a),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=f.rawX,n.__radialRawY=f.rawY,i.add(n),t.setItemGraphicEl(e,n),fs(n,{position:[f.x,f.y]},o);var g,m,v,y,x,_,w,b,S=n.getSymbolPath();"radial"===a.layout&&(m=(g=u.children[0]).getLayout(),v=g.children.length,f.x===m.x&&!0===s.isExpand?((_={}).x=(g.children[0].getLayout().x+g.children[v-1].getLayout().x)/2,_.y=(g.children[0].getLayout().y+g.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(f.y-m.y,f.x-m.x))<0&&(y=2*Math.PI+y),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(x=f.x<m.x)&&(y-=Math.PI):(x=f.x>m.x)||(y-=Math.PI)),w=x?"left":"right",S.setStyle({textPosition:w,textRotation:-y,textOrigin:"center",verticalAlign:"middle"})),s.parentNode&&s.parentNode!==u&&(fs(b=(b=n.__edge)||(n.__edge=new Mr({shape:cy(a,p,p),style:O({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:cy(a,d,f),style:{opacity:1}},o),i.add(b))}function hy(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),a=ly(s,u,a),h=s.parentNode!==l&&s.parentNode||s;null==(r=h.getLayout());)h=h.parentNode!==l&&h.parentNode||h;fs(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var c=n.__edge;c&&fs(c,{shape:cy(a,r,r),style:{opacity:0}},o,function(){i.remove(c)})}function cy(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=iy(s,u),p=iy(s,u+(h-u)*t.curvature),f=iy(l,h+(u-h)*t.curvature),g=iy(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}function dy(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])}}$v.prototype={constructor:$v,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),N(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,n=this.hostTree,i=n.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),i.getModel(t,(o||e||n.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},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)}},Jv.prototype={constructor:Jv,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()}},Jv.createTree=function(t,e,n){var s=new Jv(e,n.levels,n.leaves),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 $v(e.name,s);n?Qv(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 i=np(l,{coordDimensions:["value"],dimensionsCount:u}),o=new Hd(i,e);return o.initData(l),Zv({mainData:o,struct:s,structAttr:"tree"}),s.update(),s},ah.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i={};i.leaves=n;var o=Jv.createTree(e,this,i),a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;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<=r}),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 al(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Td({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new cn,this._controller=new Mv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n){var o=i.getData(),e=i.layoutInfo,a=this._mainGroup,r=i.get("layout");"radial"===r?a.attr("position",[e.x+e.width/2,e.y+e.height/2]):a.attr("position",[e.x,e.y]),this._updateViewCoordSys(i),this._updateController(i,t,n);var s=this._data,l={expandAndCollapse:i.get("expandAndCollapse"),layout:r,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(s).add(function(t){sy(o,t)&&uy(o,t,null,a,i,l)}).update(function(t,e){var n=s.getItemGraphicEl(e);sy(o,t)?uy(o,t,n,a,i,l):n&&hy(s,e,n,a,i,l)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&hy(s,t,e,a,i,l)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===l.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=[];ha(i,e,o),o[0]-e[0]==0&&(o[0]+=1,--e[0]),o[1]-e[1]==0&&(o[1]+=1,--e[1]);var a=t.coordinateSystem=new Jm;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_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)&&!Rv(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){Nv(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Ov(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}}),yd({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})}),yd({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=Gv(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function py(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 fy(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function gy(t,e){return 0<=M(fy(t),e)}function my(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}wd(bg("tree","circle")),_d(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return wl(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,ny(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,a=n.height,ny());var s=t.getData().tree.root,l=s.children[0];{var u,h,c,d,p,f,g,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,ty,r),s.hierNode.modifier=-l.hierNode.prelim,dy(l,ey),dy(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=g=f=0,"radial"===i?(f=o/(h.getLayout().x+d+p),g=a/(c.depth-1||1),dy(l,function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=iy(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)})):"RL"===(y=t.getOrient())||"LR"===y?(g=a/(h.getLayout().x+d+p),f=o/(c.depth-1||1),dy(l,function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:o-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(f=o/(h.getLayout().x+d+p),g=a/(c.depth-1||1),dy(l,function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}(t,e)})}),ah.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/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;z(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||[],i=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;{z(t=t||[],function(t){var e=new Cs(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),o={};return o.levels=i,Jv.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=C(n)?tl(n[0]):tl(n);return al(e.getName(t)+": "+i)},getDataParams:function(t){var e=ah.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=my(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},k(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tt(),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 vy=5;function yy(t){this.group=new cn,t.add(this.group)}yy.prototype={constructor:yy,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),bl(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,f,g,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=Rs(a.x,l),c=Rs(a.y,u),d=Rs(a.x2,l),p=Rs(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=nl(s||0),{width:Math.max(d-h-s[1]-s[3],0),height:Math.max(p-c-s[0]-s[2],0)}),A=e.totalWidth,T=e.renderList,D=T.length-1;0<=D;D--){var C=T[D],L=C.node,k=C.width,P=C.text;I.width<A&&(A-=k-S,k=S,P=null);var N=new vr({shape:{points:(m=b,v=0,y=k,x=M,_=D===T.length-1,w=void 0,w=[[_?m:m-vy,v],[m+y,v],[m+y,v+x],[_?m:m-vy,v+x]],0===D||w.splice(2,0,[m+y+vy,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:R(o,L)});this.group.add(N),f=t,g=L,N.eventData={componentType:"series",componentSubType:"treemap",componentIndex:f.componentIndex,seriesIndex:f.componentIndex,seriesName:f.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:g&&g.dataIndex,name:g&&g.name},treePathInfo:g&&my(g,f)},b+=k+8}},remove:function(){this.group.removeAll()}};function xy(t){var e=Cy(t);return e.stroke=e.fill=e.lineWidth=null,e}var _y=P,wy=cn,by=xr,Sy=z,My=["label"],Iy=["emphasis","label"],Ay=["upperLabel"],Ty=["emphasis","upperLabel"],Dy=10,Cy=Po([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function Ly(){return{nodeGroup:[],background:[],content:[]}}function ky(d,u,h,c,p,n,f,t,e,i){if(f){var g=f.getLayout();if(g&&g.isInView){var s=g.width,l=g.height,m=g.borderWidth,v=g.invisible,y=f.getRawIndex(),x=t&&t.getRawIndex(),o=f.viewChildren,_=g.upperHeight,a=o&&o.length,w=f.getModel("itemStyle"),b=f.getModel("emphasis.itemStyle"),r=T("nodeGroup",wy);if(r){if(e.add(r),r.attr("position",[g.x||0,g.y||0]),r.__tmNodeWidth=s,r.__tmNodeHeight=l,g.isAboveViewRoot)return r;var S,M=T("background",by,i,1);return M&&function(t,i,o){i.dataIndex=f.dataIndex,i.seriesIndex=d.seriesIndex,i.setShape({x:0,y:0,width:s,height:l});var a=f.getVisual("borderColor",!0),r=b.get("borderColor");I(i,function(){var t=xy(w);t.fill=a;var e,n=Cy(b);n.fill=r,o?A(t,n,a,e=s-2*m,_,{x:m,y:0,width:e,height:_}):t.text=n.text=null,i.setStyle(t),is(i,n)}),t.add(i)}(r,M,a&&g.upperHeight),a||(S=T("content",by,i,2))&&function(t,n){n.dataIndex=f.dataIndex,n.seriesIndex=d.seriesIndex;var i=Math.max(s-2*m,0),o=Math.max(l-2*m,0);n.culling=!0,n.setShape({x:m,y:m,width:i,height:o});var a=f.getVisual("color",!0);I(n,function(){var t=xy(w);t.fill=a;var e=Cy(b);A(t,e,a,i,o),n.setStyle(t),is(n,e)}),t.add(n)}(r,S),r}}}function I(t,e){v?t.invisible||n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function A(t,e,n,i,o,a){var r,s=f.getModel(),l=H(d.getFormattedLabel(f.dataIndex,"normal",null,null,a?"upperLabel":"label"),s.get("name"));!a&&g.isLeafRoot&&(l=(r=d.get("drillDownIcon",!0))?r+" "+l:l);var u=s.getModel(a?Ay:My),h=s.getModel(a?Ty:Iy),c=u.getShallow("show");as(t,e,u,h,{defaultText:c?l:null,autoColor:n,isRectText:!0}),a&&(t.textRect=D(a)),t.truncate=c&&u.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function T(t,e,n,i){var o,a,r,s=null!=x&&h[t][x],l=p[t];return s?(h[t][x]=null,a=s,r=t,(l[y]={}).old="nodeGroup"===r?a.position.slice():k({},a.shape)):v||((s=new e({z:((o=n*Dy+i)-1)/o})).__tmDepth=n,function(t,e){var n=t[y]={},i=f.parentNode;{var o,a,r;!i||c&&"drillDown"!==c.direction||(a=o=0,r=p.background[i.getRawIndex()],!c&&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][y]=s}}Td({type:"treemap",init:function(){this._containerGroup,this._storage=Ly(),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=py(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 wy,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=Ly(),r=Ly(),s=this._storage,l=[],c=R(ky,e,r,s,n,a,l);!function a(r,s,l,u,h){u?Sy(s=r,function(t,e){t.isRemoved()||n(e,e)}):new Cd(s,r,t,t).add(n).update(n).remove(R(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=Ly(),(u=s)&&Sy(u,function(t,e){var n=h[e];Sy(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=i,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){Sy(d,function(t){Sy(t,function(t){t.parent&&t.parent.remove(t)})}),Sy(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 N(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())}}},Sy(a.willDeleteEls,function(t,r){Sy(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))})}),Sy(this._storage,function(t,o){Sy(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=k({},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(_y(function(){this._state="ready",a.renderFinally()},this)).start())},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Mv(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",_y(this._onPan,this)),e.on("zoom",_y(this._onZoom,this)));var i=new hn(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 hn(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,n-=r.y;var s=Zt();Yt(s,s,[-e,-n]),Kt(s,s,[t.scale,t.scale]),Yt(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&&window.open(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 yy(this.group))).render(e,t,n.node,_y(function(t){"animating"!==this._state&&(gy(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ly(),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 Py=function(){},Ny=["treemapZoomToNode","treemapRender","treemapMove"],Oy=0;Oy<Ny.length;Oy++)yd({type:Ny[Oy],update:"updateView"},Py);yd({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n=py(o,["treemapZoomToNode","treemapRootToNode"],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=gy(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var Ey=z,Ry=B,zy=-1,By=function(t){var e=t.mappingMethod,n=t.type,i=this.option=D(t);this.type=n,this.mappingMethod=e,this._normalizeData=qy[e];var o,a,r=Vy[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(Gy(i),a=(o=i).pieceList,o.hasSpecialVisual=!1,z(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;Ey(e,function(t,e){i[t]=e}),C(n)||(o=[],B(n)?Ey(n,function(t,e){var n=i[e];o[null!=n?n:zy]=t}):o[zy]=n,n=Yy(t,o))}for(var a=e.length-1;0<=a;a--)null==n[a]&&(delete i[e[a]],e.pop())}(i):Gy(i,!0):(Y("linear"!==e||i.dataExtent),Gy(i))};By.prototype={constructor:By,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return P(this._normalizeData,this)}};var Vy=By.visualHandlers={color:{applyVisual:Hy("color"),getColorMapper:function(){var o=this.option;return P("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),Zy.call(this,t)}:function(t,e,n){var i=!!n;return e||(t=this._normalizeData(t)),n=Le(t,o.parsedVisual,n),i?n:Oe(n,"rgba")},this)},_doMap:{linear:function(t){return Oe(Le(t,this.option.parsedVisual),"rgba")},category:Zy,piecewise:function(t,e){var n=jy.call(this,e);return null==n&&(n=Oe(Le(t,this.option.parsedVisual),"rgba")),n},fixed:Uy}},colorHue:Fy(function(t,e){return Pe(t,e)}),colorSaturation:Fy(function(t,e){return Pe(t,null,e)}),colorLightness:Fy(function(t,e){return Pe(t,null,null,e)}),colorAlpha:Fy(Ne),opacity:{applyVisual:Hy("opacity"),_doMap:Xy([0,1])},liftZ:{applyVisual:Hy("liftZ"),_doMap:{linear:Uy,category:Uy,piecewise:Uy,fixed:Uy}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(N(i))n("symbol",i);else if(Ry(i))for(var o in i)i.hasOwnProperty(o)&&n(o,i[o])},_doMap:{linear:Wy,category:Zy,piecewise:function(t,e){var n=jy.call(this,e);return null==n&&(n=Wy.call(this,t)),n},fixed:Uy}},symbolSize:{applyVisual:Hy("symbolSize"),_doMap:Xy([0,1])}};function Gy(t,e){var n=t.visual,i=[];B(n)?Ey(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]),Yy(t,i)}function Fy(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:Xy([0,1])}}function Wy(t){var e=this.option.visual;return e[Math.round(Es(t,[0,1],[0,e.length-1],!0))]||{}}function Hy(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function Zy(t){var e=this.option.visual;return e[this.option.loop&&t!==zy?t%e.length:t]}function Uy(){return this.option.visual[0]}function Xy(i){return{linear:function(t){return Es(t,i,this.option.visual,!0)},category:Zy,piecewise:function(t,e){var n=jy.call(this,e);return null==n&&(n=Es(t,i,this.option.visual,!0)),n},fixed:Uy}}function jy(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[By.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function Yy(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=L(e,function(t){return Ae(t)})),e}var qy={linear:function(t){return Es(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=By.findPieceIndex(t,e,!0);if(null!=n)return Es(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?zy:e},fixed:nt};function Ky(t,e,n){return t?e<=n:e<n}By.listVisualTypes=function(){var n=[];return z(Vy,function(t,e){n.push(e)}),n},By.addVisualHandler=function(t,e){Vy[t]=e},By.isValidType=function(t){return Vy.hasOwnProperty(t)},By.eachVisual=function(t,e,n){B(t)?z(t,e,n):e.call(n,t)},By.mapVisual=function(t,i,o){var a,r=C(t)?[]:B(t)?{}:(a=!0,null);return By.eachVisual(t,function(t,e){var n=i.call(o,t,e);a?r=n:r[e]=n}),r},By.retrieveVisuals=function(n){var i,o={};return n&&Ey(Vy,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},By.prepareVisualTypes=function(t){if(Ry(t)){var n=[];Ey(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},By.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},By.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(Ky(h[1],i,u[1]))return n}else if(u[1]===1/0){if(Ky(h[0],u[0],i))return n}else if(Ky(h[0],u[0],i)&&Ky(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 $y=C,Jy="itemStyle",Qy={seriesType:"treemap",reset:function(t){var e=t.getData().tree,n=e.root,i=t.getModel(Jy);n.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(Jy);var h=o[t.depth];var c=tx(u,e,h,a);var d=u.get("borderColor");var p=u.get("borderColorSaturation");var f;null!=p&&(f=ex(c),g=p,d=null!=(m=f)?Pe(m,null,null,g):null);var g,m;t.setVisual("borderColor",d);var v=t.viewChildren;{var y;v&&v.length?(y=ix(0,l,n,0,c,v),z(v,function(t,e){var n;(t.depth>=r.length||t===r[t.depth])&&(n=ax(l,c,t,e,y,s),i(t,n,o,a,r,s))})):(f=ex(c),t.setVisual("color",f))}}(n,{},L(e.levelModels,function(t){return t?t.get(Jy):null}),i,t.getViewRoot().getAncestors(),t)}};function tx(n,i,o,a){var r=k({},i);return z(["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 ex(t){var e=nx(t,"color");if(e){var n=nx(t,"colorAlpha"),i=nx(t,"colorSaturation");return i&&(e=Pe(e,null,null,i)),n&&(e=Ne(e,n)),e}}function nx(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ix(t,e,n,i,o,a){if(a&&a.length){var r=ox(e,"color")||null!=o.color&&"none"!==o.color&&(ox(e,"colorAlpha")||ox(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 By(c);return d.__drColorMappingBy=h,d}}}function ox(t,e){var n=t.get(e);return $y(n)&&n.length?{name:e,range:n}:null}function ax(t,e,n,i,o,a){var r,s,l,u=k({},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 rx=Math.max,sx=Math.min,lx=H,ux=z,hx=["itemStyle","borderWidth"],cx=["itemStyle","gapWidth"],dx=["upperLabel","show"],px=["upperLabel","height"],fx={seriesType:"treemap",reset:function(t,e,n,i){var o,a,r,s,l=n.getWidth(),u=n.getHeight(),h=t.option,c=wl(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),d=h.size||[],p=Rs(lx(c.width,d[0]),l),f=Rs(lx(c.height,d[1]),u),g=i&&i.type,m=py(i,["treemapZoomToNode","treemapRootToNode"],t),v="treemapRender"===g||"treemapMove"===g?i.rootRect:null,y=t.getViewRoot(),x=fy(y);"treemapMove"!==g&&(o="treemapZoomToNode"===g?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 f=r.getValue();if(0===f)return s;u*=h/f;var g=a.getModel(),m=g.get(hx),v=Math.max(m,yx(g));u+=4*m*m+(3*m+v)*Math.pow(u,.5),Hs<u&&(u=Hs),r=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[i*y,o*y]}(t,m,y,p,f):v?[v.width,v.height]:[p,f],(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(hx);var h=l.get(cx)/2;var c=yx(l);var d=Math.max(u,c);var p=u-h;var f=d-h;var l=e.getModel();e.setLayout({borderWidth:u,upperHeight:d,upperLabelHeight:c},!0);a=rx(a-2*p,0);r=rx(r-p-f,0);var g=a*r;var m=gx(e,l,g,n,i,o);if(!m.length)return;var v={x:p,y:f,width:a,height:r};var y=sx(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=mx(_,y,n.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,vx(_,y,v,h,!1),y=sx(v.width,v.height),1/(_.length=_.area=0))}_.length&&vx(_,y,v,h,!0);{var I;i||null!=(I=l.get("childrenVisibleMin"))&&g<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(),ux(x,function(t,e){var n=(x[e+1]||y).getValue();t.setLayout(k({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 hn(n.x-r.x,n.y-r.y,n.width,n.height);ux(t.viewChildren||[],function(t){e(t,u,i,o,a+1)})}(_,new hn(-c.x,-c.y,l,u),x,y,0)}};function gx(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],ux(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 f=r[d].getValue()/c.sum*n;r[d].setLayout({area:f})}return h&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:c.dataExtent},!0),r}function mx(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?rx(u*o/l,l/(u*a)):1/0}function vx(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],f={},g=h?p.getLayout().area/h:0,m=f[l[r]]=rx(h-2*i,0),v=n[s[a]]+n[l[a]]-u,y=c===d-1||v<g?v:g,x=f[l[a]]=rx(y-2*i,0);f[s[r]]=n[s[r]]+sx(i,m/2),f[s[a]]=u+sx(i,x/2),u+=y,p.setLayout(f,!0)}n[s[r]]+=h,n[l[r]]-=h}function yx(t){return t.get(dx)?t.get(px):0}function xx(t){return"_EC_"+t}wd(Qy),_d(fx);function _x(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var bx=_x.prototype;function Sx(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Mx(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}bx.type="graph",bx.isDirected=function(){return this._directed},bx.addNode=function(t,e){t=t||""+e;var n=this._nodesMap;if(!n[xx(t)]){var i=new Sx(t,e);return(i.hostGraph=this).nodes.push(i),n[xx(t)]=i}T&&console.error("Graph nodes have duplicate name or id")},bx.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},bx.getNodeById=function(t){return this._nodesMap[xx(t)]},bx.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]),Sx.isInstance(t)||(t=i[xx(t)]),Sx.isInstance(e)||(e=i[xx(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new Mx(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}}},bx.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},bx.getEdge=function(t,e){Sx.isInstance(t)&&(t=t.id),Sx.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},bx.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)},bx.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)},bx.breadthFirstTraverse=function(t,e,n,i){if(Sx.isInstance(e)||(e=this._nodesMap[xx(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}}}},bx.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},bx.clone=function(){for(var t=new _x(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},Sx.prototype={constructor:Sx,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)}},Mx.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function Ix(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(Sx,Ix("hostGraph","data")),b(Mx,Ix("hostGraph","edgeData")),_x.Node=Sx,_x.Edge=Mx,Do(Sx),Do(Mx);function Ax(t,e,n,i,o){for(var a=new _x(i),r=0;r<t.length;r++)a.addNode(H(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(H(h.id,c+" > "+d)),u++)}var p,f,g,m,v=n.get("coordinateSystem");"cartesian2d"===v||"polar"===v?m=rp(t,n):(M(f=(p=su.get(v))&&"view"!==p.type&&p.dimensions||[],"value")<0&&f.concat(["value"]),g=np(t,{coordDimensions:f}),(m=new Hd(g,n)).initData(t));var y=new Hd(["value"],n);return y.initData(l,s),o&&o(m,y),Zv({mainData:m,struct:a,structAttr:"graph",datas:{node:m,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Tx=Ad({type:"series.graph",init:function(t){Tx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){Tx.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){Tx.superApply(this,"mergeDefaultAndTheme",arguments),lo(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],n=t.data||t.nodes||[],l=this;if(n&&e)return Ax(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 Cs({label:n.option},n.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cs({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 Tx.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=al(l.join(" > ")),o.value&&(l+=" : "+al(o.value)),l},_updateCategoriesData:function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:k({value:0},t)}),e=new Hd(["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 Tx.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,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),Dx=_r.prototype,Cx=Mr.prototype;function Lx(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var kx=Er({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){(Lx(e)?Dx:Cx).buildPath(t,e)},pointAt:function(t){return Lx(this.shape)?Dx.pointAt.call(this,t):Cx.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Lx(e)?[e.x2-e.x1,e.y2-e.y1]:Cx.tangentAt.call(this,t);return gt(n,n)}}),Px=["fromSymbol","toSymbol"];function Nx(t){return"_"+t+"Type"}function Ox(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=df(o,-a[0]/2,-a[1]/2,a[0],a[1],i);return r.name=t,r}}function Ex(t,e){var n=e[0],i=e[1],o=e[2];t.x1=n[0],t.y1=n[1],t.x2=i[0],t.y2=i[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=NaN,t.cpy1=NaN)}function Rx(t,e,n){cn.call(this),this._createLine(t,e,n)}var zx=Rx.prototype;function Bx(t){this._ctor=t||Rx,this.group=new cn}zx.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,r,s,l,u,h,c,d,p,f,g,m,v,y=this.childOfName("line");(this.__dirty||y.__dirty)&&(a=y.shape.percent,r=y.pointAt(0),gt(l=ct([],s=y.pointAt(a),r),l),t&&(t.attr("position",r),f=y.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),t.attr("scale",[i*a,i*a])),e&&(e.attr("position",s),f=y.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*a,i*a])),n.ignore||(n.attr("position",s),d=5*i,"end"===n.__position?(u=[l[0]*d+s[0],l[1]*d+s[1]],h=.8<l[0]?"left":l[0]<-.8?"right":"center",c=.8<l[1]?"top":l[1]<-.8?"bottom":"middle"):"middle"===n.__position?(p=a/2,g=[(f=y.tangentAt(p))[1],-f[0]],m=y.pointAt(p),0<g[1]&&(g[0]=-g[0],g[1]=-g[1]),u=[m[0]+g[0]*d,m[1]+g[1]*d],h="center",c="bottom",v=-Math.atan2(f[1],f[0]),s[0]<r[0]&&(v=Math.PI+v),n.attr("rotation",v)):(u=[-l[0]*d+r[0],-l[1]*d+r[1]],h=.8<l[0]?"right":l[0]<-.8?"left":"center",c=.8<l[1]?"bottom":l[1]<-.8?"top":"middle"),n.attr({style:{textVerticalAlign:n.__verticalAlign||c,textAlign:n.__textAlign||h},position:u,scale:[i,i]})))}},zx._createLine=function(n,i,t){var e,o,a=n.hostModel,r=n.getItemLayout(i),s=(e=r,Ex((o=new kx({name:"line"})).shape,e),o);s.shape.percent=0,gs(s,{shape:{percent:1}},a,i),this.add(s);var l=new ur({name:"label"});this.add(l),z(Px,function(t){var e=Ox(t,n,i);this.add(e),this[Nx(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},zx.updateData=function(o,a,t){var e=o.hostModel,n=this.childOfName("line"),i=o.getItemLayout(a),r={shape:{}};Ex(r.shape,i),fs(n,r,e,a),z(Px,function(t){var e,n=o.getItemVisual(a,t),i=Nx(t);this[i]!==n&&(this.remove(this.childOfName(t)),e=Ox(t,o,a),this.add(e)),this[i]=n},this),this._updateCommonStl(o,a,t)},zx._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=U(t.getItemVisual(e,"opacity"),r.opacity,1);a.useStyle(O({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},r)),a.hoverStyle=s,z(Px,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,p,f,g=l.getShallow("show"),m=u.getShallow("show"),v=this.childOfName("label");(g||m)&&(f=h||"#000",null==(p=o.getFormattedLabel(e,"normal",t.dataType))&&(p=null==(d=o.getRawValue(e))?t.getName(e):isFinite(d)?zs(d):d));var y=g?p:null,x=m?Z(o.getFormattedLabel(e,"emphasis",t.dataType),p):null,_=v.style;null==y&&null==x||(rs(v.style,l,{text:y},{autoColor:f}),v.__textAlign=_.textAlign,v.__verticalAlign=_.textVerticalAlign,v.__position=l.get("position")||"middle"),v.hoverStyle=null!=x?{text:x,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},v.ignore=!g&&!m,is(this)},zx.highlight=function(){this.trigger("emphasis")},zx.downplay=function(){this.trigger("normal")},zx.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},zx.setLinePoints=function(t){var e=this.childOfName("line");Ex(e.shape,t),e.dirty()},w(Rx,cn);var Vx=Bx.prototype;function Gx(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 Fx(t){return isNaN(t[0])||isNaN(t[1])}function Wx(t){return!Fx(t[0])&&!Fx(t[1])}Vx.isPersistent=function(){return!0},Vx.updateData=function(n){var i=this,e=i.group,o=i._lineData;i._lineData=n,o||e.removeAll();var a=Gx(n);n.diff(o).add(function(t){!function(t,e,n,i){if(!Wx(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(!Wx(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()},Vx.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},Vx.incrementalPrepareUpdate=function(t){this._seriesScope=Gx(t),this._lineData=null,this.group.removeAll()},Vx.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var i,o=t.start;o<t.end;o++){Wx(e.getItemLayout(o))&&((i=new this._ctor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))}},Vx.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Vx._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Hx=[],Zx=[],Ux=[],Xx=Jo,jx=xt,Yx=Math.abs;function qx(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){Hx[0]=Xx(o[0],a[0],r[0],h),Hx[1]=Xx(o[1],a[1],r[1],h),(p=Yx(jx(Hx,e)-l))<s&&(s=p,i=h)}for(var c=0;c<32;c++){var d=i+u;Zx[0]=Xx(o[0],a[0],r[0],i),Zx[1]=Xx(o[1],a[1],r[1],i),Ux[0]=Xx(o[0],a[0],r[0],d),Ux[1]=Xx(o[1],a[1],r[1],d);var p=jx(Zx,e)-l;if(Yx(p)<.01)break;var f=jx(Ux,e)-l;u/=2,p<0?0<=f?i+=u:i-=u:0<=f?i-=u:i+=u}return i}function Kx(t,l){var u=[],h=ea,c=[[],[],[]],d=[[],[]],p=[];function f(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}l/=2,t.eachEdge(function(t,e){var n=t.getLayout(),i=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");n.__original||(n.__original=[st(n[0]),st(n[1])],n[2]&&n.__original.push(st(n[2])));var a,r,s=n.__original;null!=n[2]?(rt(c[0],s[0]),rt(c[1],s[2]),rt(c[2],s[1]),i&&"none"!==i&&(r=f(t.node1),a=qx(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=f(t.node2),a=qx(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]),rt(n[0],c[0]),rt(n[1],c[2]),rt(n[2],c[1])):(rt(d[0],s[0]),rt(d[1],s[1]),ct(p,d[1],d[0]),gt(p,p),i&&"none"!==i&&(r=f(t.node1),ht(d[0],d[0],p,r*l)),o&&"none"!==o&&(r=f(t.node2),ht(d[1],d[1],p,-r*l)),rt(n[0],d[0]),rt(n[1],d[1]))})}var $x=["itemStyle","opacity"],Jx=["lineStyle","opacity"];function Qx(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function t_(t,e,n){var i=t.getGraphicEl(),o=Qx(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 e_(t,e){var n=Qx(t,e),i=t.getGraphicEl();i.highlight&&i.highlight(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}Td({type:"graph",init:function(t,e){var n=new $f,i=new Bx,o=this.group;this._controller=new Mv(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 e=o.coordinateSystem;this._model=o,this._nodeScaleRatio=o.get("nodeScaleRatio");var n,i=this._symbolDraw,r=this._lineDraw,s=this.group;"view"===e.type&&(n={position:e.position,scale:e.scale},this._firstRender?s.attr(n):fs(s,n,o)),Kx(o.getGraph(),this._getNodeGlobalScale(o));var l=o.getData();i.updateData(l);var u=o.getEdgeData();r.updateData(u),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var h=o.forceLayout,c=o.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,c),l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e);t.off("drag").off("dragend");var i=n.get("draggable");i&&t.on("drag",function(){h&&(h.warmUp(),this._layouting||this._startForceLayoutIteration(h,c),h.setFixed(e),l.setItemLayout(e,t.position))},this).on("dragend",function(){h&&h.setUnfixed(e)},this),t.setDraggable(i&&h),t.off("mouseover",t.__focusNodeAdjacency),t.off("mouseout",t.__unfocusNodeAdjacency),n.get("focusNodeAdjacency")&&(t.on("mouseover",t.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))},this),l.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))});var d="circular"===o.get("layout")&&o.get("circular.rotateLabel"),p=l.getLayout("cx"),f=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n,i,o,a,r=t.getSymbolPath();d?(n=l.getItemLayout(e),(i=Math.atan2(n[1]-f,n[0]-p))<0&&(i=2*Math.PI+i),(o=n[0]<p)&&(i-=Math.PI),a=o?"left":"right",r.setStyle({textRotation:-i,textPosition:a,textOrigin:"center"}),r.hoverStyle&&(r.hoverStyle.textPosition=a)):r.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,n,i){var o=this._model.getData().graph,a=i.dataIndex,r=i.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){t_(t,$x,.1)}),o.eachEdge(function(t){t_(t,Jx,.1)}),s&&(e_(s,$x),z(s.edges,function(t){t.dataIndex<0||(e_(t,Jx),e_(t.node1,$x),e_(t.node2,$x))})),l&&(e_(l,Jx),e_(l.node1,$x),e_(l.node2,$x)))},unfocusNodeAdjacency:function(){var t=this._model.getData().graph;t.eachNode(function(t){t_(t,$x)}),t.eachEdge(function(t){t_(t,Jx)})},_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)&&!Rv(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){Nv(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Ov(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(),Kx(o.getGraph(),this._getNodeGlobalScale(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,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},updateLayout:function(t){Kx(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),yd({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),yd({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});yd({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=Gv(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function n_(t){return t instanceof Array||(t=[t,t]),t}function i_(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")])}),o_(e))}function o_(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=st(t.node1.getLayout()),i=st(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)})}function a_(t){var e,n,i,o,a,r,s,l,u,h=t.coordinateSystem;h&&"view"!==h.type||(e=h.getBoundingRect(),i=(n=t.getData()).graph,o=0,a=n.getSum("value"),r=2*Math.PI/(a||n.count()),s=e.width/2+e.x,l=e.height/2+e.y,u=Math.min(e.width,e.height)/2,i.eachNode(function(t){var e=t.getValue("value");o+=r*(a?e:1)/2,t.setLayout([u*Math.cos(o)+s,u*Math.sin(o)+l]),o+=r*(a?e:1)/2}),n.setLayout({cx:s,cy:l}),i.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=st(t.node1.getLayout()),o=st(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 r_=ht;vd(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)}),wd(bg("graph","circle",null)),wd(function(t){var r={};t.eachSeriesByType("graph",function(i){var o=i.getCategoriesData(),n=i.getData(),a={};o.each(function(t){var e=o.getName(t);a["ec-"+e]=t;var n=o.getItemModel(t).get("itemStyle.color")||i.getColorFromPalette(e,r);o.setItemVisual(t,"color",n)}),o.count()&&n.each(function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",o.getItemVisual(e,"color")))})})}),wd(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=n_(t.get("edgeSymbol")),n=n_(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=n_(e.getShallow("symbol",!0)),o=n_(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)})})}),_d(function(t){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];z(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])}o_(i.graph)}else e&&"none"!==e||i_(t)})}),_d(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&a_(t)})}),_d(function(t){t.eachSeriesByType("graph",function(t){var c,d,p,e,n,i,o,a,r,s,l,u,h,f,g,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&&a_(t):i_(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=Es(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=Es(t,a,s);return isNaN(i)&&(i=(s[0]+s[1])/2),{n1:l[n.node1.dataIndex],n2:l[n.node2.dataIndex],d:i,curveness:n.getModel().get("lineStyle.curveness")||0}}),h=(m=t.coordinateSystem).getBoundingRect(),f=function(p,f,t){for(var e=t.rect,n=e.width,i=e.height,g=[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=at(n*(Math.random()-.5)+g[0],i*(Math.random()-.5)+g[1])),a.pp=st(a.p),a.edges=null}var v=.6;return{warmUp:function(){v=.5},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<f.length;i++){var o=f[i],a=o.n1;ct(e,(l=o.n2).p,a.p);var r=dt(e)-o.d,s=l.w/(a.w+l.w);isNaN(s)&&(s=0),gt(e,e),a.fixed||r_(a.p,a.p,e,s*r*v),l.fixed||r_(l.p,l.p,e,-(1-s)*r*v)}for(i=0;i<n;i++){(c=p[i]).fixed||(ct(e,g,c.p),r_(c.p,c.p,e,m*v))}for(i=0;i<n;i++)for(var l,a=p[i],u=i+1;u<n;u++){ct(e,(l=p[u]).p,a.p),0===(r=dt(e))&&(lt(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+l.rep)/r/r;a.fixed||r_(a.pp,a.pp,e,h),l.fixed||r_(l.pp,l.pp,e,-h)}for(var c,d=[],i=0;i<n;i++){(c=p[i]).fixed||(ct(d,c.p,c.pp),r_(c.p,c.p,d,v),rt(c.pp,c.p))}v*=.992,t&&t(p,f,v<.01)}}}(l,u,{rect:h,gravity:n.get("gravity")}),g=f.step,f.step=function(h){for(var t=0,e=l.length;t<e;t++)l[t].fixed&&rt(l[t].p,d.getNodeByIndex(t).getLayout());g(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]||[],rt(u[0],s),rt(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=f,t.preservedPoints=c,f.step()):t.forceLayout=null)})}),xd("graphView",{create:function(t,g){var m=[];return t.eachSeriesByType("graph",function(t){var n,e,i,o,a,r,s,l,u,h,c,d,p,f=t.get("coordinateSystem");f&&"view"!==f||(e=[],i=[],ha((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=g,d=o,(p=t.getBoxLayoutParams()).aspect=d,a=wl(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 Jm).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}});ah.extend({type:"series.gauge",getInitialData:function(t){var e=t.data||[];return C(e)||(e=[e]),t.data=e,Tm(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 s_=Ua.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 l_(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var u_=2*Math.PI,h_=(yh.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:Rs(a[0],o.getWidth()),cy:Rs(a[1],o.getHeight()),r:Rs(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").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=((p=-t.get("endAngle")/180*Math.PI)-l)%u_,h=l,c=r.get("width"),d=0;d<i.length;d++){var p,f=Math.min(Math.max(i[d][0],0),1),g=new pr({shape:{startAngle:h,endAngle:p=l+u*f,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-c,r:o.r},silent:!0});g.setStyle({fill:i[d][1]}),g.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(g),h=p}function m(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 v;s||(v=l,l=p,p=v),this._renderTicks(t,e,n,m,o,l,p,s),this._renderPointer(t,e,n,m,o,l,p,s),this._renderTitle(t,e,n,m,o),this._renderDetail(t,e,n,m,o)},_renderTicks:function(t,e,n,i,o,a,r){for(var s=this.group,l=o.cx,u=o.cy,h=o.r,c=+t.get("min"),d=+t.get("max"),p=t.getModel("splitLine"),f=t.getModel("axisTick"),g=t.getModel("axisLabel"),m=t.get("splitNumber"),v=f.get("splitNumber"),y=Rs(p.get("length"),h),x=Rs(f.get("length"),h),_=a,w=(r-a)/m,b=w/v,S=p.getModel("lineStyle").getLineStyle(),M=f.getModel("lineStyle").getLineStyle(),I=0;I<=m;I++){var A,T,D,C,L=Math.cos(_),k=Math.sin(_);if(p.get("show")&&(A=new _r({shape:{x1:L*h+l,y1:k*h+u,x2:L*(h-y)+l,y2:k*(h-y)+u},style:S,silent:!0}),"auto"===S.stroke&&A.setStyle({stroke:i(I/m)}),s.add(A)),g.get("show")&&(T=l_(zs(I/m*(d-c)+c),g.get("formatter")),D=g.get("distance"),C=i(I/m),s.add(new ur({style:rs({},g,{text:T,x:L*(h-y-D)+l,y:k*(h-y-D)+u,textVerticalAlign:k<-.4?"top":.4<k?"bottom":"middle",textAlign:L<-.4?"left":.4<L?"right":"center"},{autoColor:C}),silent:!0}))),f.get("show")&&I!==m){for(var P=0;P<=v;P++){var L=Math.cos(_),k=Math.sin(_),N=new _r({shape:{x1:L*h+l,y1:k*h+u,x2:L*(h-x)+l,y2:k*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&N.setStyle({stroke:i((I+P/v)/m)}),s.add(N),_+=b}_-=b}else _+=w}},_renderPointer:function(i,t,e,o,a,n,r){var s,l,u,h,c=this.group,d=this._data;i.get("pointer.show")?(s=[+i.get("min"),+i.get("max")],l=[n,r],u=i.getData(),h=u.mapDimension("value"),u.diff(d).add(function(t){var e=new s_({shape:{angle:n}});gs(e,{shape:{angle:Es(u.get(h,t),s,l,!0)}},i),c.add(e),u.setItemGraphicEl(t,e)}).update(function(t,e){var n=d.getItemGraphicEl(e);fs(n,{shape:{angle:Es(u.get(h,t),s,l,!0)}},i),c.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=d.getItemGraphicEl(t);c.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Rs(i.get("width"),a.r),r:Rs(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(Es(u.get(h,e),s,[0,1],!0))),is(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=u):d&&d.eachItemGraphicEl(function(t){c.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+Rs(a[0],o.r),s=o.cy+Rs(a[1],o.r),l=+t.get("min"),u=+t.get("max"),h=i(Es(t.getData().get(d,0),[l,u],[0,1],!0)),this.group.add(new ur({silent:!0,style:rs({},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"),f=+t.get("min"),g=+t.get("max");p.get("show")&&(a=p.get("offsetCenter"),r=o.cx+Rs(a[0],o.r),s=o.cy+Rs(a[1],o.r),l=Rs(p.get("width"),o.r),u=Rs(p.get("height"),o.r),d=i(Es(c=(h=t.getData()).get(h.mapDimension("value"),0),[f,g],[0,1],!0)),this.group.add(new ur({silent:!0,style:rs({},p,{x:r,y:s,text:l_(c,p.get("formatter")),textWidth:isNaN(l)?null:l,textHeight:isNaN(u)?null:u,textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})})))}}),Ad({type:"series.funnel",init:function(t){h_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(){return Tm(this,["value"])},_defaultLabelLine:function(t){lo(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=h_.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 c_(t,e){cn.call(this);var n=new vr,i=new yr,o=new ur;function a(){i.ignore=i.hoverIgnore,o.ignore=o.hoverIgnore}function r(){i.ignore=i.normalIgnore,o.ignore=o.normalIgnore}this.add(n),this.add(i),this.add(o),this.updateData(t,e,!0),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var d_=c_.prototype,p_=["itemStyle","opacity"];d_.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(p_))?1:s;i.useStyle({}),n?(i.setShape({points:r.points}),i.setStyle({opacity:0}),gs(i,{style:{opacity:s}},o,e)):fs(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),is(this)},d_._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");fs(n,{shape:{points:r.linePoints||r.linePoints}},o,e),fs(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");as(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(c_,cn);yh.extend({type:"funnel",render:function(t){var i=t.getData(),o=this._data,a=this.group;i.diff(o).add(function(t){var e=new c_(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(){}});wd(Em("funnel")),_d(function(t,S){t.eachSeriesByType("funnel",function(t){var e,o=t.getData(),a=o.mapDimension("value"),n=t.get("sort"),r=(e=S,wl(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=[Rs(t.get("minSize"),r.width),Rs(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=Es(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"),f=(r.height-p*(o.count()-1))/o.count(),g=r.y;"ascending"===n&&(f=-f,p=-p,g+=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==_?_=f:(_=Rs(_,r.height),"ascending"===n&&(_=-_));var w=c(y,g),b=c(x,g+_);g+=_+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,f="inner"===h||"inside"===h||"center"===h;f?(r="center",s=[[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],[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"):(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:f}})})}),vd(Bm("funnel"));function f_(t,e,n,i,o){Pf.call(this,t,e,n),this.type=i||"value",this.axisIndex=o}f_.prototype={constructor:f_,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},w(f_,Pf);function g_(t,e,n,i,o,a){e[0]=v_(e[0],n),e[1]=v_(e[1],n),t=t||0;var r=n[1]-n[0];null!=o&&(o=v_(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===i&&(o=a=Math.abs(e[1]-e[0]),i=0);var s=m_(e,i);e[i]+=t;var l=o||0,u=n.slice();s.sign<0?u[0]+=l:u[1]-=l,e[i]=v_(e[i],u);var h=m_(e,i);return null!=o&&(h.sign!==s.sign||h.span<o)&&(e[1-i]=e[i]+s.sign*o),h=m_(e,i),null!=a&&h.span>a&&(e[1-i]=e[i]+h.sign*a),e}function m_(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0<n||!(n<0)&&e?-1:1}}function v_(t,e){return Math.min(e[1],Math.max(e[0],t))}var y_=z,x_=Math.min,__=Math.max,w_=Math.floor,b_=Math.ceil,S_=zs,M_=Math.PI;function I_(t,e,n){this._axesMap=tt(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function A_(t,e){return x_(__(t,e[0]),e[1])}I_.prototype={type:"parallel",constructor:I_,_init:function(t,r){var e=t.dimensions,s=t.parallelAxisIndex;y_(e,function(t,e){var n=s[e],i=r.getComponent("parallelAxis",n),o=this._axesMap.set(t,new f_(t,Jp(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){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(),y_(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),$p(e.scale,e.model)},this))},this)},resize:function(t,e){this._rect=wl(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=A_(e.get("axisExpandWidth"),l),c=A_(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=A_(p[1]-p[0],l),p[1]=p[0]+t):(t=A_(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||w_(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[w_(S_(p[0]/h,1))+1,b_(S_(p[1]/h,1))-1],m=f/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:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,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])}),y_(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:M_/2,vertical:0},a=[i[h].x+l.x,i[h].y+l.y],r=o[h],s=Zt();qt(s,s,r),Yt(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=[];z(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 vs([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return D(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)?g_(r,i,a,"all"):l="none"):(o=i[1]-i[0],(i=[__(0,a[1]*s/o-o/2)])[1]=x_(a[1],i[0]+o),i[0]=i[1]-o),{axisExpandWindow:i,behavior:l}}},su.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new I_(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 T_=Ll.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Po([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var n=e.length-1;0<=n;n--)Bs(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(T_.prototype,nf),Pg("parallel",T_,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}),Ll.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(){Ll.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){z(["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=[];z(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)})}});yd({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),yd("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var D_=R,C_=z,L_=L,k_=Math.min,P_=Math.max,N_=Math.pow,O_=1e4,E_=6,R_=6,z_="globalPan",B_={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},V_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},G_={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},F_=0;function W_(t){T&&Y(t),Dt.call(this),this._zr=t,this.group=new cn,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,T&&this._mounted,this._uid="brushController_"+F_++,this._handlers={},C_(fw,function(t,e){this._handlers[e]=P(t,this)},this)}function H_(t,e){var n=mw[e.brushType].createCover(t,e);return n.__brushOption=e,X_(n,e),t.group.add(n),n}function Z_(t,e){var n=Y_(e);return n.endCreating&&(n.endCreating(t,e),X_(e,e.__brushOption)),e}function U_(t,e){var n=e.__brushOption;Y_(e).updateCoverShape(t,e,n.range,n)}function X_(t,e){var n=e.z;null==n&&(n=O_),t.traverse(function(t){t.z=n,t.z2=n})}function j_(t,e){Y_(e).updateCommon(t,e),U_(t,e)}function Y_(t){return mw[t.__brushOption.brushType]}function q_(t,e,n){var i,o=t._panels;if(!o)return!0;var a=t._transform;return C_(o,function(t){t.isTargetByCursor(e,n,a)&&(i=t)}),i}function K_(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function $_(e){var t=e._covers,n=t.length;return C_(t,function(t){e.group.remove(t)},e),t.length=0,n}function J_(t,e){var n=L_(t._covers,function(t){var e=t.__brushOption,n=D(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Q_(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function tw(e,n,t,i){var o=new cn;return o.add(new xr({name:"main",style:ow(t),silent:!0,draggable:!0,cursor:"move",drift:D_(e,n,o,"nswe"),ondragend:D_(J_,n,{isEnd:!0})})),C_(i,function(t){o.add(new xr({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:D_(e,n,o,t),ondragend:D_(J_,n,{isEnd:!0})}))}),o}function ew(t,e,n,i){var o=i.brushStyle.lineWidth||0,a=P_(o,R_),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,f=h-r,g=c-s,m=f+o,v=g+o;iw(t,e,"main",r,s,f,g),i.transformable&&(iw(t,e,"w",l,u,a,v),iw(t,e,"e",d,u,a,v),iw(t,e,"n",l,u,m,a),iw(t,e,"s",l,p,m,a),iw(t,e,"nw",l,u,a,a),iw(t,e,"ne",d,u,a,a),iw(t,e,"sw",l,p,a,a),iw(t,e,"se",d,p,a,a))}function nw(i,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(ow(t)),e.attr({silent:!a,cursor:a?"move":"default"}),C_(["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=ys(o[n],ms(e.group));return a[i]}}(i,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?V_[n]+"-resize":null})})}function iw(t,e,n,i,o,a,r){var s,l,u,h,c,d=e.childOfName(n);d&&d.setShape((s=uw(t,e,[[i,o],[i+a,o+r]]),l=k_(s[0][0],s[1][0]),u=k_(s[0][1],s[1][1]),h=P_(s[0][0],s[1][0]),c=P_(s[0][1],s[1][1]),{x:l,y:u,width:h-l,height:c-u}))}function ow(t){return O({strokeNoScale:!0},t.brushStyle)}function aw(t,e,n,i){var o=[k_(t,n),k_(e,i)],a=[P_(t,n),P_(e,i)];return[[o[0],a[0]],[o[1],a[1]]]}function rw(t,e,n,i,o,a,r,s){var l=i.__brushOption,u=t(l.range),h=lw(n,a,r);C_(o.split(""),function(t){var e=B_[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(aw(u[0][0],u[1][0],u[0][1],u[1][1])),j_(n,i),J_(n,{isEnd:!1})}function sw(t,e,n,i,o){var a=e.__brushOption.range,r=lw(t,n,i);C_(a,function(t){t[0]+=r[0],t[1]+=r[1]}),j_(t,e),J_(t,{isEnd:!1})}function lw(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 uw(t,e,n){var i=K_(t,e);return i&&!0!==i?i.clipPath(n,t._transform):D(n)}function hw(t){var e=t.event;e.preventDefault&&e.preventDefault()}function cw(t,e,n){return t.childOfName("main").contain(e,n)}function dw(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=N_(o*o+a*a,.5);return E_<r}}(t)||s?(l&&!s&&("single"===u.brushMode&&$_(t),(a=D(u)).brushType=pw(a.brushType,l),a.panelId=!0===l?null:l.panelId,s=t._creatingCover=H_(t,a),t._covers.push(s)),s&&(r=mw[pw(t._brushType,l)],s.__brushOption.range=r.getCreatingRange(uw(t,s,t._track)),i&&(Z_(t,s),r.updateCommon(t,s)),U_(t,s),o={isEnd:i})):i&&"single"===u.brushMode&&u.removeOnClick&&q_(t,e,n)&&$_(t)&&(o={isEnd:i,removeOnClick:!0}),o}function pw(t,e){return"auto"===t?(T&&Y(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}W_.prototype={constructor:W_,enableBrush:function(t){var e,n;return T&&Y(this._mounted),this._brushType&&(function(t,e,n){var i=Sv(t);i[e]===n&&(i[e]=null)}(n=(e=this)._zr,z_,e._uid),C_(e._handlers,function(t,e){n.off(e,t)}),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var n=t._zr;t._enableGlobalPan||function(t,e,n){Sv(t)[e]=n}(n,z_,t._uid);C_(t._handlers,function(t,e){n.on(e,t)}),t._brushType=e.brushType,t._brushOption=m(D(G_),e,!0)}(this,t),this},setPanels:function(t){var e;return t&&t.length?(e=this._panels={},z(t,function(t){e[t.panelId]=D(t)})):this._panels=null,this},mount:function(t){t=t||{},T&&(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){C_(this._covers,t,e)},updateCovers:function(o){T&&Y(this._mounted),o=L(o,function(t){return m(D(G_),t,!0)});var n="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new Cd(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]):Z_(s,H_(s,i)),j_(s,n))}},unmount:function(){if(!T||this._mounted)return this.enableBrush(!1),$_(this),this._zr.remove(this.group),T&&(this._mounted=!1),this},dispose:function(){this.unmount(),this.off()}},b(W_,Dt);var fw={mousedown:function(t){var e;this._dragging?gw.call(this,t):t.target&&t.target.draggable||(hw(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=q_(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e,n=this.group.transformCoordToLocal(t.offsetX,t.offsetY);!function(t,e,n){if(t._brushType){var i=t._zr,o=t._covers,a=q_(t,e,n);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&mw[s.brushType].contain(o[r],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}}(this,t,n),this._dragging&&(hw(t),(e=dw(this,t,n,!1))&&J_(this,e))},mouseup:gw};function gw(t){var e,n;this._dragging&&(hw(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),n=dw(this,t,e,!0),this._dragging=!1,this._track=[],this._creatingCover=null,n&&J_(this,n))}var mw={lineX:vw(0),lineY:vw(1),rect:{createCover:function(t,e){return tw(D_(rw,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Q_(t);return aw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){ew(t,e,n,i)},updateCommon:nw,contain:cw},polygon:{createCover:function(t,e){var n=new cn;return n.add(new yr({name:"main",style:ow(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new vr({name:"main",draggable:!0,drift:D_(sw,t,e),ondragend:D_(J_,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:uw(t,e,n)})},updateCommon:nw,contain:cw}};function vw(s){return{createCover:function(t,e){return tw(D_(rw,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=Q_(t);return[k_(e[0][s],e[1][s]),P_(e[0][s],e[1][s])]},updateCoverShape:function(t,e,n,i){var o,a=K_(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(),ew(t,e,r,i)},updateCommon:nw,contain:cw}}function yw(n){return n=ww(n),function(t,e){return _s(t,n)}}function xw(o,a){return o=ww(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 _w(i,o,a){return i=ww(i),function(t,e,n){return i.contain(e[0],e[1])&&!Rv(t,o,a)}}function ww(t){return hn.create(t)}var bw=["axisLine","axisTickLabel","axisName"],Sw=Id({type:"parallelAxis",init:function(t,e){Sw.superApply(this,"init",arguments),(this._brushController=new W_(e.getZr())).on("brush",P(this._onBrush,this))},render:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,f,g,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 cn,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,f=k({strokeContainThreshold:d},h.getAxisLayout(p)),g=new jg(t,f),z(bw,g.add,g),this._axisGroup.add(g.getGroup()),this._refreshBrushController(f,c,t,l,d,n),m=i&&!1===i.animation?null:t,xs(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=hn.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:yw(c),isTargetByCursor:_w(c,a,i),getLinearBrushOtherExtent:xw(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((s=(r=n).axis,L(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=L(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()}});Id({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},z(Mw,function(t,e){n.getZr().on(e,this._handlers[e]=P(t,this))},this)),Ch(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){z(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(k({type:"parallelAxisExpand"},t))}});var Mw={mousedown:function(t){Iw(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Iw(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&&Iw(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 Iw(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}md(function(t){var i;!function(t){if(t.parallel)return;var e=!1;z(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),z(so((i=t).parallelAxis),function(t){var e,n;B(t)&&(e=t.parallelIndex||0,(n=so(i.parallel)[e])&&n.parallelAxisDefault&&m(t,n.parallelAxisDefault,!1))})}),ah.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=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=tt();z(n.dimensions,function(t){var e=+t.replace("dim","");i.set(t,e)})}(t,this),rp(t,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"}});yh.extend({type:"parallel",init:function(){this._dataGroup=new cn,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(),f=this._data,g=a.coordinateSystem,m=g.dimensions,v=Dw(a);p.diff(f).add(function(t){Cw(Tw(p,d,t,m,g),p,t,v)}).update(function(t,e){var n=f.getItemGraphicEl(e),i=Aw(p,t,m,g);p.setItemGraphicEl(t,n);var o=r&&!1===r.animation?null:a;fs(n,{shape:{points:i}},o,t),Cw(n,p,t,v)}).remove(function(t){var e=f.getItemGraphicEl(t);d.remove(e)}).execute(),this._initialized||(this._initialized=!0,o=a,s=function(){setTimeout(function(){d.removeClipPath()})},l=(i=g).model,u=i.getRect(),h=new xr({shape:{x:u.x,y:u.y,width:u.width,height:u.height}}),c="horizontal"===l.get("layout")?"width":"height",h.setShape(c,0),gs(h,{shape:{width:u.width,height:u.height}},o,s),n=h,d.setClipPath(n)),this._data=p},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var n=e.getData(),i=e.coordinateSystem,o=i.dimensions,a=Dw(e),r=t.start;r<t.end;r++){var s=Tw(n,this._dataGroup,r,o,i);s.incremental=!0,Cw(s,n,r,a)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function Aw(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 Tw(t,e,n,i,o){var a=Aw(t,n,i,o),r=new yr({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(n,r),r}function Dw(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function Cw(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 Lw=["lineStyle","normal","opacity"];wd({seriesType:"parallel",reset:function(t,e){var n=t.getModel("itemStyle"),i=t.getModel("lineStyle"),o=e.get("color"),a=i.get("color")||n.get("color")||o[t.seriesIndex%o.length],r=t.get("inactiveOpacity"),s=t.get("activeOpacity"),l=t.getModel("lineStyle").getLineStyle(),u=t.coordinateSystem,h=t.getData(),c={normal:l.opacity,active:s,inactive:r};return h.setVisual("color",a),{progress:function(t,o){u.eachActiveState(o,function(t,e){var n,i=c[t];"normal"!==t||!o.hasItemOption||null!=(n=o.getItemModel(e).get(Lw,!0))&&(i=n),o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var kw=ah.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,n=t.data||t.nodes;if(n&&e)return Ax(n,e,this,!0).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)return kw.superCall(this,"formatTooltip",t,e);var i=this.getDataParams(t,n),o=i.data,a=o.source+" -- "+o.target;return i.value&&(a+=" : "+i.value),al(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},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},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),Pw=["itemStyle","opacity"],Nw=["lineStyle","opacity"];function Ow(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Ew(t,e,n){var i=t.getGraphicEl(),o=Ow(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 Rw(t,e){var n=Ow(t,e),i=t.getGraphicEl();i.highlight&&i.highlight(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}var zw=Er({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;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),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.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),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()}});function Bw(){var h=[],e=[];return{key:function(t){return h.push(t),this},sortKeys:function(t){return e[h.length-1]=t,this},entries:function(t){return function n(t,i){if(i>=h.length)return t;var o=[],a=e[i++];return z(t,function(t,e){o.push({key:e,values:n(t,i)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(function n(t,i){if(i>=h.length)return t;for(var e=-1,o=t.length,a=h[i++],r={},s={};++e<o;){var l=a(t[e]),u=s[l];u?u.push(t[e]):s[l]=[t[e]]}return z(s,function(t,e){r[e]=n(t,i)}),r}(t,0),0)}}}Td({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"),A=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[l.x,l.y]),s.eachEdge(function(t){var e=new zw;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(),f=p.get("localX"),g=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=A)?(n=(null!=f?f*S:d.x)+_.sy,i=(null!=g?g*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!=f?f*S:d.x)+d.dx,i=(null!=g?g*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")}is(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 xr({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();as(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),is(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"),e.get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:w.id})}))}),I.eachItemGraphicEl(function(t,e){I.getItemModel(e).get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:w.id})}))}),!this._data&&w.get("animation")&&b.setClipPath((e=b.getBoundingRect(),n=w,o=function(){b.removeClipPath()},gs(a=new xr({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}}),{shape:{width:e.width+20,height:e.height+20}},n,o),a)),this._data=w.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,n,i){var o,a,r,s=this._model.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){Ew(t,Pw,.1)}),l.eachEdge(function(t){Ew(t,Nw,.1)}),o&&(Rw(o,Pw),"outEdges"===(r=h.get("focusNodeAdjacency"))?z(o.outEdges,function(t){t.dataIndex<0||(Rw(t,Nw),Rw(t.node2,Pw))}):"inEdges"===r?z(o.inEdges,function(t){t.dataIndex<0||(Rw(t,Nw),Rw(t.node1,Pw))}):"allEdges"===r&&z(o.edges,function(t){t.dataIndex<0||(Rw(t,Nw),Rw(t.node1,Pw),Rw(t.node2,Pw))})),a&&(Rw(a,Nw),Rw(a.node1,Pw),Rw(a.node2,Pw)))},unfocusNodeAdjacency:function(){var t=this._model.getGraph();t.eachNode(function(t){Ew(t,Pw)}),t.eachEdge(function(t){Ew(t,Nw)})}}),yd({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 Vw(t,l,u,h,c){z(t,function(t){var e,n,i,o,a,r=0,s=t.length;if("vertical"===c){for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().x)&&(o=e.getLayout().x+n,e.setLayout({x:o},!0)),r=e.getLayout().x+e.getLayout().dx+l;if(0<(n=r-l-h))for(o=e.getLayout().x-n,e.setLayout({x:o},!0),r=o,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().x+e.getLayout().dx+l-r)&&(o=e.getLayout().x-n,e.setLayout({x:o},!0)),r=e.getLayout().x}else{for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().y)&&(a=e.getLayout().y+n,e.setLayout({y:a},!0)),r=e.getLayout().y+e.getLayout().dy+l;if(0<(n=r-l-u))for(a=e.getLayout().y-n,e.setLayout({y:a},!0),r=a,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().y+e.getLayout().dy+l-r)&&(a=e.getLayout().y-n,e.setLayout({y:a},!0)),r=e.getLayout().y}})}function Gw(t,e){return Ww(t.node2,e)*t.getValue()}function Fw(t,e){return Ww(t.node1,e)*t.getValue()}function Ww(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Hw(t){return t.getValue()}function Zw(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}_d(function(t,x){t.eachSeriesByType("sankey",function(t){var e,n=t.get("nodeWidth"),i=t.get("nodeGap"),o=(e=x,wl(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;z(l,function(t){var e=Zw(t.outEdges,Hw),n=Zw(t.inEdges,Hw),i=Math.max(e,n);t.setLayout({value:i},!0)});var h,c,d,p,f,g,m,v=0!==I(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),y=t.get("orient");d=i,g=v,function(t,e,n,i,o,a){for(var r=[],s=[],l=[],u=[],h=0,c=0,d=0;d<e.length;d++)r[d]=1;for(d=0;d<t.length;d++)s[d]=t[d].inEdges.length,0===s[d]&&l.push(t[d]);for(;l.length;){for(var p=0;p<l.length;p++){var f=l[p];"vertical"===a?(f.setLayout({y:h},!0),f.setLayout({dy:n},!0)):(f.setLayout({x:h},!0),f.setLayout({dx:n},!0));for(var g=0;g<f.outEdges.length;g++){var m=f.outEdges[g],v=e.indexOf(m);r[v]=0;var y=m.node2,x=t.indexOf(y);0==--s[x]&&u.push(y)}}++h,l=u,u=[]}for(d=0;d<r.length;d++)if(T&&1===r[d])throw new Error("Sankey is a DAG, the original data has cycle!");(function(t,e,n){z(t,function(t){t.outEdges.length||("vertical"===n?t.setLayout({y:e-1},!0):t.setLayout({x:e-1},!0))})})(t,h,a),c="vertical"===a?(o-n)/(h-1):(i-n)/(h-1);!function(t,i,o){z(t,function(t){var e,n;"vertical"===o?(e=t.getLayout().y*i,t.setLayout({y:e},!0)):(n=t.getLayout().x*i,t.setLayout({x:n},!0))})}(t,c,a)}(h=l,c=u,n,p=a,f=r,m=y),function(t,e,n,i,o,a,r){var s=Bw().key(function(t){return"vertical"!==t?function(t){return t.getLayout().x}:function(t){return t.getLayout().y}}(r)).sortKeys(function(t,e){return t-e}).entries(t).map(function(t){return t.values});(function(t,e,o,a,r,s){var l=[];z(t,function(t){var e=t.length,n=0,i=0;z(t,function(t){n+=t.getLayout().value}),i="vertical"===s?(a-(e-1)*r)/n:(o-(e-1)*r)/n,l.push(i)}),l.sort(function(t,e){return t-e});var i=l[0];z(t,function(t){z(t,function(t,e){var n=t.getLayout().value*i;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),z(e,function(t){var e=t.getValue()*i;t.setLayout({dy:e},!0)})})(s,e,n,i,o,r),Vw(s,o,n,i,r);for(var l=1;0<a;a--)(function(t,o,a){z(t.slice().reverse(),function(t){z(t,function(t){var e,n,i;t.outEdges.length&&(e=Zw(t.outEdges,Gw,a)/Zw(t.outEdges,Hw,a),"vertical"===a?(n=t.getLayout().x+(e-Ww(t,a))*o,t.setLayout({x:n},!0)):(i=t.getLayout().y+(e-Ww(t,a))*o,t.setLayout({y:i},!0)))})})})(s,l*=.99,r),Vw(s,o,n,i,r),function(t,o,a){z(t,function(t){z(t,function(t){var e,n,i;t.inEdges.length&&(e=Zw(t.inEdges,Fw,a)/Zw(t.inEdges,Hw,a),"vertical"===a?(n=t.getLayout().x+(e-Ww(t,a))*o,t.setLayout({x:n},!0)):(i=t.getLayout().y+(e-Ww(t,a))*o,t.setLayout({y:i},!0)))})})}(s,l,r),Vw(s,o,n,i,r)}(h,c,f,p,d,g,m),function(t,e){z(t,function(t){"vertical"===e?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),z(t,function(t){var e=0,n=0;z(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),z(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(h,m)})}),wd(function(t){t.eachSeriesByType("sankey",function(i){var o,a,t=i.getGraph().nodes;t.length&&(o=1/0,a=-1/0,z(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),z(t,function(t){var e=new By({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:i.get("color")}).mapValueToVisual(t.getLayout().value);t.setVisual("color",e);var n=t.getModel().get("itemStyle.color");null!=n&&t.setVisual("color",n)}))})});var Uw={_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],f=p[h].get("type"),g=p[1-h].get("type"),m=t.data;m&&i&&(l=[],z(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;return Tm(this,{coordDimensions:[{name:c,type:Nd(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:Nd(g),dimsDef:v.slice()}],dimensionsCount:v.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};b(ah.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}}),Uw,!0);var Xw=["itemStyle"],jw=["emphasis","itemStyle"],Yw=(yh.extend({type:"boxplot",render:function(t){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=qw(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?Kw(n,i,o,t):i=qw(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(){var e=this.group,t=this._data;this._data=null,t&&t.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:nt}),Ua.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 qw(t,e,n,i,o){var a,r,s=t.ends,l=new Yw({shape:{points:o?(a=i,r=t,L(s,function(t){return(t=t.slice())[a]=r.initBaseline,t})):s}});return Kw(t,l,e,n,o),l}function Kw(t,e,n,i,o){var a=n.hostModel;(0,bs[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,i);var r=n.getItemModel(i),s=r.getModel(Xw),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,is(e,r.getModel(jw).getItemStyle())}var $w=["itemStyle","borderColor"],Jw=z;wd(function(i){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($w)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get($w,!0)})})})}),_d(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);Jw(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,Jw(o,function(t){u=Math.max(u,t.getData().count())}),e=i.getExtent(),Math.abs(e[1]-e[0]))}Jw(o,function(t){var e=t.get("boxWidth");C(e)||(e=[e,e]),l.push([Rs(e[0],n)||0,Rs(e[1],n)||0])});var h=.8*n-2,c=h/a*.3,d=(h-c*(a-1))/a,p=d/2-h/2;Jw(o,function(t,e){s.push(p),p+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(n),Jw(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),f=x(d,o[0],c),g=x(d,o[1],c),m=x(d,o[3],c),v=x(d,o[4],c),y=[];_(y,g,0),_(y,m,1),y.push(f,g,v,m),w(y,f),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(ah.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,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)}}),Uw,!0);var Qw=["itemStyle"],tb=["emphasis","itemStyle"],eb=["color","color0","borderColor","borderColor0"],nb=(yh.extend({type:"candlestick",render:function(t){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){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");this._data||s.removeAll(),a.diff(r).add(function(t){var e,n;a.hasValue(t)&&(gs(n=ib(e=a.getItemLayout(t),0,!0),{shape:{points:e.ends}},o,t),ob(n,a,t,l),s.add(n),a.setItemGraphicEl(t,n))}).update(function(t,e){var n,i=r.getItemGraphicEl(e);a.hasValue(t)?(n=a.getItemLayout(t),i?fs(i,{shape:{points:n.ends}},o,t):i=ib(n),ob(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(),rb(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var a=ib(i.getItemLayout(n));ob(a,i,n,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){rb(e,this.group,!0)},remove:function(){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:nt}),Ua.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 ib(t,e,n){var i,o=t.ends;return new nb({shape:{points:n?(i=t,L(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function ob(t,e,n,i){var o=e.getItemModel(n),a=o.getModel(Qw),r=e.getItemVisual(n,"color"),s=e.getItemVisual(n,"borderColor")||r,l=a.getItemStyle(eb);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=i,is(t,o.getModel(tb).getItemStyle())}var ab=Ua.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 rb(t,e,n){var i=t.getData(),o=i.getLayout("largePoints"),a=new ab({shape:{points:o},__sign:1});e.add(a);var r=new ab({shape:{points:o},__sign:-1});e.add(r),sb(1,a,t,i),sb(-1,r,t,i),n&&(a.incremental=!0,r.incremental=!0)}function sb(t,e,n,i){var o=0<t?"P":"N",a=i.getVisual("borderColor"+o)||i.getVisual("color"+o),r=n.getModel(Qw).getItemStyle(eb);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var lb=["itemStyle","borderColor"],ub=["itemStyle","borderColor0"],hb=["itemStyle","color"],cb=["itemStyle","color0"],db={seriesType:"candlestick",plan:gh(),performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.pipelineContext.large;if(n.setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!i&&{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?hb:cb)}function r(t,e){return e.get(0<t?lb:ub)}}},pb="undefined"!=typeof Float32Array?Float32Array:Array,fb={seriesType:"candlestick",plan:gh(),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=Rs(Z(e.get("barMaxWidth"),a),a),s=Rs(Z(e.get("barMinWidth"),1),a),null!=(l=e.get("barWidth"))?Rs(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 pb(5*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+=4):(o[a++]=gb(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=g(l,i),c=g(u,i),d=g(r,i),p=g(s,i),f=[];m(f,c,0),m(f,h,1),f.push(v(p),v(c),v(d),v(h)),e.setItemLayout(n,{sign:gb(e,n,o,a,b),initBaseline:a<o?c[1]:h[1],ends:f,brushRect:function(t,e,n){var i=g(t,n),o=g(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 g(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]=Hr(i[0]+x/2,1,!1),o[0]=Hr(o[0]-x/2,1,!0),n?t.push(i,o):t.push(o,i)}function v(t){return t[0]=Hr(t[0],1),t}}}}};function gb(t,e,n,i,o){var a=!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1;return a}md(function(t){t&&C(t.series)&&z(t.series,function(t){B(t)&&"k"===t.type&&(t.type="candlestick")})}),wd(db),_d(fb),ah.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return rp(this.getSource(),this)},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 mb(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function vb(t,e){cn.call(this);var n=new Bf(t,e),i=new cn;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}var yb=vb.prototype;yb.stopEffectAnimation=function(){this.childAt(1).removeAll()},yb.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),o=0;o<3;o++){var a=df(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)}mb(i,t)},yb.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)}mb(n,t)},yb.highlight=function(){this.trigger("emphasis")},yb.downplay=function(){this.trigger("normal")},yb.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]=Rs(h[0],s[0]),u[1]=Rs(h[1],s[1])),o.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var c,d,p,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,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(),c=this.childAt(0),d=function(){c.highlight(),"render"!==f.showEffectOn&&this.startEffectAnimation(f)},p=function(){c.downplay(),"render"!==f.showEffectOn&&this.stopEffectAnimation()},this.on("mouseover",d,this).on("mouseout",p,this).on("emphasis",d,this).on("normal",p,this)),this._effectCfg=f},yb.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},w(vb,cn),Td({type:"effectScatter",init:function(){this._symbolDraw=new $f(vb)},render:function(t){var e=t.getData(),n=this._symbolDraw;n.updateData(e),this.group.add(n.group)},updateTransform:function(t){var e=t.getData();this.group.dirty();var n=Sg().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=Jt(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),wd(bg("effectScatter","circle")),_d(Sg("effectScatter"));var xb="undefined"==typeof Uint32Array?Array:Uint32Array,_b="undefined"==typeof Float64Array?Array:Float64Array;function wb(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(T&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=L(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),g([e,t[0],t[1]])}))}var bb=ah.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],wb(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),bb.superApply(this,"init",arguments)},mergeOption:function(t){var e;t.data=t.data||[],wb(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))),bb.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=et(this._flatCoords,e.flatCoords),this._flatCoordsOffset=et(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(T&&!(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 xb(n),o=new _b(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&&T)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t){if(T&&!su.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var a=new Hd(["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),al(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,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function Sb(t,e,n){cn.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}var Mb=Sb.prototype;function Ib(t,e,n){cn.call(this),this._createPolyline(t,e,n)}Mb.createLine=function(t,e,n){return new Rx(t,e,n)},Mb._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=df(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._updateEffectAnimation(t,n,e))},Mb._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=H(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)},Mb.getLineLength=function(t){return vt(t.__p1,t.__cp1)+vt(t.__cp1,t.__p2)},Mb.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]},Mb.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},Mb.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,a=t.position,r=Jo,s=Qo;a[0]=r(e[0],i[0],n[0],o),a[1]=r(e[1],i[1],n[1],o);var l=s(e[0],i[0],n[0],o),u=s(e[1],i[1],n[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},Mb.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},w(Sb,cn);var Ab=Ib.prototype;function Tb(t,e,n){Sb.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}Ab._createPolyline=function(t,e,n){var i=t.getItemLayout(e),o=new yr({shape:{points:i}});this.add(o),this._updateCommonStl(t,e,n)},Ab.updateData=function(t,e,n){var i=t.hostModel;fs(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},Ab._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,is(this)},Ab.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},w(Ib,cn);var Db=Tb.prototype;Db.createLine=function(t,e,n){return new Ib(t,e,n)},Db.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+=vt(a,r),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}},Db.getLineLength=function(t){return this._length},Db.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)}_t(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(Tb,Sb);var Cb=Er({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(){var t=this.shape,e=t.segs,n=t.curveness;if(t.polyline)for(var i=0,o=0;o<e.length;){var a=e[o++];if(0<a)for(var r=e[o++],s=e[o++],l=1;l<a;l++){if(Ta(r,s,u=e[o++],h=e[o++]))return i}i++}else for(i=0,o=0;o<e.length;){var r=e[o++],s=e[o++],u=e[o++],h=e[o++];if(0<n){if(Ca(r,s,(r+u)/2-(s-h)*n,(s+h)/2-(u-r)*n,u,h))return i}else if(Ta(r,s,u,h))return i;i++}return-1}});function Lb(){this.group=new cn}var kb=Lb.prototype;kb.isPersistent=function(){return!this._incremental},kb.updateData=function(t){this.group.removeAll();var e=new Cb({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},kb.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Cr({silent:!0})),this.group.add(this._incremental)):this._incremental=null},kb.incrementalUpdate=function(t,e){var n=new Cb;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))},kb.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},kb._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)}))},kb._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Pb={seriesType:"lines",plan:gh(),reset:function(g){var m=g.coordinateSystem,v=g.get("polyline"),y=g.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+=g.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=g.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=g.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 f=c.get("lineStyle.curveness");+f&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*f,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*f])}e.setItemLayout(r,d)}}}}};function Nb(t){return t instanceof Array||(t=[t,t]),t}Td({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&&(T&&(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),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){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=Pb.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 T&&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 Lb:new Bx(o?i?Tb:Ib:i?Sb:Rx),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 Ob="lineStyle.opacity".split("."),Eb={seriesType:"lines",reset:function(t){var e=Nb(t.get("symbol")),n=Nb(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),i.setVisual("opacity",t.get(Ob)),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=Nb(n.getShallow("symbol",!0)),o=Nb(n.getShallow("symbolSize",!0)),a=n.get(Ob);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}}};_d(Pb),wd(Eb),ah.extend({type:"series.heatmap",getInitialData:function(){return rp(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=su.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 Rb(){var t=y();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}Rb.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 f=t[p],g=f[0],m=f[1],v=i(f[2]);c.globalAlpha=v,c.drawImage(r,g-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}},Td({type:"heatmap",render:function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),T&&!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(){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(T){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",f=t.getModel("itemStyle").getItemStyle(["color"]),g=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 xr({shape:{x:w[0]-a/2,y:w[1]-r/2,width:a,height:r},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;b=new xr({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&&(f=S.getModel("itemStyle").getItemStyle(["color"]),g=S.getModel(d).getItemStyle(),m=S.getModel("label"),v=S.getModel(p));var M=t.getRawValue(_),I="-";M&&null!=M[2]&&(I=M[2]),as(f,g,m,v,{labelFetcher:t,labelDataIndex:_,defaultText:I,isRectText:!0}),b.setStyle(f),is(b,c.hasItemOption?g:k({},g)),(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 Rb;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,f,g,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")],A=r.mapArray(I,function(t,e,n){var i=o.dataToPoint([t,e]);return i[0]-=x,i[1]-=_,i.push(n),i}),T=e.getExtent(),D="visualMap.continuous"===e.type?(m=T,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=T,c=e.getPieceList(),d=e.option.selected,p=h[1]-h[0],f=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/p,(t.interval[1]-h[0])/p]}})).length,g=0,function(t){for(var e=g;e<f;e++){if((n=c[e].interval)[0]<=t&&t<=n[1]){g=e;break}}if(e===f)for(var n,e=g-1;0<=e;e--){if((n=c[e].interval)[0]<=t&&t<=n[1]){g=e;break}}return 0<=e&&e<f&&d[e]});s.update(A,S,M,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},D);var C=new Ti({style:{width:S,height:M,x:x,y:_,image:s.canvas},silent:!0});this.group.add(C)},dispose:function(){}});var zb=gm.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,zb.superApply(this,"getInitialData",arguments)}}),Bb=["itemStyle","borderWidth"],Vb=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Gb=new cr;Td({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:Vb[+o],categoryDim:Vb[1-o]};return s.diff(l).add(function(t){var e,n,i;s.hasValue(t)&&(e=Yb(s,t),n=Fb(s,t,e,u),i=Jb(s,u,n),s.setItemGraphicEl(t,i),r.add(i),iS(i,u,n))}).update(function(t,e){var n,i,o,a=l.getItemGraphicEl(e);s.hasValue(t)?(n=Yb(s,t),i=Fb(s,t,n,u),o=tS(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;fs(t.__pictorialBundle,{position:n.bundlePosition.slice()},i,o),(n.symbolRepeat?Zb:Ub)(t,e,n,!0);Xb(t,n,!0),jb(t,e,n,!0)}(a,u,i):a=Jb(s,u,i,!0),s.setItemGraphicEl(t,a),a.__pictorialSymbolMeta=i,r.add(a),iS(a,u,i)):r.remove(a)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Qb(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:nt,remove:function(e){var t=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){Qb(n,t.dataIndex,e,t)}):t.removeAll()}});function Fb(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=[Wb(l,s[0])-u,Wb(l,s[1])-u])[1]<c[0]&&c.reverse(),c[h]):null!=s?Wb(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]=Rs(d[h.index],c),d[u.index]=Rs(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(Bb)||0;a&&(Gb.attr({scale:e.slice(),rotation:n}),Gb.updateTransform(),a/=Gb.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=[Rs(p[0],d[0]),Rs(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,f=Math.max(e[d.index]+r,0),g=f;{var m,v,y,x,_,w,b;i&&(m=Math.abs(s),v=H(t.get("symbolMargin"),"15%")+"",y=!1,v.lastIndexOf("!")===v.length-1&&(y=!0,v=v.slice(0,v.length-1)),v=Rs(v,e[d.index]),x=Math.max(f+2*v,0),_=y?0:2*v,w=Js(i),b=w?i:oS((m+_)/x),x=f+2*(v=(m-b*f)/2/(y?b:b-1)),_=y?0:2*v,w||"fixed"===i||(b=l?oS((Math.abs(l)+_)/x):0),g=b*x-_,h.repeatTimes=b,h.symbolMargin=v)}var S=p*(g/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 A=h.barRectShape=k({},n);A[d.wh]=p*Math.max(Math.abs(n[d.wh]),Math.abs(M[d.index]+S)),A[c.wh]=n[c.wh];var T=h.clipShape={};T[c.xy]=-n[c.xy],T[c.wh]=u.ecSize[c.wh],T[d.xy]=0,T[d.wh]=n[d.wh]}(n,d,o,a,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function Wb(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Hb(t){var e=t.symbolPatternSize,n=df(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Zb(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(eS(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?nS(t,null,f(h),o,n):nS(t,null,{scale:[0,0]},o,n,function(){i.remove(t)}),$b(t,o),h++});h<u;h++){var d=Hb(o);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,i.add(d);var p=f(h);nS(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},o,n),d.on("mouseover",g).on("mouseout",m),$b(d,o)}function f(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 g(){eS(t,function(t){t.trigger("emphasis")})}function m(){eS(t,function(t){t.trigger("normal")})}}function Ub(t,e,n,i){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?nS(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=Hb(n),o.add(a),nS(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")})),$b(a,n)}function Xb(t,e,n){var i=k({},e.barRectShape),o=t.__pictorialBarRect;o?nS(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new xr({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function jb(t,e,n,i){var o,a,r,s,l,u;n.symbolClip&&(o=t.__pictorialClipPath,a=k({},n.clipShape),r=e.valueDim,s=n.animationModel,l=n.dataIndex,o?fs(o,{shape:a},s,l):(a[r.wh]=0,o=new xr({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(u={})[r.wh]=n.clipShape[r.wh],bs[i?"updateProps":"initProps"](o,{shape:u},s,l)))}function Yb(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=qb,n.isAnimationEnabled=Kb,n}function qb(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Kb(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $b(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 Jb(t,e,n,i){var o=new cn,a=new cn;return o.add(a),(o.__pictorialBundle=a).attr("position",n.bundlePosition.slice()),n.symbolRepeat?Zb(o,e,n):Ub(o,0,n),Xb(o,n,i),jb(o,e,n,i),o.__pictorialShapeStr=tS(t,n),o.__pictorialSymbolMeta=n,o}function Qb(t,e,n,i){var o=i.__pictorialBarRect;o&&(o.style.text=null);var a=[];eS(i,function(t){a.push(t)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),z(a,function(t){fs(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function tS(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function eS(e,n,i){z(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function nS(t,e,n,i,o,a){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&bs[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,a)}function iS(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");eS(t,function(t){t.setColor(i),t.setStyle(O({fill:i,opacity:n.opacity},r)),is(t,s),l&&(t.cursor=l),t.z2=n.z2});var u={},h=(e.valueDim.posDesc[+(0<n.boundingLength)],t.__pictorialBarRect);mm(h.style,u,a,i,e.seriesModel,o),is(h,u)}function oS(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}_d(R(Dp,"pictorialBar")),wd(bg("pictorialBar","roundRect"));function aS(t,e,n,i,o){Pf.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom",this.orient=null}function rS(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function sS(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),H(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}aS.prototype={constructor:aS,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(aS,Pf),su.register("single",{create:function(i,o){var a=[];return i.eachComponent("singleAxis",function(t,e){var n=new rS(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:(rS.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:rS,_init:function(t){var e=this.dimension,n=new aS(e,Jp(t),[0,0],t.get("type"),t.get("position")),i="category"===n.type;n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),(t.axis=n).model=t,(n.coordinateSystem=this)._axis=n},update:function(t){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(z((e=t.getData()).mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),$p(this._axis.scale,this._axis.model))},this)},resize:function(t,e){this._rect=wl({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 lS=["axisLine","axisTickLabel","axisName"],uS="splitLine",hS=sm.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group;o.removeAll();var a=sS(t),r=new jg(t,a);z(lS,r.add,r),o.add(r.getGroup()),t.get(uS+".show")&&this["_"+uS](t),hS.superCall(this,"render",t,e,n,i)},_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 f=e.toGlobalCoord(h[p].coord);s?(c[0]=f,c[1]=r.y,d[0]=f,d[1]=r.y+r.height):(c[0]=r.x,c[1]=f,d[0]=r.x+r.width,d[1]=f);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new _r(Fr({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(Vr(l[p],{style:{stroke:a[p%a.length],lineDash:i.getLineDash(o),lineWidth:o},silent:!0}))}}}),cS=Ll.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});m(cS.prototype,nf),Pg("single",cS,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:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function dS(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var a=n.getData(),r=mo(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(L(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 pS=z,fS=R,gS=vo();function mS(t,e,n,i,o){var a,l,r,u,h,c,d,p,f,s,g,m=t.axis;!m.scale.isBlank()&&m.containData(e)&&(t.involveSeries?(g=(a=(l=e,u=(r=t).axis,h=u.dim,c=l,d=[],p=Number.MAX_VALUE,f=-1,pS(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&&f<0)&&(p=i,f=n,c=s,d.length=0),pS(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&&k(o,s[0]),!i&&t.snap&&m.containData(g)&&null!=g&&(e=g),n.showPointer(t,e,s,o),n.showTooltip(t,a,g)):n.showPointer(t,e))}function vS(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function yS(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=rm(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 xS(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 _S(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}Md({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 wS=vo(),bS=z;function SS(t,e,n){var i;v.node||(i=e.getZr(),wS(i).records||(wS(i).records={}),function(r,s){if(wS(r).initialized)return;function t(t,a){r.on(t,function(e){var i,o,n=(i=s,{dispatchAction:function t(e){var n=o[e.type];n?n.push(e):(e.dispatchAction=t,i.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});bS(wS(r).records,function(t){t&&a(t,e,n.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))}(n.pendings,s)})}wS(r).initialized=!0,t("click",R(IS,"click")),t("mousemove",R(IS,"mousemove")),t("globalout",MS)}(i,e),(wS(i).records[t]||(wS(i).records[t]={})).handler=n)}function MS(t,e,n){t.handler("leave",null,n)}function IS(t,e,n,i){e.handler(t,n,i)}function AS(t,e){var n;v.node||(n=e.getZr(),(wS(n).records||{})[t]&&(wS(n).records[t]=null))}var TS=Id({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";SS("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){AS(e.getZr(),"axisPointer"),TS.superApply(this._model,"remove",arguments)},dispose:function(t,e){AS("axisPointer",e),TS.superApply(this._model,"dispose",arguments)}}),DS=vo(),CS=D,LS=P;function kS(){}function PS(t,e,n,i){!function n(i,t){{if(B(i)&&B(t)){var o=!0;return z(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}}(DS(n).lastProp,i)&&(DS(n).lastProp=i,e?fs(n,i,t):(n.stopAnimation(),n.attr(i)))}function NS(t,e){t[e.get("label.show")?"show":"hide"]()}function OS(t){return{position:t.position.slice(),rotation:t.rotation||0}}function ES(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 RS(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 zS(t,e,n,i,o){var a=BS(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=nl(r.get("padding")||0),l=r.getFont(),u=jn(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 f,g,m,v,y,x,_=o.verticalAlign;"bottom"===_&&(h[1]-=d),"middle"===_&&(h[1]-=d/2),f=h,g=c,m=d,y=(v=i).getWidth(),x=v.getHeight(),f[0]=Math.min(f[0]+g,y)-g,f[1]=Math.min(f[1]+m,x)-m,f[0]=Math.max(f[0],0),f[1]=Math.max(f[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",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 BS(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),seriesData:[]},z(n,function(t){var e=o.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i&&a.seriesData.push(i)}),N(s)?r=s.replace("{value}",r):A(s)&&(r=s(a))),r}function VS(t,e,n){var i=Zt();return qt(i,i,n.rotation),Yt(i,i,n.position),vs([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function GS(t,e,n,i,o,a){var r=jg.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get("label.margin"),zS(e,i,o,a,{position:VS(i.axis,t,n),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function FS(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function WS(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function HS(t,e,n,i,o,a){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:a,clockwise:!0}}Ao((kS.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=R(PS,e,c),this.updatePointerEl(r,l,h,e),this.updateLabelEl(r,l,h,e)):(r=this._group=new cn,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),n.getZr().add(r)),ES(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=om(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n,i=e.pointer;i&&(n=DS(t).pointerEl=new bs[i.type](CS(e.pointer)),t.add(n))},createLabelEl:function(t,e,n,i){var o;e.label&&(o=DS(t).labelEl=new xr(CS(e.label)),t.add(o),NS(o,i))},updatePointerEl:function(t,e,n){var i=DS(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var o=DS(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{shape:e.label.shape,position:e.label.position}),NS(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=ws(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Rt(t.event)},onmousedown:LS(this._onHandleDragMove,this,0,0),drift:LS(this._onHandleDragMove,this),ondragend:LS(this._onHandleDragEnd,this)}),i.add(o)),ES(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]),Ch(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){PS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,OS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n,i=this._handle;i&&(this._dragging=!0,n=this.updateHandleTransform(OS(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=n,i.stopAnimation(),i.attr(OS(n)),DS(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(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),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=kS);var ZS=kS.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.grid,u=i.get("type"),h=US(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0));u&&"none"!==u&&(a=RS(i),(r=XS[u](s,c,h,a)).style=a,t.graphicKey=r.type,t.pointer=r),GS(e,t,cm(l.model,n),n,i,o)},getHandleTransform:function(t,e,n){var i=cm(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:VS(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),r=US(o,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}}});function US(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var XS={line:function(t,e,n,i){var o=FS([e,n[0]],[e,n[1]],jS(t));return Fr({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:WS([e-i/2,n[0]],[i,o],jS(t))}}};function jS(t){return"x"===t.dim?0:1}sm.registerAxisPointerClass("CartesianAxisPointer",ZS),md(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!C(e)&&(t.axisPointer.link=[e]))}),vd(Cc.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=nm(t,e)}),yd({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||P(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){_S(r)&&(r=dS({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=_S(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||_S(r),d={},p={},f={list:[],map:{}},g={showPointer:fS(vS,p),showTooltip:fS(yS,f)};pS(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);pS(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&&mS(t,n,g,!1,d))})});var m,v,y,x={};return pS(h,function(o,t){var a=o.linkGroup;a&&!p[t]&&pS(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,xS(t),xS(o)))),x[o.key]=n)})}),pS(x,function(t,e){mS(h[e],t,g,!0,d)}),m=p,v=h,y=d.axesInfo=[],pS(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(_S(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})}(f,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=gS(n)[i]||{},a=gS(n)[i]={};pS(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&pS(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];z(o,function(t,e){a[e]||s.push(t)}),z(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 YS=["x","y"],qS=["width","height"],KS=kS.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.coordinateSystem,u=QS(l,1-JS(s)),h=l.dataToPoint(e)[0],c=i.get("type");c&&"none"!==c&&(a=RS(i),(r=$S[c](s,h,u,a)).style=a,t.graphicKey=r.type,t.pointer=r),GS(e,t,sS(n),n,i,o)},getHandleTransform:function(t,e,n){var i=sS(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:VS(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.coordinateSystem,a=JS(i),r=QS(o,a),s=t.position;s[a]+=e[a],s[a]=Math.min(r[1],s[a]),s[a]=Math.max(r[0],s[a]);var l=QS(o,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),$S={line:function(t,e,n,i){var o=FS([e,n[0]],[e,n[1]],JS(t));return Fr({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:WS([e-i/2,n[0]],[i,o],JS(t))}}};function JS(t){return t.isHorizontal()?0:1}function QS(t,e){var n=t.getRect();return[n[YS[e]],n[YS[e]]+n[qS[e]]]}sm.registerAxisPointerClass("SingleAxisPointer",KS),Id({type:"single"});var tM=ah.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){tM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=L(Bw().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,o=-1,a=-1,r=0;r<i;++r){var s=n[r].dataList.length;o<s&&(o=s,a=r)}for(var l=0;l<i;++l)if(l!==a)for(var u=n[l].name,h=0;h<o;++h){for(var c=n[a].dataList[h][0],d=n[l].dataList.length,p=-1,f=0;f<d;++f){if(n[l].dataList[f][0]===c){p=f;break}}-1===p&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=u,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=tt(),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=np(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Nd(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new Hd(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;for(var o=L(Bw().key(function(t){return n.get("name",t)}).entries(e),function(t){return{name:t.key,indices:t.values}}),a=n.mapDimension("single"),r=0;r<o.length;++r)o[r].indices.sort(s);function s(t,e){return n.get(a,t)-n.get(a,e)}return o},getAxisTooltipData:function(t,e){C(t)||(t=t?[t]:[]);for(var n,i=this.getData(),o=this.getLayerSeries(),a=[],r=o.length,s=0;s<r;++s){for(var l=Number.MAX_VALUE,u=-1,h=o[s].indices.length,c=0;c<h;++c){var d=i.get(t[0],o[s].indices[c]),p=Math.abs(d-e);p<=l&&(n=d,l=p,u=o[s].indices[c])}a.push(u)}return{dataIndices:a,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),i=e.get(e.mapDimension("value"),t);return!isNaN(i)&&null!=i||(i="-"),al(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}}}});Td({type:"themeRiver",init:function(){this._layers=[]},render:function(A){var T=A.getData(),D=this.group,C=A.getLayerSeries(),t=T.getLayout("layoutInfo"),e=t.rect,n=t.boundaryGap;function i(t){return t.name}D.attr("position",[0,e.y+n[0]]);var o=new Cd(this._layersSeries||[],C,i,i),L={};function a(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=T.getItemLayout(s[l]),h=u.x,c=u.y0,d=u.y;a.push([h,c]),r.push([h,c+d]),o=T.getItemVisual(s[l],"color")}var p,f,g,m,v,y,x,_=T.getItemLayout(s[0]),w=T.getItemModel(s[l-1]),b=w.getModel("label"),S=b.get("margin");"add"===t?(g=L[e]=new cn,p=new gg({shape:{points:a,stackedOnPoints:r,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),f=new ur({style:{x:_.x-S,y:_.y0+_.y/2}}),g.add(p),g.add(f),D.add(g),p.setClipPath((m=p.getBoundingRect(),v=A,y=function(){p.removeClipPath()},gs(x=new xr({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))):(g=i[n],p=g.childAt(0),f=g.childAt(1),D.add(g),L[e]=g,fs(p,{shape:{points:a,stackedOnPoints:r}},A),fs(f,{style:{x:_.x-S,y:_.y0+_.y/2}},A));var M=w.getModel("emphasis.itemStyle"),I=w.getModel("itemStyle");rs(f.style,b,{text:b.get("show")?A.getFormattedLabel(s[l-1],"normal")||T.getName(s[l-1]):null,textVerticalAlign:"middle"}),p.setStyle(k({fill:o},I.getItemStyle(["color"]))),is(p,M.getItemStyle())}else D.remove(i[e])}o.add(P(a,this,"add")).update(P(a,this,"update")).remove(P(a,this,"remove")).execute(),this._layersSeries=C,this._layers=L},dispose:function(){}});function eM(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,a=t.getLayerSeries(),r=n.mapDimension("single"),s=n.mapDimension("value"),l=L(a,function(t){return L(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,f=0;f<p;++f){i=h[f]*c,n.setItemLayout(a[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:i,y:l[0][f][1]*c});for(var g=1;g<d;++g)i+=l[g-1][f][1]*c,n.setItemLayout(a[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:i,y:l[g][f][1]*c})}}_d(function(t){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]=Rs(a[0],o.height),a[1]=Rs(a[1],o.height),eM(e,t,o.height-a[0]-a[1])):(a[0]=Rs(a[0],o.width),a[1]=Rs(a[1],o.width),eM(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",i)})}),wd(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=tt();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)})})}),vd(Bm("themeRiver")),ah.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};!function n(t){var i=0;z(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}(e);var n=t.levels||[],i={};return i.levels=n,Jv.createTree(e,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=ah.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=my(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,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var nM="none",iM="ancestor",oM="self",aM=2,rM=4;function sM(t,e,n){cn.call(this);var i=new pr({z2:aM});i.seriesIndex=e.seriesIndex;var o=new ur({z2:rM,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 lM=sM.prototype;lM.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();s||console.log(e.getLayout());var l=k({},s);l.label=null;var u,h=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),c=r.getModel("itemStyle").getItemStyle();u=O({lineJoin:"bevel",fill:(u="normal"===n?c:m(r.getModel(n+".itemStyle").getItemStyle(),c)).fill||h},u),t?(a.setShape(l),a.shape.r=s.r0,fs(a,{shape:{r:s.r}},i,e.dataIndex),a.useStyle(u)):"object"===_typeof(u.fill)&&u.fill.type||"object"===_typeof(a.style.fill)&&a.style.fill.type?(fs(a,{shape:l},i),a.useStyle(u)):fs(a,{shape:l,style:u},i),this._updateLabel(i,h,n);var d,p=r.getShallow("cursor");p&&a.attr("cursor",p),t&&(d=i.getShallow("highlightPolicy"),this._initEvents(a,e,i,d)),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel},lM.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)!==nM&&(i===oM?e===n:i===iM?e===n||e.isAncestorOf(n):e===n||e.isDescendantOf(n))?t.piece.childAt(0).trigger("highlight"):o!==nM&&t.piece.childAt(0).trigger("downplay")))})},lM.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},lM.onHighlight=function(){this.updateData(!1,this.node,"highlight")},lM.onDownplay=function(){this.updateData(!1,this.node,"downplay")},lM._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=H(t.getFormattedLabel(this.node.dataIndex,"normal",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);as(c.style,c.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var d,p=(l.startAngle+l.endAngle)/2,f=Math.cos(p),g=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*f+l.cx,_=d*g+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)},lM._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(sM,cn);yh.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 sM(t,o,a),l.add(n),r.setItemGraphicEl(t.dataIndex,n)))}}(null==t?null:n[t],null==e?null:i[e])}new Cd(i,n,t,t).add(e).update(e).remove(R(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 sM(t,o,a),l.add(i.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent),n=function(){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(a){var r=!1;s.seriesModel.getViewRoot().eachNode(function(t){var e,n,i,o;!r&&t.piece&&t.piece.childAt(0)===a.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?s._rootToNode(t):"link"!==e||(i=(n=t.getModel()).get("link"))&&(o=n.get("target",!0)||"_blank",window.open(i,o)),r=!0)})}var s=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 uM="sunburstRootToNode";yd({type:uM,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=py(o,[uM],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=gy(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var hM="sunburstHighlight";yd({type:hM,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){var n=py(i,[hM],t);n&&(i.highlight=n.node)})});yd({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})});var cM=Math.PI/180;function dM(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 pM(a,r){return r=r||[0,0],L(["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)}wd(R(Em,"sunburst")),_d(R(function(t,e,T){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=T.getWidth(),o=T.getHeight(),c=Math.min(i,o),d=Rs(e[0],i),p=Rs(e[1],o),f=Rs(n[0],c/2),a=Rs(n[1],c/2),r=-t.get("startAngle")*cM,g=t.get("minAngle")*cM,m=t.getData().tree.root,s=t.getViewRoot(),v=s.depth,l=t.get("sort");null!=l&&!function e(t,n){var i=t.children||[];t.children=dM(i,n);i.length&&z(t.children,function(t){e(t,n)})}(s,l);var u=0;z(s.children,function(t){isNaN(t.getValue())||u++});var h,y,x=s.getValue(),_=Math.PI/(x||u)*2,w=0<s.depth,b=s.height-(w?-1:1),S=(a-f)/(b||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),A=M?1:-1;w&&(h=f+S,y=2*Math.PI,m.setLayout({angle:y,startAngle:r,endAngle:r+y,clockwise:M,cx:d,cy:p,r0:f,r:h})),function e(t,n){if(t){var i,o,a,r,s,l,u,h=n;return t!==m&&(i=t.getValue(),(o=0===x&&I?_:i*_)<g&&(o=g),h=n+A*o,a=t.depth-v-(w?-1:1),r=f+S*a,s=f+S*(1+a),null!=(l=t.getModel()).get("r0")&&(r=Rs(l.get("r0"),c/2)),null!=l.get("r")&&(s=Rs(l.get("r"),c/2)),t.setLayout({angle:o,startAngle:n,endAngle:h,clockwise:M,cx:d,cy:p,r0:r,r:s})),t.children&&t.children.length&&(u=0,z(t.children,function(t){u+=e(t,n+u)})),h-n}}(s,r)})},"sunburst")),vd(R(Bm,"sunburst"));function fM(a,r){return r=r||[0,0],L([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 gM(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 mM(s,l){return L(["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 vM=["itemStyle"],yM=["emphasis","itemStyle"],xM=["label"],_M=["emphasis","label"],wM="e\0\0",bM={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:P(pM,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:P(fM,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:P(gM,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:P(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:P(mM,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 SM(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function MM(o,a,e,t){var n=o.get("renderItem"),i=o.coordinateSystem,r={};i&&(T&&(Y(n,"series.render is required."),Y(i.prepareCustoms||bM[i.type],"This coordSys does not support custom series.")),r=i.prepareCustoms?i.prepareCustoms():bM[i.type](i));var s,l,u,h,c,d,p,f=O({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=u),a.get(a.getDimension(t||0),e)},style:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(vM).getItemStyle();null!=p&&(n.fill=p);var i=a.getItemVisual(e,"opacity");return null!=i&&(n.opacity=i),rs(n,c,null,{autoColor:p,isRectText:!0}),n.text=c.getShallow("show")?Z(o.getFormattedLabel(e,"normal"),zf(a,e)):null,t&&k(n,t),n},styleEmphasis:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(yM).getItemStyle();return rs(n,d,null,{isRectText:!0},!0),n.text=d.getShallow("show")?U(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),zf(a,e)):null,t&&k(n,t),n},visual:function(t,e){return null==e&&(e=u),a.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:_p+o},t));for(var a=Ap(e),r=[],o=0;o<t.count;o++){var s=a.axis0[_p+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 ds(t,e)}},r.api||{}),g={context:{},seriesId:o.id,seriesName:o.name,seriesIndex:o.seriesIndex,coordSys:r.coordSys,dataInsideLength:a.count(),encode:(s=o.getData(),l={},z(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:a.getRawIndex(t),actionType:e?e.type:null},g),f)};function v(t){null==t&&(t=u),m&&(h=a.getItemModel(t),c=h.getModel(xM),d=h.getModel(_M),p=a.getItemVisual(t,"color"),m=!1)}}function IM(t,e,n,i,o,a){return(t=AM(t,e,n,i,o,a,!0))&&a.setItemGraphicEl(e,t),t}function AM(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")))&&LM(h)!==t.__customPathData||"image"===u&&kM(c,"image")&&c.image!==t.__customImagePath||"text"===u&&kM(h,"text")&&c.text!==t.__customText)&&(o.remove(t),t=null),!l){var d,p,f,g,m,v,y,x=!t;return t||("path"===(y=(d=n).type)?(f=null!=(p=d.shape).width&&null!=p.height?{x:p.x||0,y:p.y||0,width:p.width,height:p.height}:null,(m=Rr(g=LM(p),null,f,p.layout||"center")).__customPathData=g):"image"===y?(m=new Ti({})).__customImagePath=d.style.image:"text"===y?(m=new ur({})).__customText=d.style.text:(v=bs[y.charAt(0).toUpperCase()+y.slice(1)],T&&Y(v,'graphic type "'+y+'" can not be found.'),m=new v),m.__customGraphicType=y,m.name=d.name,t=m),function(e,t,n,i,o,a){var r,s,l={},u=n.style||{};n.shape&&(l.shape=D(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={},z(["x","y","width","height"],function(t){SM(t,r,u,e.style,o)})),"text"===e.type&&n.style&&(r=l.style={},z(["x","y"],function(t){SM(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),gs(e,{style:{opacity:s}},i,t))),o?e.attr(l):fs(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,c=!1===h;e.__cusHasEmphStl&&null==h||!e.__cusHasEmphStl&&c||($r(e,h),e.__cusHasEmphStl=!c),a&&os(e,!c)}(t,e,n,i,x,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 Cd(t.oldChildren,t.newChildren,TM,TM,t).add(DM).update(DM).remove(CM).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]&&AM(t.childAt(h),e,a[h],i,t,o);T&&Y(!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 TM(t,e){var n=t&&t.name;return null!=n?n:wM+e}function DM(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null;AM(null!=e?n.oldChildren[e]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function CM(t){var e=this.context,n=e.oldChildren[t];n&&e.group.remove(n)}function LM(t){return t&&(t.pathData||t.d)}function kM(t,e){return t&&t.hasOwnProperty(e)}ah.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(){return rp(this.getSource(),this)},getDataParams:function(t,e,n){var i=ah.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),yh.extend({type:"custom",_data:null,render:function(n,t,e,i){var o=this._data,a=n.getData(),r=this.group,s=MM(n,a,t,e);a.diff(o).add(function(t){IM(null,t,s(t,i),n,r,a)}).update(function(t,e){IM(o.getItemGraphicEl(e),t,s(t,i),n,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i,o){var a=e.getData(),r=MM(e,a,n,i);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){IM(null,l,r(l,o),e,this.group,a).traverse(s)}},dispose:nt,filterForExposedEvent:function(t,e,n){var i=e.element;if(null==i||n.name===i)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1}}),md(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 PM=Md({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,PM.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=co(o,a);po(r);var s=this._elOptionsToUpdate=[];z(r,function(t,e){var n=t.option;T&&Y(B(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=k({},n),o=t[e],a=n.$action||"merge";{var r;"merge"===a?o?(T&&Y(!(r=n.type)||o.type===r,'Please set $action: "replace" to change `type`'),m(o,i,!0),Sl(o,i,{ignoreSize:!0}),Il(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=[EM(e,["left","right"]),EM(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){z(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 NM(t,e,n,i){var o=n.type;T&&Y(o,"graphic type MUST be set");var a=bs[o.charAt(0).toUpperCase()+o.slice(1)];T&&Y(a,"graphic type can not be found");var r=new a(n);e.add(r),i.set(t,r),r.__ecGraphicId=t}function OM(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){OM(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function EM(e,t){var n;return z(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}Id({type:"graphic",init:function(){this._elMap=tt(),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,z(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=k({},s=t),z(["id","parentId","$action","hv","bounding"].concat(vl),function(t){delete s[t]}),s);T&&i&&Y(a===i.parent,"Changing parent is not supported."),e&&"merge"!==e?"replace"===e?(OM(i,c),NM(n,a,l,c)):"remove"===e&&OM(i,c):i?i.attr(l):NM(n,a,l,c);var u=c.get(n);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=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=n.length-1;0<=a;a--){var r,s=n[a],l=o.get(s.id);l&&bl(l,s,(r=l.parent)===i?{width:e.getWidth(),height:e.getHeight()}:{width:r.__ecGraphicWidth||0,height:r.__ecGraphicHeight||0},null,{hv:s.hv,boundingMode:s.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){OM(t,e)}),this._elMap=tt()},dispose:function(){this._clear()}});var RM=Md({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){RM.superCall(this,"mergeOption",t)},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(a){var r=[],s=[];a.eachRawSeries(function(t){var e,n,i,o=t.name;s.push(o),t.legendDataProvider?(i=(n=t.legendDataProvider()).mapArray(n.getName),a.isSeriesFiltered(t)||(s=s.concat(i)),i.length?r=r.concat(i):e=!0):e=!0,e&&fo(t)&&r.push(t.name)}),this._availableNames=s;var t=L(this.get("data")||r,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Cs(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")&&z(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)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=M(this._availableNames,t)},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",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});function zM(t,e,n){var o,a={},r="toggleSelected"===t;return n.eachComponent("legend",function(i){r&&null!=o?i[o?"select":"unSelect"](e.name):(i[t](e.name),o=i.isSelected(e.name)),z(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)})}),{name:e.name,selected:a}}function BM(t,e){var n=nl(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new xr({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})}yd("legendToggleSelect","legendselectchanged",R(zM,"toggleSelected")),yd("legendSelect","legendselected",R(zM,"select")),yd("legendUnSelect","legendunselected",R(zM,"unSelect"));var VM=R,GM=z,FM=cn,WM=Id({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new FM),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var i,o,a,r,s,l,u;this.resetInner(),t.get("show",!0)&&((i=t.get("align"))&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n),s=wl(o=t.getBoxLayoutParams(),a={width:n.getWidth(),height:n.getHeight()},r=t.get("padding")),u=wl(O({width:(l=this.layoutInner(t,i,s)).width,height:l.height},o),a,r),this.group.attr("position",[u.x-l.x,u.y-l.y]),this.group.add(this._backgroundEl=BM(l,t)))},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(l,u,h,c){var d=this.getContentGroup(),p=tt(),f=u.get("selectedMode"),g=[];h.eachRawSeries(function(t){t.get("legendHoverLink")||g.push(t.id)}),GM(u.getData(),function(o,a){var t,e,n,i,r,s=o.get("name");this.newlineDisabled||""!==s&&"\n"!==s?(t=h.getSeriesByName(s)[0],p.get(s)||(t?("function"==typeof(n=(e=t.getData()).getVisual("color"))&&(n=n(t.getDataParams(0))),i=e.getVisual("legendSymbol")||"roundRect",r=e.getVisual("symbol"),this._createItem(s,a,o,u,i,r,l,n,f).on("click",VM(HM,s,c)).on("mouseover",VM(ZM,t.name,null,c,g)).on("mouseout",VM(UM,t.name,null,c,g)),p.set(s,!0)):h.eachRawSeries(function(t){if(!p.get(s)&&t.legendDataProvider){var e=t.legendDataProvider(),n=e.indexOfName(s);if(n<0)return;var i=e.getItemVisual(n,"color");this._createItem(s,a,o,u,"roundRect",null,l,i,f).on("click",VM(HM,s,c)).on("mouseover",VM(ZM,null,s,c,g)).on("mouseout",VM(UM,null,s,c,g)),p.set(s,!0)}},this),T&&(p.get(s)||console.warn(s+" series not exists. Legend data should be same with series name or data name.")))):d.add(new FM({newline:!0}))},this)},_createItem:function(t,e,n,i,o,a,r,s,l){var u,h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),p=i.get("symbolKeepAspect"),f=i.isSelected(t),g=new FM,m=n.getModel("textStyle"),v=n.get("icon"),y=n.getModel("tooltip"),x=y.parentModel;o=v||o,g.add(df(o,0,0,h,c,f?s:d,null==p||p)),v||!a||a===o&&"none"!==a||(u=.8*c,"none"===a&&(a="circle"),g.add(df(a,(h-u)/2,(c-u)/2,u,u,f?s:d,null==p||p)));var _="left"===r?h+5:-5,w=r,b=i.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),g.add(new ur({style:rs({},m,{text:S,x:_,y:c/2,textFill:f?m.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new xr({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?k({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(M),g.eachChild(function(t){t.silent=!0}),M.silent=!l,this.getContentGroup().add(g),is(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,n){var i=this.getContentGroup();_l(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var o=i.getBoundingRect();return i.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}});function HM(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ZM(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 UM(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}vd(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})}),Ll.registerSubTypeDefaulter("legend",function(){return"plain"});var XM=RM.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=Ml(t);XM.superCall(this,"init",t,e,n,i),jM(this,t,o)},mergeOption:function(t,e){XM.superCall(this,"mergeOption",t,e),jM(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function jM(t,e,n){var i=[1,1];i[t.getOrient().index]=0,Sl(e,n,{type:"box",ignoreSize:i})}var YM=cn,qM=["width","height"],KM=["x","y"],$M=WM.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){$M.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new YM),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new YM),this._showController},resetInner:function(){$M.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a){var r=this;$M.superCall(this,"renderInner",t,o,e,a);var s=this._controllerGroup,l=o.get("pageIconSize",!0);C(l)||(l=[l,l]),i("pagePrev",0);var n=o.getModel("pageTextStyle");function i(t,e){var n=t+"DataIndex",i=ws(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:P(r._pageGo,r,n,o,a)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});i.name=t,s.add(i)}s.add(new ur({name:"pageText",style:{textFill:n.getTextColor(),font:n.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),i("pageNext",1)},layoutInner:function(t,e,n){var i=this.getContentGroup(),o=this._containerGroup,a=this._controllerGroup,r=t.getOrient().index,s=qM[r],l=qM[1-r],u=KM[1-r];_l(t.get("orient"),i,t.get("itemGap"),r?n.width:null,r?null:n.height),_l("horizontal",a,t.get("pageButtonItemGap",!0));var h=i.getBoundingRect(),c=a.getBoundingRect(),d=this._showController=h[s]>n[s],p=[-h.x,-h.y];p[r]=i.position[r];var f=[0,0],g=[-c.x,-c.y],m=Z(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=n[s]-c[s]:f[r]+=c[s]+m),g[1-r]+=h[l]/2-c[l]/2,i.attr("position",p),o.attr("position",f),a.attr("position",g);var v,y=this.group.getBoundingRect();(y={x:0,y:0})[s]=d?n[s]:h[s],y[l]=Math.max(h[l],c[l]),y[u]=Math.min(0,c[u]+g[1-r]),o.__rectSize=n[s],d?((v={x:0,y:0})[s]=Math.max(n[s]-c[s]-m,0),v[l]=y[l],o.setClipPath(new xr({shape:v})),o.__rectSize=v[s]):a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&fs(i,{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;z(["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",N(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e,n,i,o,a=t.get("scrollDataIndex",!0),r=this.getContentGroup(),s=r.getBoundingRect(),l=this._containerGroup.__rectSize,u=t.getOrient().index,h=qM[u],c=qM[1-u],d=KM[u],p=r.position.slice();this._showController?r.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=r.childAt(0);var f=l?Math.ceil(s[h]/l):0;if(o){var g=o.getBoundingRect(),m=o.position[u]+g[d];p[u]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[h]),e=s[h]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[h]=l,y[c]=s[c],y[d]=-p[u]-s[d];var x=r.children();if(r.eachChild(function(t,e){var n=w(t);n.intersect(y)&&(null==v&&(v=e),i=t.__legendDataIndex),e===x.length-1&&n[d]+n[h]<=y[d]+y[h]&&(i=null)}),null!=v){var _=w(x[v]);if(y[d]=_[d]+_[h]-y[h],v<=0&&_[d]>=y[d])n=null;else{for(;0<v&&w(x[v-1]).intersect(y);)v--;n=x[v].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:f,pagePrevDataIndex:n,pageNextDataIndex:i};function w(t){var e=t.getBoundingRect().clone();return e[d]+=t.position[u],e}}});yd("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),Md({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 JM=z,QM=el,tI=["","-webkit-","-moz-","-o-"];function eI(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,L(tI,function(t){return t+"transition:"+n}).join(";"))),h&&(v.canvasSupported?l.push("background-Color:"+h):(l.push("background-Color:#"+Ce(h)),l.push("filter:alpha(opacity=70)"))),JM(["width","color","radius"],function(t){var e="border-"+t,n=QM(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"),JM(["decoration","align"],function(t){var e=i.get(t);e&&a.push("text-"+t+":"+e)}),a.join(";"))),null!=d&&l.push("padding:"+nl(d).join("px ")+"px"),l.join(";")+";"}function nI(n,t){if(v.wxa)return null;var e=document.createElement("div"),i=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout;var o=this;e.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},e.onmousemove=function(t){var e;t=t||window.event,o._enterable||(e=i.handler,Ot(n,t,!0),e.dispatch("mousemove",t))},e.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function iI(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}nI.prototype={constructor:nI,_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;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+eI(t)+";left:"+this._x+"px;top:"+this._y+"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,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},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(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},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.paddingLeft,10)+parseInt(t.paddingRight,10)+parseInt(t.borderLeftWidth,10)+parseInt(t.borderRightWidth,10),n+=parseInt(t.paddingTop,10)+parseInt(t.paddingBottom,10)+parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10))),{width:e,height:n}}},iI.prototype={constructor:iI,_enterable:!0,update:function(){},show:function(){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 ur({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.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var oI=P,aI=z,rI=Rs,sI=new xr({shape:{x:-1,y:-1,width:2,height:2}});function lI(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(Cs.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new Cs(n,e,e.ecModel))}return e}function uI(t,e){return t.dispatchAction||P(e.dispatchAction,e)}function hI(t){return"center"===t||"middle"===t}function cI(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function dI(t){return t.dim}function pI(t,e){Pf.call(this,"radius",t,e),this.type="category"}Id({type:"tooltip",init:function(t,e){var n,i;v.node||(n=t.getComponent("tooltip").get("renderMode"),this._renderMode=bo(n),"html"===this._renderMode?(i=new nI(e.getDom(),e),this._newLine="<br/>"):(i=new iI(e),this._newLine="\n"),this._tooltipContent=i)},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");SS("itemTooltip",this._api,oI(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(){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=uI(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var r=sI;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,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=dS(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,event:{}},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,event:{}},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(uI(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=lI([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=P(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=lI([e.tooltipOption,n]),f=this._renderMode,r=this._newLine,g={};aI(t,function(t){aI(t.dataByAxis,function(s){var l,t,u=d.getComponent(s.axisDim+"Axis",s.axisIndex),h=s.value,c=[];u&&null!=h&&(l=BS(h,u.axis,d,s.seriesDataIndices,s.valueLabelOpt),z(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),B(e=o.formatTooltip(a,!0,null,f))?(n=e.html,i=e.markers,m(g,i)):n=e,c.push(n))}),t=l,"html"!==f?o.push(c.join(r)):o.push((t?al(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,g)})},_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,f=c.getData(),g=lI([f.getItemModel(d),c,h&&(h.coordinateSystem||{}).model,this._tooltipModel]),m=g.get("trigger");null!=m&&"item"!==m||(i=c.getDataParams(d,p),o=c.formatTooltip(d,!1,p,this._renderMode),r=B(o)?(a=o.html,o.markers):(a=o,null),s="item_"+c.name+"_"+d,this._showOrMove(g,function(){this._showTooltipContent(g,a,i,s,t.offsetX,t.offsetY,t.position,t.target,r)}),n({type:"showTip",dataIndexInside:d,dataIndex:f.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 Cs(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=ll(h,i,!0):"function"==typeof h&&(d=oI(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,f,g,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=rI(e[0],s),i=rI(e[1],l)):B(e)?(e.width=y[0],e.height=y[1],n=(u=wl(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-=hI(x)?y[0]/2:"right"===x?y[0]:0),_&&(i-=hI(_)?y[1]/2:"bottom"===_?y[1]:0),t.get("confine")&&(n=(h=(c=n,d=i,p=s,f=l,g=o.getOuterSize(),m=g.width,v=g.height,c=Math.min(c+m,p)-m,d=Math.min(d+v,f)-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&&aI(t,function(t,e){var n=t.dataByAxis||{},a=(i[e]||{}).dataByAxis||[];(r&=n.length===a.length)&&aI(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)&&aI(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.hide(),AS("itemTooltip",e))}}),yd({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),yd({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),pI.prototype={constructor:pI,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Pf.prototype.dataToCoord,radiusToData:Pf.prototype.coordToData},w(pI,Pf);var fI=vo();function gI(t,e){e=e||[0,360],Pf.call(this,"angle",t,e),this.type="category"}gI.prototype={constructor:gI,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Pf.prototype.dataToCoord,angleToData:Pf.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=jn(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=fI(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(gI,Pf);function mI(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new pI,this._angleAxis=new gI,this._radiusAxis.polar=this._angleAxis.polar=this}mI.prototype={type:"polar",axisPointerEnabled:!0,constructor:mI,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]}};var vI=Ll.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(vI.prototype,nf);var yI={splitNumber:5};function xI(t,e){return e.type||(e.data?"category":"value")}function _I(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&&(z((e=t.getData()).mapDimension("radius",!0),function(t){r.scale.unionExtentFromData(e,ap(e,t))}),z(e.mapDimension("angle",!0),function(t){a.scale.unionExtentFromData(e,ap(e,t))}))}),$p(a.scale,a.model),$p(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 wI(t,e){var n;t.type=e.get("type"),t.scale=Jp(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}Pg("angle",vI,xI,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Pg("radius",vI,xI,yI),Md({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%"}}),su.register("polar",{dimensions:mI.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n=new mI(e);n.update=_I;var i=n.getRadiusAxis(),o=n.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");wI(i,a),wI(o,r),function(t,e,n){var i=e.get("center"),o=n.getWidth(),a=n.getHeight();t.cx=Rs(i[0],o),t.cy=Rs(i[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=Rs(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}(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(T&&!e)throw new Error('Polar "'+H(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}});var bI=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function SI(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 MI(t){return t.getRadiusAxis().inverse?0:1}function II(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()}sm.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e){var n,i,o,a,r;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),II(r=L(n.getViewLabels(),function(t){return(t=D(t)).coord=n.dataToCoord(t.tickValue),t})),II(a),z(bI,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,a,o,r)},this))},_axisLine:function(t,e,n,i){var o=t.getModel("axisLine.lineStyle"),a=new cr({shape:{cx:e.cx,cy:e.cy,r:i[MI(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,n,i){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),r=i[MI(e)],s=L(n,function(t){return new _r({shape:SI(e,[r,r+a],t.coord)})});this.group.add(Vr(s,{style:O(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,p,e){var f=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin");z(e,function(t,e){var n=g,i=t.tickValue,o=p[MI(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";f&&f[i]&&f[i].textStyle&&(n=new Cs(f[i].textStyle,g,g.ecModel));var h=new ur({silent:!0});this.group.add(h),rs(h.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u})},this)},_splitLine:function(t,e,n,i){for(var o=t.getModel("splitLine").getModel("lineStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=0;l<n.length;l++){var u=a++%r.length;s[u]=s[u]||[],s[u].push(new _r({shape:SI(e,i,n[l].coord)}))}for(l=0;l<s.length;l++)this.group.add(Vr(s[l],{style:O({stroke:r[l%r.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,n,i){if(n.length){for(var o=t.getModel("splitArea").getModel("areaStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=Math.PI/180,u=-n[0].coord*l,h=Math.min(i[0],i[1]),c=Math.max(i[0],i[1]),d=t.get("clockwise"),p=1;p<n.length;p++){var f=a++%r.length;s[f]=s[f]||[],s[f].push(new pr({shape:{cx:e.cx,cy:e.cy,r0:h,r:c,startAngle:u,endAngle:-n[p].coord*l,clockwise:d},silent:!0})),u=-n[p].coord*l}for(p=0;p<s.length;p++)this.group.add(Vr(s[p],{style:O({fill:r[p%r.length]},o.getAreaStyle()),silent:!0}))}}});var AI=["axisLine","axisTickLabel","axisName"],TI=["splitLine","splitArea"];sm.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e){var n,i,t,o,a,r,s,l,u,h,c;this.group.removeAll(),e.get("show")&&(n=e.axis,t=(i=n.polar).getAngleAxis(),o=n.getTicksCoords(),a=t.getExtent()[0],r=n.getExtent(),u=e,h=a,s={position:[(l=i).cx,l.cy],rotation:h/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:u.getModel("axisLabel").get("rotate"),z2:1},c=new jg(e,s),z(AI,c.add,c),this.group.add(c.getGroup()),z(TI,function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,a,r,o)},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 cr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord},silent:!0}))}for(u=0;u<l.length;u++)this.group.add(Vr(l[u],{style:O({stroke:s[u%s.length],fill:null},a.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 pr({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(Vr(l[h],{style:O({fill:s[h%s.length]},a.getAreaStyle()),silent:!0}))}}});var DI=kS.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"+pl(a.dim)](e),c=i.get("type");c&&"none"!==c&&(r=RS(i),(s=CI[c](a,l,h,u,r)).style=r,t.graphicKey=s.type,t.pointer=s);var d=i.get("label.margin");zS(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,f,g,m;u="radius"===o.dim?(qt(c=Zt(),c,r),Yt(c,c,[n.cx,n.cy]),s=vs([a,-i],c),d=e.getModel("axisLabel").get("rotate")||0,p=jg.innerTextLayout(r,d*Math.PI/180,-1),l=p.textAlign,p.textVerticalAlign):(f=h[1],s=n.coordToPoint([f+i,a]),g=n.cx,m=n.cy,l=Math.abs(s[0]-g)/f<.3?"center":s[0]>g?"left":"right",Math.abs(s[1]-m)/f<.3?"middle":s[1]>m?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,l,d))}});var CI={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:FS(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){var o=Math.max(1,t.getBandWidth()),a=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:HS(e.cx,e.cy,i[0],i[1],(-n-o/2)*a,(o/2-n)*a)}:{type:"Sector",shape:HS(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};function LI(i,t){t.update="updateView",yd(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),z(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}sm.registerAxisPointerClass("PolarAxisPointer",DI),_d(R(function(t,e,n){n.getWidth(),n.getHeight();var k={},P=function(t){var p={};z(t,function(t,e){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(o[1]-o[0])/n.count(),r=p[dI(i)]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=r.stacks;p[dI(i)]=r;var l=cI(t);s[l]||r.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=Rs(t.get("barWidth"),a),h=Rs(t.get("barMaxWidth"),a),c=t.get("barGap"),d=t.get("barCategoryGap");u&&!s[l].width&&(u=Math.min(r.remainedWidth,u),s[l].width=u,r.remainedWidth-=u),h&&(s[l].maxWidth=h),null!=c&&(r.gap=c),null!=d&&(r.categoryGap=d)});var d={};return z(p,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Rs(t.categoryGap,i),a=Rs(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(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;z(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;z(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=cI(t),a=P[dI(i)][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.coordinateSystem.cx,h=t.coordinateSystem.cy,c=t.get("barMinHeight")||0,d=t.get("barMinAngle")||0;k[o]=k[o]||[];for(var p=e.mapDimension(l.dim),f=e.mapDimension(i.dim),g=op(e,p),m=l.getExtent()[0],v=0,y=e.count();v<y;v++){var x,_,w,b,S,M,I,A,T,D,C=e.get(p,v),L=e.get(f,v);isNaN(C)||(x=0<=C?"p":"n",_=m,g&&(k[o][L]||(k[o][L]={p:m,n:m}),_=k[o][L][x]),"radius"===l.dim?(I=l.dataToRadius(C)-m,A=i.dataToAngle(L),Math.abs(I)<c&&(I=(I<0?-1:1)*c),b=(w=_)+I,M=(S=A-r)-s,g&&(k[o][L][x]=b)):(T=l.dataToAngle(C,!0)-m,D=i.dataToRadius(L),Math.abs(T)<d&&(T=(T<0?-1:1)*d),b=(w=D+r)+s,M=(S=_)+T,g&&(k[o][L][x]=M)),e.setItemLayout(v,{cx:u,cy:h,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180}))}}},this)},"bar")),Id({type:"polar"}),b(Ll.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){Ll.prototype.init.apply(this,arguments),lo(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=xv.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=S(t.regions||[],function(t,e){return e.name&&t.set(e.name,new Cs(e,n)),t},tt()),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 Cs(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label."+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}}),Dm),Id({type:"geo",init:function(t,e){var n=new Vv(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()}}),LI("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),LI("select",{type:"geoSelect",event:"geoselected"}),LI("unSelect",{type:"geoUnSelect",event:"geounselected"});var kI=["rect","polygon","keep","clear"];var PI=z;function NI(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function OI(e,t,a){var n={};return PI(t,function(i){var o=n[i]=(t.prototype.__hidden=t.prototype,new t);function t(){}PI(e[i],function(t,e){var n;By.isValidType(e)&&(n={type:e,visual:t},a&&a(n,i),o[e]=new By(n),"opacity"===e&&((n=D(n)).type="colorAlpha",o.__hidden.__alphaForOpacity=new By(n)))})}),n}function EI(e,n,t){var i;z(t,function(t){n.hasOwnProperty(t)&&NI(n[t])&&(i=!0)}),i&&z(t,function(t){n.hasOwnProperty(t)&&NI(n[t])?e[t]=D(n[t]):delete e[t]})}function RI(t,p,f,g){var m={};return z(t,function(t){var e=By.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!=g&&(g=n.getDimension(g));null!=(o=t.next());){var a=n.getRawDataItem(o);if(a&&!1===a.visualMap)return;for(var r=null!=g?n.get(g,o,!0):o,s=f(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 zI={lineX:BI(0),lineY:BI(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])&&vf(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!!(vf(i,o,a)||vf(i,o+r,a)||vf(i,o,a+s)||vf(i,o+r,a+s)||hn.create(t).contain(l[0],l[1])||GI(o,a,o+r,a,i)||GI(o,a,o,a+s,i)||GI(o+r,a,o+r,a+s,i)||GI(o,a+s,o+r,a+s,i))||void 0}}};function BI(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,n){if(t){var i=n.range;return VI(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(),VI(o[0],i)||VI(o[1],i)||VI(i[0],o)||VI(i[1],o)}}}}function VI(t,e){return e[0]<=t&&t<=e[1]}function GI(t,e,n,i,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(function(t,e,n,i,o,a,r,s){var l=FI(n-t,o-r,i-e,a-s);if(function(t){return t<=1e-6&&-1e-6<=t}(l))return!1;var u=FI(o-t,o-r,a-e,a-s)/l;if(u<0||1<u)return!1;var h=FI(n-t,o-t,i-e,a-e)/l;if(h<0||1<h)return!1;return!0}(t,e,n,i,s[0],s[1],r[0],r[1]))return 1;r=s}}function FI(t,e,n,i){return t*i-e*n}var WI=z,HI=M,ZI=R,UI=["dataToPoint","pointToData"],XI=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function jI(t,e,n){var i=this._targetInfoList=[],o={},a=KI(e,t);WI($I,function(t,e){n&&n.include&&!(0<=HI(n.include,e))||t(a,i,o)})}var YI=jI.prototype;function qI(t){return t[0]>t[1]&&t.reverse(),t}function KI(t,e){return xo(t,e,{includeMainTypes:XI})}YI.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:nA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax})})},YI.matchOutputRanges=function(t,i,o){WI(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&z(t.coordSyses,function(t){var e=tA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},YI.setInputRanges=function(t,u){WI(t,function(t){var e,n,i,o,a,r,s,l=this.findTargetInfo(t,u);T&&(Y(!l||!0===l||t.coordRange,"coordRange must be specified when coord index specified."),Y(!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?nA[t.brushType](e.values,n.offset,(i=e.xyMinMax,o=n.xyMinMax,a=oA(i),r=oA(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)},YI.makePanelOpts=function(n,i){return L(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:yw(e),isTargetByCursor:_w(e,n,t.coordSysModel),getLinearBrushOtherExtent:xw(e)}})},YI.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=HI(i.coordSyses,e.coordinateSystem)},YI.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=KI(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<JI.length;o++)if(JI[o](i,a))return a}return!0};var $I={grid:function(t,i){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,n=tt(),r={},s={};(o||a||e)&&(WI(o,function(t){var e=t.axis.grid.model;n.set(e.id,e),r[e.id]=!0}),WI(a,function(t){var e=t.axis.grid.model;n.set(e.id,e),s[e.id]=!0}),WI(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=[];WI(e.getCartesians(),function(t,e){(0<=HI(o,t.getAxis("x").model)||0<=HI(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:QI.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){WI(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:QI.geo})})}},JI=[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}],QI={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(ms(t)),e}},tA={lineX:ZI(eA,0),lineY:ZI(eA,1),rect:function(t,e,n){var i=e[UI[t]]([n[0][0],n[1][0]]),o=e[UI[t]]([n[0][1],n[1][1]]),a=[qI([i[0],o[0]]),qI([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:L(t,function(t){var e=i[UI[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 eA(t,e,n,i){T&&Y("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),a=qI(L([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 nA={lineX:ZI(iA,0),lineY:ZI(iA,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 L(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function iA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function oA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var aA=["inBrush","outOfBrush"],rA="__ecBrushSelect",sA="__ecInBrushSelectEvent",lA=Cc.VISUAL.BRUSH;function uA(t,e){var n;t.isDisposed()||((n=t.getZr())[sA]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[sA]=!1)}function hA(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 cA(t){var r=t.brushSelector;if(N(r)){var e=[];return z(zI,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 z(zI,function(t,e){n[e]=r}),n}return r}_d(lA,function(e,t,n){e.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1}),(t.brushTargetManager=new jI(t.option,e)).setInputRanges(t.areas,e)})}),wd(lA,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:D(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=L(r.areas,function(t){return n=O({boundingRect:dA[t.brushType](t)},t),i=n.selectors={},z(zI[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n;var n,i}),w=OI(r.option,aA,function(t){t.mappingMethod="fixed"});function b(t){return"all"===n||i[t]}function S(t){return!!t.length}C(n)&&z(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=cA(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;z(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){hA(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,f,g,i=cA(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 hA(i,o,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};function m(t){return h.getItemVisual(f,t)}function v(t,e){h.setItemVisual(f,t,e)}function s(t,e){f=null==p?t:e;var n=h.getRawDataItem(f);if(!n||!1!==n.visualMap)for(var i=c.call(d,t),o=u[i],a=g[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,g={},z(aA,function(t){var e=By.prepareVisualTypes(u[t]);g[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[sA])return;a[rA]||(a[rA]=uA);Ch(a,rA,n,e)(t,i)}(t,o,a,h,e)});var dA={lineX:nt,lineY:nt,rect:function(t){return pA(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&&pA(e)}};function pA(t){return new hn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var fA=["#ddd"];Md({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||EI(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:fA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){T&&(Y(C(t)),z(t,function(t){Y(t.brushType,"Illegal areas")})),t&&(this.areas=L(t,function(t){return gA(this.option,t)},this))},setBrushOption:function(t){this.brushOption=gA(this.option,t),this.brushType=this.brushOption.brushType}});function gA(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cs(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function mA(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Id({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new W_(e.getZr())).on("brush",P(this._onBrush,this)).mount()},render:function(t){return this.model=t,mA.apply(this,arguments)},updateTransform:mA,updateView:mA,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:D(t),$from:n})}}),yd({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),yd({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var vA={};function yA(t,e){vA[t]=e}function xA(t){return vA[t]}var _A=Ph.toolbox.brush;function wA(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}wA.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:D(_A.title)};var bA=wA.prototype;bA.render=bA.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,z(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},bA.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return z(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},bA.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}})},yA("brush",wA),md(function(t,e){var n,i,o,a,r,s,l,u=t&&t.brush;C(u)||(u=u?[u]:[]),u.length&&(n=[],z(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={},z(s=r,function(t){l[t]=1}),s.length=0,z(l,function(t,e){s.push(e)}),e&&!r.length&&r.push.apply(r,kI))});function SA(t,e,n){this._model=t}function MA(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}SA.prototype={constructor:SA,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=js(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];z([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=wl(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}z([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:R(MA,"dataToPoint"),convertFromPixel:R(MA,"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();if(i.setDate(o+n-1),i.getDate()!==a)for(var r=0<i.getTime()-t[1].time?1:-1;i.getDate()!==a&&0<(i.getTime()-t[1].time)*r;)n-=r,i.setDate(o+n-1);var s=Math.floor((n+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:s,nthWeek:l,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)}},SA.dimensions=SA.prototype.dimensions,SA.getDimensionsInfo=SA.prototype.getDimensionsInfo,SA.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new SA(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},su.register("calendar",SA);var IA=Ll.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=Ml(t);IA.superApply(this,"init",arguments),AA(t,o)},mergeOption:function(t,e){IA.superApply(this,"mergeOption",arguments),AA(this.option,t)}});function AA(t,i){var o=t.cellSize;C(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o];var e=L([0,1],function(t){var e,n;return(null!=(e=i)[yl[n=t][0]]||null!=e[yl[n][1]]&&null!=e[yl[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});Sl(t,i,{type:"box",ignoreSize:e})}var TA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},DA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Id({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var n=t.coordinateSystem,i=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(t,i,e),this._renderLines(t,i,o,e),this._renderYearText(t,i,o,e),this._renderMonthText(t,o,e),this._renderWeekText(t,i,o,e)},_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 xr({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 yr({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?ul(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,f,g,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},f=this._formatterLabel(d,p),rs((g=new ur({z2:30})).style,m,{text:f}),g.attr(this._yearTextPositionControl(g,h[a],n,a,o)),i.add(g))},_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];N(o)&&(o=TA[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,f=l[u][d].slice(),g=this._firstDayOfMonth[d];c&&(p=this._firstDayPoints[d],f[h]=(p[h]+l[0][d+1][h])/2);var m=i.get("formatter"),v=o[g.m-1],y={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:v},x=this._formatterLabel(m,y),_=new ur({z2:30});k(rs(_.style,i,{text:x}),this._monthTextPositionControl(f,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();N(s)&&(s=DA[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()],l=Rs(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),f=a.dataToRect([p.time],!1).center,g=Math.abs((d+u)%7),m=new ur({z2:30});k(rs(m.style,o,{text:s[g]}),this._weekTextPositionControl(f,n,r,l,c)),i.add(m)}}}}),Md({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"}}}),Id({type:"title",render:function(t,e,n){var i,o,a,r,s,l,u,h,c,d,p,f,g,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=t.get("textBaseline"),u=(l=new ur({style:rs({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),h=t.get("subtext"),c=new ur({style:rs({},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"),f=t.get("triggerEvent",!0),l.silent=!d&&!f,c.silent=!p&&!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),p&&c.on("click",function(){window.open(p,"_"+t.get("subtarget"))}),l.eventData=c.eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c),g=i.getBoundingRect(),(m=t.getBoxLayoutParams()).width=g.width,m.height=g.height,v=wl(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),g=i.getBoundingRect(),x=v.margin,(_=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),Wr(w=new xr({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0})),i.add(w))}}),Ll.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var CA=["cartesian2d","polar","singleAxis"];var LA,kA,PA,NA,OA=(kA=["axisIndex","axis","index","id"],PA=L(LA=(LA=["x","y","z","radius","angle","single"]).slice(),pl),NA=L(kA=(kA||[]).slice(),pl),function(o,a){z(LA,function(t,e){for(var n={name:t,capital:PA[e]},i=0;i<kA.length;i++)n[kA[i]]=t+NA[i];o.call(a,n)})});function EA(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){z(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){z(l(t,e)||[],function(t){n.records[e.name][t]=!0})})}}function RA(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 zA=z,BA=Bs;function VA(t,e){var n,i,o=t.getAxisModel(),a=t._percentWindow,r=t._valueWindow;a&&(n=Fs(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)))}RA.prototype={constructor:RA,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(CA,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 D(this._minMaxSpan)},calculateDataWindow:function(e){var i=this._dataExtent,o=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],s=[e.start,e.end],l=[];return zA(["startValue","endValue"],function(t){l.push(null!=e[t]?o.parse(e[t]):null)}),zA([0,1],function(t){var e=l[t],n=s[t];"percent"===a[t]?(null==n&&(n=r[t]),e=o.parse(Es(n,r,i,!0))):n=Es(e,i,r,!0),l[t]=e,s[t]=n}),{valueWindow:BA(l),percentWindow:BA(s)}},reset:function(t){var e,n,i,o,a;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=function(t,e,n){var i=[1/0,-1/0];zA(n,function(t){var n=t.getData();n&&zA(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),n=this.calculateDataWindow(t.option),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,o=(i=this)._minMaxSpan={},a=i._dataZoomModel,zA(["min","max"],function(t){o[t+"Span"]=a.get(t+"Span");var e,n=a.get(t+"ValueSpan");null!=n&&(o[t+"ValueSpan"]=n,null!=(n=i.getAxisModel().axis.scale.parse(n))&&(e=i._dataExtent,o[t+"Span"]=Es(e[0]+n,e,[0,100],!0)))}),VA(this))},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,VA(this,!0))},filterData:function(t){var e,n,i,c;t===this._dataZoomModel&&(e=this._dimName,n=this.getTargetSeriesModels(),i=t.get("filterMode"),c=this._valueWindow,"none"!==i&&zA(n,function(n){var u=n.getData(),h=u.mapDimension(e,!0);h.length&&("weakFilter"===i?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}):zA(h,function(t){var e;"empty"===i?n.setData(u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,u.selectRange(e))}),zA(h,function(t){u.setApproximateExtent(c,t)}))}))}};var GA=z,FA=OA,WA=Md({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=HA(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=HA(t);m(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;v.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),ZA(this,t),GA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new RA(t.name,e,this,i));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();FA(function(t){var e=t.axisIndex;n[e]=so(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;FA(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):GA(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&FA(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")&&FA(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(T&&!o)throw new Error(t.axis+' "'+H(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 FA(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 FA(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;FA(function(e){GA(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,t){var n=this.option;GA([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=e[t[0]],n[t[1]]=e[t[1]])},this),t||ZA(this,e)},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,n=this._axisProxies;for(e in n)if(n.hasOwnProperty(e)&&n[e].hostedBy(this))return n[e];for(e in n)if(n.hasOwnProperty(e)&&!n[e].hostedBy(this))return n[e]},getRangePropMode:function(){return this._rangePropMode.slice()}});function HA(e){var n={};return GA(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function ZA(t,o){var a=t._rangePropMode,r=t.get("rangeMode");GA([["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 UA=ph.extend({type:"dataZoom",render:function(t,e,n){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}}),XA=(WA.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"}}}),xr),jA=Es,YA=Bs,qA=P,KA=z,$A="horizontal",JA="vertical",QA=["line","bar","candlestick","scatter"],tT=UA.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){tT.superApply(this,"render",arguments),Ch(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(){tT.superApply(this,"remove",arguments),Lh(this,"_dispatchZoomAction")},dispose:function(){tT.superApply(this,"dispose",arguments),Lh(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new cn;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===$A?{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=Ml(t.option);z(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=wl(a,i,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===JA&&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!==$A||o?n===$A&&o?{scale:r?[-1,1]:[-1,-1]}:n!==JA||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 XA({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new XA({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:P(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,f,g=this._dataShadowInfo=this._prepareDataShadowInfo();g&&(t=this._size,n=(e=g.series).getRawData(),null!=(i=e.getShadowDim?e.getShadowDim():g.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:jA(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)}),f=this.dataZoomModel,this._displayables.barGroup.add(new vr({shape:{points:l},style:O({fill:f.get("dataBackgroundColor")},f.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new yr({shape:{points:u},style:f.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){z(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){var e,n,i,o;l||!0!==s&&M(QA,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 XA({draggable:!0,cursor:eT(this._orient),drift:qA(this._onDragMove,this,"all"),onmousemove:function(t){Rt(t.event)},ondragstart:qA(this._showDataInfo,this,!0),ondragend:qA(this._onDragEnd,this),onmouseover:qA(this._showDataInfo,this,!0),onmouseout:qA(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new XA(Wr({silent:!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)"}}))),KA([0,1],function(t){var e=ws(l.get("handleIcon"),{cursor:eT(this._orient),draggable:!0,drift:qA(this._onDragMove,this,t),onmousemove:function(t){Rt(t.event)},ondragend:qA(this._onDragEnd,this),onmouseover:qA(this._showDataInfo,this,!0),onmouseout:qA(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect();this._handleHeight=Rs(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 ur({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=[jA(t[0],[0,100],e,!0),jA(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];g_(e,i,o,n.get("zoomLock")?"all":t,null!=a.minSpan?jA(a.minSpan,r,o,!0):null,null!=a.maxSpan?jA(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=YA([jA(i[0],o,r,!0),jA(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=YA(o.slice()),a=this._size;KA([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=YA(this._handleEnds.slice());function c(t){var e=ms(r.handles[t].parent,this.group),n=ys(0===t?"right":"left",e),i=this._handleWidth/2+5,o=vs([h[t]+(0===t?-i:i),this._size[1]/2],e);s[t].setStyle({x:o[0],y:o[1],textVerticalAlign:l===$A?"middle":n,textAlign:l===$A?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):N(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){this._dragging=!0;var i=vs([e,n],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&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 KA(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 eT(t){return"vertical"===t?"ns-resize":"ew-resize"}WA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var nT="\0_ec_dataZoom_roams";function iT(t,i){var e=aT(t),o=i.dataZoomId,a=i.coordId;z(e,function(t,e){var n=t.dataZoomInfos;n[o]&&M(i.allCoordIds,a)<0&&(delete n[o],t.count--)}),rT(e);var r,n,s=e[a];s||((s=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=(r=s,n=new Mv(t.getZr()),z(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];z(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=R(sT,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,z(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),Ch(s,"dispatchAction",i.dataZoomModel.get("throttle",!0),"fixRate")}function oT(t){return t.type+"\0_"+t.id}function aT(t){var e=t.getZr();return e[nT]||(e[nT]={})}function rT(n){z(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function sT(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var lT=P,uT=UA.extend({type:"dataZoom.inside",init:function(){this._range},render:function(r,t,s,e){uT.superApply(this,"render",arguments),this._range=r.getPercentRange(),z(this.getTargetCoordInfo(),function(t,o){var a=L(t,function(t){return oT(t.model)});z(t,function(e){var i=e.model,n={};z(["pan","zoom","scrollMove"],function(t){n[t]=lT(hT[t],this,e,o)},this),iT(s,{coordId:oT(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,z(e=aT(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),rT(e),uT.superApply(this,"dispose",arguments),this._range=null}}),hT={zoom:function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=dT[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 g_(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:cT(function(t,e,n,i,o,a){var r=dT[i]([a.oldX,a.oldY],[a.newX,a.newY],e,o,n);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:cT(function(t,e,n,i,o,a){return dT[i]([0,0],[a.scrollDelta,a.scrollDelta],e,o,n).signal*(t[1]-t[0])*a.scrollDelta})};function cT(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 g_(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var dT={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}};vd({getTargetSeries:function(t){var i=tt();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){z(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.setRawRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]},!0)})}}),yd("dataZoom",function(n,t){var i=EA(P(t.eachComponent,t,"dataZoom"),OA,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)}),z(o,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})});function pT(t){var e=t&&t.visualMap;C(e)||(e=e?[e]:[]),fT(e,function(t){var e;t&&(gT(t,"splitList")&&!gT(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),(e=t.pieces)&&C(e)&&fT(e,function(t){B(t)&&(gT(t,"start")&&!gT(t,"min")&&(t.min=t.start),gT(t,"end")&&!gT(t,"max")&&(t.max=t.end))}))})}var fT=z;function gT(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}Ll.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var mT=Cc.VISUAL.COMPONENT;function vT(t,e,n,i){for(var o=e.targetVisuals[i],a=By.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}}wd(mT,{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(RI(t.stateList,t.targetVisuals,P(t.getValueState,t),t.getDataDimension(n.getData())))}),i}}),wd(mT,{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(P(vT,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 yT=function(t,e,n){var i=D((xT[t]||{})[e]);return n&&C(i)?i[i.length-1]:i},xT={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]}},_T=By.mapVisual,wT=By.eachVisual,bT=C,ST=z,MT=Bs,IT=Es,AT=Md({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||EI(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=P(t,this),this.controllerVisuals=OI(this.option.controller,e,t),this.targetVisuals=OI(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=so(t),n},eachTargetSeries:function(e,n){z(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),N(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=MT([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){bT(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},ST(this.stateList,function(t){var e,n=i[t];N(n)&&((e=yT(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]={},ST(i,function(t,e){var n;!By.isValidType(e)||null!=(n=yT(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");ST(this.stateList,function(t){var e=this.itemSize,n=a[t];null==(n=n||(a[t]={color:u?l:[l]})).symbol&&(n.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),n.symbol=_T(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,o=n.symbolSize;null!=o&&(i=-1/0,wT(o,function(t){i<t&&(i=t)}),n.symbolSize=_T(o,function(t){return IT(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:nt,getValueState:nt,getVisualMeta:nt}),TT=[20,140],DT=AT.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){DT.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){DT.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=TT[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=TT[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(){AT.prototype.completeVisualOption.apply(this,arguments),z(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=Bs((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=CT(0,0,this.getExtent()),e=CT(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 CT(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 LT=Id({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=nl(e.get("padding")||0),i=t.getBoundingRect();t.add(new xr({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 z(By.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),By.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),r[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;bl(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:nt});function kT(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=wl(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 PT(e){return z(e||[],function(t){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null)}),e}var NT=Es,OT=z,ET=Math.min,RT=Math.max,zT=LT.extend({type:"visualMap.continuous",init:function(){zT.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 ur({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=kT(e,this.api,i),s=n.barGroup=this._createBarGroup(r);s.add(n.outOfRange=BT()),s.add(n.inRange=BT(null,a?GT(this._orient):null,P(this._dragHandle,this,"all",!1),P(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=RT(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=P(this._dragHandle,this,e,!1),s=P(this._dragHandle,this,e,!0),l=BT((a=i,0===e?[[0,0],[a,0],[a,-a]]:[[0,0],[a,0],[a,a]]),GT(this._orient),r,s);l.position[0]=n[0],t.add(l);var u=this.visualMapModel.textStyleModel,h=new ur({draggable:!0,drift:r,onmousemove:function(t){Rt(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=BT([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new ur({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():VT(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=[NT(e[0],n,i,!0),NT(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];g_(e,i,o,t,0);var a=n.getExtent();this._dataInterval=[NT(i[0],o,a,!0),NT(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 Tr(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 cn("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,OT([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=i[t];var n=vs(a.handleLabelPoints[t],ms(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,f=p.getExtent(),g=p.itemSize,m=[0,g[1]],v=NT(t,f,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=g[1],o?[[0,-ET(a,RT(r,0))],[6,0],[0,ET(a,RT(s-r,0))]]:[[0,0],[5,-5],[5,5]])),l=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),x.setStyle("fill",l),u=vs(y.indicatorLabelPoint,ms(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]=ET(RT(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,f=this.visualMapModel,g=f.itemSize;function m(t,e,n){for(var i=0,o=t.length;i<o;i++)for(var a=t[i].seriesId,r=so(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,o=[];for(n in t){t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=v(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}))}return o}f.option.hoverLink&&(n=[0,g[1]],i=f.getExtent(),a=[(t=ET(RT(n[0],t),n[1]))-(o=function(t,e,n){var i=6,o=t.get("hoverLinkDataSize");o&&(i=NT(o,e,n,!0)/2);return i}(f,i,n)),t+o],r=NT(t,n,i,!0),s=[NT(a[0],n,i,!0),NT(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||VT(f))&&(u=this._hoverLinkDataIndices=f.findTargetDataIndices(s)),c=u,p={},m(l||[],d={}),m(c||[],p,d),h=[v(d),v(p)],this._dispatchHighDown("downplay",PT(h[0])),this._dispatchHighDown("highlight",PT(h[1])))},_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",PT(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var o=ms(e,i?null:this.group);return bs[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 BT(t,e,n,i){return new vr({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Rt(t.event)},ondragend:i})}function VT(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function GT(t){return"vertical"===t?"ns-resize":"ew-resize"}yd({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),md(pT);var FT=AT.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){FT.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WT[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=D(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=L(this._pieceList,function(t){t=D(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var i=this.option,n={},t=By.listVisualTypes(),o=this.isCategory();function a(t,e,n){return t&&t[e]&&(B(t[e])?t[e].hasOwnProperty(n):t[e]===n)}z(i.pieces,function(e){z(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(t,e){var n=0;z(this.stateList,function(t){n|=a(i,t,e)||a(i.target,t,e)},this),n||z(this.stateList,function(t){(i[t]||(i[t]={}))[e]=yT(e,"inRange"===t?"active":"inactive",o)})},this),AT.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,z(o,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode&&(i=!1,z(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=D(t)},getValueState:function(t){var e=By.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){By.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 z(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})}}}),WT={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);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=r+o;r<l;s+=a){var u=r===o-1?i[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[i[1],1/0],close:[0,0]}),$s(e),z(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;z(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),HT(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;z(t.pieces,function(t,e){B(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),T&&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=By.retrieveVisuals(t),d.push(n)},this),HT(t,d),$s(d),z(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 HT(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}LT.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=H(r.get("showLabel",!0),!n);n&&this._renderEndsText(a,n[0],c,d,h),z(e.viewPieceList,function(t){var e=t.piece,n=new cn;n.onclick=P(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 ur({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),_l(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:PT(e.findTargetDataIndices(n))})}t.on("mouseover",P(e,this,"highlight")).on("mouseout",P(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return kT(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 cn,r=this.visualMapModel.textStyleModel,a.add(new ur({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=L(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(df(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=D(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,z(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})}});md(pT);var ZT=tl,UT=al;function XT(t){lo(t,"label",["show"])}var jT=Md({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){if(T&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},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&&XT(e),z(e.data,function(t){t instanceof Array?(XT(t[0]),XT(t[1])):XT(t)}),k(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)?L(n,ZT).join(", "):ZT(n),o=e.getName(t),a=UT(this.name);return null==n&&!o||(a+="<br />"),o&&(a+=UT(o),null!=n&&(a+=" : ")),null!=n&&(a+=UT(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(jT,Zu),jT.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 YT=M;function qT(t,e,n,i,o,a){var r=[],s=op(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=nD(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(n,u),r[a]=e.get(i,u);var h=Vs(e.get(i,u));return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}var KT=R,$T={min:KT(qT,"min"),max:KT(qT,"max"),average:KT(qT,"average")};function JT(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=QT(e,i,o,t);if((e=D(e)).type&&$T[e.type]&&r.baseAxis&&r.valueAxis){var s=YT(a,r.baseAxis.dim),l=YT(a,r.valueAxis.dim);e.coord=$T[e.type](i,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$T[u[h]]&&(u[h]=nD(i,i.mapDimension(a[h]),u[h]));e.coord=u}}return e}function QT(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 tD(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 eD(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function nD(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 iD=Id({type:"marker",init:function(){this.markerGroupMap=tt()},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 oD(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,n,i,o=s.getItemModel(t),a=Rs(o.get("x"),u.getWidth()),r=Rs(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)})}iD.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(oD(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new $f),u=function(t,e,n){var i;i=t?L(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Hd(i,n),a=L(n.get("data"),R(JT,e));t&&(a=I(a,R(tD,t)));return o.initData(a,null,t?eD:function(t){return t.value}),o}(o,t,i);i.setData(u),oD(i.getData(),t,n),u.each(function(t){var e=u.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||r.getVisual("color"),symbol:e.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),l.__keep=!0,l.group.silent=i.get("silent")||t.get("silent")}}),md(function(t){t.markPoint=t.markPoint||{}}),jT.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function aD(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=null!=i.yAxis?"y":"x",e.getAxis(a),H(i.yAxis,i.xAxis)):(a=(o=QT(i,d,e,t)).valueDataDim,o.valueAxis,nD(d,a,p)),l=1-(s="x"===a?0:1),h={},(u=D(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=[JT(t,i[0]),JT(t,i[1]),k({},i[2])])[2].type=i[2].type||"",m(i[2],i[0]),m(i[2],i[1]),i}function rD(t){return!isNaN(t)&&!isFinite(t)}function sD(t,e,n,i){var o=1-t,a=i.dimensions[t];return rD(e[o])&&rD(n[o])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function lD(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(sD(1,n,i,t)||sD(0,n,i,t)))return!0}return tD(t,e[0])&&tD(t,e[1])}function uD(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Rs(d.get("x"),o.getWidth()),f=Rs(d.get("y"),o.getHeight());isNaN(p)||isNaN(f)?(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,rD(t.get(h[0],e))?s[0]=l.toGlobalCoord(l.getExtent()[n?0:1]):rD(t.get(h[1],e))&&(s[1]=u.toGlobalCoord(u.getExtent()[n?0:1]))),isNaN(p)||(s[0]=p),isNaN(f)||(s[1]=f)):s=[p,f],t.setItemLayout(e,s)}iD.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){uD(i,t,!0,e,a),uD(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 Bx);this.group.add(l.group);var u=function(t,e,n){var i;i=t?L(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Hd(i,n),a=new Hd(i,n),r=new Hd([],n),s=L(n.get("data"),R(aD,e,t,n));t&&(s=I(s,R(lD,t)));var l=t?eD:function(t){return t.value};return o.initData(L(s,function(t){return t[0]}),null,l),a.initData(L(s,function(t){return t[1]}),null,l),r.initData(L(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"),f=n.get("symbolSize");function g(t,e,n){var i=t.getItemModel(e);uD(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||f[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 f&&(f=[f,f]),u.from.each(function(t){g(h,t,!0),g(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")}}),md(function(t){t.markLine=t.markLine||{}}),jT.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 hD(t,e,n,i){var o=JT(t,i[0]),a=JT(t,i[1]),r=H,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=g([{},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 cD(t){return!isNaN(t)&&!isFinite(t)}function dD(t,e,n){var i=1-t;return cD(e[i])&&cD(n[i])}function pD(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!dD(1,n,i)&&!dD(0,n,i))||(tD(t,{coord:n,x:e.x0,y:e.y0})||tD(t,{coord:i,x:e.x1,y:e.y1}))}function fD(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Rs(d.get(n[0]),o.getWidth()),f=Rs(d.get(n[1]),o.getHeight());return isNaN(p)||isNaN(f)?(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),cD(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):cD(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(p)||(h[0]=p),isNaN(f)||(h[1]=f)):h=[p,f],h}var gD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];iD.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=L(gD,function(t){return fD(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 cn});this.group.add(l.group),l.__keep=!0;var u=function(t,n,e){var i,o;o=t?(i=L(t&&t.dimensions,function(t){var e=n.getData();return O({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Hd(L(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new Hd(i=[{name:"value",type:"float"}],e);var a=L(e.get("data"),R(hD,n,t,e));t&&(a=I(a,R(pD,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,L(gD,function(t){return fD(u,e,t,n,i)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new vr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var n=l.__data.getItemGraphicEl(e);fs(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:Ne(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),as(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),is(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||n.get("silent")}}),md(function(t){t.markArea=t.markArea||{}});function mD(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};z(i,function(t,e){a[e]||vD(o,e)||(o[e]=t)}),n.label&&!vD(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function vD(t,e){return t.hasOwnProperty(e)}Ll.registerSubTypeDefaulter("timeline",function(){return"slider"}),yd({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)}),yd({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)});var yD=Ll.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){yD.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=[],z(e,function(t,e){var n,i=ho(t);B(t)?(n=D(t)).value=e:n=e,o.push(n),N(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o);var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new Hd([{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(yD.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:[]}}),Zu);function xD(t,e,n,i){Pf.call(this,t,e,n),this.type=i||"value",this.model=null}var _D=ph.extend({type:"timeline"});xD.prototype={constructor:xD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(xD,Pf);var wD=P,bD=z,SD=Math.PI;function MD(t,e,n,i,o,a){var r=e.get("color");o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=df(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]+=Rs(h[0],l[0]),u[1]+=Rs(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 ID(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))))}_D.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){var i,o,a,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return al(r.scale.getLabel(t))},bD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,a,r,e),this._position(i,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,wl((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:SD/2},f="vertical"===a?r.height:r.width,g=t.getModel("controlStyle"),m=g.get("show",!0),v=m?g.get("itemSize"):0,y=m?g.get("itemGap"):0,x=v+y,_=(_=t.get("label.rotate")||0)*SD/180,w=g.get("position",!0),b=m&&g.get("showPlayBtn",!0),S=m&&g.get("showPrevBtn",!0),M=m&&g.get("showNextBtn",!0),I=0,A=f;return"left"===w||"bottom"===w?(b&&(s=[0,0],I+=x),S&&(l=[I,0],I+=x)):(b&&(s=[A-v,0],A-=x),S&&(l=[0,0],I+=x)),M&&(u=[A-v,0],A-=x),h=[I,A],t.get("inverse")&&h.reverse(),{viewRect:r,mainLength:f,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){var e,n,i,o=this._mainGroup,a=this._labelGroup,r=t.viewRect;"vertical"===t.orient&&(Yt(e=Zt(),e,[-(n=r.x),-(i=r.y+r.height)]),qt(e,e,-SD/2),Yt(e,e,[n,i]),(r=r.clone()).applyTransform(e));var s=g(r),l=g(o.getBoundingRect()),u=g(a.getBoundingRect()),h=o.position,c=a.position;c[0]=h[0]=s[0][0];var d,p=t.labelPosOpt;function f(t){var e=t.position;t.origin=[s[0][0]-e[0],s[1][0]-e[1]]}function g(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}isNaN(p)?(m(h,l,s,1,d="+"===p?0:1),m(c,u,s,1,1-d)):(m(h,l,s,1,d=0<=p?0:1),c[1]=h[1]+p),o.attr("position",h),a.attr("position",c),o.rotation=a.rotation=t.rotation,f(o),f(a)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),o=Jp(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 xD("value",o,t.axisExtent,i);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new cn;return this.group.add(e),e},_renderAxisLine:function(t,e,n,i){var o=n.getExtent();i.get("lineStyle.show")&&e.add(new _r({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:k({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();bD(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:wD(this._changeTimeline,this,t)},r=MD(n,i,s,a);is(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(),bD(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 ur({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:wD(this._changeTimeline,this,e),silent:!1});rs(r.style,i,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),is(r,rs({},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(),f=[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=f,s={position:t,origin:[h/2,0],rotation:i?-c:0,rectHover:!0,style:d,onclick:n},o=Rr(u.get(a).replace(/^path:\/\//,""),D(s||{}),new hn(r[0],r[1],r[2],r[3]),"center"),l.add(o),is(o,p))}o(t.nextBtnPosition,"controlStyle.nextIcon",wD(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",wD(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,"controlStyle."+(n?"stopIcon":"playIcon"),wD(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=wD(s._handlePointerDrag,s),t.ondragend=wD(s._handlePointerDragend,s),ID(t,a,n,i,!0)},onUpdate:function(t){ID(t,a,n,i)}};this._currentPointer=MD(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=Bs(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(wD(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return vs(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})}}),md(function(t){var e=t&&t.timeline;C(e)||(e=e?[e]:[]),z(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;mD(t),vD(t,"controlPosition")&&(vD(i=t.controlStyle||(t.controlStyle={}),"position")||(i.position=t.controlPosition),"none"!==i.position||vD(i,"show")||(i.show=!1,delete i.position),delete t.controlPosition)}z(t.data||[],function(t){B(t)&&!C(t)&&(!vD(t,"value")&&vD(t,"name")&&(t.value=t.name),mD(t))})}(t)})});var AD=Md({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){AD.superApply(this,"optionUpdated",arguments),z(this.option.feature,function(t,e){var n=xA(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"}}}});Id({type:"toolbox",render:function(h,c,d,s){var p,l,u,f,t,e,n,i,o,a,r,g=this.group;function m(t,e){var n,i=f[t],o=f[e],a=new Cs(l[i],h,h.ecModel);if(i&&!o){if(0===i.indexOf("my"))n={model:a,onclick:a.option.onclick,featureName:i};else{var r=xA(i);if(!r)return;n=new r(a,c,d)}u[i]=n}else{if(!(n=u[o]))return;n.model=a,n.ecModel=c,n.api=d}i||!o?a.get("show")&&!n.unusable?(function(i,o,t){var a=i.getModel("iconStyle"),r=i.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():i.get("icon"),s=i.get("title")||{};{var n,l;"string"==typeof e&&(n=e,l=s,s={},(e={})[t]=n,s[t]=l)}var u=i.iconPaths={};z(e,function(t,e){var n=ws(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(a.getItemStyle()),n.hoverStyle=r.getItemStyle(),is(n),h.get("showTitle")&&(n.__title=s[e],n.on("mouseover",function(){var t=r.getItemStyle();n.setStyle({text:s[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){n.setStyle({textFill:null})})),n.trigger(i.get("iconStatus."+e)||"normal"),g.add(n),n.on("click",P(o.onclick,o,c,d,e)),u[e]=n})}(a,n,i),a.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(a,c,d,s)):n.remove&&n.remove(c,d):n.dispose&&n.dispose(c,d)}g.removeAll(),h.get("show")&&(p=+h.get("itemSize"),l=h.get("feature")||{},u=this._features||(this._features={}),f=[],z(l,function(t,e){f.push(e)}),new Cd(this._featureNames||[],f).add(m).update(m).remove(R(m,null)).execute(),this._featureNames=f,t=g,n=d,i=(e=h).getBoxLayoutParams(),o=e.get("padding"),a={width:n.getWidth(),height:n.getHeight()},r=wl(i,a,o),_l(e.get("orient"),t,e.get("itemGap"),r.width,r.height),bl(t,i,a,o),g.add(BM(g.getBoundingRect(),h)),g.eachChild(function(t){var e,n,i,o,a=t.__title,r=t.hoverStyle;r&&a&&(e=jn(a,oi(r)),n=t.position[0]+g.position[0],i=!1,t.position[1]+g.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){z(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){z(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){z(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var TD=Ph.toolbox.saveAsImage;function DD(t){this.model=t}DD.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:TD.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:TD.lang.slice()},DD.prototype.unusable=!v.canvasSupported,DD.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=n.get("type",!0)||"png";o.download=i+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,i+"."+a)}else{var c=n.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(p)}},yA("saveAsImage",DD);var CD=Ph.toolbox.magicType;function LD(t){this.model=t}LD.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:D(CD.title),option:{},seriesIndex:{}};var kD=LD.prototype;kD.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var PD={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){if("line"===t||"bar"===t)return m({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return m({id:e,stack:""},i.get("option.tiled")||{},!0)}},ND=[["line","bar"],["stack","tiled"]];kD.onclick=function(u,t,h){var c,d=this.model,e=d.get("seriesIndex."+h);PD[h]&&(c={series:[]},z(ND,function(t){0<=M(t,h)&&z(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=PD[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}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:c}))},yd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),yA("magicType",LD);var OD=Ph.toolbox.dataView,ED=new Array(60).join("-"),RD="\t";function zD(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?(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)):a.push(t)}),{seriesGroupByCategoryAxis:o,other:a,meta:r});return{value:I([(h=[],z(e.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(L(t.series,function(t){return t.name})),a=[n.model.getCategories()];z(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))});for(var r=[o.join(RD)],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(RD))}h.push(r.join("\n"))}),h.join("\n\n"+ED+"\n\n")),L(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+RD:"")+r.join(RD))}),a.join("\n")}).join("\n\n"+ED+"\n\n")],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+ED+"\n\n"),meta:e.meta}}function BD(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var VD=new RegExp("["+RD+"]+","g");function GD(t,r){var e=t.split(new RegExp("\n*"+ED+"\n*","g")),s={series:[]};return z(e,function(t,e){var n,i,o,a;0<=(a=t).slice(0,a.indexOf("\n")).indexOf(RD)?(o=function(t){for(var e=t.split(/\n+/g),n=[],i=L(BD(e.shift()).split(VD),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=BD(e[o]).split(VD);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=BD(e.shift()),i=[],o=0;o<e.length;o++){for(var a,r=BD(e[o]).split(VD),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 FD(t){this._dom=null,this.model=t}FD.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:D(OD.title),lang:D(OD.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},FD.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=zD(t);"function"==typeof h?"string"==typeof(u=h(e.getOption()))?s.innerHTML=u:F(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,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="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");g+=";background-color:"+i.get("buttonColor"),g+=";color:"+i.get("buttonTextColor");var y=this;function x(){n.removeChild(o),y._dom=null}Et(m,"click",x),Et(v,"click",function(){var t;try{t="function"==typeof c?c(s,e.getOption()):GD(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=g,m.style.cssText=g,i.get("readOnly")||f.appendChild(v),f.appendChild(m),Et(l,"keydown",function(t){var e,n,i;9===(t.keyCode||t.which)&&(e=this.value,n=this.selectionStart,i=this.selectionEnd,this.value=e.substring(0,n)+RD+e.substring(i),this.selectionStart=this.selectionEnd=n+1,Rt(t))}),o.appendChild(a),o.appendChild(s),o.appendChild(f),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},FD.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},FD.prototype.dispose=function(t,e){this.remove(t,e)},yA("dataView",FD),yd({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var r=[];z(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,L(n,function(t,e){var n=i&&i[e];return B(n)&&!C(n)?(B(t)&&!C(t)&&(t=t.value),O({value:t},n)):t}))})):r.push(k({type:"scatter"},t))}),a.mergeOption(O({series:r},t.newOption))});var WD=z,HD="\0_ec_hist_store";function ZD(t){return t[HD]||(t[HD]=[{}])}WA.extend({type:"dataZoom.select"}),UA.extend({type:"dataZoom.select"});var UD=Ph.toolbox.dataZoom,XD=z;function jD(t,e,n){(this._brushController=new W_(n.getZr())).on("brush",P(this._onBrush,this)).mount(),this._isZoomActive}jD.defaultOption={show:!0,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:D(UD.title)};var YD=jD.prototype;YD.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 jI(KD(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 ZD(t).length}(o)?"emphasis":"normal")},YD.onclick=function(t,e,n){qD[n].call(this)},YD.remove=function(t,e){this._brushController.unmount()},YD.dispose=function(t,e){this._brushController.dispose()};var qD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=ZD(t),e=i[i.length-1];1<i.length&&i.pop();var o={};return WD(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 KD(e){var n={};return z(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),!1!==n[t]&&"none"!==n[t]||(n[t]=[])}),n}YD._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=g_(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 jI(KD(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=ZD(a=c),WD(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))},YD._dispatchZoomAction=function(t){var n=[];XD(t,function(t,e){n.push(D(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},yA("dataZoom",jD),md(function(r){var s,t,e;function n(i,t){var o,a;t&&(null==(a=t[o=i+"Index"])||"all"===a||C(a)||(a=!1===a||"none"===a?[]:[a]),function(t,e){var n=r[t];C(n)||(n=n?[n]:[]);XD(n,e)}(i,function(t,e){var n;null!=a&&"all"!==a&&-1===M(a,e)||((n={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+e})[o]=e,s.push(n))}))}r&&(C(s=r.dataZoom||(r.dataZoom=[]))||(r.dataZoom=s=[s]),(t=r.toolbox)&&(C(t)&&(t=t[0]),t&&t.feature&&(n("xAxis",e=t.feature.dataZoom),n("yAxis",e))))});var $D=Ph.toolbox.restore;function JD(t){this.model=t}JD.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:$D.title},JD.prototype.onclick=function(t,e,n){t[HD]=null,e.dispatchAction({type:"restore",from:this.uid})},yA("restore",JD),yd({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var QD,tC="urn:schemas-microsoft-com:vml",eC="undefined"==typeof window?null:window,nC=!1,iC=eC&&eC.document;function oC(t){return QD(t)}if(iC&&!v.canvasSupported)try{iC.namespaces.zrvml||iC.namespaces.add("zrvml",tC),QD=function(t){return iC.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){QD=function(t){return iC.createElement("<"+t+' xmlns="'+tC+'" class="zrvml">')}}var aC=Aa.CMD,rC=Math.round,sC=Math.sqrt,lC=Math.abs,uC=Math.cos,hC=Math.sin,cC=Math.max;if(!v.canvasSupported){var dC=",",pC="progid:DXImageTransform.Microsoft",fC=21600,gC=fC/2,mC=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=fC+","+fC,t.coordorigin="0,0"},vC=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},yC=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},xC=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},_C=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},wC=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},bC=function(t,e,n){var i=Ae(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=vC(i[0],i[1],i[2]),t.opacity=n*i[3])},SC=function(t,e,n){var i,o,a=e.fill;if(null!=a)if(a instanceof Sr){var r,s,l,u,h,c,d,p,f,g,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&&(wt(h,h,c),wt(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,f=b,v=[(h[0]-_.x)/p,(h[1]-_.y)/f],c&&wt(h,h,c),p/=d[0]*fC,f/=d[1]*fC,y=0/(g=cC(p,f)),x=2*a.r/g-y);var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M,I,A,T,D=S.length,C=[],L=[],k=0;k<D;k++){var P=S[k],N=(i=P.color,o=void 0,o=Ae(i),[vC(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],A=C[0][1]*e.opacity,T=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=T,t.opacity2=A),"radial"===r&&(t.focusposition=v.join(","))}else bC(t,a,e.opacity)},MC=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 Sr&&xC(t,s),s=s||oC(e),r?SC(s,n,i):(o=s,null!=(a=n).lineDash&&(o.dashstyle=a.lineDash.join(" ")),null==a.stroke||a.stroke instanceof Sr||bC(o,a.stroke,a.opacity)),yC(t,s)):(t[r?"filled":"stroked"]="false",xC(t,s))},IC=[[],[],[]];Ua.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(n=oC("shape"),mC(n),this._vmlEl=n),MC(n,"fill",e,this),MC(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*=sC(lC(o))),s.weight=i+"px");var l=this.path||(this.path=new Aa);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(t,e){for(var n,i,o,a,r,s=aC.M,l=aC.C,u=aC.L,h=aC.A,c=aC.Q,d=[],p=t.data,f=t.len(),g=0;g<f;){switch(i="",n=0,o=p[g++]){case s:i=" m ",n=1,a=p[g++],r=p[g++],IC[0][0]=a,IC[0][1]=r;break;case u:i=" l ",n=1,a=p[g++],r=p[g++],IC[0][0]=a,IC[0][1]=r;break;case c:case l:i=" c ",n=3;var m,v,y=p[g++],x=p[g++],_=p[g++],w=p[g++];o===c?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(a+2*y)/3,x=(r+2*x)/3):(m=p[g++],v=p[g++]),IC[0][0]=y,IC[0][1]=x,IC[1][0]=_,IC[1][1]=w,a=IC[2][0]=m,r=IC[2][1]=v;break;case h:var b=0,S=0,M=1,I=1,A=0;e&&(b=e[4],S=e[5],M=sC(e[0]*e[0]+e[1]*e[1]),I=sC(e[2]*e[2]+e[3]*e[3]),A=Math.atan2(-e[1]/I,e[0]/M));var T=p[g++],D=p[g++],C=p[g++],L=p[g++],k=p[g++]+A,P=p[g++]+k+A;g++;var N=p[g++],O=T+uC(k)*C,E=D+hC(k)*L,y=T+uC(P)*C,x=D+hC(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<T||!N&&T<O?x-=.0125:x+=.0125:N&&E<D||!N&&D<E?y+=.0125:y-=.0125),d.push(R,rC(((T-C)*M+b)*fC-gC),dC,rC(((D-L)*I+S)*fC-gC),dC,rC(((T+C)*M+b)*fC-gC),dC,rC(((D+L)*I+S)*fC-gC),dC,rC((O*M+b)*fC-gC),dC,rC((E*I+S)*fC-gC),dC,rC((y*M+b)*fC-gC),dC,rC((x*I+S)*fC-gC)),a=y,r=x;break;case aC.R:var z=IC[0],B=IC[1];z[0]=p[g++],z[1]=p[g++],B[0]=z[0]+p[g++],B[1]=z[1]+p[g++],e&&(wt(z,z,e),wt(B,B,e)),z[0]=rC(z[0]*fC-gC),B[0]=rC(B[0]*fC-gC),z[1]=rC(z[1]*fC-gC),B[1]=rC(B[1]*fC-gC),d.push(" m ",z[0],dC,z[1]," l ",B[0],dC,z[1]," l ",B[0],dC,B[1]," l ",z[0],dC,B[1]);break;case aC.Z:d.push(" x ")}if(0<n){d.push(i);for(var V=0;V<n;V++){var G=IC[V];e&&wt(G,G,e),d.push(rC(G[0]*fC-gC),dC,rC(G[1]*fC-gC),V<n-1?dC:"")}}}return d.join("")}(l,this.transform),n.style.zIndex=_C(this.zlevel,this.z,this.z2),yC(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ua.prototype.onRemove=function(t){xC(t,this._vmlEl),this.removeRectText(t)},Ua.prototype.onAdd=function(t){yC(t,this._vmlEl),this.appendRectText(t)};Ti.prototype.brushVML=function(t){var e,n,i,o,a,r,s,l,u,h,c,d,p,f,g,m,v,y,x,_,w,b,S,M,I,A,T,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,f=B.sx||0,g=B.sy||0,m=d&&p,(v=this._vmlEl)||(v=iC.createElement("div"),mC(v),this._vmlEl=v),y=v.style,x=!1,b=w=1,this.transform&&(_=this.transform,w=sC(_[0]*_[0]+_[1]*_[1]),b=sC(_[2]*_[2]+_[3]*_[3]),x=_[1]||_[2]),x?(M=[l+h,u],I=[l,u+c],A=[l+h,u+c],wt(S=[l,u],S,_),wt(M,M,_),wt(I,I,_),wt(A,A,_),T=cC(S[0],M[0],I[0],A[0]),D=cC(S[1],M[1],I[1],A[1]),(C=[]).push("M11=",_[0]/w,dC,"M12=",_[2]/b,dC,"M21=",_[1]/w,dC,"M22=",_[3]/b,dC,"Dx=",rC(l*w+_[4]),dC,"Dy=",rC(u*b+_[5])),y.padding="0 "+rC(T)+"px "+rC(D)+"px 0",y.filter=pC+".Matrix("+C.join("")+", SizingMethod=clip)"):(_&&(l=l*w+_[4],u=u*b+_[5]),y.filter="",y.left=rC(l)+"px",y.top=rC(u)+"px"),L=this._imageEl,k=this._cropEl,L||(L=iC.createElement("div"),this._imageEl=L),P=L.style,m?(e&&n?(P.width=rC(w*e*h/d)+"px",P.height=rC(b*n*c/p)+"px"):(N=new Image,O=this,N.onload=function(){N.onload=null,e=N.width,n=N.height,P.width=rC(w*e*h/d)+"px",P.height=rC(b*n*c/p)+"px",O._imageWidth=e,O._imageHeight=n,O._imageSrc=V},N.src=V),k||((k=iC.createElement("div")).style.overflow="hidden",this._cropEl=k),(E=k.style).width=rC((h+f*h/d)*w),E.height=rC((c+g*c/p)*b),E.filter=pC+".Matrix(Dx="+-f*h/d*w+",Dy="+-g*c/p*b+")",k.parentNode||v.appendChild(k),L.parentNode!=k&&k.appendChild(L)):(P.width=rC(w*h)+"px",P.height=rC(b*c)+"px",v.appendChild(L),k&&k.parentNode&&(v.removeChild(k),this._cropEl=null)),R="",(z=B.opacity)<1&&(R+=".Alpha(opacity="+rC(100*z)+") "),R+=pC+".AlphaImageLoader(src="+V+", SizingMethod=scale)",P.filter=R,v.style.zIndex=_C(this.zlevel,this.z,this.z2),yC(t,v),null!=B.text&&this.drawRectText(t,this.getBoundingRect()))},Ti.prototype.onRemove=function(t){xC(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Ti.prototype.onAdd=function(t){yC(t,this._vmlEl),this.appendRectText(t)};var AC,TC="normal",DC={},CC=0,LC=document.createElement("div");Un.measureText=function(t,e){var n=iC;AC||((AC=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",iC.body.appendChild(AC));try{AC.style.font=e}catch(t){}return AC.innerHTML="",AC.appendChild(n.createTextNode(t)),{width:AC.offsetWidth}};for(var kC=new hn,PC=function(t,e,n,i){var o=this.style;if(this.__dirty&&ui(o),null!=(r=o.text)&&(r+=""),r){if(o.rich){for(var a=ni(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=DC[t];if(!e){100<CC&&(CC=0,DC={});var n,i=LC.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(t){}e={style:i.fontStyle||TC,variant:i.fontVariant||TC,weight:i.fontWeight||TC,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},DC[t]=e,CC++}return e}(o.font),f=p.style+" "+p.variant+" "+p.weight+" "+p.size+'px "'+p.family+'"';n=n||jn(r,f,c,d);var g,m,v,y,x,_=this.transform;_&&!i&&(kC.copy(e),kC.applyTransform(_),e=kC),i?(y=e.x,x=e.y):(g=o.textPosition,m=o.textDistance,g instanceof Array?(y=e.x+wC(g[0],e.width),x=e.y+wC(g[1],e.height),c=c||"left"):(y=(v=Kn(g,e,m)).x,x=v.y,c=c||v.textAlign,d=d||v.textVerticalAlign)),y=Yn(y,n.width,c),x=qn(x,n.height,d),x+=n.height/2;var w,b,S,M=oC,I=this._textVmlEl;I?b=(w=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),w=M("path"),b=M("textpath"),S=M("skew"),b.style["v-text-align"]="left",mC(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",yC(I,S),yC(I,w),yC(I,b),this._textVmlEl=I);var A=[y,x],T=I.style;_&&i?(wt(A,A,_),S.on=!0,S.matrix=_[0].toFixed(3)+dC+_[2].toFixed(3)+dC+_[1].toFixed(3)+dC+_[3].toFixed(3)+",0,0",S.offset=(rC(A[0])||0)+","+(rC(A[1])||0),S.origin="0 0",T.left="0px",T.top="0px"):(S.on=!1,T.left=rC(y)+"px",T.top=rC(x)+"px"),b.string=String(r).replace(/&/g,"&").replace(/"/g,""");try{b.style.font=f}catch(t){}MC(I,"fill",{fill:o.textFill,opacity:o.opacity},this),MC(I,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash},this),I.style.zIndex=_C(this.zlevel,this.z,this.z2),yC(t,I)}},NC=function(t){xC(t,this._textVmlEl),this._textVmlEl=null},OC=function(t){yC(t,this._textVmlEl)},EC=[Mi,Ai,Ti,Ua,ur],RC=0;RC<EC.length;RC++){var zC=EC[RC].prototype;zC.drawRectText=PC,zC.removeRectText=NC,zC.appendRectText=OC}ur.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)},ur.prototype.onRemove=function(t){this.removeRectText(t)},ur.prototype.onAdd=function(t){this.appendRectText(t)}}function BC(t){return parseInt(t,10)}function VC(t,e){var n;!nC&&iC&&(nC=!0,(n=iC.styleSheets).length<31?iC.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}VC.prototype={constructor:VC,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||BC(e.width))-BC(e.paddingLeft)-BC(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||BC(e.height))-BC(e.paddingTop)-BC(e.paddingBottom)|0}},z(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;VC.prototype[t]=(e=t,function(){Je('In IE8.0 VML mode painter not support method "'+e+'"')})}),to("vml",VC);function GC(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var FC=Aa.CMD,WC=Array.prototype.join,HC="none",ZC=Math.round,UC=Math.sin,XC=Math.cos,jC=Math.PI,YC=2*Math.PI,qC=180/jC,KC=1e-4;function $C(t){return ZC(1e4*t)/1e4}function JC(t){return t<KC&&-KC<t}function QC(t,e){e&&tL(t,"transform","matrix("+WC.call(e,",")+")")}function tL(t,e,n){n&&("linear"===n.type||"radial"===n.type)||("string"==typeof n&&-1<n.indexOf("NaN")&&console.log(n),t.setAttribute(e,n))}function eL(t,e,n,i){var o,a,r,s,l,u;a=e,null!=(r=n?a.textFill:a.fill)&&r!==HC?(o="transparent"===(o=n?e.textFill:e.fill)?HC:o,"none"!==t.getAttribute("clip-path")&&o===HC&&(o="rgba(0, 0, 0, 0.002)"),tL(t,"fill",o),tL(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)):tL(t,"fill",HC),l=e,null!=(u=n?l.textStroke:l.stroke)&&u!==HC?(tL(t,"stroke",s="transparent"===(s=n?e.textStroke:e.stroke)?HC:s),tL(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?i.getLineScale():1)),tL(t,"paint-order",n?"stroke":"fill"),tL(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(tL(t,"stroke-dasharray",e.lineDash.join(",")),tL(t,"stroke-dashoffset",ZC(e.lineDashOffset||0))):tL(t,"stroke-dasharray",""),e.lineCap&&tL(t,"stroke-linecap",e.lineCap),e.lineJoin&&tL(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&tL(t,"stroke-miterlimit",e.miterLimit)):tL(t,"stroke",HC)}var nL={};nL.brush=function(t){var e=t.style,n=t.__svgEl;n||(n=GC("path"),t.__svgEl=n),t.path||t.createPathProxy();var i,o=t.path;t.__dirtyPath&&(o.beginPath(),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 FC.M:a="M",r=2;break;case FC.L:a="L",r=2;break;case FC.Q:a="Q",r=4;break;case FC.C:a="C",r=6;break;case FC.A:var s=n[o++],l=n[o++],u=n[o++],h=n[o++],c=n[o++],d=n[o++],p=n[o++],f=n[o++],g=Math.abs(d),m=JC(g-YC)&&!JC(g),v=!1,v=YC<=g||!JC(g)&&(-jC<d&&d<0||jC<d)==!!f,y=$C(s+u*XC(c)),x=$C(l+h*UC(c));m&&(d=f?YC-1e-4:1e-4-YC,v=!0,9===o&&e.push("M",y,x));var _=$C(s+u*XC(c+d)),w=$C(l+h*UC(c+d));e.push("A",$C(u),$C(h),ZC(p*qC),+v,+f,_,w);break;case FC.Z:a="Z";break;case FC.R:var _=$C(n[o++]),w=$C(n[o++]),b=$C(n[o++]),S=$C(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($C(n[o++]))}return e.join(" ")}(o)).indexOf("NaN")<0&&tL(n,"d",i)),eL(n,e,!1,t),QC(n,t.transform),null!=e.text&&rL(t,t.getBoundingRect())};var iL={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=GC("image"),t.__svgEl=a),u!==t.__imageSrc&&(r="href",s=u,a.setAttributeNS("http://www.w3.org/1999/xlink",r,s),t.__imageSrc=u),tL(a,"width",i),tL(a,"height",o),tL(a,"x",e),tL(a,"y",n),QC(a,t.transform),null!=l.text&&rL(t,t.getBoundingRect()))}},oL={},aL=new hn,rL=function(t,e,n){var i=t.style;t.__dirty&&ui(i);var o=i.text;if(null!=o){o+="";var a=t.__textSvgEl;a||(a=GC("text"),t.__textSvgEl=a);var r=i.textPosition,s=i.textDistance,l=i.textAlign||"left";"number"==typeof i.fontSize&&(i.fontSize+="px");var u,h,c,d=i.font||[i.fontStyle||"",i.fontWeight||"",i.fontSize||"",i.fontFamily||""].join(" ")||Zn,p=sL(i.textVerticalAlign),f=(n=jn(o,d,l,p)).lineHeight;r instanceof Array?(h=e.x+r[0],c=e.y+r[1]):(h=(u=Kn(r,e,s)).x,c=u.y,p=sL(u.textVerticalAlign),l=u.textAlign),tL(a,"alignment-baseline",p),d&&(a.style.font=d);var g,m,v,y,x=i.textPadding;tL(a,"x",h),tL(a,"y",c),eL(a,i,!0,t),t instanceof ur||t.style.transformText?QC(a,t.transform):(t.transform?(aL.copy(e),aL.applyTransform(t.transform),e=aL):(y=t.transformCoordToGlobal(e.x,e.y),e.x=y[0],e.y=y[1],t.transform=Ut(Zt())),"center"===(g=i.textOrigin)?(h=n.width/2+h,c=n.height/2+c):g&&(h=g[0]+h,c=g[1]+c),m=-i.textRotation||0,qt(v=Zt(),v,m),Yt(v,v,y=[t.transform[4],t.transform[5]]),QC(a,v));var _=o.split("\n"),w=_.length,b=l;"left"===b?(b="start",x&&(h+=x[3])):"right"===b?(b="end",x&&(h-=x[1])):"center"===b&&(b="middle",x&&(h+=(x[3]-x[1])/2));var S=0;if("after-edge"===p?(S=-n.height+f,x&&(S-=x[2])):"middle"===p?(S=(-n.height+f)/2,x&&(c+=(x[0]-x[2])/2)):x&&(S+=x[0]),t.__text!==o||t.__textFont!==d){var M=t.__tspanList||[];t.__tspanList=M;for(var I=0;I<w;I++){(A=M[I])?A.innerHTML="":(A=M[I]=GC("tspan"),a.appendChild(A),tL(A,"alignment-baseline",p),tL(A,"text-anchor",b)),tL(A,"x",h),tL(A,"y",c+I*f+S),A.appendChild(document.createTextNode(_[I]))}for(;I<M.length;I++)a.removeChild(M[I]);M.length=w,t.__text=o,t.__textFont=d}else if(t.__tspanList.length)for(var A,T=t.__tspanList.length,I=0;I<T;++I){(A=t.__tspanList[I])&&(tL(A,"x",h),tL(A,"y",c+I*f+S))}}};function sL(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}function lL(){}oL.drawRectText=rL,oL.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],rL(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},lL.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,f=[{newPos:-1,components:[]}],n=this.extractCommon(f[0],u,l,0);if(f[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=f[e-1],o=f[e+1],a=(o?o.newPos:0)-e;i&&(f[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);f[e]=n}else f[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 uL=new lL;function hL(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 cL(t,e){hL.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function dL(t,e){hL.call(this,t,e,"clipPath","__clippath_in_use__")}function pL(t,e){hL.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function fL(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function gL(t){return parseInt(t,10)}function mL(t,e){return e&&t&&e.parentNode!==t}function vL(t,e,n){var i;mL(t,e)&&n&&((i=n.nextSibling)?t.insertBefore(e,i):t.appendChild(e))}function yL(t,e){var n;mL(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function xL(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function _L(t){return t.__textSvgEl}function wL(t){return t.__svgEl}hL.prototype.createElement=GC,hL.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]},hL.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))},hL.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},hL.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},hL.prototype.getDoms=function(){var n=this.getDefs(!1);if(!n)return[];var i=[];return z(this._tagNames,function(t){var e=n.getElementsByTagName(t);i=i.concat([].slice.call(e))}),i},hL.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;z(t,function(t){t[e._markLabel]="0"})},hL.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},hL.prototype.removeUnused=function(){var t,e,n=this.getDefs(!1);n&&(t=this.getDoms(),e=this,z(t,function(t){"1"!==t[e._markLabel]&&n.removeChild(t)}))},hL.prototype.getSvgProxy=function(t){return t instanceof Ua?nL:t instanceof Ti?iL:t instanceof ur?oL:nL},hL.prototype.getTextSvgElement=function(t){return t.__textSvgEl},hL.prototype.getSvgElement=function(t){return t.__svgEl},w(cL,hL),cL.prototype.addWithoutUpdate=function(a,r){var s;r&&r.style&&(s=this,z(["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+")"))}))},cL.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Je("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},cL.prototype.update=function(n){var i=this;hL.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))})},cL.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 Je("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+"%"),a.setAttribute("stop-color",n[i].color),e.appendChild(a)}t._dom=e},cL.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e._dom&&hL.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&hL.prototype.markUsed.call(this,e._dom))},w(dL,hL),dL.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)},dL.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),jt(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")},dL.prototype.markUsed=function(t){var e=this;t.__clipPaths&&0<t.__clipPaths.length&&z(t.__clipPaths,function(t){t._dom&&hL.prototype.markUsed.call(e,t._dom),t._textDom&&hL.prototype.markUsed.call(e,t._textDom)})},w(pL,hL),pL.prototype.addWithoutUpdate=function(t,e){var n,i,o;e&&fL(e.style)&&((n=e.style)._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e),o=i.getAttribute("id"),t.style.filter="url(#"+o+")")},pL.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},pL.prototype.update=function(t,e){var n,i=e.style;fL(i)?(n=this,hL.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})):this.remove(t,i)},pL.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},pL.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),s._shadowDom=e},pL.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&hL.prototype.markUsed.call(this,e._shadowDom)};function bL(t,e,n,i){this.root=t,this.storage=e,this._opts=n=k({},n||{});var o=GC("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;",this.gradientManager=new cL(i,o),this.clipPathManager=new dL(i,o),this.shadowManager=new pL(i,o);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=a,t.appendChild(a),a.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}bL.prototype={constructor:bL,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_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 Ua?nL:e instanceof Ti?iL:e instanceof ur?oL:nL,u=wL(s)||_L(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,f=(h=i,c=a,uL.diff(h,c,d));for(r=0;r<f.length;r++){if((p=f[r]).removed)for(var g=0;g<p.count;g++){var u=wL(s=i[p.indices[g]]),m=_L(s);xL(n,u),xL(n,m)}}for(r=0;r<f.length;r++){if((p=f[r]).added)for(g=0;g<p.count;g++){u=wL(s=a[p.indices[g]]),m=_L(s);v?vL(n,u,v):yL(n,u),u?vL(n,m,u):v?vL(n,m,v):yL(n,m),vL(n,m,u),v=m||u||v,this.gradientManager.addWithoutUpdate(u,s),this.shadowManager.addWithoutUpdate(v,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(g=0;g<p.count;g++){var v=u=_L(s=a[p.indices[g]])||wL(s)||v;this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u,s),this.clipPathManager.markUsed(s)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0!==i.length?i[0]:t?((i=e.insertBefore(GC("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._svgRoot).setAttribute("width",t),o.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]||gL(s[n])||gL(r.style[n]))-(gL(s[o])||0)-(gL(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},z(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;bL.prototype[t]=(e=t,function(){Je('In SVG mode painter not support method "'+e+'"')})}),to("svg",bL),t.version="4.2.0",t.dependencies=Dc,t.PRIORITY=Cc,t.init=function(t,e,n){if(T){if(+Ji.replace(".","")<+Dc.zrender.replace(".",""))throw new Error("zrender/src 4.0.5 is too old for ECharts 4.2.0. Current version need ZRender "+Dc.zrender+"+");if(!t)throw new Error("Initialize failed: invalid dom.")}var i=fd(t);if(i)return T&&console.warn("There is a chart instance already initialized on the dom."),i;T&&(!F(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"));var o,a,r=new Ec(t,e,n);function s(t,e){for(var n=0;n<t.length;n++){t[n][a]=e}}return r.id="ec_"+ud++,sd[r.id]=r,wo(t,cd,r.id),o=r,a="__connectUpdateStatus",Mc(td,function(t,e){o._messageCenter.on(e,function(t){if(ld[o.group]&&0!==o[a]){if(t&&t.escapeConnect)return;var e=o.makeActionFromEvent(t),n=[];Mc(sd,function(t){t!==o&&t.group===o.group&&n.push(t)}),s(n,0),Mc(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,Mc(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+hd++,Mc(t,function(t){t.group=e})),ld[e]=!0,e},t.disConnect=dd,t.disconnect=pd,t.dispose=function(t){"string"==typeof t?t=sd[t]:t instanceof Ec||(t=fd(t)),t instanceof Ec&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=fd,t.getInstanceById=function(t){return sd[t]},t.registerTheme=gd,t.registerPreprocessor=md,t.registerProcessor=vd,t.registerPostUpdate=function(t){id.push(t)},t.registerAction=yd,t.registerCoordinateSystem=xd,t.getCoordinateSystemDimensions=function(t){var e=su.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=_d,t.registerVisual=wd,t.registerLoading=Sd,t.extendComponentModel=Md,t.extendComponentView=Id,t.extendSeriesModel=Ad,t.extendChartView=Td,t.setCanvasCreator=function(t){f("createCanvas",t)},t.registerMap=function(t,e,n){wc.registerMap(t,e,n)},t.getMap=function(t){var e=wc.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=no,t.number=Qs,t.format=gl,t.throttle=Dh,t.helper=ff,t.matrix=Qt,t.vector=Mt,t.color=Ee,t.parseGeoJSON=_f,t.parseGeoJson=Of,t.util=Ef,t.graphic=Rf,t.List=Hd,t.Model=Cs,t.Axis=Pf,t.env=v}); |