=0;i--)h.isIdInner(e[i])&&e.splice(i,1);t[n]=e}}),delete t[b],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap[t];if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsMap[e];if(!o||!o.length)return[];var a;if(null!=n)m(n)||(n=[n]),a=p(g(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=m(i);a=p(o,function(t){return s&&v(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var u=m(r);a=p(o,function(t){return u&&v(r,t.name)>=0||!u&&t.name===r})}else a=o;return l(a,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(n)||t.hasOwnProperty(i))?{mainType:r,index:t[e],id:t[n],name:t[i]}:null}function n(e){return t.filter?p(e,t.filter):e}var i=t.query,r=t.mainType,o=e(i),a=o?this.queryComponents(o):this._componentsMap[r];return n(l(a,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,f(i,function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(c.isString(t))f(i[t],e,n);else if(y(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.series;return p(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return p(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),f(this._seriesIndices,function(n){var i=this._componentsMap.series[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,n){u(this),f(this._seriesIndices,function(i){var r=this._componentsMap.series[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var n=p(this._componentsMap.series,t,e);this._seriesIndices=s(n)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=s(t.series);var e=[];f(t,function(t,n){e.push(n)}),x.topologicalTravel(e,x.getAllClassMainTypes(),function(e,n){f(t[e],function(t){t.restoreData()})})}});c.mixin(w,n(111)),t.exports=w},function(t,e,n){function i(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e,n){var i,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;d(l,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),d([r].concat(o).concat(u.map(a,function(t){return t.option})),function(t){d(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:o,mediaDefault:i,mediaList:a}}function o(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return u.each(t,function(t,e){var n=e.match(m);if(n&&n[1]&&n[2]){var o=n[1],s=n[2].toLowerCase();a(i[s],t,o)||(r=!1)}}),r}function a(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,n){if(null!=e){var i=t[n];if(h.hasClass(n)){e=c.normalizeToArray(e),i=c.normalizeToArray(i);var r=c.mappingToExists(i,e);t[n]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[n]=g(i,e,!0)}})}var u=n(0),c=n(5),h=n(11),d=u.each,f=u.clone,p=u.map,g=u.merge,m=/^(min|max)?(.+)$/;i.prototype={constructor:i,setOption:function(t,e){t=f(t,!0);var n=this._optionBackup,i=r.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(l(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=f(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,a=[],l=[];if(!i.length&&!r)return l;for(var u=0,c=i.length;u =0;i--)h.isIdInner(e[i])&&e.splice(i,1);t[n]=e}}),delete t[b],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap[t];if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsMap[e];if(!o||!o.length)return[];var a;if(null!=n)m(n)||(n=[n]),a=p(g(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=m(i);a=p(o,function(t){return s&&v(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var u=m(r);a=p(o,function(t){return u&&v(r,t.name)>=0||!u&&t.name===r})}else a=o;return l(a,t)},findComponents:function(t){function e(t){var e=r+"Index",n=r+"Id",i=r+"Name";return t&&(t.hasOwnProperty(e)||t.hasOwnProperty(n)||t.hasOwnProperty(i))?{mainType:r,index:t[e],id:t[n],name:t[i]}:null}function n(e){return t.filter?p(e,t.filter):e}var i=t.query,r=t.mainType,o=e(i),a=o?this.queryComponents(o):this._componentsMap[r];return n(l(a,t))},eachComponent:function(t,e,n){var i=this._componentsMap;if("function"==typeof t)n=e,e=t,f(i,function(t,i){f(t,function(t,r){e.call(n,i,t,r)})});else if(c.isString(t))f(i[t],e,n);else if(y(t)){var r=this.findComponents(t);f(r,e,n)}},getSeriesByName:function(t){var e=this._componentsMap.series;return p(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.series[t]},getSeriesByType:function(t){var e=this._componentsMap.series;return p(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.series.slice()},eachSeries:function(t,e){u(this),f(this._seriesIndices,function(n){var i=this._componentsMap.series[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.series,t,e)},eachSeriesByType:function(t,e,n){u(this),f(this._seriesIndices,function(i){var r=this._componentsMap.series[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return f(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return u(this),c.indexOf(this._seriesIndices,t.componentIndex)<0},filterSeries:function(t,e){u(this);var n=p(this._componentsMap.series,t,e);this._seriesIndices=s(n)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=s(t.series);var e=[];f(t,function(t,n){e.push(n)}),x.topologicalTravel(e,x.getAllClassMainTypes(),function(e,n){f(t[e],function(t){t.restoreData()})})}});c.mixin(w,n(111)),t.exports=w},function(t,e,n){function i(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function r(t,e,n){var i,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;d(l,function(t){t&&t.option&&(t.query?a.push(t):i||(i=t))})}return r||(r=t),r.timeline||(r.timeline=s),d([r].concat(o).concat(u.map(a,function(t){return t.option})),function(t){d(e,function(e){e(t,n)})}),{baseOption:r,timelineOptions:o,mediaDefault:i,mediaList:a}}function o(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return u.each(t,function(t,e){var n=e.match(m);if(n&&n[1]&&n[2]){var o=n[1],s=n[2].toLowerCase();a(i[s],t,o)||(r=!1)}}),r}function a(t,e,n){return"min"===n?t>=e:"max"===n?t<=e:t===e}function s(t,e){return t.join(",")===e.join(",")}function l(t,e){e=e||{},d(e,function(e,n){if(null!=e){var i=t[n];if(h.hasClass(n)){e=c.normalizeToArray(e),i=c.normalizeToArray(i);var r=c.mappingToExists(i,e);t[n]=p(r,function(t){return t.option&&t.exist?g(t.exist,t.option,!0):t.exist||t.option})}else t[n]=g(i,e,!0)}})}var u=n(0),c=n(5),h=n(11),d=u.each,f=u.clone,p=u.map,g=u.merge,m=/^(min|max)?(.+)$/;i.prototype={constructor:i,setOption:function(t,e){t=f(t,!0);var n=this._optionBackup,i=r.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(l(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=p(e.timelineOptions,f),this._mediaList=p(e.mediaList,f),this._mediaDefault=f(e.mediaDefault),this._currentMediaIndices=[],f(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=f(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,a=[],l=[];if(!i.length&&!r)return l;for(var u=0,c=i.length;u
"+n.join("
")},brushSelector:function(t,e){return e.rect(t.brushRect)}});i.mixin(u,o.seriesModelMixin,!0),t.exports=u},function(t,e,n){"use strict";function i(t,e,n){var i=e.getItemModel(n),r=i.getModel(u),o=e.getItemVisual(n,"color"),s=e.getItemVisual(n,"borderColor")||o,l=r.getItemStyle(["color","color0","borderColor","borderColor0"]),h=t.childAt(t.whiskerIndex);h.useStyle(l),h.style.stroke=s;var d=t.childAt(t.bodyIndex);d.useStyle(l),d.style.fill=o,d.style.stroke=s;var f=i.getModel(c).getItemStyle();a.setHoverStyle(t,f)}var r=n(0),o=n(22),a=n(2),s=n(40),l=o.extend({type:"candlestick",getStyleUpdater:function(){return i},dispose:r.noop});r.mixin(l,s.viewMixin,!0);var u=["itemStyle","normal"],c=["itemStyle","emphasis"];t.exports=l},function(t,e){function n(t,e){var n,a=t.getBaseAxis(),s="category"===a.type?a.getBandWidth():(n=a.getExtent(),Math.abs(n[1]-n[0])/e.count());return s/2-2>r?s/2-2:s-r>o?r:Math.max(s-o,i)}var i=2,r=5,o=4;t.exports=function(t){t.eachSeriesByType("candlestick",function(t){var e=t.coordinateSystem,i=t.getData(),r=t.dimensions,o=t.get("layout"),a=n(t,i);i.each(r,function(){function t(t){var n=[];return n[d]=c,n[f]=t,isNaN(c)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function n(t,e){var n=t.slice(),i=t.slice();n[d]+=a/2,i[d]-=a/2,e?A.push(n,i):A.push(i,n)}function s(){var e=t(Math.min(p,g,m,v)),n=t(Math.max(p,g,m,v));return e[d]-=a/2,n[d]-=a/2,{x:e[0],y:e[1],width:f?a:n[0]-e[0],height:f?n[1]-e[1]:a}}var l=arguments,u=r.length,c=l[0],h=l[u],d="horizontal"===o?0:1,f=1-d,p=l[1],g=l[2],m=l[3],v=l[4],y=Math.min(p,g),x=Math.max(p,g),_=t(y),b=t(x),w=t(m),S=t(v),M=[[S,b],[w,_]],A=[];n(b,0),n(_,1),i.setItemLayout(h,{chartLayout:o,sign:p>g?-1:p0&&i(n[l-1]);l--);for(;s
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}});t.exports=s},function(t,e,n){function i(t){return o.isArray(t)||(t=[+t,+t]),t}var r=n(2),o=n(0),a=n(18);t.exports=n(1).extendChartView({type:"radar",render:function(t,e,n){function s(t,e){var n=t.getItemVisual(e,"symbol")||"circle",r=t.getItemVisual(e,"color");if("none"!==n){var o=a.createSymbol(n,-.5,-.5,1,1,r);return o.attr({style:{strokeNoScale:!0},z2:100,scale:i(t.getItemVisual(e,"symbolSize"))}),o}}function l(e,n,i,o,a,l){i.removeAll();for(var u=0;u0){var l=i.getLayout().y+r;i.setLayout({y:l},!0)}a=i.getLayout().y+i.getLayout().dy+e}if(r=a-e-n,r>0){var l=i.getLayout().y-r;for(i.setLayout({y:l},!0),a=i.getLayout().y,o=s-2;o>=0;--o)i=t[o],r=i.getLayout().y+i.getLayout().dy+e-a,r>0&&(l=i.getLayout().y-r,i.setLayout({y:l},!0)),a=i.getLayout().y}})}function d(t,e){T.each(t.slice().reverse(),function(t){T.each(t,function(t){if(t.outEdges.length){var n=x(t.outEdges,f)/x(t.outEdges,S),i=t.getLayout().y+(n-_(t))*e;t.setLayout({y:i},!0)}})})}function f(t){return _(t.node2)*t.getValue()}function p(t,e){T.each(t,function(t){T.each(t,function(t){if(t.inEdges.length){var n=x(t.inEdges,g)/x(t.inEdges,S),i=t.getLayout().y+(n-_(t))*e;t.setLayout({y:i},!0)}})})}function g(t){return _(t.node1)*t.getValue()}function m(t){T.each(t,function(t){t.outEdges.sort(v),t.inEdges.sort(y)}),T.each(t,function(t){var e=0,n=0;T.each(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),T.each(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}function v(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function y(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function x(t,e){for(var n=0,i=t.length,r=-1;++re?1:t===e?0:NaN}function S(t){return t.getValue()}var M=n(6),A=n(364),T=n(0);t.exports=function(t,e,n){t.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),s=i(t,e);t.layoutInfo=s;var l=s.width,u=s.height,c=t.getGraph(),h=c.nodes,d=c.edges;o(h);var f=h.filter(function(t){return 0===t.getLayout().value}),p=0!==f.length?0:t.get("layoutIterations");r(h,d,n,a,l,u,p)})}},function(t,e,n){var i=n(26),r=n(0);t.exports=function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes;n.sort(function(t,e){return t.getLayout().value-e.getLayout().value});var o=n[0].getLayout().value,a=n[n.length-1].getLayout().value;r.each(n,function(e){var n=new i({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:t.get("color")}),r=n.mapValueToVisual(e.getLayout().value);e.setVisual("color",r);var s=e.getModel(),l=s.get("itemStyle.normal.color");null!=l&&e.setVisual("color",l)})})}},function(t,e,n){var i=n(0),r=n(1);n(230),n(231),r.registerVisual(i.curry(n(38),"scatter","circle",null)),r.registerLayout(i.curry(n(66),"scatter")),n(41)},function(t,e,n){"use strict";var i=n(28),r=n(13);t.exports=r.extend({type:"series.scatter",dependencies:["grid","polar"],getInitialData:function(t,e){var n=i(t.data,this,e);return n},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}})},function(t,e,n){var i=n(32),r=n(191);n(1).extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new i,this._largeSymbolDraw=new r},render:function(t,e,n){var i=t.getData(),r=this._largeSymbolDraw,o=this._normalSymbolDraw,a=this.group,s=t.get("large")&&i.count()>t.get("largeThreshold")?r:o;this._symbolDraw=s,s.updateData(i),a.add(s.group),a.remove(s===r?o.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}})},function(t,e,n){var i=n(1);n(234),n(235),n(236),i.registerVisual(n(238)),i.registerLayout(n(237))},function(t,e,n){function i(t){this.group=new a.Group,t.add(this.group)}function r(t,e,n,i,r,o){var a=[[r?t:t-d,e],[t+n,e],[t+n,e+i],[r?t:t-d,e+i]];return!o&&a.splice(2,0,[t+n+d,e+i/2]),!r&&a.push([t,e+i/2]),a}function o(t,e,n){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&u.wrapTreePathInfo(n,e)}}var a=n(2),s=n(6),l=n(0),u=n(29),c=8,h=8,d=5;i.prototype={constructor:i,render:function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle.normal"),l=a.getModel("textStyle"),u={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,u,l),this._renderContent(t,u,a,l,i),s.positionElement(o,u.pos,u.box)}},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var r=i.getModel().get("name"),o=n.getTextRect(r),a=Math.max(o.width+2*c,e.emptyItemWidth);e.totalWidth+=a+h,e.renderList.push({node:i,text:r,width:a})}},_renderContent:function(t,e,n,i,u){for(var c=0,d=e.emptyItemWidth,f=t.get("breadcrumb.height"),p=s.getAvailableSize(e.pos,e.box),g=e.totalWidth,m=e.renderList,v=m.length-1;v>=0;v--){var y=m[v],x=y.node,_=y.width,b=y.text;g>p.width&&(g-=_-d,_=d,b="");var w=new a.Polygon({shape:{points:r(c,0,_,f,v===m.length-1,0===v)},style:l.defaults(n.getItemStyle(),{lineJoin:"bevel",text:b,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:l.curry(u,x)});this.group.add(w),o(w,t,x),c+=_+h}},remove:function(){this.group.removeAll()}},t.exports=i},function(t,e,n){function i(t,e){var n=0;s.each(t.children,function(t){i(t,e);var r=t.value;s.isArray(r)&&(r=r[0]),n+=r});var r=t.value;e>=0&&(s.isArray(r)?r=r[0]:t.value=new Array(e)),(null==r||isNaN(r))&&(r=n),r<0&&(r=0),e>=0?t.value[0]=r:t.value=r}function r(t,e){var n=e.get("color");if(n){t=t||[];var i;if(s.each(t,function(t){var e=new l(t),n=e.get("color");(e.get("itemStyle.normal.color")||n&&"none"!==n)&&(i=!0)}),!i){var r=t[0]||(t[0]={});r.color=n.slice()}return t}}var o=n(13),a=n(346),s=n(0),l=n(10),u=n(8),c=n(29),h=u.encodeHTML,d=u.addCommas;t.exports=o.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}}},label:{normal:{show:!0,position:"inside",textStyle:{color:"#fff",ellipsis:!0}}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n=t.data||[],o=t.name;null==o&&(o=t.name);var l={name:o,children:t.data},u=(n[0]||{}).value;i(l,s.isArray(u)?u.length:-1);var c=t.levels||[];return c=t.levels=r(c,e),a.createTree(l,this,c).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=d(s.isArray(n)?n[0]:n),r=e.getName(t);return h(r)+": "+i},getDataParams:function(t){var e=o.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=c.wrapTreePathInfo(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},s.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap={},this._idIndexMapCount=0);var n=e[t];return null==n&&(e[t]=n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}})},function(t,e,n){function i(){return{nodeGroup:[],background:[],content:[]}}function r(t,e,n,i,r,l,u,c,h,d){function f(e){z.dataIndex=u.dataIndex,z.seriesIndex=t.seriesIndex;var n=T.borderWidth,i=Math.max(I-2*n,0),r=Math.max(C-2*n,0);z.culling=!0,z.setShape({x:n,y:n,width:i,height:r});var o=u.getVisual("color",!0);p(z,function(){var t={fill:o},e=u.getModel("itemStyle.emphasis").getItemStyle();g(t,e,o,i,r),z.setStyle(t),s.setHoverStyle(z,e)}),e.add(z)}function p(t,e){L?!t.invisible&&l.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function g(e,n,i,r,o){var a=u.getModel(),s=a.get("name");if(T.isLeafRoot){var l=t.get("drillDownIcon",!0);s=l?l+" "+s:s}y(s,e,a,_,i,r,o),y(s,n,a,b,i,r,o)}function y(t,e,n,i,r,o,a){var l=n.getModel(i),u=l.getModel("textStyle");s.setText(e,l,r),e.textAlign=u.get("align"),e.textVerticalAlign=u.get("baseline");var c=u.getTextRect(t);!l.getShallow("show")||c.height>a?e.text="":c.width>o?e.text=u.get("ellipsis")?u.truncateText(t,o,null,{minChar:2}):"":e.text=t}function x(t,i,a,s){var l=null!=k&&n[t][k],u=r[t];return l?(n[t][k]=null,w(u,l,t)):L||(l=new i({z:o(a,s)}),l.__tmDepth=a,l.__tmStorageName=t,A(u,l,t)),e[t][D]=l}function w(t,e,n){var i=t[D]={};i.old="nodeGroup"===n?e.position.slice():a.extend({},e.shape)}function A(t,e,n){var o=t[D]={},a=u.parentNode;if(a&&(!i||"drillDown"===i.direction)){var s=0,l=0,c=r.background[a.getRawIndex()];!i&&c&&c.old&&(s=c.old.width,l=c.old.height),o.old="nodeGroup"===n?[0,l]:{x:s,y:l,width:0,height:0}}o.fadein="nodeGroup"!==n}if(u){var T=u.getLayout();if(T&&T.isInView){var I=T.width,C=T.height,L=T.invisible,D=u.getRawIndex(),k=c&&c.getRawIndex(),P=x("nodeGroup",m);if(P){if(h.add(P),P.attr("position",[T.x||0,T.y||0]),P.__tmNodeWidth=I,P.__tmNodeHeight=C,T.isAboveViewRoot)return P;var O=x("background",v,d,S);O&&(O.setShape({x:0,y:0,width:I,height:C}),p(O,function(){O.setStyle("fill",u.getVisual("borderColor",!0))}),P.add(O));var E=u.viewChildren;if(!E||!E.length){var z=x("content",v,d,M);z&&f(P)}return P}}}}function o(t,e){var n=t*w+e;return(n-1)/n}var a=n(0),s=n(2),l=n(45),u=n(29),c=n(233),h=n(42),d=n(7),f=n(19),p=n(363),g=a.bind,m=s.Group,v=s.Rect,y=a.each,x=3,_=["label","normal"],b=["label","emphasis"],w=10,S=1,M=2;t.exports=n(1).extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage=i(),
+this._oldTree,this._breadcrumb,this._controller,this._state="ready",this._mayClick},render:function(t,e,n,i){var r=e.findComponents({mainType:"series",subType:"treemap",query:i});if(!(a.indexOf(r,t)<0)){this.seriesModel=t,this.api=n,this.ecModel=e;var o=u.retrieveTargetInfo(i,t),s=i&&i.type,l=t.layoutInfo,c=!this._oldTree,h=this._storage,d="treemapRootToNode"===s&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);c||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(n),this._renderBreadcrumb(t,n,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new m,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){function o(t,e,n,i,r){function s(t){return t.getId()}function u(a,s){var l=null!=a?t[a]:null,u=null!=s?e[s]:null,c=m(l,u,n,r);c&&o(l&&l.viewChildren||[],u&&u.viewChildren||[],c,i,r+1)}i?(e=t,y(t,function(t,e){!t.isRemoved()&&u(e,e)})):new l(e,t,s,s).add(u).update(u).remove(a.curry(u,null)).execute()}function s(t){var e=i();return t&&y(t,function(t,n){var i=e[n];y(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),e}function u(){y(v,function(t){y(t,function(t){t.parent&&t.parent.remove(t)})}),y(g,function(t){t.invisible=!0,t.dirty()})}var c=e.getData().tree,h=this._oldTree,d=i(),f=i(),p=this._storage,g=[],m=a.curry(r,e,f,p,n,d,g);o(c.root?[c.root]:[],h&&h.root?[h.root]:[],t,c===h||!h,0);var v=s(p);return this._oldTree=c,this._storage=f,{lastsForAnimation:d,willDeleteEls:v,renderFinally:u}},_doAnimation:function(t,e,n,i){if(n.get("animation")){var r=n.get("animationDurationUpdate"),o=n.get("animationEasing"),s=p.createWrap();y(e.willDeleteEls,function(t,e){y(t,function(t,n){if(!t.invisible){var a,l=t.parent;if(i&&"drillDown"===i.direction)a=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,r,o)}})}),y(this._storage,function(t,n){y(t,function(t,i){var l=e.lastsForAnimation[n][i],u={};l&&("nodeGroup"===n?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,r,o))})},this),this._state="animating",s.done(g(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new h(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var n=new d(0,0,t.getWidth(),t.getHeight());e.setContainsPoint(function(t,e){return n.contain(t,e)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if(this._mayClick=!1,"animating"!==this._state&&(Math.abs(t)>x||Math.abs(e)>x)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t,y:i.y+e,width:i.width,height:i.height}})}},_onZoom:function(t,e,n){if(this._mayClick=!1,"animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new d(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;e-=a.x,n-=a.y;var s=f.create();f.translate(s,s,[-e,-n]),f.scale(s,s,[t,t]),f.translate(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){function e(t){var e=this.seriesModel.get("nodeClick",!0);if(e){var n=this.findTarget(t.offsetX,t.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===e)this._zoomToNode(n);else if("link"===e){var r=i.hostTree.data.getItemModel(i.dataIndex),o=r.get("link",!0),a=r.get("target",!0)||"blank";o&&window.open(o,a)}}}}t.on("mousedown",function(t){"ready"===this._state&&(this._mayClick=!0)},this),t.on("mouseup",function(t){this._mayClick&&(this._mayClick=!1,"ready"===this._state&&e.call(this,t))},this)},_renderBreadcrumb:function(t,e,n){function i(e){"animating"!==this._state&&(u.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new c(this.group))).render(t,e,n.node,g(i,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=i(),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 n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}},this),n}})},function(t,e,n){for(var i=n(1),r=n(29),o=function(){},a=["treemapZoomToNode","treemapRender","treemapMove"],s=0;sr&&(r=i));var l=t.area*t.area,u=e*e*n;return l?x(u*r/l,l/(u*o)):1/0}function c(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=t.length;h=0)return!0}function u(t){for(var e=t.split(/\n+/g),n=s(e.shift()).split(y),i=[],r=p.map(n,function(t){return{name:t,data:[]}}),o=0;o',c=window.open();c.document.write(u)}else{var h=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(h)}},n(21).register("saveAsImage",i),t.exports=i},function(t,e,n){n(308),n(309),n(1).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),n(1).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,n){function i(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return s.map(p,function(t){return t+"transition:"+n}).join(";")}function r(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),h(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function o(t){t=t;var e=[],n=t.get("transitionDuration"),o=t.get("backgroundColor"),a=t.getModel("textStyle"),s=t.get("padding");return n&&e.push(i(n)),o&&(f.canvasSupported?e.push("background-Color:"+o):(e.push("background-Color:#"+l.toHex(o)),e.push("filter:alpha(opacity=70)"))),h(["width","color","radius"],function(n){var i="border-"+n,r=d(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(r(a)),null!=s&&e.push("padding:"+c.normalizeCssArray(s).join("px ")+"px"),e.join(";")+";"}function a(t,e){var n=document.createElement("div"),i=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,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(e){if(e=e||window.event,!r.enterable){var n=i.handler;u.normalizeEvent(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}var s=n(0),l=n(20),u=n(31),c=n(8),h=s.each,d=c.toCamelCase,f=n(14),p=["","-webkit-","-moz-","-o-"],g="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";a.prototype={constructor:a,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText=g+o(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var n=this.el.style;n.left=t+"px",n.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(s.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=a},function(t,e,n){n(1).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,n){function i(t,e){if(!t||!e)return!1;var n=m.round;return n(t[0])===n(e[0])&&n(t[1])===n(e[1])}function r(t,e,n,i){return{x1:t,y1:e,x2:n,y2:i}}function o(t,e,n,i){return{x:t,y:e,width:n,height:i}}function a(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}function s(t,e,n,i,r){var o=n.clientWidth,a=n.clientHeight,s=20;return t+o+s>i?t-=o+s:t+=s,e+a+s>r?e-=a+s:e+=s,[t,e]}function l(t,e,n,i,r){var o=n.clientWidth,a=n.clientHeight;return t=Math.min(t+o,i)-o,e=Math.min(e+a,r)-a,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function u(t,e,n){var i=n.clientWidth,r=n.clientHeight,o=5,a=0,s=0,l=e.width,u=e.height;switch(t){case"inside":a=e.x+l/2-i/2,s=e.y+u/2-r/2;break;case"top":a=e.x+l/2-i/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-i/2,s=e.y+u+o;break;case"left":a=e.x-i-o,s=e.y+u/2-r/2;break;case"right":a=e.x+l+o,s=e.y+u/2-r/2}return[a,s]}function c(t,e,n,i,r,o,a,c){var h=c.getWidth(),d=c.getHeight(),f=a&&a.getBoundingRect().clone();if(a&&f.applyTransform(a.transform),"function"==typeof t&&(t=t([e,n],o,r.el,f)),p.isArray(t))e=y(t[0],h),n=y(t[1],d);else if("string"==typeof t&&a){var g=u(t,f,r.el);e=g[0],n=g[1]}else{var g=s(e,n,r.el,h,d);e=g[0],n=g[1]}if(i){var g=l(e,n,r.el,h,d);e=g[0],n=g[1]}r.moveTo(e,n)}function h(t){var e=t.coordinateSystem,n=t.get("tooltip.trigger",!0);return!(!e||"cartesian2d"!==e.type&&"polar"!==e.type&&"singleAxis"!==e.type||"item"===n)}var d=n(307),f=n(2),p=n(0),g=n(8),m=n(3),v=n(5),y=m.parsePercent,x=n(14),_=n(10);n(1).extendComponentView({type:"tooltip",_axisPointers:{},init:function(t,e){if(!x.node){var n=new d(e.getDom(),e);this._tooltipContent=n,e.on("showTip",this._manuallyShowTip,this),e.on("hideTip",this._manuallyHideTip,this)}},render:function(t,e,n){if(!x.node){this.group.removeAll(),this._axisPointers={},this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastHover={};var i=this._tooltipContent;i.update(),i.enterable=t.get("enterable"),this._alwaysShowContent=t.get("alwaysShowContent"),this._seriesGroupByAxis=this._prepareAxisTriggerData(t,e);var r=this._crossText;r&&this.group.add(r);var o=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==o){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){a._manuallyShowTip({x:a._lastX,y:a._lastY})})}var s=this._api.getZr();s.off("click",this._tryShow),s.off("mousemove",this._mousemove),s.off("mouseout",this._hide),s.off("globalout",this._hide),"click"===o?s.on("click",this._tryShow,this):"mousemove"===o&&(s.on("mousemove",this._mousemove,this),s.on("mouseout",this._hide,this),s.on("globalout",this._hide,this))}},_mousemove:function(t){var e=this._tooltipModel.get("showDelay"),n=this;clearTimeout(this._showTimeout),e>0?this._showTimeout=setTimeout(function(){n._tryShow(t)},e):this._tryShow(t)},_manuallyShowTip:function(t){function e(e){var n=e.getData(),i=v.queryDataIndex(n,t);if(null!=i&&!p.isArray(i)&&n.hasValue(i))return!0}if(t.from!==this.uid){var n=this._ecModel,i=t.seriesIndex,r=n.getSeriesByIndex(i),o=this._api,a="axis"===this._tooltipModel.get("trigger");if(null==t.x||null==t.y){if(a?(r&&!e(r)&&(r=null),r||n.eachSeries(function(t){h(t)&&!r&&e(t)&&(r=t)})):r=r||n.getSeriesByIndex(0),r){var s=r.getData(),l=v.queryDataIndex(s,t);if(null==l||p.isArray(l))return;var u,c,d=s.getItemGraphicEl(l),f=r.coordinateSystem;if(r.getTooltipPosition){var g=r.getTooltipPosition(l)||[];u=g[0],c=g[1]}else if(f&&f.dataToPoint){var g=f.dataToPoint(s.getValues(p.map(f.dimensions,function(t){return r.coordDimToDataDim(t)[0]}),l,!0));u=g&&g[0],c=g&&g[1]}else if(d){var m=d.getBoundingRect().clone();m.applyTransform(d.transform),u=m.x+m.width/2,c=m.y+m.height/2}null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,position:t.position,target:d,event:{}})}}else{var d=o.getZr().handler.findHover(t.x,t.y);this._tryShow({offsetX:t.x,offsetY:t.y,position:t.position,target:d,event:{}})}}},_manuallyHideTip:function(t){t.from!==this.uid&&this._hide()},_prepareAxisTriggerData:function(t,e){var n={};return e.eachSeries(function(t){if(h(t)){var e,i,r=t.coordinateSystem;"cartesian2d"===r.type?(e=r.getBaseAxis(),i=e.dim+e.index):"singleAxis"===r.type?(e=r.getAxis(),i=e.dim+e.type):(e=r.getBaseAxis(),i=e.dim+r.name),n[i]=n[i]||{coordSys:[],series:[]},n[i].coordSys.push(r),n[i].series.push(t)}},this),n},_tryShow:function(t){var e=t.target,n=this._tooltipModel,i=n.get("trigger"),r=this._ecModel,o=this._api;if(n)if(this._lastX=t.offsetX,this._lastY=t.offsetY,e&&null!=e.dataIndex){var a=e.dataModel||r.getSeriesByIndex(e.seriesIndex),s=e.dataIndex,l=a.getData().getItemModel(s);"axis"===(l.get("tooltip.trigger")||i)?this._showAxisTooltip(n,r,t):(this._ticket="",this._hideAxisPointer(),this._resetLastHover(),this._showItemTooltipContent(a,s,e.dataType,t)),o.dispatchAction({type:"showTip",from:this.uid,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex})}else if(e&&e.tooltip){var u=e.tooltip;if("string"==typeof u){var c=u;u={content:c,formatter:c}}var h=new _(u,n),d=h.get("content"),f=Math.random();this._showTooltipContent(h,d,h.get("formatterParams")||{},f,t.offsetX,t.offsetY,t.position,e,o)}else"item"===i?this._hide():this._showAxisTooltip(n,r,t),"cross"===n.get("axisPointer.type")&&o.dispatchAction({type:"showTip",from:this.uid,x:t.offsetX,y:t.offsetY})},_showAxisTooltip:function(t,e,n){var r=t.getModel("axisPointer"),o=r.get("type");if("cross"===o){var a=n.target;if(a&&null!=a.dataIndex){var s=e.getSeriesByIndex(a.seriesIndex),l=a.dataIndex;this._showItemTooltipContent(s,l,a.dataType,n)}}this._showAxisPointer();var u=!0;p.each(this._seriesGroupByAxis,function(e){var a=e.coordSys,s=a[0],l=[n.offsetX,n.offsetY];if(!s.containPoint(l))return void this._hideAxisPointer(s.name);u=!1;var c=s.dimensions,h=s.pointToData(l,!0);l=s.dataToPoint(h);var d=s.getBaseAxis(),f=r.get("axis");"auto"===f&&(f=d.dim);var g=!1,m=this._lastHover;if("cross"===o)i(m.data,h)&&(g=!0),m.data=h;else{var v=p.indexOf(c,f);m.data===h[v]&&(g=!0),m.data=h[v]}var y=t.get("animation");"cartesian2d"!==s.type||g?"polar"!==s.type||g?"singleAxis"!==s.type||g||this._showSinglePointer(r,s,f,l,y):this._showPolarPointer(r,s,f,l,y):this._showCartesianPointer(r,s,f,l,y),"cross"!==o&&this._dispatchAndShowSeriesTooltipContent(s,e.series,l,h,g,n.position)},this),this._tooltipModel.get("show")||this._hideAxisPointer(),u&&this._hide()},_showCartesianPointer:function(t,e,n,i,a){function s(n,i,o){var a="x"===n?r(i[0],o[0],i[0],o[1]):r(o[0],i[1],o[1],i[1]),s=u._getPointerElement(e,t,n,a);f.subPixelOptimizeLine({shape:a,style:s.style}),d?f.updateProps(s,{shape:a},t):s.attr({shape:a})}function l(n,i,r){var a=e.getAxis(n),s=a.getBandWidth(),l=r[1]-r[0],c="x"===n?o(i[0]-s/2,r[0],s,l):o(r[0],i[1]-s/2,l,s),h=u._getPointerElement(e,t,n,c);d?f.updateProps(h,{shape:c},t):h.attr({shape:c})}var u=this,c=t.get("type"),h=e.getBaseAxis(),d=a&&"cross"!==c&&"category"===h.type&&h.getBandWidth()>20;if("cross"===c)s("x",i,e.getAxis("y").getGlobalExtent()),s("y",i,e.getAxis("x").getGlobalExtent()),this._updateCrossText(e,i,t);else{var p=e.getAxis("x"===n?"y":"x"),g=p.getGlobalExtent();"cartesian2d"===e.type&&("line"===c?s:l)(n,i,g)}},_showSinglePointer:function(t,e,n,i,o){function a(n,i,o){var a=e.getAxis(),l=a.orient,c="horizontal"===l?r(i[0],o[0],i[0],o[1]):r(o[0],i[1],o[1],i[1]),h=s._getPointerElement(e,t,n,c);u?f.updateProps(h,{shape:c},t):h.attr({shape:c})}var s=this,l=t.get("type"),u=o&&"cross"!==l&&"category"===e.getBaseAxis().type,c=e.getRect(),h=[c.y,c.y+c.height];a(n,i,h)},_showPolarPointer:function(t,e,n,i,o){function s(n,i,o){var a,s=e.pointToCoord(i);if("angle"===n){var l=e.coordToPoint([o[0],s[1]]),c=e.coordToPoint([o[1],s[1]]);a=r(l[0],l[1],c[0],c[1])}else a={cx:e.cx,cy:e.cy,r:s[0]};var h=u._getPointerElement(e,t,n,a);p?f.updateProps(h,{shape:a},t):h.attr({shape:a})}function l(n,i,r){var o,s=e.getAxis(n),l=s.getBandWidth(),c=e.pointToCoord(i),h=Math.PI/180;o="angle"===n?a(e.cx,e.cy,r[0],r[1],(-c[1]-l/2)*h,(-c[1]+l/2)*h):a(e.cx,e.cy,c[0]-l/2,c[0]+l/2,0,2*Math.PI);var d=u._getPointerElement(e,t,n,o);p?f.updateProps(d,{shape:o},t):d.attr({shape:o})}var u=this,c=t.get("type"),h=e.getAngleAxis(),d=e.getRadiusAxis(),p=o&&"cross"!==c&&"category"===e.getBaseAxis().type;if("cross"===c)s("angle",i,d.getExtent()),s("radius",i,h.getExtent()),this._updateCrossText(e,i,t);else{var g=e.getAxis("radius"===n?"angle":"radius"),m=g.getExtent();("line"===c?s:l)(n,i,m)}},_updateCrossText:function(t,e,n){var i=n.getModel("crossStyle"),r=i.getModel("textStyle"),o=this._tooltipModel,a=this._crossText;a||(a=this._crossText=new f.Text({style:{textAlign:"left",textVerticalAlign:"bottom"}}),this.group.add(a));var s=t.pointToData(e),l=t.dimensions;s=p.map(s,function(e,n){var i=t.getAxis(l[n]);return e="category"===i.type||"time"===i.type?i.scale.getLabel(e):g.addCommas(e.toFixed(i.getPixelPrecision()))}),a.setStyle({fill:r.getTextColor()||i.get("color"),textFont:r.getFont(),text:s.join(", "),x:e[0]+5,y:e[1]-5}),a.z=o.get("z"),a.zlevel=o.get("zlevel")},_getPointerElement:function(t,e,n,i){var r=this._tooltipModel,o=r.get("z"),a=r.get("zlevel"),s=this._axisPointers,l=t.name;if(s[l]=s[l]||{},s[l][n])return s[l][n];var u=e.get("type"),c=e.getModel(u+"Style"),h="shadow"===u,d=c[h?"getAreaStyle":"getLineStyle"](),p="polar"===t.type?h?"Sector":"radius"===n?"Circle":"Line":h?"Rect":"Line";h?d.stroke=null:d.fill=null;var g=s[l][n]=new f[p]({style:d,z:o,zlevel:a,silent:!0,shape:i});return this.group.add(g),g},_dispatchAndShowSeriesTooltipContent:function(t,e,n,i,r,o){var a,s=this._tooltipModel,l=t.getBaseAxis(),u="x"===l.dim||"radius"===l.dim?0:1,h=p.map(e,function(t){return{seriesIndex:t.seriesIndex,dataIndexInside:t.getAxisTooltipDataIndex?t.getAxisTooltipDataIndex(t.coordDimToDataDim(l.dim),i,l):t.getData().indexOfNearest(t.coordDimToDataDim(l.dim)[0],i[u],!1,"category"===l.type?.5:null)}});p.each(h,function(t,n){e[n].getData().hasValue(t.dataIndexInside)&&(a=n)}),a=a||0;var d=this._lastHover,f=this._api;if(d.payloadBatch&&!r&&f.dispatchAction({type:"downplay",batch:d.payloadBatch}),r||(f.dispatchAction({type:"highlight",batch:h}),d.payloadBatch=h),f.dispatchAction({type:"showTip",dataIndexInside:h[a].dataIndexInside,seriesIndex:h[a].seriesIndex,from:this.uid}),l&&s.get("showContent")&&s.get("show")){var g=p.map(e,function(t,e){return t.getDataParams(h[e].dataIndexInside)});if(r)c(o||s.get("position"),n[0],n[1],s.get("confine"),this._tooltipContent,g,null,f);else{var m=h[a].dataIndexInside,v="time"===l.type?l.scale.getLabel(i[u]):e[a].getData().getName(m),y=(v?v+"
":"")+p.map(e,function(t,e){return t.formatTooltip(h[e].dataIndexInside,!0)}).join("
"),x="axis_"+t.name+"_"+m;this._showTooltipContent(s,y,g,x,n[0],n[1],o,null,f)}}},_showItemTooltipContent:function(t,e,n,i){var r=this._api,o=t.getData(n),a=o.getItemModel(e),s=a.get("tooltip",!0);if("string"==typeof s){var l=s;s={formatter:l}}var u=this._tooltipModel,c=t.getModel("tooltip",u),h=new _(s,c,c.ecModel),d=t.getDataParams(e,n),f=t.formatTooltip(e,!1,n),p="item_"+t.name+"_"+e;this._showTooltipContent(h,f,d,p,i.offsetX,i.offsetY,i.position,i.target,r)},_showTooltipContent:function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("confine"),d=t.get("formatter");a=a||t.get("position");var f=e;if(d)if("string"==typeof d)f=g.formatTpl(d,n);else if("function"==typeof d){var p=this,m=i,v=function(t,e){t===p._ticket&&(u.setContent(e),c(a,r,o,h,u,n,s,l))};p._ticket=m,f=d(n,m,v)}u.show(t),u.setContent(f),c(a,r,o,h,u,n,s,l)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&p.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&p.each(e,function(t){t.hide()})}else this.group.children().length&&this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!x.node){var n=e.getZr();this._tooltipContent.hide(),n.off("click",this._tryShow),n.off("mousemove",this._mousemove),n.off("mouseout",this._hide),n.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},function(t,e,n){n(315),n(316)},function(t,e,n){function i(t,e,n){if(n[0]===n[1])return n.slice();for(var i=200,r=(n[1]-n[0])/i,o=n[0],a=[],s=0;s<=i&&o