0?1:0>a?-1:0}function dx(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function fx(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Mr(f[c.index],d),f[h.index]=Mr(f[h.index],n?d:Math.abs(a)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*r}function px(t,e,i,n,o){var a=t.get(oR)||0;a&&(rR.attr({scale:e.slice(),rotation:i}),rR.updateTransform(),a/=rR.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function gx(t,e,i,n,o,a,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=D(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Mr(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Vr(n),M=S?n:Ox((y+b)/w),I=y-M*m;x=I/2/(_?M:M-1),w=m+2*x,b=_?0:2*x,S||"fixed"===n||(M=h?Ox((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var T=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?T:"end"===s?u-T:u/2,a&&(A[0]+=a[0],A[1]+=a[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[p.index]=i[p.xy];var L=d.barRectShape=r({},i);L[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+T)),L[f.wh]=i[f.wh];var k=d.clipShape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecSize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function mx(t){var e=t.symbolPatternSize,i=oc(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function vx(t,e,i,n){function o(t){var e=h.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:0>n)&&(o=d-1-t),e[c.index]=p*(o-d/2+.5)+h[c.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function a(){Lx(t,function(t){t.trigger("emphasis")})}function r(){Lx(t,function(t){t.trigger("normal")})}var s=t.__pictorialBundle,l=i.symbolSize,u=i.valueLineWidth,h=i.pathPosition,c=e.valueDim,d=i.repeatTimes||0,f=0,p=l[e.valueDim.index]+u+2*i.symbolMargin;for(Lx(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=d,d>f?kx(t,null,o(f),i,n):kx(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),Ix(t,i),f++});d>f;f++){var g=mx(i);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=d,s.add(g);var m=o(f);kx(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",a).on("mouseout",r),Ix(g,i)}}function yx(t,e,i,n){function o(){this.trigger("emphasis")}function a(){this.trigger("normal")}var r=t.__pictorialBundle,s=t.__pictorialMainPath;s?kx(s,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialMainPath=mx(i),r.add(s),kx(s,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),s.on("mouseover",o).on("mouseout",a)),Ix(s,i)}function xx(t,e,i){var n=r({},e.barRectShape),o=t.__pictorialBarRect;o?kx(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new XT({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function _x(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=r({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(o)nr(o,{shape:a},l,u);else{a[s.wh]=0,o=new XT({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var h={};h[s.wh]=i.clipShape[s.wh],vA[n?"updateProps":"initProps"](o,{shape:h},l,u)}}}function bx(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Sx,i.isAnimationEnabled=Mx,i}function Sx(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Mx(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Ix(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 Tx(t,e,i,n){var o=new xM,a=new xM;return o.add(a),o.__pictorialBundle=a,a.attr("position",i.bundlePosition.slice()),i.symbolRepeat?vx(o,e,i):yx(o,e,i),xx(o,i,n),_x(o,e,i,n),o.__pictorialShapeStr=Cx(t,i),o.__pictorialSymbolMeta=i,o}function Ax(t,e,i){var n=i.animationModel,o=i.dataIndex,a=t.__pictorialBundle;nr(a,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?vx(t,e,i,!0):yx(t,e,i,!0),xx(t,i,!0),_x(t,e,i,!0)}function Dx(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];Lx(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(a,function(t){nr(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function Cx(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Lx(t,e,i){f(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function kx(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&vA[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function Px(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),l=a.getModel("emphasis.itemStyle").getItemStyle(),u=a.getShallow("cursor");Lx(t,function(t){t.setColor(n),t.setStyle(s({fill:n,opacity:i.opacity},r)),Fa(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;Gc(d.style,h,a,n,e.seriesModel,o,c),Fa(d,h)}function Ox(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function Ex(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function Nx(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function zx(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function Rx(t,e){return p(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Bx(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=Jx(n);e=ba(a,null,o,n.layout||"center"),e.__customPathData=a}else if("image"===i)e=new Dn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new ET({}),e.__customText=t.style.text;else if("group"===i)e=new xM;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var r=wa(i);eS&&O(r,'graphic type "'+i+'" can not be found.'),e=new r}return e.__customGraphicType=i,e.name=t.name,e}function Vx(t,e,i,o,a,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){Gx(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){Gx(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),or(t,{style:{opacity:c}},o,e)}r?t.attr(l):nr(t,l,o,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var d=i.styleEmphasis;Na(t,d),s&&Wa(t,d!==!1)}function Gx(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Fx(t,e,i,n){function o(t){null==t&&(t=m),S&&(v=e.getItemModel(t),y=v.getModel(gR),x=v.getModel(mR),_=e.getItemVisual(t,"color"),S=!1)}function a(t,i){return null==i&&(i=m),e.get(e.getDimension(t||0),i)}function r(i,n){null==n&&(n=m),o(n);var a=v.getModel(fR).getItemStyle();null!=_&&(a.fill=_);var r=e.getItemVisual(n,"opacity");null!=r&&(a.opacity=r);var s=i?qx(i,y):y;return Ya(a,s,null,{autoColor:_,isRectText:!0}),a.text=s.getShallow("show")?C(t.getFormattedLabel(n,"normal"),Vc(e,n)):null,i&&Kx(a,i),a}function l(i,n){null==n&&(n=m),o(n);var a=v.getModel(pR).getItemStyle(),r=i?qx(i,x):x;return Ya(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?L(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),Vc(e,n)):null,i&&Kx(a,i),a}function u(t,i){return null==i&&(i=m),e.getItemVisual(i,t)}function h(t){if(p.getBaseAxis){var e=p.getBaseAxis();return Nh(s({axis:e},t),n)}}function c(){return i.getCurrentSeriesIndices()}function d(t){return er(t,i)}var f=t.get("renderItem"),p=t.coordinateSystem,g={};p&&(eS&&(O(f,"series.render is required."),O(p.prepareCustoms||yR[p.type],"This coordSys does not support custom series.")),g=p.prepareCustoms?p.prepareCustoms():yR[p.type](p));var m,v,y,x,_,w=s({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:a,style:r,styleEmphasis:l,visual:u,barLayout:h,currentSeriesIndices:c,font:d},g.api||{}),b={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:g.coordSys,dataInsideLength:e.count(),encode:Wx(t.getData())},S=!0;return function(t,i){return m=t,S=!0,f&&f(s({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},b),w)}}function Wx(t){var e={};return f(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim,r=e[a]=e[a]||[];r[o.coordDimIndex]=n}}),e}function Hx(t,e,i,n,o,a){return t=Zx(t,e,i,n,o,a,!0),t&&a.setItemGraphicEl(e,t),t}function Zx(t,e,i,n,o,a,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&Qx(u)&&Jx(u)!==t.__customPathData||"image"===l&&t_(h,"image")&&h.image!==t.__customImagePath||"text"===l&&t_(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Bx(i)),Vx(t,e,i,n,a,c,r),"group"===l&&Ux(t,e,i,n,a),o.add(t),t}}function Ux(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=s===!1;if(r||l||u){if(l)return void Xx({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});u&&t.removeAll();for(var h=0;r>h;h++)a[h]&&Zx(t.childAt(h),e,a[h],n,t,o);eS&&O(!u||t.childCount()===h,"MUST NOT contain empty item in children array when `group.$mergeChildren` is `false`.")}}function Xx(t){new Xu(t.oldChildren,t.newChildren,Yx,Yx,t).add(jx).update(jx).remove($x).execute()}function Yx(t,e){var i=t&&t.name;return null!=i?i:vR+e}function jx(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,o=null!=e?i.oldChildren[e]:null;Zx(o,i.dataIndex,n,i.animatableModel,i.group,i.data)}function qx(t,e){var i=new mr({},e);return f(dR,function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])}),i}function Kx(t,e){for(var i in e)(e.hasOwnProperty(i)||!dR.hasOwnProperty(i))&&(t[i]=e[i])}function $x(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function Jx(t){return t&&(t.pathData||t.d)}function Qx(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function t_(t,e){return t&&t.hasOwnProperty(e)}function e_(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function i_(t,e){return e.dim+t.model.componentIndex}function n_(t,e){var i={},n=o_(m(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),o=t.coordinateSystem,a=o.getBaseAxis(),r=i_(o,a),s=e_(t),l=n[r][s],u=l.offset,h=l.width,c=o.getOtherAxis(a),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(a.dim),y=_h(e,m),x="radius"!==a.dim||!t.get("roundCap",!0),_="radius"===c.dim?c.dataToRadius(0):c.dataToAngle(0),w=0,b=e.count();b>w;w++){var S=e.get(m,w),M=e.get(v,w),I=S>=0?"p":"n",T=_;
-y&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var A,D,C,L;if("radius"===c.dim){var k=c.dataToRadius(S)-_,P=a.dataToAngle(M);Math.abs(k)k?-1:1)*p),A=T,D=T+k,C=P-u,L=C-h,y&&(i[s][M][I]=D)}else{var O=c.dataToAngle(S,x)-_,E=a.dataToRadius(M);Math.abs(O)O?-1:1)*g),A=E+u,D=A+h,C=T,L=T+O,y&&(i[s][M][I]=L)}e.setItemLayout(w,{cx:d,cy:f,r0:A,r:D,startAngle:-C*Math.PI/180,endAngle:-L*Math.PI/180})}}},this)}function o_(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=i_(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=e[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[a]=l;var h=e_(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Mr(t.get("barWidth"),s),d=Mr(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,o=t.bandWidth,a=Mr(t.categoryGap,o),r=Mr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-a)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function a_(t,e){sk.call(this,"radius",t,e),this.type="category"}function r_(t,e){e=e||[0,360],sk.call(this,"angle",t,e),this.type="category"}function s_(t,e){return e.type||(e.data?"category":"value")}function l_(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Mr(n[0],o),t.cy=Mr(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[Mr(l[0],s),Mr(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}function u_(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var o=t.getData();f(o.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(o,wh(o,t))}),f(o.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(o,wh(o,t))})}}),jh(i.scale,i.model),jh(n.scale,n.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function h_(t,e){if(t.type=e.get("type"),t.scale=qh(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function c_(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function d_(t){var e=t.getRadiusAxis();return e.inverse?0:1}function f_(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function p_(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function g_(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=Oe();Be(d,d,s),Re(d,d,[n.cx,n.cy]),l=rr([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Nk.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function m_(t,e){e.update="updateView",ku(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var o=i.coordinateSystem;f(o.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function v_(t){this._model=t}function y_(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}function x_(t,e){var i=t.cellSize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return is(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ns(t,e,{type:"box",ignoreSize:n})}function __(t,e,i){var n,o={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);o[e]=o.hasOwnProperty(e)?o[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function w_(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=ts(n,a,o);VA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),es(t,n,a,o)}function b_(t,e){var i=CA(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new XT({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function S_(t,e,i,n,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,a||(r.stroke=o)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function M_(t,e,i,n){T_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),I_(t,e,i,n)}function I_(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function T_(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function A_(t,e,i){var n=t.getOrient(),o=[1,1];o[n.index]=0,ns(e,i,{type:"box",ignoreSize:o})}function D_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(qR,function(t){return t+"transition:"+i}).join(";")}function C_(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var o=t.get("lineHeight");null==o&&(o=Math.round(3*i/2)),i&&e.push("line-height:"+o+"px");var a=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return r&&e.push("text-shadow:"+s+"px "+l+"px "+r+"px "+a),YR(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function L_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),o=t.getModel("textStyle"),a=t.get("padding");return i&&e.push(D_(i)),n&&(aS.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+oi(n)),e.push("filter:alpha(opacity=70)"))),YR(["width","color","radius"],function(i){var n="border-"+i,o=jR(n),a=t.get(o);null!=a&&e.push(n+":"+a+("color"===i?"":"px"))}),e.push(C_(o)),null!=a&&e.push("padding:"+CA(a).join("px ")+"px"),e.join(";")+";"}function k_(t,e,i,n,o){var a=e&&e.painter;if(i){var r=a&&a.getViewportRoot();r&&pe(t,r,document.body,n,o)}else{t[0]=n,t[1]=o;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function P_(t,e,i){if(aS.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],k_(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=o.handler,i=o.painter.getViewportRoot();be(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function O_(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function E_(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],O_(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}function N_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(mr.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new mr(i,e,e.ecModel))}return e}function z_(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function R_(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=a&&(t+l+a>n?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function B_(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function V_(t,e,i){var n=i[0],o=i[1],a=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-o/2;break;case"top":r=e.x+l/2-n/2,s=e.y-o-a;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+a;break;case"left":r=e.x-n-a,s=e.y+u/2-o/2;break;case"right":r=e.x+l+a,s=e.y+u/2-o/2}return[r,s]}function G_(t){return"center"===t||"middle"===t}function F_(t){eo(t,"label",["show"])}function W_(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function H_(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Z_(t,e,i,n,o,a){var r=[],s=_h(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=K_(e,l,t),h=e.indicesOfNearest(l,u)[0];r[o]=e.get(i,h),r[a]=e.get(l,h);var c=e.get(n,h),d=Ar(e.get(n,h));return d=Math.min(d,20),d>=0&&(r[a]=+r[a].toFixed(d)),[r,c]}function U_(t,e){var i=t.getData(),o=t.coordinateSystem;if(e&&!H_(e)&&!_(e.coord)&&o){var a=o.dimensions,r=X_(e,i,o,t);if(e=n(e),e.type&&rB[e.type]&&r.baseAxis&&r.valueAxis){var s=oB(a,r.baseAxis.dim),l=oB(a,r.valueAxis.dim),u=rB[e.type](i,r.baseDataDim,r.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;2>c;c++)rB[h[c]]&&(h[c]=K_(i,i.mapDimension(a[c]),h[c]));e.coord=h}}return e}function X_(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(Y_(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function Y_(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;on?t.coord&&t.coord[n]:t.value}function K_(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,function(t){isNaN(t)||(n+=t,o++)}),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function $_(t,e,i){var n=e.coordinateSystem;t.each(function(o){var a,r=t.getItemModel(o),s=Mr(r.get("x"),i.getWidth()),l=Mr(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)a=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),h=t.get(n.dimensions[1],o);a=n.dataToPoint([u,h])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),t.setItemLayout(o,a)})}function J_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var o=new dL(n,i),a=p(i.get("data"),x(U_,e));return t&&(a=m(a,x(j_,t))),o.initData(a,null,t?q_:function(t){return t.value}),o}function Q_(t){return!isNaN(t)&&!isFinite(t)}function tw(t,e,i,n){var o=1-t,a=n.dimensions[t];return Q_(e[o])&&Q_(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function ew(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(tw(1,i,n,t)||tw(0,i,n,t)))return!0}return j_(t,e[0])&&j_(t,e[1])}function iw(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get("x"),o.getWidth()),u=Mr(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;Q_(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):Q_(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}function nw(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var o=new dL(n,i),a=new dL(n,i),r=new dL([],i),l=p(i.get("data"),x(lB,e,t,i));t&&(l=m(l,x(ew,t)));var u=t?q_:function(t){return t.value};return o.initData(p(l,function(t){return t[0]}),null,u),a.initData(p(l,function(t){return t[1]}),null,u),r.initData(p(l,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}function ow(t){return!isNaN(t)&&!isFinite(t)}function aw(t,e,i){var n=1-t;return ow(e[n])&&ow(i[n])}function rw(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(aw(1,i,n,t)||aw(0,i,n,t))?!0:j_(t,{coord:i,x:e.x0,y:e.y0})||j_(t,{coord:n,x:e.x1,y:e.y1})}function sw(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get(i[0]),o.getWidth()),u=Mr(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampData&&r.clampData(d,d),a=r.dataToPoint(d,!0)}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);ow(h)?a[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):ow(c)&&(a[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}function lw(t,e,i){var n,o,a=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),o=new dL(p(a,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],o=new dL(n,i));var r=p(i.get("data"),x(uB,e,t,i));t&&(r=m(r,x(rw,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(r,null,l),o.hasItemOption=!0,o}function uw(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),hw(t),cw(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});cw(n,"position")||(n.position=t.controlPosition),"none"!==n.position||cw(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){S(t)&&!_(t)&&(!cw(t,"value")&&cw(t,"name")&&(t.value=t.name),hw(t))})}function hw(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};f(n,function(t,e){a[e]||cw(o,e)||(o[e]=t)}),i.label&&!cw(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function cw(t,e){return t.hasOwnProperty(e)}function dw(t,e){return ts(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function fw(t,e,i,n){var o=n.style,a=cr(t.get(e),n||{},new Ti(i[0],i[1],i[2],i[3]));return o&&a.setStyle(o),a}function pw(t,e,i,n,a,r){var s=e.get("color");if(a)a.setColor(s),i.add(a),r&&r.onUpdate(a);else{var l=t.get("symbol");a=oc(l,-1,-1,2,2,s),a.setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a)}var u=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(u),n=o({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=Mr(c[0],h[0]),d[1]+=Mr(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function gw(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}function mw(t){return u(_B,t)>=0}function vw(t,e){t=t.slice();var i=p(t,jr);e=(e||[]).slice();var n=p(e,jr);return function(o,a){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function o(t,n){var o=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function r(t){!n(t,s)&&o(t,s)&&(a(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;a(i,s);var l;do l=!1,t(r);while(l);return s}}function xw(t,e,i){var n=[1/0,-1/0];return bB(i,function(t){var i=t.getData();i&&bB(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function ww(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Cr(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function bw(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;bB(["min","max"],function(o){var a=i.get(o+"Span"),r=i.get(o+"ValueSpan");null!=r&&(r=t.getAxisModel().axis.scale.parse(r)),null!=r?a=Sr(n[0]+r,n,[0,100],!0):null!=a&&(r=Sr(a,[0,100],n,!0)-n[0]),e[o+"Span"]=a,e[o+"ValueSpan"]=r})}function Sw(t){var e={};return IB(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Mw(t,e){var i=t._rangePropMode,n=t.get("rangeMode");IB([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Iw(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Tw(t){return"vertical"===t?"ns-resize":"ew-resize"}function Aw(t,e){var i=Lw(t),n=e.dataZoomId,o=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,o)<0&&(delete i[n],t.count--)}),Pw(i);var a=i[o];a||(a=i[o]={coordId:o,dataZoomInfos:{},count:0},a.controller=kw(t,a),a.dispatchAction=x(Ow,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=Ew(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Sl(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Dw(t,e){var i=Lw(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Pw(i)}function Cw(t){return t.type+"\x00_"+t.id}function Lw(t){var e=t.getZr();return e[WB]||(e[WB]={})}function kw(t,e){var i=new up(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function Pw(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Ow(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Ew(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return f(t,function(t){var a=t.dataZoomModel,r=a.get("disabled",!0)?!1:a.get("zoomLock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),o&=a.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}function Nw(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return zN(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function zw(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function Rw(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Bw(t,e,i){function o(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var a={};return qB(e,function(e){var r=a[e]=o();qB(t[e],function(t,o){if(kO.isValidType(o)){var a={type:o,visual:t};i&&i(a,e),r[o]=new kO(a),"opacity"===o&&(a=n(a),a.type="colorAlpha",r.__hidden.__alphaForOpacity=new kO(a))}})}),a}function Vw(t,e,i){var o;f(i,function(t){e.hasOwnProperty(t)&&Rw(e[t])&&(o=!0)}),o&&f(i,function(i){e.hasOwnProperty(i)&&Rw(e[i])?t[i]=n(e[i]):delete t[i]})}function Gw(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};f(t,function(t){var i=kO.prepareVisualTypes(e[t]);u[t]=i});var h;null==a?i.each(l):i.each([a],l)}function Fw(t,e,i,n){function o(t,o){function r(t){return o.getItemVisual(l,t)}function s(t,e){o.setItemVisual(l,t,e)}null!=n&&(n=o.getDimension(n));for(var l;null!=(l=t.next());){var u=o.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?o.get(n,l,!0):l,c=i(h),d=e[c],f=a[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}var a={};return f(t,function(t){var i=kO.prepareVisualTypes(e[t]);a[t]=i}),{progress:o}}function Ww(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range,a=e[t];return Hw(a,o)}},rect:function(n,o,a){if(n){var r=a.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(a,n,o)})}function Uw(t){return t[0]>t[1]&&t.reverse(),t}function Xw(t,e){return co(t,e,{includeMainTypes:eV})}function Yw(t,e,i,n){eS&&O("cartesian2d"===i.type,"lineX/lineY brush is available only in cartesian2d.");var o=i.getAxis(["x","y"][t]),a=Uw(p([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[0/0,0/0],{values:a,xyMinMax:r}}function jw(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function qw(t,e){var i=Kw(t),n=Kw(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function Kw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function $w(t){t.eachComponent({mainType:"brush"},function(e){var i=e.brushTargetManager=new Zw(e.option,t);i.setInputRanges(e.areas,t)})}function Jw(t,e,i,n,o){if(o){var a=t.getZr();if(!a[hV]){a[uV]||(a[uV]=Qw);var r=Sl(a,uV,i,e);r(t,n)}}}function Qw(t,e){if(!t.isDisposed()){var i=t.getZr();i[hV]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[hV]=!1}}function tb(t,e,i,n){for(var o=0,a=e.length;a>o;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function eb(t){var e=t.brushSelector;if(b(e)){var i=[];return f(KB,function(t,n){i[n]=function(i,n,o,a){var r=n.getItemLayout(i);return t[e](r,o,a)}}),i}if(w(e)){var n={};return f(KB,function(t,i){n[i]=e}),n}return e}function ib(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function nb(t){var e=t.selectors={};return f(KB[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function ob(t){return new Ti(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function ab(t,e){return o({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new mr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function rb(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function sb(t,e){pV[t]=e}function lb(t){return pV[t]}function ub(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function hb(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function cb(t,e,i,n){function o(t){return l[t]}function a(t,e){l[t]=e}for(var r=e.targetVisuals[n],s=kO.prepareVisualTypes(r),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,o,a)}return l.color}function db(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,o=(i[1]-i[0])/n,a=i[0],r=[],s=0;n>=s&∾c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ts(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function pb(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function gb(t,e,i,n){return new WT({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){ES(t.event)},ondragend:n})}function mb(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function vb(t,e,i,n){return t?[[0,-NV(e,zV(i,0))],[BV,0],[0,NV(e,zV(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function yb(t,e,i){var n=RV/2,o=t.get("hoverLinkDataSize");return o&&(n=OV(o,e,i,!0)/2),n}function xb(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function _b(t){return"vertical"===t?"ns-resize":"ew-resize"}function wb(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function bb(t){return 0===t.indexOf("my")}function Sb(t){this.model=t}function Mb(t){this.model=t}function Ib(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var o=t.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)i.push(t);else{var a=o.getBaseAxis();if("category"===a.type){var r=a.dim+"_"+a.index;e[r]||(e[r]={categoryAxis:a,valueAxis:o.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function Tb(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,o=n.dim,a=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getCategories()];f(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(o),function(t){return t}))});for(var s=[a.join(QV)],l=0;lr;r++)n[r]=arguments[r];i.push((a?a+QV:"")+n.join(QV))}),i.join("\n")}).join("\n\n"+JV+"\n\n")}function Db(t){var e=Ib(t);return{value:m([Tb(e.seriesGroupByCategoryAxis),Ab(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+JV+"\n\n"),meta:e.meta}}function Cb(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Lb(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(QV)>=0?!0:void 0}function kb(t){for(var e=t.split(/\n+/g),i=Cb(e.shift()).split(tG),n=[],o=p(i,function(t){return{name:t,data:[]}}),a=0;a=0;o--){var a=i[o];if(a[n])break}if(0>o){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var s=r.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function Rb(t){var e=Gb(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return eG(i,function(t,i){for(var o=e.length-1;o>=0;o--){var t=e[o][i];if(t){n[i]=t;break}}}),n}function Bb(t){t[iG]=null}function Vb(t){return Gb(t).length}function Gb(t){var e=t[iG];return e||(e=t[iG]=[{}]),e}function Fb(t,e,i){(this._brushController=new Hm(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function Wb(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function Hb(t,e){t.setIconStatus("back",Vb(e)>1?"emphasis":"normal")}function Zb(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new Zw(Wb(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(a?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}function Ub(t){this.model=t}function Xb(t,e,i,n){var o=i.type;eS&&O(o,"graphic type MUST be set");var a=hG.hasOwnProperty(o)?hG[o]:wa(o);eS&&O(a,"graphic type can not be found");var r=new a(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function Yb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Yb(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function jb(t){return t=r({},t),f(["id","parentId","$action","hv","bounding"].concat(RA),function(e){delete t[e]}),t}function qb(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Kb(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function $b(t,e,i){var n=r({},i),a=t[e],s=i.$action||"merge";if("merge"===s)if(a){if(eS){var l=i.type;O(!l||a.type===l,'Please set $action: "replace" to change `type`')}o(a,n,!0),ns(a,n,{ignoreSize:!0}),as(i,a)}else t[e]=n;else"replace"===s?t[e]=n:"remove"===s&&a&&(t[e]=null)}function Jb(t,e){t&&(t.hv=e.hv=[qb(e,["left","right"]),qb(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Qb(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}var tS;"undefined"!=typeof window?tS=window.__DEV__:"undefined"!=typeof global&&(tS=global.__DEV__),"undefined"==typeof tS&&(tS=!0);var eS=tS,iS=2311,nS=function(){return iS++},oS={};oS="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);
-var aS=oS,rS={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},sS={"[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},lS=Object.prototype.toString,uS=Array.prototype,hS=uS.forEach,cS=uS.filter,dS=uS.slice,fS=uS.map,pS=uS.reduce,gS={},mS=function(){return gS.createCanvas()};gS.createCanvas=function(){return document.createElement("canvas")};var vS,yS="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var xS=(Object.freeze||Object)({$override:i,clone:n,merge:o,mergeAll:a,extend:r,defaults:s,createCanvas:mS,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:m,find:v,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:A,retrieve:D,retrieve2:C,retrieve3:L,slice:k,normalizeCssArray:P,assert:O,trim:E,setAsPrimitive:N,isPrimitive:z,createHashMap:B,concatArray:V,noop:G}),_S="undefined"==typeof Float32Array?Array:Float32Array,wS=j,bS=q,SS=ee,MS=ie,IS=(Object.freeze||Object)({create:F,copy:W,clone:H,set:Z,add:U,scaleAndAdd:X,sub:Y,len:j,length:wS,lenSquare:q,lengthSquare:bS,mul:K,div:$,dot:J,scale:Q,normalize:te,distance:ee,dist:SS,distanceSquare:ie,distSquare:MS,negate:ne,lerp:oe,applyTransform:ae,min:re,max:se});le.prototype={constructor:le,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(ue(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(ue(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var TS=Array.prototype.slice,AS=function(t){this._$handlers={},this._$eventProcessor=t};AS.prototype={constructor:AS,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;a>o;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>3&&(n=TS.call(n,1));for(var a=e.length,r=0;a>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;o>4&&(n=TS.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var DS=Math.log(2),CS="___zrEVENTSAVED",LS=[],kS="undefined"!=typeof window&&!!window.addEventListener,PS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,OS=[],ES=kS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},NS=function(){this._track=[]};NS.prototype={constructor:NS,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;r>a;a++){var s=n[a],l=xe(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in zS)if(zS.hasOwnProperty(e)){var i=zS[e](this._track,t);if(i)return i}}};var zS={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&o.length>1&&n&&n.length>1){var a=Te(n)/Te(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=Ae(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},RS="silent";Le.prototype.dispose=function(){};var BS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],VS=function(t,e,i,n){AS.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Le,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};VS.prototype={constructor:VS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(BS,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Pe(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(o=this.findHover(o.x,o.y),a=o.target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var o="on"+e,a=De(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;a>=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ke(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==RS)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new NS);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){VS.prototype[t]=function(e){var i,n,o=e.zrX,a=e.zrY,r=Pe(this,o,a);if("mouseup"===t&&r||(i=this.findHover(o,a),n=i.target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||SS(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(VS,AS),c(VS,le);var GS="undefined"==typeof Float32Array?Array:Float32Array,FS=(Object.freeze||Object)({create:Oe,identity:Ee,copy:Ne,mul:ze,translate:Re,rotate:Be,scale:Ve,invert:Ge,clone:Fe}),WS=Ee,HS=5e-5,ZS=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},US=ZS.prototype;US.transform=null,US.needLocalTransform=function(){return We(this.rotation)||We(this.position[0])||We(this.position[1])||We(this.scale[0]-1)||We(this.scale[1]-1)};var XS=[];US.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&WS(n));n=n||Oe(),i?this.getLocalTransform(n):WS(n),e&&(i?ze(n,t.transform,n):Ne(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(XS);var a=XS[0]<0?-1:1,r=XS[1]<0?-1:1,s=((XS[0]-a)*o+a)/XS[0]||0,l=((XS[1]-r)*o+r)/XS[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Oe(),Ge(this.invTransform,n)},US.getLocalTransform=function(t){return ZS.getLocalTransform(this,t)},US.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)},US.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var YS=[],jS=Oe();US.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;We(e-1)&&(e=Math.sqrt(e)),We(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},US.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ze(YS,t.invTransform,e),e=YS);var i=this.origin;i&&(i[0]||i[1])&&(jS[4]=i[0],jS[5]=i[1],ze(YS,e,jS),YS[4]-=i[0],YS[5]-=i[1],e=YS),this.setLocalTransform(e)}},US.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},US.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ae(i,i,n),i},US.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ae(i,i,n),i},ZS.getLocalTransform=function(t,e){e=e||[],WS(e);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ve(e,e,n),o&&Be(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var qS={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-qS.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*qS.bounceIn(2*t):.5*qS.bounceOut(2*t-1)+.5}};He.prototype={constructor:He,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?qS[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var KS=function(){this.head=null,this.tail=null,this._len=0},$S=KS.prototype;$S.insert=function(t){var e=new JS(t);return this.insertEntry(e),e},$S.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++},$S.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--},$S.len=function(){return this._len},$S.clear=function(){this.head=this.tail=null,this._len=0};var JS=function(t){this.value=t,this.next,this.prev},QS=function(t){this._list=new KS,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},tM=QS.prototype;tM.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new JS(e),r.key=t,i.insertEntry(r),n[t]=r}return o},tM.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},tM.clear=function(){this._list.clear(),this._map={}};var eM={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]},iM=new QS(20),nM=null,oM=ai,aM=ri,rM=(Object.freeze||Object)({parse:ti,lift:ni,toHex:oi,fastLerp:ai,fastMapToColor:oM,lerp:ri,mapToColor:aM,modifyHSL:si,modifyAlpha:li,stringify:ui}),sM=Array.prototype.slice,lM=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||hi,this._setter=n||ci,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};lM.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:xi(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,o=0,a=function(){o--,o||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=bi(this,t,a,this._tracks[r],r,e);s&&(this._clipList.push(s),o++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=o;if(!i)return void fM('Property "'+t+'" is not existed in element '+o.id);var c=o.animators,d=new lM(i,e);return d.during(function(){o.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),a&&a.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){Si(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){Si(this,t,e,i,n,o,a,!0)}};var gM=function(t){ZS.call(this,t),AS.call(this,t),pM.call(this,t),this.id=t.id||nS()};gM.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(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;in||i>s||l>a||o>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Ti(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}}},Ti.create=function(t){return new Ti(t.x,t.y,t.width,t.height)};var xM=function(t){t=t||{},gM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};xM.prototype={constructor:xM,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 xM&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=u(n,t);return 0>o?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof xM&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,aS.canvasSupported&&Ei(i,Ni)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),a=o,o=o.clipPath}if(t.isGroup){for(var r=t._children,s=0;se;e++)this.delRoot(t[e]);else{var o=u(this._roots,t);o>=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof xM&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Ni};var SM={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},MM=function(t,e,i){return SM.hasOwnProperty(e)?i*=t.dpr:i},IM={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},TM=9,AM=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],DM=function(t){this.extendFrom(t,!1)};DM.prototype={constructor:DM,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==IM.STYLE_BIND;t.__attrCachedBy=IM.STYLE_BIND;for(var r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||e!==!0&&(e===!1?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n="radial"===e.type?Ri:zi,o=n(t,e,i),a=e.colorStops,r=0;r=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;eo;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(KM)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;EM(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer($M).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n15)break}}a.__drawIndex=m,a.__drawIndex0&&t>n[0]){for(r=0;o-1>r&&!(n[r]t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n0?JM:0),this._needsManuallyCompositing),s.__builtin__||fM("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.__drawIndex=s.incremental?-1:i,e(i),a=s),n.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?o(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(var r=0;n>r;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=o.length;for(var r=0;n>r;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(EM(t),!e._paused&&e._update())}var e=this;this._running=!0,EM(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var i=new lM(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(nI,AS);var oI=300,aI=aS.domSupported,rI=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),sI={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lI=Fn.prototype;lI.stopPropagation=lI.stopImmediatePropagation=lI.preventDefault=G;var uI={mousedown:function(t){t=be(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=be(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Xn(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=be(this.dom,t),Xn(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=be(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Gn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=be(this.dom,t),Bn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),uI.mousemove.call(this,t),uI.mousedown.call(this,t)},touchmove:function(t){t=be(this.dom,t),Bn(t),this.handler.processGesture(t,"change"),uI.mousemove.call(this,t)},touchend:function(t){t=be(this.dom,t),Bn(t),this.handler.processGesture(t,"end"),uI.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},DI=AI([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),CI={getLineStyle:function(t){var e=DI(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?!1:"dashed"===e?[n,n]:[i,i]}},LI=AI([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),kI={getAreaStyle:function(t,e){return LI(this,t,e)}},PI=Math.pow,OI=Math.sqrt,EI=1e-8,NI=1e-4,zI=OI(3),RI=1/3,BI=F(),VI=F(),GI=F(),FI=Math.min,WI=Math.max,HI=Math.sin,ZI=Math.cos,UI=2*Math.PI,XI=F(),YI=F(),jI=F(),qI=[],KI=[],$I={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},JI=[],QI=[],tT=[],eT=[],iT=Math.min,nT=Math.max,oT=Math.cos,aT=Math.sin,rT=Math.sqrt,sT=Math.abs,lT="undefined"!=typeof Float32Array,uT=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};uT.prototype={constructor:uT,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=sT(i/cM/t)||0,this._uy=sT(i/cM/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($I.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=sT(t-this._xi)>this._ux||sT(e-this._yi)>this._uy||this._len<5;return this.addData($I.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,o,a){return this.addData($I.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData($I.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,o,a){return this.addData($I.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=oT(o)*i+t,this._yi=aT(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData($I.R,t,e,i,n),this},closePath:function(){this.addData($I.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;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;e>o;o++)i+=t[o].len();lT&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var o=0;e>o;o++)for(var a=t[o].data,r=0;re.length&&(this._expandData(),e=this.data);for(var i=0;ia&&(a=o+a),a%=o,f-=a*h,p-=a*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=r[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?iT(f,t):nT(f,t),c>=0?iT(p,e):nT(p,e));h=f-t,c=p-e,this._dashOffset=-rT(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Ao,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=rT(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(r=(w-d)/y;1>=r;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-rT(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=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,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,lT&&(this.data=new Float32Array(t)))},getBoundingRect:function(){JI[0]=JI[1]=tT[0]=tT[1]=Number.MAX_VALUE,QI[0]=QI[1]=eT[0]=eT[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;ac;){var d=s[c++];switch(1===c&&(n=s[c],o=s[c+1],e=n,i=o),d){case $I.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case $I.L:a=s[c++],r=s[c++],(sT(a-n)>l||sT(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case $I.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case $I.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case $I.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=Math.abs(g-m)>.001,I=v+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,I,1-_),1===c&&(e=oT(v)*g+f,i=aT(v)*m+p),n=oT(I)*g+f,o=aT(I)*m+p;break;case $I.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case $I.Z:t.closePath(),n=e,o=i}}}},uT.CMD=$I;var hT=2*Math.PI,cT=2*Math.PI,dT=uT.CMD,fT=2*Math.PI,pT=1e-4,gT=[-1,-1,-1],mT=[-1,-1],vT=PM.prototype.getCanvasPattern,yT=Math.abs,xT=new uT(!0);oa.prototype={constructor:oa,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||xT,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=vT.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=vT.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new uT},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new uT),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),na(a,r/s,t,e)))return!0}if(o.hasFill())return ia(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):An.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(S(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&&yT(t[0]-1)>1e-10&&yT(t[3]-1)>1e-10?Math.sqrt(yT(t[0]*t[3]-t[2]*t[1])):1}},oa.extend=function(t){var e=function(e){oa.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 o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};h(e,oa);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(oa,An);var _T=uT.CMD,wT=[[],[],[]],bT=Math.sqrt,ST=Math.atan2,MT=function(t,e){var i,n,o,a,r,s,l=t.data,u=_T.M,h=_T.C,c=_T.L,d=_T.R,f=_T.A,p=_T.Q;for(o=0,a=0;or;r++){var s=wT[r];s[0]=l[o++],s[1]=l[o++],ae(s,s,e),l[a++]=s[0],l[a++]=s[1]}}},IT=Math.sqrt,TT=Math.sin,AT=Math.cos,DT=Math.PI,CT=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},LT=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(CT(t)*CT(e))},kT=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;oa;a++)o+=ee(t[a-1],t[a]);var r=o/2;r=i>r?i:r;for(var a=0;r>a;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([ca(s[0],f[0],l[0],u[0],d,p,g),ca(s[1],f[1],l[1],u[1],d,p,g)])}return n},FT=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}o=t[d-1],a=t[d+1]}Y(u,a,o),Q(u,u,e);var g=ee(p,o),m=ee(p,a),v=g+m;0!==v&&(g/=v,m/=v),Q(h,u,-g),Q(c,u,m);var y=U([],p,h),x=U([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},WT=oa.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){da(t,e,!0)}}),HT=oa.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){da(t,e,!1)}}),ZT=Math.round,UT={},XT=oa.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(pa(UT,e,this.style),i=UT.x,n=UT.y,o=UT.width,a=UT.height,UT.r=e.r,e=UT):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?ln(t,e):t.rect(i,n,o,a),t.closePath()}}),YT={},jT=oa.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(fa(YT,e,this.style),i=YT.x1,n=YT.y1,o=YT.x2,a=YT.y2):(i=e.x1,n=e.y1,o=e.x2,a=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),1>r&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),qT=[],KT=oa.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Ro(i,r,o,h,qT),r=qT[1],o=qT[2],Ro(n,s,a,h,qT),s=qT[1],a=qT[2]),t.quadraticCurveTo(r,s,o,a)):(1>h&&(ko(i,r,l,o,h,qT),r=qT[1],l=qT[2],o=qT[3],ko(n,s,u,a,h,qT),s=qT[1],u=qT[2],a=qT[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return ma(this.shape,t,!1)},tangentAt:function(t){var e=ma(this.shape,t,!0);return te(e,e)}}),$T=oa.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),JT=oa.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i"'])/g,kA={"&":"&","<":"<",">":">",'"':""","'":"'"},PA=["a","b","c","d","e","f","g"],OA=function(t,e){return"{"+t+(null==e?"":e)+"}"},EA=$i,NA=(Object.freeze||Object)({addCommas:Gr,toCamelCase:Fr,normalizeCssArray:CA,encodeHTML:Wr,formatTpl:Hr,formatTplSimple:Zr,getTooltipMarker:Ur,formatTime:Yr,capitalFirst:jr,truncateText:EA,getTextBoundingRect:qr,getTextRect:Kr,windowOpen:$r}),zA=f,RA=["left","right","top","bottom","width","height"],BA=[["width","left","right"],["height","top","bottom"]],VA=Jr,GA=(x(Jr,"vertical"),x(Jr,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),FA=ho(),WA=mr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){mr.call(this,t,e,i,n),this.uid=xr("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?os(t):{},a=e.getTheme();o(t,a.get(this.mainType)),o(t,this.getDefaultOption()),i&&ns(t,n,i)},mergeOption:function(t){o(this.option,t,!0);var e=this.layoutMode;e&&ns(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=FA(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=o(a,e[r],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Mo(WA,{registerWhenExtend:!0}),_r(WA),wr(WA,rs),c(WA,GA);var HA="";"undefined"!=typeof navigator&&(HA=navigator.platform||"");var ZA={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:HA.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},UA=ho(),XA={clearColorPalette:function(){UA(this).colorIdx=0,UA(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=UA(e),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=to(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?ss(s,i):r;if(l=l||r,l&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},YA="original",jA="arrayRows",qA="objectRows",KA="keyedColumns",$A="unknown",JA="typedArray",QA="column",tD="row";ls.seriesDataToSource=function(t){return new ls({data:t,sourceFormat:I(t)?JA:YA,fromDataset:!1})},wo(ls);var eD={Must:1,Might:2,Not:3},iD=ho(),nD="\x00_ec_inner",oD=mr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new mr(i),this._optionManager=n},setOption:function(t,e){O(!(nD 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)):Ms.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var o=to(t[e]),s=oo(a.get(e),o);ao(s),f(s,function(t){var i=t.option;S(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Ts(e,i,t.exist))});var l=Is(a,n);i[e]=[],a.set(e,[]),f(s,function(t,n){var o=t.exist,s=t.option;if(O(S(s)||o,"Empty component definition"),s){var u=WA.getClass(e,t.keyInfo.subType,!0);if(o&&o.constructor===u)o.name=t.keyInfo.name,o.mergeOption(s,this),o.optionUpdated(s,!1);else{var h=r({dependentModels:l,componentIndex:n},t.keyInfo);o=new u(s,this,this,h),r(o,h),o.init(s,this,this,h),o.optionUpdated(null,!0)}}else o.mergeOption({},this),o.optionUpdated({},!1);a.get(e)[n]=o,i[e][n]=o.option},this),"series"===e&&As(this,a.get("series"))}var i=this.option,a=this._componentsMap,s=[];cs(this),f(t,function(t,e){null!=t&&(WA.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):o(i[e],t,!0))}),WA.topologicalTravel(s,WA.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(WA.hasClass(i)){for(var e=to(e),n=e.length-1;n>=0;n--)so(e[n])&&e.splice(n,1);t[i]=e}}),delete t[nD],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(a,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var l=_(o);r=m(a,function(t){return l&&u(o,t.name)>=0||!l&&t.name===o})}else r=a.slice();return Ds(r,t)},findComponents:function(t){function e(t){var e=o+"Index",i=o+"Id",n=o+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:o,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,o=t.mainType,a=e(n),r=a?this.queryComponents(a):this._componentsMap.get(o);return i(Ds(r,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,o){e.call(i,n,t,o)})});else if(b(t))f(n.get(t),e,i);else if(S(t)){var o=this.findComponents(t);f(o,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return m(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 m(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Cs(this),f(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){Cs(this),f(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return f(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return Cs(this),null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Cs(this);var i=m(this._componentsMap.get("series"),t,e);As(this,i)},restoreData:function(t){var e=this._componentsMap;As(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),WA.topologicalTravel(i,WA.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!bs(e,t))&&e.restoreData()})})}});c(oD,XA);var aD=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],rD={};ks.prototype={constructor:ks,create:function(t,e){var i=[];f(rD,function(n){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ks.register=function(t,e){rD[t]=e},ks.get=function(t){return rD[t]};var sD=f,lD=n,uD=p,hD=o,cD=/^(min|max)?(.+)$/;Ps.prototype={constructor:Ps,setOption:function(t,e){t&&f(to(t.series),function(t){t&&t.data&&I(t.data)&&N(t.data)}),t=lD(t);var i=this._optionBackup,n=Os.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Rs(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=uD(e.timelineOptions,lD),this._mediaList=uD(e.mediaList,lD),this._mediaDefault=lD(e.mediaDefault),this._currentMediaIndices=[],lD(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=lD(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,o=[],a=[];if(!i.length&&!n)return a;for(var r=0,s=i.length;s>r;r++)Es(i[r].query,t,e)&&o.push(r);return!o.length&&n&&(o=[-1]),o.length&&!zs(o,this._currentMediaIndices)&&(a=uD(o,function(t){return lD(-1===t?n.option:i[t].option)})),this._currentMediaIndices=o,a}};var dD=f,fD=S,pD=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],gD=function(t,e){dD(Zs(t.series),function(t){fD(t)&&Hs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),dD(i,function(e){dD(Zs(t[e]),function(t){t&&(Fs(t,"axisLabel"),Fs(t.axisPointer,"label"))})}),dD(Zs(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Fs(e,"axisLabel"),Fs(e&&e.axisPointer,"label")}),dD(Zs(t.calendar),function(t){Vs(t,"itemStyle"),Fs(t,"dayLabel"),Fs(t,"monthLabel"),Fs(t,"yearLabel")}),dD(Zs(t.radar),function(t){Fs(t,"name")}),dD(Zs(t.geo),function(t){fD(t)&&(Ws(t),dD(Zs(t.regions),function(t){Ws(t)}))}),dD(Zs(t.timeline),function(t){Ws(t),Vs(t,"label"),Vs(t,"itemStyle"),Vs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Vs(t,"label"),Vs(t,"itemStyle"))})}),dD(Zs(t.toolbox),function(t){Vs(t,"iconStyle"),dD(t.feature,function(t){Vs(t,"iconStyle")})}),Fs(Us(t.axisPointer),"label"),Fs(Us(t.tooltip).axisPointer,"label")},mD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],vD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],yD=function(t,e){gD(t,e),t.series=to(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Xs(t,"pointer.color");null!=i&&Ys(t,"itemStyle.color",i)}js(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(vD,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){js(t)}))})},xD=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(qs)},_D=Ks.prototype;_D.pure=!1,_D.persistent=!0,_D.getSource=function(){return this._source};var wD={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Qs},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(r!==l||s!==u)&&(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=ll(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(i?(eS&&O(null!=i._outputDueEnd),this._dueEnd=i._outputDueEnd):(eS&&O(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;g=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var AD=function(){function t(){return i>n?n++:null}function e(){var t=n%r*o+Math.ceil(n/r),e=n>=i?null:a>t?t:n;return n++,e}var i,n,o,a,r,s={reset:function(l,u,h,c){n=l,i=u,o=h,a=c,r=Math.ceil(a/o),s.next=o>1&&a>0?e:t}};return s}();TD.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},TD.unfinished=function(){return this._progress&&this._dueIndex":"",m=p+s.join(p||", ");return{renderMode:n,content:m,style:u}}function a(t){return{renderMode:n,content:Wr(Gr(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,m=this.getRawValue(t),v=_(m),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?o(m):a(p?nl(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesIndex+"at"+h,M=Ur({color:y,type:"item",renderMode:n,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;ro(this)||(T=""),T=T?Wr(T)+(e?": ":s):"";var A="string"==typeof M?M:M.content,D=e?A+T+w:T+A+(I?Wr(I)+": "+w:w);return{html:D,markers:u}},isAnimationEnabled:function(){if(aS.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=XA.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(CD,ID),c(CD,XA);var LD=function(){this.group=new xM,this.uid=xr("viewComponent")};LD.prototype={constructor:LD,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var kD=LD.prototype;kD.updateView=kD.updateLayout=kD.updateVisual=function(){},_o(LD),Mo(LD,{registerWhenExtend:!0});
-var PD=function(){var t=ho();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(o^r||a^s)&&"reset"}},OD=ho(),ED=PD();vl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){xl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){xl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var ND=vl.prototype;ND.updateView=ND.updateLayout=ND.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},_o(vl,["dispose"]),Mo(vl,{registerWhenExtend:!0}),vl.markUpdateMethod=function(t,e){OD(t).updateMethod=e};var zD={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},RD="\x00__throttleOriginMethod",BD="\x00__throttleRate",VD="\x00__throttleType",GD={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n),a=!w(o)||o instanceof QT?null:o;(!o||a)&&(o=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",o);var r=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(r);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){a&&i.each(function(e){i.setItemVisual(e,"color",a(t.getDataParams(e)))});var l=function(t,e){var i=t.getItemModel(e),o=i.get(n,!0),a=i.get(r,!0);null!=o&&t.setItemVisual(e,"color",o),null!=a&&t.setItemVisual(e,"borderColor",a)};return{dataEach:i.hasItemOption?l:null}}}},FD={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},WD=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=FD.aria,o=0;os)){var d=o();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var o,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";o=n(r?l+"withName":l+"withoutName"),o=i(o,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:a(t.subType)});var h=t.getData();window.data=h,o+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;ff){var g=h.getName(f),m=nl(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}o+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(o)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},HD=Math.PI,ZD=function(t,e){e=e||{},s(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new xM,n=new XT({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var o=e.fontSize+" sans-serif",a=new XT({style:{fill:"none",text:e.text,font:o,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(a),e.showSpinner){var r=new $T({shape:{startAngle:-HD/2,endAngle:-HD/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});r.animateShape(!0).when(1e3,{endAngle:3*HD/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*HD/2}).delay(300).start("circularInOut"),i.add(r)}return i.resize=function(){var i=Zi(e.text,o),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},UD=Il.prototype;UD.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},UD.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,a=o?i.step:null,r=n&&n.modDataCount,s=null!=r?Math.ceil(r/a):null;return{step:a,modBy:s,modDataCount:r}}},UD.getPipeline=function(t){return this._pipelineMap.get(t)},UD.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),o=n.count(),a=i.progressiveEnabled&&e.incrementalPrepareRender&&o>=i.threshold,r=t.get("large")&&o>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?o:null;t.pipelineContext=i.context={progressiveRender:a,modDataCount:s,large:r}},UD.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Rl(e,t,t.dataTask)})},UD.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Al(this,n,o,e,i),n.overallReset&&Dl(this,n,o,e,i)},this)},UD.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,Rl(this,e,o)},UD.performDataProcessorTasks=function(t,e){Tl(this,this._dataProcessorHandlers,t,e,{block:!0})},UD.performVisualTasks=function(t,e,i){Tl(this,this._visualHandlers,t,e,i)},UD.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},UD.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var XD=UD.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},YD=Nl(0);Il.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:Bl(t)}),t.uid=xr("stageHandler"),e&&(t.visualType=e),t};var jD,qD={},KD={};Vl(qD,oD),Vl(KD,Ls),qD.eachSeriesByType=qD.eachRawSeriesByType=function(t){jD=t},qD.eachComponent=function(t){"series"===t.mainType&&t.subType&&(jD=t.subType)};var $D=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],JD={color:$D,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$D]},QD="#eee",tC=function(){return{axisLine:{lineStyle:{color:QD}},axisTick:{lineStyle:{color:QD}},axisLabel:{textStyle:{color:QD}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:QD}}}},eC=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],iC={color:eC,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:QD},crossStyle:{color:QD},label:{color:"#000"}}},legend:{textStyle:{color:QD}},textStyle:{color:QD},title:{textStyle:{color:QD}},toolbox:{iconStyle:{normal:{borderColor:QD}}},dataZoom:{textStyle:{color:QD}},visualMap:{textStyle:{color:QD}},timeline:{lineStyle:{color:QD},itemStyle:{normal:{color:eC[1]}},label:{normal:{textStyle:{color:QD}}},controlStyle:{normal:{color:QD,borderColor:QD}}},timeAxis:tC(),logAxis:tC(),valueAxis:tC(),categoryAxis:tC(),line:{symbol:"circle"},graph:{color:eC},gauge:{title:{textStyle:{color:QD}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};iC.categoryAxis.splitLine.show=!1,WA.extend({type:"dataset",defaultOption:{seriesLayoutBy:QA,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){us(this)}}),LD.extend({type:"dataset"});var nC=oa.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),oC=/[\s,]+/;Fl.prototype.parse=function(t,e){e=e||{};var i=Gl(t);if(!i)throw new Error("Illegal svg");var n=new xM;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),Ul(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=E(o).split(oC);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=ql(l,a,r),!e.ignoreViewBox)){var c=n;n=new xM,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new XT({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},Fl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var o=rC[i];if(o){var a=o.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=a)}}else{var o=aC[i];o&&(n=o.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Fl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new ET({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Hl(e,o),Ul(t,o,this._defs);var a=o.style.fontSize;a&&9>a&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var aC={g:function(t,e){var i=new xM;return Hl(e,i),Ul(t,i,this._defs),i},rect:function(t,e){var i=new XT;return Hl(e,i),Ul(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new NT;return Hl(e,i),Ul(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new jT;return Hl(e,i),Ul(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new nC;return Hl(e,i),Ul(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Zl(i));var n=new WT({shape:{points:i||[]}});return Hl(e,n),Ul(t,n,this._defs),n},polyline:function(t,e){var i=new oa;Hl(e,i),Ul(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Zl(n));var o=new HT({shape:{points:n||[]}});return o},image:function(t,e){var i=new Dn;return Hl(e,i),Ul(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new xM;return Hl(e,r),Ul(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new xM;return Hl(e,r),Ul(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=t.getAttribute("d")||"",n=la(i);return Hl(e,n),Ul(t,n,this._defs),n}},rC={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new tA(e,i,n,o);return Wl(t,a),a},radialgradient:function(){}},sC={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},lC=/url\(\s*#(.*?)\)/,uC=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,hC=/([^\s:;]+)\s*:\s*([^:;]+)/g,cC=B(),dC={registerMap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=fC[e];eS&&O(i,"Illegal map type: "+e),i(t)}),cC.set(t,n)},retrieveMap:function(t){return cC.get(t)}},fC={geoJSON:function(t){var e=t.source;t.geoJSON=b(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Gl(t.source)}},pC=O,gC=f,mC=w,vC=S,yC=WA.parseClassType,xC="4.9.0",_C={zrender:"4.3.2"},wC=1,bC=1e3,SC=800,MC=900,IC=5e3,TC=1e3,AC=1100,DC=2e3,CC=3e3,LC=3500,kC=4e3,PC=5e3,OC={PROCESSOR:{FILTER:bC,SERIES_FILTER:SC,STATISTIC:IC},VISUAL:{LAYOUT:TC,PROGRESSIVE_LAYOUT:AC,GLOBAL:DC,CHART:CC,POST_CHART_LAYOUT:LC,COMPONENT:kC,BRUSH:PC}},EC="__flagInMainProcess",NC="__optionUpdated",zC=/^[a-zA-Z0-9_]+$/;Jl.prototype.on=$l("on",!0),Jl.prototype.off=$l("off",!0),Jl.prototype.one=$l("one",!0),c(Jl,AS);var RC=Ql.prototype;RC._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[NC]){var e=this[NC].silent;this[EC]=!0,eu(this),BC.update.call(this),this[EC]=!1,this[NC]=!1,au.call(this,e),ru.call(this,e)}else if(t.unfinished){var i=wC,n=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),nu(this,n),t.performVisualTasks(n),du(this,this._model,o,"remain"),i-=+new Date-a}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},RC.getDom=function(){return this._dom},RC.getZr=function(){return this._zr},RC.setOption=function(t,e,i){if(eS&&pC(!this[EC],"`setOption` should not be called during main process."),this._disposed)return void pu(this.id);var n;if(vC(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[EC]=!0,!this._model||e){var o=new Ps(this._api),a=this._theme,r=this._model=new oD;r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,HC),i?(this[NC]={silent:n},this[EC]=!1):(eu(this),BC.update.call(this),this._zr.flush(),this[NC]=!1,this[EC]=!1,au.call(this,n),ru.call(this,n))},RC.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},RC.getModel=function(){return this._model},RC.getOption=function(){return this._model&&this._model.getOption()},RC.getWidth=function(){return this._zr.getWidth()},RC.getHeight=function(){return this._zr.getHeight()},RC.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},RC.getRenderedCanvas=function(t){if(aS.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},RC.getSvgDataURL=function(){if(aS.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},RC.getDataURL=function(t){if(this._disposed)return void pu(this.id);t=t||{};var e=t.excludeComponents,i=this._model,n=[],o=this;gC(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return gC(n,function(t){t.group.ignore=!1}),a},RC.getConnectedDataURL=function(t){if(this._disposed)return void pu(this.id);if(aS.canvasSupported){var e="svg"===t.type,i=this.group,o=Math.min,a=Math.max,r=1/0;if(qC[i]){var s=r,l=r,u=-r,h=-r,c=[],d=t&&t.pixelRatio||1;f(jC,function(r){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(n(t)),f=r.getDom().getBoundingClientRect();s=o(f.left,s),l=o(f.top,l),u=a(f.right,u),h=a(f.bottom,h),c.push({dom:d,left:f.left,top:f.top})}}),s*=d,l*=d,u*=d,h*=d;var p=u-s,g=h-l,m=mS(),v=qn(m,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:g}),e){var y="";return gC(c,function(t){var e=t.left-s,i=t.top-l;y+=''+t.dom+""}),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new XT({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),gC(c,function(t){var e=new Dn({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});v.add(e)}),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},RC.convertToPixel=x(tu,"convertToPixel"),RC.convertFromPixel=x(tu,"convertFromPixel"),RC.containPixel=function(t,e){if(this._disposed)return void pu(this.id);var i,n=this._model;return t=co(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint?i|=a.containPoint(e,t):eS&&console.warn(n+": "+(a?"The found component do not support containPoint.":"No view mapping to the found component."))}else eS&&console.warn(n+": containPoint is not supported")},this)},this),!!i},RC.getVisual=function(t,e){var i=this._model;t=co(i,t,{defaultMainType:"series"});var n=t.seriesModel;eS&&(n||console.warn("There is no specified seires model"));var o=n.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?o.indexOfRawIndex(t.dataIndex):null;return null!=a?o.getItemVisual(a,e):o.getVisual(e)},RC.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},RC.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var BC={prepareAndUpdate:function(t){eu(this),BC.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),nu(this,e),o.update(e,i),uu(e),a.performVisualTasks(e,t),hu(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(aS.canvasSupported)n.setBackgroundColor(r);else{var s=ti(r);r=ui(s,"rgb"),0===s[3]&&(r="transparent")}fu(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=B();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),uu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),du(i,e,n,t,a),fu(e,this._api)}},updateView:function(t){var e=this._model;e&&(vl.markUpdateMethod(t,"updateView"),uu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),hu(this,this._model,this._api,t),fu(e,this._api))},updateVisual:function(t){BC.update.call(this,t)},updateLayout:function(t){BC.update.call(this,t)}};RC.resize=function(t){if(eS&&pC(!this[EC],"`resize` should not be called during main process."),this._disposed)return void pu(this.id);this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[EC]=!0,i&&eu(this),BC.update.call(this),this[EC]=!1,au.call(this,n),ru.call(this,n)}},RC.showLoading=function(t,e){if(this._disposed)return void pu(this.id);if(vC(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!YC[t])return void(eS&&console.warn("Loading effects "+t+" not exists."));var i=YC[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},RC.hideLoading=function(){return this._disposed?void pu(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),void(this._loadingFX=null))},RC.makeActionFromEvent=function(t){var e=r({},t);return e.type=FC[t.type],e},RC.dispatchAction=function(t,e){if(this._disposed)return void pu(this.id);if(vC(e)||(e={silent:!!e}),GC[t.type]&&this._model){if(this[EC])return void this._pendingActions.push(t);ou.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&aS.browser.weChat&&this._throttledZrFlush(),au.call(this,e.silent),ru.call(this,e.silent)}},RC.appendData=function(t){if(this._disposed)return void pu(this.id);var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);eS&&pC(t.data&&n),n.appendData(t),this._scheduler.unfinished=!0},RC.on=$l("on",!1),RC.off=$l("off",!1),RC.one=$l("one",!1);var VC=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];RC._initEvents=function(){gC(VC,function(t){var e=function(e){var i,n=this.getModel(),o=e.target,a="globalout"===t;if(a)i={};else if(o&&null!=o.dataIndex){var s=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=s&&s.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=r({},o.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];eS&&(a||h&&c||console.warn("model or view can not be found by params")),i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),gC(FC,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},RC.isDisposed=function(){return this._disposed},RC.clear=function(){return this._disposed?void pu(this.id):void this.setOption({series:[]},!0)},RC.dispose=function(){if(this._disposed)return void pu(this.id);this._disposed=!0,po(this.getDom(),JC,"");var t=this._api,e=this._model;gC(this._componentsViews,function(i){i.dispose(e,t)}),gC(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete jC[this.id]},c(Ql,AS),xu.prototype={constructor:xu,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var o=yC(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};f(t,function(t,o){for(var s=!1,l=0;l0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,a=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,r,"mainType")&&i(l,r,"subType")&&i(l,r,"index","componentIndex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,a,"name")&&i(u,a,"dataIndex")&&i(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a))},afterTrigger:function(){this.eventInfo=null}};var GC={},FC={},WC=[],HC=[],ZC=[],UC=[],XC={},YC={},jC={},qC={},KC=new Date-0,$C=new Date-0,JC="_echarts_instance_",QC=Su;Nu(DC,GD),Du(yD),Cu(MC,xD),Ru("default",ZD),ku({type:"highlight",event:"highlight",update:"highlight"},G),ku({type:"downplay",event:"downplay",update:"downplay"},G),Au("light",JD),Au("dark",iC);var tL={};Xu.prototype={constructor:Xu,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n={},o={},a=[],r=[];for(Yu(e,n,a,"_oldKeyGetter",this),Yu(i,o,r,"_newKeyGetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var eL=B(["tooltip","label","itemName","itemId","seriesName"]),iL=S,nL="undefined",oL=-1,aL="e\x00\x00",rL={"float":typeof Float64Array===nL?Array:Float64Array,"int":typeof Int32Array===nL?Array:Int32Array,ordinal:Array,number:Array,time:Array},sL=typeof Uint32Array===nL?Array:Uint32Array,lL=typeof Int32Array===nL?Array:Int32Array,uL=typeof Uint16Array===nL?Array:Uint16Array,hL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],cL=["_extent","_approximateExtent","_rawExtent"],dL=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;ah;h++){var c=o[h];r[c]||(r[c]=dh()),n[c]||(n[c]=[]),ih(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(a),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),m=f%i,v=0;a>v;v++){var c=o[v],y=this._dimValueGetterArrayRows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},nh(this)},fL._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=r[p];c[g]||(c[g]=dh());var m=l[g];0===m.otherDims.itemName&&(i=this._nameDimIdx=p),0===m.otherDims.itemId&&(this._idDimIdx=p),a[g]||(a[g]=[]),ih(a,m,n,f,e),this._chunkCount=a[g].length}for(var v=new Array(s),y=t;e>y;y++){v=o.getItem(y,v);for(var x=Math.floor(y/n),_=y%n,w=0;s>w;w++){var g=r[w],b=a[g][x],S=this._dimValueGetter(v,g,y,w);b[_]=S;var M=c[g];SM[1]&&(M[1]=S)}if(!o.pure){var I=u[y];if(v&&null==I)if(null!=v.name)u[y]=I=v.name;else if(null!=i){var T=r[i],A=a[T][x];if(A){I=A[_];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==v?null:v.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[y]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},nh(this)}},fL.count=function(){return this._count},fL.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var o=0;n>o;o++)t[o]=e[o]}else t=new i(e.buffer,0,n)}else for(var i=Qu(this),t=new i(this.count()),o=0;o=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},fL.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;
-return!0},fL.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=dh();if(!e)return i;var n,o=this.count(),a=!this._indices;if(a)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;o>l;l++){var u=this._getFast(t,this.getRawIndex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},fL.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},fL.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},fL.getCalculationInfo=function(t){return this._calculationInfo[t]},fL.setCalculationInfo=function(t,e){iL(t)?r(this._calculationInfo,t):this._calculationInfo[t]=e},fL.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,o=this.count();o>n;n++){var a=this.get(t,n);isNaN(a)||(i+=a)}return i},fL.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},fL.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t];if(eS&&!i)throw new Error("Do not supported yet");var n=i[e];return null==n||isNaN(n)?oL:n},fL.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},fL.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i=n;){var a=(n+o)/2|0;if(e[a]t))return a;o=a-1}}return-1},fL.indicesOfNearest=function(t,e,i){var n=this._storage,o=n[t],a=[];if(!o)return a;null==i&&(i=1/0);for(var r=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=Math.abs(c);i>=d&&((r>d||d===r&&c>=0&&0>s)&&(r=d,s=c,l=0),c===s&&(a[l++]=u))}return a.length=l,a},fL.getRawIndex=ah,fL.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},fL.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(lh(t),this.getDimension,this),eS&&uh(this,t);for(var o=this.count(),a=Qu(this),r=new a(o),s=[],l=t.length,u=0,h=t[0],c=0;o>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getFast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return o>u&&(this._indices=r),this._count=u,this._extent={},this.getRawIndex=this._indices?rh:ah,this}},fL.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);eS&&uh(this,e);var n=e.length;if(n){var o=this.count(),a=Qu(this),r=new a(o),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isNaN(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],S=b[v];(y>=u&&h>=y||isNaN(y))&&(S>=_&&w>=S||isNaN(S))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;o>v;v++){var M=this.getRawIndex(v),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(r[s++]=M)}else for(var v=0;o>v;v++){for(var I=!0,M=this.getRawIndex(v),p=0;n>p;p++){var T=e[p],y=this._getFast(i,M);(yt[T][1])&&(I=!1)}I&&(r[s++]=this.getRawIndex(v))}return o>s&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?rh:ah,this}}},fL.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i),o},fL.map=function(t,e,i,n){i=i||n||this,t=p(lh(t),this.getDimension,this),eS&&uh(this,t);var o=hh(this,t);o._indices=this._indices,o.getRawIndex=o._indices?rh:ah;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return o},fL.downSample=function(t,e,i,n){for(var o=hh(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Qu(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=Math.floor(_/h),b=_%h;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=rh,o},fL.getItemModel=function(t){var e=this.hostModel;return new mr(this.getRawDataItem(t),e,e&&e.ecModel)},fL.diff=function(t){var e=this;return new Xu(t?t.getIndices():[],this.getIndices(),function(e){return sh(t,e)},function(t){return sh(e,t)})},fL.getVisual=function(t){var e=this._visual;return e&&e[t]},fL.setVisual=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},fL.setLayout=function(t,e){if(iL(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},fL.getLayout=function(t){return this._layout[t]},fL.getItemLayout=function(t){return this._itemLayouts[t]},fL.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},fL.clearItemLayouts=function(){this._itemLayouts.length=0},fL.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},fL.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,iL(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},fL.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var pL=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};fL.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(pL,e)),this._graphicEls[t]=e},fL.getItemGraphicEl=function(t){return this._graphicEls[t]},fL.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},fL.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new dL(e,this.hostModel)}if(t._storage=this._storage,eh(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?rh:ah,t},fL.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(k(arguments)))})},fL.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],fL.CHANGABLE_METHODS=["filterSelf","selectRange"];var gL=function(t,e){return e=e||{},fh(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},mL={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(eS){if(!o)throw new Error('xAxis "'+D(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+D(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),yh(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),yh(a)&&(n.set("y",a),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];if(eS&&!o)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],i.set("single",o),yh(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");if(eS){if(!r)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),yh(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),yh(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),yh(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}};Ih.prototype.parse=function(t){return t},Ih.prototype.getSetting=function(t){return this._setting[t]},Ih.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Ih.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ih.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ih.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ih.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Ih.prototype.getExtent=function(){return this._extent.slice()},Ih.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Ih.prototype.isBlank=function(){return this._isBlank},Ih.prototype.setBlank=function(t){this._isBlank=t},Ih.prototype.getLabel=null,_o(Ih),Mo(Ih,{registerWhenExtend:!0}),Th.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,Dh);return new Th({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var vL=Th.prototype;vL.getOrdinal=function(t){return Ah(this).get(t)},vL.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Ah(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var yL=Ih.prototype,xL=Ih.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new Th({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),yL.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return yL.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(yL.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:G,niceExtent:G});xL.create=function(){return new xL};var _L=Ir,wL=Ir,bL=Ih.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]),bL.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=Lh(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;var r=1e4;i[0]r)return[];var l=a.length?a[a.length-1]:n[1];return i[1]>l&&a.push(t?wL(l+e,o):i[1]),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;os;){var c=Ir(r+(s+1)*h);c>n[0]&&co&&(o=-o,n.reverse());var a=Ch(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=wL(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=wL(Math.ceil(e[1]/o)*o))}});bL.create=function(){return new bL};var SL="__ec_stack_",ML=.5,IL="undefined"!=typeof Float32Array?Float32Array:Array,TL={seriesType:"bar",plan:PD(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new IL(2*d),p=new IL(2*d),g=new IL(d),m=[],v=[],y=0,x=0;null!=(i=t.next());)v[h]=e.get(s,i),v[1-h]=e.get(l,i),m=n.dataToPoint(v,null,m),p[y]=u?o.x+o.width:m[0],f[y++]=m[0],p[y]=u?m[1]:o.y+o.height,f[y++]=m[1],g[x++]=i;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Zh(a,r,!1),backgroundStart:u?o.x:o.y,valueAxisHorizontal:u})}if(Wh(t)&&Hh(t)){var i=t.getData(),n=t.coordinateSystem,o=n.grid.getRect(),a=n.getBaseAxis(),r=n.getOtherAxis(a),s=i.mapDimension(r.dim),l=i.mapDimension(a.dim),u=r.isHorizontal(),h=u?0:1,c=Gh(Bh([t]),a,t).width;return c>ML||(c=ML),{progress:e}}}},AL=bL.prototype,DL=Math.ceil,CL=Math.floor,LL=1e3,kL=60*LL,PL=60*kL,OL=24*PL,EL=function(t,e,i,n){for(;n>i;){var o=i+n>>>1;t[o][1]a&&(a=e),null!=i&&a>i&&(a=i);var r=zL.length,s=EL(zL,a,0,r),l=zL[Math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=o/u,c=zr(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(DL((n[0]-d)/u)*u+d),Math.round(CL((n[1]-d)/u)*u+d)];Ph(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Or(t)}});f(["contain","normalize"],function(t){NL.prototype[t]=function(e){return AL[t].call(this,this.parse(e))}});var zL=[["hh:mm:ss",LL],["hh:mm:ss",5*LL],["hh:mm:ss",10*LL],["hh:mm:ss",15*LL],["hh:mm:ss",30*LL],["hh:mm\nMM-dd",kL],["hh:mm\nMM-dd",5*kL],["hh:mm\nMM-dd",10*kL],["hh:mm\nMM-dd",15*kL],["hh:mm\nMM-dd",30*kL],["hh:mm\nMM-dd",PL],["hh:mm\nMM-dd",2*PL],["hh:mm\nMM-dd",6*PL],["hh:mm\nMM-dd",12*PL],["MM-dd\nyyyy",OL],["MM-dd\nyyyy",2*OL],["MM-dd\nyyyy",3*OL],["MM-dd\nyyyy",4*OL],["MM-dd\nyyyy",5*OL],["MM-dd\nyyyy",6*OL],["week",7*OL],["MM-dd\nyyyy",10*OL],["week",14*OL],["week",21*OL],["month",31*OL],["week",42*OL],["month",62*OL],["week",70*OL],["quarter",95*OL],["month",31*OL*4],["month",31*OL*5],["half-year",380*OL/2],["month",31*OL*8],["month",31*OL*10],["year",380*OL]];NL.create=function(t){return new NL({useUTC:t.ecModel.get("useUTC")})};var RL=Ih.prototype,BL=bL.prototype,VL=Dr,GL=Ir,FL=Math.floor,WL=Math.ceil,HL=Math.pow,ZL=Math.log,UL=Ih.extend({type:"log",base:10,$constructor:function(){Ih.apply(this,arguments),this._originalScale=new bL},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(BL.getTicks.call(this,t),function(t){var o=Ir(HL(this.base,t));return o=t===i[0]&&e.__fixMin?Uh(o,n[0]):o,o=t===i[1]&&e.__fixMax?Uh(o,n[1]):o},this)},getMinorTicks:BL.getMinorTicks,getLabel:BL.getLabel,scale:function(t){return t=RL.scale.call(this,t),HL(this.base,t)},setExtent:function(t,e){var i=this.base;t=ZL(t)/ZL(i),e=ZL(e)/ZL(i),BL.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=RL.getExtent.call(this);e[0]=HL(t,e[0]),e[1]=HL(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Uh(e[0],n[0])),i.__fixMax&&(e[1]=Uh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ZL(t[0])/ZL(e),t[1]=ZL(t[1])/ZL(e),RL.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=Er(i),o=t/i*n;for(.5>=o&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[Ir(WL(e[0]/n)*n),Ir(FL(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){BL.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){UL.prototype[t]=function(e){return e=ZL(e)/ZL(this.base),RL[t].call(this,e)}}),UL.create=function(){return new UL};var XL={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:G,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},YL=ya({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),jL=ya({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),qL=ya({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),KL=ya({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),$L={line:jT,rect:XT,roundRect:XT,square:XT,circle:NT,diamond:jL,pin:qL,arrow:KL,triangle:YL},JL={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},QL={};f($L,function(t,e){QL[e]=new t});var tk=ya({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Ki(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=QL[n];o||(n="rect",o=QL[n]),JL[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}}),ek={isDimensionStacked:_h,enableDataStack:xh,getStackedDimension:wh},ik=(Object.freeze||Object)({createList:ac,getLayoutRect:ts,dataStack:ek,createScale:rc,mixinAxisModelCommonMethods:sc,completeDimensions:fh,createDimensions:gL,createSymbol:oc}),nk=1e-8;hc.prototype={constructor:hc,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(uc(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(uc(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n||(n=i/a):i=a*n;for(var r=new Ti(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u0}),function(t){var i=t.properties,n=t.geometry,o=n.coordinates,a=[];"Polygon"===n.type&&a.push({type:"polygon",exterior:o[0],interiors:o.slice(1)}),"MultiPolygon"===n.type&&f(o,function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var r=new hc(i[e||"name"],a,i.cp);return r.properties=i,r})},ak=ho(),rk=[0,1],sk=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};sk.prototype={constructor:sk,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Cr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&(i=i.slice(),Ac(i,n.count())),Sr(t,rk,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),Ac(i,n.count()));var o=Sr(t,i,rk,e);return this.scale.scale(o)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=pc(this,e),n=i.ticks,o=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),a=e.get("alignWithLabel");return Dc(this,o,a,t.clamp),o},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var i=this.scale.getMinorTicks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return n},getViewLabels:function(){return fc(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Sc(this)}};var lk=ok,uk={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){uk[t]=xS[t]});var hk={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){hk[t]=vA[t]});var ck=function(t){this._axes={},this._dimList=[],this.name=t||""};ck.prototype={constructor:ck,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Cc,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(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?[]:{},o=0;oe[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(dk,sk);var fk={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)"]}}},pk={};pk.categoryAxis=o({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},fk),pk.valueAxis=o({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},fk),pk.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},pk.valueAxis),pk.logAxis=s({scale:!0,logBase:10},pk.valueAxis);var gk=["value","category","time","log"],mk=function(t,e,i,n){f(gk,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,s=a?os(e):{},l=n.getTheme();o(e,l.get(r+"Axis")),o(e,this.getDefaultOption()),e.type=i(t,e),a&&ns(e,s,a)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Th.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:a([{},pk[r+"Axis"],n],!0)})}),WA.registerSubTypeDefaulter(t+"Axis",x(i,t))},vk=WA.extend({type:"cartesian2dAxis",axis:null,init:function(){vk.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){vk.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){vk.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});o(vk.prototype,XL);var yk={offset:0};mk("x",vk,kc,yk),mk("y",vk,kc,yk),WA.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 xk=Oc.prototype;xk.type="grid",xk.axisPointerEnabled=!0,xk.getRect=function(){return this._rect},xk.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){jh(t.scale,t.model)}),f(i.y,function(t){jh(t.scale,t.model)});var n={};f(i.x,function(t){Ec(i,"y",t,n)}),f(i.y,function(t){Ec(i,"x",t,n)}),this.resize(this.model,e)},xk.resize=function(t,e,i){function n(){f(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),zc(t,e?o.x:o.y)})}var o=ts(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Qh(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},xk.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},xk.getAxes=function(){return this._axesList.slice()},xk.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;nt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var bk=AI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Sk={getBarItemStyle:function(t){var e=bk(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Mk=ya({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=h?u-l<2*Math.PI:l-u<2*Math.PI;g&&(t.moveTo(c*o+i,d*o+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(i,n,o,u,l,h),t.moveTo(c*o+i,p*o+n)),t.closePath()}}),Ik=["itemStyle","barBorderWidth"],Tk=[0,0];r(mr.prototype,Sk),Fu({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"===n||"polar"===n?this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i):eS&&console.warn("Only cartesian2d and polar supported for bar."),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e,i=this.group,n=t.getData(),o=this._data,a=t.coordinateSystem,r=a.getBaseAxis();"cartesian2d"===a.type?e=r.isHorizontal():"polar"===a.type&&(e="angle"===r.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Uc(a,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=d.get("barBorderRadius")||0,p=[],g=this._backgroundEls||[],m=function(t){var i=kk[a.type](n,t),o=id(a,e,i);return o.useStyle(d.getBarItemStyle()),"cartesian2d"===a.type&&o.setShape("r",f),p[t]=o,o};n.diff(o).add(function(o){var r=n.getItemModel(o),d=kk[a.type](n,o,r);if(c&&m(o),n.hasValue(o)){if(l){var f=Ck[a.type](u,d);if(f)return void i.remove(p)}var p=Lk[a.type](o,d,e,s,!1,h);n.setItemGraphicEl(o,p),i.add(p),qc(p,n,o,r,d,t,e,"polar"===a.type)}}).update(function(r,v){var y=n.getItemModel(r),x=kk[a.type](n,r,y);if(c){var _;0===g.length?_=m(v):(_=g[v],_.useStyle(d.getBarItemStyle()),"cartesian2d"===a.type&&_.setShape("r",f),p[r]=_);var w=kk[a.type](n,r),b=ed(e,w,a);nr(_,{shape:b},s,r)}var S=o.getItemGraphicEl(v);if(!n.hasValue(r))return void i.remove(S);if(l){var M=Ck[a.type](u,x);if(M)return void i.remove(S)}S?nr(S,{shape:x},s,r):S=Lk[a.type](r,x,e,s,!0,h),n.setItemGraphicEl(r,S),i.add(S),qc(S,n,r,y,x,t,e,"polar"===a.type)}).remove(function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===a.type?e&&Xc(t,s,e):e&&Yc(t,s,e)}).execute();var v=this._backgroundGroup||(this._backgroundGroup=new xM);v.removeAll();for(var y=0;yi&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var o=Ak(e.x,t.x),a=Dk(e.x+e.width,t.x+t.width),r=Ak(e.y,t.y),s=Dk(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}var n=Dk(e.r,t.r),o=Ak(e.r0,t.r0);e.r=n,e.r0=o;var a=0>n-o;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}return a}},Lk={cartesian2d:function(t,e,i,n,o){var a=new XT({shape:r({},e),z2:1});if(a.name="item",n){var s=a.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],vA[o?"updateProps":"initProps"](a,{shape:u},n,t)}return a},polar:function(t,e,i,n,o,a){var r=e.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},Pk=oa.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__baseDimIdx,a=0;a=0?i:null},30,!1),Ek=Math.PI,Nk=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new xM;var i=new xM({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Nk.prototype={constructor:Nk,hasBuilder:function(t){return!!zk[t]},add:function(t){zk[t].call(this)},getGroup:function(){return this.group}};var zk={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,o=[i[0],0],a=[i[1],0];n&&(ae(o,o,n),ae(a,a,n));var s=r({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new jT({anid:"line",subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:a[0],y2:a[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((o[0]-a[0])*(o[0]-a[0])+(o[1]-a[1])*(o[1]-a[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=oc(l[i],-c/2,-d/2,c,d,s.stroke,!0),a=e.r+e.offset,r=[o[0]+a*Math.cos(t.rotation),o[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=ud(this,t,e),n=cd(this,t,e);od(t,n,i),hd(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=D(t.axisName,e.get("name"));if(i){var n,o=e.get("nameLocation"),a=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,sd(o)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*Ek/180);var f;sd(o)?n=Bk(t.rotation,null!=d?d:t.rotation,a):(n=nd(t,o,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?EA(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new ET({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Vk(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterParams:w},x):null});Ya(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Rk(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Rk=Nk.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Bk=Nk.innerTextLayout=function(t,e,i){var n,o,a=kr(e-t);return Pr(a)?(o=i>0?"top":"bottom",n="center"):Pr(a-Ek)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&Ek>a?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},Vk=Nk.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},Gk=f,Fk=x,Wk=Vu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&yd(t),Wk.superApply(this,"render",arguments),Sd(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){Sd(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Wk.superApply(this,"remove",arguments)},dispose:function(t,e){Md(this,e),Wk.superApply(this,"dispose",arguments)}}),Hk=[];Wk.registerAxisPointerClass=function(t,e){if(eS&&Hk[t])throw new Error("axisPointer "+t+" exists");Hk[t]=e},Wk.getAxisPointerClass=function(t){return t&&Hk[t]};var Zk=["axisLine","axisTickLabel","axisName"],Uk=["splitArea","splitLine","minorSplitLine"],Xk=Wk.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new xM,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Id(a,t),s=new Nk(t,r);f(Zk,s.add,s),this._axisGroup.add(s.getGroup()),f(Uk,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),lr(o,this._axisGroup,t),Xk.superCall(this,"render",t,e,i,n)}},remove:function(){Ad(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=_(a)?a:[a];for(var r=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p0&&Gd(i[o-1]);o--);for(;o>n&&Gd(i[n]);n++);}for(;o>n;)n+=Fd(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),uP=oa.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:RT(oa.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=Zd(i,e.smoothConstraint),l=Zd(n,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Gd(i[a-1]);a--);for(;a>o&&Gd(i[o]);o++);}for(;a>o;){var u=Fd(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Fd(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});vl.extend({type:"line",init:function(){var t=new xM,e=new Pd;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.mapArray(a.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=zd(n,a,y),_=jd(n,a,x),w=t.get("showSymbol"),b=w&&!h&&$d(t,a,n),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),o.add(g);var M,I=!h&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(M=n.getArea(),null!=M.width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r1+=.5)),this._clipShapeForSymbol=M,f&&c.type===n.type&&I===this._step?(v&&!p?p=this._newPolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(Qd(n,!1,t)),w&&d.updateData(a,{isIgnore:b,clipShape:M}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Ud(this._stackedOnPoints,_)&&Ud(this._points,u)||(m?this._updateAnimation(a,_,n,i,I,y):(I&&(u=qd(u,n,I),_=qd(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(w&&d.updateData(a,{isIgnore:b,clipShape:M}),I&&(u=qd(u,n,I),_=qd(_,n,I)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,_,n,m)),g.setClipPath(Qd(n,!0,t)));var T=Kd(a,n)||a.getVisual("color");f.useStyle(s(r.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=Yd(t.get("smooth")),f.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=a.getCalculationInfo("stackedOnSeries"),C=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(C=Yd(D.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=uo(o,n);if(!(a instanceof Array)&&null!=a&&a>=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;r=new Dd(o,a),r.position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else vl.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=uo(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else vl.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new lP({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 uP({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=tP(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(o&&(h=qd(u.current,i,o),c=qd(u.stackedOnCurrent,i,o),d=qd(u.next,i,o),f=qd(u.stackedOnNext,i,o)),Xd(h,d)>3e3||s&&Xd(c,f)>3e3)return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));r.shape.__points=u.current,r.shape.points=h,nr(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),nr(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=dP[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(a.dim),1/l,u,fP))}}}}};Nu(hP("line","circle","line")),Eu(cP("line")),Cu(OC.PROCESSOR.STATISTIC,pP("line"));var gP=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),o=gL(n,e),a=new dL(o,t);return a.initData(n,i),a},mP={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},vP=Gu({type:"series.pie",init:function(t){vP.superApply(this,"init",arguments),this.legendVisualProvider=new tf(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){vP.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return gP(this,{coordDimensions:["value"],encodeDefaulter:x(ys,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();o>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:ol(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=vP.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Lr(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){eo(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});
-c(vP,mP);var yP=of.prototype;yP.updateData=function(t,e,i){var n=this.childAt(0),o=this.childAt(1),a=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=r({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,or(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,nr(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):nr(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&n.attr("cursor",g),nf(this,t.getItemLayout(e),l.isSelected(t.getName(e)),l.get("selectedOffset"),l.get("animation"));var m=!i&&"transition"===d;this._updateLabel(t,e,m),this.highDownOnUpdate=l.get("silent")?null:function(t,e){var i=l.isAnimationEnabled()&&u.get("hoverAnimation");"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut")))},Fa(this)},yP._updateLabel=function(t,e,i){var n=this.childAt(1),o=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(o.ignore=o.normalIgnore=o.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(nr(n,{shape:h},a,e),nr(o,{style:c},a,e)):(n.attr({shape:h}),o.attr({style:c})),o.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getModel("label"),f=r.getModel("emphasis.label"),p=r.getModel("labelLine"),g=r.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Ua(o.style,o.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),o.ignore=o.normalIgnore=!d.get("show"),o.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setShape({smooth:m})},h(of,xM);var xP=(vl.extend({type:"pie",init:function(){var t=new xM;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=x(ef,this.uid,t,s,i),d=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new of(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(o,t),i.off("click"),d&&i.on("click",c),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&o.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=o.getItemLayout(0),p=1;isNaN(f.startAngle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",ku(e,function(i,n){var o={};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);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o,seriesId:i.seriesId}})})}),_P=function(t){return{getTargetSeries:function(e){var i={},n=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(o){var a,r=i[o],s=null!=r&&n.getItemVisual(r,"color",!0),l=null!=r&&n.getItemVisual(r,"borderColor",!0);if(s&&l||(a=e.getItemModel(o)),!s){var u=a.get("itemStyle.color")||t.getColorFromPalette(e.getName(o)||o+"",t.__paletteScope,e.count());null!=r&&n.setItemVisual(r,"color",u)}if(!l){var h=a.get("itemStyle.borderColor");null!=r&&n.setItemVisual(r,"borderColor",h)}})}}},wP=Math.PI/180,bP=function(t,e,i,n,o,a){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*wP;l.each(function(n){var a=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=Mr(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=Mr(w,i);var b=_.get("length2");if(b=Mr(b,i),!(a.angleD?-1:1)*b,B=z;S="edge"===m?0>D?o+v:o+i-v:R+(0>D?-g:g),M=B,I=[[O,E],[N,z],[R,B]]}T=P?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V,G=f.get("rotate");V="number"==typeof G?G*(Math.PI/180):G?0>D?-A+Math.PI:-A:0,h=!!V,a.label={x:S,y:M,position:p,height:k.height,len:w,len2:b,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:V,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:L,font:x},P||u.push(a.label)}}),!h&&t.get("avoidLabelOverlap")&&rf(u,r,s,e,i,n,o,a)},SP=2*Math.PI,MP=Math.PI/180,IP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),o=lf(t,i),a=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(a)||(a=[a,a]);var s=Mr(o.width,i.getWidth()),l=Mr(o.height,i.getHeight()),u=Math.min(s,l),h=Mr(a[0],s)+o.x,c=Mr(a[1],l)+o.y,d=Mr(r[0],u/2),f=Mr(r[1],u/2),p=-t.get("startAngle")*MP,g=t.get("minAngle")*MP,m=0;e.each(n,function(t){!isNaN(t)&&m++});var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),w=t.get("roseType"),b=t.get("stillShowZeroSum"),S=e.getDataExtent(n);S[0]=0;var M=SP,I=0,T=p,A=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:w?0/0:f,viewRect:o});n="area"!==w?0===v&&b?y:t*y:SP/m,g>n?(n=g,M-=g):I+=t;var a=T+A*n;e.setItemLayout(i,{angle:n,startAngle:T,endAngle:a,clockwise:x,cx:h,cy:c,r0:d,r:w?Sr(t,S,[d,f]):f,viewRect:o}),T=a}),SP>M&&m)if(.001>=M){var D=SP/m;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=D,n.startAngle=p+A*i*D,n.endAngle=p+A*(i+1)*D}})}else y=M/I,T=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),o=n.angle===g?g:t*y;n.startAngle=T,n.endAngle=T+A*o,T+=A*o}});bP(t,f,o.width,o.height,o.x,o.y)})},TP=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+a>=t&&h+r>=e)return s}return-1}}),CP=uf.prototype;CP.isPersistent=function(){return!this._incremental},CP.updateData=function(t,e){this.group.removeAll();var i=new DP({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},CP.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},CP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new va({silent:!0})),this.group.add(this._incremental)):this._incremental=null},CP.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new DP,this._incremental.addDisplayable(n,!0)):(n=new DP({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),n.incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},CP._setCommon=function(t,e,i,n){var o=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=oc(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]=0&&(t.dataIndex=i+(t.startIndex||0))}))},CP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},CP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Fu({type:"scatter",render:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.updateData(e,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=cP().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext,o=n.large;return i&&o===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=o?new uf:new Pd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Nu(hP("scatter","circle")),Eu(cP("scatter")),CD.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return bh(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var LP=3,kP=df.prototype;kP.stopEffectAnimation=function(){this.childAt(1).removeAll()},kP.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;LP>o;o++){var a=oc(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/LP*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}cf(n,t)},kP.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o0?WP:HP)}function o(t,e){return e.get(t>0?GP:FP)}var a=t.getData();if(a.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:o(1,t),borderColorN:o(-1,t)}),!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:i}}}},UP="undefined"!=typeof Float32Array?Float32Array:Array,XP={seriesType:"candlestick",plan:PD(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isNaN(e)||isNaN(t)?[0/0,0/0]:n.dataToPoint(i)}function o(t,e,i){var n=e.slice(),o=e.slice();n[r]=pA(n[r]+a/2,1,!1),o[r]=pA(o[r]-a/2,1,!0),i?t.push(n,o):t.push(o,n)}function l(t,e,n){var o=i(t,n),l=i(e,n);return o[r]-=a/2,l[r]-=a/2,{x:o[0],y:o[1],width:s?a:l[0]-o[0],height:s?l[1]-o[1]:a}}function h(t){return t[r]=pA(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),w=Math.min(v,y),b=Math.max(v,y),S=i(w,m),M=i(b,m),I=i(x,m),T=i(_,m),A=[];o(A,M,0),o(A,S,1),A.push(h(T),h(M),h(I),h(S)),e.setItemLayout(g,{sign:xf(e,g,v,y,d),initBaseline:v>y?M[s]:S[s],ends:A,brushRect:l(x,_,m)})}}function i(t,e){for(var i,o,a=new UP(4*t.count),l=0,h=[],g=[];null!=(o=t.next());){var m=e.get(u,o),v=e.get(c,o),y=e.get(d,o),x=e.get(f,o),_=e.get(p,o);isNaN(m)||isNaN(x)||isNaN(_)?(a[l++]=0/0,l+=3):(a[l++]=xf(e,o,v,y,d),h[r]=m,h[s]=x,i=n.dataToPoint(h,null,g),a[l++]=i?i[0]:0/0,a[l++]=i?i[1]:0/0,h[s]=_,i=n.dataToPoint(h,null,g),a[l++]=i?i[1]:0/0)}e.setLayout("largePoints",a)}var n=t.coordinateSystem,o=t.getData(),a=_f(t,o),r=0,s=1,l=["x","y"],u=o.mapDimension(l[r]),h=o.mapDimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return o.setLayout({candleWidth:a,isSimpleBox:1.3>=a}),null==u||h.length<4?void 0:{progress:t.pipelineContext.large?i:e}}};Du(VP),Nu(ZP),Eu(XP),h(wf,sk),bf.prototype.getIndicatorAxes=function(){return this._indicatorAxes},bf.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},bf.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,o=this.cx+t*Math.cos(n),a=this.cy-t*Math.sin(n);return[o,a]},bf.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 o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(o=u,s=l,r=h)}return[s,+(o&&o.coordToData(n))]},bf.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Mr(i[0],n),this.cy=Mr(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=Mr(r[0],a),this.r=Mr(r[1],a),f(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},bf.prototype.update=function(t){function e(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatorAxes,n=this._model;f(i,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var o=e.getData();f(i,function(t){t.scale.unionExtentFromData(o,o.mapDimension(t.dim))})}},this);var o=n.get("splitNumber");f(i,function(t){var i=Xh(t.scale,t.model).extent;jh(t.scale,t.model);var n=t.model,a=t.scale,r=n.getMin(),s=n.getMax(),l=a.getInterval();if(null!=r&&null!=s)a.setExtent(+r,+s),a.setInterval((s-r)/o);else if(null!=r){var u;do u=r+l*o,a.setExtent(+r,u),a.setInterval(l),l=e(l);while(ui[0]&&isFinite(h)&&isFinite(i[0]))}else{var c=a.getTicks().length-1;c>o&&(l=e(l));var u=Math.ceil(i[1]/l)*l,h=Ir(u-l*o);a.setExtent(h,u),a.setInterval(l)}})},bf.dimensions=[],bf.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new bf(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},ks.register("radar",bf);var YP=pk.valueAxis,jP=(Bu({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),g=this.get("nameGap"),m=this.get("triggerEvent"),v=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var v=c;if(null!=p.color&&(v=s({color:p.color},c)),p=o(n(p),{boundaryGap:t,splitNumber:e,scale:i,axisLine:a,axisTick:l,axisType:u,axisLabel:h,name:p.text,nameLocation:"end",nameGap:g,nameTextStyle:v,triggerEvent:m},!1),d||(p.name=""),"string"==typeof f){var y=p.name;p.name=f.replace("{value}",null!=y?y:"")}else"function"==typeof f&&(p.name=f(p.name,p));var x=r(new mr(p,null,this.ecModel),XL);return x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this.getIndicatorModels=function(){return v}},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:o({lineStyle:{color:"#bbb"}},YP.axisLine),axisLabel:Sf(YP.axisLabel,!1),axisTick:Sf(YP.axisTick,!1),axisType:"interval",splitLine:Sf(YP.splitLine,!0),splitArea:Sf(YP.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Vu({type:"radar",render:function(t){var e=this.group;e.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=p(i,function(t){var i=new Nk(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});f(n,function(t){f(jP,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),r=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=r.getModel("areaStyle"),h=a.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===o)for(var y=n[0].getTicksCoords(),x=i.cx,w=i.cy,b=0;b=b;b++){for(var A=[],D=0;D":"\n";return Wr(""===s?this.name:s)+l+p(r,function(e){var i=o.get(o.mapDimension(e.dim),t);return Wr(e.name+" : "+i)}).join(l)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(p(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;a>o;o++)if(!isNaN(n[o])){var r=i.getIndicatorAxes();return i.coordToPoint(r[o].dataToCoord(n[o]),o)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Fu({type:"radar",render:function(t){function e(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=Mf(t.getItemVisual(e,"symbolSize")),a=oc(i,-1,-1,2,2,n),r=t.getItemVisual(e,"symbolRotate")||0;return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2],rotation:r*Math.PI/180||0}),a}}function i(i,n,o,a,r,s){o.removeAll();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalAlpha=y,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getImageData(0,0,h.width,h.height),_=x.data,w=0,b=_.length,S=this.minOpacity,M=this.maxOpacity,I=M-S;b>w;){var y=_[w+3]/256,T=4*Math.floor(y*(JP-1));if(y>0){var A=a(y)?s:l;y>0&&(y=y*I+S),_[w++]=A[T],_[w++]=A[T+1],_[w++]=A[T+2],_[w++]=A[T+3]*y*256}else w+=4}return c.putImageData(x,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=mS()),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,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Fu({type:"heatmap",render:function(t,e,i){var n;if(e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),eS&&!n)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Lf(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,i,n){var o=e.coordinateSystem;o&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var a,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");if(eS){if("category"!==u.type||"category"!==h.type)throw new Error("Heatmap on cartesian must have two category axes");if(!u.onBand||!h.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}a=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f="itemStyle",p="emphasis.itemStyle",g="label",m="emphasis.label",v=t.getModel(f).getItemStyle(["color"]),y=t.getModel(p).getItemStyle(),x=t.getModel(g),_=t.getModel(m),w=l.type,b="cartesian2d"===w?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],S=i;n>S;S++){var M;if("cartesian2d"===w){if(isNaN(d.get(b[2],S)))continue;var I=l.dataToPoint([d.get(b[0],S),d.get(b[1],S)]);M=new XT({shape:{x:Math.floor(Math.round(I[0])-a/2),y:Math.floor(Math.round(I[1])-s/2),width:Math.ceil(a),height:Math.ceil(s)},style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}else{if(isNaN(d.get(b[1],S)))continue;M=new XT({z2:1,shape:l.dataToRect([d.get(b[0],S)]).contentShape,style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}var T=d.getItemModel(S);d.hasItemOption&&(v=T.getModel(f).getItemStyle(["color"]),y=T.getModel(p).getItemStyle(),x=T.getModel(g),_=T.getModel(m));var A=t.getRawValue(S),D="-";A&&null!=A[2]&&(D=A[2]),Ua(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),Fa(M,d.hasItemOption?y:r({},y)),M.incremental=o,o&&(M.useHoverLayer=!0),c.add(M),d.setItemGraphicEl(S,M)}},_renderOnGeo:function(t,e,i,n){var o=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new Af;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(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=h,o[1]-=c,o.push(n),o}),y=i.getExtent(),x="visualMap.continuous"===i.type?Cf(y,i.option.range):Df(y,i.getPieceList(),i.option.selected);s.update(v,p,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new Dn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var QP=f,tO="\x00__link_datas",eO="\x00__link_mainData",iO=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};iO.prototype={constructor:iO,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Vf.prototype={constructor:Vf,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Vf.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,_(i)?i.length:1),a.push(t);var s=new iO(t.name,o);e?Gf(s,e):o.root=s,o._nodes.push(s);var l=t.children;if(l)for(var u=0;ur&&(r=t.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:r;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<=l}),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return Wr(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var nO=ae;c(tp,ZS),ep.prototype={constructor:ep,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Ti(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Ti(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Ti(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=ae([],n,t),i=ae([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Ne(this.transform||(this.transform=[]),e.transform||Oe()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Ge(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?k(t):Oe(),rawScale:k(e.scale),rawPosition:k(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?nO(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?nO([],t,e):[t[0],t[1]]},convertToPixel:x(ip,"dataToPoint"),convertFromPixel:x(ip,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(ep,ZS);var oO="\x00_ec_interaction_mutex";ku({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(up,AS);var aO={axisPointer:1,tooltip:1,brush:1},rO=ya({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Mr(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;n-1>d;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});Fu({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new xM,this._controller=new up(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i){var n=t.getData(),o=t.layoutInfo,a=this._mainGroup,r=t.get("layout");"radial"===r?a.attr("position",[o.x+o.width/2,o.y+o.height/2]):a.attr("position",[o.x,o.y]),this._updateViewCoordSys(t,o,r),this._updateController(t,e,i);var s=this._data,l={expandAndCollapse:t.get("expandAndCollapse"),layout:r,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(s).add(function(e){xp(n,e)&&wp(n,e,null,a,t,l)}).update(function(e,i){var o=s.getItemGraphicEl(i);return xp(n,e)?void wp(n,e,o,a,t,l):void(o&&Sp(s,i,o,a,t,l))}).remove(function(e){var i=s.getItemGraphicEl(e);i&&Sp(s,e,i,a,t,l)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),l.expandAndCollapse===!0&&n.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=n},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];Vo(i,n,o);var a=this._min,r=this._max;o[0]-n[0]===0&&(n[0]=a?a[0]:n[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-n[1]===0&&(n[1]=a?a[1]:n[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new ep;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=o},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!yp(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){np(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){op(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1,a=e.getZoom(),r=(a-1)*i+1;return r/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),ku({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,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),ku({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=e.coordinateSystem,n=Ip(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var sO=function(t,e){t.eachSeriesByType("tree",function(t){Dp(t,e)})};Nu(hP("tree","circle")),Eu(sO),CD.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=l.getNodeByDataIndex(e),n=s[i.depth];return t.parentModel=n||r,t})}var n={name:t.name,children:t.data};Op(n);var o=t.levels||[],a=this.designatedVisualItemStyle={},r=new mr({itemStyle:a},this,e);o=t.levels=Ep(o,e);var s=p(o||[],function(t){return new mr(t,r,e)},this),l=Vf.createTree(n,this,i);return l.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Gr(_(i)?i[0]:i),o=e.getName(t);return Wr(o+": "+n)},getDataParams:function(t){var e=CD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Pp(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},r(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=B(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var lO=8,uO=8,hO=5;Np.prototype={constructor:Np,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),es(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+2*lO,e.emptyItemWidth);e.totalWidth+=r+uO,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,r=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=Qr(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new WT({shape:{points:zp(a,0,g,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:x(o,p)});this.group.add(v),Rp(v,t,p),a+=g+uO}},remove:function(){this.group.removeAll()}};var cO=y,dO=xM,fO=XT,pO=f,gO=3,mO=["label"],vO=["emphasis","label"],yO=["upperLabel"],xO=["emphasis","upperLabel"],_O=10,wO=1,bO=2,SO=AI([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),MO=function(t){var e=SO(t);return e.stroke=e.fill=e.lineWidth=null,e};Fu({type:"treemap",init:function(){this._containerGroup,this._storage=Vp(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var o=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(u(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var a=["treemapZoomToNode","treemapRootToNode"],r=Cp(n,a,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&r&&c?{rootNodeGroup:c.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new dO,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,a);h&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],h,o,a+1)}o?(e=t,pO(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function o(t){var e=Vp();return t&&pO(t,function(t,i){var n=e[i];pO(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function a(){pO(f,function(t){pO(t,function(t){t.parent&&t.parent.remove(t)})}),pO(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getData().tree,s=this._oldTree,l=Vp(),u=Vp(),h=this._storage,c=[],d=x(Gp,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=o(h);return this._oldTree=r,this._storage=u,{lastsForAnimation:l,willDeleteEls:f,renderFinally:a}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),a=i.get("animationEasing"),s=Bp();pO(e.willDeleteEls,function(t,e){pO(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drillDown"===n.direction)i=r===n.rootNodeGroup?{shape:{x:0,y:0,width:r.__tmNodeWidth,height:r.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmWillDelete||(l=r.__tmNodeWidth/2,u=r.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,o,a)}})}),pO(this._storage,function(t,i){pO(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,a))})},this),this._state="animating",s.done(cO(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new up(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",cO(this._onPan,this)),e.on("zoom",cO(this._onZoom,this)));var i=new Ti(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>gO||Math.abs(t.dy)>gO)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new Ti(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=Oe();Re(s,s,[-e,-i]),Ve(s,s,[t.scale,t.scale]),Re(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){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 o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&$r(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(kp(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Np(this.group))).render(t,e,i.node,cO(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Vp(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var IO=function(){},TO=["treemapZoomToNode","treemapRender","treemapMove"],AO=0;AOn&&(a=n,o=i)}for(var o,a=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Qp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(Qp(c[0],h[0],t))return r}else if(Qp(c[0],h[0],t)&&Qp(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:o:void 0};var EO=_,NO="itemStyle",zO={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root;i.isRemoved()||tg(i,{},t.getViewRoot().getAncestors(),t)}},RO=Math.max,BO=Math.min,VO=D,GO=f,FO=["itemStyle","borderWidth"],WO=["itemStyle","gapWidth"],HO=["upperLabel","show"],ZO=["upperLabel","height"],UO={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),s=t.option,l=ts(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Mr(VO(l.width,u[0]),o),c=Mr(VO(l.height,u[1]),a),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=Cp(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,m=t.getViewRoot(),v=Lp(m);if("treemapMove"!==d){var y="treemapZoomToNode"===d?gg(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareRatio:s.squareRatio,sort:x,leafDepth:s.leafDepth};m.hostTree.clearLayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setLayout(w),lg(m,_,!1,0);var w=m.getLayout();GO(v,function(t,e){var i=(v[e+1]||m).getValue();t.setLayout(r({dataExtent:[i,i],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(mg(l,g,p),!0),t.setLayoutInfo(l),vg(b,new Ti(-l.x,-l.y,o,a),v,m,0)}};Nu(zO),Eu(UO),CD.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=a.getNodeByDataIndex(e),n=o[i.depth];return n&&(t.parentModel=n),t})}var n={name:t.name,children:t.data};xg(n);var o=p(t.levels||[],function(t){return new mr(t,this,e)},this),a=Vf.createTree(n,this,i);return a.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=CD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Pp(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot
-},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var XO={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},YO=2,jO=4,qO=_g.prototype;qO.updateData=function(t,e,i,n,a){this.node=e,e.piece=this,n=n||this._seriesModel,a=a||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=r({},h);c.label=null;var d=wg(e,n,a);Mg(e,n,d);var f,p=u.getModel("itemStyle").getItemStyle();if("normal"===i)f=p;else{var g=u.getModel(i+".itemStyle").getItemStyle();f=o(g,p)}f=s({lineJoin:"bevel",fill:f.fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,nr(l,{shape:{r:h.r}},n,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(nr(l,{shape:c},n),l.useStyle(f)):nr(l,{shape:c,style:f},n),this._updateLabel(n,d,i);var m=u.getShallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getShallow("highlightPolicy");this._initEvents(l,e,n,v)}this._seriesModel=n||this._seriesModel,this._ecModel=a||this._ecModel,Fa(this)},qO.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):Sg(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==XO.NONE&&i.piece.childAt(0).trigger("downplay"))})},qO.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},qO.onHighlight=function(){this.updateData(!1,this.node,"highlight")},qO.onDownplay=function(){this.updateData(!1,this.node,"downplay")},qO._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?a.get(t):e}var o=this.node.getModel(),a=o.getModel("label"),r="normal"===i||"emphasis"===i?a:o.getModel(i+".label"),s=o.getModel("emphasis.label"),l=r.get("formatter"),u=l?i:"normal",h=D(t.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);n("show")===!1&&(h="");var c=this.node.getLayout(),d=r.get("minAngle");null==d&&(d=a.get("minAngle")),d=d/180*Math.PI;var f=c.endAngle-c.startAngle;null!=d&&Math.abs(f)Math.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(g=c.r0+_,m>Math.PI/2&&(w="right")):"right"===w&&(g=c.r-_,m>Math.PI/2&&(w="left")):(g=(c.r+c.r0)/2,w="center"),p.attr("style",{text:h,textAlign:w,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var b=g*v+c.cx,S=g*y+c.cy;p.attr("position",[b,S]);var M=n("rotate"),I=0;"radial"===M?(I=-m,I<-Math.PI/2&&(I+=Math.PI)):"tangential"===M?(I=Math.PI/2-m,I>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):"number"==typeof M&&(I=M*Math.PI/180),p.attr("rotation",I)},qO._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()},s=function(){o.onDownplay()},l=function(){o.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",s).on("highlight",l)},h(_g,xM);var KO="sunburstRootToNode",$O=(vl.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(t,e){function i(t){return t.getId()}function n(i,n){var o=null==i?null:t[i],r=null==n?null:e[n];a(o,r)}(0!==t.length||0!==e.length)&&new Xu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function a(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):r(n);else if(i){var o=new _g(i,t,e);d.add(o),u.setItemGraphicEl(i.dataIndex,o)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new _g(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=o,l.virtualPiece.on("click",o)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(o(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var v=this.virtualPiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";$r(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:KO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var o=t[0]-n.cx,a=t[1]-n.cy,r=Math.sqrt(o*o+a*a);return r<=n.r&&r>=n.r0}}}),"sunburstRootToNode");ku({type:$O,update:"updateView"},function(t,e){function i(e){var i=Cp(t,[$O],e);if(i){var n=e.getViewRoot();n&&(t.direction=kp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var JO="sunburstHighlight";ku({type:JO,update:"updateView"},function(t,e){function i(e){var i=Cp(t,[JO],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var QO="sunburstUnhighlight";ku({type:QO,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var tE=Math.PI/180,eE=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Mr(e[0],o),l=Mr(e[1],a),u=Mr(n[0],r/2),h=Mr(n[1],r/2),c=-t.get("startAngle")*tE,d=t.get("minAngle")*tE,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Ig(g,v);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var x=g.getValue(),w=Math.PI/(x||y)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===x&&T?w:n*w;d>o&&(o=d),i=e+A*o;var a=t.depth-m-(b?-1:1),h=u+M*a,c=u+M*(a+1),g=t.getModel();null!=g.get("r0")&&(h=Mr(g.get("r0"),r/2)),null!=g.get("r")&&(c=Mr(g.get("r"),r/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})};Nu(x(_P,"sunburst")),Eu(x(eE,"sunburst")),Cu(x(TP,"sunburst"));for(var iE=[126,25],nE=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],oE=0;oEa;a++){var s=t.getName(a);i.set(s,!0),n.push({name:s,value:t.get(e,a),selected:ol(t,a,"selected")})}var l=yE.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),o.push(e))}),this.updateSelectedMap(n),t.appendValues([],o),t},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t,e,i,n){for(var o=this.getData(),a=Gr(this.getRawValue(t)),r=o.getName(t),s=this.seriesGroup,l=[],u=0;u":"\n";return l.join(", ")+d+Wr(r+" : "+a)},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:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});c(xE,mP),Ng.prototype={constructor:Ng,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,h=this.group,c=s.getTransformInfo(),d=!u.childAt(0)||o;if(d)h.transform=c.roamTransform,h.decomposeTransform(),h.dirty();else{var p=new ZS;p.transform=c.roamTransform,p.decomposeTransform();var g={scale:p.scale,position:p.position};l=p.scale,nr(h,g,t)}var m=c.rawScale,v=c.rawPosition;u.removeAll();var y=["itemStyle"],x=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=B();f(s.regions,function(e){var i=b.get(e.name)||b.set(e.name,new xM),n=new JT({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var o,s=t.getRegionModel(e.name)||t,c=s.getModel(y),p=s.getModel(x),g=Pg(c),S=Pg(p),M=s.getModel(_),I=s.getModel(w);if(r){o=r.indexOfName(e.name);var T=r.getItemVisual(o,"color",!0);T&&(g.fill=T)}var A=function(t){return[t[0]*m[0]+v[0],t[1]*m[1]+v[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(P=t);var E=new ET({position:A(e.center.slice()),scale:[1/h.scale[0],1/h.scale[1]],z2:10,silent:!0});if(Ua(E.style,E.hoverStyle={},M,I,{labelFetcher:P,labelDataIndex:O,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var N=[1/l[0],1/l[1]];nr(E,{scale:N},t)}i.add(E)}if(r)r.setItemGraphicEl(o,i);else{var s=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:s&&s.option||{}}}var z=i.__regions||(i.__regions=[]);z.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Fa(i,S),u.add(i)}),this._updateController(t,e,i),Og(this,t,u,i,n),Eg(t,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&yE.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(yE.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,a=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),a.enable(t.get("roam")||!1);var l=t.mainType;a.off("pan").on("pan",function(t){this._mouseDownFlag=!1,np(s,t.dx,t.dy),i.dispatchAction(r(n(),{dx:t.dx,dy:t.dy}))},this),a.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,op(s,t.scale,t.originX,t.originY),i.dispatchAction(r(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),a.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!yp(e,i,t)})}};var _E="__seriesMapHighDown",wE="__seriesMapCallKey";Fu({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id){var a=this._mapDraw;a&&o.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new Ng(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}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){var e=t.originalData,i=this.group;e.each(e.mapDimension("value"),function(n,o){if(!isNaN(n)){var a=e.getItemLayout(o);if(a&&a.point){var s=a.point,l=a.offset,u=new NT({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:rA+1)});if(!l){var h=t.mainSeries.getData(),c=e.getName(o),d=h.indexOfName(c),f=e.getItemModel(o),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),v=C(t.getFormattedLabel(d,"normal"),c),y=C(t.getFormattedLabel(d,"emphasis"),v),_=m[_E],w=Math.random();if(!_){_=m[_E]={};var b=x(zg,!0),S=x(zg,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[wE]=w,r(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:y,normalText:v}),Rg(_,!1)}i.add(u)}}})}}),ku({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=Ip(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})}),Bg.prototype={constructor:Bg,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;n>o;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}for(var a=this._getCoordsFromItemModel(t),o=0;ol;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];if(o[a++]=c,o[a++]=d,l>i&&eS)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){if(eS){var e=ks.get(t.coordinateSystem);if(!e)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var i=new dL(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(t,e,n,o){if(t instanceof Array)return 0/0;i.hasItemOption=!0;var a=t.value;return null!=a?a instanceof Array?a[o]:a:void 0}),i},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var o=i.get("fromName"),a=i.get("toName"),r=[];return null!=o&&r.push(o),null!=a&&r.push(a),Wr(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),LE=jT.prototype,kE=KT.prototype,PE=ya({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Zg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:LE.buildPath,_buildPathCurve:kE.buildPath,pointAt:function(t){return this[Zg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:LE.pointAt,_pointAtCurve:kE.pointAt,tangentAt:function(t){var e=this.shape,i=Zg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:kE.tangentAt}),OE=["fromSymbol","toSymbol"],EE=Kg.prototype;EE.beforeUpdate=qg,EE._createLine=function(t,e,i){var n=t.hostModel,o=t.getItemLayout(e),a=Yg(o);a.shape.percent=0,or(a,{shape:{percent:1}},n,e),this.add(a);var r=new ET({name:"label",lineLabelOriginalOpacity:1});this.add(r),f(OE,function(i){var n=Xg(i,t,e);this.add(n),this[Ug(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},EE.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};jg(r.shape,a),nr(o,r,n,e),f(OE,function(i){var n=t.getItemVisual(e,i),o=Ug(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=Xg(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},EE._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),r=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=L(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},a)),o.hoverStyle=r,f(OE,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Ir(x):x}var w=m?g:null,b=v?C(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,S=y.style;if(null!=w||null!=b){Ya(y.style,l,{text:w},{autoColor:p}),y.__textAlign=S.textAlign,y.__verticalAlign=S.textVerticalAlign,y.__position=l.get("position")||"middle";var M=l.get("distance");_(M)||(M=[M,M]),y.__labelDistance=M}y.hoverStyle=null!=b?{text:b,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,Fa(this)},EE.highlight=function(){this.trigger("emphasis")},EE.downplay=function(){this.trigger("normal")},EE.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},EE.setLinePoints=function(t){var e=this.childOfName("line");jg(e.shape,t),e.dirty()},h(Kg,xM);var NE=$g.prototype;NE.isPersistent=function(){return!0},NE.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=em(t);t.diff(n).add(function(i){Jg(e,t,i,o)}).update(function(i,a){Qg(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},NE.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},NE.incrementalPrepareUpdate=function(t){this._seriesScope=em(t),this._lineData=null,this.group.removeAll()},NE.incrementalUpdate=function(t,e){function i(t){t.isGroup||tm(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},zE.getLineLength=function(t){return SS(t.__p1,t.__cp1)+SS(t.__cp1,t.__p2)},zE.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]},zE.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},zE.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=[a[0],a[1]],s=Oo,l=Eo;a[0]=s(e[0],n[0],i[0],o),a[1]=s(e[1],n[1],i[1],o);var u=l(e[0],n[0],i[0],o),h=l(e[1],n[1],i[1],o);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT=0&&!(n[a]<=e);a--);a=Math.min(a,o-2)}else{for(var a=r;o>a&&!(n[a]>e);a++);a=Math.min(a-1,o-2)}oe(t.position,i[a],i[a+1],(e-n[a])/(n[a+1]-n[a]));var l=i[a+1][0]-i[a][0],u=i[a+1][1]-i[a][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1}},h(rm,om);var VE=ya({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o0){t.moveTo(i[o++],i[o++]);for(var r=1;a>r;r++)t.lineTo(i[o++],i[o++])}}else for(var o=0;o0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,o=0;o0)for(var r=e[o++],s=e[o++],l=1;a>l;l++){var u=e[o++],h=e[o++];if(Zo(r,s,u,h))return n}n++}else for(var n=0,o=0;o0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(Xo(r,s,c,d,u,h))return n}else if(Zo(r,s,u,h))return n;n++}return-1}}),GE=sm.prototype;GE.isPersistent=function(){return!this._incremental},GE.updateData=function(t){this.group.removeAll();var e=new VE({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},GE.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new va({silent:!0})),this.group.add(this._incremental)):this._incremental=null},GE.incrementalUpdate=function(t,e){var i=new VE;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},GE.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},GE._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},GE._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var FE={seriesType:"lines",plan:PD(),reset:function(t){function e(e,a){var r=[];if(o){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}a.setLayout("linesPoints",s)}else for(var h=e.start;hv;v++)m.push(i.dataToPoint(r[v]));else{m[0]=i.dataToPoint(r[0]),m[1]=i.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(h,m)}}var i=t.coordinateSystem,n=t.get("polyline"),o=t.pipelineContext.large;return{progress:e}}};Fu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();if(l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r){if(eS){var u=!1;e.eachSeries(function(e){e!==t&&e.get("zlevel")===a&&(u=!0)}),u&&console.warn("Lines with trail effect should have an individual zlevel")}l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})}o.updateData(n);var h=t.get("clip",!0)&&Zc(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t);o.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=FE.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext,r=a.large;return eS&&n&&r&&console.warn("Large lines not support effect"),i&&n===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new sm:new $g(o?n?rm:am:n?om:Kg),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var WE="lineStyle.opacity".split("."),HE={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=lm(i.getShallow("symbol",!0)),o=lm(i.getShallow("symbolSize",!0)),a=i.get(WE);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}var i=lm(t.get("symbol")),n=lm(t.get("symbolSize")),o=t.getData();return o.setVisual("fromSymbol",i&&i[0]),o.setVisual("toSymbol",i&&i[1]),o.setVisual("fromSymbolSize",n&&n[0]),o.setVisual("toSymbolSize",n&&n[1]),o.setVisual("opacity",t.get(WE)),{dataEach:o.hasItemOption?e:null}}};Eu(FE),Nu(HE);var ZE=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},UE=ZE.prototype;UE.type="graph",UE.isDirected=function(){return this._directed},UE.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(i[um(t)])return void(eS&&console.error("Graph nodes have duplicate name or id"));var n=new hm(t,e);return n.hostGraph=this,this.nodes.push(n),i[um(t)]=n,n},UE.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},UE.getNodeById=function(t){return this._nodesMap[um(t)]},UE.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),hm.isInstance(t)||(t=n[um(t)]),hm.isInstance(e)||(e=n[um(e)]),t&&e){var a=t.id+"-"+e.id,r=new cm(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r,r}},UE.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},UE.getEdge=function(t,e){hm.isInstance(t)&&(t=t.id),hm.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},UE.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;n>o;o++)i[o].dataIndex>=0&&t.call(e,i[o],o)},UE.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;n>o;o++)i[o].dataIndex>=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},UE.breadthFirstTraverse=function(t,e,i,n){if(hm.isInstance(e)||(e=this._nodesMap[um(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;ao;o++)i[o].dataIndex=-1;for(var o=0,a=t.count();a>o;o++)i[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;a>o;o++)n[o].dataIndex=-1;for(var o=0,a=e.count();a>o;o++)n[e.getRawIndex(o)].dataIndex=o},UE.clone=function(){for(var t=new ZE(this._directed),e=this.nodes,i=this.edges,n=0;n=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)}}};c(hm,XE("hostGraph","data")),c(cm,XE("hostGraph","edgeData")),ZE.Node=hm,ZE.Edge=cm,wo(hm),wo(cm);var YE=function(t,e,i,n,o){for(var a=new ZE(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=bh(t,i);else{var m=ks.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=gL(t,{coordDimensions:v});p=new dL(y,i),p.initData(t)}var x=new dL(["value"],i);return x.initData(l,s),o&&o(p,x),kf({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},jE="-->",qE=function(t){return t.get("autoCurveness")||null},KE=function(t,e){var i=qE(t),n=20,o=[];if("number"==typeof i)n=i;else if(_(i))return void(t.__curvenessList=i);e>n&&(n=e);var a=n%2?n+2:n+3;o=[];for(var r=0;a>r;r++)o.push((r%2?r+1:r)/10*(r%2?-1:1));t.__curvenessList=o},$E=function(t,e,i){var n=[t.id,t.dataIndex].join("."),o=[e.id,e.dataIndex].join(".");return[i.uid,n,o].join(jE)},JE=function(t){var e=t.split(jE);return[e[0],e[2],e[1]].join(jE)},QE=function(t,e){var i=$E(t.node1,t.node2,e);return e.__edgeMap[i]},tN=function(t,e){var i=eN($E(t.node1,t.node2,e),e),n=eN($E(t.node2,t.node1,e),e);return i+n},eN=function(t,e){var i=e.__edgeMap;return i[t]?i[t].length:0},iN=Gu({type:"series.graph",init:function(t){function e(){return i._categoriesData}iN.superApply(this,"init",arguments);var i=this;this.legendVisualProvider=new tf(e,e),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){iN.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){iN.superApply(this,"mergeDefaultAndTheme",arguments),eo(t,["edgeLabel"],["show"])},getInitialData:function(t,e){function i(t,i){function n(t){return t=this.parsePath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=a._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var o=a.getModel("edgeLabel"),r=new mr({label:o.option},o.parentModel,e),s=a.getModel("emphasis.edgeLabel"),l=new mr({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}var n=t.edges||t.links||[],o=t.data||t.nodes||[],a=this;if(o&&n){dm(this);var r=YE(o,n,this,!0,i);return f(r.edges,function(t){fm(t.node1,t.node2,this,t.dataIndex)},this),r.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(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Wr(l.join(" > ")),o.value&&(l+=" : "+Wr(o.value)),l}return iN.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new dL(["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 iN.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),nN=[],oN=[],aN=[],rN=Oo,sN=MS,lN=Math.abs,uN=function(t,e){var i=[],n=Ro,o=[[],[],[]],a=[[],[]],r=[];e/=2,t.eachEdge(function(t){var s=t.getLayout(),l=t.getVisual("fromSymbol"),u=t.getVisual("toSymbol");s.__original||(s.__original=[H(s[0]),H(s[1])],s[2]&&s.__original.push(H(s[2])));var h=s.__original;if(null!=s[2]){if(W(o[0],h[0]),W(o[1],h[2]),W(o[2],h[1]),l&&"none"!==l){var c=mm(t.node1),d=vm(o,h[0],c*e);n(o[0][0],o[1][0],o[2][0],d,i),o[0][0]=i[3],o[1][0]=i[4],n(o[0][1],o[1][1],o[2][1],d,i),o[0][1]=i[3],o[1][1]=i[4]}if(u&&"none"!==u){var c=mm(t.node2),d=vm(o,h[1],c*e);n(o[0][0],o[1][0],o[2][0],d,i),o[1][0]=i[1],o[2][0]=i[2],n(o[0][1],o[1][1],o[2][1],d,i),o[1][1]=i[1],o[2][1]=i[2]}W(s[0],o[0]),W(s[1],o[2]),W(s[2],o[1])}else{if(W(a[0],h[0]),W(a[1],h[1]),Y(r,a[1],a[0]),te(r,r),l&&"none"!==l){var c=mm(t.node1);X(a[0],a[0],r,c*e)}if(u&&"none"!==u){var c=mm(t.node2);X(a[1],a[1],r,-c*e)}W(s[0],a[0]),W(s[1],a[1])}})},hN="__focusNodeAdjacency",cN="__unfocusNodeAdjacency",dN=["itemStyle","opacity"],fN=["lineStyle","opacity"];Fu({type:"graph",init:function(t,e){var i=new Pd,n=new $g,o=this.group;this._controller=new up(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,o=t.coordinateSystem;this._model=t;var a=this._symbolDraw,r=this._lineDraw,s=this.group;if("view"===o.type){var l={position:o.position,scale:o.scale};this._firstRender?s.attr(l):nr(s,l,t)}uN(t.getGraph(),gm(t));var u=t.getData();a.updateData(u);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(e,o){var a=u.getItemModel(o);e.off("drag").off("dragend");var r=a.get("draggable");r&&e.on("drag",function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(o),u.setItemLayout(o,e.position))},this).on("dragend",function(){c&&c.setUnfixed(o)},this),e.setDraggable(r&&c),e[hN]&&e.off("mouseover",e[hN]),e[cN]&&e.off("mouseout",e[cN]),a.get("focusNodeAdjacency")&&(e.on("mouseover",e[hN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[cN]=function(){n._dispatchUnfocus(i)}))},this),u.graph.eachEdge(function(e){var o=e.getGraphicEl();o[hN]&&o.off("mouseover",o[hN]),o[cN]&&o.off("mouseout",o[cN]),e.getModel().get("focusNodeAdjacency")&&(o.on("mouseover",o[hN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),o.on("mouseout",o[cN]=function(){n._dispatchUnfocus(i)}))});var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.get("label.rotate")||0,o=t.getSymbolPath();if(f){var a=u.getItemLayout(e),r=Math.atan2(a[1]-g,a[0]-p);0>r&&(r=2*Math.PI+r);var s=a[0]e&&(e=0),e*=u;var i=Math.asin(e/2/o);isNaN(i)&&(i=xN/2),_N[t.dataIndex]=i,l+=2*i});var h=(2*xN-l)/s/2,c=0;i.eachNode(function(t){var e=h+_N[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e})}},bN=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Mm(t,"symbolSize")})},SN=X,MN=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),o=n.data,a=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?o.each(function(t){var e=o.getId(t);o.setItemLayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&Mm(t,"value"):bm(t);var l=o.getDataExtent("value"),u=a.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=o.mapArray("value",function(t,e){var i=o.getItemLayout(e),n=Sr(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:o.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=a.mapArray("value",function(e,i){var o=n.getEdgeByIndex(i),a=Sr(e,u,c);isNaN(a)&&(a=(c[0]+c[1])/2);var r=o.getModel(),s=L(r.get("lineStyle.curveness"),-pm(o,t,i,!0),0);return{n1:d[o.node1.dataIndex],n2:d[o.node2.dataIndex],d:a,curveness:s,ignoreForceLayout:r.get("ignoreForceLayout")}}),e=t.coordinateSystem,p=e.getBoundingRect(),g=Im(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(t){for(var e=0,a=d.length;a>e;e++)d[e].fixed&&W(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,a,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[o.getId(s)]=e[s].p;for(var s=0,l=a.length;l>s;s++){var u=a[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],W(f[0],c),W(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})},IN=function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var o=t.getData(),a=o.mapArray(function(t){var e=o.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];Vo(a,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=Tm(t,e,l);isNaN(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinateSystem=new ep;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],h,c),p.setViewRect(u.x,u.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),i.push(p)}}),i};Cu(gN),Nu(hP("graph","circle",null)),Nu(mN),Nu(vN),Eu(yN),Eu(OC.VISUAL.POST_CHART_LAYOUT,bN),Eu(MN),Pu("graphView",{create:IN});var TN=CD.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});c(TN,PP,!0);var AN=["itemStyle"],DN=["emphasis","itemStyle"],CN=(vl.extend({type:"boxplot",render:function(t){var e=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var o="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasValue(t)){var n=e.getItemLayout(t),a=Am(n,e,t,o,!0);e.setItemGraphicEl(t,a),i.add(a)}}).update(function(t,a){var r=n.getItemGraphicEl(a);if(!e.hasValue(t))return void i.remove(r);var s=e.getItemLayout(t);r?Dm(s,r,e,t):r=Am(s,e,t,o),i.add(r),e.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},dispose:G}),oa.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;4>n;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();na&&(e[1-n]=e[n]+c.sign*a),e},RN=f,BN=Math.min,VN=Math.max,GN=Math.floor,FN=Math.ceil,WN=Ir,HN=Math.PI;Rm.prototype={type:"parallel",constructor:Rm,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;RN(i,function(t,i){var o=n[i],a=e.getComponent("parallelAxis",o),r=this._axesMap.set(t,new NN(t,qh(a),[0,0],a.get("type"),o)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=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();RN(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),jh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ts(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"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Bm(e.get("axisExpandWidth"),l),c=Bm(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");if(f)t=Bm(f[1]-f[0],l),f[1]=f[0]+t;else{t=Bm(h*(c-1),l);var p=e.get("axisExpandCenter")||GN(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[GN(WN(f[0]/h,1))+1,FN(WN(f[1]/h,1))-1],v=g/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:v}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),RN(i,function(e,i){var a=(n.axisExpandable?Gm:Vm)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:HN/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=Oe();Be(h,h,u),Re(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];f(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),d=0,p=a.length;p>d;d++){var g=s[d].getActiveState(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;o>n;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return rr([t,0],i.transform)},getAxisLayout:function(t){return n(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};
-var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&so*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),r*=e.axisExpandWidth/u,r?zN(r,n,a,"all"):l="none";else{var o=n[1]-n[0],d=a[1]*s/o;n=[VN(0,d-o/2)],n[1]=BN(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},ks.register("parallel",{create:Fm});var ZN=WA.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return AI([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)Tr(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;o>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),UN={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};o(ZN.prototype,XL),mk("parallel",ZN,Wm,UN),WA.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){WA.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&o(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=m(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}});var XN={type:"axisAreaSelect",event:"axisAreaSelected"};ku(XN,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),ku("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var YN=x,jN=f,qN=p,KN=Math.min,$N=Math.max,JN=Math.pow,QN=1e4,tz=6,ez=6,iz="globalPan",nz={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},oz={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},az={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},rz=0;Hm.prototype={constructor:Hm,enableBrush:function(t){return eS&&O(this._mounted),this._brushType&&Um(this),t.brushType&&Zm(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},eS&&(this._mounted=!0),this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){jN(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function a(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var o=u[e]=null!=i?(l[i].__brushOption=n,l[i]):qm(h,jm(h,n));Jm(h,o)}}function r(t){l[t]!==c&&h.group.remove(l[t])}eS&&O(this._mounted),t=p(t,function(t){return o(n(az),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Xu(l,t,i,e).add(a).update(a).remove(r).execute(),this},unmount:function(){return!eS||this._mounted?(this.enableBrush(!1),iv(this),this._zr.remove(this.group),eS&&(this._mounted=!1),this):void 0},dispose:function(){this.unmount(),this.off()}},c(Hm,AS);var sz={mousedown:function(t){if(this._dragging)Mv(this,t);else if(!t.target||!t.target.draggable){_v(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=tv(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(xv(this,t,n),this._dragging){_v(t);var o=bv(this,t,n,!1);o&&nv(this,o)}},mouseup:function(t){Mv(this,t)}},lz={lineX:Tv(0),lineY:Tv(1),rect:{createCover:function(t,e){return rv(YN(pv,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=av(t);return cv(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){sv(t,e,i,n)},updateCommon:lv,contain:wv},polygon:{createCover:function(t,e){var i=new xM;return i.add(new HT({name:"main",style:hv(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new WT({name:"main",draggable:!0,drift:YN(gv,t,e),ondragend:YN(nv,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:vv(t,e,i)})},updateCommon:lv,contain:wv}},uz=["axisLine","axisTickLabel","axisName"],hz=Vu({type:"parallelAxis",init:function(t,e){hz.superApply(this,"init",arguments),(this._brushController=new Hm(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!kv(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new xM,this.group.add(this._axisGroup),t.get("show")){var a=Ov(t,e),s=a.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=r({strokeContainThreshold:u},c),p=new Nk(t,d);f(uz,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,a,u,i);var g=n&&n.animation===!1?null:t;lr(o,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Ti.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Av(u),isTargetByCursor:Cv(u,a,n),getLinearBrushOtherExtent:Dv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Pv(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=p(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}}),cz=5;Vu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(dz,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),Sl(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r({type:"parallelAxisExpand"},t))}});var dz={mousedown:function(t){Ev(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Ev(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>cz)return;var o=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==o.behavior&&this._dispatchExpand({axisExpandWindow:o.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ev(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:!1})}}};Du(EN),CD.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return Nv(t,this),bh(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var fz=.3,pz=(vl.extend({type:"parallel",init:function(){this._dataGroup=new xM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function o(t){var e=Vv(l,s,t,c,h);Fv(e,l,t,d)}function a(e,i){var o=u.getItemGraphicEl(i),a=Bv(l,e,c,h);l.setItemGraphicEl(e,o);var r=n&&n.animation===!1?null:t;nr(o,{shape:{points:a}},r,e),Fv(o,l,e,d)}function r(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=Gv(t);if(l.diff(u).add(o).update(a).remove(r).execute(),!this._initialized){this._initialized=!0;var f=Rv(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,o=n.dimensions,a=Gv(e),r=t.start;r=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}})),vz=2*Math.PI,yz=(vl.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Hv(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%vz,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=I;I++){var T=Math.cos(_),A=Math.sin(_);if(f.get("show")){var D=new jT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-y)+l,y2:A*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&D.setStyle({stroke:n(I/m)}),s.add(D)}if(g.get("show")){var C=Zv(Ir(I/m*(d-c)+c),g.get("formatter")),L=g.get("distance"),k=n(I/m);s.add(new ET({style:Ya({},g,{text:C,x:T*(h-y-L)+l,y:A*(h-y-L)+u,textVerticalAlign:-.4>A?"top":A>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(p.get("show")&&I!==m){for(var P=0;v>=P;P++){var T=Math.cos(_),A=Math.sin(_),O=new jT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-x)+l,y2:A*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:n((I+P/v)/m)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,i,n,o,a,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[a,r],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var i=new mz({shape:{angle:a}});or(i,{shape:{angle:Sr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);nr(n,{shape:{angle:Sr(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Mr(a.get("width"),o.r),r:Mr(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Sr(c.get(d,e),u,[0,1],!0))),Fa(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Mr(l[0],o.r),h=o.cy+Mr(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(r,0),p=n(Sr(f,[c,d],[0,1],!0));this.group.add(new ET({silent:!0,style:Ya({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Mr(l[0],o.r),h=o.cy+Mr(l[1],o.r),c=Mr(a.get("width"),o.r),d=Mr(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Sr(p,[r,s],[0,1],!0));this.group.add(new ET({silent:!0,style:Ya({},a,{x:u,y:h,text:Zv(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Gu({type:"series.funnel",init:function(t){yz.superApply(this,"init",arguments),this.legendVisualProvider=new tf(y(this.getData,this),y(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return gP(this,{coordDimensions:["value"],encodeDefaulter:x(ys,this)})},_defaultLabelLine:function(t){eo(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=yz.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*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",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),xz=Uv.prototype,_z=["itemStyle","opacity"];xz.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),l=t.getItemModel(e).get(_z);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),or(n,{style:{opacity:l}},o,e)):nr(n,{style:{opacity:l},shape:{points:r.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(s({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Fa(this)},xz._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=r.label,l=t.getItemVisual(e,"color");nr(i,{shape:{points:s.linePoints||s.linePoints}},o,e),nr(n,{style:{x:s.x,y:s.y}},o,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=a.getModel("label"),h=a.getModel("emphasis.label"),c=a.getModel("labelLine"),d=a.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Ua(n.style,n.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!u.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},h(Uv,xM);var wz=(vl.extend({type:"funnel",render:function(t){var e=t.getData(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new Uv(e,t);e.setItemGraphicEl(t,i),n.add(i)}).update(function(t,o){var a=i.getItemGraphicEl(o);a.updateData(e,t),n.add(a),e.setItemGraphicEl(t,a)}).remove(function(t){var e=i.getItemGraphicEl(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,e){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=Xv(t,e),r=Yv(i,o),s=t.get("orient"),l=a.width,u=a.height,h=a.x,c=a.y,d="horizontal"===s?[Mr(t.get("minSize"),u),Mr(t.get("maxSize"),u)]:[Mr(t.get("minSize"),l),Mr(t.get("maxSize"),l)],f=i.getDataExtent(n),p=t.get("min"),g=t.get("max");null==p&&(p=Math.min(f[0],0)),null==g&&(g=f[1]);var m=t.get("funnelAlign"),v=t.get("gap"),y="horizontal"===s?l:u,x=(y-v*(i.count()-1))/i.count(),_=function(t,e){if("horizontal"===s){var o,a=i.get(n,t)||0,r=Sr(a,[p,g],d,!0);switch(m){case"top":o=c;break;case"center":o=c+(u-r)/2;break;case"bottom":o=c+(u-r)}return[[e,o],[e,o+r]]}var f,a=i.get(n,t)||0,v=Sr(a,[p,g],d,!0);switch(m){case"left":f=h;break;case"center":f=h+(l-v)/2;break;case"right":f=h+l-v}return[[f,e],[f+v,e]]};"ascending"===o&&(x=-x,v=-v,"horizontal"===s?h+=l:c+=u,r=r.reverse());for(var w=0;w=0)r[a[s].depth]=new mr(a[s],this,e);else if(eS)throw new Error("levels[i].depth is mandatory and should be natural number");if(o&&n){var l=YE(o,n,this,!0,i);return l.data}},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),Wr(a)}if("node"===i){var r=this.getGraph().getNodeByIndex(t),s=r.getLayout().value,l=this.getDataParams(t,i).data.name;if(s)var a=l+" : "+s;return Wr(a)}return bz.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=bz.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t),o=n.getLayout().value;i.value=o}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),Sz=["itemStyle","opacity"],Mz=["emphasis","itemStyle","opacity"],Iz=["lineStyle","opacity"],Tz=["emphasis","lineStyle","opacity"],Az=ya({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Fu({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,o=t.getGraph(),a=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,a.removeAll(),a.attr("position",[r.x,r.y]),o.eachEdge(function(e){var i=new Az;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,o,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,o=(null!=w?w*l:y.y)+y.dy,r=(null!=M?M*s:b.x)+T.ty,u=null!=I?I*l:b.y,d=n,f=o*(1-v)+u*v,p=r,g=o*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,o=(null!=w?w*l:y.y)+T.sy,r=null!=M?M*s:b.x,u=(null!=I?I*l:b.y)+T.ty,d=n*(1-v)+r*v,f=o,p=n*v+r*(1-v),g=u),i.setShape({x1:n,y1:o,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}Fa(i,e.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),h.setItemGraphicEl(e.dataIndex,i)}),o.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),o=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new XT({shape:{x:null!=o?o*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();Ua(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Fa(d,f),a.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,o){var a=u.getItemModel(o);a.get("draggable")&&(e.drift=function(e,a){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),h.eachItemGraphicEl(function(e,o){var a=h.getItemModel(o);e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),!this._data&&t.get("animation")&&a.setClipPath(Jv(a.getBoundingRect(),t,function(){a.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){Kv(t,Sz,.1)}),a.eachEdge(function(t){Kv(t,Iz,.1)}),u){$v(u,Mz);var c=s.get("focusNodeAdjacency");"outEdges"===c?f(u.outEdges,function(t){t.dataIndex<0||($v(t,Tz),$v(t.node2,Mz))}):"inEdges"===c?f(u.inEdges,function(t){t.dataIndex<0||($v(t,Tz),$v(t.node1,Mz))}):"allEdges"===c&&f(u.edges,function(t){t.dataIndex<0||($v(t,Tz),t.node1!==u&&$v(t.node1,Mz),t.node2!==u&&$v(t.node2,Mz))})}h&&($v(h,Tz),$v(h.node1,Mz),$v(h.node2,Mz))}},unfocusNodeAdjacency:function(t){var e=t.getGraph();e.eachNode(function(t){Kv(t,Sz)}),e.eachEdge(function(t){Kv(t,Iz)})}}),ku({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var Dz=function(t,e){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=Qv(t,e);t.layoutInfo=o;var a=o.width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;ey(l);var h=m(l,function(t){return 0===t.getLayout().value}),c=0!==h.length?0:t.get("layoutIterations"),d=t.get("orient"),f=t.get("nodeAlign");ty(l,u,i,n,a,r,c,d,f)})},Cz=function(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;if(i.length){var n=1/0,o=-1/0;f(i,function(t){var e=t.getLayout().value;n>e&&(n=e),e>o&&(o=e)}),f(i,function(e){var i=new kO({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:t.get("color")}),a=i.mapValueToVisual(e.getLayout().value),r=e.getModel().get("itemStyle.color");null!=r?e.setVisual("color",r):e.setVisual("color",a)})}})};Eu(Dz),Nu(Cz);var Lz=function(t,e,i,n,o){sk.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null};Lz.prototype={constructor:Lz,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(Lz,sk),wy.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wy,_init:function(t){var e=this.dimension,i=new Lz(e,qh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),jh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ts({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],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},ks.register("single",{create:by,dimensions:wy.prototype.dimensions});var kz=["axisLine","axisTickLabel","axisName"],Pz=["splitArea","splitLine"],Oz=Wk.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new xM;var r=Sy(t),s=new Nk(t,r);f(kz,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),f(Pz,function(e){t.get(e+".show")&&this["_"+e](t)},this),lr(a,this._axisGroup,t),Oz.superCall(this,"render",t,e,i,n)},remove:function(){Ad(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr||_(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(p(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},Rz=f,Bz=x,Vz=ho(),Gz=function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Ey(o)&&(o=zz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Ey(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||Ey(o),d={},f={},p={list:[],map:{}},g={showPointer:Bz(Ay,f),showTooltip:Bz(Dy,p)};Rz(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);Rz(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Py(u,t);if(!c&&i&&(!u||n)){var a=n&&n.value;null!=a||l||(a=e.pointToData(o)),null!=a&&Iy(t,a,g,!1,d)}})});var m={};return Rz(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&Rz(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,Oy(e),Oy(t)))),m[t.key]=a}})}),Rz(m,function(t,e){Iy(h[e],t,g,!0,d)}),Cy(f,h,d),Ly(p,o,t,r),ky(h,r,i),d}},Fz=(Bu({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),ho()),Wz=f,Hz=Vu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Ny("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Fy(e.getZr(),"axisPointer"),Hz.superApply(this._model,"remove",arguments)},dispose:function(t,e){Fy("axisPointer",e),Hz.superApply(this._model,"dispose",arguments)}}),Zz=ho(),Uz=n,Xz=y;Wy.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=x(Hy,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new xM,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Yy(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=xd(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=Zz(t).pointerEl=new vA[i.type](Uz(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var o=Zz(t).labelEl=new XT(Uz(e.label));t.add(o),Uy(o,n)}},updatePointerEl:function(t,e,i){var n=Zz(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=Zz(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),Uy(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=cr(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ES(t.event)},onmousedown:Xz(this._onHandleDragMove,this,0,0),drift:Xz(this._onHandleDragMove,this),ondragend:Xz(this._onHandleDragEnd,this)}),i.add(n)),Yy(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Sl(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Hy(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Xy(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Xy(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Xy(n)),Zz(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},Wy.prototype.constructor=Wy,_o(Wy);var Yz=Wy.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=nx(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=jy(n),c=jz[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Id(r.model,i);Qy(e,t,d,i,n,o)},getHandleTransform:function(t,e,i){var n=Id(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Jy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,o=n.grid,a=n.getGlobalExtent(!0),r=nx(o,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),jz={line:function(t,e,i){var n=tx([e,i[0]],[e,i[1]],ox(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:ex([e-n/2,i[0]],[n,o],ox(t))}}};Wk.registerAxisPointerClass("CartesianAxisPointer",Yz),Du(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Cu(OC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=dd(t,e)}),ku({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Gz);var qz=["x","y"],Kz=["width","height"],$z=Wy.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=rx(r,1-ax(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=jy(n),c=Jz[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=Sy(i);Qy(e,t,d,i,n,o)},getHandleTransform:function(t,e,i){var n=Sy(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Jy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,o=n.coordinateSystem,a=ax(n),r=rx(o,a),s=t.position;s[a]+=e[a],s[a]=Math.min(r[1],s[a]),s[a]=Math.max(r[0],s[a]);var l=rx(o,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),Jz={line:function(t,e,i){var n=tx([e,i[0]],[e,i[1]],ax(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:ex([e-n/2,i[0]],[n,o],ax(t))}}};Wk.registerAxisPointerClass("SingleAxisPointer",$z),Vu({type:"single"});var Qz=2,tR=CD.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){tR.superApply(this,"init",arguments),this.legendVisualProvider=new tf(y(this.getData,this),y(this.getRawData,this))},fixData:function(t){var e=t.length,i={},n=vo(t,function(t){return i.hasOwnProperty(t[0])||(i[t[0]]=-1),t[2]}),o=[];n.buckets.each(function(t,e){o.push({name:e,dataList:t})});for(var a=o.length,r=0;a>r;++r){for(var s=o[r].name,l=0;ln;++n)i[n]=n;var o=t.mapDimension("single"),a=vo(i,function(e){return t.get("name",e)}),r=[];return a.buckets.each(function(e,i){e.sort(function(e,i){return t.get(o,e)-t.get(o,i)}),r.push({name:i,indices:e})}),r},getAxisTooltipData:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getData(),o=this.getLayerSeries(),a=[],r=o.length,s=0;r>s;++s){for(var l=Number.MAX_VALUE,u=-1,h=o[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],o[s].indices[c]),f=Math.abs(d-e);l>=f&&(i=d,l=f,u=o[s].indices[c])}a.push(u)}return{dataIndices:a,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),Wr(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Fu({type:"themeRiver",init:function(){this._layers=[]},render:function(t){function e(t){return t.name}function i(e,i,s){var l=this._layers;if("remove"===e)return void o.remove(l[i]);for(var u,h=[],d=[],f=a[i].indices,p=0;pn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:y(Rx,t)}}},cR=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:function(e,i){return t.dataToPoint(e,i)}}}},dR=sA,fR=["itemStyle"],pR=["emphasis","itemStyle"],gR=["label"],mR=["emphasis","label"],vR="e\x00\x00",yR={cartesian2d:sR,geo:lR,singleAxis:uR,polar:hR,calendar:cR};CD.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(){return bh(this.getSource(),this)},getDataParams:function(t,e,i){var n=CD.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),vl.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Fx(t,a,e,i);a.diff(o).add(function(e){Hx(null,e,s(e,n),t,r,a)}).update(function(e,i){var l=o.getItemGraphicEl(i);Hx(l,e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?Zc(t.coordinateSystem,!1,t):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){function a(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var r=e.getData(),s=Fx(e,r,i,n),l=t.start;lc?c=f:(d.lastTickCount=o,d.lastAutoInterval=c),c}},h(r_,sk);var _R=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new a_,this._angleAxis=new r_,this._radiusAxis.polar=this._angleAxis.polar=this};_R.prototype={type:"polar",axisPointerEnabled:!0,constructor:_R,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(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=a>l?1:-1;a>l||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,o=-Math.sin(i)*e+this.cy;return[n,o]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),o=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*o,endAngle:-n[1]*o,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return a*a>=o&&o>=r*r}}}};var wR=WA.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});o(wR.prototype,XL);var bR={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};mk("angle",wR,s_,bR.angle),mk("radius",wR,s_,bR.radius),Bu({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var SR={dimensions:_R.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new _R(n);o.update=u_;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");h_(a,s),h_(r,l),l_(o,t,e),i.push(o),t.coordinateSystem=o,o.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];if(eS&&!i)throw new Error('Polar "'+D(e.get("polarIndex"),e.get("polarId"),0)+'" not found');e.coordinateSystem=i.coordinateSystem}}),i}};ks.register("polar",SR);var MR=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];Wk.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,o=i.getRadiusAxis().getExtent(),a=e.getTicksCoords(),r=e.getMinorTicksCoords(),s=p(e.getViewLabels(),function(t){var t=n(t);return t.coord=e.dataToCoord(t.tickValue),t});f_(s),f_(a),f(MR,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=d_(e),l=s?0:1;a=0===o[l]?new NT({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new VT({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0}),a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),l=o[d_(e)],u=p(i,function(t){return new jT({shape:c_(e,[l,l+r],t.coord)})});this.group.add(fA(u,{style:s(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*r.get("length"),u=o[d_(e)],h=[],c=0;cd?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[a]&&r[a].textStyle&&(n=new mr(r[a].textStyle,s,s.ecModel));var m=new ET({silent:Nk.isLabelSilent(t)});this.group.add(m),Ya(m.style,n,{x:c[0],y:c[1],textFill:n.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),u&&(m.eventData=Nk.makeAxisEventDataBase(t),m.eventData.targetType="axisLabel",m.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine"),r=a.getModel("lineStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;ci?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ts(r,l);f([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])
-}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/LR)-Math.floor(t[0].time/LR)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();n.setDate(o+i-1);var r=n.getDate();if(r!==a)for(var s=n.getTime()-t[1].time>0?1:-1;(r=n.getDate())!==a&&(n.getTime()-t[1].time)*s>0;)i-=s,n.setDate(r-s);var l=Math.floor((i+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,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 o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},v_.dimensions=v_.prototype.dimensions,v_.getDimensionsInfo=v_.prototype.getDimensionsInfo,v_.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new v_(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},ks.register("calendar",v_);var kR=WA.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=os(t);kR.superApply(this,"init",arguments),x_(t,e)},mergeOption:function(t){kR.superApply(this,"mergeOption",arguments),x_(this.option,t)}}),PR={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},OR={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Vu({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,o,e),this._renderYearText(t,n,o,e),this._renderMonthText(t,o,e),this._renderWeekText(t,n,o,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=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,u=new XT({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new HT({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 o=[],a=0;7>a;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?Zr(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return("left"===n||"right"===n)&&(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.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,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new ET({z2:30});Ya(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(o)&&(o=PR[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;a="start"===s?-a:a;for(var d="center"===l,f=0;ff;f++){var p=a.getNextNDay(c,f),g=a.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new ET({z2:30});r(Ya(v.style,o,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Bu({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Vu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=C(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ET({style:Ya({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ET({style:Ya({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){$r(d,"_"+t.get("target"))}),f&&c.on("click",function(){$r(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ts(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new XT({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});var ER=FD.legend.selector,NR={all:{type:"all",title:n(ER.all)},inverse:{type:"inverse",title:n(ER.inverse)}},zR=Bu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){zR.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=o(t,NR[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});ku("legendToggleSelect","legendselectchanged",x(__,"toggleSelected")),ku("legendAllSelect","legendselectall",x(__,"allSelect")),ku("legendInverseSelect","legendinverseselect",x(__,"inverseSelect")),ku("legendSelect","legendselected",x(__,"select")),ku("legendUnSelect","legendunselected",x(__,"unSelect"));var RR=x,BR=f,VR=xM,GR=Vu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new VR),this._backgroundEl,this.group.add(this._selectorGroup=new VR),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),a=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===a?"right":"left");var r=t.get("selector",!0),l=t.get("selectorPosition",!0);!r||l&&"auto"!==l||(l="horizontal"===a?"end":"start"),this.renderInner(o,t,e,i,r,a,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=ts(u,h,c),f=this.layoutInner(t,o,d,n,r,l),p=ts(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=b_(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=B(),u=e.get("selectedMode"),h=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),BR(e.getData(),function(o,a){var r=o.get("name");if(!this.newlineDisabled&&(""===r||"\n"===r))return void s.add(new VR({newline:!0}));var c=i.getSeriesByName(r)[0];if(!l.get(r)){if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol"),v=this._createItem(r,a,o,e,g,m,t,f,p,u);v.on("click",RR(M_,r,null,n,h)).on("mouseover",RR(I_,c.name,null,n,h)).on("mouseout",RR(T_,c.name,null,n,h)),l.set(r,!0)}else i.eachRawSeries(function(i){if(!l.get(r)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(r))return;var c=s.indexOfName(r),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(r,a,o,e,p,null,t,d,f,u);g.on("click",RR(M_,null,r,n,h)).on("mouseover",RR(I_,null,r,n,h)).on("mouseout",RR(T_,null,r,n,h)),l.set(r,!0)}},this);eS&&(l.get(r)||console.warn(r+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,e,n,a,r)},_createSelector:function(t,e,i){function n(t){var n=t.type,a=new ET({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});o.add(a);var r=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Ua(a.style,a.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Fa(a)}var o=this.getSelectorGroup();BR(t,function(t){n(t)})},_createItem:function(t,e,i,n,o,a,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),m=n.getModel("itemStyle"),v=n.isSelected(t),y=new VR,x=i.getModel("textStyle"),_=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel;o=_||o;var S=oc(o,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(S_(S,o,m,u,p,v)),!_&&a&&(a!==o||"none"===a)){var M=.8*d;"none"===a&&(a="circle");var I=oc(a,(c-M)/2,(d-M)/2,M,M,v?l:f,null==g?!0:g);y.add(S_(I,a,m,u,p,v))}var T="left"===s?c+5:-5,A=s,D=n.get("formatter"),C=t;"string"==typeof D&&D?C=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(C=D(t)),y.add(new ET({style:Ya({},x,{text:C,x:T,y:d/2,textFill:v?x.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var L=new XT({shape:y.getBoundingRect(),invisible:!0,tooltip:w.get("show")?r({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},w.option):null});return y.add(L),y.eachChild(function(t){t.silent=!0}),L.silent=!h,this.getContentGroup().add(y),Fa(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();VA(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){VA("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),FR=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var v=t.get("pageButtonPosition",!0);"end"===v?g[n]+=i[o]-c[o]:p[n]+=c[o]+m}g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[o]=d?i[o]:h[o],y[a]=Math.max(h[a],c[a]),y[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var x={x:0,y:0};x[o]=Math.max(i[o]-c[o]-m,0),x[a]=y[a],l.setClipPath(new XT({shape:x})),l.__rectSize=x[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&nr(s,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",b(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),o=this.getContentGroup(),a=this._containerGroup.__rectSize,r=t.getOrient().index,s=ZR[r],l=UR[r],u=this._findTargetItemIndex(n),h=o.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:o.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+a||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=o.indexOf(r),u=o.substr(s+a.length,l-s-a.length);n["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},o=o.substr(l+1),s=o.indexOf("{marker")}var h=i.getModel("textStyle"),c=h.get("fontSize"),d=i.get("textLineHeight");null==d&&(d=Math.round(3*c/2)),this.el=new ET({style:Ya({},h,{rich:n,text:t,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:d}),z:i.get("z")}),this._zr.add(this.el);var f=this;this.el.on("mouseover",function(){f._enterable&&(clearTimeout(f._hideTimeout),f._show=!0),f._inContent=!0}),this.el.on("mouseout",function(){f._enterable&&f._show&&f.hideLater(f._hideDelay),f._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var i=this._styleCoord;O_(i,this._zr,t,e),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var $R=y,JR=f,QR=Mr,tB=new XT({shape:{x:-1,y:-1,width:2,height:2}});Vu({type:"tooltip",init:function(t,e){if(!aS.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=mo(n);var o;"html"===this._renderMode?(o=new P_(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="
"):(o=new E_(e),this._newLine="\n"),this._tooltipContent=o}},render:function(t,e,i){if(!aS.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(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Ny("itemTooltip",this._api,$R(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!aS.node){var o=z_(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=tB;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=zz(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},o)}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},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(z_(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s){var l=s.getData(),t=N_([l.getItemModel(a),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;o&&o.length?this._showAxisTooltip(o,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=N_([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};JR(t,function(t){JR(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var l=$y(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Jh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var m=g.markers;
-o(c,m)}else p=g;a.push(p)}});var d=l;r.push("html"!==u?a.join(h):(d?Wr(d)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(l),h=N_([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new mr(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=Hr(h,i,!0);else if("function"==typeof h){var d=$R(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=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],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),_(e))i=QR(e[0],s),n=QR(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=ts(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=V_(e,d,u);i=p[0],n=p[1]}else{var p=R_(i,n,o,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=G_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=G_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=B_(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&JR(e,function(e,n){var o=e.dataByAxis||{},a=t[n]||{},r=a.dataByAxis||[];i&=o.length===r.length,i&&JR(o,function(t,e){var n=r[e]||{},o=t.seriesDataIndices||[],a=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===a.length,i&&JR(o,function(t,e){var n=a[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){aS.node||(this._tooltipContent.dispose(),Fy("itemTooltip",e))}}),ku({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),ku({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var eB=Gr,iB=Wr,nB=Bu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){if(eS&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(aS.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var o=this.constructor,a=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[a];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&F_(i),f(i.data,function(t){t instanceof Array?(F_(t[0]),F_(t[1])):F_(t)}),s=new o(i,this,e),r(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[a]=s)):void(t[a]=null)},this)},formatTooltip:function(t,e,i,n){var o=this.getData(),a=this.getRawValue(t),r=_(a)?p(a,eB).join(", "):eB(a),s=o.getName(t),l=iB(this.name),u="html"===n?"
":"\n";return(null!=a||s)&&(l+=u),s&&(l+=iB(s),null!=a&&(l+=" : ")),null!=a&&(l+=iB(r)),l},getData:function(){return this._data},setData:function(t){this._data=t}});c(nB,ID),nB.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var oB=u,aB=x,rB={min:aB(Z_,"min"),max:aB(Z_,"max"),average:aB(Z_,"average")},sB=Vu({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});sB.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&($_(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Pd),u=J_(o,t,e);e.setData(u),$_(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),o=i.getShallow("symbolSize"),a=i.getShallow("symbolRotate"),s=w(n),l=w(o),h=w(a);if(s||l||h){var c=e.getRawValue(t),d=e.getDataParams(t);s&&(n=n(c,d)),l&&(o=o(c,d)),h&&(a=a(c,d))}u.setItemVisual(t,{symbol:n,symbolSize:o,symbolRotate:a,color:i.get("itemStyle.color")||r.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Du(function(t){t.markPoint=t.markPoint||{}}),nB.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var lB=function(t,e,i,a){var s=t.getData(),l=a.type;if(!_(a)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=a.xAxis||null!=a.yAxis)){var u,h;if(null!=a.yAxis||null!=a.xAxis)u=e.getAxis(null!=a.yAxis?"y":"x"),h=D(a.yAxis,a.xAxis);else{var c=X_(a,s,e,t);u=c.valueAxis;var d=wh(s,c.valueDataDim);h=K_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(a),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,a=[g,m,{type:l,valueIndex:a.valueIndex,value:h}]}return a=[U_(t,a[0]),U_(t,a[1]),r({},a[2])],a[2].type=a[2].type||"",o(a[2],a[0]),o(a[2],a[1]),a};sB.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){iw(o,e,!0,t,i),iw(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);iw(e,i,o,t,n),e.setItemVisual(i,{symbolRotate:a.get("symbolRotate"),symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new $g);this.group.add(u.group);var h=nw(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Du(function(t){t.markLine=t.markLine||{}}),nB.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var uB=function(t,e,i,n){var o=U_(t,n[0]),r=U_(t,n[1]),s=D,l=o.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=a([{},o,r]);return h.coord=[o.coord,r.coord],h.x0=o.x,h.y0=o.y,h.x1=r.x,h.y1=r.y,h},hB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];sB.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=p(hB,function(o){return sw(n,e,o,t,i)});n.setItemLayout(e,o);var a=n.getItemGraphicEl(e);a.setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new xM});this.group.add(u.group),u.__keep=!0;var h=lw(o,t,e);e.setData(h),h.each(function(e){var i=p(hB,function(i){return sw(h,e,i,t,n)}),a=!0;f(hB,function(t){if(a){var i=h.get(t[0],e),n=h.get(t[1],e);(ow(i)||o.getAxis("x").containData(i))&&(ow(n)||o.getAxis("y").containData(n))&&(a=!1)}}),h.setItemLayout(e,{points:i,allClipped:a}),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=h.getItemLayout(t);if(!e.allClipped){var i=new WT({shape:{points:e.points}});h.setItemGraphicEl(t,i),u.group.add(i)}}).update(function(t,i){var n=u.__data.getItemGraphicEl(i),o=h.getItemLayout(t);o.allClipped?n&&u.group.remove(n):(n?nr(n,{shape:{points:o.points}},e,t):n=new WT({shape:{points:o.points}}),h.setItemGraphicEl(t,n),u.group.add(n))}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),r=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:li(r,.4),stroke:r})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Ua(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),Fa(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Du(function(t){t.markArea=t.markArea||{}});var cB=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&uw(t)})};WA.registerSubTypeDefaulter("timeline",function(){return"slider"}),ku({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),s({currentIndex:i.option.currentIndex},t)}),ku({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var dB=WA.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(){dB.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];f(e,function(t,e){var i,r=io(t);S(t)?(i=n(t),i.value=e):i=e,a.push(i),b(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new dL([{name:"value",type:r}],this);s.initData(e,o)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),fB=dB.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});c(fB,ID);var pB=LD.extend({type:"timeline"}),gB=function(t,e,i,n){sk.call(this,t,e,i),this.type=n||"value",this.model=null};gB.prototype={constructor:gB,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(gB,sk);var mB=y,vB=f,yB=Math.PI;pB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),r=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Wr(r.scale.getLabel(t))},vB(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,o,r,t)},this),this._renderAxisLabel(n,a,r,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=dw(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:yB/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*yB/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var o=this._mainGroup,a=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var s=Oe(),l=r.x,u=r.y+r.height;Re(s,s,[-l,-u]),Be(s,s,-yB/2),Re(s,s,[l,u]),r=r.clone(),r.applyTransform(s)}var h=i(r),c=i(o.getBoundingRect()),d=i(a.getBoundingRect()),f=o.position,p=a.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}o.attr("position",f),a.attr("position",p),o.rotation=a.rotation=t.rotation,e(o),e(a)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=qh(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new gB("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new xM;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new jT({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:r({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();vB(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:mB(this._changeTimeline,this,t)},h=pw(r,s,e,u);Fa(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var o=i.getLabelModel();if(o.get("show")){var a=n.getData(),r=i.getViewLabels();vB(r,function(n){var o=n.tickValue,r=a.getItemModel(o),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new ET({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:mB(this._changeTimeline,this,o),silent:!1});Ya(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Fa(h,Ya({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c={position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o},d=fw(n,i,u,c);e.add(d),Fa(d,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",mB(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",mB(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),mB(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=mB(s._handlePointerDrag,s),t.ondragend=mB(s._handlePointerDragend,s),gw(t,a,i,n,!0)},onUpdate:function(t){gw(t,a,i,n)}};this._currentPointer=pw(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,o=Tr(n.getExtent().slice());i>o[1]&&(i=o[1]),is&&(n=s,e=a)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Du(cB),WA.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var xB=["x","y","z","radius","angle","single"],_B=["cartesian2d","polar","singleAxis"],wB=vw(xB,["axisIndex","axis","index","id"]),bB=f,SB=Tr,MB=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};MB.prototype={constructor:MB,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(mw(i.get("coordinateSystem"))){var n=this._dimName,o=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(o&&o.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,o=this.getAxisModel(),a="x"===i||"y"===i;a?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var r;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(r=t)}),r},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,o){var r=o?"Span":"ValueSpan";zN(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=Sr(t[s],i,n,!0),o&&(e[s]=a.parse(e[s]))}var i,n=this._dataExtent,o=this.getAxisModel(),a=o.axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];bB(["start","end"],function(e,o){var h=t[e],c=t[e+"Value"];"percent"===r[o]?(null==h&&(h=s[o]),c=a.parse(Sr(h,s,n))):(i=!0,c=null==c?n[o]:a.parse(c),h=Sr(c,n,s)),u[o]=c,l[o]=h}),SB(u),SB(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=xw(this,this._dimName,e),bw(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,ww(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,ww(this,!0))},filterData:function(t){function e(t){return t>=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;"none"!==o&&bB(n,function(t){var n=t.getData(),r=n.mapDimension(i,!0);r.length&&("weakFilter"===o?n.filterSelf(function(t){for(var e,i,o,s=0;sa[1];if(u&&!h&&!c)return!0;u&&(o=!0),h&&(e=!0),c&&(i=!0)}return o&&e&&i}):bB(r,function(i){if("empty"===o)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=a,n.selectRange(r)}}),bB(r,function(t){n.setApproximateExtent(a,t)}))})}}};var IB=f,TB=wB,AB=Bu({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Sw(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Sw(t);o(this.option,t,!0),o(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;aS.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Mw(this,t);var i=this.settledOption;IB([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new MB(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();TB(function(e){var i=e.axisIndex;t[i]=to(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;TB(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 o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):IB(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&TB(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;r>a;a++)"category"===o[a].get("type")&&n.push(a);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&TB(function(e){var n=i[e.axisIndex],o=t.get(e.axisIndex),a=t.get(e.axisId),r=t.ecModel.queryComponents({mainType:e.axis,index:o,id:a})[0];if(eS&&!r)throw new Error(e.axis+' "'+D(o,a,0)+'" not found');o=r.componentIndex,u(n,o)<0&&n.push(o)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return TB(function(n){var o=t.get(n.axisIndex),a=this.dependentModels[n.axis][o];a&&a.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return TB(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;TB(function(n){IB(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;IB([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),Mw(this,t)},setCalculatedRange:function(t){var e=this.option;IB(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),DB=LD.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:LB(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var m=this.dataZoomModel;this._displayables.barGroup.add(new WT({shape:{points:c},style:s({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new HT({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){var r=t.getAxisProxy(o.name,a).getTargetSeriesModels();f(r,function(t){if(!(i||e!==!0&&u(GB,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,l=Iw(o.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:o.name,otherDim:l,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new CB({draggable:!0,cursor:Tw(this._orient),drift:PB(this._onDragMove,this,"all"),ondragstart:PB(this._showDataInfo,this,!0),ondragend:PB(this._onDragEnd,this),onmouseover:PB(this._showDataInfo,this,!0),onmouseout:PB(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new CB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:NB,fill:"rgba(0,0,0,0)"}})),OB([0,1],function(t){var o=cr(a.get("handleIcon"),{cursor:Tw(this._orient),draggable:!0,drift:PB(this._onDragMove,this,t),ondragend:PB(this._onDragEnd,this),onmouseover:PB(this._showDataInfo,this,!0),onmouseout:PB(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Mr(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new ET({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=[LB(t[0],[0,100],e,!0),LB(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];zN(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?LB(a.minSpan,r,o,!0):null,null!=a.maxSpan?LB(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=kB([LB(n[0],o,r,!0),LB(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=kB(i.slice()),o=this._size;OB([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=ar(n.handles[t].parent,this.group),i=sr(0===t?"right":"left",e),s=this._handleWidth/2+VB,l=rr([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===RB?"middle":i,textAlign:a===RB?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=kB(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");(null==o||"auto"===o)&&(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return w(n)?n(t,a):b(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,ES(n.event);var o=this._displayables.barGroup.getLocalTransform(),a=rr([e,i],o,!0),r=this._updateInterval(t,a[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),r&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&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(OB(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}});Cu({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var o=n.getAxisProxy(t.name,i);f(o.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),ku("dataZoom",function(t,e){var i=yw(y(e.eachComponent,e,"dataZoom"),wB,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),AB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var WB="\x00_ec_dataZoom_roams",HB=y,ZB=DB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){ZB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var o=p(e,function(t){return Cw(t.model)});f(e,function(e){var a=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=HB(UB[t],this,e,n)},this),Aw(i,{coordId:Cw(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Dw(this.api,this.dataZoomModel.id),ZB.superApply(this,"dispose",arguments),this._range=null}}),UB={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=XB[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return zN(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Nw(function(t,e,i,n,o,a){var r=XB[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Nw(function(t,e,i,n,o,a){var r=XB[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i);return r.signal*(t[1]-t[0])*a.scrollDelta})},XB={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}},YB=["rect","polygon","keep","clear"],jB=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;_(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),zw(s),e&&!s.length&&s.push.apply(s,YB)}},qB=f,KB={lineX:Ww(0),lineY:Ww(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&uc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return uc(n,o,a)||uc(n,o+r,a)||uc(n,o,a+s)||uc(n,o+r,a+s)||Ti.create(t).contain(l[0],l[1])||dr(o,a,o+r,a,n)||dr(o,a,o,a+s,n)||dr(o+r,a,o+r,a+s,n)||dr(o,a+s,o+r,a+s,n)?!0:void 0}}},$B=f,JB=u,QB=x,tV=["dataToPoint","pointToData"],eV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],iV=Zw.prototype;iV.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=rV[t.brushType](0,i,e);t.__rangeOffset={offset:sV[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},iV.matchOutputRanges=function(t,e,i){$B(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var o=rV[t.brushType](1,n,t.range);i(t,o.values,n,e)})},this)},iV.setInputRanges=function(t,e){$B(t,function(t){var i=this.findTargetInfo(t,e);if(eS&&(O(!i||i===!0||t.coordRange,"coordRange must be specified when coord index specified."),O(!i||i!==!0||t.range,"range must be specified in global brush.")),t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=rV[t.brushType](0,i.coordSys,t.coordRange),o=t.__rangeOffset;t.range=o?sV[t.brushType](n.values,o.offset,qw(n.xyMinMax,o.xyMinMax)):n.values}},this)},iV.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Av(n),isTargetByCursor:Cv(n,t,i.coordSysModel),getLinearBrushOtherExtent:Dv(n)}})},iV.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&JB(n.coordSyses,e.coordinateSystem)>=0},iV.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Xw(e,t),o=0;o=0||JB(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:aV.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){$B(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:aV.geo})})}},oV=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],aV={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(ar(t)),e}},rV={lineX:QB(Yw,0),lineY:QB(Yw,1),rect:function(t,e,i){var n=e[tV[t]]([i[0][0],i[1][0]]),o=e[tV[t]]([i[0][1],i[1][1]]),a=[Uw([n[0],o[0]]),Uw([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],o=p(i,function(i){var o=e[tV[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o});return{values:o,xyMinMax:n}}},sV={lineX:QB(jw,0),lineY:QB(jw,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},lV=["inBrush","outOfBrush"],uV="__ecBrushSelect",hV="__ecInBrushSelectEvent",cV=OC.VISUAL.BRUSH;Eu(cV,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),$w(t)}),Nu(cV,function(t,e,i){var o,a,r=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,o){var a=eb(i);if(a&&!ib(e,n)&&(f(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){tb(a,o,r,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushLink,v=[],y=[],x=[],w=0;i||(o=g.throttleType,a=g.throttleDelay);var b=p(e.areas,function(t){return nb(s({boundingRect:dV[t.brushType](t)},t))}),S=Bw(e.option,lV,function(t){t.mappingMethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=eb(t),o=x[e],a=t.getData(),r=l(e)?function(t){return y[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return tb(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&Gw(lV,S,a,r)})}),Jw(e,o,a,r,i)});{var dV={lineX:G,lineY:G,rect:function(t){return ob(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;o>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&ob(e)}},fV=["#ddd"];Bu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&Vw(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:fV},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){eS&&(O(_(t)),f(t,function(t){O(t.brushType,"Illegal areas")})),t&&(this.areas=p(t,function(t){return ab(this.option,t)},this))},setBrushOption:function(t){this.brushOption=ab(this.option,t),this.brushType=this.brushOption.brushType}})}Vu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Hm(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,rb.apply(this,arguments)},updateTransform:function(t,e){return $w(e),rb.apply(this,arguments)},updateView:rb,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n(t),$from:i})}}),ku({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),ku({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),ku({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var pV={},gV=FD.toolbox.brush;ub.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:n(gV.title)};var mV=ub.prototype;mV.render=mV.updateView=function(t,e){var i,n,o;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",o|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?o:e===i)?"emphasis":"normal")})},mV.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},mV.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},sb("brush",ub),Du(jB);var vV=f,yV=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),vV(e,function(t){if(t){hb(t,"splitList")&&!hb(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&vV(e,function(t){S(t)&&(hb(t,"start")&&!hb(t,"min")&&(t.min=t.start),hb(t,"end")&&!hb(t,"max")&&(t.max=t.end))})}})};WA.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var xV=OC.VISUAL.COMPONENT;Nu(xV,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(Fw(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Nu(xV,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(y(cb,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var _V={get:function(t,e,i){var o=n((wV[t]||{})[e]);return i&&_(o)?o[o.length-1]:o}},wV={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},bV=kO.mapVisual,SV=kO.eachVisual,MV=_,IV=f,TV=Tr,AV=Sr,DV=G,CV=Bu({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;aS.canvasSupported||(i.realtime=!1),!e&&Vw(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=Bw(this.option.controller,e,t),this.targetVisuals=Bw(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=to(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):w(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=TV([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o],r=t.getDimensionInfo(a);if(!r.isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){MV(r.color)&&!t.inRange&&(t.inRange={color:r.color.slice().reverse()}),t.inRange=t.inRange||{color:a.get("gradientColor")},IV(this.stateList,function(e){var i=t[e];if(b(i)){var n=_V.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},IV(n,function(t,e){if(kO.isValidType(e)){var i=_V.get(e,"inactive",h);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");IV(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:h?o:[o]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=bV(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;SV(l,function(t){t>u&&(u=t)}),s.symbolSize=bV(l,function(t){return AV(t,[0,u],[0,r[0]],!0)})}},this)}var a=this.ecModel,r=this.option,s={inRange:r.inRange,outOfRange:r.outOfRange},l=r.target||(r.target={}),u=r.controller||(r.controller={});o(l,s),o(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:DV,getValueState:DV,getVisualMeta:DV}),LV=[20,140],kV=CV.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(){kV.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){kV.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=LV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=LV[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(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(){CV.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Tr((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=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=db(this,"outOfRange",this.getExtent()),n=db(this,"inRange",this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]a;a++,u=0)u&&o.length&&e(n[a],"outOfRange"),e(n[a],"inRange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]a;a++){var r=t[0]+o*a;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:a/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new xM("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,o=i.handleThumbs,a=i.handleLabels;EV([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=rr(i.handleLabelPoints[r],ar(s,this.group));a[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 o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=OV(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",vb(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=rr(u.indicatorLabelPoint,ar(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i?i:"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=NV(zV(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 o=[0,n[1]],a=i.getExtent();t=NV(zV(o[0],t),o[1]);var r=yb(i,a,o),s=[t-r,t+r],l=OV(t,o,a,!0),u=[OV(s[0],o,a,!0),OV(s[1],o,a,!0)];s[0]o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):1/0===u[1]?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||xb(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=lo(h,c);this._dispatchHighDown("downplay",pb(d[0],i)),this._dispatchHighDown("highlight",pb(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_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",pb(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=ar(e,n?null:this.group);return vA[_(t)?"applyTransform":"transformDirection"](t,o,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()}}),GV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};ku(GV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Du(yV);{var FV=CV.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){FV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();WV[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=kO.listVisualTypes(),o=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var a=0;f(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=_V.get(n,"inRange"===t?"active":"inactive",o)})},this),CV.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,f(n,function(t){var e=this.getSelectedMapKey(t);o.hasOwnProperty(e)||(o[e]=!0)},this),"single"===i.selectedMode){var a=!1;f(n,function(t){var e=this.getSelectedMapKey(t);o[e]&&(a?o[e]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=kO.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=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){var o=kO.findPieceIndex(e,this._pieceList);o===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),r=a[a.length-1].interval[1],1/0!==r&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return f(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WV={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&5>i;)i++;t.precision=i,a=+a.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];o>r;s+=a,r++){var l=r===o-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),Br(e),f(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),wb(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var o=n.value=t.value;n.interval=[o,o],n.close=[1,1]}else{for(var a=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==a[h];d++)a[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==a[h]&&(a[h]=l[h])}u[0]&&1/0===a[1]&&(r[0]=0),u[1]&&a[0]===-1/0&&(r[1]=0),eS&&a[0]>a[1]&&console.warn("Piece "+i+"is illegal: "+a+" lower bound should not greater then uppper bound."),a[0]===a[1]&&r[0]&&r[1]&&(n.value=a[0])}n.visual=kO.retrieveVisuals(t),e.push(n)},this),wb(t,e),Br(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};PV.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var o=t.piece,u=new xM;u.onclick=y(this._onItemClick,this,o),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(o);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new ET({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:o.text,textVerticalAlign:"middle",textAlign:s,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),o=i.textStyleModel,a=o.getFont(),r=o.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=D(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),VA(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:pb(i.findTargetDataIndices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return fb(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new xM,r=this.visualMapModel.textStyleModel;a.add(new ET({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(oc(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,o=n(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(o[a]=!0,f(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}})}Du(yV);var HV=Bu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){HV.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=lb(e);i&&o(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});Vu({type:"toolbox",render:function(t,e,i,n){function o(o,r){var s,l=c[o],d=c[r],f=u[l],p=new mr(f,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===l&&(f.title=n.newTitle),l&&!d){if(bb(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=lb(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(a(p,s,l),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function a(n,o,a){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[a]=p,d[a]=g}var m=n.iconPaths={};f(c,function(a,c){var f=cr(a,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle(),f.setStyle({text:d[c],textAlign:h.get("textAlign"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding"),textFill:null});var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Fa(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:h.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:h.get("textBackgroundColor"),textPosition:h.get("textPosition")||i})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(o.onclick,o,e,i,c)),m[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Xu(this._featureNames||[],c).add(o).update(o).remove(x(o,null)).execute(),this._featureNames=c,w_(s,t,i),s.add(b_(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var o=Ui(e,sn(n)),a=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1;r+o.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-o.height:l+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var ZV=FD.toolbox.saveAsImage;Sb.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:ZV.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:ZV.lang.slice()},Sb.prototype.unusable=!aS.canvasSupported;var UV=Sb.prototype;UV.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":i.get("type",!0)||"png",r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||aS.browser.ie||aS.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='
',f=window.open();f.document.write(d)}else{var p=document.createElement("a");p.download=n+"."+a,p.target="_blank",p.href=r;var g=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(g)}},sb("saveAsImage",Sb);var XV=FD.toolbox.magicType,YV="__ec_magicType_stack__";Mb.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n(XV.title),option:{},seriesIndex:{}};var jV=Mb.prototype;jV.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var qV={line:function(t,e,i,n){return"bar"===t?o({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?o({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var a=i.get("stack")===YV;return"line"===t||"bar"===t?(n.setIconStatus("stack",a?"normal":"emphasis"),o({id:e,stack:a?"":YV},n.get("option.stack")||{},!0)):void 0}},KV=[["line","bar"],["stack"]];jV.onclick=function(t,e,i){var a=this.model,r=a.get("seriesIndex."+i);if(qV[i]){var l={series:[]},h=function(e){var n=e.subType,o=e.id,r=qV[i](n,o,e,a);r&&(s(r,e.option),l.series.push(r));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundaryGap="bar"===i}}};f(KV,function(t){u(t,i)>=0&&f(t,function(t){a.setIconStatus(t,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===YV;c=d?o({stack:XV.title.tiled},XV.title):n(XV.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c,featureName:"magicType"})}},ku({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),sb("magicType",Mb);var $V=FD.toolbox.dataView,JV=new Array(60).join("-"),QV=" ",tG=new RegExp("["+QV+"]+","g");Eb.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n($V.title),lang:n($V.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Eb.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=Db(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:T(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;Se(v,"click",i),Se(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Ob(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Eb.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Eb.prototype.dispose=function(t,e){this.remove(t,e)},sb("dataView",Eb),ku({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Nb(t.data,o)})}else i.push(r({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var eG=f,iG="\x00_ec_hist_store";AB.extend({type:"dataZoom.select"}),DB.extend({type:"dataZoom.select"});var nG=FD.toolbox.dataZoom,oG=f,aG="\x00_ec_\x00toolbox-dataZoom_";Fb.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(nG.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var rG=Fb.prototype;rG.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,Zb(t,e,this,n,i),Hb(t,e)},rG.onclick=function(t,e,i){sG[i].call(this)},rG.remove=function(){this._brushController.unmount()},rG.dispose=function(){this._brushController.dispose()};var sG={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Rb(this.ecModel))}};rG._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=zN(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){var o=i.getAxisModel(t,e.componentIndex);o&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]);var r=new Zw(Wb(this.model.option),a,{include:["grid"]});r.matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),zb(a,o),this._dispatchZoomAction(o)}},rG._dispatchZoomAction=function(t){var e=[];oG(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},sb("dataZoom",Fb),Du(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||_(a)||(a=a===!1||"none"===a?[]:[a]),i(t,function(i,r){if(null==a||"all"===a||-1!==u(a,r)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:aG+t+r};s[o]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),oG(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);_(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(_(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var lG=FD.toolbox.restore;Ub.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:lG.title};var uG=Ub.prototype;uG.onclick=function(t,e){Bb(t),e.dispatchAction({type:"restore",from:this.uid})},sb("restore",Ub),ku({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var hG={path:null,compoundPath:null,group:xM,image:Dn,text:ET};Du(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var cG=Bu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,cG.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=oo(o,a);ao(r);var s=this._elOptionsToUpdate=[];f(r,function(t,e){var i=t.option;eS&&O(S(i)||t.exist,"Empty graphic option definition"),i&&(s.push(i),Kb(t,i),$b(o,e,i),Jb(o[e],i))},this);for(var l=o.length-1;l>=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Vu({type:"graphic",init:function(){this._elMap=B(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=jb(e);eS&&r&&O(l===r.parent,"Changing parent is not supported."),o&&"merge"!==o?"replace"===o?(Yb(r,i),Xb(a,l,h,i)):"remove"===o&&Yb(r,i):r?r.attr(h):Xb(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Qb(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s=0;s--){var l=i[s],u=o.get(l.id);if(u){var h=u.parent,d=h===n?{width:a,height:r}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};es(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Yb(e,t)}),this._elMap=B()},dispose:function(){this._clear()}}),t.version=xC,t.dependencies=_C,t.PRIORITY=OC,t.init=wu,t.connect=bu,t.disConnect=Su,t.disconnect=QC,t.dispose=Mu,t.getInstanceByDom=Iu,t.getInstanceById=Tu,t.registerTheme=Au,t.registerPreprocessor=Du,t.registerProcessor=Cu,t.registerPostUpdate=Lu,t.registerAction=ku,t.registerCoordinateSystem=Pu,t.getCoordinateSystemDimensions=Ou,t.registerLayout=Eu,t.registerVisual=Nu,t.registerLoading=Ru,t.extendComponentModel=Bu,t.extendComponentView=Vu,t.extendSeriesModel=Gu,t.extendChartView=Fu,t.setCanvasCreator=Wu,t.registerMap=Hu,t.getMap=Zu,t.dataTool=tL,t.zrender=vI,t.number=DA,t.format=NA,t.throttle=bl,t.helper=ik,t.matrix=FS,t.vector=IS,t.color=rM,t.parseGeoJSON=ok,t.parseGeoJson=lk,t.util=uk,t.graphic=hk,t.List=dL,t.Model=mr,t.Axis=sk,t.env=aS});
\ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){function n(){this.constructor=t}if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");bM(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function n(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),a&&(n.weChat=!0),e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}function i(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;ni;i++)e[i]=s(t[i])}}else if(RM[n]){if(!X(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(var i=0,r=t.length;r>i;i++)e[i]=t[i]}}}else if(!OM[n]&&!X(t)&&!P(t)){e={};for(var a in t)t.hasOwnProperty(a)&&a!==GM&&(e[a]=s(t[a]))}return e}function l(t,e,n){if(!A(e)||!A(t))return n?s(e):t;for(var i in e)if(e.hasOwnProperty(i)&&i!==GM){var r=t[i],o=e[i];!A(o)||!A(r)||M(o)||M(r)||P(o)||P(r)||k(o)||k(r)||X(o)||X(r)?!n&&i in t||(t[i]=s(e[i])):l(r,o,n)}return t}function u(t,e){for(var n=t[0],i=1,r=t.length;r>i;i++)n=l(n,t[i],e);return n}function h(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==GM&&(t[n]=e[n]);return t}function c(t,e,n){for(var i=b(e),r=0;rn;n++)if(t[n]===e)return n}return-1}function p(t,e){function n(){}var i=t.prototype;n.prototype=e.prototype,t.prototype=new n;for(var r in i)i.hasOwnProperty(r)&&(t.prototype[r]=i[r]);t.prototype.constructor=t,t.superClass=e}function f(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;ri;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function y(t,e,n){if(!t)return[];if(!e)return F(t);if(t.map&&t.map===FM)return t.map(e,n);for(var i=[],r=0,o=t.length;o>r;r++)i.push(e.call(n,t[r],r,t));return i}function m(t,e,n,i){if(t&&e){for(var r=0,o=t.length;o>r;r++)n=e.call(i,n,t[r],r,t);return n}}function x(t,e,n){if(!t)return[];if(!e)return F(t);if(t.filter&&t.filter===BM)return t.filter(e,n);for(var i=[],r=0,o=t.length;o>r;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function _(t,e,n){if(t&&e)for(var i=0,r=t.length;r>i;i++)if(e.call(n,t[i],i,t))return t[i]}function b(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function w(t,e){for(var n=[],i=2;in;n++)if(null!=t[n])return t[n]}function B(t,e){return null!=t?t:e}function V(t,e,n){return null!=t?t:null!=e?e:n}function F(t){for(var e=[],n=1;nd;d++){var f=1<a;a++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*xe(n,7,0===a?1:0,1<o;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}function Me(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;4>u;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,p=h.top;a.push(d,p),l=l&&o&&d===o[c]&&p===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?_e(s,a):_e(a,s))}function Ie(t){return"CANVAS"===t.nodeName.toUpperCase()}function Te(t,e,n,i){return n=n||{},i?Ce(t,e,n):hI&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Ce(t,e,n),n}function Ce(t,e,n){if(MM.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ie(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(we(uI,t,i,r))return n.zrX=uI[0],void(n.zrY=uI[1])}n.zrX=n.zrY=0}function De(t){return t||window.event}function Ae(t,e,n){if(e=De(e),null!=e.zrX)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var o="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];o&&Te(t,o,e,n)}else{Te(t,e,e,n);var a=ke(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return null==e.which&&void 0!==s&&lI.test(e.type)&&(e.which=1&s?1:2&s?3:4&s?2:0),e}function ke(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;var r=Math.abs(0!==i?i:n),o=i>0?-1:0>i?1:n>0?-1:1;return 3*r*o}function Le(t,e,n,i){t.addEventListener(e,n,i)}function Pe(t,e,n,i){t.removeEventListener(e,n,i)}function Oe(t){return 2===t.which||3===t.which}function Re(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function Ne(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ee(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ze}}function ze(){cI(this.event)}function Be(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s?s:i.parent}return r?fI:!0}return!1}function Ve(t,e,n){var i=t.painter;return 0>e||e>i.getWidth()||0>n||n>i.getHeight()}function Fe(t){for(var e=0;t>=_I;)e|=1&t,t>>=1;return t+e}function He(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;n>r&&i(t[r],t[r-1])<0;)r++;We(t,e,r)}else for(;n>r&&i(t[r],t[r-1])>=0;)r++;return r-e}function We(t,e,n){for(n--;n>e;){var i=t[e];t[e++]=t[n],t[n--]=i}}function Ge(t,e,n,i,r){for(i===e&&i++;n>i;i++){for(var o,a=t[i],s=e,l=i;l>s;)o=s+l>>>1,r(a,t[o])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ye(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;s>l&&o(t,e[n+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[n+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function Xe(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;s>l&&o(t,e[n+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;s>l&&o(t,e[n+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Ze(t,e){function n(t,e){l[c]=t,u[c]=e,c+=1}function i(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&u[t-1]=r?a(i,r,o,h):s(i,r,o,h)))}function a(n,i,r,o){var a=0;for(a=0;i>a;a++)d[a]=t[n+a];var s=0,l=r,u=n;if(t[u++]=t[l++],0!==--o){if(1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];return void(t[u+o]=d[s])}for(var c,p,f,g=h;;){c=0,p=0,f=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],p++,c=0,0===--o){f=!0;break}}else if(t[u++]=d[s++],c++,p=0,1===--i){f=!0;break}while(g>(c|p));if(f)break;do{if(c=Xe(t[l],d,s,i,0,e),0!==c){for(a=0;c>a;a++)t[u+a]=d[s+a];if(u+=c,s+=c,i-=c,1>=i){f=!0;break}}if(t[u++]=t[l++],0===--o){f=!0;break}if(p=Ye(d[s],t,l,o,0,e),0!==p){for(a=0;p>a;a++)t[u+a]=t[l+a];if(u+=p,l+=p,o-=p,0===o){f=!0;break}}if(t[u++]=d[s++],1===--i){f=!0;break}g--}while(c>=bI||p>=bI);if(f)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===i){for(a=0;o>a;a++)t[u+a]=t[l+a];t[u+o]=d[s]}else{if(0===i)throw new Error;for(a=0;i>a;a++)t[u+a]=d[s+a]}}else for(a=0;i>a;a++)t[u+a]=d[s+a]}function s(n,i,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=n+i-1,l=o-1,u=r+o-1,c=0,p=0;if(t[u--]=t[s--],0!==--i){if(1===o){for(u-=i,s-=i,p=u+1,c=s+1,a=i-1;a>=0;a--)t[p+a]=t[c+a];return void(t[u]=d[l])}for(var f=h;;){var g=0,v=0,y=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,v=0,0===--i){y=!0;break}}else if(t[u--]=d[l--],v++,g=0,1===--o){y=!0;break}while(f>(g|v));if(y)break;do{if(g=i-Xe(d[l],t,n,i,i-1,e),0!==g){for(u-=g,s-=g,i-=g,p=u+1,c=s+1,a=g-1;a>=0;a--)t[p+a]=t[c+a];if(0===i){y=!0;break}}if(t[u--]=d[l--],1===--o){y=!0;break}if(v=o-Ye(t[s],d,0,o,o-1,e),0!==v){for(u-=v,l-=v,o-=v,p=u+1,c=l+1,a=0;v>a;a++)t[p+a]=d[c+a];if(1>=o){y=!0;break}}if(t[u--]=t[s--],0===--i){y=!0;break}f--}while(g>=bI||v>=bI);if(y)break;0>f&&(f=0),f+=2}if(h=f,1>h&&(h=1),1===o){for(u-=i,s-=i,p=u+1,c=s+1,a=i-1;a>=0;a--)t[p+a]=t[c+a];t[u]=d[l]}else{if(0===o)throw new Error;for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=u-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,u,h=bI,c=0,d=[];return l=[],u=[],{mergeRuns:i,forceMergeRuns:r,pushRun:n}}function Ue(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(2>r)){var o=0;if(_I>r)return o=He(t,n,i,e),void Ge(t,n,i,n+o,e);var a=Ze(t,e),s=Fe(r);do{if(o=He(t,n,i,e),s>o){var l=r;l>s&&(l=s),Ge(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}function je(){II||(II=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function qe(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Ke(t){return t>-LI&&LI>t}function $e(t){return t>LI||-LI>t}function Qe(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Je(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function tn(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,d=l*l-3*s*u,p=0;if(Ke(h)&&Ke(c))if(Ke(s))o[0]=0;else{var f=-l/s;f>=0&&1>=f&&(o[p++]=f)}else{var g=c*c-4*h*d;if(Ke(g)){var v=c/h,f=-s/a+v,y=-v/2;f>=0&&1>=f&&(o[p++]=f),y>=0&&1>=y&&(o[p++]=y)}else if(g>0){var m=kI(g),x=h*s+1.5*a*(-c+m),_=h*s+1.5*a*(-c-m);x=0>x?-AI(-x,RI):AI(x,RI),_=0>_?-AI(-_,RI):AI(_,RI);var f=(-s-(x+_))/(3*a);f>=0&&1>=f&&(o[p++]=f)}else{var b=(2*h*s-3*a*c)/(2*kI(h*h*h)),w=Math.acos(b)/3,S=kI(h),M=Math.cos(w),f=(-s-2*S*M)/(3*a),y=(-s+S*(M+OI*Math.sin(w)))/(3*a),I=(-s+S*(M-OI*Math.sin(w)))/(3*a);f>=0&&1>=f&&(o[p++]=f),y>=0&&1>=y&&(o[p++]=y),I>=0&&1>=I&&(o[p++]=I)}}return p}function en(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Ke(a)){if($e(o)){var u=-s/o;u>=0&&1>=u&&(r[l++]=u)}}else{var h=o*o-4*a*s;if(Ke(h))r[0]=-o/(2*a);else if(h>0){var c=kI(h),u=(-o+c)/(2*a),d=(-o-c)/(2*a);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function nn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function rn(t,e,n,i,r,o,a,s,l,u,h){var c,d,p,f,g,v=.005,y=1/0;NI[0]=l,NI[1]=u;for(var m=0;1>m;m+=.05)EI[0]=Qe(t,n,r,a,m),EI[1]=Qe(e,i,o,s,m),f=tI(NI,EI),y>f&&(c=m,y=f);y=1/0;for(var x=0;32>x&&!(PI>v);x++)d=c-v,p=c+v,EI[0]=Qe(t,n,r,a,d),EI[1]=Qe(e,i,o,s,d),f=tI(EI,NI),d>=0&&y>f?(c=d,y=f):(zI[0]=Qe(t,n,r,a,p),zI[1]=Qe(e,i,o,s,p),g=tI(zI,NI),1>=p&&y>g?(c=p,y=g):v*=.5);return h&&(h[0]=Qe(t,n,r,a,c),h[1]=Qe(e,i,o,s,c)),kI(y)}function on(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,d=1/l,p=1;l>=p;p++){var f=p*d,g=Qe(t,n,r,a,f),v=Qe(e,i,o,s,f),y=g-u,m=v-h;c+=Math.sqrt(y*y+m*m),u=g,h=v}return c}function an(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function sn(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function ln(t,e,n,i,r){var o=t-2*e+n,a=2*(e-t),s=t-i,l=0;if(Ke(o)){if($e(a)){var u=-s/a;u>=0&&1>=u&&(r[l++]=u)}}else{var h=a*a-4*o*s;if(Ke(h)){var u=-a/(2*o);u>=0&&1>=u&&(r[l++]=u)}else if(h>0){var c=kI(h),u=(-a+c)/(2*o),d=(-a-c)/(2*o);u>=0&&1>=u&&(r[l++]=u),d>=0&&1>=d&&(r[l++]=d)}}return l}function un(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function hn(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function cn(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;NI[0]=a,NI[1]=s;for(var d=0;1>d;d+=.05){EI[0]=an(t,n,r,d),EI[1]=an(e,i,o,d);var p=tI(NI,EI);c>p&&(u=d,c=p)}c=1/0;for(var f=0;32>f&&!(PI>h);f++){var g=u-h,v=u+h;EI[0]=an(t,n,r,g),EI[1]=an(e,i,o,g);var p=tI(EI,NI);if(g>=0&&c>p)u=g,c=p;else{zI[0]=an(t,n,r,v),zI[1]=an(e,i,o,v);var y=tI(zI,NI);1>=v&&c>y?(u=v,c=y):h*=.5}}return l&&(l[0]=an(t,n,r,u),l[1]=an(e,i,o,u)),kI(c)}function dn(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;a>=c;c++){var d=c*h,p=an(t,n,r,d),f=an(e,i,o,d),g=p-s,v=f-l;u+=Math.sqrt(g*g+v*v),s=p,l=f}return u}function pn(t){var e=t&&BI.exec(t);if(e){var n=e[1].split(","),i=+G(n[0]),r=+G(n[1]),o=+G(n[2]),a=+G(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(t){return 0>=t?0:t>=1?1:tn(0,i,o,1,t,s)&&Qe(0,r,a,1,s[0])}}}function fn(t){return t=Math.round(t),0>t?0:t>255?255:t}function gn(t){return t=Math.round(t),0>t?0:t>360?360:t}function vn(t){return 0>t?0:t>1?1:t}function yn(t){var e=t;return fn(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100*255:parseInt(e,10))}function mn(t){var e=t;return vn(e.length&&"%"===e.charAt(e.length-1)?parseFloat(e)/100:parseFloat(e))}function xn(t,e,n){return 0>n?n+=1:n>1&&(n-=1),1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}function _n(t,e,n){return t+(e-t)*n}function bn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function wn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Sn(t,e){XI&&wn(XI,e),XI=YI.put(t,XI||e.slice())}function Mn(t,e){if(t){e=e||[];var n=YI.get(t);if(n)return wn(e,n);t+="";var i=t.replace(/ /g,"").toLowerCase();if(i in GI)return wn(e,GI[i]),Sn(t,e),e;var r=i.length;if("#"!==i.charAt(0)){var o=i.indexOf("("),a=i.indexOf(")");if(-1!==o&&a+1===r){var s=i.substr(0,o),l=i.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return 3===l.length?bn(e,+l[0],+l[1],+l[2],1):bn(e,0,0,0,1);u=mn(l.pop());case"rgb":return 3!==l.length?void bn(e,0,0,0,1):(bn(e,yn(l[0]),yn(l[1]),yn(l[2]),u),Sn(t,e),e);case"hsla":return 4!==l.length?void bn(e,0,0,0,1):(l[3]=mn(l[3]),In(l,e),Sn(t,e),e);case"hsl":return 3!==l.length?void bn(e,0,0,0,1):(In(l,e),Sn(t,e),e);default:return}}bn(e,0,0,0,1)}else{if(4===r||5===r){var h=parseInt(i.slice(1,4),16);return h>=0&&4095>=h?(bn(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,5===r?parseInt(i.slice(4),16)/15:1),Sn(t,e),e):void bn(e,0,0,0,1)}if(7===r||9===r){var h=parseInt(i.slice(1,7),16);return h>=0&&16777215>=h?(bn(e,(16711680&h)>>16,(65280&h)>>8,255&h,9===r?parseInt(i.slice(7),16)/255:1),Sn(t,e),e):void bn(e,0,0,0,1)}}}}function In(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=mn(t[1]),r=mn(t[2]),o=.5>=r?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],bn(e,fn(255*xn(a,o,n+1/3)),fn(255*xn(a,o,n)),fn(255*xn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Tn(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=.5>u?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}function Cn(t,e){var n=Mn(t);if(n){for(var i=0;3>i;i++)n[i]=0>e?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return On(n,4===n.length?"rgba":"rgb")}}function Dn(t){var e=Mn(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function An(t,e,n){if(e&&e.length&&t>=0&&1>=t){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=fn(_n(a[0],s[0],l)),n[1]=fn(_n(a[1],s[1],l)),n[2]=fn(_n(a[2],s[2],l)),n[3]=vn(_n(a[3],s[3],l)),n}}function kn(t,e,n){if(e&&e.length&&t>=0&&1>=t){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Mn(e[r]),s=Mn(e[o]),l=i-r,u=On([fn(_n(a[0],s[0],l)),fn(_n(a[1],s[1],l)),fn(_n(a[2],s[2],l)),vn(_n(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function Ln(t,e,n,i){var r=Mn(t);return t?(r=Tn(r),null!=e&&(r[0]=gn(e)),null!=n&&(r[1]=mn(n)),null!=i&&(r[2]=mn(i)),On(In(r),"rgba")):void 0}function Pn(t,e){var n=Mn(t);return n&&null!=e?(n[3]=vn(e),On(n,"rgba")):void 0}function On(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}function Rn(t,e){var n=Mn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function Nn(){return On([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}function En(t){return"linear"===t.type}function zn(t){return"radial"===t.type}function Bn(t,e,n){return(e-t)*n+t}function Vn(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=Bn(e[o],n[o],i);return t}function Fn(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=Bn(e[a][s],n[a][s],i)}return t}function Hn(t,e,n,i){for(var r=e.length,o=0;r>o;o++)t[o]=e[o]+n[o]*i;return t}function Wn(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;r>a;a++){t[a]||(t[a]=[]);for(var s=0;o>s;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function Gn(t,e){for(var n=t.length,i=e.length,r=n>i?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa;if(s)i.length=a;else for(var l=o;a>l;l++)i.push(1===n?r[l]:qI.call(r[l]))}for(var u=i[0]&&i[0].length,l=0;lh;h++)isNaN(i[l][h])&&(i[l][h]=r[l][h])}}function Xn(t){if(g(t)){var e=t.length;if(g(t[0])){for(var n=[],i=0;e>i;i++)n.push(qI.call(t[i]));return n}return qI.call(t)}return t}function Zn(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Un(t){return g(t&&t[0])?2:1}function jn(t){return t===tT||t===eT}function qn(t){return t===$I||t===QI}function Kn(){return(new Date).getTime()}function $n(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Qn(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Jn(t){t&&(t.zrByTouch=!0)}function ti(t,e){return Ae(t.dom,new dT(t,e),!0)}function ei(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}function ni(t,e){var n=e.domHandlers;MM.pointerEventsSupported?v(uT.pointer,function(i){ri(e,i,function(e){n[i].call(t,e)})}):(MM.touchEventsSupported&&v(uT.touch,function(i){ri(e,i,function(r){n[i].call(t,r),Qn(e)})}),v(uT.mouse,function(i){ri(e,i,function(r){r=De(r),e.touching||n[i].call(t,r)})}))}function ii(t,e){function n(n){function i(i){i=De(i),ei(t,i.target)||(i=ti(t,i),e.domHandlers[n].call(t,i))}ri(e,n,i,{capture:!0})}MM.pointerEventsSupported?v(hT.pointer,n):MM.touchEventsSupported||v(hT.mouse,n)}function ri(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,Le(t.domTarget,e,n,i)}function oi(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&Pe(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}function ai(){return[1,0,0,1,0,0]}function si(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function li(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ui(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function hi(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function ci(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function di(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function pi(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function fi(t){var e=ai();return li(e,t),e}function gi(t){return t>IT||-IT>t}function vi(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Mi(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Si(i[0],n.width),u+=Si(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return t=t||{},t.x=l,t.y=u,t.align=h,t.verticalAlign=c,t}function Ii(t,e,n,i,r){n=n||{};var o=[];Li(t,"",t,e,n,i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,a--,0>=a&&(s?l&&l():u&&u())},c=function(){a--,0>=a&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var d=0;di;i++)t[i]=e[i]}function Ci(t){return g(t[0])}function Di(t,e,n){if(g(e[n]))if(g(t[n])||(t[n]=[]),L(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),Ti(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(Ci(r))for(var s=r[0].length,l=0;a>l;l++)o[l]?Ti(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else Ti(o,r,a);o.length=r.length}else t[n]=e[n]}function Ai(t,e){return t===e||g(t)&&g(e)&&ki(t,e)}function ki(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;n>i;i++)if(t[i]!==e[i])return!1;return!0}function Li(t,e,n,i,r,o,a,s){for(var l=b(i),u=r.duration,h=r.delay,c=r.additive,p=r.setToFinal,f=!A(o),v=t.animators,y=[],m=0;m0||r.force&&!a.length){var D=void 0,k=void 0,L=void 0;if(s){k={},p&&(D={});for(var M=0;S>M;M++){var _=y[M];k[_]=n[_],p?D[_]=i[_]:n[_]=i[_]}}else if(p){L={};for(var M=0;S>M;M++){var _=y[M];L[_]=Xn(n[_]),Di(n,i,_)}}var I=new oT(n,!1,!1,c?x(v,function(t){return t.targetName===e}):null);I.targetName=e,r.scope&&(I.scope=r.scope),p&&D&&I.whenWithKeys(0,D,y),L&&I.whenWithKeys(0,L,y),I.whenWithKeys(null==u?500:u,s?k:i,y).delay(h||0),t.addAnimator(I,e),a.push(I)}}function Pi(t){delete $T[t]}function Oi(t){if(!t)return!1;if("string"==typeof t)return Rn(t,1)r;r++)n+=Rn(e[r].color,1);return n/=i,xT>n}return!1}function Ri(t,e){var n=new QT(o(),t,e);return $T[n.id]=n,n}function Ni(t){t.dispose()}function Ei(){for(var t in $T)$T.hasOwnProperty(t)&&$T[t].dispose();$T={}}function zi(t){return $T[t]}function Bi(t,e){KT[t]=e}function Vi(t){return t.replace(/^\s+|\s+$/g,"")}function Fi(t,e,n,i){var r=e[0],o=e[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(r>=t)return a;if(t>=o)return s}else{if(t>=r)return a;if(o>=t)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function Hi(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 T(t)?Vi(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Wi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),nC),t=(+t).toFixed(e),n?t:+t}function Gi(t){return t.sort(function(t,e){return t-e}),t}function Yi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;15>n;n++,e*=10)if(Math.round(t*e)/e===t)return n;return Xi(t)}function Xi(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=0>o?0:r-1-o;return Math.max(0,a-i)}function Zi(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Ui(t,e,n){if(!t[e])return 0;var i=m(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=y(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=y(o,function(t){return Math.floor(t)}),l=m(s,function(t,e){return t+e},0),u=y(o,function(t,e){return t-s[e]});a>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,p=u.length;p>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function ji(t,e){var n=Math.max(Yi(t),Yi(e)),i=t+e;return n>nC?i:Wi(i,n)}function qi(t){var e=2*Math.PI;return(t%e+e)%e}function Ki(t){return t>-eC&&eC>t}function $i(t){if(t instanceof Date)return t;if(T(t)){var e=rC.exec(t);if(!e)return new Date(0/0);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return new Date(null==t?0/0:Math.round(t))
+}function Qi(t){return Math.pow(10,Ji(t))}function Ji(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function tr(t,e){var n,i=Ji(t),r=Math.pow(10,i),o=t/r;return n=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=n*r,i>=-20?+t.toFixed(0>i?-i:0):t}function er(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function nr(t){function e(t,n,i){return t.interval[i]s;s++)o[s]<=n&&(o[s]=n,a[s]=s?1:1-i),n=o[s],i=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function ir(t){var e=parseFloat(t);return e==t&&(0!==e||!T(t)||t.indexOf("x")<=0)?e:0/0}function rr(t){return!isNaN(ir(t))}function or(){return Math.round(9*Math.random())}function ar(t,e){return 0===e?t:ar(e,t%e)}function sr(t,e){return null==t?e:null==e?t:t*e/ar(t,e)}function lr(t){throw new Error(t)}function ur(t,e,n){return(e-t)*n+t}function hr(t){return t instanceof Array?t:null==t?[]:[t]}function cr(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;r>i;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function dr(t){return!A(t)||M(t)||t instanceof Date?t:t.value}function pr(t){return A(t)&&!(t instanceof Array)}function fr(t,e,n){var i="normalMerge"===n,r="replaceMerge"===n,o="replaceAll"===n;t=t||[],e=(e||[]).slice();var a=Z();v(e,function(t,n){return A(t)?void 0:void(e[n]=null)});var s=gr(t,a,n);return(i||r)&&vr(s,t,a,e),i&&yr(s,e),i||r?mr(s,e,r):o&&xr(s,e),_r(s),s}function gr(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;rr?n:i;for(var s=[],l=n,u=i,h=Math.max(l?l.length:0,u.length),c=0;h>c;++c){var d=t.getDimensionInfo(c);if(d&&"ordinal"===d.type)s[c]=(1>r&&l?l:u)[c];else{var p=l&&l[c]?l[c]:0,f=u[c],a=ur(p,f,r);s[c]=Wi(a,o?Math.max(Yi(p),Yi(f)):e)}}return s}function Vr(t){var e={main:"",sub:""};if(t){var n=t.split(cC);e.main=n[0]||"",e.sub=n[1]||""}return e}function Fr(t){W(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function Hr(t){return!(!t||!t[pC])}function Wr(t){t.$constructor=t,t.extend=function(t){var n,i=this;return Gr(i)?n=function(t){function n(){return t.apply(this,arguments)||this}return e(n,t),n}(i):(n=function(){(t.$constructor||i).apply(this,arguments)},p(n,this)),h(n.prototype,t),n[pC]=!0,n.extend=this.extend,n.superCall=Zr,n.superApply=Ur,n.superClass=i,n}}function Gr(t){return I(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function Yr(t,e){t.extend=e.extend}function Xr(t){var e=["__\x00is_clz",fC++].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Zr(t,e){for(var n=[],i=2;i=0||r&&d(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}function Kr(t){if("string"==typeof t){var e=mC.get(t);return e&&e.image}return t}function $r(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=mC.get(t),a={hostEl:n,cb:i,cbPayload:r};if(o)e=o.image,!Jr(e)&&o.pending.push(a);else{var s=PM.loadImage(t,Qr,Qr);s.__zrImageSrc=t,mC.put(t,s.__cachedImgObj={image:s,pending:[a]})}return e}return t}return e}function Qr(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;ea;a++)o[a]=no(o[a],r);return o.join("\n")}function eo(t,e,n,i){i=i||{};var r=h({},i);r.font=e,n=B(n,"..."),r.maxIterations=B(i.maxIterations,2);var o=r.minChar=B(i.minChar,0);r.cnCharWidth=yi("国",e);var a=r.ascCharWidth=yi("a",e);r.placeholder=B(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;o>l&&s>=a;l++)s-=a;var u=yi(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function no(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=yi(t,i);if(n>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?io(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=yi(t,i)}return""===t&&(t=e.placeholder),t}function io(t,e,n,i){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?n:i}return o}function ro(t,e){null!=t&&(t+="");var n,i=e.overflow,r=e.padding,o=e.font,a="truncate"===i,s=wi(o),l=B(e.lineHeight,s),u=!!e.backgroundColor,h="truncate"===e.lineOverflow,c=e.width;n=null==c||"break"!==i&&"breakAll"!==i?t?t.split("\n"):[]:t?uo(t,e.font,c,"breakAll"===i,0).lines:[];var d=n.length*l,p=B(e.height,d);if(d>p&&h){var f=Math.floor(p/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=eo(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;vu&&ao(i,t.substring(u,h),e,l),ao(i,r[2],e,l,r[1]),u=xC.lastIndex}ua){b>0?(m.tokens=m.tokens.slice(0,b),n(m,_,x),i.lines=i.lines.slice(0,y+1)):i.lines=i.lines.slice(0,y);break t}var D=S.width,A=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))w.percentWidth=D,c.push(w),w.contentWidth=yi(w.text,T);else{if(A){var k=S.backgroundColor,L=k&&k.image;L&&(L=Kr(L),Jr(L)&&(w.width=Math.max(w.width,L.width*C/L.height)))}var P=g&&null!=o?o-_:null;null!=P&&PP?(w.text="",w.width=w.contentWidth=0):(w.text=to(w.text,P-I,T,e.ellipsis,{minChar:e.truncateMinChar}),w.width=w.contentWidth=yi(w.text,T)):w.contentWidth=yi(w.text,T)}w.width+=I,_+=w.width,S&&(x=Math.max(x,w.lineHeight))}n(m,_,x)}i.outerWidth=i.width=B(o,p),i.outerHeight=i.height=B(a,d),i.contentHeight=d,i.contentWidth=p,f&&(i.outerWidth+=f[1]+f[3],i.outerHeight+=f[0]+f[2]);for(var y=0;y0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=uo(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var v=0;v=33&&383>=e}function lo(t){return so(t)?SC[t]?!0:!1:!0}function uo(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+p>n)?h?(s||l)&&(f?(s||(s=l,l="",u=0,h=u),o.push(s),a.push(h-u),l+=d,u+=p,s="",h=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=d,h=p)):f?(o.push(l),a.push(u),l=d,u=p):(o.push(d),a.push(p)):(h+=p,f?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}function ho(t,e,n){return kC.copy(t.getBoundingRect()),t.transform&&kC.applyTransform(t.transform),LC.width=e,LC.height=n,!kC.intersect(LC)}function co(t,e,n){if(0!==t.length){for(var i=t[0],r=i[0],o=i[0],a=i[1],s=i[1],l=1;lp;p++){var f=c(t,n,r,a,FC[p]);l[0]=PC(f,l[0]),u[0]=OC(f,u[0])}d=h(e,i,o,s,HC);for(var p=0;d>p;p++){var g=c(e,i,o,s,HC[p]);l[1]=PC(g,l[1]),u[1]=OC(g,u[1])}l[0]=PC(t,l[0]),u[0]=OC(t,u[0]),l[0]=PC(a,l[0]),u[0]=OC(a,u[0]),l[1]=PC(e,l[1]),u[1]=OC(e,u[1]),l[1]=PC(s,l[1]),u[1]=OC(s,u[1])}function go(t,e,n,i,r,o,a,s){var l=un,u=an,h=OC(PC(l(t,n,r),1),0),c=OC(PC(l(e,i,o),1),0),d=u(t,n,r,h),p=u(e,i,o,c);a[0]=PC(t,r,d),a[1]=PC(e,o,p),s[0]=OC(t,r,d),s[1]=OC(e,o,p)}function vo(t,e,n,i,r,o,a,s,l){var u=ye,h=me,c=Math.abs(r-o);if(1e-4>c%EC&&c>1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(zC[0]=NC(r)*n+t,zC[1]=RC(r)*i+e,BC[0]=NC(o)*n+t,BC[1]=RC(o)*i+e,u(s,zC,BC),h(l,zC,BC),r%=EC,0>r&&(r+=EC),o%=EC,0>o&&(o+=EC),r>o&&!a?o+=EC:o>r&&a&&(r+=EC),a){var d=o;o=r,r=d}for(var p=0;o>p;p+=Math.PI/2)p>r&&(VC[0]=NC(p)*n+t,VC[1]=RC(p)*i+e,u(s,VC,s),h(l,VC,l))}function yo(t){var e=Math.round(t/tD*1e8)/1e8;return e%2*tD}function mo(t,e){var n=yo(t[0]);0>n&&(n+=eD);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=eD?r=n+eD:e&&n-r>=eD?r=n-eD:!e&&n>r?r=n+(eD-yo(n-r)):e&&r>n&&(r=n-(eD-yo(r-n))),t[0]=n,t[1]=r}function xo(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,u=t;if(a>e+s&&a>i+s||e-s>a&&i-s>a||o>t+s&&o>n+s||t-s>o&&n-s>o)return!1;if(t===n)return Math.abs(o-t)<=s/2;l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);var h=l*o-a+u,c=h*h/(l*l+1);return s/2*s/2>=c}function _o(t,e,n,i,r,o,a,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>i+c&&h>o+c&&h>s+c||e-c>h&&i-c>h&&o-c>h&&s-c>h||u>t+c&&u>n+c&&u>r+c&&u>a+c||t-c>u&&n-c>u&&r-c>u&&a-c>u)return!1;var d=rn(t,e,n,i,r,o,a,s,u,h,null);return c/2>=d}function bo(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;if(l>e+u&&l>i+u&&l>o+u||e-u>l&&i-u>l&&o-u>l||s>t+u&&s>n+u&&s>r+u||t-u>s&&n-u>s&&r-u>s)return!1;var h=cn(t,e,n,i,r,o,s,l,null);return u/2>=h}function wo(t){return t%=oD,0>t&&(t+=oD),t}function So(t,e,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>n||n>h+u)return!1;if(Math.abs(i-r)%aD<1e-4)return!0;if(o){var c=i;i=wo(r),r=wo(c)}else i=wo(i),r=wo(r);i>r&&(r+=aD);var d=Math.atan2(l,s);return 0>d&&(d+=aD),d>=i&&r>=d||d+aD>=i&&r>=d+aD}function Mo(t,e,n,i,r,o){if(o>e&&o>i||e>o&&i>o)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=e>i?1:-1;(1===a||0===a)&&(s=e>i?.5:-.5);var l=a*(n-t)+t;return l===r?1/0:l>r?s:0}function Io(t,e){return Math.abs(t-e)e&&u>i&&u>o&&u>s||e>u&&i>u&&o>u&&s>u)return 0;var h=tn(e,i,o,s,u,hD);if(0===h)return 0;for(var c=0,d=-1,p=void 0,f=void 0,g=0;h>g;g++){var v=hD[g],y=0===v||1===v?.5:1,m=Qe(t,n,r,a,v);l>m||(0>d&&(d=en(e,i,o,s,cD),cD[1]1&&To(),p=Qe(e,i,o,s,cD[0]),d>1&&(f=Qe(e,i,o,s,cD[1]))),c+=2===d?vp?y:-y:vf?y:-y:f>s?y:-y:vp?y:-y:p>s?y:-y)}return c}function Do(t,e,n,i,r,o,a,s){if(s>e&&s>i&&s>o||e>s&&i>s&&o>s)return 0;var l=ln(e,i,o,s,hD);if(0===l)return 0;var u=un(e,i,o);if(u>=0&&1>=u){for(var h=0,c=an(e,i,o,u),d=0;l>d;d++){var p=0===hD[d]||1===hD[d]?.5:1,f=an(t,n,r,hD[d]);a>f||(h+=hD[d]c?p:-p:c>o?p:-p)}return h}var p=0===hD[0]||1===hD[0]?.5:1,f=an(t,n,r,hD[0]);return a>f?0:e>o?p:-p}function Ao(t,e,n,i,r,o,a,s){if(s-=e,s>n||-n>s)return 0;var l=Math.sqrt(n*n-s*s);hD[0]=-l,hD[1]=l;var u=Math.abs(i-r);if(1e-4>u)return 0;if(u>=lD-1e-4){i=0,r=lD;var h=o?1:-1;return a>=hD[0]+t&&a<=hD[1]+t?h:0}if(i>r){var c=i;i=r,r=c}0>i&&(i+=lD,r+=lD);for(var d=0,p=0;2>p;p++){var f=hD[p];if(f+t>a){var g=Math.atan2(s,f),h=o?1:-1;0>g&&(g=lD+g),(g>=i&&r>=g||g+lD>=i&&r>=g+lD)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),d+=h)}}return d}function ko(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,h=0,c=0,d=0,p=0,f=0;l>f;){var g=s[f++],v=1===f;switch(g===sD.M&&f>1&&(n||(u+=Mo(h,c,d,p,i,r))),v&&(h=s[f],c=s[f+1],d=h,p=c),g){case sD.M:d=s[f++],p=s[f++],h=d,c=p;break;case sD.L:if(n){if(xo(h,c,s[f],s[f+1],e,i,r))return!0}else u+=Mo(h,c,s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case sD.C:if(n){if(_o(h,c,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],e,i,r))return!0}else u+=Co(h,c,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case sD.Q:if(n){if(bo(h,c,s[f++],s[f++],s[f],s[f+1],e,i,r))return!0}else u+=Do(h,c,s[f++],s[f++],s[f],s[f+1],i,r)||0;h=s[f++],c=s[f++];break;case sD.A:var y=s[f++],m=s[f++],x=s[f++],_=s[f++],b=s[f++],w=s[f++];f+=1;var S=!!(1-s[f++]);o=Math.cos(b)*x+y,a=Math.sin(b)*_+m,v?(d=o,p=a):u+=Mo(h,c,o,a,i,r);var M=(i-y)*_/x+y;if(n){if(So(y,m,_,b,b+w,S,e,M,r))return!0}else u+=Ao(y,m,_,b,b+w,S,M,r);h=Math.cos(b+w)*x+y,c=Math.sin(b+w)*_+m;break;case sD.R:d=h=s[f++],p=c=s[f++];var I=s[f++],T=s[f++];if(o=d+I,a=p+T,n){if(xo(d,p,o,p,e,i,r)||xo(o,p,o,a,e,i,r)||xo(o,a,d,a,e,i,r)||xo(d,a,d,p,e,i,r))return!0}else u+=Mo(o,p,o,a,i,r),u+=Mo(d,a,d,p,i,r);break;case sD.Z:if(n){if(xo(h,c,d,p,e,i,r))return!0}else u+=Mo(h,c,d,p,i,r);h=d,c=p}}return n||Io(c,p)||(u+=Mo(h,c,d,p,i,r)||0),0!==u}function Lo(t,e,n){return ko(t,0,!1,e,n)}function Po(t,e,n,i){return ko(t,e,!0,n,i)}function Oo(t){return!!(t&&"string"!=typeof t&&t.width&&t.height)}function Ro(t,e){var n,i,r,o,a=e.x,s=e.y,l=e.width,u=e.height,h=e.r;0>l&&(a+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0;var c;n+i>l&&(c=n+i,n*=l/c,i*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),i+r>u&&(c=i+r,i*=u/c,r*=u/c),n+o>u&&(c=n+o,n*=u/c,o*=u/c),t.moveTo(a+n,s),t.lineTo(a+l-i,s),0!==i&&t.arc(a+l-i,s+i,i,-Math.PI/2,0),t.lineTo(a+l,s+u-r),0!==r&&t.arc(a+l-r,s+u-r,r,0,Math.PI/2),t.lineTo(a+o,s+u),0!==o&&t.arc(a+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(a,s+n),0!==n&&t.arc(a+n,s+n,n,Math.PI,1.5*Math.PI)}function No(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(bD(2*i)===bD(2*r)&&(t.x1=t.x2=zo(i,s,!0)),bD(2*o)===bD(2*a)&&(t.y1=t.y2=zo(o,s,!0)),t):t}}function Eo(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=zo(i,s,!0),t.y=zo(r,s,!0),t.width=Math.max(zo(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(zo(r+a,s,!1)-t.y,0===a?0:1),t):t}}function zo(t,e,n){if(!e)return t;var i=bD(2*t);return(i+bD(e))%2===0?i/2:(i+(n?1:-1))/2}function Bo(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?IM+"px":t+"px":t}function Vo(t,e){for(var n=0;n=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yo(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xo(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Zo(t){var e=t.text;return null!=e&&(e+=""),e}function Uo(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}function jo(t){return null!=t&&"none"!==t}function qo(t){if(T(t)){var e=KD.get(t);return e||(e=Cn(t,-.1),KD.put(t,e)),e}if(O(t)){var n=h({},t);return n.colorStops=y(t.colorStops,function(t){return{offset:t.offset,color:Cn(t.color,-.1)}}),n}return t}function Ko(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function $o(t){Ko(t,"emphasis",FD)}function Qo(t){t.hoverState===FD&&Ko(t,"normal",BD)}function Jo(t){Ko(t,"blur",VD)}function ta(t){t.hoverState===VD&&Ko(t,"normal",BD)}function ea(t){t.selected=!0}function na(t){t.selected=!1}function ia(t,e,n){e(t,n)}function ra(t,e,n){ia(t,e,n),t.isGroup&&t.traverse(function(t){ia(t,e,n)})}function oa(t,e){switch(e){case"emphasis":t.hoverState=FD;break;case"normal":t.hoverState=BD;break;case"blur":t.hoverState=VD;break;case"select":t.selected=!0}}function aa(t,e,n,i){for(var r=t.style,o={},a=0;a=0,o=!1;if(t instanceof gD){var a=ED(t),s=r?a.selectFill||a.normalFill:a.normalFill,l=r?a.selectStroke||a.normalStroke:a.normalStroke;if(jo(s)||jo(l)){i=i||{};var u=i.style||{};"inherit"===u.fill?(o=!0,i=h({},i),u=h({},u),u.fill=s):!jo(u.fill)&&jo(s)?(o=!0,i=h({},i),u=h({},u),u.fill=qo(s)):!jo(u.stroke)&&jo(l)&&(o||(i=h({},i),u=h({},u)),u.stroke=qo(l)),i.style=u}}if(i&&null==i.z2){o||(i=h({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:GD)}return i}function la(t,e,n){if(n&&null==n.z2){n=h({},n);var i=t.z2SelectLift;n.z2=t.z2+(null!=i?i:YD)}return n}function ua(t,e,n){var i=d(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:aa(t,["opacity"],e,{opacity:1});n=n||{};var a=n.style||{};return null==a.opacity&&(n=h({},n),a=h({opacity:i?r:.1*o.opacity},a),n.style=a),n}function ha(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return sa(this,t,e,n);if("blur"===t)return ua(this,t,n);if("select"===t)return la(this,t,n)}return n}function ca(t){t.stateProxy=ha;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=ha),n&&(n.stateProxy=ha)}function da(t,e){!_a(t,e)&&!t.__highByOuter&&ra(t,$o)}function pa(t,e){!_a(t,e)&&!t.__highByOuter&&ra(t,Qo)}function fa(t,e){t.__highByOuter|=1<<(e||0),ra(t,$o)}function ga(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&ra(t,Qo)}function va(t){ra(t,Jo)}function ya(t){ra(t,ta)}function ma(t){ra(t,ea)}function xa(t){ra(t,na)}function _a(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function ba(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(e,r){var o=zD(r),a="series"===e,s=a?t.getViewOfSeriesModel(r):t.getViewOfComponentModel(r);!a&&i.push(s),o.isBlured&&(s.group.traverse(function(t){ta(t)}),a&&n.push(r)),o.isBlured=!1}),v(i,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(n,!1,e)})}function wa(t,e,n,i){function r(t,e){for(var n=0;nl;)a=r.getItemGraphicEl(l++);if(a){var u=PD(a);wa(i,u.focus,u.blurScope,n)}else{var h=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);null!=h&&wa(i,h,c,n)}}}function Ia(t,e,n,i){var r={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return r;var o=i.getModel().getComponent(t,e);if(!o)return r;var a=i.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return r;for(var s,l=a.findHighDownDispatchers(n),u=0;u0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}})}),e}function La(t,e,n){Ea(t,!0),ra(t,ca),Ra(t,e,n)}function Pa(t){Ea(t,!1)}function Oa(t,e,n,i){i?Pa(t):La(t,e,n)}function Ra(t,e,n){var i=PD(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}function Na(t,e,n,i){n=n||"itemStyle";for(var r=0;r<$D.length;r++){var o=$D[r],a=e.getModel([o,n]),s=t.ensureState(o);s.style=i?i(a):a[QD[n]]()}}function Ea(t,e){var n=e===!1,i=t;t.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!n||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!n)}function za(t){return!(!t||!t.__highDownDispatcher)}function Ba(t){var e=ND[t];return null==e&&32>=RD&&(e=ND[t]=RD++),e}function Va(t){var e=t.type;return e===UD||e===jD||e===qD}function Fa(t){var e=t.type;return e===XD||e===ZD}function Ha(t){var e=ED(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}function Wa(t,e){if(e){var n,i,r,o,a,s,l=t.data,u=t.len(),h=JD.M,c=JD.C,d=JD.L,p=JD.R,f=JD.A,g=JD.Q;for(r=0,o=0;u>r;){switch(n=l[r++],o=r,i=0,n){case h:i=1;break;case d:i=1;break;case c:i=3;break;case g:i=2;break;case f:var v=e[4],y=e[5],m=eA(e[0]*e[0]+e[1]*e[1]),x=eA(e[2]*e[2]+e[3]*e[3]),_=nA(-e[1]/x,e[0]/m);l[r]*=m,l[r++]+=v,l[r]*=x,l[r++]+=y,l[r++]*=m,l[r++]*=x,l[r++]+=_,l[r++]+=_,r+=2,o=r;break;case p:s[0]=l[r++],s[1]=l[r++],ve(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],ve(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;i>a;a++){var b=tA[a];b[0]=l[r++],b[1]=l[r++],ve(b,b,e),l[o++]=b[0],l[o++]=b[1]}}t.increaseVersion()}}function Ga(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ya(t,e){return(t[0]*e[0]+t[1]*e[1])/(Ga(t)*Ga(e))}function Xa(t,e){return(t[0]*e[1]1&&(a*=iA(f),s*=iA(f));var g=(r===o?-1:1)*iA((a*a*s*s-a*a*p*p-s*s*d*d)/(a*a*p*p+s*s*d*d))||0,v=g*a*p/s,y=g*-s*d/a,m=(t+n)/2+oA(c)*v-rA(c)*y,x=(e+i)/2+rA(c)*v+oA(c)*y,_=Xa([1,0],[(d-v)/a,(p-y)/s]),b=[(d-v)/a,(p-y)/s],w=[(-1*d-v)/a,(-1*p-y)/s],S=Xa(b,w);if(Ya(b,w)<=-1&&(S=aA),Ya(b,w)>=1&&(S=0),0>S){var M=Math.round(S/aA*1e6)/1e6;S=2*aA+M%2*aA}h.addData(u,m,x,a,s,_,S,c,o)}function Ua(t){var e=new rD;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=rD.CMD,l=t.match(sA);if(!l)return e;for(var u=0;ug;g++)p[g]=parseFloat(p[g]);for(var v=0;f>v;){var y=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=i,I=r,T=void 0,C=void 0;switch(c){case"l":i+=p[v++],r+=p[v++],d=s.L,e.addData(d,i,r);break;case"L":i=p[v++],r=p[v++],d=s.L,e.addData(d,i,r);break;case"m":i+=p[v++],r+=p[v++],d=s.M,e.addData(d,i,r),o=i,a=r,c="l";break;case"M":i=p[v++],r=p[v++],d=s.M,e.addData(d,i,r),o=i,a=r,c="L";break;case"h":i+=p[v++],d=s.L,e.addData(d,i,r);break;case"H":i=p[v++],d=s.L,e.addData(d,i,r);break;case"v":r+=p[v++],d=s.L,e.addData(d,i,r);break;case"V":r=p[v++],d=s.L,e.addData(d,i,r);break;case"C":d=s.C,e.addData(d,p[v++],p[v++],p[v++],p[v++],p[v++],p[v++]),i=p[v-2],r=p[v-1];break;case"c":d=s.C,e.addData(d,p[v++]+i,p[v++]+r,p[v++]+i,p[v++]+r,p[v++]+i,p[v++]+r),i+=p[v-2],r+=p[v-1];break;case"S":y=i,m=r,T=e.len(),C=e.data,n===s.C&&(y+=i-C[T-4],m+=r-C[T-3]),d=s.C,M=p[v++],I=p[v++],i=p[v++],r=p[v++],e.addData(d,y,m,M,I,i,r);break;case"s":y=i,m=r,T=e.len(),C=e.data,n===s.C&&(y+=i-C[T-4],m+=r-C[T-3]),d=s.C,M=i+p[v++],I=r+p[v++],i+=p[v++],r+=p[v++],e.addData(d,y,m,M,I,i,r);break;case"Q":M=p[v++],I=p[v++],i=p[v++],r=p[v++],d=s.Q,e.addData(d,M,I,i,r);break;case"q":M=p[v++]+i,I=p[v++]+r,i+=p[v++],r+=p[v++],d=s.Q,e.addData(d,M,I,i,r);break;case"T":y=i,m=r,T=e.len(),C=e.data,n===s.Q&&(y+=i-C[T-4],m+=r-C[T-3]),i=p[v++],r=p[v++],d=s.Q,e.addData(d,y,m,i,r);break;case"t":y=i,m=r,T=e.len(),C=e.data,n===s.Q&&(y+=i-C[T-4],m+=r-C[T-3]),i+=p[v++],r+=p[v++],d=s.Q,e.addData(d,y,m,i,r);break;case"A":x=p[v++],_=p[v++],b=p[v++],w=p[v++],S=p[v++],M=i,I=r,i=p[v++],r=p[v++],d=s.A,Za(M,I,i,r,w,S,x,_,b,d,e);break;case"a":x=p[v++],_=p[v++],b=p[v++],w=p[v++],S=p[v++],M=i,I=r,i+=p[v++],r+=p[v++],d=s.A,Za(M,I,i,r,w,S,x,_,b,d,e)}}("z"===c||"Z"===c)&&(d=s.Z,e.addData(d),i=o,r=a),n=d}return e.toStatic(),e}function ja(t){return null!=t.setData}function qa(t,e){var n=Ua(t),i=h({},e);return i.buildPath=function(t){if(ja(t)){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e,1)}else{var e=t;n.rebuildPath(e,1)}},i.applyTransform=function(t){Wa(n,t),this.dirtyShape()},i}function Ka(t,e){return new uA(qa(t,e))}function $a(t,n){var i=qa(t,n),r=function(t){function n(e){var n=t.call(this,e)||this;return n.applyTransform=i.applyTransform,n.buildPath=i.buildPath,n}return e(n,t),n}(uA);return r}function Qa(t,e){for(var n=[],i=t.length,r=0;i>r;r++){var o=t[r];n.push(o.getUpdatedPathProxy(!0))}var a=new gD(e);return a.createPathProxy(),a.buildPath=function(t){if(ja(t)){t.appendPath(n);
+var e=t.getContext();e&&t.rebuildPath(e,1)}},a}function Ja(t,e,n,i,r,o,a,s){var l=n-t,u=i-e,h=a-r,c=s-o,d=c*l-h*u;return MA>d*d?void 0:(d=(h*(e-o)-c*(t-r))/d,[t+d*l,e+d*u])}function ts(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/bA(s*s+l*l),h=u*l,c=-u*s,d=t+h,p=e+c,f=n+h,g=i+c,v=(d+f)/2,y=(p+g)/2,m=f-d,x=g-p,_=m*m+x*x,b=r-o,w=d*g-f*p,S=(0>x?-1:1)*bA(wA(0,b*b*_-w*w)),M=(w*x-m*S)/_,I=(-w*m-x*S)/_,T=(w*x+m*S)/_,C=(-w*m+x*S)/_,D=M-v,A=I-y,k=T-v,L=C-y;return D*D+A*A>k*k+L*L&&(M=T,I=C),{cx:M,cy:I,x0:-h,y0:-c,x1:M*(r/b-1),y1:I*(r/b-1)}}function es(t){var e;if(M(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}function ns(t,e){var n,i=wA(e.r,0),r=wA(e.r0||0,0),o=i>0,a=r>0;if(o||a){if(o||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=e.startAngle,u=e.endAngle;if(!isNaN(l)&&!isNaN(u)){var h=e.cx,c=e.cy,d=!!e.clockwise,p=_A(u-l),f=p>gA&&p%gA;if(f>MA&&(p=f),i>MA)if(p>gA-MA)t.moveTo(h+i*yA(l),c+i*vA(l)),t.arc(h,c,i,l,u,!d),r>MA&&(t.moveTo(h+r*yA(u),c+r*vA(u)),t.arc(h,c,r,u,l,d));else{var g=void 0,v=void 0,y=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,T=void 0,C=void 0,D=void 0,A=void 0,k=void 0,L=i*yA(l),P=i*vA(l),O=r*yA(u),R=r*vA(u),N=p>MA;if(N){var E=e.cornerRadius;E&&(n=es(E),g=n[0],v=n[1],y=n[2],m=n[3]);var z=_A(i-r)/2;if(x=SA(z,y),_=SA(z,m),b=SA(z,g),w=SA(z,v),I=S=wA(x,_),T=M=wA(b,w),(S>MA||M>MA)&&(C=i*yA(u),D=i*vA(u),A=r*yA(l),k=r*vA(l),fA>p)){var B=Ja(L,P,A,k,C,D,O,R);if(B){var V=L-B[0],F=P-B[1],H=C-B[0],W=D-B[1],G=1/vA(mA((V*H+F*W)/(bA(V*V+F*F)*bA(H*H+W*W)))/2),Y=bA(B[0]*B[0]+B[1]*B[1]);I=SA(S,(i-Y)/(G+1)),T=SA(M,(r-Y)/(G-1))}}}if(N)if(I>MA){var X=SA(y,I),Z=SA(m,I),U=ts(A,k,L,P,i,X,d),j=ts(C,D,O,R,i,Z,d);t.moveTo(h+U.cx+U.x0,c+U.cy+U.y0),S>I&&X===Z?t.arc(h+U.cx,c+U.cy,I,xA(U.y0,U.x0),xA(j.y0,j.x0),!d):(X>0&&t.arc(h+U.cx,c+U.cy,X,xA(U.y0,U.x0),xA(U.y1,U.x1),!d),t.arc(h,c,i,xA(U.cy+U.y1,U.cx+U.x1),xA(j.cy+j.y1,j.cx+j.x1),!d),Z>0&&t.arc(h+j.cx,c+j.cy,Z,xA(j.y1,j.x1),xA(j.y0,j.x0),!d))}else t.moveTo(h+L,c+P),t.arc(h,c,i,l,u,!d);else t.moveTo(h+L,c+P);if(r>MA&&N)if(T>MA){var X=SA(g,T),Z=SA(v,T),U=ts(O,R,C,D,r,-Z,d),j=ts(L,P,A,k,r,-X,d);t.lineTo(h+U.cx+U.x0,c+U.cy+U.y0),M>T&&X===Z?t.arc(h+U.cx,c+U.cy,T,xA(U.y0,U.x0),xA(j.y0,j.x0),!d):(Z>0&&t.arc(h+U.cx,c+U.cy,Z,xA(U.y0,U.x0),xA(U.y1,U.x1),!d),t.arc(h,c,r,xA(U.cy+U.y1,U.cx+U.x1),xA(j.cy+j.y1,j.cx+j.x1),d),X>0&&t.arc(h+j.cx,c+j.cy,X,xA(j.y1,j.x1),xA(j.y0,j.x0),!d))}else t.lineTo(h+O,c+R),t.arc(h,c,r,u,l,d);else t.lineTo(h+O,c+R)}else t.moveTo(h,c);t.closePath()}}}function is(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;p>d;d++)ye(a,a,t[d]),me(s,s,t[d]);ye(a,a,i[0]),me(s,s,i[1])}for(var d=0,p=t.length;p>d;d++){var f=t[d];if(n)r=t[d?d-1:p-1],o=t[(d+1)%p];else{if(0===d||d===p-1){l.push(te(t[d]));continue}r=t[d-1],o=t[d+1]}re(u,o,r),he(u,u,e);var g=de(f,r),v=de(f,o),y=g+v;0!==y&&(g/=y,v/=y),he(h,u,-g),he(c,u,v);var m=ne([],f,h),x=ne([],f,c);i&&(me(m,m,a),ye(m,m,s),me(x,x,a),ye(x,x,s)),l.push(m),l.push(x)}return n&&l.push(l.shift()),l}function rs(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=is(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;(n?a:a-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=r[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;c>s;s++)t.lineTo(r[s][0],r[s][1])}n&&t.closePath()}}function os(t,e,n){var i=t.cpx2,r=t.cpy2;return null!=i||null!=r?[(n?Je:Qe)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Je:Qe)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?sn:an)(t.x1,t.cpx1,t.x2,e),(n?sn:an)(t.y1,t.cpy1,t.y2,e)]}function as(t,e,n,i,r){var o;if(e&&e.ecModel){var a=e.ecModel.getUpdatePayload();o=a&&a.animation}var s=e&&e.isAnimationEnabled(),l="update"===t;if(s){var u=void 0,h=void 0,c=void 0;i?(u=B(i.duration,200),h=B(i.easing,"cubicOut"),c=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),h=e.getShallow(l?"animationEasingUpdate":"animationEasing"),c=e.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(h=o.easing),null!=o.delay&&(c=o.delay)),I(c)&&(c=c(n,r)),I(u)&&(u=u(n));var d={duration:u||0,delay:c,easing:h};return d}return null}function ss(t,e,n,i,r,o,a){var s,l=!1;I(r)?(a=o,o=r,r=null):A(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u="leave"===t;u||e.stopAnimation("leave");var h=as(t,i,r,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null);if(h&&h.duration>0){var c=h.duration,d=h.delay,p=h.easing,f={duration:c,delay:d||0,easing:p,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,f):e.animateTo(n,f)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function ls(t,e,n,i,r,o){ss("update",t,e,n,i,r,o)}function us(t,e,n,i,r,o){ss("enter",t,e,n,i,r,o)}function hs(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Ds(t){return!t.isGroup}function As(t){return null!=t.shape}function ks(t,e,n){function i(t){var e={};return t.traverse(function(t){Ds(t)&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return As(t)&&(e.shape=h({},t.shape)),e}if(t&&e){var o=i(t);e.traverse(function(t){if(Ds(t)&&t.anid){var e=o[t.anid];if(e){var i=r(t);t.attr(r(e)),ls(t,i,n,PD(t).dataIndex)}}})}}function Ls(t,e){return y(t,function(t){var n=t[0];n=JA(n,e.x),n=tk(n,e.x+e.width);var i=t[1];return i=JA(i,e.y),i=tk(i,e.y+e.height),[n,i]})}function Ps(t,e){var n=JA(t.x,e.x),i=tk(t.x+t.width,e.x+e.width),r=JA(t.y,e.y),o=tk(t.y+t.height,e.y+e.height);return i>=n&&o>=r?{x:n,y:r,width:i-n,height:o-r}:void 0}function Os(t,e,n){var i=h({rectHover:!0},e),r=i.style={strokeNoScale:!0};return n=n||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(r.image=t.slice(8),c(r,n),new _D(i)):xs(t.replace("path://",""),i,n,"center"):void 0}function Rs(t,e,n,i,r){for(var o=0,a=r[r.length-1];og||g>1)return!1;var v=Es(p,f,h,c)/d;return 0>v||v>1?!1:!0}function Es(t,e,n,i){return t*i-n*e}function zs(t){return 1e-6>=t&&t>=-1e-6}function Bs(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=T(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&v(b(l),function(t){K(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=PD(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:c({content:i,formatterParams:s},r)}}function Vs(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Fs(t,e){if(t)if(M(t))for(var n=0;n=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function a(t){h[t]=!0,o(t)}if(t.length){var s=n(e),l=s.graph,u=s.noEntryList,h={};for(v(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(i.call(r,c,d.originalDeps.slice()),delete h[c]),v(d.successor,p?a:o)}v(h,function(){var t="";throw new Error(t)})}}}function nl(t,e){return l(l({},t,!0),e,!0)}function il(t,e){t=t.toUpperCase(),Ak[t]=new bk(e),Dk[t]=e}function rl(t){if(T(t)){var e=Dk[t.toUpperCase()]||{};return t===Ik||t===Tk?s(e):l(s(e),s(Dk[Ck]),!1)}return l(s(t),s(Dk[Ck]),!1)}function ol(t){return Ak[t]}function al(){return Ak[Ck]}function sl(t,e){return t+="","0000".substr(0,e-t.length)+t}function ll(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ul(t){return t===ll(t)}function hl(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function cl(t,e,n,i){var r=$i(t),o=r[gl(n)](),a=r[vl(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[yl(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[ml(n)](),c=(h-1)%12+1,d=r[xl(n)](),p=r[_l(n)](),f=r[bl(n)](),g=i instanceof bk?i:ol(i||kk)||al(),v=g.getModel("time"),y=v.get("month"),m=v.get("monthAbbr"),x=v.get("dayOfWeek"),_=v.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,m[a-1]).replace(/{MM}/g,sl(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,sl(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,sl(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,sl(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,sl(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,sl(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,sl(f,3)).replace(/{S}/g,f+"")}function dl(t,e,n,i,r){var o=null;if(T(n))o=n;else if(I(n))o=n(t.value,e,{level:t.level});else{var a=h({},Ek);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(M(o)){var p=null==t.level?0:t.level>=0?t.level:o.length+t.level;p=Math.min(p,o.length-1),o=o[p]}}return cl(new Date(t.value),o,r,i)}function pl(t,e){var n=$i(t),i=n[vl(e)]()+1,r=n[yl(e)](),o=n[ml(e)](),a=n[xl(e)](),s=n[_l(e)](),l=n[bl(e)](),u=0===l,h=u&&0===s,c=h&&0===a,d=c&&0===o,p=d&&1===r,f=p&&1===i;return f?"year":p?"month":d?"day":c?"hour":h?"minute":u?"second":"millisecond"}function fl(t,e,n){var i=D(t)?$i(t):t;switch(e=e||pl(t,n)){case"year":return i[gl(n)]();case"half-year":return i[vl(n)]()>=6?1:0;case"quarter":return Math.floor((i[vl(n)]()+1)/4);case"month":return i[vl(n)]();case"day":return i[yl(n)]();case"half-day":return i[ml(n)]()/24;case"hour":return i[ml(n)]();case"minute":return i[xl(n)]();case"second":return i[_l(n)]();case"millisecond":return i[bl(n)]()}}function gl(t){return t?"getUTCFullYear":"getFullYear"}function vl(t){return t?"getUTCMonth":"getMonth"}function yl(t){return t?"getUTCDate":"getDate"}function ml(t){return t?"getUTCHours":"getHours"}function xl(t){return t?"getUTCMinutes":"getMinutes"}function _l(t){return t?"getUTCSeconds":"getSeconds"}function bl(t){return t?"getUTCMilliseconds":"getMilliseconds"}function wl(t){return t?"setUTCFullYear":"setFullYear"}function Sl(t){return t?"setUTCMonth":"setMonth"}function Ml(t){return t?"setUTCDate":"setDate"}function Il(t){return t?"setUTCHours":"setHours"}function Tl(t){return t?"setUTCMinutes":"setMinutes"}function Cl(t){return t?"setUTCSeconds":"setSeconds"}function Dl(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Al(t,e,n,i,r,o,a,s){var l=new DD({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function kl(t){if(!rr(t))return T(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Ll(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function Pl(t){return null==t?"":(t+"").replace(Wk,function(t,e){return Gk[e]})}function Ol(t,e,n){function i(t){return t&&G(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",a="time"===e,s=t instanceof Date;if(a||s){var l=a?$i(t):t;if(!isNaN(+l))return cl(l,o,n);if(s)return"-"}if("ordinal"===e)return C(t)?i(t):D(t)&&r(t)?t+"":"-";var u=ir(t);return r(u)?kl(u):C(t)?i(t):"boolean"==typeof t?t+"":"-"}function Rl(t,e,n){M(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o