text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),o&&(i.edge=!0,i.version=o[1]),a&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(ix=null),tx[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=Y_.call(t);if("[object Array]"===i){if(!E(t)){e=[];for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}}else if(X_[i]){if(!E(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}}}else if(!U_[i]&&!E(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!M(e)||!M(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!M(s)||!M(a)||x(s)||x(a)||T(s)||T(a)||S(s)||S(a)||E(s)||E(a)?!i&&o in t||(t[o]=n(e[o],!0)):r(a,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=r(i,t[n],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return ix||(ix=ex().getContext("2d")),ix}function u(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===q_)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function p(t,e,i){if(t&&e){if(t.map&&t.map===J_)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Q_)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===K_)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=$_.call(arguments,2);return function(){return t.apply(e,i.concat($_.call(arguments)))}}function _(t){var e=$_.call(arguments,1);return function(){return t.apply(this,e.concat($_.call(arguments)))}}function x(t){return"[object Array]"===Y_.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Y_.call(t)}function M(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function S(t){return!!U_[Y_.call(t)]}function I(t){return!!X_[Y_.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function A(t){return t!==t}function C(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function D(t,e){return null!=t?t:e}function k(t,e,i){return null!=t?t:null!=e?e:i}function L(){return Function.call.apply($_,arguments)}function P(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 O(t,e){if(!t)throw new Error(e)}function R(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function z(t){t[nx]=!0}function E(t){return t[nx]}function N(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=x(t);this.data={};var n=this;t instanceof N?t.each(e):t&&f(t,e)}function B(t){return new N(t)}function V(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i}function F(){}function H(t,e){var i=new ox(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function W(t,e){return t[0]=e[0],t[1]=e[1],t}function G(t){var e=new ox(2);return e[0]=t[0],e[1]=t[1],e}function Z(t,e,i){return t[0]=e,t[1]=i,t}function U(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function X(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function Y(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function j(t){return Math.sqrt(q(t))}function q(t){return t[0]*t[0]+t[1]*t[1]}function K(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function $(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function J(t,e){return t[0]*e[0]+t[1]*e[1]}function Q(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function te(t,e){var i=j(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function ee(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function ie(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function ne(t,e){return t[0]=-e[0],t[1]=-e[1],t}function re(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function oe(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function ae(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function se(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function le(){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 ue(t,e){return{target:t,topTarget:e&&e.topTarget}}function he(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}function ce(t,e,i,n,r,o){var a=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=he(t,i),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return t;var l={h:n,one:o,query:i,ctx:r||t,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,h=a[e][u];return h&&h.callAtLast?a[e].splice(u,0,l):a[e].push(l),t}function de(t,e,i,n,r,o){var a=n+"-"+r,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/fx);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;s>d;d++){var p=1<<d;p&r||(c+=(f%2?-1:1)*t[i][d]*de(t,e-1,h,u,r|p,o),f++)}return o[a]=c,c}function fe(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},r=de(i,8,0,0,0,n);if(0!==r){for(var o=[],a=0;8>a;a++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*de(i,7,0===a?1:0,1<<a,1<<s,n)/r*e[a];return function(t,e,i){var n=e*o[6]+i*o[7]+1;t[0]=(e*o[0]+i*o[1]+o[2])/n,t[1]=(e*o[3]+i*o[4]+o[5])/n}}}function pe(t,e,i,n){return i=i||{},n||!Z_.canvasSupported?ge(t,e,i):Z_.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):ge(t,e,i),i}function ge(t,e,i){if(t.getBoundingClientRect&&Z_.domSupported){var n=e.clientX,r=e.clientY;if("CANVAS"===t.nodeName.toUpperCase()){var o=t.getBoundingClientRect();return i.zrX=n-o.left,void(i.zrY=r-o.top)}var a=t[vx]||(t[vx]={}),s=me(ve(t,a),a);if(s)return s(mx,n,r),i.zrX=mx[0],void(i.zrY=mx[1])}i.zrX=i.zrY=0}function ve(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],r=["top","bottom"],o=0;4>o;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}function me(t,e){for(var i=e.transformer,n=e.srcCoords,r=!0,o=[],a=[],s=0;4>s;s++){var l=t[s].getBoundingClientRect(),u=2*s,h=l.left,c=l.top;o.push(h,c),r&=n&&h===n[u]&&c===n[u+1],a.push(t[s].offsetLeft,t[s].offsetTop)}return r?i:(e.srcCoords=o,e.transformer=fe(o,a))}function ye(t,e,i){if(e=e||window.event,null!=e.zrX)return e;var n=e.type,r=n&&n.indexOf("touch")>=0;if(r){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&pe(t,o,e,i)}else pe(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gx.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function _e(t,e,i){px?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function xe(t,e,i){px?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function we(t){return 2===t.which||3===t.which}function be(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Me(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Se(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ie}}function Ie(){yx(this.event)}function Te(){}function Ae(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return n?bx:!0}return!1}function Ce(){var t=new Ix(6);return De(t),t}function De(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ke(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 Le(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function Pe(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Oe(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+a*u,t[1]=-n*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Re(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function ze(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}function Ee(t){var e=Ce();return ke(e,t),e}function Ne(t){return t>Cx||-Cx>t}function Be(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1: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}function Ve(t){return t=Math.round(t),0>t?0:t>255?255:t}function Fe(t){return t=Math.round(t),0>t?0:t>360?360:t}function He(t){return 0>t?0:t>1?1:t}function We(t){return Ve(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ge(t){return He(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Ze(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function Ue(t,e,i){return t+(e-t)*i}function Xe(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Ye(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function je(t,e){Wx&&Ye(Wx,e),Wx=Hx.put(t,Wx||e.slice())}function qe(t,e){if(t){e=e||[];var i=Hx.get(t);if(i)return Ye(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in Fx)return Ye(e,Fx[n]),je(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===n.length){var a=n.substr(0,r),s=n.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void Xe(e,0,0,0,1);l=Ge(s.pop());case"rgb":return 3!==s.length?void Xe(e,0,0,0,1):(Xe(e,We(s[0]),We(s[1]),We(s[2]),l),je(t,e),e);case"hsla":return 4!==s.length?void Xe(e,0,0,0,1):(s[3]=Ge(s[3]),Ke(s,e),je(t,e),e);case"hsl":return 3!==s.length?void Xe(e,0,0,0,1):(Ke(s,e),je(t,e),e);default:return}}Xe(e,0,0,0,1)}else{if(4===n.length){var u=parseInt(n.substr(1),16);return u>=0&&4095>=u?(Xe(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),je(t,e),e):void Xe(e,0,0,0,1)}if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&16777215>=u?(Xe(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),je(t,e),e):void Xe(e,0,0,0,1)}}}}function Ke(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ge(t[1]),r=Ge(t[2]),o=.5>=r?r*(n+1):r+n-r*n,a=2*r-o;return e=e||[],Xe(e,Ve(255*Ze(a,o,i+1/3)),Ve(255*Ze(a,o,i)),Ve(255*Ze(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $e(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+a):l/(2-s-a);var h=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Je(t,e){var i=qe(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ri(i,4===i.length?"rgba":"rgb")}}function Qe(t){var e=qe(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function ti(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=e[r],s=e[o],l=n-r;return i[0]=Ve(Ue(a[0],s[0],l)),i[1]=Ve(Ue(a[1],s[1],l)),i[2]=Ve(Ue(a[2],s[2],l)),i[3]=He(Ue(a[3],s[3],l)),i}}function ei(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=qe(e[r]),s=qe(e[o]),l=n-r,u=ri([Ve(Ue(a[0],s[0],l)),Ve(Ue(a[1],s[1],l)),Ve(Ue(a[2],s[2],l)),He(Ue(a[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:o,value:n}:u}}function ii(t,e,i,n){return t=qe(t),t?(t=$e(t),null!=e&&(t[0]=Fe(e)),null!=i&&(t[1]=Ge(i)),null!=n&&(t[2]=Ge(n)),ri(Ke(t),"rgba")):void 0}function ni(t,e){return t=qe(t),t&&null!=e?(t[3]=He(e),ri(t,"rgba")):void 0}function ri(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(i+=","+t[3]),e+"("+i+")"}}function oi(t,e){return t[e]}function ai(t,e,i){t[e]=i}function si(t,e,i){return(e-t)*i+t}function li(t,e,i){return i>.5?e:t}function ui(t,e,i,n,r){var o=t.length;if(1===r)for(var a=0;o>a;a++)n[a]=si(t[a],e[a],i);else for(var s=o&&t[0].length,a=0;o>a;a++)for(var l=0;s>l;l++)n[a][l]=si(t[a][l],e[a][l],i)}function hi(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:Xx.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var l=0;s>l;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function ci(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function di(t,e,i,n,r,o,a,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=fi(t[h],e[h],i[h],n[h],r,o,a);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=fi(t[h][d],e[h][d],i[h][d],n[h][d],r,o,a)}function fi(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function pi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(Xx.call(t[n]));return i}return Xx.call(t)}return t}function gi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function vi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function mi(t,e,i,n,r,o){var a=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,v=f?vi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var m=[],y=[],_=n[0].value,x=!0,w=0;u>w;w++){m.push(n[w].time/h);var b=n[w].value;if(f&&ci(b,_,v)||!f&&b===_||(x=!1),_=b,"string"==typeof b){var M=qe(b);M?(b=M,p=!0):g=!0}y.push(b)}if(o||!x){for(var S=y[u-1],w=0;u-1>w;w++)f?hi(y[w],S,v):!isNaN(y[w])||isNaN(S)||g||p||(y[w]=S);f&&hi(a(t._target,r),S,v);var I,T,A,C,D,k,L=0,P=0;if(p)var O=[0,0,0,0];var R=function(t,e){var i;if(0>e)i=0;else if(P>e){for(I=Math.min(L+1,u-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;u>i&&!(m[i]>e);i++);i=Math.min(i-1,u-2)}L=i,P=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(C=y[i],A=y[0===i?i:i-1],D=y[i>u-2?u-1:i+1],k=y[i>u-3?u-1:i+2],f)di(A,C,D,k,T,T*T,T*T*T,a(t,r),v);else{var o;if(p)o=di(A,C,D,k,T,T*T,T*T*T,O,1),o=gi(O);else{if(g)return li(C,D,T);o=fi(A,C,D,k,T,T*T,T*T*T)}s(t,r,o)}else if(f)ui(y[i],y[i+1],T,a(t,r),v);else{var o;if(p)ui(y[i],y[i+1],T,O,1),o=gi(O);else{if(g)return li(y[i],y[i+1],T);o=si(y[i],y[i+1],T)}s(t,r,o)}},z=new Be({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:R,ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function yi(t,e,i,n,r,o,a,s){function l(){h--,h||o&&o()}b(n)?(o=r,r=n,n=0):w(r)?(o=r,r="linear",n=0):w(n)?(o=n,n=0):w(i)?(o=i,i=500):i||(i=500),t.stopAnimation(),_i(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c<u.length;c++)u[c].done(l).start(r,a)}function _i(t,e,i,n,r,o,a){var s={},l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=i[u]?M(n[u])&&!d(n[u])?_i(t,e?e+"."+u:u,i[u],n[u],r,o,a):(a?(s[u]=i[u],xi(t,e,u,n[u])):s[u]=n[u],l++):null==n[u]||a||xi(t,e,u,n[u]));l>0&&t.animate(e,!1).when(null==r?500:r,s).delay(o||0)}function xi(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}function wi(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function bi(t){for(var e=0;t>=ow;)e|=1&t,t>>=1;return t+e}function Mi(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;i>r&&n(t[r],t[r-1])<0;)r++;Si(t,e,r)}else for(;i>r&&n(t[r],t[r-1])>=0;)r++;return r-e}function Si(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function Ii(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ti(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[i+h])>0?a=h+1:l=h}return l}function Ai(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[i+h])<0?l=h:a=h+1}return l}function Ci(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]<u[t+1]&&t--;else if(u[t]>u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]<u[t+1]&&t--,o(t)}}function o(i){var n=l[i],r=u[i],o=l[i+1],h=u[i+1];u[i]=r+h,i===c-3&&(l[i+1]=l[i+2],u[i+1]=u[i+2]),c--;var d=Ai(t[o],t,n,r,0,e);n+=d,r-=d,0!==r&&(h=Ti(t[n+r-1],t,o,h,h-1,e),0!==h&&(h>=r?a(n,r,o,h):s(n,r,o,h)))}function a(i,n,r,o){var a=0;for(a=0;n>a;a++)d[a]=t[i+a];var s=0,l=r,u=i;if(t[u++]=t[l++],0!==--o){if(1===n){for(a=0;o>a;a++)t[u+a]=t[l+a];return void(t[u+o]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Ai(t[l],d,s,n,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=d[s+a];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=Ti(d[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[u+a]=t[l+a];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=aw||f>=aw);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=d[s]}else{if(0===n)throw new Error;for(a=0;n>a;a++)t[u+a]=d[s+a]}}else for(a=0;n>a;a++)t[u+a]=d[s+a]}function s(i,n,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=i+n-1,l=o-1,u=r+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===o){for(u-=n,s-=n,f=u+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];return void(t[u]=d[l])}for(var p=h;;){var g=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--n){m=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--o){m=!0;break}while(p>(g|v));if(m)break;do{if(g=n-Ai(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,a=g-1;a>=0;a--)t[f+a]=t[c+a];if(0===n){m=!0;break}}if(t[u--]=d[l--],1===--o){m=!0;break}if(v=o-Ti(t[s],d,0,o,o-1,e),0!==v){for(u-=v,l-=v,o-=v,f=u+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=o){m=!0;break}}if(t[u--]=t[s--],0===--n){m=!0;break}p--}while(g>=aw||v>=aw);if(m)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=n,s-=n,f=u+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];t[u]=d[l]}else{if(0===o)throw new Error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,u,h=aw,c=0,d=[];l=[],u=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function Di(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(2>r)){var o=0;if(ow>r)return o=Mi(t,i,n,e),void Ii(t,i,n,i+o,e);var a=new Ci(t,e),s=bi(r);do{if(o=Mi(t,i,n,e),s>o){var l=r;l>s&&(l=s),Ii(t,i,i+l,i+o,e),o=l}a.pushRun(i,o),a.mergeRuns(),r-=o,i+=o}while(0!==r);a.forceMergeRuns()}}function ki(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Li(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,r=r*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a;var s=t.createLinearGradient(n,o,r,a);return s}function Pi(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(a=a*n+i.x,s=s*r+i.y,l*=o);var u=t.createRadialGradient(a,s,0,a,s,l);return u}function Oi(){return!1}function Ri(t,e,i){var n=ex(),r=e.getWidth(),o=e.getHeight(),a=n.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=o*i,n}function zi(t){if("string"==typeof t){var e=xw.get(t);return e&&e.image}return t}function Ei(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=xw.get(t),a={hostEl:i,cb:n,cbPayload:r};return o?(e=o.image,!Bi(e)&&o.pending.push(a)):(e=new Image,e.onload=e.onerror=Ni,xw.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Ni(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Bi(t){return t&&t.width&&t.height}function Vi(t,e){Tw[t]=e}function Fi(t,e){e=e||Iw;var i=t+":"+e;if(ww[i])return ww[i];for(var n=(t+"").split("\n"),r=0,o=0,a=n.length;a>o;o++)r=Math.max(Ji(n[o],e).width,r);return bw>Mw&&(bw=0,ww={}),bw++,ww[i]=r,r}function Hi(t,e,i,n,r,o,a,s){return a?Gi(t,e,i,n,r,o,a,s):Wi(t,e,i,n,r,o,s)}function Wi(t,e,i,n,r,o,a){var s=Qi(t,e,r,o,a),l=Fi(t,e);r&&(l+=r[1]+r[3]);var u=s.outerHeight,h=Zi(0,l,i),c=Ui(0,u,n),d=new wi(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Gi(t,e,i,n,r,o,a,s){var l=tn(t,{rich:a,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:o}),u=l.outerWidth,h=l.outerHeight,c=Zi(0,u,i),d=Ui(0,h,n);return new wi(c,d,u,h)}function Zi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ui(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Xi(t,e,i){var n=e.textPosition,r=e.textDistance,o=i.x,a=i.y,s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":o-=r,a+=u,h="right",c="middle";break;case"right":o+=r+l,a+=u,c="middle";break;case"top":o+=l/2,a-=r,h="center",c="bottom";break;case"bottom":o+=l/2,a+=s+r,h="center";break;case"inside":o+=l/2,a+=u,h="center",c="middle";break;case"insideLeft":o+=r,a+=u,c="middle";break;case"insideRight":o+=l-r,a+=u,h="right",c="middle";break;case"insideTop":o+=l/2,a+=r,h="center";break;case"insideBottom":o+=l/2,a+=s-r,h="center",c="bottom";break;case"insideTopLeft":o+=r,a+=r;break;case"insideTopRight":o+=l-r,a+=r,h="right";break;case"insideBottomLeft":o+=r,a+=s-r,c="bottom";break;case"insideBottomRight":o+=l-r,a+=s-r,h="right",c="bottom"}return t=t||{},t.x=o,t.y=a,t.textAlign=h,t.textVerticalAlign=c,t}function Yi(t,e,i,n,r){if(!e)return"";var o=(t+"").split("\n");r=ji(e,i,n,r);for(var a=0,s=o.length;s>a;a++)o[a]=qi(o[a],r);return o.join("\n")}function ji(t,e,i,n){n=a({},n),n.font=e;var i=D(i,"...");n.maxIterations=D(n.maxIterations,2);var r=n.minChar=D(n.minChar,0);n.cnCharWidth=Fi("国",e);var o=n.ascCharWidth=Fi("a",e);n.placeholder=D(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=o;l++)s-=o;var u=Fi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function qi(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var o=Fi(t,n);if(i>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Ki(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=Fi(t,n)}return""===t&&(t=e.placeholder),t}function Ki(t,e,i,n){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?i:n}return o}function $i(t){return Fi("国",t)}function Ji(t,e){return Tw.measureText(t,e)}function Qi(t,e,i,n,r){null!=t&&(t+="");var o=D(n,$i(e)),a=t?t.split("\n"):[],s=a.length*o,l=s;if(i&&(l+=i[0]+i[2]),t&&r){var u=r.outerHeight,h=r.outerWidth;if(null!=u&&l>u)t="",a=[];else if(null!=h)for(var c=ji(h-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),d=0,f=a.length;f>d;d++)a[d]=qi(a[d],c)}return{lines:a,height:s,outerHeight:l,lineHeight:o}}function tn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=Sw.lastIndex=0;null!=(n=Sw.exec(t));){var o=n.index;o>r&&en(i,t.substring(r,o)),en(i,n[2],n[1]),r=Sw.lastIndex}r<t.length&&en(i,t.substring(r,t.length));var a=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<a.length;p++){for(var g=a[p],v=0,m=0,y=0;y<g.tokens.length;y++){var _=g.tokens[y],x=_.styleName&&e.rich[_.styleName]||{},w=_.textPadding=x.textPadding,b=_.font=x.font||e.font,M=_.textHeight=D(x.textHeight,$i(b));if(w&&(M+=w[0]+w[2]),_.height=M,_.lineHeight=k(x.textLineHeight,e.textLineHeight,M),_.textAlign=x&&x.textAlign||e.textAlign,_.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+_.lineHeight>f)return{lines:[],width:0,height:0};_.textWidth=Fi(_.text,b);var S=x.textWidth,I=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))_.percentWidth=S,u.push(_),S=0;else{if(I){S=_.textWidth;var T=x.textBackgroundColor,A=T&&T.image;A&&(A=zi(A),Bi(A)&&(S=Math.max(S,A.width*M/A.height)))}var C=w?w[1]+w[3]:0;S+=C;var L=null!=d?d-m:null;null!=L&&S>L&&(!I||C>L?(_.text="",_.textWidth=S=0):(_.text=Yi(_.text,L-C,b,c.ellipsis,{minChar:c.minChar}),_.textWidth=Fi(_.text,b),S=_.textWidth+C))}m+=_.width=S,x&&(v=Math.max(v,_.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=D(e.textWidth,l),i.outerHeight=i.height=D(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var p=0;p<u.length;p++){var _=u[p],P=_.percentWidth;_.width=parseInt(P,10)/100*l}return i}function en(t,e,i){for(var n=""===e,r=e.split("\n"),o=t.lines,a=0;a<r.length;a++){var s=r[a],l={styleName:i,text:s,isLineHolder:!s&&!n};if(a)o.push({tokens:[l]});else{var u=(o[o.length-1]||(o[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:(s||!h||n)&&u.push(l)}}}function nn(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&R(e)||t.textFont||t.font}function rn(t,e){var i,n,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=r=o=h:h instanceof Array?1===h.length?i=n=r=o=h[0]:2===h.length?(i=r=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],r=h[2]):(i=h[0],n=h[1],r=h[2],o=h[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>u&&(c=n+r,n*=u/c,r*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.arc(a+l-n,s+n,n,-Math.PI/2,0),t.lineTo(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(a,s+i),0!==i&&t.arc(a+i,s+i,i,Math.PI,1.5*Math.PI)}function on(t){return an(t),f(t.rich,an),t}function an(t){if(t){t.font=nn(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Cw[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Dw[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=P(t.textPadding))}}function sn(t,e,i,n,r,o){n.rich?un(t,e,i,n,r,o):ln(t,e,i,n,r,o)}function ln(t,e,i,n,r,o){var a,s=fn(n),l=!1,u=e.__attrCachedBy===hw.PLAIN_TEXT;o!==cw?(o&&(a=o.style,l=!s&&u&&a),e.__attrCachedBy=s?hw.NONE:hw.PLAIN_TEXT):u&&(e.__attrCachedBy=hw.NONE);var h=n.font||Aw;l&&h===(a.font||Aw)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=Qi(i,c,d,f,n.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=vn(Pw,t,n,r),_=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;cn(e,n,r,_,x);var M=Ui(x,g,b),S=_,I=M;if(s||d){var T=Fi(i,c),A=T;d&&(A+=d[1]+d[3]);var C=Zi(_,A,w);s&&pn(t,e,n,C,M,A,g),d&&(S=wn(_,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<kw.length;D++){var k=kw[D],L=k[0],P=k[1],O=n[L];l&&O===a[L]||(e[P]=uw(e,P,O||k[2]))}I+=m/2;var R=n.textStrokeWidth,z=l?a.textStrokeWidth:null,E=!l||R!==z,N=!l||E||n.textStroke!==a.textStroke,B=yn(n.textStroke,R),V=_n(n.textFill);if(B&&(E&&(e.lineWidth=R),N&&(e.strokeStyle=B)),V&&(l&&n.textFill===a.textFill||(e.fillStyle=V)),1===v.length)B&&e.strokeText(v[0],S,I),V&&e.fillText(v[0],S,I);else for(var D=0;D<v.length;D++)B&&e.strokeText(v[D],S,I),V&&e.fillText(v[D],S,I),I+=m}function un(t,e,i,n,r,o){o!==cw&&(e.__attrCachedBy=hw.NONE);var a=t.__textCotentBlock;(!a||t.__dirtyText)&&(a=t.__textCotentBlock=tn(i,n)),hn(t,e,a,n,r)}function hn(t,e,i,n,r){var o=i.width,a=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=vn(Pw,t,n,r),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;cn(e,n,r,h,c);var p=Zi(h,a,d),g=Ui(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+o;fn(n)&&pn(t,e,n,p,g,a,s);for(var _=0;_<i.lines.length;_++){for(var x,w=i.lines[_],b=w.tokens,M=b.length,S=w.lineHeight,I=w.width,T=0,A=v,C=y,D=M-1;M>T&&(x=b[T],!x.textAlign||"left"===x.textAlign);)dn(t,e,x,n,S,m,A,"left"),I-=x.width,A+=x.width,T++;for(;D>=0&&(x=b[D],"right"===x.textAlign);)dn(t,e,x,n,S,m,C,"right"),I-=x.width,C-=x.width,D--;for(A+=(o-(A-v)-(y-C)-I)/2;D>=T;)x=b[T],dn(t,e,x,n,S,m,A+x.width/2,"center"),A+=x.width,T++;m+=S}}function cn(t,e,i,n,r){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,r=i.height/2+i.y):o&&(n=o[0]+i.x,r=o[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function dn(t,e,i,n,r,o,a,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=o+r/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+r-i.height/2),!i.isLineHolder&&fn(l)&&pn(t,e,l,"right"===s?a-i.width:"center"===s?a-i.width/2:a,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(a=wn(a,s,c),h-=i.height/2-c[2]-i.textHeight/2),mn(e,"shadowBlur",k(l.textShadowBlur,n.textShadowBlur,0)),mn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),mn(e,"shadowOffsetX",k(l.textShadowOffsetX,n.textShadowOffsetX,0)),mn(e,"shadowOffsetY",k(l.textShadowOffsetY,n.textShadowOffsetY,0)),mn(e,"textAlign",s),mn(e,"textBaseline","middle"),mn(e,"font",i.font||Aw);
  var d=yn(l.textStroke||n.textStroke,p),f=_n(l.textFill||n.textFill),p=D(l.textStrokeWidth,n.textStrokeWidth);d&&(mn(e,"lineWidth",p),mn(e,"strokeStyle",d),e.strokeText(i.text,a,h)),f&&(mn(e,"fillStyle",f),e.fillText(i.text,a,h))}function fn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function pn(t,e,i,n,r,o,a){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(mn(e,"shadowBlur",i.textBoxShadowBlur||0),mn(e,"shadowColor",i.textBoxShadowColor||"transparent"),mn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),mn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?rn(e,{x:n,y:r,width:o,height:a,r:c}):e.rect(n,r,o,a),e.closePath()}if(h)if(mn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(M(s)){var f=s.image;f=Ei(f,null,t,gn,s),f&&Bi(f)&&e.drawImage(f,n,r,o,a)}if(l&&u)if(mn(e,"lineWidth",l),mn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function gn(t,e){e.image=t}function vn(t,e,i,n){var r=i.x||0,o=i.y||0,a=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+xn(l[0],n.width),o=n.y+xn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Lw,i,n):Xi(Lw,i,n);r=u.x,o=u.y,a=a||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(r+=h[0],o+=h[1])}return t=t||{},t.baseX=r,t.baseY=o,t.textAlign=a,t.textVerticalAlign=s,t}function mn(t,e,i){return t[e]=uw(t,e,i),t[e]}function yn(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function _n(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function xn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function wn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function bn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Mn(t){t=t||{},tw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new fw(t.style,this),this._rect=null,this.__clipPaths=null}function Sn(t){Mn.call(this,t)}function In(t){return parseInt(t,10)}function Tn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function An(t,e,i){return Vw.copy(t.getBoundingRect()),t.transform&&Vw.applyTransform(t.transform),Fw.width=e,Fw.height=i,!Vw.intersect(Fw)}function Cn(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}function Dn(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}function kn(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}function Ln(t){return"mousewheel"===t&&Z_.browser.firefox?"DOMMouseScroll":t}function Pn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function On(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Rn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(Uw,function(e){t._handlers[e]=y(jw[e],t)}),f(Yw,function(e){t._handlers[e]=y(jw[e],t)}),f(Zw,function(i){t._handlers[i]=e(jw[i],t)})}function zn(t){function e(e,i){f(e,function(e){_e(t,Ln(e),i._handlers[e])},i)}dx.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},Rn(this),Z_.pointerEventsSupported?e(Yw,this):(Z_.touchEventsSupported&&e(Uw,this),e(Zw,this))}function En(t,e){var i=new tb(W_(),t,e);return Jw[i.id]=i,i}function Nn(t){if(t)t.dispose();else{for(var e in Jw)Jw.hasOwnProperty(e)&&Jw[e].dispose();Jw={}}return this}function Bn(t){return Jw[t]}function Vn(t,e){$w[t]=e}function Fn(t){delete Jw[t]}function Hn(t){return t instanceof Array?t:null==t?[]:[t]}function Wn(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;r>n;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function Gn(t){return!nb(t)||rb(t)||t instanceof Date?t:t.value}function Zn(t){return nb(t)&&!(t instanceof Array)}function Un(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return ib(e,function(t,n){if(nb(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(var r=0;r<i.length;r++){var o=i[r].exist;if(!(i[r].option||null!=o.id&&null!=t.id||null==t.name||jn(t)||jn(o)||o.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),ib(e,function(t){if(nb(t)){for(var e=0;e<i.length;e++){var n=i[e].exist;if(!i[e].option&&!jn(n)&&null==t.id){i[e].option=t;break}}e>=i.length&&i.push({option:t})}}),i}function Xn(t){var e=B();ib(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),ib(t,function(t){var i=t.option;O(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),ib(t,function(t,i){var n=t.exist,r=t.option,o=t.keyInfo;if(nb(r)){if(o.name=null!=r.name?r.name+"":n?n.name:ob+i,n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do o.id="\x00"+o.name+"\x00"+a++;while(e.get(o.id))}e.set(o.id,t)}})}function Yn(t){var e=t.name;return!(!e||!e.indexOf(ob))}function jn(t){return nb(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function qn(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=Hn(t[n].dataIndex),s=i&&i[o],l=0,u=a.length;u>l;l++){var h=a[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]}function Kn(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?x(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?x(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function $n(){var t="__\x00ec_inner_"+sb++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function Jn(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||Qn(e,r+"Index")||Qn(e,r+"Id")||Qn(e,r+"Name")||(e[r+"Index"]=0);var o={};return ib(e,function(n,r){var n=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(o[r]=n);var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],l=(a[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&u(i.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.queryComponents(h);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function Qn(t,e){return t&&t.hasOwnProperty(e)}function tr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function er(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function ir(t){return"auto"===t?Z_.domSupported?"html":"richText":t||"html"}function nr(t){var e={main:"",sub:""};return t&&(t=t.split(lb),e.main=t[0]||"",e.sub=t[1]||""),e}function rr(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function or(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return a(i.prototype,t),i.extend=this.extend,i.superCall=sr,i.superApply=lr,h(i,this),i.superClass=e,i}}function ar(t){var e=["__\x00is_clz",hb++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sr(t,e){var i=L(arguments,2);return this.superClass.prototype[e].apply(t,i)}function lr(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ur(t,e){function i(t){var e=n[t.main];return e&&e[ub]||(e=n[t.main]={},e[ub]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(rr(e),e=nr(e),e.sub){if(e.sub!==ub){var r=i(e);r[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[ub]&&(r=e?r[e]:null),i&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=nr(t);var e=[],i=n[t.main];return i&&i[ub]?f(i,function(t,i){i!==ub&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=nr(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=nr(t);var e=n[t.main];return e&&e[ub]},t.parseClassType=nr,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t}function hr(t){return t>-yb&&yb>t}function cr(t){return t>yb||-yb>t}function dr(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function fr(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function pr(t,e,i,n,r,o){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,f=0;if(hr(h)&&hr(c))if(hr(s))o[0]=0;else{var p=-l/s;p>=0&&1>=p&&(o[f++]=p)}else{var g=c*c-4*h*d;if(hr(g)){var v=c/h,p=-s/a+v,m=-v/2;p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m)}else if(g>0){var y=mb(g),_=h*s+1.5*a*(-c+y),x=h*s+1.5*a*(-c-y);_=0>_?-vb(-_,wb):vb(_,wb),x=0>x?-vb(-x,wb):vb(x,wb);var p=(-s-(_+x))/(3*a);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*a*c)/(2*mb(h*h*h)),b=Math.acos(w)/3,M=mb(h),S=Math.cos(b),p=(-s-2*M*S)/(3*a),m=(-s+M*(S+xb*Math.sin(b)))/(3*a),I=(-s+M*(S-xb*Math.sin(b)))/(3*a);p>=0&&1>=p&&(o[f++]=p),m>=0&&1>=m&&(o[f++]=m),I>=0&&1>=I&&(o[f++]=I)}}return f}function gr(t,e,i,n,r){var o=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(hr(a)){if(cr(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(hr(h))r[0]=-o/(2*a);else if(h>0){var c=mb(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function vr(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function mr(t,e,i,n,r,o,a,s,l,u,h){var c,d,f,p,g,v=.005,m=1/0;bb[0]=l,bb[1]=u;for(var y=0;1>y;y+=.05)Mb[0]=dr(t,i,r,a,y),Mb[1]=dr(e,n,o,s,y),p=ux(bb,Mb),m>p&&(c=y,m=p);m=1/0;for(var _=0;32>_&&!(_b>v);_++)d=c-v,f=c+v,Mb[0]=dr(t,i,r,a,d),Mb[1]=dr(e,n,o,s,d),p=ux(Mb,bb),d>=0&&m>p?(c=d,m=p):(Sb[0]=dr(t,i,r,a,f),Sb[1]=dr(e,n,o,s,f),g=ux(Sb,bb),1>=f&&m>g?(c=f,m=g):v*=.5);return h&&(h[0]=dr(t,i,r,a,c),h[1]=dr(e,n,o,s,c)),mb(m)}function yr(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function _r(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function xr(t,e,i,n,r){var o=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(hr(o)){if(cr(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(hr(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=mb(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function wr(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function br(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function Mr(t,e,i,n,r,o,a,s,l){var u,h=.005,c=1/0;bb[0]=a,bb[1]=s;for(var d=0;1>d;d+=.05){Mb[0]=yr(t,i,r,d),Mb[1]=yr(e,n,o,d);var f=ux(bb,Mb);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(_b>h);p++){var g=u-h,v=u+h;Mb[0]=yr(t,i,r,g),Mb[1]=yr(e,n,o,g);var f=ux(Mb,bb);if(g>=0&&c>f)u=g,c=f;else{Sb[0]=yr(t,i,r,v),Sb[1]=yr(e,n,o,v);var m=ux(Sb,bb);1>=v&&c>m?(u=v,c=m):h*=.5}}return l&&(l[0]=yr(t,i,r,u),l[1]=yr(e,n,o,u)),mb(c)}function Sr(t,e,i){if(0!==t.length){var n,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],o=Ib(o,r[0]),a=Tb(a,r[0]),s=Ib(s,r[1]),l=Tb(l,r[1]);e[0]=o,e[1]=s,i[0]=a,i[1]=l}}function Ir(t,e,i,n,r,o){r[0]=Ib(t,i),r[1]=Ib(e,n),o[0]=Tb(t,i),o[1]=Tb(e,n)}function Tr(t,e,i,n,r,o,a,s,l,u){var h,c=gr,d=dr,f=c(t,i,r,a,Ob);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;f>h;h++){var p=d(t,i,r,a,Ob[h]);l[0]=Ib(p,l[0]),u[0]=Tb(p,u[0])}for(f=c(e,n,o,s,Rb),h=0;f>h;h++){var g=d(e,n,o,s,Rb[h]);l[1]=Ib(g,l[1]),u[1]=Tb(g,u[1])}l[0]=Ib(t,l[0]),u[0]=Tb(t,u[0]),l[0]=Ib(a,l[0]),u[0]=Tb(a,u[0]),l[1]=Ib(e,l[1]),u[1]=Tb(e,u[1]),l[1]=Ib(s,l[1]),u[1]=Tb(s,u[1])}function Ar(t,e,i,n,r,o,a,s){var l=wr,u=yr,h=Tb(Ib(l(t,i,r),1),0),c=Tb(Ib(l(e,n,o),1),0),d=u(t,i,r,h),f=u(e,n,o,c);a[0]=Ib(t,r,d),a[1]=Ib(e,o,f),s[0]=Tb(t,r,d),s[1]=Tb(e,o,f)}function Cr(t,e,i,n,r,o,a,s,l){var u=ae,h=se,c=Math.abs(r-o);if(1e-4>c%Db&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(kb[0]=Cb(r)*i+t,kb[1]=Ab(r)*n+e,Lb[0]=Cb(o)*i+t,Lb[1]=Ab(o)*n+e,u(s,kb,Lb),h(l,kb,Lb),r%=Db,0>r&&(r+=Db),o%=Db,0>o&&(o+=Db),r>o&&!a?o+=Db:o>r&&a&&(r+=Db),a){var d=o;o=r,r=d}for(var f=0;o>f;f+=Math.PI/2)f>r&&(Pb[0]=Cb(f)*i+t,Pb[1]=Ab(f)*n+e,u(s,Pb,s),h(l,Pb,l))}function Dr(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),u=(t*n-i*e)/(t-i);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function kr(t,e,i,n,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>o+c&&h>s+c||e-c>h&&n-c>h&&o-c>h&&s-c>h||u>t+c&&u>i+c&&u>r+c&&u>a+c||t-c>u&&i-c>u&&r-c>u&&a-c>u)return!1;var d=mr(t,e,i,n,r,o,a,s,u,h,null);return c/2>=d}function Lr(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>n+u&&l>o+u||e-u>l&&n-u>l&&o-u>l||s>t+u&&s>i+u&&s>r+u||t-u>s&&i-u>s&&r-u>s)return!1;var h=Mr(t,e,i,n,r,o,s,l,null);return u/2>=h}function Pr(t){return t%=jb,0>t&&(t+=jb),t}function Or(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(Math.abs(n-r)%qb<1e-4)return!0;if(o){var c=n;n=Pr(r),r=Pr(c)}else n=Pr(n),r=Pr(r);n>r&&(r+=qb);var d=Math.atan2(l,s);return 0>d&&(d+=qb),d>=n&&r>=d||d+qb>=n&&r>=d+qb}function Rr(t,e,i,n,r,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(a=e>n?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?a:0}function zr(t,e){return Math.abs(t-e)<Jb}function Er(){var t=tM[0];tM[0]=tM[1],tM[1]=t}function Nr(t,e,i,n,r,o,a,s,l,u){if(u>e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=pr(e,n,o,s,u,Qb);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var v=Qb[g],m=0===v||1===v?.5:1,y=dr(t,i,r,a,v);l>y||(0>p&&(p=gr(e,n,o,s,tM),tM[1]<tM[0]&&p>1&&Er(),c=dr(e,n,o,s,tM[0]),p>1&&(d=dr(e,n,o,s,tM[1]))),f+=2===p?v<tM[0]?e>c?m:-m:v<tM[1]?c>d?m:-m:d>s?m:-m:v<tM[0]?e>c?m:-m:c>s?m:-m)}return f}function Br(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=xr(e,n,o,s,Qb);if(0===l)return 0;var u=wr(e,n,o);if(u>=0&&1>=u){for(var h=0,c=yr(e,n,o,u),d=0;l>d;d++){var f=0===Qb[d]||1===Qb[d]?.5:1,p=yr(t,i,r,Qb[d]);a>p||(h+=Qb[d]<u?e>c?f:-f:c>o?f:-f)}return h}var f=0===Qb[0]||1===Qb[0]?.5:1,p=yr(t,i,r,Qb[0]);return a>p?0:e>o?f:-f}function Vr(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);Qb[0]=-l,Qb[1]=l;var u=Math.abs(n-r);if(1e-4>u)return 0;if(1e-4>u%$b){n=0,r=$b;var h=o?1:-1;return a>=Qb[0]+t&&a<=Qb[1]+t?h:0}if(o){var l=n;n=Pr(r),r=Pr(l)}else n=Pr(n),r=Pr(r);n>r&&(r+=$b);for(var c=0,d=0;2>d;d++){var f=Qb[d];if(f+t>a){var p=Math.atan2(s,f),h=o?1:-1;0>p&&(p=$b+p),(p>=n&&r>=p||p+$b>=n&&r>=p+$b)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Fr(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===Kb.M&&h>1&&(i||(o+=Rr(a,s,l,u,n,r))),1===h&&(a=t[h],s=t[h+1],l=a,u=s),c){case Kb.M:l=t[h++],u=t[h++],a=l,s=u;break;case Kb.L:if(i){if(Dr(a,s,t[h],t[h+1],e,n,r))return!0}else o+=Rr(a,s,t[h],t[h+1],n,r)||0;a=t[h++],s=t[h++];break;case Kb.C:if(i){if(kr(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else o+=Nr(a,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,r)||0;a=t[h++],s=t[h++];break;case Kb.Q:if(i){if(Lr(a,s,t[h++],t[h++],t[h],t[h+1],e,n,r))return!0}else o+=Br(a,s,t[h++],t[h++],t[h],t[h+1],n,r)||0;a=t[h++],s=t[h++];break;case Kb.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],v=t[h++],m=t[h++];h+=1;var y=1-t[h++],_=Math.cos(v)*p+d,x=Math.sin(v)*g+f;h>1?o+=Rr(a,s,_,x,n,r):(l=_,u=x);var w=(n-d)*g/p+d;if(i){if(Or(d,f,g,v,v+m,y,e,w,r))return!0}else o+=Vr(d,f,g,v,v+m,y,w,r);a=Math.cos(v+m)*p+d,s=Math.sin(v+m)*g+f;break;case Kb.R:l=a=t[h++],u=s=t[h++];var b=t[h++],M=t[h++],_=l+b,x=u+M;if(i){if(Dr(l,u,_,u,e,n,r)||Dr(_,u,_,x,e,n,r)||Dr(_,x,l,x,e,n,r)||Dr(l,x,l,u,e,n,r))return!0}else o+=Rr(_,u,_,x,n,r),o+=Rr(l,x,l,u,n,r);break;case Kb.Z:if(i){if(Dr(a,s,l,u,e,n,r))return!0}else o+=Rr(a,s,l,u,n,r);a=l,s=u}}return i||zr(s,u)||(o+=Rr(a,s,l,u,n,r)||0),0!==o}function Hr(t,e,i){return Fr(t,0,!1,e,i)}function Wr(t,e,i,n){return Fr(t,e,!0,i,n)}function Gr(t){Mn.call(this,t),this.path=null}function Zr(t,e,i,n,r,o,a,s,l,u,h){var c=l*(dM/180),d=cM(c)*(t-i)/2+hM(c)*(e-n)/2,f=-1*hM(c)*(t-i)/2+cM(c)*(e-n)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=uM(p),s*=uM(p));var g=(r===o?-1:1)*uM((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=g*a*f/s,m=g*-s*d/a,y=(t+i)/2+cM(c)*v-hM(c)*m,_=(e+n)/2+hM(c)*v+cM(c)*m,x=gM([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],M=gM(w,b);pM(w,b)<=-1&&(M=dM),pM(w,b)>=1&&(M=0),0===o&&M>0&&(M-=2*dM),1===o&&0>M&&(M+=2*dM),h.addData(u,y,_,a,s,x,M,c,o)}function Ur(t){if(!t)return new Yb;for(var e,i=0,n=0,r=i,o=n,a=new Yb,s=Yb.CMD,l=t.match(vM),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(mM)||[],p=f.length,g=0;p>g;g++)f[g]=parseFloat(f[g]);for(var v=0;p>v;){var m,y,_,x,w,b,M,S=i,I=n;switch(d){case"l":i+=f[v++],n+=f[v++],h=s.L,a.addData(h,i,n);break;case"L":i=f[v++],n=f[v++],h=s.L,a.addData(h,i,n);break;case"m":i+=f[v++],n+=f[v++],h=s.M,a.addData(h,i,n),r=i,o=n,d="l";break;case"M":i=f[v++],n=f[v++],h=s.M,a.addData(h,i,n),r=i,o=n,d="L";break;case"h":i+=f[v++],h=s.L,a.addData(h,i,n);break;case"H":i=f[v++],h=s.L,a.addData(h,i,n);break;case"v":n+=f[v++],h=s.L,a.addData(h,i,n);break;case"V":n=f[v++],h=s.L,a.addData(h,i,n);break;case"C":h=s.C,a.addData(h,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),i=f[v-2],n=f[v-1];break;case"c":h=s.C,a.addData(h,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n),i+=f[v-2],n+=f[v-1];break;case"S":m=i,y=n;var T=a.len(),A=a.data;e===s.C&&(m+=i-A[T-4],y+=n-A[T-3]),h=s.C,S=f[v++],I=f[v++],i=f[v++],n=f[v++],a.addData(h,m,y,S,I,i,n);break;case"s":m=i,y=n;var T=a.len(),A=a.data;e===s.C&&(m+=i-A[T-4],y+=n-A[T-3]),h=s.C,S=i+f[v++],I=n+f[v++],i+=f[v++],n+=f[v++],a.addData(h,m,y,S,I,i,n);break;case"Q":S=f[v++],I=f[v++],i=f[v++],n=f[v++],h=s.Q,a.addData(h,S,I,i,n);break;case"q":S=f[v++]+i,I=f[v++]+n,i+=f[v++],n+=f[v++],h=s.Q,a.addData(h,S,I,i,n);break;case"T":m=i,y=n;var T=a.len(),A=a.data;e===s.Q&&(m+=i-A[T-4],y+=n-A[T-3]),i=f[v++],n=f[v++],h=s.Q,a.addData(h,m,y,i,n);break;case"t":m=i,y=n;var T=a.len(),A=a.data;e===s.Q&&(m+=i-A[T-4],y+=n-A[T-3]),i+=f[v++],n+=f[v++],h=s.Q,a.addData(h,m,y,i,n);break;case"A":_=f[v++],x=f[v++],w=f[v++],b=f[v++],M=f[v++],S=i,I=n,i=f[v++],n=f[v++],h=s.A,Zr(S,I,i,n,b,M,_,x,w,h,a);break;case"a":_=f[v++],x=f[v++],w=f[v++],b=f[v++],M=f[v++],S=i,I=n,i+=f[v++],n+=f[v++],h=s.A,Zr(S,I,i,n,b,M,_,x,w,h,a)}}("z"===d||"Z"===d)&&(h=s.Z,a.addData(h),i=r,n=o),e=h}return a.toStatic(),a}function Xr(t,e){var i=Ur(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(i.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){lM(i,t),this.dirty(!0)},e}function Yr(t,e){return new Gr(Xr(t,e))}function jr(t,e){return Gr.extend(Xr(t,e))}function qr(t,e){for(var i=[],n=t.length,r=0;n>r;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var a=new Gr(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},a}function Kr(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function $r(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var o=IM(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;(i?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=n[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===r&&(n=SM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Jr(t,e,i){var n=i&&i.lineWidth;if(e&&n){var r=e.x1,o=e.x2,a=e.y1,s=e.y2;CM(2*r)===CM(2*o)?t.x1=t.x2=to(r,n,!0):(t.x1=r,t.x2=o),CM(2*a)===CM(2*s)?t.y1=t.y2=to(a,n,!0):(t.y1=a,t.y2=s)}}function Qr(t,e,i){var n=i&&i.lineWidth;if(e&&n){var r=e.x,o=e.y,a=e.width,s=e.height;t.x=to(r,n,!0),t.y=to(o,n,!0),t.width=Math.max(to(r+a,n,!1)-t.x,0===a?0:1),t.height=Math.max(to(o+s,n,!1)-t.y,0===s?0:1)}}function to(t,e,i){var n=CM(2*t);return(n+CM(e))%2===0?n/2:(n+(i?1:-1))/2}function eo(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?fr:dr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?fr:dr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?_r:yr)(t.x1,t.cpx1,t.x2,e),(i?_r:yr)(t.y1,t.cpy1,t.y2,e)]}function io(t){Mn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function no(t){return Gr.extend(t)}function ro(t,e){return jr(t,e)}function oo(t,e){KM[t]=e}function ao(t){return KM.hasOwnProperty(t)?KM[t]:void 0}function so(t,e,i,n){var r=Yr(t,e);return i&&("center"===n&&(i=uo(i,r.getBoundingRect())),ho(r,i)),r}function lo(t,e,i){var n=new Sn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(uo(e,r))}}});return n}function uo(t,e){var i,n=e.width/e.height,r=t.height*n;r<=t.width?i=t.height:(r=t.width,i=r/n);var o=t.x+t.width/2,a=t.y+t.height/2;return{x:o-r/2,y:a-i/2,width:r,height:i}}function ho(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function co(t){return Jr(t.shape,t.shape,t.style),t}function fo(t){return Qr(t.shape,t.shape,t.style),t}function po(t){return null!=t&&"none"!==t}function go(t){if("string"!=typeof t)return t;var e=QM.get(t);return e||(e=Je(t,-.1),1e4>tS&&(QM.set(t,e),tS++)),e}function vo(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var r in e)null!=e[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}}function mo(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var r=t,o=t.style;n&&(r=i.addHover(t),o=r.style),Fo(o),n||vo(r),o.extendFrom(e),yo(o,e,"fill"),yo(o,e,"stroke"),Vo(o),n||(t.dirty(!1),t.z2+=ZM)}}}function yo(t,e,i){!po(e[i])&&po(t[i])&&(t[i]=go(t[i]))}function _o(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(Fo(i),t.setStyle(n),Vo(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===ZM&&(t.z2=r)}}function xo(t,e,i){var n,r=YM,o=YM;t.__highlighted&&(r=XM,n=!0),e(t,i),t.__highlighted&&(o=XM,n=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,o)}function wo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,_o(t),mo(t))}function bo(t){!To(this,t)&&!this.__highByOuter&&xo(this,mo)}function Mo(t){!To(this,t)&&!this.__highByOuter&&xo(this,_o)}function So(t){this.__highByOuter|=1<<(t||0),xo(this,mo)}function Io(t){!(this.__highByOuter&=~(1<<(t||0)))&&xo(this,_o)}function To(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ao(t,e){Co(t,!0),xo(t,wo,e)}function Co(t,e){var i=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",bo)[n]("mouseout",Mo),t[n]("emphasis",So)[n]("normal",Io),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Do(t){return!(!t||!t.__highDownDispatcher)}function ko(t){var e=qM[t];return null==e&&32>=jM&&(e=qM[t]=jM++),e}function Lo(t,e,i,n,r,o,a){r=r||GM;var s,l=r.labelFetcher,u=r.labelDataIndex,h=r.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=w(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=c?s:null,p=d?D(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(Oo(t,i,o,r),Oo(e,n,a,r,!0)),t.text=f,e.text=p}function Po(t,e,i){var n=t.style;e&&(Fo(n),t.setStyle(e),Vo(n)),n=t.__hoverStl,i&&n&&(Fo(n),a(n,i),Vo(n))}function Oo(t,e,i,n,r){return zo(t,e,n,r),i&&a(t,i),t}function Ro(t,e,i){var n,r={isRectText:!0};i===!1?n=!0:r.autoColor=i,zo(t,e,r,n)}function zo(t,e,i,n){if(i=i||GM,i.isRectText){var r;i.getTextPosition?r=i.getTextPosition(e,n):(r=e.getShallow("position")||(n?null:"inside"),"outside"===r&&(r="top")),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=D(e.getShallow("distance"),n?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,u=Eo(e);if(u){a={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);No(a[h]={},c,l,i,n)}}return t.rich=a,No(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Eo(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||GM).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function No(t,e,i,n,r,o){i=!r&&i||GM,t.textFill=Bo(e.getShallow("color"),n)||i.color,t.textStroke=Bo(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=D(e.getShallow("textBorderWidth"),i.textBorderWidth),r||(o&&(t.insideRollbackOpt=n,Vo(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.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"),o&&n.disableBox||(t.textBackgroundColor=Bo(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Bo(e.getShallow("borderColor"),n),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")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Bo(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Vo(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var r=n.autoColor,o=n.isRectText,a=n.useInsideStyle,s=a!==!1&&(a===!0||o&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function Fo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Ho(t,e){var i=e||e.getModel("textStyle");return R([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Wo(t,e,i,n,r,o){"function"==typeof r&&(o=r,r=null);var a=n&&n.isAnimationEnabled();if(a){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),u=n.getShallow("animationEasing"+s),h=n.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(i,l,h||0,u,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function Go(t,e,i,n,r){Wo(!0,t,e,i,n,r)}function Zo(t,e,i,n,r){Wo(!1,t,e,i,n,r)}function Uo(t,e){for(var i=De([]);t&&t!==e;)Le(i,t.getLocalTransform(),i),t=t.parent;return i}function Xo(t,e,i){return e&&!d(e)&&(e=Dx.getLocalTransform(e)),i&&(e=ze([],e)),oe([],t,e)}function Yo(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=Xo(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function jo(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:G(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),Go(t,n,i,t.dataIndex)}}})}}function qo(t,e){return p(t,function(t){var i=t[0];i=HM(i,e.x),i=WM(i,e.x+e.width);var n=t[1];return n=HM(n,e.y),n=WM(n,e.y+e.height),[i,n]})}function Ko(t,e){var i=HM(t.x,e.x),n=WM(t.x+t.width,e.x+e.width),r=HM(t.y,e.y),o=WM(t.y+t.height,e.y+e.height);return n>=i&&o>=r?{x:i,y:r,width:n-i,height:o-r}:void 0}function $o(t,e,i){e=a({rectHover:!0},e);var n=e.style={strokeNoScale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(n.image=t.slice(8),s(n,i),new Sn(e)):so(t.replace("path://",""),e,i,"center"):void 0}function Jo(t,e,i,n,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(Qo(t,e,i,n,s[0],s[1],a[0],a[1]))return!0;a=s}}function Qo(t,e,i,n,r,o,a,s){var l=i-t,u=n-e,h=a-r,c=s-o,d=ta(h,c,l,u);if(ea(d))return!1;var f=t-r,p=e-o,g=ta(f,p,l,u)/d;if(0>g||g>1)return!1;var v=ta(f,p,h,c)/d;return 0>v||v>1?!1:!0}function ta(t,e,i,n){return t*n-i*e}function ea(t){return 1e-6>=t&&t>=-1e-6}function ia(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function na(t,e,i){for(var n=0;n<e.length&&(!e[n]||(t=t&&"object"==typeof t?t[e[n]]:null,null!=t));n++);return null==t&&i&&(t=i.get(e)),t}function ra(t,e){var i=sS(t).getParent;return i?i.call(t,e):t.parentModel}function oa(t){return[t||"",lS++,Math.random().toFixed(5)].join("_")}function aa(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=nr(t),e[t.main]=i},t.determineSubType=function(i,n){var r=n.type;if(!r){var o=nr(i).main;t.hasSubTypes(i)&&e[o]&&(r=e[o](n))}return r},t}function sa(t,e){function i(t){var i={},o=[];return f(t,function(a){var s=n(i,a),l=s.originalDeps=e(a),h=r(l,t);s.entryCount=h.length,0===s.entryCount&&o.push(a),f(h,function(t){u(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);u(e.successor,t)<0&&e.successor.push(a)})}),{graph:i,noEntryList:o}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var i=[];return f(t,function(t){u(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(r,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?a:o)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function la(t){return t.replace(/^\s+|\s+$/g,"")}function ua(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]}function ha(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?la(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function ca(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function da(t){return t.sort(function(t,e){return t-e}),t}function fa(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function pa(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function ga(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function va(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),o=p(t,function(t){return(isNaN(t)?0:t)/n*r*100}),a=100*r,s=p(o,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});a>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function ma(t){var e=2*Math.PI;return(t%e+e)%e}function ya(t){return t>-uS&&uS>t}function _a(t){if(t instanceof Date)return t;if("string"==typeof t){var e=cS.exec(t);if(!e)return new Date(0/0);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(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)}return new Date(null==t?0/0:Math.round(t))}function xa(t){return Math.pow(10,wa(t))}function wa(t){return Math.floor(Math.log(t)/Math.LN10)}function ba(t,e){var i,n=wa(t),r=Math.pow(10,n),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*r,n>=-20?+t.toFixed(0>n?-n:0):t}function Ma(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],o=i-n;return o?r+o*(t[n]-r):r}function Sa(t){function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]===(n?-1:1)||!n&&e(t,i,1))}t.sort(function(t,i){return e(t,i,0)?-1:1});for(var i=-1/0,n=1,r=0;r<t.length;){for(var o=t[r].interval,a=t[r].close,s=0;2>s;s++)o[s]<=i&&(o[s]=i,a[s]=s?1:1-n),i=o[s],n=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function Ia(t){return t-parseFloat(t)>=0}function Ta(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Aa(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}function Ca(t){return null==t?"":(t+"").replace(pS,function(t,e){return gS[e]})}function Da(t,e,i){x(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=vS[o];t=t.replace(mS(a),mS(a,0))}for(var s=0;n>s;s++)for(var l=0;l<r.length;l++){var u=e[s][r[l]];t=t.replace(mS(vS[l],s),i?Ca(u):u)}return t}function ka(t,e,i){return f(e,function(e,n){t=t.replace("{"+n+"}",i?Ca(e):e)}),t}function La(t,e){t=b(t)?{color:t,extraCssText:e}:t||{};var i=t.color,n=t.type,e=t.extraCssText,r=t.renderMode||"html",o=t.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ca(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Ca(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+o+"|}  ",style:{color:i}}:""}function Pa(t,e){return t+="","0000".substr(0,e-t.length)+t}function Oa(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=_a(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),a=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),h=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",Pa(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Pa(s,2)).replace("d",s).replace("hh",Pa(l,2)).replace("h",l).replace("mm",Pa(u,2)).replace("m",u).replace("ss",Pa(h,2)).replace("s",h).replace("SSS",Pa(c,3))}function Ra(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function za(t){return Hi(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function Ea(t,e,i,n,r,o,a,s){return Hi(t,e,i,n,r,s,o,a)}function Na(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);h=o+v,h>n||l.newline?(o=0,h=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+i,a=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=h+i:a=c+i)})}function Ba(t,e,i){var n=e.width,r=e.height,o=ha(t.x,n),a=ha(t.y,r),s=ha(t.x2,n),l=ha(t.y2,r);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(a)||isNaN(parseFloat(t.y)))&&(a=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=r),i=fS(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-a-i[0]-i[2],0)}}function Va(t,e,i){i=fS(i||0);var n=e.width,r=e.height,o=ha(t.left,n),a=ha(t.top,r),s=ha(t.right,n),l=ha(t.bottom,r),u=ha(t.width,n),h=ha(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/r?u=.8*n:h=.8*r),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=n-s-u-d),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-i[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=n-d-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var p=new wi(o+i[3],a+i[0],u,h);return p.margin=i,p}function Fa(t,e,i,n,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||a){var u;if("raw"===l)u="group"===t.type?new wi(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}e=Va(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=o?e.x-u.x:0,f=a?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Ha(t,e){return null!=t[bS[e][0]]||null!=t[bS[e][1]]&&null!=t[bS[e][2]]}function Wa(t,e,i){function n(i,n){var a={},l=0,u={},h=0,c=2;if(xS(i,function(e){u[e]=t[e]}),xS(i,function(t){r(e,t)&&(a[t]=u[t]=e[t]),o(a,t)&&l++,o(u,t)&&h++}),s[n])return o(e,i[1])?u[i[2]]=null:o(e,i[2])&&(u[i[1]]=null),u;if(h!==c&&l){if(l>=c)return a;for(var d=0;d<i.length;d++){var f=i[d];if(!r(a,f)&&r(t,f)){a[f]=t[f];break}}return a}return u}function r(t,e){return t.hasOwnProperty(e)}function o(t,e){return null!=t[e]&&"auto"!==t[e]}function a(t,e,i){xS(t,function(t){e[t]=i[t]})}!M(i)&&(i={});var s=i.ignoreSize;!x(s)&&(s=[s,s]);var l=n(bS[0],0),u=n(bS[1],1);a(bS[0],t,l),a(bS[1],t,u)}function Ga(t){return Za({},t)}function Za(t,e){return e&&t&&xS(wS,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function Ua(t){var e=[];return f(TS.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=p(e,function(t){return nr(t).main}),"dataset"!==t&&u(e,"dataset")<=0&&e.unshift("dataset"),e}function Xa(t,e){for(var i=t.length,n=0;i>n;n++)if(t[n].length>e)return t[n];return t[i-1]}function Ya(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:B(),categoryAxisMap:B()},n=LS[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function ja(t){return"category"===t.get("type")}function qa(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===zS?{}:[]),this.sourceFormat=t.sourceFormat||ES,this.seriesLayoutBy=t.seriesLayoutBy||BS,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function Ka(t){var e=t.option.source,i=ES;if(I(e))i=NS;else if(x(e)){0===e.length&&(i=OS);for(var n=0,r=e.length;r>n;n++){var o=e[n];if(null!=o){if(x(o)){i=OS;break}if(M(o)){i=RS;break}}}}else if(M(e)){for(var a in e)if(e.hasOwnProperty(a)&&d(e[a])){i=zS;break}}else if(null!=e)throw new Error("Invalid data");FS(t).sourceFormat=i}function $a(t){return FS(t).source}function Ja(t){FS(t).datasetMap=B()}function Qa(t){var e=t.option,i=e.data,n=I(i)?NS:PS,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=os(t);if(l){var u=l.option;i=u.source,n=FS(l).sourceFormat,r=!0,o=o||u.seriesLayoutBy,null==a&&(a=u.sourceHeader),s=s||u.dimensions}var h=ts(i,n,o,a,s),c=e.encode;!c&&l&&(c=rs(t,l,i,n,o,h)),FS(t).source=new qa({data:i,fromDataset:r,seriesLayoutBy:o,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function ts(t,e,i,n,r){if(!t)return{dimensionsDefine:es(r)};var o,a,s;if(e===OS)"auto"===n||null==n?is(function(t){null!=t&&"-"!==t&&(b(t)?null==a&&(a=1):a=0)},i,t,10):a=n?1:0,r||1!==a||(r=[],is(function(t,e){r[e]=null!=t?t:""},i,t)),o=r?r.length:i===VS?t.length:t[0]?t[0].length:null;else if(e===RS)r||(r=ns(t),s=!0);else if(e===zS)r||(r=[],s=!0,f(t,function(t,e){r.push(e)}));else if(e===PS){var l=Gn(t[0]);o=x(l)&&l.length||1}var u;return s&&f(r,function(t,e){"name"===(M(t)?t.name:t)&&(u=e)}),{startIndex:a,dimensionsDefine:es(r),dimensionsDetectCount:o,potentialNameDimIndex:u}}function es(t){if(t){var e=B();return p(t,function(t){if(t=a({},M(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function is(t,e,i,n){if(null==n&&(n=1/0),e===VS)for(var r=0;r<i.length&&n>r;r++)t(i[r]?i[r][0]:null,r);else for(var o=i[0]||[],r=0;r<o.length&&n>r;r++)t(o[r],r)}function ns(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return f(e,function(t,e){n.push(e)}),n}}function rs(t,e,i,n,r,o){var a=Ya(t),s={},l=[],u=[],h=t.subType,c=B(["pie","map","funnel"]),d=B(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(a&&null!=d.get(h)){var p=t.ecModel,g=FS(p).datasetMap,v=e.uid+"_"+r,m=g.get(v)||g.set(v,{categoryWayDim:1,valueWayDim:0});f(a.coordSysDims,function(t){if(null==a.firstCategoryDimIndex){var e=m.valueWayDim++;s[t]=e,u.push(e)}else if(a.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=m.categoryWayDim++;s[t]=e,u.push(e)}})}else if(null!=c.get(h)){for(var y,_=0;5>_&&null==y;_++)ss(i,n,r,o.dimensionsDefine,o.startIndex,_)||(y=_);if(null!=y){s.value=y;var x=o.potentialNameDimIndex||Math.max(y-1,0);u.push(x),l.push(x)}}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}function os(t){var e=t.option,i=e.data;return i?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function as(t,e){return ss(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function ss(t,e,i,n,r,o){function a(t){return null!=t&&isFinite(t)&&""!==t?!1:b(t)&&"-"!==t?!0:void 0}var s,l=5;if(I(t))return!1;var u;if(n&&(u=n[o],u=M(u)?u.name:u),e===OS)if(i===VS){for(var h=t[o],c=0;c<(h||[]).length&&l>c;c++)if(null!=(s=a(h[r+c])))return s}else for(var c=0;c<t.length&&l>c;c++){var d=t[r+c];if(d&&null!=(s=a(d[o])))return s}else if(e===RS){if(!u)return;for(var c=0;c<t.length&&l>c;c++){var f=t[c];if(f&&null!=(s=a(f[u])))return s}}else if(e===zS){if(!u)return;var h=t[u];if(!h||I(h))return!1;for(var c=0;c<h.length&&l>c;c++)if(null!=(s=a(h[c])))return s}else if(e===PS)for(var c=0;c<t.length&&l>c;c++){var f=t[c],p=Gn(f);if(!x(p))return!1;if(null!=(s=a(p[o])))return s}return!1}function ls(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}function us(t,e){var i=t.color&&!t.colorLayer;f(e,function(e,o){"colorLayer"===o&&i||TS.hasClass(o)||("object"==typeof e?t[o]=t[o]?r(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function hs(t){t=t,this.option={},this.option[HS]=1,this._componentsMap=B({series:[]}),this._seriesIndices,this._seriesIndicesMap,us(t,this._theme.option),r(t,CS,!1),this.mergeOption(t)}function cs(t,e){x(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function ds(t,e,i){var n=e.type?e.type:i?i.subType:TS.determineSubType(t,e);return n}function fs(t,e){t._seriesIndicesMap=B(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function ps(t,e){return e.hasOwnProperty("subType")?v(t,function(t){return t.subType===e.subType}):t}function gs(t){f(GS,function(e){this[e]=y(t[e],t)},this)}function vs(){this._coordinateSystems=[]}function ms(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function ys(t,e,i){var n,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;US(l,function(t){t&&t.option&&(t.query?a.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),US([r].concat(o).concat(p(a,function(t){return t.option})),function(t){US(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:o,mediaDefault:n,mediaList:a}}function _s(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return f(t,function(t,e){var i=e.match(qS);if(i&&i[1]&&i[2]){var o=i[1],a=i[2].toLowerCase();xs(n[a],t,o)||(r=!1)}}),r}function xs(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function ws(t,e){return t.join(",")===e.join(",")}function bs(t,e){e=e||{},US(e,function(e,i){if(null!=e){var n=t[i];if(TS.hasClass(i)){e=Hn(e),n=Hn(n);var r=Un(n,e);t[i]=YS(r,function(t){return t.option&&t.exist?jS(t.exist,t.option,!0):t.exist||t.option})}else t[i]=jS(n,e,!0)}})}function Ms(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=JS.length;n>i;i++){var o=JS[i],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?r(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?r(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function Ss(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function Is(t){Ss(t,"itemStyle"),Ss(t,"lineStyle"),Ss(t,"areaStyle"),Ss(t,"label"),Ss(t,"labelLine"),Ss(t,"upperLabel"),Ss(t,"edgeLabel")}function Ts(t,e){var i=$S(t)&&t[e],n=$S(i)&&i.textStyle;if(n)for(var r=0,o=ab.length;o>r;r++){var e=ab[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function As(t){t&&(Is(t),Ts(t,"label"),t.emphasis&&Ts(t.emphasis,"label"))}function Cs(t){if($S(t)){Ms(t),Is(t),Ts(t,"label"),Ts(t,"upperLabel"),Ts(t,"edgeLabel"),t.emphasis&&(Ts(t.emphasis,"label"),Ts(t.emphasis,"upperLabel"),Ts(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Ms(e),As(e));var i=t.markLine;i&&(Ms(i),As(i));var n=t.markArea;n&&As(n);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!I(o))for(var a=0;a<o.length;a++)As(o[a]);f(t.categories,function(t){Is(t)})}if(r&&!I(r))for(var a=0;a<r.length;a++)As(r[a]);var e=t.markPoint;if(e&&e.data)for(var s=e.data,a=0;a<s.length;a++)As(s[a]);var i=t.markLine;if(i&&i.data)for(var l=i.data,a=0;a<l.length;a++)x(l[a])?(As(l[a][0]),As(l[a][1])):As(l[a]);"gauge"===t.type?(Ts(t,"axisLabel"),Ts(t,"title"),Ts(t,"detail")):"treemap"===t.type?(Ss(t.breadcrumb,"itemStyle"),f(t.levels,function(t){Is(t)})):"tree"===t.type&&Is(t.leaves)}}function Ds(t){return x(t)?t:t?[t]:[]}function ks(t){return(x(t)?t[0]:t)||{}}function Ls(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&(i=i&&i[e[n]],null!=i);n++);return i}function Ps(t,e,i,n){e=e.split(",");for(var r,o=t,a=0;a<e.length-1;a++)r=e[a],null==o[r]&&(o[r]={}),o=o[r];(n||null==o[e[a]])&&(o[e[a]]=i)}function Os(t){f(tI,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function Rs(t){f(t,function(e,i){var n=[],r=[0/0,0/0],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=a.map(o,function(o,l,u){var h=a.get(e.stackedDimension,u);if(isNaN(h))return r;var c,d;s?d=a.getRawIndex(u):c=a.get(e.stackedByDimension,u);for(var f=0/0,p=i-1;p>=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var v=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&v>0||0>=h&&0>v){h+=v,f=v;break}}}return n[0]=h,n[1]=f,n});a.hostModel.setData(l),e.data=l})}function zs(t,e){qa.isInstance(t)||(t=qa.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===NS&&(this._offset=0,this._dimSize=e,this._data=i);var r=oI[n===OS?n+"_"+t.seriesLayoutBy:n];a(this,r)}function Es(){return this._data.length}function Ns(t){return this._data[t]}function Bs(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Vs(t,e,i){return null!=i?t[i]:t}function Fs(t,e,i,n){return Hs(t[n],this._dimensionInfos[e])}function Hs(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+_a(t)),null==t||""===t?0/0:+t}function Ws(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,o=s.index),aI[a](n,e,o,r)}}}function Gs(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===PS||n===RS){var r=t.getRawDataItem(e);return n!==PS||M(r)||(r=null),r?r[i]:void 0}}}function Zs(t){return new Us(t)}function Us(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function Xs(t,e,i,n,r,o){cI.reset(i,n,r,o),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:cI.next},t.context)}function Ys(t,e){t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null;var i,n;!e&&t._reset&&(i=t._reset(t.context),i&&i.progress&&(n=i.forceFirstProgress,i=i.progress),x(i)&&!i.length&&(i=null)),t._progress=i,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),n}function js(t){var e=t.name;Yn(t)||(t.name=qs(t)||e)}function qs(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return f(i,function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)}),n.join(" ")}function Ks(t){return t.model.getRawData().count()}function $s(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Js}function Js(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Qs(t,e){f(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,_(tl,e))})}function tl(t){var e=el(t);e&&e.setOutputEnd(this.count())}function el(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}function il(){this.group=new rw,this.uid=oa("viewChart"),this.renderTask=Zs({plan:ol,reset:al}),this.renderTask.context={view:this}}function nl(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Do(t)))for(var n=0,r=t.childCount();r>n;n++)nl(t.childAt(n),e,i)}function rl(t,e,i){var n=Kn(t,e),r=e&&null!=e.highlightKey?ko(e.highlightKey):null;null!=n?f(Hn(n),function(e){nl(t.getItemGraphicEl(e),i,r)}):t.eachItemGraphicEl(function(t){nl(t,i,r)})}function ol(t){return yI(t.model)}function al(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&mI(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,i,n,r),xI[l]}function sl(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(a,s||[])}var r,o,a,s,l,u=0,h=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),a=this,s=arguments;var t=l||e,d=l||i;l=null,o=r-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):o>=0?n():c=setTimeout(n,-o),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function ll(t,e,i,n){var r=t[e];if(r){var o=r[wI]||r,a=r[MI],s=r[bI];if(s!==i||a!==n){if(null==i||!n)return t[e]=o;r=t[e]=sl(o,i,"debounce"===n),r[wI]=o,r[MI]=n,r[bI]=i}return r}}function ul(t,e){var i=t[e];i&&i[wI]&&(t[e]=i[wI])}function hl(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=B()}function cl(t,e,i,n,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var a;f(e,function(e){if(!r.visualType||r.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){o(r,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),kI(u,n);var d=t.getPerformArgs(u,r.block);c.each(function(t){t.perform(d)}),a|=u.perform(d)}else l&&l.each(function(s){o(r,s)&&s.dirty();var l=t.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),kI(s,n),a|=s.perform(l)})}}),t.unfinished|=a}function dl(t,e,i,n,r){function o(i){var o=i.uid,s=a.get(o)||a.set(o,Zs({plan:yl,reset:_l,count:wl}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},bl(t,i,s)}var a=i.seriesTaskMap||(i.seriesTaskMap=B()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(o):s?n.eachRawSeriesByType(s,o):l&&l(n,r).each(o);var u=t._pipelineMap;a.each(function(t,e){u.get(e)||(t.dispose(),a.removeKey(e))})}function fl(t,e,i,n,r){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,Zs({reset:gl,onDirty:ml})),a.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=a,n.__block=h,bl(t,e,n)}var a=i.overallTask=i.overallTask||Zs({reset:pl});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||B(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,o):u?u(n,r).each(o):(h=!1,f(n.getSeries(),o));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),s.removeKey(e))})}function pl(t){t.overallReset(t.ecModel,t.api,t.payload)}function gl(t){return t.overallProgress&&vl}function vl(){this.agent.dirty(),this.getDownstream().dirty()}function ml(){this.agent&&this.agent.dirty()}function yl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function _l(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Hn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return xl(e)}):LI}function xl(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(n,o);else r&&r.progress&&r.progress(e,n)}}function wl(t){return t.data.count()}function bl(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Ml(t){PI=null;try{t(OI,RI)}catch(e){}return PI}function Sl(t,e){for(var i in e.prototype)t[i]=F}function Il(t){if(b(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function Tl(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Al(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}function Cl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Dl(t){for(var e=R(t).split(WI),i=[],n=0;n<e.length;n+=2){var r=parseFloat(e[n]),o=parseFloat(e[n+1]);i.push([r,o])}return i}function kl(t,e,i,n){var r=e.__inheritedStyle||{},o="text"===e.type;if(1===t.nodeType&&(Pl(t,e),a(r,Ol(t)),!n))for(var s in UI)if(UI.hasOwnProperty(s)){var l=t.getAttribute(s);null!=l&&(r[UI[s]]=l)}var u=o?"textFill":"fill",h=o?"textStroke":"stroke";e.style=e.style||new fw;var c=e.style;null!=r.fill&&c.set(u,Ll(r.fill,i)),null!=r.stroke&&c.set(h,Ll(r.stroke,i)),f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&o?"textStrokeWidth":t;null!=r[t]&&c.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&c.set(t,r[t])}),r.lineDash&&(e.style.lineDash=R(r.lineDash).split(WI)),c[h]&&"none"!==c[h]&&(e[h]=!0),e.__inheritedStyle=r}function Ll(t,e){var i=e&&t&&t.match(XI);if(i){var n=R(i[1]),r=e[n];return r}return t}function Pl(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(YI,function(t,e,i){r.push(e,i)});for(var o=r.length-1;o>0;o-=2){var a=r[o],s=r[o-1];switch(n=n||Ce(),s){case"translate":a=R(a).split(WI),Pe(n,n,[parseFloat(a[0]),parseFloat(a[1]||0)]);break;case"scale":a=R(a).split(WI),Re(n,n,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case"rotate":a=R(a).split(WI),Oe(n,n,parseFloat(a[0]));break;case"skew":a=R(a).split(WI),console.warn("Skew transform is not supported yet");break;case"matrix":var a=R(a).split(WI);n[0]=parseFloat(a[0]),n[1]=parseFloat(a[1]),n[2]=parseFloat(a[2]),n[3]=parseFloat(a[3]),n[4]=parseFloat(a[4]),n[5]=parseFloat(a[5])}}e.setLocalTransform(n)}}function Ol(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};jI.lastIndex=0;for(var r;null!=(r=jI.exec(e));)n[r[1]]=r[2];for(var o in UI)UI.hasOwnProperty(o)&&null!=n[o]&&(i[UI[o]]=n[o]);return i}function Rl(t,e,i){var n=e/t.width,r=i/t.height,o=Math.min(n,r),a=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+i/2];return{scale:a,position:s}}function zl(t,e){var i=new Tl;return i.parse(t,e)}function El(t,e){return function(i,n,r){(e||!this._disposed)&&(i=i&&i.toLowerCase(),dx.prototype[t].call(this,i,n,r))}}function Nl(){dx.call(this)}function Bl(t,e,i){function r(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=kT[e]),this.id,this.group,this._dom=t;var o="canvas",a=this._zr=En(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=sl(y(a.flush,a),17);var e=n(e);e&&iI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new vs;var s=this._api=iu(this);Di(DT,r),Di(TT,r),this._scheduler=new hl(this,s,TT,DT),dx.call(this,this._ecEventProcessor=new nu),this._messageCenter=new Nl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),Xl(a,this),z(this)}function Vl(t,e,i){if(!this._disposed){var n,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=Jn(r,e);for(var a=0;a<o.length;a++){var s=o[a];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}}function Fl(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Yl(t,"component",e,i),Yl(t,"chart",e,i),i.plan()}function Hl(t,e,i,n,r){function o(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}var a=t._model;if(!n)return void QI(t._componentsViews.concat(t._chartsViews),o);var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};r&&(l.subType=r);var u=i.excludeSeriesId;null!=u&&(u=B(Hn(u))),a&&a.eachComponent(l,function(e){u&&null!=u.get(e.id)||o(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function Wl(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Gl(t,e){var i=t.type,n=t.escapeConnect,r=ST[i],o=r.actionInfo,l=(o.update||"update").split(":"),u=l.pop();l=null!=l[0]&&iT(l[0]),this[yT]=!0;var h=[t],c=!1;t.batch&&(c=!0,h=p(t.batch,function(e){return e=s(a({},e),t),e.batch=null,e}));var d,f=[],g="highlight"===i||"downplay"===i;QI(h,function(t){d=r.action(t,this._model,this._api),d=d||a({},t),d.type=o.event||d.type,f.push(d),g?Hl(this,u,t,"series"):l&&Hl(this,u,t,l.main,l.sub)},this),"none"===u||g||l||(this[_T]?(Fl(this),bT.update.call(this,t),this[_T]=!1):bT[u].call(this,t)),d=c?{type:o.event||i,escapeConnect:n,batch:f}:f[0],this[yT]=!1,!e&&this._messageCenter.trigger(d.type,d)}function Zl(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Gl.call(this,i,t)}}function Ul(t){!t&&this.trigger("updated")}function Xl(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[_T]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}function Yl(t,e,i,n){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var h=iT(t.type),c=o?pI.getClass(h.main,h.sub):il.getClass(h.sub);r=new c,r.init(i,u),s[e]=r,a.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!o&&n.prepareView(r,t,i,u)}for(var o="component"===e,a=o?t._componentsViews:t._chartsViews,s=o?t._componentsMap:t._chartsMap,l=t._zr,u=t._api,h=0;h<a.length;h++)a[h].__alive=!1;o?i.eachComponent(function(t,e){"series"!==t&&r(e)}):i.eachSeries(r);for(var h=0;h<a.length;){var c=a[h];c.__alive?h++:(!o&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,u),a.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function jl(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function ql(t,e,i,n){Kl(t,e,i,n),QI(t._chartsViews,function(t){t.__alive=!1}),$l(t,e,i,n),QI(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function Kl(t,e,i,n,r){QI(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,i,n),eu(r,t)})}function $l(t,e,i,n,r){var o,a=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var s=i.renderTask;a.updatePayload(s,n),r&&r.get(e.uid)&&s.dirty(),o|=s.perform(a.getPerformArgs(s)),i.group.silent=!!e.get("silent"),eu(e,i),tu(e,i)}),a.unfinished|=o,Ql(t,e),TI(t._zr.dom,e)}function Jl(t,e){QI(CT,function(i){i(t,e)})}function Ql(t,e){var i=t._zr,n=i.storage,r=0;n.traverse(function(){r++}),r>e.get("hoverLayerThreshold")&&!Z_.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse(function(t){t.useHoverLayer=!0})}})}function tu(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function eu(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function iu(t){var e=t._coordSysMgr;return a(new gs(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function nu(){this.eventInfo}function ru(t){function e(t,e){for(var i=0;i<t.length;i++){var n=t[i];n[o]=e}}var i=0,n=1,r=2,o="__connectUpdateStatus";QI(IT,function(a,s){t._messageCenter.on(s,function(a){if(OT[t.group]&&t[o]!==i){if(a&&a.escapeConnect)return;var s=t.makeActionFromEvent(a),l=[];QI(PT,function(e){e!==t&&e.group===t.group&&l.push(e)}),e(l,i),QI(l,function(t){t[o]!==n&&t.dispatchAction(s)}),e(l,r)}})})}function ou(t,e,i){var n=uu(t);if(n)return n;var r=new Bl(t,e,i);return r.id="ec_"+RT++,PT[r.id]=r,tr(t,ET,r.id),ru(r),r}function au(t){if(x(t)){var e=t;t=null,QI(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+zT++,QI(e,function(e){e.group=t})}return OT[t]=!0,t}function su(t){OT[t]=!1}function lu(t){"string"==typeof t?t=PT[t]:t instanceof Bl||(t=uu(t)),t instanceof Bl&&!t.isDisposed()&&t.dispose()}function uu(t){return PT[er(t,ET)]}function hu(t){return PT[t]}function cu(t,e){kT[t]=e}function du(t){AT.push(t)}function fu(t,e){xu(TT,t,e,aT)}function pu(t){CT.push(t)}function gu(t,e,i){"function"==typeof e&&(i=e,e="");var n=eT(t)?t.type:[t,t={event:e}][0];
  t.event=(t.event||n).toLowerCase(),e=t.event,JI(xT.test(n)&&xT.test(e)),ST[n]||(ST[n]={action:i,actionInfo:t}),IT[e]=n}function vu(t,e){vs.register(t,e)}function mu(t){var e=vs.get(t);return e?e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice():void 0}function yu(t,e){xu(DT,t,e,hT,"layout")}function _u(t,e){xu(DT,t,e,fT,"visual")}function xu(t,e,i,n,r){(tT(e)||eT(e))&&(i=e,e=n);var o=hl.wrapStageHandler(i,r);return o.__prio=e,o.__raw=i,t.push(o),o}function wu(t,e){LT[t]=e}function bu(t){return TS.extend(t)}function Mu(t){return pI.extend(t)}function Su(t){return fI.extend(t)}function Iu(t){return il.extend(t)}function Tu(t){i("createCanvas",t)}function Au(t,e,i){KI.registerMap(t,e,i)}function Cu(t){var e=KI.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}}function Du(t){return t}function ku(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||Du,this._newKeyGetter=n||Du,this.context=r}function Lu(t,e,i,n,r){for(var o=0;o<t.length;o++){var a="_ec_"+r[n](t[o],o),s=e[a];null==s?(i.push(a),e[a]=o):(s.length||(e[a]=s=[s]),s.push(o))}}function Pu(t){var e={},i=e.encode={},n=B(),r=[],o=[],a=e.userOutput={dimensionNames:t.dimensions.slice(),encode:{}};f(t.dimensions,function(e){var s=t.getDimensionInfo(e),l=s.coordDim;if(l){var u=s.coordDimIndex;Ou(i,l)[u]=e,s.isExtraCoord||(n.set(l,1),zu(s.type)&&(r[0]=e),Ou(a.encode,l)[u]=s.index),s.defaultTooltip&&o.push(e)}VT.each(function(t,e){var n=Ou(i,e),r=s.otherDims[e];null!=r&&r!==!1&&(n[r]=s.name)})});var s=[],l={};n.each(function(t,e){var n=i[e];l[e]=n[0],s=s.concat(n)}),e.dataDimsOnCoord=s,e.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(r=u.slice());var h=i.tooltip;return h&&h.length?o=h.slice():o.length||(o=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=o,e}function Ou(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Ru(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function zu(t){return!("ordinal"===t||"time"===t)}function Eu(t){return t._rawCount>65535?UT:YT}function Nu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Bu(t,e){f(jT.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,f(qT,function(i){t[i]=n(e[i])}),t._calculationInfo=a(e._calculationInfo)}function Vu(t,e,i,n,r){var o=ZT[e.type],a=n-1,s=e.name,l=t[s][a];if(l&&l.length<i){for(var u=new o(Math.min(r-a*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][a]=u}for(var c=n*i;r>c;c+=i)t[s].push(new o(Math.min(r-c,i)))}function Fu(t){var e=t._invertedIndicesMap;f(e,function(i,n){var r=t._dimensionInfos[n],o=r.ordinalMeta;if(o){i=e[n]=new XT(o.categories.length);for(var a=0;a<i.length;a++)i[a]=WT;for(var a=0;a<t._count;a++)i[t.get(n,a)]=a}})}function Hu(t,e,i){var n;if(null!=e){var r=t._chunkSize,o=Math.floor(i/r),a=i%r,s=t.dimensions[e],l=t._storage[s][o];if(l){n=l[a];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Wu(t){return t}function Gu(t){return t<this._count&&t>=0?this._indices[t]:-1}function Zu(t,e){var i=t._idList[e];return null==i&&(i=Hu(t,t._idDimIdx,e)),null==i&&(i=GT+e),i}function Uu(t){return x(t)||(t=[t]),t}function Xu(t,e){var i=t.dimensions,n=new KT(p(i,t.getDimensionInfo,t),t.hostModel);Bu(n,t);for(var r=n._storage={},o=t._storage,a=0;a<i.length;a++){var s=i[a];o[s]&&(u(e,s)>=0?(r[s]=Yu(o[s]),n._rawExtent[s]=ju(),n._extent[s]=null):r[s]=o[s])}return n}function Yu(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=Nu(t[i]);return e}function ju(){return[1/0,-1/0]}function qu(t,e,i){function r(t,e,i){null!=VT.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}qa.isInstance(e)||(e=qa.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var o=(i.dimsDef||[]).slice(),l=B(i.encodeDef),u=B(),h=B(),c=[],d=Ku(e,t,o,i.dimCount),p=0;d>p;p++){var g=o[p]=a({},M(o[p])?o[p]:{name:o[p]}),v=g.name,m=c[p]={otherDims:{}};null!=v&&null==u.get(v)&&(m.name=m.displayName=v,u.set(v,p)),null!=g.type&&(m.type=g.type),null!=g.displayName&&(m.displayName=g.displayName)}l.each(function(t,e){if(t=Hn(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void l.set(e,!1);var i=l.set(e,[]);f(t,function(t,n){b(t)&&(t=u.get(t)),null!=t&&d>t&&(i[n]=t,r(c[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var a=t.ordinalMeta;t.ordinalMeta=null,t=n(t),t.ordinalMeta=a,i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var u=l.get(e);if(u!==!1){var u=Hn(u);if(!u.length)for(var h=0;h<(i&&i.length||1);h++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&u.push(y++)}f(u,function(n,a){var l=c[n];if(r(s(l,t),e,a),null==l.name&&i){var u=i[a];!M(u)&&(u={name:u}),l.name=l.displayName=u.name,l.defaultTooltip=u.defaultTooltip}o&&s(l.otherDims,o)})}});var _=i.generateCoord,x=i.generateCoordCount,w=null!=x;x=_?x||1:0;for(var S=_||"value",I=0;d>I;I++){var m=c[I]=c[I]||{},T=m.coordDim;null==T&&(m.coordDim=$u(S,h,w),m.coordDimIndex=0,(!_||0>=x)&&(m.isExtraCoord=!0),x--),null==m.name&&(m.name=$u(m.coordDim,u)),null==m.type&&as(e,I,m.name)&&(m.type="ordinal")}return c}function Ku(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}function $u(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function Ju(t,e,i){i=i||{};var n,r,o,a,s=i.byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||n||(s=!0),r){o="__\x00ecstackresult",a="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var h=r.coordDim,c=r.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:o,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:a,coordDim:a,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:a,stackResultDimension:o}}function Qu(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function th(t,e){return Qu(t,e)?t.getCalculationInfo("stackResultDimension"):e}function eh(t,e,i){i=i||{},qa.isInstance(t)||(t=qa.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),o=vs.get(r),a=Ya(e);a&&(n=p(a.coordSysDims,function(t){var e={name:t},i=a.axisMap.get(t);if(i){var n=i.get("type");e.type=Ru(n)}return e})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=QT(t,{coordDimensions:n,generateCoord:i.generateCoord});a&&f(u,function(t,e){var i=t.coordDim,n=a.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=Ju(e,u),c=new KT(u,e);c.setCalculationInfo(h);var d=null!=s&&ih(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function ih(t){if(t.sourceFormat===PS){var e=nh(t.data||[]);return null!=e&&!x(Gn(e))}}function nh(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}function rh(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function oh(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function ah(t){return t._map||(t._map=B(t.categories))}function sh(t){return M(t)&&null!=t.value?t.value:t+""}function lh(t,e,i,n){var r={},o=t[1]-t[0],a=r.interval=ba(o/e,!0);null!=i&&i>a&&(a=r.interval=i),null!=n&&a>n&&(a=r.interval=n);var s=r.intervalPrecision=uh(a),l=r.niceTickExtent=[nA(Math.ceil(t[0]/a)*a,s),nA(Math.floor(t[1]/a)*a,s)];return ch(l,t),r}function uh(t){return pa(t)+2}function hh(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function ch(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),hh(t,0,e),hh(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function dh(t,e,i,n){var r=[];if(!t)return r;var o=1e4;e[0]<i[0]&&r.push(e[0]);for(var a=i[0];a<=i[1]&&(r.push(a),a=nA(a+t,n),a!==r[r.length-1]);)if(r.length>o)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}function fh(t){return t.get("stack")||aA+t.seriesIndex}function ph(t){return t.dim+t.index}function gh(t,e){var i=[];return e.eachSeriesByType(t,function(t){xh(t)&&!wh(t)&&i.push(t)}),i}function vh(t){var e=[];return f(t,function(t){var i=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),o=r.getExtent(),a="category"===r.type?r.getBandWidth():Math.abs(o[1]-o[0])/i.count(),s=ha(t.get("barWidth"),a),l=ha(t.get("barMaxWidth"),a),u=t.get("barGap"),h=t.get("barCategoryGap");e.push({bandWidth:a,barWidth:s,barMaxWidth:l,barGap:u,barCategoryGap:h,axisKey:ph(r),stackId:fh(t)})}),mh(e)}function mh(t){var e={};f(t,function(t){var i=t.axisKey,n=t.bandWidth,r=e[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;e[i]=r;var a=t.stackId;o[a]||r.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[a].width&&(o[a].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var l=t.barMaxWidth;l&&(o[a].maxWidth=l);var u=t.barGap;null!=u&&(r.gap=u);var h=t.barCategoryGap;null!=h&&(r.categoryGap=h)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,o=ha(t.categoryGap,r),a=ha(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+a)}),h&&(c-=h.width*a);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandWidth:r,offset:d,width:t.width},d+=t.width*(1+a)})}),i}function yh(t,e,i){if(t&&e){var n=t[ph(e)];return null!=n&&null!=i&&(n=n[fh(i)]),n}}function _h(t,e){var i=gh(t,e),n=vh(i),r={};f(i,function(t){var e=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),a=fh(t),s=n[ph(o)][a],l=s.offset,u=s.width,h=i.getOtherAxis(o),c=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(o.dim),p=Qu(e,d),g=h.isHorizontal(),v=bh(o,h,p),m=0,y=e.count();y>m;m++){var _=e.get(d,m),x=e.get(f,m);if(!isNaN(_)&&!isNaN(x)){var w=_>=0?"p":"n",b=v;p&&(r[a][x]||(r[a][x]={p:v,n:v}),b=r[a][x][w]);var M,S,I,T;if(g){var A=i.dataToPoint([_,x]);M=b,S=A[1]+l,I=A[0]-v,T=u,Math.abs(I)<c&&(I=(0>I?-1:1)*c),p&&(r[a][x][w]+=I)}else{var A=i.dataToPoint([x,_]);M=A[0]+l,S=b,I=u,T=A[1]-v,Math.abs(T)<c&&(T=(0>=T?-1:1)*c),p&&(r[a][x][w]+=T)}e.setItemLayout(m,{x:M,y:S,width:I,height:T})}}},this)}function xh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function wh(t){return t.pipelineContext&&t.pipelineContext.large}function bh(t,e){return e.toGlobalCoord(e.dataToCoord(0))}function Mh(t,e){return MA(t,bA(e))}function Sh(t,e){var i,n,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,u=null!=s,h=t.getExtent();"ordinal"===o?i=e.getCategories().length:(n=e.get("boundaryGap"),x(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=ha(n[0],1),n[1]=ha(n[1],1),r=h[1]-h[0]||Math.abs(h[0])),null==a&&(a="ordinal"===o?i?0:0/0:h[0]-n[0]*r),null==s&&(s="ordinal"===o?i?i-1:0/0:h[1]+n[1]*r),"dataMin"===a?a=h[0]:"function"==typeof a&&(a=a({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==a||!isFinite(a))&&(a=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(A(a)||A(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===o){var d,p=gh("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=vh(p),v=Ih(a,s,e,g);a=v.min,s=v.max}}return[a,s]}function Ih(t,e,i,n){var r=i.axis.getExtent(),o=r[1]-r[0],a=yh(n,i.axis);if(void 0===a)return{min:t,max:e};var s=1/0;f(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(a,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=1-(s+l)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function Th(t,e){var i=Sh(t,e),n=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Ah(t,e){if(e=e||t.get("type"))switch(e){case"category":return new iA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new oA;default:return(rh.getClass(e)||oA).create(t)}}function Ch(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function Dh(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,r){return null!=i&&(r=n-i),e(kh(t,n),r)}:function(e){return t.scale.getLabel(e)}}function kh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Lh(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,o="category"===t.type,a=i.getExtent();o?r=i.count():(n=i.getTicks(),r=n.length);var s,l=t.getLabelModel(),u=Dh(t),h=1;r>40&&(h=Math.ceil(r/40));for(var c=0;r>c;c+=h){var d=n?n[c]:a[0]+c,f=u(d),p=l.getTextRect(f),g=Ph(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function Ph(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,o=n.height,a=r*Math.cos(i)+o*Math.sin(i),s=r*Math.sin(i)+o*Math.cos(i),l=new wi(n.x,n.y,a,s);return l}function Oh(t){var e=t.get("interval");return null==e?"auto":e}function Rh(t){return"category"===t.type&&0===Oh(t.getLabelModel())}function zh(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function Eh(t,e,i,n,r,o,a){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?lo(t.slice(8),new wi(e,i,n,r),a?"center":"cover"):0===t.indexOf("path://")?so(t.slice(7),{},new wi(e,i,n,r),a?"center":"cover"):new NA({shape:{symbolType:t,x:e,y:i,width:n,height:r}}),l.__isEmptyBrush=s,l.setColor=zh,l.setColor(o),l}function Nh(t){return eh(t.getSource(),t)}function Bh(t,e){var i=e;ia.isInstance(e)||(i=new ia(e),c(i,DA));var n=Ah(i);return n.setExtent(t[0],t[1]),Th(n,i),n}function Vh(t){c(t,DA)}function Fh(t,e){return Math.abs(t-e)<FA}function Hh(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var o=1;o<t.length;o++){var a=t[o];n+=Rr(r[0],r[1],a[0],a[1],e,i),r=a}var s=t[0];return Fh(r[0],s[0])&&Fh(r[1],s[1])||(n+=Rr(r[0],r[1],s[0],s[1],e,i)),0!==n}function Wh(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function Gh(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var r=i[n],o=r.geometry,a=o.coordinates,s=o.encodeOffsets,l=0;l<a.length;l++){var u=a[l];if("Polygon"===o.type)a[l]=Zh(u,s[l],e);else if("MultiPolygon"===o.type)for(var h=0;h<u.length;h++){var c=u[h];u[h]=Zh(c,s[l][h],e)}}return t.UTF8Encoding=!1,t}function Zh(t,e,i){for(var n=[],r=e[0],o=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,n.push([s/i,l/i])}return n}function Uh(t){return"category"===t.type?Yh(t):Kh(t)}function Xh(t,e){return"category"===t.type?qh(t,e):{ticks:t.scale.getTicks()}}function Yh(t){var e=t.getLabelModel(),i=jh(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function jh(t,e){var i=$h(t,"labels"),n=Oh(e),r=Jh(i,n);if(r)return r;var o,a;return w(n)?o=rc(t,n):(a="auto"===n?tc(t):n,o=nc(t,a)),Qh(i,n,{labels:o,labelCategoryInterval:a})}function qh(t,e){var i=$h(t,"ticks"),n=Oh(e),r=Jh(i,n);if(r)return r;var o,a;if((!e.get("show")||t.scale.isBlank())&&(o=[]),w(n))o=rc(t,n,!0);else if("auto"===n){var s=jh(t,t.getLabelModel());a=s.labelCategoryInterval,o=p(s.labels,function(t){return t.tickValue})}else a=n,o=nc(t,a,!0);return Qh(i,n,{ticks:o,tickCategoryInterval:a})}function Kh(t){var e=t.scale.getTicks(),i=Dh(t);return{labels:p(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function $h(t,e){return WA(t)[e]||(WA(t)[e]=[])}function Jh(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function Qh(t,e,i){return t.push({key:e,value:i}),i}function tc(t){var e=WA(t).autoInterval;return null!=e?e:WA(t).autoInterval=t.calculateCategoryInterval()}function ec(t){var e=ic(t),i=Dh(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,v=Hi(i(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/h,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=WA(t.model),w=x.lastAutoInterval,b=x.lastTickCount;return null!=w&&null!=b&&Math.abs(w-_)<=1&&Math.abs(b-a)<=1&&w>_?_=w:(x.lastTickCount=a,x.lastAutoInterval=_),_}function ic(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function nc(t,e,i){function n(t){l.push(i?t:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:t})}var r=Dh(t),o=t.scale,a=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=a[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Rh(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==a[0]&&n(a[0]);for(var g=h;g<=a[1];g+=u)n(g);return p&&g-u!==a[1]&&n(a[1]),l}function rc(t,e,i){var n=t.scale,r=Dh(t),o=[];return f(n.getTicks(),function(t){var a=n.getLabel(t);e(t,a)&&o.push(i?t:{formattedLabel:r(t),rawLabel:a,tickValue:t})}),o}function oc(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}function ac(t,e,i,n,r){function o(t,e){return h?t>e:e>t}var a=e.length;if(t.onBand&&!n&&a){var s,l=t.getExtent();if(1===a)e[0].coord=l[0],s=e[1]={coord:l[0]};else{var u=e[1].coord-e[0].coord;f(e,function(t){t.coord-=u/2;var e=e||0;e%2>0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[a-1].coord+u},e.push(s)}var h=l[0]>l[1];o(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&o(l[0],e[0].coord)&&e.unshift({coord:l[0]}),o(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&o(s.coord,l[1])&&e.push({coord:l[1]})}}function sc(t){return this._axes[t]}function lc(t){jA.call(this,t)}function uc(t,e){return e.type||(e.data?"category":"value")}function hc(t,e){return t.getCoordSysModel()===e}function cc(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function dc(t,e,i,n){function r(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)fc(a[u])&&(o=a[u]);else for(var h in a)if(a.hasOwnProperty(h)&&fc(a[h])&&!n[r(a[h])]){o=a[h];break}o&&(n[r(o)]=!0)}}function fc(t){return t&&"category"!==t.type&&"time"!==t.type&&Ch(t)}function pc(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function gc(t){return p(nC,function(e){var i=t.getReferringComponents(e)[0];return i})}function vc(t){return"cartesian2d"===t.get("coordinateSystem")}function mc(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Ws(t,e,i[0]);if(n){for(var r=[],o=0;o<i.length;o++){var a=Ws(t,e,i[o]);r.push(a)}return r.join(" ")}}function yc(t,e,i,n,r,o){var a=i.getModel("label"),s=i.getModel("emphasis.label");Lo(t,e,a,s,{labelFetcher:r,labelDataIndex:o,defaultText:mc(r.getData(),o),isRectText:!0,autoColor:n}),_c(t),_c(e)}function _c(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function xc(t,e,i){var n=t.getArea(),r=t.getBaseAxis().isHorizontal(),o=n.x,a=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;o-=u/2,a-=u/2,s+=u,l+=u;var h=new kM({shape:{x:o,y:a,width:s,height:l}});return e&&(h.shape[r?"width":"height"]=0,Zo(h,{shape:{width:s,height:l}},i)),h}function wc(t,e,i){var n=t.getArea(),r=new bM({shape:{cx:ca(t.cx,1),cy:ca(t.cy,1),r0:ca(n.r0,1),r:ca(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(r.shape.endAngle=n.startAngle,Zo(r,{shape:{endAngle:n.endAngle}},i)),r}function bc(t,e,i){return t?"polar"===t.type?wc(t,e,i):"cartesian2d"===t.type?xc(t,e,i):null:null}function Mc(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var r=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=r,i.width+=2*r):(i.y-=r,i.height+=2*r)}}return i}function Sc(t,e,i){i.style.text=null,Go(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Ic(t,e,i){i.style.text=null,Go(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Tc(t,e,i,n,r,o,a,l){var u=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(s({fill:u,opacity:h},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var p=a?r.height>0?"bottom":"top":r.width>0?"left":"right";l||yc(t.style,d,n,u,o,i,p),Ao(t,d)}function Ac(t,e){var i=t.get(sC)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function Cc(t,e,i){var n=t.getData(),r=[],o=n.getLayout("valueAxisHorizontal")?1:0;r[1-o]=n.getLayout("valueAxisStart");var a=new pC({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:r,__baseDimIdx:o,__largeDataIndices:n.getLayout("largeDataIndices"),__barWidth:n.getLayout("barWidth")});e.add(a),kc(a,t,n),a.seriesIndex=t.seriesIndex,t.get("silent")||(a.on("mousedown",gC),a.on("mousemove",gC))}function Dc(t,e,i){var n=t.__baseDimIdx,r=1-n,o=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];lC[0]=e,lC[1]=i;for(var u=lC[n],h=lC[1-n],c=u-s,d=u+s,f=0,p=o.length/2;p>f;f++){var g=2*f,v=o[g+n],m=o[g+r];if(v>=c&&d>=v&&(m>=l?h>=l&&m>=h:h>=m&&l>=h))return a[f]}return-1}function kc(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Lc(t,e,i,n){var r,o,a=ma(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return ya(a-vC/2)?(o=l?"bottom":"top",r="center"):ya(a-1.5*vC)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*vC>a&&a>vC/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Pc(t,e,i){if(!Rh(t.axis)){var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(Oc(o),Oc(u)):Rc(o,a)&&(n?(Oc(a),Oc(h)):(Oc(o),Oc(u))),r===!1?(Oc(s),Oc(c)):Rc(l,s)&&(r?(Oc(l),Oc(d)):(Oc(s),Oc(c)))}}function Oc(t){t&&(t.ignore=!0)}function Rc(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var r=De([]);return Oe(r,r,-t.rotation),i.applyTransform(Le([],r,t.getLocalTransform())),n.applyTransform(Le([],r,e.getLocalTransform())),i.intersect(n)}}function zc(t){return"middle"===t||"center"===t}function Ec(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),a=r.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f<l.length;f++){var p=l[f].coord;u[0]=p,u[1]=0,h[0]=p,h[1]=i.tickDirection*a,c&&(oe(u,u,c),oe(h,h,c));var g=new PM({anid:"tick_"+l[f].tickValue,subPixelOptimize:!0,shape:{x1:u[0],y1:u[1],x2:h[0],y2:h[1]},style:s(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0});t.group.add(g),d.push(g)}return d}}function Nc(t,e,i){var n=e.axis,r=C(i.axisLabelShow,e.get("axisLabel.show"));if(r&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),s=n.getViewLabels(),l=(C(i.labelRotate,o.get("rotate"))||0)*vC/180,u=xC(i.rotation,l,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],d=wC(e),p=e.get("triggerEvent");return f(s,function(r,s){var l=r.tickValue,f=r.formattedLabel,g=r.rawLabel,v=o;h&&h[l]&&h[l].textStyle&&(v=new ia(h[l].textStyle,o,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=n.dataToCoord(l),_=[y,i.labelOffset+i.labelDirection*a],x=new yM({anid:"label_"+l,position:_,rotation:u.rotation,silent:d,z2:10});Oo(x.style,v,{text:f,textAlign:v.getShallow("align",!0)||u.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof m?m("category"===n.type?g:"value"===n.type?l+"":l,s):m}),p&&(x.eventData=_C(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),c.push(x),t.group.add(x),x.decomposeTransform()}),c}}function Bc(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Vc(i,t,e),i.seriesInvolved&&Hc(i,t),i}function Vc(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];bC(i.getCoordinateSystems(),function(i){function s(n,s,l){var h=l.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||n||Yc(h))){null==s&&(s=h.get("triggerTooltip")),h=n?Fc(l,c,r,e,n,s):h;var f=h.get("snap"),p=jc(l.model),g=s||f||"category"===l.type,v=t.axesInfo[p]={key:p,axis:l,coordSys:i,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:Yc(h),seriesModels:[]};u[p]=v,t.seriesInvolved|=g;var m=Wc(o,l);if(null!=m){var y=a[m]||(a[m]={axesInfo:{}});y.axesInfo[p]=v,y.mapper=o[m].mapper,v.linkGroup=y}}}if(i.axisPointerEnabled){var l=jc(i.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var h=i.model,c=h.getModel("tooltip",n);if(bC(i.getAxes(),MC(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),p=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&bC(p.baseAxes,MC(s,f?"cross":!0,d)),f&&bC(p.otherAxes,MC(s,"cross",!1))}}})}function Fc(t,e,i,r,o,a){var l=e.getModel("axisPointer"),u={};bC(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=n(l.get(t))}),u.snap="category"!==t.type&&!!a,"cross"===l.get("type")&&(u.type="line");var h=u.label||(u.label={});if(null==h.show&&(h.show=!1),"cross"===o){var c=l.get("label.show");if(h.show=null!=c?c:!0,!a){var d=u.lineStyle=l.get("crossStyle");d&&s(h,d.textStyle)}}return t.model.getModel("axisPointer",new ia(u,i,r))}function Hc(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&bC(t.coordSysAxesInfo[jc(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}function Wc(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(Gc(o[n+"AxisId"],i.id)||Gc(o[n+"AxisIndex"],i.componentIndex)||Gc(o[n+"AxisName"],i.name))return r}}function Gc(t,e){return"all"===t||x(t)&&u(t,e)>=0||t===e}function Zc(t){var e=Uc(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=Yc(i);null==o&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function Uc(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[jc(t)]}function Xc(t){var e=Uc(t);return e&&e.axisPointerModel}function Yc(t){return!!t.get("handle.show")}function jc(t){return t.type+"||"+t.id}function qc(t,e,i,n,r,o){var a=SC.getAxisPointerClass(t.axisPointerClass);if(a){var s=Xc(e);s?(t._axisPointer||(t._axisPointer=new a)).render(e,s,n,o):Kc(t,n)}}function Kc(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function $c(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);var v={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=v[s],o.labelOffset=a?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),C(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var m=e.get("axisLabel.rotate");return o.labelRotate="top"===l?-m:m,o.z2=1,o}function Jc(t,e,i){rw.call(this),this.updateData(t,e,i)}function Qc(t){return[t[0]/2,t[1]/2]}function td(t,e){this.parent.drift(t,e)}function ed(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],r={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(r,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function id(t){this.group=new rw,this._symbolCtor=t||Jc}function nd(t,e,i,n){return!(!e||isNaN(e[0])||isNaN(e[1])||n.isIgnore&&n.isIgnore(i)||n.clipShape&&!n.clipShape.contain(e[0],e[1])||"none"===t.getItemVisual(i,"symbol"))}function rd(t){return null==t||M(t)||(t={isIgnore:t}),t||{}}function od(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 ad(t,e,i){var n,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=sd(o,i),s=r.dim,l=o.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=p(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=Qu(e,d[0]))&&(d[0]=f),(n|=Qu(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:a,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function sd(t,e){var i=0,n=t.scale.getExtent();return"start"===e?i=n[0]:"end"===e?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]),i}function ld(t,e,i,n){var r=0/0;t.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=i.get(t.baseDim,n),a[1-o]=r,e.dataToPoint(a)}function ud(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function hd(t){return isNaN(t[0])||isNaN(t[1])}function cd(t,e,i,n,r,o,a,s,l,u){return"none"!==u&&u?dd.apply(this,arguments):fd.apply(this,arguments)}function dd(t,e,i,n,r,o,a,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=r||0>d)break;if(hd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]);
  else if(l>0){var g=e[c],v="y"===u?1:0,m=(p[v]-g[v])*l;FC(WC,g),WC[v]=g[v]+m,FC(GC,p),GC[v]=p[v]-m,t.bezierCurveTo(WC[0],WC[1],GC[0],GC[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function fd(t,e,i,n,r,o,a,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=r||0>d)break;if(hd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),FC(WC,p);else if(l>0){var g=d+o,v=e[g];if(h)for(;v&&hd(e[g]);)g+=o,v=e[g];var m=.5,y=e[c],v=e[g];if(!v||hd(v))FC(GC,p);else{hd(v)&&!h&&(v=p),Y(HC,v,y);var _,x;if("x"===u||"y"===u){var w="x"===u?0:1;_=Math.abs(p[w]-y[w]),x=Math.abs(p[w]-v[w])}else _=lx(p,y),x=lx(p,v);m=x/(x+_),VC(GC,p,HC,-l*(1-m))}NC(WC,WC,s),BC(WC,WC,a),NC(GC,GC,s),BC(GC,GC,a),t.bezierCurveTo(WC[0],WC[1],GC[0],GC[1],p[0],p[1]),VC(WC,p,HC,l*m)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function pd(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var o=t[r];o[0]<i[0]&&(i[0]=o[0]),o[1]<i[1]&&(i[1]=o[1]),o[0]>n[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function gd(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],r=e[i];if(n[0]!==r[0]||n[1]!==r[1])return}return!0}}function vd(t){return"number"==typeof t?t:t?.5:0}function md(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,o=e.count();o>r;r++)n.push(ld(i,t,e,r));return n}function yd(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a<t.length-1;a++){var s=t[a+1],l=t[a];o.push(l);var u=[];switch(i){case"end":u[r]=s[r],u[1-r]=l[1-r],o.push(u);break;case"middle":var h=(l[r]+s[r])/2,c=[];u[r]=c[r]=h,u[1-r]=l[1-r],c[1-r]=s[1-r],o.push(u),o.push(c);break;default:u[r]=l[r],u[1-r]=s[1-r],o.push(u)}}return t[a]&&o.push(t[a]),o}function _d(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,r,o=i.length-1;o>=0;o--){var a=i[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if(n=l&&l.coordDim,"x"===n||"y"===n){r=i[o];break}}if(r){var u=e.getAxis(n),h=p(r.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,v=h[0].coord-g,m=h[c-1].coord+g,y=m-v;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-v)/y}),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 _=new BM(0,0,0,0,h,!0);return _[n]=v,_[n+"2"]=m,_}}}function xd(t,e,i){var n=t.get("showAllSymbol"),r="auto"===n;if(!n||r){var o=i.getAxesByScale("ordinal")[0];if(o&&(!r||!wd(o,e))){var a=e.mapDimension(o.dim),s={};return f(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function wd(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;r>a;a+=o)if(1.5*Jc.getSymbolSize(e,a)[t.isHorizontal()?1:0]>n)return!1;return!0}function bd(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),r=xc(t,e,i);if(!i.get("clip",!0)){var o=r.shape,a=Math.max(o.width,o.height);n?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)}return r}return wc(t,e,i)}function Md(t,e,i,n){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){Sd(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function Sd(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,u=[a*l,s*l];r?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Id(t,e){rw.call(this);var i=new bM({z2:2}),n=new AM,r=new yM;this.add(i),this.add(n),this.add(r),this.updateData(t,e,!0)}function Td(t,e,i,n,r,o,a){function s(e,i,n){for(var r=e;i>r;r++)if(t[r].y+=n,r>e&&i>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function u(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=r+h>u?Math.sqrt((r+h+c)*(r+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,c=0,d=t.length,f=[],p=[],g=0;d>g;g++)h=t[g].y-c,0>h&&s(g,d,-h,r),c=t[g].y+t[g].height;0>a-c&&l(d-1,c-a);for(var g=0;d>g;g++)t[g].y>=i?p.push(t[g]):f.push(t[g]);u(f,!1,e,i,n,r),u(p,!0,e,i,n,r)}function Ad(t,e,i,n,r,o){for(var a=[],s=[],l=0;l<t.length;l++)Cd(t[l])||(t[l].x<e?a.push(t[l]):s.push(t[l]));Td(s,e,i,n,1,r,o),Td(a,e,i,n,-1,r,o);for(var l=0;l<t.length;l++)if(!Cd(t[l])){var u=t[l].linePoints;if(u){var h=u[1][0]-u[2][0];u[2][0]=t[l].x<e?t[l].x+3:t[l].x-3,u[1][1]=u[2][1]=t[l].y,u[1][0]=u[2][0]+h}}}function Cd(t){return"center"===t.position}function Dd(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,zd(e,i,t),uD(i,function(i){uD(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,_(kd,t))})}),e.wrapMethod("cloneShallow",_(Pd,t)),uD(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,_(Ld,t))}),O(i[e.dataType]===e)}function kd(t,e){if(Rd(this)){var i=a({},this[hD]);i[this.dataType]=e,zd(e,i,t)}else Ed(e,this.dataType,this[cD],t);return e}function Ld(t,e){return t.struct&&t.struct.update(this),e}function Pd(t,e){return uD(e[hD],function(i,n){i!==e&&Ed(i.cloneShallow(),n,e,t)}),e}function Od(t){var e=this[cD];return null==t||null==e?e:e[hD][t]}function Rd(t){return t[cD]===t}function zd(t,e,i){t[hD]={},uD(e,function(e,n){Ed(e,n,t,i)})}function Ed(t,e,i,n){i[hD][e]=t,t[cD]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Od}function Nd(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=p(e||[],function(e){return new ia(e,t,t.ecModel)}),this.leavesModel=new ia(i||{},t,t.ecModel)}function Bd(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Vd(t,e,i){if(t&&u(e,t.type)>=0){var n=i.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=n.getNodeById(r)),r&&n.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=n.getNodeById(o)))return{node:r}}}function Fd(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Hd(t,e){var i=Fd(t);return u(i,e)>=0}function Wd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function Gd(t){var e=0;f(t.children,function(t){Gd(t);var i=t.value;x(i)&&(i=i[0]),e+=i});var i=t.value;x(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),x(t.value)?t.value[0]=i:t.value=i}function Zd(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new ia(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){var r=t[0]||(t[0]={});r.color=i.slice()}return t}}function Ud(t){this.group=new rw,t.add(this.group)}function Xd(t,e,i,n,r,o){var a=[[r?t:t-gD,e],[t+i,e],[t+i,e+n],[r?t:t-gD,e+n]];return!o&&a.splice(2,0,[t+i+gD,e+n/2]),!r&&a.push([t,e+n/2]),a}function Yd(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&Wd(i,e)}}function jd(t,e,i){var n=$d(t);n[e]=i}function qd(t,e,i){var n=$d(t),r=n[e];r===i&&(n[e]=null)}function Kd(t,e){return!!$d(t)[e]}function $d(t){return t[vD]||(t[vD]={})}function Jd(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(Qd,this),r=e(tf,this),o=e(ef,this),a=e(nf,this),l=e(rf,this);dx.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Qd(t){if(!(we(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function tf(t){if(this._dragging&&sf("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Kd(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,o=e-n,a=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&yx(t.event),af(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:n,oldY:r,newX:e,newY:i})}}function ef(t){we(t)||(this._dragging=!1)}function nf(t){var e=sf("zoomOnMouseWheel",t,this._opt),i=sf("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,r=Math.abs(n),o=t.offsetX,a=t.offsetY;if(0!==n&&(e||i)){if(e){var s=r>3?1.4:r>1?1.2:1.1,l=n>0?s:1/s;of(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:o,originY:a})}if(i){var u=Math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);of(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:o,originY:a})}}}function rf(t){if(!Kd(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;of(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function of(t,e,i,n,r){t.pointerChecker&&t.pointerChecker(n,r.originX,r.originY)&&(yx(n.event),af(t,e,i,n,r))}function af(t,e,i,n,r){r.isAvailableBehavior=y(sf,null,i,n),t.trigger(e,r)}function sf(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"Key"])}function lf(){var t,e=[],i={};return{add:function(t,n,r,o,a){return b(o)&&(a=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:r,delay:o,easing:a}),!0)},done:function(e){return t=e,this},start:function(){function n(){r--,r||(e.length=0,i={},t&&t())}for(var r=e.length,o=0,a=e.length;a>o;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}function uf(){return{nodeGroup:[],background:[],content:[]}}function hf(t,e,i,r,o,s,l,u,h,c){function d(e,i,n){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:x,height:w});var r=l.getVisual("borderColor",!0),o=L.get("borderColor");p(i,function(){var t=kD(k);t.fill=r;var e=DD(L);if(e.fill=o,n){var a=x-2*b;g(t,e,r,a,A,{x:b,y:0,width:a,height:A})}else t.text=e.text=null;i.setStyle(t),Ao(i,e)}),e.add(i)}function f(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(x-2*b,0),r=Math.max(w-2*b,0);i.culling=!0,i.setShape({x:b,y:b,width:n,height:r});var o=l.getVisual("color",!0);p(i,function(){var t=kD(k);t.fill=o;var e=DD(L);g(t,e,o,n,r),i.setStyle(t),Ao(i,e)}),e.add(i)}function p(t,e){M?!t.invisible&&s.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function g(e,i,r,o,a,s){var u=l.getModel(),h=C(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),u.get("name"));if(!s&&_.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=u.getModel(s?SD:bD),f=u.getModel(s?ID:MD),p=d.getShallow("show");Lo(e,i,d,f,{defaultText:p?h:null,autoColor:r,isRectText:!0}),s&&(e.textRect=n(s)),e.truncate=p&&d.get("ellipsis")?{outerWidth:o,outerHeight:a,minChar:2}:null}function v(t,n,r,a){var s=null!=I&&i[t][I],l=o[t];return s?(i[t][I]=null,m(l,s,t)):M||(s=new n({z:cf(r,a)}),s.__tmDepth=r,s.__tmStorageName=t,y(l,s,t)),e[t][S]=s}function m(t,e,i){var n=t[S]={};n.old="nodeGroup"===i?e.position.slice():a({},e.shape)}function y(t,e,i){var n=t[S]={},a=l.parentNode;if(a&&(!r||"drillDown"===r.direction)){var s=0,u=0,h=o.background[a.getRawIndex()];!r&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var _=l.getLayout();if(_&&_.isInView){var x=_.width,w=_.height,b=_.borderWidth,M=_.invisible,S=l.getRawIndex(),I=u&&u.getRawIndex(),T=l.viewChildren,A=_.upperHeight,D=T&&T.length,k=l.getModel("itemStyle"),L=l.getModel("emphasis.itemStyle"),P=v("nodeGroup",yD);if(P){if(h.add(P),P.attr("position",[_.x||0,_.y||0]),P.__tmNodeWidth=x,P.__tmNodeHeight=w,_.isAboveViewRoot)return P;var O=v("background",_D,c,AD);if(O&&d(P,O,D&&_.upperHeight),!D){var R=v("content",_D,c,CD);R&&f(P,R)}return P}}}}function cf(t,e){var i=t*TD+e;return(i-1)/i}function df(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function ff(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(RD(e,function(t,e){n[t]=e}),!x(i)){var r=[];M(i)?RD(i,function(t,e){var i=n[e];r[null!=i?i:ED]=t}):r[ED]=i,i=bf(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function pf(t,e){var i=t.visual,n=[];M(i)?RD(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||r.hasOwnProperty(t.type)||(n[1]=n[0]),bf(t,n)}function gf(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:xf([0,1])}}function vf(t){var e=this.option.visual;return e[Math.round(ua(t,[0,1],[0,e.length-1],!0))]||{}}function mf(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function yf(t){var e=this.option.visual;return e[this.option.loop&&t!==ED?t%e.length:t]}function _f(){return this.option.visual[0]}function xf(t){return{linear:function(e){return ua(e,t,this.option.visual,!0)},category:yf,piecewise:function(e,i){var n=wf.call(this,i);return null==n&&(n=ua(e,t,this.option.visual,!0)),n},fixed:_f}}function wf(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=ND.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}function bf(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return qe(t)})),e}function Mf(t,e,i){return t?i>=e:i>e}function Sf(t,e,i,n,r,o){var a=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(HD),h=i[t.depth],c=If(u,e,h,n),d=u.get("borderColor"),p=u.get("borderColorSaturation");null!=p&&(l=Tf(c,t),d=Af(p,l)),t.setVisual("borderColor",d);var g=t.viewChildren;if(g&&g.length){var v=Df(t,a,s,u,c,g);f(g,function(t,e){if(t.depth>=r.length||t===r[t.depth]){var s=Lf(a,c,t,e,v,o);Sf(t,s,i,n,r,o)}})}else l=Tf(c,t),t.setVisual("color",l)}}function If(t,e,i,n){var r=a({},e);return f(["color","colorAlpha","colorSaturation"],function(o){var a=t.get(o,!0);null==a&&i&&(a=i[o]),null==a&&(a=e[o]),null==a&&(a=n.get(o)),null!=a&&(r[o]=a)}),r}function Tf(t){var e=Cf(t,"color");if(e){var i=Cf(t,"colorAlpha"),n=Cf(t,"colorSaturation");return n&&(e=ii(e,null,null,n)),i&&(e=ni(e,i)),e}}function Af(t,e){return null!=e?ii(e,null,null,t):null}function Cf(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function Df(t,e,i,n,r,o){if(o&&o.length){var a=kf(e,"color")||null!=r.color&&"none"!==r.color&&(kf(e,"colorAlpha")||kf(e,"colorSaturation"));if(a){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.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:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new ND(c);return d.__drColorMappingBy=h,d}}}function kf(t,e){var i=t.get(e);return FD(i)&&i.length?{name:e,range:i}:null}function Lf(t,e,i,n,r,o){var s=a({},e);if(r){var l=r.type,u="color"===l&&r.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=r.mapValueToVisual(h)}return s}function Pf(t,e,i,n){var r,o;if(!t.isRemoved()){var a=t.getLayout();r=a.width,o=a.height;var s=t.getModel(),l=s.get(YD),u=s.get(jD)/2,h=Wf(s),c=Math.max(l,h),d=l-u,f=c-u,s=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),r=GD(r-2*d,0),o=GD(o-d-f,0);var p=r*o,g=Of(t,s,p,e,i,n);if(g.length){var v={x:d,y:f,width:r,height:o},m=ZD(r,o),y=1/0,_=[];_.area=0;for(var x=0,w=g.length;w>x;){var b=g[x];_.push(b),_.area+=b.getLayout().area;var M=Nf(_,m,e.squareRatio);y>=M?(x++,y=M):(_.area-=_.pop().getLayout().area,Bf(_,m,v,u,!1),m=ZD(v.width,v.height),_.length=_.area=0,y=1/0)}if(_.length&&Bf(_,m,v,u,!0),!i){var S=s.get("childrenVisibleMin");null!=S&&S>p&&(i=!0)}for(var x=0,w=g.length;w>x;x++)Pf(g[x],e,i,n+1)}}}function Of(t,e,i,n,r,o){var a=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(r&&!l)return t.viewChildren=[];a=v(a,function(t){return!t.isRemoved()}),zf(a,s);var u=Ef(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=Rf(e,i,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var h=0,c=a.length;c>h;h++){var d=a[h].getValue()/u.sum*i;a[h].setLayout({area:d})}return l&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}function Rf(t,e,i,n,r){if(!n)return i;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===n?a-l-1:l].getValue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?r.splice(0,a-s):r.splice(s,a-s),i}function zf(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function Ef(t,e,i){for(var n=0,r=0,o=e.length;o>r;r++)n+=e[r].getValue();var a,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&a.reverse();else{var a=[1/0,-1/0];XD(e,function(t){var e=t.getValue(s);e<a[0]&&(a[0]=e),e>a[1]&&(a[1]=e)})}else a=[0/0,0/0];return{sum:n,dataExtent:a}}function Nf(t,e,i){for(var n,r=0,o=1/0,a=0,s=t.length;s>a;a++)n=t[a].getLayout().area,n&&(o>n&&(o=n),n>r&&(r=n));var l=t.area*t.area,u=e*e*i;return l?GD(u*r/l,l/(u*o)):1/0}function Bf(t,e,i,n,r){var o=e===i.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(r||h>i[l[a]])&&(h=i[l[a]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,v=p[l[a]]=GD(h-2*n,0),m=i[s[o]]+i[l[o]]-u,y=c===d-1||g>m?m:g,_=p[l[o]]=GD(y-2*n,0);p[s[a]]=i[s[a]]+ZD(n,v/2),p[s[o]]=u+ZD(n,_/2),u+=y,f.setLayout(p,!0)}i[s[a]]+=h,i[l[a]]-=h}function Vf(t,e,i,n,r){var o=(e||{}).node,a=[n,r];if(!o||o===i)return a;for(var s,l=n*r,u=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getValue();var p=o.getValue();if(0===p)return a;u*=h/p;var g=s.getModel(),v=g.get(YD),m=Math.max(v,Wf(g,v));u+=4*v*v+(3*v+m)*Math.pow(u,.5),u>hS&&(u=hS),o=s}l>u&&(u=l);var y=Math.pow(u/l,.5);return[n*y,r*y]}function Ff(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var r=i.node,o=r.getLayout();if(!o)return n;for(var a=[o.width/2,o.height/2],s=r;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:t.width/2-a[0],y:t.height/2-a[1]}}function Hf(t,e,i,n,r){var o=t.getLayout(),a=i[r],s=a&&a===t;if(!(a&&!s||r===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new wi(e.x-o.x,e.y-o.y,e.width,e.height);XD(t.viewChildren||[],function(t){Hf(t,l,i,n,r+1)})}}function Wf(t){return t.get(qD)?t.get(KD):0}function Gf(t){var e=0;f(t.children,function(t){Gf(t);var i=t.value;x(i)&&(i=i[0]),e+=i});var i=t.value;x(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),x(t.value)?t.value[0]=i:t.value=i}function Zf(t,e,i){function n(){a.ignore=a.hoverIgnore}function r(){a.ignore=a.normalIgnore}rw.call(this);var o=new bM({z2:QD});o.seriesIndex=e.seriesIndex;var a=new yM({z2:tk,silent:t.getModel("label").get("silent")});this.add(o),this.add(a),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",r).on("mouseover",n).on("mouseout",r)}function Uf(t,e,i){var n=t.getVisual("color"),r=t.getVisual("visualMeta");r&&0!==r.length||(n=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var a=i.option.color.length;return o=i.option.color[Xf(t)%a]}function Xf(t){for(var e=t;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return u(i.children,e)}function Yf(t,e,i){return i===JD.NONE?!1:i===JD.SELF?t===e:i===JD.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function jf(t,e,i){var n=e.getData();n.setItemVisual(t.dataIndex,"color",i)}function qf(t,e){var i=t.children||[];t.children=Kf(i,e),i.length&&f(t.children,function(t){qf(t,e)})}function Kf(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 $f(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),o([i,t[0],t[1]])}))}function Jf(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Qf(t){return"_"+t+"Type"}function tp(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){x(o)||(o=[o,o]);var a=Eh(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function ep(t){var e=new fk({name:"line",subPixelOptimize:!0});return ip(e.shape,t),e}function ip(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function np(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),h=Y([],u,l);if(te(h,h),e){e.attr("position",l);var c=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",u);var c=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*r;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var v=s/2,c=a.tangentAt(v),m=[c[1],-c[0]],y=a.pointAt(v);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),d=[y[0]+m[0]*g,y[1]+m[1]*g],f="center",p="bottom";var _=-Math.atan2(c[1],c[0]);u[0]<l[0]&&(_=Math.PI+_),n.attr("rotation",_)}else d=[-h[0]*g+l[0],-h[1]*g+l[1]],f=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[r,r]})}}}}function rp(t,e,i){rw.call(this),this._createLine(t,e,i)}function op(t){this._ctor=t||rp,this.group=new rw}function ap(t,e,i,n){var r=e.getItemLayout(i);if(hp(r)){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function sp(t,e,i,n,r,o){var a=e.getItemGraphicEl(n);return hp(i.getItemLayout(r))?(a?a.updateData(i,r,o):a=new t._ctor(i,r,o),i.setItemGraphicEl(r,a),void t.group.add(a)):void t.group.remove(a)}function lp(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 up(t){return isNaN(t[0])||isNaN(t[1])}function hp(t){return!up(t[0])&&!up(t[1])}function cp(t,e,i){rw.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function dp(t,e,i){rw.call(this),this._createPolyline(t,e,i)}function fp(t,e,i){cp.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function pp(){this.group=new rw}function gp(t){return t instanceof Array||(t=[t,t]),t}function vp(t,e){rw.call(this);var i=new TM,n=new AM,r=new yM;this.add(i),this.add(n),this.add(r),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,r.ignore=r.hoverIgnore):(n.ignore=n.normalIgnore,r.ignore=r.normalIgnore)},this.updateData(t,e,!0)}function mp(t,e){return Va(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function yp(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),r=[],o="ascending"===e,a=0,s=t.count();s>a;a++)r[a]=a;return"function"==typeof e?r.sort(e):"none"!==e&&r.sort(function(t,e){return o?n[t]-n[e]:n[e]-n[t]}),r}function _p(t){t.each(function(e){var i,n,r,o,a=t.getItemModel(e),s=a.getModel("label"),l=s.get("position"),u=a.getModel("labelLine"),h=t.getItemLayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(d)"insideLeft"===l?(n=(c[0][0]+c[3][0])/2+5,r=(c[0][1]+c[3][1])/2,i="left"):"insideRight"===l?(n=(c[1][0]+c[2][0])/2-5,r=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,r=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),o=[[n,r],[n,r]];else{var f,p,g,v=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-v,n=g-5,i="right"):"right"===l?(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+v,n=g+5,i="left"):"rightTop"===l?(f=c[1][0],p=c[1][1],g=f+v,n=g+5,i="top"):"rightBottom"===l?(f=c[2][0],p=c[2][1],g=f+v,n=g+5,i="bottom"):"leftTop"===l?(f=c[0][0],p=c[1][1],g=f-v,n=g-5,i="right"):"leftBottom"===l?(f=c[3][0],p=c[2][1],g=f-v,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+v,n=g+5,i="left");var m=p;o=[[f,p],[g,m]],r=m}h.label={linePoints:o,x:n,y:r,verticalAlign:"middle",textAlign:i,inside:d}})}function xp(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function wp(t,e){return e.dim+t.model.componentIndex}function bp(t,e){var i={},n=Mp(v(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(),r=t.coordinateSystem,o=r.getBaseAxis(),a=wp(r,o),s=xp(t),l=n[a][s],u=l.offset,h=l.width,c=r.getOtherAxis(o),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var v=e.mapDimension(c.dim),m=e.mapDimension(o.dim),y=Qu(e,v),_=c.getExtent()[0],x=0,w=e.count();w>x;x++){var b=e.get(v,x),M=e.get(m,x);if(!isNaN(b)){var S=b>=0?"p":"n",I=_;y&&(i[s][M]||(i[s][M]={p:_,n:_}),I=i[s][M][S]);var T,A,C,D;if("radius"===c.dim){var k=c.dataToRadius(b)-_,L=o.dataToAngle(M);Math.abs(k)<p&&(k=(0>k?-1:1)*p),T=I,A=I+k,C=L-u,D=C-h,y&&(i[s][M][S]=A)}else{var P=c.dataToAngle(b,!0)-_,O=o.dataToRadius(M);Math.abs(P)<g&&(P=(0>P?-1:1)*g),T=O+u,A=T+h,C=I,D=I+P,y&&(i[s][M][S]=D)}e.setItemLayout(x,{cx:d,cy:f,r0:T,r:A,startAngle:-C*Math.PI/180,endAngle:-D*Math.PI/180})}}}},this)}function Mp(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),o=wp(n,r),a=r.getExtent(),s="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/i.count(),l=e[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=xp(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=ha(t.get("barWidth"),s),d=ha(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,o=ha(t.categoryGap,r),a=ha(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+a)}),h&&(c-=h.width*a);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+a)})}),i}function Sp(t,e){ZA.call(this,"radius",t,e),this.type="category"}function Ip(t,e){e=e||[0,360],ZA.call(this,"angle",t,e),this.type="category"}function Tp(t,e){return e.type||(e.data?"category":"value")}function Ap(t,e,i){var n=e.get("center"),r=i.getWidth(),o=i.getHeight();t.cx=ha(n[0],r),t.cy=ha(n[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=ha(e.get("radius"),s);a.inverse?a.setExtent(l,0):a.setExtent(0,l)}function Cp(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var r=t.getData();f(r.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(r,th(r,t))}),f(r.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(r,th(r,t))})}}),Th(i.scale,i.model),Th(n.scale,n.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),o=360/i.scale.count();i.inverse?r[1]+=o:r[1]-=o,i.setExtent(r[0],r[1])}}function Dp(t,e){if(t.type=e.get("type"),t.scale=Ah(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function kp(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),r=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:r[0],y2:r[1]}}function Lp(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Pp(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function Op(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Rp(t,e,i,n,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=zp(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==r.seriesIndex&&a(r,l[0]),!n&&t.snap&&o.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,r),i.showTooltip(t,s,u)}}function zp(t,e){var i=e.axis,n=i.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return Bk(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,i);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===i.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);a>=f&&((a>f||d>=0&&0>s)&&(a=f,s=d,r=l,o.length=0),Bk(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function Ep(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Np(t,e,i,n){var r=i.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=jc(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Bp(t,e,i){var n=i.axesInfo=[];Bk(e,function(e,i){var r=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Vp(t,e,i,n){if(Gp(e)||!t.list.length)return void n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Fp(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",o=Fk(n)[r]||{},a=Fk(n)[r]={};Bk(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&Bk(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];f(o,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function Hp(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n
  }}function Wp(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Gp(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Zp(t,e,i){if(!Z_.node){var n=e.getZr();Wk(n).records||(Wk(n).records={}),Up(n,e);var r=Wk(n).records[t]||(Wk(n).records[t]={});r.handler=i}}function Up(t,e){function i(i,n){t.on(i,function(i){var r=qp(e);Gk(Wk(t).records,function(t){t&&n(t,i,r.dispatchAction)}),Xp(r.pendings,e)})}Wk(t).initialized||(Wk(t).initialized=!0,i("click",_(jp,"click")),i("mousemove",_(jp,"mousemove")),i("globalout",Yp))}function Xp(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Yp(t,e,i){t.handler("leave",null,i)}function jp(t,e,i,n){e.handler(t,i,n)}function qp(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function Kp(t,e){if(!Z_.node){var i=e.getZr(),n=(Wk(i).records||{})[t];n&&(Wk(i).records[t]=null)}}function $p(){}function Jp(t,e,i,n){Qp(Uk(i).lastProp,n)||(Uk(i).lastProp=n,e?Go(i,n,t):(i.stopAnimation(),i.attr(n)))}function Qp(t,e){if(M(t)&&M(e)){var i=!0;return f(e,function(e,n){i=i&&Qp(t[n],e)}),!!i}return t===e}function tg(t,e){t[e.get("label.show")?"show":"hide"]()}function eg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function ig(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function ng(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function rg(t,e,i,n,r){var o=i.get("value"),a=ag(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=fS(s.get("padding")||0),u=s.getFont(),h=Hi(a,u),c=r.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),og(c,d,f,n);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:a,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function og(t,e,i,n){var r=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function ag(t,e,i,n,r){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:kh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),b(a)?o=a.replace("{value}",o):w(a)&&(o=a(s))}return o}function sg(t,e,i){var n=Ce();return Oe(n,n,i.rotation),Pe(n,n,i.position),Xo([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function lg(t,e,i,n,r,o){var a=mC.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),rg(e,n,r,o,{position:sg(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function ug(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function hg(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function cg(t,e,i,n,r,o){return{cx:t,cy:e,r0:i,r:n,startAngle:r,endAngle:o,clockwise:!0}}function dg(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function fg(t){return"x"===t.dim?0:1}function pg(t,e,i,n,r){var o=e.axis,a=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=Ce();Oe(d,d,s),Pe(d,d,[n.cx,n.cy]),l=Xo([a,-r],d);var f=e.getModel("axisLabel").get("rotate")||0,p=mC.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+r,a]);var v=n.cx,m=n.cy;u=Math.abs(l[0]-v)/g<.3?"center":l[0]>v?"left":"right",h=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function gg(){Dx.call(this)}function vg(t){this.name=t,this.zoomLimit,Dx.call(this),this._roamTransformable=new gg,this._rawTransformable=new gg,this._center,this._zoom}function mg(t,e,i,n){var r=i.seriesModel,o=r?r.coordinateSystem:null;return o===this?o[t](n):null}function yg(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function _g(t,e){var i,n,r=t.svgXML;try{i=r&&zl(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=i.root,O(null!=n)}catch(o){throw new Error("Invalid svg format\n"+o.message)}var a=i.width,s=i.height,l=i.viewBoxRect;if(e||(e=null==a||null==s?n.getBoundingRect():new wi(0,0,0,0),null!=a&&(e.width=a),null!=s&&(e.height=s)),l){var u=Rl(l,e.width,e.height),h=n;n=new rw,n.add(h),h.scale=u.scale,h.position=u.position}return n.setClipPath(new kM({shape:e.plain()})),{root:n,boundingRect:e}}function xg(t){return function(e,i){var n=wg(e),r=[];return f(n,function(n){var o=pL[n.type][t];o&&r.push(o(e,n,i))}),r}}function wg(t){var e=KI.retrieveMap(t)||[];return e}function bg(t,e,i,n){vg.call(this,t),this.map=e;var r=gL.load(e,i);this._nameCoordMap=r.nameCoordMap,this._regionsMap=r.regionsMap,this._invertLongitute=null==n?!0:n,this.regions=r.regions,this._rect=r.boundingRect}function Mg(t,e,i,n){var r=i.geoModel,o=i.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return a===this?a[t](n):null}function Sg(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],r=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(r[0])||isNaN(r[1])||this.setBoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1])}var o,a=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=a.width/a.height*this.aspectScale,d=!1;s&&l&&(s=[ha(s[0],u),ha(s[1],h)],l=ha(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));var f;if(d){var f={};c>1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getBoxLayoutParams(),o.aspect=c,f=Va(o,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Ig(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Tg(t,e,i){var n=t.target,r=n.position;r[0]+=e,r[1]+=i,n.dirty()}function Ag(t,e,i,n){var r=t.target,o=t.zoomLimit,a=r.position,s=r.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,a[0]-=(i-a[0])*(c-1),a[1]-=(n-a[1])*(c-1),s[0]*=c,s[1]*=c,r.dirty()}function Cg(t,e,i){var n=e.getComponentByElement(t.topTarget),r=n&&n.coordinateSystem;return n&&n!==i&&!yL[n.mainType]&&r&&r.model!==i}function Dg(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function kg(t,e,i,n,r){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(o){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var a=o.target;!a.__regions;)a=a.parent;if(a){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:p(a.__regions,function(t){return{name:t.name,from:r.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Lg(e,i)}}}))}function Lg(t,e){e.eachChild(function(e){f(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function Pg(t,e){var i=new rw;this.uid=oa("ec_map_draw"),this._controller=new Jd(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new rw),i.add(this._backgroundGroup=new rw)}function Og(t,e,i){var n=t.getZoom(),r=t.getCenter(),o=e.zoom,a=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy){a[0]-=e.dx,a[1]-=e.dy;var r=t.pointToData(a);t.setCenter(r)}if(null!=o){if(i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(n*o,l),s)/n}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originX-u[0])*(o-1),c=(e.originY-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updateTransform();var r=t.pointToData(a);t.setCenter(r),t.setZoom(o*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function Rg(t,e){e.update="updateView",gu(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var r=i.coordinateSystem;f(r.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function zg(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Eg(t,e){var i=[];return t.eachComponent("singleAxis",function(n,r){var o=new zg(n,t,e);o.name="single_"+r,o.resize(n,e),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i}function Ng(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,r={},o=n.position,a=n.orient,s=i.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]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];var h={horizontal:0,vertical:1};r.rotation=Math.PI/2*h[a];var c={top:-1,bottom:1,right:1,left:-1};r.labelDirection=r.tickDirection=r.nameDirection=c[o],t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),C(e.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),r.labelRotation="top"===o?-d:d,r.z2=1,r}function Bg(t,e){return e.type||(e.data?"category":"value")}function Vg(t){return t.isHorizontal()?0:1}function Fg(t,e){var i=t.getRect();return[i[IL[e]],i[IL[e]]+i[TL[e]]]}function Hg(t){this._model=t}function Wg(t,e,i,n){var r=i.calendarModel,o=i.seriesModel,a=r?r.coordinateSystem:o?o.coordinateSystem:null;return a===this?a[t](n):null}function Gg(t,e){var i=t.cellSize;x(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return Ha(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Wa(t,e,{type:"box",ignoreSize:n})}function Zg(t,e,i){var n,r={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var a=i.getData();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:r}:{name:e.name,selected:r}}function Ug(t,e,i){var n=e.getBoxLayoutParams(),r=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},a=Va(n,o,r);MS(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Fa(t,n,o,r)}function Xg(t,e){var i=fS(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new kM({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function Yg(t,e,i,n,r,o){var a;return"line"!==e&&e.indexOf("empty")<0?(a=i.getItemStyle(),t.style.stroke=n,o||(a.stroke=r)):a=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(a)}function jg(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function qg(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Kg(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function $g(t,e,i){var n=t.getOrient(),r=[1,1];r[n.index]=0,Wa(e,i,{type:"box",ignoreSize:r})}function Jg(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(jL,function(t){return t+"transition:"+i}).join(";")}function Qg(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),XL(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function tv(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(Jg(i)),n&&(Z_.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+Qe(n)),e.push("filter:alpha(opacity=70)"))),XL(["width","color","radius"],function(i){var n="border-"+i,r=YL(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(Qg(r)),null!=o&&e.push("padding:"+fS(o).join("px ")+"px"),e.join(";")+";"}function ev(t,e){if(Z_.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!r._enterable){var i=n.handler;ye(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function iv(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function nv(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(ia.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new ia(i,e,e.ecModel))}return e}function rv(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function ov(t,e,i,n,r,o,a){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}function av(t,e,i,n,r){var o=i.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,n)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function sv(t,e,i){var n=i[0],r=i[1],o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+u+o;break;case"left":a=e.x-n-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function lv(t){return"center"===t||"middle"===t}function uv(t){Wn(t,"label",["show"])}function hv(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function cv(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function dv(t,e,i,n,r,o){var a=[],s=Qu(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=yv(e,l,t),h=e.indicesOfNearest(l,u)[0];a[r]=e.get(i,h),a[o]=e.get(n,h);var c=fa(e.get(n,h));return c=Math.min(c,20),c>=0&&(a[o]=+a[o].toFixed(c)),a}function fv(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!cv(e)&&!x(e.coord)&&r){var o=r.dimensions,a=pv(e,i,r,t);if(e=n(e),e.type&&oP[e.type]&&a.baseAxis&&a.valueAxis){var s=nP(o,a.baseAxis.dim),l=nP(o,a.valueAxis.dim);e.coord=oP[e.type](i,a.baseDataDim,a.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;2>h;h++)oP[u[h]]&&(u[h]=yv(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function pv(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(gv(n,r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function gv(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;r<n.length;r++){var o=i.getDimensionInfo(n[r]);if(o.name===e)return o.coordDim}}function vv(t,e){return t&&t.containData&&e.coord&&!hv(e)?t.containData(e.coord):!0}function mv(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function yv(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t){isNaN(t)||(n+=t,r++)}),n/r}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function _v(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),s=ha(a.get("x"),i.getWidth()),l=ha(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var u=t.get(n.dimensions[0],r),h=t.get(n.dimensions[1],r);o=n.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)})}function xv(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var r=new KT(n,i),o=p(i.get("data"),_(fv,e));return t&&(o=v(o,_(vv,t))),r.initData(o,null,t?mv:function(t){return t.value}),r}function wv(t){return!isNaN(t)&&!isFinite(t)}function bv(t,e,i,n){var r=1-t,o=n.dimensions[t];return wv(e[r])&&wv(i[r])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function Mv(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(bv(1,i,n,t)||bv(0,i,n,t)))return!0}return vv(t,e[0])&&vv(t,e[1])}function Sv(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=ha(s.get("x"),r.getWidth()),u=ha(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=a.dataToPoint([c,d])}if("cartesian2d"===a.type){var f=a.getAxis("x"),p=a.getAxis("y"),h=a.dimensions;wv(t.get(h[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):wv(t.get(h[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}function Iv(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var r=new KT(n,i),o=new KT(n,i),a=new KT([],i),l=p(i.get("data"),_(sP,e,t,i));t&&(l=v(l,_(Mv,t)));var u=t?mv:function(t){return t.value};return r.initData(p(l,function(t){return t[0]}),null,u),o.initData(p(l,function(t){return t[1]}),null,u),a.initData(p(l,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}function Tv(t){return!isNaN(t)&&!isFinite(t)}function Av(t,e,i){var n=1-t;return Tv(e[n])&&Tv(i[n])}function Cv(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(Av(1,i,n,t)||Av(0,i,n,t))?!0:vv(t,{coord:i,x:e.x0,y:e.y0})||vv(t,{coord:n,x:e.x1,y:e.y1})}function Dv(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=ha(s.get(i[0]),r.getWidth()),u=ha(s.get(i[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];a.clampData&&a.clampData(d,d),o=a.dataToPoint(d,!0)}if("cartesian2d"===a.type){var f=a.getAxis("x"),p=a.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);Tv(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):Tv(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}function kv(t,e,i){var n,r,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),r=new KT(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],r=new KT(n,i));var a=p(i.get("data"),_(lP,e,t,i));t&&(a=v(a,_(Cv,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return r.initData(a,null,l),r.hasItemOption=!0,r}function Lv(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),Pv(t),Ov(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});Ov(n,"position")||(n.position=t.controlPosition),"none"!==n.position||Ov(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){M(t)&&!x(t)&&(!Ov(t,"value")&&Ov(t,"name")&&(t.value=t.name),Pv(t))})}function Pv(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},r=n.normal||(n.normal={}),o={normal:1,emphasis:1};f(n,function(t,e){o[e]||Ov(r,e)||(r[e]=t)}),i.label&&!Ov(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function Ov(t,e){return t.hasOwnProperty(e)}function Rv(t,e){return Va(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function zv(t,e,i,r){var o=so(t.get(e).replace(/^path:\/\//,""),n(r||{}),new wi(i[0],i[1],i[2],i[3]),"center");return o}function Ev(t,e,i,n,o,a){var s=e.get("color");if(o)o.setColor(s),i.add(o),a&&a.onUpdate(o);else{var l=t.get("symbol");o=Eh(l,-1,-1,2,2,s),o.setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o)}var u=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(u),n=r({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=ha(c[0],h[0]),d[1]+=ha(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function Nv(t,e,i,n,r){if(!t.dragging){var o=n.getModel("checkpointStyle"),a=i.dataToCoord(n.getData().get(["value"],e));r||!o.get("animation",!0)?t.attr({position:[a,0]}):(t.stopAnimation(!0),t.animateTo({position:[a,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}function Bv(t){return u(_P,t)>=0}function Vv(t,e){t=t.slice();var i=p(t,Ra);e=(e||[]).slice();var n=p(e,Ra);return function(r,o){f(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l<e.length;l++)s[e[l]]=t+n[l];r.call(o,s)})}}function Fv(t,e,i){function n(t,e){return u(e.nodes,t)>=0}function r(t,n){var r=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function a(t){!n(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(a);while(l);return s}}function Hv(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function Wv(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function Gv(t,e,i){var n=[1/0,-1/0];return bP(i,function(t){var i=t.getData();i&&bP(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[0/0,0/0]),Zv(t,n),n}function Zv(t,e){var i=t.getAxisModel(),n=i.getMin(!0),r="category"===i.get("type"),o=r&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:r&&(e[0]=o>0?0:0/0);var a=i.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Uv(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=ga(r,[0,500]);o=Math.min(o,20);var a=e||0===n[0]&&100===n[1];i.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function Xv(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;bP(["min","max"],function(r){var o=i.get(r+"Span"),a=i.get(r+"ValueSpan");null!=a&&(a=t.getAxisModel().axis.scale.parse(a)),null!=a?o=ua(n[0]+a,n,[0,100],!0):null!=o&&(a=ua(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=a})}function Yv(t){var e={};return IP(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function jv(t,e){var i=t._rangePropMode,n=t.get("rangeMode");IP([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?i[r]="percent":!o&&a?i[r]="value":n?i[r]=n[r]:o&&(i[r]="percent")})}function qv(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Kv(t){return"vertical"===t?"ns-resize":"ew-resize"}function $v(t,e){var i=tm(t),n=e.dataZoomId,r=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,r)<0&&(delete i[n],t.count--)}),im(i);var o=i[r];o||(o=i[r]={coordId:r,dataZoomInfos:{},count:0},o.controller=em(t,o),o.dispatchAction=_(nm,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var a=rm(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(e.containsPoint),ll(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Jv(t,e){var i=tm(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),im(i)}function Qv(t){return t.type+"\x00_"+t.id}function tm(t){var e=t.getZr();return e[WP]||(e[WP]={})}function em(t,e){var i=new Jd(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var o=(r.getRange||{})[t],a=o&&o(e.controller,i);!r.dataZoomModel.get("disabled",!0)&&a&&n.push({dataZoomId:r.dataZoomId,start:a[0],end:a[1]})}}),n.length&&e.dispatchAction(n)})}),i}function im(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function nm(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function rm(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return f(t,function(t){var o=t.dataZoomModel,a=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[i+a]>n[i+e]&&(e=a),r&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function om(t){return function(e,i,n,r){var o=this._range,a=o.slice(),s=e.axisModels[0];if(s){var l=t(a,s,e,i,n,r);return wP(l,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function am(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function sm(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function lm(t,e,i){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return qP(e,function(e){var a=o[e]=r();qP(t[e],function(t,r){if(ND.isValidType(r)){var o={type:r,visual:t};i&&i(o,e),a[r]=new ND(o),"opacity"===r&&(o=n(o),o.type="colorAlpha",a.__hidden.__alphaForOpacity=new ND(o))}})}),o}function um(t,e,i){var r;f(i,function(t){e.hasOwnProperty(t)&&sm(e[t])&&(r=!0)}),r&&f(i,function(i){e.hasOwnProperty(i)&&sm(e[i])?t[i]=n(e[i]):delete t[i]})}function hm(t,e,i,n,r,o){function a(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(r,t),f=e[d],p=u[d],g=0,v=p.length;v>g;g++){var m=p[g];f[m]&&f[m].applyVisual(t,a,s)}}var u={};f(t,function(t){var i=ND.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function cm(t,e,i,n){function r(t,r){function a(t){return r.getItemVisual(l,t)}function s(t,e){r.setItemVisual(l,t,e)}null!=n&&(n=r.getDimension(n));for(var l;null!=(l=t.next());){var u=r.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?r.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var v=f[p];d[v]&&d[v].applyVisual(h,a,s)}}}var o={};return f(t,function(t){var i=ND.prepareVisualTypes(e[t]);o[t]=i}),{progress:r}}function dm(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var r=n.range,o=e[t];return fm(o,r)}},rect:function(n,r,o){if(n){var a=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),fm(s[0],a)||fm(s[1],a)||fm(a[0],s)||fm(a[1],s)}}}}function fm(t,e){return e[0]<=t&&t<=e[1]}function pm(t){return t=mm(t),function(e){return qo(e,t)}}function gm(t,e){return t=mm(t),function(i){var n=null!=e?e:i,r=n?t.width:t.height,o=n?t.x:t.y;return[o,o+(r||0)]}}function vm(t,e,i){return t=mm(t),function(n,r){return t.contain(r[0],r[1])&&!Cg(n,e,i)}}function mm(t){return wi.create(t)}function ym(t,e,i){var n=this._targetInfoList=[],r={},o=xm(e,t);$P(nO,function(t,e){(!i||!i.include||JP(i.include,e)>=0)&&t(o,n,r)})}function _m(t){return t[0]>t[1]&&t.reverse(),t}function xm(t,e){return Jn(t,e,{includeMainTypes:eO})}function wm(t,e,i,n){var r=i.getAxis(["x","y"][t]),o=_m(p([0,1],function(t){return e?r.coordToData(r.toLocalCoord(n[t])):r.toGlobalCoord(r.dataToCoord(n[t]))})),a=[];return a[t]=o,a[1-t]=[0/0,0/0],{values:o,xyMinMax:a}}function bm(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Mm(t,e){var i=Sm(t),n=Sm(e),r=[i[0]/n[0],i[1]/n[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function Sm(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Im(t,e,i,n,r){if(r){var o=t.getZr();if(!o[hO]){o[uO]||(o[uO]=Tm);var a=ll(o,uO,i,e);a(t,n)}}}function Tm(t,e){if(!t.isDisposed()){var i=t.getZr();i[hO]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[hO]=!1}}function Am(t,e,i,n){for(var r=0,o=e.length;o>r;r++){var a=e[r];if(t[a.brushType](n,i,a.selectors,a))return!0}}function Cm(t){var e=t.brushSelector;if(b(e)){var i=[];return f(KP,function(t,n){i[n]=function(i,n,r,o){var a=n.getItemLayout(i);return t[e](a,r,o)}}),i}if(w(e)){var n={};return f(KP,function(t,i){n[i]=e}),n}return e}function Dm(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(x(i)?u(i,e)<0:e!==i)}function km(t){var e=t.selectors={};return f(KP[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function Lm(t){return new wi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Pm(t,e){return r({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ia(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Om(t){dx.call(this),this._zr=t,this.group=new rw,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+AO++,this._handlers={},gO(CO,function(t,e){this._handlers[e]=y(t,this)},this)}function Rm(t,e){var i=t._zr;t._enableGlobalPan||jd(i,MO,t._uid),gO(t._handlers,function(t,e){i.on(e,t)}),t._brushType=e.brushType,t._brushOption=r(n(TO),e,!0)}function zm(t){var e=t._zr;qd(e,MO,t._uid),gO(t._handlers,function(t,i){e.off(i,t)}),t._brushType=t._brushOption=null}function Em(t,e){var i=DO[e.brushType].createCover(t,e);return i.__brushOption=e,Vm(i,e),t.group.add(i),i}function Nm(t,e){var i=Hm(e);return i.endCreating&&(i.endCreating(t,e),Vm(e,e.__brushOption)),e}function Bm(t,e){var i=e.__brushOption;Hm(e).updateCoverShape(t,e,i.range,i)}function Vm(t,e){var i=e.z;null==i&&(i=xO),t.traverse(function(t){t.z=i,t.z2=i})}function Fm(t,e){Hm(e).updateCommon(t,e),Bm(t,e)}function Hm(t){return DO[t.__brushOption.brushType]}function Wm(t,e,i){var n=t._panels;if(!n)return!0;var r,o=t._transform;return gO(n,function(t){t.isTargetByCursor(e,i,o)&&(r=t)}),r}function Gm(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null!=n?i[n]:!0}function Zm(t){var e=t._covers,i=e.length;return gO(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function Um(t,e){var i=vO(t._covers,function(t){var e=t.__brushOption,i=n(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Xm(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],o=i[1]-n[1],a=_O(r*r+o*o,.5);return a>wO}function Ym(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function jm(t,e,i,n){var r=new rw;return r.add(new kM({name:"main",style:Jm(i),silent:!0,draggable:!0,cursor:"move",drift:pO(t,e,r,"nswe"),ondragend:pO(Um,e,{isEnd:!0})})),gO(n,function(i){r.add(new kM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pO(t,e,r,i),ondragend:pO(Um,e,{isEnd:!0})}))}),r}function qm(t,e,i,n){var r=n.brushStyle.lineWidth||0,o=yO(r,bO),a=i[0][0],s=i[1][0],l=a-r/2,u=s-r/2,h=i[0][1],c=i[1][1],d=h-o+r/2,f=c-o+r/2,p=h-a,g=c-s,v=p+r,m=g+r;
  $m(t,e,"main",a,s,p,g),n.transformable&&($m(t,e,"w",l,u,o,m),$m(t,e,"e",d,u,o,m),$m(t,e,"n",l,u,v,o),$m(t,e,"s",l,f,v,o),$m(t,e,"nw",l,u,o,o),$m(t,e,"ne",d,u,o,o),$m(t,e,"sw",l,f,o,o),$m(t,e,"se",d,f,o,o))}function Km(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(Jm(i)),r.attr({silent:!n,cursor:n?"move":"default"}),gO(["w","e","n","s","se","sw","ne","nw"],function(i){var r=e.childOfName(i),o=ey(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?IO[o]+"-resize":null})})}function $m(t,e,i,n,r,o,a){var s=e.childOfName(i);s&&s.setShape(ay(oy(t,e,[[n,r],[n+o,r+a]])))}function Jm(t){return s({strokeNoScale:!0},t.brushStyle)}function Qm(t,e,i,n){var r=[mO(t,i),mO(e,n)],o=[yO(t,i),yO(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function ty(t){return Uo(t.group)}function ey(t,e){if(e.length>1){e=e.split("");var i=[ey(t,e[0]),ey(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},r={left:"w",right:"e",top:"n",bottom:"s"},i=Yo(n[e],ty(t));return r[i]}function iy(t,e,i,n,r,o,a){var s=n.__brushOption,l=t(s.range),u=ry(i,o,a);gO(r.split(""),function(t){var e=SO[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(Qm(l[0][0],l[1][0],l[0][1],l[1][1])),Fm(i,n),Um(i,{isEnd:!1})}function ny(t,e,i,n){var r=e.__brushOption.range,o=ry(t,i,n);gO(r,function(t){t[0]+=o[0],t[1]+=o[1]}),Fm(t,e),Um(t,{isEnd:!1})}function ry(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function oy(t,e,i){var r=Gm(t,e);return r&&r!==!0?r.clipPath(i,t._transform):n(i)}function ay(t){var e=mO(t[0][0],t[1][0]),i=mO(t[0][1],t[1][1]),n=yO(t[0][0],t[1][0]),r=yO(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:r-i}}function sy(t,e,i){if(t._brushType){var n=t._zr,r=t._covers,o=Wm(t,e,i);if(!t._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(o===!0||s.panelId===o.panelId)&&DO[s.brushType].contain(r[a],i[0],i[1]))return}o&&n.setCursorStyle("crosshair")}}function ly(t){var e=t.event;e.preventDefault&&e.preventDefault()}function uy(t,e,i){return t.childOfName("main").contain(e,i)}function hy(t,e,i,r){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(i.slice()),Xm(t)||a){if(s&&!a){"single"===l.brushMode&&Zm(t);var u=n(l);u.brushType=cy(u.brushType,s),u.panelId=s===!0?null:s.panelId,a=t._creatingCover=Em(t,u),t._covers.push(a)}if(a){var h=DO[cy(t._brushType,s)],c=a.__brushOption;c.range=h.getCreatingRange(oy(t,a,t._track)),r&&(Nm(t,a),h.updateCommon(t,a)),Bm(t,a),o={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&Wm(t,e,i)&&Zm(t)&&(o={isEnd:r,removeOnClick:!0});return o}function cy(t,e){return"auto"===t?e.defaultBrushType:t}function dy(t){if(this._dragging){ly(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),i=hy(this,t,e,!0);this._dragging=!1,this._track=[],this._creatingCover=null,i&&Um(this,i)}}function fy(t){return{createCover:function(e,i){return jm(pO(iy,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=Ym(e),n=mO(i[0][t],i[1][t]),r=yO(i[0][t],i[1][t]);return[n,r]},updateCoverShape:function(e,i,n,r){var o,a=Gm(e,i);if(a!==!0&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),qm(e,i,l,r)},updateCommon:Km,contain:uy}}function py(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function gy(t,e){kO[t]=e}function vy(t){return kO[t]}function my(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function yy(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function _y(t,e,i,n){function r(t){return l[t]}function o(t,e){l[t]=e}for(var a=e.targetVisuals[n],s=ND.prepareVisualTypes(a),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=a["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,r,o)}return l.color}function xy(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,r=(i[1]-i[0])/n,o=i[0],a=[],s=0;n>=s&&o<i[1];s++)a.push(o),o+=r;return a.push(i[1]),a}function wy(t,e,i){var n=t.option,r=n.align;if(null!=r&&"auto"!==r)return r;for(var o={width:e.getWidth(),height:e.getHeight()},a="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[a],u=[0,null,10],h={},c=0;3>c;c++)h[s[1-a][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][a],f=Va(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function by(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function My(t,e,i,n){return new TM({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){yx(t.event)},ondragend:n})}function Sy(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function Iy(t,e,i,n){return t?[[0,-$O(e,JO(i,0))],[tR,0],[0,$O(e,JO(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function Ty(t,e,i){var n=QO/2,r=t.get("hoverLinkDataSize");return r&&(n=qO(r,e,i,!0)/2),n}function Ay(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function Cy(t){return"vertical"===t?"ns-resize":"ew-resize"}function Dy(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function ky(t){return 0===t.indexOf("my")}function Ly(t){this.model=t}function Py(t){this.model=t}function Oy(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Ry(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,r=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),a=[i.model.getCategories()];f(t.series,function(t){a.push(t.getRawData().mapArray(r,function(t){return t}))});for(var s=[o.join(pR)],l=0;l<a[0].length;l++){for(var u=[],h=0;h<a.length;h++)u.push(a[h][l]);s.push(u.join(pR))}e.push(s.join("\n"))}),e.join("\n\n"+fR+"\n\n")}function zy(t){return p(t,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,r=arguments[t-1],o=e.getName(r),a=0;t-1>a;a++)n[a]=arguments[a];i.push((o?o+pR:"")+n.join(pR))}),i.join("\n")}).join("\n\n"+fR+"\n\n")}function Ey(t){var e=Oy(t);return{value:v([Ry(e.seriesGroupByCategoryAxis),zy(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+fR+"\n\n"),meta:e.meta}}function Ny(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function By(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(pR)>=0?!0:void 0}function Vy(t){for(var e=t.split(/\n+/g),i=Ny(e.shift()).split(gR),n=[],r=p(i,function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=Ny(e[o]).split(gR);n.push(a.shift());for(var s=0;s<a.length;s++)r[s]&&(r[s].data[o]=a[s])}return{series:r,categories:n}}function Fy(t){for(var e=t.split(/\n+/g),i=Ny(e.shift()),n=[],r=0;r<e.length;r++){var o,a=Ny(e[r]).split(gR),s="",l=!1;isNaN(a[0])?(l=!0,s=a[0],a=a.slice(1),n[r]={name:s,value:[]},o=n[r].value):o=n[r]=[];for(var u=0;u<a.length;u++)o.push(+a[u]);1===o.length&&(l?n[r].value=o[0]:n[r]=o[0])}return{name:i,data:n}}function Hy(t,e){var i=t.split(new RegExp("\n*"+fR+"\n*","g")),n={series:[]};return f(i,function(t,i){if(By(t)){var r=Vy(t),o=e[i],a=o.axisDim+"Axis";o&&(n[a]=n[a]||[],n[a][o.axisIndex]={data:r.categories},n.series=n.series.concat(r.series))}else{var r=Fy(t);n.series.push(r)}}),n}function Wy(t){this._dom=null,this.model=t}function Gy(t,e){return p(t,function(t,i){var n=e&&e[i];return M(n)&&!x(n)?(M(t)&&!x(t)&&(t=t.value),s({value:t},n)):t})}function Zy(t,e){var i=jy(t);vR(e,function(e,n){for(var r=i.length-1;r>=0;r--){var o=i[r];if(o[n])break}if(0>r){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var s=a.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function Uy(t){var e=jy(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return vR(i,function(t,i){for(var r=e.length-1;r>=0;r--){var t=e[r][i];if(t){n[i]=t;break}}}),n}function Xy(t){t[mR]=null}function Yy(t){return jy(t).length}function jy(t){var e=t[mR];return e||(e=t[mR]=[{}]),e}function qy(t,e,i){(this._brushController=new Om(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function Ky(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function $y(t,e){t.setIconStatus("back",Yy(e)>1?"emphasis":"normal")}function Jy(t,e,i,n,r){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new ym(Ky(t.option),e,{include:["grid"]});i._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(o?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function Qy(t){this.model=t}function t_(t,e,i,n){var r=i.type,o=IR.hasOwnProperty(r)?IR[r]:ao(r),a=new o(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function e_(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){e_(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function i_(t){return t=a({},t),f(["id","parentId","$action","hv","bounding"].concat(wS),function(e){delete t[e]}),t}function n_(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function r_(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function o_(t,e,i){var n=a({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(r(o,n,!0),Wa(o,n,{ignoreSize:!0}),Za(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function a_(t,e){t&&(t.hv=e.hv=[n_(e,["left","right"]),n_(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function s_(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}function l_(t){return AR(t)}function u_(){if(!kR&&LR){kR=!0;var t=LR.styleSheets;t.length<31?LR.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function h_(t){return parseInt(t,10)}function c_(t,e){u_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}function d_(t){return function(){Jx('In IE8.0 VML mode painter not support method "'+t+'"')}}function f_(t){return document.createElementNS(wz,t)}function p_(t){return Iz(1e4*t)/1e4}function g_(t){return Lz>t&&t>-Lz}function v_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Sz}function m_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Sz}function y_(t,e){e&&__(t,"transform","matrix("+Mz.call(e,",")+")")}function __(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function x_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function w_(t,e,i,n){if(v_(e,i)){var r=i?e.textFill:e.fill;r="transparent"===r?Sz:r,__(t,"fill",r),__(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else __(t,"fill",Sz);if(m_(e,i)){var o=i?e.textStroke:e.stroke;o="transparent"===o?Sz:o,__(t,"stroke",o);var a=i?e.textStrokeWidth:e.lineWidth,s=!i&&e.strokeNoScale?n.getLineScale():1;__(t,"stroke-width",a/s),__(t,"paint-order",i?"stroke":"fill"),__(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(__(t,"stroke-dasharray",e.lineDash.join(",")),__(t,"stroke-dashoffset",Iz(e.lineDashOffset||0))):__(t,"stroke-dasharray",""),e.lineCap&&__(t,"stroke-linecap",e.lineCap),e.lineJoin&&__(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&__(t,"stroke-miterlimit",e.miterLimit)}else __(t,"stroke",Sz)}function b_(t){for(var e=[],i=t.data,n=t.len(),r=0;n>r;){var o=i[r++],a="",s=0;switch(o){case bz.M:a="M",s=2;break;case bz.L:a="L",s=2;break;case bz.Q:a="Q",s=4;break;case bz.C:a="C",s=6;break;case bz.A:var l=i[r++],u=i[r++],h=i[r++],c=i[r++],d=i[r++],f=i[r++],p=i[r++],g=i[r++],v=Math.abs(f),m=g_(v-Dz)&&!g_(v),y=!1;y=v>=Dz?!0:g_(v)?!1:(f>-Cz&&0>f||f>Cz)==!!g;var _=p_(l+h*Az(d)),x=p_(u+c*Tz(d));m&&(f=g?Dz-1e-4:-Dz+1e-4,y=!0,9===r&&e.push("M",_,x));var w=p_(l+h*Az(d+f)),b=p_(u+c*Tz(d+f));e.push("A",p_(h),p_(c),Iz(p*kz),+y,+g,w,b);break;case bz.Z:a="Z";break;case bz.R:var w=p_(i[r++]),b=p_(i[r++]),M=p_(i[r++]),S=p_(i[r++]);e.push("M",w,b,"L",w+M,b,"L",w+M,b+S,"L",w,b+S,"L",w,b)}a&&e.push(a);for(var I=0;s>I;I++)e.push(p_(i[r++]))}return e.join(" ")}function M_(t,e){switch(e){case"middle":__(t,"dominant-baseline","middle"),__(t,"alignment-baseline","middle");break;case"bottom":__(t,"dominant-baseline","ideographic"),__(t,"alignment-baseline","ideographic");break;default:__(t,"dominant-baseline","hanging"),__(t,"alignment-baseline","hanging")}}function S_(){}function I_(t,e){for(var i=0,n=e.length,r=0,o=0;n>i;i++){var a=e[i];if(a.removed){for(var s=[],l=o;l<o+a.count;l++)s.push(l);a.indices=s,o+=a.count}else{for(var s=[],l=r;l<r+a.count;l++)s.push(l);a.indices=s,r+=a.count,a.added||(o+=a.count)}}return e}function T_(t){return{newPos:t.newPos,components:t.components.slice(0)}}function A_(t,e,i,n,r){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=r||"_dom",this.nextId=0}function C_(t,e){A_.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function D_(t,e){A_.call(this,t,e,"clipPath","__clippath_in_use__")}function k_(t,e){A_.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function L_(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function P_(t){return parseInt(t,10)}function O_(t){return t instanceof Gr?Pz:t instanceof Sn?Oz:t instanceof yM?Rz:Pz}function R_(t,e){return e&&t&&e.parentNode!==t}function z_(t,e,i){if(R_(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function E_(t,e){if(R_(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function N_(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function B_(t){return t.__textSvgEl}function V_(t){return t.__svgEl}function F_(t){return function(){Jx('In SVG mode painter not support method "'+t+'"')}}var H_=2311,W_=function(){return H_++},G_={};G_="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var Z_=G_,U_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},X_={"[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},Y_=Object.prototype.toString,j_=Array.prototype,q_=j_.forEach,K_=j_.filter,$_=j_.slice,J_=j_.map,Q_=j_.reduce,tx={},ex=function(){return tx.createCanvas()};tx.createCanvas=function(){return document.createElement("canvas")};var ix,nx="__ec_primitive__";N.prototype={constructor:N,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){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var rx=(Object.freeze||Object)({$override:i,clone:n,merge:r,mergeAll:o,extend:a,defaults:s,createCanvas:ex,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:v,find:m,bind:y,curry:_,isArray:x,isFunction:w,isString:b,isObject:M,isBuiltInObject:S,isTypedArray:I,isDom:T,eqNaN:A,retrieve:C,retrieve2:D,retrieve3:k,slice:L,normalizeCssArray:P,assert:O,trim:R,setAsPrimitive:z,isPrimitive:E,createHashMap:B,concatArray:V,noop:F}),ox="undefined"==typeof Float32Array?Array:Float32Array,ax=j,sx=q,lx=ee,ux=ie,hx=(Object.freeze||Object)({create:H,copy:W,clone:G,set:Z,add:U,scaleAndAdd:X,sub:Y,len:j,length:ax,lenSquare:q,lengthSquare:sx,mul:K,div:$,dot:J,scale:Q,normalize:te,distance:ee,dist:lx,distanceSquare:ie,distSquare:ux,negate:ne,lerp:re,applyTransform:oe,min:ae,max:se});le.prototype={constructor:le,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this.dispatchToElement(ue(e,t),"drag",t.event);var a=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(ue(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var cx=Array.prototype.slice,dx=function(t){this._$handlers={},this._$eventProcessor=t};dx.prototype={constructor:dx,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,o=i[t].length;o>r;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>3&&(n=cx.call(n,1));for(var o=e.length,a=0;o>a;){var s=e[a];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))a++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(a,1),o--):a++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>4&&(n=cx.call(n,1,n.length-1));for(var o=n[n.length-1],a=e.length,s=0;a>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),a--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var fx=Math.log(2),px="undefined"!=typeof window&&!!window.addEventListener,gx=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,vx="___zrEVENTSAVED",mx=[],yx=px?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},_x=function(){this._track=[]};_x.prototype={constructor:_x,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,a=n.length;a>o;o++){var s=n[o],l=pe(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in xx)if(xx.hasOwnProperty(e)){var i=xx[e](this._track,t);if(i)return i}}};var xx={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,r=(t[i-2]||{}).points||n;if(r&&r.length>1&&n&&n.length>1){var o=be(n)/be(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=Me(n);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},bx="silent";Te.prototype.dispose=function(){};var Mx=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Sx=function(t,e,i,n){dx.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Te,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};Sx.prototype={constructor:Sx,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(Mx,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,r=n.target;r&&!r.__zr&&(n=this.findHover(n.x,n.y),r=n.target);var o=this._hovered=this.findHover(e,i),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==r&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do i=i&&i.parentNode;while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.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,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var r="on"+e,o=Se(e,t,i);n&&(n[r]&&(o.cancelBubble=n[r].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},o=n.length-1;o>=0;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=Ae(n[o],t,e))&&(!r.topTarget&&(r.topTarget=n[o]),a!==bx)){r.target=n[o];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new _x);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Sx.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lx(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(Sx,dx),c(Sx,le);var Ix="undefined"==typeof Float32Array?Array:Float32Array,Tx=(Object.freeze||Object)({create:Ce,identity:De,copy:ke,mul:Le,translate:Pe,rotate:Oe,scale:Re,invert:ze,clone:Ee}),Ax=De,Cx=5e-5,Dx=function(t){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},kx=Dx.prototype;kx.transform=null,kx.needLocalTransform=function(){return Ne(this.rotation)||Ne(this.position[0])||Ne(this.position[1])||Ne(this.scale[0]-1)||Ne(this.scale[1]-1)};var Lx=[];kx.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&Ax(n));n=n||Ce(),i?this.getLocalTransform(n):Ax(n),e&&(i?Le(n,t.transform,n):ke(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(Lx);var o=Lx[0]<0?-1:1,a=Lx[1]<0?-1:1,s=((Lx[0]-o)*r+o)/Lx[0]||0,l=((Lx[1]-a)*r+a)/Lx[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Ce(),ze(this.invTransform,n)},kx.getLocalTransform=function(t){return Dx.getLocalTransform(this,t)},kx.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},kx.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Px=[],Ox=Ce();kx.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;Ne(e-1)&&(e=Math.sqrt(e)),Ne(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},kx.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Le(Px,t.invTransform,e),e=Px);var i=this.origin;i&&(i[0]||i[1])&&(Ox[4]=i[0],Ox[5]=i[1],Le(Px,e,Ox),Px[4]-=i[0],Px[5]-=i[1],e=Px),this.setLocalTransform(e)}},kx.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):(t[0]=1,t[1]=1,t)},kx.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe(i,i,n),i},kx.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},Dx.getLocalTransform=function(t,e){e=e||[],Ax(e);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Re(e,e,n),r&&Oe(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var Rx={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*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Rx.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*Rx.bounceIn(2*t):.5*Rx.bounceOut(2*t-1)+.5}};Be.prototype={constructor:Be,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?Rx[n]:n,o="function"==typeof r?r(i):i;return this.fire("frame",o),1===i?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){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var zx=function(){this.head=null,this.tail=null,this._len=0},Ex=zx.prototype;Ex.insert=function(t){var e=new Nx(t);return this.insertEntry(e),e},Ex.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ex.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ex.len=function(){return this._len},Ex.clear=function(){this.head=this.tail=null,this._len=0};var Nx=function(t){this.value=t,this.next,this.prev},Bx=function(t){this._list=new zx,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Vx=Bx.prototype;Vx.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Nx(e),a.key=t,i.insertEntry(a),n[t]=a}return r},Vx.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},Vx.clear=function(){this._list.clear(),this._map={}};var Fx={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]},Hx=new Bx(20),Wx=null,Gx=ti,Zx=ei,Ux=(Object.freeze||Object)({parse:qe,lift:Je,toHex:Qe,fastLerp:ti,fastMapToColor:Gx,lerp:ei,mapToColor:Zx,modifyHSL:ii,modifyAlpha:ni,stringify:ri}),Xx=Array.prototype.slice,Yx=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||oi,this._setter=n||ai,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]
  };Yx.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:pi(r)})}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,i=0;e>i;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,o=function(){r--,r||n._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=mi(this,t,o,this._tracks[a],a,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.removeClip(r)}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 jx=1;"undefined"!=typeof window&&(jx=Math.max(window.devicePixelRatio||1,1));var qx=0,Kx=jx,$x=function(){};1===qx&&($x=console.error);var Jx=$x,Qx=function(){this.animators=[]};Qx.prototype={constructor:Qx,animate:function(t,e){var i,n=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;n="shape"===a[0];for(var l=0,h=a.length;h>l;l++)s&&(s=s[a[l]]);s&&(i=s)}else i=r;if(!i)return void Jx('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Yx(i,e);return d.during(function(){r.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,o){yi(this,t,e,i,n,r,o)},animateFrom:function(t,e,i,n,r,o){yi(this,t,e,i,n,r,o,!0)}};var tw=function(t){Dx.call(this,t),dx.call(this,t),Qx.call(this,t),this.id=t.id||W_()};tw.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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else 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(M(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);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,t.__zr=e,t.__clipTarget=this,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 i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},c(tw,Qx),c(tw,Dx),c(tw,dx);var ew=oe,iw=Math.min,nw=Math.max;wi.prototype={constructor:wi,union:function(t){var e=iw(t.x,this.x),i=iw(t.y,this.y);this.width=nw(t.x+t.width,this.x+this.width)-e,this.height=nw(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:function(){var t=[],e=[],i=[],n=[];return function(r){if(r){t[0]=i[0]=this.x,t[1]=n[1]=this.y,e[0]=n[0]=this.x+this.width,e[1]=i[1]=this.y+this.height,ew(t,t,r),ew(e,e,r),ew(i,i,r),ew(n,n,r),this.x=iw(t[0],e[0],i[0],n[0]),this.y=iw(t[1],e[1],i[1],n[1]);var o=nw(t[0],e[0],i[0],n[0]),a=nw(t[1],e[1],i[1],n[1]);this.width=o-this.x,this.height=a-this.y}}}(),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=Ce();return Pe(r,r,[-e.x,-e.y]),Re(r,r,[i,n]),Pe(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof wi||(t=wi.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,o=e.y+e.height,a=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(a>n||i>s||l>o||r>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new wi(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}}},wi.create=function(t){return new wi(t.x,t.y,t.width,t.height)};var rw=function(t){t=t||{},tw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};rw.prototype={constructor:rw,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},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){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof rw&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=u(n,t);return 0>r?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof rw&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof rw&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];t.call(e,r,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof rw&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof rw&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new wi(0,0,0,0),n=t||this._children,r=[],o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),e=e||i.clone(),e.union(i)):(e=e||s.clone(),e.union(s))}}return e||i}},h(rw,tw);var ow=32,aw=7,sw=function(){this._roots=[],this._displayList=[],this._displayListLen=0};sw.prototype={constructor:sw,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].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,i=this._displayList,n=0,r=e.length;r>n;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Z_.canvasSupported&&Di(i,ki)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.clipPath}if(t.isGroup){for(var a=t._children,s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof rw&&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 i=this._roots[e];i instanceof rw&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var e=0,n=t.length;n>e;e++)this.delRoot(t[e]);else{var r=u(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof rw&&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:ki};var lw={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},uw=function(t,e,i){return lw.hasOwnProperty(e)?i*=t.dpr:i},hw={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},cw=9,dw=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],fw=function(t){this.extendFrom(t,!1)};fw.prototype={constructor:fw,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,i){var n=this,r=i&&i.style,o=!r||t.__attrCachedBy!==hw.STYLE_BIND;t.__attrCachedBy=hw.STYLE_BIND;for(var a=0;a<dw.length;a++){var s=dw[a],l=s[0];(o||n[l]!==r[l])&&(t[l]=uw(t,l,n[l]||s[1]))}if((o||n.fill!==r.fill)&&(t.fillStyle=n.fill),(o||n.stroke!==r.stroke)&&(t.strokeStyle=n.stroke),(o||n.opacity!==r.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(o||n.blend!==r.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(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&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||e!==!0&&(e===!1?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},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,i){for(var n="radial"===e.type?Pi:Li,r=n(t,e,i),o=e.colorStops,a=0;a<o.length;a++)r.addColorStop(o[a].offset,o[a].color);return r}};for(var pw=fw.prototype,gw=0;gw<dw.length;gw++){var vw=dw[gw];vw[0]in pw||(pw[vw[0]]=vw[1])}fw.getGradient=pw.getGradient;var mw=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};mw.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var yw=function(t,e,i){var n;i=i||Kx,"string"==typeof t?n=Ri(t,e,i):M(t)&&(n=t,t=n.id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=Oi,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["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=i};yw.prototype={constructor:yw,__dirty:!0,__used:!1,__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=Ri("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),n.width=t*i,n.height=e*i,o&&(o.width=t*i,o.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i=this.dom,n=this.ctx,r=i.width,o=i.height,e=e||this.clearColor,a=this.motionBlur&&!t,s=this.lastFrameAlpha,l=this.dpr;if(a&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/l,o/l)),n.clearRect(0,0,r,o),e&&"transparent"!==e){var u;e.colorStops?(u=e.__canvasGradient||fw.getGradient(n,e,{x:0,y:0,width:r,height:o}),e.__canvasGradient=u):e.image&&(u=mw.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=u||e,n.fillRect(0,0,r,o),n.restore()}if(a){var h=this.domBack;n.save(),n.globalAlpha=s,n.drawImage(h,0,0,r,o),n.restore()}}};var _w="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},xw=new Bx(50),ww={},bw=0,Mw=5e3,Sw=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Iw="12px sans-serif",Tw={};Tw.measureText=function(t,e){var i=l();return i.font=e||Iw,i.measureText(t)};var Aw=Iw,Cw={left:1,right:1,center:1},Dw={top:1,bottom:1,middle:1},kw=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Lw={},Pw={},Ow=new wi,Rw=function(){};Rw.prototype={constructor:Rw,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&on(i,!0);var n=i.text;if(null!=n&&(n+=""),bn(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(Ow.copy(e),Ow.applyTransform(r),e=Ow),sn(this,t,n,i,e,cw),t.restore()}}},Mn.prototype={constructor:Mn,type:"displayable",__dirty:!0,invisible:!1,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 i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return n.contain(i[0],i[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?tw.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 fw(t,this),this.dirty(!1),this},calculateTextPosition:null},h(Mn,tw),c(Mn,Rw),Sn.prototype={constructor:Sn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=Ei(n,this._image,this,this.onload);if(r&&Bi(r)){var o=i.x||0,a=i.y||0,s=i.width,l=i.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(r,h,c,i.sWidth,i.sHeight,o,a,s,l)}else if(i.sx&&i.sy){var h=i.sx,c=i.sy,d=s-h,f=l-c;t.drawImage(r,h,c,d,f,o,a,s,l)}else t.drawImage(r,o,a,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new wi(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Sn,Mn);var zw=1e5,Ew=314159,Nw=.01,Bw=.001,Vw=new wi(0,0,0,0),Fw=new wi(0,0,0,0),Hw=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=a({},i||{}),this.dpr=i.devicePixelRatio||Kx,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var l=t.width,u=t.height;null!=i.width&&(l=i.width),null!=i.height&&(u=i.height),this.dpr=i.devicePixelRatio||1,t.width=l*this.dpr,t.height=u*this.dpr,this._width=l,this._height=u;var h=new yw(t,this,this.dpr);h.__builtin__=!0,h.initContext(),s[Ew]=h,h.zlevel=Ew,o.push(Ew),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=kn(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Hw.prototype={constructor:Hw,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],o=this._layers[r];if(!o.__builtin__&&o.refresh){var a=0===n?this._backgroundColor:null;o.refresh(a)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=u(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var i=t[e].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Di(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(zw));var n={};i.ctx.save();for(var r=0;e>r;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(zw)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;_w(function(){r._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(Ew).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n],o=this._layers[r];o.__builtin__&&o!==this._hoverlayer&&(o.__dirty||e)&&i.push(o)}for(var a=!0,s=0;s<i.length;s++){var o=i[s],l=o.ctx,u={};l.save();var h=e?o.__startIndex:o.__drawIndex,c=!e&&o.incremental&&Date.now,d=c&&Date.now(),p=o.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(o.__startIndex===o.__endIndex)o.clear(!1,p);else if(h===o.__startIndex){var g=t[h];g.incremental&&g.notClear&&!e||o.clear(!1,p)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=o.__startIndex);for(var v=h;v<o.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,o,e,u),m.__dirty=m.__dirtyText=!1,c){var y=Date.now()-d;if(y>15)break}}o.__drawIndex=v,o.__drawIndex<o.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return Z_.wxa&&f(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var r=e.ctx,o=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||o&&!o[0]&&!o[3]||t.culling&&An(t,this._width,this._height))){var a=t.__clipPaths,s=n.prevElClipPaths;(!s||Cn(a,s))&&(s&&(r.restore(),n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),Dn(a,r),n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ew);var i=this._layers[t];return i||(i=new yw("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&r(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,o=null,a=-1,s=this._domRoot;if(i[t])return void Jx("ZLevel "+t+" has been used already");if(!Tn(e))return void Jx("Layer of zlevel "+t+" is not valid");if(r>0&&t>n[0]){for(a=0;r-1>a&&!(n[a]<t&&n[a+1]>t);a++);o=i[n[a]]}if(n.splice(a+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,o=this._zlevelList;for(r=0;r<o.length;r++)n=o[r],i=this._layers[n],i.__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,o=this._zlevelList;for(r=0;r<o.length;r++)n=o[r],i=this._layers[n],i.__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}for(var r=null,o=0,i=0;i<t.length;i++){var a,n=t[i],s=n.zlevel;n.incremental?(a=this.getLayer(s+Bw,this._needsManuallyCompositing),a.incremental=!0,o=1):a=this.getLayer(s+(o>0?Nw:0),this._needsManuallyCompositing),a.__builtin__||Jx("ZLevel "+s+" has been used by unkown layer "+a.id),a!==r&&(a.__used=!0,a.__startIndex!==i&&(a.__dirty=!0),a.__startIndex=i,a.__drawIndex=a.incremental?-1:i,e(i),r=a),n.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(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 i=this._layerConfig;i[t]?r(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===t||o===t+Nw){var a=this._layers[o];r(a,i[t],!0)}}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(u(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(Ew).resize(t,e)}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[Ew].dom;var e=new yw("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},a=this.storage.getDisplayList(!0),s=0;s<a.length;s++){var l=a[s];this._doPaintEl(l,e,!0,o)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||In(s[i])||In(a.style[i]))-(In(s[r])||0)-(In(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,u=o.hasStroke()?o.lineWidth:0,h=Math.max(u/2,-s+a),c=Math.max(u/2,s+a),d=Math.max(u/2,-l+a),f=Math.max(u/2,l+a),p=r.width+h+c,g=r.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var m=Sn,y=new m({style:{x:0,y:0,image:i}});return null!=v.position&&(y.position=t.position=v.position),null!=v.rotation&&(y.rotation=t.rotation=v.rotation),null!=v.scale&&(y.scale=t.scale=v.scale),y}};var Ww=function(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,dx.call(this)};Ww.prototype={constructor:Ww,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=u(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,r=[],o=[],a=0;n>a;a++){var s=i[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(_w(t),!e._paused&&e._update())}var e=this;this._running=!0,_w(t)},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){e=e||{};var i=new Yx(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(Ww,dx);var Gw=300,Zw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Uw=["touchstart","touchend","touchmove"],Xw={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Yw=p(Zw,function(t){var e=t.replace("mouse","pointer");return Xw[e]?e:t}),jw={mousemove:function(t){t=ye(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=ye(this.dom,t);var e=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=ye(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),jw.mousemove.call(this,t),jw.mousedown.call(this,t),Pn(this)},touchmove:function(t){t=ye(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"change"),jw.mousemove.call(this,t),Pn(this)},touchend:function(t){t=ye(this.dom,t),t.zrByTouch=!0,this.handler.processGesture(this,t,"end"),jw.mouseup.call(this,t),+new Date-this._lastTouchMoment<Gw&&jw.click.call(this,t),Pn(this)},pointerdown:function(t){jw.mousedown.call(this,t)},pointermove:function(t){On(t)||jw.mousemove.call(this,t)},pointerup:function(t){jw.mouseup.call(this,t)},pointerout:function(t){On(t)||jw.mouseout.call(this,t)}};f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){jw[t]=function(e){e=ye(this.dom,e),this.trigger(t,e)}});var qw=zn.prototype;qw.dispose=function(){for(var t=Zw.concat(Uw),e=0;e<t.length;e++){var i=t[e];xe(this.dom,Ln(i),this._handlers[i])}},qw.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},c(zn,dx);var Kw=!Z_.canvasSupported,$w={canvas:Hw},Jw={},Qw="4.1.1",tb=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new sw,o=i.renderer;if(Kw){if(!$w.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&$w[o]||(o="canvas");var a=new $w[o](e,r,i,t);this.storage=r,this.painter=a;var s=Z_.node||Z_.worker?null:new zn(a.getViewportRoot());this.handler=new Sx(r,a,s,a.root),this.animation=new Ww({stage:{update:y(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(n)},r.addToStorage=function(t){u.call(r,t),t.addSelfToZr(n)}};tb.prototype={constructor:tb,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},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,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,Fn(this.id)}};var eb=(Object.freeze||Object)({version:Qw,init:En,dispose:Nn,getInstance:Bn,registerPainter:Vn}),ib=f,nb=M,rb=x,ob="series\x00",ab=["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"],sb=0,lb=".",ub="___EC__COMPONENT__CONTAINER___",hb=0,cb=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);
  return function(e,i,n){for(var r={},o=0;o<t.length;o++){var a=t[o][1];if(!(i&&u(i,a)>=0||n&&u(n,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},db=cb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),fb={getLineStyle:function(t){var e=db(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?!1:"dashed"===e?[n,n]:[i,i]}},pb=cb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),gb={getAreaStyle:function(t,e){return pb(this,t,e)}},vb=Math.pow,mb=Math.sqrt,yb=1e-8,_b=1e-4,xb=mb(3),wb=1/3,bb=H(),Mb=H(),Sb=H(),Ib=Math.min,Tb=Math.max,Ab=Math.sin,Cb=Math.cos,Db=2*Math.PI,kb=H(),Lb=H(),Pb=H(),Ob=[],Rb=[],zb={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Eb=[],Nb=[],Bb=[],Vb=[],Fb=Math.min,Hb=Math.max,Wb=Math.cos,Gb=Math.sin,Zb=Math.sqrt,Ub=Math.abs,Xb="undefined"!=typeof Float32Array,Yb=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Yb.prototype={constructor:Yb,_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,i){i=i||0,this._ux=Ub(i/Kx/t)||0,this._uy=Ub(i/Kx/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,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(zb.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 i=Ub(t-this._xi)>this._ux||Ub(e-this._yi)>this._uy||this._len<5;return this.addData(zb.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(zb.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(zb.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(zb.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=Wb(r)*i+t,this._yi=Gb(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(zb.R,t,e,i,n),this},closePath:function(){this.addData(zb.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];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||!Xb||(this.data=new Float32Array(e));for(var i=0;e>i;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();Xb&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[n++]=o[a];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];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 i,n,r=this._dashSum,o=this._dashOffset,a=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=Zb(h*h+c*c),f=l,p=u,g=a.length;for(h/=d,c/=d,0>o&&(o=r+o),o%=r,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=a[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?Fb(f,t):Hb(f,t),c>=0?Fb(p,e):Hb(p,e));h=f-t,c=p-e,this._dashOffset=-Zb(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,r,o){var a,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=dr,y=0,_=this._dashIdx,x=f.length,w=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(g,t,i,r,a+.1)-m(g,t,i,r,a),l=m(v,e,n,o,a+.1)-m(v,e,n,o,a),y+=Zb(s*s+l*l);for(;x>_&&(w+=f[_],!(w>d));_++);for(a=(w-d)/y;1>=a;)u=m(g,t,i,r,a),h=m(v,e,n,o,a),_%2?p.moveTo(u,h):p.lineTo(u,h),a+=f[_]/y,_=(_+1)%x;_%2!==0&&p.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-Zb(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Xb&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Eb[0]=Eb[1]=Bb[0]=Bb[1]=Number.MAX_VALUE,Nb[0]=Nb[1]=Vb[0]=Vb[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,o=0;o<t.length;){var a=t[o++];switch(1===o&&(e=t[o],i=t[o+1],n=e,r=i),a){case zb.M:n=t[o++],r=t[o++],e=n,i=r,Bb[0]=n,Bb[1]=r,Vb[0]=n,Vb[1]=r;break;case zb.L:Ir(e,i,t[o],t[o+1],Bb,Vb),e=t[o++],i=t[o++];break;case zb.C:Tr(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Bb,Vb),e=t[o++],i=t[o++];break;case zb.Q:Ar(e,i,t[o++],t[o++],t[o],t[o+1],Bb,Vb),e=t[o++],i=t[o++];break;case zb.A:var s=t[o++],l=t[o++],u=t[o++],h=t[o++],c=t[o++],d=t[o++]+c;o+=1;var f=1-t[o++];1===o&&(n=Wb(c)*u+s,r=Gb(c)*h+l),Cr(s,l,u,h,c,d,f,Bb,Vb),e=Wb(d)*u+s,i=Gb(d)*h+l;break;case zb.R:n=e=t[o++],r=i=t[o++];var p=t[o++],g=t[o++];Ir(n,r,n+p,r+g,Bb,Vb);break;case zb.Z:e=n,i=r}ae(Eb,Eb,Bb),se(Nb,Nb,Vb)}return 0===o&&(Eb[0]=Eb[1]=Nb[0]=Nb[1]=0),new wi(Eb[0],Eb[1],Nb[0]-Eb[0],Nb[1]-Eb[1])},rebuildPath:function(t){for(var e,i,n,r,o,a,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;h>c;){var d=s[c++];switch(1===c&&(n=s[c],r=s[c+1],e=n,i=r),d){case zb.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case zb.L:o=s[c++],a=s[c++],(Ub(o-n)>l||Ub(a-r)>u||c===h-1)&&(t.lineTo(o,a),n=o,r=a);break;case zb.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case zb.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case zb.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],w=g>v?g:v,b=g>v?1:g/v,M=g>v?v/g:1,S=Math.abs(g-v)>.001,I=m+y;S?(t.translate(f,p),t.rotate(_),t.scale(b,M),t.arc(0,0,w,m,I,1-x),t.scale(1/b,1/M),t.rotate(-_),t.translate(-f,-p)):t.arc(f,p,w,m,I,1-x),1===c&&(e=Wb(m)*g+f,i=Gb(m)*v+p),n=Wb(I)*g+f,r=Gb(I)*v+p;break;case zb.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case zb.Z:t.closePath(),n=e,r=i}}}},Yb.CMD=zb;var jb=2*Math.PI,qb=2*Math.PI,Kb=Yb.CMD,$b=2*Math.PI,Jb=1e-4,Qb=[-1,-1,-1],tM=[-1,-1],eM=mw.prototype.getCanvasPattern,iM=Math.abs,nM=new Yb(!0);Gr.prototype={constructor:Gr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||nM,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,u=r&&!!s.colorStops,h=o&&!!a.image,c=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,a,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=eM.call(a,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=eM.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(n.setScale(v[0],v[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=i.fillOpacity){var m=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=m}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r)if(null!=i.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=m}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Yb},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new Yb),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Wr(o,a/s,t,e)))return!0}if(r.hasFill())return Hr(o,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):Mn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(M(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&iM(t[0]-1)>1e-10&&iM(t[3]-1)>1e-10?Math.sqrt(iM(t[0]*t[3]-t[2]*t[1])):1}},Gr.extend=function(t){var e=function(e){Gr.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};h(e,Gr);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(Gr,Mn);var rM=Yb.CMD,oM=[[],[],[]],aM=Math.sqrt,sM=Math.atan2,lM=function(t,e){var i,n,r,o,a,s,l=t.data,u=rM.M,h=rM.C,c=rM.L,d=rM.R,f=rM.A,p=rM.Q;for(r=0,o=0;r<l.length;){switch(i=l[r++],o=r,n=0,i){case u:n=1;break;case c:n=1;break;case h:n=3;break;case p:n=2;break;case f:var g=e[4],v=e[5],m=aM(e[0]*e[0]+e[1]*e[1]),y=aM(e[2]*e[2]+e[3]*e[3]),_=sM(-e[1]/y,e[0]/m);l[r]*=m,l[r++]+=g,l[r]*=y,l[r++]+=v,l[r++]*=m,l[r++]*=y,l[r++]+=_,l[r++]+=_,r+=2,o=r;break;case d:s[0]=l[r++],s[1]=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;n>a;a++){var s=oM[a];s[0]=l[r++],s[1]=l[r++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},uM=Math.sqrt,hM=Math.sin,cM=Math.cos,dM=Math.PI,fM=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},pM=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(fM(t)*fM(e))},gM=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(pM(t,e))},vM=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,mM=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,yM=function(t){Mn.call(this,t)};yM.prototype={constructor:yM,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&on(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;return null!=n&&(n+=""),bn(n,i)?(this.setTransform(t),sn(this,t,n,i,null,e),void this.restoreTransform(t)):void(t.__attrCachedBy=hw.NONE)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&on(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Hi(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,yn(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},h(yM,Mn);var _M=Gr.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),xM=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],wM=function(t){return Z_.browser.ie&&Z_.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var o=i[r],a=o&&o.shape,s=o&&o.type;if(a&&("sector"===s&&a.startAngle===a.endAngle||"rect"===s&&(!a.width||!a.height))){for(var l=0;l<xM.length;l++)xM[l][2]=n[xM[l][0]],n[xM[l][0]]=xM[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<xM.length;l++)n[xM[l][0]]=xM[l][2]}:t},bM=Gr.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:wM(Gr.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(a),h=Math.sin(a);t.moveTo(u*r+i,h*r+n),t.lineTo(u*o+i,h*o+n),t.arc(i,n,o,a,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,a,l),t.closePath()}}),MM=Gr.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),SM=function(t,e){for(var i=t.length,n=[],r=0,o=1;i>o;o++)r+=ee(t[o-1],t[o]);var a=r/2;a=i>a?i:a;for(var o=0;a>o;o++){var s,l,u,h=o/(a-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Kr(s[0],f[0],l[0],u[0],d,p,g),Kr(s[1],f[1],l[1],u[1],d,p,g)])}return n},IM=function(t,e,i,n){var r,o,a,s,l=[],u=[],h=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)ae(a,a,t[d]),se(s,s,t[d]);ae(a,a,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(G(t[d]));continue}r=t[d-1],o=t[d+1]}Y(u,o,r),Q(u,u,e);var g=ee(p,r),v=ee(p,o),m=g+v;0!==m&&(g/=m,v/=m),Q(h,u,-g),Q(c,u,v);var y=U([],p,h),_=U([],p,c);n&&(se(y,y,a),ae(y,y,s),se(_,_,a),ae(_,_,s)),l.push(y),l.push(_)}return i&&l.push(l.shift()),l},TM=Gr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){$r(t,e,!0)}}),AM=Gr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){$r(t,e,!1)}}),CM=Math.round,DM={},kM=Gr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,r,o;this.subPixelOptimize?(Qr(DM,e,this.style),i=DM.x,n=DM.y,r=DM.width,o=DM.height,DM.r=e.r,e=DM):(i=e.x,n=e.y,r=e.width,o=e.height),e.r?rn(t,e):t.rect(i,n,r,o),t.closePath()}}),LM={},PM=Gr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,r,o;this.subPixelOptimize?(Jr(LM,e,this.style),i=LM.x1,n=LM.y1,r=LM.x2,o=LM.y2):(i=e.x1,n=e.y1,r=e.x2,o=e.y2);var a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),OM=[],RM=Gr.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 i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(br(i,a,r,h,OM),a=OM[1],r=OM[2],br(n,s,o,h,OM),s=OM[1],o=OM[2]),t.quadraticCurveTo(a,s,r,o)):(1>h&&(vr(i,a,l,r,h,OM),a=OM[1],l=OM[2],r=OM[3],vr(n,s,u,o,h,OM),s=OM[1],u=OM[2],o=OM[3]),t.bezierCurveTo(a,s,l,u,r,o)))},pointAt:function(t){return eo(this.shape,t,!1)},tangentAt:function(t){var e=eo(this.shape,t,!0);return te(e,e)}}),zM=Gr.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 i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*r+i,u*r+n),t.arc(i,n,r,o,a,!s)}}),EM=Gr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].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(),Gr.prototype.getBoundingRect.call(this)}}),NM=function(t){this.colorStops=t||[]};NM.prototype={constructor:NM,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var BM=function(t,e,i,n,r,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,NM.call(this,r)};BM.prototype={constructor:BM},h(BM,NM);var VM=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,NM.call(this,n)};VM.prototype={constructor:VM},h(VM,NM),io.prototype.incremental=!0,io.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},io.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},io.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},io.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},io.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},io.prototype.brush=function(t){for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,e===this._cursor?null:this._displayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._cursor=e;for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.beforeBrush&&i.beforeBrush(t),i.brush(t,0===e?null:this._temporaryDisplayables[e-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var FM=[];io.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new wi(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(FM)),t.union(n)}this._rect=t}return this._rect},io.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();if(n.contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++){var o=this._displayables[r];if(o.contain(t,e))return!0}return!1},h(io,Mn);var HM=Math.max,WM=Math.min,GM={},ZM=1,UM={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},XM="emphasis",YM="normal",jM=1,qM={},KM={},$M=qr,JM=to,QM=B(),tS=0;oo("circle",_M),oo("sector",bM),oo("ring",MM),oo("polygon",TM),oo("polyline",AM),oo("rect",kM),oo("line",PM),oo("bezierCurve",RM),oo("arc",zM);var eS=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ZM,CACHED_LABEL_STYLE_PROPERTIES:UM,extendShape:no,extendPath:ro,registerShape:oo,getShapeClass:ao,makePath:so,makeImage:lo,mergePath:$M,resizePath:ho,subPixelOptimizeLine:co,subPixelOptimizeRect:fo,subPixelOptimize:JM,setElementHoverStyle:wo,setHoverStyle:Ao,setAsHighDownDispatcher:Co,isHighDownDispatcher:Do,getHighlightDigit:ko,setLabelStyle:Lo,modifyLabelStyle:Po,setTextStyle:Oo,setText:Ro,getFont:Ho,updateProps:Go,initProps:Zo,getTransform:Uo,applyTransform:Xo,transformDirection:Yo,groupTransition:jo,clipPointsByRect:qo,clipRectByRect:Ko,createIcon:$o,linePolygonIntersect:Jo,lineLineIntersect:Qo,Group:rw,Image:Sn,Text:yM,Circle:_M,Sector:bM,Ring:MM,Polygon:TM,Polyline:AM,Rect:kM,Line:PM,BezierCurve:RM,Arc:zM,IncrementalDisplayable:io,CompoundPath:EM,LinearGradient:BM,RadialGradient:VM,BoundingRect:wi}),iS=["textStyle","color"],nS={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(iS):null)},getFont:function(){return Ho({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Hi(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},rS=cb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),oS={getItemStyle:function(t,e){var i=rS(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},aS=c,sS=$n();ia.prototype={constructor:ia,init:null,mergeOption:function(t){r(this.option,t,!0)},get:function(t,e){return null==t?this.option:na(this.option,this.parsePath(t),!e&&ra(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&ra(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:na(this.option,t=this.parsePath(t));return e=e||(i=ra(this,t))&&i.getModel(t),new ia(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){var t=this.constructor;return new t(n(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){sS(this).getParent=t},isAnimationEnabled:function(){if(!Z_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},or(ia),ar(ia),aS(ia,fb),aS(ia,gb),aS(ia,nS),aS(ia,oS);var lS=0,uS=1e-4,hS=9007199254740991,cS=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,dS=(Object.freeze||Object)({linearMap:ua,parsePercent:ha,round:ca,asc:da,getPrecision:fa,getPrecisionSafe:pa,getPixelPrecision:ga,getPercentWithPrecision:va,MAX_SAFE_INTEGER:hS,remRadian:ma,isRadianAroundZero:ya,parseDate:_a,quantity:xa,nice:ba,quantile:Ma,reformIntervals:Sa,isNumeric:Ia}),fS=P,pS=/([&<>"'])/g,gS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vS=["a","b","c","d","e","f","g"],mS=function(t,e){return"{"+t+(null==e?"":e)+"}"},yS=Yi,_S=(Object.freeze||Object)({addCommas:Ta,toCamelCase:Aa,normalizeCssArray:fS,encodeHTML:Ca,formatTpl:Da,formatTplSimple:ka,getTooltipMarker:La,formatTime:Oa,capitalFirst:Ra,truncateText:yS,getTextBoundingRect:za,getTextRect:Ea}),xS=f,wS=["left","right","top","bottom","width","height"],bS=[["width","left","right"],["height","top","bottom"]],MS=Na,SS=(_(Na,"vertical"),_(Na,"horizontal"),{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")}}}),IS=$n(),TS=ia.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){ia.call(this,t,e,i,n),this.uid=oa("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Ga(t):{},o=e.getTheme();r(t,o.get(this.mainType)),r(t,this.getDefaultOption()),i&&Wa(t,n,i)},mergeOption:function(t){r(this.option,t,!0);var e=this.layoutMode;e&&Wa(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=IS(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;a>=0;a--)o=r(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)})}});ur(TS,{registerWhenExtend:!0}),aa(TS),sa(TS,Ua),c(TS,SS);var AS="";"undefined"!=typeof navigator&&(AS=navigator.platform||"");var CS={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:AS.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},DS=$n(),kS={clearColorPalette:function(){DS(this).colorIdx=0,DS(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=DS(e),r=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=Hn(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?Xa(s,i):a;if(l=l||a,l&&l.length){var u=l[r];return t&&(o[t]=u),n.colorIdx=(r+1)%l.length,u}}},LS={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",o),ja(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),ja(o)&&(n.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),ja(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",a),ja(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),ja(a)&&(n.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();f(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];i.set(l,s),ja(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}},PS="original",OS="arrayRows",RS="objectRows",zS="keyedColumns",ES="unknown",NS="typedArray",BS="column",VS="row";qa.seriesDataToSource=function(t){return new qa({data:t,sourceFormat:I(t)?NS:PS,fromDataset:!1})},ar(qa);var FS=$n(),HS="\x00_ec_inner",WS=ia.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new ia(i),this._optionManager=n},setOption:function(t,e){O(!(HS in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):hs.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&f(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var r=Hn(t[e]),s=Un(o.get(e),r);Xn(s),f(s,function(t){var i=t.option;M(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=ds(e,i,t.exist))});var l=cs(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var r=t.exist,s=t.option;if(O(M(s)||r,"Empty component definition"),s){var u=TS.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);r=new u(s,this,this,h),a(r,h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(e)[n]=r,i[e][n]=r.option},this),"series"===e&&fs(this,o.get("series"))}var i=this.option,o=this._componentsMap,s=[];Ja(this),f(t,function(t,e){null!=t&&(TS.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):r(i[e],t,!0))}),TS.topologicalTravel(s,TS.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(TS.hasClass(i)){for(var e=Hn(e),n=e.length-1;n>=0;n--)jn(e[n])&&e.splice(n,1);t[i]=e}}),delete t[HS],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=i)x(i)||(i=[i]),a=v(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=x(n);a=v(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=x(r);a=v(o,function(t){return l&&u(r,t.name)>=0||!l&&t.name===r})}else a=o.slice();return ps(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:r,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?v(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap.get(r);return i(ps(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,r){e.call(i,n,t,r)})});else if(b(t))f(n.get(t),e,i);else if(M(t)){var r=this.findComponents(t);f(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return v(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){f(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return f(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=v(this._componentsMap.get("series"),t,e);fs(this,i)},restoreData:function(t){var e=this._componentsMap;fs(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),TS.topologicalTravel(i,TS.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!ls(e,t))&&e.restoreData()})})}});c(WS,kS);var GS=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],ZS={};vs.prototype={constructor:vs,create:function(t,e){var i=[];f(ZS,function(n){var r=n.create(t,e);i=i.concat(r||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)
  })},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},vs.register=function(t,e){ZS[t]=e},vs.get=function(t){return ZS[t]};var US=f,XS=n,YS=p,jS=r,qS=/^(min|max)?(.+)$/;ms.prototype={constructor:ms,setOption:function(t,e){t&&f(Hn(t.series),function(t){t&&t.data&&I(t.data)&&z(t.data)}),t=XS(t);var i=this._optionBackup,n=ys.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(bs(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=YS(e.timelineOptions,XS),this._mediaList=YS(e.mediaList,XS),this._mediaDefault=XS(e.mediaDefault),this._currentMediaIndices=[],XS(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=XS(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,r=[],o=[];if(!i.length&&!n)return o;for(var a=0,s=i.length;s>a;a++)_s(i[a].query,t,e)&&r.push(a);return!r.length&&n&&(r=[-1]),r.length&&!ws(r,this._currentMediaIndices)&&(o=YS(r,function(t){return XS(-1===t?n.option:i[t].option)})),this._currentMediaIndices=r,o}};var KS=f,$S=M,JS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],QS=function(t,e){KS(Ds(t.series),function(t){$S(t)&&Cs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),KS(i,function(e){KS(Ds(t[e]),function(t){t&&(Ts(t,"axisLabel"),Ts(t.axisPointer,"label"))})}),KS(Ds(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Ts(e,"axisLabel"),Ts(e&&e.axisPointer,"label")}),KS(Ds(t.calendar),function(t){Ss(t,"itemStyle"),Ts(t,"dayLabel"),Ts(t,"monthLabel"),Ts(t,"yearLabel")}),KS(Ds(t.radar),function(t){Ts(t,"name")}),KS(Ds(t.geo),function(t){$S(t)&&(As(t),KS(Ds(t.regions),function(t){As(t)}))}),KS(Ds(t.timeline),function(t){As(t),Ss(t,"label"),Ss(t,"itemStyle"),Ss(t,"controlStyle",!0);var e=t.data;x(e)&&f(e,function(t){M(t)&&(Ss(t,"label"),Ss(t,"itemStyle"))})}),KS(Ds(t.toolbox),function(t){Ss(t,"iconStyle"),KS(t.feature,function(t){Ss(t,"iconStyle")})}),Ts(ks(t.axisPointer),"label"),Ts(ks(t.tooltip).axisPointer,"label")},tI=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],eI=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],iI=function(t,e){QS(t,e),t.series=Hn(t.series),f(t.series,function(t){if(M(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Ls(t,"pointer.color");null!=i&&Ps(t,"itemStyle.color",i)}Os(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(eI,function(e){var i=t[e];i&&(x(i)||(i=[i]),f(i,function(t){Os(t)}))})},nI=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(Rs)},rI=zs.prototype;rI.pure=!1,rI.persistent=!0,rI.getSource=function(){return this._source};var oI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Bs},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=[],i=this._data,n=0;n<i.length;n++){var r=i[n];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Es,getItem:Ns,appendData:Bs},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=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;f(t,function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])})}},original:{count:Es,getItem:Ns,appendData:Bs},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},aI={arrayRows:Vs,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Vs,original:function(t,e,i){var n=Gn(t);return null!=i&&n instanceof Array?n[i]:n},typedArray:Vs},sI={arrayRows:Fs,objectRows:function(t,e){return Hs(t[e],this._dimensionInfos[e])},keyedColumns:Fs,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&Zn(t)&&(this.hasItemOption=!0),Hs(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},lI=/\{@(.+?)\}/g,uI={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),o=i.getName(t),a=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=u&&u.get("renderMode"),c=ir(h),d=this.mainType,f="series"===d,p=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:n,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:La({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var o=this.getData(i),a=o.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=a.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);if("function"==typeof l)return s.status=e,s.dimensionIndex=n,l(s);if("string"==typeof l){var u=Da(l,s);return u.replace(lI,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),Ws(o,t,i)})}},getRawValue:function(t,e){return Ws(this.getData(e),t)},formatTooltip:function(){}},hI=Us.prototype;hI.perform=function(t){function e(t){return!(t>=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var a=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(a!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=Ys(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||f>d)){var p=this._progress;if(x(p))for(var g=0;g<p.length;g++)Xs(this,p[g],d,f,l,u);else Xs(this,p,d,f,l,u)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var cI=function(){function t(){return i>n?n++:null}function e(){var t=n%a*r+Math.ceil(n/a),e=n>=i?null:o>t?t:n;return n++,e}var i,n,r,o,a,s={reset:function(l,u,h,c){n=l,i=u,r=h,o=c,a=Math.ceil(o/r),s.next=r>1&&o>0?e:t}};return s}();hI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},hI.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},hI.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},hI.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},hI.getUpstream=function(){return this._upstream},hI.getDownstream=function(){return this._downstream},hI.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var dI=$n(),fI=TS.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i){this.seriesIndex=this.componentIndex,this.dataTask=Zs({count:Ks,reset:$s}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Qa(this);var n=this.getInitialData(t,i);Qs(n,this),this.dataTask.context.data=n,dI(this).dataBeforeProcessed=n,js(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Ga(t):{},o=this.subType;TS.hasClass(o)&&(o+="Series"),r(t,e.getTheme().get(this.subType)),r(t,this.getDefaultOption()),Wn(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Wa(t,n,i)},mergeOption:function(t,e){t=r(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Wa(this.option,t,i),Qa(this);var n=this.getInitialData(t,e);Qs(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,dI(this).dataBeforeProcessed=n,js(this)},fillDataTextStyle:function(t){if(t&&!I(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Wn(t[i],"label",e)},getInitialData:function(){},appendData:function(t){var e=this.getRawData();e.appendData(t.data)},getData:function(t){var e=el(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return dI(this).data},setData:function(t){var e=el(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}dI(this).data=t},getSource:function(){return $a(this)},getRawData:function(){return dI(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){function r(i){function r(t,i){var r=c.getDimensionInfo(i);if(r&&r.otherDims.tooltip!==!1){var d=r.type,f="sub"+a.seriesIndex+"at"+h,p=La({color:y,type:"subItem",renderMode:n,markerId:f}),g="string"==typeof p?p:p.content,v=(o?g+Ca(r.displayName||"-")+": ":"")+Ca("ordinal"===d?t+"":"time"===d?e?"":Oa("yyyy/MM/dd hh:mm:ss",t):Ta(t));v&&s.push(v),l&&(u[f]=y,++h)}}var o=g(i,function(t,e,i){var n=c.getDimensionInfo(i);return t|=n&&n.tooltip!==!1&&null!=n.displayName},0),s=[];d.length?f(d,function(e){r(Ws(c,t,e),e)}):f(i,r);var p=o?l?"\n":"<br/>":"",v=p+s.join(p||", ");return{renderMode:n,content:v,style:u}}function o(t){return{renderMode:n,content:Ca(Ta(t)),style:u}}var a=this;n=n||"html";var s="html"===n?"<br/>":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,v=this.getRawValue(t),m=x(v),y=c.getItemVisual(t,"color");M(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var _=p>1||m&&!p?r(v):o(p?Ws(c,t,d[0]):m?v[0]:v),w=_.content,b=a.seriesIndex+"at"+h,S=La({color:y,type:"item",renderMode:n,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;Yn(this)||(T=""),T=T?Ca(T)+(e?": ":s):"";var A="string"==typeof S?S:S.content,C=e?A+T+w:T+A+(I?Ca(I)+": "+w:w);return{html:C,markers:u}},isAnimationEnabled:function(){if(Z_.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=kS.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},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});c(fI,uI),c(fI,kS);var pI=function(){this.group=new rw,this.uid=oa("viewComponent")};pI.prototype={constructor:pI,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var gI=pI.prototype;gI.updateView=gI.updateLayout=gI.updateVisual=function(){},or(pI),ur(pI,{registerWhenExtend:!0});var vI=function(){var t=$n();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,o=i.progressiveRender,a=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(r^a||o^s)&&"reset"}},mI=$n(),yI=vI();il.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){rl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){rl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var _I=il.prototype;_I.updateView=_I.updateLayout=_I.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},or(il,["dispose"]),ur(il,{registerWhenExtend:!0}),il.markUpdateMethod=function(t,e){mI(t).updateMethod=e};var xI={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)}}},wI="\x00__throttleOriginMethod",bI="\x00__throttleRate",MI="\x00__throttleType",SI={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());i.setVisual("color",r);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),a=t.get(o);if(i.setVisual("borderColor",a),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof NM||i.each(function(e){i.setItemVisual(e,"color",r(t.getDataParams(e)))});var s=function(t,e){var i=t.getItemModel(e),r=i.get(n,!0),a=i.get(o,!0);null!=r&&t.setItemVisual(e,"color",r),null!=a&&t.setItemVisual(e,"borderColor",a)};return{dataEach:i.hasItemOption?s:null}}}},II={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}},TI=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=II.aria,r=0;r<i.length;++r)n=n[i[r]];return n}return e}function r(){var t=e.getModel("title").option;return t&&t.length&&(t=t[0]),t&&t.text}function o(t){return II.series.typeNames[t]||"自定义图"}var a=e.getModel("aria");if(a.get("show")){if(a.get("description"))return void t.setAttribute("aria-label",a.get("description"));var s=0;e.eachSeries(function(){++s},this);var l,u=a.get("data.maxCount")||10,h=a.get("series.maxCount")||10,c=Math.min(s,h);if(!(1>s)){var d=r();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var r,a=t.get("name"),l="series."+(s>1?"multiple":"single")+".";r=n(a?l+"withName":l+"withoutName"),r=i(r,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,r+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;f<h.count();f++)if(u>f){var g=h.getName(f),v=Ws(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:v}))}r+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(r)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},AI=Math.PI,CI=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new kM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new zM({shape:{startAngle:-AI/2,endAngle:-AI/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new kM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*AI/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*AI/2}).delay(300).start("circularInOut");var o=new rw;return o.add(n),o.add(r),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var a=n.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},DI=hl.prototype;DI.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},DI.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=r?i.step:null,a=n&&n.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},DI.getPipeline=function(t){return this._pipelineMap.get(t)},DI.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),r=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&r>=i.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:a}},DI.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),bl(e,t,t.dataTask)})},DI.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&dl(this,n,r,e,i),n.overallReset&&fl(this,n,r,e,i)},this)},DI.prepareView=function(t,e,i,n){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=i,o.api=n,r.__block=!t.incrementalPrepareRender,bl(this,e,r)},DI.performDataProcessorTasks=function(t,e){cl(this,this._dataProcessorHandlers,t,e,{block:!0})},DI.performVisualTasks=function(t,e,i){cl(this,this._visualHandlers,t,e,i)},DI.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},DI.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 kI=DI.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},LI=xl(0);hl.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Ml(t)}),t.uid=oa("stageHandler"),e&&(t.visualType=e),t};var PI,OI={},RI={};Sl(OI,WS),Sl(RI,gs),OI.eachSeriesByType=OI.eachRawSeriesByType=function(t){PI=t},OI.eachComponent=function(t){"series"===t.mainType&&t.subType&&(PI=t.subType)};var zI=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],EI={color:zI,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],zI]},NI="#eee",BI=function(){return{axisLine:{lineStyle:{color:NI}},axisTick:{lineStyle:{color:NI}},axisLabel:{textStyle:{color:NI}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:NI}}}},VI=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],FI={color:VI,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:NI},crossStyle:{color:NI}}},legend:{textStyle:{color:NI}},textStyle:{color:NI},title:{textStyle:{color:NI}},toolbox:{iconStyle:{normal:{borderColor:NI}}},dataZoom:{textStyle:{color:NI}},visualMap:{textStyle:{color:NI}},timeline:{lineStyle:{color:NI},itemStyle:{normal:{color:VI[1]}},label:{normal:{textStyle:{color:NI}}},controlStyle:{normal:{color:NI,borderColor:NI}}},timeAxis:BI(),logAxis:BI(),valueAxis:BI(),categoryAxis:BI(),line:{symbol:"circle"},graph:{color:VI},gauge:{title:{textStyle:{color:NI}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};FI.categoryAxis.splitLine.show=!1,TS.extend({type:"dataset",defaultOption:{seriesLayoutBy:BS,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Ka(this)}}),pI.extend({type:"dataset"});var HI=Gr.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,r=e.cy,o=e.rx,a=e.ry,s=o*i,l=a*i;t.moveTo(n-o,r),t.bezierCurveTo(n-o,r-l,n-s,r-a,n,r-a),t.bezierCurveTo(n+s,r-a,n+o,r-l,n+o,r),t.bezierCurveTo(n+o,r+l,n+s,r+a,n,r+a),t.bezierCurveTo(n-s,r+a,n-o,r+l,n-o,r),t.closePath()}}),WI=/[\s,]+/;Tl.prototype.parse=function(t,e){e=e||{};var i=Il(t);if(!i)throw new Error("Illegal svg");var n=new rw;this._root=n;var r=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||e.width),a=parseFloat(i.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(a)&&(a=null),kl(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(r){var h=R(r).split(WI);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=o&&null!=a&&(u=Rl(l,o,a),!e.ignoreViewBox)){var c=n;n=new rw,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==a||n.setClipPath(new kM({shape:{x:0,y:0,width:o,height:a}})),{root:n,width:o,height:a,viewBoxRect:l,viewBoxTransform:u}},Tl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var r=ZI[i];if(r){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=GI[i];r&&(n=r.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"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Tl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new yM({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Cl(e,r),kl(t,r,this._defs);var o=r.style.fontSize;o&&9>o&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=o/9,r.scale[1]*=o/9);var a=r.getBoundingRect();return this._textX+=a.width,e.add(r),r};var GI={g:function(t,e){var i=new rw;return Cl(e,i),kl(t,i,this._defs),i},rect:function(t,e){var i=new kM;return Cl(e,i),kl(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new _M;return Cl(e,i),kl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new PM;return Cl(e,i),kl(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new HI;return Cl(e,i),kl(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Dl(i));var n=new TM({shape:{points:i||[]}});return Cl(e,n),kl(t,n,this._defs),n},polyline:function(t,e){var i=new Gr;Cl(e,i),kl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Dl(n));var r=new AM({shape:{points:n||[]}});return r},image:function(t,e){var i=new Sn;return Cl(e,i),kl(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(o);var a=new rw;return Cl(e,a),kl(t,a,this._defs),a},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new rw;return Cl(e,a),kl(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var i=t.getAttribute("d")||"",n=Yr(i);return Cl(e,n),kl(t,n,this._defs),n}},ZI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),o=new BM(e,i,n,r);return Al(t,o),o},radialgradient:function(){}},UI={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"},XI=/url\(\s*#(.*?)\)/,YI=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,jI=/([^\s:;]+)\s*:\s*([^:;]+)/g,qI=B(),KI={registerMap:function(t,e,i){var n;return x(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=$I[e];i(t)}),qI.set(t,n)},retrieveMap:function(t){return qI.get(t)}},$I={geoJSON:function(t){var e=t.source;t.geoJSON=b(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Il(t.source)}},JI=O,QI=f,tT=w,eT=M,iT=TS.parseClassType,nT="4.4.0",rT={zrender:"4.1.1"},oT=1,aT=1e3,sT=800,lT=900,uT=5e3,hT=1e3,cT=1100,dT=2e3,fT=3e3,pT=3500,gT=4e3,vT=5e3,mT={PROCESSOR:{FILTER:aT,SERIES_FILTER:sT,STATISTIC:uT},VISUAL:{LAYOUT:hT,PROGRESSIVE_LAYOUT:cT,GLOBAL:dT,CHART:fT,POST_CHART_LAYOUT:pT,COMPONENT:gT,BRUSH:vT}},yT="__flagInMainProcess",_T="__optionUpdated",xT=/^[a-zA-Z0-9_]+$/;Nl.prototype.on=El("on",!0),Nl.prototype.off=El("off",!0),Nl.prototype.one=El("one",!0),c(Nl,dx);var wT=Bl.prototype;wT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[_T]){var e=this[_T].silent;this[yT]=!0,Fl(this),bT.update.call(this),this[yT]=!1,this[_T]=!1,Zl.call(this,e),Ul.call(this,e)}else if(t.unfinished){var i=oT,n=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Wl(this,n),t.performVisualTasks(n),$l(this,this._model,r,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},wT.getDom=function(){return this._dom},wT.getZr=function(){return this._zr},wT.setOption=function(t,e,i){if(!this._disposed){var n;if(eT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[yT]=!0,!this._model||e){var r=new ms(this._api),o=this._theme,a=this._model=new WS;a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,AT),i?(this[_T]={silent:n},this[yT]=!1):(Fl(this),bT.update.call(this),this._zr.flush(),this[_T]=!1,this[yT]=!1,Zl.call(this,n),Ul.call(this,n))}},wT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},wT.getModel=function(){return this._model},wT.getOption=function(){return this._model&&this._model.getOption()},wT.getWidth=function(){return this._zr.getWidth()},wT.getHeight=function(){return this._zr.getHeight()},wT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},wT.getRenderedCanvas=function(t){if(Z_.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},wT.getSvgDataUrl=function(){if(Z_.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},wT.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;QI(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return QI(n,function(t){t.group.ignore=!1}),o}},wT.getConnectedDataURL=function(t){if(!this._disposed&&Z_.canvasSupported){var e=this.group,i=Math.min,r=Math.max,o=1/0;if(OT[e]){var a=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelRatio||1;f(PT,function(o){if(o.group===e){var c=o.getRenderedCanvas(n(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,u*=c;var d=l-a,p=u-s,g=ex();g.width=d,g.height=p;var v=En(g);return t.connectedBackgroundColor&&v.add(new kM({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),QI(h,function(t){var e=new Sn({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},wT.convertToPixel=_(Vl,"convertToPixel"),wT.convertFromPixel=_(Vl,"convertFromPixel"),wT.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=Jn(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i}},wT.getVisual=function(t,e){var i=this._model;t=Jn(i,t,{defaultMainType:"series"});var n=t.seriesModel,r=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=o?r.getItemVisual(o,e):r.getVisual(e)},wT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},wT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]
  };var bT={prepareAndUpdate:function(t){Fl(this),bT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,i),o.performDataProcessorTasks(e,t),Wl(this,e),r.update(e,i),jl(e),o.performVisualTasks(e,t),ql(this,e,i,t);var a=e.get("backgroundColor")||"transparent";if(Z_.canvasSupported)n.setBackgroundColor(a);else{var s=qe(a);a=ri(s,"rgb"),0===s[3]&&(a="transparent")}Jl(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=i.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,n,t);l&&l.update&&r.push(s)}else r.push(s)});var o=B();e.eachSeries(function(r){var a=i._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,n,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),jl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),$l(i,e,n,t,o),Jl(e,this._api)}},updateView:function(t){var e=this._model;e&&(il.markUpdateMethod(t,"updateView"),jl(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),ql(this,this._model,this._api,t),Jl(e,this._api))},updateVisual:function(t){bT.update.call(this,t)},updateLayout:function(t){bT.update.call(this,t)}};wT.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[yT]=!0,i&&Fl(this),bT.update.call(this),this[yT]=!1,Zl.call(this,n),Ul.call(this,n)}}},wT.showLoading=function(t,e){if(!this._disposed&&(eT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),LT[t])){var i=LT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},wT.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},wT.makeActionFromEvent=function(t){var e=a({},t);return e.type=IT[t.type],e},wT.dispatchAction=function(t,e){if(!this._disposed&&(eT(e)||(e={silent:!!e}),ST[t.type]&&this._model)){if(this[yT])return void this._pendingActions.push(t);Gl.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Z_.browser.weChat&&this._throttledZrFlush(),Zl.call(this,e.silent),Ul.call(this,e.silent)}},wT.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},wT.on=El("on",!1),wT.off=El("off",!1),wT.one=El("one",!1);var MT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];wT._initEvents=function(){QI(MT,function(t){var e=function(e){var i,n=this.getModel(),r=e.target,o="globalout"===t;if(o)i={};else if(r&&null!=r.dataIndex){var s=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=s&&s.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=a({},r.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),QI(IT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},wT.isDisposed=function(){return this._disposed},wT.clear=function(){this._disposed||this.setOption({series:[]},!0)},wT.dispose=function(){if(!this._disposed){this._disposed=!0,tr(this.getDom(),ET,"");var t=this._api,e=this._model;QI(this._componentsViews,function(i){i.dispose(e,t)}),QI(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete PT[this.id]}},c(Bl,dx),nu.prototype={constructor:nu,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var r=iT(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l<o.length;l++){var u=o[l],h=r.lastIndexOf(u);if(h>0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(i[r]=t,s=!0),s||(n[r]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,a=n.model,s=n.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,a,"mainType")&&i(l,a,"subType")&&i(l,a,"index","componentIndex")&&i(l,a,"name")&&i(l,a,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o))},afterTrigger:function(){this.eventInfo=null}};var ST={},IT={},TT=[],AT=[],CT=[],DT=[],kT={},LT={},PT={},OT={},RT=new Date-0,zT=new Date-0,ET="_echarts_instance_",NT=su;_u(dT,SI),du(iI),fu(lT,nI),wu("default",CI),gu({type:"highlight",event:"highlight",update:"highlight"},F),gu({type:"downplay",event:"downplay",update:"downplay"},F),cu("light",EI),cu("dark",FI);var BT={};ku.prototype={constructor:ku,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,e=this._old,i=this._new,n={},r={},o=[],a=[];for(Lu(e,n,o,"_oldKeyGetter",this),Lu(i,r,a,"_newKeyGetter",this),t=0;t<e.length;t++){var s=o[t],l=r[s];if(null!=l){var u=l.length;u?(1===u&&(r[s]=null),l=l.unshift()):r[s]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<a.length;t++){var s=a[t];if(r.hasOwnProperty(s)){var l=r[s];if(null==l)continue;if(l.length)for(var h=0,u=l.length;u>h;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var VT=B(["tooltip","label","itemName","itemId","seriesName"]),FT=M,HT="undefined",WT=-1,GT="e\x00\x00",ZT={"float":typeof Float64Array===HT?Array:Float64Array,"int":typeof Int32Array===HT?Array:Int32Array,ordinal:Array,number:Array,time:Array},UT=typeof Uint32Array===HT?Array:Uint32Array,XT=typeof Int32Array===HT?Array:Int32Array,YT=typeof Uint16Array===HT?Array:Uint16Array,jT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],qT=["_extent","_approximateExtent","_rawExtent"],KT=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},o=0;o<t.length;o++){var a=t[o];b(a)&&(a={name:a});var s=a.name;a.type=a.type||"float",a.coordDim||(a.coordDim=s,a.coordDimIndex=0),a.otherDims=a.otherDims||{},n.push(s),i[s]=a,a.index=o,a.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,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=Pu(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},$T=KT.prototype;$T.type="list",$T.hasItemOption=!0,$T.getDimension=function(t){return("number"==typeof t||!isNaN(t)&&!this._dimensionInfos.hasOwnProperty(t))&&(t=this.dimensions[t]),t},$T.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},$T.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},$T.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return e===!0?(n||[]).slice():n&&n[e]},$T.initData=function(t,e,i){var n=qa.isInstance(t)||d(t);n&&(t=new zs(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=sI[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=sI.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},$T.getProvider=function(){return this._rawData},$T.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},$T.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,o=r.length,a=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;o>h;h++){var c=r[h];a[c]||(a[c]=ju()),n[c]||(n[c]=[]),Vu(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(o),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),v=f%i,m=0;o>m;m++){var c=r[m],y=this._dimValueGetterArrayRows(t[p]||d,c,p,m);n[c][g][v]=y;var _=a[c];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},Fu(this)},$T._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=a[p];c[g]||(c[g]=ju());var v=l[g];0===v.otherDims.itemName&&(i=this._nameDimIdx=p),0===v.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),Vu(o,v,n,f,e),this._chunkCount=o[g].length}for(var m=new Array(s),y=t;e>y;y++){m=r.getItem(y,m);for(var _=Math.floor(y/n),x=y%n,w=0;s>w;w++){var g=a[w],b=o[g][_],M=this._dimValueGetter(m,g,y,w);b[x]=M;var S=c[g];M<S[0]&&(S[0]=M),M>S[1]&&(S[1]=M)}if(!r.pure){var I=u[y];if(m&&null==I)if(null!=m.name)u[y]=I=m.name;else if(null!=i){var T=a[i],A=o[T][_];if(A){I=A[x];var C=l[T].ordinalMeta;C&&C.categories.length&&(I=C.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(h[y]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Fu(this)}},$T.count=function(){return this._count},$T.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var r=0;n>r;r++)t[r]=e[r]}else t=new i(e.buffer,0,n)}else for(var i=Eu(this),t=new i(this.count()),r=0;r<t.length;r++)t[r]=r;return t},$T.get=function(t,e){if(!(e>=0&&e<this._count))return 0/0;var i=this._storage;if(!i[t])return 0/0;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize,o=i[t][n],a=o[r];return a},$T.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return 0/0;var i=this._storage[t];if(!i)return 0/0;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize,o=i[n];return o[r]},$T._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize,r=this._storage[t][i];return r[n]},$T.getValues=function(t,e){var i=[];x(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;r>n;n++)i.push(this.get(t[n],e));return i},$T.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},$T.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=ju();if(!e)return i;var n,r=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var a=n[0],s=n[1],l=0;r>l;l++){var u=this._getFast(t,this.getRawIndex(l));a>u&&(a=u),u>s&&(s=u)}return n=[a,s],this._extent[t]=n,n},$T.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},$T.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},$T.getCalculationInfo=function(t){return this._calculationInfo[t]},$T.setCalculationInfo=function(t,e){FT(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},$T.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,r=this.count();r>n;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},$T.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},$T.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?WT:n},$T.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},$T.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||0>t)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;r>=n;){var o=(n+r)/2|0;if(e[o]<t)n=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},$T.indicesOfNearest=function(t,e,i){var n=this._storage,r=n[t],o=[];if(!r)return o;null==i&&(i=1/0);for(var a=Number.MAX_VALUE,s=-1,l=0,u=this.count();u>l;l++){var h=e-this.get(t,l),c=Math.abs(h);i>=h&&a>=c&&((a>c||h>=0&&0>s)&&(a=c,s=h,o.length=0),o.push(l))}return o},$T.getRawIndex=Wu,$T.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},$T.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Hu(this,this._nameDimIdx,e)||""},$T.getId=function(t){return Zu(this,this.getRawIndex(t))},$T.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(Uu(t),this.getDimension,this);for(var r=t.length,o=0;o<this.count();o++)switch(r){case 0:e.call(i,o);break;case 1:e.call(i,this.get(t[0],o),o);break;case 2:e.call(i,this.get(t[0],o),this.get(t[1],o),o);break;default:for(var a=0,s=[];r>a;a++)s[a]=this.get(t[a],o);s[a]=o,e.apply(i,s)}}},$T.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(Uu(t),this.getDimension,this);for(var r=this.count(),o=Eu(this),a=new o(r),s=[],l=t.length,u=0,h=t[0],c=0;r>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var v=0;l>v;v++)s[v]=this._getFast(h,f);s[v]=c,d=e.apply(i,s)}d&&(a[u++]=f)}return r>u&&(this._indices=a),this._count=u,this._extent={},this.getRawIndex=this._indices?Gu:Wu,this}},$T.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var r=this.count(),o=Eu(this),a=new o(r),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=f[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m];(y>=u&&h>=y||isNaN(y))&&(a[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],w=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=f[p],b=_[p],v=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;v>m;m++){var y=g[m],M=b[m];(y>=u&&h>=y||isNaN(y))&&(M>=x&&w>=M||isNaN(M))&&(a[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var m=0;r>m;m++){var S=this.getRawIndex(m),y=this._getFast(l,S);(y>=u&&h>=y||isNaN(y))&&(a[s++]=S)}else for(var m=0;r>m;m++){for(var I=!0,S=this.getRawIndex(m),p=0;n>p;p++){var T=e[p],y=this._getFast(i,S);(y<t[T][0]||y>t[T][1])&&(I=!1)}I&&(a[s++]=this.getRawIndex(m))}return r>s&&(this._indices=a),this._count=s,this._extent={},this.getRawIndex=this._indices?Gu:Wu,this}}},$T.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},$T.map=function(t,e,i,n){i=i||n||this,t=p(Uu(t),this.getDimension,this);var r=Xu(this,t);r._indices=this._indices,r.getRawIndex=r._indices?Gu:Wu;for(var o=r._storage,a=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=r._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(a[0]=g,g=a);for(var v=this.getRawIndex(d),m=Math.floor(v/s),y=v%s,_=0;_<g.length;_++){var x=t[_],w=g[_],b=c[x],M=o[x];M&&(M[m][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return r},$T.downSample=function(t,e,i,n){for(var r=Xu(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Eu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,a.length=s);for(var g=0;s>g;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/h),y=v%h;a[g]=l[m][y]}var _=i(a),x=this.getRawIndex(Math.min(p+n(a,_)||0,u-1)),w=Math.floor(x/h),b=x%h;l[w][b]=_,_<c[0]&&(c[0]=_),_>c[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Gu,r},$T.getItemModel=function(t){var e=this.hostModel;return new ia(this.getRawDataItem(t),e,e&&e.ecModel)},$T.diff=function(t){var e=this;return new ku(t?t.getIndices():[],this.getIndices(),function(e){return Zu(t,e)},function(t){return Zu(e,t)})},$T.getVisual=function(t){var e=this._visual;return e&&e[t]},$T.setVisual=function(t,e){if(FT(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},$T.setLayout=function(t,e){if(FT(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},$T.getLayout=function(t){return this._layout[t]},$T.getItemLayout=function(t){return this._itemLayouts[t]},$T.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},$T.clearItemLayouts=function(){this._itemLayouts.length=0},$T.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},$T.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,FT(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],r[o]=!0);else n[e]=i,r[e]=!0},$T.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var JT=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};$T.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(JT,e)),this._graphicEls[t]=e},$T.getItemGraphicEl=function(t){return this._graphicEls[t]},$T.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},$T.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new KT(e,this.hostModel)}if(t._storage=this._storage,Bu(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Gu:Wu,t},$T.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(L(arguments)))})},$T.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],$T.CHANGABLE_METHODS=["filterSelf","selectRange"];var QT=function(t,e){return e=e||{},qu(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};rh.prototype.parse=function(t){return t},rh.prototype.getSetting=function(t){return this._setting[t]},rh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},rh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},rh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},rh.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},rh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},rh.prototype.getExtent=function(){return this._extent.slice()},rh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},rh.prototype.isBlank=function(){return this._isBlank},rh.prototype.setBlank=function(t){this._isBlank=t},rh.prototype.getLabel=null,or(rh),ur(rh,{registerWhenExtend:!0}),oh.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,sh);return new oh({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var tA=oh.prototype;tA.getOrdinal=function(t){return ah(this).get(t)},tA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=ah(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var eA=rh.prototype,iA=rh.extend({type:"ordinal",init:function(t,e){(!t||x(t))&&(t=new oh({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),eA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return eA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(eA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this.isBlank()?void 0: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:F,niceExtent:F});iA.create=function(){return new iA};var nA=ca,rA=ca,oA=rh.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),oA.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=uh(t)},getTicks:function(){return dh(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=pa(t)||0:"auto"===i&&(i=this._intervalPrecision),t=rA(t,i,!0),Ta(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){0>r&&(r=-r,n.reverse());var o=lh(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=rA(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=rA(Math.ceil(e[1]/r)*r))}});oA.create=function(){return new oA};var aA="__ec_stack_",sA=.5,lA="undefined"!=typeof Float32Array?Float32Array:Array,uA={seriesType:"bar",plan:vI(),reset:function(t){function e(t,e){for(var i,c=t.count,d=new lA(2*c),f=new lA(c),p=[],g=[],v=0,m=0;null!=(i=t.next());)g[u]=e.get(a,i),g[1-u]=e.get(s,i),p=n.dataToPoint(g,null,p),d[v++]=p[0],d[v++]=p[1],f[m++]=i;e.setLayout({largePoints:d,largeDataIndices:f,barWidth:h,valueAxisStart:bh(r,o,!1),valueAxisHorizontal:l})}if(xh(t)&&wh(t)){var i=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),o=n.getOtherAxis(r),a=i.mapDimension(o.dim),s=i.mapDimension(r.dim),l=o.isHorizontal(),u=l?0:1,h=yh(vh([t]),r,t).width;return h>sA||(h=sA),{progress:e}}}},hA=oA.prototype,cA=Math.ceil,dA=Math.floor,fA=1e3,pA=60*fA,gA=60*pA,vA=24*gA,mA=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i},yA=oA.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Oa(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=vA,e[1]+=vA),e[1]===-1/0&&1/0===e[0]){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-vA}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=ca(dA(e[0]/n)*n)),t.fixMax||(e[1]=ca(cA(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],o=r/t;null!=e&&e>o&&(o=e),null!=i&&o>i&&(o=i);var a=_A.length,s=mA(_A,o,0,a),l=_A[Math.min(s,a-1)],u=l[1];if("year"===l[0]){var h=r/u,c=ba(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(cA((n[0]-d)/u)*u+d),Math.round(dA((n[1]-d)/u)*u+d)];ch(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+_a(t)}});f(["contain","normalize"],function(t){yA.prototype[t]=function(e){return hA[t].call(this,this.parse(e))}});var _A=[["hh:mm:ss",fA],["hh:mm:ss",5*fA],["hh:mm:ss",10*fA],["hh:mm:ss",15*fA],["hh:mm:ss",30*fA],["hh:mm\nMM-dd",pA],["hh:mm\nMM-dd",5*pA],["hh:mm\nMM-dd",10*pA],["hh:mm\nMM-dd",15*pA],["hh:mm\nMM-dd",30*pA],["hh:mm\nMM-dd",gA],["hh:mm\nMM-dd",2*gA],["hh:mm\nMM-dd",6*gA],["hh:mm\nMM-dd",12*gA],["MM-dd\nyyyy",vA],["MM-dd\nyyyy",2*vA],["MM-dd\nyyyy",3*vA],["MM-dd\nyyyy",4*vA],["MM-dd\nyyyy",5*vA],["MM-dd\nyyyy",6*vA],["week",7*vA],["MM-dd\nyyyy",10*vA],["week",14*vA],["week",21*vA],["month",31*vA],["week",42*vA],["month",62*vA],["week",70*vA],["quarter",95*vA],["month",31*vA*4],["month",31*vA*5],["half-year",380*vA/2],["month",31*vA*8],["month",31*vA*10],["year",380*vA]];yA.create=function(t){return new yA({useUTC:t.ecModel.get("useUTC")})};var xA=rh.prototype,wA=oA.prototype,bA=pa,MA=ca,SA=Math.floor,IA=Math.ceil,TA=Math.pow,AA=Math.log,CA=rh.extend({type:"log",base:10,$constructor:function(){rh.apply(this,arguments),this._originalScale=new oA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return p(wA.getTicks.call(this),function(n){var r=ca(TA(this.base,n));return r=n===e[0]&&t.__fixMin?Mh(r,i[0]):r,r=n===e[1]&&t.__fixMax?Mh(r,i[1]):r},this)},getLabel:wA.getLabel,scale:function(t){return t=xA.scale.call(this,t),TA(this.base,t)},setExtent:function(t,e){var i=this.base;t=AA(t)/AA(i),e=AA(e)/AA(i),wA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=xA.getExtent.call(this);e[0]=TA(t,e[0]),e[1]=TA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Mh(e[0],n[0])),i.__fixMax&&(e[1]=Mh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=AA(t[0])/AA(e),t[1]=AA(t[1])/AA(e),xA.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=xa(i),r=t/i*n;for(.5>=r&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[ca(IA(e[0]/n)*n),ca(SA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){wA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){CA.prototype[t]=function(e){return e=AA(e)/AA(this.base),xA[t].call(this,e)}}),CA.create=function(){return new CA};var DA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:F,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},kA=no({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),LA=no({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),PA=no({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),d=Math.cos(u),f=.6*a,p=.7*a;t.moveTo(i-h,l+s),t.arc(i,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),OA=no({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),RA={line:PM,rect:kM,roundRect:kM,square:kM,circle:_M,diamond:LA,pin:PA,arrow:OA,triangle:kA},zA={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},EA={};f(RA,function(t,e){EA[e]=new t});var NA=no({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Xi(t,e,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var r=EA[n];r||(n="rect",r=EA[n]),zA[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i)}}}),BA={isDimensionStacked:Qu,enableDataStack:Ju,getStackedDimension:th},VA=(Object.freeze||Object)({createList:Nh,getLayoutRect:Va,dataStack:BA,createScale:Bh,mixinAxisModelCommonMethods:Vh,completeDimensions:qu,createDimensions:QT,createSymbol:Eh}),FA=1e-8;Wh.prototype={constructor:Wh,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],o=[],a=this.geometries,s=0;s<a.length;s++)if("polygon"===a[s].type){var l=a[s].exterior;Sr(l,r,o),ae(i,i,r),se(n,n,o)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new wi(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,r=i.length;r>n;n++)if("polygon"===i[n].type){var o=i[n].exterior,a=i[n].interiors;if(Hh(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(Hh(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=r.width/r.height;i?n||(n=i/o):i=o*n;for(var a=new wi(t,e,i,n),s=r.calculateTransform(a),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++)oe(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(var d=0;d<c[f].length;d++)oe(c[f][d],c[f][d],s)}r=this._rect,r.copy(a),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Wh(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var HA=function(t){return Gh(t),p(v(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&f(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new Wh(e.name,r,e.cp);return o.properties=e,o})},WA=$n(),GA=[0,1],ZA=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};ZA.prototype={constructor:ZA,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()
  },getPixelPrecision:function(t){return ga(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&(i=i.slice(),oc(i,n.count())),ua(t,GA,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),oc(i,n.count()));var r=ua(t,i,GA,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=Xh(this,e),n=i.ticks,r=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return ac(this,r,i.tickCategoryInterval,o,t.clamp),r},getViewLabels:function(){return Uh(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(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return ec(this)}};var UA=HA,XA={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){XA[t]=rx[t]});var YA={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){YA[t]=eS[t]});var jA=function(t){this._axes={},this._dimList=[],this.name=t||""};jA.prototype={constructor:jA,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,sc,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(this.getAxes(),function(e){return e.scale.type===t})},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 i=this._dimList,n=t instanceof Array?[]:{},r=0;r<i.length;r++){var o=i[r],a=this._axes[o];n[o]=a[e](t[o])}return n}},lc.prototype={constructor:lc,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"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return i=i||[],i[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),o=n.getExtent(),a=i.parse(t[0]),s=n.parse(t[1]);return e=e||[],e[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return e=e||[],e[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]),r=Math.max(t[0],t[1])-i,o=Math.max(e[0],e[1])-n,a=new wi(i,n,r,o);return a}},h(lc,jA);var qA=function(t,e,i,n,r){ZA.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};qA.prototype={constructor:qA,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},h(qA,ZA);var KA={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)"]}}},$A={};$A.categoryAxis=r({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},KA),$A.valueAxis=r({boundaryGap:[0,0],splitNumber:5},KA),$A.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},$A.valueAxis),$A.logAxis=s({scale:!0,logBase:10},$A.valueAxis);var JA=["value","category","time","log"],QA=function(t,e,i,n){f(JA,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?Ga(e):{},l=n.getTheme();r(e,l.get(a+"Axis")),r(e,this.getDefaultOption()),e.type=i(t,e),o&&Wa(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=oh.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},$A[a+"Axis"],n],!0)})}),TS.registerSubTypeDefaulter(t+"Axis",_(i,t))},tC=TS.extend({type:"cartesian2dAxis",axis:null,init:function(){tC.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){tC.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){tC.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(tC.prototype,DA);var eC={offset:0};QA("x",tC,uc,eC),QA("y",tC,uc,eC),TS.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 iC=cc.prototype;iC.type="grid",iC.axisPointerEnabled=!0,iC.getRect=function(){return this._rect},iC.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Th(t.scale,t.model)}),f(i.y,function(t){Th(t.scale,t.model)});var n={};f(i.x,function(t){dc(i,"y",t,n)}),f(i.y,function(t){dc(i,"x",t,n)}),this.resize(this.model,e)},iC.resize=function(t,e,i){function n(){f(o,function(t){var e=t.isHorizontal(),i=e?[0,r.width]:[0,r.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),pc(t,e?r.x:r.y)})}var r=Va(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;n(),!i&&t.get("containLabel")&&(f(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Lh(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}}),n())},iC.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},iC.getAxes=function(){return this._axesList.slice()},iC.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}M(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]},iC.getCartesians=function(){return this._coordsList.slice()},iC.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},iC.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},iC._findConvertTarget=function(t,e){var i,n,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)i=r.coordinateSystem,u(l,i)<0&&(i=null);else if(o&&a)i=this.getCartesian(o.componentIndex,a.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(a)n=this.getAxis("y",a.componentIndex);else if(s){var h=s.coordinateSystem;h===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},iC.containPoint=function(t){var e=this._coordsList[0];return e?e.containPoint(t):void 0},iC._initCartesian=function(t,e){function i(i){return function(a,s){if(hc(a,t,e)){var l=a.get("position");"x"===i?"top"!==l&&"bottom"!==l&&(l=n.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=n.left?"right":"left"),n[l]=!0;var u=new qA(i,Ah(a),[0,0],a.get("type"),l),h="category"===u.type;u.onBand=h&&a.get("boundaryGap"),u.inverse=a.get("inverse"),a.axis=u,u.model=a,u.grid=this,u.index=s,this._axesList.push(u),r[i][s]=u,o[i]++}}}var n={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},o={x:0,y:0};return e.eachComponent("xAxis",i("x"),this),e.eachComponent("yAxis",i("y"),this),o.x&&o.y?(this._axesMap=r,void f(r.x,function(e,i){f(r.y,function(n,r){var o="x"+i+"y"+r,a=new lc(o);a.grid=this,a.model=t,this._coordsMap[o]=a,this._coordsList.push(a),a.addAxis(e),a.addAxis(n)},this)},this)):(this._axesMap={},void(this._axesList=[]))},iC._updateScale=function(t,e){function i(t,e){f(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,th(t,i))})}f(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(vc(n)){var r=gc(n,t),o=r[0],a=r[1];if(!hc(o,e,t)||!hc(a,e,t))return;var s=this.getCartesian(o.componentIndex,a.componentIndex),l=n.getData(),u=s.getAxis("x"),h=s.getAxis("y");"list"===l.type&&(i(l,u,n),i(l,h,n))}},this)},iC.getTooltipAxes=function(t){var e=[],i=[];return f(this.getCartesians(),function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(r);u(e,r)<0&&e.push(r),u(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}};var nC=["xAxis","yAxis"];cc.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var o=new cc(n,t,e);o.name="grid_"+r,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if(vc(e)){var i=gc(e,t),n=i[0],r=i[1],o=n.getCoordSysModel(),a=o.coordinateSystem;e.coordinateSystem=a.getCartesian(n.componentIndex,r.componentIndex)}}),i},cc.dimensions=cc.prototype.dimensions=lc.prototype.dimensions,vs.register("cartesian2d",cc);var rC=fI.extend({type:"series.__base_bar__",getInitialData:function(){return eh(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size"),a=e.getBaseAxis().isHorizontal()?0:1;return i[a]+=r+o/2,i}return[0/0,0/0]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});rC.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return this.get("large")?this.get("progressive"):!1},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},defaultOption:{clip:!0}});var oC=cb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),aC={getBarItemStyle:function(t){var e=oC(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},sC=["itemStyle","barBorderWidth"],lC=[0,0];a(ia.prototype,aC),Iu({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),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(t){var e,i=this.group,n=t.getData(),r=this._data,o=t.coordinateSystem,a=o.getBaseAxis();"cartesian2d"===o.type?e=a.isHorizontal():"polar"===o.type&&(e="angle"===a.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Mc(o,n);i.removeClipPath(),n.diff(r).add(function(r){if(n.hasValue(r)){var a=n.getItemModel(r),h=fC[o.type](n,r,a);if(l){var c=cC[o.type](u,h);if(c)return void i.remove(d)}var d=dC[o.type](n,r,a,h,e,s);n.setItemGraphicEl(r,d),i.add(d),Tc(d,n,r,a,h,t,e,"polar"===o.type)}}).update(function(a,h){var c=r.getItemGraphicEl(h);if(!n.hasValue(a))return void i.remove(c);var d=n.getItemModel(a),f=fC[o.type](n,a,d);if(l){var p=cC[o.type](u,f);if(p)return void i.remove(c)}c?Go(c,{shape:f},s,a):c=dC[o.type](n,a,d,f,e,s,!0),n.setItemGraphicEl(a,c),i.add(c),Tc(c,n,a,d,f,t,e,"polar"===o.type)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Sc(t,s,e):e&&Ic(t,s,e)}).execute(),this._data=n},_renderLarge:function(t){this._clear(),Cc(t,this.group);var e=t.get("clip",!0)?bc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){Cc(e,this.group,!0)},dispose:F,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Ic(e.dataIndex,t,e):Sc(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var uC=Math.max,hC=Math.min,cC={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var r=uC(e.x,t.x),o=hC(e.x+e.width,t.x+t.width),a=uC(e.y,t.y),s=hC(e.y+e.height,t.y+t.height);e.x=r,e.y=a,e.width=o-r,e.height=s-a;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},dC={cartesian2d:function(t,e,i,n,r,o,s){var l=new kM({shape:a({},n)});if(o){var u=l.shape,h=r?"height":"width",c={};u[h]=0,c[h]=n[h],eS[s?"updateProps":"initProps"](l,{shape:c},o,e)}return l},polar:function(t,e,i,n,r,o,a){var l=n.startAngle<n.endAngle,u=new bM({shape:s({clockwise:l},n)});if(o){var h=u.shape,c=r?"r":"endAngle",d={};h[c]=r?0:n.startAngle,d[c]=n[c],eS[a?"updateProps":"initProps"](u,{shape:d},o,e)}return u}},fC={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),r=Ac(i,n),o=n.width>0?1:-1,a=n.height>0?1:-1;return{x:n.x+o*r/2,y:n.y+a*r/2,width:n.width-o*r,height:n.height-a*r}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},pC=Gr.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,r=this.__baseDimIdx,o=0;o<i.length;o+=2)n[r]=i[o+r],t.moveTo(n[0],n[1]),t.lineTo(i[o],i[o+1])}}),gC=sl(function(t){var e=this,i=Dc(e,t.offsetX,t.offsetY);e.dataIndex=i>=0?i:null},30,!1),vC=Math.PI,mC=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new rw;var i=new rw({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};mC.prototype={constructor:mC,hasBuilder:function(t){return!!yC[t]},add:function(t){yC[t].call(this)},getGroup:function(){return this.group}};var yC={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],o=[i[1],0];n&&(oe(r,r,n),oe(o,o,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new PM({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((r[0]-o[0])*(r[0]-o[0])+(r[1]-o[1])*(r[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=Eh(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,a=[r[0]+o*Math.cos(t.rotation),r[1]-o*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:a,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=Ec(this,t,e),n=Nc(this,t,e);Pc(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=C(t.axisName,e.get("name"));if(i){var n,r=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===r?u[0]-h*l:"end"===r?u[1]+h*l:(u[0]+u[1])/2,zc(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*vC/180);var f;zc(r)?n=xC(t.rotation,null!=d?d:t.rotation,o):(n=Lc(t,r,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=C(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=v&&null!=m?yS(i,m,p,v,{minChar:2,placeholder:g.placeholder}):i,_=e.get("tooltip",!0),x=e.mainType,w={componentType:x,name:i,$vars:["name"]};w[x+"Index"]=e.componentIndex;var b=new yM({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:wC(e),z2:1,tooltip:_&&_.show?a({content:i,formatter:function(){return i},formatterParams:w},_):null});Oo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=_C(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},_C=mC.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},xC=mC.innerTextLayout=function(t,e,i){var n,r,o=ma(e-t);return ya(o)?(r=i>0?"top":"bottom",n="center"):ya(o-vC)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&vC>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:r}},wC=mC.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},bC=f,MC=_,SC=Mu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Zc(t),SC.superApply(this,"render",arguments),qc(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){qc(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),SC.superApply(this,"remove",arguments)},dispose:function(t,e){Kc(this,e),SC.superApply(this,"dispose",arguments)}}),IC=[];SC.registerAxisPointerClass=function(t,e){IC[t]=e},SC.getAxisPointerClass=function(t){return t&&IC[t]};var TC=["axisLine","axisTickLabel","axisName"],AC=["splitArea","splitLine"],CC=SC.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new rw,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=$c(o,t),s=new mC(t,a);f(TC,s.add,s),this._axisGroup.add(s.getGroup()),f(AC,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),jo(r,this._axisGroup,t),CC.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),o=r.get("color");o=x(o)?o:[o];for(var a=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=r.getLineStyle(),p=0;p<h.length;p++){var g=i.toGlobalCoord(h[p].coord);l?(c[0]=g,c[1]=a.y,d[0]=g,d[1]=a.y+a.height):(c[0]=a.x,c[1]=g,d[0]=a.x+a.width,d[1]=g);var v=u++%o.length,m=h[p].tickValue;this._axisGroup.add(new PM({anid:null!=m?"line_"+h[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:s({stroke:o[v]},f),silent:!0}))}}},_splitArea:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),r=n.getModel("areaStyle"),o=r.get("color"),a=e.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:n,clamp:!0});if(l.length){var u=o.length,h=this._splitAreaColors,c=B(),d=0;if(h)for(var f=0;f<l.length;f++){var p=h.get(l[f].tickValue);if(null!=p){d=(p+(u-1)*f)%u;break}}var g=i.toGlobalCoord(l[0].coord),v=r.getAreaStyle();o=x(o)?o:[o];for(var f=1;f<l.length;f++){var m,y,_,w,b=i.toGlobalCoord(l[f].coord);i.isHorizontal()?(m=g,y=a.y,_=b-m,w=a.height,g=m+_):(m=a.x,y=g,_=a.width,w=b-y,g=y+w);var M=l[f-1].tickValue;null!=M&&c.set(M,d),this._axisGroup.add(new kM({anid:null!=M?"area_"+M:null,shape:{x:m,y:y,width:_,height:w},style:s({fill:o[d]},v),silent:!0})),d=(d+1)%u}this._splitAreaColors=c}}}});CC.extend({type:"xAxis"}),CC.extend({type:"yAxis"}),Mu({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new kM({shape:t.coordinateSystem.getRect(),style:s({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),du(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),yu(mT.VISUAL.LAYOUT,_(_h,"bar")),yu(mT.VISUAL.PROGRESSIVE_LAYOUT,uA),_u({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),fI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return eh(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var DC=Jc.prototype,kC=Jc.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};DC._createSymbol=function(t,e,i,n,r){this.removeAll();var o=e.getItemVisual(i,"color"),a=Eh(t,-1,-1,2,2,o,r);a.attr({z2:100,culling:!0,scale:Qc(n)}),a.drift=td,this._symbolType=t,this.add(a)},DC.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},DC.getSymbolPath=function(){return this.childAt(0)},DC.getScale=function(){return this.childAt(0).scale},DC.highlight=function(){this.childAt(0).trigger("emphasis")},DC.downplay=function(){this.childAt(0).trigger("normal")},DC.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},DC.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},DC.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,o=kC(t,e),a=n!==this._symbolType;if(a){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,o,s)}else{var l=this.childAt(0);l.silent=!1,Go(l,{scale:Qc(o)},r,e)}if(this._updateCommon(t,e,o,i),a){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Zo(l,h,r,e)}this._seriesModel=r};var LC=["itemStyle"],PC=["emphasis","itemStyle"],OC=["label"],RC=["emphasis","label"];DC._updateCommon=function(t,e,i,n){function r(e){return b?t.getName(e):mc(t,e)}var o=this.childAt(0),s=t.hostModel,l=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var u=n&&n.itemStyle,h=n&&n.hoverItemStyle,c=n&&n.symbolRotate,d=n&&n.symbolOffset,f=n&&n.labelModel,p=n&&n.hoverLabelModel,g=n&&n.hoverAnimation,v=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);u=m.getModel(LC).getItemStyle(["color"]),h=m.getModel(PC).getItemStyle(),c=m.getShallow("symbolRotate"),d=m.getShallow("symbolOffset"),f=m.getModel(OC),p=m.getModel(RC),g=m.getShallow("hoverAnimation"),v=m.getShallow("cursor")}else h=a({},h);var y=o.style;o.attr("rotation",(c||0)*Math.PI/180||0),d&&o.attr("position",[ha(d[0],i[0]),ha(d[1],i[1])]),v&&o.attr("cursor",v),o.setColor(l,n&&n.symbolInnerColor),o.setStyle(u);var _=t.getItemVisual(e,"opacity");null!=_&&(y.opacity=_);var x=t.getItemVisual(e,"liftZ"),w=o.__z2Origin;null!=x?null==w&&(o.__z2Origin=o.z2,o.z2+=x):null!=w&&(o.z2=w,o.__z2Origin=null);var b=n&&n.useNameLabel;Lo(y,h,f,p,{labelFetcher:s,labelDataIndex:e,defaultText:r,isRectText:!0,autoColor:l}),o.__symbolOriginalScale=Qc(i),o.hoverStyle=h,o.highDownOnUpdate=g&&s.isAnimationEnabled()?ed:null,Ao(o)},DC.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Go(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Jc,rw);var zC=id.prototype;zC.updateData=function(t,e){e=rd(e);var i=this.group,n=t.hostModel,r=this._data,o=this._symbolCtor,a=od(t);r||i.removeAll(),t.diff(r).add(function(n){var r=t.getItemLayout(n);if(nd(t,r,n,e)){var s=new o(t,n,a);s.attr("position",r),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=r.getItemGraphicEl(l),h=t.getItemLayout(s);return nd(t,h,s,e)?(u?(u.updateData(t,s,a),Go(u,{position:h},n)):(u=new o(t,s),u.attr("position",h)),i.add(u),void t.setItemGraphicEl(s,u)):void i.remove(u)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},zC.isPersistent=function(){return!0},zC.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},zC.incrementalPrepareUpdate=function(t){this._seriesScope=od(t),this._data=null,this.group.removeAll()},zC.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=rd(i);for(var r=t.start;r<t.end;r++){var o=e.getItemLayout(r);if(nd(e,o,r,i)){var a=new this._symbolCtor(e,r,this._seriesScope);a.traverse(n),a.attr("position",o),this.group.add(a),e.setItemGraphicEl(r,a)}}},zC.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var EC=function(t,e,i,n,r,o,a,s){for(var l=ud(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],v=ad(r,e,a),m=ad(o,t,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var w=t.getItemLayout(_.idx),b=e.getItemLayout(_.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[_.idx]),d.push(n[_.idx1]),g.push(e.getRawIndex(_.idx1));break;case"+":var M=_.idx;u.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],M),e.get(v.dataDimsForPoint[1],M)])),h.push(e.getItemLayout(M).slice()),c.push(ld(v,r,e,M)),d.push(n[M]),g.push(e.getRawIndex(M));break;case"-":var M=_.idx,S=t.getRawIndex(M);S!==M?(u.push(t.getItemLayout(M)),h.push(o.dataToPoint([t.get(m.dataDimsForPoint[0],M),t.get(m.dataDimsForPoint[1],M)])),c.push(i[M]),d.push(ld(m,o,t,M)),g.push(S)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});for(var I=[],T=[],A=[],C=[],D=[],y=0;y<p.length;y++){var M=p[y];I[y]=u[M],T[y]=h[M],A[y]=c[M],C[y]=d[M],D[y]=f[M]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:C,status:D}},NC=ae,BC=se,VC=X,FC=W,HC=[],WC=[],GC=[],ZC=Gr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:wM(Gr.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,o=pd(i,e.smoothConstraint);if(e.connectNulls){for(;r>0&&hd(i[r-1]);r--);for(;r>n&&hd(i[n]);n++);}for(;r>n;)n+=cd(t,i,n,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),UC=Gr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:wM(Gr.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,r=0,o=i.length,a=e.smoothMonotone,s=pd(i,e.smoothConstraint),l=pd(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&hd(i[o-1]);o--);for(;o>r&&hd(i[r]);r++);}for(;o>r;){var u=cd(t,i,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);cd(t,n,r+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=u+1,t.closePath()}}});il.extend({type:"line",init:function(){var t=new rw,e=new id;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=l.get("origin"),_=ad(n,o,y),x=md(n,o,_),w=t.get("showSymbol"),b=w&&!h&&xd(t,o,n),M=this._data;M&&M.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),M.setItemGraphicEl(e,null))}),w||d.remove(),r.add(g);var S,I=!h&&t.get("step");n&&n.getArea&&(S=n.getArea(),null!=S.width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r1+=.5)),f&&c.type===n.type&&I===this._step?(m&&!p?p=this._newPolygon(u,x,n,v):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(bd(n,!1,t)),w&&d.updateData(o,{isIgnore:b,clipShape:S}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),gd(this._stackedOnPoints,x)&&gd(this._points,u)||(v?this._updateAnimation(o,x,n,i,I,y):(I&&(u=yd(u,n,I),x=yd(x,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:x})))):(w&&d.updateData(o,{isIgnore:b,clipShape:S}),I&&(u=yd(u,n,I),x=yd(x,n,I)),f=this._newPolyline(u,n,v),m&&(p=this._newPolygon(u,x,n,v)),g.setClipPath(bd(n,!0,t)));var T=_d(o,n)||o.getVisual("color");f.useStyle(s(a.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=vd(t.get("smooth")),f.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var C=o.getCalculationInfo("stackedOnSeries"),D=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),C&&(D=vd(C.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=Kn(r,n);if(!(o instanceof Array)&&null!=o&&o>=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;a=new Jc(r,o),a.position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else il.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=Kn(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else il.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ZC({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new UC({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i
  },_updateAnimation:function(t,e,i,n,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=EC(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;r&&(h=yd(u.current,i,r),c=yd(u.stackedOnCurrent,i,r),d=yd(u.next,i,r),f=yd(u.stackedOnNext,i,r)),a.shape.__points=u.current,a.shape.points=h,Go(a,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Go(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,v=0;v<g.length;v++){var m=g[v].cmd;if("="===m){var y=t.getItemGraphicEl(g[v].idx1);y&&p.push({el:y,ptIdx:v})}}a.animators&&a.animators.length&&a.animators[0].during(function(){for(var t=0;t<p.length;t++){var e=p[t].el;e.attr("position",a.shape.__points[p[t].ptIdx])}})},remove:function(){var t=this.group,e=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),e&&e.eachItemGraphicEl(function(i,n){i.__temp&&(t.remove(i),e.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var XC=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n){function r(e,i){if(c){var n=t.getRawValue(i),r=t.getDataParams(i);u&&e.setItemVisual(i,"symbol",a(n,r)),h&&e.setItemVisual(i,"symbolSize",s(n,r))}if(e.hasItemOption){var o=e.getItemModel(i),l=o.getShallow("symbol",!0),d=o.getShallow("symbolSize",!0),f=o.getShallow("symbolKeepAspect",!0);null!=l&&e.setItemVisual(i,"symbol",l),null!=d&&e.setItemVisual(i,"symbolSize",d),null!=f&&e.setItemVisual(i,"symbolKeepAspect",f)}}var o=t.getData(),a=t.get("symbol"),s=t.get("symbolSize"),l=t.get("symbolKeepAspect"),u=w(a),h=w(s),c=u||h,d=!u&&a?a:e,f=h?null:s;return o.setVisual({legendSymbol:i||d,symbol:d,symbolSize:f,symbolKeepAspect:l}),n.isSeriesFiltered(t)?void 0:{dataEach:o.hasItemOption||c?r:null}}}},YC=function(t){return{seriesType:t,plan:vI(),reset:function(t){function e(t,e){for(var i=t.end-t.start,r=o&&new Float32Array(i*s),l=t.start,u=0,h=[],c=[];l<t.end;l++){var d;if(1===s){var f=e.get(a[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,c)}else{var f=h[0]=e.get(a[0],l),p=h[1]=e.get(a[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(h,null,c)}o?(r[u++]=d?d[0]:0/0,r[u++]=d?d[1]:0/0):e.setItemLayout(l,d&&d.slice()||[0/0,0/0])}o&&e.setLayout("symbolPoints",r)}var i=t.getData(),n=t.coordinateSystem,r=t.pipelineContext,o=r.large;if(n){var a=p(n.dimensions,function(t){return i.mapDimension(t)}).slice(0,2),s=a.length,l=i.getCalculationInfo("stackResultDimension");return Qu(i,a[0])&&(a[0]=l),Qu(i,a[1])&&(a[1]=l),s&&{progress:e}}}}},jC={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?0/0:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:0/0},nearest:function(t){return t[0]}},qC=function(t){return Math.round(t.length/2)},KC=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t){var e=t.getData(),i=t.get("sampling"),n=t.coordinateSystem;if("cartesian2d"===n.type&&i){var r=n.getBaseAxis(),o=n.getOtherAxis(r),a=r.getExtent(),s=a[1]-a[0],l=Math.round(e.count()/s);if(l>1){var u;"string"==typeof i?u=jC[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,qC))}}}}};_u(XC("line","circle","line")),yu(YC("line")),fu(mT.PROCESSOR.STATISTIC,KC("line"));var $C=function(t,e,i){e=x(e)&&{coordDimensions:e}||a({},e);var n=t.getSource(),r=QT(n,e),o=new KT(r,t);return o.initData(n,i),o},JC={updateSelectedMap:function(t){this._targetList=x(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},QC=Su({type:"series.pie",init:function(t){QC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){QC.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return $C(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,r=t.count();r>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Gs(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=QC.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=va(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Wn(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,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",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(QC,JC);var tD=Id.prototype;tD.updateData=function(t,e,i){var n=this.childAt(0),r=this.childAt(1),o=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=a({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,Zo(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,Go(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):Go(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&n.attr("cursor",g),Sd(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation"));var v=!i&&"transition"===d;this._updateLabel(t,e,v),this.highDownOnUpdate=u.get("hoverAnimation")&&l.isAnimationEnabled()?function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,o.ignore=o.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")):(r.ignore=r.normalIgnore,o.ignore=o.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut"))}:null,Ao(this)},tD._updateLabel=function(t,e,i){var n=this.childAt(1),r=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(r.ignore=r.normalIgnore=r.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(Go(n,{shape:h},o,e),Go(r,{style:c},o,e)):(n.attr({shape:h}),r.attr({style:c})),r.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=a.getModel("label"),f=a.getModel("emphasis.label"),p=a.getModel("labelLine"),g=a.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Lo(r.style,r.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!d.get("show"),r.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var v=p.get("smooth");v&&v===!0&&(v=.4),n.setShape({smooth:v})},h(Id,rw);var eD=(il.extend({type:"pie",init:function(){var t=new rw;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var r=t.getData(),o=this._data,a=this.group,s=e.get("animation"),l=!o,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=_(Md,this.uid,t,s,i),d=t.get("selectedMode");if(r.diff(o).add(function(t){var e=new Id(r,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(r,t),i.off("click"),d&&i.on("click",c),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),s&&r.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=r.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<r.count();++p)f=r.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,v=y(a.removeClipPath,a);a.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,v,t,l))}else a.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,o,a,s){var l=new bM({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}}),u=s?Zo:Go;return u(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),l},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var r=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(r*r+o*o);return a<=n.r&&a>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",gu(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r,seriesId:i.seriesId}})})}),iD=function(t){return{getTargetSeries:function(e){var i={},n=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(r){var o,a=i[r],s=null!=a&&n.getItemVisual(a,"color",!0),l=null!=a&&n.getItemVisual(a,"borderColor",!0);if(s&&l||(o=e.getItemModel(r)),s)e.setItemVisual(r,"color",s);else{var u=o.get("itemStyle.color")||t.getColorFromPalette(e.getName(r)||r+"",t.__paletteScope,e.count());e.setItemVisual(r,"color",u),null!=a&&n.setItemVisual(a,"color",u)}if(l)e.setItemVisual(r,"borderColor",l);else{var h=o.get("itemStyle.borderColor");e.setItemVisual(r,"borderColor",h),null!=a&&n.setItemVisual(a,"borderColor",h)}})}}},nD=Math.PI/180,rD=function(t,e,i,n){var r,o,a=t.getData(),s=[],l=!1,u=(t.get("minShowLabelAngle")||0)*nD;a.each(function(i){var n=a.getItemLayout(i),h=a.getItemModel(i),c=h.getModel("label"),d=c.get("position")||h.get("emphasis.label.position"),f=h.getModel("labelLine"),p=f.get("length"),g=f.get("length2");if(!(n.angle<u)){var v,m,y,_,x=(n.startAngle+n.endAngle)/2,w=Math.cos(x),b=Math.sin(x);r=n.cx,o=n.cy;var M="inside"===d||"inner"===d;if("center"===d)v=n.cx,m=n.cy,_="center";else{var S=(M?(n.r+n.r0)/2*w:n.r*w)+r,I=(M?(n.r+n.r0)/2*b:n.r*b)+o;if(v=S+3*w,m=I+3*b,!M){var T=S+w*(p+e-n.r),A=I+b*(p+e-n.r),C=T+(0>w?-1:1)*g,D=A;v=C+(0>w?-5:5),m=D,y=[[S,I],[T,A],[C,D]]}_=M?"center":w>0?"left":"right"}var k,L=c.getFont(),P=c.get("rotate");k="number"==typeof P?P*(Math.PI/180):P?0>w?-x+Math.PI:-x:0;var O=t.getFormattedLabel(i,"normal")||a.getName(i),R=Hi(O,L,_,"top");l=!!k,n.label={x:v,y:m,position:d,height:R.height,len:p,len2:g,linePoints:y,textAlign:_,verticalAlign:"middle",rotation:k,inside:M},M||s.push(n.label)}}),!l&&t.get("avoidLabelOverlap")&&Ad(s,r,o,e,i,n)},oD=2*Math.PI,aD=Math.PI/180,sD=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),r=t.get("center"),o=t.get("radius");x(o)||(o=[0,o]),x(r)||(r=[r,r]);var a=i.getWidth(),s=i.getHeight(),l=Math.min(a,s),u=ha(r[0],a),h=ha(r[1],s),c=ha(o[0],l/2),d=ha(o[1],l/2),f=-t.get("startAngle")*aD,p=t.get("minAngle")*aD,g=0;e.each(n,function(t){!isNaN(t)&&g++});var v=e.getSum(n),m=Math.PI/(v||g)*2,y=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(n);b[0]=0;var M=oD,S=0,I=f,T=y?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:y,cx:u,cy:h,r0:c,r:_?0/0:d});n="area"!==_?0===v&&w?m:t*m:oD/g,p>n?(n=p,M-=p):S+=t;var r=I+T*n;e.setItemLayout(i,{angle:n,startAngle:I,endAngle:r,clockwise:y,cx:u,cy:h,r0:c,r:_?ua(t,b,[c,d]):d}),I=r}),oD>M&&g)if(.001>=M){var A=oD/g;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=A,n.startAngle=f+T*i*A,n.endAngle=f+T*(i+1)*A}})}else m=M/S,I=f,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),r=n.angle===p?p:t*m;n.startAngle=I,n.endAngle=I+T*r,I+=T*r}});rD(t,d,a,s)})},lD=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),r=0;r<i.length;r++)if(!i[r].isSelected(e))return!1;return!0})}}}};eD("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),_u(iD("pie")),yu(_(sD,"pie")),fu(lD("pie"));var uD=f,hD="\x00__link_datas",cD="\x00__link_mainData",dD=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};dD.prototype={constructor:dD,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,r=t.order||"preorder",o=this[t.attr||"children"];"preorder"===r&&(n=e.call(i,this));for(var a=0;!n&&a<o.length;a++)o[a].eachNode(t,e,i);"postorder"===r&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].getNodeById(t);if(r)return r}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var r=i[e].contains(t);if(r)return r}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.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){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),r=this.getLevelModel();return r||0!==this.children.length&&(0===this.children.length||this.isExpand!==!1)||(e=this.getLeavesModel()),n.getModel(t,(r||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){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)}},Nd.prototype={constructor:Nd,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},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,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Nd.createTree=function(t,e,i){function n(t,e){var i=t.value;a=Math.max(a,x(i)?i.length:1),o.push(t);var s=new dD(t.name,r);e?Bd(s,e):r.root=s,r._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)n(l[u],s)}var r=new Nd(e,i.levels,i.leaves),o=[],a=1;n(t),r.root.updateDepthAndHeight(0);var s=QT(o,{coordDimensions:["value"],dimensionsCount:a}),l=new KT(s,e);return l.initData(o),Dd({mainData:l,struct:r,structAttr:"tree"}),r.update(),r},fI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};Gd(i);var n=t.levels||[];n=t.levels=Zd(n,e);var r={};return r.levels=n,Nd.createTree(i,this,r).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Ta(x(i)?i[0]:i),r=e.getName(t);return Ca(r+": "+n)},getDataParams:function(t){var e=fI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Wd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=B(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var fD=8,pD=8,gD=5;Ud.prototype={constructor:Ud,render:function(t,e,i,n){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&i){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,a,s,n),Fa(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var r=n.getModel().get("name"),o=i.getTextRect(r),a=Math.max(o.width+2*fD,e.emptyItemWidth);e.totalWidth+=a+pD,e.renderList.push({node:n,text:r,width:a})}},_renderContent:function(t,e,i,n,r){for(var o=0,a=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=Ba(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,v=f.text;h>u.width&&(h-=g-a,g=a,v=null);var m=new TM({shape:{points:Xd(o,0,g,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:_(r,p)});this.group.add(m),Yd(m,t,p),o+=g+pD}},remove:function(){this.group.removeAll()}};var vD="\x00_ec_interaction_mutex";gu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(Jd,dx);var mD=y,yD=rw,_D=kM,xD=f,wD=3,bD=["label"],MD=["emphasis","label"],SD=["upperLabel"],ID=["emphasis","upperLabel"],TD=10,AD=1,CD=2,DD=cb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),kD=function(t){var e=DD(t);return e.stroke=e.fill=e.lineWidth=null,e};Iu({type:"treemap",init:function(){this._containerGroup,this._storage=uf(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var r=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(u(r,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=["treemapZoomToNode","treemapRootToNode"],a=Vd(n,o,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&a&&c?{rootNodeGroup:c.nodeGroup[a.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,a)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new yD,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,r,o){function a(t){return t.getId()}function s(a,s){var l=null!=a?t[a]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],h,r,o+1)}r?(e=t,xD(t,function(t,e){!t.isRemoved()&&s(e,e)})):new ku(e,t,a,a).add(s).update(s).remove(_(s,null)).execute()}function r(t){var e=uf();return t&&xD(t,function(t,i){var n=e[i];xD(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){xD(f,function(t){xD(t,function(t){t.parent&&t.parent.remove(t)})}),xD(c,function(t){t.invisible=!0,t.dirty()})}var a=e.getData().tree,s=this._oldTree,l=uf(),u=uf(),h=this._storage,c=[],d=_(hf,e,u,h,i,l,c);n(a.root?[a.root]:[],s&&s.root?[s.root]:[],t,a===s||!s,0);var f=r(h);return this._oldTree=a,this._storage=u,{lastsForAnimation:l,willDeleteEls:f,renderFinally:o}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var r=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=lf();xD(e.willDeleteEls,function(t,e){xD(t,function(t){if(!t.invisible){var i,a=t.parent;if(n&&"drillDown"===n.direction)i=a===n.rootNodeGroup?{shape:{x:0,y:0,width:a.__tmNodeWidth,height:a.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;a.__tmWillDelete||(l=a.__tmNodeWidth/2,u=a.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,r,o)}})}),xD(this._storage,function(t,i){xD(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,r,o))})},this),this._state="animating",s.done(mD(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new Jd(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",mD(this._onPan,this)),e.on("zoom",mD(this._onZoom,this)));var i=new wi(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&&(Math.abs(t.dx)>wD||Math.abs(t.dy)>wD)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var o=new wi(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=Ce();Pe(s,s,[-e,-i]),Re(s,s,[t.scale,t.scale]),Pe(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var r=n.hostTree.data.getItemModel(n.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(Hd(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Ud(this.group))).render(t,e,i.node,mD(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=uf(),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(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var r=this._storage.background[n.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}});for(var LD=function(){},PD=["treemapZoomToNode","treemapRender","treemapMove"],OD=0;OD<PD.length;OD++)gu({type:PD[OD],update:"updateView"},LD);gu({type:"treemapRootToNode",update:"updateView"},function(t,e){function i(e){var i=["treemapZoomToNode","treemapRootToNode"],n=Vd(t,i,e);if(n){var r=e.getViewRoot();r&&(t.direction=Hd(r,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}e.eachComponent({mainType:"series",subType:"treemap",query:t},i)});var RD=f,zD=M,ED=-1,ND=function(t){var e=t.mappingMethod,i=t.type,r=this.option=n(t);this.type=i,this.mappingMethod=e,this._normalizeData=VD[e];var o=BD[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(pf(r),df(r)):"category"===e?r.categories?ff(r):pf(r,!0):(O("linear"!==e||r.dataExtent),pf(r))};ND.prototype={constructor:ND,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var BD=ND.visualHandlers={color:{applyVisual:mf("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),yf.call(this,t)}:function(e,i,n){var r=!!n;return!i&&(e=this._normalizeData(e)),n=ti(e,t.parsedVisual,n),r?n:ri(n,"rgba")},this)},_doMap:{linear:function(t){return ri(ti(t,this.option.parsedVisual),"rgba")},category:yf,piecewise:function(t,e){var i=wf.call(this,e);return null==i&&(i=ri(ti(t,this.option.parsedVisual),"rgba")),i},fixed:_f}},colorHue:gf(function(t,e){return ii(t,e)}),colorSaturation:gf(function(t,e){return ii(t,null,e)}),colorLightness:gf(function(t,e){return ii(t,null,null,e)}),colorAlpha:gf(function(t,e){return ni(t,e)}),opacity:{applyVisual:mf("opacity"),_doMap:xf([0,1])},liftZ:{applyVisual:mf("liftZ"),_doMap:{linear:_f,category:_f,piecewise:_f,fixed:_f}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(b(n))i("symbol",n);else if(zD(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:vf,category:yf,piecewise:function(t,e){var i=wf.call(this,e);return null==i&&(i=vf.call(this,t)),i},fixed:_f}},symbolSize:{applyVisual:mf("symbolSize"),_doMap:xf([0,1])}},VD={linear:function(t){return ua(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=ND.findPieceIndex(t,e,!0);return null!=i?ua(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?ED:e},fixed:F};ND.listVisualTypes=function(){var t=[];return f(BD,function(e,i){t.push(i)}),t},ND.addVisualHandler=function(t,e){BD[t]=e},ND.isValidType=function(t){return BD.hasOwnProperty(t)},ND.eachVisual=function(t,e,i){M(t)?f(t,e,i):e.call(i,t)},ND.mapVisual=function(t,e,i){var n,r=x(t)?[]:M(t)?{}:(n=!0,null);return ND.eachVisual(t,function(t,o){var a=e.call(i,t,o);n?r=a:r[o]=a}),r},ND.retrieveVisuals=function(t){var e,i={};return t&&RD(BD,function(n,r){t.hasOwnProperty(r)&&(i[r]=t[r],e=!0)}),e?i:null},ND.prepareVisualTypes=function(t){if(zD(t)){var e=[];RD(t,function(t,i){e.push(i)}),t=e}else{if(!x(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},ND.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},ND.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);o>n&&(o=n,r=i)}for(var r,o=1/0,a=0,s=e.length;s>a;a++){var l=e[a].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return a;i&&n(l,a)}}for(var a=0,s=e.length;s>a;a++){var u=e[a],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Mf(c[1],t,h[1]))return a}else if(1/0===h[1]){if(Mf(c[0],h[0],t))return a}else if(Mf(c[0],h[0],t)&&Mf(c[1],t,h[1]))return a;i&&n(h[0],a),i&&n(h[1],a)}}return i?1/0===t?e.length-1:t===-1/0?0:r:void 0};var FD=x,HD="itemStyle",WD={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root,n=t.getModel(HD);if(!i.isRemoved()){var r=p(e.levelModels,function(t){return t?t.get(HD):null});Sf(i,{},r,n,t.getViewRoot().getAncestors(),t)}}},GD=Math.max,ZD=Math.min,UD=C,XD=f,YD=["itemStyle","borderWidth"],jD=["itemStyle","gapWidth"],qD=["upperLabel","show"],KD=["upperLabel","height"],$D={seriesType:"treemap",reset:function(t,e,i,n){var r=i.getWidth(),o=i.getHeight(),s=t.option,l=Va(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=ha(UD(l.width,u[0]),r),c=ha(UD(l.height,u[1]),o),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=Vd(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,v=t.getViewRoot(),m=Fd(v);if("treemapMove"!==d){var y="treemapZoomToNode"===d?Vf(t,p,v,h,c):g?[g.width,g.height]:[h,c],_=s.sort;_&&"asc"!==_&&"desc"!==_&&(_="desc");var x={squareRatio:s.squareRatio,sort:_,leafDepth:s.leafDepth};v.hostTree.clearLayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};v.setLayout(w),Pf(v,x,!1,0);var w=v.getLayout();XD(m,function(t,e){var i=(m[e+1]||v).getValue();t.setLayout(a({dataExtent:[i,i],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(Ff(l,g,p),!0),t.setLayoutInfo(l),Hf(b,new wi(-l.x,-l.y,r,o),m,v,0)}};_u(WD),yu($D),fI.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};Gf(e);var i=t.levels||[],n={};return n.levels=i,Nd.createTree(e,this,n).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=fI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Wd(i,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 JD={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},QD=2,tk=4,ek=Zf.prototype;ek.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesModel,o=o||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=a({},h);c.label=null;var d=Uf(e,n,o);jf(e,n,d);var f,p=u.getModel("itemStyle").getItemStyle();if("normal"===i)f=p;else{var g=u.getModel(i+".itemStyle").getItemStyle();f=r(g,p)}f=s({lineJoin:"bevel",fill:f.fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,Go(l,{shape:{r:h.r}},n,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(Go(l,{shape:c},n),l.useStyle(f)):Go(l,{shape:c,style:f},n),this._updateLabel(n,d,i);var v=u.getShallow("cursor");if(v&&l.attr("cursor",v),t){var m=n.getShallow("highlightPolicy");this._initEvents(l,e,n,m)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel},ek.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):Yf(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==JD.NONE&&i.piece.childAt(0).trigger("downplay"))})},ek.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},ek.onHighlight=function(){this.updateData(!1,this.node,"highlight")},ek.onDownplay=function(){this.updateData(!1,this.node,"downplay")},ek._updateLabel=function(t,e,i){function n(t){var e=a.get(t);return null==e?o.get(t):e}var r=this.node.getModel(),o=r.getModel("label"),a="normal"===i||"emphasis"===i?o:r.getModel(i+".label"),s=r.getModel("emphasis.label"),l=C(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getLayout(),h=a.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);Lo(d.style,d.hoverStyle||{},o,s,{defaultText:a.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var f,p=(u.startAngle+u.endAngle)/2,g=Math.cos(p),v=Math.sin(p),m=n("position"),y=n("distance")||0,_=n("align");"outside"===m?(f=u.r+y,_=p>Math.PI/2?"right":"left"):_&&"center"!==_?"left"===_?(f=u.r0+y,p>Math.PI/2&&(_="right")):"right"===_&&(f=u.r-y,p>Math.PI/2&&(_="left")):(f=(u.r+u.r0)/2,_="center"),d.attr("style",{text:l,textAlign:_,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var x=f*g+u.cx,w=f*v+u.cy;d.attr("position",[x,w]);var b=n("rotate"),M=0;"radial"===b?(M=-p,M<-Math.PI/2&&(M+=Math.PI)):"tangential"===b?(M=Math.PI/2-p,M>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI)):"number"==typeof b&&(M=b*Math.PI/180),d.attr("rotation",M)},ek._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,o=function(){r.onEmphasis(n)},a=function(){r.onNormal()},s=function(){r.onDownplay()},l=function(){r.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",s).on("highlight",l)},h(Zf,rw);var ik="sunburstRootToNode",nk=(il.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function r(t,e){function i(t){return t.getId()}function n(i,n){var r=null==i?null:t[i],a=null==n?null:e[n];o(r,a)}(0!==t.length||0!==e.length)&&new ku(e,t,i,i).add(n).update(n).remove(_(n,null)).execute()}function o(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var r=new Zf(i,t,e);d.add(r),u.setItemGraphicEl(i.dataIndex,r)}}function a(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new Zf(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var r=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=r,l.virtualPiece.on("click",r)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(r(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var v=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(v)}else if(n&&n.unhighlight){var m=this.virtualPiece;!m&&h.children.length&&(m=h.children[0].piece),m&&m.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var r=n.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(n);else if("link"===r){var o=n.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";window.open(a,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ik,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var r=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(r*r+o*o);return a<=n.r&&a>=n.r0}}}),"sunburstRootToNode");gu({type:nk,update:"updateView"},function(t,e){function i(e){var i=Vd(t,[nk],e);if(i){var n=e.getViewRoot();n&&(t.direction=Hd(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var rk="sunburstHighlight";gu({type:rk,update:"updateView"},function(t,e){function i(e){var i=Vd(t,[rk],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var ok="sunburstUnhighlight";gu({type:ok,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var ak=Math.PI/180,sk=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");x(n)||(n=[0,n]),x(e)||(e=[e,e]);var r=i.getWidth(),o=i.getHeight(),a=Math.min(r,o),s=ha(e[0],r),l=ha(e[1],o),u=ha(n[0],a/2),h=ha(n[1],a/2),c=-t.get("startAngle")*ak,d=t.get("minAngle")*ak,p=t.getData().tree.root,g=t.getViewRoot(),v=g.depth,m=t.get("sort");null!=m&&qf(g,m);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var _=g.getValue(),w=Math.PI/(_||y)*2,b=g.depth>0,M=g.height-(b?-1:1),S=(h-u)/(M||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,C=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),r=0===_&&T?w:n*w;d>r&&(r=d),i=e+A*r;var o=t.depth-v-(b?-1:1),h=u+S*o,c=u+S*(o+1),g=t.getModel();null!=g.get("r0")&&(h=ha(g.get("r0"),a/2)),null!=g.get("r")&&(c=ha(g.get("r"),a/2)),t.setLayout({angle:r,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var m=0;f(t.children,function(t){m+=C(t,e+m)})}return i-e}};if(b){var D=u,k=u+S,L=2*Math.PI;p.setLayout({angle:L,startAngle:c,endAngle:c+L,clockwise:I,cx:s,cy:l,r0:D,r:k})}C(g,c)})};_u(_(iD,"sunburst")),yu(_(sk,"sunburst")),fu(_(lD,"sunburst"));var lk="undefined"==typeof Uint32Array?Array:Uint32Array,uk="undefined"==typeof Float64Array?Array:Float64Array,hk=fI.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],$f(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),hk.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],$f(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}hk.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=V(this._flatCoords,e.flatCoords),this._flatCoordsOffset=V(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),i=e.option instanceof Array?e.option:e.getShallow("coords");return i},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],r=0;n>r;r++)e[r]=e[r]||[],e[r][0]=this._flatCoords[i+2*r],e[r][1]=this._flatCoords[i+2*r+1];return n}for(var o=this._getCoordsFromItemModel(t),r=0;r<o.length;r++)e[r]=e[r]||[],e[r][0]=o[r][0],e[r][1]=o[r][1];return o.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var i=t.length,n=new lk(i),r=new uk(i),o=0,a=0,s=0,l=0;i>l;){s++;var u=t[l++];n[a++]=o+e,n[a++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];r[o++]=c,r[o++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,a),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){var e=new KT(["value"],this);return e.hasItemOption=!1,e.initData(t.data,[],function(t,i,n,r){if(t instanceof Array)return 0/0;e.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[r]:o:void 0}),e},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var r=i.get("fromName"),o=i.get("toName"),a=[];return null!=r&&a.push(r),null!=o&&a.push(o),Ca(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),ck=PM.prototype,dk=RM.prototype,fk=no({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Jf(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:ck.buildPath,_buildPathCurve:dk.buildPath,pointAt:function(t){return this[Jf(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:ck.pointAt,_pointAtCurve:dk.pointAt,tangentAt:function(t){var e=this.shape,i=Jf(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:dk.tangentAt}),pk=["fromSymbol","toSymbol"],gk=rp.prototype;gk.beforeUpdate=np,gk._createLine=function(t,e,i){var n=t.hostModel,r=t.getItemLayout(e),o=ep(r);o.shape.percent=0,Zo(o,{shape:{percent:1}},n,e),this.add(o);var a=new yM({name:"label",lineLabelOriginalOpacity:1});this.add(a),f(pk,function(i){var n=tp(i,t,e);this.add(n),this[Qf(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},gk.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};ip(a.shape,o),Go(r,a,n,e),f(pk,function(i){var n=t.getItemVisual(e,i),r=Qf(i);if(this[r]!==n){this.remove(this.childOfName(i));var o=tp(i,t,e);this.add(o)}this[r]=n},this),this._updateCommonStl(t,e,i)},gk._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,a=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle").getLineStyle(),a=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=k(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),r.hoverStyle=a,f(pk,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,v=l.getShallow("show"),m=u.getShallow("show"),y=this.childOfName("label");if((v||m)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var _=n.getRawValue(e);g=null==_?t.getName(e):isFinite(_)?ca(_):_}var x=v?g:null,w=m?D(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;(null!=x||null!=w)&&(Oo(y.style,l,{text:x},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!v&&!m,Ao(this)},gk.highlight=function(){this.trigger("emphasis")},gk.downplay=function(){this.trigger("normal")},gk.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},gk.setLinePoints=function(t){var e=this.childOfName("line");ip(e.shape,t),e.dirty()},h(rp,rw);var vk=op.prototype;vk.isPersistent=function(){return!0},vk.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var r=lp(t);t.diff(n).add(function(i){ap(e,t,i,r)}).update(function(i,o){sp(e,n,t,o,i,r)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},vk.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},vk.incrementalPrepareUpdate=function(t){this._seriesScope=lp(t),this._lineData=null,this.group.removeAll()},vk.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){var r=e.getItemLayout(n);if(hp(r)){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}}},vk.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},vk._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var mk=cp.prototype;mk.createLine=function(t,e,i){return new rp(t,e,i)},mk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e),n=i.getModel("effect"),r=n.get("symbolSize"),o=n.get("symbol");x(r)||(r=[r,r]);var a=n.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==o&&(this.remove(s),s=Eh(o,-.5,-.5,1,1,a),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.attr("scale",r),s.setColor(a),s.attr("scale",r),this._symbolType=o,this._updateEffectAnimation(t,n,e))},mk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var r=this,o=t.getItemLayout(i),a=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=C(e.get("delay"),function(e){return e/t.count()*a/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,o),l>0&&(a=this.getLineLength(n)/l*1e3),a!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-a*n.__t),n.__t=0;var d=n.animate("",s).when(a,{__t:1}).delay(c).during(function(){r.updateSymbolPosition(n)});s||d.done(function(){r.remove(n)}),d.start()}this._period=a,this._loop=s}},mk.getLineLength=function(t){return lx(t.__p1,t.__cp1)+lx(t.__cp1,t.__p2)},mk.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]},mk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},mk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,r=t.__t,o=t.position,a=yr,s=_r;o[0]=a(e[0],n[0],i[0],r),o[1]=a(e[1],n[1],i[1],r);var l=s(e[0],n[0],i[0],r),u=s(e[1],n[1],i[1],r);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},mk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},h(cp,rw);var yk=dp.prototype;yk._createPolyline=function(t,e,i){var n=t.getItemLayout(e),r=new AM({shape:{points:n}});this.add(r),this._updateCommonStl(t,e,i)},yk.updateData=function(t,e,i){var n=t.hostModel,r=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};Go(r,o,n,e),this._updateCommonStl(t,e,i)},yk._updateCommonStl=function(t,e,i){var n=this.childAt(0),r=t.getItemModel(e),o=t.getItemVisual(e,"color"),a=i&&i.lineStyle,l=i&&i.hoverLineStyle;(!i||t.hasItemOption)&&(a=r.getModel("lineStyle").getLineStyle(),l=r.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(s({strokeNoScale:!0,fill:"none",stroke:o},a)),n.hoverStyle=l,Ao(this)},yk.updateLayout=function(t,e){var i=this.childAt(0);i.setShape("points",t.getItemLayout(e))},h(dp,rw);var _k=fp.prototype;_k.createLine=function(t,e,i){return new dp(t,e,i)},_k.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,r=1;r<e.length;r++){var o=e[r-1],a=e[r];n+=lx(o,a),i.push(n)}if(0!==n){for(var r=0;r<i.length;r++)i[r]/=n;this._offsets=i,this._length=n}},_k.getLineLength=function(){return this._length},_k.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,r=i.length;if(n){var o,a=this._lastFrame;if(e<this._lastFramePercent){var s=Math.min(a+1,r-1);for(o=s;o>=0&&!(n[o]<=e);o--);o=Math.min(o,r-2)}else{for(var o=a;r>o&&!(n[o]>e);o++);o=Math.min(o-1,r-2)}re(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},h(fp,cp);var xk=no({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var r=0;r<i.length;){var o=i[r++];if(o>0){t.moveTo(i[r++],i[r++]);for(var a=1;o>a;a++)t.lineTo(i[r++],i[r++])}}else for(var r=0;r<i.length;){var s=i[r++],l=i[r++],u=i[r++],h=i[r++];if(t.moveTo(s,l),n>0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,r=0;r<e.length;){var o=e[r++];if(o>0)for(var a=e[r++],s=e[r++],l=1;o>l;l++){var u=e[r++],h=e[r++];if(Dr(a,s,u,h))return n}n++}else for(var n=0,r=0;r<e.length;){var a=e[r++],s=e[r++],u=e[r++],h=e[r++];if(i>0){var c=(a+u)/2-(s-h)*i,d=(s+h)/2-(u-a)*i;if(Lr(a,s,c,d,u,h))return n}else if(Dr(a,s,u,h))return n;n++}return-1}}),wk=pp.prototype;wk.isPersistent=function(){return!this._incremental},wk.updateData=function(t){this.group.removeAll();var e=new xk({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},wk.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new io({silent:!0})),this.group.add(this._incremental)):this._incremental=null},wk.incrementalUpdate=function(t,e){var i=new xk;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},wk.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},wk._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("color");r&&t.setStyle("stroke",r),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},wk._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var bk={seriesType:"lines",plan:vI(),reset:function(t){function e(e,o){var a=[];if(r){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;h<e.end;h++)u+=t.getLineCoordsCount(h);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);for(var c=0,d=[],h=e.start;h<e.end;h++){var f=t.getLineCoords(h,a);n&&(s[c++]=f);for(var p=0;f>p;p++)d=i.dataToPoint(a[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var h=e.start;h<e.end;h++){var g=o.getItemModel(h),f=t.getLineCoords(h,a),v=[];if(n)for(var m=0;f>m;m++)v.push(i.dataToPoint(a[m]));else{v[0]=i.dataToPoint(a[0]),v[1]=i.dataToPoint(a[1]);var y=g.get("lineStyle.curveness");+y&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*y,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*y])}o.setItemLayout(h,v)}}var i=t.coordinateSystem,n=t.get("polyline"),r=t.pipelineContext.large;return{progress:e}}};Iu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),r=this._updateLineDraw(n,t),o=t.get("zlevel"),a=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&a&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(n);var u=t.get("clip",!0)&&bc(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),r=this._updateLineDraw(n,t);r.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=bk.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext,a=o.large;return i&&n===this._hasEffet&&r===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new pp:new op(r?n?fp:dp:n?cp:rp),this._hasEffet=n,this._isPolyline=r,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||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 Mk="lineStyle.opacity".split("."),Sk={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=gp(i.getShallow("symbol",!0)),r=gp(i.getShallow("symbolSize",!0)),o=i.get(Mk);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1]),t.setItemVisual(e,"opacity",o)}var i=gp(t.get("symbol")),n=gp(t.get("symbolSize")),r=t.getData();return r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),r.setVisual("opacity",t.get(Mk)),{dataEach:r.hasItemOption?e:null}}};yu(bk),_u(Sk);var Ik=Su({type:"series.funnel",init:function(t){Ik.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(){return $C(this,["value"])},_defaultLabelLine:function(t){Wn(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=Ik.superCall(this,"getDataParams",t),n=e.mapDimension("value"),r=e.getSum(n);return i.percent=r?+(e.get(n,t)/r*100).toFixed(2):0,i.$vars.push("percent"),i},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}}}}),Tk=vp.prototype,Ak=["itemStyle","opacity"];Tk.updateData=function(t,e,i){var n=this.childAt(0),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),l=t.getItemModel(e).get(Ak);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:a.points}),n.setStyle({opacity:0}),Zo(n,{style:{opacity:l}},r,e)):Go(n,{style:{opacity:l},shape:{points:a.points}},r,e);var u=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(s({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ao(this)},Tk._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=a.label,l=t.getItemVisual(e,"color");Go(i,{shape:{points:s.linePoints||s.linePoints}},r,e),Go(n,{style:{x:s.x,y:s.y}},r,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Lo(n.style,n.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!u.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},h(vp,rw);var Ck=(il.extend({type:"funnel",render:function(t){var e=t.getData(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new vp(e,t);e.setItemGraphicEl(t,i),n.add(i)}).update(function(t,r){var o=i.getItemGraphicEl(r);o.updateData(e,t),n.add(o),e.setItemGraphicEl(t,o)}).remove(function(t){var e=i.getItemGraphicEl(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,e){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),r=t.get("sort"),o=mp(t,e),a=yp(i,r),s=[ha(t.get("minSize"),o.width),ha(t.get("maxSize"),o.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(o.height-d*(i.count()-1))/i.count(),p=o.y,g=function(t,e){var r,a=i.get(n,t)||0,l=ua(a,[u,h],s,!0);switch(c){case"left":r=o.x;break;case"center":r=o.x+(o.width-l)/2;break;case"right":r=o.x+o.width-l}return[[r,e],[r+l,e]]};"ascending"===r&&(f=-f,d=-d,p+=o.height,a=a.reverse());for(var v=0;v<a.length;v++){var m=a[v],y=a[v+1],_=i.getItemModel(m),x=_.get("itemStyle.height");null==x?x=f:(x=ha(x,o.height),"ascending"===r&&(x=-x));var w=g(m,p),b=g(y,p+x);p+=x+d,i.setItemLayout(m,{points:w.concat(b.slice().reverse())})}_p(i)})});_u(iD("funnel")),yu(Ck),fu(lD("funnel")),Sp.prototype={constructor:Sp,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:ZA.prototype.dataToCoord,radiusToData:ZA.prototype.coordToData},h(Sp,ZA);var Dk=$n();Ip.prototype={constructor:Ip,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:ZA.prototype.dataToCoord,angleToData:ZA.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),r=i.count();if(n[1]-n[0]<1)return 0;var o=n[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Hi(o,e.getFont(),"center","top"),u=Math.max(l.height,7),h=u/s;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=Dk(t.model),f=d.lastAutoInterval,p=d.lastTickCount;return null!=f&&null!=p&&Math.abs(f-c)<=1&&Math.abs(p-r)<=1&&f>c?c=f:(d.lastTickCount=r,d.lastAutoInterval=c),c}},h(Ip,ZA);var kk=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Sp,this._angleAxis=new Ip,this._radiusAxis.polar=this._angleAxis.polar=this};kk.prototype={type:"polar",axisPointerEnabled:!0,constructor:kk,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=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),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 i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),r=n.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);n.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=o>l?1:-1;o>l||l>a;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,r=-Math.sin(i)*e+this.cy;return[n,r]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,r=i*i+n*n,o=this.r,a=this.r0;return o*o>=r&&r>=a*a}}}};var Lk=TS.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});r(Lk.prototype,DA);var Pk={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};QA("angle",Lk,Tp,Pk.angle),QA("radius",Lk,Tp,Pk.radius),bu({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var Ok={dimensions:kk.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var r=new kk(n);r.update=Cp;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Dp(o,s),Dp(a,l),Ap(r,t,e),i.push(r),t.coordinateSystem=r,r.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};vs.register("polar",Ok);var Rk=["axisLine","axisLabel","axisTick","splitLine","splitArea"];SC.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,r=i.getRadiusAxis().getExtent(),o=e.getTicksCoords(),a=p(e.getViewLabels(),function(t){var t=n(t);return t.coord=e.dataToCoord(t.tickValue),t});Pp(a),Pp(o),f(Rk,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,o,r,a)},this)}},_axisLine:function(t,e,i,n){var r=t.getModel("axisLine.lineStyle"),o=new _M({shape:{cx:e.cx,cy:e.cy,r:n[Lp(e)]},style:r.getLineStyle(),z2:1,silent:!0});
  o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n){var r=t.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),a=n[Lp(e)],l=p(i,function(t){return new PM({shape:kp(e,[a,a+o],t.coord)})});this.group.add($M(l,{style:s(r.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,r){var o=t.getCategories(!0),a=t.getModel("axisLabel"),s=a.get("margin"),l=t.get("triggerEvent");f(r,function(i){var r=a,u=i.tickValue,h=n[Lp(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";o&&o[u]&&o[u].textStyle&&(r=new ia(o[u].textStyle,a,a.ecModel));var v=new yM({silent:mC.isLabelSilent(t)});this.group.add(v),Oo(v.style,r,{x:c[0],y:c[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),l&&(v.eventData=mC.makeAxisEventDataBase(t),v.eventData.targetType="axisLabel",v.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n){var r=t.getModel("splitLine"),o=r.getModel("lineStyle"),a=o.get("color"),l=0;a=a instanceof Array?a:[a];for(var u=[],h=0;h<i.length;h++){var c=l++%a.length;u[c]=u[c]||[],u[c].push(new PM({shape:kp(e,n,i[h].coord)}))}for(var h=0;h<u.length;h++)this.group.add($M(u[h],{style:s({stroke:a[h%a.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){if(i.length){var r=t.getModel("splitArea"),o=r.getModel("areaStyle"),a=o.get("color"),l=0;a=a instanceof Array?a:[a];for(var u=[],h=Math.PI/180,c=-i[0].coord*h,d=Math.min(n[0],n[1]),f=Math.max(n[0],n[1]),p=t.get("clockwise"),g=1;g<i.length;g++){var v=l++%a.length;u[v]=u[v]||[],u[v].push(new bM({shape:{cx:e.cx,cy:e.cy,r0:d,r:f,startAngle:c,endAngle:-i[g].coord*h,clockwise:p},silent:!0})),c=-i[g].coord*h}for(var g=0;g<u.length;g++)this.group.add($M(u[g],{style:s({fill:a[g%a.length]},o.getAreaStyle()),silent:!0}))}}});var zk=["axisLine","axisTickLabel","axisName"],Ek=["splitLine","splitArea"];SC.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,n=i.getAngleAxis(),r=e.getTicksCoords(),o=n.getExtent()[0],a=e.getExtent(),s=Op(i,t,o),l=new mC(t,s);f(zk,l.add,l),this.group.add(l.getGroup()),f(Ek,function(n){t.get(n+".show")&&!e.scale.isBlank()&&this["_"+n](t,i,o,a,r)},this)}},_splitLine:function(t,e,i,n,r){var o=t.getModel("splitLine"),a=o.getModel("lineStyle"),l=a.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c<r.length;c++){var d=u++%l.length;h[d]=h[d]||[],h[d].push(new _M({shape:{cx:e.cx,cy:e.cy,r:r[c].coord},silent:!0}))}for(var c=0;c<h.length;c++)this.group.add($M(h[c],{style:s({stroke:l[c%l.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,r){if(r.length){var o=t.getModel("splitArea"),a=o.getModel("areaStyle"),l=a.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=r[0].coord,d=1;d<r.length;d++){var f=u++%l.length;h[f]=h[f]||[],h[f].push(new bM({shape:{cx:e.cx,cy:e.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(var d=0;d<h.length;d++)this.group.add($M(h[d],{style:s({fill:l[d%l.length]},a.getAreaStyle()),silent:!0}))}}});var Nk=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var o=i.getData(),a=Kn(o,t);if(null==a||0>a||x(a))return{point:[]};var s=o.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(p(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},Bk=f,Vk=_,Fk=$n(),Hk=function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Gp(r)&&(r=Nk({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=Gp(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||Gp(r),d={},f={},p={list:[],map:{}},g={showPointer:Vk(Ep,f),showTooltip:Vk(Np,p)};Bk(s.coordSysMap,function(t,e){var i=l||t.containPoint(r);Bk(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Hp(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(r)),null!=o&&Rp(t,o,g,!1,d)}})});var v={};return Bk(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&Bk(i.axesInfo,function(e,n){var r=f[n];if(e!==t&&r){var o=r.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Wp(e),Wp(t)))),v[t.key]=o}})}),Bk(v,function(t,e){Rp(h[e],t,g,!0,d)}),Bp(f,h,d),Vp(p,r,t,a),Fp(h,a,i),d}},Wk=(bu({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}}}),$n()),Gk=f,Zk=Mu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Zp("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Kp(e.getZr(),"axisPointer"),Zk.superApply(this._model,"remove",arguments)},dispose:function(t,e){Kp("axisPointer",e),Zk.superApply(this._model,"dispose",arguments)}}),Uk=$n(),Xk=n,Yk=y;$p.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=_(Jp,e,h);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new rw,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);ig(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(r&&n.getBandWidth()>a)return!0;if(o){var s=Uc(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=Uk(t).pointerEl=new eS[i.type](Xk(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var r=Uk(t).labelEl=new kM(Xk(e.label));t.add(r),tg(r,n)}},updatePointerEl:function(t,e,i){var n=Uk(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=Uk(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),tg(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var a;this._handle||(a=!0,n=this._handle=$o(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){yx(t.event)},onmousedown:Yk(this._onHandleDragMove,this,0,0),drift:Yk(this._onHandleDragMove,this),ondragend:Yk(this._onHandleDragEnd,this)}),i.add(n)),ig(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(r.getItemStyle(null,s));var l=r.get("size");x(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),ll(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){Jp(this._axisPointerModel,!e&&this._moveAnimation,this._handle,eg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(eg(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(eg(n)),Uk(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},$p.prototype.constructor=$p,or($p);var jk=$p.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.grid,s=n.get("type"),l=dg(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=ng(n),c=qk[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=$c(a.model,i);lg(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=$c(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:sg(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.grid,o=n.getGlobalExtent(!0),a=dg(r,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(a[1]+a[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),qk={line:function(t,e,i){var n=ug([e,i[0]],[e,i[1]],fg(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:hg([e-n/2,i[0]],[n,r],fg(t))}}};SC.registerAxisPointerClass("CartesianAxisPointer",jk),du(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!x(e)&&(t.axisPointer.link=[e])}}),fu(mT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Bc(t,e)}),gu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Hk);var Kk=$p.extend({makeElOption:function(t,e,i,n,r){var o=i.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a,s=o.polar,l=s.getOtherAxis(o),u=l.getExtent();a=o["dataTo"+Ra(o.dim)](e);var h=n.get("type");if(h&&"none"!==h){var c=ng(n),d=$k[h](o,s,a,u,c);d.style=c,t.graphicKey=d.type,t.pointer=d}var f=n.get("label.margin"),p=pg(e,i,n,s,f);rg(t,i,n,r,p)}}),$k={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:ug(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:cg(e.cx,e.cy,n[0],n[1],(-i-r/2)*o,(-i+r/2)*o)}:{type:"Sector",shape:cg(e.cx,e.cy,i-r/2,i+r/2,0,2*Math.PI)}}};SC.registerAxisPointerClass("PolarAxisPointer",Kk),yu(_(bp,"bar")),Mu({type:"polar"});var Jk=oe;c(gg,Dx),vg.prototype={constructor:vg,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new wi(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new wi(t,e,i,n)},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new wi(t,e,i,n)),o.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(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},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,i=this.getDefaultCenter(),n=this.getCenter(),r=this.getZoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[r,r],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),ke(this.transform||(this.transform=[]),e.transform||Ce()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ze(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,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?Jk(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?Jk([],t,e):[t[0],t[1]]},convertToPixel:_(mg,"dataToPoint"),convertFromPixel:_(mg,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(vg,Dx);for(var Qk=[126,25],tL=[[[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]]],eL=0;eL<tL.length;eL++)for(var iL=0;iL<tL[eL].length;iL++)tL[eL][iL][0]/=10.5,tL[eL][iL][1]/=-14,tL[eL][iL][0]+=Qk[0],tL[eL][iL][1]+=Qk[1];var nL=function(t,e){"china"===t&&e.push(new Wh("南海诸岛",p(tL,function(t){return{type:"polygon",exterior:t}}),Qk))},rL={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},oL=function(t,e){if("china"===t){var i=rL[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},aL={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},sL=function(t,e){if("world"===t){var i=aL[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}},lL=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],uL=function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:lL[0]})},hL=$n(),cL={load:function(t,e){var i=hL(e).parsed;if(i)return i;var n,r=e.specialAreas||{},o=e.geoJSON;try{n=o?HA(o):[]}catch(a){throw new Error("Invalid geoJson format\n"+a.message)}return f(n,function(e){var i=e.name;oL(t,e),sL(t,e),uL(t,e);var n=r[i];n&&e.transformTo(n.left,n.top,n.width,n.height)}),nL(t,n),hL(e).parsed={regions:n,boundingRect:yg(n)}}},dL=$n(),fL={load:function(t,e){var i=dL(e).originRoot;if(i)return{root:i,boundingRect:dL(e).boundingRect};var n=_g(e);return dL(e).originRoot=n.root,dL(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=dL(e),r=n.rootMap||(n.rootMap=B()),o=r.get(i);if(o)return o;var a=n.originRoot,s=n.boundingRect;return n.originRootHostKey?o=_g(e,s).root:(n.originRootHostKey=i,o=a),r.set(i,o)},removeGraphic:function(t,e,i){var n=dL(e),r=n.rootMap;r&&r.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}},pL={geoJSON:cL,svg:fL},gL={load:function(t,e){var i,n=[],r=B(),o=B(),a=wg(t);return f(a,function(a){var s=pL[a.type].load(t,a);f(s.regions,function(t){var i=t.name;e&&e.hasOwnProperty(i)&&(t=t.cloneShallow(i=e[i])),n.push(t),r.set(i,t),o.set(i,t.center)});var l=s.boundingRect;l&&(i?i.union(l):i=l.clone())}),{regions:n,regionsMap:r,nameCoordMap:o,boundingRect:i||new wi(0,0,0,0)}},makeGraphic:xg("makeGraphic"),removeGraphic:xg("removeGraphic")};bg.prototype={constructor:bg,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=this._invertLongitute;r=r.clone(),o&&(r.y=-r.y-r.height);var a=this._rawTransformable;if(a.transform=r.calculateTransform(new wi(t,e,i,n)),a.decomposeTransform(),o){var s=a.scale;s[1]=-s[1]}a.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},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,i){return"string"==typeof t&&(t=this.getGeoCoord(t)),t?vg.prototype.dataToPoint.call(this,t,e,i):void 0},convertToPixel:_(Mg,"dataToPoint"),convertFromPixel:_(Mg,"pointToData")},c(bg,vg);var vL={dimensions:bg.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",function(t,n){var r=t.get("map"),o=t.get("aspectScale"),a=!0,s=KI.retrieveMap(r);s&&s[0]&&"svg"===s[0].type?(null==o&&(o=1),a=!1):null==o&&(o=.75);var l=new bg(r+n,r,t.get("nameMap"),a);l.aspectScale=o,l.zoomLimit=t.get("scaleLimit"),i.push(l),Ig(l,t),t.coordinateSystem=l,l.model=t,l.resize=Sg,l.resize(t,e)}),t.eachSeries(function(t){var e=t.get("coordinateSystem");if("geo"===e){var n=t.get("geoIndex")||0;t.coordinateSystem=i[n]}});var n={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}}),f(n,function(t,n){var r=p(t,function(t){return t.get("nameMap")}),a=new bg(n,n,o(r));a.zoomLimit=C.apply(null,p(t,function(t){return t.get("scaleLimit")})),i.push(a),a.resize=Sg,a.aspectScale=t[0].get("aspectScale"),a.resize(t[0],e),f(t,function(t){t.coordinateSystem=a,Ig(a,t)})}),i},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),r=B(),o=0;o<n.length;o++)r.set(n[o].name,n[o]);var a=gL.load(e,i);return f(a.regions,function(t){var e=t.name;!r.get(e)&&n.push({name:e})}),n}};vu("geo",vL);var mL=TS.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){TS.prototype.init.apply(this,arguments),Wn(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=vL.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new ia(i,e)),t},B()),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 ia(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t),n=i.get("label"+("normal"===e?".":e+".")+"formatter"),r={name:t};return"function"==typeof n?(r.status=e,n(r)):"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}});c(mL,JC);var yL={axisPointer:1,tooltip:1,brush:1};Pg.prototype={constructor:Pg,draw:function(t,e,i,n){var r="geo"===t.mainType,o=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},function(e){o||e.getHostGeoModel()!==t||(o=e.getData())});var a=t.coordinateSystem;this._updateBackground(a);var s=this._regionsGroup,l=this.group;a._roamTransformable.transform&&(l.transform=a._roamTransformable.transform.slice(),l.decomposeTransform());var u=a._rawTransformable.scale,h=a._rawTransformable.position;s.removeAll();var c=["itemStyle"],d=["emphasis","itemStyle"],p=["label"],g=["emphasis","label"],v=B();f(a.regions,function(e){var i=v.get(e.name)||v.set(e.name,new rw),n=new EM({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,m=t.getRegionModel(e.name)||t,y=m.getModel(c),_=m.getModel(d),x=Dg(y),w=Dg(_),b=m.getModel(p),M=m.getModel(g);if(o){a=o.indexOfName(e.name);var S=o.getItemVisual(a,"color",!0);S&&(x.fill=S)}var I=function(t){return[t[0]*u[0]+h[0],t[1]*u[1]+h[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(I(t.exterior[i]));n.shape.paths.push(new TM({segmentIgnoreThreshold:1,shape:{points:e}}));for(var i=0;i<(t.interiors?t.interiors.length:0);++i){for(var r=t.interiors[i],e=[],o=0;o<r.length;++o)e.push(I(r[o]));n.shape.paths.push(new TM({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),n.setStyle(x),n.style.strokeNoScale=!0,n.culling=!0;var T=b.get("show"),A=M.get("show"),C=o&&isNaN(o.get(o.mapDimension("value"),a)),D=o&&o.getItemLayout(a);if(r||C&&(T||A)||D&&D.showLabel){var k,L=r?e.name:a;(!o||a>=0)&&(k=t);var P=new yM({position:I(e.center.slice()),scale:[1/l.scale[0],1/l.scale[1]],z2:10,silent:!0});Lo(P.style,P.hoverStyle={},b,M,{labelFetcher:k,labelDataIndex:L,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(P)}if(o)o.setItemGraphicEl(a,i);else{var m=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:m&&m.option||{}}}var O=i.__regions||(i.__regions=[]);O.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Ao(i,w),s.add(i)}),this._updateController(t,e,i),kg(this,t,s,i,n),Lg(t,s)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&gL.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(gL.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var r=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=r.getZoom(),o.enable(t.get("roam")||!1);var l=t.mainType;o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,Tg(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,Ag(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setPointerChecker(function(e,n,o){return r.getViewRectAfterRoam().contain(n,o)&&!Cg(e,i,t)})}},Mu({type:"geo",init:function(t,e){var i=new Pg(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var r=this._mapDraw;t.get("show")?r.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),gu({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var r=Og(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(r.center),e.setZoom&&e.setZoom(r.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(r.center),t.setZoom(r.zoom)})}})}),Rg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Rg("select",{type:"geoSelect",event:"geoselected"}),Rg("unSelect",{type:"geoUnSelect",event:"geounselected"});var _L=function(t,e,i,n,r){ZA.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom",this.orient=null};_L.prototype={constructor:_L,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},h(_L,ZA),zg.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:zg,_init:function(t){var e=this.dimension,i=new _L(e,Ah(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Th(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Va({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,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],r=e.reverse?1:0;e.setExtent(n[r],n[1-r]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],r=t.isHorizontal();t.toGlobalCoord=r?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=r?function(t){return t-e}:function(t){return n-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(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}},vs.register("single",{create:Eg,dimensions:zg.prototype.dimensions});var xL=["axisLine","axisTickLabel","axisName"],wL="splitLine",bL=SC.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var r=this.group;r.removeAll();var o=Ng(t),a=new mC(t,o);f(xL,a.add,a),r.add(a.getGroup()),t.get(wL+".show")&&this["_"+wL](t),bL.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),r=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var a=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=a.y,d[0]=p,d[1]=a.y+a.height):(c[0]=a.x,c[1]=p,d[0]=a.x+a.width,d[1]=p);var g=u++%o.length;l[g]=l[g]||[],l[g].push(new PM({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:r},silent:!0}))}for(var f=0;f<l.length;++f)this.group.add($M(l[f],{style:{stroke:o[f%o.length],lineDash:n.getLineDash(r),lineWidth:r},silent:!0}))}}}),ML=TS.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}}),SL={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}};r(ML.prototype,DA),QA("single",ML,Bg,SL);var IL=["x","y"],TL=["width","height"],AL=$p.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.coordinateSystem,s=Fg(a,1-Vg(o)),l=a.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=ng(n),c=CL[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Ng(i);lg(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=Ng(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:sg(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.coordinateSystem,o=Vg(n),a=Fg(r,o),s=t.position;s[o]+=e[o],s[o]=Math.min(a[1],s[o]),s[o]=Math.max(a[0],s[o]);var l=Fg(r,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),CL={line:function(t,e,i){var n=ug([e,i[0]],[e,i[1]],Vg(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:hg([e-n/2,i[0]],[n,r],Vg(t))}}};SC.registerAxisPointerClass("SingleAxisPointer",AL),Mu({type:"single"});var DL=864e5;Hg.prototype={constructor:Hg,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=_a(t);var e=t.getFullYear(),i=t.getMonth()+1;i=10>i?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var r=t.getDay();return r=Math.abs((r+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:r,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==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,r=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(a[r[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=Va(a,l);f([0,1],function(t){i(o,t)||(o[t]=u[r[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){x(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,r=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+DL))return[0/0,0/0];var o=i.day,a=this._getRangeInfo([n.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);
  return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:_(Wg,"dataToPoint"),convertFromPixel:_(Wg,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(x(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var r=this.getNextNDay(n,-1);t=[i.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/DL)-Math.floor(t[0].time/DL)+1,n=new Date(t[0].time),r=n.getDate(),o=t[1].date.getDate();if(n.setDate(r+i-1),n.getDate()!==o)for(var a=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*a>0;)i-=a,n.setDate(r+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var r=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+r),this.getDateInfo(o)}},Hg.dimensions=Hg.prototype.dimensions,Hg.getDimensionsInfo=Hg.prototype.getDimensionsInfo,Hg.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var r=new Hg(n,t,e);i.push(r),n.coordinateSystem=r}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},vs.register("calendar",Hg);var kL=TS.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){var e=Ga(t);kL.superApply(this,"init",arguments),Gg(t,e)},mergeOption:function(t){kL.superApply(this,"mergeOption",arguments),Gg(this.option,t)}}),LL={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},PL={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Mu({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),r=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,r,e),this._renderYearText(t,n,r,e),this._renderMonthText(t,r,e),this._renderWeekText(t,n,r,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),a=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new kM({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});i.add(u)}},_renderLines:function(t,e,i,n){function r(e){o._firstDayOfMonth.push(a.getDateInfo(e)),o._firstDayPoints.push(a.dataToRect([e],!1).tl);var r=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(r[0]),o._blpoints.push(r[r.length-1]),l&&o._drawSplitline(r,s,n)}var o=this,a=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){r(h.formatedDate),0===c&&(h=a.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=a.getDateInfo(d)}r(a.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,u,i),s,n),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===i?0:1;return n[0][r]=n[0][r]-e/2,n[1][r]=n[1][r]+e/2,n},_drawSplitline:function(t,e,i){var n=new AM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var r=[],o=0;7>o;o++){var a=n.getNextNDay(e.time,o),s=n.dataToRect([a.time],!1);r[2*a.day]=s.tl,r[2*a.day+1]=s["horizontal"===i?"bl":"tr"]}return r},_formatterLabel:function(t,e){return"string"==typeof t&&t?ka(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,r){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=r,o=["center","top"]):"left"===n?e[0]-=r:"right"===n?(e[0]+=r,o=["center","top"]):e[1]-=r;var a=0;return("left"===n||"right"===n)&&(a=Math.PI/2),{rotation:a,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=r.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),v=new yM({z2:30});Oo(v.style,r,{text:g}),v.attr(this._yearTextPositionControl(v,c[a],i,a,o)),n.add(v)}},_monthTextPositionControl:function(t,e,i,n,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===i?(l+=r,e&&(o="center"),"start"===n&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var r=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(r)&&(r=LL[r.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;f<u[h].length-1;f++){var p=u[h][f].slice(),g=this._firstDayOfMonth[f];if(d){var v=this._firstDayPoints[f];p[c]=(v[c]+u[0][f+1][c])/2}var m=n.get("formatter"),y=r[+g.m-1],_={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},x=this._formatterLabel(m,_),w=new yM({z2:30});a(Oo(w.style,n,{text:x}),this._monthTextPositionControl(p,d,e,s,o)),i.add(w)}}},_weekTextPositionControl:function(t,e,i,n,r){var o="center",a="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*r[0]/2,o=u?"right":"left"):(l=l+n+(u?1:-1)*r[1]/2,a=u?"bottom":"top"),{x:s,y:l,textAlign:o,textVerticalAlign:a}},_renderWeekText:function(t,e,i,n){var r=t.getModel("dayLabel");if(r.get("show")){var o=t.coordinateSystem,s=r.get("position"),l=r.get("nameMap"),u=r.get("margin"),h=o.getFirstDayOfWeek();b(l)&&(l=PL[l.toUpperCase()]||[]);var c=o.getNextNDay(e.end.time,7-e.lweek).time,d=[o.getCellWidth(),o.getCellHeight()];u=ha(u,d["horizontal"===i?0:1]),"start"===s&&(c=o.getNextNDay(e.start.time,-(7+e.fweek)).time,u=-u);for(var f=0;7>f;f++){var p=o.getNextNDay(c,f),g=o.dataToRect([p.time],!1).center,v=f;v=Math.abs((f+h)%7);var m=new yM({z2:30});a(Oo(m.style,r,{text:l[v]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(m)}}}}),bu({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"}}}),Mu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=D(t.get("textBaseline"),t.get("textVerticalAlign")),l=new yM({style:Oo({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new yM({style:Oo({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),v=t.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Va(v,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||(a=t.get("left")||t.get("right"),"middle"===a&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var y={textAlign:a,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new kM({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});n.add(w)}}});var OL=II.legend.selector,RL={all:{type:"all",title:n(OL.all)},inverse:{type:"inverse",title:n(OL.inverse)}},zL=bu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){zL.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),x(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=r(t,RL[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var r=n.name;i.push(r);var o;if(n.legendDataProvider){var a=n.legendDataProvider(),s=a.mapArray(a.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):o=!0}else o=!0;o&&Yn(n)&&e.push(n.name)}),this._availableNames=i;var n=this.get("data")||e,r=p(n,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new ia(t,this,this.ecModel)},this);this._data=r},getData:function(){return this._data},select:function(t){var e=this.option.selected,i=this.get("selectedMode");if("single"===i){var n=this._data;f(n,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,e=this.option.selected;f(t,function(t){var i=t.get("name",!0);e.hasOwnProperty(i)||(e[i]=!0),e[i]=!e[i]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&u(this._availableNames,t)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});gu("legendToggleSelect","legendselectchanged",_(Zg,"toggleSelected")),gu("legendAllSelect","legendselectall",_(Zg,"allSelect")),gu("legendInverseSelect","legendinverseselect",_(Zg,"inverseSelect")),gu("legendSelect","legendselected",_(Zg,"select")),gu("legendUnSelect","legendunselected",_(Zg,"unSelect"));var EL=_,NL=f,BL=rw,VL=Mu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new BL),this._backgroundEl,this.group.add(this._selectorGroup=new BL),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),l=t.get("selectorPosition",!0);!a||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderInner(r,t,e,i,a,o,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=Va(u,h,c),f=this.layoutInner(t,r,d,n,a,l),p=Va(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=Xg(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,r,o,a){var s=this.getContentGroup(),l=B(),u=e.get("selectedMode"),h=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),NL(e.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a))return void s.add(new BL({newline:!0}));var c=i.getSeriesByName(a)[0];if(!l.get(a))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",v=d.getVisual("symbol"),m=this._createItem(a,o,r,e,g,v,t,f,p,u);m.on("click",EL(jg,a,n)).on("mouseover",EL(qg,c.name,null,n,h)).on("mouseout",EL(Kg,c.name,null,n,h)),l.set(a,!0)}else i.eachRawSeries(function(i){if(!l.get(a)&&i.legendDataProvider){var s=i.legendDataProvider(),c=s.indexOfName(a);if(0>c)return;var d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(a,o,r,e,p,null,t,d,f,u);g.on("click",EL(jg,a,n)).on("mouseover",EL(qg,null,a,n,h)).on("mouseout",EL(Kg,null,a,n,h)),l.set(a,!0)}},this)},this),r&&this._createSelector(r,e,n,o,a)},_createSelector:function(t,e,i){function n(t){var n=t.type,o=new yM({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});r.add(o);var a=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Lo(o.style,o.hoverStyle={},a,s,{defaultText:t.title,isRectText:!1}),Ao(o)}var r=this.getSelectorGroup();NL(t,function(t){n(t)})},_createItem:function(t,e,i,n,r,o,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),v=n.getModel("itemStyle"),m=n.isSelected(t),y=new BL,_=i.getModel("textStyle"),x=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel;r=x||r;var M=Eh(r,0,0,c,d,m?l:f,null==g?!0:g);if(y.add(Yg(M,r,v,u,p,m)),!x&&o&&(o!==r||"none"===o)){var S=.8*d;"none"===o&&(o="circle");var I=Eh(o,(c-S)/2,(d-S)/2,S,S,m?l:f,null==g?!0:g);y.add(Yg(I,o,v,u,p,m))}var T="left"===s?c+5:-5,A=s,C=n.get("formatter"),D=t;"string"==typeof C&&C?D=C.replace("{name}",null!=t?t:""):"function"==typeof C&&(D=C(t)),y.add(new yM({style:Oo({},_,{text:D,x:T,y:d/2,textFill:m?_.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var k=new kM({shape:y.getBoundingRect(),invisible:!0,tooltip:w.get("show")?a({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},w.option):null});return y.add(k),y.eachChild(function(t){t.silent=!0}),k.silent=!h,this.getContentGroup().add(y),Ao(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();MS(t.get("orient"),a,t.get("itemGap"),i.width,i.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(r){MS("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",v=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),a.attr("position",u);var m={x:0,y:0};return m[p]=l[p]+d+h[p],m[g]=Math.max(l[g],h[g]),m[v]=Math.min(0,h[v]+c[1-f]),m}return a.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),FL=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})};fu(mT.PROCESSOR.SERIES_FILTER,FL),TS.registerSubTypeDefaulter("legend",function(){return"plain"});var HL=zL.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,i,n){var r=Ga(t);HL.superCall(this,"init",t,e,i,n),$g(this,t,r)},mergeOption:function(t,e){HL.superCall(this,"mergeOption",t,e),$g(this,this.option,t)}}),WL=rw,GL=["width","height"],ZL=["x","y"],UL=VL.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){UL.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new WL),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new WL),this._showController},resetInner:function(){UL.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n,r,o,a){function s(t,i){var r=t+"DataIndex",o=$o(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:y(l._pageGo,l,r,e,n)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});o.name=t,u.add(o)}var l=this;UL.superCall(this,"renderInner",t,e,i,n,r,o,a);var u=this._controllerGroup,h=e.get("pageIconSize",!0);x(h)||(h=[h,h]),s("pagePrev",0);var c=e.getModel("pageTextStyle");u.add(new yM({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),s("pageNext",1)},layoutInner:function(t,e,i,r,o,a){var s=this.getSelectorGroup(),l=t.getOrient().index,u=GL[l],h=ZL[l],c=GL[1-l],d=ZL[1-l];o&&MS("horizontal",s,t.get("selectorItemGap",!0));var f=t.get("selectorButtonGap",!0),p=s.getBoundingRect(),g=[-p.x,-p.y],v=n(i);o&&(v[u]=i[u]-p[u]-f);var m=this._layoutContentAndController(t,r,v,l,u,c,d);if(o){if("end"===a)g[l]+=m[u]+f;else{var y=p[u]+f;g[l]-=y,m[h]-=y}m[u]+=p[u]+f,g[1-l]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+g[1-l]),s.attr("position",g)}return m},_layoutContentAndController:function(t,e,i,n,r,o,a){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;MS(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),MS("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[r]>i[r],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],v=D(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?g[n]+=i[r]-c[r]:p[n]+=c[r]+v}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[r]=d?i[r]:h[r],y[o]=Math.max(h[o],c[o]),y[a]=Math.min(0,c[a]+g[1-n]),l.__rectSize=i[r],d){var _={x:0,y:0};_[r]=Math.max(i[r]-c[r]-v,0),_[o]=y[o],l.setClipPath(new kM({shape:_})),l.__rectSize=_[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Go(s,{position:x.contentPosition},d?t:!1),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;n&&r&&n.setStyle("text",b(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[a];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrollDataIndex",!0),r=this.getContentGroup(),o=this._containerGroup.__rectSize,a=t.getOrient().index,s=GL[a],l=ZL[a],u=this._findTargetItemIndex(n),h=r.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[a]=-g.s;for(var v=u+1,m=g,y=g,_=null;d>=v;++v)_=e(h[v]),(!_&&y.e>m.s+o||_&&!i(_,m.s))&&(m=y.i>m.i?y:_,m&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var v=u-1,m=g,y=g,_=null;v>=-1;--v)_=e(h[v]),_&&i(y,_.s)||!(m.i<y.i)||(y=m,null==p.pagePrevDataIndex&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p},_findTargetItemIndex:function(t){var e,i,n=this.getContentGroup();return this._showController&&n.eachChild(function(n,r){var o=n.__legendDataIndex;null==i&&null!=o&&(i=r),o===t&&(e=r)}),null!=e?e:i}});gu("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),bu({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 XL=f,YL=Aa,jL=["","-webkit-","-moz-","-o-"],qL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";ev.prototype={constructor:ev,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=qL+tv(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 i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.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(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},iv.prototype={constructor:iv,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,o="{marker",a="|}",s=r.indexOf(o);s>=0;){var l=r.indexOf(a),u=r.substr(s+o.length,l-s-o.length);n["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},r=r.substr(l+1),s=r.indexOf("{marker")}this.el=new yM({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var KL=y,$L=f,JL=ha,QL=new kM({shape:{x:-1,y:-1,width:2,height:2}});Mu({type:"tooltip",init:function(t,e){if(!Z_.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=ir(n);var r;"html"===this._renderMode?(r=new ev(e.getDom(),e),this._newLine="<br/>"):(r=new iv(e),this._newLine="\n"),this._tooltipContent=r}},render:function(t,e,i){if(!Z_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Zp("itemTooltip",this._api,KL(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Z_.node){var r=rv(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=QL;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:a},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=Nk(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(rv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,o=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s){var l=s.getData(),t=nv([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,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 i=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],a=[],s=[],l=nv([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};$L(t,function(t){$L(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var l=ag(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(a){var h=i.getSeriesByIndex(a.seriesIndex),d=a.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=kh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(M(g)){p=g.html;var v=g.markers;r(c,v)}else p=g;o.push(p)}});var d=l;a.push("html"!==u?o.join(h):(d?Ca(d)+h:"")+o.join(h))}})},this),a.reverse(),a=a.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,a,s,Math.random(),o[0],o[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,o=n.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=a.getData(),h=nv([u.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=a.getDataParams(s,l),g=a.formatTooltip(s,!1,l,this._renderMode);M(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+a.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var r=n;n={content:r,formatter:r}}var o=new ia(n,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");
  a=a||t.get("position");var c=e;if(h&&"string"==typeof h)c=Da(h,i,!0);else if("function"==typeof h){var d=KL(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,a,r,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,a,r,o,u,i,s)}},_updatePosition:function(t,e,i,n,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([i,n],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),x(e))i=JL(e[0],s),n=JL(e[1],l);else if(M(e)){e.width=u[0],e.height=u[1];var f=Va(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&a){var p=sv(e,d,u);i=p[0],n=p[1]}else{var p=ov(i,n,r,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=lv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=lv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=av(i,n,r,s,l);i=p[0],n=p[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&$L(e,function(e,n){var r=e.dataByAxis||{},o=t[n]||{},a=o.dataByAxis||[];i&=r.length===a.length,i&&$L(r,function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length,i&&$L(r,function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Z_.node||(this._tooltipContent.hide(),Kp("itemTooltip",e))}}),gu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),gu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var tP=Ta,eP=Ca,iP=bu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(Z_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var r=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[o];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&uv(i),f(i.data,function(t){t instanceof Array?(uv(t[0]),uv(t[1])):uv(t)}),s=new r(i,this,e),a(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[o]=s)):void(t[o]=null)},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=x(i)?p(i,tP).join(", "):tP(i),r=e.getName(t),o=eP(this.name);return(null!=i||r)&&(o+="<br />"),r&&(o+=eP(r),null!=i&&(o+=" : ")),null!=i&&(o+=eP(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});c(iP,uI),iP.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 nP=u,rP=_,oP={min:rP(dv,"min"),max:rP(dv,"max"),average:rP(dv,"average")},aP=Mu({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var n=t[r];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});aP.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(_v(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new id),u=xv(r,t,e);e.setData(u),_v(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),r=i.getShallow("symbolSize"),o=w(n),s=w(r);if(o||s){var l=e.getRawValue(t),h=e.getDataParams(t);o&&(n=n(l,h)),s&&(r=r(l,h))}u.setItemVisual(t,{symbol:n,symbolSize:r,color:i.get("itemStyle.color")||a.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markPoint=t.markPoint||{}}),iP.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"}});var sP=function(t,e,i,o){var s=t.getData(),l=o.type;if(!x(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xAxis||null!=o.yAxis)){var u,h;if(null!=o.yAxis||null!=o.xAxis)u=e.getAxis(null!=o.yAxis?"y":"x"),h=C(o.yAxis,o.xAxis);else{var c=pv(o,s,e,t);u=c.valueAxis;var d=th(s,c.valueDataDim);h=yv(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),v={};g.type=null,g.coord=[],v.coord=[],g.coord[p]=-1/0,v.coord[p]=1/0;var m=i.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),g.coord[f]=v.coord[f]=h,o=[g,v,{type:l,valueIndex:o.valueIndex,value:h}]}return o=[fv(t,o[0]),fv(t,o[1]),a({},o[2])],o[2].type=o[2].type||"",r(o[2],o[0]),r(o[2],o[1]),o};aP.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){Sv(r,e,!0,t,i),Sv(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);Sv(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||g[r?0:1],symbol:o.get("symbol",!0)||p[r?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,new op);this.group.add(u.group);var h=Iv(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");x(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){r(c,t,!0),r(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markLine=t.markLine||{}}),iP.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"}}}});var lP=function(t,e,i,n){var r=fv(t,n[0]),a=fv(t,n[1]),s=C,l=r.coord,u=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},r,a]);return h.coord=[r.coord,a.coord],h.x0=r.x,h.y0=r.y,h.x1=a.x,h.y1=a.y,h},uP=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];aP.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var r=p(uP,function(r){return Dv(n,e,r,t,i)});n.setItemLayout(e,r);var o=n.getItemGraphicEl(e);o.setShape("points",r)})}},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.id,a=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new rw});this.group.add(u.group),u.__keep=!0;var h=kv(r,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,p(uP,function(i){return Dv(h,e,i,t,n)})),h.setItemVisual(e,{color:a.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new TM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);Go(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),r=n.getModel("label"),o=n.getModel("emphasis.label"),a=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:ni(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Lo(t.style,t.hoverStyle,r,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:a}),Ao(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),du(function(t){t.markArea=t.markArea||{}});var hP=function(t){var e=t&&t.timeline;x(e)||(e=e?[e]:[]),f(e,function(t){t&&Lv(t)})};TS.registerSubTypeDefaulter("timeline",function(){return"slider"}),gu({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),s({currentIndex:i.option.currentIndex},t)}),gu({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var cP=TS.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(){cP.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:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,r=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,a=Gn(t);M(t)?(i=n(t),i.value=e):i=e,o.push(i),b(a)||null!=a&&!isNaN(a)||(a=""),r.push(a+"")}),e=o}var a={category:"ordinal",time:"time"}[i]||"number",s=this._data=new KT([{name:"value",type:a}],this);s.initData(e,r)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),dP=cP.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:[]}});c(dP,uI);var fP=pI.extend({type:"timeline"}),pP=function(t,e,i,n){ZA.call(this,t,e,i),this.type=n||"value",this.model=null};pP.prototype={constructor:pP,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(pP,ZA);var gP=y,vP=f,mP=Math.PI;fP.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(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),a=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Ca(a.scale.getLabel(t))},vP(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,r,a,t)},this),this._renderAxisLabel(n,o,a,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),r=Rv(t,e);null==i||"auto"===i?i="horizontal"===n?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var o={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},a={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:mP/2},l="vertical"===n?r.height:r.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*mP/180;var g,v,m,y,_=u.get("position",!0),x=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),M=0,S=l;return"left"===_||"bottom"===_?(x&&(g=[0,0],M+=f),w&&(v=[M,0],M+=f),b&&(m=[S-c,0],S-=f)):(x&&(g=[S-c,0],S-=f),w&&(v=[0,0],M+=f),b&&(m=[S-c,0],S-=f)),y=[M,S],t.get("inverse")&&y.reverse(),{viewRect:r,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||o[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||a[n],playPosition:g,prevBtnPosition:v,nextBtnPosition:m,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,r){t[n]+=i[n][r]-e[n][r]}var r=this._mainGroup,o=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var s=Ce(),l=a.x,u=a.y+a.height;Pe(s,s,[-l,-u]),Oe(s,s,-mP/2),Pe(s,s,[l,u]),a=a.clone(),a.applyTransform(s)}var h=i(a),c=i(r.getBoundingRect()),d=i(o.getBoundingRect()),f=r.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var v="+"===g?0:1;n(f,c,h,1,v),n(p,d,h,1,1-v)}else{var v=g>=0?0:1;n(f,c,h,1,v),p[1]=f[1]+g}r.attr("position",f),o.attr("position",p),r.rotation=o.rotation=t.rotation,e(r),e(o)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),r=Ah(e,n);r.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var o=i.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new pP("value",r,t.axisExtent,n);return a.model=e,a},_createGroup:function(t){var e=this["_"+t]=new rw;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var r=i.getExtent();n.get("lineStyle.show")&&e.add(new PM({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var r=n.getData(),o=i.scale.getTicks();vP(o,function(t){var o=i.dataToCoord(t),a=r.getItemModel(t),s=a.getModel("itemStyle"),l=a.getModel("emphasis.itemStyle"),u={position:[o,0],onclick:gP(this._changeTimeline,this,t)},h=Ev(a,s,e,u);Ao(h,l.getItemStyle()),a.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var r=i.getLabelModel();if(r.get("show")){var o=n.getData(),a=i.getViewLabels();vP(a,function(n){var r=n.tickValue,a=o.getItemModel(r),s=a.getModel("label"),l=a.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new yM({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:gP(this._changeTimeline,this,r),silent:!1});Oo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Ao(h,Oo({},l))},this)}},_renderControl:function(t,e,i,n){function r(t,i,r,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-a:0,rectHover:!0,style:s,onclick:r},d=zv(n,i,u,c);e.add(d),Ao(d,l)}}var o=t.controlSize,a=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-o/2,o,o],h=n.getPlayState(),c=n.get("inverse",!0);r(t.nextBtnPosition,"controlStyle.nextIcon",gP(this._changeTimeline,this,c?"-":"+")),r(t.prevBtnPosition,"controlStyle.prevIcon",gP(this._changeTimeline,this,c?"+":"-")),r(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),gP(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var r=n.getData(),o=n.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=gP(s._handlePointerDrag,s),t.ondragend=gP(s._handlePointerDragend,s),Nv(t,o,i,n,!0)},onUpdate:function(t){Nv(t,o,i,n)}};this._currentPointer=Ev(a,a,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,r=da(n.getExtent().slice());i>r[1]&&(i=r[1]),i<r[0]&&(i=r[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){function t(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(gP(t,this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return Xo(t,e,!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,r=this._axis;return i.each(["value"],function(i,o){var a=r.dataToCoord(i),s=Math.abs(a-t);n>s&&(n=s,e=o)}),e},_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})}}),du(hP),TS.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var yP=["x","y","z","radius","angle","single"],_P=["cartesian2d","polar","singleAxis"],xP=Vv(yP,["axisIndex","axis","index","id"]),wP=function(t,e,i,n,r,o){t=t||0;var a=i[1]-i[0];if(null!=r&&(r=Wv(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===n){var s=Math.abs(e[1]-e[0]);s=Wv(s,[0,a]),r=o=Wv(s,[r,o]),n=0}e[0]=Wv(e[0],i),e[1]=Wv(e[1],i);var l=Hv(e,n);e[n]+=t;var u=r||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=Wv(e[n],h);var c=Hv(e,n);null!=r&&(c.sign!==l.sign||c.span<r)&&(e[1-n]=e[n]+l.sign*r);var c=Hv(e,n);return null!=o&&c.span>o&&(e[1-n]=e[n]+c.sign*o),e},bP=f,MP=da,SP=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};SP.prototype={constructor:SP,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(Bv(i.get("coordinateSystem"))){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,r){var a=r?"Span":"ValueSpan";wP(0,t,i,"all",h["min"+a],h["max"+a]);for(var s=0;2>s;s++)e[s]=ua(t[s],i,n,!0),r&&(e[s]=o.parse(e[s]))}var i,n=this._dataExtent,r=this.getAxisModel(),o=r.axis.scale,a=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];bP(["start","end"],function(e,r){var h=t[e],c=t[e+"Value"];"percent"===a[r]?(null==h&&(h=s[r]),c=o.parse(ua(h,s,n))):(i=!0,c=null==c?n[r]:o.parse(c),h=ua(c,n,s)),u[r]=c,l[r]=h}),MP(u),MP(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Gv(this,this._dimName,e),Xv(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,Uv(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Uv(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&bP(n,function(t){var n=t.getData(),a=n.mapDimension(i,!0);a.length&&("weakFilter"===r?n.filterSelf(function(t){for(var e,i,r,s=0;s<a.length;s++){var l=n.get(a[s],t),u=!isNaN(l),h=l<o[0],c=l>o[1];if(u&&!h&&!c)return!0;u&&(r=!0),h&&(e=!0),c&&(i=!0)}return r&&e&&i}):bP(a,function(i){if("empty"===r)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var a={};a[i]=o,n.selectRange(a)}}),bP(a,function(t){n.setApproximateExtent(o,t)}))})}}};var IP=f,TP=xP,AP=bu({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Yv(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Yv(t);r(this.option,t,!0),r(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;Z_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),jv(this,t);var i=this.settledOption;IP([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new SP(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();TP(function(e){var i=e.axisIndex;t[i]=Hn(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;TP(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):IP(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&TP(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&TP(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),o=t.get(e.axisId),a=t.ecModel.queryComponents({mainType:e.axis,index:r,id:o})[0];r=a.componentIndex,u(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return TP(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return TP(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;TP(function(n){IP(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;IP([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),jv(this,t)},setCalculatedRange:function(t){var e=this.option;IP(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),CP=pI.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var r,o=0;o<i.length;o++)if(i[o].model===t){r=i[o];break}r||i.push(r={model:t,axisModels:[],coordIndex:n}),r.axisModels.push(e)}var e=this.dataZoomModel,i=this.ecModel,n={};return e.eachTargetAxis(function(e,r){var o=i.getComponent(e.axis,r);if(o){var a=o.getCoordSysModel();a&&t(a,o,n[a.mainType]||(n[a.mainType]=[]),a.componentIndex)}},this),n}}),DP=(AP.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"}}}),kM),kP=ua,LP=da,PP=y,OP=f,RP=7,zP=1,EP=30,NP="horizontal",BP="vertical",VP=5,FP=["line","bar","candlestick","scatter"],HP=CP.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){return HP.superApply(this,"render",arguments),ll(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){HP.superApply(this,"remove",arguments),ul(this,"_dispatchZoomAction")},dispose:function(){HP.superApply(this,"dispose",arguments),ul(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new rw;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},r=this._orient===NP?{right:n.width-i.x-i.width,top:n.height-EP-RP,width:i.width,height:EP}:{right:RP,top:i.y,width:EP,height:i.height},o=Ga(t.option);f(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=Va(o,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===BP&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==NP||r?i===NP&&r?{scale:a?[-1,1]:[-1,-1]}:i!==BP||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new DP({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new DP({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var o=n.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var l,u=[0,e[1]],h=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=h[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(g>0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:kP(t,o,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var v=this.dataZoomModel;this._displayables.barGroup.add(new TM({shape:{points:c},style:s({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new AM({shape:{points:d},style:v.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))
  }}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(r,o){var a=t.getAxisProxy(r.name,o).getTargetSeriesModels();f(a,function(t){if(!(i||e!==!0&&u(FP,t.get("type"))<0)){var a,s=n.getComponent(r.axis,o).axis,l=qv(r.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(a=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:r.name,otherDim:l,otherAxisInverse:a}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new DP({draggable:!0,cursor:Kv(this._orient),drift:PP(this._onDragMove,this,"all"),onmousemove:function(t){yx(t.event)},ondragstart:PP(this._showDataInfo,this,!0),ondragend:PP(this._onDragEnd,this),onmouseover:PP(this._showDataInfo,this,!0),onmouseout:PP(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new DP({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:zP,fill:"rgba(0,0,0,0)"}})),OP([0,1],function(t){var r=$o(o.get("handleIcon"),{cursor:Kv(this._orient),draggable:!0,drift:PP(this._onDragMove,this,t),onmousemove:function(t){yx(t.event)},ondragend:PP(this._onDragEnd,this),onmouseover:PP(this._showDataInfo,this,!0),onmouseout:PP(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=ha(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=o.textStyleModel;this.group.add(i[t]=new yM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[kP(t[0],[0,100],e,!0),kP(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];wP(e,n,r,i.get("zoomLock")?"all":t,null!=o.minSpan?kP(o.minSpan,a,r,!0):null,null!=o.maxSpan?kP(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=LP([kP(n[0],r,a,!0),kP(n[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=LP(i.slice()),r=this._size;OP([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],r[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Uo(n.handles[t].parent,this.group),i=Yo(0===t?"right":"left",e),s=this._handleWidth/2+VP,l=Xo([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===NP?"middle":i,textAlign:o===NP?i:"center",text:a[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,a=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=LP(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");(null==r||"auto"===r)&&(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return w(n)?n(t,o):b(n)?n.replace("{value}",o):o},_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,i){this._dragging=!0;var n=this._displayables.barGroup.getLocalTransform(),r=Xo([e,i],n,!0),o=this._updateInterval(t,r[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-r);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(OP(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});fu({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var r=n.getAxisProxy(t.name,i);f(r.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),gu("dataZoom",function(t,e){var i=Fv(y(e.eachComponent,e,"dataZoom"),xP,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),AP.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var WP="\x00_ec_dataZoom_roams",GP=y,ZP=CP.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){ZP.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var r=p(e,function(t){return Qv(t.model)});f(e,function(e){var o=e.model,a={};f(["pan","zoom","scrollMove"],function(t){a[t]=GP(UP[t],this,e,n)},this),$v(i,{coordId:Qv(o),allCoordIds:r,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:a})},this)},this)},dispose:function(){Jv(this.api,this.dataZoomModel.id),ZP.superApply(this,"dispose",arguments),this._range=null}}),UP={zoom:function(t,e,i,n){var r=this._range,o=r.slice(),a=t.axisModels[0];if(a){var s=XP[e](null,[n.originX,n.originY],a,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return wP(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:om(function(t,e,i,n,r,o){var a=XP[n]([o.oldX,o.oldY],[o.newX,o.newY],e,r,i);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:om(function(t,e,i,n,r,o){var a=XP[n]([0,0],[o.scrollDelta,o.scrollDelta],e,r,i);return a.signal*(t[1]-t[0])*o.scrollDelta})},XP={grid:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,i,n,r){var o=i.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},YP=["rect","polygon","keep","clear"],jP=function(t,e){var i=t&&t.brush;if(x(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var r=t&&t.toolbox;x(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,n),am(s),e&&!s.length&&s.push.apply(s,YP)}},qP=f,KP={lineX:dm(0),lineY:dm(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Hh(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=n[0];return Hh(n,r,o)||Hh(n,r+a,o)||Hh(n,r,o+s)||Hh(n,r+a,o+s)||wi.create(t).contain(l[0],l[1])||Jo(r,o,r+a,o,n)||Jo(r,o,r,o+s,n)||Jo(r+a,o,r+a,o+s,n)||Jo(r,o+s,r+a,o+s,n)?!0:void 0}}},$P=f,JP=u,QP=_,tO=["dataToPoint","pointToData"],eO=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],iO=ym.prototype;iO.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=aO[t.brushType](0,i,e);t.__rangeOffset={offset:sO[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},iO.matchOutputRanges=function(t,e,i){$P(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var r=aO[t.brushType](1,n,t.range);i(t,r.values,n,e)})},this)},iO.setInputRanges=function(t,e){$P(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=aO[t.brushType](0,i.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?sO[t.brushType](n.values,r.offset,Mm(n.xyMinMax,r.xyMinMax)):n.values}},this)},iO.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:pm(n),isTargetByCursor:vm(n,t,i.coordSysModel),getLinearBrushOtherExtent:gm(n)}})},iO.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&JP(n.coordSyses,e.coordinateSystem)>=0},iO.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=xm(e,t),r=0;r<i.length;r++){var o=i[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(var r=0;r<rO.length;r++)if(rO[r](n,o))return o}return!0};var nO={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,r=t.gridModels,o=B(),a={},s={};(i||n||r)&&($P(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0}),$P(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),$P(r,function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),o.each(function(t){var r=t.coordinateSystem,o=[];$P(r.getCartesians(),function(t){(JP(i,t.getAxis("x").model)>=0||JP(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:oO.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){$P(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:oO.geo})})}},rO=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,r=t.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],oO={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Uo(t)),e}},aO={lineX:QP(wm,0),lineY:QP(wm,1),rect:function(t,e,i){var n=e[tO[t]]([i[0][0],i[1][0]]),r=e[tO[t]]([i[0][1],i[1][1]]),o=[_m([n[0],r[0]]),_m([n[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],r=p(i,function(i){var r=e[tO[t]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r});return{values:r,xyMinMax:n}}},sO={lineX:QP(bm,0),lineY:QP(bm,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},lO=["inBrush","outOfBrush"],uO="__ecBrushSelect",hO="__ecInBrushSelectEvent",cO=mT.VISUAL.BRUSH;yu(cO,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1});var n=e.brushTargetManager=new ym(e.option,t);n.setInputRanges(e.areas,t)})}),_u(cO,function(t,e,i){var r,o,a=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===v||m[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,r){var o=Cm(i);if(o&&!Dm(e,n)&&(f(b,function(n){o[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&r.push(n),w|=u(r)}),l(n)&&u(r))){var a=i.getData();a.each(function(t){Am(o,r,a,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};a.push(d);var g=e.option,v=g.brushLink,m=[],y=[],_=[],w=0;i||(r=g.throttleType,o=g.throttleDelay);var b=p(e.areas,function(t){return km(s({boundingRect:dO[t.brushType](t)},t))}),M=lm(e.option,lO,function(t){t.mappingMethod="fixed"});x(v)&&f(v,function(t){m[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=Cm(t),r=_[e],o=t.getData(),a=l(e)?function(t){return y[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return Am(n,r,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(r))&&hm(lO,M,o,a)})}),Im(e,r,o,a,i)});var dO={lineX:F,lineY:F,rect:function(t){return Lm(t.range)},polygon:function(t){for(var e,i=t.range,n=0,r=i.length;r>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]<e[0][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&Lm(e)}},fO=["#ddd"],pO=(bu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&um(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:fO},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return Pm(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Pm(this.option,t),this.brushType=this.brushOption.brushType}}),_),gO=f,vO=p,mO=Math.min,yO=Math.max,_O=Math.pow,xO=1e4,wO=6,bO=6,MO="globalPan",SO={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},IO={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},TO={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},AO=0;Om.prototype={constructor:Om,enableBrush:function(t){return this._brushType&&zm(this),t.brushType&&Rm(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},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){gO(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var r=u[e]=null!=i?(l[i].__brushOption=n,l[i]):Nm(h,Em(h,n));Fm(h,r)}}function a(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return r(n(TO),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new ku(l,t,i,e).add(o).update(o).remove(a).execute(),this},unmount:function(){return this.enableBrush(!1),Zm(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(Om,dx);var CO={mousedown:function(t){if(this._dragging)dy.call(this,t);else if(!t.target||!t.target.draggable){ly(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=Wm(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(sy(this,t,e),this._dragging){ly(t);var i=hy(this,t,e,!1);i&&Um(this,i)}},mouseup:dy},DO={lineX:fy(0),lineY:fy(1),rect:{createCover:function(t,e){return jm(pO(iy,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Ym(t);return Qm(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){qm(t,e,i,n)},updateCommon:Km,contain:uy},polygon:{createCover:function(t,e){var i=new rw;return i.add(new AM({name:"main",style:Jm(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new TM({name:"main",draggable:!0,drift:pO(ny,t,e),ondragend:pO(Um,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:oy(t,e,i)})},updateCommon:Km,contain:uy}};Mu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Om(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,py.apply(this,arguments)},updateTransform:py,updateView:py,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i})}}),gu({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),gu({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var kO={},LO=II.toolbox.brush;my.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:n(LO.title)};var PO=my.prototype;PO.render=PO.updateView=function(t,e){var i,n,r;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",r|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?r:e===i)?"emphasis":"normal")})},PO.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},PO.onclick=function(t,e,i){var n=this._brushType,r=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},gy("brush",my),du(jP);var OO=f,RO=function(t){var e=t&&t.visualMap;x(e)||(e=e?[e]:[]),OO(e,function(t){if(t){yy(t,"splitList")&&!yy(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&x(e)&&OO(e,function(t){M(t)&&(yy(t,"start")&&!yy(t,"min")&&(t.min=t.start),yy(t,"end")&&!yy(t,"max")&&(t.max=t.end))})}})};TS.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var zO=mT.VISUAL.COMPONENT;_u(zO,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(cm(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),_u(zO,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var r=e.getVisualMeta(y(_y,null,t,e))||{stops:[],outerColors:[]},o=e.getDataDimension(i),a=i.getDimensionInfo(o);null!=a&&(r.dimension=a.index,n.push(r))}}),t.getData().setVisual("visualMeta",n)}});var EO={get:function(t,e,i){var r=n((NO[t]||{})[e]);return i&&x(r)?r[r.length-1]:r}},NO={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]}},BO=ND.mapVisual,VO=ND.eachVisual,FO=x,HO=f,WO=da,GO=ua,ZO=F,UO=bu({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,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;Z_.canvasSupported||(i.realtime=!1),!e&&um(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=lm(this.option.controller,e,t),this.targetVisuals=lm(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Hn(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var r,o,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;return i=i||["<",">"],x(t)&&(t=t.slice(),r=!0),o=e?t:r?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):w(u)?r?u(t[0],t[1]):u(t):r?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=WO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,r=n.length-1;r>=0;r--){var o=n[r],a=t.getDimensionInfo(o);if(!a.isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){FO(a.color)&&!t.inRange&&(t.inRange={color:a.color.slice().reverse()}),t.inRange=t.inRange||{color:o.get("gradientColor")},HO(this.stateList,function(e){var i=t[e];if(b(i)){var n=EO.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},HO(n,function(t,e){if(ND.isValidType(e)){var i=EO.get(e,"inactive",h);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");HO(this.stateList,function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?a[0]:[a[0],a[0]])),s.symbol=BO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;VO(l,function(t){t>u&&(u=t)}),s.symbolSize=BO(l,function(t){return GO(t,[0,u],[0,a[0]],!0)})}},this)}var o=this.ecModel,a=this.option,s={inRange:a.inRange,outOfRange:a.outOfRange},l=a.target||(a.target={}),u=a.controller||(a.controller={});r(l,s),r(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:ZO,getValueState:ZO,getVisualMeta:ZO}),XO=[20,140],YO=UO.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(){YO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){YO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=XO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=XO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):x(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(){UO.prototype.completeVisualOption.apply(this,arguments),f(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=da((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,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){r.push({value:e,color:t(e,i)})}for(var i=xy(this,"outOfRange",this.getExtent()),n=xy(this,"inRange",this.option.range.slice()),r=[],o=0,a=0,s=n.length,l=i.length;l>a&&(!n.length||i[a]<=n[0]);a++)i[a]<n[o]&&e(i[a],"outOfRange");for(var u=1;s>o;o++,u=0)u&&r.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var u=1;l>a;a++)(!n.length||n[n.length-1]<i[a])&&(u&&(r.length&&e(r[r.length-1].value,"outOfRange"),u=0),e(i[a],"outOfRange"));var h=r.length;return{stops:r,outerColors:[h?r[0].color:"transparent",h?r[h-1].color:"transparent"]}}}),jO=Mu({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){return this.visualMapModel=t,t.get("show")===!1?void this.group.removeAll():void this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,i=fS(e.get("padding")||0),n=t.getBoundingRect();t.add(new kM({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){function n(t){return s[t]}function r(t,e){s[t]=e}i=i||{};var o=i.forceState,a=this.visualMapModel,s={};if("symbol"===e&&(s.symbol=a.get("itemSymbol")),"color"===e){var l=a.get("contentColor");s.color=l}var u=a.controllerVisuals[o||a.getValueState(t)],h=ND.prepareVisualTypes(u);return f(h,function(o){var a=u[o];i.convertOpacityToAlpha&&"opacity"===o&&(o="colorAlpha",a=u.__alphaForOpacity),ND.dependsOn(o,e)&&a&&a.applyVisual(t,n,r)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;Fa(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:F}),qO=ua,KO=f,$O=Math.min,JO=Math.max,QO=12,tR=6,eR=jO.extend({type:"visualMap.continuous",init:function(){eR.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.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 i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([a[0]/2,0===i?-o:a[1]+o],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new yM({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,r=this._orient,o=this._useHandle,a=wy(e,this.api,n),s=i.barGroup=this._createBarGroup(a);
  s.add(i.outOfRange=My()),s.add(i.inRange=My(null,o?Cy(this._orient):null,y(this._dragHandle,this,"all",!1),y(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=JO(l.width,l.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,r,a),this._createHandle(s,1,n,u,r,a)),this._createIndicator(s,n,u,r),t.add(s)},_createHandle:function(t,e,i,n,r){var o=y(this._dragHandle,this,e,!1),a=y(this._dragHandle,this,e,!0),s=My(Sy(e,n),Cy(this._orient),o,a);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new yM({draggable:!0,drift:o,onmousemove:function(t){yx(t.event)},ondragend:a,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===r?n/2:1.5*n,"horizontal"===r?0===e?-(1.5*n):1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var r=My([[0,0]],"move");r.position[0]=e[0],r.attr({invisible:!0,silent:!0}),t.add(r);var o=this.visualMapModel.textStyleModel,a=new yM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:o.getFont(),textFill:o.getTextColor()}});this.group.add(a);var s=["horizontal"===n?i/2:tR+3,0],l=this._shapes;l.indicator=r,l.indicatorLabel=a,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var r=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,r[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():Ay(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[qO(e[0],i,n,!0),qO(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,r=[0,i.itemSize[1]];wP(e,n,r,t,0);var o=i.getExtent();this._dataInterval=[qO(n[0],r,o,!0),qO(n[1],r,o,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,r=[0,e.itemSize[1]],o=t?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,r,"outOfRange");n.inRange.setStyle({fill:a.barColor,opacity:a.opacity}).setShape("points",a.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,a)},_createBarVisual:function(t,e,i,n){var r={forceState:n,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,r),a=[this.getControllerVisual(t[0],"symbolSize",r),this.getControllerVisual(t[1],"symbolSize",r)],s=this._createBarPoints(i,a);return{barColor:new BM(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var i=100,n=[],r=(t[1]-t[0])/i;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;i>o;o++){var a=t[0]+r*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new rw("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,o=i.handleLabels;KO([0,1],function(a){var s=r[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=Xo(i.handleLabelPoints[a],Uo(s,this.group));o[a].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[a]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=qO(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",Iy(!!i,n,l,a[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Xo(u.indicatorLabelPoint,Uo(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),v=this._orient;p.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===v?g:"middle",textAlign:"horizontal"===v?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=$O(JO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],o=i.getExtent();t=$O(JO(r[0],t),r[1]);var a=Ty(i,o,r),s=[t-a,t+a],l=qO(t,r,o,!0),u=[qO(s[0],r,o,!0),qO(s[1],r,o,!0)];s[0]<r[0]&&(u[0]=-1/0),s[1]>r[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):1/0===u[1]?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||Ay(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=qn(h,c);this._dispatchHighDown("downplay",by(d[0],i)),this._dispatchHighDown("highlight",by(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(e.dataType),o=r.get(i.getDataDimension(r),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_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",by(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var r=Uo(e,n?null:this.group);return eS[x(t)?"applyTransform":"transformDirection"](t,r,i)},_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()}}),iR={type:"selectDataRange",event:"dataRangeSelected",update:"update"};gu(iR,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),du(RO);{var nR=UO.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){nR.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();rR[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(M(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=ND.listVisualTypes(),r=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=EO.get(n,"inRange"===t?"active":"inactive",r)})},this),UO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,r=(e?i:t).selected||{};if(i.selected=r,f(n,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);r[e]&&(o?r[e]=!1:o=!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&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=ND.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=ND.findPieceIndex(e,this._pieceList);r===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var a=r.getRepresentValue({interval:e});o||(o=r.getValueState(a));var s=t(a,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],r=this,o=this._pieceList.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),a=o[o.length-1].interval[1],1/0!==a&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),rR={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(n[1]-n[0])/r;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i);var a=0;t.minOpen&&e.push({index:a++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=a+r;l>a;s+=o){var u=a===r-1?n[1]:s+o;e.push({index:a++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:a++,interval:[n[1],1/0],close:[0,0]}),Sa(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),Dy(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){M(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var r=n.value=t.value;n.interval=[r,r],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],a[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(a[0]=0),u[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=ND.retrieveVisuals(t),e.push(n)},this),Dy(t,e),Sa(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};jO.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var r=t.piece,u=new rw;u.onclick=y(this._onItemClick,this,r),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(r);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new yM({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:r.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),r=i.textStyleModel,o=r.getFont(),a=r.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=C(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),MS(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:by(i.findTargetDataIndices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return wy(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var o=new rw,a=this.visualMapModel.textStyleModel;o.add(new yM({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),r=t.get("inverse");return("horizontal"===n?r:!r)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Eh(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[o]=!0,f(r,function(t,e){r[e]=e===o})):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}})}du(RO);var oR=bu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){oR.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=vy(e);i&&r(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});Mu({type:"toolbox",render:function(t,e,i,n){function r(r,a){var s,l=c[r],d=c[a],f=u[l],p=new ia(f,t,t.ecModel);if(l&&!d){if(ky(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=vy(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,r,o){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=r.getIcons?r.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var v=n.iconPaths={};f(c,function(o,c){var f=$o(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle();var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",a({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Ao(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var t=h.getItemStyle();f.setStyle({text:d[c],textPosition:h.get("textPosition")||"bottom",textFill:h.get("textFill")||t.fill||t.stroke||"#000",textAlign:h.get("textAlign")||"center",textBackgroundColor:h.get("textBackgroundColor"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding")})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(r.onclick,r,e,i,c)),v[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new ku(this._featureNames||[],c).add(r).update(r).remove(_(r,null)).execute(),this._featureNames=c,Ug(s,t,i),s.add(Xg(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=Hi(e,nn(n)),o=t.position[0]+s.position[0],a=t.position[1]+s.position[1]+l,u=!1;a+r.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-r.height:l+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var aR=II.toolbox.saveAsImage;Ly.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:aR.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:aR.lang.slice()},Ly.prototype.unusable=!Z_.canvasSupported;var sR=Ly.prototype;sR.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=i.get("type",!0)||"png",o=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||Z_.browser.ie||Z_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var a=atob(o.split(",")[1]),s=a.length,l=new Uint8Array(s);s--;)l[s]=a.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>',d=window.open();d.document.write(c)}else{var f=document.createElement("a");f.download=n+"."+r,f.target="_blank",f.href=o;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},gy("saveAsImage",Ly);var lR=II.toolbox.magicType;Py.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:n(lR.title),option:{},seriesIndex:{}};var uR=Py.prototype;uR.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var hR={line:function(t,e,i,n){return"bar"===t?r({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?r({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){return"line"===t||"bar"===t?r({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0):void 0},tiled:function(t,e,i,n){return"line"===t||"bar"===t?r({id:e,stack:""},n.get("option.tiled")||{},!0):void 0}},cR=[["line","bar"],["stack","tiled"]];uR.onclick=function(t,e,i){var n=this.model,r=n.get("seriesIndex."+i);if(hR[i]){var o={series:[]},a=function(e){var r=e.subType,a=e.id,l=hR[i](r,a,e,n);l&&(s(l,e.option),o.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;o[d]=o[d]||[];for(var g=0;p>=g;g++)o[d][p]=o[d][p]||{};o[d][p].boundaryGap="bar"===i}}};f(cR,function(t){u(t,i)>=0&&f(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},a),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},gu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),gy("magicType",Py);var dR=II.toolbox.dataView,fR=new Array(60).join("-"),pR="    ",gR=new RegExp("["+pR+"]+","g");Wy.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:n(dR.title),lang:n(dR.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Wy.prototype.onclick=function(t,e){function i(){n.removeChild(o),_._dom=null}var n=e.getDom(),r=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=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=r.get("optionToContent"),c=r.get("contentToOption"),d=Ey(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:T(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=r.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=r.get("textColor"),u.style.borderColor=r.get("textareaBorderColor"),u.style.backgroundColor=r.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),y=document.createElement("div");v+=";background-color:"+r.get("buttonColor"),v+=";color:"+r.get("buttonTextColor");var _=this;_e(m,"click",i),_e(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Hy(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),m.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=v,m.style.cssText=v,!r.get("readOnly")&&g.appendChild(y),g.appendChild(m),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},Wy.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Wy.prototype.dispose=function(t,e){this.remove(t,e)},gy("dataView",Wy),gu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var r=n.get("data");i.push({name:t.name,data:Gy(t.data,r)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var vR=f,mR="\x00_ec_hist_store";AP.extend({type:"dataZoom.select"}),CP.extend({type:"dataZoom.select"});var yR=II.toolbox.dataZoom,_R=f,xR="\x00_ec_\x00toolbox-dataZoom_";qy.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(yR.title)};var wR=qy.prototype;wR.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,Jy(t,e,this,n,i),$y(t,e)},wR.onclick=function(t,e,i){bR[i].call(this)},wR.remove=function(){this._brushController.unmount()},wR.dispose=function(){this._brushController.dispose()};var bR={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Uy(this.ecModel))}};wR._onBrush=function(t,e){function i(t,e,i){var a=e.getAxis(t),s=a.model,l=n(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=wP(0,i.slice(),a.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){var r=i.getAxisModel(t,e.componentIndex);r&&(n=i)}),n}if(e.isEnd&&t.length){var r={},o=this.ecModel;this._brushController.updateCovers([]);var a=new ym(Ky(this.model.option),o,{include:["grid"]});a.matchOutputRanges(t,o,function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}}),Zy(o,r),this._dispatchZoomAction(r)}},wR._dispatchZoomAction=function(t){var e=[];_R(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},gy("dataZoom",qy),du(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||"all"===o||x(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,a){if(null==o||"all"===o||-1!==u(o,a)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:xR+t+a};s[r]=a,n.push(s)}})}}function i(e,i){var n=t[e];x(n)||(n=n?[n]:[]),_R(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);x(n)||(t.dataZoom=n=[n]);var r=t.toolbox;if(r&&(x(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var MR=II.toolbox.restore;Qy.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:MR.title};var SR=Qy.prototype;SR.onclick=function(t,e){Xy(t),e.dispatchAction({type:"restore",from:this.uid})},gy("restore",Qy),gu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var IR={path:null,compoundPath:null,group:rw,image:Sn,text:yM};du(function(t){var e=t.graphic;x(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var TR=bu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,TR.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,r=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var a=Un(r,o);Xn(a);var s=this._elOptionsToUpdate=[];f(a,function(t,e){var i=t.option;i&&(s.push(i),r_(t,i),o_(r,e,i),a_(r[e],i))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Mu({type:"graphic",init:function(){this._elMap=B(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var r=e.$action,o=e.id,a=i.get(o),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=i_(e);r&&"merge"!==r?"replace"===r?(e_(a,i),t_(o,l,h,i)):"remove"===r&&e_(a,i):a?a.attr(h):t_(o,l,h,i);var c=i.get(o);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,s_(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s<i.length;s++){var l=i[s],u=r.get(l.id);if(u&&u.isGroup){var h=u.parent,c=h===n;u.__ecGraphicWidth=ha(u.__ecGraphicWidthOption,c?o:h.__ecGraphicWidth)||0,u.__ecGraphicHeight=ha(u.__ecGraphicHeightOption,c?a:h.__ecGraphicHeight)||0}}for(var s=i.length-1;s>=0;s--){var l=i[s],u=r.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:a}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Fa(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){e_(e,t)}),this._elMap=B()},dispose:function(){this._clear()}});var AR,CR="urn:schemas-microsoft-com:vml",DR="undefined"==typeof window?null:window,kR=!1,LR=DR&&DR.document;if(LR&&!Z_.canvasSupported)try{!LR.namespaces.zrvml&&LR.namespaces.add("zrvml",CR),AR=function(t){return LR.createElement("<zrvml:"+t+' class="zrvml">')}}catch(PR){AR=function(t){return LR.createElement("<"+t+' xmlns="'+CR+'" class="zrvml">')}}var OR=Yb.CMD,RR=Math.round,zR=Math.sqrt,ER=Math.abs,NR=Math.cos,BR=Math.sin,VR=Math.max;if(!Z_.canvasSupported){var FR=",",HR="progid:DXImageTransform.Microsoft",WR=21600,GR=WR/2,ZR=1e5,UR=1e3,XR=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=WR+","+WR,t.coordorigin="0,0"},YR=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},jR=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},qR=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},KR=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},$R=function(t,e,i){return(parseFloat(t)||0)*ZR+(parseFloat(e)||0)*UR+i},JR=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},QR=function(t,e,i){var n=qe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=jR(n[0],n[1],n[2]),t.opacity=i*n[3])},tz=function(t){var e=qe(t);return[jR(e[0],e[1],e[2]),e[3]]},ez=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof NM){var r,o=0,a=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){r="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(oe(f,f,d),oe(p,p,d));var g=p[0]-f[0],v=p[1]-f[1];o=180*Math.atan2(g,v)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{r="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,m=i.scale,y=h,_=c;a=[(f[0]-u.x)/y,(f[1]-u.y)/_],d&&oe(f,f,d),y/=m[0]*WR,_/=m[1]*WR;var x=VR(y,_);s=0/x,l=2*n.r/x-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,M=[],S=[],I=0;b>I;I++){var T=w[I],A=tz(T.color);S.push(T.offset*l+s+" "+A[0]),(0===I||I===b-1)&&M.push(A)}if(b>=2){var C=M[0][0],D=M[1][0],k=M[0][1]*e.opacity,L=M[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=C,t.color2=D,t.colors=S.join(","),t.opacity=L,t.opacity2=k}"radial"===r&&(t.focusposition=a.join(","))}else QR(t,n,e.opacity)},iz=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof NM||QR(t,e.stroke,e.opacity)},nz=function(t,e,i,n){var r="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof NM&&KR(t,o),o||(o=l_(e)),r?ez(o,i,n):iz(o,i),qR(t,o)):(t[r?"filled":"stroked"]="false",KR(t,o))
  },rz=[[],[],[]],oz=function(t,e){var i,n,r,o,a,s,l=OR.M,u=OR.C,h=OR.L,c=OR.A,d=OR.Q,f=[],p=t.data,g=t.len();for(o=0;g>o;){switch(r=p[o++],n="",i=0,r){case l:n=" m ",i=1,a=p[o++],s=p[o++],rz[0][0]=a,rz[0][1]=s;break;case h:n=" l ",i=1,a=p[o++],s=p[o++],rz[0][0]=a,rz[0][1]=s;break;case d:case u:n=" c ",i=3;var v,m,y=p[o++],_=p[o++],x=p[o++],w=p[o++];r===d?(v=x,m=w,x=(x+2*y)/3,w=(w+2*_)/3,y=(a+2*y)/3,_=(s+2*_)/3):(v=p[o++],m=p[o++]),rz[0][0]=y,rz[0][1]=_,rz[1][0]=x,rz[1][1]=w,rz[2][0]=v,rz[2][1]=m,a=v,s=m;break;case c:var b=0,M=0,S=1,I=1,T=0;e&&(b=e[4],M=e[5],S=zR(e[0]*e[0]+e[1]*e[1]),I=zR(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/S));var A=p[o++],C=p[o++],D=p[o++],k=p[o++],L=p[o++]+T,P=p[o++]+L+T;o++;var O=p[o++],R=A+NR(L)*D,z=C+BR(L)*k,y=A+NR(P)*D,_=C+BR(P)*k,E=O?" wa ":" at ";Math.abs(R-y)<1e-4&&(Math.abs(P-L)>.01?O&&(R+=270/WR):Math.abs(z-C)<1e-4?O&&A>R||!O&&R>A?_-=270/WR:_+=270/WR:O&&C>z||!O&&z>C?y+=270/WR:y-=270/WR),f.push(E,RR(((A-D)*S+b)*WR-GR),FR,RR(((C-k)*I+M)*WR-GR),FR,RR(((A+D)*S+b)*WR-GR),FR,RR(((C+k)*I+M)*WR-GR),FR,RR((R*S+b)*WR-GR),FR,RR((z*I+M)*WR-GR),FR,RR((y*S+b)*WR-GR),FR,RR((_*I+M)*WR-GR)),a=y,s=_;break;case OR.R:var N=rz[0],B=rz[1];N[0]=p[o++],N[1]=p[o++],B[0]=N[0]+p[o++],B[1]=N[1]+p[o++],e&&(oe(N,N,e),oe(B,B,e)),N[0]=RR(N[0]*WR-GR),B[0]=RR(B[0]*WR-GR),N[1]=RR(N[1]*WR-GR),B[1]=RR(B[1]*WR-GR),f.push(" m ",N[0],FR,N[1]," l ",B[0],FR,N[1]," l ",B[0],FR,B[1]," l ",N[0],FR,B[1]);break;case OR.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;i>V;V++){var F=rz[V];e&&oe(F,F,e),f.push(RR(F[0]*WR-GR),FR,RR(F[1]*WR-GR),i-1>V?FR:"")}}}return f.join("")};Gr.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=l_("shape"),XR(i),this._vmlEl=i),nz(i,"fill",e,this),nz(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=zR(ER(s))}o.weight=a+"px"}var l=this.path||(this.path=new Yb);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=oz(l,this.transform),i.style.zIndex=$R(this.zlevel,this.z,this.z2),qR(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Gr.prototype.onRemove=function(t){KR(t,this._vmlEl),this.removeRectText(t)},Gr.prototype.onAdd=function(t){qR(t,this._vmlEl),this.appendRectText(t)};var az=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};Sn.prototype.brushVML=function(t){var e,i,n=this.style,r=n.image;if(az(r)){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var a=r.runtimeStyle,s=a.width,l=a.height;a.width="auto",a.height="auto",e=r.width,i=r.height,a.width=s,a.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}r=o}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,v=n.sy||0,m=f&&p,y=this._vmlEl;y||(y=LR.createElement("div"),XR(y),this._vmlEl=y);var _,x=y.style,w=!1,b=1,M=1;if(this.transform&&(_=this.transform,b=zR(_[0]*_[0]+_[1]*_[1]),M=zR(_[2]*_[2]+_[3]*_[3]),w=_[1]||_[2]),w){var S=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];oe(S,S,_),oe(I,I,_),oe(T,T,_),oe(A,A,_);var C=VR(S[0],I[0],T[0],A[0]),D=VR(S[1],I[1],T[1],A[1]),k=[];k.push("M11=",_[0]/b,FR,"M12=",_[2]/M,FR,"M21=",_[1]/b,FR,"M22=",_[3]/M,FR,"Dx=",RR(u*b+_[4]),FR,"Dy=",RR(h*M+_[5])),x.padding="0 "+RR(C)+"px "+RR(D)+"px 0",x.filter=HR+".Matrix("+k.join("")+", SizingMethod=clip)"}else _&&(u=u*b+_[4],h=h*M+_[5]),x.filter="",x.left=RR(u)+"px",x.top=RR(h)+"px";var L=this._imageEl,P=this._cropEl;L||(L=LR.createElement("div"),this._imageEl=L);var O=L.style;if(m){if(e&&i)O.width=RR(b*e*c/f)+"px",O.height=RR(M*i*d/p)+"px";else{var R=new Image,z=this;R.onload=function(){R.onload=null,e=R.width,i=R.height,O.width=RR(b*e*c/f)+"px",O.height=RR(M*i*d/p)+"px",z._imageWidth=e,z._imageHeight=i,z._imageSrc=r},R.src=r}P||(P=LR.createElement("div"),P.style.overflow="hidden",this._cropEl=P);var E=P.style;E.width=RR((c+g*c/f)*b),E.height=RR((d+v*d/p)*M),E.filter=HR+".Matrix(Dx="+-g*c/f*b+",Dy="+-v*d/p*M+")",P.parentNode||y.appendChild(P),L.parentNode!==P&&P.appendChild(L)}else O.width=RR(b*c)+"px",O.height=RR(M*d)+"px",y.appendChild(L),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var N="",B=n.opacity;1>B&&(N+=".Alpha(opacity="+RR(100*B)+") "),N+=HR+".AlphaImageLoader(src="+r+", SizingMethod=scale)",O.filter=N,y.style.zIndex=$R(this.zlevel,this.z,this.z2),qR(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Sn.prototype.onRemove=function(t){KR(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Sn.prototype.onAdd=function(t){qR(t,this._vmlEl),this.appendRectText(t)};var sz,lz="normal",uz={},hz=0,cz=100,dz=document.createElement("div"),fz=function(t){var e=uz[t];if(!e){hz>cz&&(hz=0,uz={});var i,n=dz.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(r){}e={style:n.fontStyle||lz,variant:n.fontVariant||lz,weight:n.fontWeight||lz,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},uz[t]=e,hz++}return e};Vi("measureText",function(t,e){var i=LR;sz||(sz=i.createElement("div"),sz.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",LR.body.appendChild(sz));try{sz.style.font=e}catch(n){}return sz.innerHTML="",sz.appendChild(i.createTextNode(t)),{width:sz.offsetWidth}});for(var pz=new wi,gz=function(t,e,i,n){var r=this.style;this.__dirty&&on(r,!0);var o=r.text;if(null!=o&&(o+=""),o){if(r.rich){var a=tn(o,r);o=[];for(var 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);o.push(u.join(""))}o=o.join("\n")}var c,d,f=r.textAlign,p=r.textVerticalAlign,g=fz(r.font),v=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Hi(o,v,f,p,r.textPadding,r.textLineHeight);var m=this.transform;if(m&&!n&&(pz.copy(e),pz.applyTransform(m),e=pz),n)c=e.x,d=e.y;else{var y=r.textPosition;if(y instanceof Array)c=e.x+JR(y[0],e.width),d=e.y+JR(y[1],e.height),f=f||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},r,e):Xi({},r,e);c=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}c=Zi(c,i.width,f),d=Ui(d,i.height,p),d+=i.height/2;var x,w,b,M=l_,S=this._textVmlEl;S?(b=S.firstChild,x=b.nextSibling,w=x.nextSibling):(S=M("line"),x=M("path"),w=M("textpath"),b=M("skew"),w.style["v-text-align"]="left",XR(S),x.textpathok=!0,w.on=!0,S.from="0 0",S.to="1000 0.05",qR(S,b),qR(S,x),qR(S,w),this._textVmlEl=S);var I=[c,d],T=S.style;m&&n?(oe(I,I,m),b.on=!0,b.matrix=m[0].toFixed(3)+FR+m[2].toFixed(3)+FR+m[1].toFixed(3)+FR+m[3].toFixed(3)+",0,0",b.offset=(RR(I[0])||0)+","+(RR(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=RR(c)+"px",T.top=RR(d)+"px"),w.string=YR(o);try{w.style.font=v}catch(A){}nz(S,"fill",{fill:r.textFill,opacity:r.opacity},this),nz(S,"stroke",{stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash||null},this),S.style.zIndex=$R(this.zlevel,this.z,this.z2),qR(t,S)}},vz=function(t){KR(t,this._textVmlEl),this._textVmlEl=null},mz=function(t){qR(t,this._textVmlEl)},yz=[Rw,Mn,Sn,Gr,yM],_z=0;_z<yz.length;_z++){var xz=yz[_z].prototype;xz.drawRectText=gz,xz.removeRectText=vz,xz.appendRectText=mz}yM.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)},yM.prototype.onRemove=function(t){this.removeRectText(t)},yM.prototype.onAdd=function(t){this.appendRectText(t)}}c_.prototype={constructor:c_,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.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||h_(e.width))-h_(e.paddingLeft)-h_(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||h_(e.height))-h_(e.paddingTop)-h_(e.paddingBottom)|0}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){c_.prototype[t]=d_(t)}),Vn("vml",c_);var wz="http://www.w3.org/2000/svg",bz=Yb.CMD,Mz=Array.prototype.join,Sz="none",Iz=Math.round,Tz=Math.sin,Az=Math.cos,Cz=Math.PI,Dz=2*Math.PI,kz=180/Cz,Lz=1e-4,Pz={};Pz.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=f_("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var r=b_(n);r.indexOf("NaN")<0&&__(i,"d",r)}w_(i,e,!1,t),y_(i,t.transform),null!=e.text&&Nz(t,t.getBoundingRect())};var Oz={};Oz.brush=function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement){var n=i.src;i=n}if(i){var r=e.x||0,o=e.y||0,a=e.width,s=e.height,l=t.__svgEl;l||(l=f_("image"),t.__svgEl=l),i!==t.__imageSrc&&(x_(l,"href",i),t.__imageSrc=i),__(l,"width",a),__(l,"height",s),__(l,"x",r),__(l,"y",o),y_(l,t.transform),null!=e.text&&Nz(t,t.getBoundingRect())}};var Rz={},zz=new wi,Ez={},Nz=function(t,e,i){var n=t.style;t.__dirty&&on(n,!0);var r=n.text;if(null!=r){r+="";var o=t.__textSvgEl;o||(o=f_("text"),t.__textSvgEl=o);var a,s,l=n.textPosition,u=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var h=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||Iw,c=n.textVerticalAlign;i=Hi(r,h,u,c,n.textPadding,n.textLineHeight,!1,n.truncate);var d=i.lineHeight;if(l instanceof Array)a=e.x+xn(l[0],e.width),s=e.y+xn(l[1],e.height);else{var f=t.calculateTextPosition?t.calculateTextPosition(Ez,n,e):Xi(Ez,n,e);a=f.x,s=f.y,c=f.textVerticalAlign,u=f.textAlign}M_(o,c),h&&(o.style.font=h);var p=n.textPadding;if(__(o,"x",a),__(o,"y",s),w_(o,n,!0,t),t instanceof yM||t.style.transformText)y_(o,t.transform);else{if(t.transform)zz.copy(e),zz.applyTransform(t.transform),e=zz;else{var g=t.transformCoordToGlobal(e.x,e.y);e.x=g[0],e.y=g[1],t.transform=De(Ce())}var v=n.textOrigin;"center"===v?(a=i.width/2+a,s=i.height/2+s):v&&(a=v[0]+a,s=v[1]+s);var m=-n.textRotation||0,y=Ce();Oe(y,y,m);var g=[t.transform[4],t.transform[5]];Pe(y,y,g),y_(o,y)}var _=Qi(r,h,p,d,n.truncate),x=_.lines,w=x.length,b=u;"left"===b?(b="start",p&&(a+=p[3])):"right"===b?(b="end",p&&(a-=p[1])):"center"===b&&(b="middle",p&&(a+=(p[3]-p[1])/2));var M=0;if("bottom"===c?(M=-i.height+d,p&&(M-=p[2])):"middle"===c?(M=(-i.height+d)/2,p&&(s+=(p[0]-p[2])/2)):p&&(M+=p[0]),t.__text!==r||t.__textFont!==h){var S=t.__tspanList||[];t.__tspanList=S;for(var I=0;w>I;I++){var T=S[I];T?T.innerHTML="":(T=S[I]=f_("tspan"),o.appendChild(T),M_(T,c),__(T,"text-anchor",b)),__(T,"x",a),__(T,"y",s+I*d+M),T.appendChild(document.createTextNode(x[I]))}for(;I<S.length;I++)o.removeChild(S[I]);S.length=w,t.__text=r,t.__textFont=h}else if(t.__tspanList.length)for(var A=t.__tspanList.length,I=0;A>I;++I){var T=t.__tspanList[I];T&&(__(T,"x",a),__(T,"y",s+I*d+M))}}};Rz.drawRectText=Nz,Rz.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],Nz(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},S_.prototype={diff:function(t,e,i){function n(){for(var i=-1*s;s>=i;i+=2){var n,l=u[i-1],h=u[i+1],c=(h?h.newPos:0)-i;l&&(u[i-1]=void 0);var d=l&&l.newPos+1<o,f=h&&c>=0&&a>c;if(d||f){if(!d||f&&l.newPos<h.newPos?(n=T_(h),r.pushComponent(n.components,void 0,!0)):(n=l,n.newPos++,r.pushComponent(n.components,!0,void 0)),c=r.extractCommon(n,e,t,i),n.newPos+1>=o&&c+1>=a)return I_(r,n.components,e,t);u[i]=n}else u[i]=void 0}s++}i||(i=function(t,e){return t===e}),this.equals=i;var r=this;t=t.slice(),e=e.slice();var o=e.length,a=t.length,s=1,l=o+a,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],e,t,0);if(u[0].newPos+1>=o&&h+1>=a){for(var c=[],d=0;d<e.length;d++)c.push(d);return[{indices:c,count:e.length}]}for(;l>=s;){var f=n();if(f)return f}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,o=i.length,a=t.newPos,s=a-n,l=0;r>a+1&&o>s+1&&this.equals(e[a+1],i[s+1]);)a++,s++,l++;return l&&t.components.push({count:l}),t.newPos=a,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var Bz=new S_,Vz=function(t,e,i){return Bz.diff(t,e,i)},Fz="0",Hz="1";A_.prototype.createElement=f_,A_.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),i.contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},A_.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},A_.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},A_.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},A_.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return f(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},A_.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;f(t,function(t){t[e._markLabel]=Fz})},A_.prototype.markUsed=function(t){t&&(t[this._markLabel]=Hz)},A_.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;f(e,function(e){e[i._markLabel]!==Hz&&t.removeChild(e)})}},A_.prototype.getSvgProxy=function(t){return t instanceof Gr?Pz:t instanceof Sn?Oz:t instanceof yM?Rz:Pz},A_.prototype.getTextSvgElement=function(t){return t.__textSvgEl},A_.prototype.getSvgElement=function(t){return t.__svgEl},h(C_,A_),C_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;f(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var r,o=e.style[n],a=i.getDefs(!0);o._dom?(r=o._dom,a.contains(o._dom)||i.addDom(r)):r=i.add(o),i.markUsed(e);var s=r.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},C_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Jx("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},C_.prototype.update=function(t){var e=this;A_.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},C_.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 Jx("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 i=t.colorStops,n=0,r=i.length;r>n;++n){var o=this.createElement("stop");o.setAttribute("offset",100*i[n].offset+"%");var a=i[n].color;if(a.indexOf(!1)){var s=qe(a)[3],l=Qe(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s)}else o.setAttribute("stop-color",i[n].color);e.appendChild(o)}t._dom=e},C_.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&A_.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&A_.prototype.markUsed.call(this,e._dom)}},h(D_,A_),D_.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},D_.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,r,o=this.getDefs(!0),a=e[0],s=i?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),n=a[s],o.contains(n)||o.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",r),o.appendChild(n),a[s]=n);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!i){var u=Array.prototype.slice.call(a.transform);Le(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=u}else l.brush(a);var h=this.getSvgElement(a);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},D_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&f(t.__clipPaths,function(t){t._dom&&A_.prototype.markUsed.call(e,t._dom),t._textDom&&A_.prototype.markUsed.call(e,t._textDom)})},h(k_,A_),k_.prototype.addWithoutUpdate=function(t,e){if(e&&L_(e.style)){var i,n=e.style;if(n._shadowDom){i=n._shadowDom;var r=this.getDefs(!0);r.contains(n._shadowDom)||this.addDom(i)}else i=this.add(e);this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},k_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},k_.prototype.update=function(t,e){var i=e.style;if(L_(i)){var n=this;A_.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},k_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},k_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,o,a,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/u),i.setAttribute("flood-color",a);var h=o/2/l,c=o/2/u,d=h+" "+c;i.setAttribute("stdDeviation",d),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(i),s._shadowDom=e},k_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&A_.prototype.markUsed.call(this,e._shadowDom)};var Wz=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var r=f_("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new C_(n,r),this.clipPathManager=new D_(n,r),this.shadowManager=new k_(n,r);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=o,t.appendChild(o),o.appendChild(r),this.resize(i.width,i.height),this._visibleList=[]};Wz.prototype={constructor:Wz,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 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();var e,i=this._svgRoot,n=this._visibleList,r=t.length,o=[];for(e=0;r>e;e++){var a=t[e],s=O_(a),l=V_(a)||B_(a);a.invisible||(a.__dirty&&(s&&s.brush(a),this.clipPathManager.update(a),a.style&&(this.gradientManager.update(a.style.fill),this.gradientManager.update(a.style.stroke),this.shadowManager.update(l,a)),a.__dirty=!1),o.push(a))}var u,h=Vz(n,o);for(e=0;e<h.length;e++){var c=h[e];if(c.removed)for(var d=0;d<c.count;d++){var a=n[c.indices[d]],l=V_(a),f=B_(a);N_(i,l),N_(i,f)}}for(e=0;e<h.length;e++){var c=h[e];if(c.added)for(var d=0;d<c.count;d++){var a=o[c.indices[d]],l=V_(a),f=B_(a);u?z_(i,l,u):E_(i,l),l?z_(i,f,l):u?z_(i,f,u):E_(i,f),z_(i,f,l),u=f||l||u,this.gradientManager.addWithoutUpdate(l,a),this.shadowManager.addWithoutUpdate(u,a),this.clipPathManager.markUsed(a)}else if(!c.removed)for(var d=0;d<c.count;d++){var a=o[c.indices[d]];u=l=B_(a)||V_(a)||u,this.gradientManager.markUsed(a),this.gradientManager.addWithoutUpdate(l,a),this.shadowManager.markUsed(a),this.shadowManager.addWithoutUpdate(l,a),this.clipPathManager.markUsed(a)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");if(0===i.length){if(t){var i=e.insertBefore(f_("defs"),e.firstChild);return i.contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=i.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||P_(s[i])||P_(a.style[i]))-(P_(s[r])||0)-(P_(s[o])||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(){this.refresh();var t=this._svgRoot.outerHTML;return"data:image/svg+xml;charset=UTF-8,"+t}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Wz.prototype[t]=F_(t)}),Vn("svg",Wz),t.version=nT,t.dependencies=rT,t.PRIORITY=mT,t.init=ou,t.connect=au,t.disConnect=su,t.disconnect=NT,t.dispose=lu,t.getInstanceByDom=uu,t.getInstanceById=hu,t.registerTheme=cu,t.registerPreprocessor=du,t.registerProcessor=fu,t.registerPostUpdate=pu,t.registerAction=gu,t.registerCoordinateSystem=vu,t.getCoordinateSystemDimensions=mu,t.registerLayout=yu,t.registerVisual=_u,t.registerLoading=wu,t.extendComponentModel=bu,t.extendComponentView=Mu,t.extendSeriesModel=Su,t.extendChartView=Iu,t.setCanvasCreator=Tu,t.registerMap=Au,t.getMap=Cu,t.dataTool=BT,t.zrender=eb,t.number=dS,t.format=_S,t.throttle=sl,t.helper=VA,t.matrix=Tx,t.vector=hx,t.color=Ux,t.parseGeoJSON=HA,t.parseGeoJson=UA,t.util=XA,t.graphic=YA,t.List=KT,t.Model=ia,t.Axis=ZA,t.env=Z_});