import{k as t,r as e,j as i,a7 as n,b as a,c as o,d as r,e as s,B as l,F as h,z as u,X as c,C as d}from"./index-909bd241.js";import{h as p}from"./moment-6961f857.js";import{_ as f}from"./plugin-vue_export-helper-46f75680.js";var g={},m={};"undefined"!=typeof window||void 0!==t&&t.__DEV__;var v={},y=2311;var x=function(){return y++};var _="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]);a&&(i.ie=!0,i.version=a[1]);o&&(i.edge=!0,i.version=o[1]);r&&(i.weChat=!0);return{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)}}(navigator.userAgent),b={},w={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},S={"[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},M=Object.prototype.toString,I=Array.prototype,A=I.forEach,T=I.filter,C=I.slice,L=I.map,D=I.reduce,P={};function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=M.call(t);if("[object Array]"===i){e=[];for(var n=0,a=t.length;n3&&(e=at.call(e,1));for(var n=this._$handlers[t],a=n.length,o=0;o4&&(e=at.call(e,1,e.length-1));for(var n=e[e.length-1],a=this._$handlers[t],o=a.length,r=0;r=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=ft(n[o],t,e))&&(!a.topTarget&&(a.topTarget=n[o]),"silent"!==r)){a.target=n[o];break}}return a}},st.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){pt.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("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lt.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),st.mixin(pt,ut),st.mixin(pt,ht);var gt=pt,mt={},vt="undefined"==typeof Float32Array?Array:Float32Array;function yt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}mt.create=function(){var t=new vt(6);return yt(t),t},mt.identity=yt,mt.copy=function(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},mt.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=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]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t},mt.translate=function(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},mt.rotate=function(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+r*h,t[1]=-n*h+r*u,t[2]=a*u+s*h,t[3]=-a*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t},mt.scale=function(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t},mt.invert=function(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null};var xt=mt,_t=j,bt=xt.identity;function wt(t){return t>5e-5||t<-5e-5}var St=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Mt=St.prototype;Mt.transform=null,Mt.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)},Mt.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||xt.create(),i?this.getLocalTransform(n):bt(n),e&&(i?xt.mul(n,t.transform,n):xt.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||xt.create(),xt.invert(this.invTransform,n)):n&&bt(n)},Mt.getLocalTransform=function(t){return St.getLocalTransform(this,t)},Mt.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)},Mt.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var It=[];Mt.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(xt.mul(It,t.invTransform,e),e=It);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=this.position,o=this.scale;wt(i-1)&&(i=Math.sqrt(i)),wt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),a[0]=e[4],a[1]=e[5],o[0]=i,o[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},Mt.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Mt.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_t.applyTransform(i,i,n),i},Mt.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_t.applyTransform(i,i,n),i},St.getLocalTransform=function(t,e){bt(e=e||[]);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),xt.scale(e,e,n),a&&xt.rotate(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var At=St,Tt={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*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?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Tt.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Tt.bounceIn(2*t):.5*Tt.bounceOut(2*t-1)+.5}},Ct=Tt;function Lt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Lt.prototype={constructor:Lt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?Ct[n]:n,o="function"==typeof a?a(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){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Dt=Lt,Pt={},kt=function(){this.head=null,this.tail=null,this._len=0},Ot=kt.prototype;Ot.insert=function(t){var e=new zt(t);return this.insertEntry(e),e},Ot.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++},Ot.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--},Ot.len=function(){return this._len},Ot.clear=function(){this.head=this.tail=null,this._len=0};var zt=function(t){this.value=t,this.next,this.prev},Et=function(t){this._list=new kt,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rt=Et.prototype;Rt.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new zt(e),r.key=t,i.insertEntry(r),n[t]=r}return a},Rt.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rt.clear=function(){this._list.clear(),this._map={}};var Nt=Et,Vt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Bt(t){return(t=Math.round(t))<0?0:t>255?255:t}function Gt(t){return t<0?0:t>1?1:t}function Wt(t){return t.length&&"%"===t.charAt(t.length-1)?Bt(parseFloat(t)/100*255):Bt(parseInt(t,10))}function Ht(t){return t.length&&"%"===t.charAt(t.length-1)?Gt(parseFloat(t)/100):Gt(parseFloat(t))}function Ft(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Zt(t,e,i){return t+(e-t)*i}function jt(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function Ut(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var qt=new Nt(20),Xt=null;function Yt(t,e){Xt&&Ut(Xt,e),Xt=qt.put(t,Xt||e.slice())}function $t(t,e){if(t){e=e||[];var i=qt.get(t);if(i)return Ut(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in Vt)return Ut(e,Vt[a]),Yt(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(jt(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Yt(t,e),e):void jt(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(jt(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Yt(t,e),e):void jt(e,0,0,0,1):void 0;var o=a.indexOf("("),r=a.indexOf(")");if(-1!==o&&r+1===a.length){var s=a.substr(0,o),l=a.substr(o+1,r-(o+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void jt(e,0,0,0,1);h=Ht(l.pop());case"rgb":return 3!==l.length?void jt(e,0,0,0,1):(jt(e,Wt(l[0]),Wt(l[1]),Wt(l[2]),h),Yt(t,e),e);case"hsla":return 4!==l.length?void jt(e,0,0,0,1):(l[3]=Ht(l[3]),Kt(l,e),Yt(t,e),e);case"hsl":return 3!==l.length?void jt(e,0,0,0,1):(Kt(l,e),Yt(t,e),e);default:return}}jt(e,0,0,0,1)}}function Kt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ht(t[1]),a=Ht(t[2]),o=a<=.5?a*(n+1):a+n-a*n,r=2*a-o;return jt(e=e||[],Bt(255*Ft(r,o,i+1/3)),Bt(255*Ft(r,o,i)),Bt(255*Ft(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Jt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=Bt(Zt(r[0],s[0],l)),i[1]=Bt(Zt(r[1],s[1],l)),i[2]=Bt(Zt(r[2],s[2],l)),i[3]=Gt(Zt(r[3],s[3],l)),i}}var Qt=Jt;function te(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=$t(e[a]),s=$t(e[o]),l=n-a,h=ie([Bt(Zt(r[0],s[0],l)),Bt(Zt(r[1],s[1],l)),Bt(Zt(r[2],s[2],l)),Gt(Zt(r[3],s[3],l))],"rgba");return i?{color:h,leftIndex:a,rightIndex:o,value:n}:h}}var ee=te;function ie(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+")"}}Pt.parse=$t,Pt.lift=function(t,e){var i=$t(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return ie(i,4===i.length?"rgba":"rgb")}},Pt.toHex=function(t){var e=$t(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Pt.fastLerp=Jt,Pt.fastMapToColor=Qt,Pt.lerp=te,Pt.mapToColor=ee,Pt.modifyHSL=function(t,e,i,n){if(t=$t(t))return t=function(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,h=(s+r)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+r):l/(2-s-r);var u=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Ht(i)),null!=n&&(t[2]=Ht(n)),ie(Kt(t),"rgba")},Pt.modifyAlpha=function(t,e){if((t=$t(t))&&null!=e)return t[3]=Gt(e),ie(t,"rgba")},Pt.stringify=ie;var ne=Dt,ae=Pt,oe=b.isArrayLike,re=Array.prototype.slice;function se(t,e){return t[e]}function le(t,e,i){t[e]=i}function he(t,e,i){return(e-t)*i+t}function ue(t,e,i){return i>.5?e:t}function ce(t,e,i,n,a){var o=t.length;if(1==a)for(var r=0;ra)t.length=a;else for(var o=n;o=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=L;ie);i++);i=Math.min(i-1,h-2)}L=i,D=e;var n=m[i+1]-m[i];if(0!==n)if(M=(e-m[i])/n,l)if(A=v[i],I=v[0===i?i:i-1],T=v[i>h-2?h-1:i+1],C=v[i>h-3?h-1:i+2],d)fe(I,A,T,C,M,M*M,M*M*M,r(t,a),g);else{if(p)o=fe(I,A,T,C,M,M*M,M*M*M,P,1),o=ve(P);else{if(f)return ue(A,T,M);o=ge(I,A,T,C,M,M*M,M*M*M)}s(t,a,o)}else if(d)ce(v[i],v[i+1],M,r(t,a),g);else{var o;if(p)ce(v[i],v[i+1],M,P,1),o=ve(P);else{if(f)return ue(v[i],v[i+1],M);o=he(v[i],v[i+1],M)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}var xe=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||se,this._setter=n||le,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};xe.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:me(a)})}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;t1&&(Ie=function(){for(var t in arguments);});var Ae=Ie,Te=_e,Ce=Ae,Le=b,De=Le.isString,Pe=Le.isFunction,ke=Le.isObject,Oe=Le.isArrayLike,ze=Le.indexOf,Ee=function(){this.animators=[]};Ee.prototype={constructor:Ee,animate:function(t,e){var i,n=!1,a=this,o=this.__zr;if(t){var r=t.split("."),s=a;n="shape"===r[0];for(var l=0,h=r.length;l0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}};var Re=x,Ne=rt,Ve=At,Be=Ee,Ge=b,We=function(t){Ve.call(this,t),Ne.call(this,t),Be.call(this,t),this.id=t.id||Re()};We.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,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(t,e){},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(Ge.isObject(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=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Ke(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}}},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)};var Je=Ke,Qe=b,ti=Ue,ei=Je,ii=function(t){for(var e in t=t||{},ti.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ii.prototype={constructor:ii,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=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 ii&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=Qe.indexOf(n,t);return a<0||(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0;)a++;return a-e}function oi(t,e,i,n,a){for(n===e&&n++;n>>1])<0?l=o:s=o+1;var h=n-s;switch(h){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(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=r}}function ri(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;ls&&(l=s);var h=r;r=a-l,l=a-h}for(r++;r>>1);o(t,e[i+u])>0?r=u+1:l=u}return l}function si(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;ls&&(l=s);var h=r;r=a-l,l=a-h}else{for(s=n-a;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;r>>1);o(t,e[i+u])<0?l=u:r=u+1}return l}function li(t,e){var i,n,a=7,o=0;t.length;var r=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===o-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),o--;var d=si(t[u],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(c=ri(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,o,s){var l=0;for(l=0;l=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l=0;l--)t[p+l]=t[d+l];return void(t[c]=r[u])}var f=a;for(;;){var g=0,m=0,v=!1;do{if(e(r[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=r[u--],m++,g=0,1==--s){v=!0;break}}while((g|m)=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=r[u--],1==--s){v=!0;break}if(0!==(m=s-ri(t[h],r,0,s,s-1,e))){for(s-=m,p=(c-=m)+1,d=(u-=m)+1,l=0;l=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(a=f)<1&&(a=1);if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=r[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;o>1;){var t=o-2;t>0&&n[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((o=ai(t,i,n,e))s&&(l=s),oi(t,i,i+l,i+o,e),o=l}r.pushRun(i,o),r.mergeRuns(),a-=o,i+=o}while(0!==a);r.forceMergeRuns()}}},ui=b,ci=_,di=ni,pi=hi;function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};gi.prototype={constructor:gi,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof di&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fi};var mi=gi,vi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],yi=function(t,e){this.extendFrom(t,!1),this.host=e};function xi(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),t.createLinearGradient(n,o,a,r)}function _i(t,e,i){var n=i.width,a=i.height,o=Math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*a+i.y,l*=o),t.createRadialGradient(r,s,0,r,s,l)}for(var bi=yi.prototype={constructor:yi,host:null,fill:"#000",stroke:null,opacity:1,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){for(var n=this,a=i&&i.style,o=!a,r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?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?_i:xi)(t,e,i),a=e.colorStops,o=0;o5e3&&($i=0,Yi={}),$i++,Yi[i]=a,a}function tn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function en(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function nn(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=an(e,i,n,a);for(var r=0,s=o.length;r=o;s++)r-=o;var l=Qi(i);return l>r&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function on(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var o=Qi(t,n);if(o<=i)return t;for(var r=0;;r++){if(o<=a||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?rn(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;o=Qi(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function rn(t,e,i,n){for(var a=0,o=0,r=t.length;ol)t="",o=[];else if(null!=h)for(var u=an(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;ca&&cn(i,t.substring(a,o)),cn(i,n[2],n[1]),a=Ki.lastIndex}ap)return{lines:[],width:0,height:0};L.textWidth=Qi(L.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))L.percentWidth=S,h.push(L),S=0;else{if(M){S=L.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&(A=Fi.findExistImage(A),Fi.isImageReady(A)&&(S=Math.max(S,A.width*w/A.height)))}var T=_?_[1]+_[3]:0;S+=T;var C=null!=d?d-v:null;null!=C&&Ch&&(i*=h/(r=i+n),n*=h/r),a+o>h&&(a*=h/(r=a+o),o*=h/r),n+a>u&&(n*=u/(r=n+a),a*=u/r),i+o>u&&(i*=u/(r=i+o),o*=u/r),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.quadraticCurveTo(s+h,l,s+h,l+n),t.lineTo(s+h,l+u-a),0!==a&&t.quadraticCurveTo(s+h,l+u,s+h-a,l+u),t.lineTo(s+o,l+u),0!==o&&t.quadraticCurveTo(s,l+u,s,l+u-o),t.lineTo(s,l+i),0!==i&&t.quadraticCurveTo(s,l,s+i,l)};var pn=b,fn=pn.retrieve2,gn=pn.retrieve3,mn=pn.each,vn=pn.normalizeCssArray,yn=pn.isString,xn=pn.isObject,_n=Ni,bn=dn,wn=Vi,Sn={left:1,right:1,center:1},Mn={top:1,bottom:1,middle:1};function In(t){if(t){t.font=_n.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Sn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Mn[i]?i:"top",t.textPadding&&(t.textPadding=vn(t.textPadding))}}function An(t,e,i,n,a){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function Tn(t,e,i,n,a,o,r,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=o+a/2;"top"===h?u=o+i.height/2:"bottom"===h&&(u=o+a-i.height/2),!i.isLineHolder&&Cn(l)&&Ln(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Rn(r,s,c),u-=i.height/2-c[2]-i.textHeight/2),kn(e,"shadowBlur",gn(l.textShadowBlur,n.textShadowBlur,0)),kn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",gn(l.textShadowOffsetX,n.textShadowOffsetX,0)),kn(e,"shadowOffsetY",gn(l.textShadowOffsetY,n.textShadowOffsetY,0)),kn(e,"textAlign",s),kn(e,"textBaseline","middle"),kn(e,"font",i.font||_n.DEFAULT_FONT);var d=On(l.textStroke||n.textStroke,f),p=zn(l.textFill||n.textFill),f=fn(l.textStrokeWidth,n.textStrokeWidth);d&&(kn(e,"lineWidth",f),kn(e,"strokeStyle",d),e.strokeText(i.text,r,u)),p&&(kn(e,"fillStyle",p),e.fillText(i.text,r,u))}function Cn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ln(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=yn(s);if(kn(e,"shadowBlur",i.textBoxShadowBlur||0),kn(e,"shadowColor",i.textBoxShadowColor||"transparent"),kn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),kn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?bn.buildPath(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(u)kn(e,"fillStyle",s),e.fill();else if(xn(s)){var d=s.image;(d=wn.createOrUpdateImage(d,null,t,Dn,s))&&wn.isImageReady(d)&&e.drawImage(d,n,a,o,r)}l&&h&&(kn(e,"lineWidth",l),kn(e,"strokeStyle",h),e.stroke())}function Dn(t,e){e.image=t}function Pn(t,e,i){var n=e.x||0,a=e.y||0,o=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+En(s[0],i.width),a=i.y+En(s[1],i.height);else{var l=_n.adjustTextPositionOnRect(s,i,e.textDistance);n=l.x,a=l.y,o=o||l.textAlign,r=r||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],a+=h[1])}return{baseX:n,baseY:a,textAlign:o,textVerticalAlign:r}}function kn(t,e,i){return t[e]=i,t[e]}function On(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function zn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function En(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Rn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}Ri.normalizeTextStyle=function(t){return In(t),mn(t.rich,In),t},Ri.renderText=function(t,e,i,n,a){n.rich?function(t,e,i,n,a){var o=t.__textCotentBlock;o&&!t.__dirty||(o=t.__textCotentBlock=_n.parseRichText(i,n));!function(t,e,i,n,a){var o=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Pn(s,n,a),u=h.baseX,c=h.baseY,d=h.textAlign,p=h.textVerticalAlign;An(e,n,a,u,c);var f=_n.adjustTextX(u,r,d),g=_n.adjustTextY(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;Cn(n)&&Ln(t,e,n,f,g,r,s);for(var x=0;x=0&&"right"===(_=w[L]).textAlign;)Tn(t,e,_,n,M,v,C,"right"),I-=_.width,C-=_.width,L--;for(T+=(o-(T-m)-(y-C)-I)/2;A<=L;)Tn(t,e,_=w[A],n,M,v,T+_.width/2,"center"),T+=_.width,A++;v+=M}}(t,e,o,n,a)}(t,e,i,n,a):function(t,e,i,n,a){var o=kn(e,"font",n.font||_n.DEFAULT_FONT),r=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=_n.parsePlainText(i,o,r,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Pn(l,n,a),d=c.baseX,p=c.baseY,f=c.textAlign,g=c.textVerticalAlign;An(e,n,a,d,p);var m=_n.adjustTextY(p,l,g),v=d,y=m,x=Cn(n);if(x||r){var _=_n.getWidth(i,o);r&&(_+=r[1]+r[3]);var b=_n.adjustTextX(d,_,f);x&&Ln(t,e,n,b,m,_,l),r&&(v=Rn(d,f,r),y+=r[0])}kn(e,"textAlign",f||"left"),kn(e,"textBaseline","middle"),kn(e,"shadowBlur",n.textShadowBlur||0),kn(e,"shadowColor",n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",n.textShadowOffsetX||0),kn(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var w=n.textStrokeWidth,S=On(n.textStroke,w),M=zn(n.textFill);S&&(kn(e,"lineWidth",w),kn(e,"strokeStyle",S));M&&kn(e,"fillStyle",M);for(var I=0;I=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i=0){if(!r){if((r=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),r.renderScope={},r&&r.__progress>r.__maxProgress){p=r.__nextIdxNotProg-1;continue}s=r.__progress,r.__dirty||(c=s),r.__progress=c+1}v===c&&this._doPaintEl(g,r,!0,r.renderScope)}else this._doPaintEl(g,i,e,o);g.__dirty=!1}}r&&d(r),a&&a.restore(),this._furtherProgressive=!1,ta.each(this._progressiveLayers,(function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)}),this)},_doPaintEl:function(t,e,i,n){var a=e.ctx,o=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!o||o[0]||o[3])&&(!t.culling||!function(t,e,i){return ua.copy(t.getBoundingRect()),t.transform&&ua.applyTransform(t.transform),ca.width=e,ca.height=i,!ua.intersect(ca)}(t,this._width,this._height))){var r=t.__clipPaths;(n.prevClipLayer!==e||function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i0&&t>n[0]){for(r=0;rt);r++);o=i[n[r]]}if(n.splice(r+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)}else ea("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n=0){r!==p&&(r=p,l++);var f=c.__frame=l-1;if(!o){var g=Math.min(s,4);(o=i[g])||(o=i[g]=new aa("progressive",this,this.dpr)).initContext(),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,f),o.__maxProgress>=o.__progress&&(d.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuiltinLayer((function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)})),i.length=Math.min(s,5),ta.each(i,(function(t,e){a[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ta.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&ta.merge(n,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(ta.indexOf(i,t),1))},resize:function(t,e){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){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);ta.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}return this._width=t,this._height=e,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)return this._layers[0].dom;var e=new aa("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();var i,n=this.storage.getDisplayList(!0),a={},o=this;function r(t,i){var n,a=o._zlevelList;null==t&&(t=-1/0);for(var r=0;rt&&s=0){var a="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];a&&xa(t,a,e,i)}else xa(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&ya.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e},fa.addEventListener=function(t,e,i){va?t.addEventListener(e,i):t.attachEvent("on"+e,i)},fa.removeEventListener=function(t,e,i){va?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},fa.stop=ba,fa.notLeftMouse=function(t){return t.which>1};var wa=b,Sa=fa.Dispatcher,Ma=Ei,Ia=_e,Aa=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,Sa.call(this)};Aa.prototype={constructor:Aa,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&a&&a.length>1){var r=Da(a)/Da(o);!isFinite(r)&&(r=1),e.pinchScale=r;var s=[((n=a)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ka=La,Oa=fa,za=Oa.addEventListener,Ea=Oa.removeEventListener,Ra=Oa.normalizeEvent,Na=b,Va=rt,Ba=_,Ga=ka,Wa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ha=["touchstart","touchend","touchmove"],Fa={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Za=Na.map(Wa,(function(t){var e=t.replace("mouse","pointer");return Fa[e]?e:t}));function ja(t){return"mousewheel"===t&&Ba.browser.firefox?"DOMMouseScroll":t}function Ua(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var a=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),a){var o=a.type;e.gestureEvent=o,t.handler.dispatchToElement({target:a.target},o,a.event)}}function qa(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout((function(){t._touching=!1}),700)}var Xa={mousemove:function(t){t=Ra(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ra(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Ua(this,t,"start"),Xa.mousemove.call(this,t),Xa.mousedown.call(this,t),qa(this)},touchmove:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,Ua(this,t,"change"),Xa.mousemove.call(this,t),qa(this)},touchend:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,Ua(this,t,"end"),Xa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Xa.click.call(this,t),qa(this)},pointerdown:function(t){Xa.mousedown.call(this,t)},pointermove:function(t){Ya(t)||Xa.mousemove.call(this,t)},pointerup:function(t){Xa.mouseup.call(this,t)},pointerout:function(t){Ya(t)||Xa.mouseout.call(this,t)}};function Ya(t){var e=t.pointerType;return"pen"===e||"touch"===e}function $a(t){var e;function i(e,i){Na.each(e,(function(e){za(t,ja(e),i._handlers[e])}),i)}Va.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Ga,this._handlers={},e=this,Na.each(Ha,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Za,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Wa,(function(t){var i,n;e._handlers[t]=(i=Xa[t],n=e,function(){if(!n._touching)return i.apply(n,arguments)})})),Ba.pointerEventsSupported?i(Za,this):(Ba.touchEventsSupported&&i(Ha,this),i(Wa,this))}Na.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Xa[t]=function(e){e=Ra(this.dom,e),this.trigger(t,e)}}));var Ka=$a.prototype;Ka.dispose=function(){for(var t=Wa.concat(Ha),e=0;e0){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])/a*o+i[0]},po.parsePercent=function(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?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},po.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},po.asc=function(t){return t.sort((function(t,e){return t-e})),t},po.getPrecision=function(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},po.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a},po.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-a+o,0),20);return isFinite(r)?r:20},po.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var n=fo.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),o=fo.map(t,(function(t){return(isNaN(t)?0:t)/n*a*100})),r=100*a,s=fo.map(o,(function(t){return Math.floor(t)})),l=fo.reduce(s,(function(t,e){return t+e}),0),h=fo.map(o,(function(t,e){return t-s[e]}));lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/a},po.MAX_SAFE_INTEGER=9007199254740991,po.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},po.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},po.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=go.exec(t);if(!e)return new Date(NaN);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 null==t?new Date(NaN):new Date(Math.round(t))},po.quantity=function(t){return Math.pow(10,mo(t))},po.nice=function(t,e){var i=mo(t),n=Math.pow(10,i),a=t/n;return t=(e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},po.reformIntervals=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n=0};var vo=b,yo=Ni,xo=po;var _o=vo.normalizeCssArray;function bo(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var wo=["a","b","c","d","e","f","g"],So=function(t,e){return"{"+t+(null==e?"":e)+"}"};var Mo=function(t){return t<10?"0"+t:t};var Io=yo.truncateText,Ao=yo.getBoundingRect;co.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},co.toCamelCase=function(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},co.normalizeCssArray=_o,co.encodeHTML=bo,co.formatTpl=function(t,e,i){vo.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o':""},co.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=xo.parseDate(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),h=n["get"+a+"Minutes"](),u=n["get"+a+"Seconds"]();return t=t.replace("MM",Mo(r)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Mo(s)).replace("d",s).replace("hh",Mo(l)).replace("h",l).replace("mm",Mo(h)).replace("m",h).replace("ss",Mo(u)).replace("s",u)},co.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},co.truncateText=Io,co.getTextRect=Ao;var To={},Co=b,Lo="___EC__COMPONENT__CONTAINER___";function Do(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}function Po(t,e){var i=Co.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function ko(t,e,i){return this.superClass.prototype[e].apply(t,i)}To.set=function(t,e,i){return t["\0ec_\0"+e]=i},To.get=function(t,e){return t["\0ec_\0"+e]},To.hasOwn=function(t,e){return t.hasOwnProperty("\0ec_\0"+e)},To.parseClassType=Do,To.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return Co.extend(i.prototype,t),i.extend=this.extend,i.superCall=Po,i.superApply=ko,Co.inherits(i,this),i.superClass=e,i}},To.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Co.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Do(e)).sub){if(e.sub!==Lo){var n=function(t){var e=i[t.main];e&&e[Lo]||((e=i[t.main]={})[Lo]=!0);return e}(e);n[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[Lo]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=Do(t);var e=[],n=i[t.main];return n&&n[Lo]?Co.each(n,(function(t,i){i!==Lo&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Do(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return Co.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Do(t);var e=i[t.main];return e&&e[Lo]},t.parseClassType=Do,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},To.setReadOnly=function(t,e){};var Oo=b;var zo=function(t){for(var e=0;e=0||n&&Oo.indexOf(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},Eo=zo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ro={getLineStyle:function(t){var e=Eo(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),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?null:"dashed"===e?[n,n]:[i,i]}},No=zo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vo={getAreaStyle:function(t,e){return No(this,t,e)}},Bo={},Go={},Wo={},Ho=j,Fo=Ho.create,Zo=Ho.distSquare,jo=Math.pow,Uo=Math.sqrt,qo=Uo(3),Xo=1/3,Yo=Fo(),$o=Fo(),Ko=Fo();function Jo(t){return t>-1e-8&&t<1e-8}function Qo(t){return t>1e-8||t<-1e-8}function tr(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function er(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}Wo.cubicAt=tr,Wo.cubicDerivativeAt=function(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)},Wo.cubicRootAt=function(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-a,u=s*s-3*r*l,c=s*l-9*r*h,d=l*l-3*s*h,p=0;if(Jo(u)&&Jo(c)){if(Jo(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[p++]=M)}else{var f=c*c-4*u*d;if(Jo(f)){var g=c/u,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(o[p++]=M),m>=0&&m<=1&&(o[p++]=m)}else if(f>0){var v=Uo(f),y=u*s+1.5*r*(-c+v),x=u*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-jo(-y,Xo):jo(y,Xo))+(x=x<0?-jo(-x,Xo):jo(x,Xo))))/(3*r))>=0&&M<=1&&(o[p++]=M)}else{var _=(2*u*s-3*r*c)/(2*Uo(u*u*u)),b=Math.acos(_)/3,w=Uo(u),S=Math.cos(b),M=(-s-2*w*S)/(3*r),I=(m=(-s+w*(S+qo*Math.sin(b)))/(3*r),(-s+w*(S-qo*Math.sin(b)))/(3*r));M>=0&&M<=1&&(o[p++]=M),m>=0&&m<=1&&(o[p++]=m),I>=0&&I<=1&&(o[p++]=I)}}return p},Wo.cubicExtrema=function(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Jo(r)){if(Qo(o))(u=-s/o)>=0&&u<=1&&(a[l++]=u)}else{var h=o*o-4*r*s;if(Jo(h))a[0]=-o/(2*r);else if(h>0){var u,c=Uo(h),d=(-o-c)/(2*r);(u=(-o+c)/(2*r))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Wo.cubicSubdivide=function(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,h=(s-r)*a+r,u=(l-s)*a+s,c=(u-h)*a+h;o[0]=t,o[1]=r,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n},Wo.cubicProjectPoint=function(t,e,i,n,a,o,r,s,l,h,u){var c,d,p,f,g,m=.005,v=1/0;Yo[0]=l,Yo[1]=h;for(var y=0;y<1;y+=.05)$o[0]=tr(t,i,a,r,y),$o[1]=tr(e,n,o,s,y),(f=Zo(Yo,$o))=0&&f=0&&u<=1&&(a[l++]=u)}else{var h=r*r-4*o*s;if(Jo(h))(u=-r/(2*o))>=0&&u<=1&&(a[l++]=u);else if(h>0){var u,c=Uo(h),d=(-r-c)/(2*o);(u=(-r+c)/(2*o))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Wo.quadraticExtremum=function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},Wo.quadraticSubdivide=function(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i},Wo.quadraticProjectPoint=function(t,e,i,n,a,o,r,s,l){var h,u=.005,c=1/0;Yo[0]=r,Yo[1]=s;for(var d=0;d<1;d+=.05){$o[0]=er(t,i,a,d),$o[1]=er(e,n,o,d),(m=Zo(Yo,$o))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ur[0]=lr(a)*i+t,ur[1]=sr(a)*n+e,cr[0]=lr(o)*i+t,cr[1]=sr(o)*n+e,h(s,ur,cr),u(l,ur,cr),(a%=hr)<0&&(a+=hr),(o%=hr)<0&&(o+=hr),a>o&&!r?o+=hr:aa&&(dr[0]=lr(p)*i+t,dr[1]=sr(p)*n+e,h(s,dr,s),u(l,dr,l))};var gr=Wo,mr=j,vr=ir,yr=Je,xr=be.devicePixelRatio,_r={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},br=[],wr=[],Sr=[],Mr=[],Ir=Math.min,Ar=Math.max,Tr=Math.cos,Cr=Math.sin,Lr=Math.sqrt,Dr=Math.abs,Pr="undefined"!=typeof Float32Array,kr=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};kr.prototype={constructor:kr,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Dr(1/xr/t)||0,this._uy=Dr(1/xr/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(_r.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=Dr(t-this._xi)>this._ux||Dr(e-this._yi)>this._uy||this._len<5;return this.addData(_r.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,o){return this.addData(_r.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(_r.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.addData(_r.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=Tr(a)*i+t,this._yi=Cr(a)*i+t,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(_r.R,t,e,i,n),this},closePath:function(){this.addData(_r.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;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&p<=t||u<0&&p>=t||0==u&&(c>0&&f<=e||c<0&&f>=e);)p+=u*(i=r[n=this._dashIdx]),f+=c*i,this._dashIdx=(n+1)%g,u>0&&pl||c>0&&fh||s[n%2?"moveTo":"lineTo"](u>=0?Ir(p,t):Ar(p,t),c>=0?Ir(f,e):Ar(f,e));u=p-t,c=f-e,this._dashOffset=-Lr(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,a,o){var r,s,l,h,u,c=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=gr.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=Lr(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(r=(b-d)/y;r<=1;)h=v(g,t,i,a,r),u=v(m,e,n,o,r),x%2?f.moveTo(h,u):f.lineTo(h,u),r+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,o),s=a-h,l=o-u,this._dashOffset=-Lr(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=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,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Pr&&(this.data=new Float32Array(t)))},getBoundingRect:function(){br[0]=br[1]=Sr[0]=Sr[1]=Number.MAX_VALUE,wr[0]=wr[1]=Mr[0]=Mr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;ol||Dr(r-a)>h||c===u-1)&&(t.lineTo(o,r),n=o,a=r);break;case _r.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _r.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _r.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(p,f),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,M,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-p,-f)):t.arc(p,f,b,v,M,1-_),1==c&&(e=Tr(v)*g+p,i=Cr(v)*m+f),n=Tr(M)*g+p,a=Cr(M)*m+f;break;case _r.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case _r.Z:t.closePath(),n=e,a=i}}}},kr.CMD=_r;var Or=kr,zr={},Er={};Er.containStroke=function(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0;if(r>e+s&&r>n+s||rt+s&&o>i+s||oe+c&&u>n+c&&u>o+c&&u>s+c||ut+c&&h>i+c&&h>a+c&&h>r+c||he+h&&l>n+h&&l>o+h||lt+h&&s>i+h&&s>a+h||si||u+ha&&(a+=Zr);var d=Math.atan2(l,s);return d<0&&(d+=Zr),d>=n&&d<=a||d+Zr>=n&&d+Zr<=a};var jr=function(t,e,i,n,a,o){if(o>e&&o>n||oa?r:0},Ur=Or,qr=Er,Xr=Rr,Yr=Vr,$r=Gr,Kr=Wr.normalizeRadian,Jr=Wo,Qr=jr,ts=Ur.CMD,es=2*Math.PI;var is=[-1,-1,-1],ns=[-1,-1];function as(t,e,i,n,a,o,r,s,l,h){if(h>e&&h>n&&h>o&&h>s||h1&&(u=void 0,u=ns[0],ns[0]=ns[1],ns[1]=u),d=Jr.cubicAt(e,n,o,s,ns[0]),g>1&&(p=Jr.cubicAt(e,n,o,s,ns[1]))),2==g?ve&&s>n&&s>o||s=0&&h<=1){for(var u=0,c=Jr.quadraticAt(e,n,o,h),d=0;di||s<-i)return 0;var l=Math.sqrt(i*i-s*s);is[0]=-l,is[1]=l;var h=Math.abs(n-a);if(h<1e-4)return 0;if(h%es<1e-4){n=0,a=es;var u=o?1:-1;return r>=is[0]+t&&r<=is[1]+t?u:0}if(o){l=n;n=Kr(a),a=Kr(l)}else n=Kr(n),a=Kr(a);n>a&&(a+=es);for(var c=0,d=0;d<2;d++){var p=is[d];if(p+t>r){var f=Math.atan2(s,p);u=o?1:-1;f<0&&(f=es+f),(f>=n&&f<=a||f+es>=n&&f+es<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(u=-u),c+=u)}}return c}function ss(t,e,i,n,a){for(var o,r,s=0,l=0,h=0,u=0,c=0,d=0;d1&&(i||(s+=Qr(l,h,u,c,n,a))),1==d&&(u=l=t[d],c=h=t[d+1]),p){case ts.M:l=u=t[d++],h=c=t[d++];break;case ts.L:if(i){if(qr.containStroke(l,h,t[d],t[d+1],e,n,a))return!0}else s+=Qr(l,h,t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.C:if(i){if(Xr.containStroke(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=as(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.Q:if(i){if(Yr.containStroke(l,h,t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=os(l,h,t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.A:var f=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++];t[d++];var _=1-t[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=Qr(l,h,b,w,n,a):(u=b,c=w);var S=(n-f)*v/m+f;if(i){if($r.containStroke(f,g,v,y,y+x,_,e,S,a))return!0}else s+=rs(f,g,v,y,y+x,_,S,a);l=Math.cos(y+x)*m+f,h=Math.sin(y+x)*v+g;break;case ts.R:u=l=t[d++],c=h=t[d++];b=u+t[d++],w=c+t[d++];if(i){if(qr.containStroke(u,c,b,c,e,n,a)||qr.containStroke(b,c,b,w,e,n,a)||qr.containStroke(b,w,u,w,e,n,a)||qr.containStroke(u,w,u,c,e,n,a))return!0}else s+=Qr(b,c,b,w,n,a),s+=Qr(u,w,u,c,n,a);break;case ts.Z:if(i){if(qr.containStroke(l,h,u,c,e,n,a))return!0}else s+=Qr(l,h,u,c,n,a);l=u,h=c}}return i||(o=h,r=c,Math.abs(o-r)<1e-4)||(s+=Qr(l,h,u,c,n,a)||0),0!==s}zr.contain=function(t,e,i){return ss(t,0,!1,e,i)},zr.containStroke=function(t,e,i,n){return ss(t,e,!0,i,n)};var ls=Un,hs=b,us=Or,cs=zr,ds=Ai.prototype.getCanvasPattern,ps=Math.abs,fs=new us(!0);function gs(t){ls.call(this,t),this.path=null}gs.prototype={constructor:gs,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,a=this.path||fs,o=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,h=r&&!!s.colorStops,u=o&&!!l.colorStops,c=r&&!!s.image,d=o&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=ds.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ds.call(l,t));var p=n.lineDash,f=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();a.setScale(m[0],m[1]),this.__dirtyPath||p&&!g&&o?(a.beginPath(t),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&a.fill(t),p&&g&&(t.setLineDash(p),t.lineDashOffset=f),o&&a.stroke(t),p&&g&&t.setLineDash([]),this.restoreTransform(t),null!=n.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new us},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new us),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasStroke()){var r=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),cs.containStroke(o,r/s,t,e)))return!0}if(a.hasFill())return cs.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!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):ls.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(hs.isObject(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&&ps(t[0]-1)>1e-10&&ps(t[3]-1)>1e-10?Math.sqrt(ps(t[0]*t[3]-t[2]*t[1])):1}},gs.extend=function(t){var e=function(e){gs.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 a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};for(var i in hs.inherits(e,gs),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},hs.inherits(gs,ls);var ms=gs,vs=Or,ys=j.applyTransform,xs=vs.CMD,_s=[[],[],[]],bs=Math.sqrt,ws=Math.atan2;var Ss=function(t,e){var i,n,a,o,r,s=t.data,l=xs.M,h=xs.C,u=xs.L,c=xs.R,d=xs.A,p=xs.Q;for(a=0,o=0;a1&&(r*=Cs(f),s*=Cs(f));var g=(a===o?-1:1)*Cs((r*r*(s*s)-r*r*(p*p)-s*s*(d*d))/(r*r*(p*p)+s*s*(d*d)))||0,m=g*r*p/s,v=g*-s*d/r,y=(t+i)/2+Ds(c)*m-Ls(c)*v,x=(e+n)/2+Ls(c)*m+Ds(c)*v,_=zs([1,0],[(d-m)/r,(p-v)/s]),b=[(d-m)/r,(p-v)/s],w=[(-1*d-m)/r,(-1*p-v)/s],S=zs(b,w);Os(b,w)<=-1&&(S=Ps),Os(b,w)>=1&&(S=0),0===o&&S>0&&(S-=2*Ps),1===o&&S<0&&(S+=2*Ps),u.addData(h,y,x,r,s,_,S,c,o)}function Rs(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===p[0]&&p.shift();for(var f=0;f=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;ai-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var f=d*d,g=d*f;n.push([Qs(s[0],p[0],l[0],h[0],d,f,g),Qs(s[1],p[1],l[1],h[1],d,f,g)])}return n},el=j,il=el.min,nl=el.max,al=el.scale,ol=el.distance,rl=el.add,sl=el.clone,ll=el.sub;var hl=function(t,e,i,n){var a,o,r,s,l=[],h=[],u=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d=2){if(a&&"spline"!==a){var o=cl(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=o[2*s],h=o[2*s+1],u=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===a&&(n=ul(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function Gh(t,e,i,n,a,o){if("function"==typeof a&&(o=a,a=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),h=n.getShallow("animationDelay"+r);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof s&&(s=s(a)),s>0?e.animateTo(i,s,h||0,l,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function Wh(t,e,i,n,a){Gh(!0,t,e,i,n,a)}function Hh(t,e,i){return e&&!jl.isArrayLike(e)&&(e=Kl.getLocalTransform(e)),i&&(e=Xl.invert([],e)),Yl.applyTransform([],t,e)}Bo.extendShape=function(t){return $l.extend(t)},Bo.extendPath=function(t,e){return Ul.extendFromString(t,e)},Bo.makePath=yh,Bo.makeImage=function(t,e,i){var n=new Jl({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setStyle(xh(e,a))}}});return n},Bo.mergePath=_h,Bo.resizePath=bh,Bo.subPixelOptimizeLine=function(t){var e=t.shape,i=t.style.lineWidth;return fh(2*e.x1)===fh(2*e.x2)&&(e.x1=e.x2=wh(e.x1,i,!0)),fh(2*e.y1)===fh(2*e.y2)&&(e.y1=e.y2=wh(e.y1,i,!0)),t},Bo.subPixelOptimizeRect=function(t){var e=t.shape,i=t.style.lineWidth,n=e.x,a=e.y,o=e.width,r=e.height;return e.x=wh(e.x,i,!0),e.y=wh(e.y,i,!0),e.width=Math.max(wh(n+o,i,!1)-e.x,0===o?0:1),e.height=Math.max(wh(a+r,i,!1)-e.y,0===r?0:1),t},Bo.subPixelOptimize=wh,Bo.setHoverStyle=function(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse((function(t){"group"!==t.type&&Dh(t,e)})):Dh(t,e),t.on("mouseover",Ph).on("mouseout",kh),t.on("emphasis",Oh).on("normal",zh)},Bo.setLabelStyle=function(t,e,i,n,a,o,r){var s=(a=a||vh).labelFetcher,l=a.labelDataIndex,h=a.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?jl.retrieve2(s?s.getFormattedLabel(l,"normal",null,h):null,a.defaultText):null,p=u?d:null,f=c?jl.retrieve2(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;null==p&&null==f||(Eh(t,i,o,a),Eh(e,n,r,a,!0)),t.text=p,e.text=f},Bo.setTextStyle=Eh,Bo.setText=function(t,e,i){var n,a={isRectText:!0};!1===i?n=!0:a.autoColor=i,Rh(t,e,a,n),t.host&&t.host.dirty&&t.host.dirty(!1)},Bo.getFont=function(t,e){var i=e||e.getModel("textStyle");return[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(" ")},Bo.updateProps=Wh,Bo.initProps=function(t,e,i,n,a){Gh(!1,t,e,i,n,a)},Bo.getTransform=function(t,e){for(var i=Xl.identity([]);t&&t!==e;)Xl.mul(i,t.getLocalTransform(),i),t=t.parent;return i},Bo.applyTransform=Hh,Bo.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=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?-a:"bottom"===t?a:0];return o=Hh(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},Bo.groupTransition=function(t,e,i,n){if(t&&e){var a,o=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),Wh(t,n,i,t.dataIndex)}}}))}function r(t){var e={position:Yl.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=jl.extend({},t.shape)),e}},Bo.clipPointsByRect=function(t,e){return jl.map(t,(function(t){var i=t[0];i=gh(i,e.x),i=mh(i,e.x+e.width);var n=t[1];return n=gh(n,e.y),[i,n=mh(n,e.y+e.height)]}))},Bo.clipRectByRect=function(t,e){var i=gh(t.x,e.x),n=mh(t.x+t.width,e.x+e.width),a=gh(t.y,e.y),o=mh(t.y+t.height,e.y+e.height);if(n>=i&&o>=a)return{x:i,y:a,width:n-i,height:o-a}},Bo.createIcon=function(t,e,i){var n=(e=jl.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),jl.defaults(n,i),new Jl(e)):yh(t.replace("path://",""),e,i,"center")};var Fh=Ni,Zh=Bo,jh=["textStyle","color"],Uh={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(jh):null)},getFont:function(){return Zh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Fh.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},qh=zo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Xh=b,Yh=_,$h=To,Kh=Ro,Jh=Vo,Qh=Uh,tu={getItemStyle:function(t,e){var i=qh(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]}},eu=Xh.mixin;function iu(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function nu(t,e,i){for(var n=0;n=i.length&&i.push({option:t})}})),i},uo.makeIdAndName=function(t){var e=ru.createHashMap();uu(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),uu(t,(function(t,i){var n=t.option;ru.assert(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),uu(t,(function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(cu(a)){if(o.name=null!=a.name?a.name+"":n?n.name:"\0-",n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do{o.id="\0"+o.name+"\0"+r++}while(e.get(o.id))}e.set(o.id,t)}}))},uo.isIdInner=fu,uo.compressBatches=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[o(i),o(n)];function a(t,e,i){for(var n=0,a=t.length;n=0&&i.push(t)})),i}(r.originalDeps=e(o),t);r.entryCount=s.length,0===r.entryCount&&a.push(o),xu.each(s,(function(t){xu.indexOf(r.predecessor,t)<0&&r.predecessor.push(t);var e=i(n,t);xu.indexOf(e.successor,t)<0&&e.successor.push(o)}))})),{graph:n,noEntryList:a}}(n),s=r.graph,l=r.noEntryList,h={};for(xu.each(t,(function(t){h[t]=!0}));l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(a.call(o,u,c.originalDeps.slice()),delete h[u]),xu.each(c.successor,d?f:p)}xu.each(h,(function(){throw new Error("Circle dependency may exists")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){h[t]=!0,p(t)}}};var wu={},Su=b,Mu=Je,Iu=po.parsePercent,Au=co,Tu=Su.each,Cu=["left","right","top","bottom","width","height"],Lu=[["width","left","right"],["height","top","bottom"]];function Du(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild((function(l,h){var u,c,d=l.position,p=l.getBoundingRect(),f=e.childAt(h+1),g=f&&f.getBoundingRect();if("horizontal"===t){var m=p.width+(g?-g.x+p.x:0);(u=o+m)>n||l.newline?(o=0,u=m,r+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(c=r+v)>a||l.newline?(o+=s+i,r=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=u+i:r=c+i)}))}var Pu=Du,ku=Su.curry(Du,"vertical"),Ou=Su.curry(Du,"horizontal");function zu(t,e,i){i=Au.normalizeCssArray(i||0);var n=e.width,a=e.height,o=Iu(t.left,n),r=Iu(t.top,a),s=Iu(t.right,n),l=Iu(t.bottom,a),h=Iu(t.width,n),u=Iu(t.height,a),c=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-s-d-o),isNaN(u)&&(u=a-l-c-r),null!=p&&(isNaN(h)&&isNaN(u)&&(p>n/a?h=.8*n:u=.8*a),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(o)&&(o=n-s-h-d),isNaN(r)&&(r=a-l-u-c),t.left||t.right){case"center":o=n/2-h/2-i[3];break;case"right":o=n-h-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-u/2-i[0];break;case"bottom":r=a-u-c}o=o||0,r=r||0,isNaN(h)&&(h=n-d-o-(s||0)),isNaN(u)&&(u=a-c-r-(l||0));var f=new Mu(o+i[3],r+i[0],h,u);return f.margin=i,f}function Eu(t,e){return e&&t&&Tu(Cu,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}wu.LOCATION_PARAMS=Cu,wu.HV_NAMES=Lu,wu.box=Pu,wu.vbox=ku,wu.hbox=Ou,wu.getAvailableSize=function(t,e,i){var n=e.width,a=e.height,o=Iu(t.x,n),r=Iu(t.y,a),s=Iu(t.x2,n),l=Iu(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=Au.normalizeCssArray(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}},wu.getLayoutRect=zu,wu.positionElement=function(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(o||r){var l;if("raw"===s)l="group"===t.type?new Mu(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(l=l.clone()).applyTransform(h)}e=zu(Su.defaults({width:l.width,height:l.height},e),i,n);var u=t.position,c=o?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[u[0]+c,u[1]+d])}},wu.sizeCalculable=function(t,e){return null!=t[Lu[e][0]]||null!=t[Lu[e][1]]&&null!=t[Lu[e][2]]},wu.mergeLayoutParam=function(t,e,i){!Su.isObject(i)&&(i={});var n=i.ignoreSize;!Su.isArray(n)&&(n=[n,n]);var a=r(Lu[0],0),o=r(Lu[1],1);function r(i,a){var o={},r=0,h={},u=0;if(Tu(i,(function(e){h[e]=t[e]})),Tu(i,(function(t){s(e,t)&&(o[t]=h[t]=e[t]),l(o,t)&&r++,l(h,t)&&u++})),n[a])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&r){if(r>=2)return o;for(var c=0;c=0;a--)n=Ru.merge(n,t[a],!0);Bu.set(this,"__defaultOption",n)}return Bu.get(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Bu.enableClassManagement(Fu,{registerWhenExtend:!0}),Vu.enableSubTypeDefaulter(Fu),Vu.enableTopologicalTravel(Fu,(function(t){var e=[];return Ru.each(Fu.getClassesByMainType(t),(function(t){Hu.apply(e,t.prototype.dependencies||[])})),Ru.map(e,(function(t){return Bu.parseClassType(t).main}))})),Ru.mixin(Fu,Wu);var Zu=Fu,ju="";"undefined"!=typeof navigator&&(ju=navigator.platform||"");var Uu={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:ju.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},qu=To,Xu=qu.set,Yu=qu.get,$u={clearColorPalette:function(){Xu(this,"colorIdx",0),Xu(this,"colorNameMap",{})},getColorFromPalette:function(t,e){var i=Yu(e=e||this,"colorIdx")||0,n=Yu(e,"colorNameMap")||Xu(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var a=this.get("color",!0)||[];if(a.length){var o=a[i];return t&&(n[t]=o),Xu(e,"colorIdx",(i+1)%a.length),o}}},Ku=b,Ju=uo,Qu=ou,tc=Zu,ec=Uu,ic=$u,nc=Ku.each,ac=Ku.filter,oc=Ku.map,rc=Ku.isArray,sc=Ku.indexOf,lc=Ku.isObject,hc=Qu.extend({constructor:hc,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Qu(i),this._optionManager=n},setOption:function(t,e){Ku.assert(!("\0_ec_inner"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)):uc.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&nc(o,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];nc(t,(function(t,i){null!=t&&(tc.hasClass(i)?n.push(i):e[i]=null==e[i]?Ku.clone(t):Ku.merge(e[i],t,!0))})),tc.topologicalTravel(n,tc.getAllClassMainTypes(),(function(n,a){var o=Ju.normalizeToArray(t[n]),r=Ju.mappingToExists(i.get(n),o);Ju.makeIdAndName(r),nc(r,(function(t,e){var i=t.option;lc(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:tc.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){Ku.isArray(e)||(e=e?[e]:[]);var i={};return nc(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,a);e[n]=[],i.set(n,[]),nc(r,(function(t,a){var o=t.exist,r=t.option;if(Ku.assert(lc(r)||o,"Empty component definition"),r){var l=tc.getClass(n,t.keyInfo.subType,!0);if(o&&o instanceof l)o.name=t.keyInfo.name,o.mergeOption(r,this),o.optionUpdated(r,!1);else{var h=Ku.extend({dependentModels:s,componentIndex:a},t.keyInfo);o=new l(r,this,this,h),Ku.extend(o,h),o.init(r,this,this,h),o.optionUpdated(null,!0)}}else o.mergeOption({},this),o.optionUpdated({},!1);i.get(n)[a]=o,e[n][a]=o.option}),this),"series"===n&&(this._seriesIndices=cc(i.get("series")))}),this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=Ku.clone(this.option);return nc(t,(function(e,i){if(tc.hasClass(i)){for(var n=(e=Ju.normalizeToArray(e)).length-1;n>=0;n--)Ju.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,a=t.id,o=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)rc(n)||(n=[n]),i=ac(oc(n,(function(t){return r[t]})),(function(t){return!!t}));else if(null!=a){var s=rc(a);i=ac(r,(function(t){return s&&sc(a,t.id)>=0||!s&&t.id===a}))}else if(null!=o){var l=rc(o);i=ac(r,(function(t){return l&&sc(o,t.name)>=0||!l&&t.name===o}))}else i=r.slice();return dc(i,t)},findComponents:function(t){var e,i,n,a,o,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",a=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[a]?null:{mainType:s,index:e[i],id:e[n],name:e[a]}),h=l?this.queryComponents(l):this._componentsMap.get(s);return o=dc(h,t),t.filter?ac(o,t.filter):o},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){nc(t,(function(t,a){e.call(i,n,t,a)}))}));else if(Ku.isString(t))nc(n.get(t),e,i);else if(lc(t)){var a=this.findComponents(t);nc(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ac(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 ac(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){nc(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){nc(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){nc(this._seriesIndices,(function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)}),this)},eachRawSeriesByType:function(t,e,i){return nc(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return Ku.indexOf(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=ac(this._componentsMap.get("series"),t,e);this._seriesIndices=cc(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=cc(t.get("series"));var e=[];t.each((function(t,i){e.push(i)})),tc.topologicalTravel(e,tc.getAllClassMainTypes(),(function(e,i){nc(t.get(e),(function(t){t.restoreData()}))}))}});function uc(t){var e,i;this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Ku.createHashMap({series:[]}),this._seriesIndices=null,e=t,i=this._theme.option,Ku.each(i,(function(t,i){tc.hasClass(i)||("object"==typeof t?e[i]=e[i]?Ku.merge(e[i],t,!1):Ku.clone(t):null==e[i]&&(e[i]=t))})),Ku.merge(t,ec,!1),this.mergeOption(t)}function cc(t){return oc(t,(function(t){return t.componentIndex}))||[]}function dc(t,e){return e.hasOwnProperty("subType")?ac(t,(function(t){return t.subType===e.subType})):t}Ku.mixin(hc,ic);var pc=hc,fc=b,gc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var mc=function(t){fc.each(gc,(function(e){this[e]=fc.bind(t[e],t)}),this)},vc=b,yc={};function xc(){this._coordinateSystems=[]}xc.prototype={constructor:xc,create:function(t,e){var i=[];vc.each(yc,(function(n,a){var o=n.create(t,e);i=i.concat(o||[])})),this._coordinateSystems=i},update:function(t,e){vc.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},xc.register=function(t,e){yc[t]=e},xc.get=function(t){return yc[t]};var _c=xc,bc=b,wc=uo,Sc=Zu,Mc=bc.each,Ic=bc.clone,Ac=bc.map,Tc=bc.merge,Cc=/^(min|max)?(.+)$/;function Lc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Dc(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;Mc(l,(function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))}))}return a||(a=t),a.timeline||(a.timeline=s),Mc([a].concat(o).concat(bc.map(r,(function(t){return t.option}))),(function(t){Mc(e,(function(e){e(t,i)}))})),{baseOption:a,timelineOptions:o,mediaDefault:n,mediaList:r}}function Pc(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return bc.each(t,(function(t,e){var i=e.match(Cc);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[r],t,o)||(a=!1)}})),a}Lc.prototype={constructor:Lc,setOption:function(t,e){t=Ic(t,!0);var i,n,a=this._optionBackup,o=Dc.call(this,t,e,!a);this._newBaseOption=o.baseOption,a?(i=a.baseOption,n=o.baseOption,Mc(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Sc.hasClass(e)){t=wc.normalizeToArray(t),n=wc.normalizeToArray(n);var a=wc.mappingToExists(n,t);i[e]=Ac(a,(function(t){return t.option&&t.exist?Tc(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=Tc(n,t,!0)}})),o.timelineOptions.length&&(a.timelineOptions=o.timelineOptions),o.mediaList.length&&(a.mediaList=o.mediaList),o.mediaDefault&&(a.mediaDefault=o.mediaDefault)):this._optionBackup=o},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Ac(e.timelineOptions,Ic),this._mediaList=Ac(e.mediaList,Ic),this._mediaDefault=Ic(e.mediaDefault),this._currentMediaIndices=[],Ic(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Ic(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),a=this._api.getHeight(),o=this._mediaList,r=this._mediaDefault,s=[],l=[];if(!o.length&&!r)return l;for(var h=0,u=o.length;h":"")+o.join(a?"
":", ")}(a):od(rd(a)),r=n.getName(t),s=n.getItemVisual(t,"color");ed.isObject(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=sd(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?od(h)+(e?": ":"
"):"",e?l+h+o:h+l+(r?od(r)+": "+o:o)},isAnimationEnabled:function(){if(id.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){hd(this,"data",ud(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=pd.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});ed.mixin(vd,cd.dataFormatMixin),ed.mixin(vd,pd);var yd=vd,xd=ni,_d=yu,bd=To,wd=function(){this.group=new xd,this.uid=_d.getUID("viewComponent")},Sd=wd.prototype={constructor:wd,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};Sd.updateView=Sd.updateLayout=Sd.updateVisual=function(t,e,i,n){},bd.enableClassExtend(wd),bd.enableClassManagement(wd,{registerWhenExtend:!0});var Md=wd,Id=b,Ad=ni,Td=yu,Cd=To,Ld=uo;function Dd(){this.group=new Ad,this.uid=Td.getUID("viewChart")}Dd.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Od(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Od(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var Pd=Dd.prototype;function kd(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?c():u=setTimeout(c,-a),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}Ed.throttle=Vd,Ed.createOrUpdate=function(t,e,i,n){var a=t[e];if(a){var o=a[Rd]||a,r=a["\0__throttleType"];if(a[Nd]!==i||r!==n){if(null==i||!n)return t[e]=o;(a=t[e]=Vd(o,i,"debounce"===n))[Rd]=o,a["\0__throttleType"]=n,a[Nd]=i}return a}},Ed.clear=function(t,e){var i=t[e];i&&i[Rd]&&(t[e]=i[Rd])};var Bd=Rl;var Gd=function(t){t.eachRawSeries((function(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),a=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",a),t.isSeriesFiltered(e)||("function"!=typeof a||a instanceof Bd||n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))})),n.each((function(t){var e=n.getItemModel(t).get(i,!0);null!=e&&n.setItemVisual(t,"color",e)})))}))},Wd=b,Hd=Bo,Fd=Math.PI;var Zd=function(t,e){e=e||{},Wd.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Hd.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Hd.Arc({shape:{startAngle:-Fd/2,endAngle:-Fd/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new Hd.Rect({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*Fd/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Fd/2}).delay(300).start("circularInOut");var o=new Hd.Group;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var r=n.shape.r;a.setShape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},jd={},Ud={};function qd(t){return t}function Xd(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||qd,this._newKeyGetter=n||qd,this.context=a}function Yd(t,e,i,n,a){for(var o=0;o=0?a[s]=new l.constructor(o[s].length):a[s]=o[s]}return n}lp.type="list",lp.hasItemOption=!0,lp.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},lp.getDimensionInfo=function(t){return Kd.clone(this._dimensionInfos[this.getDimension(t)])},lp.initData=function(t,e,i){t=t||[],Kd.isArray(t)&&(t=new rp(t)),this._rawData=t;var n,a=this._storage={},o=this.indices=[],r=this.dimensions,s=this._dimensionInfos,l=t.count(),h=[],u={};e=e||[];for(var c=0;c0&&(x+="__ec__"+u[y]),u[y]++),x&&(h[c]=x)}this._nameList=e,this._idList=h},lp.count=function(){return this.indices.length},lp.get=function(t,e,i){var n=this._storage,a=this.indices[e];if(null==a||!n[t])return NaN;var o=n[t][a];if(i){var r=this._dimensionInfos[t];if(r&&r.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||o<=0&&l<0)&&(o+=l),s=s.stackedOn}}return o},lp.getValues=function(t,e,i){var n=[];Kd.isArray(t)||(i=e,e=t,t=this.dimensions);for(var a=0,o=t.length;al&&(l=o));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},lp.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,a=this.count();nt))return o;a=o-1}}return-1},lp.indicesOfNearest=function(t,e,i,n){var a=[];if(!this._storage[t])return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,r=-1,s=0,l=this.count();s=0&&r<0)&&(o=u,r=h,a.length=0),a.push(s))}return a},lp.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},lp.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},lp.getName=function(t){return this._nameList[this.indices[t]]||""},lp.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},lp.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],o=(t=Kd.map(hp(t),this.getDimension,this)).length,r=this.indices;n=n||this;for(var s=0;sp-f&&(c=p-f,h.length=c);for(var g=0;g1){n=[];for(var s=0;s=0&&function(t){var e=function(t){for(var e=0;e=e[0]&&t<=e[1]},Vp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Vp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Vp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Vp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Vp.prototype.getExtent=function(){return this._extent.slice()},Vp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Vp.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;it[1]&&(t[0]=t[1])}jp.intervalScaleNiceTicks=function(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=Up.nice(o/e,!0);null!=i&&rn&&(r=a.interval=n);var s=a.intervalPrecision=Xp(r);return $p(a.niceTickExtent=[qp(Math.ceil(t[0]/r)*r,s),qp(Math.floor(t[1]/r)*r,s)],t),a},jp.getIntervalPrecision=Xp,jp.fixExtent=$p,jp.intervalScaleGetTicks=function(t,e,i,n){var a=[];if(!t)return a;e[0]1e4)return[];return e[1]>(a.length?a[a.length-1]:i[1])&&a.push(e[1]),a};var Kp=po,Jp=co,Qp=Bp,tf=jp,ef=Kp.round,nf=Qp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),nf.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=tf.getIntervalPrecision(t)},getTicks:function(){return tf.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(o=i);var r=gf.length,s=function(t,e,i,n){for(;i>>1;t[a][1]0})))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=yf.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[yf.round(If(e[0]/n)*n),yf.round(Mf(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){bf.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Lf(t,e){return Sf(t,wf(e))}mf.each(["contain","normalize"],(function(t){Cf.prototype[t]=function(e){return e=Tf(e)/Tf(this.base),_f[t].call(this,e)}})),Cf.create=function(){return new Cf};var Df=b,Pf=Ni,kf=Zp,Of=af,zf=Bp,Ef=po;function Rf(t,e){var i,n,a,o=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,h=null!=s,u=t.getExtent();return"ordinal"===o?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),Df.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ef.parsePercent(n[0],1),n[1]=Ef.parsePercent(n[1],1),a=u[1]-u[0]||Math.abs(u[0])),null==r&&(r="ordinal"===o?i?0:NaN:u[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:NaN:u[1]+n[1]*a),"dataMin"===r?r=u[0]:"function"==typeof r&&(r=r({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(Df.eqNaN(r)||Df.eqNaN(s)),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!h&&(s=0)),[r,s]}function Nf(t,e){return"category"===t.type?t.scale.getLabel(e):e}Rp.getScaleExtent=Rf,Rp.niceScaleExtent=function(t,e){var i=Rf(t,e),n=null!=e.getMin(),a=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:a,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)},Rp.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new kf(t.getCategories(),[1/0,-1/0]);case"value":return new Of;default:return(zf.getClass(e)||Of).create(t)}},Rp.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},Rp.getAxisLabelInterval=function(t,e,i,n,a){var o,r=0,s=0,l=(n-a)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(r+1)*h-1},Rp.getFormattedLabels=function(t,e){var i,n=t.scale,a=n.getTicksLabels(),o=n.getTicks();return"string"==typeof e?(i=e,e=function(t){return i.replace("{value}",null!=t?t:"")},Df.map(a,e)):"function"==typeof e?Df.map(o,(function(i,n){return e(Nf(t,i),n)}),this):a},Rp.getAxisRawValue=Nf;var Vf=b,Bf=Rp;function Gf(t){return Vf.isObject(t)&&null!=t.value?t.value:t+""}var Wf={getFormattedLabels:function(){return Bf.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&Vf.map(this.get("data"),Gf)},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&&!Vf.eqNaN(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&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:Vf.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Hf={},Ff=b,Zf=Bo,jf=Je,Uf=Zf.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n+o),t.lineTo(i-a,n+o),t.closePath()}}),qf=Zf.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n),t.lineTo(i,n+o),t.lineTo(i-a,n),t.closePath()}}),Xf=Zf.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=Math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,h=Math.asin(s/r),u=Math.cos(h)*r,c=Math.sin(h),d=Math.cos(h),p=.6*r,f=.7*r;t.moveTo(i-u,l+s),t.arc(i,l,r,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*p,l+s+d*p,i,n-f,i,n),t.bezierCurveTo(i,n-f,i-u+c*p,l+s+d*p,i-u,l+s),t.closePath()}}),Yf=Zf.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveTo(a,o),t.lineTo(a+r,o+i),t.lineTo(a,o+i/4*3),t.lineTo(a-r,o+i),t.lineTo(a,o),t.closePath()}}),$f={line:Zf.Line,rect:Zf.Rect,roundRect:Zf.Rect,square:Zf.Rect,circle:Zf.Circle,diamond:qf,pin:Xf,arrow:Yf,triangle:Uf},Kf={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var o=Math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},Jf={};Ff.each($f,(function(t,e){Jf[e]=new t}));var Qf=Zf.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,a=Jf[n];"none"!==e.symbolType&&(a||(a=Jf[n="rect"]),Kf[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i))}});function tg(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)}}Hf.createSymbol=function(t,e,i,n,a,o,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Zf.makeImage(t.slice(8),new jf(e,i,n,a),r?"center":"cover"):0===t.indexOf("path://")?Zf.makePath(t.slice(7),{},new jf(e,i,n,a),r?"center":"cover"):new Qf({shape:{symbolType:t,x:e,y:i,width:n,height:a}})).__isEmptyBrush=l,s.setColor=tg,s.setColor(o),s};var eg=b,ig=Ep,ng=Rp,ag=Wf,og=ou,rg=wp;Ud.completeDimensions=rg;var sg=Hf;Ud.createSymbol=sg.createSymbol,Ud.createList=function(t){var e=t.get("data");return ig(e,t,t.ecModel)},Ud.createScale=function(t,e){var i=e;e instanceof og||(i=new og(e),eg.mixin(i,ag));var n=ng.createScaleByModel(i);return n.setExtent(t[0],t[1]),ng.niceScaleExtent(n,i),n},Ud.mixinAxisModelCommonMethods=function(t){eg.mixin(t,ag)};var lg=b,hg=po,ug=Rp,cg=hg.linearMap;function dg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}var pg=[0,1],fg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};fg.prototype={constructor:fg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return hg.getPixelPrecision(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&&dg(i=i.slice(),n.count()),cg(t,pg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count());var a=cg(t,i,pg,e);return this.scale.scale(a)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n>1^-(1&s),l=l>>1^-(1&l),a=s+=a,o=l+=o,n.push([s/i,l/i])}return n}var Cg=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n0})),(function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&Ig.each(n,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new Ag(e.name,a,e.cp);return o.properties=e,o}))},Lg=v;jd.zrender=Lg;var Dg=mt;jd.matrix=Dg;var Pg=j;jd.vector=Pg;var kg=b,Og=Pt;jd.color=Og;var zg=Bo;jd.graphic=zg;var Eg=po;jd.number=Eg;var Rg=co;jd.format=Rg;var Ng=Ed;Ng.throttle,jd.throttle=Ng.throttle;var Vg=Ud;jd.helper=Vg;var Bg=dp;jd.List=Bg;var Gg=ou;jd.Model=Gg;var Wg=gg;jd.Axis=Wg;var Hg=_;jd.env=Hg;var Fg=Cg;jd.parseGeoJson=Fg;var Zg={};kg.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Zg[t]=kg[t]})),jd.util=Zg,function(t){var e=v,i=b,n=Pt,a=_,o=hi,r=rt,s=pc,l=mc,h=_c,u=kc,c=td,d=Zu,p=yd,f=Md,g=zd,m=Bo,y=uo,x=Ed.throttle,w=Gd,S=Zd,M=i.each,I=d.parseClassType,A={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},T="__flagInMainProcess",C=/^[a-zA-Z0-9_]+$/;function L(t){return function(e,i,n){e=e&&e.toLowerCase(),r.prototype[t].call(this,e,i,n)}}function D(){r.call(this)}function P(t,n,a){a=a||{},"string"==typeof n&&(n=it[n]),this.id,this.group,this._dom=t;var s,u,d=this._zr=e.init(t,{renderer:a.renderer||"canvas",devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height});function p(t,e){return t.prio-e.prio}this._throttledZrFlush=x(i.bind(d.flush,d),17),(n=i.clone(n))&&c(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new h,this._api=(u=(s=this)._coordSysMgr,i.extend(new l(s),{getCoordinateSystems:i.bind(u.getCoordinateSystems,u),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return s._model.getComponent(e.mainType,e.index);t=t.parent}}})),r.call(this),this._messageCenter=new D,this._initEvents(),this.resize=i.bind(this.resize,this),this._pendingActions=[],o(et,p),o(J,p),d.animation.on("frame",this._onframe,this),i.setAsPrimitive(this)}D.prototype.on=L("on"),D.prototype.off=L("off"),D.prototype.one=L("one"),i.mixin(D,r);var k=P.prototype;function O(t,e,i){var n,a=this._model,o=this._coordSysMgr.getCoordinateSystems();e=y.parseFinder(a,e);for(var r=0;r=0&&i.each(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n|=!!i.containPoint(e);else if("seriesModels"===a){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n|=o.containPoint(e,t))}}),this)}),this),!!n},k.getVisual=function(t,e){var i=this._model,n=(t=y.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=a?n.getItemVisual(a,e):n.getVisual(e)},k.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},k.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var z={update:function(t){var e=this._model,i=this._api,o=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),o.create(this._model,this._api),W.call(this,e,i),H.call(this,e),o.update(e,i),Z.call(this,e,t),j.call(this,e,t);var s=e.get("backgroundColor")||"transparent",l=r.painter;if(l.isSingleCanvas&&l.isSingleCanvas())r.configLayer(0,{clearColor:s});else{if(!a.canvasSupported){var h=n.parse(s);s=n.stringify(h,"rgb"),0===h[3]&&(s="transparent")}s.colorStops||s.image?(r.configLayer(0,{clearColor:s}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&r.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=s)}M(tt,(function(t){t(e,i)}))}},updateView:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t),B.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t,!0),B.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(F.call(this,e,t),B.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;G.call(this,"component",e),G.call(this,"chart",e),z.update.call(this,t)}};function E(t,e,i,n,a){var o=t._model;if(n){var r={};r[n+"Id"]=i[n+"Id"],r[n+"Index"]=i[n+"Index"],r[n+"Name"]=i[n+"Name"];var s={mainType:n,query:r};a&&(s.subType=a),o&&o.eachComponent(s,(function(e,i){l(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else M(t._componentsViews.concat(t._chartsViews),l);function l(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}}function R(t,e){var n=t.type,a=t.escapeConnect,o=$[n],r=o.actionInfo,s=(r.update||"update").split(":"),l=s.pop();s=null!=s[0]&&I(s[0]),this[T]=!0;var h=[t],u=!1;t.batch&&(u=!0,h=i.map(t.batch,(function(e){return(e=i.defaults(i.extend({},e),t)).batch=null,e})));var c,d=[],p="highlight"===n||"downplay"===n;M(h,(function(t){(c=(c=o.action(t,this._model,this._api))||i.extend({},t)).type=r.event||c.type,d.push(c),p?E(this,l,t,"series"):s&&E(this,l,t,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?(z.prepareAndUpdate.call(this,t),this.__optionUpdated=!1):z[l].call(this,t)),c=u?{type:r.event||n,escapeConnect:a,batch:d}:d[0],this[T]=!1,!e&&this._messageCenter.trigger(c.type,c)}function N(t){for(var e=this._pendingActions;e.length;){var i=e.shift();R.call(this,i,t)}}function V(t){!t&&this.trigger("updated")}function B(t,e,i){var n=this._api;M(this._componentsViews,(function(a){var o=a.__model;a[t](o,e,n,i),Y(o,a)}),this),e.eachSeries((function(a,o){var r=this._chartsMap[a.__viewId];r[t](a,e,n,i),Y(a,r),X(a,r)}),this),q(this._zr,e),M(tt,(function(t){t(e,n)}))}function G(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,a=i?this._componentsMap:this._chartsMap,o=this._zr,r=0;re.get("hoverLayerThreshold")&&!a.node&&i.traverse((function(t){t.isGroup||(t.useHoverLayer=!0)}))}function X(t,e){var i=0;e.group.traverse((function(t){"group"===t.type||t.ignore||i++}));var n=+t.get("progressive"),o=i>t.get("progressiveThreshold")&&n&&!a.node;o&&e.group.traverse((function(t){t.isGroup||(t.progressive=o?Math.floor(i++/n):-1,o&&t.stopAnimation(!0))}));var r=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.setStyle("blend",r)}))}function Y(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))}))}k._initEvents=function(){M(U,(function(t){this._zr.on(t,(function(e){var n,a=this.getModel(),o=e.target;if("globalout"===t)n={};else if(o&&null!=o.dataIndex){var r=o.dataModel||a.getSeriesByIndex(o.seriesIndex);n=r&&r.getDataParams(o.dataIndex,o.dataType)||{}}else o&&o.eventData&&(n=i.extend({},o.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))}),this)}),this),M(K,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},k.isDisposed=function(){return this._disposed},k.clear=function(){this.setOption({series:[]},!0)},k.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;M(this._componentsViews,(function(i){i.dispose(e,t)})),M(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete at[this.id]}},i.mixin(P,r);var $={},K={},J=[],Q=[],tt=[],et=[],it={},nt={},at={},ot={},st=new Date-0,lt=new Date-0,ht="_echarts_instance_",ut={};function ct(t){ot[t]=!1}var dt=ct;function pt(t){var e;return e=t.getAttribute?t.getAttribute(ht):t._echarts_instance_,at[e]}function ft(t){Q.push(t)}function gt(t,e,n){"function"==typeof e&&(n=e,e="");var a=i.isObject(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,i.assert(C.test(a)&&C.test(e)),$[a]||($[a]={action:n,actionInfo:t}),K[e]=a}function mt(t,e){"function"==typeof t&&(e=t,t=3e3),et.push({prio:t,func:e})}function vt(t,e){nt[t]=e}mt(2e3,w),ft(c),vt("default",S),gt({type:"highlight",event:"highlight",update:"highlight"},i.noop),gt({type:"downplay",event:"downplay",update:"downplay"},i.noop);t.version="3.8.5",t.dependencies={zrender:"3.7.4"},t.PRIORITY=A,t.init=function(t,e,n){var a=pt(t);if(a)return a;var o=new P(t,e,n);return o.id="ec_"+st++,at[o.id]=o,t.setAttribute?t.setAttribute(ht,o.id):t._echarts_instance_=o.id,function(t){var e="__connectUpdateStatus";function n(t,i){for(var n=0;n=0?1:-1}function gm(t,e,i){for(var n,a=t.getBaseAxis(),o=t.getOtherAxis(a),r=a.onZero?0:o.scale.getExtent()[0],s=o.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&fm(h.get(s,i))===fm(u);){n=h;break}var c=[];return c[l]=e.get(a.dim,i),c[1-l]=n?n.get(s,i,!0):r,t.dataToPoint(c)}var mm=function(t,e,i,n,a,o){for(var r=function(t,e){var i=[];return e.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,e){i.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,e),s=[],l=[],h=[],u=[],c=[],d=[],p=[],f=o.dimensions,g=0;g=a||d<0)break;if(Cm(f)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](f[0],f[1]),Mm(Am,f);else if(l>0){var g=d+o,m=e[g];if(u)for(;m&&Cm(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||Cm(m))Mm(Tm,f);else{var x,_;if(Cm(m)&&!u&&(m=f),xm.sub(Im,m,y),"x"===h||"y"===h){var b="x"===h?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=xm.dist(f,y),_=xm.dist(f,m);Sm(Tm,f,Im,-l*(1-(v=_/(_+x))))}bm(Am,Am,s),wm(Am,Am,r),bm(Tm,Tm,s),wm(Tm,Tm,r),t.bezierCurveTo(Am[0],Am[1],Tm[0],Tm[1],f[0],f[1]),Sm(Am,f,Im,l*v)}else t.lineTo(f[0],f[1]);c=d,d+=o}return p}function Dm(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var Pm=ym.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,o=Dm(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Cm(i[a-1]);a--);for(;n0&&Cm(i[o-1]);o--);for(;ae[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Um(t){return t>=0?1:-1}function qm(t,e,i){return"polar"===t.type?function(t,e,i){var n=t.getAngleAxis(),a=t.getRadiusAxis().getExtent(),o=n.getExtent(),r=Math.PI/180,s=new Nm.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*r,endAngle:-o[1]*r,clockwise:n.inverse}});return e&&(s.shape.endAngle=-o[0]*r,Nm.initProps(s,{shape:{endAngle:-o[1]*r}},i)),s}(t,e,i):function(t,e,i){var n=jm(t.getAxis("x")),a=jm(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),r=Math.min(n[0],n[1]),s=Math.min(a[0],a[1]),l=Math.max(n[0],n[1])-r,h=Math.max(a[0],a[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(r-=c,l+=2*c);var d=new Nm.Rect({shape:{x:r,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,Nm.initProps(d,{shape:{width:l,height:h}},i)),d}(t,e,i)}function Xm(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r0?a=o[0]:o[1]<0&&(a=o[1])}var r=n.dim,s="x"===r||"radius"===r?1:0;return e.mapArray([r],(function(n,o){for(var l,h=e.stackedOn;h&&Um(h.get(r,o))===Um(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,o),u[1-s]=l?l.get(r,o,!0):a,t.dataToPoint(u)}),!0)}(n,o),y=t.get("showSymbol"),x=y&&!h&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,n),_=this._data;_&&_.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),_.setItemGraphicEl(e,null))})),y||c.remove(),a.add(f);var b=!h&&t.get("step");d&&u.type===n.type&&b===this._step?(m&&!p?p=this._newPolygon(l,v,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(qm(n,!1,t)),y&&c.updateData(o,x),o.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),Fm(this._stackedOnPoints,v)&&Fm(this._points,l)||(g?this._updateAnimation(o,v,n,i,b):(b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(y&&c.updateData(o,x),b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,v,n,g)),f.setClipPath(qm(n,!0,t)));var w=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()){for(var n,a=i.length-1;a>=0;a--)if(i[a].dimension<2){n=i[a];break}if(n&&"cartesian2d"===e.type){var o=n.dimension,r=t.dimensions[o],s=e.getAxis(r),l=Om.map(n.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,d=l[h-1].coord+10,p=d-c;if(p<.001)return"transparent";Om.each(l,(function(t){t.offset=(t.coord-c)/p})),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var f=new Nm.LinearGradient(0,0,0,0,l,!0);return f[r]=c,f[r+"2"]=d,f}}}(o,n)||o.getVisual("color");d.useStyle(Om.defaults(r.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"}));var S=t.get("smooth");if(S=Zm(t.get("smooth")),d.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var M=o.stackedOn,I=0;if(p.useStyle(Om.defaults(s.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel"})),M)I=Zm(M.hostModel.get("smooth"));p.setShape({smooth:S,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=v,this._points=l,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=Vm.queryDataIndex(a,n);if(!(o instanceof Array)&&null!=o&&o>=0){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;(r=new Em(a,o)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Hm.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=Vm.queryDataIndex(a,n);if(null!=o&&o>=0){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else Hm.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Gm({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 Wm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return Om.bind(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,a){var o=this._polyline,r=this._polygon,s=t.hostModel,l=Rm(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;a&&(h=Xm(l.current,i,a),u=Xm(l.stackedOnCurrent,i,a),c=Xm(l.next,i,a),d=Xm(l.stackedOnNext,i,a)),o.shape.__points=l.current,o.shape.points=h,Nm.updateProps(o,{shape:{points:c}},s),r&&(r.setShape({points:h,stackedOnPoints:u}),Nm.updateProps(r,{shape:{points:c,stackedOnPoints:d}},s));for(var p=[],f=l.status,g=0;ge&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1)"string"==typeof i?a=Km[i]:"function"==typeof i&&(a=i),a&&(e=e.downSample(r.dim,1/h,a,Jm),t.setData(e))}}),this)},tv=b;function ev(t){return this._axes[t]}var iv=function(t){this._axes={},this._dimList=[],this.name=t||""};iv.prototype={constructor:iv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return tv.map(this._dimList,ev,this)},getAxesByScale:function(t){return t=t.toLowerCase(),tv.filter(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?[]:{},a=0;ae[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},sv.inherits(hv,lv);var uv=hv,cv=b,dv={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)"]}}},pv={};pv.categoryAxis=cv.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dv),pv.valueAxis=cv.merge({boundaryGap:[0,0],splitNumber:5},dv),pv.timeAxis=cv.defaults({scale:!0,min:"dataMin",max:"dataMax"},pv.valueAxis),pv.logAxis=cv.defaults({scale:!0,logBase:10},pv.valueAxis);var fv=pv,gv=b,mv=fv,vv=Zu,yv=wu,xv=yv.getLayoutParams,_v=yv.mergeLayoutParam,bv=["value","category","time","log"];var wv=function(t,e,i,n){gv.each(bv,(function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,r=o?xv(e):{},s=n.getTheme();gv.merge(e,s.get(a+"Axis")),gv.merge(e,this.getDefaultOption()),e.type=i(t,e),o&&_v(e,r,o)},defaultOption:gv.mergeAll([{},mv[a+"Axis"],n],!0)})})),vv.registerSubTypeDefaulter(t+"Axis",gv.curry(i,t))},Sv=b,Mv=wv,Iv=Wf,Av=Zu.extend({type:"cartesian2dAxis",axis:null,init:function(){Av.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Av.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Av.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Tv(t,e){return e.type||(e.data?"category":"value")}Sv.merge(Av.prototype,Iv);var Cv={offset:0};Mv("x",Av,Tv,Cv),Mv("y",Av,Tv,Cv),Zu.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 Lv=b,Dv=Je,Pv=wu.getLayoutRect,kv=Rp,Ov=rv,zv=uv,Ev=_c,Rv=Lv.each,Nv=kv.ifAxisCrossZero,Vv=kv.niceScaleExtent;function Bv(t,e,i){return t.getCoordSysModel()===e}function Gv(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var Wv=Gv.prototype;function Hv(t,e,i){var n=t[e];if(i.onZero){var a=i.onZeroAxisIndex;if(null==a){for(var o in n){if(n.hasOwnProperty(o))if((r=n[o])&&!Fv(r)){a=+o;break}}null==a&&(i.onZero=!1),i.onZeroAxisIndex=a}else{var r;(r=n[a])&&Fv(r)&&(i.onZero=!1)}}}function Fv(t){return"category"===t.type||"time"===t.type||!Nv(t)}Wv.type="grid",Wv.axisPointerEnabled=!0,Wv.getRect=function(){return this._rect},Wv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Rv(i.x,(function(t){Vv(t.scale,t.model)})),Rv(i.y,(function(t){Vv(t.scale,t.model)})),Rv(i.x,(function(t){Hv(i,"y",t)})),Rv(i.y,(function(t){Hv(i,"x",t)})),this.resize(this.model,e)},Wv.resize=function(t,e,i){var n=Pv(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;function o(){Rv(a,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),function(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}}(t,e?n.x:n.y)}))}o(),!i&&t.get("containLabel")&&(Rv(a,(function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,a,o,r,s,l,h=t.model,u=h.getFormattedLabels(),c=h.getModel("axisLabel"),d=1,p=u.length;p>40&&(d=Math.ceil(p/40));for(var f=0;fh[1]?-1:1,c=["start"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,gy(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*sy/180),gy(o)?n=cy(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var a,o,r=ny(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;iy(r-sy/2)?(o=l?"bottom":"top",a="center"):iy(r-1.5*sy)?(o=l?"top":"bottom",a="center"):(o="middle",a=r<1.5*sy&&r>sy/2?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:a,textVerticalAlign:o}}(t,o,d||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(n.rotation)),!isFinite(a)&&(a=null)));var p=s.getFont(),f=e.get("nameTruncate",!0)||{},g=f.ellipsis,m=Xv(t.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?Jv.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var b=new Qv.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:dy(e),z2:1,tooltip:y&&y.show?$v({content:i,formatter:function(){return i},formatterParams:_},y):null});Qv.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=ly(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},cy=hy.innerTextLayout=function(t,e,i){var n,a,o=ny(e-t);return iy(o)?(a=i>0?"top":"bottom",n="center"):iy(o-sy)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&o0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}};function dy(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function py(t){t&&(t.ignore=!0)}function fy(t,e,i){var n=t&&t.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(n&&a){var o=oy.identity([]);return oy.rotate(o,o,-t.rotation),n.applyTransform(oy.mul([],o,t.getLocalTransform())),a.applyTransform(oy.mul([],o,e.getLocalTransform())),n.intersect(a)}}function gy(t){return"middle"===t||"center"===t}var my=hy.ifIgnoreOnTick=function(t,e,i,n,a,o){if(0===e&&a||e===n-1&&o)return!1;var r,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(r=s.getTicks()[e],s.getLabel(r)):e%(i+1))},vy=hy.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};var yy=hy,xy={},_y=b,by=ou,wy=_y.each,Sy=_y.curry;function My(t,e){return"all"===t||_y.isArray(t)&&_y.indexOf(t,e)>=0||t===e}function Iy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ty(t)]}function Ay(t){return!!t.get("handle.show")}function Ty(t){return t.type+"||"+t.id}xy.collect=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),o=a.get("link",!0)||[],r=[];wy(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Ty(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",n);if(wy(i.getAxes(),Sy(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var u="axis"===h.get("trigger"),c="cross"===h.get("axisPointer.type"),d=i.getTooltipAxes(h.get("axisPointer.axis"));(u||c)&&wy(d.baseAxes,Sy(p,!c||"cross",u)),c&&wy(d.otherAxes,Sy(p,"cross",!1))}}function p(n,s,u){var c=u.model.getModel("axisPointer",a),d=c.get("show");if(d&&("auto"!==d||n||Ay(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,a,o){var r=e.getModel("axisPointer"),s={};wy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=_y.clone(r.get(t))})),s.snap="category"!==t.type&&!!o,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a&&(l.show=!0,!o)){var h=s.lineStyle=r.get("crossStyle");h&&_y.defaults(l,h.textStyle)}return t.model.getModel("axisPointer",new by(s,i,n))}(u,h,a,e,n,s):c;var p=c.get("snap"),f=Ty(u.model),g=s||p||"category"===u.type,m=t.axesInfo[f]={key:f,axis:u,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Ay(c),seriesModels:[]};l[f]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,a=0;al[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=0?"p":"n",v=g[i],y=o[s][i][m],x=r[s][i][m];c.isHorizontal()?(n=y,a=v[1]+h,l=v[0]-x,f=u,r[s][i][m]+=l,Math.abs(l)0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Ix(t,e,i,n,a,o,r,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle.normal"),c=n.getModel("itemStyle.emphasis").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(gx.defaults({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);var p=r?a.height>0?"bottom":"top":a.width>0?"left":"right";s||vx(t.style,c,n,l,o,i,p),mx.setHoverStyle(t,c)}var Ax=m,Tx=b,Cx=rx;Ax.registerLayout(Tx.curry(Cx,"bar")),Ax.registerVisual((function(t){t.eachSeriesByType("bar",(function(t){t.getData().setVisual("legendSymbol","roundRect")}))}));var Lx=b,Dx={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=Lx.reduce(t||[],(function(t,e){return t.set(e.name,e),t}),Lx.createHashMap())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&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);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},Px=m,kx=dp,Ox=b,zx=uo,Ex=po.getPercentWithPrecision,Rx=wp,Nx=Dx,Vx=Px.extendSeriesModel({type:"series.pie",init:function(t){Vx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){Vx.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=Rx(["value"],t.data),n=new kx(i,this);return n.initData(t.data),n},getDataParams:function(t){var e=this.getData(),i=Vx.superCall(this,"getDataParams",t),n=[];return e.each("value",(function(t){n.push(t)})),i.percent=Ex(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){zx.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});Ox.mixin(Vx,Nx);var Bx=b,Gx=Bo,Wx=zd;function Hx(t,e,i,n){var a=e.getData(),o=this.dataIndex,r=a.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),a.each((function(t){Fx(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)}))}function Fx(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(o)*r,Math.sin(o)*r];a?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Zx(t,e){Gx.Group.call(this);var i=new Gx.Sector({z2:2}),n=new Gx.Polyline,a=new Gx.Text;function o(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function r(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",o).on("normal",r).on("mouseover",o).on("mouseout",r)}var jx=Zx.prototype;jx.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=Bx.extend({},r);(s.label=null,i)?(n.setShape(s),"scale"===a.getShallow("animationType")?(n.shape.r=r.r0,Gx.initProps(n,{shape:{r:r.r}},a,e)):(n.shape.endAngle=r.startAngle,Gx.updateProps(n,{shape:{endAngle:r.endAngle}},a,e))):Gx.updateProps(n,{shape:s},a,e);var l=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.useStyle(Bx.defaults({lineJoin:"bevel",fill:h},l.getModel("normal").getItemStyle())),n.hoverStyle=l.getModel("emphasis").getItemStyle();var u=o.getShallow("cursor");function c(){n.stopAnimation(!0),n.animateTo({shape:{r:r.r+a.get("hoverOffset")}},300,"elasticOut")}function d(){n.stopAnimation(!0),n.animateTo({shape:{r:r.r}},300,"elasticOut")}u&&n.attr("cursor",u),Fx(this,t.getItemLayout(e),o.get("selected"),a.get("selectedOffset"),a.get("animation")),n.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.get("hoverAnimation")&&a.isAnimationEnabled()&&n.on("mouseover",c).on("mouseout",d).on("emphasis",c).on("normal",d),this._updateLabel(t,e),Gx.setHoverStyle(this)},jx._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Gx.updateProps(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},a,e),Gx.updateProps(n,{style:{x:r.x,y:r.y}},a,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=o.getModel("label.normal"),h=o.getModel("label.emphasis"),u=o.getModel("labelLine.normal"),c=o.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");Gx.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},Bx.inherits(Zx,Gx.Group),Wx.extend({type:"pie",init:function(){var t=new Gx.Group;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),o=this._data,r=this.group,s=e.get("animation"),l=!o,h=t.get("animationType"),u=Bx.curry(Hx,this.uid,t,s,i),c=t.get("selectedMode");if(a.diff(o).add((function(t){var e=new Zx(a,t);l&&"scale"!==h&&e.eachChild((function(t){t.stopAnimation(!0)})),c&&e.on("click",u),a.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),c&&i.on("click",u),r.add(i),a.setItemGraphicEl(t,i)})).remove((function(t){var e=o.getItemGraphicEl(t);r.remove(e)})).execute(),s&&l&&a.count()>0&&"scale"!==h){var d=a.getItemLayout(0),p=Math.max(i.getWidth(),i.getHeight())/2,f=Bx.bind(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,f,t))}this._data=a}},dispose:function(){},_createClipPath:function(t,e,i,n,a,o,r){var s=new Gx.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}});return Gx.initProps(s,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},r,o),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(n*n+a*a);return o<=i.r&&o>=i.r0}}});var Ux=m,qx=b;var Xx=function(t,e){qx.each(e,(function(e){e.update="updateView",Ux.registerAction(e,(function(i,n){var a={};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);a[i]=t.isSelected(i)||!1}))})),{name:i.name,selected:a}}))}))};var Yx=function(t,e){var i={};e.eachRawSeriesByType(t,(function(t){var n=t.getRawData(),a={};if(!e.isSeriesFiltered(t)){var o=t.getData();o.each((function(t){var e=o.getRawIndex(t);a[e]=t})),n.each((function(e){var r=a[e],s=null!=r&&o.getItemVisual(r,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e).get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",l),null!=r&&o.setItemVisual(r,"color",l)}}))}}))},$x=Ni;function Kx(t,e,i,n,a,o,r){function s(e,i,n,a){for(var o=e;oe&&o+1t[o].y+t[o].height)return void l(o,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 h(t,e,i,n,a,o){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort((function(t,e){return t.y-e.y}));for(var u,c=0,d=t.length,p=[],f=[],g=0;g=i?f.push(t[g]):p.push(t[g]);h(p,!1,e,i,n,a),h(f,!0,e,i,n,a)}var Jx=function(t,e,i,n){var a,o,r=t.getData(),s=[],l=!1;r.each((function(i){var n,h,u,c,d=r.getItemLayout(i),p=r.getItemModel(i),f=p.getModel("label.normal"),g=f.get("position")||p.get("label.emphasis.position"),m=p.getModel("labelLine.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),b=Math.sin(x);a=d.cx,o=d.cy;var w="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(w?(d.r+d.r0)/2*_:d.r*_)+a,M=(w?(d.r+d.r0)/2*b:d.r*b)+o;if(n=S+3*_,h=M+3*b,!w){var I=S+_*(v+e-d.r),A=M+b*(v+e-d.r),T=I+(_<0?-1:1)*y;n=T+(_<0?-5:5),h=A,u=[[S,M],[I,A],[T,A]]}c=w?"center":_>0?"left":"right"}var C=f.getFont(),L=f.get("rotate")?_<0?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||r.getName(i),P=$x.getBoundingRect(D,C,c,"top");l=!!L,d.label={x:n,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:w},w||s.push(d.label)})),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,a,o){for(var r=[],s=[],l=0;l=0;o--){var r=n[o],s=a[o],l=r[0]-s[0]/2,h=r[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return o}return-1}});function m_(){this.group=new p_.Group,this._symbolEl=new g_({})}var v_=m_.prototype;v_.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray((function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i}))}),e.symbolProxy=f_(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)})),this.group.add(e)},v_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},v_.remove=function(){this.group.removeAll()};var y_=pm,x_=m_;m.extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new y_,this._largeSymbolDraw=new x_},render:function(t,e,i){var n=t.getData(),a=this._largeSymbolDraw,o=this._normalSymbolDraw,r=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?a:o;this._symbolDraw=s,s.updateData(n),r.add(s.group),r.remove(s===a?o.group:a.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}});var __=m,b_=b,w_=Ym,S_=$m;__.registerVisual(b_.curry(w_,"scatter","circle",null)),__.registerLayout(b_.curry(S_,"scatter"));var M_=gg;function I_(t,e,i){M_.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}b.inherits(I_,M_);var A_=b,T_=I_,C_=af,L_=po,D_=Rp,P_=D_.getScaleExtent,k_=D_.niceScaleExtent,O_=_c;function z_(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=A_.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new T_(i,new C_);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}z_.prototype.getIndicatorAxes=function(){return this._indicatorAxes},z_.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},z_.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},z_.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=Math.atan2(-i,e),r=1/0,s=-1,l=0;li[0]&&isFinite(c)&&isFinite(i[0]))}else{r.getTicks().length-1>a&&(h=o(h));var d=Math.round((i[0]+i[1])/2/h)*h,p=Math.round(a/2);r.setExtent(L_.round(d-p*h),L_.round(d+(a-p)*h)),r.setInterval(h)}}))},z_.dimensions=[],z_.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var a=new z_(n,t,e);i.push(a),n.coordinateSystem=a})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},O_.register("radar",z_);var E_=m,R_=b,N_=ou,V_=Wf,B_=fv.valueAxis;function G_(t,e){return R_.defaults({show:e},t)}E_.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),o=this.get("axisLabel"),r=this.get("name"),s=this.get("name.show"),l=this.get("name.formatter"),h=this.get("nameGap"),u=this.get("triggerEvent"),c=R_.map(this.get("indicator")||[],(function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=r;if(null!=c.color&&(d=R_.defaults({color:c.color},r)),c=R_.merge(R_.clone(c),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisLabel:o,name:c.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1),s||(c.name=""),"string"==typeof l){var p=c.name;c.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(c.name=l(c.name,c));var f=R_.extend(new N_(c,null,this.ecModel),V_);return f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:R_.merge({lineStyle:{color:"#bbb"}},B_.axisLine),axisLabel:G_(B_.axisLabel,!1),axisTick:G_(B_.axisTick,!1),splitLine:G_(B_.splitLine,!0),splitArea:G_(B_.splitArea,!0),indicator:[]}});var W_=b,H_=yy,F_=Bo,Z_=["axisLine","axisTickLabel","axisName"];m.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=W_.map(i,(function(t){return new H_(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));W_.each(n,(function(t){W_.each(Z_,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),o=t.getModel("splitArea"),r=a.getModel("lineStyle"),s=o.getModel("areaStyle"),l=a.get("show"),h=o.get("show"),u=r.get("color"),c=s.get("color");u=W_.isArray(u)?u:[u],c=W_.isArray(c)?c:[c];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=e.cx,m=e.cy,v=0;v"+X_.map(i,(function(t,i){return Y_(t.name+" : "+e[i])})).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}}),K_=Bo,J_=b,Q_=Hf;m.extendChartView({type:"radar",render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return J_.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),o=Q_.createSymbol(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function l(e,i,n,a,o,r){n.removeAll();for(var l=0;l1?(f.width=l,f.height=l/d):(f.height=l,f.width=l*d),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(o=t.getBoxLayoutParams()).aspect=d,f=Wb.getLayoutRect(o,{width:h,height:u});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Zb(t,e){Bb.each(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}var jb={dimensions:Gb.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var a=t.get("map"),o=Vb.getMap(a),r=new Gb(a+n,a,o&&o.geoJson,o&&o.specialAreas,t.get("nameMap"));r.zoomLimit=t.get("scaleLimit"),i.push(r),Zb(r,t),t.coordinateSystem=r,r.model=t,r.resize=Fb,r.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),Bb.each(n,(function(t,n){var a=Vb.getMap(n),o=Bb.map(t,(function(t){return t.get("nameMap")})),r=new Gb(n,n,a&&a.geoJson,a&&a.specialAreas,Bb.mergeAll(o));r.zoomLimit=Bb.retrieve.apply(null,Bb.map(t,(function(t){return t.get("scaleLimit")}))),i.push(r),r.resize=Fb,r.resize(t[0],e),Bb.each(t,(function(t){t.coordinateSystem=r,Zb(r,t)}))})),i},getFilledRegions:function(t,e,i){var n=(t||[]).slice();i=i||{};var a=Vb.getMap(e),o=a&&a.geoJson;if(!o)return t;for(var r=Bb.createHashMap(),s=o.features,l=0;l"+Jb(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});qb.mixin(iw,tw);var nw={},aw="\0_ec_interaction_mutex";function ow(t){return t[aw]||(t[aw]={})}m.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),nw.take=function(t,e,i){ow(t)[e]=i},nw.release=function(t,e,i){var n=ow(t);n[e]===i&&(n[e]=null)},nw.isTaken=function(t,e){return!!ow(t)[e]};var rw=b,sw=rt,lw=fa,hw=nw;function uw(t){this.pointerChecker,this._zr=t,this._opt={};var e=rw.bind,i=e(cw,this),n=e(dw,this),a=e(pw,this),o=e(fw,this),r=e(gw,this);sw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=rw.defaults(rw.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",o),t.on("pinch",r))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",a),t.off("mousewheel",o),t.off("pinch",r)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function cw(t){if(!(lw.notLeftMouse(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 dw(t){if(!lw.notLeftMouse(t)&&vw(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!hw.isTaken(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&lw.stop(t.event),this.trigger("pan",o,r,n,a,e,i)}}function pw(t){lw.notLeftMouse(t)||(this._dragging=!1)}function fw(t){if(vw(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;mw.call(this,t,e,t.offsetX,t.offsetY)}}function gw(t){if(!hw.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;mw.call(this,t,e,t.pinchX,t.pinchY)}}function mw(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(lw.stop(t.event),this.trigger("zoom",e,i,n))}function vw(t,e,i){var n=t._opt[e];return n&&(!rw.isString(n)||i.event[n+"Key"])}rw.mixin(uw,sw);var yw=uw,xw={};xw.updateViewOnPan=function(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()},xw.updateViewOnZoom=function(t,e,i,n){var a=t.target,o=t.zoomLimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var h=o.min||0,u=o.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()};var _w={},bw={axisPointer:1,tooltip:1,brush:1};_w.onIrrelevantElement=function(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!bw[n.mainType]&&a&&a.model!==i};var ww=b,Sw=yw,Mw=xw,Iw=_w.onIrrelevantElement,Aw=Bo;function Tw(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Cw(t,e){e.eachChild((function(e){ww.each(e.__regions,(function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")}))}))}function Lw(t,e){var i=new Aw.Group;this._controller=new Sw(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}Lw.prototype={constructor:Lw,draw:function(t,e,i,n,a){var o="geo"===t.mainType,r=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},(function(e){r||e.getHostGeoModel()!==t||(r=e.getData())}));var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||a?l.attr(u):Aw.updateProps(l,u,t),l.removeAll();var c=["itemStyle","normal"],d=["itemStyle","emphasis"],p=["label","normal"],f=["label","emphasis"],g=ww.createHashMap();ww.each(s.regions,(function(e){var i=g.get(e.name)||g.set(e.name,new Aw.Group),n=new Aw.CompoundPath({shape:{paths:[]}});i.add(n);var a,s=(C=t.getRegionModel(e.name)||t).getModel(c),u=C.getModel(d),m=Tw(s),v=Tw(u),y=C.getModel(p),x=C.getModel(f);if(r){a=r.indexOfName(e.name);var _=r.getItemVisual(a,"color",!0);_&&(m.fill=_)}ww.each(e.geometries,(function(t){if("polygon"===t.type){n.shape.paths.push(new Aw.Polygon({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new Aw.Polygon({shape:{points:t.interiors[e]}}))}})),n.setStyle(m),n.style.strokeNoScale=!0,n.culling=!0;var b=y.get("show"),w=x.get("show"),S=r&&isNaN(r.get("value",a)),M=r&&r.getItemLayout(a);if(o||S&&(b||w)||M&&M.showLabel){var I,A=o?e.name:a;(!r||a>=0)&&(I=t);var T=new Aw.Text({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});Aw.setLabelStyle(T.style,T.hoverStyle={},y,x,{labelFetcher:I,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(T)}if(r)r.setItemGraphicEl(a,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),Aw.setHoverStyle(i,v,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)})),this._updateController(t,e,i),function(t,e,i,n,a){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 r=o.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:ww.map(r.__regions,(function(t){return{name:t.name,from:a.uid}}))};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Cw(e,i)}}})))}(this,t,l,i,n),Cw(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){var n=t.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=n.getZoom(),a.enable(t.get("roam")||!1);var r=t.mainType;function s(){var e={type:"geoRoam",componentType:r};return e[r+"Id"]=t.id,e}a.off("pan").on("pan",(function(t,e){this._mouseDownFlag=!1,Mw.updateViewOnPan(o,t,e),i.dispatchAction(ww.extend(s(),{dx:t,dy:e}))}),this),a.off("zoom").on("zoom",(function(t,e,n){if(this._mouseDownFlag=!1,Mw.updateViewOnZoom(o,t,e,n),i.dispatchAction(ww.extend(s(),{zoom:t,originX:e,originY:n})),this._updateGroup){var a=this.group,r=a.scale;a.traverse((function(t){"text"===t.type&&t.attr("scale",[1/r[0],1/r[1]])}))}}),this),a.setPointerChecker((function(e,a,o){return n.getViewRectAfterRoam().contain(a,o)&&!Iw(e,i,t)}))}};var Dw=Lw,Pw=b,kw=Bo,Ow=Dw;m.extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(o=this._mapDraw)&&a.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new Ow(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,a=this.group;n.each("value",(function(e,i){if(!isNaN(e)){var o=n.getItemLayout(i);if(o&&o.point){var r=o.point,s=o.offset,l=new kw.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),p=d.getModel("label.normal"),f=d.getModel("label.emphasis"),g=h.getItemGraphicEl(c),m=Pw.retrieve2(t.getFormattedLabel(i,"normal"),u),v=Pw.retrieve2(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=kw.setTextStyle({},f,{text:f.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){kw.setTextStyle(l.style,p,{text:p.get("show")?m:null,textPosition:p.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}a.add(l)}}}))}});var zw={};zw.updateCenterAndZoom=function(t,e,i){var n=t.getZoom(),a=t.getCenter(),o=e.zoom,r=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;a=t.pointToData(r);t.setCenter(a)}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 h=t.position,u=(e.originX-h[0])*(o-1),c=(e.originY-h[1])*(o-1);h[0]-=u,h[1]-=c,t.updateTransform();a=t.pointToData(r);t.setCenter(a),t.setZoom(o*n)}return{center:t.getCenter(),zoom:t.getZoom()}};var Ew=m,Rw=b,Nw=zw.updateCenterAndZoom;Ew.registerAction({type:"geoRoam",event:"geoRoam",update:"updateLayout"},(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 a=Nw(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&Rw.each(e.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))}));var Vw=b;var Bw=b;var Gw=function(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),Bw.each(e,(function(t,e){for(var i,n,a,o,r=(i=Bw.map(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),a={},o=["value"],Bw.each(i,(function(t){t.each(o,(function(e,i){var n="ec-"+t.getName(i);a[n]=a[n]||[],isNaN(e)||a[n].push(e)}))})),i[0].map(o,(function(t,e){for(var o="ec-"+i[0].getName(e),r=0,s=1/0,l=-1/0,h=a[o].length,u=0;ue&&(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;e=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),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(a||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)}},cS.prototype={constructor:cS,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;io&&(o=t.depth)}));var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r})),a.data},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return gS(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemStyle:{normal:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var mS={},vS=wu;function yS(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function xS(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function _S(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function bS(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function wS(t,e){return t.parentNode===e.parentNode?1:2}mS.init=function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length-1;a>=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}},mS.firstWalk=function(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,a=0;for(;--i>=0;){var o=e[i];o.hierNode.prelim+=n,o.hierNode.modifier+=n,a+=o.hierNode.change,n+=o.hierNode.shift+a}}(t);var o=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentNode.children[0],s=e,l=a.hierNode.modifier,h=o.hierNode.modifier,u=r.hierNode.modifier,c=s.hierNode.modifier;s=yS(s),o=xS(o),s&&o;){a=yS(a),r=xS(r),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-h+n(s,o);d>0&&(bS(_S(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=o.hierNode.modifier,l+=a.hierNode.modifier,u+=r.hierNode.modifier}s&&!yS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),o&&!xS(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=h-u,i=t)}return i}(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)},mS.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},mS.separation=function(t){return arguments.length?t:wS},mS.radialCoordinate=function(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i},mS.getViewRect=function(t,e){return vS.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})};var SS=b,MS=Bo,IS=sm,AS=mS.radialCoordinate;function TS(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function CS(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle.normal").getItemStyle(),i.hoverItemStyle=e.getModel("itemStyle.emphasis").getItemStyle(),i.lineStyle=e.getModel("lineStyle.normal").getLineStyle(),i.labelModel=e.getModel("label.normal"),i.hoverLabelModel=e.getModel("label.emphasis"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function LS(t,e,i,n,a,o){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),h=(o=CS(s,l,o),t.tree.root),u=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();r?(i=new IS(t,e,o)).attr("position",[p.x,p.y]):i.updateData(t,e,o),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),MS.updateProps(i,{position:[f.x,f.y]},a);var g=i.getSymbolPath();if("radial"===o.layout){var m,v,y=h.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.xx.x)||(m-=Math.PI);var w=v?"left":"right";g.setStyle({textPosition:w,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==h){var S=i.__edge;S||(S=i.__edge=new MS.BezierCurve({shape:PS(o,p,p),style:SS.defaults({opacity:0},o.lineStyle)})),MS.updateProps(S,{shape:PS(o,d,f),style:{opacity:1}},a),n.add(S)}}function DS(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),u=(o=CS(s,h,o),s.parentNode===l?s:s.parentNode||s);null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;MS.updateProps(i,{position:[r.x+1,r.y+1]},a,(function(){n.remove(i),t.setItemGraphicEl(e,null)})),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&MS.updateProps(c,{shape:PS(o,r,r),style:{opacity:0}},a,(function(){n.remove(c)}))}function PS(t,e,i){var n,a,o,r,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=i.rawX,c=i.rawY,d=AS(l,h),p=AS(l,h+(c-h)*t.curvature),f=AS(u,c+(h-c)*t.curvature),g=AS(u,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,a=h,o=u+(l-u)*t.curvature,r=c),"vertical"===s&&(n=l,a=h+(c-h)*t.curvature,o=u,r=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}m.extendChartView({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new MS.Group,this.group.add(this._mainGroup)},render:function(t,e,i,n){var a=t.getData(),o=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.get("orient"),curvature:t.get("lineStyle.normal.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(e){TS(a,e)&&LS(a,e,null,r,t,h)})).update((function(e,i){var n=l.getItemGraphicEl(i);TS(a,e)?LS(a,e,n,r,t,h):n&&DS(a,e,n,r,t,h)})).remove((function(e){var i=l.getItemGraphicEl(e);DS(a,e,i,r,t,h)})).execute(),!0===h.expandAndCollapse&&a.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=a},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),m.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))}));var kS={};kS.eachAfter=function(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;o--)n.push(a[o])}};var OS=kS,zS=OS.eachAfter,ES=OS.eachBefore,RS=mS,NS=RS.init,VS=RS.firstWalk,BS=RS.secondWalk,GS=RS.separation,WS=RS.radialCoordinate,HS=RS.getViewRect;var FS=function(t,e){var i=HS(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,r=GS((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(a=i.width,o=i.height,r=GS());var s=t.getData().tree.root,l=s.children[0];NS(s),zS(l,VS,r),s.hierNode.modifier=-l.hierNode.prelim,ES(l,BS);var h=l,u=l,c=l;ES(l,(function(t){var e=t.getLayout().x;eu.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)}));var d=h===u?1:r(h,u)/2,p=d-h.getLayout().x,f=0,g=0,m=0,v=0;"radial"===n?(f=a/(u.getLayout().x+d+p),g=o/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=WS(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}))):"horizontal"===t.get("orient")?(g=o/(u.getLayout().x+d+p),f=a/(c.depth-1||1),ES(l,(function(t){v=(t.getLayout().x+p)*g,m=(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):(f=a/(u.getLayout().x+d+p),g=o/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))},ZS=FS;var jS=FS;var US=m,qS=b,XS=Ym,YS=function(t,e){t.eachSeriesByType("tree",(function(t){ZS(t,e)}))},$S=function(t,e){t.eachSeriesByType("tree",(function(t){jS(t,e)}))};US.registerVisual(qS.curry(XS,"tree","circle",null)),US.registerLayout(YS),US.registerLayout($S);var KS={},JS=b;function QS(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}KS.retrieveTargetInfo=function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var a=t.targetNodeId;if(null!=a&&(n=i.getNodeById(a)))return{node:n}}},KS.getPathToRoot=QS,KS.aboveViewRoot=function(t,e){var i=QS(t);return JS.indexOf(i,e)>=0},KS.wrapTreePathInfo=function(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};var tM=b,eM=yd,iM=dS,nM=ou,aM=co,oM=aM.encodeHTML,rM=aM.addCommas,sM=KS.wrapTreePathInfo;function lM(t){var e=0;tM.each(t.children,(function(t){lM(t);var i=t.value;tM.isArray(i)&&(i=i[0]),e+=i}));var i=t.value;tM.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),tM.isArray(t.value)?t.value[0]=i:t.value=i}eM.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{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:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperLabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},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};lM(i);var n=t.levels||[];n=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;if(t=t||[],tM.each(t,(function(t){var e=new nM(t),n=e.get("color");(e.get("itemStyle.normal.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=n.slice()}return t}(n,e);var a={};return a.levels=n,iM.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=tM.isArray(i)?rM(i[0]):rM(i),a=e.getName(t);return oM(a+": "+n)},getDataParams:function(t){var e=eM.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=sM(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},tM.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tM.createHashMap(),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.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var hM=Bo,uM=wu,cM=b,dM=KS.wrapTreePathInfo;function pM(t){this.group=new hM.Group,t.add(this.group)}function fM(t,e,i,n,a,o){var r=[[a?t:t-5,e],[t+i,e],[t+i,e+n],[a?t:t-5,e+n]];return!o&&r.splice(2,0,[t+i+5,e+n/2]),!a&&r.push([t,e+n/2]),r}function gM(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&dM(i,e)}}pM.prototype={constructor:pM,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle.normal"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),uM.positionElement(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o=0,r=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=uM.getAvailableSize(e.pos,e.box),h=e.totalWidth,u=e.renderList,c=u.length-1;c>=0;c--){var d=u[c],p=d.node,f=d.width,g=d.text;h>l.width&&(h-=f-r,f=r,g=null);var m=new hM.Polygon({shape:{points:fM(o,0,f,s,c===u.length-1,0===c)},style:cM.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:cM.curry(a,p)});this.group.add(m),gM(m,t,p),o+=f+8}},remove:function(){this.group.removeAll()}};var mM=pM,vM={},yM=b;vM.createWrap=function(){var t,e=[],i={};return{add:function(t,n,a,o,r){return yM.isString(o)&&(r=o,o=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,a=0,o=e.length;a3||Math.abs(e)>3)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var o=new AM(a.x,a.y,a.width,a.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=TM.create();TM.translate(s,s,[-e,-i]),TM.scale(s,s,[t,t]),TM.translate(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 a=n.hostTree.data.getItemModel(n.dataIndex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&window.open(o,r)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new MM(this.group))).render(t,e,i.node,DM((function(e){"animating"!==this._state&&(SM.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},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;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var a=this._storage.background[n.getRawIndex()];if(a){var o=a.transformCoordToLocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}}),this),i}});for(var HM=m,FM=KS,ZM=function(){},jM=["treemapZoomToNode","treemapRender","treemapMove"],UM=0;UM=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(n):tI(n,!0):(qM.assert("linear"!==e||n.dataExtent),tI(n))};JM.prototype={constructor:JM,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return qM.bind(this._normalizeData,this)}};var QM=JM.visualHandlers={color:{applyVisual:nI("color"),getColorMapper:function(){var t=this.option;return qM.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),aI.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=XM.fastLerp(e,t.parsedVisual,n),a?n:XM.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")},category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:oI}},colorHue:eI((function(t,e){return XM.modifyHSL(t,e)})),colorSaturation:eI((function(t,e){return XM.modifyHSL(t,null,e)})),colorLightness:eI((function(t,e){return XM.modifyHSL(t,null,null,e)})),colorAlpha:eI((function(t,e){return XM.modifyAlpha(t,e)})),opacity:{applyVisual:nI("opacity"),_doMap:rI([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(qM.isString(n))i("symbol",n);else if(KM(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:iI,category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=iI.call(this,t)),i},fixed:oI}},symbolSize:{applyVisual:nI("symbolSize"),_doMap:rI([0,1])}};function tI(t,e){var i=t.visual,n=[];qM.isObject(i)?$M(i,(function(t){n.push(t)})):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),lI(t,n)}function eI(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:rI([0,1])}}function iI(t){var e=this.option.visual;return e[Math.round(YM(t,[0,1],[0,e.length-1],!0))]||{}}function nI(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function aI(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function oI(){return this.option.visual[0]}function rI(t){return{linear:function(e){return YM(e,t,this.option.visual,!0)},category:aI,piecewise:function(e,i){var n=sI.call(this,i);return null==n&&(n=YM(e,t,this.option.visual,!0)),n},fixed:oI}}function sI(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[JM.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function lI(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=qM.map(e,(function(t){return XM.parse(t)}))),e}var hI={linear:function(t){return YM(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=JM.findPieceIndex(t,e,!0);if(null!=i)return YM(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:qM.noop};function uI(t,e,i){return t?e<=i:eh[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:r.name,dataExtent:h,visual:r.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new dI(c);return d.__drColorMappingBy=u,d}(0,r,s,0,u,p);fI.each(p,(function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=function(t,e,i,n,a,o){var r=fI.extend({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,h="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=a.mapValueToVisual(h)}return r}(r,u,t,e,f,o);mI(t,s,i,n,a,o)}}))}else l=vI(u),t.setVisual("color",l)}}function vI(t){var e=yI(t,"color");if(e){var i=yI(t,"colorAlpha"),n=yI(t,"colorSaturation");return n&&(e=pI.modifyHSL(e,null,null,n)),i&&(e=pI.modifyAlpha(e,i)),e}}function yI(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function xI(t,e){var i=t.get(e);return gI(i)&&i.length?{name:e,range:i}:null}var _I=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var e=t.getData().tree,i=e.root,n=t.getModel("itemStyle.normal");i.isRemoved()||mI(i,{},fI.map(e.levelModels,(function(t){return t?t.get("itemStyle.normal"):null})),n,t.getViewRoot().getAncestors(),t)}))},bI=b,wI=Je,SI=po,MI=SI.parsePercent,II=SI.MAX_SAFE_INTEGER,AI=wu,TI=KS,CI=Math.max,LI=Math.min,DI=bI.retrieve,PI=bI.each,kI=["itemStyle","normal","borderWidth"],OI=["itemStyle","normal","gapWidth"],zI=["upperLabel","normal","show"],EI=["upperLabel","normal","height"];function RI(t,e,i,n){var a,o;if(!t.isRemoved()){var r=t.getLayout();a=r.width,o=r.height;var s=(p=t.getModel()).get(kI),l=p.get(OI)/2,h=GI(p),u=Math.max(s,h),c=s-l,d=u-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:u,upperLabelHeight:h},!0);var f=(a=CI(a-2*c,0))*(o=CI(o-c-d,0)),g=function(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!l)return t.viewChildren=[];r=bI.filter(r,(function(t){return!t.isRemoved()})),function(t,e){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}))}(r,s);var h=function(t,e,i){for(var n=0,a=0,o=e.length;as[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,a){if(!n)return i;for(var o=t.get("visibleMin"),r=a.length,s=r,l=r-1;l>=0;l--){var h=a["asc"===n?r-l-1:l].getValue();h/i*ea&&(a=n));var l=t.area*t.area,h=e*e*i;return l?CI(h*a/l,l/(h*o)):1/0}function VI(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],h=i[s[o]],u=e?t.area/e:0;(a||u>i[l[r]])&&(u=i[l[r]]);for(var c=0,d=t.length;cII&&(h=II),r=o}h=0&&t.call(e,i[a],a)},XI.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XI.breadthFirstTraverse=function(t,e,i,n){if(e instanceof YI||(e=this._nodesMap[UI(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o=0&&i.node2.dataIndex>=0}));for(a=0,o=n.length;a=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};jI.mixin(YI,KI("hostGraph","data")),jI.mixin($I,KI("hostGraph","edgeData")),qI.Node=YI,qI.Edge=$I;var JI=b,QI=dp,tA=qI,eA=aS,iA=wp,nA=_c,aA=Ep;var oA=function(t,e,i,n,a){for(var o=new tA(n),r=0;r "+d)),h++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=aA(t,i,i.ecModel);else{var g=nA.get(f),m=iA((g&&"view"!==g.type&&g.dimensions||[]).concat(["value"]),t);(p=new QI(m,i)).initData(t)}var v=new QI(["value"],i);return v.initData(l,s),a&&a(p,v),eA({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},rA=m,sA=dp,lA=b,hA=uo.defaultEmphasis,uA=ou,cA=co.encodeHTML,dA=oA,pA=rA.extendSeriesModel({type:"series.graph",init:function(t){pA.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){pA.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){pA.superApply(this,"mergeDefaultAndTheme",arguments),hA(t.edgeLabel,["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],a=this;if(n&&i)return dA(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=a._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=a.getModel("edgeLabel"),o=new uA({label:n.option},n.parentModel,e);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?o:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(r),t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=cA(l.join(" > ")),a.value&&(l+=" : "+cA(a.value)),l}return pA.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=lA.map(this.option.categories||[],(function(t){return null!=t.value?t:lA.extend({value:0},t)})),e=new sA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return pA.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),fA=Bo,gA=j,mA=fA.Line.prototype,vA=fA.BezierCurve.prototype;function yA(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var xA=fA.extendShape({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){(yA(e)?mA:vA).buildPath(t,e)},pointAt:function(t){return yA(this.shape)?mA.pointAt.call(this,t):vA.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=yA(e)?[e.x2-e.x1,e.y2-e.y1]:vA.tangentAt.call(this,t);return gA.normalize(i,i)}}),_A=b,bA=j,wA=Hf,SA=xA,MA=Bo,IA=po.round,AA=["fromSymbol","toSymbol"];function TA(t){return"_"+t+"Type"}function CA(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_A.isArray(o)||(o=[o,o]);var r=wA.createSymbol(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function LA(t,e){var i=e[0],n=e[1],a=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,a?(t.cpx1=a[0],t.cpy1=a[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DA(t,e,i){MA.Group.call(this),this._createLine(t,e,i)}var PA=DA.prototype;PA.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),h=r.pointAt(s),u=bA.sub([],h,l);if(bA.normalize(u,u),e){e.attr("position",l);var c=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",h);c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){var d,p,f;n.attr("position",h);var g=5*a;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],p=u[0]>.8?"left":u[0]<-.8?"right":"center",f=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],p="center",f="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",f=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||p},position:d,scale:[a,a]})}}}},PA._createLine=function(t,e,i){var n=t.hostModel,a=function(t){var e=new SA({name:"line"});return LA(e.shape,t),e}(t.getItemLayout(e));a.shape.percent=0,MA.initProps(a,{shape:{percent:1}},n,e),this.add(a);var o=new MA.Text({name:"label"});this.add(o),_A.each(AA,(function(i){var n=CA(i,t,e);this.add(n),this[TA(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},PA.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};LA(r.shape,o),MA.updateProps(a,r,n,e),_A.each(AA,(function(i){var n=t.getItemVisual(e,i),a=TA(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=CA(i,t,e);this.add(o)}this[a]=n}),this),this._updateCommonStl(t,e,i)},PA._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle.normal").getLineStyle(),r=h.getModel("lineStyle.emphasis").getLineStyle(),s=h.getModel("label.normal"),l=h.getModel("label.emphasis")}var u=t.getItemVisual(e,"color"),c=_A.retrieve3(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(_A.defaults({strokeNoScale:!0,fill:"none",stroke:u,opacity:c},o)),a.hoverStyle=r,_A.each(AA,(function(t){var e=this.childOfName(t);e&&(e.setColor(u),e.setStyle({opacity:c}))}),this);var d,p,f,g,m=s.getShallow("show"),v=l.getShallow("show"),y=this.childOfName("label");if(m||v){var x=n.getRawValue(e);p=null==x?p=t.getName(e):isFinite(x)?IA(x):x,d=u||"#000",f=_A.retrieve2(n.getFormattedLabel(e,"normal",t.dataType),p),g=_A.retrieve2(n.getFormattedLabel(e,"emphasis",t.dataType),f)}if(m){var _=MA.setTextStyle(y.style,s,{text:f},{autoColor:d});y.__textAlign=_.textAlign,y.__verticalAlign=_.textVerticalAlign,y.__position=s.get("position")||"middle"}else y.setStyle("text",null);y.hoverStyle=v?{text:g,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,MA.setHoverStyle(this)},PA.highlight=function(){this.trigger("emphasis")},PA.downplay=function(){this.trigger("normal")},PA.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},PA.setLinePoints=function(t){var e=this.childOfName("line");LA(e.shape,t),e.dirty()},_A.inherits(DA,MA.Group);var kA=DA,OA=Bo,zA=kA;function EA(t){return isNaN(t[0])||isNaN(t[1])}function RA(t){return!EA(t[0])&&!EA(t[1])}function NA(t){this._ctor=t||zA,this.group=new OA.Group}var VA=NA.prototype;VA.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,a=t.hostModel,o={lineStyle:a.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:a.getModel("lineStyle.emphasis").getLineStyle(),labelModel:a.getModel("label.normal"),hoverLabelModel:a.getModel("label.emphasis")};t.diff(e).add((function(e){if(RA(t.getItemLayout(e))){var a=new n(t,e,o);t.setItemGraphicEl(e,a),i.add(a)}})).update((function(a,r){var s=e.getItemGraphicEl(r);RA(t.getItemLayout(a))?(s?s.updateData(t,a,o):s=new n(t,a,o),t.setItemGraphicEl(a,s),i.add(s)):i.remove(s)})).remove((function(t){i.remove(e.getItemGraphicEl(t))})).execute(),this._lineData=t},VA.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},VA.remove=function(){this.group.removeAll()};var BA=NA,GA=Wo,WA=j,HA=[],FA=[],ZA=[],jA=GA.quadraticAt,UA=WA.distSquare,qA=Math.abs;function XA(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1){HA[0]=jA(a[0],o[0],r[0],u),HA[1]=jA(a[1],o[1],r[1],u),(p=qA(UA(HA,e)-l))=0?n+=h:n-=h:f>=0?n-=h:n+=h}return n}var YA=function(t,e){var i=[],n=GA.quadraticSubdivide,a=[[],[],[]],o=[[],[]],r=[];function s(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}e/=2,t.eachEdge((function(t,l){var h=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");h.__original||(h.__original=[WA.clone(h[0]),WA.clone(h[1])],h[2]&&h.__original.push(WA.clone(h[2])));var d=h.__original;if(null!=h[2]){if(WA.copy(a[0],d[0]),WA.copy(a[1],d[2]),WA.copy(a[2],d[1]),u&&"none"!=u){var p=s(t.node1),f=XA(a,d[0],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],f,i),a[0][1]=i[3],a[1][1]=i[4]}if(c&&"none"!=c){p=s(t.node2),f=XA(a,d[1],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],f,i),a[1][1]=i[1],a[2][1]=i[2]}WA.copy(h[0],a[0]),WA.copy(h[1],a[2]),WA.copy(h[2],a[1])}else{if(WA.copy(o[0],d[0]),WA.copy(o[1],d[1]),WA.sub(r,o[1],o[0]),WA.normalize(r,r),u&&"none"!=u){p=s(t.node1);WA.scaleAndAdd(o[0],o[0],r,p*e)}if(c&&"none"!=c){p=s(t.node2);WA.scaleAndAdd(o[1],o[1],r,-p*e)}WA.copy(h[0],o[0]),WA.copy(h[1],o[1])}}))},$A=m,KA=b,JA=pm,QA=BA,tT=yw,eT=xw,iT=_w.onIrrelevantElement,nT=Bo,aT=YA,oT=["itemStyle","normal","opacity"],rT=["lineStyle","normal","opacity"];function sT(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function lT(t,e,i){var n=t.getGraphicEl(),a=sT(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",a)}))}function hT(t,e){var i=sT(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)}))}$A.extendChartView({type:"graph",init:function(t,e){var i=new JA,n=new QA,a=this.group;this._controller=new tT(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var a=this._symbolDraw,o=this._lineDraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?r.attr(s):nT.updateProps(r,s,t)}aT(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();a.updateData(l);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var u=t.forceLayout,c=t.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl((function(e,n){var a=l.getItemModel(n);e.off("drag").off("dragend");var o=l.getItemModel(n).get("draggable");o&&e.on("drag",(function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(n),l.setItemLayout(n,e.position))}),this).on("dragend",(function(){u&&u.setUnfixed(n)}),this),e.setDraggable(o&&u),e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),this),l.graph.eachEdge((function(e){var n=e.getGraphicEl();n.off("mouseover",n.__focusNodeAdjacency),n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}));var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=l.getLayout("cx"),f=l.getLayout("cy");l.eachItemGraphicEl((function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),a=Math.atan2(n[1]-f,n[0]-p);a<0&&(a=2*Math.PI+a);var o=n[0]=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*o,e.y+n(r)*o),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(r)*o,e.y-n(r)*o),t.lineTo(s,l)}}),QT=Bo,tC=zd,eC=po,iC=eC.parsePercent,nC=eC.round,aC=eC.linearMap;function oC(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var rC=2*Math.PI;tC.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a);return{cx:iC(i[0],e.getWidth()),cy:iC(i[1],e.getHeight()),r:iC(t.get("radius"),o/2)}}(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var o=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,h=((p=-t.get("endAngle")/180*Math.PI)-l)%rC,u=l,c=r.get("width"),d=0;d=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:T<-.4?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&A!==v){for(var O=0;O<=y;O++){T=Math.cos(b),C=Math.sin(b);var z=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-_)+h,y2:C*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:n((A+O/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(t,e,i,n,a,o,r,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[o,r],d=t.getData();d.diff(h).add((function(e){var i=new JT({shape:{angle:o}});QT.initProps(i,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)})).update((function(e,i){var n=h.getItemGraphicEl(i);QT.updateProps(n,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)})).remove((function(t){var e=h.getItemGraphicEl(t);l.remove(e)})).execute(),d.eachItemGraphicEl((function(t,e){var i=d.getItemModel(e),o=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:iC(o.get("width"),a.r),r:iC(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(aC(d.get("value",e),u,[0,1],!0))),QT.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())})),this._data=d}else h&&h.eachItemGraphicEl((function(t){l.remove(t)}))},_renderTitle:function(t,e,i,n,a){var o=t.getModel("title");if(o.get("show")){var r=o.get("offsetCenter"),s=a.cx+iC(r[0],a.r),l=a.cy+iC(r[1],a.r),h=+t.get("min"),u=+t.get("max"),c=t.getData().get("value",0),d=n(aC(c,[h,u],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},o,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),h=a.cx+iC(l[0],a.r),u=a.cy+iC(l[1],a.r),c=iC(o.get("width"),a.r),d=iC(o.get("height"),a.r),p=t.getData().get("value",0),f=n(aC(p,[r,s],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},o,{x:h,y:u,text:oC(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}}});var sC=m,lC=dp,hC=uo.defaultEmphasis,uC=wp,cC=sC.extendSeriesModel({type:"series.funnel",init:function(t){cC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=uC(["value"],t.data),n=new lC(i,this);return n.initData(t.data),n},_defaultLabelLine:function(t){hC(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getDataParams:function(t){var e=this.getData(),i=cC.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*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:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}}),dC=Bo,pC=b,fC=zd;function gC(t,e){dC.Group.call(this);var i=new dC.Polygon,n=new dC.Polyline,a=new dC.Text;function o(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function r(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",o).on("normal",r).on("mouseover",o).on("mouseout",r)}var mC=gC.prototype,vC=["itemStyle","normal","opacity"];mC.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(vC);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),dC.initProps(n,{style:{opacity:s}},a,e)):dC.updateProps(n,{style:{opacity:s},shape:{points:r.points}},a,e);var l=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(pC.defaults({lineJoin:"round",fill:h},l.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),dC.setHoverStyle(this)},mC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");dC.updateProps(i,{shape:{points:r.linePoints||r.linePoints}},a,e),dC.updateProps(n,{style:{x:r.x,y:r.y}},a,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=o.getModel("label.normal"),h=o.getModel("label.emphasis"),u=o.getModel("labelLine.normal"),c=o.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");dC.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},pC.inherits(gC,dC.Group),fC.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),a=this._data,o=this.group;n.diff(a).add((function(t){var e=new gC(n,t);n.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);i.updateData(n,t),o.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var yC=wu,xC=po,_C=xC.parsePercent,bC=xC.linearMap;var wC=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=t.get("sort"),a=function(t,e){return yC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),o=function(t,e){for(var i=t.mapArray("value",(function(t){return t})),n=[],a="ascending"===e,o=0,r=t.count();o0?-1:i<0?1:e?-1:1}}function EC(t,e){return Math.min(e[1],Math.max(e[0],t))}OC.prototype={constructor:OC,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},PC.inherits(OC,kC);var RC=function(t,e,i,n,a,o){e[0]=EC(e[0],i),e[1]=EC(e[1],i),t=t||0;var r=i[1]-i[0];null!=a&&(a=EC(a,[0,r])),null!=o&&(o=Math.max(o,null!=a?a:0)),"all"===n&&(a=o=Math.abs(e[1]-e[0]),n=0);var s=zC(e,n);e[n]+=t;var l=a||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=EC(e[n],h);var u=zC(e,n);return null!=a&&(u.sign!==s.sign||u.spano&&(e[1-n]=e[n]+u.sign*o),e},NC=b,VC=mt,BC=wu,GC=Rp,WC=OC,HC=Bo,FC=po,ZC=RC,jC=NC.each,UC=Math.min,qC=Math.max,XC=Math.floor,YC=Math.ceil,$C=FC.round,KC=Math.PI;function JC(t,e,i){this._axesMap=NC.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function QC(t,e){return UC(qC(t,e[0]),e[1])}function tL(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function eL(t,e){var i,n,a=e.layoutLength,o=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t=i&&o<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();jC(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,t),GC.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=BC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],h=this.dimensions.length,u=QC(e.get("axisExpandWidth"),l),c=QC(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=QC(p[1]-p[0],l),p[1]=p[0]+t):(t=QC(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||XC(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[XC($C(p[0]/u,1))+1,YC($C(p[1]/u,1))-1],m=f/u*p[0];return{layout:o,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[a[1-r]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),jC(i,(function(i,o){var r=(n.axisExpandable?eL:tL)(o,n),s={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},l={horizontal:KC/2,vertical:0},h=[s[a].x+t.x,s[a].y+t.y],u=l[a],c=VC.create();VC.rotate(c,c,u),VC.translate(c,c,h),this._axesLayout[i]={position:h,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:e.get(i).getLabelInterval()}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,a=this._axesMap,o=this.hasAxisBrushed(),r=0,s=t.count();ra*(1-u[0])?(l="jump",r=s-a*(1-u[2])):(r=s-a*u[1])>=0&&(r=s-a*(1-u[1]))<=0&&(r=0),(r*=e.axisExpandWidth/h)?ZC(r,n,o,"all"):l="none";else{a=n[1]-n[0];(n=[qC(0,o[1]*s/a-a/2)])[1]=UC(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}};var iL=JC;_c.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,a){var o=new iL(n,t,e);o.name="parallel_"+a,o.resize(n,e),n.coordinateSystem=o,o.model=n,i.push(o)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}});var nL=b,aL=zo,oL=wv,rL=po,sL=Wf,lL=Zu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return aL([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=nL.clone(t);if(e)for(var i=e.length-1;i>=0;i--)rL.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i1)return("e"===(i=[jL(t,(e=e.split(""))[0]),jL(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i=fL.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return fL.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function UL(t,e,i,n,a,o,r,s){var l=n.__brushOption,h=t(l.range),u=XL(i,o,r);yL(a.split(""),(function(t){var e=SL[t];h[e[0]][e[1]]+=u[e[0]]})),l.range=e(ZL(h[0][0],h[1][0],h[0][1],h[1][1])),kL(i,n),NL(i,{isEnd:!1})}function qL(t,e,i,n,a){var o=e.__brushOption.range,r=XL(t,i,n);yL(o,(function(t){t[0]+=r[0],t[1]+=r[1]})),kL(t,e),NL(t,{isEnd:!1})}function XL(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function YL(t,e,i){var n=EL(t,e);return n&&!0!==n?n.clipPath(i,t._transform):dL.clone(i)}function $L(t){var e=t.event;e.preventDefault&&e.preventDefault()}function KL(t,e,i){return t.childOfName("main").contain(e,i)}function JL(t,e,i,n){var a,o=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],a=i[0]-n[0],o=i[1]-n[1];return wL(a*a+o*o,.5)>6}(t)||o){if(r&&!o){"single"===s.brushMode&&RL(t);var l=dL.clone(s);l.brushType=QL(l.brushType,r),l.panelId=!0===r?null:r.panelId,o=t._creatingCover=CL(t,l),t._covers.push(o)}if(o){var h=iD[QL(t._brushType,r)];o.__brushOption.range=h.getCreatingRange(YL(t,o,t._track)),n&&(LL(t,o),h.updateCommon(t,o)),DL(t,o),a={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&zL(t,e,i)&&RL(t)&&(a={isEnd:n,removeOnClick:!0});return a}function QL(t,e){return"auto"===t?e.defaultBrushType:t}TL.prototype={constructor:TL,enableBrush:function(t){var e,i;return this._brushType&&(i=(e=this)._zr,gL.release(i,"globalPan",e._uid),yL(e._handlers,(function(t,e){i.off(e,t)})),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||gL.take(i,"globalPan",t._uid);yL(t._handlers,(function(t,e){i.on(e,t)})),t._brushType=e.brushType,t._brushOption=dL.merge(dL.clone(IL),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};dL.each(t,(function(t){e[t.panelId]=dL.clone(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){yL(this._covers,t,e)},updateCovers:function(t){t=dL.map(t,(function(t){return dL.merge(dL.clone(IL),t,!0)}));var e=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new mL(e,t,(function(t,e){return o(t.__brushOption,e)}),o).add(r).update(r).remove((function(t){e[t]!==a&&n.group.remove(e[t])})).execute(),this;function o(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function r(o,r){var s=t[o];if(null!=r&&e[r]===a)i[o]=e[r];else{var l=i[o]=null!=r?(e[r].__brushOption=s,e[r]):LL(n,CL(n,s));kL(n,l)}}},unmount:function(){return this.enableBrush(!1),RL(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},dL.mixin(TL,pL);var tD={mousedown:function(t){if(this._dragging)eD.call(this,t);else if(!t.target||!t.target.draggable){$L(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=zL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,a=t._covers,o=zL(t,e,i);if(!t._dragging)for(var r=0;r5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&SD(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function SD(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yD.registerPreprocessor(bD);var MD=dp,ID=b,AD=wp;function TD(t){return+t.replace("dim","")}yd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,a=t.data,o=i.dimensions,r=function(t,e){var i=0;ID.each(t,(function(t){var e=TD(t);e>i&&(i=e)}));var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var a=[],o=0;o<=i;o++)a.push("dim"+o);return a}(o,a),s=ID.map(r,(function(t,i){var r=ID.indexOf(o,t),s=r>=0&&e.getComponent("parallelAxis",n[r]);return s&&"category"===s.get("type")?(function(t,e,i){var n=t.get("data"),a=TD(e);n&&n.length&&ID.each(i,(function(t){if(t){var e=ID.indexOf(n,t[a]);t[a]=e>=0?e:NaN}}))}(s,t,a),{name:t,type:"ordinal"}):r<0&&AD.guessOrdinal(a,i)?{name:t,type:"ordinal"}:t})),l=new MD(s,this);return l.initData(a),this.option.progressive&&(this.option.animation=!1),l},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,a){t===e&&n.push(i.getRawIndex(a))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});var CD=Bo,LD=b;function DD(t,e,i,n){for(var a,o=[],r=0;r=t.length)return e;for(var a=-1,o=e.length,r=t[n++],s={},l={};++a=t.length)return i;var o=[],r=e[a++];return BD.each(i,(function(t,e){o.push({key:e,values:n(t,a)})})),r?o.sort((function(t,e){return r(t.key,e.key)})):o}return{key:function(e){return t.push(e),this},sortKeys:function(i){return e[t.length-1]=i,this},entries:function(t){return n(i(t,0),0)}}},WD=wu,HD=GD,FD=b;function ZD(t,e,i){FD.each(t,(function(t){var n,a,o,r=0,s=t.length;for(t.sort(QD),o=0;o0){var l=n.getLayout().y+a;n.setLayout({y:l},!0)}r=n.getLayout().y+n.getLayout().dy+e}if((a=r-e-i)>0){l=n.getLayout().y-a;for(n.setLayout({y:l},!0),r=n.getLayout().y,o=s-2;o>=0;--o)(a=(n=t[o]).getLayout().y+n.getLayout().dy+e-r)>0&&(l=n.getLayout().y-a,n.setLayout({y:l},!0)),r=n.getLayout().y}}))}function jD(t,e){FD.each(t.slice().reverse(),(function(t){FD.each(t,(function(t){if(t.outEdges.length){var i=KD(t.outEdges,UD)/KD(t.outEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function UD(t){return JD(t.node2)*t.getValue()}function qD(t,e){FD.each(t,(function(t){FD.each(t,(function(t){if(t.inEdges.length){var i=KD(t.inEdges,XD)/KD(t.inEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function XD(t){return JD(t.node1)*t.getValue()}function YD(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function $D(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function KD(t,e){for(var i=0,n=t.length,a=-1;++ae?1:t===e?0:NaN}function eP(t){return t.getValue()}var iP=function(t,e,i){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=function(t,e){return WD.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,h=s.edges;!function(t){FD.each(t,(function(t){var e=KD(t.outEdges,eP),i=KD(t.inEdges,eP),n=Math.max(e,i);t.setLayout({value:n},!0)}))}(l),function(t,e,i,n,a,o,r){(function(t,e,i){var n=t,a=null,o=0;for(;n.length;){a=[];for(var r=0,s=n.length;r0;a--)jD(o,r*=.99),ZD(o,n,i),qD(o,r),ZD(o,n,i)}(t,e,o,n,r),function(t){FD.each(t,(function(t){t.outEdges.sort(YD),t.inEdges.sort($D)})),FD.each(t,(function(t){var e=0,i=0;FD.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),FD.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t)}(l,h,i,n,o,r,0!==FD.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"))}))},nP=cI,aP=b;var oP=m,rP=iP,sP=function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;e.sort((function(t,e){return t.getLayout().value-e.getLayout().value}));var i=e[0].getLayout().value,n=e[e.length-1].getLayout().value;aP.each(e,(function(e){var a=new nP({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var o=e.getModel().get("itemStyle.normal.color");null!=o&&e.setVisual("color",o)}))}))};oP.registerLayout(rP),oP.registerVisual(sP);var lP={},hP=b,uP=Bo,cP=ms.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}});function dP(t,e,i,n){uP.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}var pP=dP.prototype;function fP(t,e,i){return hP.map(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}function gP(t){var e={};return hP.each(t,(function(t,i){e["ends"+i]=t})),e}function mP(t){this.group=new uP.Group,this.styleUpdater=t}pP._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,o=0;this.add(new uP.Polygon({shape:{points:i?fP(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=o++;var r=hP.map(n.whiskerEnds,(function(t){return i?fP(t,a,n):t}));this.add(new cP({shape:gP(r),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=o++},pP.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,a=t.getItemLayout(e),o=uP[i?"initProps":"updateProps"];o(this.childAt(this.bodyIndex),{shape:{points:a.bodyEnds}},n,e),o(this.childAt(this.whiskerIndex),{shape:gP(a.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},hP.inherits(dP,uP.Group);var vP=mP.prototype;vP.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add((function(i){if(t.hasValue(i)){var a=new dP(t,i,n,!0);t.setItemGraphicEl(i,a),e.add(a)}})).update((function(a,o){var r=i.getItemGraphicEl(o);t.hasValue(a)?(r?r.updateData(t,a):r=new dP(t,a,n),e.add(r),t.setItemGraphicEl(a,r)):e.remove(r)})).remove((function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)})).execute(),this._data=t},vP.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl((function(e){e&&t.remove(e)}))};var yP=dp,xP=wp,_P=mP,bP=b,wP={_baseAxisDim:null,getInitialData:function(t,e){var i,n,a=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=a.get("type"),s=o.get("type");"category"===r?(t.layout="horizontal",i=a.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=o.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=t.data;n&&bP.each(d,(function(t,e){t.value&&bP.isArray(t.value)?t.value.unshift(e):bP.isArray(t)&&t.unshift(e)}));var p=this.defaultValueDimensions,f=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:p.slice()}];f=xP(f,d,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:p.length+1});var g=new yP(f,this);return g.initData(d,i?i.slice():null),g},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},SP={init:function(){var t=this._whiskerBoxDraw=new _P(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};lP.seriesModelMixin=wP,lP.viewMixin=SP;var MP=b,IP=yd,AP=lP.seriesModelMixin,TP=IP.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});MP.mixin(TP,AP,!0);var CP=b,LP=zd,DP=Bo,PP=lP.viewMixin,kP=LP.extend({type:"boxplot",getStyleUpdater:function(){return EP},dispose:CP.noop});CP.mixin(kP,PP,!0);var OP=["itemStyle","normal"],zP=["itemStyle","emphasis"];function EP(t,e,i){var n=e.getItemModel(i),a=n.getModel(OP),o=e.getItemVisual(i,"color"),r=a.getItemStyle(["borderColor"]),s=t.childAt(t.whiskerIndex);s.style.set(r),s.style.stroke=o,s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(r),l.style.stroke=o,l.dirty();var h=n.getModel(zP).getItemStyle();DP.setHoverStyle(t,h)}var RP=["itemStyle","normal","borderColor"];var NP=function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var n=i[e.seriesIndex%i.length],a=e.getData();a.setVisual({legendSymbol:"roundRect",color:e.get(RP)||n}),t.isSeriesFiltered(e)||a.each((function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(RP,!0)})}))}))},VP=b,BP=po.parsePercent,GP=VP.each;var WP=m,HP=NP,FP=function(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),a=VP.indexOf(i,n);a<0&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)})),e}(t);GP(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,i,n=t.axis,a=t.seriesModels,o=a.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var h=0;GP(a,(function(t){h=Math.max(h,t.getData().count())})),e=n.getExtent(),Math.abs(e[1]-e[0])}GP(a,(function(t){var e=t.get("boxWidth");VP.isArray(e)||(e=[e,e]),l.push([BP(e[0],i)||0,BP(e[1],i)||0])}));var u=.8*i-2,c=u/o*.3,d=(u-c*(o-1))/o,p=d/2-u/2;GP(a,(function(t,e){s.push(p),p+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))}))}(t),GP(e,(function(e,i){!function(t,e,i){var n,a=t.coordinateSystem,o=t.getData(),r=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];if(VP.each(o.dimensions,(function(t){var e=o.getDimensionInfo(t).coordDim;e===u[h]?c.push(t):e===u[l]&&(n=t)})),null==n||c.length<5)return;o.each([n].concat(c),(function(){var t=arguments,i=t[0],n=t[c.length+1],u=m(t[3]),d=m(t[1]),p=m(t[5]),f=[[d,m(t[2])],[p,m(t[4])]];y(d),y(p),y(u);var g=[];function m(t){var n,o=[];return o[l]=i,o[h]=t,isNaN(i)||isNaN(t)?n=[NaN,NaN]:(n=a.dataToPoint(o))[l]+=e,n}function v(t,e){var i=t.slice(),n=t.slice();i[l]+=r,n[l]-=r,e?g.push(i,n):g.push(n,i)}function y(t){var e=[t.slice(),t.slice()];e[0][l]-=r,e[1][l]+=r,f.push(e)}v(f[0][1],0),v(f[1][1],1),o.setItemLayout(n,{chartLayout:s,initBaseline:u[h],median:u,bodyEnds:g,whiskerEnds:f})}))}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))};WP.registerVisual(HP),WP.registerLayout(FP);var ZP=b,jP=yd,UP=lP.seriesModelMixin,qP=jP.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}});ZP.mixin(qP,UP,!0);var XP=b,YP=zd,$P=Bo,KP=lP.viewMixin,JP=YP.extend({type:"candlestick",getStyleUpdater:function(){return ek},dispose:XP.noop});XP.mixin(JP,KP,!0);var QP=["itemStyle","normal"],tk=["itemStyle","emphasis"];function ek(t,e,i){var n=e.getItemModel(i),a=n.getModel(QP),o=e.getItemVisual(i,"color"),r=e.getItemVisual(i,"borderColor")||o,s=a.getItemStyle(["color","color0","borderColor","borderColor0"]),l=t.childAt(t.whiskerIndex);l.useStyle(s),l.style.stroke=r;var h=t.childAt(t.bodyIndex);h.useStyle(s),h.style.fill=o,h.style.stroke=r;var u=n.getModel(tk).getItemStyle();$P.setHoverStyle(t,u)}var ik=b;var nk=function(t){t&&ik.isArray(t.series)&&ik.each(t.series,(function(t){ik.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))},ak=["itemStyle","normal","borderColor"],ok=["itemStyle","normal","borderColor0"],rk=["itemStyle","normal","color"],sk=["itemStyle","normal","color0"];var lk=function(t,e){t.eachRawSeriesByType("candlestick",(function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each((function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?rk:sk),borderColor:e.get(n>0?ak:ok)})}))}))},hk=b,uk=po.parsePercent,ck=Bo.subPixelOptimize,dk=hk.retrieve2;var pk=m,fk=nk,gk=lk,mk=function(t){t.eachSeriesByType("candlestick",(function(t){var e,i=t.coordinateSystem,n=t.getData(),a=function(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),o=uk(dk(t.get("barMaxWidth"),a),a),r=uk(dk(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?uk(s,a):Math.max(Math.min(a/2,o),r)}(t,n),o=t.get("layout"),r="horizontal"===o?0:1,s=1-r,l=["x","y"],h=[];if(hk.each(n.dimensions,(function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[r]&&(e=t)})),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),(function(){var t,e=arguments,l=e[0],c=e[h.length+1],d=e[1],p=e[2],f=e[3],g=e[4],m=Math.min(d,p),v=Math.max(d,p),y=M(m),x=M(v),_=M(f),b=M(g),w=[[T(b),T(x)],[T(_),T(y)]],S=[];function M(t){var e=[];return e[r]=l,e[s]=t,isNaN(l)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function I(t,e){var i=t.slice(),n=t.slice();i[r]=ck(i[r]+a/2,1,!1),n[r]=ck(n[r]-a/2,1,!0),e?S.push(i,n):S.push(n,i)}function A(){var t=M(Math.min(d,p,f,g)),e=M(Math.max(d,p,f,g));return t[r]-=a/2,e[r]-=a/2,{x:t[0],y:t[1],width:s?a:e[0]-t[0],height:s?e[1]-t[1]:a}}function T(t){return t[r]=ck(t[r],1),t}I(x,0),I(y,1),t=d>p?-1:d0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(c,{chartLayout:o,sign:t,initBaseline:d>p?x[s]:y[s],bodyEnds:S,whiskerEnds:w,brushRect:A()}),++u}),!0)}}))};pk.registerPreprocessor(fk),pk.registerVisual(gk),pk.registerLayout(mk);var vk=Ep;yd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return vk(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var yk=b,xk=Hf.createSymbol,_k=Bo.Group,bk=po.parsePercent,wk=sm;function Sk(t,e){t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})}))}function Mk(t,e){_k.call(this);var i=new wk(t,e),n=new _k;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var Ik=Mk.prototype;Ik.stopEffectAnimation=function(){this.childAt(1).removeAll()},Ik.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;a<3;a++){var o=xk(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}Sk(n,t)},Ik.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a "))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),Vk=Bo,Bk=kA,Gk=b,Wk=Hf.createSymbol,Hk=j,Fk=Wo;function Zk(t,e,i){Vk.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var jk=Zk.prototype;jk.createLine=function(t,e,i){return new Bk(t,e,i)},jk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");Gk.isArray(n)||(n=[n,n]);var o=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==a&&(this.remove(r),(r=Wk(a,-.5,-.5,1,1,o)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",o),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(o),r.attr("scale",n),this._symbolType=a,this._updateEffectAnimation(t,i,e))},jk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var a=this,o=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=Gk.retrieve(e.get("delay"),(function(e){return e/t.count()*r/3})),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,o),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during((function(){a.updateSymbolPosition(n)}));s||d.done((function(){a.remove(n)})),d.start()}this._period=r,this._loop=s}},jk.getLineLength=function(t){return Hk.dist(t.__p1,t.__cp1)+Hk.dist(t.__cp1,t.__p2)},jk.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]},jk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},jk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=Fk.quadraticAt,s=Fk.quadraticDerivativeAt;o[0]=r(e[0],n[0],i[0],a),o[1]=r(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),h=s(e[1],n[1],i[1],a);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},jk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},Gk.inherits(Zk,Vk.Group);var Uk=Zk,qk=Bo,Xk=b;function Yk(t,e,i){qk.Group.call(this),this._createPolyline(t,e,i)}var $k=Yk.prototype;$k._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new qk.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},$k.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};qk.updateProps(a,o,n,e),this._updateCommonStl(t,e,i)},$k._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),o=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=a.getModel("lineStyle.normal").getLineStyle(),s=a.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(Xk.defaults({strokeNoScale:!0,fill:"none",stroke:o},r)),n.hoverStyle=s,qk.setHoverStyle(this)},$k.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},Xk.inherits(Yk,qk.Group);var Kk=Yk,Jk=Kk,Qk=b,tO=Uk,eO=j;function iO(t,e,i){tO.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var nO=iO.prototype;nO.createLine=function(t,e,i){return new Jk(t,e,i)},nO.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a=0&&!(n[r]<=e);r--);r=Math.min(r,a-2)}else{for(var r=o;re);r++);r=Math.min(r-1,a-2)}eO.lerp(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},Qk.inherits(iO,tO);var aO=iO,oO=Bo,rO=Er,sO=Vr,lO=oO.extendShape({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,a=0;a2?t.quadraticCurveTo(o[2][0],o[2][1],o[1][0],o[1][1]):t.lineTo(o[1][0],o[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,a=i.polyline,o=Math.max(this.style.lineWidth,1),r=0;r2){if(sO.containStroke(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],o,t,e))return r}else if(rO.containStroke(s[0][0],s[0][1],s[1][0],s[1][1],o,t,e))return r}return-1}});function hO(){this.group=new oO.Group,this._lineEl=new lO}var uO=hO.prototype;uO.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)})),this.group.add(e)},uO.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},uO.remove=function(){this.group.removeAll()};var cO=BA,dO=Uk,pO=kA,fO=Kk,gO=aO,mO=hO;m.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._lineDraw,o=t.get("effect.show"),r=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");o===this._hasEffet&&r===this._isPolyline&&s===this._isLarge||(a&&a.remove(),a=this._lineDraw=s?new mO:new cO(r?o?gO:fO:o?dO:pO),this._hasEffet=o,this._isPolyline=r,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),o&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(a.group),a.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});var vO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.coordinateSystem,i=t.getData();i.each((function(n){var a=i.getItemModel(n),o=a.option instanceof Array?a.option:a.get("coords"),r=[];if(t.get("polyline"))for(var s=0;s0){var I=o(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=SO.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}};var IO=Bo,AO=MO,TO=b;m.extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll();var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(a,t,i):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(a)&&this._renderOnGeo(a,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),a=t.getAxis("y"),o=n.getBandWidth(),r=a.getBandWidth();var s=this.group,l=e.getData(),h="itemStyle.normal",u="itemStyle.emphasis",c=e.getModel(h).getItemStyle(["color"]),d=e.getModel(u).getItemStyle(),p=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,m="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];l.each((function(i){var n;if("cartesian2d"===g){if(isNaN(l.get(m[2],i)))return;var a=t.dataToPoint([l.get(m[0],i),l.get(m[1],i)]);n=new IO.Rect({shape:{x:a[0]-o/2,y:a[1]-r/2,width:o,height:r},style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}else{if(isNaN(l.get(m[1],i)))return;n=new IO.Rect({z2:1,shape:t.dataToRect([l.get(m[0],i)]).contentShape,style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}var v=l.getItemModel(i);l.hasItemOption&&(c=v.getModel(h).getItemStyle(["color"]),d=v.getModel(u).getItemStyle(),p=v.getModel("label.normal"),f=v.getModel("label.emphasis"));var y=e.getRawValue(i),x="-";y&&null!=y[2]&&(x=y[2]),IO.setLabelStyle(c,d,p,f,{labelFetcher:e,labelDataIndex:i,defaultText:x,isRectText:!0}),n.setStyle(c),IO.setHoverStyle(n,l.hasItemOption?d:TO.extend({},d)),s.add(n),l.setItemGraphicEl(i,n)}))},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new AO;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-u,g=p-c,m=r.mapArray(["lng","lat","value"],(function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=u,a[1]-=c,a.push(n),a})),v=i.getExtent(),y="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],a=(e=TO.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,o=0;return function(t){for(var n=o;n=0;n--){var r;if((r=e[n].interval)[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&n0?1:o<0?-1:0}(i,o,a,n,c),function(t,e,i,n,a,o,r,s,l,h){var u=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),p=t.getItemVisual(e,"symbolSize");DO.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[c.index]=zO(p[c.index],d),p[u.index]=zO(p[u.index],n?d:Math.abs(o)),h.symbolSize=p,(h.symbolScale=[p[0]/s,p[1]/s])[u.index]*=(l.isHorizontal?-1:1)*r}(t,e,a,o,0,c.boundingLength,c.pxSign,h,n,c),function(t,e,i,n,a){var o=t.get(NO)||0;o&&(BO.attr({scale:e.slice(),rotation:i}),BO.updateTransform(),o/=BO.getLineScale(),o*=e[n.valueDim.index]);a.valueLineWidth=o}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=i.get("symbolOffset");return DO.isArray(p)&&(p=[zO(p[0],d[0]),zO(p[1],d[1])]),function(t,e,i,n,a,o,r,s,l,h,u,c){var d=u.categoryDim,p=u.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=DO.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=zO(y,e[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=EO(n),S=w?n:nz((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=h?nz((Math.abs(h)+b)/_):0),m=S*_-b,c.repeatTimes=S,c.symbolMargin=y}var M=f*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===r?M:"end"===r?l-M:l/2,o&&(I[0]+=o[0],I[1]+=o[1]);var A=c.bundlePosition=[];A[d.index]=i[d.xy],A[p.index]=i[p.xy];var T=c.barRectShape=DO.extend({},i);T[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),T[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=u.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,a,o,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function WO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function HO(t){var e=t.symbolPatternSize,i=kO(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function FO(t,e,i,n){var a=t.__pictorialBundle,o=i.symbolSize,r=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,h=i.repeatTimes||0,u=0,c=o[e.valueDim.index]+r+2*i.symbolMargin;for(tz(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u0:n<0)&&(a=h-1-t),e[l.index]=c*(a-h/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){tz(t,(function(t){t.trigger("emphasis")}))}function m(){tz(t,(function(t){t.trigger("normal")}))}}function ZO(t,e,i,n){var a=t.__pictorialBundle,o=t.__pictorialMainPath;o?ez(o,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(o=t.__pictorialMainPath=HO(i),a.add(o),ez(o,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),o.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),$O(o,i)}function jO(t,e,i){var n=DO.extend({},e.barRectShape),a=t.__pictorialBarRect;a?ez(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new PO.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function UO(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,o=DO.extend({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(a)PO.updateProps(a,{shape:o},s,l);else{o[r.wh]=0,a=new PO.Rect({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[r.wh]=i.clipShape[r.wh],PO[n?"updateProps":"initProps"](a,{shape:h},s,l)}}}function qO(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=XO,i.isAnimationEnabled=YO,i}function XO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function YO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $O(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function KO(t,e,i,n){var a=new PO.Group,o=new PO.Group;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?FO(a,e,i):ZO(a,0,i),jO(a,i,n),UO(a,e,i,n),a.__pictorialShapeStr=QO(t,i),a.__pictorialSymbolMeta=i,a}function JO(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];tz(n,(function(t){o.push(t)})),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),DO.each(o,(function(t){PO.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function QO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tz(t,e,i){DO.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function ez(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&PO[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function iz(t,e,i){var n=i.color,a=i.dataIndex,o=i.itemModel,r=o.getModel("itemStyle.normal").getItemStyle(["color"]),s=o.getModel("itemStyle.emphasis").getItemStyle(),l=o.getShallow("cursor");tz(t,(function(t){t.setColor(n),t.setStyle(DO.defaults({fill:n,opacity:i.opacity},r)),PO.setHoverStyle(t,s),l&&(t.cursor=l),t.z2=i.z2}));var h={},u=e.valueDim.posDesc[+(i.boundingLength>0)],c=t.__pictorialBarRect;RO(c.style,h,o,n,e.seriesModel,a,u),PO.setHoverStyle(c,h)}function nz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}LO.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),o=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:VO[+s],categoryDim:VO[1-s]};return a.diff(o).add((function(t){if(a.hasValue(t)){var e=qO(a,t),i=GO(a,t,e,h),o=KO(a,h,i);a.setItemGraphicEl(t,o),n.add(o),iz(o,h,i)}})).update((function(t,e){var i=o.getItemGraphicEl(e);if(a.hasValue(t)){var r=qO(a,t),s=GO(a,t,r,h),l=QO(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;PO.updateProps(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?FO(t,e,i,!0):ZO(t,e,i,!0);jO(t,i,!0),UO(t,e,i,!0)}(i,h,s):i=KO(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),iz(i,h,s)}else n.remove(i)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&JO(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=a,this.group},dispose:DO.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){JO(n,e.dataIndex,t,e)})):i.removeAll()}});var az=m,oz=b,rz=rx,sz=Ym;az.registerLayout(oz.curry(rz,"pictorialBar")),az.registerVisual(oz.curry(sz,"pictorialBar","roundRect",null));var lz=b,hz=gg,uz=function(t,e,i,n,a){hz.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null,this._labelInterval=null};uz.prototype={constructor:uz,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},lz.inherits(uz,hz);var cz=uz,dz=Rp,pz=wu.getLayoutRect;function fz(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}fz.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:fz,_init:function(t,e,i){var n=this.dimension,a=new cz(n,dz.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),o="category"===a.type;a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),dz.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=pz({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],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?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();return"horizontal"===i.orient?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=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}};var gz=fz;_c.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,a){var o=new gz(n,t,e);o.name="single_"+a,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},dimensions:gz.prototype.dimensions});var mz={},vz=b;mz.layout=function(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},o=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===r?h.vertical[o]:l[0],"horizontal"===r?h.horizontal[o]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[r],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),vz.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-u:u,a.labelInterval=n.getLabelInterval(),a.z2=1,a};var yz=b,xz=yy,_z=Bo,bz=mz,wz=Oy,Sz=xz.getInterval,Mz=xz.ifIgnoreOnTick,Iz=["axisLine","axisTickLabel","axisName"],Az=wz.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=bz.layout(t),r=new xz(t,o);yz.each(Iz,r.add,r),a.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t,o.labelInterval),Az.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),o=a.get("width"),r=a.get("color"),s=Sz(n,e);r=r instanceof Array?r:[r];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),p=[],f=[],g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v=0&&s<0)&&(r=f,s=p,a=h,o.length=0),Vz(u,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:a}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==a.seriesIndex&&zz.extend(a,s[0]),!n&&t.snap&&o.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,a),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function Hz(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Fz(t,e,i,n){var a=i.payloadBatch,o=e.axis,r=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,h=Rz.makeKey(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Zz(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 jz(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var Uz=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],o=t,r=t.dispatchAction||zz.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){jz(a)&&(a=Nz({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=jz(a),h=o.axesInfo,u=s.axesInfo,c="leave"===n||jz(a),d={},p={},f={list:[],map:{}},g={showPointer:Bz(Hz,p),showTooltip:Bz(Fz,f)};Vz(s.coordSysMap,(function(t,e){var i=l||t.containPoint(a);Vz(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,o=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(h,t);if(!c&&i&&(!h||o)){var r=o&&o.value;null!=r||l||(r=n.pointToData(a)),null!=r&&Wz(t,r,g,!1,d)}}))}));var m={};return Vz(u,(function(t,e){var i=t.linkGroup;i&&!p[e]&&Vz(i.axesInfo,(function(e,n){var a=p[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Zz(e),Zz(t)))),m[t.key]=o}}))})),Vz(m,(function(t,e){Wz(u[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];Vz(e,(function(e,i){var a=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})}))}(p,u,d),function(t,e,i,n){if(jz(e)||!t.list.length)return void n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}(f,a,t,r),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=Gz(n)[a]||{},r=Gz(n)[a]={};Vz(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Vz(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t}))}));var s=[],l=[];zz.each(o,(function(t,e){!r[e]&&l.push(t)})),zz.each(r,(function(t,e){!o[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(u,0,i),d}};m.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var qz={},Xz=b,Yz=_,$z=uo.makeGetter(),Kz=Xz.each;function Jz(t,e,i){t.handler("leave",null,i)}function Qz(t,e,i,n){e.handler(t,i,n)}qz.register=function(t,e,i){if(!Yz.node){var n=e.getZr();$z(n).records||($z(n).records={}),function(t,e){if($z(t).initialized)return;function i(i,n){t.on(i,(function(i){var a=function(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);Kz($z(t).records,(function(t){t&&n(t,i,a.dispatchAction)})),function(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(a.pendings,e)}))}$z(t).initialized=!0,i("click",Xz.curry(Qz,"click")),i("mousemove",Xz.curry(Qz,"mousemove")),i("globalout",Jz)}(n,e),($z(n).records[t]||($z(n).records[t]={})).handler=i}},qz.unregister=function(t,e){if(!Yz.node){var i=e.getZr();($z(i).records||{})[t]&&($z(i).records[t]=null)}};var tE=qz,eE=m.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";tE.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){tE.unregister(e.getZr(),"axisPointer"),eE.superApply(this._model,"remove",arguments)},dispose:function(t,e){tE.unregister("axisPointer",e),eE.superApply(this._model,"dispose",arguments)}}),iE=b,nE=To,aE=Bo,oE=xy,rE=fa,sE=Ed,lE=uo.makeGetter(),hE=iE.clone,uE=iE.bind;function cE(){}function dE(t,e,i,n){pE(lE(i).lastProp,n)||(lE(i).lastProp=n,e?aE.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function pE(t,e){if(iE.isObject(t)&&iE.isObject(e)){var i=!0;return iE.each(e,(function(e,n){i=i&&pE(t[n],e)})),!!i}return t===e}function fE(t,e){t[e.get("label.show")?"show":"hide"]()}function gE(t){return{position:t.position.slice(),rotation:t.rotation||0}}function mE(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)}))}cE.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==o){this._lastValue=a,this._lastStatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=iE.curry(dE,e,u);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new aE.Group,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);mE(r,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(a&&n.getBandWidth()>r)return!0;if(o){var s=oE.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var o=lE(t).pointerEl=new aE[a.type](hE(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var a=lE(t).labelEl=new aE.Rect(hE(e.label));t.add(a),fE(a,n)}},updatePointerEl:function(t,e,i){var n=lE(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=lE(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),fE(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,o=i.getModel("handle"),r=i.get("status");if(!o.get("show")||!r||"hide"===r)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=aE.createIcon(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){rE.stop(t.event)},onmousedown:uE(this._onHandleDragMove,this,0,0),drift:uE(this._onHandleDragMove,this),ondragend:uE(this._onHandleDragEnd,this)}),n.add(a)),mE(a,i,!1);a.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");iE.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),sE.createOrUpdate(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){dE(this._axisPointerModel,!e&&this._moveAnimation,this._handle,gE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(gE(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(gE(n)),lE(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},cE.prototype.constructor=cE,nE.enableClassExtend(cE);var vE=cE,yE={},xE=b,_E=Bo,bE=Ni,wE=co,SE=mt,ME=Rp,IE=yy;function AE(t,e,i,n,a){var o=TE(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=wE.normalizeCssArray(r.get("padding")||0),l=r.getFont(),h=bE.getBoundingRect(o,l),u=a.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],p=a.align;"right"===p&&(u[0]-=c),"center"===p&&(u[0]-=c/2);var f=a.verticalAlign;"bottom"===f&&(u[1]-=d),"middle"===f&&(u[1]-=d/2),function(t,e,i,n){var a=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:u.slice(),style:{text:o,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function TE(t,e,i,n,a){var o=e.scale.getLabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:ME.getAxisRawValue(e,t),seriesData:[]};xE.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)})),xE.isString(r)?o=r.replace("{value}",o):xE.isFunction(r)&&(o=r(s))}return o}function CE(t,e,i){var n=SE.create();return SE.rotate(n,n,i.rotation),SE.translate(n,n,i.position),_E.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}yE.buildElStyle=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e},yE.buildLabelElOption=AE,yE.getValueLabel=TE,yE.getTransformedPosition=CE,yE.buildCartesianSingleLabelElOption=function(t,e,i,n,a,o){var r=IE.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),AE(e,n,a,o,{position:CE(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})},yE.makeLineShape=function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},yE.makeRectShape=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},yE.makeSectorShape=function(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}};var LE=Bo,DE=yE,PE=zy,kE=Oy,OE=vE.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=zE(r,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=DE.buildElStyle(n),c=EE[s](o,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=PE.layout(r.model,i);DE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=PE.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:DE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.grid,r=a.getGlobalExtent(!0),s=zE(o,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(r[1],h[l]),h[l]=Math.max(r[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function zE(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var EE={line:function(t,e,i,n){var a=DE.makeLineShape([e,i[0]],[e,i[1]],RE(t));return LE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:DE.makeRectShape([e-a/2,i[0]],[a,o],RE(t))}}};function RE(t){return"x"===t.dim?0:1}kE.registerAxisPointerClass("CartesianAxisPointer",OE);var NE=m,VE=b,BE=xy,GE=Uz;NE.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!VE.isArray(e)&&(t.axisPointer.link=[e])}})),NE.registerProcessor(NE.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=BE.collect(t,e)})),NE.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GE);var WE=Bo,HE=yE,FE=mz,ZE=Oy,jE=["x","y"],UE=["width","height"],qE=vE.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=$E(r,1-YE(o)),l=r.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=HE.buildElStyle(n),c=XE[h](o,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=FE.layout(i);HE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=FE.layout(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:HE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.coordinateSystem,r=YE(a),s=$E(o,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var h=$E(o,1-r),u=(h[1]+h[0])/2,c=[u,u];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),XE={line:function(t,e,i,n){var a=HE.makeLineShape([e,i[0]],[e,i[1]],YE(t));return WE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:HE.makeRectShape([e-a/2,i[0]],[a,o],YE(t))}}};function YE(t){return t.isHorizontal()?0:1}function $E(t,e){var i=t.getRect();return[i[jE[e]],i[jE[e]]+i[UE[e]]]}ZE.registerAxisPointerClass("SingleAxisPointer",qE),m.extendComponentView({type:"single"});var KE=wp,JE=yd,QE=dp,tR=b,eR=co.encodeHTML,iR=GD,nR=JE.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){nR.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=iR().key((function(t){return t[2]})).entries(t),n=tR.map(i,(function(t){return{name:t.key,dataList:t.values}})),a=n.length,o=-1,r=-1,s=0;so&&(o=l,r=s)}for(var h=0;ho&&(o=h),n.push(h)}for(var u=0;uo&&(o=d)}return r.y0=a,r.max=o,r}(r),l=s.y0,h=i/s.max,u=o.length,c=o[0].indices.length,d=0;dn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:DR.bind((function(n){var a=e.dataToRadius(n[0]),o=i.dataToAngle(n[1]),r=t.coordToPoint([a,o]);return r.push(a,o*Math.PI/180),r})),size:DR.bind(PR,t)}}},OR=b;var zR=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:OR.bind(t.dataToPoint,t)}}},ER=m,RR=b,NR=Bo,VR=Ug.findLabelValueDim,BR=Ep,GR=rx,WR=$d,HR=["itemStyle","normal"],FR=["itemStyle","emphasis"],ZR=["label","normal"],jR=["label","emphasis"],UR={cartesian2d:SR,geo:AR,singleAxis:LR,polar:kR,calendar:zR};function qR(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function XR(t){var e={};return RR.each(t.dimensions,(function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var o=a.coordDim;(e[o]=e[o]||[])[a.coordDimIndex]=n}})),e}function YR(t,e,i,n,a,o){(t=$R(t,e,i,n,a,o))&&o.setItemGraphicEl(e,t)}function $R(t,e,i,n,a,o){var r=i.type;if(!t||r===t.__customGraphicType||"path"===r&&i.pathData===t.__customPathData||"image"===r&&i.style.image===t.__customImagePath||"text"===r&&i.style.text===t.__customText||(a.remove(t),t=null),null!=r){var s,l=!t;if(!t&&(t=function(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=NR.makePath(n.pathData,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__customPathData=t.pathData}else"image"===i?(e=new NR.Image({})).__customImagePath=t.style.image:"text"===i?(e=new NR.Text({})).__customText=t.style.text:e=new(0,NR[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}(i)),function(t,e,i,n,a,o){var r={},s=i.style||{};if(i.shape&&(r.shape=RR.clone(i.shape)),i.position&&(r.position=i.position.slice()),i.scale&&(r.scale=i.scale.slice()),i.origin&&(r.origin=i.origin.slice()),i.rotation&&(r.rotation=i.rotation),"image"===t.type&&i.style){var l=r.style={};RR.each(["x","y","width","height"],(function(e){qR(e,l,s,t.style,o)}))}"text"===t.type&&i.style&&(l=r.style={},RR.each(["x","y"],(function(e){qR(e,l,s,t.style,o)})),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke));if("group"!==t.type&&(t.useStyle(s),o)){t.style.opacity=0;var h=s.opacity;null==h&&(h=1),NR.initProps(t,{style:{opacity:h}},n,e)}o?t.attr(r):NR.updateProps(t,r,n,e),t.attr({z2:i.z2||0,silent:i.silent}),!1!==i.styleEmphasis&&NR.setHoverStyle(t,i.styleEmphasis)}(t,e,i,n,0,l),"group"===r){var h=t.children()||[],u=i.children||[];if(i.diffChildrenByName)new WR((s={oldChildren:h,newChildren:u,dataIndex:e,animatableModel:n,group:t,data:o}).oldChildren,s.newChildren,KR,KR,s).add(JR).update(JR).remove(QR).execute();else{for(var c=0;c=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){eN.each(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}});function rN(t,e,i,n){var a=i.type,o=new(0,nN[a.charAt(0).toUpperCase()+a.slice(1)])(i);e.add(o),n.set(t,o),o.__ecGraphicId=t}function sN(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){sN(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function lN(t,e){var i;return eN.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}tN.extendComponentView({type:"graphic",init:function(t,e){this._elMap=eN.createHashMap(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group;eN.each(i,(function(t){var e=t.$action,i=t.id,o=n.get(i),r=t.parentId,s=null!=r?n.get(r):a;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=function(t){return t=eN.extend({},t),eN.each(["id","parentId","$action","hv","bounding"].concat(aN.LOCATION_PARAMS),(function(e){delete t[e]})),t}(t);e&&"merge"!==e?"replace"===e?(sN(o,n),rN(i,s,h,n)):"remove"===e&&sN(o,n):o?o.attr(h):rN(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,o=i.length-1;o>=0;o--){var r=i[o],s=a.get(r.id);if(s){var l=s.parent,h=l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};aN.positionElement(s,r,h,null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){sN(e,t)})),this._elMap=eN.createHashMap()},dispose:function(){this._clear()}});var hN=b,uN=ou,cN=m.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){cN.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}}),dN=cN,pN=m,fN=b;function gN(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();fN.each(r,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),{name:e.name,selected:a}}pN.registerAction("legendToggleSelect","legendselectchanged",fN.curry(gN,"toggleSelected")),pN.registerAction("legendSelect","legendselected",fN.curry(gN,"select")),pN.registerAction("legendUnSelect","legendunselected",fN.curry(gN,"unSelect"));var mN={},vN=wu,yN=vN.getLayoutRect,xN=vN.box,_N=vN.positionElement,bN=co,wN=Bo;mN.layout=function(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=yN(n,o,a);xN(e.get("orient"),t,e.get("itemGap"),r.width,r.height),_N(t,n,o,a)},mN.makeBackground=function(t,e){var i=bN.normalizeCssArray(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new wN.Rect({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})};var SN=m,MN=b,IN=Hf.createSymbol,AN=Bo,TN=mN.makeBackground,CN=wu,LN=MN.curry,DN=MN.each,PN=AN.Group;function kN(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ON(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function zN(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var EN=SN.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new PN),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var a=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},r=t.get("padding"),s=CN.getLayoutRect(a,o,r),l=this.layoutInner(t,n,s),h=CN.getLayoutRect(MN.defaults({width:l.width,height:l.height},a),o,r);this.group.attr("position",[h.x-l.x,h.y-l.y]),this.group.add(this._backgroundEl=TN(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var a=this.getContentGroup(),o=MN.createHashMap(),r=e.get("selectedMode");DN(e.getData(),(function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var p=c.getVisual("legendSymbol")||"roundRect",f=c.getVisual("symbol");this._createItem(h,l,s,e,p,f,t,d,r).on("click",LN(kN,h,n)).on("mouseover",LN(ON,u,null,n)).on("mouseout",LN(zN,u,null,n)),o.set(h,!0)}else i.eachRawSeries((function(i){if(!o.get(h)&&i.legendDataProvider){var a=i.legendDataProvider(),u=a.indexOfName(h);if(u<0)return;var c=a.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,r).on("click",LN(kN,h,n)).on("mouseover",LN(ON,i,h,n)).on("mouseout",LN(zN,i,h,n)),o.set(h,!0)}}),this)}else a.add(new PN({newline:!0}))}),this)},_createItem:function(t,e,i,n,a,o,r,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.isSelected(t),p=new PN,f=i.getModel("textStyle"),g=i.get("icon"),m=i.getModel("tooltip"),v=m.parentModel;if(a=g||a,p.add(IN(a,0,0,h,u,d?s:c,!0)),!g&&o&&(o!==a||"none"==o)){var y=.8*u;"none"===o&&(o="circle"),p.add(IN(o,(h-y)/2,(u-y)/2,y,y,d?s:c))}var x="left"===r?h+5:-5,_=r,b=n.get("formatter"),w=t;"string"==typeof b&&b?w=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(w=b(t)),p.add(new AN.Text({style:AN.setTextStyle({},f,{text:w,x:x,y:u/2,textFill:d?f.getTextColor():c,textAlign:_,textVerticalAlign:"middle"})}));var S=new AN.Rect({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?MN.extend({content:t,formatter:v.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(S),p.eachChild((function(t){t.silent=!0})),S.silent=!l,this.getContentGroup().add(p),AN.setHoverStyle(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();CN.box(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var a=n.getBoundingRect();return n.attr("position",[-a.x,-a.y]),this.group.getBoundingRect()}});var RN=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;ii[s],p=[-u.x,-u.y];p[r]=n.position[r];var f=[0,0],g=[-c.x,-c.y],m=ZN.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=i[s]-c[s]:f[r]+=c[s]+m);g[1-r]+=u[l]/2-c[l]/2,n.attr("position",p),a.attr("position",f),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-r]),a.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],a.setClipPath(new jN.Rect({shape:y})),a.__rectSize=y[s]}else o.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&jN.updateProps(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;ZN.each(["pagePrev","pageNext"],(function(n){var a=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=a?"pointer":"default")}));var n=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,r=null!=o?o+1:0,s=e.pageCount;n&&a&&n.setStyle("text",ZN.isString(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getPageInfo:function(t){var e,i,n,a,o=t.get("scrollDataIndex",!0),r=this.getContentGroup(),s=r.getBoundingRect(),l=this._containerGroup.__rectSize,h=t.getOrient().index,u=YN[h],c=YN[1-h],d=$N[h],p=r.position.slice();this._showController?r.eachChild((function(t){t.__legendDataIndex===o&&(a=t)})):a=r.childAt(0);var f=l?Math.ceil(s[u]/l):0;if(a){var g=a.getBoundingRect(),m=a.position[h]+g[d];p[h]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[u]),e=s[u]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[u]=l,y[c]=s[c],y[d]=-p[h]-s[d];var x=r.children();if(r.eachChild((function(t,e){var i=b(t);i.intersect(y)&&(null==v&&(v=e),n=t.__legendDataIndex),e===x.length-1&&i[d]+i[u]<=y[d]+y[u]&&(n=null)})),null!=v){var _=b(x[v]);if(y[d]=_[d]+_[u]-y[u],v<=0&&_[d]>=y[d])i=null;else{for(;v>0&&b(x[v-1]).intersect(y);)v--;i=x[v].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:f,pagePrevDataIndex:i,pageNextDataIndex:n};function b(t){var e=t.getBoundingRect().clone();return e[d]+=t.position[h],e}}});m.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))})),m.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",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 JN=b,QN=Pt,tV=fa,eV=_,iV=co,nV=JN.each,aV=iV.toCamelCase,oV=["","-webkit-","-moz-","-o-"];function rV(t){var e,i,n,a=[],o=t.get("transitionDuration"),r=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return o&&a.push((n="left "+(e=o)+"s "+(i="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+i,JN.map(oV,(function(t){return t+"transition:"+n})).join(";"))),r&&(eV.canvasSupported?a.push("background-Color:"+r):(a.push("background-Color:#"+QN.toHex(r)),a.push("filter:alpha(opacity=70)"))),nV(["width","color","radius"],(function(e){var i="border-"+e,n=aV(i),o=t.get(n);null!=o&&a.push(i+":"+o+("color"===e?"":"px"))})),a.push(function(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"),nV(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&a.push("padding:"+iV.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function sV(t,e){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 a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;tV.normalizeEvent(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}sV.prototype={constructor:sV,_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="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+rV(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"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 a=this.el.style;a.left=t+"px",a.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(JN.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var lV=m,hV=b,uV=_,cV=sV,dV=co,pV=po,fV=Bo,gV=Oz,mV=wu,vV=ou,yV=qz,xV=Rp,_V=yE,bV=hV.bind,wV=hV.each,SV=pV.parsePercent,MV=new fV.Rect({shape:{x:-1,y:-1,width:2,height:2}});function IV(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof vV&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vV(i,e,e.ecModel))}return e}function AV(t,e){return t.dispatchAction||hV.bind(e.dispatchAction,e)}function TV(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function CV(t){return"center"===t||"middle"===t}lV.extendComponentView({type:"tooltip",init:function(t,e){if(!uV.node){var i=new cV(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!uV.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.get("triggerOn");yV.register("itemTooltip",this._api,bV((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&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(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!uV.node){var a=AV(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=MV;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},a)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=gV(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},a)}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:{}},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;this._alwaysShowContent||a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(AV(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,o=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=o&&null!=r){var s=e.getSeriesByIndex(a);if(s)if("axis"===(t=IV([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=hV.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],r=[],s=IV([e.tooltipOption,n]);wV(t,(function(t){wV(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var s=_V.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);hV.each(t.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xV.getAxisRawValue(e.axis,n),u.axisValueLabel=s,u&&(r.push(u),a.push(l.formatTooltip(h,!0)))}));var l=s;o.push((l?dV.encodeHTML(l)+"
":"")+a.join("
"))}}))}),this),o.reverse(),o=o.join("

");var l=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,a[0],a[1],this._tooltipContent,r):this._showTooltipContent(s,o,r,Math.random(),a[0],a[1],l)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),r=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=r.getData(),u=IV([h.getItemModel(s),r,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getDataParams(s,l),p=r.formatTooltip(s,!1,l),f="item_"+r.name+"_"+s;this._showOrMove(u,(function(){this._showTooltipContent(u,p,d,f,t.offsetX,t.offsetY,t.position,t.target)})),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var a=new vV(n,this._tooltipModel,this._ecModel),o=a.get("content"),r=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,o,r,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=dV.formatTpl(h,i,!0);else if("function"==typeof h){var c=bV((function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,r,a,o,l,i,s))}),this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,r,a,o,l,i,s)}},_updatePosition:function(t,e,i,n,a,o,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewSize:[s,l],contentSize:h.slice()})),hV.isArray(e))i=SV(e[0],s),n=SV(e[1],l);else if(hV.isObject(e)){e.width=h[0],e.height=h[1];var p=mV.getLayoutRect(e,{width:s,height:l});i=p.x,n=p.y,u=null,c=null}else if("string"==typeof e&&r){var f=function(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,h=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+h/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+h+o;break;case"left":r=e.x-n-o,s=e.y+h/2-a/2;break;case"right":r=e.x+l+o,s=e.y+h/2-a/2}return[r,s]}(e,d,h);i=f[0],n=f[1]}else{f=function(t,e,i,n,a,o,r){var s=TV(i),l=s.width,h=s.height;null!=o&&(t+l+o>n?t-=l+o:t+=o);null!=r&&(e+h+r>a?e-=h+r:e+=r);return[t,e]}(i,n,a.el,s,l,u?null:20,c?null:20);i=f[0],n=f[1]}if(u&&(i-=CV(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=CV(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){f=function(t,e,i,n,a){var o=TV(i),r=o.width,s=o.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a.el,s,l);i=f[0],n=f[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&wV(e,(function(e,n){var a=e.dataByAxis||{},o=(t[n]||{}).dataByAxis||[];(i&=a.length===o.length)&&wV(a,(function(t,e){var n=o[e]||{},a=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===r.length)&&wV(a,(function(t,e){var n=r[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){uV.node||(this._tooltipContent.hide(),yV.unregister("itemTooltip",e))}});var LV=m;LV.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),LV.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var DV=b,PV=po.parsePercent;function kV(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function OV(t){return t.dim}var zV=function(t,e,i){var n=i.getWidth(),a=i.getHeight(),o={},r={},s=function(t,e){var i={};DV.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem.getBaseAxis(),o=a.getExtent(),r="category"===a.type?a.getBandWidth():Math.abs(o[1]-o[0])/n.count(),s=i[OV(a)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[OV(a)]=s;var h=kV(t);l[h]||s.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var u=PV(t.get("barWidth"),r),c=PV(t.get("barMaxWidth"),r),d=t.get("barGap"),p=t.get("barCategoryGap");u&&!l[h].width&&(u=Math.min(s.remainedWidth,u),l[h].width=u,s.remainedWidth-=u),c&&(l[h].maxWidth=c),null!=d&&(s.gap=d),null!=p&&(s.categoryGap=p)}));var n={};return DV.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,o=PV(t.categoryGap,a),r=PV(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*r);h=Math.max(h,0),DV.each(i,(function(t,e){var i=t.maxWidth;i&&i=0?"p":"n",S=i.pointToCoord(M[n]),I=r[u][n][g];if("radius"===f.dim)a=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+p*Math.PI/180,Math.abs(s)0?C=T[1]:C===T[1]&&t<0&&(C=T[0]),r[u][n][g]=C}e.setItemLayout(n,{cx:m,cy:v,r0:a,r:s,startAngle:h,endAngle:c})}}),!0)}}),this)},EV=b,RV=gg;function NV(t,e){RV.call(this,"radius",t,e),this.type="category"}NV.prototype={constructor:NV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:RV.prototype.dataToCoord,radiusToData:RV.prototype.coordToData},EV.inherits(NV,RV);var VV=NV,BV=b,GV=gg;function WV(t,e){e=e||[0,360],GV.call(this,"angle",t,e),this.type="category"}WV.prototype={constructor:WV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:GV.prototype.dataToCoord,angleToData:GV.prototype.coordToData},BV.inherits(WV,GV);var HV=VV,FV=WV,ZV=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new HV,this._angleAxis=new FV,this._radiusAxis.polar=this._angleAxis.polar=this};ZV.prototype={type:"polar",axisPointerEnabled:!0,constructor:ZV,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(),a=n.getExtent(),o=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=lr;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var jV=ZV,UV=b,qV=wv,XV=Wf,YV=Zu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});UV.merge(YV.prototype,XV);var $V={splitNumber:5};function KV(t,e){return e.type||(e.data?"category":"value")}qV("angle",YV,KV,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),qV("radius",YV,KV,$V),m.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var JV=jV,QV=po.parsePercent,tB=Rp,eB=tB.createScaleByModel,iB=tB.niceScaleExtent,nB=_c;function aB(t,e){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();a.scale.unionExtentFromData(e,"radius"),n.scale.unionExtentFromData(e,"angle")}})),iB(n.scale,n.model),iB(a.scale,a.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),r=360/n.scale.count();n.inverse?o[1]+=r:o[1]-=r,n.setExtent(o[0],o[1])}}function oB(t,e){if(t.type=e.get("type"),t.scale=eB(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}var rB={dimensions:JV.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var a=new JV(n);a.update=aB;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");oB(o,s),oB(r,l),function(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=QV(n[0],a),t.cy=QV(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=QV(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}(a,t,e),i.push(a),t.coordinateSystem=a,a.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}};nB.register("polar",rB);var sB=b,lB=Bo,hB=ou,uB=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function cB(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function dB(t){return t.getRadiusAxis().inverse?0:1}Oy.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords();"category"!==i.type&&o.pop(),sB.each(uB,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,o,a)}),this)}},_axisLine:function(t,e,i,n){var a=t.getModel("axisLine.lineStyle"),o=new lB.Circle({shape:{cx:e.cx,cy:e.cy,r:n[dB(e)]},style:a.getLineStyle(),z2:1,silent:!0});o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n){var a=t.getModel("axisTick"),o=(a.get("inside")?-1:1)*a.get("length"),r=n[dB(e)],s=sB.map(i,(function(t){return new lB.Line({shape:cB(e,[r,r+o],t)})}));this.group.add(lB.mergePath(s,{style:sB.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var a=t.axis,o=t.get("data"),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=a.getLabelsCoords(),u=0;up?"left":"right",m=Math.abs(d[1]-f)/c<.3?"middle":d[1]>f?"top":"bottom";o&&o[u]&&o[u].textStyle&&(r=new hB(o[u].textStyle,r,r.ecModel));var v=new lB.Text({silent:!0});this.group.add(v),lB.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:g,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var a=t.getModel("splitLine").getModel("lineStyle"),o=a.get("color"),r=0;o=o instanceof Array?o:[o];for(var s=[],l=0;lm?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,s,n.get("label.margin"));_B.buildLabelElOption(t,i,n,a,d)}});var IB={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:_B.makeLineShape(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var o=t.getBandWidth(),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}};SB.registerAxisPointerClass("PolarAxisPointer",MB);var AB=m,TB=b,CB=zV;AB.registerLayout(TB.curry(CB,"bar")),AB.extendComponentView({type:"polar"});var LB=b,DB=uo,PB=Zu,kB=ou,OB=Dx,zB=Ub,EB=PB.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){PB.prototype.init.apply(this,arguments),DB.defaultEmphasis(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=zB.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=LB.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new kB(i,e)),t}),LB.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new kB(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});LB.mixin(EB,OB);var RB=Dw;m.extendComponentView({type:"geo",init:function(t,e){var i=new RB(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 a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});var NB=m,VB=b;function BB(t,e){e.update="updateView",NB.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;VB.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}BB("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),BB("select",{type:"geoSelect",event:"geoselected"}),BB("unSelect",{type:"geoUnSelect",event:"geounselected"});var GB=b,WB=["rect","polygon","keep","clear"];var HB=function(t,e){var i=t&&t.brush;if(GB.isArray(i)||(i=i?[i]:[]),i.length){var n=[];GB.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var a=t&&t.toolbox;GB.isArray(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o,r,s=a.feature||(a.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,n),o=h,r={},GB.each(o,(function(t){r[t]=1})),o.length=0,GB.each(r,(function(t,e){o.push(e)})),e&&!h.length&&h.push.apply(h,WB)}},FB={},ZB=b,jB=cI,UB=ZB.each;function qB(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}FB.createVisualMappings=function(t,e,i){var n={};return UB(e,(function(e){var a,o=n[e]=((a=function(){}).prototype.__hidden=a.prototype,new a);UB(t[e],(function(t,n){if(jB.isValidType(n)){var a={type:n,visual:t};i&&i(a,e),o[n]=new jB(a),"opacity"===n&&((a=ZB.clone(a)).type="colorAlpha",o.__hidden.__alphaForOpacity=new jB(a))}}))})),n},FB.replaceVisualOption=function(t,e,i){var n;ZB.each(i,(function(t){e.hasOwnProperty(t)&&qB(e[t])&&(n=!0)})),n&&ZB.each(i,(function(i){e.hasOwnProperty(i)&&qB(e[i])?t[i]=ZB.clone(e[i]):delete t[i]}))},FB.applyVisual=function(t,e,i,n,a,o){var r,s={};function l(t){return i.getItemVisual(r,t)}function h(t,e){i.setItemVisual(r,t,e)}function u(t,u){r=null==o?t:u;var c=i.getRawDataItem(r);if(!c||!1!==c.visualMap)for(var d=n.call(a,t),p=e[d],f=s[d],g=0,m=f.length;g=-1e-6)return!1;var u=eG(a-t,a-r,o-e,o-s)/h;if(u<0||u>1)return!1;var c=eG(i-t,a-t,n-e,o-e)/h;return!(c<0||c>1)}function eG(t,e,i,n){return t*n-e*i}var iG=$B,nG=b,aG=Bo,oG=uo,rG=oD,sG=nG.each,lG=nG.indexOf,hG=nG.curry,uG=["dataToPoint","pointToData"],cG=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function dG(t,e,i){var n=this._targetInfoList=[],a={},o=gG(e,t);sG(mG,(function(t,e){(!i||!i.include||lG(i.include,e)>=0)&&t(o,n,a)}))}var pG=dG.prototype;function fG(t){return t[0]>t[1]&&t.reverse(),t}function gG(t,e){return oG.parseFinder(t,e,{includeMainTypes:cG})}pG.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=xG[t.brushType](0,i,e);t.__rangeOffset={offset:bG[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},pG.matchOutputRanges=function(t,e,i){sG(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&nG.each(n.coordSyses,(function(n){var a=xG[t.brushType](1,n,t.range);i(t,a.values,n,e)}))}),this)},pG.setInputRanges=function(t,e){sG(t,(function(t){var i,n,a,o,r,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=xG[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?bG[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,a=SG(i),o=SG(n),r=[a[0]/o[0],a[1]/o[1]],isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r)):l.values}}),this)},pG.makePanelOpts=function(t,e){return nG.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:rG.makeRectPanelClipPath(n),isTargetByCursor:rG.makeRectIsTargetByCursor(n,t,i.coordSysModel),getLinearBrushOtherExtent:rG.makeLinearBrushOtherExtent(n)}}))},pG.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&lG(n.coordSyses,e.coordinateSystem)>=0},pG.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=gG(e,t),a=0;a=0||lG(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:yG.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){sG(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:yG.geo})}))}},vG=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],yG={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(aG.getTransform(t)),e}},xG={lineX:hG(_G,0),lineY:hG(_G,1),rect:function(t,e,i){var n=e[uG[t]]([i[0][0],i[1][0]]),a=e[uG[t]]([i[0][1],i[1][1]]),o=[fG([n[0],a[0]]),fG([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:nG.map(i,(function(i){var a=e[uG[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a})),xyMinMax:n}}};function _G(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=fG(nG.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))}))),r=[];return r[t]=o,r[1-t]=[NaN,NaN],{values:o,xyMinMax:r}}var bG={lineX:hG(wG,0),lineY:hG(wG,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 nG.map(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function wG(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function SG(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var MG=dG,IG=m,AG=b,TG=Je,CG=FB,LG=iG,DG=Ed,PG=MG,kG=["inBrush","outOfBrush"],OG="__ecInBrushSelectEvent",zG=IG.PRIORITY.VISUAL.BRUSH;function EG(t,e){if(!t.isDisposed()){var i=t.getZr();i[OG]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[OG]=!1}}function RG(t,e,i,n){for(var a=0,o=e.length;ae[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&BG(e)}};function BG(t){return new TG(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var GG=b,WG=FB,HG=ou,FG=["#ddd"];function ZG(t,e){return GG.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new HG(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}m.extendComponentModel({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&&WG.replaceVisualOption(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:FG}},setAreas:function(t){t&&(this.areas=GG.map(t,(function(t){return ZG(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=ZG(this.option,t),this.brushType=this.brushOption.brushType}});var jG=b,UG=aD;function qG(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}m.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new UG(e.getZr())).on("brush",jG.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,qG.apply(this,arguments)},updateView:qG,updateLayout:qG,updateVisual:qG,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:jG.clone(t),$from:i})}});var XG=m;XG.registerAction({type:"brush",event:"brush",update:"updateView"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),XG.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){}));var YG={},$G={};YG.register=function(t,e){$G[t]=e},YG.get=function(t){return $G[t]};var KG={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:["右键另存为图片"]}}},JG=b,QG=YG,tW=KG.toolbox.brush;function eW(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}eW.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:JG.clone(tW.title)};var iW=eW.prototype;iW.render=iW.updateView=iW.updateLayout=function(t,e,i){var n,a,o;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,a=t.brushOption.brushMode||"single",o|=t.areas.length})),this._brushType=n,this._brushMode=a,JG.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?o:e===n)?"emphasis":"normal")}))},iW.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return JG.each(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},iW.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},QG.register("brush",eW),m.registerPreprocessor(HB);var nW=b,aW=wu,oW=po,rW=_c;function sW(t,e,i){this._model=t}function lW(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}sW.prototype={constructor:sW,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=oW.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var a=t.getDay();return{y:e,m:i,d:n,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.get("cellSize").slice(),o=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];nW.each([0,1],(function(t){h(a,t)&&(o[n[t]]=a[t]*r[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=aW.getLayoutRect(o,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}nW.each([0,1],(function(t){h(a,t)||(a[t]=l[n[t]]/r[t])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){nW.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var o=i.day,r=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+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:nW.curry(lW,"dataToPoint"),convertFromPixel:nW.curry(lW,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(nW.isArray(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 a=this.getNextNDay(n,-1);t=[i.formatedDate,a.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){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==o)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(a+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay: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&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},sW.dimensions=sW.prototype.dimensions,sW.getDimensionsInfo=sW.prototype.getDimensionsInfo,sW.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(t){var e=new sW(t);i.push(e),t.coordinateSystem=e})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},rW.register("calendar",sW);var hW=b,uW=Zu,cW=wu,dW=cW.getLayoutParams,pW=cW.sizeCalculable,fW=cW.mergeLayoutParam,gW=uW.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:{normal:{color:"#fff",borderWidth:1,borderColor:"#ccc"}},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var a=dW(t);gW.superApply(this,"init",arguments),mW(t,a)},mergeOption:function(t,e){gW.superApply(this,"mergeOption",arguments),mW(this.option,t)}});function mW(t,e){var i=t.cellSize;hW.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=hW.map([0,1],(function(t){return pW(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));fW(t,e,{type:"box",ignoreSize:n})}var vW=b,yW=Bo,xW=co,_W=po,bW={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},wW={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};m.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var a=t.coordinateSystem,o=a.getRangeInfo(),r=a.getOrient();this._renderDayRect(t,o,n),this._renderLines(t,o,r,n),this._renderYearText(t,o,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,o,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle.normal").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new yW.Rect({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(h)}},_renderLines:function(t,e,i,n){var a=this,o=t.coordinateSystem,r=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=r.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=o.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=o.getDateInfo(c)}function d(e){a._firstDayOfMonth.push(o.getDateInfo(e)),a._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,r,n)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,i),r,n),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,i),r,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new yW.Polyline({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;o<7;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?xW.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=a.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new yW.Text({z2:30});yW.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];vW.isString(a)&&(a=bW[a.toUpperCase()]||[]);var h="start"===r?0:1,u="horizontal"===e?0:1;o="start"===r?-o:o;for(var c="center"===s,d=0;d=0},AW.createNameEach=DW,AW.eachAxisDim=PW,AW.createLinkedNodesFinder=function(t,e,i){return function(a){var o,r={nodes:[],records:{}};if(e((function(t){r.records[t.name]={}})),!a)return r;n(a,r);do{o=!1,t(s)}while(o);function s(t){!function(t,e){return TW.indexOf(e.nodes,t)>=0}(t,r)&&function(t,n){var a=!1;return e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]&&(a=!0)}))})),a}(t,r)&&(n(t,r),o=!0)}return r};function n(t,n){n.nodes.push(t),e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]=!0}))}))}};var kW=b,OW=po,zW=AW,EW=kW.each,RW=OW.asc,NW=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};function VW(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=OW.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+a[0].toFixed(o),r?null:+a[1].toFixed(o))}}NW.prototype={constructor:NW,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(zW.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,a=this.ecModel,o=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),a.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(o.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return kW.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[t.start,t.end],r=[];return EW(["startValue","endValue"],(function(e){r.push(null!=t[e]?i.parse(t[e]):null)})),EW([0,1],(function(t){var s=r[t],l=o[t];"percent"===n[t]?(null==l&&(l=a[t]),s=i.parse(OW.linearMap(l,a,e,!0))):l=OW.linearMap(s,e,a,!0),r[t]=s,o[t]=l})),{valueWindow:RW(r),percentWindow:RW(o)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=function(t,e,i){var n=[1/0,-1/0];EW(i,(function(t){var i=t.getData();i&&EW(t.coordDimToDataDim(e),(function(t){var e=i.getDataExtent(t);e[0]n[1]&&(n[1]=e[1])}))})),n[1]0?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,function(t){var e=t._minMaxSpan={},i=t._dataZoomModel;EW(["min","max"],(function(n){e[n+"Span"]=i.get(n+"Span");var a=i.get(n+"ValueSpan");if(null!=a&&(e[n+"ValueSpan"]=a,null!=(a=t.getAxisModel().axis.scale.parse(a)))){var o=t._dataExtent;e[n+"Span"]=OW.linearMap(o[0]+a,o,[0,100],!0)}}))}(this),VW(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,VW(this,!0))},filterData:function(t){if(t===this._dataZoomModel){var e=this._dimName,i=this.getTargetSeriesModels(),n=t.get("filterMode"),a=this._valueWindow;if("none"!==n){var o=this.getOtherAxisModel();t.get("$fromToolbox")&&o&&"category"===o.get("type")&&(n="empty"),EW(i,(function(t){var i=t.getData(),o=t.coordDimToDataDim(e);"weakFilter"===n?i&&i.filterSelf((function(t){for(var e,n,r,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(r=!0),u&&(e=!0),c&&(n=!0)}return r&&e&&n})):i&&EW(o,(function(e){"empty"===n?t.setData(i.map(e,(function(t){return r(t)?t:NaN}))):i.filterSelf(e,r)}))}))}}function r(t){return t>=a[0]&&t<=a[1]}}};var BW=m,GW=b,WW=_,HW=uo,FW=AW,ZW=NW,jW=GW.each,UW=FW.eachAxisDim,qW=BW.extendComponentModel({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=XW(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=XW(t);GW.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;WW.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),YW(this,t),jW([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[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,a){var o=this.dependentModels[e.axis][i],r=o.__dzAxisProxy||(o.__dzAxisProxy=new ZW(e.name,i,this,a));t[e.name+"_"+i]=r}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();UW((function(e){var i=e.axisIndex;t[i]=HW.normalizeToArray(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;UW((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 a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):jW(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&UW((function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;o0?100:20}},getFirstTargetAxisModel:function(){var t;return UW((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;UW((function(n){jW(this.get(n.axisIndex),(function(a){t.call(e,n,a,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,e){var i=this.option;jW([["start","startValue"],["end","endValue"]],(function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])}),this),!e&&YW(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var 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()}});function XW(t){var e={};return jW(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function YW(t,e){var i=t._rangePropMode,n=t.get("rangeMode");jW([["start","startValue"],["end","endValue"]],(function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")}))}var $W=qW,KW=Md.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis((function(t,n){var a=e.getComponent(t.axis,n);if(a){var o=a.getCoordSysModel();o&&function(t,e,i,n){for(var a,o=0;o0&&e%f)p+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:lH(t,o,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([p,0]),c.push([p,0])),u.push([p,n]),c.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new eH.Polygon({shape:{points:u},style:QW.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new eH.Polyline({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis((function(a,o){var r=t.getAxisProxy(a.name,o).getTargetSeriesModels();QW.each(r,(function(t){if(!(i||!0!==e&&QW.indexOf(dH,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:r}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,o=this.dataZoomModel;n.add(t.filler=new sH({draggable:!0,cursor:fH(this._orient),drift:uH(this._onDragMove,this,"all"),onmousemove:function(t){tH.stop(t.event)},ondragstart:uH(this._showDataInfo,this,!0),ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new sH(eH.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),cH([0,1],(function(t){var a=eH.createIcon(o.get("handleIcon"),{cursor:fH(this._orient),draggable:!0,drift:uH(this._onDragMove,this,t),onmousemove:function(t){tH.stop(t.event)},ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=aH.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,a.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textStyleModel;this.group.add(i[t]=new eH.Text({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=[lH(t[0],[0,100],e,!0),lH(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];rH(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?lH(o.minSpan,r,a,!0):null,null!=o.maxSpan?lH(o.maxSpan,r,a,!0):null),this._range=hH([lH(n[0],a,r,!0),lH(n[1],a,r,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=hH(i.slice()),a=this._size;cH([0,1],(function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,a=this._orient,o=["",""];if(e.get("showDetail")){var r=e.findRepresentativeAxisProxy();if(r){var s=r.getAxisModel().axis,l=this._range,h=t?r.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:r.getDataValueWindow();o=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=hH(this._handleEnds.slice());function c(t){var e=eH.getTransform(i.handles[t].parent,this.group),r=eH.transformDirection(0===t?"right":"left",e),s=this._handleWidth/2+5,l=eH.applyTransform([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":r,textAlign:"horizontal"===a?r:"center",text:o[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return QW.isFunction(n)?n(t,o):QW.isString(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(),a=eH.applyTransform([e,i],n,!0);this._updateInterval(t,a[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),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,a=(n[0]+n[1])/2;this._updateInterval("all",i[0]-a),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(cH(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}});function fH(t){return"vertical"===t?"ns-resize":"ew-resize"}$W.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var gH={},mH=b,vH=yw,yH=Ed,xH=mH.curry,_H="\0_ec_dataZoom_roams";function bH(t){var e=t.getZr();return e[_H]||(e[_H]={})}function wH(t){mH.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function SH(t,e,i,n,a,o,r){IH(t,(function(s){return s.panGetRange(t.controller,e,i,n,a,o,r)}))}function MH(t,e,i,n){IH(t,(function(a){return a.zoomGetRange(t.controller,e,i,n)}))}function IH(t,e){var i=[];mH.each(t.dataZoomInfos,(function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})})),t.dispatchAction(i)}function AH(t,e){t.dispatchAction({type:"dataZoom",batch:e})}gH.register=function(t,e){var i=bH(t),n=e.dataZoomId,a=e.coordId;mH.each(i,(function(t,i){var o=t.dataZoomInfos;o[n]&&mH.indexOf(e.allCoordIds,a)<0&&(delete o[n],t.count--)})),wH(i);var o=i[a];o||((o=i[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new vH(t.getZr());return i.on("pan",xH(SH,e)),i.on("zoom",xH(MH,e)),i}(t,o),o.dispatchAction=mH.curry(AH,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r,s,l,h,u=(r=o.dataZoomInfos,l={},h={true:2,move:1,false:0,undefined:-1},mH.each(r,(function(t){var e=!t.disabled&&(!t.zoomLock||"move");h[e]>h[s]&&(s=e),mH.extend(l,t.roamControllerOpt)})),{controlType:s,opt:l});o.controller.enable(u.controlType,u.opt),o.controller.setPointerChecker(e.containsPoint),yH.createOrUpdate(o,"dispatchAction",e.throttleRate,"fixRate")},gH.unregister=function(t,e){var i=bH(t);mH.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),wH(i)},gH.shouldRecordRange=function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(r[1]-r[0])+r[0];n=Math.max(1/n,0),r[0]=(r[0]-h)*n+h,r[1]=(r[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return LH(0,r,[0,100],0,u.minSpan,u.maxSpan),this._range=r}}}),OH={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=h[1]-h[0],r.pixelStart=h[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}};function zH(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function EH(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}m.registerProcessor((function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis(zH),t.eachTargetAxis(EH)})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)}))}));var RH=b,NH=AW;m.registerAction("dataZoom",(function(t,e){var i=NH.createLinkedNodesFinder(RH.bind(e.eachComponent,e,"dataZoom"),NH.eachAxisDim,(function(t,e){return t.get(e.axisIndex)})),n=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){n.push.apply(n,i(t).nodes)})),RH.each(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var VH=b,BH=VH.each;function GH(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var WH=function(t){var e=t&&t.visualMap;VH.isArray(e)||(e=e?[e]:[]),BH(e,(function(t){if(t){GH(t,"splitList")&&!GH(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&VH.isArray(e)&&BH(e,(function(t){VH.isObject(t)&&(GH(t,"start")&&!GH(t,"min")&&(t.min=t.start),GH(t,"end")&&!GH(t,"max")&&(t.max=t.end))}))}}))};Zu.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}));var HH=m,FH=b,ZH=FB,jH=cI;function UH(t,e,i,n){for(var a=e.targetVisuals[n],o=jH.prepareVisualTypes(a),r={color:t.getData().getVisual("color")},s=0,l=o.length;s"],JH.isArray(t)&&(t=t.slice(),n=!0),a=e?t:n?[h(t[0]),h(t[1])]:h(t),JH.isString(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):JH.isFunction(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function h(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=hF([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.option,e={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),n=t.controller||(t.controller={});JH.merge(i,e),JH.merge(n,e);var a=this.isCategory();function o(e){sF(t.color)&&!e.inRange&&(e.inRange={color:t.color.slice().reverse()}),e.inRange=e.inRange||{color:dF},lF(this.stateList,(function(t){var i=e[t];if(JH.isString(i)){var n=tF.get(i,"active",a);n?(e[t]={},e[t][i]=n):delete e[t]}}),this)}o.call(this,i),o.call(this,n),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},lF(n,(function(t,e){if(eF.isValidType(e)){var i=tF.get(e,"inactive",a);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");lF(this.stateList,(function(o){var r=this.itemSize,s=t[o];s||(s=t[o]={color:a?n:[n]}),null==s.symbol&&(s.symbol=e&&JH.clone(e)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&JH.clone(i)||(a?r[0]:[r[0],r[0]])),s.symbol=oF(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var h=-1/0;rF(l,(function(t){t>h&&(h=t)})),s.symbolSize=oF(l,(function(t){return uF(t,[0,h],[0,r[0]],!0)}))}}),this)}.call(this,n)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:cF,getValueState:cF,getVisualMeta:cF}),fF=pF,gF=b,mF=fF,vF=po,yF=[20,140],xF=mF.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){xF.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){xF.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=yF[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=yF[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):gF.isArray(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(){mF.prototype.completeVisualOption.apply(this,arguments),gF.each(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=vF.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=_F(this,"outOfRange",this.getExtent()),i=_F(this,"inRange",this.option.range.slice()),n=[];function a(e,i){n.push({value:e,color:t(e,i)})}for(var o=0,r=0,s=i.length,l=e.length;rt[1])break;i.push({color:this.getControllerVisual(o,"color",e),offset:a/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new zF.Group("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,a=i.handleThumbs,o=i.handleLabels;BF([0,1],(function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=zF.applyTransform(i.handleLabelPoints[r],zF.getTransform(s,this.group));o[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=VF(t,o,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",function(t,e,i,n){return t?[[0,-GF(e,WF(i,0))],[6,0],[0,GF(e,WF(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",c);var d=zF.applyTransform(h.indicatorLabelPoint,zF.getTransform(u,this.group)),p=h.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",h.barGroup),g=this._orient;p.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[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]=GF(WF(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 a=[0,n[1]],o=i.getExtent();t=GF(WF(a[0],t),a[1]);var r=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=VF(a,e,i,!0)/2);return n}(i,o,a),s=[t-r,t+r],l=VF(t,a,o,!0),h=[VF(s[0],a,o,!0),VF(s[1],a,o,!0)];s[0]a[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",r):h[1]===1/0?this._showIndicator(l,h[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var u=this._hoverLinkDataIndices,c=[];(e||ZF(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=NF.compressBatches(u,c);this._dispatchHighDown("downplay",RF.convertDataIndex(d[0])),this._dispatchHighDown("highlight",RF.convertDataIndex(d[1]))}},_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 a=n.getData(e.dataType),o=a.getDimension(i.getDataDimension(a)),r=a.get(o,e.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_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",RF.convertDataIndex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var a=zF.getTransform(e,n?null:this.group);return zF[DF.isArray(t)?"applyTransform":"transformDirection"](t,a,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()}});function FF(t,e,i,n){return new zF.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){kF.stop(t.event)},ondragend:n})}function ZF(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function jF(t){return"vertical"===t?"ns-resize":"ew-resize"}m.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))})),m.registerPreprocessor(WH);var UF=b,qF=fF,XF=cI,YF=$H,$F=po.reformIntervals,KF=qF.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){KF.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();JF[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=UF.clone(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=UF.map(this._pieceList,(function(t){t=UF.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=XF.listVisualTypes(),n=this.isCategory();function a(t,e,i){return t&&t[e]&&(UF.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}UF.each(t.pieces,(function(t){UF.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),UF.each(e,(function(e,i){var o=0;UF.each(this.stateList,(function(e){o|=a(t,e,i)||a(t.target,e,i)}),this),!o&&UF.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=YF.get(i,"inRange"===e?"active":"inactive",n)}))}),this),qF.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,UF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;UF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(o?a[i]=!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=UF.clone(t)},getValueState:function(t){var e=XF.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=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){XF.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),!0,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&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],n=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var r=-1/0;return UF.each(a,(function(t){var e=t.interval;e&&(e[0]>r&&s([r,e[0]],"outOfRange"),s(e.slice()),r=e[1])}),this),{stops:e,outerColors:i}}function s(a,o){var r=n.getRepresentValue({interval:a});o||(o=n.getValueState(r));var s=t(r,o);a[0]===-1/0?i[0]=s:a[1]===1/0?i[1]=s:e.push({value:a[0],color:s},{value:a[1],color:s})}}}),JF={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function QF(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var tZ=b,eZ=AF,iZ=Bo,nZ=Hf.createSymbol,aZ=wu,oZ=TF;eZ.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,a=n.getFont(),o=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=tZ.retrieve(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,r),tZ.each(l.viewPieceList,(function(n){var l=n.piece,h=new iZ.Group;h.onclick=tZ.bind(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new iZ.Text({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:a,textFill:o,opacity:"outOfRange"===d?.5:1}}))}t.add(h)}),this),h&&this._renderEndsText(t,h[1],s,u,r),aZ.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:oZ.convertDataIndex(i.findTargetDataIndices(e))})}t.on("mouseover",tZ.bind(i,this,"highlight")).on("mouseout",tZ.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return oZ.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new iZ.Group,r=this.visualMapModel.textStyleModel;o.add(new iZ.Text({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=tZ.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(nZ(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=tZ.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,tZ.each(n,(function(t,e){n[e]=e===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}}),m.registerPreprocessor(WH);var rZ=m,sZ=b,lZ=_,hZ=uo,uZ=co,cZ=uZ.addCommas,dZ=uZ.encodeHTML;function pZ(t){hZ.defaultEmphasis(t.label,["show"])}var fZ=rZ.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(lZ.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var a=this.constructor,o=this.mainType+"Model";i||e.eachSeries((function(t){var i=t.get(this.mainType),r=t[o];i&&i.data?(r?r.mergeOption(i,e,!0):(n&&pZ(i),sZ.each(i.data,(function(t){t instanceof Array?(pZ(t[0]),pZ(t[1])):pZ(t)})),r=new a(i,this,e),sZ.extend(r,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),t[o]=r):t[o]=null}),this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=sZ.isArray(i)?sZ.map(i,cZ).join(", "):cZ(i),a=e.getName(t),o=dZ(this.name);return(null!=i||a)&&(o+="
"),a&&(o+=dZ(a),null!=i&&(o+=" : ")),null!=i&&(o+=dZ(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});sZ.mixin(fZ,hZ.dataFormatMixin);var gZ=fZ;gZ.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var mZ={},vZ=b,yZ=po,xZ=vZ.indexOf;function _Z(t,e,i,n,a,o){var r=[],s=MZ(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];r[a]=e.get(i,l,!0),r[o]=e.get(n,l,!0);var h=function(t,e,i){var n=-1;do{n=Math.max(yZ.getPrecision(t.get(e,i)),n),t=t.stackedOn}while(t);return n}(e,n,l);return(h=Math.min(h,20))>=0&&(r[o]=+r[o].toFixed(h)),r}var bZ=vZ.curry,wZ={min:bZ(_Z,"min"),max:bZ(_Z,"max"),average:bZ(_Z,"average")};function SZ(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(n.dataDimToCoordDim(a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0]):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0],a.valueDataDim=n.coordDimToDataDim(a.valueAxis.dim)[0]),a}function MZ(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,a++)}),!0),n/a}return t.getDataExtent(e,!0)["max"===i?1:0]}mZ.dataTransform=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!vZ.isArray(e.coord)&&n){var a=n.dimensions,o=SZ(e,i,n,t);if((e=vZ.clone(e)).type&&wZ[e.type]&&o.baseAxis&&o.valueAxis){var r=xZ(a,o.baseAxis.dim),s=xZ(a,o.valueAxis.dim);e.coord=wZ[e.type](i,o.baseDataDim,o.valueDataDim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)if(wZ[l[h]]){var u=t.coordDimToDataDim(a[h])[0];l[h]=MZ(i,u,l[h])}e.coord=l}}return e},mZ.getAxisInfo=SZ,mZ.dataFilter=function(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)},mZ.dimValueGetter=function(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value},mZ.numCalculate=MZ;var IZ=b,AZ=m.extendComponentView({type:"marker",init:function(){this.markerGroupMap=IZ.createHashMap()},render:function(t,e,i){var n=this.markerGroupMap;n.each((function(t){t.__keep=!1}));var a=this.type+"Model";e.eachSeries((function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)}),this),n.each((function(t){!t.__keep&&this.group.remove(t.group)}),this)},renderSeries:function(){}}),TZ=b,CZ=pm,LZ=po,DZ=dp,PZ=mZ;function kZ(t,e,i){var n=e.coordinateSystem;t.each((function(a){var o,r=t.getItemModel(a),s=LZ.parsePercent(r.get("x"),i.getWidth()),l=LZ.parsePercent(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var h=t.get(n.dimensions[0],a),u=t.get(n.dimensions[1],a);o=n.dataToPoint([h,u])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(a,o)}))}AZ.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markPointModel;e&&(kZ(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new CZ),h=function(t,e,i){var n;n=t?TZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new DZ(n,i),o=TZ.map(i.get("data"),TZ.curry(PZ.dataTransform,e));t&&(o=TZ.filter(o,TZ.curry(PZ.dataFilter,t)));return a.initData(o,null,t?PZ.dimValueGetter:function(t){return t.value}),a}(a,t,e);e.setData(h),kZ(e.getData(),t,n),h.each((function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})})),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markPoint=t.markPoint||{}})),gZ.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var OZ=b,zZ=dp,EZ=po,RZ=mZ,NZ=BA,VZ=function(t,e,i,n){var a=t.getData(),o=n.type;if(!OZ.isArray(n)&&("min"===o||"max"===o||"average"===o||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=null!=n.yAxis?"y":"x",e.getAxis(r),s=OZ.retrieve(n.yAxis,n.xAxis);else{var l=RZ.getAxisInfo(n,a,e,t);r=l.valueDataDim,l.valueAxis,s=RZ.numCalculate(a,r,o)}var h="x"===r?0:1,u=1-h,c=OZ.clone(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[u]=-1/0,d.coord[u]=1/0;var p=i.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=s,n=[c,d,{type:o,valueIndex:n.valueIndex,value:s}]}return(n=[RZ.dataTransform(t,n[0]),RZ.dataTransform(t,n[1]),OZ.extend({},n[2])])[2].type=n[2].type||"",OZ.merge(n[2],n[0]),OZ.merge(n[2],n[1]),n};function BZ(t){return!isNaN(t)&&!isFinite(t)}function GZ(t,e,i,n){var a=1-t,o=n.dimensions[t];return BZ(e[a])&&BZ(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function WZ(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(GZ(1,i,n,t)||GZ(0,i,n,t)))return!0}return RZ.dataFilter(t,e[0])&&RZ.dataFilter(t,e[1])}function HZ(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=EZ.parsePercent(s.get("x"),a.getWidth()),h=EZ.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=r.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var p=r.getAxis("x"),f=r.getAxis("y");u=r.dimensions;BZ(t.get(u[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):BZ(t.get(u[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}AZ.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each((function(e){HZ(a,e,!0,t,i),HZ(o,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new NZ);this.group.add(l.group);var h=function(t,e,i){var n;n=t?OZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new zZ(n,i),o=new zZ(n,i),r=new zZ([],i),s=OZ.map(i.get("data"),OZ.curry(VZ,e,t,i));t&&(s=OZ.filter(s,OZ.curry(WZ,t)));var l=t?RZ.dimValueGetter:function(t){return t.value};return a.initData(OZ.map(s,(function(t){return t[0]})),null,l),o.initData(OZ.map(s,(function(t){return t[1]})),null,l),r.initData(OZ.map(s,(function(t){return t[2]}))),r.hasItemOption=!0,{from:a,to:o,line:r}}(a,t,e),u=h.from,c=h.to,d=h.line;e.__from=u,e.__to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize");function g(e,i,a){var o=e.getItemModel(i);HZ(e,i,a,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||f[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.normal.color")||r.getVisual("color")})}OZ.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),h.from.each((function(t){g(u,t,!0),g(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).get("lineStyle.normal.color");d.setItemVisual(t,{color:e||u.getItemVisual(t,"color")}),d.setItemLayout(t,[u.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:u.getItemVisual(t,"symbolSize"),fromSymbol:u.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})})),l.updateData(d),h.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markLine=t.markLine||{}})),gZ.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var FZ=b,ZZ=Pt,jZ=dp,UZ=po,qZ=Bo,XZ=mZ,YZ=function(t,e,i,n){var a=XZ.dataTransform(t,n[0]),o=XZ.dataTransform(t,n[1]),r=FZ.retrieve,s=a.coord,l=o.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var h=FZ.mergeAll([{},a,o]);return h.coord=[a.coord,o.coord],h.x0=a.x,h.y0=a.y,h.x1=o.x,h.y1=o.y,h};function $Z(t){return!isNaN(t)&&!isFinite(t)}function KZ(t,e,i,n){var a=1-t;return $Z(e[a])&&$Z(i[a])}function JZ(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!KZ(1,i,n)&&!KZ(0,i,n))||(XZ.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||XZ.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function QZ(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=UZ.parsePercent(s.get(i[0]),a.getWidth()),h=UZ.parsePercent(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);o=r.dataToPoint([u,c],!0)}if("cartesian2d"===r.type){var d=r.getAxis("x"),p=r.getAxis("y");u=t.get(i[0],e),c=t.get(i[1],e);$Z(u)?o[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):$Z(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];return o}var tj=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];AZ.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each((function(e){var a=FZ.map(tj,(function(a){return QZ(n,e,a,t,i)}));n.setItemLayout(e,a),n.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.name,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new qZ.Group});this.group.add(l.group),l.__keep=!0;var h=function(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=FZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})),a=new jZ(FZ.map(o,(function(t,e){return{name:t,type:n[e%2].type}})),i)):a=new jZ(n=[{name:"value",type:"float"}],i);var r=FZ.map(i.get("data"),FZ.curry(YZ,e,t,i));t&&(r=FZ.filter(r,FZ.curry(JZ,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(r,null,s),a.hasItemOption=!0,a}(a,t,e);e.setData(h),h.each((function(e){h.setItemLayout(e,FZ.map(tj,(function(i){return QZ(h,e,i,t,n)}))),h.setItemVisual(e,{color:r.getVisual("color")})})),h.diff(l.__data).add((function(t){var e=new qZ.Polygon({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)})).update((function(t,i){var n=l.__data.getItemGraphicEl(i);qZ.updateProps(n,{shape:{points:h.getItemLayout(t)}},e,t),l.group.add(n),h.setItemGraphicEl(t,n)})).remove((function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)})).execute(),h.eachItemGraphicEl((function(t,i){var n=h.getItemModel(i),a=n.getModel("label.normal"),o=n.getModel("label.emphasis"),r=h.getItemVisual(i,"color");t.useStyle(FZ.defaults(n.getModel("itemStyle.normal").getItemStyle(),{fill:ZZ.modifyAlpha(r,.4),stroke:r})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),qZ.setLabelStyle(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),qZ.setHoverStyle(t,{}),t.dataModel=e})),l.__data=h,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markArea=t.markArea||{}}));var ej=b;function ij(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};ej.each(n,(function(t,e){o[e]||nj(a,e)||(a[e]=t)})),i.label&&!nj(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function nj(t,e){return t.hasOwnProperty(e)}var aj=function(t){var e=t&&t.timeline;ej.isArray(e)||(e=e?[e]:[]),ej.each(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(ij(t),nj(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});nj(n,"position")||(n.position=t.controlPosition),"none"!==n.position||nj(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}ej.each(t.data||[],(function(t){ej.isObject(t)&&!ej.isArray(t)&&(!nj(t,"value")&&nj(t,"name")&&(t.value=t.name),ij(t))}))}(t)}))};Zu.registerSubTypeDefaulter("timeline",(function(){return"slider"}));var oj=m,rj=b;oj.registerAction({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"),rj.defaults({currentIndex:i.option.currentIndex},t)})),oj.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}));var sj=b,lj=dp,hj=uo,uj=Zu.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:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){uj.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),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,n=this._names=[];if("category"===i){var a=[];sj.each(e,(function(t,e){var i,o=hj.getDataItemValue(t);sj.isObject(t)?(i=sj.clone(t)).value=e:i=e,a.push(i),sj.isString(o)||null!=o&&!isNaN(o)||(o=""),n.push(o+"")})),e=a}var o={category:"ordinal",time:"time"}[i]||"number";(this._data=new lj([{name:"value",type:o}],this)).initData(e,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),cj=b,dj=uo,pj=uj.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",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},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",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});cj.mixin(pj,dj.dataFormatMixin);var fj=Md.extend({type:"timeline"}),gj=b,mj=gg,vj=Rp,yj=function(t,e,i,n){mj.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};yj.prototype={constructor:yj,getLabelInterval:function(){var t,e=this.model,i=e.getModel("label.normal");return null!=(t=i.get("interval"))&&"auto"!=t||(t=this._autoLabelInterval)||(t=this._autoLabelInterval=vj.getAxisLabelInterval(gj.map(this.scale.getTicks(),this.dataToCoord,this),vj.getFormattedLabels(this,i.get("formatter")),i.getFont(),"horizontal"===e.get("orient")?0:90,i.get("rotate"))),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},gj.inherits(yj,mj);var xj=b,_j=Je,bj=mt,wj=Bo,Sj=wu,Mj=fj,Ij=yj,Aj=Hf.createSymbol,Tj=Rp,Cj=po,Lj=co.encodeHTML,Dj=xj.bind,Pj=xj.each,kj=Math.PI;function Oj(t,e,i,n,a,o){var r=e.get("color");if(a)a.setColor(r),i.add(a),o&&o.onUpdate(a);else{var s=t.get("symbol");(a=Aj(s,-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a)}var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),n=xj.merge({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");(h=h instanceof Array?h.slice():[+h,+h])[0]/=2,h[1]/=2,n.scale=h;var u=t.get("symbolOffset");if(u){var c=n.position=n.position||[0,0];c[0]+=Cj.parsePercent(u[0],h[0]),c[1]+=Cj.parsePercent(u[1],h[1])}var d=t.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function zj(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}Mj.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,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,t);t.formatTooltip=function(t){return Lj(s.scale.getLabel(t))},Pj(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](a,o,s,t)}),this),this._renderAxisLabel(a,r,s,t),this._position(a,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),a=function(t,e){return Sj.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},u={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:kj/2},d="vertical"===n?a.height:a.width,p=t.getModel("controlStyle"),f=(y=p.get("show"))?p.get("itemSize"):0,g=y?p.get("itemGap"):0,m=f+g,v=t.get("label.normal.rotate")||0;v=v*kj/180;var y,x=p.get("position",!0),_=(y=p.get("show",!0))&&p.get("showPlayBtn",!0),b=y&&p.get("showPrevBtn",!0),w=y&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(o=[0,0],S+=m),b&&(r=[S,0],S+=m),w&&(s=[M-f,0],M-=m)):(_&&(o=[M-f,0],M-=m),b&&(r=[0,0],S+=m),w&&(s=[M-f,0],M-=m)),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:n,rotation:c[n],labelRotation:v,labelPosOpt:i,labelAlign:t.get("label.normal.align")||h[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||u[n],playPosition:o,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:f,controlGap:g}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var o=bj.create(),r=a.x,s=a.y+a.height;bj.translate(o,o,[-r,-s]),bj.rotate(o,o,-kj/2),bj.translate(o,o,[r,s]),(a=a.clone()).applyTransform(o)}var l=m(a),h=m(i.getBoundingRect()),u=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;isNaN(f)?(v(c,h,l,1,p="+"===f?0:1),v(d,u,l,1,1-p)):(v(c,h,l,1,p=f>=0?0:1),d[1]=c[1]+f);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=Tj.createScaleByModel(e,n),o=i.getDataExtent("value");a.setExtent(o[0],o[1]),this._customizeScale(a,i),a.niceTicks();var r=new Ij("value",a,t.axisExtent,n);return r.model=e,r},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],(function(t){return t}))},t.getTicksLabels=function(){return xj.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new wj.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new wj.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:xj.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();Pj(o,(function(t,o){var r=i.dataToCoord(t),s=a.getItemModel(o),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[r,0],onclick:Dj(this._changeTimeline,this,o)},c=Oj(s,l,e,u);wj.setHoverStyle(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=o,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){var a=n.getModel("label.normal");if(a.get("show")){var o=n.getData(),r=i.scale.getTicks(),s=Tj.getFormattedLabels(i,a.get("formatter")),l=i.getLabelInterval();Pj(r,(function(n,a){if(!i.isLabelIgnored(a,l)){var r=o.getItemModel(a),h=r.getModel("label.normal"),u=r.getModel("label.emphasis"),c=i.dataToCoord(n),d=new wj.Text({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:Dj(this._changeTimeline,this,a),silent:!1});wj.setTextStyle(d.style,h,{text:s[a],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),wj.setHoverStyle(d,wj.setTextStyle({},u))}}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,o=t.rotation,r=n.getModel("controlStyle.normal").getItemStyle(),s=n.getModel("controlStyle.emphasis").getItemStyle(),l=[0,-a/2,a,a],h=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,h,u){if(t){var c=function(t,e,i,n){return wj.makePath(t.get(e).replace(/^path:\/\//,""),xj.clone(n||{}),new _j(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:t,origin:[a/2,0],rotation:u?-o:0,rectHover:!0,style:r,onclick:h});e.add(c),wj.setHoverStyle(c,s)}}c(t.nextBtnPosition,"controlStyle.nextIcon",Dj(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"controlStyle.prevIcon",Dj(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),Dj(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),o=n.getCurrentIndex(),r=a.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=Dj(s._handlePointerDrag,s),t.ondragend=Dj(s._handlePointerDragend,s),zj(t,o,i,n,!0)},onUpdate:function(t){zj(t,o,i,n)}};this._currentPointer=Oj(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,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,a=Cj.asc(n.getExtent().slice());i>a[1]&&(i=a[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-r.height:o+8;s+r.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):s-r.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}}))}function h(h,u){var c,d=l[h],p=l[u],f=r[d],g=new Hj(f,t,t.ecModel);if(d&&!p){if(function(t){return 0===t.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=Gj.get(d);if(!m)return;c=new m(g,e,i)}s[d]=c}else{if(!(c=s[p]))return;c.model=g,c.ecModel=e,c.api=i}d||!p?g.get("show")&&!c.unusable?(!function(n,r,s){var l=n.getModel("iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;u={},(h={})[s]=c,u[s]=d}var p=n.iconPaths={};Vj.each(h,(function(s,h){var c=Wj.createIcon(s,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(l.getModel("normal").getItemStyle()),c.hoverStyle=l.getModel("emphasis").getItemStyle(),Wj.setHoverStyle(c),t.get("showTitle")&&(c.__title=u[h],c.on("mouseover",(function(){var t=l.getModel("emphasis").getItemStyle();c.setStyle({text:u[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})})).on("mouseout",(function(){c.setStyle({textFill:null})}))),c.trigger(n.get("iconStatus."+h)||"normal"),a.add(c),c.on("click",Vj.bind(r.onclick,r,e,i,h)),p[h]=c}))}(g,c,d),g.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)},c.render&&c.render(g,e,i,n)):c.remove&&c.remove(e,i):c.dispose&&c.dispose(e,i)}},updateView:function(t,e,i,n){Vj.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},updateLayout:function(t,e,i,n){Vj.each(this._features,(function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)}))},remove:function(t,e){Vj.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){Vj.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});var jj=_,Uj=YG,qj=KG.toolbox.saveAsImage;function Xj(t){this.model=t}Xj.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:qj.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:qj.lang.slice()},Xj.prototype.unusable=!jj.canvasSupported,Xj.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),o=i.get("type",!0)||"png";a.download=n+"."+o,a.target="_blank";var r=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(a.href=r,"function"!=typeof MouseEvent||jj.browser.ie||jj.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(p)}},Uj.register("saveAsImage",Xj);var Yj=m,$j=b,Kj=YG,Jj=KG.toolbox.magicType;function Qj(t){this.model=t}Qj.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:$j.clone(Jj.title),option:{},seriesIndex:{}};var tU=Qj.prototype;tU.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return $j.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var eU={line:function(t,e,i,n){if("bar"===t)return $j.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return $j.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return $j.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return $j.merge({id:e,stack:""},n.get("option.tiled")||{},!0)}},iU=[["line","bar"],["stack","tiled"]];tU.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(eU[i]){var o={series:[]};$j.each(iU,(function(t){$j.indexOf(t,i)>=0&&$j.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,r=e.id,s=eU[i](a,r,e,n);s&&($j.defaults(s,e.option),o.series.push(s));var l=e.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var h=l.getAxesByScale("ordinal")[0];if(h){var u=h.dim+"Axis",c=t.queryComponents({mainType:u,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[u]=o[u]||[];for(var d=0;d<=c;d++)o[u][c]=o[u][c]||{};o[u][c].boundaryGap="bar"===i}}})),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},Yj.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),Kj.register("magicType",Qj);var nU=m,aU=b,oU=fa,rU=YG,sU=KG.toolbox.dataView,lU=new Array(60).join("-");function hU(t){return aU.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,a=arguments[t-1],o=e.getName(a),r=0;r=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=uU(e.shift()).split(cU),n=[],a=aU.map(i,(function(t){return{name:t,data:[]}})),o=0;o=0;a--){if(i[a][n])break}if(a<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var r=o.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}})),i.push(e)},gU.pop=function(t){var e=yU(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return mU(i,(function(t,i){for(var a=e.length-1;a>=0;a--){if(t=e[a][i]){n[i]=t;break}}})),n},gU.clear=function(t){t[vU]=null},gU.count=function(t){return yU(t).length},$W.extend({type:"dataZoom.select"}),JW.extend({type:"dataZoom.select"});var xU=m,_U=b,bU=aD,wU=MG,SU=gU,MU=RC,IU=YG,AU=KG.toolbox.dataZoom,TU=_U.each;function CU(t,e,i){(this._brushController=new bU(i.getZr())).on("brush",_U.bind(this._onBrush,this)).mount(),this._isZoomActive}CU.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:_U.clone(AU.title)};var LU=CU.prototype;LU.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,a){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var r=new wU(PU(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(a,(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)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",SU.count(e)>1?"emphasis":"normal")}(t,e)},LU.onclick=function(t,e,i){DU[i].call(this)},LU.remove=function(t,e){this._brushController.unmount()},LU.dispose=function(t,e){this._brushController.dispose()};var DU={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(SU.pop(this.ecModel))}};function PU(t){var e={};return _U.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}LU._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new wU(PU(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(a("x",i,e[0]),a("y",i,e[1])):a({lineX:"x",lineY:"y"}[n],i,e)}})),SU.push(n,i),this._dispatchZoomAction(i)}function a(t,e,a){var o=e.getAxis(t),r=o.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,r,n),l=s.findRepresentativeAxisProxy(r).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=MU(0,a.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},LU._dispatchZoomAction=function(t){var e=[];TU(t,(function(t,i){e.push(_U.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},IU.register("dataZoom",CU),xU.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);_U.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(_U.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",o=n[a];null==o||"all"==o||_U.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(e,i){var n=t[e];_U.isArray(n)||(n=n?[n]:[]);TU(n,i)}(i,(function(t,n){if(null==o||"all"==o||-1!==_U.indexOf(o,n)){var r={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+n};r[a]=n,e.push(r)}}))}}}));var kU=m,OU=gU,zU=YG,EU=KG.toolbox.restore;function RU(t){this.model=t}RU.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:EU.title},RU.prototype.onclick=function(t,e,i){OU.clear(t),e.dispatchAction({type:"restore",from:this.uid})},zU.register("restore",RU),kU.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var NU,VU={},BU=_,GU="urn:schemas-microsoft-com:vml",WU="undefined"==typeof window?null:window,HU=!1,FU=WU&&WU.document;if(FU&&!BU.canvasSupported)try{!FU.namespaces.zrvml&&FU.namespaces.add("zrvml",GU),NU=function(t){return FU.createElement("')}}catch(PY){NU=function(t){return FU.createElement("<"+t+' xmlns="'+GU+'" class="zrvml">')}}VU.doc=FU,VU.createNode=function(t){return NU(t)},VU.initVML=function(){if(!HU&&FU){HU=!0;var t=FU.styleSheets;t.length<31?FU.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};var ZU=_,jU=j.applyTransform,UU=Je,qU=Pt,XU=Ni,YU=Ri,$U=Gn,KU=Un,JU=Jn,QU=Hs,tq=ms,eq=Or,iq=Rl,nq=VU,aq=eq.CMD,oq=Math.round,rq=Math.sqrt,sq=Math.abs,lq=Math.cos,hq=Math.sin,uq=Math.max;if(!ZU.canvasSupported){var cq=21600,dq=cq/2,pq=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=cq+","+cq,t.coordorigin="0,0"},fq=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},gq=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},mq=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},vq=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},yq=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},xq=function(t,e,i){var n=qU.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=fq(n[0],n[1],n[2]),t.opacity=i*n[3])},_q=function(t){var e=qU.parse(t);return[fq(e[0],e[1],e[2]),e[3]]},bq=function(t,e,i,n){var a="fill"==e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof iq&&mq(t,o),o||(o=nq.createNode(e)),a?function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof iq){var a,o=0,r=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){a="gradient";var d=i.transform,p=[n.x*u,n.y*c],f=[n.x2*u,n.y2*c];d&&(jU(p,p,d),jU(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(o=180*Math.atan2(g,m)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{a="gradientradial",p=[n.x*u,n.y*c],d=i.transform;var v=i.scale,y=u,x=c;r=[(p[0]-h.x)/y,(p[1]-h.y)/x],d&&jU(p,p,d),y/=v[0]*cq,x/=v[1]*cq;var _=uq(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(t,e){return t.offset-e.offset}));for(var w=b.length,S=[],M=[],I=0;I=2){var C=S[0][0],L=S[1][0],D=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=o,t.color=C,t.color2=L,t.colors=M.join(","),t.opacity=P,t.opacity2=D}"radial"===a&&(t.focusposition=r.join(","))}else xq(t,n,e.opacity)}(o,i,n):function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof iq||xq(t,e.stroke,e.opacity)}(o,i),gq(t,o)):(t[a?"filled":"stroked"]="false",mq(t,o))},wq=[[],[],[]];tq.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=nq.createNode("shape"),pq(i),this._vmlEl=i),bq(i,"fill",e,this),bq(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var r=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=rq(sq(s))}o.weight=r+"px"}var l=this.path||(this.path=new eq);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,o,r,s,l=aq.M,h=aq.C,u=aq.L,c=aq.A,d=aq.Q,p=[],f=t.data,g=t.len();for(o=0;o.01?O&&(z+=270/cq):Math.abs(E-C)<1e-4?O&&zT?x-=270/cq:x+=270/cq:O&&EC?y+=270/cq:y-=270/cq),p.push(R,oq(((T-L)*M+w)*cq-dq),",",oq(((C-D)*I+S)*cq-dq),",",oq(((T+L)*M+w)*cq-dq),",",oq(((C+D)*I+S)*cq-dq),",",oq((z*M+w)*cq-dq),",",oq((E*I+S)*cq-dq),",",oq((y*M+w)*cq-dq),",",oq((x*I+S)*cq-dq)),r=y,s=x;break;case aq.R:var N=wq[0],V=wq[1];N[0]=f[o++],N[1]=f[o++],V[0]=N[0]+f[o++],V[1]=N[1]+f[o++],e&&(jU(N,N,e),jU(V,V,e)),N[0]=oq(N[0]*cq-dq),V[0]=oq(V[0]*cq-dq),N[1]=oq(N[1]*cq-dq),V[1]=oq(V[1]*cq-dq),p.push(" m ",N[0],",",N[1]," l ",V[0],",",N[1]," l ",V[0],",",V[1]," l ",N[0],",",V[1]);break;case aq.Z:p.push(" x ")}if(i>0){p.push(n);for(var B=0;B100&&(Iq=0,Mq={});var i,n=Aq.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(PY){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Mq[t]=e,Iq++}return e}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||XU.getBoundingRect(o,m,p,f);var v=this.transform;if(v&&!n&&(Tq.copy(e),Tq.applyTransform(v),e=Tq),n)c=e.x,d=e.y;else{var y=a.textPosition,x=a.textDistance;if(y instanceof Array)c=e.x+yq(y[0],e.width),d=e.y+yq(y[1],e.height),p=p||"left";else{var _=XU.adjustTextPositionOnRect(y,e,x);c=_.x,d=_.y,p=p||_.textAlign,f=f||_.textVerticalAlign}}c=XU.adjustTextX(c,i.width,p),d=XU.adjustTextY(d,i.height,f),d+=i.height/2;var b,w,S,M=nq.createNode,I=this._textVmlEl;I?w=(b=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),b=M("path"),w=M("textpath"),S=M("skew"),w.style["v-text-align"]="left",pq(I),b.textpathok=!0,w.on=!0,I.from="0 0",I.to="1000 0.05",gq(I,S),gq(I,b),gq(I,w),this._textVmlEl=I);var A=[c,d],T=I.style;v&&n?(jU(A,A,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(oq(A[0])||0)+","+(oq(A[1])||0),S.origin="0 0",T.left="0px",T.top="0px"):(S.on=!1,T.left=oq(c)+"px",T.top=oq(d)+"px"),w.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{w.style.font=m}catch(PY){}bq(I,"fill",{fill:a.textFill,opacity:a.opacity},this),bq(I,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash},this),I.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,I)}},Lq=function(t){mq(t,this._textVmlEl),this._textVmlEl=null},Dq=function(t){gq(t,this._textVmlEl)},Pq=[$U,KU,JU,tq,QU],kq=0;kq-1e-4}function aX(t,e){e&&oX(t,"transform","matrix("+Xq.call(e,",")+")")}function oX(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function rX(t,e,i){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Yq}(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Yq:n,"none"!==t.getAttribute("clip-path")&&n===Yq&&(n="rgba(0, 0, 0, 0.002)"),oX(t,"fill",n),oX(t,"fill-opacity",e.opacity)}else oX(t,"fill",Yq);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Yq}(e,i)){var a=i?e.textStroke:e.stroke;oX(t,"stroke",a="transparent"===a?Yq:a),oX(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),oX(t,"paint-order","stroke"),oX(t,"stroke-opacity",e.opacity),e.lineDash?(oX(t,"stroke-dasharray",e.lineDash.join(",")),oX(t,"stroke-dashoffset",$q(e.lineDashOffset||0))):oX(t,"stroke-dasharray",""),e.lineCap&&oX(t,"stroke-linecap",e.lineCap),e.lineJoin&&oX(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&oX(t,"stroke-miterlimit",e.miterLimit)}else oX(t,"stroke",Yq)}var sX={};sX.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hq("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],i=t.data,n=t.len(),a=0;a=tX||!nX(g)&&(d>-Qq&&d<0||d>Qq)==!!f;var y=iX(s+h*Jq(c)),x=iX(l+u*Kq(c));m&&(d=f?tX-1e-4:1e-4-tX,v=!0,9===a&&e.push("M",y,x));var _=iX(s+h*Jq(c+d)),b=iX(l+u*Kq(c+d));e.push("A",iX(h),iX(u),$q(p*eX),+v,+f,_,b);break;case qq.Z:o="Z";break;case qq.R:_=iX(i[a++]),b=iX(i[a++]);var w=iX(i[a++]),S=iX(i[a++]);e.push("M",_,b,"L",_+w,b,"L",_+w,b+S,"L",_,b+S,"L",_,b)}o&&e.push(o);for(var M=0;M=a&&h+1>=o){for(var u=[],c=0;c=a&&c+1>=o)return fX(n,s.components);l[i]=s}else l[i]=void 0}var f;r++}for(;r<=s;){var p=d();if(p)return p}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},AX.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},AX.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},AX.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},AX.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return yX.each(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},AX.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;yX.each(t,(function(t){t[e._markLabel]="0"}))},AX.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},AX.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;yX.each(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},AX.prototype.getSvgProxy=function(t){return t instanceof xX?SX:t instanceof _X?MX:t instanceof bX?IX:SX},AX.prototype.getTextSvgElement=function(t){return t.__textSvgEl},AX.prototype.getSvgElement=function(t){return t.__svgEl};var TX=AX,CX=TX,LX=b,DX=Ae;function PX(t){CX.call(this,t,["linearGradient","radialGradient"],"__gradient_in_use__")}LX.inherits(PX,CX),PX.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;LX.each(["fill","stroke"],(function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,o=e.style[n],r=i.getDefs(!0);o._dom?(a=o._dom,r.contains(o._dom)||i.addDom(a)):a=i.add(o),i.markUsed(e);var s=a.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}}))}},PX.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return DX("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},PX.prototype.update=function(t){var e=this;CX.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))}))},PX.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 DX("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,a=i.length;n0){var n,a,o=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(a=r[s].getAttribute("id"),n=r[s],o.contains(n)||o.appendChild(n)):(a="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",a),o.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var h=Array.prototype.slice.call(r.transform);EX.mul(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getSvgElement(r);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+a+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},RX.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&zX.each(t.__clipPaths,(function(t){t._dom&&OX.prototype.markUsed.call(e,t._dom),t._textDom&&OX.prototype.markUsed.call(e,t._textDom)}))};var NX=RX,VX=Wq.createElement,BX=b,GX=BX.each,WX=Ae,HX=ms,FX=Jn,ZX=Hs,jX=mX,UX=kX,qX=NX,XX=Gq,YX=XX.path,$X=XX.image,KX=XX.text;function JX(t){return parseInt(t,10)}function QX(t,e){return e&&t&&e.parentNode!==t}function tY(t,e,i){if(QX(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function eY(t,e){if(QX(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function iY(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function nY(t){return t.__textSvgEl}function aY(t){return t.__svgEl}var oY=function(t,e,i){this.root=t,this.storage=e,this._opts=i=BX.extend({},i||{});var n=VX("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style["user-select"]="none",n.style.cssText="position:absolute;left:0;top:0;",this.gradientManager=new UX(n),this.clipPathManager=new qX(n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]};oY.prototype={constructor:oY,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i,n=this._svgRoot,a=this._visibleList,o=t.length,r=[];for(e=0;e=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[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 a=i.style;a.width=t+"px",a.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],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||JX(s[i])||JX(r.style[i]))-(JX(s[a])||0)-(JX(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)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},GX(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;oY.prototype[t]=(e=t,function(){WX('In SVG mode painter not support method "'+e+'"')})}));var rY=oY;(0,v.registerPainter)("svg",rY),function(t){var e=m;!function(){for(var i in e){if(null==e||!e.hasOwnProperty(i)||"default"===i||"__esModule"===i)return;t[i]=e[i]}}();var i=jd;!function(){for(var e in i){if(null==i||!i.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=i[e]}}()}(g);const sY={class:"market-temperature"},lY={class:"container"},hY={class:"border3"},uY={class:"chart-section"},cY={class:"border4"},dY={class:"border1"},pY={class:"title"},fY=["src"],gY={class:"titleContent"},mY={class:"secondTitle"},vY={class:"secondTitleItem"},yY={class:"calendar"},xY={key:0,class:"month"},_Y={class:"monthContent"},bY={class:"calendarItemTitle"},wY={key:1,class:"calendarItemContent"},SY=["src"],MY={key:2,class:"calendarItemContent"},IY={key:3,class:"calendarItemContent"},AY={key:0},TY={key:1},CY={__name:"marketTemperature",props:{companyName:{type:String,default:""},stockCode:{type:String,default:""}},setup(t,{expose:f}){const m=t,v=e(["#32A3FF","#2BD977","#A239FF","#FF7945","#FF5289","#5791CB"]),y=e(["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]),x=e(),_=e(["周一","周二","周三","周四","周五","周六","周日"]),b=e(),w=e([]),S=e([]);let M=null;const I=["NDX","DJIA","SPX","STI","KLSE","TSX","N225","KS11","JKSE","1A0001","HSI","I63","VNINDE"],A=i((()=>I.includes(m.stockCode))),T=e([]);function C(){const t=document.querySelector(".border4 .el-table");if(t){const e=t.offsetWidth/7,i=Math.min(.15*e,20),n=document.querySelectorAll(".WDRL_date"),a=document.querySelectorAll(".WDRL_data");n.forEach((t=>{t.style.fontSize=`${i}px`})),a.forEach((t=>{t.style.fontSize=.8*i+"px"}))}}return n((()=>{M&&(M.dispose(),M=null),window.marketTempResizeHandler&&(window.removeEventListener("resize",window.marketTempResizeHandler),window.marketTempResizeHandler=null),window.marketTempContainerObserver&&(window.marketTempContainerObserver.disconnect(),window.marketTempContainerObserver=null)})),f({initChart:function(t,i,n){if(!t||!i||!n)return;M&&(M.dispose(),M=null);const a=i.map((t=>[t[1],t[2],t[3],t[4]]));let o=1/0,r=-1/0;i.forEach((t=>{const e=t[3],i=t[4];o=Math.min(o,e),r=Math.max(r,i)}));const s=Math.floor(o),l=Math.ceil(r);w.value=n,S.value=i,(()=>{const t=e([]);T.value=JSON.parse(JSON.stringify(w.value));for(let e=0;et[0])),u=t.map((t=>Math.round(t[1]))),c=t.map((t=>Math.round(t[2]))),d=c.every(((t,e)=>t===u[e])),f=d?c.map((()=>null)):c;M=g.init(b.value),M.setOption({tooltip:{trigger:"axis",confine:!0,position:function(t,e,i,n,a){const o=a.viewSize[0],r=a.viewSize[1],s=a.contentSize[0],l=a.contentSize[1];if(window.innerWidth<=768)return{top:10,left:Math.max(10,(o-s)/2)};{let e=t[0],i=t[1];return e+s>o&&(e=o-s-10),i+l>r&&(i=r-l-10),[Math.max(10,e),Math.max(10,i)]}},axisPointer:{type:"cross",crossStyle:{color:"#999",width:1,type:"dashed"},lineStyle:{color:"#999",width:1,type:"dashed"}},backgroundColor:"#646E71",borderColor:"#fff",borderWidth:1,padding:[8,12],textStyle:{color:"#fff",fontSize:window.innerWidth<=768?10:12},extraCssText:window.innerWidth<=768?"max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);":"max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);",formatter:function(t){if(t&&t.length>0){const e=window.innerWidth<=768,i=e?"10px":"12px",n=e?"1.3":"1.5",a=e?"4px":"6px";let o=`
日期: ${t[0].name}
`;return t.forEach((t=>{if("candlestick"===t.seriesType){const r=t.data[1],s=t.data[2],l=t.data[3],h=t.data[4];e?(o+=`
`,o+=`
${t.seriesName}
`,o+=`
开盘价:${r}
`,o+=`
收盘价:${s}
`,o+=`
最低价:${l}
`,o+=`
最高价:${h}
`,o+="
"):(o+=`
`,o+=`
${t.seriesName}
`,o+=`
开盘价: ${r}
`,o+=`
收盘价: ${s}
`,o+=`
最低价: ${l}
`,o+=`
最高价: ${h}
`,o+="
")}else"line"===t.seriesType&&(o+=`
${t.seriesName}: ${t.value}
`)})),o}return""}},legend:{data:["K线","股票温度","市场温度"],textStyle:{color:"white",fontSize:window.innerWidth<=768?14:18}},grid:{left:window.innerWidth<=768?"15%":"100px",right:window.innerWidth<=768?"40px":"100px",top:window.innerWidth<=768?"40px":"60px",bottom:window.innerWidth<=768?"60px":"80px",containLabel:!1,height:window.innerWidth<=768?"200px":"300px",width:window.innerWidth<=768?"70%":"80%"},xAxis:{type:"category",data:h,axisLine:{lineStyle:{color:"#00BFFF"}},axisLabel:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"white",width:1,type:"dashed"}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}},splitLine:{show:!1,lineStyle:{color:"#999",width:1,type:"dashed",opacity:.3}}},yAxis:[{min:s,max:l,axisLine:{lineStyle:{color:"#00FF7F"}},axisLabel:{color:"#FFFFFF",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",formatter:function(t){return t.toString()},margin:8},axisTick:{lineStyle:{color:"#00FF7F"}},splitLine:{show:!1,lineStyle:{color:"#333333",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",label:{show:!0,color:"black"},lineStyle:{color:"#999",width:1,type:"dashed"}}},{min:0,max:100,position:"right",axisLabel:{color:"#FFFF00",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",margin:8},axisLine:{lineStyle:{color:"#FF1493",width:2}},axisTick:{lineStyle:{color:"#FF1493"}},splitLine:{show:!1,lineStyle:{color:"#444444",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}}}],color:["#f00","white"],series:[{name:"K线",type:"candlestick",data:a,z:1,itemStyle:{normal:{color:"#00FF00",color0:"#FF0000",borderColor:"#00FF00",borderColor0:"#FF0000"}}},{name:"股票温度",type:"line",yAxisIndex:1,data:f,z:2,connectNulls:!1,lineStyle:{width:2},symbol:"circle",symbolSize:4},{name:"市场温度",type:"line",yAxisIndex:1,data:u,z:3,lineStyle:{width:2},symbol:"circle",symbolSize:4}],dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"filter",textStyle:{color:"white"},start:50,end:100,bottom:"0%"},{type:"inside",xAxisIndex:0,filterMode:"filter"}]}),M&&(M.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),M.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})));const m=(t,e)=>{let i;return function(...n){clearTimeout(i),i=setTimeout((()=>{clearTimeout(i),t(...n)}),e)}},y=m((()=>{if(M&&!M.isDisposed())try{M.resize(),C()}catch(t){}}),100);window.marketTempResizeHandler&&window.removeEventListener("resize",window.marketTempResizeHandler),window.addEventListener("resize",y),window.marketTempResizeHandler=y;const _=document.querySelector(".KlineClass");if(_&&window.ResizeObserver){const t=new ResizeObserver(m((()=>{if(M&&!M.isDisposed())try{M.resize()}catch(t){}}),100));t.observe(_),window.marketTempContainerObserver=t}C()}}),(t,e)=>(a(),o("div",sY,[r("div",lY,[r("div",hY,[r("section",uY,[r("div",null,[r("div",{ref_key:"KlineCanvs",ref:b,class:"KlineClass"},null,512)])])]),r("div",cY,[r("div",dY,[r("div",pY,[r("img",{src:s("/aixiaocaishen/static/images/标题-d851a441.png"),alt:"标题",class:"titleImg"},null,8,fY),r("div",gY,l(x.value),1)]),r("div",mY,[(a(!0),o(h,null,u(_.value,(t=>(a(),o("div",{key:t,class:"secondTitleItems"},[r("div",vY,l(t),1)])))),128))]),r("div",yY,[(a(),o(h,null,u(5,(t=>r("div",{key:t,class:"calendarCol"},[(a(!0),o(h,null,u(T.value.slice(7*(t-1),7*t),(t=>(a(),o("div",{key:t,class:"calendarRow"},[r("div",{class:"calendarItem",style:c({backgroundColor:t.color})},[t.month?(a(),o("div",xY,[r("div",_Y,l(y.value[t.month-1]),1)])):d("",!0),r("div",bY,l(t.day),1),""==t.stock_temperature?(a(),o("div",wY,[r("img",{src:s("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAAAXNSR0IArs4c6QAAAj5JREFUWEftl7FrFEEUxr93im/mbjEolkpQQdRCJHaCCgrxHzBYphJsRAKKgq2FhQGxsFY7UVtBE0GxtbEQBEEjKkEQDIi3M4e7n6zkjs3e3d7c7QkWN+XOe9/+eG/eezOCIZf3fj/JcwBOAZgGYACsisirNE3vW2ufDykJCXUgqd77RQDnAWwq8VtKkmS+0WishmoHQawDPAFwMlD4K8lj1tqPIfZBEM65WwAuhgjmbN6q6oyItAb5DYRwzu0F8A7A5pzYZxG52mq1lqMo8nEcH6zVagsA5go/vGyMuVkZwnt/jeT1nNAaycPW2k9FcefcbQAXct/fG2P2VYZwzj0EcCYntGiMudRLmOSU9/4bAG3vq+o2EVkrAwlJxwsAJ9oiIjKnqo/6iTrnXgM40t4nudtau1IV4iWA4zmR08aYZyUQWZ/oVBHJPYOqJCQSRYhZY8xSCcTyeiP7azKByJ2J6ukgWS+06VhEfvdLRw/7XyKSjnQwSW4BUBtU40PsexFhL/uugxnH8bSIPAYwA4QPuACYHyQXrLX3irZdEN77uyTnA0RHMWmp6g4R+Zl37oJwzm1oTqP8qTT/IgdUNZtFnTWB6IyCYugm6WhHZBKJSST+1+p4CmB23J2yrZem6a56vf5lUMe8AeDKP4L4YIzJnhAbVlfbbjabO0XkjYhsHzMIReSsqma393KIbNd7f4jkHQBHxzTOV7LHkqo+CLpP5I1Ibo3jeKpKRJIkcVEUfe93ocm0B962qwCE+v4BZnoUMEqdbwsAAAAASUVORK5CYII="),alt:"锁定",class:"ciImg"},null,8,SY)])):"休市"==t.stock_temperature?(a(),o("div",MY," 休市 ")):(a(),o("div",IY,[A.value?(a(),o("div",AY,l(t.market_temperature),1)):(a(),o("div",TY,l(t.market_temperature)+" | "+l(t.stock_temperature),1))]))],4)])))),128))]))),64))])])])])]))}};var LY=f(CY,[["__scopeId","data-v-d0e9080c"]]),DY=Object.freeze(Object.defineProperty({__proto__:null,default:LY},Symbol.toStringTag,{value:"Module"}));export{DY as a,g as e,LY as m};