blob: 300e5d60e7b4b4c8a1b5c1bf6d8fbd956f4b78bb [file] [log] [blame]
/**
* almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
// Copyright 2006 Google Inc.
// http://www.apache.org/licenses/LICENSE-2.0
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
/*!
* ZRender, a lightweight canvas library with a MVC architecture, data-driven
* and provides an event model like DOM.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/
/*!
* ECharts, a javascript interactive chart library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/echarts/blob/master/LICENSE.txt
*/
(function(e){var t,n,r;(function(e){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(t,n){return function(){return s.apply(e,p.call(arguments,0).concat([t,n]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(t){if(d(f,t)){var n=f[t];delete f[t],c[t]=!0,i.apply(e,n)}if(!d(a,t)&&!d(c,t))throw new Error("No "+t);return a[t]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(t,n,r,i){var s,l,h,p,v,g=[],w;i=i||t;if(typeof r=="function"){n=!n.length&&r.length?["require","exports","module"]:n;for(v=0;v<n.length;v+=1){p=o(n[v],i),l=p.f;if(l==="require")g[v]=u.require(t);else if(l==="exports")g[v]=u.exports(t),w=!0;else if(l==="module")s=g[v]=u.module(t);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(t+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=r.apply(a[t],g);if(t)if(s&&s.exports!==e&&s.exports!==a[t])a[t]=s.exports;else if(h!==e||!w)a[t]=h}else t&&(a[t]=r)},t=n=s=function(t,n,r,a,f){return typeof t=="string"?u[t]?u[t](n):b(o(t,n).f):(t.splice||(l=t,n.splice?(t=n,n=r,r=null):t=e),n=n||function(){},typeof r=="function"&&(r=a,a=f),a?i(e,t,n,r):setTimeout(function(){i(e,t,n,r)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},r=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},r.amd={jQuery:!0}})(),r("echarts/config",[],function(){var e={CHART_TYPE_LINE:"line",CHART_TYPE_BAR:"bar",CHART_TYPE_SCATTER:"scatter",CHART_TYPE_PIE:"pie",CHART_TYPE_RADAR:"radar",CHART_TYPE_MAP:"map",CHART_TYPE_K:"k",CHART_TYPE_ISLAND:"island",CHART_TYPE_FORCE:"force",CHART_TYPE_CHORD:"chord",COMPONENT_TYPE_TITLE:"title",COMPONENT_TYPE_LEGEND:"legend",COMPONENT_TYPE_DATARANGE:"dataRange",COMPONENT_TYPE_DATAVIEW:"dataView",COMPONENT_TYPE_DATAZOOM:"dataZoom",COMPONENT_TYPE_TOOLBOX:"toolbox",COMPONENT_TYPE_TOOLTIP:"tooltip",COMPONENT_TYPE_GRID:"grid",COMPONENT_TYPE_AXIS:"axis",COMPONENT_TYPE_POLAR:"polar",COMPONENT_TYPE_X_AXIS:"xAxis",COMPONENT_TYPE_Y_AXIS:"yAxis",COMPONENT_TYPE_AXIS_CATEGORY:"categoryAxis",COMPONENT_TYPE_AXIS_VALUE:"valueAxis",color:["#ff7f50","#87cefa","#da70d6","#32cd32","#6495ed","#ff69b4","#ba55d3","#cd5c5c","#ffa500","#40e0d0","#1e90ff","#ff6347","#7b68ee","#00fa9a","#ffd700","#6699FF","#ff6666","#3cb371","#b8860b","#30e0e0"],title:{text:"",subtext:"",x:"left",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}},legend:{orient:"horizontal",x:"center",y:"top",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,textStyle:{color:"#333"},selectedMode:!0},dataRange:{orient:"vertical",x:"left",y:"bottom",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemWidth:20,itemHeight:14,precision:0,splitNumber:5,calculable:!1,realtime:!0,color:["#1e90ff","#f0ffff"],textStyle:{color:"#333"}},toolbox:{show:!1,orient:"horizontal",x:"right",y:"top",color:["#1e90ff","#22bb22","#4b0082","#d2691e"],backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,itemSize:16,feature:{},showTitle:!0,featureImageIcon:{},featureTitle:{mark:"辅助线开关",markUndo:"删除辅助线",markClear:"清空辅助线",dataZoom:"区域缩放",dataZoomReset:"区域缩放后退",dataView:"数据视图",lineChart:"折线图切换",barChart:"柱形图切换",restore:"还原",saveAsImage:"保存为图片"}},tooltip:{show:!0,showContent:!0,trigger:"item",islandFormatter:"{a} <br/>{b} : {c}",showDelay:20,hideDelay:100,transitionDuration:.4,backgroundColor:"rgba(0,0,0,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,axisPointer:{type:"line",lineStyle:{color:"#48b",width:2,type:"solid"},areaStyle:{size:"auto",color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff"}},dataZoom:{show:!1,orient:"horizontal",backgroundColor:"#eee",dataBackgroundColor:"#ccc",fillerColor:"rgba(50,205,50,0.4)",handleColor:"rgba(70,130,180,0.8)",realtime:!0},grid:{x:80,y:60,x2:80,y2:60,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},categoryAxis:{position:"bottom",name:"",nameLocation:"end",boundaryGap:!0,axisLine:{show:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!0,interval:"auto",length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,interval:"auto",rotate:0,margin:8,textStyle:{color:"#333"}},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)"],type:"default"}}},valueAxis:{position:"left",name:"",nameLocation:"end",nameTextStyle:{},boundaryGap:[0,0],precision:0,power:100,splitNumber:5,axisLine:{show:!0,lineStyle:{color:"#48b",width:2,type:"solid"}},axisTick:{show:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,rotate:0,margin:8,textStyle:{color:"#333"}},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)"],type:"default"}}},polar:{center:["50%","50%"],radius:"75%",startAngle:90,splitNumber:5,name:{show:!0,textStyle:{color:"#333"}},axisLine:{show:!0,lineStyle:{color:"#ccc",width:1,type:"solid"}},axisLabel:{show:!1,textStyle:{color:"#333"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},splitLine:{show:!0,lineStyle:{width:1,color:"#ccc"}}},bar:{xAxisIndex:0,yAxisIndex:0,barMinHeight:0,barGap:"30%",barCategoryGap:"20%",itemStyle:{normal:{borderColor:"#fff",borderRadius:0,borderWidth:1,label:{show:!1}},emphasis:{borderColor:"rgba(0,0,0,0)",borderRadius:0,borderWidth:1,label:{show:!1}}}},line:{xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3}},emphasis:{label:{show:!1}}},symbolSize:2,showAllSymbol:!1},k:{xAxisIndex:0,yAxisIndex:0,itemStyle:{normal:{color:"#fff",color0:"#00aa11",lineStyle:{width:1,color:"#ff3200",color0:"#00aa11"}},emphasis:{}}},scatter:{xAxisIndex:0,yAxisIndex:0,symbolSize:4,large:!1,largeThreshold:2e3,itemStyle:{normal:{label:{show:!1,formatter:function(e,t,n){return typeof n[2]!="undefined"?n[2]:n[0]+" , "+n[1]}}},emphasis:{label:{show:!1,formatter:function(e,t,n){return typeof n[2]!="undefined"?n[2]:n[0]+" , "+n[1]}}}}},radar:{polarIndex:0,itemStyle:{normal:{label:{show:!1},lineStyle:{width:2,type:"solid"}},emphasis:{label:{show:!1}}},symbolSize:2},pie:{center:["50%","50%"],radius:[0,"75%"],clockWise:!1,startAngle:90,minAngle:0,selectedOffset:10,itemStyle:{normal:{label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}}},emphasis:{label:{show:!1},labelLine:{show:!1,length:30,lineStyle:{width:1,type:"solid"}}}}},map:{mapType:"china",mapLocation:{x:"center",y:"center"},mapValuePrecision:0,showLegendSymbol:!0,hoverable:!0,itemStyle:{normal:{lineStyle:{width:2,color:"#fff"},areaStyle:{color:"#ccc"},label:{show:!1,textStyle:{color:"rgba(139,69,19,1)"}}},emphasis:{lineStyle:{width:2,color:"#fff"},areaStyle:{color:"rgba(255,215,0,0.8)"},label:{show:!1,textStyle:{color:"rgba(139,69,19,1)"}}}}},force:{minRadius:10,maxRadius:20,density:1,attractiveness:1,initSize:300,centripetal:1,coolDown:.99,categories:[],itemStyle:{normal:{label:{show:!1},nodeStyle:{brushType:"both",color:"#f08c2e",strokeColor:"#5182ab"},linkStyle:{strokeColor:"#5182ab"}},emphasis:{label:{show:!1},nodeStyle:{},linkStyle:{}}}},chord:{radius:["65%","75%"],center:["50%","50%"],padding:2,sort:"none",sortSub:"none",startAngle:90,clockWise:!1,showScale:!1,showScaleText:!1,itemStyle:{normal:{label:{show:!0},lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:1,color:"#666"}}},emphasis:{lineStyle:{width:0,color:"#000"},chordStyle:{lineStyle:{width:2,color:"#333"}}}},matrix:[]},island:{r:15,calculateStep:.1},markPoint:{symbol:"pin",symbolSize:10,itemStyle:{normal:{borderWidth:2,label:{show:!0,position:"inside"}},emphasis:{label:{show:!0}}}},markLine:{symbol:["circle","arrow"],symbolSize:[2,4],itemStyle:{normal:{borderWidth:2,label:{show:!1,position:"inside",textStyle:{color:"#333"}},lineStyle:{type:"solid",shadowColor:"rgba(0,0,0,0)",shadowBlur:5,shadowOffsetX:3,shadowOffsetY:3}},emphasis:{label:{show:!1},lineStyle:{}}}},textStyle:{decoration:"none",fontFamily:"Arial, Verdana, sans-serif",fontFamily2:"微软雅黑",fontSize:12,fontStyle:"normal",fontWeight:"normal"},EVENT:{REFRESH:"refresh",RESTORE:"restore",RESIZE:"resize",CLICK:"click",HOVER:"hover",MOUSEWHEEL:"mousewheel",DATA_CHANGED:"dataChanged",DATA_ZOOM:"dataZoom",DATA_RANGE:"dataRange",LEGEND_SELECTED:"legendSelected",MAP_SELECTED:"mapSelected",PIE_SELECTED:"pieSelected",MAGIC_TYPE_CHANGED:"magicTypeChanged",DATA_VIEW_CHANGED:"dataViewChanged",MAP_ROAM:"mapRoam",TOOLTIP_HOVER:"tooltipHover"},loadingText:"Loading...",calculable:!1,calculableColor:"rgba(255,165,0,0.6)",calculableHolderColor:"#ccc",nameConnector:" & ",valueConnector:" : ",animation:!0,animationThreshold:2500,addDataAnimation:!0,animationDuration:2e3,animationEasing:"ExponentialOut"};return e}),r("zrender/lib/excanvas",["require"],function(e){return document.createElement("canvas").getContext?G_vmlCanvasManager=!1:function(){function f(){return this.context_||(this.context_=new I(this))}function c(e,t,n){var r=l.call(arguments,2);return function(){return e.apply(t,r.concat(l.call(arguments)))}}function h(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function p(e,t,n){e.namespaces[t]||e.namespaces.add(t,n,"#default#VML")}function d(e){p(e,"g_vml_","urn:schemas-microsoft-com:vml"),p(e,"g_o_","urn:schemas-microsoft-com:office:office");if(!e.styleSheets.ex_canvas_){var t=e.createStyleSheet();t.owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}function m(e){var t=e.srcElement;switch(e.propertyName){case"width":t.getContext().clearRect(),t.style.width=t.attributes.width.nodeValue+"px",t.firstChild.style.width=t.clientWidth+"px";break;case"height":t.getContext().clearRect(),t.style.height=t.attributes.height.nodeValue+"px",t.firstChild.style.height=t.clientHeight+"px"}}function g(e){var t=e.srcElement;t.firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function E(){return[[1,0,0],[0,1,0],[0,0,1]]}function S(e,t){var n=E();for(var r=0;r<3;r++)for(var i=0;i<3;i++){var s=0;for(var o=0;o<3;o++)s+=e[r][o]*t[o][i];n[r][i]=s}return n}function x(e,t){t.fillStyle=e.fillStyle,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle,t.globalAlpha=e.globalAlpha,t.font=e.font,t.textAlign=e.textAlign,t.textBaseline=e.textBaseline,t.arcScaleX_=e.arcScaleX_,t.arcScaleY_=e.arcScaleY_,t.lineScale_=e.lineScale_}function N(e){var t=e.indexOf("(",3),n=e.indexOf(")",t+1),r=e.substring(t+1,n).split(",");if(r.length!=4||e.charAt(3)!="a")r[3]=1;return r}function C(e){return parseFloat(e)/100}function k(e,t,n){return Math.min(n,Math.max(t,e))}function L(e){var t,n,r,i,s,o;i=parseFloat(e[0])/360%360,i<0&&i++,s=k(C(e[1]),0,1),o=k(C(e[2]),0,1);if(s==0)t=n=r=o;else{var u=o<.5?o*(1+s):o+s-o*s,a=2*o-u;t=A(a,u,i+1/3),n=A(a,u,i),r=A(a,u,i-1/3)}return"#"+y[Math.floor(t*255)]+y[Math.floor(n*255)]+y[Math.floor(r*255)]}function A(e,t,n){return n<0&&n++,n>1&&n--,6*n<1?e+(t-e)*6*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function M(e){if(e in O)return O[e];var t,n=1;e=String(e);if(e.charAt(0)=="#")t=e;else if(/^rgb/.test(e)){var r=N(e),t="#",i;for(var s=0;s<3;s++)r[s].indexOf("%")!=-1?i=Math.floor(C(r[s])*255):i=+r[s],t+=y[k(i,0,255)];n=+r[3]}else if(/^hsl/.test(e)){var r=N(e);t=L(r),n=r[3]}else t=T[e]||e;return O[e]={color:t,alpha:n}}function P(e){if(D[e])return D[e];var t=document.createElement("div"),n=t.style,r;try{n.font=e,r=n.fontFamily.split(",")[0]}catch(i){}return D[e]={style:n.fontStyle||_.style,variant:n.fontVariant||_.variant,weight:n.fontWeight||_.weight,size:n.fontSize||_.size,family:r||_.family}}function H(e,t){var n={};for(var r in e)n[r]=e[r];var i=parseFloat(t.currentStyle.fontSize),s=parseFloat(e.size);return typeof e.size=="number"?n.size=e.size:e.size.indexOf("px")!=-1?n.size=s:e.size.indexOf("em")!=-1?n.size=i*s:e.size.indexOf("%")!=-1?n.size=i/100*s:e.size.indexOf("pt")!=-1?n.size=s/.75:n.size=i,n}function B(e){return e.style+" "+e.variant+" "+e.weight+" "+e.size+"px '"+e.family+"'"}function F(e){return j[e]||"square"}function I(e){this.m_=E(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=o*1,this.globalAlpha=1,this.font="12px 微软雅黑",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=e;var t="width:"+e.clientWidth+"px;height:"+e.clientHeight+"px;overflow:hidden;position:absolute",n=e.ownerDocument.createElement("div");n.style.cssText=t,e.appendChild(n);var r=n.cloneNode(!1);r.style.filter="alpha(opacity=0)",e.appendChild(r),this.element_=n,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function R(e,t,n,r){e.currentPath_.push({type:"bezierCurveTo",cp1x:t.x,cp1y:t.y,cp2x:n.x,cp2y:n.y,x:r.x,y:r.y}),e.currentX_=r.x,e.currentY_=r.y}function U(e,t){var n=M(e.strokeStyle),r=n.color,i=n.alpha*e.globalAlpha,s=e.lineScale_*e.lineWidth;s<1&&(i*=s),t.push("<g_vml_:stroke",' opacity="',i,'"',' joinstyle="',e.lineJoin,'"',' miterlimit="',e.miterLimit,'"',' endcap="',F(e.lineCap),'"',' weight="',s,'px"',' color="',r,'" />')}function z(t,n,r,i){var s=t.fillStyle,u=t.arcScaleX_,a=t.arcScaleY_,f=i.x-r.x,l=i.y-r.y;if(s instanceof $){var c=0,h={x:0,y:0},p=0,d=1;if(s.type_=="gradient"){var v=s.x0_/u,m=s.y0_/a,g=s.x1_/u,y=s.y1_/a,b=W(t,v,m),w=W(t,g,y),E=w.x-b.x,S=w.y-b.y;c=Math.atan2(E,S)*180/Math.PI,c<0&&(c+=360),c<1e-6&&(c=0)}else{var b=W(t,s.x0_,s.y0_);h={x:(b.x-r.x)/f,y:(b.y-r.y)/l},f/=u*o,l/=a*o;var x=e.max(f,l);p=2*s.r0_/x,d=2*s.r1_/x-p}var T=s.colors_;T.sort(function(e,t){return e.offset-t.offset});var N=T.length,C=T[0].color,k=T[N-1].color,L=T[0].alpha*t.globalAlpha,A=T[N-1].alpha*t.globalAlpha,O=[];for(var _=0;_<N;_++){var D=T[_];O.push(D.offset*d+p+" "+D.color)}n.push('<g_vml_:fill type="',s.type_,'"',' method="none" focus="100%"',' color="',C,'"',' color2="',k,'"',' colors="',O.join(","),'"',' opacity="',A,'"',' g_o_:opacity2="',L,'"',' angle="',c,'"',' focusposition="',h.x,",",h.y,'" />')}else if(s instanceof J){if(f&&l){var P=-r.x,H=-r.y;n.push("<g_vml_:fill",' position="',P/f*u*u,",",H/l*a*a,'"',' type="tile"',' src="',s.src_,'" />')}}else{var B=M(t.fillStyle),j=B.color,F=B.alpha*t.globalAlpha;n.push('<g_vml_:fill color="',j,'" opacity="',F,'" />')}}function W(e,t,n){var r=e.m_;return{x:o*(t*r[0][0]+n*r[1][0]+r[2][0])-u,y:o*(t*r[0][1]+n*r[1][1]+r[2][1])-u}}function X(e){return isFinite(e[0][0])&&isFinite(e[0][1])&&isFinite(e[1][0])&&isFinite(e[1][1])&&isFinite(e[2][0])&&isFinite(e[2][1])}function V(e,t,n){if(!X(t))return;e.m_=t;if(n){var r=t[0][0]*t[1][1]-t[0][1]*t[1][0];e.lineScale_=s(i(r))}}function $(e){this.type_=e,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function J(e,t){Q(e);switch(t){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=t;break;default:K("SYNTAX_ERR")}this.src_=e.src,this.width_=e.width,this.height_=e.height}function K(e){throw new G(e)}function Q(e){(!e||e.nodeType!=1||e.tagName!="IMG")&&K("TYPE_MISMATCH_ERR"),e.readyState!="complete"&&K("INVALID_STATE_ERR")}function G(e){this.code=this[e],this.message=e+": DOM Exception "+this.code}var e=Math,t=e.round,n=e.sin,r=e.cos,i=e.abs,s=e.sqrt,o=10,u=o/2,a=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1],l=Array.prototype.slice;d(document);var v={init:function(e){var t=e||document;t.createElement("canvas"),t.attachEvent("onreadystatechange",c(this.init_,this,t))},init_:function(e){var t=e.getElementsByTagName("canvas");for(var n=0;n<t.length;n++)this.initElement(t[n])},initElement:function(e){if(!e.getContext){e.getContext=f,d(e.ownerDocument),e.innerHTML="",e.attachEvent("onpropertychange",m),e.attachEvent("onresize",g);var t=e.attributes;t.width&&t.width.specified?e.style.width=t.width.nodeValue+"px":e.width=e.clientWidth,t.height&&t.height.specified?e.style.height=t.height.nodeValue+"px":e.height=e.clientHeight}return e}};v.init();var y=[];for(var b=0;b<16;b++)for(var w=0;w<16;w++)y[b*16+w]=b.toString(16)+w.toString(16);var T={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},O={},_={style:"normal",variant:"normal",weight:"normal",size:12,family:"微软雅黑"},D={},j={butt:"flat",round:"round"},q=I.prototype;q.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},q.beginPath=function(){this.currentPath_=[]},q.moveTo=function(e,t){var n=W(this,e,t);this.currentPath_.push({type:"moveTo",x:n.x,y:n.y}),this.currentX_=n.x,this.currentY_=n.y},q.lineTo=function(e,t){var n=W(this,e,t);this.currentPath_.push({type:"lineTo",x:n.x,y:n.y}),this.currentX_=n.x,this.currentY_=n.y},q.bezierCurveTo=function(e,t,n,r,i,s){var o=W(this,i,s),u=W(this,e,t),a=W(this,n,r);R(this,u,a,o)},q.quadraticCurveTo=function(e,t,n,r){var i=W(this,e,t),s=W(this,n,r),o={x:this.currentX_+2/3*(i.x-this.currentX_),y:this.currentY_+2/3*(i.y-this.currentY_)},u={x:o.x+(s.x-this.currentX_)/3,y:o.y+(s.y-this.currentY_)/3};R(this,o,u,s)},q.arc=function(e,t,i,s,a,f){i*=o;var l=f?"at":"wa",c=e+r(s)*i-u,h=t+n(s)*i-u,p=e+r(a)*i-u,d=t+n(a)*i-u;c==p&&!f&&(c+=.125);var v=W(this,e,t),m=W(this,c,h),g=W(this,p,d);this.currentPath_.push({type:l,x:v.x,y:v.y,radius:i,xStart:m.x,yStart:m.y,xEnd:g.x,yEnd:g.y})},q.rect=function(e,t,n,r){this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.closePath()},q.strokeRect=function(e,t,n,r){var i=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.closePath(),this.stroke(),this.currentPath_=i},q.fillRect=function(e,t,n,r){var i=this.currentPath_;this.beginPath(),this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.closePath(),this.fill(),this.currentPath_=i},q.createLinearGradient=function(e,t,n,r){var i=new $("gradient");return i.x0_=e,i.y0_=t,i.x1_=n,i.y1_=r,i},q.createRadialGradient=function(e,t,n,r,i,s){var o=new $("gradientradial");return o.x0_=e,o.y0_=t,o.r0_=n,o.x1_=r,o.y1_=i,o.r1_=s,o},q.drawImage=function(n,r){var i,s,u,a,f,l,c,h,p=n.runtimeStyle.width,d=n.runtimeStyle.height;n.runtimeStyle.width="auto",n.runtimeStyle.height="auto";var v=n.width,m=n.height;n.runtimeStyle.width=p,n.runtimeStyle.height=d;if(arguments.length==3)i=arguments[1],s=arguments[2],f=l=0,c=u=v,h=a=m;else if(arguments.length==5)i=arguments[1],s=arguments[2],u=arguments[3],a=arguments[4],f=l=0,c=v,h=m;else{if(arguments.length!=9)throw Error("Invalid number of arguments");f=arguments[1],l=arguments[2],c=arguments[3],h=arguments[4],i=arguments[5],s=arguments[6],u=arguments[7],a=arguments[8]}var g=W(this,i,s),y=c/2,b=h/2,w=[],E=10,S=10,x=scaleY=1;w.push(" <g_vml_:group",' coordsize="',o*E,",",o*S,'"',' coordorigin="0,0"',' style="width:',E,"px;height:",S,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var T=[];x=Math.sqrt(this.m_[0][0]*this.m_[0][0]+this.m_[0][1]*this.m_[0][1]),scaleY=Math.sqrt(this.m_[1][0]*this.m_[1][0]+this.m_[1][1]*this.m_[1][1]),T.push("M11=",this.m_[0][0]/x,",","M12=",this.m_[1][0]/scaleY,",","M21=",this.m_[0][1]/x,",","M22=",this.m_[1][1]/scaleY,",","Dx=",t(g.x/o),",","Dy=",t(g.y/o),"");var N=g,C=W(this,i+u,s),k=W(this,i,s+a),L=W(this,i+u,s+a);N.x=e.max(N.x,C.x,k.x,L.x),N.y=e.max(N.y,C.y,k.y,L.y),w.push("padding:0 ",t(N.x/o),"px ",t(N.y/o),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",T.join(""),", sizingmethod='clip');")}else w.push("top:",t(g.y/o),"px;left:",t(g.x/o),"px;");w.push(' ">'),(f||l)&&w.push('<div style="overflow: hidden; width:',Math.ceil((u+f*u/c)*x),"px;"," height:",Math.ceil((a+l*a/h)*scaleY),"px;"," filter:progid:DxImageTransform.Microsoft.Matrix(Dx=",-f*u/c*x,",Dy=",-l*a/h*scaleY,');">'),w.push('<div style="width:',Math.round(x*v*u/c),"px;"," height:",Math.round(scaleY*m*a/h),"px;"," filter:"),this.globalAlpha<1&&w.push(" progid:DXImageTransform.Microsoft.Alpha(opacity="+this.globalAlpha*100+")"),w.push(" progid:DXImageTransform.Microsoft.AlphaImageLoader(src=",n.src,',sizingMethod=scale)">'),(f||l)&&w.push("</div>"),w.push("</div></div>"),this.element_.insertAdjacentHTML("BeforeEnd",w.join(""))},q.stroke=function(e){var n=[],r=!1,i=10,s=10;n.push("<g_vml_:shape",' filled="',!!e,'"',' style="position:absolute;width:',i,"px;height:",s,'px;"',' coordorigin="0,0"',' coordsize="',o*i,",",o*s,'"',' stroked="',!e,'"',' path="');var u=!1,a={x:null,y:null},f={x:null,y:null};for(var l=0;l<this.currentPath_.length;l++){var c=this.currentPath_[l],h;switch(c.type){case"moveTo":h=c,n.push(" m ",t(c.x),",",t(c.y));break;case"lineTo":n.push(" l ",t(c.x),",",t(c.y));break;case"close":n.push(" x "),c=null;break;case"bezierCurveTo":n.push(" c ",t(c.cp1x),",",t(c.cp1y),",",t(c.cp2x),",",t(c.cp2y),",",t(c.x),",",t(c.y));break;case"at":case"wa":n.push(" ",c.type," ",t(c.x-this.arcScaleX_*c.radius),",",t(c.y-this.arcScaleY_*c.radius)," ",t(c.x+this.arcScaleX_*c.radius),",",t(c.y+this.arcScaleY_*c.radius)," ",t(c.xStart),",",t(c.yStart)," ",t(c.xEnd),",",t(c.yEnd))}if(c){if(a.x==null||c.x<a.x)a.x=c.x;if(f.x==null||c.x>f.x)f.x=c.x;if(a.y==null||c.y<a.y)a.y=c.y;if(f.y==null||c.y>f.y)f.y=c.y}}n.push(' ">'),e?z(this,n,a,f):U(this,n),n.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",n.join(""))},q.fill=function(){this.stroke(!0)},q.closePath=function(){this.currentPath_.push({type:"close"})},q.save=function(){var e={};x(this,e),this.aStack_.push(e),this.mStack_.push(this.m_),this.m_=S(E(),this.m_)},q.restore=function(){this.aStack_.length&&(x(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},q.translate=function(e,t){var n=[[1,0,0],[0,1,0],[e,t,1]];V(this,S(n,this.m_),!1)},q.rotate=function(e){var t=r(e),i=n(e),s=[[t,i,0],[-i,t,0],[0,0,1]];V(this,S(s,this.m_),!1)},q.scale=function(e,t){this.arcScaleX_*=e,this.arcScaleY_*=t;var n=[[e,0,0],[0,t,0],[0,0,1]];V(this,S(n,this.m_),!0)},q.transform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,S(o,this.m_),!0)},q.setTransform=function(e,t,n,r,i,s){var o=[[e,t,0],[n,r,0],[i,s,1]];V(this,o,!0)},q.drawText_=function(e,n,r,i,s){var u=this.m_,a=1e3,f=0,l=a,c={x:0,y:0},p=[],d=H(P(this.font),this.element_),v=B(d),m=this.element_.currentStyle,g=this.textAlign.toLowerCase();switch(g){case"left":case"center":case"right":break;case"end":g=m.direction=="ltr"?"right":"left";break;case"start":g=m.direction=="rtl"?"right":"left";break;default:g="left"}switch(this.textBaseline){case"hanging":case"top":c.y=d.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":c.y=-d.size/2.25}switch(g){case"right":f=a,l=.05;break;case"center":f=l=a/2}var y=W(this,n+c.x,r+c.y);p.push('<g_vml_:line from="',-f,' 0" to="',l,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!s,'" stroked="',!!s,'" style="position:absolute;width:1px;height:1px;">'),s?U(this,p):z(this,p,{x:-f,y:0},{x:l,y:d.size});var b=u[0][0].toFixed(3)+","+u[1][0].toFixed(3)+","+u[0][1].toFixed(3)+","+u[1][1].toFixed(3)+",0,0",w=t(y.x/o)+","+t(y.y/o);p.push('<g_vml_:skew on="t" matrix="',b,'" ',' offset="',w,'" origin="',f,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',h(e),'" style="v-text-align:',g,";font:",h(v),'" /></g_vml_:line>'),this.element_.insertAdjacentHTML("beforeEnd",p.join(""))},q.fillText=function(e,t,n,r){this.drawText_(e,t,n,r,!1)},q.strokeText=function(e,t,n,r){this.drawText_(e,t,n,r,!0)},q.measureText=function(e){if(!this.textMeasureEl_){var t='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",t),this.textMeasureEl_=this.element_.lastChild}var n=this.element_.ownerDocument;return this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(n.createTextNode(e)),{width:this.textMeasureEl_.offsetWidth}},q.clip=function(){},q.arcTo=function(){},q.createPattern=function(e,t){return new J(e,t)},$.prototype.addColorStop=function(e,t){t=M(t),this.colors_.push({offset:e,color:t.color,alpha:t.alpha})};var Y=G.prototype=new Error;Y.INDEX_SIZE_ERR=1,Y.DOMSTRING_SIZE_ERR=2,Y.HIERARCHY_REQUEST_ERR=3,Y.WRONG_DOCUMENT_ERR=4,Y.INVALID_CHARACTER_ERR=5,Y.NO_DATA_ALLOWED_ERR=6,Y.NO_MODIFICATION_ALLOWED_ERR=7,Y.NOT_FOUND_ERR=8,Y.NOT_SUPPORTED_ERR=9,Y.INUSE_ATTRIBUTE_ERR=10,Y.INVALID_STATE_ERR=11,Y.SYNTAX_ERR=12,Y.INVALID_MODIFICATION_ERR=13,Y.NAMESPACE_ERR=14,Y.INVALID_ACCESS_ERR=15,Y.VALIDATION_ERR=16,Y.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=v,CanvasRenderingContext2D=I,CanvasGradient=$,CanvasPattern=J,DOMException=G}(),G_vmlCanvasManager}),r("zrender/tool/env",[],function(){function e(e){var t=this.os={},n=this.browser={},r=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),o=e.match(/(iPod)(.*OS\s([\d_]+))?/),u=!s&&e.match(/(iPhone\sOS)\s([\d_]+)/),a=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),f=a&&e.match(/TouchPad/),l=e.match(/Kindle\/([\d.]+)/),c=e.match(/Silk\/([\d._]+)/),h=e.match(/(BlackBerry).*Version\/([\d.]+)/),p=e.match(/(BB10).*Version\/([\d.]+)/),d=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),v=e.match(/PlayBook/),m=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),g=e.match(/Firefox\/([\d.]+)/),y=e.match(/MSIE ([\d.]+)/),b=r&&e.match(/Mobile\//)&&!m,w=e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)&&!m,y=e.match(/MSIE\s([\d.]+)/);if(n.webkit=!!r)n.version=r[1];return i&&(t.android=!0,t.version=i[2]),u&&!o&&(t.ios=t.iphone=!0,t.version=u[2].replace(/_/g,".")),s&&(t.ios=t.ipad=!0,t.version=s[2].replace(/_/g,".")),o&&(t.ios=t.ipod=!0,t.version=o[3]?o[3].replace(/_/g,"."):null),a&&(t.webos=!0,t.version=a[2]),f&&(t.touchpad=!0),h&&(t.blackberry=!0,t.version=h[2]),p&&(t.bb10=!0,t.version=p[2]),d&&(t.rimtabletos=!0,t.version=d[2]),v&&(n.playbook=!0),l&&(t.kindle=!0,t.version=l[1]),c&&(n.silk=!0,n.version=c[1]),!c&&t.android&&e.match(/Kindle Fire/)&&(n.silk=!0),m&&(n.chrome=!0,n.version=m[1]),g&&(n.firefox=!0,n.version=g[1]),y&&(n.ie=!0,n.version=y[1]),b&&(e.match(/Safari/)||!!t.ios)&&(n.safari=!0),w&&(n.webview=!0),y&&(n.ie=!0,n.version=y[1]),t.tablet=!!(s||v||i&&!e.match(/Mobile/)||g&&e.match(/Tablet/)||y&&!e.match(/Phone/)&&e.match(/Touch/)),t.phone=!!(!t.tablet&&!t.ipod&&(i||u||a||h||p||m&&e.match(/Android/)||m&&e.match(/CriOS\/([\d.]+)/)||g&&e.match(/Mobile/)||y&&e.match(/Touch/))),{browser:n,os:t,canvasSupported:document.createElement("canvas").getContext?!0:!1}}return e(navigator.userAgent)}),r("zrender/shape",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("zrender/tool/vector",[],function(){var e=typeof Float32Array=="undefined"?Array:Float32Array,t={create:function(t,n){var r=new e(2);return r[0]=t||0,r[1]=n||0,r},copy:function(e,t){e[0]=t[0],e[1]=t[1]},set:function(e,t,n){e[0]=t,e[1]=n},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},sub:function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},length:function(e){return Math.sqrt(this.lengthSquare(e))},lengthSquare:function(e){return e[0]*e[0]+e[1]*e[1]},mul:function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},normalize:function(e,n){var r=t.length(n);return r===0?(e[0]=0,e[1]=0):(e[0]=n[0]/r,e[1]=n[1]/r),e},distance:function(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))},negate:function(e,t){e[0]=-t[0],e[1]=-t[1]},middle:function(e,t,n){return e[0]=(t[0]+n[0])/2,e[1]=(t[1]+n[1])/2,e}};return t}),r("zrender/tool/util",["require","./vector","../lib/excanvas"],function(e){function n(e){var t={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1},n=e,r,i;if(!e||e instanceof Number||e instanceof String||e instanceof Boolean)return n;if(e instanceof Array){n=[];var s=0;for(r=0,i=e.length;r<i;r++)n[s++]=this.clone(e[r])}else if("object"==typeof e){if(t[Object.prototype.toString.call(e)]||e.__nonRecursion)return n;n={};for(r in e)e.hasOwnProperty(r)&&(n[r]=this.clone(e[r]))}return n}function i(e,t,n,r){if(!e||!t)return;if(t instanceof Object)for(var s in t)if(t.hasOwnProperty(s))if(t[s]instanceof Object&&r&&e[s])i(e[s],t[s],n,r);else if(n||!e.hasOwnProperty(s))e[s]=t[s]}function o(){if(!s){e("../lib/excanvas");if(G_vmlCanvasManager){var t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",document.body.appendChild(t),s=G_vmlCanvasManager.initElement(t).getContext("2d")}else s=document.createElement("canvas").getContext("2d")}return s}function p(){return a||(u=document.createElement("canvas"),f=u.width,l=u.height,a=u.getContext("2d")),a}function d(e,t){var n=100,r=!1;e+c>f&&(f=e+c+n,u.width=f,r=!0),t+h>l&&(l=t+h+n,u.height=l,r=!0),e<-c&&(c=Math.ceil(-e/n)*n,f+=c,u.width=f,r=!0),t<-h&&(h=Math.ceil(-t/n)*n,l+=h,u.height=l,r=!0),r&&a.translate(c,h)}function v(){return{x:c,y:h}}function m(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function g(e,t,n){if(e.length===0)return;var r=e[0][0],i=e[0][0],s=e[0][1],o=e[0][1];for(var u=1;u<e.length;u++){var a=e[u];a[0]<r&&(r=a[0]),a[0]>i&&(i=a[0]),a[1]<s&&(s=a[1]),a[1]>o&&(o=a[1])}t[0]=r,t[1]=s,n[0]=i,n[1]=o}function y(e,t,n,r,i,s){var o=b(e[0],t[0],n[0],r[0]),u=b(e[1],t[1],n[1],r[1]);o.push(e[0],r[0]),u.push(e[1],r[1]);var a=Math.min.apply(null,o),f=Math.max.apply(null,o),l=Math.min.apply(null,u),c=Math.max.apply(null,u);i[0]=a,i[1]=l,s[0]=f,s[1]=c}function b(e,t,n,r){var i=[],s=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,u=3*t-3*e,a=s*s-4*o*u;if(a>0){var f=Math.sqrt(a),l=(-s+f)/(2*o),c=(-s-f)/(2*o);i.push(l,c)}else a===0&&i.push(-s/(2*o));var h=[];for(var p=0;p<i.length;p++){var d=i[p];if(Math.abs(2*o*d+s)>1e-4&&d<1&&d>0){var v=1-d,m=v*v*v*e+3*v*v*d*t+3*v*d*d*n+d*d*d*r;h.push(m)}}return h}function w(e,t,n,r,i){var s=e[0]+n[0]-2*t[0],o;s===0?o=.5:o=(e[0]-t[0])/s,s=e[1]+n[1]-2*t[1];var u;s===0?u=.5:u=(e[1]-t[1])/s,o=Math.max(Math.min(o,1),0),u=Math.max(Math.min(u,1),0);var a=1-o,f=1-u,l=a*a*e[0]+2*a*o*t[0]+o*o*n[0],c=a*a*e[1]+2*a*o*t[1]+o*o*n[1],h=f*f*e[0]+2*f*u*t[0]+u*u*n[0],p=f*f*e[1]+2*f*u*t[1]+u*u*n[1];return g([e.slice(),n.slice(),[l,c],[h,p]],r,i)}var t=e("./vector"),r=function(){function t(t,n,i,s,o){if(n.hasOwnProperty(i))if(o&&typeof t[i]=="object"&&e[Object.prototype.toString.call(t[i])]!=1)r(t[i],n[i],{overwrite:s,recursive:o});else if(s||!(i in t))t[i]=n[i]}var e={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1};return function(e,n,r){var i=0,s=r||{},o=s.overwrite,u=s.whiteList,a=s.recursive,f;if(u&&u.length){f=u.length;for(;i<f;++i)t(e,n,u[i],o,a)}else for(i in n)t(e,n,i,o,a);return e}}(),s,u,a,f,l,c=0,h=0,E=function(){var e=[],n=[],r=[[],[],[],[]];return function(i,s,o,u,a,f,l){a=a?1:-1,e[0]=Math.cos(o),e[1]=Math.sin(o)*a,t.scale(e,e,s),t.add(e,e,i),n[0]=Math.cos(u),n[1]=Math.sin(u)*a,t.scale(n,n,s),t.add(n,n,i),o%=Math.PI*2,o<0&&(o+=Math.PI*2),u%=Math.PI*2,u<0&&(u+=Math.PI*2),o>u&&(u+=Math.PI*2);var c=0;for(var h=0;h<u;h+=Math.PI/2)if(h>o){var p=r[c++];p[0]=Math.cos(h),p[1]=Math.sin(h)*a,t.scale(p,p,s),t.add(p,p,i)}var d=r.slice(0,c);d.push(e,n),g(d,f,l)}}();return{clone:n,merge:r,mergeFast:i,getContext:o,getPixelContext:p,getPixelOffset:v,adjustCanvasSize:d,computeBoundingBox:g,computeCubeBezierBoundingBox:y,computeQuadraticBezierBoundingBox:w,computeArcBoundingBox:E,indexOf:m}}),r("zrender/tool/area",["require","../tool/util","../shape"],function(e){function r(e,r,u,a){if(!r||!e)return!1;var f=e.type;n||(n=t.getContext());if(!h(r.__rect||e.getRect(r),u,a))return!1;var l=i(f,r,u,a);if(typeof l!="undefined")return l;if(f!="beziercurve"&&e.buildPath&&n.isPointInPath)return s(e,n,r,u,a);if(n.getImageData)return o(e,r,u,a);switch(f){case"heart":return!0;case"droplet":return!0;case"ellipse":return!0;case"trochoid":var c=r.location=="out"?r.r1+r.r2+r.d:r.r1-r.r2+r.d;return p(r,u,a,c);case"rose":return p(r,u,a,r.maxr);default:return!1}}function i(e,t,n,r){switch(e){case"line":return f(t,n,r);case"brokenLine":return l(t,n,r);case"text":return!0;case"ring":return c(t,n,r);case"rectangle":return!0;case"circle":return p(t,n,r,t.r);case"sector":return d(t,n,r);case"path":return m(t,n,r);case"polygon":case"star":case"isogon":return v(t,n,r);case"image":return!0}}function s(e,t,n,r,i){return t.beginPath(),e.buildPath(t,n),t.closePath(),t.isPointInPath(r,i)}function o(e,n,r,i){var s=n.__rect||e.getRect(n),o=t.getPixelContext(),a=t.getPixelOffset();return t.adjustCanvasSize(r,i),o.clearRect(s.x,s.y,s.width,s.height),o.beginPath(),e.brush(o,{style:n}),o.closePath(),u(o,r+a.x,i+a.y)}function u(e,t,n,r){var i;typeof r!="undefined"?(r=Math.floor((r||1)/2),i=e.getImageData(t-r,n-r,r+r,r+r).data):i=e.getImageData(t,n,1,1).data;var s=i.length;while(s--)if(i[s]!==0)return!0;return!1}function a(e,t,n,i){return!r(e,t,n,i)}function f(e,t,n){var r=e.xStart,i=e.yStart,s=e.xEnd,o=e.yEnd,u=Math.max(e.lineWidth,3),a=0,f=r;if(r===s)return Math.abs(t-r)<=u/2;a=(i-o)/(r-s),f=(r*o-s*i)/(r-s);var l=(a*t-n+f)*(a*t-n+f)/(a*a+1);return l<=u/2*u/2}function l(e,t,n){var r=e.pointList,i,s=!1;for(var o=0,u=r.length-1;o<u;o++){i={xStart:r[o][0],yStart:r[o][1],xEnd:r[o+1][0],yEnd:r[o+1][1],lineWidth:e.lineWidth};if(!h({x:Math.min(i.xStart,i.xEnd)-i.lineWidth,y:Math.min(i.yStart,i.yEnd)-i.lineWidth,width:Math.abs(i.xStart-i.xEnd)+i.lineWidth,height:Math.abs(i.yStart-i.yEnd)+i.lineWidth},t,n))continue;s=f(i,t,n);if(s)break}return s}function c(e,t,n){return p(e,t,n,e.r)&&!p({x:e.x,y:e.y},t,n,e.r0||0)?!0:!1}function h(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height?!0:!1}function p(e,t,n,r){return(t-e.x)*(t-e.x)+(n-e.y)*(n-e.y)<r*r}function d(e,t,n){if(!p(e,t,n,e.r)||e.r0>0&&p({x:e.x,y:e.y},t,n,e.r0))return!1;var r=(360-Math.atan2(n-e.y,t-e.x)/Math.PI*180)%360,i=(360+e.endAngle)%360,s=(360+e.startAngle)%360;return i>s?r>=s&&r<=i:!(r>=i&&r<=s)}function v(e,t,n){var r,i,s=e.pointList,o=s.length,u=!1,a=!0,f;for(r=0;r<o;++r)if(s[r][0]==t&&s[r][1]==n){a=!1,u=!0;break}if(a){a=!1,u=!1;for(r=0,i=o-1;r<o;i=r++)if(s[r][1]<n&&n<s[i][1]||s[i][1]<n&&n<s[r][1]){if(t<=s[r][0]||t<=s[i][0]){f=(n-s[r][1])*(s[i][0]-s[r][0])/(s[i][1]-s[r][1])+s[r][0];if(t<f)u=!u;else if(t==f){u=!0;break}}}else if(n==s[r][1]){if(t<s[r][0]){s[r][1]>s[i][1]?--n:++n;break}}else if(s[r][1]==s[i][1]&&n==s[r][1]&&(s[r][0]<t&&t<s[i][0]||s[i][0]<t&&t<s[r][0])){u=!0;break}}return u}function m(t,r,i){t.pointList||e("../shape").get("path").buildPath(n,t);var s=t.pointList,o=!1;for(var u=0,a=s.length;u<a;u++){o=v({pointList:s[u]},r,i);if(o)break}return o}function g(e,r){n||(n=t.getContext()),n.save(),r&&(n.font=r),e=(e+"").split("\n");var i=0;for(var s=0,o=e.length;s<o;s++)i=Math.max(n.measureText(e[s]).width,i);return n.restore(),i}function y(e,r){n||(n=t.getContext()),n.save(),r&&(n.font=r),e=(e+"").split("\n");var i=(n.measureText("国").width+2)*e.length;return n.restore(),i}var t=e("../tool/util"),n;return{isInside:r,isOutside:a,getTextWidth:g,getTextHeight:y}}),r("zrender/tool/matrix",[],function(){var e={create:function(){return[1,0,0,1,0,0]},identity:function(e){e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0},mul:function(e,t,n){return e[0]=t[0]*n[0]+t[2]*n[1],e[1]=t[1]*n[0]+t[3]*n[1],e[2]=t[0]*n[2]+t[2]*n[3],e[3]=t[1]*n[2]+t[3]*n[3],e[4]=t[0]*n[4]+t[2]*n[5]+t[4],e[5]=t[1]*n[4]+t[3]*n[5]+t[5],e},translate:function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},rotate:function(e,t,n){var r=t[0],i=t[2],s=t[4],o=t[1],u=t[3],a=t[5],f=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*f,e[1]=-r*f+o*l,e[2]=i*l+u*f,e[3]=-i*f+l*u,e[4]=l*s+f*a,e[5]=l*a-f*s,e},scale:function(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e},invert:function(e,t){var n=t[0],r=t[2],i=t[4],s=t[1],o=t[3],u=t[5],a=n*o-s*r;return a?(a=1/a,e[0]=o*a,e[1]=-s*a,e[2]=-r*a,e[3]=n*a,e[4]=(r*u-o*i)*a,e[5]=(s*i-n*u)*a,e):null},mulVector:function(e,t,n){var r=t[0],i=t[2],s=t[4],o=t[1],u=t[3],a=t[5];return e[0]=n[0]*r+n[1]*i+s,e[1]=n[0]*o+n[1]*u+a,e}};return e}),r("zrender/tool/color",["require","../tool/util"],function(e){function f(e){r=e}function l(){r=i}function c(e,t){return e=+e||0,t=t||r,t[e%t.length]}function h(e){s=e}function p(){o=s}function d(){return s}function v(e,r,i,s,o,u,a){n||(n=t.getContext());var f=n.createRadialGradient(e,r,i,s,o,u);for(var l=0,c=a.length;l<c;l++)f.addColorStop(a[l][0],a[l][1]);return f.__nonRecursion=!0,f}function m(e,r,i,s,o){n||(n=t.getContext());var u=n.createLinearGradient(e,r,i,s);for(var a=0,f=o.length;a<f;a++)u.addColorStop(o[a][0],o[a][1]);return u.__nonRecursion=!0,u}function g(e,t,n){e=S(e),t=S(t),e=F(e),t=F(t);var r=[],i=(t[0]-e[0])/n,s=(t[1]-e[1])/n,o=(t[2]-e[2])/n;for(var u=0,a=e[0],f=e[1],l=e[2];u<n;u++)r[u]=b([R(Math.floor(a),[0,255]),R(Math.floor(f),[0,255]),R(Math.floor(l),[0,255])]),a+=i,f+=s,l+=o;return a=t[0],f=t[1],l=t[2],r[u]=b([a,f,l]),r}function y(e,t){var n=[],r=e.length;t===undefined&&(t=20);if(r===1)n=g(e[0],e[0],t);else if(r>1)for(var i=0,s=r-1;i<s;i++){var o=g(e[i],e[i+1],t);i<s-1&&o.pop(),n=n.concat(o)}return n}function b(e,t){t=t||"rgb";if(e&&(e.length===3||e.length===4)){e=q(e,function(e){return e>1?Math.ceil(e):e});if(t.indexOf("hex")>-1)return e=q(e.slice(0,3),function(e){return e=Number(e).toString(16),e.length===1?"0"+e:e}),"#"+e.join("");if(t.indexOf("hs")>-1){var n=q(e.slice(1,3),function(e){return e+"%"});e[1]=n[0],e[2]=n[1]}return t.indexOf("a")>-1?(e.length===3&&e.push(1),e[3]=R(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}function w(e){e=_(e),e.indexOf("#")>-1&&(e=x(e));var t=e.replace(/[rgbahsvl%\(\)]/ig,"").split(",");return t=q(t,function(e){return Number(e)}),t}function E(e,t){var n=F(e),r=n[3];return typeof r=="undefined"&&(r=1),e.indexOf("hsb")>-1?n=U(n):e.indexOf("hsl")>-1&&(n=z(n)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?n=X(n):t.indexOf("hsl")>-1&&(n=V(n)),n[3]=r,b(n,t)}function S(e){return E(e,"rgba")}function x(e){return E(e,"rgb")}function T(e){return E(e,"hex")}function N(e){return E(e,"hsva")}function C(e){return E(e,"hsv")}function k(e){return E(e,"hsba")}function L(e){return E(e,"hsb")}function A(e){return E(e,"hsla")}function O(e){return E(e,"hsl")}function M(e){for(var t in a)if(T(a[t])===T(e))return t;return null}function _(e){return e=String(e),e=e.replace(/(^\s*)|(\s*$)/g,""),/^[^#]*?$/i.test(e)&&(e=e.replace(/\s/g,"")),e}function D(e){a[e]&&(e=a[e]),e=_(e),e=e.replace(/hsv/i,"hsb");if(/^#[0-9a-f]{3}$/i.test(e)){var t=e.replace("#","").split("");e="#"+t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}return e}function P(e,t){var n=t>0?1:-1;typeof t=="undefined"&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=x(e);var r=F(e);for(var i=0;i<3;i++)n===1?r[i]=Math.floor(r[i]*(1-t)):r[i]=Math.floor((255-r[i])*t+r[i]);return"rgb("+r.join(",")+")"}function H(e){var t=F(S(e));return t=q(t,function(e){return 255-e}),b(t,"rgb")}function B(e,t,n){typeof n=="undefined"&&(n=.5),n=1-R(n,[0,1]);var r=n*2-1,i=F(S(e)),s=F(S(t)),o=i[3]-s[3],u=((r*o===-1?r:(r+o)/(1+r*o))+1)/2,a=1-u,f=[];for(var l=0;l<3;l++)f[l]=i[l]*u+s[l]*a;var c=i[3]*n+s[3]*(1-n);return c=Math.max(0,Math.min(1,c)),i[3]===1&&s[3]===1?b(f,"rgb"):(f[3]=c,b(f,"rgba"))}function j(){return T("rgb("+Math.round(Math.random()*256)+","+Math.round(Math.random()*256)+","+Math.round(Math.random()*256)+")")}function F(e){e=D(e);var t=e.match(u);if(t===null)throw new Error("The color format error");var n,r,i=[],s;if(t[2])n=t[2].replace("#","").split(""),s=[n[0]+n[1],n[2]+n[3],n[4]+n[5]],i=q(s,function(e){return R(parseInt(e,16),[0,255])});else if(t[4]){var o=t[4].split(",");r=o[3],s=o.slice(0,3),i=q(s,function(e){return e=Math.floor(e.indexOf("%")>0?parseInt(e,0)*2.55:e),R(e,[0,255])}),typeof r!="undefined"&&i.push(R(parseFloat(r),[0,1]))}else if(t[5]||t[6]){var a=(t[5]||t[6]).split(","),f=parseInt(a[0],0)/360,l=a[1],c=a[2];r=a[3],i=q([l,c],function(e){return R(parseFloat(e)/100,[0,1])}),i.unshift(f),typeof r!="undefined"&&i.push(R(parseFloat(r),[0,1]))}return i}function I(e,t){t===null&&(t=1);var n=F(S(e));return n[3]=R(Number(t).toFixed(4),[0,1]),b(n,"rgba")}function q(e,t){if(typeof t!="function")throw new TypeError;var n=e?e.length:0;for(var r=0;r<n;r++)e[r]=t(e[r]);return e}function R(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}function U(e){var t=e[0],n=e[1],r=e[2],i,s,o;if(n===0)i=r*255,s=r*255,o=r*255;else{var u=t*6;u===6&&(u=0);var a=Math.floor(u),f=r*(1-n),l=r*(1-n*(u-a)),c=r*(1-n*(1-(u-a))),h=0,p=0,d=0;a===0?(h=r,p=c,d=f):a===1?(h=l,p=r,d=f):a===2?(h=f,p=r,d=c):a===3?(h=f,p=l,d=r):a===4?(h=c,p=f,d=r):(h=r,p=f,d=l),i=h*255,s=p*255,o=d*255}return[i,s,o]}function z(e){var t=e[0],n=e[1],r=e[2],i,s,o;if(n===0)i=r*255,s=r*255,o=r*255;else{var u;r<.5?u=r*(1+n):u=r+n-n*r;var a=2*r-u;i=255*W(a,u,t+1/3),s=255*W(a,u,t),o=255*W(a,u,t-1/3)}return[i,s,o]}function W(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),6*n<1?e+(t-e)*6*n:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function X(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,u=s,a,f;if(o===0)a=0,f=0;else{f=o/s;var l=((s-t)/6+o/2)/o,c=((s-n)/6+o/2)/o,h=((s-r)/6+o/2)/o;t===s?a=h-c:n===s?a=1/3+l-h:r===s&&(a=2/3+c-l),a<0&&(a+=1),a>1&&(a-=1)}return a*=360,f*=100,u*=100,[a,f,u]}function V(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,u=(s+i)/2,a,f;if(o===0)a=0,f=0;else{u<.5?f=o/(s+i):f=o/(2-s-i);var l=((s-t)/6+o/2)/o,c=((s-n)/6+o/2)/o,h=((s-r)/6+o/2)/o;t===s?a=h-c:n===s?a=1/3+l-h:r===s&&(a=2/3+c-l),a<0&&(a+=1),a>1&&(a-=1)}return a*=360,f*=100,u*=100,[a,f,u]}var t=e("../tool/util"),n,r=["#ff9277"," #dddd00"," #ffc877"," #bbe3ff"," #d5ffbb","#bbbbff"," #ddb000"," #b0dd00"," #e2bbff"," #ffbbe3","#ff7777"," #ff9900"," #83dd00"," #77e3ff"," #778fff","#c877ff"," #ff77ab"," #ff6600"," #aa8800"," #77c7ff","#ad77ff"," #ff77ff"," #dd0083"," #777700"," #00aa00","#0088aa"," #8400dd"," #aa0088"," #dd0000"," #772e00"],i=r,s="rgba(255,255,0,0.5)",o=s,u=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};return{customPalette:f,resetPalette:l,getColor:c,getHighlightColor:d,customHighlight:h,resetHighlight:p,getRadialGradient:v,getLinearGradient:m,getGradientColors:y,getStepColors:g,reverse:H,mix:B,lift:P,trim:_,random:j,toRGB:x,toRGBA:S,toHex:T,toHSL:O,toHSLA:A,toHSB:L,toHSBA:k,toHSV:C,toHSVA:N,toName:M,toColor:b,toArray:w,alpha:I,getData:F}}),r("zrender/shape/base",["require","../tool/area","../tool/matrix","../tool/vector","../tool/color"],function(e){function s(e){var n=["brush","setContext","dashedLineTo","smoothBezier","smoothSpline","drawText","getHighlightStyle","getHighlightZoom","drift","isCover","updateTransform"],r=n.length,i=e.prototype,s=0,o;for(;s<r;s++)o=n[s],i[o]||(i[o]=t[o])}function o(e,t,n){var r=t.style||{};this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),n&&(r=this.getHighlightStyle(r,t.highlightStyle||{},this.brushTypeOnly)),this.brushTypeOnly=="stroke"&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),e.beginPath(),this.buildPath(e,r),this.brushTypeOnly!="stroke"&&e.closePath();switch(r.brushType){case"fill":e.fill();break;case"stroke":r.lineWidth>0&&e.stroke();break;case"both":r.lineWidth>0&&e.stroke(),e.fill();break;default:e.fill()}typeof r.text!="undefined"&&this.drawText(e,r,t.style),e.restore();return}function u(e,t){t.color&&(e.fillStyle=t.color),t.strokeColor&&(e.strokeStyle=t.strokeColor),typeof t.opacity!="undefined"&&(e.globalAlpha=t.opacity),t.lineCap&&(e.lineCap=t.lineCap),t.lineJoin&&(e.lineJoin=t.lineJoin),t.miterLimit&&(e.miterLimit=t.miterLimit),typeof t.lineWidth!="undefined"&&(e.lineWidth=t.lineWidth),typeof t.shadowBlur!="undefined"&&(e.shadowBlur=t.shadowBlur),t.shadowColor&&(e.shadowColor=t.shadowColor),typeof t.shadowOffsetX!="undefined"&&(e.shadowOffsetX=t.shadowOffsetX),typeof t.shadowOffsetY!="undefined"&&(e.shadowOffsetY=t.shadowOffsetY)}function a(e,t,n,r,i,s){s=typeof s=="undefined"?5:s;var o=r-t,u=i-n,a=Math.floor(Math.sqrt(o*o+u*u)/s);for(var f=0;f<a;++f)e[f%2===0?"moveTo":"lineTo"](t+o/a*f,n+u/a*f)}function f(e,t,n){var r=e.length,s=[],o=[],u=[],a=[],f,l;for(var c=0;c<r;c++){var h=e[c],f,l;if(n)f=e[c===0?r-1:c-1],l=e[(c+1)%r];else{if(c===0||c===r-1){s.push(e[c]);continue}f=e[c-1],l=e[c+1]}i.sub(o,l,f),i.scale(o,o,t);var p=i.distance(h,f),d=i.distance(h,l),v=p+d;p/=v,d/=v,i.scale(u,o,-p),i.scale(a,o,d),s.push(i.add([],h,u)),s.push(i.add([],h,a))}return n&&s.push(s.shift()),s}function l(e,t){var n=e.length,r=[],s=0;for(var o=1;o<n;o++)s+=i.distance(e[o-1],e[o]);var u=s/5;for(var o=0;o<u;o++){var a;t?a=o/(u-1)*n:a=o/(u-1)*(n-1);var f=Math.floor(a),l=a-f,h,p=e[f%n],d,v;t?(h=e[(f-1+n)%n],d=e[(f+1)%n],v=e[(f+2)%n]):(h=e[f===0?f:f-1],d=e[f>n-2?n-1:f+1],v=e[f>n-3?n-1:f+2]);var m=l*l,g=l*m;r.push([c(h[0],p[0],d[0],v[0],l,m,g),c(h[1],p[1],d[1],v[1],l,m,g)])}return r}function c(e,t,n,r,i,s,o){var u=(n-e)*.5,a=(r-t)*.5;return(2*(t-n)+u+a)*o+(-3*(t-n)-2*u-a)*s+u*i+t}function h(e,t,n){t.textColor=t.textColor||t.color||t.strokeColor,e.fillStyle=t.textColor,t.textPosition=="inside"&&(e.shadowColor="rgba(0,0,0,0)");var r=10,i,s,o,u,a=t.textPosition||this.textPosition||"top";if(a!="inside"&&a!="top"&&a!="bottom"&&a!="left"&&a!="right"||!this.getRect)if(a=="start"||a=="end"){var l,c,h,d;if(typeof t.pointList!="undefined"){var v=t.pointList;if(v.length<2)return;var m=v.length;switch(a){case"start":l=v[0][0],c=v[1][0],h=v[0][1],d=v[1][1];break;case"end":l=v[m-2][0],c=v[m-1][0],h=v[m-2][1],d=v[m-1][1]}}else l=t.xStart||0,c=t.xEnd||0,h=t.yStart||0,d=t.yEnd||0;switch(a){case"start":i=l<c?"end":"start",s=h<d?"bottom":"top",o=l,u=h;break;case"end":i=l<c?"start":"end",s=h<d?"top":"bottom",o=c,u=d}r-=4,l!=c?o-=i=="end"?r:-r:i="center",h!=d?u-=s=="bottom"?r:-r:s="middle"}else a=="specific"&&(o=t.textX||0,u=t.textY||0,i="start",s="middle");else{var f=(n||t).__rect||this.getRect(n||t);switch(a){case"inside":o=f.x+f.width/2,u=f.y+f.height/2,i="center",s="middle",t.brushType!="stroke"&&t.textColor==t.color&&(e.fillStyle="#fff");break;case"left":o=f.x-r,u=f.y+f.height/2,i="end",s="middle";break;case"right":o=f.x+f.width+r,u=f.y+f.height/2,i="start",s="middle";break;case"top":o=f.x+f.width/2,u=f.y-r,i="center",s="bottom";break;case"bottom":o=f.x+f.width/2,u=f.y+f.height+r,i="center",s="top"}}typeof o!="undefined"&&typeof u!="undefined"&&p(e,t.text,o,u,t.textFont,t.textAlign||i,t.textBaseline||s)}function p(e,t,r,i,s,o,u){s&&(e.font=s),e.textAlign=o,e.textBaseline=u;var a=d(t,r,i,s,o,u);t=(t+"").split("\n");var f=n.getTextHeight("国",s),r=r,i;u=="top"?i=a.y:u=="bottom"?i=a.y+f:i=a.y+f/2;for(var l=0,c=t.length;l<c;l++)e.fillText(t[l],r,i),i+=f}function d(e,t,r,i,s,o){var u=n.getTextWidth(e,i),a=n.getTextHeight("国",i);e=(e+"").split("\n");var f=t;s=="end"||s=="right"?f-=u:s=="center"&&(f-=u/2);var l;return o=="top"?l=r:o=="bottom"?l=r-a*e.length:l=r-a*e.length/2,{x:f,y:l,width:u,height:a*e.length}}function v(t,n,r){var i={};for(var s in t)i[s]=t[s];var o=e("../tool/color"),u=o.getHighlightColor();t.brushType!="stroke"?(i.strokeColor=u,i.lineWidth=(t.lineWidth||1)+this.getHighlightZoom(),i.brushType="both"):r!="stroke"?(i.strokeColor=u,i.lineWidth=(t.lineWidth||1)+this.getHighlightZoom()):i.strokeColor=n.strokeColor||o.mix(t.strokeColor,o.toRGB(u));for(var s in n)typeof n[s]!="undefined"&&(i[s]=n[s]);return i}function m(){return this.type!="text"?6:2}function g(e,t,n){e.position[0]+=t,e.position[1]+=n}function y(e,t,i){if(e.__needTransform&&e._transform){var s=[];r.invert(s,e._transform);var o=[t,i];r.mulVector(o,s,[t,i,1]),t==o[0]&&i==o[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),t=o[0],i=o[1]}var u;return e.style.__rect?u=e.style.__rect:(u=this.getRect(e.style),e.style.__rect=u),t>=u.x&&t<=u.x+u.width&&i>=u.y&&i<=u.y+u.height?n.isInside(this,e.style,t,i):!1}function b(e){var t=e._transform||r.create();r.identity(t);if(e.scale&&(e.scale[0]!==1||e.scale[1]!==1)){var n=e.scale[2]||0,i=e.scale[3]||0;(n||i)&&r.translate(t,t,[-n,-i]),r.scale(t,t,e.scale),(n||i)&&r.translate(t,t,[n,i])}if(e.rotation)if(e.rotation instanceof Array){if(e.rotation[0]!==0){var n=e.rotation[1]||0,i=e.rotation[2]||0;(n||i)&&r.translate(t,t,[-n,-i]),r.rotate(t,t,e.rotation[0]),(n||i)&&r.translate(t,t,[n,i])}}else e.rotation!==0&&r.rotate(t,t,e.rotation);return e.position&&(e.position[0]!==0||e.position[1]!==0)&&r.translate(t,t,e.position),e._transform=t,t}var t,n=e("../tool/area"),r=e("../tool/matrix"),i=e("../tool/vector");return t={derive:s,brush:o,setContext:u,dashedLineTo:a,smoothBezier:f,smoothSpline:l,drawText:h,getHighlightStyle:v,getHighlightZoom:m,drift:g,isCover:y,updateTransform:b},t}),r("zrender/shape/circle",["require","./base","../shape"],function(e){function t(){this.type="circle"}t.prototype={buildPath:function(e,t){e.arc(t.x,t.y,t.r,0,Math.PI*2,!0);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:e.r*2+t,height:e.r*2+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("circle",new t),t}),r("zrender/shape/ellipse",["require","./base","../shape"],function(e){function t(){this.type="ellipse"}t.prototype={buildPath:function(e,t){var n=.5522848,r=t.x,i=t.y,s=t.a,o=t.b,u=s*n,a=o*n;e.moveTo(r-s,i),e.bezierCurveTo(r-s,i-a,r-u,i-o,r,i-o),e.bezierCurveTo(r+u,i-o,r+s,i-a,r+s,i),e.bezierCurveTo(r+s,i+a,r+u,i+o,r,i+o),e.bezierCurveTo(r-u,i+o,r-s,i+a,r-s,i);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b-t/2),width:e.a*2+t,height:e.b*2+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("ellipse",new t),t}),r("zrender/shape/line",["require","./base","../shape"],function(e){function t(){this.type="line",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){if(!t.lineType||t.lineType=="solid")e.moveTo(t.xStart,t.yStart),e.lineTo(t.xEnd,t.yEnd);else if(t.lineType=="dashed"||t.lineType=="dotted"){var n=(t.lineWidth||1)*(t.lineType=="dashed"?5:1);this.dashedLineTo(e,t.xStart,t.yStart,t.xEnd,t.yEnd,n)}},getRect:function(e){var t=e.lineWidth||1;return{x:Math.min(e.xStart,e.xEnd)-t,y:Math.min(e.yStart,e.yEnd)-t,width:Math.abs(e.xStart-e.xEnd)+t,height:Math.abs(e.yStart-e.yEnd)+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("line",new t),t}),r("zrender/shape/polygon",["require","./base","../shape"],function(e){function t(){this.type="polygon"}t.prototype={brush:function(e,t,n){var r=t.style||{};n&&(r=this.getHighlightStyle(r,t.highlightStyle||{})),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),e.beginPath(),this.buildPath(e,r),e.closePath(),(r.brushType=="stroke"||r.brushType=="both")&&r.lineWidth>0&&e.stroke();if(r.brushType=="fill"||r.brushType=="both"||typeof r.brushType=="undefined"){if(r.lineType=="dashed"||r.lineType=="dotted")e.beginPath(),this.buildPath(e,{lineType:"solid",lineWidth:r.lineWidth,pointList:r.pointList}),e.closePath();e.fill()}r.text&&this.drawText(e,r,t.style),e.restore();return},buildPath:function(e,t){var n=t.pointList,r=n[0],i=n[n.length-1];r&&i&&r[0]==i[0]&&r[1]==i[1]&&n.pop();if(n.length<2)return;if(t.smooth&&t.smooth!=="spline"){var s=this.smoothBezier(n,t.smooth,!0);e.moveTo(n[0][0],n[0][1]);var o,u,a,f=n.length;for(var l=0;l<f;l++)o=s[l*2],u=s[l*2+1],a=n[(l+1)%f],e.bezierCurveTo(o[0],o[1],u[0],u[1],a[0],a[1])}else{t.smooth==="spline"&&(n=this.smoothSpline(n,!0));if(!t.lineType||t.lineType=="solid"){e.moveTo(n[0][0],n[0][1]);for(var l=1,c=n.length;l<c;l++)e.lineTo(n[l][0],n[l][1]);e.lineTo(n[0][0],n[0][1])}else if(t.lineType=="dashed"||t.lineType=="dotted"){var h=t._dashLength||(t.lineWidth||1)*(t.lineType=="dashed"?5:1);t._dashLength=h,e.moveTo(n[0][0],n[0][1]);for(var l=1,c=n.length;l<c;l++)this.dashedLineTo(e,n[l-1][0],n[l-1][1],n[l][0],n[l][1],h);this.dashedLineTo(e,n[n.length-1][0],n[n.length-1][1],n[0][0],n[0][1],h)}}return},getRect:function(e){var t=Number.MAX_VALUE,n=Number.MIN_VALUE,r=Number.MAX_VALUE,i=Number.MIN_VALUE,s=e.pointList;for(var o=0,u=s.length;o<u;o++)s[o][0]<t&&(t=s[o][0]),s[o][0]>n&&(n=s[o][0]),s[o][1]<r&&(r=s[o][1]),s[o][1]>i&&(i=s[o][1]);var a;return e.brushType=="stroke"||e.brushType=="fill"?a=e.lineWidth||1:a=0,{x:Math.round(t-a/2),y:Math.round(r-a/2),width:n-t+a,height:i-r+a}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("polygon",new t),t}),r("zrender/shape/brokenLine",["require","../shape","./base","../shape"],function(e){function t(){this.type="brokenLine",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){var n=t.pointList;if(n.length<2)return;if(t.smooth&&t.smooth!=="spline"){var r=this.smoothBezier(n,t.smooth,!1);e.moveTo(n[0][0],n[0][1]);var i,s,o;for(var u=0,a=n.length;u<a-1;u++)i=r[u*2],s=r[u*2+1],o=n[u+1],e.bezierCurveTo(i[0],i[1],s[0],s[1],o[0],o[1])}else{t.smooth==="spline"&&(n=this.smoothSpline(n,!1));if(!t.lineType||t.lineType=="solid"){e.moveTo(n[0][0],n[0][1]);for(var u=1,a=n.length;u<a;u++)e.lineTo(n[u][0],n[u][1])}else if(t.lineType=="dashed"||t.lineType=="dotted"){var f=(t.lineWidth||1)*(t.lineType=="dashed"?5:1);e.moveTo(n[0][0],n[0][1]);for(var u=1,a=n.length;u<a;u++)this.dashedLineTo(e,n[u-1][0],n[u-1][1],n[u][0],n[u][1],f)}}return},getRect:function(t){var n=e("../shape");return n.get("polygon").getRect(t)}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("brokenLine",new t),t}),r("zrender/shape/rectangle",["require","./base","../shape"],function(e){function t(){this.type="rectangle"}t.prototype={_buildRadiusPath:function(e,t){var n=t.x,r=t.y,i=t.width,s=t.height,o=t.radius,u,a,f,l;typeof o=="number"?u=a=f=l=o:o instanceof Array?o.length===1?u=a=f=l=o[0]:o.length===2?(u=f=o[0],a=l=o[1]):o.length===3?(u=o[0],a=l=o[1],f=o[2]):(u=o[0],a=o[1],f=o[2],l=o[3]):u=a=f=l=0,e.moveTo(n+u,r),e.lineTo(n+i-a,r),a!==0&&e.quadraticCurveTo(n+i,r,n+i,r+a),e.lineTo(n+i,r+s-f),f!==0&&e.quadraticCurveTo(n+i,r+s,n+i-f,r+s),e.lineTo(n+l,r+s),l!==0&&e.quadraticCurveTo(n,r+s,n,r+s-l),e.lineTo(n,r+u),u!==0&&e.quadraticCurveTo(n,r,n+u,r)},buildPath:function(e,t){t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y));return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-t/2),y:Math.round(e.y-t/2),width:e.width+t,height:e.height+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("rectangle",new t),t}),r("zrender/shape/ring",["require","./base","../shape"],function(e){function t(){this.type="ring"}t.prototype={buildPath:function(e,t){e.arc(t.x,t.y,t.r,0,Math.PI*2,!1),e.moveTo(t.x+t.r0,t.y),e.arc(t.x,t.y,t.r0,0,Math.PI*2,!0);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:e.r*2+t,height:e.r*2+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("ring",new t),t}),r("zrender/tool/math",[],function(){function t(t,n){return Math.sin(n?t*e:t)}function n(t,n){return Math.cos(n?t*e:t)}function r(t){return t*e}function i(t){return t/e}var e=Math.PI/180;return{sin:t,cos:n,degreeToRadian:r,radianToDegree:i}}),r("zrender/shape/sector",["require","../tool/math","../shape","./base","../shape"],function(e){function n(){this.type="sector"}var t=e("../tool/math");n.prototype={buildPath:function(e,n){var r=n.x,i=n.y,s=typeof n.r0=="undefined"?0:n.r0,o=n.r,u=n.startAngle,a=n.endAngle,f=Math.PI*2;u=t.degreeToRadian(u),a=t.degreeToRadian(a),e.moveTo(t.cos(u)*s+r,i-t.sin(u)*s),e.lineTo(t.cos(u)*o+r,i-t.sin(u)*o),e.arc(r,i,o,f-u,f-a,!0),e.lineTo(t.cos(a)*s+r,i-t.sin(a)*s),s!==0&&e.arc(r,i,s,f-a,f-u,!1);return},getRect:function(n){var r=n.x,i=n.y,s=typeof n.r0=="undefined"?0:n.r0,o=n.r,u=n.startAngle,a=n.endAngle;u=(720+u)%360,a=(720+a)%360,a<u&&(a+=360);var f=[];u<90&&a>90&&f.push([r,i-o]),u<180&&a>180&&f.push([r-o,i]),u<270&&a>270&&f.push([r,i+o]),u<360&&a>360&&f.push([r+o,i]),u=t.degreeToRadian(u),a=t.degreeToRadian(a),f.push([t.cos(u)*s+r,i-t.sin(u)*s]),f.push([t.cos(u)*o+r,i-t.sin(u)*o]),f.push([t.cos(a)*o+r,i-t.sin(a)*o]),f.push([t.cos(a)*s+r,i-t.sin(a)*s]);var l=e("../shape");return l.get("polygon").getRect({brushType:n.brushType,lineWidth:n.lineWidth,pointList:f})}};var r=e("./base");r.derive(n);var i=e("../shape");return i.define("sector",new n),n}),r("zrender/shape/text",["require","../tool/area","./base","../shape"],function(e){function n(){this.type="text"}var t=e("../tool/area");n.prototype={brush:function(e,n,r){var i=n.style||{};r&&(i=this.getHighlightStyle(i,n.highlightStyle||{}));if(typeof i.text=="undefined")return;e.save(),this.setContext(e,i),n.__needTransform&&e.transform.apply(e,this.updateTransform(n)),i.textFont&&(e.font=i.textFont),e.textAlign=i.textAlign||"start",e.textBaseline=i.textBaseline||"middle";var s=(i.text+"").split("\n"),o=t.getTextHeight("国",i.textFont),u=this.getRect(i),a=i.x,f;i.textBaseline=="top"?f=u.y:i.textBaseline=="bottom"?f=u.y+o:f=u.y+o/2;for(var l=0,c=s.length;l<c;l++){if(i.maxWidth)switch(i.brushType){case"fill":e.fillText(s[l],a,f,i.maxWidth);break;case"stroke":e.strokeText(s[l],a,f,i.maxWidth);break;case"both":e.strokeText(s[l],a,f,i.maxWidth),e.fillText(s[l],a,f,i.maxWidth);break;default:e.fillText(s[l],a,f,i.maxWidth)}else switch(i.brushType){case"fill":e.fillText(s[l],a,f);break;case"stroke":e.strokeText(s[l],a,f);break;case"both":e.strokeText(s[l],a,f),e.fillText(s[l],a,f);break;default:e.fillText(s[l],a,f)}f+=o}e.restore();return},getRect:function(e){var n=t.getTextWidth(e.text,e.textFont),r=t.getTextHeight("国",e.textFont),i=(e.text+"").split("\n"),s=e.x;e.textAlign=="end"||e.textAlign=="right"?s-=n:e.textAlign=="center"&&(s-=n/2);var o;return e.textBaseline=="top"?o=e.y:e.textBaseline=="bottom"?o=e.y-r*i.length:o=e.y-r*i.length/2,{x:s,y:o,width:n,height:r*i.length}}};var r=e("./base");r.derive(n);var i=e("../shape");return i.define("text",new n),n}),r("zrender/shape/heart",["require","./base","../shape"],function(e){function t(){this.type="heart"}t.prototype={buildPath:function(e,t){e.moveTo(t.x,t.y),e.bezierCurveTo(t.x+t.a/2,t.y-t.b*2/3,t.x+t.a*2,t.y+t.b/3,t.x,t.y+t.b),e.bezierCurveTo(t.x-t.a*2,t.y+t.b/3,t.x-t.a/2,t.y-t.b*2/3,t.x,t.y);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b/4-t/2),width:e.a*2+t,height:e.b*5/4+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("heart",new t),t}),r("zrender/shape/droplet",["require","./base","../shape"],function(e){function t(){this.type="droplet"}t.prototype={buildPath:function(e,t){e.moveTo(t.x,t.y+t.a),e.bezierCurveTo(t.x+t.a,t.y+t.a,t.x+t.a*3/2,t.y-t.a/3,t.x,t.y-t.b),e.bezierCurveTo(t.x-t.a*3/2,t.y-t.a/3,t.x-t.a,t.y+t.a,t.x,t.y+t.a);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.a-t/2),y:Math.round(e.y-e.b-t/2),width:e.a*2+t,height:e.a+e.b+t}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("droplet",new t),t}),r("zrender/shape/path",["require","./base","../shape"],function(e){function t(){this.type="path"}t.prototype={_parsePathData:function(e){if(!e)return[];var t=e,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];t=t.replace(/-/g," -"),t=t.replace(/ /g," "),t=t.replace(/ /g,","),t=t.replace(/,,/g,",");var r;for(r=0;r<n.length;r++)t=t.replace(new RegExp(n[r],"g"),"|"+n[r]);var i=t.split("|"),s=[],o=0,u=0;for(r=1;r<i.length;r++){var a=i[r],f=a.charAt(0);a=a.slice(1),a=a.replace(new RegExp("e,-","g"),"e-");var l=a.split(",");l.length>0&&l[0]===""&&l.shift();for(var c=0;c<l.length;c++)l[c]=parseFloat(l[c]);while(l.length>0){if(isNaN(l[0]))break;var h=null,p=[],d,v,m,g,y,b,w,E,S=o,x=u;switch(f){case"l":o+=l.shift(),u+=l.shift(),h="L",p.push(o,u);break;case"L":o=l.shift(),u=l.shift(),p.push(o,u);break;case"m":o+=l.shift(),u+=l.shift(),h="M",p.push(o,u),f="l";break;case"M":o=l.shift(),u=l.shift(),h="M",p.push(o,u),f="L";break;case"h":o+=l.shift(),h="L",p.push(o,u);break;case"H":o=l.shift(),h="L",p.push(o,u);break;case"v":u+=l.shift(),h="L",p.push(o,u);break;case"V":u=l.shift(),h="L",p.push(o,u);break;case"C":p.push(l.shift(),l.shift(),l.shift(),l.shift()),o=l.shift(),u=l.shift(),p.push(o,u);break;case"c":p.push(o+l.shift(),u+l.shift(),o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="C",p.push(o,u);break;case"S":d=o,v=u,m=s[s.length-1],m.command==="C"&&(d=o+(o-m.points[2]),v=u+(u-m.points[3])),p.push(d,v,l.shift(),l.shift()),o=l.shift(),u=l.shift(),h="C",p.push(o,u);break;case"s":d=o,v=u,m=s[s.length-1],m.command==="C"&&(d=o+(o-m.points[2]),v=u+(u-m.points[3])),p.push(d,v,o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="C",p.push(o,u);break;case"Q":p.push(l.shift(),l.shift()),o=l.shift(),u=l.shift(),p.push(o,u);break;case"q":p.push(o+l.shift(),u+l.shift()),o+=l.shift(),u+=l.shift(),h="Q",p.push(o,u);break;case"T":d=o,v=u,m=s[s.length-1],m.command==="Q"&&(d=o+(o-m.points[0]),v=u+(u-m.points[1])),o=l.shift(),u=l.shift(),h="Q",p.push(d,v,o,u);break;case"t":d=o,v=u,m=s[s.length-1],m.command==="Q"&&(d=o+(o-m.points[0]),v=u+(u-m.points[1])),o+=l.shift(),u+=l.shift(),h="Q",p.push(d,v,o,u);break;case"A":g=l.shift(),y=l.shift(),b=l.shift(),w=l.shift(),E=l.shift(),S=o,x=u,o=l.shift(),u=l.shift(),h="A",p=this._convertPoint(S,x,o,u,w,E,g,y,b);break;case"a":g=l.shift(),y=l.shift(),b=l.shift(),w=l.shift(),E=l.shift(),S=o,x=u,o+=l.shift(),u+=l.shift(),h="A",p=this._convertPoint(S,x,o,u,w,E,g,y,b)}s.push({command:h||f,points:p})}(f==="z"||f==="Z")&&s.push({command:"z",points:[]})}return s},_convertPoint:function(e,t,n,r,i,s,o,u,a){var f=a*(Math.PI/180),l=Math.cos(f)*(e-n)/2+Math.sin(f)*(t-r)/2,c=-1*Math.sin(f)*(e-n)/2+Math.cos(f)*(t-r)/2,h=l*l/(o*o)+c*c/(u*u);h>1&&(o*=Math.sqrt(h),u*=Math.sqrt(h));var p=Math.sqrt((o*o*u*u-o*o*c*c-u*u*l*l)/(o*o*c*c+u*u*l*l));i===s&&(p*=-1),isNaN(p)&&(p=0);var d=p*o*c/u,v=p*-u*l/o,m=(e+n)/2+Math.cos(f)*d-Math.sin(f)*v,g=(t+r)/2+Math.sin(f)*d+Math.cos(f)*v,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},w=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(b(e,t))},E=w([1,0],[(l-d)/o,(c-v)/u]),S=[(l-d)/o,(c-v)/u],x=[(-1*l-d)/o,(-1*c-v)/u],T=w(S,x);return b(S,x)<=-1&&(T=Math.PI),b(S,x)>=1&&(T=0),s===0&&T>0&&(T-=2*Math.PI),s===1&&T<0&&(T+=2*Math.PI),[m,g,o,u,E,T,f,s]},buildPath:function(e,t){var n=t.path,r=this._parsePathData(n),i=t.x||0,s=t.y||0,o,u=t.pointList=[],a=[];for(var f=0,l=r.length;f<l;f++){r[f].command.toUpperCase()=="M"&&(a.length>0&&u.push(a),a=[]),o=r[f].points;for(var c=0,h=o.length;c<h;c+=2)a.push([o[c]+i,o[c+1]+s])}a.length>0&&u.push(a);var p;for(var f=0,l=r.length;f<l;f++){p=r[f].command,o=r[f].points;for(var c=0,h=o.length;c<h;c++)c%2===0?o[c]+=i:o[c]+=s;switch(p){case"L":e.lineTo(o[0],o[1]);break;case"M":e.moveTo(o[0],o[1]);break;case"C":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":e.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var d=o[0],v=o[1],m=o[2],g=o[3],y=o[4],b=o[5],w=o[6],E=o[7],S=m>g?m:g,x=m>g?1:m/g,T=m>g?g/m:1;e.translate(d,v),e.rotate(w),e.scale(x,T),e.arc(0,0,S,y,y+b,1-E),e.scale(1/x,1/T),e.rotate(-w),e.translate(-d,-v);break;case"z":e.closePath()}}return},getRect:function(e){var t;e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0;var n=Number.MAX_VALUE,r=Number.MIN_VALUE,i=Number.MAX_VALUE,s=Number.MIN_VALUE,o=e.x||0,u=e.y||0,a=this._parsePathData(e.path);for(var f=0;f<a.length;f++){var l=a[f].points;for(var c=0;c<l.length;c++)c%2===0?(l[c]+o<n&&(n=l[c]+o),l[c]+o>r&&(r=l[c]+o)):(l[c]+u<i&&(i=l[c]+u),l[c]+u>s&&(s=l[c]+u))}var h;return n===Number.MAX_VALUE||r===Number.MIN_VALUE||i===Number.MAX_VALUE||s===Number.MIN_VALUE?h={x:0,y:0,width:0,height:0}:h={x:Math.round(n-t/2),y:Math.round(i-t/2),width:r-n+t,height:s-i+t},h}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("path",new t),t}),r("zrender/shape/image",["require","./base","../shape"],function(e){function i(){this.type="image"}var t={},n=[],r;i.prototype={brush:function(e,i,s,o){var u=i.style||{};s&&(u=this.getHighlightStyle(u,i.highlightStyle||{}));var a=u.image;if(typeof a=="string"){var f=a;t[f]?a=t[f]:(a=new Image,a.onload=function(){a.onload=null,clearTimeout(r),n.push(i),r=setTimeout(function(){o(n),n=[]},10)},t[f]=a,a.src=f)}if(a){if(window.ActiveXObject){if(a.readyState!="complete")return}else if(!a.complete)return;e.save(),this.setContext(e,u),i.__needTransform&&e.transform.apply(e,this.updateTransform(i));var l=u.width||a.width,c=u.height||a.height,h=u.x,p=u.y;if(u.sWidth&&u.sHeight){var d=u.sx||0,v=u.sy||0;e.drawImage(a,d,v,u.sWidth,u.sHeight,h,p,l,c)}else if(u.sx&&u.sy){var d=u.sx,v=u.sy,m=l-d,g=c-v;e.drawImage(a,d,v,m,g,h,p,l,c)}else e.drawImage(a,h,p,l,c);u.width=l,u.height=c,i.style.width=l,i.style.height=c,u.text&&this.drawText(e,u,i.style),e.restore()}return},buildPath:function(e,t){e.rect(t.x,t.y,t.width,t.height);return},getRect:function(e){return{x:e.x,y:e.y,width:e.width,height:e.height}}};var s=e("./base");s.derive(i);var o=e("../shape");return o.define("image",new i),i}),r("zrender/shape/beziercurve",["require","./base","../shape"],function(e){function t(){this.type="beziercurve",this.brushTypeOnly="stroke",this.textPosition="end"}t.prototype={buildPath:function(e,t){e.moveTo(t.xStart,t.yStart),typeof t.cpX2!="undefined"&&typeof t.cpY2!="undefined"?e.bezierCurveTo(t.cpX1,t.cpY1,t.cpX2,t.cpY2,t.xEnd,t.yEnd):e.quadraticCurveTo(t.cpX1,t.cpY1,t.xEnd,t.yEnd)},getRect:function(e){var t=Math.min(e.xStart,e.xEnd,e.cpX1),n=Math.min(e.yStart,e.yEnd,e.cpY1),r=Math.max(e.xStart,e.xEnd,e.cpX1),i=Math.max(e.yStart,e.yEnd,e.cpY1),s=e.cpX2,o=e.cpY2;typeof s!="undefined"&&typeof o!="undefined"&&(t=Math.min(t,s),n=Math.min(n,o),r=Math.max(r,s),i=Math.max(i,o));var u=e.lineWidth||1;return{x:t-u,y:n-u,width:r-t+u,height:i-n+u}}};var n=e("./base");n.derive(t);var r=e("../shape");return r.define("beziercurve",new t),t}),r("zrender/shape/star",["require","../tool/math","./base","../shape"],function(e){function s(){this.type="heart"}var t=e("../tool/math"),n=t.sin,r=t.cos,i=Math.PI;s.prototype={buildPath:function(e,t){var s=t.n;if(!s||s<2)return;var o=t.x,u=t.y,a=t.r,f=t.r0;f==null&&(f=s>4?a*r(2*i/s)/r(i/s):a/3);var l=i/s,c=-i/2,h=o+a*r(c),p=u+a*n(c);c+=l;var d=t.pointList=[];d.push([h,p]);for(var v=0,m=s*2-1,g;v<m;v++)g=v%2===0?f:a,d.push([o+g*r(c),u+g*n(c)]),c+=l;d.push([h,p]),e.moveTo(d[0][0],d[0][1]);for(var v=0;v<d.length;v++)e.lineTo(d[v][0],d[v][1]);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:e.r*2+t,height:e.r*2+t}}};var o=e("./base");o.derive(s);var u=e("../shape");return u.define("star",new s),s}),r("zrender/shape/isogon",["require","../tool/math","./base","../shape"],function(e){function s(){this.type="isogon"}var t=e("../tool/math"),n=t.sin,r=t.cos,i=Math.PI;s.prototype={buildPath:function(e,t){var s=t.n;if(!s||s<2)return;var o=t.x,u=t.y,a=t.r,f=2*i/s,l=-i/2,c=o+a*r(l),h=u+a*n(l);l+=f;var p=t.pointList=[];p.push([c,h]);for(var d=0,v=s-1;d<v;d++)p.push([o+a*r(l),u+a*n(l)]),l+=f;p.push([c,h]),e.moveTo(p[0][0],p[0][1]);for(var d=0;d<p.length;d++)e.lineTo(p[d][0],p[d][1]);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.r-t/2),y:Math.round(e.y-e.r-t/2),width:e.r*2+t,height:e.r*2+t}}};var o=e("./base");o.derive(s);var u=e("../shape");return u.define("isogon",new s),s}),r("zrender/animation/easing",[],function(){var e={Linear:function(e){return e},QuadraticIn:function(e){return e*e},QuadraticOut:function(e){return e*(2-e)},QuadraticInOut:function(e){return(e*=2)<1?.5*e*e:-0.5*(--e*(e-2)-1)},CubicIn:function(e){return e*e*e},CubicOut:function(e){return--e*e*e+1},CubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},QuarticIn:function(e){return e*e*e*e},QuarticOut:function(e){return 1- --e*e*e*e},QuarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-0.5*((e-=2)*e*e*e-2)},QuinticIn:function(e){return e*e*e*e*e},QuinticOut:function(e){return--e*e*e*e*e+1},QuinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},SinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},SinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},SinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},ExponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},ExponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},ExponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},CircularIn:function(e){return 1-Math.sqrt(1-e*e)},CircularOut:function(e){return Math.sqrt(1- --e*e)},CircularInOut:function(e){return(e*=2)<1?-0.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},ElasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/r)))},ElasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*2*Math.PI/r)+1)},ElasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-0.5*n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*2*Math.PI/r):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*2*Math.PI/r)*.5+1)},BackIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},BackOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},BackInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*e*e*((t+1)*e-t):.5*((e-=2)*e*((t+1)*e+t)+2)},BounceIn:function(t){return 1-e.BounceOut(1-t)},BounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},BounceInOut:function(t){return t<.5?e.BounceIn(t*2)*.5:e.BounceOut(t*2-1)*.5+.5}};return e}),r("zrender/animation/clip",["require","./easing"],function(e){var t=e("./easing"),n=function(e){this._targetPool=e.target||{},this._targetPool.constructor!=Array&&(this._targetPool=[this._targetPool]),this._life=e.life||1e3,this._delay=e.delay||0,this._startTime=(new Date).getTime()+this._delay,this._endTime=this._startTime+this._life*1e3,this.loop=typeof e.loop=="undefined"?!1:e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe||null,this.ondestroy=e.ondestroy||null,this.onrestart=e.onrestart||null};return n.prototype={step:function(e){var n=(e-this._startTime)/this._life;if(n<0)return;n=Math.min(n,1);var r=typeof this.easing=="string"?t[this.easing]:this.easing,i;return typeof r=="function"?i=r(n):i=n,this.fire("frame",i),n==1?this.loop?(this.restart(),"restart"):(this._needsRemove=!0,"destroy"):null},restart:function(){this._startTime=(new Date).getTime()+this.gap},fire:function(e,t){for(var n=0,r=this._targetPool.length;n<r;n++)this["on"+e]&&this["on"+e](this._targetPool[n],t)}},n.prototype.constructor=n,n}),r("zrender/animation/animation",["require","./clip"],function(e){function s(e,t){return e[t]}function o(e,t,n){e[t]=n}function u(e,t,n){return(t-e)*n+e}function a(e,t,n,r,i){var s=e.length;if(i==1)for(var o=0;o<s;o++)r[o]=u(e[o],t[o],n);else{var a=e[0].length;for(var o=0;o<s;o++)for(var f=0;f<a;f++)r[o][f]=u(e[o][f],t[o][f],n)}}function f(e){return e===undefined?!1:typeof e=="string"?!1:e.length!==undefined}function l(e,t,n,r,i,s,o,u,a){var f=e.length;if(a==1)for(var l=0;l<f;l++)u[l]=c(e[l],t[l],n[l],r[l],i,s,o);else{var h=e[0].length;for(var l=0;l<f;l++)for(var p=0;p<h;p++)u[l][p]=c(e[l][p],t[l][p],n[l][p],r[l][p],i,s,o)}}function c(e,t,n,r,i,s,o){var u=(n-e)*.5,a=(r-t)*.5;return(2*(t-n)+u+a)*o+(-3*(t-n)-2*u-a)*s+u*i+t}function h(e,t,n,r){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||s,this._setter=r||o,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}var t=e("./clip"),n=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},r=Array.prototype.slice,i=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time=0};return i.prototype={add:function(e){this._clips.push(e)},remove:function(e){var t=this._clips.indexOf(e);t>=0&&this._clips.splice(t,1)},update:function(){var e=(new Date).getTime(),t=this._clips,n=t.length,r=[],i=[];for(var s=0;s<n;s++){var o=t[s],u=o.step(e);u&&(r.push(u),i.push(o))}this.stage&&this.stage.update&&this._clips.length&&this.stage.update();for(var s=0;s<n;)t[s]._needsRemove?(t[s]=t[n-1],t.pop(),n--):s++;n=r.length;for(var s=0;s<n;s++)i[s].fire(r[s]);this._time=e,this.onframe()},start:function(){function t(){e._running&&(e.update(),n(t))}var e=this;this._running=!0,n(t)},stop:function(){this._running=!1},clear:function(){this._clips=[]},animate:function(e,t){t=t||{};var n=new h(e,t.loop,t.getter,t.setter);return n.animation=this,n}},i.prototype.constructor=i,h.prototype={when:function(e,t){for(var n in t)this._tracks[n]||(this._tracks[n]=[],this._tracks[n].push({time:0,value:this._getter(this._target,n)})),this._tracks[n].push({time:parseInt(e,10),value:t[n]});return this},during:function(e){return this._onframeList.push(e),this},start:function(e){var n=this,i=this._setter,s=this._getter,o=n._onframeList.length,h=e==="spline",p=function(){n._clipCount--;if(n._clipCount===0){n._tracks={};var e=n._doneList.length;for(var t=0;t<e;t++)n._doneList[t].call(n)}},d=function(d,v){var m=d.length;if(!m)return;var g=d[0].value,y=f(g),b=y&&f(g[0])?2:1;d.sort(function(e,t){return e.time-t.time});var w;if(!m)return;w=d[m-1].time;var E=[],S=[];for(var x=0;x<m;x++){E.push(d[x].time/w);if(y)if(b==2){S[x]=[];for(var T=0;T<g.length;T++)S[x].push(r.call(d[x].value[T]))}else S.push(r.call(d[x].value));else S.push(d[x].value)}var N=0,C=0,k,x,L,A,O,M,_,D=function(e,t){if(t<C){k=Math.min(N+1,m-1);for(x=k;x>=0;x--)if(E[x]<=t)break;x=Math.min(x,m-2)}else{for(x=N;x<m;x++)if(E[x]>t)break;x=Math.min(x-1,m-2)}N=x,C=t;var r=E[x+1]-E[x];if(r===0)return;L=(t-E[x])/r,L<0&&console.log(L),h?(O=S[x],A=S[x===0?x:x-1],M=S[x>m-2?m-1:x+1],_=S[x>m-3?m-1:x+2],y?l(A,O,M,_,L,L*L,L*L*L,s(e,v),b):i(e,v,c(A,O,M,_,L,L*L,L*L*L))):y?a(S[x],S[x+1],L,s(e,v),b):i(e,v,u(S[x],S[x+1],L));for(x=0;x<o;x++)n._onframeList[x](e,t)},P=new t({target:n._target,life:w,loop:n._loop,delay:n._delay,onframe:D,ondestroy:p});e&&e!=="spline"&&(P.easing=e),n._clipList.push(P),n._clipCount++,n.animation.add(P)};for(var v in this._tracks)d(this._tracks[v],v);return this},stop:function(){for(var e=0;e<this._clipList.length;e++){var t=this._clipList[e];this.animation.remove(t)}this._clipList=[]},delay:function(e){return this._delay=e,this},done:function(e){return this._doneList.push(e),this}},i}),r("zrender/config",{loadingEffect:"spin",EVENT:{RESIZE:"resize",CLICK:"click",MOUSEWHEEL:"mousewheel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",GLOBALOUT:"globalout",DRAGSTART:"dragstart",DRAGEND:"dragend",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",touchClickDelay:300}}),r("zrender/tool/loadingEffect",["require","./util","./color","./color","./color","./color","./color","./math"],function(e){function u(e,t){n[e]=t}function a(e){return{shape:"text",highlightStyle:t.merge({x:s/2,y:o/2,text:r,textAlign:"center",textBaseline:"middle",textFont:i,color:"#333",brushType:"fill"},e,{overwrite:!0,recursive:!0})}}function f(e){return{shape:"rectangle",highlightStyle:{x:0,y:0,width:s,height:o,brushType:"fill",color:e}}}function l(e,t){return e<=t[0]?e=t[0]:e>=t[1]&&(e=t[1]),e}function c(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:0,y:o/2-30,width:s,height:5,brushType:"fill",timeInterval:100}},{overwrite:!1,recursive:!0});var c=a(n.textStyle),h=f(n.backgroundColor),p=n.effectOption,d={shape:"rectangle",highlightStyle:t.clone(p)};d.highlightStyle.color=p.color||u.getLinearGradient(p.x,p.y,p.x+p.width,p.y+p.height,[[0,"#ff6400"],[.5,"#ffe100"],[1,"#b1ff00"]]);if(typeof n.progress!="undefined"){r(h),d.highlightStyle.width=l(n.progress,[0,1])*n.effectOption.width,r(d),r(c),i();return}return d.highlightStyle.width=0,setInterval(function(){r(h),d.highlightStyle.width<n.effectOption.width?d.highlightStyle.width+=8:d.highlightStyle.width=0,r(d),r(c),i()},p.timeInterval)}function h(e,n,r){e.effectOption=t.merge(e.effectOption||{},{x:s/2-80,y:o/2,r:18,colorIn:"#fff",colorOut:"#555",colorWhirl:"#6cf",timeInterval:50});var i=e.effectOption;e=t.merge(e,{textStyle:{color:"#888",x:i.x+i.r+10,y:i.y,textAlign:"start"},backgroundColor:"rgba(250, 250, 250, 0.8)"},{overwrite:!1,recursive:!0});var u=a(e.textStyle),l=f(e.backgroundColor),c={shape:"droplet",highlightStyle:{a:Math.round(i.r/2),b:Math.round(i.r-i.r/6),brushType:"fill",color:i.colorWhirl}},h={shape:"circle",highlightStyle:{r:Math.round(i.r/6),brushType:"fill",color:i.colorIn}},p={shape:"ring",highlightStyle:{r0:Math.round(i.r-i.r/3),r:i.r,brushType:"fill",color:i.colorOut}},d=[0,i.x,i.y];return c.highlightStyle.x=h.highlightStyle.x=p.highlightStyle.x=d[1],c.highlightStyle.y=h.highlightStyle.y=p.highlightStyle.y=d[2],setInterval(function(){n(l),n(p),d[0]-=.3,c.rotation=d,n(c),n(h),n(u),r()},i.timeInterval)}function p(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#fff"},backgroundColor:"rgba(0, 0, 0, 0.8)",effectOption:{n:30,lineWidth:1,color:"random",timeInterval:100}},{overwrite:!1,recursive:!0});var l=a(n.textStyle),c=f(n.backgroundColor),h=n.effectOption,p=h.n,d=h.lineWidth,v=[],m,g,y,b;for(var w=0;w<p;w++)y=-Math.ceil(Math.random()*1e3),g=Math.ceil(Math.random()*400),m=Math.ceil(Math.random()*o),h.color=="random"?b=u.random():b=h.color,v[w]={shape:"line",highlightStyle:{xStart:y,yStart:m,xEnd:y+g,yEnd:m,strokeColor:b,lineWidth:d},animationX:Math.ceil(Math.random()*100),len:g};return setInterval(function(){r(c);var e;for(var t=0;t<p;t++)e=v[t].highlightStyle,e.xStart>=s&&(v[t].len=Math.ceil(Math.random()*400),v[t].highlightStyle.xStart=-400,v[t].highlightStyle.xEnd=-400+v[t].len,v[t].highlightStyle.yStart=Math.ceil(Math.random()*o),v[t].highlightStyle.yEnd=v[t].highlightStyle.yStart),v[t].highlightStyle.xStart+=v[t].animationX,v[t].highlightStyle.xEnd+=v[t].animationX,r(v[t]);r(l),i()},h.timeInterval)}function d(n,r,i){var u=e("./color");n=t.merge(n,{textStyle:{color:"#888"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{n:50,lineWidth:2,brushType:"stroke",color:"random",timeInterval:100}},{overwrite:!1,recursive:!0});var l=a(n.textStyle),c=f(n.backgroundColor),h=n.effectOption,p=h.n,d=h.brushType,v=h.lineWidth,m=[],g;for(var y=0;y<p;y++)h.color=="random"?g=u.alpha(u.random(),.3):g=h.color,m[y]={shape:"circle",highlightStyle:{x:Math.ceil(Math.random()*s),y:Math.ceil(Math.random()*o),r:Math.ceil(Math.random()*40),brushType:d,color:g,strokeColor:g,lineWidth:v},animationY:Math.ceil(Math.random()*20)};return setInterval(function(){r(c);var e;for(var t=0;t<p;t++)e=m[t].highlightStyle,e.y-m[t].animationY+e.r<=0&&(m[t].highlightStyle.y=o+e.r,m[t].highlightStyle.x=Math.ceil(Math.random()*s)),m[t].highlightStyle.y-=m[t].animationY,r(m[t]);r(l),i()},h.timeInterval)}function v(n,r,i){var u=e("./color");n.effectOption=t.merge(n.effectOption||{},{x:s/2-80,y:o/2,r0:9,r:15,n:18,color:"#fff",timeInterval:100});var l=n.effectOption;n=t.merge(n,{textStyle:{color:"#fff",x:l.x+l.r+10,y:l.y,textAlign:"start"},backgroundColor:"rgba(0, 0, 0, 0.8)"},{overwrite:!1,recursive:!0});var c=a(n.textStyle),h=f(n.backgroundColor),p=l.n,d=l.x,v=l.y,m=l.r0,g=l.r,y=l.color,b=[],w=Math.round(180/p);for(var E=0;E<p;E++)b[E]={shape:"sector",highlightStyle:{x:d,y:v,r0:m,r:g,startAngle:w*E*2,endAngle:w*E*2+w,color:u.alpha(y,(E+1)/p),brushType:"fill"}};var S=[0,d,v];return setInterval(function(){r(h),S[0]-=.3;for(var e=0;e<p;e++)b[e].rotation=S,r(b[e]);r(c),i()},l.timeInterval)}function m(n,r,i){var u=e("./color"),c=e("./math");n=t.merge(n,{textStyle:{color:"#07a"},backgroundColor:"rgba(250, 250, 250, 0.8)",effectOption:{x:s/2,y:o/2,r0:60,r:100,color:"#bbdcff",brushType:"fill",textPosition:"inside",textFont:"normal 30px verdana",textColor:"rgba(30, 144, 255, 0.6)",timeInterval:100}},{overwrite:!1,recursive:!0});var h=n.effectOption,p=n.textStyle;p.x=typeof p.x!="undefined"?p.x:h.x,p.y=typeof p.y!="undefined"?p.y:h.y+(h.r0+h.r)/2-5;var d=a(n.textStyle),v=f(n.backgroundColor),m=h.x,g=h.y,y=h.r0+6,b=h.r-6,w=h.color,E=u.lift(w,.1),S={shape:"ring",highlightStyle:t.clone(h)},x=[],T=u.getGradientColors(["#ff6400","#ffe100","#97ff00"],25),N=15,C=240;for(var k=0;k<16;k++)x.push({shape:"sector",highlightStyle:{x:m,y:g,r0:y,r:b,startAngle:C-N,endAngle:C,brushType:"fill",color:E},_color:u.getLinearGradient(m+y*c.cos(C,!0),g-y*c.sin(C,!0),m+y*c.cos(C-N,!0),g-y*c.sin(C-N,!0),[[0,T[k*2]],[1,T[k*2+1]]])}),C-=N;C=360;for(var k=0;k<4;k++)x.push({shape:"sector",highlightStyle:{x:m,y:g,r0:y,r:b,startAngle:C-N,endAngle:C,brushType:"fill",color:E},_color:u.getLinearGradient(m+y*c.cos(C,!0),g-y*c.sin(C,!0),m+y*c.cos(C-N,!0),g-y*c.sin(C-N,!0),[[0,T[k*2+32]],[1,T[k*2+33]]])}),C-=N;var L=0;if(typeof n.progress!="undefined"){r(v),L=l(n.progress,[0,1]).toFixed(2)*100/5,S.highlightStyle.text=L*5+"%",r(S);for(var k=0;k<20;k++)x[k].highlightStyle.color=k<L?x[k]._color:E,r(x[k]);r(d),i();return}return setInterval(function(){r(v),L+=L>=20?-20:1,r(S);for(var e=0;e<20;e++)x[e].highlightStyle.color=e<L?x[e]._color:E,r(x[e]);r(d),i()},h.timeInterval)}function g(e,t,r){var i=n.ring;return typeof e.effect=="function"?i=e.effect:typeof n[e.effect]=="function"&&(i=n[e.effect]),s=e.canvasSize.width,o=e.canvasSize.height,i(e,t,r)}function y(e){clearInterval(e)}var t=e("./util"),n,r="Loading...",i="normal 16px Arial",s,o;return n={getBackgroundShape:f,getTextShape:a,define:u,bar:c,whirling:h,dynamicLine:p,bubble:d,spin:v,ring:m,start:g,stop:y},n}),r("zrender/tool/event",[],function(){function e(e){return typeof e.zrenderX!="undefined"&&e.zrenderX||typeof e.offsetX!="undefined"&&e.offsetX||typeof e.layerX!="undefined"&&e.layerX||typeof e.clientX!="undefined"&&e.clientX}function t(e){return typeof e.zrenderY!="undefined"&&e.zrenderY||typeof e.offsetY!="undefined"&&e.offsetY||typeof e.layerY!="undefined"&&e.layerY||typeof e.clientY!="undefined"&&e.clientY}function n(e){return typeof e.wheelDelta!="undefined"&&e.wheelDelta||typeof e.detail!="undefined"&&-e.detail}function r(e){e.preventDefault?(e.preventDefault(),e.stopPropagation()):(e.returnValue=!1,e.cancelBubble=!0)}function i(){function n(n,r){return!r||!n?e:(t[n]||(t[n]=[]),t[n].push({h:r,one:!0}),e)}function r(n,r){return!r||!n?e:(t[n]||(t[n]=[]),t[n].push({h:r,one:!1}),e)}function i(n,r){if(!n)return t={},e;if(r){if(t[n]){var i=[];for(var s=0,o=t[n].length;s<o;s++)t[n][s]["h"]!=r&&i.push(t[n][s]);t[n]=i}t[n]&&t[n].length===0&&delete t[n]}else delete t[n];return e}function s(n,r,i){if(t[n]){var s=[],o=i||{};o.type=n,o.event=r;for(var u=0,a=t[n].length;u<a;u++)t[n][u].h(o),t[n][u].one||s.push(t[n][u]);s.length!=t[n].length&&(t[n]=s)}return e}var e=this,t={};e.one=n,e.bind=r,e.unbind=i,e.dispatch=s}return{getX:e,getY:t,getDelta:n,stop:r,Dispatcher:i}}),r("zrender/zrender",["require","./lib/excanvas","./tool/env","./shape","./shape/circle","./shape/ellipse","./shape/line","./shape/polygon","./shape/brokenLine","./shape/rectangle","./shape/ring","./shape/sector","./shape/text","./shape/heart","./shape/droplet","./shape/path","./shape/image","./shape/beziercurve","./shape/star","./shape/isogon","./animation/animation","./tool/util","./tool/util","./config","./tool/loadingEffect","./tool/loadingEffect","./config","./tool/env","./tool/event"],function(e){function s(t,r,i){var s=this;s.env=e("./tool/env");var f=e("./shape");e("./shape/circle"),e("./shape/ellipse"),e("./shape/line"),e("./shape/polygon"),e("./shape/brokenLine"),e("./shape/rectangle"),e("./shape/ring"),e("./shape/sector"),e("./shape/text"),e("./shape/heart"),e("./shape/droplet"),e("./shape/path"),e("./shape/image"),e("./shape/beziercurve"),e("./shape/star"),e("./shape/isogon");var l;if(typeof i.shape=="undefined")l=f;else{l={};for(var c in i.shape)l[c]=i.shape[c];l.get=function(e){return l[e]||f.get(e)}}var h=new o(l),p=new u(r,h,l),d=new a(r,h,p,l),v=e("./animation/animation"),m=[],g=new v({stage:{update:function(){s.update(m)}}});g.start(),s.getId=function(){return t},s.addShape=function(e){return h.add(e),s},s.delShape=function(e){return h.del(e),s},s.modShape=function(e,t,n){return h.mod(e,t,n),s},s.addHoverShape=function(e){return h.addHover(e),s},s.render=function(e){return p.render(e),s},s.refresh=function(e){return p.refresh(e),s},s.refreshHover=function(e){return p.refreshHover(e),s},s.update=function(e,t){return p.update(e,t),s},s.resize=function(){return p.resize(),s},s.animate=function(t,r,i){var s=e("./tool/util"),o=h.get(t);if(o){var u;if(r){var a=r.split("."),f=o;for(var l=0,c=a.length;l<c;l++){if(!f)continue;f=f[a[l]]}f&&(u=f)}else u=o;if(!u){n.log('Property "'+r+'" is not existed in shape '+t);return}return typeof o.__aniCount=="undefined"&&(o.__aniCount=0),o.__aniCount===0&&m.push(o),o.__aniCount++,g.animate(u,{loop:i}).done(function(){o.__aniCount--;if(o.__aniCount===0){var e=s.indexOf(m,o);m.splice(e,1)}})}n.log('Shape "'+t+'" not existed')},s.clearAnimation=function(){g.clear()},s.showLoading=function(e){return p.showLoading(e),s},s.hideLoading=function(){return p.hideLoading(),s},s.newShapeId=function(e){return h.newShapeId(e)},s.getWidth=function(){return p.getWidth()},s.getHeight=function(){return p.getHeight()},s.toDataURL=function(e,t){return p.toDataURL(e,t)},s.on=function(e,t){return d.on(e,t),s},s.un=function(e,t){return d.un(e,t),s},s.clear=function(){return h.del(),p.clear(),s},s.dispose=function(){g.stop(),g=null,m=null,s.clear(),s=null,h.dispose(),h=null,p.dispose(),p=null,d.dispose(),d=null,n.delInstance(t);return}}function o(t){function c(e){e.hoverable||e.onclick||e.draggable||e.onmousemove||e.onmouseover||e.onmouseout||e.onmousedown||e.onmouseup||e.ondragenter||e.ondragover||e.ondragleave||e.ondrop?e.__silent=!1:e.__silent=!0,Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1,e.style=e.style||{},e.style.__rect=null}function h(e){return(e||"")+ ++s}function p(e){var t={shape:"circle",id:e.id||i.newShapeId(),zlevel:0,draggable:!1,clickable:!1,hoverable:!0,position:[0,0],rotation:[0,0,0],scale:[1,1,0,0]};return r.merge(t,e,{overwrite:!0,recursive:!0}),c(t),o[t.id]=t,u[t.zlevel]=u[t.zlevel]||[],u[t.zlevel].push(t),f=Math.max(f,t.zlevel),l[t.zlevel]=!0,i}function d(e){return o[e]}function v(e){if(typeof e!="undefined"){var t={};if(e instanceof Array){if(e.lenth<1)return;for(var n=0,r=e.length;n<r;n++)t[e[n].id]=!0}else t[e]=!0;var s,c,h,p={};for(var d in t)if(o[d]){h=o[d].zlevel,l[h]=!0;if(!p[h]){c=u[h],s=[];for(var n=0,r=c.length;n<r;n++)t[c[n].id]||s.push(c[n]);u[h]=s,p[h]=!0}delete o[d]}}else o={},u=[],a=[],f=0,l={all:!0};return i}function m(e,t,n){var s=o[e];return s&&(l[s.zlevel]=!0,n?r.mergeFast(s,t,!0,!0):r.merge(s,t,{overwrite:!0,recursive:!0}),c(s),l[s.zlevel]=!0,f=Math.max(f,s.zlevel)),i}function g(e,r,s){var u=o[e];if(!u)return;u.__needTransform=!0;if(!u.ondrift||u.ondrift&&!u.ondrift(u,r,s))if(n.catchBrushException)try{t.get(u.shape).drift(u,r,s)}catch(a){n.log(a,"drift error of "+u.shape,u)}else t.get(u.shape).drift(u,r,s);return l[u.zlevel]=!0,i}function y(e){return e.rotation&&Math.abs(e.rotation[0])>1e-4||e.position&&(Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4)||e.scale&&(Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4)?e.__needTransform=!0:e.__needTransform=!1,a.push(e),i}function b(){return a=[],i}function w(){return a.length>0}function E(e,t){t||(t={hover:!1,normal:"down"});if(t.hover)for(var n=0,r=a.length;n<r;n++)if(e(a[n]))return i;var s,f;if(typeof t.normal!="undefined")switch(t.normal){case"down":for(var r=u.length-1;r>=0;r--){s=u[r];if(s){f=s.length;while(f--)if(e(s[f]))return i}}break;case"up":for(var n=0,r=u.length;n<r;n++){s=u[n];if(s){f=s.length;for(var l=0;l<f;l++)if(e(s[l]))return i}}break;default:for(var n in o)if(e(o[n]))return i}return i}function S(){return f}function x(){return l}function T(){return l={},i}function N(e){return l[e]=!0,i}function C(){o=null,u=null,a=null,i=null;return}var r=e("./tool/util"),i=this,s=0,o={},u=[],a=[],f=0,l={};i.newShapeId=h,i.add=p,i.get=d,i.del=v,i.addHover=y,i.delHover=b,i.hasHoverShape=w,i.mod=m,i.drift=g,i.iterShape=E,i.getMaxZlevel=S,i.getChangedZlevel=x,i.clearChangedZlevel=T,i.setChangedZlevle=N,i.dispose=C}function u(t,r,i){function v(){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return t.clientWidth-e.paddingLeft.replace(/\D/g,"")-e.paddingRight.replace(/\D/g,"")}function m(){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return t.clientHeight-e.paddingTop.replace(/\D/g,"")-e.paddingBottom.replace(/\D/g,"")}function g(){c.innerHTML="",t.innerHTML="",h=v(),p=m(),c.style.position="relative",c.style.overflow="hidden",c.style.width=h+"px",c.style.height=p+"px",t.appendChild(c),u={},a={},f=r.getMaxZlevel(),u.bg=b("bg","div"),c.appendChild(u.bg);for(var e=0;e<=f;e++)u[e]=b(e,"canvas"),c.appendChild(u[e]),G_vmlCanvasManager&&G_vmlCanvasManager.initElement(u[e]),a[e]=u[e].getContext("2d"),d!=1&&a[e].scale(d,d);u.hover=b("hover","canvas"),u.hover.id="_zrender_hover_",c.appendChild(u.hover),G_vmlCanvasManager&&G_vmlCanvasManager.initElement(u.hover),a.hover=u.hover.getContext("2d"),d!=1&&a.hover.scale(d,d)}function y(){var e=r.getMaxZlevel();if(f<e){for(var t=f+1;t<=e;t++)u[t]=b(t,"canvas"),c.insertBefore(u[t],u.hover),G_vmlCanvasManager&&G_vmlCanvasManager.initElement(u[t]),a[t]=u[t].getContext("2d"),d!=1&&a[t].scale(d,d);f=e}}function b(e,t){var n=document.createElement(t);return n.style.position="absolute",n.style.left=0,n.style.top=0,n.style.width=h+"px",n.style.height=p+"px",n.setAttribute("width",h*d),n.setAttribute("height",p*d),n.setAttribute("data-id",e),n}function w(e){return function(t){if((e.all||e[t.zlevel])&&!t.invisible){var r=a[t.zlevel];if(r){if(!t.onbrush||t.onbrush&&!t.onbrush(r,t,!1))if(n.catchBrushException)try{i.get(t.shape).brush(r,t,!1,T)}catch(s){n.log(s,"brush error of "+t.shape,t)}else i.get(t.shape).brush(r,t,!1,T)}else n.log("can not find the specific zlevel canvas!")}}}function E(e){var t=a.hover;if(!e.onbrush||e.onbrush&&!e.onbrush(t,e,!0))if(n.catchBrushException)try{i.get(e.shape).brush(t,e,!0,T)}catch(r){n.log(r,"hoverBrush error of "+e.shape,e)}else i.get(e.shape).brush(t,e,!0,T)}function S(e){return O()&&A(),y(),r.iterShape(w({all:!0}),{normal:"up"}),r.clearChangedZlevel(),typeof e=="function"&&e(),o}function x(e){y();var t=r.getChangedZlevel();if(t.all)N();else for(var n in t)a[n]&&a[n].clearRect(0,0,h*d,p*d);return r.iterShape(w(t),{normal:"up"}),r.clearChangedZlevel(),typeof e=="function"&&e(),o}function T(e,t){var n;for(var i=0,s=e.length;i<s;i++)n=e[i],r.mod(n.id,n);return x(t),o}function N(){for(var e in a){if(e=="hover")continue;a[e].clearRect(0,0,h*d,p*d)}return o}function C(){return k(),r.iterShape(E,{hover:!0}),r.delHover(),o}function k(){return a&&a.hover&&a.hover.clearRect(0,0,h*d,p*d),o}function L(t){var n=e("./tool/loadingEffect");return n.stop(l),t=t||{},t.effect=t.effect||s.loadingEffect,t.canvasSize={width:h,height:p},l=n.start(t,r.addHover,C),o.loading=!0,o}function A(){var t=e("./tool/loadingEffect");return t.stop(l),k(),o.loading=!1,o}function O(){return o.loading}function M(){return h}function _(){return p}function D(){var e,t,n;c.style.display="none",e=v(),t=m(),c.style.display="";if(h!=e||t!=p){h=e,p=t,c.style.width=h+"px",c.style.height=p+"px";for(var i in u)n=u[i],n.setAttribute("width",h),n.setAttribute("height",p),n.style.width=h+"px",n.style.height=p+"px";r.setChangedZlevle("all"),x()}return o}function P(){O()&&A(),t.innerHTML="",t=null,r=null,i=null,c=null,u=null,a=null,o=null;return}function H(){return u.hover}function B(e,t){if(G_vmlCanvasManager)return null;var s=b("image","canvas");u.bg.appendChild(s);var o=s.getContext("2d");d!=1&&o.scale(d,d),o.fillStyle="#fff",o.rect(0,0,h*d,p*d),o.fill(),r.iterShape(function(e){if(!e.invisible)if(!e.onbrush||e.onbrush&&!e.onbrush(o,e,!1))if(n.catchBrushException)try{i.get(e.shape).brush(o,e,!1,T)}catch(t){n.log(t,"brush error of "+e.shape,e)}else i.get(e.shape).brush(o,e,!1,T)},{normal:"up"});var a=s.toDataURL(e,t);return o=null,u.bg.removeChild(s),a}var s=e("./config"),o=this,u={},a={},f=0,l,c=document.createElement("div");c.onselectstart=function(){return!1};var h,p,d=window.devicePixelRatio||1;o.render=S,o.refresh=x,o.update=T,o.clear=N,o.refreshHover=C,o.clearHover=k,o.showLoading=L,o.hideLoading=A,o.isLoading=O,o.getWidth=M,o.getHeight=_,o.resize=D,o.dispose=P,o.getDomHover=H,o.toDataURL=B,g()}function a(t,n,r,i){function N(){window.addEventListener?(window.addEventListener("resize",C),!o.os.tablet&&!o.os.phone?(t.addEventListener("click",k),t.addEventListener("mousewheel",L),t.addEventListener("mousemove",A),t.addEventListener("mousedown",D),t.addEventListener("mouseup",P)):(t.addEventListener("touchstart",H),t.addEventListener("touchmove",B),t.addEventListener("touchend",j)),t.addEventListener("DOMMouseScroll",L),t.addEventListener("mouseout",O)):(window.attachEvent("onresize",C),t.attachEvent("onclick",k),t.attachEvent("onmousewheel",L),t.attachEvent("onmousemove",A),t.attachEvent("onmouseout",O),t.attachEvent("onmousedown",D),t.attachEvent("onmouseup",P))}function C(e){c=e||window.event,p=null,m=!1,a.dispatch(s.EVENT.RESIZE,c)}function k(e){c=$(e),p?p&&p.clickable&&W(p,s.EVENT.CLICK):W(p,s.EVENT.CLICK),A(c)}function L(e){c=$(e),W(p,s.EVENT.MOUSEWHEEL),A(c)}function A(e){if(r.isLoading())return;c=$(e),w=S,E=x,S=f(c),x=l(c),F(),h=!1,n.iterShape(V,{normal:"down"});if(!h){if(!v||p&&p.id!=v.id)_(),R();p=null,n.delHover(),r.clearHover()}v&&(n.drift(v.id,S-w,x-E),n.addHover(v)),v||h&&p.draggable?t.style.cursor="move":h&&p.clickable?t.style.cursor="pointer":t.style.cursor="default",W(p,s.EVENT.MOUSEMOVE),(v||h||n.hasHoverShape())&&r.refreshHover()}function O(e){c=$(e);var n=c.toElement||c.relatedTarget;if(n!=t)while(n&&n.nodeType!=9){if(n==t){A(e);return}n=n.parentNode}c.zrenderX=w,c.zrenderY=E,t.style.cursor="default",m=!1,_(),U(),z(),r.isLoading()||r.refreshHover(),a.dispatch(s.EVENT.GLOBALOUT,c)}function M(){W(p,s.EVENT.MOUSEOVER)}function _(){W(p,s.EVENT.MOUSEOUT)}function D(e){if(b==2){b=e.button,d=null;return}c=$(e),m=!0,d=p,W(p,s.EVENT.MOUSEDOWN),b=e.button}function P(e){c=$(e),t.style.cursor="default",m=!1,d=null,W(p,s.EVENT.MOUSEUP),U(),z()}function H(e){c=$(e,!0),y=new Date,X(),D(c)}function B(e){c=$(e,!0),A(c),g&&u.stop(e)}function j(e){c=$(e,!0),P(c),new Date-y<s.EVENT.touchClickDelay&&(X(),k(c)),r.clearHover()}function F(){m&&p&&p.draggable&&!v&&d==p&&(v=p,g=!0,v.invisible=!0,n.mod(v.id,v),W(v,s.EVENT.DRAGSTART),r.refresh())}function I(){v&&W(p,s.EVENT.DRAGENTER,v)}function q(){v&&W(p,s.EVENT.DRAGOVER,v)}function R(){v&&W(p,s.EVENT.DRAGLEAVE,v)}function U(){v&&(v.invisible=!1,n.mod(v.id,v),r.refresh(),W(p,s.EVENT.DROP,v))}function z(){v&&(W(v,s.EVENT.DRAGEND),p=null),g=!1,v=null}function W(e,t,n){var r="on"+t,i={type:t,event:c,target:e};n&&(i.dragged=n),e?(!e[r]||!e[r](i))&&a.dispatch(t,c,i):n||a.dispatch(t,c)}function X(){p=null,S=c.zrenderX,x=c.zrenderY,n.iterShape(V,{normal:"down"}),p||(S+=10,n.iterShape(V,{normal:"down"})),p||(S-=20,n.iterShape(V,{normal:"down"})),p||(S+=10,x+=10,n.iterShape(V,{normal:"down"})),p||(x-=20,n.iterShape(V,{normal:"down"})),p&&(c.zrenderX=S,c.zrenderY=x)}function V(e){if(v&&v.id==e.id)return!1;if(e.__silent)return!1;var t=i.get(e.shape);return t.isCover(e,S,x)?(e.hoverable&&n.addHover(e),p!=e&&(_(),R(),p=e,I()),M(),q(),h=!0,!0):!1}function $(e,n){if(!n){c=e||window.event;var r=c.toElement||c.relatedTarget||c.srcElement||c.target;r&&r!=T&&(c.zrenderX=(typeof c.offsetX!="undefined"?c.offsetX:c.layerX)+r.offsetLeft,c.zrenderY=(typeof c.offsetY!="undefined"?c.offsetY:c.layerY)+r.offsetTop)}else{c=e;var i=c.type!="touchend"?c.targetTouches[0]:c.changedTouches[0];i&&(c.zrenderX=i.clientX-t.offsetLeft+document.body.scrollLeft,c.zrenderY=i.clientY-t.offsetTop+document.body.scrollTop)}return c}function J(e,t){return a.bind(e,t),a}function K(e,t){return a.unbind(e,t),a}function Q(){window.removeEventListener?(window.removeEventListener("resize",C),!o.os.tablet&&!o.os.phone?(t.removeEventListener("click",k),t.removeEventListener("mousewheel",L),t.removeEventListener("mousemove",A),t.removeEventListener("mousedown",D),t.removeEventListener("mouseup",P)):(t.removeEventListener("touchstart",H),t.removeEventListener("touchmove",B),t.removeEventListener("touchend",j)),t.removeEventListener("DOMMouseScroll",L),t.removeEventListener("mouseout",O)):(window.detachEvent("onresize",C),t.detachEvent("onclick",k),t.detachEvent("onmousewheel",L),t.detachEvent("onmousemove",A),t.detachEvent("onmouseout",O),t.detachEvent("onmousedown",D),t.detachEvent("onmouseup",P)),t=null,T=null,n=null,r=null,i=null,K(),a=null;return}var s=e("./config"),o=e("./tool/env"),u=e("./tool/event");u.Dispatcher.call(this);var a=this,f=u.getX,l=u.getY,c,h=!1,p=null,d=null,v=null,m=!1,g=!1,y,b,w=0,E=0,S=0,x=0,T=r.getDomHover();a.on=J,a.un=K,a.dispose=Q,N()}e("./lib/excanvas");var t={},n=t,r=0,i={};return t.version="1.0.9",t.init=function(e,t){var n=new s(++r+"",e,t||{});return i[r]=n,n},t.dispose=function(e){if(e)e.dispose();else{for(var n in i)i[n].dispose();i={}}return t},t.getInstance=function(e){return i[e]},t.delInstance=function(e){return i[e]&&(i[e]=null,delete i[e]),t},t.catchBrushException=!1,t.debugMode=0,t.log=function(){if(t.debugMode===0)return;if(t.debugMode==1)for(var e in arguments)throw new Error(arguments[e]);else if(t.debugMode>1)for(var e in arguments)console.log(arguments[e]);return t},t}),r("zrender",["zrender/zrender"],function(e){return e}),r("echarts/util/shape/icon",["require","zrender/tool/matrix","zrender/shape","zrender/shape","zrender/shape","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="icon",this._iconLibrary={mark:r,markUndo:i,markClear:s,dataZoom:o,dataZoomReset:u,restore:a,lineChart:f,barChart:l,dataView:c,saveAsImage:h,cross:p,circle:d,rectangle:v,triangle:m,diamond:g,arrow:y,star:b,heart:w,droplet:E,pin:S,image:x}}function r(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r),e.moveTo(t.x+13*n,t.y+10*r),e.lineTo(t.x+13*n,t.y+t.height)}function i(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+t.height),e.lineTo(t.x+5*n,t.y+14*r),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+13*n,t.y),e.lineTo(t.x+2*n,t.y+11*r),e.lineTo(t.x,t.y+t.height),e.moveTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+2*r),e.moveTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+t.width,t.y+13*r)}function s(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+4*n,t.y+15*r),e.lineTo(t.x+9*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+8*r),e.lineTo(t.x+11*n,t.y+5*r),e.lineTo(t.x+6*n,t.y+10*r),e.lineTo(t.x+4*n,t.y+15*r),e.moveTo(t.x+5*n,t.y),e.lineTo(t.x+11*n,t.y),e.moveTo(t.x+5*n,t.y+r),e.lineTo(t.x+11*n,t.y+r),e.moveTo(t.x,t.y+2*r),e.lineTo(t.x+t.width,t.y+2*r),e.moveTo(t.x,t.y+5*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+13*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+5*r)}function o(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y+3*r),e.lineTo(t.x+6*n,t.y+3*r),e.moveTo(t.x+3*n,t.y),e.lineTo(t.x+3*n,t.y+6*r),e.moveTo(t.x+3*n,t.y+8*r),e.lineTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y+3*r),e.lineTo(t.x+8*n,t.y+3*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function u(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x+6*n,t.y),e.lineTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+6*n,t.y+6*r),e.moveTo(t.x+2*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+3*r),e.lineTo(t.x+14*n,t.y+11*r),e.moveTo(t.x+2*n,t.y+5*r),e.lineTo(t.x+2*n,t.y+13*r),e.lineTo(t.x+14*n,t.y+13*r),e.moveTo(t.x+10*n,t.y+10*r),e.lineTo(t.x+14*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+t.height),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function a(e,t){var n=t.width/16,r=t.height/16,i=t.width/2;e.lineWidth=1.5,e.arc(t.x+i,t.y+i,i-n,0,Math.PI*2/3),e.moveTo(t.x+3*n,t.y+t.height),e.lineTo(t.x+0*n,t.y+12*r),e.lineTo(t.x+5*n,t.y+11*r),e.moveTo(t.x,t.y+8*r),e.arc(t.x+i,t.y+i,i-n,Math.PI,Math.PI*5/3),e.moveTo(t.x+13*n,t.y),e.lineTo(t.x+t.width,t.y+4*r),e.lineTo(t.x+11*n,t.y+5*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function f(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+2*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+6*r),e.lineTo(t.x+11*n,t.y+11*r),e.lineTo(t.x+15*n,t.y+2*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function l(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.moveTo(t.x+3*n,t.y+14*r),e.lineTo(t.x+3*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+6*r),e.lineTo(t.x+4*n,t.y+14*r),e.moveTo(t.x+7*n,t.y+14*r),e.lineTo(t.x+7*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+2*r),e.lineTo(t.x+8*n,t.y+14*r),e.moveTo(t.x+11*n,t.y+14*r),e.lineTo(t.x+11*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+9*r),e.lineTo(t.x+12*n,t.y+14*r)}function c(e,t){var n=t.width/16;e.moveTo(t.x+n,t.y),e.lineTo(t.x+n,t.y+t.height),e.lineTo(t.x+15*n,t.y+t.height),e.lineTo(t.x+15*n,t.y),e.lineTo(t.x+n,t.y),e.moveTo(t.x+3*n,t.y+3*n),e.lineTo(t.x+13*n,t.y+3*n),e.moveTo(t.x+3*n,t.y+6*n),e.lineTo(t.x+13*n,t.y+6*n),e.moveTo(t.x+3*n,t.y+9*n),e.lineTo(t.x+13*n,t.y+9*n),e.moveTo(t.x+3*n,t.y+12*n),e.lineTo(t.x+9*n,t.y+12*n)}function h(e,t){var n=t.width/16,r=t.height/16;e.moveTo(t.x,t.y),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x,t.y),e.moveTo(t.x+4*n,t.y),e.lineTo(t.x+4*n,t.y+8*r),e.lineTo(t.x+12*n,t.y+8*r),e.lineTo(t.x+12*n,t.y),e.moveTo(t.x+6*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+13*r),e.lineTo(t.x+10*n,t.y+11*r),e.lineTo(t.x+6*n,t.y+11*r),e.moveTo(t.x,t.y),e.lineTo(t.x,t.y)}function p(e,t){var n=t.x,r=t.y,i=t.width,s=t.height;e.moveTo(n,r+s/2),e.lineTo(n+i,r+s/2),e.moveTo(n+i/2,r),e.lineTo(n+i/2,r+s)}function d(e,t){var n=t.width/2,r=t.height/2;e.arc(t.x+n,t.y+r,Math.min(n,r),0,Math.PI*2)}function v(e,t){e.rect(t.x,t.y,t.width,t.height)}function m(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s+o),e.lineTo(i-o,s+o),e.lineTo(i,s-o)}function g(e,t){var n=t.width/2,r=t.height/2,i=t.x+n,s=t.y+r,o=Math.min(n,r);e.moveTo(i,s-o),e.lineTo(i+o,s),e.lineTo(i,s+o),e.lineTo(i-o,s),e.lineTo(i,s-o)}function y(e,t){var n=t.x,r=t.y,i=t.width/16;e.moveTo(n+8*i,r),e.lineTo(n+i,r+t.height),e.lineTo(n+8*i,r+t.height/4*3),e.lineTo(n+15*i,r+t.height),e.lineTo(n+8*i,r)}function b(t,n){var r=n.width/2,i=n.height/2,s=e("zrender/shape").get("star");s.buildPath(t,{x:n.x+r,y:n.y+i,r:Math.min(r,i),n:n.n||5})}function w(t,n){var r=e("zrender/shape").get("heart");r.buildPath(t,{x:n.x+n.width/2,y:n.y+n.height*.2,a:n.width/2,b:n.height*.8})}function E(t,n){var r=e("zrender/shape").get("droplet");r.buildPath(t,{x:n.x+n.width*.5,y:n.y+n.height*.5,a:n.width*.5,b:n.height*.8})}function S(e,t){var n=t.x,r=t.y-t.height/2*1.5,i=t.width/2,s=t.height/2,o=Math.min(i,s);e.arc(n+i,r+s,o,Math.PI/5*4,Math.PI/5),e.lineTo(n+i,r+s+o*1.5)}function x(t,n){setTimeout(function(){e("zrender/shape").get("image").brush(t,{style:n})},100)}var t=e("zrender/tool/matrix");return n.prototype={buildPath:function(e,t){this._iconLibrary[t.iconType]?this._iconLibrary[t.iconType](e,t):(e.moveTo(t.x,t.y),e.lineTo(t.x+t.width,t.y),e.lineTo(t.x+t.width,t.y+t.height),e.lineTo(t.x,t.y+t.height),e.lineTo(t.x,t.y));return},getRect:function(e){return{x:Math.round(e.x),y:Math.round(e.y-(e.iconType=="pin"?e.height/2*1.5:0)),width:e.width,height:e.height}},isCover:function(e,n,r){if(e.__needTransform&&e._transform){var i=[];t.invert(i,e._transform);var s=[n,r];t.mulVector(s,i,[n,r,1]),n==s[0]&&r==s[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),e.style.__rect=o);var u=o.height<10?4:0;return n>=o.x-u&&n<=o.x+o.width+2*u&&r>=o.y-u&&r<=o.y+o.height+2*u?!0:!1},define:function(e,t){this._iconLibrary[e]=t},get:function(e){return this._iconLibrary[e]}},e("zrender/shape/base").derive(n),e("zrender/shape").define("icon",new n),n}),r("echarts/util/shape/markLine",["require","zrender/tool/matrix","zrender/shape","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="markLine"}var t=e("zrender/tool/matrix");return n.prototype={brush:function(e,t,n){var r=t.style||{};n&&(r=this.getHighlightStyle(r,t.highlightStyle||{})),e.save(),this.setContext(e,r),t.__needTransform&&e.transform.apply(e,this.updateTransform(t)),e.beginPath(),this.buildLinePath(e,r),e.stroke(),this.brushSymbol(t,e,r,0),this.brushSymbol(t,e,r,1),typeof r.text!="undefined"&&this.drawText(e,r,t.style),e.restore();return},buildLinePath:function(e,t){var n=t.xStart,r=t.xEnd,i=t.yStart,s=t.yEnd;if(!t.lineType||t.lineType=="solid")e.moveTo(n,i),e.lineTo(r,s);else if(t.lineType=="dashed"||t.lineType=="dotted"){var o=(t.lineWidth||1)*(t.lineType=="dashed"?5:1);this.dashedLineTo(e,n,i,r,s,o)}},brushSymbol:function(n,r,i,s){r.save(),r.beginPath(),r.lineWidth=i.symbolBorder,r.strokeStyle=i.symbolBorderColor,i.iconType=i.symbol[s].replace("empty","").toLowerCase(),i.symbol[s].match("empty")&&(r.fillStyle="rgba(0, 0, 0, 0)");var o=s===0?i.xStart:i.xEnd,u=s===0?i.yStart:i.yEnd,a=typeof i.symbolRotate[s]!="undefined"?i.symbolRotate[s]-0:0,f;a!==0&&(f=t.create(),t.identity(f),(o||u)&&t.translate(f,f,[-o,-u]),t.rotate(f,f,a*Math.PI/180),(o||u)&&t.translate(f,f,[o,u]),r.transform.apply(r,f));if(i.iconType=="arrow"&&a===0)this.buildArrawPath(r,i,s);else{var l=i.symbolSize[s];i.x=o-l,i.y=u-l,i.width=l*2,i.height=l*2,e("zrender/shape").get("icon").buildPath(r,i)}r.closePath(),r.stroke(),r.fill(),r.restore()},buildArrawPath:function(e,t,n){var r=t.symbolSize[n],i=t.xStart,s=t.xEnd,o=t.yStart,u=t.yEnd,a=Math.atan(Math.abs((u-o)/(i-s)));n===0?s>i?u>o&&(a=Math.PI*2-a):u>o?a+=Math.PI:a=Math.PI-a:i>s?o>u&&(a=Math.PI*2-a):o>u?a+=Math.PI:a=Math.PI-a;var f=Math.PI/8,l=n===0?i:s,c=n===0?o:u,h=[[l+r*Math.cos(a-f),c-r*Math.sin(a-f)],[l+r*.6*Math.cos(a),c-r*.6*Math.sin(a)],[l+r*Math.cos(a+f),c-r*Math.sin(a+f)]];e.moveTo(l,c);for(var p=0,d=h.length;p<d;p++)e.lineTo(h[p][0],h[p][1]);e.lineTo(l,c)},getRect:function(e){var t=e.lineWidth||1;return{x:Math.min(e.xStart,e.xEnd)-t,y:Math.min(e.yStart,e.yEnd)-t,width:Math.abs(e.xStart-e.xEnd)+t,height:Math.abs(e.yStart-e.yEnd)+t}},isCover:function(t,n,r){return e("zrender/shape").get("line").isCover(t,n,r)}},e("zrender/shape/base").derive(n),e("zrender/shape").define("markLine",new n),n}),r("echarts/chart",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("echarts/util/ecData",[],function(){function e(e,t,n,r,i,s,o,u){var a;return typeof r!="undefined"&&(typeof r.value!="undefined"?a=r.value:a=r),e._echartsData={_series:t,_seriesIndex:n,_data:r,_dataIndex:i,_name:s,_value:a,_special:o,_special2:u},e._echartsData}function t(e,t){var n=e._echartsData;if(!t)return n;switch(t){case"series":return n&&n._series;case"seriesIndex":return n&&n._seriesIndex;case"data":return n&&n._data;case"dataIndex":return n&&n._dataIndex;case"name":return n&&n._name;case"value":return n&&n._value;case"special":return n&&n._special;case"special2":return n&&n._special2}return null}function n(e,t,n){e._echartsData=e._echartsData||{};switch(t){case"series":e._echartsData._series=n;break;case"seriesIndex":e._echartsData._seriesIndex=n;break;case"data":e._echartsData._data=n;break;case"dataIndex":e._echartsData._dataIndex=n;break;case"name":e._echartsData._name=n;break;case"value":e._echartsData._value=n;break;case"special":e._echartsData._special=n;break;case"special2":e._echartsData._special2=n}}return{pack:e,set:n,get:t}}),r("echarts/component/base",["require","../config","../util/ecData","zrender/tool/util"],function(e){function t(t){function u(e){e=e||s.type+"";switch(e){case n.COMPONENT_TYPE_GRID:case n.COMPONENT_TYPE_AXIS_CATEGORY:case n.COMPONENT_TYPE_AXIS_VALUE:return 0;case n.CHART_TYPE_LINE:case n.CHART_TYPE_BAR:case n.CHART_TYPE_SCATTER:case n.CHART_TYPE_PIE:case n.CHART_TYPE_RADAR:case n.CHART_TYPE_MAP:case n.CHART_TYPE_K:case n.CHART_TYPE_CHORD:return 2;case n.COMPONENT_TYPE_LEGEND:case n.COMPONENT_TYPE_DATARANGE:case n.COMPONENT_TYPE_DATAZOOM:return 4;case n.CHART_TYPE_ISLAND:return 5;case n.COMPONENT_TYPE_TOOLBOX:case n.COMPONENT_TYPE_TITLE:return 6;case n.COMPONENT_TYPE_TOOLTIP:return 7;default:return 0}}function a(e){return i.merge(e||{},i.clone(n[s.type]||{}),{overwrite:!1,recursive:!0})}function f(e){if(!(e instanceof Array))return[e,e,e,e];switch(e.length+""){case"4":return e;case"3":return[e[0],e[1],e[2],e[1]];case"2":return[e[0],e[1],e[0],e[1]];case"1":return[e[0],e[0],e[0],e[0]];case"0":return[0,0,0,0]}}function l(e,t){if(typeof e=="undefined")return undefined;if(!t)return e;t=t.split(".");var n=t.length,r=0;while(r<n){e=e[t[r]];if(typeof e=="undefined")return undefined;r++}return e}function c(e,t){var n;for(var r=0,i=e.length;r<i;r++){n=l(e[r],t);if(typeof n!="undefined")return n}return undefined}function h(e,t){var n,r,s=e.length;while(s--)r=l(e[s],t),typeof r!="undefined"&&(typeof n=="undefined"?n=i.clone(r):i.merge(n,r,{overwrite:!0,recursive:!0}));return n}function p(e){var t=i.merge(i.clone(e)||{},n.textStyle,{overwrite:!1});return t.fontStyle+" "+t.fontWeight+" "+t.fontSize+"px "+t.fontFamily}function d(e,t,n,r,i){var o=[n,t],u=h(o,"itemStyle.normal.label"),a=h(o,"itemStyle.emphasis.label"),f=u.textStyle||{},l=a.textStyle||{};return u.show&&(e.style.text=v(t,n,r,"normal"),e.style.textPosition=typeof u.position=="undefined"?i=="horizontal"?"right":"top":u.position,e.style.textColor=f.color,e.style.textFont=s.getFont(f)),a.show&&(e.highlightStyle.text=v(t,n,r,"emphasis"),e.highlightStyle.textPosition=u.show?e.style.textPosition:typeof a.position=="undefined"?i=="horizontal"?"right":"top":a.position,e.highlightStyle.textColor=l.color,e.highlightStyle.textFont=s.getFont(l)),e}function v(e,t,n,r){var i=s.deepQuery([t,e],"itemStyle."+r+".label.formatter");!i&&r=="emphasis"&&(i=s.deepQuery([t,e],"itemStyle.normal.label.formatter"));var o=typeof t!="undefined"?typeof t.value!="undefined"?t.value:t:"-";if(!i)return o;if(typeof i=="function")return i(e.name,n,o);if(typeof i=="string")return i=i.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),i=i.replace("{a0}",e.name).replace("{b0}",n).replace("{c0}",o),i}function m(e,t,n,r,i){s.selectedMap[e.name]&&(e.markPoint&&g(e,t,n,r,i),e.markLine&&y(e,t,n,r,i))}function g(e,t,r,o,u){var a=s.getZlevelBase(),f,l,c=i.clone(e.markPoint);for(var h=0,p=c.data.length;h<p;h++)f=c.data[h],l=s.getMarkCoord(e,t,f,o),c.data[h].x=typeof f.x!="undefined"?f.x:l[0],c.data[h].y=typeof f.y!="undefined"?f.y:l[1];var d=b(e,t,c,r);for(var h=0,p=d.length;h<p;h++){d[h].zlevel=a+1;for(var v in u)d[h][v]=u[v];s.shapeList.push(d[h])}if(s.type==n.CHART_TYPE_FORCE||s.type==n.CHART_TYPE_CHORD)for(var h=0,p=d.length;h<p;h++)d[h].id=s.zr.newShapeId(s.type),s.zr.addShape(d[h])}function y(e,t,r,o,u){var a=s.getZlevelBase(),f,l,c=i.clone(e.markLine);for(var h=0,p=c.data.length;h<p;h++)f=c.data[h],l=[s.getMarkCoord(e,t,f[0],o),s.getMarkCoord(e,t,f[1],o)],c.data[h][0].x=typeof f[0].x!="undefined"?f[0].x:l[0][0],c.data[h][0].y=typeof f[0].y!="undefined"?f[0].y:l[0][1],c.data[h][1].x=typeof f[1].x!="undefined"?f[1].x:l[1][0],c.data[h][1].y=typeof f[1].y!="undefined"?f[1].y:l[1][1];var d=w(e,t,c,r);for(var h=0,p=d.length;h<p;h++){d[h].zlevel=a+1;for(var v in u)d[h][v]=u[v];s.shapeList.push(d[h])}if(s.type==n.CHART_TYPE_FORCE||s.type==n.CHART_TYPE_CHORD)for(var h=0,p=d.length;h<p;h++)d[h].id=s.zr.newShapeId(s.type),s.zr.addShape(d[h])}function b(e,t,o,u){i.merge(o,n.markPoint,{overwrite:!1,recursive:!0}),o.name=e.name;var a=[],f=o.data,l,c=u.dataRange,h=u.legend,p,d,v,m,g,y=s.zr.getWidth(),b=s.zr.getHeight();for(var w=0,E=f.length;w<E;w++){h&&(p=h.getColor(e.name));if(c){d=typeof f[w]!="undefined"?typeof f[w].value!="undefined"?f[w].value:f[w]:"-",p=isNaN(d)?p:c.getColor(d),v=[f[w],o],m=s.deepQuery(v,"itemStyle.normal.color")||p,g=s.deepQuery(v,"itemStyle.emphasis.color")||m;if(m==null&&g==null)continue}f[w].tooltip={trigger:"item"},f[w].name=typeof f[w].name!="undefined"?f[w].name:"",f[w].value=typeof f[w].value!="undefined"?f[w].value:"",l=S(o,t,f[w],w,f[w].name,T(f[w].x,y),T(f[w].y,b),"pin",p,"rgba(0,0,0,0)","horizontal"),r.pack(l,e,t,f[w],0,f[w].name),a.push(l)}return a}function w(e,t,o,u){i.merge(o,n.markLine,{overwrite:!1,recursive:!0}),o.symbol=o.symbol instanceof Array?o.symbol.length>1?o.symbol:[o.symbol[0],o.symbol[0]]:[o.symbol,o.symbol],o.symbolSize=o.symbolSize instanceof Array?o.symbolSize.length>1?o.symbolSize:[o.symbolSize[0],o.symbolSize[0]]:[o.symbolSize,o.symbolSize],o.symbolRotate=o.symbolRotate instanceof Array?o.symbolRotate.length>1?o.symbolRotate:[o.symbolRotate[0],o.symbolRotate[0]]:[o.symbolRotate,o.symbolRotate],o.name=e.name;var a=[],f=o.data,l,c=u.dataRange,h=u.legend,p,d,v,m,g,y=s.zr.getWidth(),b=s.zr.getHeight();for(var w=0,E=f.length;w<E;w++){h&&(p=h.getColor(e.name));if(c){d=typeof f[w][0]!="undefined"?typeof f[w][0].value!="undefined"?f[w][0].value:f[w][0]:"-",p=isNaN(d)?p:c.getColor(d),v=[f[w][0],o],m=s.deepQuery(v,"itemStyle.normal.color")||p,g=s.deepQuery(v,"itemStyle.emphasis.color")||m;if(m==null&&g==null)continue}f[w][0].tooltip={trigger:"item"},f[w][0].name=typeof f[w][0].name!="undefined"?f[w][0].name:"",f[w][1].name=typeof f[w][1].name!="undefined"?f[w][1].name:"",f[w][0].value=typeof f[w][0].value!="undefined"?f[w][0].value:"",l=x(o,f[w],T(f[w][0].x,y),T(f[w][0].y,b),T(f[w][1].x,y),T(f[w][1].y,b),p),r.pack(l,e,t,f[w][0],0,f[w][0].name+" : "+f[w][1].name),a.push(l)}return a}function E(){return[0,0]}function S(e,t,n,i,o,u,a,f,l,c,h){var p=[n,e],d=typeof n!="undefined"?typeof n.value!="undefined"?n.value:n:"-";f=s.deepQuery(p,"symbol")||f;var v=s.deepQuery(p,"symbolSize");v=typeof v=="function"?v(d):v;var m=s.deepQuery(p,"symbolRotate"),g=s.deepMerge(p,"itemStyle.normal"),y=s.deepMerge(p,"itemStyle.emphasis"),b=typeof g.borderWidth!="undefined"?g.borderWidth:g.lineStyle&&g.lineStyle.width*2;typeof b=="undefined"&&(b=0);var w=typeof y.borderWidth!="undefined"?y.borderWidth:y.lineStyle&&y.lineStyle.width*2;typeof w=="undefined"&&(w=b+2);var E={shape:"icon",style:{iconType:f.replace("empty","").toLowerCase(),x:u-v,y:a-v,width:v*2,height:v*2,brushType:"both",color:f.match("empty")?c:g.color||l,strokeColor:g.borderColor||g.color||l,lineWidth:b},highlightStyle:{color:f.match("empty")?c:y.color||g.color||l,strokeColor:y.borderColor||g.borderColor||y.color||g.color||l,lineWidth:w},clickable:!0};return f.match("image")&&(E.style.image=f.replace(new RegExp("^image:\\/\\/"),""),E.shape="image"),typeof m!="undefined"&&(E.rotation=[m*Math.PI/180,u,a]),f.match("star")&&(E.style.iconType="star",E.style.n=f.replace("empty","").replace("star","")-0||5),f=="none"&&(E.invisible=!0,E.hoverable=!1),E=s.addLabel(E,e,n,o,h),f.match("empty")&&(typeof E.style.textColor=="undefined"&&(E.style.textColor=E.style.strokeColor),typeof E.highlightStyle.textColor=="undefined"&&(E.highlightStyle.textColor=E.highlightStyle.strokeColor)),r.pack(E,e,t,n,i,o),E._mark="point",E._x=u,E._y=a,E._dataIndex=i,E._seriesIndex=t,E}function x(e,t,n,r,i,o,u){var a=typeof t[0]!="undefined"?typeof t[0].value!="undefined"?t[0].value:t[0]:"-",f=typeof t[1]!="undefined"?typeof t[1].value!="undefined"?t[1].value:t[1]:"-",l=[s.query(t[0],"symbol")||e.symbol[0],s.query(t[1],"symbol")||e.symbol[1]],c=[s.query(t[0],"symbolSize")||e.symbolSize[0],s.query(t[1],"symbolSize")||e.symbolSize[1]];c[0]=typeof c[0]=="function"?c[0](a):c[0],c[1]=typeof c[1]=="function"?c[1](f):c[1];var h=[s.query(t[0],"symbolRotate")||e.symbolRotate[0],s.query(t[1],"symbolRotate")||e.symbolRotate[1]],p=[t[0],e],d=s.deepMerge(p,"itemStyle.normal"),v=s.deepMerge(p,"itemStyle.emphasis"),m=d.lineStyle,g=v.lineStyle,y=m.width;typeof y=="undefined"&&(y=d.borderWidth);var b=g.width;typeof b=="undefined"&&(typeof v.borderWidth!="undefined"?b=v.borderWidth:b=y+2);var w={shape:"markLine",style:{symbol:l,symbolSize:c,symbolRotate:h,xStart:n,yStart:r,xEnd:i,yEnd:o,brushType:"both",lineType:m.type,shadowColor:m.shadowColor,shadowBlur:m.shadowBlur,shadowOffsetX:m.shadowOffsetX,shadowOffsetY:m.shadowOffsetY,color:d.color||u,strokeColor:m.color||d.borderColor||u||d.color,lineWidth:y,symbolBorderColor:d.borderColor||u||d.color,symbolBorder:d.borderWidth*2},highlightStyle:{shadowColor:g.shadowColor,shadowBlur:g.shadowBlur,shadowOffsetX:g.shadowOffsetX,shadowOffsetY:g.shadowOffsetY,color:v.color||d.color||u,strokeColor:g.color||m.color||v.borderColor||d.borderColor||u||v.color||d.color,lineWidth:b,symbolBorderColor:v.borderColor||d.borderColor||u||v.color||d.color,symbolBorder:typeof v.borderWidth=="undefined"?d.borderWidth*2+2:v.borderWidth*2},clickable:!0};return w=s.addLabel(w,e,t[0],t[0].name+" : "+t[1].name),w._mark="line",w._x=i,w._y=o,w}function T(e,t){return typeof e=="string"?L(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e}function N(e){return[T(e[0],s.zr.getWidth()),T(e[1],s.zr.getHeight())]}function C(e){e instanceof Array||(e=[0,e]);var t=Math.min(s.zr.getWidth(),s.zr.getHeight())/2;return[T(e[0],t),T(e[1],t)]}function k(e){return e=(e+"").split("."),e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function L(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function A(e,t){return t%2==1?e=Math.floor(e)+.5:e=Math.round(e),e}function O(){o[s.type]&&s.animationMark(n.animationDuration)}function M(e){var n,r;for(var i=0,o=s.shapeList.length;i<o;i++){if(!s.shapeList[i]._mark)continue;n=s.shapeList[i]._x||0,r=s.shapeList[i]._y||0,s.shapeList[i]._mark=="point"?(t.modShape(s.shapeList[i].id,{scale:[0,0,n,r]},!0),t.animate(s.shapeList[i].id,"").when(e,{scale:[1,1,n,r]}).start("QuinticOut")):s.shapeList[i]._mark=="line"&&(t.modShape(s.shapeList[i].id,{style:{xEnd:s.shapeList[i].style.xStart,yEnd:s.shapeList[i].style.yStart}},!0),t.animate(s.shapeList[i].id,"style").when(e,{xEnd:n,yEnd:r}).start("QuinticOut"))}}function _(){s.refresh&&s.refresh()}function D(){s.zr&&(s.zr.delShape(s.shapeList),s.zr.clearAnimation&&s.zr.clearAnimation()),s.shapeList=[]}function P(){s.clear(),s.shapeList=null,s=null}var n=e("../config"),r=e("../util/ecData"),i=e("zrender/tool/util"),s=this;s.zr=t,s.shapeList=[];var o={};o[n.CHART_TYPE_LINE]=!0,o[n.CHART_TYPE_BAR]=!0,o[n.CHART_TYPE_SCATTER]=!0,o[n.CHART_TYPE_PIE]=!0,o[n.CHART_TYPE_RADAR]=!0,o[n.CHART_TYPE_MAP]=!0,o[n.CHART_TYPE_K]=!0,o[n.CHART_TYPE_CHORD]=!0,s.getZlevelBase=u,s.reformOption=a,s.reformCssArray=f,s.query=l,s.deepQuery=c,s.deepMerge=h,s.getFont=p,s.addLabel=d,s.buildMark=m,s.getMarkCoord=E,s.getSymbolShape=S,s.parsePercent=T,s.parseCenter=N,s.parseRadius=C,s.numAddCommas=k,s.subPixelOptimize=A,s.animation=O,s.animationMark=M,s.resize=_,s.clear=D,s.dispose=P}return t}),r("echarts/util/accMath",[],function(){function e(e,n){return t(e,1/n)}function t(e,t){var n=0,r=e.toString(),i=t.toString();try{n+=r.split(".")[1].length}catch(s){}try{n+=i.split(".")[1].length}catch(s){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,n)}function n(e,t){var n,r,i;try{n=e.toString().split(".")[1].length}catch(s){n=0}try{r=t.toString().split(".")[1].length}catch(s){r=0}return i=Math.pow(10,Math.max(n,r)),(Math.round(e*i)+Math.round(t*i))/i}function r(e,t){return n(e,-t)}return{accDiv:e,accMul:t,accAdd:n,accSub:r}}),r("echarts/chart/calculableBase",["require","../util/ecData","../util/accMath","zrender/tool/util"],function(e){function t(t,n){function u(e){return e.ondragover=o.shapeHandler.ondragover,e.ondragend=o.shapeHandler.ondragend,e.ondrop=o.shapeHandler.ondrop,e}function a(e,t){if(!o.isDrop||!e.target)return;var s=e.target,u=e.dragged,a=r.get(s,"seriesIndex"),f=r.get(s,"dataIndex"),l=n.series[a].data[f]||"-";l.value?l.value!="-"?n.series[a].data[f].value=i.accAdd(n.series[a].data[f].value,r.get(u,"value")):n.series[a].data[f].value=r.get(u,"value"):l!="-"?n.series[a].data[f]=i.accAdd(n.series[a].data[f],r.get(u,"value")):n.series[a].data[f]=r.get(u,"value"),t.dragIn=t.dragIn||!0,o.isDrop=!1;return}function f(e,t){if(!o.isDragend||!e.target)return;var i=e.target,s=r.get(i,"seriesIndex"),u=r.get(i,"dataIndex");n.series[s].data[u]="-",t.dragOut=!0,t.needRefresh=!0,o.isDragend=!1;return}function l(e,t){var n=e.selected;for(var r in o.selectedMap)if(o.selectedMap[r]!=n[r]){t.needRefresh=!0;return}}var r=e("../util/ecData"),i=e("../util/accMath"),s=e("zrender/tool/util"),o=this;o.selectedMap={},o.shapeHandler={onclick:function(){o.isClick=!0},ondragover:function(e){var t=s.clone(e.target);t.highlightStyle={text:"",r:t.style.r+5,brushType:"stroke",strokeColor:o.zr.getCalculableColor(),lineWidth:(t.style.lineWidth||1)+12},o.zr.addHoverShape(t)},ondrop:function(e){typeof r.get(e.dragged,"data")!="undefined"&&(o.isDrop=!0)},ondragend:function(){o.isDragend=!0}},o.setCalculable=u,o.ondrop=a,o.ondragend=f,o.onlegendSelected=l}return t}),r("echarts/chart/island",["require","../component/base","./calculableBase","../config","../util/ecData","zrender/tool/event","zrender/tool/color","../util/accMath","../chart"],function(e){function t(t,n){function v(t,n){var r=e("zrender/tool/color"),i=e("../util/accMath"),s=i.accAdd(o.get(t,"value"),o.get(n,"value")),u=o.get(t,"name")+c+o.get(n,"name");t.style.text=u+h+s,o.set(t,"value",s),o.set(t,"name",u),t.style.r=f.island.r,t.style.color=r.mix(t.style.color,n.style.color)}function m(e){e&&(e.island=a.reformOption(e.island),f=e,c=f.nameConnector,h=f.valueConnector)}function g(e){m(e);for(var t=0,r=a.shapeList.length;t<r;t++)n.addShape(a.shapeList[t])}function y(){return f}function b(){var e=n.getWidth(),t=n.getHeight(),r=e/(d||e),i=t/(p||t);if(r==1&&i==1)return;d=e,p=t;for(var s=0,o=a.shapeList.length;s<o;s++)n.modShape(a.shapeList[s].id,{style:{x:Math.round(a.shapeList[s].style.x*r),y:Math.round(a.shapeList[s].style.y*i)}},!0)}function w(e){var t=o.get(e,"name"),r=o.get(e,"value"),i=typeof o.get(e,"series")!="undefined"?o.get(e,"series").name:"",s=a.getFont(f.island.textStyle),u={shape:"circle",id:n.newShapeId(a.type),zlevel:l,style:{x:e.style.x,y:e.style.y,r:f.island.r,color:e.style.color||e.style.strokeColor,text:t+h+r,textFont:s},draggable:!0,hoverable:!0,onmousewheel:a.shapeHandler.onmousewheel,_type:"island"};u.style.color=="#fff"&&(u.style.color=e.style.strokeColor),a.setCalculable(u),o.pack(u,{name:i},-1,r,-1,t),a.shapeList.push(u),n.addShape(u)}function E(e){n.delShape(e.id);var t=[];for(var r=0,i=a.shapeList.length;r<i;r++)a.shapeList[r].id!=e.id&&t.push(a.shapeList[r]);a.shapeList=t}function S(e,t){if(!a.isDrop||!e.target)return;var r=e.target,i=e.dragged;v(r,i),n.modShape(r.id,r),t.dragIn=!0,a.isDrop=!1;return}function x(e,t){var n=e.target;a.isDragend?t.dragIn&&(E(n),t.needRefresh=!0):t.dragIn||(n.style.x=u.getX(e.event),n.style.y=u.getY(e.event),w(n),t.needRefresh=!0),a.isDragend=!1;return}var r=e("../component/base");r.call(this,n);var i=e("./calculableBase");i.call(this,n);var s=e("../config"),o=e("../util/ecData"),u=e("zrender/tool/event"),a=this;a.type=s.CHART_TYPE_ISLAND;var f,l=a.getZlevelBase(),c,h,p=n.getHeight(),d=n.getWidth();a.shapeHandler.onmousewheel=function(e){var t=e.target,r=e.event,i=u.getDelta(r);i=i>0?-1:1,t.style.r-=i,t.style.r=t.style.r<5?5:t.style.r;var s=o.get(t,"value"),a=s*f.island.calculateStep;a>1?s=Math.round(s-a*i):s=(s-a*i).toFixed(2)-0;var l=o.get(t,"name");t.style.text=l+":"+s,o.set(t,"value",s),o.set(t,"name",l),n.modShape(t.id,t),n.refresh(),u.stop(r)},a.refresh=m,a.render=g,a.resize=b,a.getOption=y,a.add=w,a.del=E,a.ondrop=S,a.ondragend=x}return e("../chart").define("island",t),t}),r("echarts/component",[],function(){var e={},t={};return e.define=function(n,r){return t[n]=r,e},e.get=function(e){return t[e]},e}),r("echarts/component/title",["require","./base","../config","zrender/tool/area","zrender/tool/util","../component"],function(e){function t(t,n,r){function h(){c=v(),d(),p();for(var e=0,t=a.shapeList.length;e<t;e++)a.shapeList[e].id=n.newShapeId(a.type),n.addShape(a.shapeList[e])}function p(){var e=f.text,t=f.link,n=f.subtext,r=f.sublink,i=a.getFont(f.textStyle),s=a.getFont(f.subtextStyle),o=c.x,u=c.y,h=c.width,p=c.height,d={shape:"text",zlevel:l,style:{y:u,color:f.textStyle.color,text:e,textFont:i,textBaseline:"top"},hoverable:!1};t&&(d.hoverable=!0,d.clickable=!0,d.onclick=function(){window.open(t)});var v={shape:"text",zlevel:l,style:{y:u+p,color:f.subtextStyle.color,text:n,textFont:s,textBaseline:"bottom"},hoverable:!1};r&&(v.hoverable=!0,v.clickable=!0,v.onclick=function(){window.open(r)});switch(f.x){case"center":d.style.x=v.style.x=o+h/2,d.style.textAlign=v.style.textAlign="center";break;case"left":d.style.x=v.style.x=o,d.style.textAlign=v.style.textAlign="left";break;case"right":d.style.x=v.style.x=o+h,d.style.textAlign=v.style.textAlign="right";break;default:o=f.x-0,o=isNaN(o)?0:o,d.style.x=v.style.x=o}f.textAlign&&(d.style.textAlign=v.style.textAlign=f.textAlign),a.shapeList.push(d),n!==""&&a.shapeList.push(v)}function d(){var e=f.padding[0],t=f.padding[1],n=f.padding[2],r=f.padding[3];a.shapeList.push({shape:"rectangle",zlevel:l,hoverable:!1,style:{x:c.x-r,y:c.y-e,width:c.width+r+t,height:c.height+e+n,brushType:f.borderWidth===0?"fill":"both",color:f.backgroundColor,strokeColor:f.borderColor,lineWidth:f.borderWidth}})}function v(){var e=f.text,t=f.subtext,r=a.getFont(f.textStyle),i=a.getFont(f.subtextStyle),s=Math.max(o.getTextWidth(e,r),o.getTextWidth(t,i)),u=o.getTextHeight(e,r)+(t===""?0:f.itemGap+o.getTextHeight(t,i)),l,c=n.getWidth();switch(f.x){case"center":l=Math.floor((c-s)/2);break;case"left":l=f.padding[3]+f.borderWidth;break;case"right":l=c-s-f.padding[1]-f.borderWidth;break;default:l=f.x-0,l=isNaN(l)?0:l}var h,p=n.getHeight();switch(f.y){case"top":h=f.padding[0]+f.borderWidth;break;case"bottom":h=p-u-f.padding[2]-f.borderWidth;break;case"center":h=Math.floor((p-u)/2);break;default:h=f.y-0,h=isNaN(h)?0:h}return{x:l,y:h,width:s,height:u}}function m(e){g(e)}function g(e){e&&(r=e,r.title=a.reformOption(r.title),r.title.padding=a.reformCssArray(r.title.padding),f=r.title,f.textStyle=u.merge(f.textStyle,s.textStyle,{overwrite:!1,recursive:!1}),f.subtextStyle=u.merge(f.subtextStyle,s.textStyle,{overwrite:!1,recursive:!1}),a.clear(),h())}function y(){a.clear(),h()}var i=e("./base");i.call(this,n);var s=e("../config"),o=e("zrender/tool/area"),u=e("zrender/tool/util"),a=this;a.type=s.COMPONENT_TYPE_TITLE;var f,l=a.getZlevelBase(),c={};a.init=m,a.refresh=g,a.resize=y,m(r)}return e("../component").define("title",t),t}),r("echarts/component/categoryAxis",["require","./base","../config","zrender/tool/util","zrender/tool/area","../component"],function(e){function t(t,n,r,i){function d(){var e=u.clone(r.data),t=r.axisLabel.formatter,n;for(var i=0,s=e.length;i<s;i++)n=e[i].formatter||t,n&&(typeof n=="function"?typeof e[i].value!="undefined"?e[i].value=n(e[i].value):e[i]=n(e[i]):typeof n=="string"&&(typeof e[i].value!="undefined"?e[i].value=n.replace("{value}",e[i].value):e[i]=n.replace("{value}",e[i])));return e}function v(){var e=r.axisLabel.interval;if(e=="auto"){var t=r.axisLabel.textStyle.fontSize,n=f.getFont(r.axisLabel.textStyle),i=r.data,s=r.data.length;if(r.position=="bottom"||r.position=="top")if(s>3){var o=T(),l=!1,c,h;e=0;while(!l&&e<s){e++,l=!0,c=o*e-10;for(var d=0;d<s;d+=e){r.axisLabel.rotate!==0?h=t:i[d].textStyle?h=a.getTextWidth(p[d].value||p[d],f.getFont(u.merge(i[d].textStyle,r.axisLabel.textStyle,{overwrite:!1,recursive:!0}))):h=a.getTextWidth(p[d].value||p[d],n);if(c<h){l=!1;break}}}}else e=1;else if(s>3){var o=T();e=1;while(o*e-6<t&&e<s)e++}else e=1}else e+=1;return e}function m(){p=d(),h=v(),r.splitArea.show&&E(),r.splitLine.show&&w(),r.axisLine.show&&g(),r.axisTick.show&&y(),r.axisLabel.show&&b();for(var e=0,t=f.shapeList.length;e<t;e++)f.shapeList[e].id=n.newShapeId(f.type),n.addShape(f.shapeList[e])}function g(){var e={shape:"line",zlevel:c+1,hoverable:!1};switch(r.position){case"left":e.style={xStart:l.getX(),yStart:l.getY(),xEnd:l.getX(),yEnd:l.getYend()};break;case"right":e.style={xStart:l.getXend(),yStart:l.getY(),xEnd:l.getXend(),yEnd:l.getYend()};break;case"bottom":e.style={xStart:l.getX(),yStart:l.getYend(),xEnd:l.getXend(),yEnd:l.getYend()};break;case"top":e.style={xStart:l.getX(),yStart:l.getY(),xEnd:l.getXend(),yEnd:l.getY()}}e.style.strokeColor=r.axisLine.lineStyle.color;var t=r.axisLine.lineStyle.width;e.style.lineWidth=t,r.position=="left"||r.position=="right"?e.style.xStart=e.style.xEnd=f.subPixelOptimize(e.style.xEnd,t):e.style.yStart=e.style.yEnd=f.subPixelOptimize(e.style.yEnd,t),e.style.lineType=r.axisLine.lineStyle.type,f.shapeList.push(e)}function y(){var e,t=r.data.length,n=r.axisTick,i=n.length,s=n.lineStyle.color,o=n.lineStyle.width,u=n.interval=="auto"?h:n.interval-0+1,a=n.onGap,p=a?T()/2:typeof a=="undefined"?r.boundaryGap?T()/2:0:0;if(r.position=="bottom"||r.position=="top"){var d=r.position=="bottom"?l.getYend():l.getY()-i,v;for(var m=0;m<t;m+=u)v=f.subPixelOptimize(C(m)+p,o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:v,yStart:d,xEnd:v,yEnd:d+i,strokeColor:s,lineWidth:o}},f.shapeList.push(e)}else{var g=r.position=="left"?l.getX()-i:l.getXend(),y;for(var m=0;m<t;m+=u)y=f.subPixelOptimize(C(m)-p,o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:g,yStart:y,xEnd:g+i,yEnd:y,strokeColor:s,lineWidth:o}},f.shapeList.push(e)}}function b(){var e,t=r.data,n=r.data.length,i=r.axisLabel.rotate,s=r.axisLabel.margin,o=r.axisLabel.textStyle,a;if(r.position=="bottom"||r.position=="top"){var d,v;r.position=="bottom"?(d=l.getYend()+s,v="top"):(d=l.getY()-s,v="bottom");for(var m=0;m<n;m+=h){if((p[m].value||p[m])==="")continue;a=u.merge(t[m].textStyle||{},o,{overwrite:!1}),e={shape:"text",zlevel:c,hoverable:!1,style:{x:C(m),y:d,color:a.color,text:p[m].value||p[m],textFont:f.getFont(a),textAlign:"center",textBaseline:v}},i&&(e.style.textAlign=i>0?r.position=="bottom"?"right":"left":r.position=="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}}else{var g,y;r.position=="left"?(g=l.getX()-s,y="right"):(g=l.getXend()+s,y="left");for(var m=0;m<n;m+=h){if((p[m].value||p[m])==="")continue;a=u.merge(t[m].textStyle||{},o,{overwrite:!1}),e={shape:"text",zlevel:c,hoverable:!1,style:{x:g,y:C(m),color:a.color,text:p[m].value||p[m],textFont:f.getFont(a),textAlign:y,textBaseline:"middle"}},i&&(e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}}}function w(){var e,t=r.data.length,n=r.splitLine,i=n.lineStyle.type,s=n.lineStyle.width,o=n.lineStyle.color;o=o instanceof Array?o:[o];var u=o.length,a=n.onGap,p=a?T()/2:typeof a=="undefined"?r.boundaryGap?T()/2:0:0;if(r.position=="bottom"||r.position=="top"){var d=l.getY(),v=l.getYend(),m;for(var g=0;g<t;g+=h)m=f.subPixelOptimize(C(g)+p,s),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:m,yStart:d,xEnd:m,yEnd:v,strokeColor:o[g/h%u],lineType:i,lineWidth:s}},f.shapeList.push(e)}else{var y=l.getX(),b=l.getXend(),w;for(var g=0;g<t;g+=h)w=f.subPixelOptimize(C(g)-p,s),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:y,yStart:w,xEnd:b,yEnd:w,strokeColor:o[g/h%u],linetype:i,lineWidth:s}},f.shapeList.push(e)}}function E(){var e,t=r.splitArea,n=t.areaStyle.color;n=n instanceof Array?n:[n];var i=n.length,s=r.data.length,o=t.onGap,u=o?T()/2:typeof o=="undefined"?r.boundaryGap?T()/2:0:0;if(r.position=="bottom"||r.position=="top"){var a=l.getY(),p=l.getHeight(),d=l.getX(),v;for(var m=0;m<=s;m+=h)v=m<s?C(m)+u:l.getXend(),e={shape:"rectangle",zlevel:c,hoverable:!1,style:{x:d,y:a,width:v-d,height:p,color:n[m/h%i]}},f.shapeList.push(e),d=v}else{var g=l.getX(),y=l.getWidth(),b=l.getYend(),w;for(var m=0;m<=s;m+=h)w=m<s?C(m)-u:l.getY(),e={shape:"rectangle",zlevel:c,hoverable:!1,style:{x:g,y:w,width:y,height:b-w,color:n[m/h%i]}},f.shapeList.push(e),b=w}}function S(e,t){if(e.data.length<1)return;l=t,x(e)}function x(e){e&&(r=f.reformOption(e),r.axisLabel.textStyle=u.merge(r.axisLabel.textStyle||{},o.textStyle,{overwrite:!1,recursive:!0}),r.axisLabel.textStyle=u.merge(r.axisLabel.textStyle||{},o.textStyle,{overwrite:!1,recursive:!0})),f.clear(),m()}function T(){var e=r.data.length,t=r.position=="bottom"||r.position=="top"?l.getWidth():l.getHeight();return r.boundaryGap?t/e:t/(e>1?e-1:1)}function N(e){var t=r.data,n=t.length,i=T(),s=r.boundaryGap?i/2:0;for(var o=0;o<n;o++){if(t[o]==e||typeof t[o].value!="undefined"&&t[o].value==e)return r.position=="bottom"||r.position=="top"?s=l.getX()+s:s=l.getYend()-s,o===0||o==n-1?s:Math.floor(s);s+=i}}function C(e){if(e<0)return r.position=="bottom"||r.position=="top"?l.getX():l.getYend();if(e>r.data.length-1)return r.position=="bottom"||r.position=="top"?l.getXend():l.getY();var t=T(),n=r.boundaryGap?t/2:0;return n+=e*t,r.position=="bottom"||r.position=="top"?n=l.getX()+n:n=l.getYend()-n,e===0||e==r.data.length-1?n:Math.floor(n)}function k(e){var t=r.data[e];return typeof t!="undefined"&&typeof t.value!="undefined"?t.value:t}function L(e){var t=r.data,n=t.length;for(var i=0;i<n;i++)if(t[i]==e||typeof t[i].value!="undefined"&&t[i].value==e)return i}function A(e){return e%h===0}function O(){return r.position}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("zrender/tool/util"),a=e("zrender/tool/area"),f=this;f.type=o.COMPONENT_TYPE_AXIS_CATEGORY;var l=i.grid,c=f.getZlevelBase(),h,p;f.init=S,f.refresh=x,f.getGap=T,f.getCoord=N,f.getCoordByIndex=C,f.getNameByIndex=k,f.getIndexByName=L,f.isMainAxis=A,f.getPosition=O,S(r,l)}return e("../component").define("categoryAxis",t),t}),r("echarts/component/valueAxis",["require","./base","../config","zrender/tool/util","../component"],function(e){function t(t,n,r,i,s){function g(){d=!1,x();if(!d)return;r.splitArea.show&&S(),r.splitLine.show&&E(),r.axisLine.show&&y(),r.axisTick.show&&b(),r.axisLabel.show&&w();for(var e=0,t=f.shapeList.length;e<t;e++)f.shapeList[e].id=n.newShapeId(f.type),n.addShape(f.shapeList[e])}function y(){var e={shape:"line",zlevel:c+1,hoverable:!1};switch(r.position){case"left":e.style={xStart:l.getX(),yStart:l.getYend(),xEnd:l.getX(),yEnd:l.getY()};break;case"right":e.style={xStart:l.getXend(),yStart:l.getYend(),xEnd:l.getXend(),yEnd:l.getY()};break;case"bottom":e.style={xStart:l.getX(),yStart:l.getYend(),xEnd:l.getXend(),yEnd:l.getYend()};break;case"top":e.style={xStart:l.getX(),yStart:l.getY(),xEnd:l.getXend(),yEnd:l.getY()}}r.name!==""&&(e.style.text=r.name,e.style.textPosition=r.nameLocation,e.style.textFont=f.getFont(r.nameTextStyle),r.nameTextStyle.align&&(e.style.textAlign=r.nameTextStyle.align),r.nameTextStyle.baseline&&(e.style.textBaseline=r.nameTextStyle.baseline),r.nameTextStyle.color&&(e.style.textColor=r.nameTextStyle.color)),e.style.strokeColor=r.axisLine.lineStyle.color;var t=r.axisLine.lineStyle.width;e.style.lineWidth=t,r.position=="left"||r.position=="right"?e.style.xStart=e.style.xEnd=f.subPixelOptimize(e.style.xEnd,t):e.style.yStart=e.style.yEnd=f.subPixelOptimize(e.style.yEnd,t),e.style.lineType=r.axisLine.lineStyle.type,f.shapeList.push(e)}function b(){var e,t=v,n=v.length,i=r.axisTick,s=i.length,o=i.lineStyle.color,u=i.lineStyle.width;if(r.position=="bottom"||r.position=="top"){var a=r.position=="bottom"?l.getYend():l.getY()-s,h;for(var p=0;p<n;p++)h=f.subPixelOptimize(A(t[p]),u),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:h,yStart:a,xEnd:h,yEnd:a+s,strokeColor:o,lineWidth:u}},f.shapeList.push(e)}else{var d=r.position=="left"?l.getX()-s:l.getXend(),m;for(var p=0;p<n;p++)m=f.subPixelOptimize(A(t[p]),u),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:d,yStart:m,xEnd:d+s,yEnd:m,strokeColor:o,lineWidth:u}},f.shapeList.push(e)}}function w(){var e,t=v,n=v.length,i=r.axisLabel.rotate,s=r.axisLabel.margin,o=r.axisLabel.textStyle;if(r.position=="bottom"||r.position=="top"){var u,a;r.position=="bottom"?(u=l.getYend()+s,a="top"):(u=l.getY()-s,a="bottom");for(var h=0;h<n;h++)e={shape:"text",zlevel:c,hoverable:!1,style:{x:A(t[h]),y:u,color:o.color,text:m[h],textFont:f.getFont(o),textAlign:h===0&&r.name!==""?"left":h==n-1&&r.name!==""?"right":"center",textBaseline:a}},i&&(e.style.textAlign=i>0?r.position=="bottom"?"right":"left":r.position=="bottom"?"left":"right",e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}else{var p,d;r.position=="left"?(p=l.getX()-s,d="right"):(p=l.getXend()+s,d="left");for(var h=0;h<n;h++)e={shape:"text",zlevel:c,hoverable:!1,style:{x:p,y:A(t[h]),color:o.color,text:m[h],textFont:f.getFont(o),textAlign:d,textBaseline:h===0&&r.name!==""?"bottom":h==n-1&&r.name!==""?"top":"middle"}},i&&(e.rotation=[i*Math.PI/180,e.style.x,e.style.y]),f.shapeList.push(e)}}function E(){var e,t=v,n=v.length,i=r.splitLine,s=i.lineStyle.type,o=i.lineStyle.width,u=i.lineStyle.color;u=u instanceof Array?u:[u];var a=u.length;if(r.position=="bottom"||r.position=="top"){var h=l.getY(),p=l.getYend(),d;for(var m=0;m<n;m++)d=f.subPixelOptimize(A(t[m]),o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:d,yStart:h,xEnd:d,yEnd:p,strokeColor:u[m%a],lineType:s,lineWidth:o}},f.shapeList.push(e)}else{var g=l.getX(),y=l.getXend(),b;for(var m=0;m<n;m++)b=f.subPixelOptimize(A(t[m]),o),e={shape:"line",zlevel:c,hoverable:!1,style:{xStart:g,yStart:b,xEnd:y,yEnd:b,strokeColor:u[m%a],lineType:s,lineWidth:o}},f.shapeList.push(e)}}function S(){var e,t=r.splitArea.areaStyle.color;if(t instanceof Array){var n=t.length,i=v,s=v.length;if(r.position=="bottom"||r.position=="top"){var o=l.getY(),u=l.getHeight(),a=l.getX(),h;for(var p=0;p<=s;p++)h=p<s?A(i[p]):l.getXend(),e={shape:"rectangle",zlevel:c,hoverable:!1,style:{x:a,y:o,width:h-a,height:u,color:t[p%n]}},f.shapeList.push(e),a=h}else{var d=l.getX(),m=l.getWidth(),g=l.getYend(),y;for(var p=0;p<=s;p++)y=p<s?A(i[p]):l.getY(),e={shape:"rectangle",zlevel:c,hoverable:!1,style:{x:d,y:y,width:m,height:g-y,color:t[p%n]}},f.shapeList.push(e),g=y}}else e={shape:"rectangle",zlevel:c,hoverable:!1,style:{x:l.getX(),y:l.getY(),width:l.getWidth(),height:l.getHeight(),color:t}},f.shapeList.push(e)}function x(){if(isNaN(r.min)||isNaN(r.max)){var e,t={},n,o,a,f=i.legend;for(var l=0,c=s.length;l<c;l++){if(s[l].type!=u.CHART_TYPE_LINE&&s[l].type!=u.CHART_TYPE_BAR&&s[l].type!=u.CHART_TYPE_SCATTER&&s[l].type!=u.CHART_TYPE_K)continue;if(f&&!f.isSelected(s[l].name))continue;o=s[l].xAxisIndex||0,a=s[l].yAxisIndex||0;if(r.xAxisIndex!=o&&r.yAxisIndex!=a)continue;if(!s[l].stack){var v=s[l].name||"";t[v]=[],e=s[l].data;for(var m=0,g=e.length;m<g;m++)n=typeof e[m].value!="undefined"?e[m].value:e[m],s[l].type==u.CHART_TYPE_SCATTER?(r.xAxisIndex!=-1&&t[v].push(n[0]),r.yAxisIndex!=-1&&t[v].push(n[1])):s[l].type==u.CHART_TYPE_K?(t[v].push(n[0]),t[v].push(n[1]),t[v].push(n[2]),t[v].push(n[3])):t[v].push(n)}else{var y="__Magic_Key_Positive__"+s[l].stack,b="__Magic_Key_Negative__"+s[l].stack;t[y]=t[y]||[],t[b]=t[b]||[],e=s[l].data;for(var m=0,g=e.length;m<g;m++){n=typeof e[m].value!="undefined"?e[m].value:e[m];if(n=="-")continue;n-=0,n>=0?typeof t[y][m]!="undefined"?t[y][m]+=n:t[y][m]=n:typeof t[b][m]!="undefined"?t[b][m]+=n:t[b][m]=n}}}for(var l in t){e=t[l];for(var m=0,g=e.length;m<g;m++)if(!isNaN(e[m])){d=!0,h=e[m],p=e[m];break}if(d)break}for(var l in t){e=t[l];for(var m=0,g=e.length;m<g;m++)isNaN(e[m])||(h=Math.min(h,e[m]),p=Math.max(p,e[m]))}}else d=!0;h=isNaN(r.min)?h-Math.abs(h*r.boundaryGap[0]):r.min,p=isNaN(r.max)?p+Math.abs(p*r.boundaryGap[1]):r.max,h==p&&(p===0?p=r.power>0?r.power:1:p>0?h=p/r.splitNumber:p/=r.splitNumber),T(r.scale)}function T(e){var t=r.splitNumber,n=r.precision,i,s;n===0?s=r.power:(s=Math.pow(10,n),h*=s,p*=s,s=r.power);var o;if(h>=0&&p>=0){e||(h=0);while(p/s<t&&s!=1)s/=10;o=p-h,i=Math.ceil(o/t/s)*s,e&&(n===0&&(h=Math.floor(h/i)*i),h+i*t<p&&(i=Math.ceil((p-h)/t/s)*s)),p=h+i*t}else if(h<=0&&p<=0){e||(p=0),s=-s;while(h/s<t&&s!=-1)s/=10;o=h-p,i=-Math.ceil(o/t/s)*s,e&&(n===0&&(p=Math.ceil(p/i)*i),p-i*t>h&&(i=Math.ceil((h-p)/t/s)*s)),h=-i*t+p}else{o=p-h;while(o/s<t&&s!=1)s/=10;var u=Math.round(p/o*t);u-=u==t?1:0,u+=u===0?1:0,i=Math.ceil(Math.max(p/u,h/(u-t))/s)*s,p=i*u,h=i*(u-t)}v=[];for(var a=0;a<=t;a++)v.push(h+i*a);if(n!==0){s=Math.pow(10,n),h=(h/s).toFixed(n)-0,p=(p/s).toFixed(n)-0;for(var a=0;a<=t;a++)v[a]=(v[a]/s).toFixed(n)-0}N()}function N(){m=[];var e=r.axisLabel.formatter;if(e)for(var t=0,n=v.length;t<n;t++)typeof e=="function"?m.push(e(v[t])):typeof e=="string"&&m.push(e.replace("{value}",v[t]));else for(var t=0,n=v.length;t<n;t++)m.push(f.numAddCommas(v[t]))}function C(){return x(),{min:h,max:p}}function k(e,t,n){if(!n||n.length===0)return;l=t,L(e,n)}function L(e,t){e&&(r=f.reformOption(e),r.axisLabel.textStyle=a.merge(r.axisLabel.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),r.axisLabel.textStyle=a.merge(r.axisLabel.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),s=t),n&&(f.clear(),g())}function A(e){e=e<h?h:e,e=e>p?p:e;var t=p-h,n,i;return r.position=="left"||r.position=="right"?(n=l.getHeight(),i=l.getYend()-(e-h)/t*n):(n=l.getWidth(),i=(e-h)/t*n+l.getX()),e==h||e==p?i:Math.floor(i)}function O(){return r.position}var o=e("./base");o.call(this,n);var u=e("../config"),a=e("zrender/tool/util"),f=this;f.type=u.COMPONENT_TYPE_AXIS_VALUE;var l=i.grid,c=f.getZlevelBase(),h,p,d,v,m;f.init=k,f.refresh=L,f.getExtremum=C,f.getCoord=A,f.getPosition=O,k(r,l,s)}return e("../component").define("valueAxis",t),t}),r("echarts/component/axis",["require","./base","../config","./categoryAxis","./valueAxis","../component"],function(e){function t(t,n,r,i,s){function l(e){!e||e instanceof Array&&e.length===0?e=[{type:u.COMPONENT_TYPE_AXIS_VALUE}]:e instanceof Array||(e=[e]),e.length>2&&(e=[e[0],e[1]]);if(s=="xAxis"){if(!e[0].position||e[0].position!="bottom"&&e[0].position!="top")e[0].position="bottom";e.length>1&&(e[1].position=e[0].position=="bottom"?"top":"bottom");for(var t=0,n=e.length;t<n;t++)e[t].type=e[t].type||"category",e[t].xAxisIndex=t,e[t].yAxisIndex=-1}else{if(!e[0].position||e[0].position!="left"&&e[0].position!="right")e[0].position="left";e.length>1&&(e[1].position=e[0].position=="left"?"right":"left");for(var t=0,n=e.length;t<n;t++)e[t].type=e[t].type||"value",e[t].xAxisIndex=-1,e[t].yAxisIndex=t}return e}function c(o,u,c){i=u,s=c,a.clear();var h;s=="xAxis"?(r.xAxis=a.reformOption(o.xAxis),h=r.xAxis):(r.yAxis=l(o.yAxis),h=r.yAxis);var p=e("./categoryAxis"),d=e("./valueAxis");for(var v=0,m=h.length;v<m;v++)f.push(h[v].type=="category"?new p(t,n,h[v],i):new d(t,n,h[v],i,r.series))}function h(e){var t,n;e&&(s=="xAxis"?(r.xAxis=a.reformOption(e.xAxis),t=r.xAxis):(r.yAxis=l(e.yAxis),t=r.yAxis),n=e.series);for(var i=0,o=f.length;i<o;i++)f[i].refresh&&f[i].refresh(t?t[i]:!1,n)}function p(e){return f[e]}function d(){for(var e=0,t=f.length;e<t;e++)f[e].dispose&&f[e].dispose();f=[]}var o=e("./base");o.call(this,n);var u=e("../config"),a=this;a.type=u.COMPONENT_TYPE_AXIS;var f=[];a.clear=d,a.reformOption=l,a.init=c,a.refresh=h,a.getAxis=p,c(r,i,s)}return e("../component").define("axis",t),t}),r("echarts/component/grid",["require","./base","../config","../component"],function(e){function t(t,n,r){function d(e){r=e,r.grid=o.reformOption(r.grid);var t=r.grid;h=n.getWidth(),p=n.getHeight(),a=o.parsePercent(t.x,h),f=o.parsePercent(t.y,p);var i=o.parsePercent(t.x2,h),s=o.parsePercent(t.y2,p);typeof t.width=="undefined"?l=h-a-i:l=o.parsePercent(t.width,h),typeof t.height=="undefined"?c=p-f-s:c=o.parsePercent(t.height,p),a=o.subPixelOptimize(a,t.borderWidth),f=o.subPixelOptimize(f,t.borderWidth),o.shapeList.push({shape:"rectangle",id:n.newShapeId("grid"),zlevel:u,hoverable:!1,style:{x:a,y:f,width:l,height:c,brushType:t.borderWidth>0?"both":"fill",color:t.backgroundColor,strokeColor:t.borderColor,lineWidth:t.borderWidth}}),n.addShape(o.shapeList[0])}function v(){return a}function m(){return f}function g(){return l}function y(){return c}function b(){return a+l}function w(){return f+c}function E(){return{x:a,y:f,width:l,height:c}}function S(e){if(h!=n.getWidth()||p!=n.getHeight()||e)o.clear(),d(e||r)}var i=e("./base");i.call(this,n);var s=e("../config"),o=this;o.type=s.COMPONENT_TYPE_GRID;var u=o.getZlevelBase(),a,f,l,c,h,p;o.init=d,o.getX=v,o.getY=m,o.getWidth=g,o.getHeight=y,o.getXend=b,o.getYend=w,o.getArea=E,o.refresh=S,d(r)}return e("../component").define("grid",t),t}),r("echarts/component/dataZoom",["require","./base","../config","../component","zrender/tool/util","../component"],function(e){function t(t,n,r,i){function w(){N(),C(),k(),L();for(var e=0,t=u.shapeList.length;e<t;e++)u.shapeList[e].id=n.newShapeId(u.type),n.addShape(u.shapeList[e]);D()}function E(){var e,t,r,s,o=i.grid;return f.orient=="horizontal"?(r=f.width||o.getWidth(),s=f.height||l,e=typeof f.x!="undefined"?f.x:o.getX(),t=typeof f.y!="undefined"?f.y:n.getHeight()-s):(r=f.width||l,s=f.height||o.getHeight(),e=typeof f.x!="undefined"?f.x:0,t=typeof f.y!="undefined"?f.y:o.getY()),{x:e,y:t,width:r,height:s}}function S(){var e=r.series,t=r.xAxis;t&&!(t instanceof Array)&&(t=[t],r.xAxis=t);var n=r.yAxis;n&&!(n instanceof Array)&&(n=[n],r.yAxis=n);var i=[],s,u,a=f.xAxisIndex;if(t&&typeof a=="undefined"){s=[];for(var l=0,c=t.length;l<c;l++)(t[l].type=="category"||typeof t[l].type=="undefined")&&s.push(l)}else a instanceof Array?s=a:typeof a!="undefined"?s=[a]:s=[];a=f.yAxisIndex;if(n&&typeof a=="undefined"){u=[];for(var l=0,c=n.length;l<c;l++)n[l].type=="category"&&u.push(l)}else a instanceof Array?u=a:typeof a!="undefined"?u=[a]:u=[];for(var l=0,c=e.length;l<c;l++){if(e[l].type!=o.CHART_TYPE_LINE&&e[l].type!=o.CHART_TYPE_BAR&&e[l].type!=o.CHART_TYPE_SCATTER&&e[l].type!=o.CHART_TYPE_K)continue;for(var p=0,d=s.length;p<d;p++)if(s[p]==(e[l].xAxisIndex||0)){i.push(l);break}for(var p=0,d=u.length;p<d;p++)if(u[p]==(e[l].yAxisIndex||0)){i.push(l);break}e[l].type==o.CHART_TYPE_SCATTER&&typeof f.xAxisIndex=="undefined"&&typeof f.yAxisIndex=="undefined"&&i.push(l)}var v=typeof f.start!="undefined"&&f.start>=0&&f.start<=100?f.start:0,m=typeof f.end!="undefined"&&f.end>=0&&f.end<=100?f.end:100;v>m&&(v+=m,m=v-m,v-=m);var g=Math.round((m-v)/100*(f.orient=="horizontal"?h.width:h.height));return{start:v,end:m,start2:0,end2:100,size:g,xAxisIndex:s,yAxisIndex:u,seriesIndex:i}}function x(){b={xAxis:{},yAxis:{},series:{}};var e=r.xAxis,t=p.xAxisIndex;for(var n=0,i=t.length;n<i;n++)b.xAxis[t[n]]=e[t[n]].data;var s=r.yAxis,u=p.yAxisIndex;for(var n=0,i=u.length;n<i;n++)b.yAxis[u[n]]=s[u[n]].data;var a=r.series,f=p.seriesIndex,l;for(var n=0,i=f.length;n<i;n++)l=a[f[n]],b.series[f[n]]=l.data,l.type==o.CHART_TYPE_SCATTER&&T(f[n])}function T(t){p.scatterMap=p.scatterMap||{},p.scatterMap[t]=p.scatterMap[t]||{};var n=e("../component"),s=e("zrender/tool/util"),o=n.get("axis"),u=s.clone(r.xAxis);u instanceof Array?(u[0].type="value",u[1]&&(u[1].type="value")):u.type="value";var a=new o(null,!1,{xAxis:u,series:r.series},i,"xAxis"),f=r.series[t].xAxisIndex||0;p.scatterMap[t].x=a.getAxis(f).getExtremum(),a.dispose(),u=s.clone(r.yAxis),u instanceof Array?(u[0].type="value",u[1]&&(u[1].type="value")):u.type="value",a=new o(null,!1,{yAxis:u,series:r.series},i,"yAxis"),f=r.series[t].yAxisIndex||0,p.scatterMap[t].y=a.getAxis(f).getExtremum(),a.dispose()}function N(){u.shapeList.push({shape:"rectangle",zlevel:a,hoverable:!1,style:{x:h.x,y:h.y,width:h.width,height:h.height,color:f.backgroundColor}})}function C(){u.shapeList.push({shape:"rectangle",zlevel:a,hoverable:!1,style:{x:h.x,y:h.y,width:h.width,height:h.height,color:f.backgroundColor}});var e=0,t=r.xAxis,n=p.xAxisIndex;for(var i=0,s=n.length;i<s;i++)e=Math.max(e,t[n[i]].data.length);var l=r.yAxis,c=p.yAxisIndex;for(var i=0,s=c.length;i<s;i++)e=Math.max(e,l[c[i]].data.length);var d=r.series[p.seriesIndex[0]].data,v=Number.MIN_VALUE,m=Number.MAX_VALUE,g;for(var i=0,s=d.length;i<s;i++)g=typeof d[i]!="undefined"?typeof d[i].value!="undefined"?d[i].value:d[i]:0,r.series[p.seriesIndex[0]].type==o.CHART_TYPE_K&&(g=g[1]),isNaN(g)&&(g=0),v=Math.max(v,g),m=Math.min(m,g);var y=[],b=h.width/e,w=h.height/e;for(var i=0,s=e;i<s;i++)g=typeof d[i]!="undefined"?typeof d[i].value!="undefined"?d[i].value:d[i]:0,r.series[p.seriesIndex[0]].type==o.CHART_TYPE_K&&(g=g[1]),isNaN(g)&&(g=0),f.orient=="horizontal"?y.push([h.x+b*i,h.y+h.height-5-Math.round((g-m)/(v-m)*(h.height-10))]):y.push([h.x+5+Math.round((g-m)/(v-m)*(h.width-10)),h.y+w*i]);f.orient=="horizontal"?(y.push([h.x+h.width,h.y+h.height]),y.push([h.x,h.y+h.height])):(y.push([h.x,h.y+h.height]),y.push([h.x,h.y])),u.shapeList.push({shape:"polygon",zlevel:a,style:{pointList:y,color:f.dataBackgroundColor},hoverable:!1})}function k(){d={shape:"rectangle",zlevel:a,draggable:!0,ondrift:A,ondragend:H,_type:"filler"},f.orient=="horizontal"?d.style={x:h.x+Math.round(p.start/100*h.width)+c,y:h.y+3,width:p.size-c*2,height:h.height-6,color:f.fillerColor,text:":::",textPosition:"inside"}:d.style={x:h.x+3,y:h.y+Math.round(p.start/100*h.height)+c,width:h.width-6,height:p.size-c*2,color:f.fillerColor,text:"=",textPosition:"inside"},u.shapeList.push(d)}function L(){v={shape:"rectangle",zlevel:a},m={shape:"rectangle",zlevel:a},v.draggable=!0,v.ondrift=A,v.ondragend=H,m.draggable=!0,m.ondrift=A,m.ondragend=H,f.orient=="horizontal"?(v.style={x:d.style.x-c,y:h.y,width:c,height:h.height,color:f.handleColor,text:"|",textPosition:"inside"},m.style={x:d.style.x+d.style.width,y:h.y,width:c,height:h.height,color:f.handleColor,text:"|",textPosition:"inside"}):(v.style={x:h.x,y:d.style.y-c,width:h.width,height:c,color:f.handleColor,text:"—",textPosition:"inside"},m.style={x:h.x,y:d.style.y+d.style.height,width:h.width,height:c,color:f.handleColor,text:"—",textPosition:"inside"}),u.shapeList.push(v),u.shapeList.push(m)}function A(e,t,n){f.zoomLock&&(e=d);var r=e._type=="filler"?c:0;return f.orient=="horizontal"?e.style.x+t-r<=h.x?e.style.x=h.x+r:e.style.x+t+e.style.width+r>=h.x+h.width?e.style.x=h.x+h.width-e.style.width-r:e.style.x+=t:e.style.y+n-r<=h.y?e.style.y=h.y+r:e.style.y+n+e.style.height+r>=h.y+h.height?e.style.y=h.y+h.height-e.style.height-r:e.style.y+=n,e._type=="filler"?O():M(),f.realtime?D():(clearTimeout(g),g=setTimeout(D,200)),!0}function O(){f.orient=="horizontal"?(v.style.x=d.style.x-c,m.style.x=d.style.x+d.style.width,p.start=Math.floor((v.style.x-h.x)/h.width*100),p.end=Math.ceil((m.style.x+c-h.x)/h.width*100)):(v.style.y=d.style.y-c,m.style.y=d.style.y+d.style.height,p.start=Math.floor((v.style.y-h.y)/h.height*100),p.end=Math.ceil((m.style.y+c-h.y)/h.height*100)),n.modShape(v.id,v),n.modShape(m.id,m),n.refresh()}function M(){var e,t;f.orient=="horizontal"?(e=v.style.x,t=m.style.x,d.style.x=Math.min(e,t)+c,d.style.width=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.x)/h.width*100),p.end=Math.ceil((Math.max(e,t)+c-h.x)/h.width*100)):(e=v.style.y,t=m.style.y,d.style.y=Math.min(e,t)+c,d.style.height=Math.abs(e-t)-c,p.start=Math.floor((Math.min(e,t)-h.y)/h.height*100),p.end=Math.ceil((Math.max(e,t)+c-h.y)/h.height*100)),n.modShape(d.id,d),n.refresh()}function _(){if(!f.show)return;f.orient=="horizontal"?(v.style.x=h.x+p.start/100*h.width,m.style.x=h.x+p.end/100*h.width-c,d.style.x=v.style.x+c,d.style.width=m.style.x-v.style.x-c):(v.style.y=h.y+p.start/100*h.height,m.style.y=h.y+p.end/100*h.height-c,d.style.y=v.style.y+c,d.style.height=m.style.y-v.style.y-c),n.modShape(v.id,v),n.modShape(m.id,m),n.modShape(d.id,d),n.refresh()}function D(e){var n,i,s,u,a;for(var l in b){n=b[l];for(var c in n)a=n[c],u=a.length,i=Math.floor(p.start/100*u),s=Math.ceil(p.end/100*u),r[l][c].type!=o.CHART_TYPE_SCATTER?r[l][c].data=a.slice(i,s):r[l][c].data=P(c,a)}!y&&(f.realtime||e)&&t.dispatch(o.EVENT.DATA_ZOOM,null,{zoom:p}),f.start=p.start,f.end=p.end}function P(e,t){var n=[],r=p.scatterMap[e],i,s,o,u,a;f.orient=="horizontal"?(i=r.x.max-r.x.min,s=p.start/100*i+r.x.min,o=p.end/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start2/100*i+r.y.min,a=p.end2/100*i+r.y.min):(i=r.x.max-r.x.min,s=p.start2/100*i+r.x.min,o=p.end2/100*i+r.x.min,i=r.y.max-r.y.min,u=p.start/100*i+r.y.min,a=p.end/100*i+r.y.min);var l;for(var c=0,h=t.length;c<h;c++)l=t[c].value||t[c],l[0]>=s&&l[0]<=o&&l[1]>=u&&l[1]<=a&&n.push(t[c]);return n}function H(){u.isDragend=!0}function B(e,n){if(!u.isDragend||!e.target)return;D(),n.dragOut=!0,n.dragIn=!0,!y&&!f.realtime&&t.dispatch(o.EVENT.DATA_ZOOM,null,{zoom:p}),n.needRefresh=!1,u.isDragend=!1;return}function j(e,t){t.needRefresh=!0;return}function F(e){f.start=p.start=e.start,f.end=p.end=e.end,f.start2=p.start2=e.start2,f.end2=p.end2=e.end2,_(),D(!0);return}function I(e){if(!e)return f.start=f.start2=p.start=p.start2=0,f.end=f.end2=p.end=p.end2=100,_(),D(!0),p;var t=i.grid.getArea(),n={x:e.x,y:e.y,width:e.width,height:e.height};n.width<0&&(n.x+=n.width,n.width=-n.width),n.height<0&&(n.y+=n.height,n.height=-n.height);if(n.x>t.x+t.width||n.y>t.y+t.height)return!1;n.x<t.x&&(n.x=t.x),n.x+n.width>t.x+t.width&&(n.width=t.x+t.width-n.x),n.y+n.height>t.y+t.height&&(n.height=t.y+t.height-n.y);var r,s=(n.x-t.x)/t.width,o=1-(n.x+n.width-t.x)/t.width,u=1-(n.y+n.height-t.y)/t.height,a=(n.y-t.y)/t.height;return f.orient=="horizontal"?(r=p.end-p.start,p.start+=r*s,p.end-=r*o,r=p.end2-p.start2,p.start2+=r*u,p.end2-=r*a):(r=p.end-p.start,p.start+=r*u,p.end-=r*a,r=p.end2-p.start2,p.start2+=r*s,p.end2-=r*o),f.start=p.start,f.end=p.end,f.start2=p.start2,f.end2=p.end2,_(),D(!0),p}function q(e,t){var n,r=b.series,i=e.series,s;for(var o=0,u=i.length;o<u;o++){s=i[o].data,r[o]?n=Math.floor(p.start/100*r[o].length):n=0;for(var a=0,f=s.length;a<f;a++)t.series[o].data[a+n]=s[a],r[o]&&(r[o][a+n]=s[a])}}function R(e){y=e}function U(e,t){if(!b)return t;var n=b.series;return n[e]?Math.floor(p.start/100*n[e].length)+t:-1}function z(e){r=e,r.dataZoom=u.reformOption(r.dataZoom),f=r.dataZoom,u.clear();if(r.dataZoom.show||u.query(r,"toolbox.show")&&u.query(r,"toolbox.feature.dataZoom"))h=E(),p=S(),x();r.dataZoom.show&&w()}function W(){u.clear();if(r.dataZoom.show||u.query(r,"toolbox.show")&&u.query(r,"toolbox.feature.dataZoom"))h=E(),p=S();if(r.dataZoom.show){N(),C(),k(),L();for(var e=0,t=u.shapeList.length;e<t;e++)u.shapeList[e].id=n.newShapeId(u.type),n.addShape(u.shapeList[e])}}var s=e("./base");s.call(this,n);var o=e("../config"),u=this;u.type=o.COMPONENT_TYPE_DATAZOOM;var a=u.getZlevelBase(),f,l=30,c=10,h,p,d,v,m,g,y=!1,b;u.init=z,u.resize=W,u.syncBackupData=q,u.absoluteZoom=F,u.rectZoom=I,u.ondragend=B,u.ondataZoom=j,u.silence=R,u.getRealDataIndex=U,z(r)}return e("../component").define("dataZoom",t),t}),r("echarts/component/legend",["require","./base","../config","zrender/tool/area","zrender/shape","zrender/shape","zrender/shape","zrender/shape","zrender/shape","../component"],function(e){function t(t,r,i,s){function y(){h=S(),E(),b();for(var e=0,t=f.shapeList.length;e<t;e++)f.shapeList[e].id=r.newShapeId(f.type),r.addShape(f.shapeList[e])}function b(){var e=l.data,t=e.length,n,i,s,o,u=f.getFont(l.textStyle),p=r.getWidth(),d=r.getHeight(),m=h.x,g=h.y,y=l.itemWidth,b=l.itemHeight,E=l.itemGap,S;l.orient=="vertical"&&l.x=="right"&&(m=h.x+h.width-y);for(var C=0;C<t;C++){n=e[C];if(n===""){l.orient=="horizontal"?(m=h.x,g+=b+E):(l.x=="right"?m-=h.maxWidth+E:m+=h.maxWidth+E,g=h.y);continue}i=x(n),i?i=i.type:i="bar",S=A(n),l.orient=="horizontal"?p-m<200&&y+5+a.getTextWidth(n,u)+(C==t-1||e[C+1]===""?0:E)>=p-m&&(m=h.x,g+=b+E):d-g<200&&b+(C==t-1||e[C+1]===""?0:E)>=d-g&&(l.x=="right"?m-=h.maxWidth+E:m+=h.maxWidth+E,g=h.y),s=T(m,g,y,b,v[n]?S:"#ccc",i),s._name=n,l.selectedMode&&(s.onclick=N),f.shapeList.push(s),o={shape:"text",zlevel:c,style:{x:m+y+5,y:g,color:v[n]?l.textStyle.color:"#ccc",text:n,textFont:u,textBaseline:"top"},hoverable:l.selectedMode,clickable:l.selectedMode},l.orient=="vertical"&&l.x=="right"&&(o.style.x-=y+10,o.style.textAlign="right"),o._name=n,l.selectedMode&&(o.onclick=N),f.shapeList.push(o),l.orient=="horizontal"?m+=y+5+a.getTextWidth(n,u)+E:g+=b+E}l.orient=="horizontal"&&l.x=="center"&&g!=h.y&&w()}function w(){var e=f.getFont(l.textStyle),t=[],n=h.x;for(var r=2,i=f.shapeList.length;r<i;r++)f.shapeList[r].style.x==n?t.push((h.width-(f.shapeList[r-1].style.x+a.getTextWidth(f.shapeList[r-1].style.text,e)-n))/2):r==i-1&&t.push((h.width-(f.shapeList[r].style.x+a.getTextWidth(f.shapeList[r].style.text,e)-n))/2);var s=-1;for(var r=1,i=f.shapeList.length;r<i;r++){f.shapeList[r].style.x==n&&s++;if(t[s]===0)continue;f.shapeList[r].style.x+=t[s]}}function E(){var e=l.padding[0],t=l.padding[1],n=l.padding[2],r=l.padding[3];f.shapeList.push({shape:"rectangle",zlevel:c,hoverable:!1,style:{x:h.x-r,y:h.y-e,width:h.width+r+t,height:h.height+e+n,brushType:l.borderWidth===0?"fill":"both",color:l.backgroundColor,strokeColor:l.borderColor,lineWidth:l.borderWidth}})}function S(){var e=l.data,t=e.length,n=l.itemGap,i=l.itemWidth+5,s=l.itemHeight,o=f.getFont(l.textStyle),u=0,c=0,h=l.padding,p=r.getWidth()-h[1]-h[3],d=r.getHeight()-h[0]-h[2],v=0,m=0;if(l.orient=="horizontal"){c=s;for(var g=0;g<t;g++){if(e[g]===""){v-=n,v>p?(u=p,c+=s+n):u=Math.max(u,v),c+=s+n,v=0;continue}v+=i+a.getTextWidth(e[g],o)+n}c=Math.max(c,s),v-=n,v>p?(u=p,c+=s+n):u=Math.max(u,v)}else{for(var g=0;g<t;g++)m=Math.max(m,a.getTextWidth(e[g],o));m+=i,u=m;for(var g=0;g<t;g++){if(e[g]===""){v-=n,v>d?(c=d,u+=m+n):c=Math.max(c,v),u+=m+n,v=0;continue}v+=s+n}u=Math.max(u,m),v-=n,v>d?(c=d,u+=m+n):c=Math.max(c,v)}p=r.getWidth(),d=r.getHeight();var y;switch(l.x){case"center":y=Math.floor((p-u)/2);break;case"left":y=l.padding[3]+l.borderWidth;break;case"right":y=p-u-l.padding[1]-l.padding[3]-l.borderWidth*2;break;default:y=l.x-0,y=isNaN(y)?0:y}var b;switch(l.y){case"top":b=l.padding[0]+l.borderWidth;break;case"bottom":b=d-c-l.padding[0]-l.padding[2]-l.borderWidth*2;break;case"center":b=Math.floor((d-c)/2);break;default:b=l.y-0,b=isNaN(b)?0:b}return{x:y,y:b,width:u,height:c,maxWidth:m}}function x(e){var t=i.series,n,r;for(var s=0,o=t.length;s<o;s++){if(t[s].name==e)return t[s];if(t[s].type==u.CHART_TYPE_PIE||t[s].type==u.CHART_TYPE_RADAR||t[s].type==u.CHART_TYPE_CHORD){n=!1,r=t[s].data;for(var a=0,f=r.length;a<f;a++)if(r[a].name==e){r=r[a],r.type=t[s].type==u.CHART_TYPE_CHORD?u.CHART_TYPE_PIE:t[s].type,n=!0;break}if(n)return r}else if(t[s].type==u.CHART_TYPE_FORCE){n=!1,r=t[s].categories;for(var a=0,f=r.length;a<f;a++)if(r[a].name==e){r=r[a],r.type=u.CHART_TYPE_FORCE,n=!0;break}if(n)return r}}return}function T(e,t,n,r,i,s){var o={shape:"icon",zlevel:c,style:{iconType:"legendicon"+s,x:e,y:t,width:n,height:r,color:i,strokeColor:i,lineWidth:3},hoverable:l.selectedMode,clickable:l.selectedMode};switch(s){case"line":o.style.brushType="stroke";break;case"k":o.style.brushType="both",o.style.color=f.query(u,"k.itemStyle.normal.color")||"#fff",o.style.strokeColor=i!="#ccc"?f.query(u,"k.itemStyle.normal.lineStyle.color")||"#ff3200":i}return o}function N(e){var n=e.target._name;v[n]=!v[n],t.dispatch(u.EVENT.LEGEND_SELECTED,e.event,{selected:v})}function C(e){if(!f.query(e,"legend.data"))return;i=e,i.legend=f.reformOption(i.legend),i.legend.padding=f.reformCssArray(i.legend.padding),l=i.legend,f.clear(),v={};var t=l.data||[],n,r,o;for(var a=0,c=t.length;a<c;a++){n=t[a];if(n==="")continue;r=x(n),r?(o=f.query(r,"itemStyle.normal.color"),o&&r.type!=u.CHART_TYPE_K&&L(n,o),v[n]=!0):v[n]=!1}if(s)for(var h in s)v[h]=s[h];y()}function k(e){if(e){i=e,i.legend=f.reformOption(i.legend),i.legend.padding=f.reformCssArray(i.legend.padding);if(i.legend.selected)for(var t in i.legend.selected)v[t]=i.legend.selected[t]}l=i.legend,f.clear(),y()}function L(e,t){d[e]=t}function A(e){return d[e]||(d[e]=r.getColor(p++)),d[e]}function O(e){return d[e]?d[e]:!1}function M(e,t){l.data.push(e),L(e,t),v[e]=!0}function _(e){var t=l.data,n=[],r=!1;for(var i=0,s=t.length;i<s;i++){if(!r&&t[i]==e){r=!0;continue}n.push(t[i])}l.data=n}function D(e){if(typeof e=="undefined")return;var t;for(var n=0,r=f.shapeList.length;n<r;n++){t=f.shapeList[n];if(t._name==e&&t.shape!="text")return t}}function P(e,t){var n;for(var i=0,s=f.shapeList.length;i<s;i++)n=f.shapeList[i],n._name==e&&n.shape!="text"&&(v[e]||(t.style.color="#ccc",t.style.strokeColor="#ccc"),r.modShape(n.id,t))}function H(e){return typeof v[e]!="undefined"?v[e]:!0}function B(){return v}var o=e("./base");o.call(this,r);var u=e("../config"),a=e("zrender/tool/area"),f=this;f.type=u.COMPONENT_TYPE_LEGEND;var l,c=f.getZlevelBase(),h={},p=0,d={},v={},m=e("zrender/shape").get("icon");for(var g in n)m.define("legendicon"+g,n[g]);f.init=C,f.refresh=k,f.setColor=L,f.getColor=A,f.hasColor=O,f.add=M,f.del=_,f.getItemShape=D,f.setItemShape=P,f.isSelected=H,f.getSelectedMap=B,C(i)}var n={line:function(e,t){var n=t.height/2;e.moveTo(t.x,t.y+n),e.lineTo(t.x+t.width,t.y+n)},pie:function(t,n){var r=n.x,i=n.y,s=n.width,o=n.height,u=e("zrender/shape").get("sector");u.buildPath(t,{x:r+s/2,y:i+o+2,r:o+2,r0:6,startAngle:45,endAngle:135})},chord:function(t,n){var r=n.x,i=n.y,s=n.width,o=n.height,u=e("zrender/shape").get("beziercurve");t.moveTo(r,i+o),u.buildPath(t,{xStart:r,yStart:i+o,cpX1:r+s,cpY1:i+o,cpX2:r,cpY2:i+4,xEnd:r+s,yEnd:i+4}),t.lineTo(r+s,i),u.buildPath(t,{xStart:r+s,yStart:i,cpX1:r,cpY1:i,cpX2:r+s,cpY2:i+o-4,xEnd:r,yEnd:i+o-4}),t.lineTo(r,i+o)},k:function(t,n){var r=n.x,i=n.y,s=n.width,o=n.height,u=e("zrender/shape").get("candle");u.buildPath(t,{x:r+s/2,y:[i+1,i+1,i+o-6,i+o],width:s-6})},bar:function(e,t){var n=t.x,r=t.y+1,i=t.width,s=t.height-2,o=3;e.moveTo(n+o,r),e.lineTo(n+i-o,r),e.quadraticCurveTo(n+i,r,n+i,r+o),e.lineTo(n+i,r+s-o),e.quadraticCurveTo(n+i,r+s,n+i-o,r+s),e.lineTo(n+o,r+s),e.quadraticCurveTo(n,r+s,n,r+s-o),e.lineTo(n,r+o),e.quadraticCurveTo(n,r,n+o,r)},force:function(t,n){e("zrender/shape").get("icon").get("circle")(t,n)},radar:function(e,t){var n=6,r=t.x+t.width/2,i=t.y+t.height/2,s=t.height/2,o=2*Math.PI/n,u=-Math.PI/2,a=r+s*Math.cos(u),f=i+s*Math.sin(u);e.moveTo(a,f),u+=o;for(var l=0,c=n-1;l<c;l++)e.lineTo(r+s*Math.cos(u),i+s*Math.sin(u)),u+=o;e.lineTo(a,f)}};return e("../component").define("legend",t),t}),r("echarts/component/dataRange",["require","./base","../config","zrender/tool/area","zrender/tool/color","zrender/tool/color","../component"],function(e){function t(t,n,r){function T(){l=M(),O(),a.splitNumber<=0||a.calculable?C():N();for(var e=0,t=u.shapeList.length;e<t;e++)u.shapeList[e].id=n.newShapeId(u.type),n.addShape(u.shapeList[e]);j()}function N(){var e=S,t=e.length,n,r,i,s=u.getFont(a.textStyle),c=l.x,h=l.y,p=a.itemWidth,d=a.itemHeight,v=a.itemGap,m=o.getTextHeight("国",s),g;a.orient=="vertical"&&a.x=="right"&&(c=l.x+l.width-p);var y=!0;a.text&&(y=!1,a.text[0]&&(i=_(c,h,a.text[0]),a.orient=="horizontal"?c+=o.getTextWidth(a.text[0],s)+b:(h+=m+b,i.style.y+=m/2+b,i.style.textBaseline="bottom"),u.shapeList.push(i)));for(var E=0;E<t;E++)n=e[E],g=X((t-E)*w+a.min),r=D(c,h,p,d,x[E]?g:"#ccc"),r._idx=E,r.onclick=U,u.shapeList.push(r),y&&(i={shape:"text",zlevel:f,style:{x:c+p+5,y:h,color:x[E]?a.textStyle.color:"#ccc",text:e[E],textFont:s,textBaseline:"top"},clickable:!0},a.orient=="vertical"&&a.x=="right"&&(i.style.x-=p+10,i.style.textAlign="right"),i._idx=E,i.onclick=U,u.shapeList.push(i)),a.orient=="horizontal"?c+=p+(y?5:0)+(y?o.getTextWidth(n,s):0)+v:h+=d+v;!y&&a.text[1]&&(a.orient=="horizontal"?c=c-v+b:h=h-v+b,i=_(c,h,a.text[1]),a.orient!="horizontal"&&(i.style.y-=5,i.style.textBaseline="top"),u.shapeList.push(i))}function C(){var t,n,r=u.getFont(a.textStyle),i=l.x,s=l.y,h=a.itemWidth,p=a.itemHeight,d=o.getTextHeight("国",r),v=!0;a.text&&(v=!1,a.text[0]&&(n=_(i,s,a.text[0]),a.orient=="horizontal"?i+=o.getTextWidth(a.text[0],r)+b:(s+=d+b,n.style.y+=d/2+b,n.style.textBaseline="bottom"),u.shapeList.push(n)));var m=e("zrender/tool/color"),g=1/(a.color.length-1),y=[];for(var w=0,E=a.color.length;w<E;w++)y.push([w*g,a.color[w]]);a.orient=="horizontal"?(t={shape:"rectangle",zlevel:f,style:{x:i,y:s,width:h*10,height:p,color:m.getLinearGradient(i,s,i+h*10,s,y)},hoverable:!1},i+=h*10+b):(t={shape:"rectangle",zlevel:f,style:{x:i,y:s,width:h,height:p*10,color:m.getLinearGradient(i,s,i,s+p*10,y)},hoverable:!1},s+=p*10+b),u.shapeList.push(t),a.calculable&&(c=t.style,k(),A(),L()),!v&&a.text[1]&&(n=_(i,s,a.text[1]),u.shapeList.push(n))}function k(){m={shape:"rectangle",zlevel:f+1,style:{x:c.x,y:c.y,width:c.width,height:c.height,color:"rgba(255,255,255,0)"},draggable:!0,ondrift:P,ondragend:H,_type:"filler"},u.shapeList.push(m)}function L(){var e=c.x,t=c.y,n=c.width,r=c.height,i=u.getFont(a.textStyle),s=o.getTextHeight("国",i),l=Math.max(o.getTextWidth(a.precision===0?a.max:a.max.toFixed(a.precision),i),o.getTextWidth(a.precision===0?a.min:a.min.toFixed(a.precision),i))+2,p,v,m,g,y,b;a.orient=="horizontal"?a.y!="bottom"?(p=[[e,t],[e,t+r+s/2*3],[e-l,t+r+s/2*3],[e-l,t+r+s/2],[e-s/2,t+r+s/2],[e-1,t+r],[e-1,t]],v=e-l/2,m=t+r+s,g=[[e+n,t],[e+n,t+r+s/2*3],[e+n+l,t+r+s/2*3],[e+n+l,t+r+s/2],[e+n+s/2,t+r+s/2],[e+n+1,t+r],[e+n+1,t]],y=e+n+l/2,b=m):(p=[[e,t+r],[e,t-s/2*3],[e-l,t-s/2*3],[e-l,t-s/2],[e-s/2,t-s/2],[e-1,t],[e-1,t+r]],v=e-l/2,m=t-s,g=[[e+n,t+r],[e+n,t-s/2*3],[e+n+l,t-s/2*3],[e+n+l,t-s/2],[e+n+s/2,t-s/2],[e+n+1,t],[e+n+1,t+r]],y=e+n+l/2,b=m):(l+=s,a.x!="right"?(p=[[e,t],[e+n+l,t],[e+n+l,t-s],[e+n+s,t-s],[e+n,t-1],[e,t-1]],v=e+n+l/2+s/2,m=t-s/2,g=[[e,t+r],[e+n+l,t+r],[e+n+l,t+s+r],[e+n+s,t+s+r],[e+n,t+1+r],[e,t+r+1]],y=v,b=t+r+s/2):(p=[[e+n,t],[e-l,t],[e-l,t-s],[e-s,t-s],[e,t-1],[e+n,t-1]],v=e-l/2-s/2,m=t-s/2,g=[[e+n,t+r],[e-l,t+r],[e-l,t+s+r],[e-s,t+s+r],[e,t+1+r],[e+n,t+r+1]],y=v,b=t+r+s/2)),h={shape:"polygon",zlevel:f+1,style:{pointList:p,text:a.max+"",textX:v,textY:m,textPosition:"specific",textAlign:"center",textBaseline:"middle",textColor:a.textStyle.color,color:X(a.max),width:0,height:0,x:p[0][0],y:p[0][1],_x:p[0][0],_y:p[0][1]},draggable:!0,ondrift:P,ondragend:H},d={shape:"polygon",zlevel:f+1,style:{pointList:g,text:a.min+"",textX:y,textY:b,textPosition:"specific",textAlign:"center",textBaseline:"middle",textColor:a.textStyle.color,color:X(a.min),width:0,height:0,x:g[0][0],y:g[0][1],_x:g[0][0],_y:g[0][1]},draggable:!0,ondrift:P,ondragend:H},u.shapeList.push(h),u.shapeList.push(d)}function A(){var e=c.x,t=c.y,n=c.width,r=c.height;p={shape:"rectangle",zlevel:f+1,style:{x:e,y:t,width:a.orient=="horizontal"?0:n,height:a.orient=="horizontal"?r:0,color:"#ccc"},hoverable:!1},v={shape:"rectangle",zlevel:f+1,style:{x:a.orient=="horizontal"?e+n:e,y:a.orient=="horizontal"?t:t+r,width:a.orient=="horizontal"?0:n,height:a.orient=="horizontal"?r:0,color:"#ccc"},hoverable:!1},u.shapeList.push(p),u.shapeList.push(v)}function O(){var e=a.padding[0],t=a.padding[1],n=a.padding[2],r=a.padding[3];u.shapeList.push({shape:"rectangle",zlevel:f,hoverable:!1,style:{x:l.x-r,y:l.y-e,width:l.width+r+t,height:l.height+e+n,brushType:a.borderWidth===0?"fill":"both",color:a.backgroundColor,strokeColor:a.borderColor,lineWidth:a.borderWidth}})}function M(){var e=S,t=e.length,r=a.itemGap,i=a.itemWidth,s=a.itemHeight,f=0,l=0,c=u.getFont(a.textStyle),h=o.getTextHeight("国",c);if(a.orient=="horizontal"){if(a.text||a.splitNumber<=0||a.calculable)f=(a.splitNumber<=0||a.calculable?i*10+r:t*(i+r))+(a.text&&typeof a.text[0]!="undefined"?o.getTextWidth(a.text[0],c)+b:0)+(a.text&&typeof a.text[1]!="undefined"?o.getTextWidth(a.text[1],c)+b:0);else{i+=5;for(var p=0;p<t;p++)f+=i+o.getTextWidth(e[p],c)+r}f-=r,l=Math.max(h,s)}else{var d;if(a.text||a.splitNumber<=0||a.calculable)l=(a.splitNumber<=0||a.calculable?s*10+r:t*(s+r))+(a.text&&typeof a.text[0]!="undefined"?b+h:0)+(a.text&&typeof a.text[1]!="undefined"?b+h:0),d=Math.max(o.getTextWidth(a.text&&a.text[0]||"",c),o.getTextWidth(a.text&&a.text[1]||"",c)),f=Math.max(i,d);else{l=(s+r)*t,i+=5,d=0;for(var p=0;p<t;p++)d=Math.max(d,o.getTextWidth(e[p],c));f=i+d}l-=r}var v,m=n.getWidth();switch(a.x){case"center":v=Math.floor((m-f)/2);break;case"left":v=a.padding[3]+a.borderWidth;break;case"right":v=m-f-a.padding[1]-a.borderWidth;break;default:v=u.parsePercent(a.x,m),v=isNaN(v)?0:v}var g,y=n.getHeight();switch(a.y){case"top":g=a.padding[0]+a.borderWidth;break;case"bottom":g=y-l-a.padding[2]-a.borderWidth;break;case"center":g=Math.floor((y-l)/2);break;default:g=u.parsePercent(a.y,y),g=isNaN(g)?0:g}if(a.calculable){var w=Math.max(o.getTextWidth(a.max,c),o.getTextWidth(a.min,c));a.orient=="horizontal"?(v<w&&(v=w+5),v+f+w>m&&(v-=w+5)):(g<h&&(g=h+5),g+l+h>y&&(g-=h+5))}return{x:v,y:g,width:f,height:l}}function _(e,t,n){return{shape:"text",zlevel:f,style:{x:a.orient=="horizontal"?e:l.x+l.width/2,y:a.orient=="horizontal"?l.y+l.height/2:t,color:a.textStyle.color,text:n,textFont:u.getFont(a.textStyle),textBaseline:a.orient=="horizontal"?"middle":"top",textAlign:a.orient=="horizontal"?"left":"center"}}}function D(e,t,n,r,i){return{shape:"rectangle",zlevel:f,style:{x:e,y:t+1,width:n,height:r-2,color:i},clickable:!0}}function P(e,t,n){var r=c.x,i=c.y,s=c.width,o=c.height;return a.orient=="horizontal"?e.style.x+t<=r?e.style.x=r:e.style.x+t+e.style.width>=r+s?e.style.x=r+s-e.style.width:e.style.x+=t:e.style.y+n<=i?e.style.y=i:e.style.y+n+e.style.height>=i+o?e.style.y=i+o-e.style.height:e.style.y+=n,e._type=="filler"?F():I(e),a.realtime?R():(clearTimeout(y),y=setTimeout(R,200)),!0}function H(){u.isDragend=!0}function B(e,n){if(!u.isDragend||!e.target)return;R(),n.dragOut=!0,n.dragIn=!0,a.realtime||t.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}}),n.needRefresh=!1,u.isDragend=!1;return}function j(){if(a.range){typeof a.range.start!="undefined"&&(g.end=a.range.start),typeof a.range.end!="undefined"&&(g.start=a.range.end);if(g.start!=100||g.end!==0){if(a.orient=="horizontal"){var e=m.style.width;m.style.x+=e*(100-g.start)/100,m.style.width=e*(g.start-g.end)/100}else{var t=m.style.height;m.style.y+=t*(100-g.start)/100,m.style.height=t*(g.start-g.end)/100}n.modShape(m.id,m),F()}}}function F(){var e=c.x,t=c.y,n=c.width,r=c.height;a.orient=="horizontal"?(h.style.x=m.style.x,p.style.width=h.style.x-e,d.style.x=m.style.x+m.style.width,v.style.x=d.style.x,v.style.width=e+n-d.style.x,g.start=Math.ceil(100-(h.style.x-e)/n*100),g.end=Math.floor(100-(d.style.x-e)/n*100)):(h.style.y=m.style.y,p.style.height=h.style.y-t,d.style.y=m.style.y+m.style.height,v.style.y=d.style.y,v.style.height=t+r-d.style.y,g.start=Math.ceil(100-(h.style.y-t)/r*100),g.end=Math.floor(100-(d.style.y-t)/r*100)),q(!1)}function I(e){var t=c.x,n=c.y,r=c.width,i=c.height,s,o;a.orient=="horizontal"?(s=h.style.x,o=d.style.x,e.id==h.id&&s>=o?(o=s,d.style.x=s):e.id==d.id&&s>=o&&(s=o,h.style.x=s),m.style.x=s,m.style.width=o-s,p.style.width=s-t,v.style.x=o,v.style.width=t+r-o,g.start=Math.ceil(100-(s-t)/r*100),g.end=Math.floor(100-(o-t)/r*100)):(s=h.style.y,o=d.style.y,e.id==h.id&&s>=o?(o=s,d.style.y=s):e.id==d.id&&s>=o&&(s=o,h.style.y=s),m.style.y=s,m.style.height=o-s,p.style.height=s-n,v.style.y=o,v.style.height=n+i-o,g.start=Math.ceil(100-(s-n)/i*100),g.end=Math.floor(100-(o-n)/i*100)),q(!0)}function q(e){h.position=[h.style.x-h.style._x,h.style.y-h.style._y],a.precision===0?h.style.text=Math.round(w*g.start+a.min)+"":h.style.text=(w*g.start+a.min).toFixed(a.precision),h.style.color=X(w*g.start+a.min),n.modShape(h.id,h),d.position=[d.style.x-d.style._x,d.style.y-d.style._y],a.precision===0?d.style.text=Math.round(w*g.end+a.min)+"":d.style.text=(w*g.end+a.min).toFixed(a.precision),d.style.color=X(w*g.end+a.min),n.modShape(d.id,d),n.modShape(p.id,p),n.modShape(v.id,v),e&&n.modShape(m.id,m),n.refresh()}function R(){a.realtime&&t.dispatch(s.EVENT.DATA_RANGE,null,{range:{start:g.end,end:g.start}})}function U(e){var n=e.target._idx;x[n]=!x[n],t.dispatch(s.EVENT.REFRESH)}function z(t){if(typeof u.query(t,"dataRange.min")=="undefined"||typeof u.query(t,"dataRange.max")=="undefined")return;r=t,r.dataRange=u.reformOption(r.dataRange),r.dataRange.padding=u.reformCssArray(r.dataRange.padding),a=r.dataRange,u.clear(),x={};var n=e("zrender/tool/color"),i=a.splitNumber<=0||a.calculable?100:a.splitNumber;E=n.getGradientColors(a.color,Math.max((i-a.color.length)/(a.color.length-1),0)+1);if(E.length>i){var s=E.length,o=[E[0]],f=s/(i-1);for(var l=1;l<i-1;l++)o.push(E[Math.floor(l*f)]);o.push(E[s-1]),E=o}a.precision===0?w=Math.round((a.max-a.min)/i)||1:(w=(a.max-a.min)/i,w=w.toFixed(a.precision)-0),S=[];for(var l=0;l<i;l++)x[l]=!0,S.unshift((l*w+a.min).toFixed(a.precision)+" - "+((l+1)*w+a.min).toFixed(a.precision));g={start:100,end:0},T()}function W(e){e&&(r=e,r.dataRange=u.reformOption(r.dataRange),r.dataRange.padding=u.reformCssArray(r.dataRange.padding)),a=r.dataRange,a.range={start:g.end,end:g.start},u.clear(),T()}function X(e){if(isNaN(e))return null;e<a.min?e=a.min:e>a.max&&(e=a.max);if(a.calculable)if(e>w*g.start+a.min||e<w*g.end+a.min)return null;var t=E.length-Math.ceil((e-a.min)/(a.max-a.min)*E.length);return t==E.length&&t--,x[t]?E[t]:null}var i=e("./base");i.call(this,n);var s=e("../config"),o=e("zrender/tool/area"),u=this;u.type=s.COMPONENT_TYPE_DATARANGE;var a,f=u.getZlevelBase(),l={},c,h,p,d,v,m,g,y,b=10,w,E,S,x={};u.init=z,u.refresh=W,u.getColor=X,u.ondragend=B,z(r)}return e("../component").define("dataRange",t),t}),r("echarts/component/tooltip",["require","./base","../config","../util/ecData","zrender/config","zrender/shape","zrender/tool/event","zrender/tool/area","zrender/tool/color","zrender/tool/util","zrender/shape/base","../component"],function(e){function t(t,n,r,i){function R(e){if(!e)return"";var t=[];if(e.transitionDuration){var n="left "+e.transitionDuration+"s,"+"top "+e.transitionDuration+"s";t.push("transition:"+n),t.push("-moz-transition:"+n),t.push("-webkit-transition:"+n),t.push("-o-transition:"+n)}e.backgroundColor&&(t.push("background-Color:"+h.toHex(e.backgroundColor)),t.push("filter:alpha(opacity=70)"),t.push("background-Color:"+e.backgroundColor)),typeof e.borderWidth!="undefined"&&t.push("border-width:"+e.borderWidth+"px"),typeof e.borderColor!="undefined"&&t.push("border-color:"+e.borderColor),typeof e.borderRadius!="undefined"&&(t.push("border-radius:"+e.borderRadius+"px"),t.push("-moz-border-radius:"+e.borderRadius+"px"),t.push("-webkit-border-radius:"+e.borderRadius+"px"),t.push("-o-border-radius:"+e.borderRadius+"px"));var r=e.textStyle;r&&(r.color&&t.push("color:"+r.color),r.decoration&&t.push("text-decoration:"+r.decoration),r.align&&t.push("text-align:"+r.align),r.fontFamily&&t.push("font-family:"+r.fontFamily),r.fontSize&&t.push("font-size:"+r.fontSize+"px"),r.fontSize&&t.push("line-height:"+Math.round(r.fontSize*3/2)+"px"),r.fontStyle&&t.push("font-style:"+r.fontStyle),r.fontWeight&&t.push("font-weight:"+r.fontWeight));var i=e.padding;return typeof i!="undefined"&&(i=m.reformCssArray(i),t.push("padding:"+i[0]+"px "+i[1]+"px "+i[2]+"px "+i[3]+"px")),t=t.join(";")+";",t}function U(){T&&(T.style.display="none");var e=!1;I.invisible||(I.invisible=!0,n.modShape(I.id,I),e=!0),q.invisible||(q.invisible=!0,n.modShape(q.id,q),e=!0),j&&j.tipShape.length>0&&(n.delShape(j.tipShape),j=!1),e&&n.refresh()}function z(e,t,n){var r=T.offsetHeight,i=T.offsetWidth;e+i>B&&(e=B-i),t+r>H&&(t=H-r),t<20&&(t=0),T.style.cssText=N+C+(n?n:"")+"left:"+e+"px;top:"+t+"px;",(B-e<100||H-t<100)&&setTimeout(W,20)}function W(){if(T){var e="",t=T.offsetHeight,n=T.offsetWidth;T.offsetLeft+n>B&&(e+="left:"+(B-n)+"px;"),T.offsetTop+t>H&&(e+="top:"+(H-t)+"px;"),e!==""&&(T.style.cssText+=e)}}function X(){var e,t;if(!_)$()||V();else{if(_._type=="island"&&r.tooltip.show){G();return}var n=u.get(_,"series"),i=u.get(_,"data");e=m.deepQuery([i,n,r],"tooltip.show"),typeof n=="undefined"||typeof i=="undefined"||e===!1?(clearTimeout(L),clearTimeout(O),L=setTimeout(U,A)):(t=m.deepQuery([i,n,r],"tooltip.trigger"),t=="axis"?K(n.xAxisIndex,n.yAxisIndex,u.get(_,"dataIndex")):G())}}function V(){if(!w||!E){L=setTimeout(U,A);return}var e=r.series,t,n;for(var i=0,s=e.length;i<s;i++)if(m.deepQuery([e[i],r],"tooltip.trigger")=="axis"){t=e[i].xAxisIndex||0,n=e[i].yAxisIndex||0;if(w.getAxis(t)&&w.getAxis(t).type==o.COMPONENT_TYPE_AXIS_CATEGORY){K(t,n,J("x",w.getAxis(t)));return}if(E.getAxis(n)&&E.getAxis(n).type==o.COMPONENT_TYPE_AXIS_CATEGORY){K(t,n,J("y",E.getAxis(n)));return}}}function $(){if(!S)return!1;var e=l.getX(D),t=l.getY(D),n=S.getNearestIndex([e,t]),r;return n?(r=n.valueIndex,n=n.polarIndex):n=-1,n!=-1?Q(n,r):!1}function J(e,t){var n=-1,r=l.getX(D),i=l.getY(D);if(e=="x"){var s,o,u=b.getXend(),a=t.getCoordByIndex(n);while(a<u){a<=r&&(s=a);if(a>=r)break;a=t.getCoordByIndex(++n),o=a}return r-s<o-r?n-=1:typeof t.getNameByIndex(n)=="undefined"&&(n=-1),n}var f,c,h=b.getY(),a=t.getCoordByIndex(n);while(a>h){a>=i&&(c=a);if(a<=i)break;a=t.getCoordByIndex(++n),f=a}return i-f>c-i?n-=1:typeof t.getNameByIndex(n)=="undefined"&&(n=-1),n}function K(e,n,s){if(typeof w=="undefined"||typeof E=="undefined"||typeof e=="undefined"||typeof n=="undefined"||s<0){clearTimeout(L),clearTimeout(O),L=setTimeout(U,A);return}var u=r.series,a=[],f=[],c,h,p,d,v,g="";if(r.tooltip.trigger=="axis"){if(r.tooltip.show===!1)return;d=r.tooltip.formatter}if(e!=-1&&w.getAxis(e).type==o.COMPONENT_TYPE_AXIS_CATEGORY){c=w.getAxis(e);for(var S=0,x=u.length;S<x;S++){if(!ut(u[S].name))continue;u[S].xAxisIndex==e&&m.deepQuery([u[S],r],"tooltip.trigger")=="axis"&&(v=m.query(u[S],"tooltip.showContent")||v,d=m.query(u[S],"tooltip.formatter")||d,g+=R(m.query(u[S],"tooltip")),a.push(u[S]),f.push(S))}t.dispatch(o.EVENT.TOOLTIP_HOVER,D,{seriesIndex:f,dataIndex:y.dataZoom?y.dataZoom.getRealDataIndex(f,s):s}),p=l.getY(D)+10,h=m.subPixelOptimize(c.getCoordByIndex(s),F),Y(a,h,b.getY(),h,b.getYend(),c.getGap()),h+=10}else if(n!=-1&&E.getAxis(n).type==o.COMPONENT_TYPE_AXIS_CATEGORY){c=E.getAxis(n);for(var S=0,x=u.length;S<x;S++){if(!ut(u[S].name))continue;u[S].yAxisIndex==n&&m.deepQuery([u[S],r],"tooltip.trigger")=="axis"&&(v=m.query(u[S],"tooltip.showContent")||v,d=m.query(u[S],"tooltip.formatter")||d,g+=R(m.query(u[S],"tooltip")),a.push(u[S]),f.push(S))}t.dispatch(o.EVENT.TOOLTIP_HOVER,D,{seriesIndex:f,dataIndex:y.dataZoom?y.dataZoom.getRealDataIndex(f,s):s}),h=l.getX(D)+10,p=m.subPixelOptimize(c.getCoordByIndex(s),F),Y(a,b.getX(),p,b.getXend(),p,c.getGap()),p+=10}if(a.length>0){var N;if(typeof d=="function"){var C=[];for(var S=0,x=a.length;S<x;S++)N=a[S].data[s],N=typeof N!="undefined"?typeof N.value!="undefined"?N.value:N:"-",C.push([a[S].name||"",c.getNameByIndex(s),N]);P="axis:"+s,T.innerHTML=d(C,P,tt)}else if(typeof d=="string"){P=NaN,d=d.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}");for(var S=0,x=a.length;S<x;S++)d=d.replace("{a"+S+"}",ht(a[S].name||"")),d=d.replace("{b"+S+"}",ht(c.getNameByIndex(s))),N=a[S].data[s],N=typeof N!="undefined"?typeof N.value!="undefined"?N.value:N:"-",d=d.replace("{c"+S+"}",N instanceof Array?N:m.numAddCommas(N));T.innerHTML=d}else{P=NaN,d=ht(c.getNameByIndex(s));for(var S=0,x=a.length;S<x;S++)d+="<br/>"+ht(a[S].name||"")+" : ",N=a[S].data[s],N=typeof N!="undefined"?typeof N.value!="undefined"?N.value:N:"-",d+=N instanceof Array?N:m.numAddCommas(N);T.innerHTML=d}if(v===!1||!r.tooltip.showContent)return;m.hasAppend||(T.style.left=B/2+"px",T.style.top=H/2+"px",i.firstChild.appendChild(T),m.hasAppend=!0),z(h,p,g)}}function Q(e,t){if(typeof S=="undefined"||typeof e=="undefined"||typeof t=="undefined"||t<0)return!1;var n=r.series,s=[],o,u,a="";if(r.tooltip.trigger=="axis"){if(r.tooltip.show===!1)return!1;o=r.tooltip.formatter}var f=r.polar[e].indicator[t].text;for(var c=0,h=n.length;c<h;c++){if(!ut(n[c].name))continue;n[c].polarIndex==e&&m.deepQuery([n[c],r],"tooltip.trigger")=="axis"&&(u=m.query(n[c],"tooltip.showContent")||u,o=m.query(n[c],"tooltip.formatter")||o,a+=R(m.query(n[c],"tooltip")),s.push(n[c]))}if(s.length>0){var p,d,v=[];for(var c=0,h=s.length;c<h;c++){p=s[c].data;for(var g=0,y=p.length;g<y;g++){d=p[g];if(!ut(d.name))continue;d=typeof d!="undefined"?d:{name:"",value:{dataIndex:"-"}},v.push([s[c].name||"",d.name,d.value[t],f])}}if(v.length<=0)return;if(typeof o=="function")P="axis:"+t,T.innerHTML=o(v,P,tt);else if(typeof o=="string"){o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}");for(var c=0,h=v.length;c<h;c++)o=o.replace("{a"+c+"}",ht(v[c][0])),o=o.replace("{b"+c+"}",ht(v[c][1])),o=o.replace("{c"+c+"}",m.numAddCommas(v[c][2])),o=o.replace("{d"+c+"}",ht(v[c][3]));T.innerHTML=o}else{o=ht(v[0][1])+"<br/>"+ht(v[0][3])+" : "+m.numAddCommas(v[0][2]);for(var c=1,h=v.length;c<h;c++)o+="<br/>"+ht(v[c][1])+"<br/>",o+=ht(v[c][3])+" : "+m.numAddCommas(v[c][2]);T.innerHTML=o}if(u===!1||!r.tooltip.showContent)return;return m.hasAppend||(T.style.left=B/2+"px",T.style.top=H/2+"px",i.firstChild.appendChild(T),m.hasAppend=!0),z(l.getX(D),l.getY(D),a),!0}}function G(){var e=u.get(_,"series"),t=u.get(_,"data"),s=u.get(_,"name"),a=u.get(_,"value"),f=u.get(_,"special"),c=u.get(_,"special2"),h,p,d="",v,g="";_._type!="island"?(r.tooltip.trigger=="item"&&(h=r.tooltip.formatter),m.query(e,"tooltip.trigger")=="item"&&(p=m.query(e,"tooltip.showContent")||p,h=m.query(e,"tooltip.formatter")||h,d+=R(m.query(e,"tooltip"))),p=m.query(t,"tooltip.showContent")||p,h=m.query(t,"tooltip.formatter")||h,d+=R(m.query(t,"tooltip"))):(p=m.deepQuery([t,e,r],"tooltip.showContent"),h=m.deepQuery([t,e,r],"tooltip.islandFormatter"));if(typeof h=="function")P=(e.name||"")+":"+u.get(_,"dataIndex"),T.innerHTML=h([e.name||"",s,a,f,c],P,tt);else if(typeof h=="string")P=NaN,h=h.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}"),h=h.replace("{a0}",ht(e.name||"")).replace("{b0}",ht(s)).replace("{c0}",a instanceof Array?a:m.numAddCommas(a)),h=h.replace("{d}","{d0}").replace("{d0}",f||""),h=h.replace("{e}","{e0}").replace("{e0}",u.get(_,"special2")||""),T.innerHTML=h;else{P=NaN;if(e.type==o.CHART_TYPE_SCATTER)T.innerHTML=(typeof e.name!="undefined"?ht(e.name)+"<br/>":"")+(s===""?"":ht(s)+" : ")+a+(typeof f=="undefined"?"":" ("+f+")");else if(e.type==o.CHART_TYPE_RADAR&&f){v=f,g+=ht(s===""?e.name||"":s),g+=g===""?"":"<br />";for(var y=0;y<v.length;y++)g+=ht(v[y].text)+" : "+m.numAddCommas(a[y])+"<br />";T.innerHTML=g}else if(e.type==o.CHART_TYPE_CHORD)if(typeof c=="undefined")T.innerHTML=ht(s)+" ("+m.numAddCommas(a)+")";else{var b=ht(s),w=ht(f);T.innerHTML=(typeof e.name!="undefined"?ht(e.name)+"<br/>":"")+b+" -> "+w+" ("+m.numAddCommas(a)+")"+"<br />"+w+" -> "+b+" ("+m.numAddCommas(c)+")"}else T.innerHTML=(typeof e.name!="undefined"?ht(e.name)+"<br/>":"")+ht(s)+" : "+m.numAddCommas(a)+(typeof f=="undefined"?"":" ("+m.numAddCommas(f)+")")}I.invisible||(I.invisible=!0,n.modShape(I.id,I),n.refresh());if(p===!1||!r.tooltip.showContent)return;m.hasAppend||(T.style.left=B/2+"px",T.style.top=H/2+"px",i.firstChild.appendChild(T),m.hasAppend=!0),z(l.getX(D)+20,l.getY(D)-20,d)}function Y(e,t,i,s,o,u){if(e.length>0){var a,f,l=r.tooltip.axisPointer,c=l.type,h=l.lineStyle.color,p=l.lineStyle.width,d=l.lineStyle.type,v=l.areaStyle.size,g=l.areaStyle.color;for(var y=0,w=e.length;y<w;y++)m.deepQuery([e[y],r],"tooltip.trigger")=="axis"&&(a=e[y],f=m.query(a,"tooltip.axisPointer.type"),c=f||c,f=="line"?(h=m.query(a,"tooltip.axisPointer.lineStyle.color")||h,p=m.query(a,"tooltip.axisPointer.lineStyle.width")||p,d=m.query(a,"tooltip.axisPointer.lineStyle.type")||d):f=="shadow"&&(v=m.query(a,"tooltip.axisPointer.areaStyle.size")||v,g=m.query(a,"tooltip.axisPointer.areaStyle.color")||g));c=="line"?(I.style={xStart:t,yStart:i,xEnd:s,yEnd:o,strokeColor:h,lineWidth:p,lineType:d},I.invisible=!1,n.modShape(I.id,I)):c=="shadow"&&(typeof v=="undefined"||v=="auto"||isNaN(v)?p=u:p=v,t==s?Math.abs(b.getX()-t)<2?(p/=2,t=s+=p/2):Math.abs(b.getXend()-t)<2&&(p/=2,t=s-=p/2):i==o&&(Math.abs(b.getY()-i)<2?(p/=2,i=o+=p/2):Math.abs(b.getYend()-i)<2&&(p/=2,i=o-=p/2)),q.style={xStart:t,yStart:i,xEnd:s,yEnd:o,strokeColor:g,lineWidth:p},q.invisible=!1,n.modShape(q.id,q)),n.refresh()}}function Z(e){clearTimeout(L),clearTimeout(O);var t=e.target,n=l.getX(e.event),i=l.getY(e.event);if(!t)_=!1,D=e.event,D._target=D.target||D.toElement,D.zrenderX=n,D.zrenderY=i,k&&b&&c.isInside(v,b.getArea(),n,i)?O=setTimeout(X,M):k&&S&&S.isInside([n,i])!=-1?O=setTimeout(X,M):L=setTimeout(U,A);else{_=t,D=e.event,D._target=D.target||D.toElement,D.zrenderX=n,D.zrenderY=i;var s;if(k&&S&&(s=S.isInside([n,i]))!=-1){var o=r.series;for(var u=0,a=o.length;u<a;u++)if(o[u].polarIndex==s&&m.deepQuery([o[u],r],"tooltip.trigger")=="axis"){_=null;break}}O=setTimeout(X,M)}}function et(){clearTimeout(L),clearTimeout(O),L=setTimeout(U,A)}function tt(e,t){e==P&&(T.innerHTML=t);var n="",r=T.offsetHeight,i=T.offsetWidth;T.offsetLeft+i>B&&(n+="left:"+(B-i)+"px;"),T.offsetTop+r>H&&(n+="top:"+(H-r)+"px;"),n!==""&&(T.style.cssText+=n),(B-T.offsetLeft<100||H-T.offsetTop<100)&&setTimeout(W,20)}function nt(e){y=e,b=y.grid,w=y.xAxis,E=y.yAxis,S=y.polar}function rt(e,t){if(!j||j&&j.dataIndex!=e.dataIndex){j&&j.tipShape.length>0&&n.delShape(j.tipShape);for(var r=0,i=t.length;r<i;r++)t[r].id=n.newShapeId("tooltip"),t[r].zlevel=g,t[r].style=d.getHighlightStyle(t[r].style,t[r].highlightStyle),t[r].draggable=!1,t[r].hoverable=!1,t[r].clickable=!1,t[r].ondragend=null,t[r].ondragover=null,t[r].ondrop=null,n.addShape(t[r]);j={dataIndex:e.dataIndex,tipShape:t}}}function it(){U()}function st(e){x=e.selected}function ot(){r.legend&&r.legend.selected?x=r.legend.selected:x={}}function ut(e){return typeof x[e]!="undefined"?x[e]:!0}function at(e,t){r=e,i=t,r.tooltip=m.reformOption(r.tooltip),r.tooltip.textStyle=p.merge(r.tooltip.textStyle,o.textStyle,{overwrite:!1,recursive:!0}),r.tooltip.padding=m.reformCssArray(r.tooltip.padding),k=!1,r.tooltip.trigger=="axis"&&(k=!0);var n=r.series;for(var s=0,u=n.length;s<u;s++)if(m.query(n[s],"tooltip.trigger")=="axis"){k=!0;break}M=r.tooltip.showDelay,A=r.tooltip.hideDelay,C=R(r.tooltip),T.style.position="absolute",m.hasAppend=!1,ot(),F=r.tooltip.axisPointer.lineStyle.width}function ft(e){e&&(r=e,r.tooltip=m.reformOption(r.tooltip),r.tooltip.textStyle=p.merge(r.tooltip.textStyle,o.textStyle,{overwrite:!1,recursive:!0}),r.tooltip.padding=m.reformCssArray(r.tooltip.padding),ot(),F=r.tooltip.axisPointer.lineStyle.width)}function lt(){H=n.getHeight(),B=n.getWidth()}function ct(){clearTimeout(L),clearTimeout(O),n.un(a.EVENT.MOUSEMOVE,Z),n.un(a.EVENT.GLOBALOUT,et),m.hasAppend&&i.firstChild.removeChild(T),T=null,m.shapeList=null,m=null}function ht(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("../util/ecData"),a=e("zrender/config"),f=e("zrender/shape"),l=e("zrender/tool/event"),c=e("zrender/tool/area"),h=e("zrender/tool/color"),p=e("zrender/tool/util"),d=e("zrender/shape/base"),v=f.get("rectangle"),m=this;m.type=o.COMPONENT_TYPE_TOOLTIP;var g=m.getZlevelBase(),y={},b,w,E,S,x={},T=document.createElement("div"),N="position:absolute;display:block;border-style:solid;white-space:nowrap;",C,k,L,A,O,M,_,D,P,H=n.getHeight(),B=n.getWidth(),j=!1,F=0,I={shape:"line",id:n.newShapeId("tooltip"),zlevel:g,invisible:!0,hoverable:!1,style:{}},q={shape:"line",id:n.newShapeId("tooltip"),zlevel:1,invisible:!0,hoverable:!1,style:{}};n.addShape(I),n.addShape(q),n.on(a.EVENT.MOUSEMOVE,Z),n.on(a.EVENT.GLOBALOUT,et),m.dispose=ct,m.init=at,m.refresh=ft,m.resize=lt,m.setComponent=nt,m.ontooltipHover=rt,m.ondragend=it,m.onlegendSelected=st,at(r,i)}return e("../component").define("tooltip",t),t}),r("echarts/component/toolbox",["require","./base","../config","zrender/config","zrender/tool/util","zrender/tool/event","../component","../component"],function(e){function t(t,n,r){function A(){v=[];var e=f.toolbox.feature;for(var t in e)if(e[t])switch(t){case"mark":v.push("mark"),v.push("markUndo"),v.push("markClear");break;case"magicType":for(var r=0,i=e[t].length;r<i;r++)v.push(e[t][r]+"Chart");break;case"dataZoom":v.push("dataZoom"),v.push("dataZoomReset");break;case"saveAsImage":G_vmlCanvasManager||v.push("saveAsImage");break;default:v.push(t)}if(v.length>0){g=_(),M(),O();for(var r=0,i=c.shapeList.length;r<i;r++)c.shapeList[r].id=n.newShapeId(c.type),n.addShape(c.shapeList[r]);m.mark&&(W(m.markUndo),W(m.markClear)),m.dataZoomReset&&k.length===0&&W(m.dataZoomReset)}}function O(){var i=f.toolbox,s=v.length,o=g.x,u=g.y,a=i.itemSize,l=i.itemGap,d,b=i.color instanceof Array?i.color:[i.color],E=c.getFont(i.textStyle),S,x,T;i.orient=="horizontal"?(S=g.y/n.getHeight()<.5?"bottom":"top",x=g.x/n.getWidth()<.5?"left":"right",T=g.y/n.getHeight()<.5?"top":"bottom"):S=g.x/n.getWidth()<.5?"right":"left",m={};for(var N=0;N<s;N++){d={shape:"icon",zlevel:h,style:{x:o,y:u,width:a,height:a,iconType:v[N],lineWidth:1,strokeColor:b[N%b.length],shadowColor:"#ccc",shadowBlur:2,shadowOffsetX:2,shadowOffsetY:2,brushType:"stroke"},highlightStyle:{lineWidth:2,shadowBlur:5,text:i.showTitle?i.featureTitle[v[N]]:!1,textFont:E,textPosition:S,strokeColor:b[N%b.length]},hoverable:!0,clickable:!0},i.featureImageIcon[v[N]]&&(d.style.image=i.featureImageIcon[v[N]],d.style.opacity=.8,d.highlightStyle.opacity=1,d.shape="image"),i.orient=="horizontal"&&(N===0&&x=="left"&&(d.highlightStyle.textPosition="specific",d.highlightStyle.textAlign=x,d.highlightStyle.textBaseline=T,d.highlightStyle.textX=o,d.highlightStyle.textY=T=="top"?u+a+10:u-10),N==s-1&&x=="right"&&(d.highlightStyle.textPosition="specific",d.highlightStyle.textAlign=x,d.highlightStyle.textBaseline=T,d.highlightStyle.textX=o+a,d.highlightStyle.textY=T=="top"?u+a+10:u-10));switch(v[N]){case"mark":d.onclick=D,w=d.style.strokeColor;break;case"markUndo":d.onclick=I;break;case"markClear":d.onclick=q;break;case"dataZoom":d.onclick=P;break;case"dataZoomReset":d.onclick=R;break;case"dataView":if(!L){var C=e("../component"),k=C.get("dataView");L=new k(t,n,f,r)}d.onclick=V;break;case"restore":d.onclick=$;break;case"saveAsImage":d.onclick=J;break;default:v[N].match("Chart")&&(d._name=v[N].replace("Chart",""),d._name==p&&(d.style.strokeColor=y),d.onclick=K)}c.shapeList.push(d),m[v[N]]=d,i.orient=="horizontal"?o+=a+l:u+=a+l}}function M(){var e=f.toolbox,t=e.padding[0],n=e.padding[1],r=e.padding[2],i=e.padding[3];c.shapeList.push({shape:"rectangle",zlevel:h,hoverable:!1,style:{x:g.x-i,y:g.y-t,width:g.width+i+n,height:g.height+t+r,brushType:e.borderWidth===0?"fill":"both",color:e.backgroundColor,strokeColor:e.borderColor,lineWidth:e.borderWidth}})}function _(){var e=f.toolbox,t=v.length,r=e.itemGap,i=e.itemSize,s=0,o=0;e.orient=="horizontal"?(s=(i+r)*t-r,o=i):(o=(i+r)*t-r,s=i);var u,a=n.getWidth();switch(e.x){case"center":u=Math.floor((a-s)/2);break;case"left":u=e.padding[3]+e.borderWidth;break;case"right":u=a-s-e.padding[1]-e.borderWidth;break;default:u=e.x-0,u=isNaN(u)?0:u}var l,c=n.getHeight();switch(e.y){case"top":l=e.padding[0]+e.borderWidth;break;case"bottom":l=c-o-e.padding[2]-e.borderWidth;break;case"center":l=Math.floor((c-o)/2);break;default:l=e.y-0,l=isNaN(l)?0:l}return{x:u,y:l,width:s,height:o}}function D(e){var t=e.target;return S||E?(U(),n.refresh()):(z(),n.modShape(t.id,{style:{strokeColor:y}}),n.refresh(),E=!0,setTimeout(function(){n&&n.on(o.EVENT.CLICK,F)&&n.on(o.EVENT.MOUSEMOVE,H)},10)),!0}function P(e){var t=e.target;return N||T?(z(),n.refresh(),r.style.cursor="default"):(U(),n.modShape(t.id,{style:{strokeColor:y}}),n.refresh(),T=!0,setTimeout(function(){n&&n.on(o.EVENT.MOUSEDOWN,B)&&n.on(o.EVENT.MOUSEUP,j)&&n.on(o.EVENT.MOUSEMOVE,H)},10),r.style.cursor="crosshair"),!0}function H(e){S&&(x.style.xEnd=a.getX(e.event),x.style.yEnd=a.getY(e.event),n.addHoverShape(x)),N&&(C.style.width=a.getX(e.event)-C.style.x,C.style.height=a.getY(e.event)-C.style.y,n.addHoverShape(C),r.style.cursor="crosshair"),T&&r.style.cursor!="pointer"&&r.style.cursor!="move"&&(r.style.cursor="crosshair")}function B(e){if(e.target)return;N=!0;var t=a.getX(e.event),r=a.getY(e.event),i=f.dataZoom||{};return C={shape:"rectangle",id:n.newShapeId("zoom"),zlevel:h,style:{x:t,y:r,width:1,height:1,brushType:"both"},highlightStyle:{lineWidth:2,color:i.fillerColor||s.dataZoom.fillerColor,strokeColor:i.handleColor||s.dataZoom.handleColor,brushType:"both"}},n.addHoverShape(C),!0}function j(){if(!C||Math.abs(C.style.width)<10||Math.abs(C.style.height)<10)return N=!1,!0;if(N&&l.dataZoom){N=!1;var e=l.dataZoom.rectZoom(C.style);e&&(k.push({start:e.start,end:e.end,start2:e.start2,end2:e.end2}),X(m.dataZoomReset),n.refresh())}return!0}function F(e){if(S)S=!1,c.shapeList.push(x),X(m.markUndo),X(m.markClear),n.addShape(x),n.refresh();else if(E){S=!0;var t=a.getX(e.event),r=a.getY(e.event);x={shape:"line",id:n.newShapeId("mark"),zlevel:h,style:{xStart:t,yStart:r,xEnd:t,yEnd:r,lineWidth:c.query(f,"toolbox.feature.mark.lineStyle.width")||2,strokeColor:c.query(f,"toolbox.feature.mark.lineStyle.color")||w,lineType:c.query(f,"toolbox.feature.mark.lineStyle.type")||"dashed"}},n.addHoverShape(x)}}function I(){if(S)S=!1;else{var e=c.shapeList.length-1;v.length==e-1&&(W(m.markUndo),W(m.markClear));if(v.length<e){var t=c.shapeList[c.shapeList.length-1];n.delShape(t.id),n.refresh(),c.shapeList.pop()}}return!0}function q(){S&&(S=!1);var e=c.shapeList.length-v.length-1,t=!1;while(e--)n.delShape(c.shapeList.pop().id),t=!0;return t&&(W(m.markUndo),W(m.markClear),n.refresh()),!0}function R(){return N&&(N=!1),k.pop(),k.length>0?l.dataZoom.absoluteZoom(k[k.length-1]):(l.dataZoom.rectZoom(),W(m.dataZoomReset),n.refresh()),!0}function U(){S=!1,E&&(E=!1,m.mark&&n.modShape(m.mark.id,{style:{strokeColor:m.mark.highlightStyle.strokeColor}}),n.un(o.EVENT.CLICK,F),n.un(o.EVENT.MOUSEMOVE,H))}function z(){N=!1,T&&(T=!1,m.dataZoom&&n.modShape(m.dataZoom.id,{style:{strokeColor:m.dataZoom.highlightStyle.strokeColor}}),n.un(o.EVENT.MOUSEDOWN,B),n.un(o.EVENT.MOUSEUP,j),n.un(o.EVENT.MOUSEMOVE,H))}function W(e){e.shape!="image"?n.modShape(e.id,{hoverable:!1,clickable:!1,style:{strokeColor:b}}):n.modShape(e.id,{hoverable:!1,clickable:!1,style:{opacity:.3}})}function X(e){e.shape!="image"?n.modShape(e.id,{hoverable:!0,clickable:!0,style:{strokeColor:e.highlightStyle.strokeColor}}):n.modShape(e.id,{hoverable:!0,clickable:!0,style:{opacity:.8}})}function V(){return L.show(f),!0}function $(){return U(),z(),t.dispatch(s.EVENT.RESTORE),!0}function J(){var e=f.toolbox.feature.saveAsImage,t=e.type||"png";t!="png"&&t!="jpeg"&&(t="png");var r=n.toDataURL("image/"+t),i=document.createElement("div");i.id="__echarts_download_wrap__",i.style.cssText="position:fixed;z-index:99999;display:block;top:0;left:0;background-color:rgba(33,33,33,0.5);text-align:center;width:100%;height:100%;line-height:"+document.documentElement.clientHeight+"px;";var s=document.createElement("a");s.href=r,s.setAttribute("download",(e.name?e.name:f.title&&(f.title.text||f.title.subtext)?f.title.text||f.title.subtext:"ECharts")+"."+t),s.innerHTML='<img src="'+r+'" title="'+(!window.attachEvent||navigator.userAgent.indexOf("Opera")!==-1?e.lang?e.lang:"点击保存":"右键->图片另存为")+'"/>',i.appendChild(s),document.body.appendChild(i),s=null,i=null,setTimeout(function(){var e=document.getElementById("__echarts_download_wrap__");e&&(e.onclick=function(){var e=document.getElementById("__echarts_download_wrap__");e.onclick=null,e.innerHTML="",document.body.removeChild(e),e=null},e=null)},500);return}function K(e){U();var n=e.target._name;return n==p?p=!1:p=n,t.dispatch(s.EVENT.MAGIC_TYPE_CHANGED,e.event,{magicType:p}),!0}function Q(e){if(e.toolbox&&e.toolbox.show&&e.toolbox.feature.magicType&&e.toolbox.feature.magicType.length>0){var t=e.toolbox.feature.magicType,n=t.length;d={};while(n--)d[t[n]]=!0;n=e.series.length;var r,i;while(n--)r=e.series[n].type,d[r]&&(i=e.xAxis instanceof Array?e.xAxis[e.series[n].xAxisIndex||0]:e.xAxis,i&&i.type=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),i=e.yAxis instanceof Array?e.yAxis[e.series[n].yAxisIndex||0]:e.yAxis,i&&i.type=="category"&&(i.__boundaryGap=typeof i.boundaryGap!="undefined"?i.boundaryGap:!0),e.series[n].__type=r,e.series[n].__itemStyle=e.series[n].itemStyle?u.clone(e.series[n].itemStyle):{})}p=!1;var s=e.dataZoom;if(s&&s.show){var o=typeof s.start!="undefined"&&s.start>=0&&s.start<=100?s.start:0,a=typeof s.end!="undefined"&&s.end>=0&&s.end<=100?s.end:100;o>a&&(o+=a,a=o-a,o-=a),k=[{start:o,end:a,start2:0,end2:100}]}else k=[]}function G(){var e;if(p){var t=p==s.CHART_TYPE_LINE?!1:!0;for(var n=0,r=f.series.length;n<r;n++)d[f.series[n].type]&&(f.series[n].type=p,f.series[n].itemStyle=u.clone(f.series[n].__itemStyle),e=f.xAxis instanceof Array?f.xAxis[f.series[n].xAxisIndex||0]:f.xAxis,e&&e.type=="category"&&(e.boundaryGap=t?!0:e.__boundaryGap),e=f.yAxis instanceof Array?f.yAxis[f.series[n].yAxisIndex||0]:f.yAxis,e&&e.type=="category"&&(e.boundaryGap=t?!0:e.__boundaryGap))}else for(var n=0,r=f.series.length;n<r;n++)d[f.series[n].type]&&(f.series[n].type=f.series[n].__type,f.series[n].itemStyle=f.series[n].__itemStyle,e=f.xAxis instanceof Array?f.xAxis[f.series[n].xAxisIndex||0]:f.xAxis,e&&e.type=="category"&&(e.boundaryGap=e.__boundaryGap),e=f.yAxis instanceof Array?f.yAxis[f.series[n].yAxisIndex||0]:f.yAxis,e&&e.type=="category"&&(e.boundaryGap=e.__boundaryGap));return f}function Y(e,t){U(),z(),e.toolbox=c.reformOption(e.toolbox),e.toolbox.padding=c.reformCssArray(e.toolbox.padding),f=e,l=t,c.shapeList=[],e.toolbox.show&&A(),et()}function Z(){U(),c.clear(),f&&f.toolbox&&f.toolbox.show&&A(),L&&L.resize()}function et(){L&&L.hide()}function tt(){L&&L.dispose(),c.clear(),c.shapeList=null,c=null}function nt(e){e&&(e.toolbox=c.reformOption(e.toolbox),e.toolbox.padding=c.reformCssArray(e.toolbox.padding),f=e)}var i=e("./base");i.call(this,n);var s=e("../config"),o=e("zrender/config"),u=e("zrender/tool/util"),a=e("zrender/tool/event"),f,l,c=this;c.type=s.COMPONENT_TYPE_TOOLBOX;var h=c.getZlevelBase(),p,d,v,m={},g,y="red",b="#ccc",w,E,S,x,T,N,C,k,L;c.dispose=tt,c.render=Y,c.resize=Z,c.hideDataView=et,c.getMagicOption=G,c.reset=Q,c.refresh=nt}return e("../component").define("toolbox",t),t}),r("echarts/component/dataView",["require","./base","../config","../component"],function(e){function t(t,n,r,i){function b(){v="width:"+y+"px;"+"height:"+0+"px;"+"background-color:#f0ffff;",f.style.cssText=d+v,i.onselectstart=function(){return!1}}function w(e){p=!0;var t=u.query(r,"toolbox.feature.dataView.lang")||a;r=e,f.innerHTML='<p style="padding:8px 0;margin:0 0 10px 0;border-bottom:1px solid #eee">'+(t[0]||a[0])+"</p>",l.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(y-15)+"px;"+"height:"+(g-100)+"px;";var n=u.query(r,"toolbox.feature.dataView.optionToContent");typeof n!="function"?l.value=E():l.value=n(r),f.appendChild(l),h.style.cssText="float:right;padding:1px 6px;",h.innerHTML=t[1]||a[1],h.onclick=b,f.appendChild(h),u.query(r,"toolbox.feature.dataView.readOnly")===!1?(c.style.cssText="float:right;margin-right:10px;padding:1px 6px;",c.innerHTML=t[2]||a[2],c.onclick=S,f.appendChild(c),l.readOnly=!1,l.style.cursor="default"):(l.readOnly=!0,l.style.cursor="text"),v="width:"+y+"px;"+"height:"+g+"px;"+"background-color:#fff;",f.style.cssText=d+v,i.onselectstart=function(){return!0}}function E(){var e,t,n,i,s,u,a=[],f="";if(r.xAxis){r.xAxis instanceof Array?a=r.xAxis:a=[r.xAxis];for(e=0,i=a.length;e<i;e++)if((a[e].type||"category")=="category"){u=[];for(t=0,n=a[e].data.length;t<n;t++)s=a[e].data[t],u.push(typeof s.value!="undefined"?s.value:s);f+=u.join(", ")+"\n\n"}}if(r.yAxis){r.yAxis instanceof Array?a=r.yAxis:a=[r.yAxis];for(e=0,i=a.length;e<i;e++)if(a[e].type=="category"){u=[];for(t=0,n=a[e].data.length;t<n;t++)s=a[e].data[t],u.push(typeof s.value!="undefined"?s.value:s);f+=u.join(", ")+"\n\n"}}var l=r.series,c;for(e=0,i=l.length;e<i;e++){u=[];for(t=0,n=l[e].data.length;t<n;t++)s=l[e].data[t],l[e].type==o.CHART_TYPE_PIE||l[e].type==o.CHART_TYPE_MAP?c=(s.name||"-")+":":c="",l[e].type==o.CHART_TYPE_SCATTER&&(s=typeof s.value!="undefined"?s.value:s,s=s.join(", ")),u.push(c+(typeof s.value!="undefined"?s.value:s));f+=(l[e].name||"-")+" : \n",f+=u.join(l[e].type==o.CHART_TYPE_SCATTER?"\n":", "),f+="\n\n"}return f}function S(){var e=l.value,n=u.query(r,"toolbox.feature.dataView.contentToOption");if(typeof n!="function"){e=e.split("\n");var i=[];for(var s=0,a=e.length;s<a;s++)e[s]=T(e[s]),e[s]!==""&&i.push(e[s]);x(i)}else n(e,r);b(),setTimeout(function(){t&&t.dispatch(o.EVENT.DATA_VIEW_CHANGED,null,{option:r})},G_vmlCanvasManager?100:800)}function x(e){var t,n,i,s,u,a=[],f=0,l,c;if(r.xAxis){r.xAxis instanceof Array?a=r.xAxis:a=[r.xAxis];for(t=0,s=a.length;t<s;t++)if((a[t].type||"category")=="category"){l=e[f].split(",");for(n=0,i=a[t].data.length;n<i;n++)c=T(l[n]||""),u=a[t].data[n],typeof a[t].data[n].value!="undefined"?a[t].data[n].value=c:a[t].data[n]=c;f++}}if(r.yAxis){r.yAxis instanceof Array?a=r.yAxis:a=[r.yAxis];for(t=0,s=a.length;t<s;t++)if(a[t].type=="category"){l=e[f].split(",");for(n=0,i=a[t].data.length;n<i;n++)c=T(l[n]||""),u=a[t].data[n],typeof a[t].data[n].value!="undefined"?a[t].data[n].value=c:a[t].data[n]=c;f++}}var h=r.series;for(t=0,s=h.length;t<s;t++){f++;if(h[t].type==o.CHART_TYPE_SCATTER)for(var n=0,i=h[t].data.length;n<i;n++)l=e[f],c=l.replace(" ","").split(","),typeof h[t].data[n].value!="undefined"?h[t].data[n].value=c:h[t].data[n]=c,f++;else{l=e[f].split(",");for(var n=0,i=h[t].data.length;n<i;n++)c=(l[n]||"").replace(/.*:/,""),c=T(c),c=c!="-"&&c!==""?c-0:"-",typeof h[t].data[n].value!="undefined"?h[t].data[n].value=c:h[t].data[n]=c;f++}}}function T(e){var t=new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)","g");return e.replace(t,"")}function N(e){e=e||window.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function C(){f.className=m,b(),i.firstChild.appendChild(f),window.addEventListener?(f.addEventListener("click",N),f.addEventListener("mousewheel",N),f.addEventListener("mousemove",N),f.addEventListener("mousedown",N),f.addEventListener("mouseup",N),f.addEventListener("touchstart",N),f.addEventListener("touchmove",N),f.addEventListener("touchend",N)):(f.attachEvent("onclick",N),f.attachEvent("onmousewheel",N),f.attachEvent("onmousemove",N),f.attachEvent("onmousedown",N),f.attachEvent("onmouseup",N))}function k(){g=n.getHeight(),y=n.getWidth(),f.offsetHeight>10&&(v="width:"+y+"px;"+"height:"+g+"px;"+"background-color:#fff;",f.style.cssText=d+v,l.style.cssText="display:block;margin:0 0 8px 0;padding:4px 6px;overflow:auto;width:"+(y-15)+"px;"+"height:"+(g-100)+"px;")}function L(){window.removeEventListener?(f.removeEventListener("click",N),f.removeEventListener("mousewheel",N),f.removeEventListener("mousemove",N),f.removeEventListener("mousedown",N),f.removeEventListener("mouseup",N),f.removeEventListener("touchstart",N),f.removeEventListener("touchmove",N),f.removeEventListener("touchend",N)):(f.detachEvent("onclick",N),f.detachEvent("onmousewheel",N),f.detachEvent("onmousemove",N),f.detachEvent("onmousedown",N),f.detachEvent("onmouseup",N)),c.onclick=null,h.onclick=null,p&&(f.removeChild(l),f.removeChild(c),f.removeChild(h)),l=null,c=null,h=null,i.firstChild.removeChild(f),f=null,u=null}var s=e("./base");s.call(this,n);var o=e("../config"),u=this;u.type=o.COMPONENT_TYPE_DATAVIEW;var a=["Data View","close","refresh"],f=document.createElement("div"),l=document.createElement("textArea"),c=document.createElement("button"),h=document.createElement("button"),p=!1,d="position:absolute;display:block;overflow:hidden;transition:height 0.8s,background-color 1s;-moz-transition:height 0.8s,background-color 1s;-webkit-transition:height 0.8s,background-color 1s;-o-transition:height 0.8s,background-color 1s;z-index:1;left:0;top:0;",v,m="echarts-dataview",g=n.getHeight(),y=n.getWidth();u.dispose=L,u.resize=k,u.show=w,u.hide=b,C()}return e("../component").define("dataView",t),t}),r("echarts/util/coordinates",["require","zrender/tool/math"],function(e){function n(e,n){return[e*t.sin(n),e*t.cos(n)]}function r(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]}var t=e("zrender/tool/math");return{polar2cartesian:n,cartesian2polar:r}}),r("echarts/component/polar",["require","./base","../config","../util/coordinates","zrender/tool/util","../component"],function(e){function t(t,n,r,i){function p(e,t){i=t,B(e)}function d(){for(var e=0;e<l.length;e++)f.reformOption(l[e]),h=[l[e],r],v(e),m(e),y(e),L(e),g(e);for(var e=0;e<f.shapeList.length;e++)f.shapeList[e].id=n.newShapeId(f.type),n.addShape(f.shapeList[e])}function v(e){var t=l[e],r=f.deepQuery(h,"indicator"),i=r.length,s=t.startAngle,o=2*Math.PI/i,a=f.parsePercent(t.radius,Math.min(n.getWidth(),n.getHeight())/2),c=t.__ecIndicator=[],p;for(var d=0;d<i;d++)p=u.polar2cartesian(a,s*Math.PI/180+o*d),c.push({vector:[p[1],-p[0]]})}function m(e){var t=l[e],n=t.__ecIndicator,r=t.splitArea,i=t.splitLine,s=N(e),o=t.splitNumber,u=i.lineStyle.color,a=i.lineStyle.width,c=i.show,p=f.deepQuery(h,"axisLine");w(n,o,s,r,u,a,c),C(n,s,p)}function g(e){var t=l[e],n=f.deepQuery(h,"indicator"),i=t.__ecIndicator,s,o,u,c,p=f.deepQuery(h,"splitNumber"),d=N(e),o,v,m,g,y,b=f.deepQuery(h,"precision");for(var w=0;w<n.length;w++){s=f.deepQuery([n[w],t,r],"axisLabel");if(s.show){u={},u.textFont=f.getFont(),u=a.merge(u,s),u.lineWidth=u.width,o=i[w].vector,v=i[w].value,g=w/n.length*2*Math.PI,y=s.offset||10;for(var E=1;E<=p;E++)c=a.merge({},u),m=E*(v.max-v.min)/p+v.min,b&&(m=m.toFixed(b)),c.text=f.numAddCommas(m),c.x=E*o[0]/p+Math.cos(g)*y+d[0],c.y=E*o[1]/p+Math.sin(g)*y+d[1],f.shapeList.push({shape:"text",style:c,draggable:!1,hoverable:!1})}}}function y(e){var t=l[e],n=t.__ecIndicator,i,s=f.deepQuery(h,"indicator"),o=N(e),u,a,c,p,d=0,v=0,m,g;for(var y=0;y<s.length;y++){c=f.deepQuery([s[y],t,r],"name");if(!c.show)continue;g=f.deepQuery([c,t,r],"textStyle"),u={},u.textFont=f.getFont(g),u.color=g.color,typeof c.formatter=="function"?u.text=c.formatter(s[y].text,y):typeof c.formatter=="string"?u.text=c.formatter.replace("{value}",s[y].text):u.text=s[y].text,i=n[y].vector,Math.round(i[0])>0?a="left":Math.round(i[0])<0?a="right":a="center",c.margin?(m=c.margin,d=i[0]>0?m:-m,v=i[1]>0?m:-m,d=i[0]===0?0:d,v=i[1]===0?0:v,i=T(i,o,1)):i=T(i,o,1.2),u.textAlign=a,u.x=i[0]+d,u.y=i[1]+v,c.rotate&&(p=[c.rotate/180*Math.PI,i[0],i[1]]),f.shapeList.push({shape:"text",style:u,draggable:!1,hoverable:!1,rotation:p})}}function b(e){var e=e||0,t=l[e],n=N(e),r=t.__ecIndicator,i=r.length,s=[],o,u;for(var a=0;a<i;a++)o=r[a].vector,s.push(T(o,n,1.2));return u=S(s,"fill","rgba(0,0,0,0)","",1),u}function w(e,t,n,r,i,s,o){var u,a,l,c;for(var h=0;h<t;h++)a=(t-h)/t,c=E(e,a,n),o&&(u=S(c,"stroke","",i,s),f.shapeList.push(u)),r.show&&(l=(t-h-1)/t,x(e,r,a,l,n,h))}function E(e,t,n){var r=[],i=e.length,s;for(var o=0;o<i;o++)s=e[o].vector,r.push(T(s,n,t));return r}function S(e,t,n,r,i,s,o){return{shape:"polygon",style:{pointList:e,brushType:t,color:n,strokeColor:r,lineWidth:i},hoverable:s||!1,draggable:o||!1}}function x(e,t,n,r,i,s){var o=e.length,u,a=t.areaStyle.color,l,c,h,p=[],o=e.length,d;typeof a=="string"&&(a=[a]),l=a.length,u=a[s%l];for(var v=0;v<o;v++)p=[],c=e[v].vector,h=e[(v+1)%o].vector,p.push(T(c,i,n)),p.push(T(c,i,r)),p.push(T(h,i,r)),p.push(T(h,i,n)),d=S(p,"fill",u,"",1),f.shapeList.push(d)}function T(e,t,n){return[e[0]*n+t[0],e[1]*n+t[1]]}function N(e){var e=e||0;return f.parseCenter(l[e].center)}function C(e,t,n){var r=e.length,i,s,o=n.lineStyle,u=o.color,a=o.width,l=o.type;for(var c=0;c<r;c++)s=e[c].vector,i=k(t[0],t[1],s[0]+t[0],s[1]+t[1],u,a,l),f.shapeList.push(i)}function k(e,t,n,r,i,s,o){return{shape:"line",style:{xStart:e,yStart:t,xEnd:n,yEnd:r,strokeColor:i,lineWidth:s,lineType:o},hoverable:!1}}function L(e){var t=l[e],n=f.deepQuery(h,"indicator"),r=n.length,i=t.__ecIndicator,s,o,u,a=A(e),c=t.splitNumber,p=f.deepQuery(h,"boundaryGap"),d=f.deepQuery(h,"precision"),v=f.deepQuery(h,"power"),m=f.deepQuery(h,"scale");for(var g=0;g<r;g++)typeof n[g].max=="number"?(o=n[g].max,u=n[g].min||0,s={max:o,min:u}):s=O(a,g,c,p,d,v,m),i[g].value=s}function A(e){var t=[],n,s,u=i.legend;for(var a=0;a<c.length;a++){n=c[a];if(n.type!=o.CHART_TYPE_RADAR)continue;s=n.data||[];for(var l=0;l<s.length;l++)polarIndex=f.deepQuery([s[l],n,r],"polarIndex")||0,polarIndex==e&&(!u||u.isSelected(s[l].name))&&t.push(s[l])}return t}function O(e,t,n,r,i,s,o){function m(e){(e>u||u===undefined)&&(u=e),(e<a||a===undefined)&&(a=e)}var u,a,f,l,c,h=0,p,d,v;if(!e||e.length===0)return;e.length==1&&(a=0);if(e.length!=1)for(var g=0;g<e.length;g++)f=e[g].value[t],m(f);else{v=e[0];for(var g=0;g<v.value.length;g++)m(v.value[g])}if(e.length!=1)if(o){l=M(u,a,n,i,s);if(l>=1)a=Math.floor(a/l)*l-l;else{if(l===0)return u>0?(d=0,p=2*u):u===0?(d=0,p=100):(p=0,d=2*a),{max:p,min:d};c=(l+"").split(".")[1],h=c.length,a=Math.floor(a*Math.pow(10,h))/Math.pow(10,h)-l}Math.abs(a)<=l&&(a=0),u=a+Math.floor(l*Math.pow(10,h)*(n+1))/Math.pow(10,h)}else a=a>0?0:a;return r&&(u=u>0?u*1.2:u*.8,a=a>0?a*.8:a*1.2),{max:u,min:a}}function M(e,t,n,r,i){var s=(e-t)/n,o,u;if(s>1)return i?(s=Math.ceil(s),s%i>0?(Math.ceil(s/i)+1)*i:s):(o=(s+"").split(".")[0],u=o.length,o[0]>=5?Math.pow(10,u):(o[0]-0+1)*Math.pow(10,u-1));if(s==1)return 1;if(s===0)return 0;if(!r){o=(s+"").split(".")[1],u=0;while(o[u]=="0")u++;return o[u]>=5?"0."+o.substring(0,u+1)-0+1/Math.pow(10,u):"0."+o.substring(0,u+1)-0+1/Math.pow(10,u+1)}return Math.ceil(s*Math.pow(10,r))/Math.pow(10,r)}function _(e,t,n){e=e||0,t=t||0;var r=l[e].__ecIndicator;if(t>=r.length)return;var i=l[e].__ecIndicator[t],s=N(e),o=i.vector,u=i.value.max,a=i.value.min,f;return typeof n!="number"?s:(u!=a?f=(n-a)/(u-a):f=.5,T(o,s,f))}function D(e){var t=P(e);return t?t.polarIndex:-1}function P(e){var t,r,i,s,o,a,c,h,p,d=Math.min(n.getWidth(),n.getHeight())/2;for(var v=0;v<l.length;v++){t=l[v],r=N(v);if(e[0]==r[0]&&e[1]==r[1])return{polarIndex:v,valueIndex:0};i=f.parsePercent(t.radius,d),o=t.startAngle,a=t.indicator,c=a.length,h=2*Math.PI/c,s=u.cartesian2polar(e[0]-r[0],r[1]-e[1]),e[0]-r[0]<0&&(s[1]+=Math.PI),s[1]<0&&(s[1]+=2*Math.PI),p=s[1]-o/180*Math.PI+Math.PI*2;if(Math.abs(Math.cos(p%(h/2)))*i>s[0])return{polarIndex:v,valueIndex:Math.floor((p+h/2)/h)%c}}}function H(e){var e=e||0;return l[e].indicator}function B(e){e&&(r=e,l=r.polar,c=r.series),f.clear(),d()}var s=e("./base");s.call(this,n);var o=e("../config"),u=e("../util/coordinates"),a=e("zrender/tool/util"),f=this;f.type=o.COMPONENT_TYPE_POLAR;var l,c,h;f.refresh=B,f.getVector=_,f.getDropBox=b,f.getCenter=N,f.getIndicator=H,f.isInside=D,f.getNearestIndex=P,p(r,i)}return e("../component").define("polar",t),t}),r("echarts/echarts",["require","./config","./config","zrender","zrender/tool/util","zrender/tool/event","zrender/config","./util/shape/icon","./util/shape/markLine","./chart","./chart/island","./component","./component/title","./component/axis","./component/categoryAxis","./component/valueAxis","./component/grid","./component/dataZoom","./component/legend","./component/dataRange","./component/tooltip","./component/toolbox","./component/dataView","./component/polar","./util/ecData","./chart","./component","zrender/tool/util","zrender/tool/util","zrender/tool/util","zrender/tool/color","zrender/tool/util","zrender/tool/util","zrender/tool/util"],function(e){function r(t,r){function y(){var s=e("zrender");(s.version||"1.0.3").replace(".","")-0<n.dependencies.zrender.replace(".","")-0&&console.error("ZRender "+(s.version||"1.0.3-")+" is too old for ECharts "+n.version+". Current version need ZRender "+n.dependencies.zrender+"+"),u=s.init(t);var o=e("zrender/tool/util");a=o.clone(r||{}),c=[],h={};var f=e("zrender/tool/event");f.Dispatcher.call(h),h.bind(i.EVENT.LEGEND_SELECTED,L),h.bind(i.EVENT.DATA_ZOOM,A),h.bind(i.EVENT.DATA_RANGE,O),h.bind(i.EVENT.MAGIC_TYPE_CHANGED,M),h.bind(i.EVENT.DATA_VIEW_CHANGED,_),h.bind(i.EVENT.TOOLTIP_HOVER,D),h.bind(i.EVENT.RESTORE,P),h.bind(i.EVENT.REFRESH,H);var l=e("zrender/config");u.on(l.EVENT.CLICK,b),u.on(l.EVENT.MOUSEOVER,w),u.on(l.EVENT.MOUSEWHEEL,E),u.on(l.EVENT.DRAGSTART,S),u.on(l.EVENT.DRAGEND,k),u.on(l.EVENT.DRAGENTER,x),u.on(l.EVENT.DRAGOVER,T),u.on(l.EVENT.DRAGLEAVE,N),u.on(l.EVENT.DROP,C),e("./util/shape/icon"),e("./util/shape/markLine");var p=e("./chart");e("./chart/island");var d=p.get("island");v=new d(h,u);var g=e("./component");e("./component/title"),e("./component/axis"),e("./component/categoryAxis"),e("./component/valueAxis"),e("./component/grid"),e("./component/dataZoom"),e("./component/legend"),e("./component/dataRange"),e("./component/tooltip"),e("./component/toolbox"),e("./component/dataView"),e("./component/polar");var y=g.get("toolbox");m=new y(h,u,t),U()}function b(e){var t=c.length;while(t--)c[t]&&c[t].onclick&&c[t].onclick(e);if(e.target){var n=F(e.target);n&&typeof n.seriesIndex!="undefined"&&h.dispatch(i.EVENT.CLICK,e.event,n)}}function w(e){if(e.target){var t=F(e.target);t&&typeof t.seriesIndex!="undefined"&&h.dispatch(i.EVENT.HOVER,e.event,t)}}function E(e){h.dispatch(i.EVENT.MOUSEWHEEL,e.event,F(e.target))}function S(e){p={dragIn:!1,dragOut:!1,needRefresh:!1};var t=c.length;while(t--)c[t]&&c[t].ondragstart&&c[t].ondragstart(e)}function x(e){var t=c.length;while(t--)c[t]&&c[t].ondragenter&&c[t].ondragenter(e)}function T(e){var t=c.length;while(t--)c[t]&&c[t].ondragover&&c[t].ondragover(e)}function N(e){var t=c.length;while(t--)c[t]&&c[t].ondragleave&&c[t].ondragleave(e)}function C(e){var t=c.length;while(t--)c[t]&&c[t].ondrop&&c[t].ondrop(e,p);v.ondrop(e,p)}function k(e){var t=c.length;while(t--)c[t]&&c[t].ondragend&&c[t].ondragend(e,p);v.ondragend(e,p),p.needRefresh&&(j(v.getOption()),h.dispatch(i.EVENT.DATA_CHANGED,e.event,F(e.target)),h.dispatch(i.EVENT.REFRESH))}function L(e){p.needRefresh=!1;var t=c.length;while(t--)c[t]&&c[t].onlegendSelected&&c[t].onlegendSelected(e,p);d=e.selected,p.needRefresh&&h.dispatch(i.EVENT.REFRESH)}function A(e){p.needRefresh=!1;var t=c.length;while(t--)c[t]&&c[t].ondataZoom&&c[t].ondataZoom(e,p);p.needRefresh&&h.dispatch(i.EVENT.REFRESH)}function O(e){p.needRefresh=!1;var t=c.length;while(t--)c[t]&&c[t].ondataRange&&c[t].ondataRange(e,p);p.needRefresh&&u.refresh()}function M(){I(B())}function _(e){j(e.option),h.dispatch(i.EVENT.DATA_CHANGED,null,e),h.dispatch(i.EVENT.REFRESH)}function D(e){var t=c.length,n=[];while(t--)c[t]&&c[t].ontooltipHover&&c[t].ontooltipHover(e,n)}function P(){s.restore()}function H(e){g=!0,s.refresh(e),g=!1}function B(e){var t=e||m.getMagicOption(),n;if(f.xAxis)if(f.xAxis instanceof Array){n=f.xAxis.length;while(n--)t.xAxis[n].data=f.xAxis[n].data}else t.xAxis.data=f.xAxis.data;if(f.yAxis)if(f.yAxis instanceof Array){n=f.yAxis.length;while(n--)t.yAxis[n].data=f.yAxis[n].data}else t.yAxis.data=f.yAxis.data;n=t.series.length;while(n--)t.series[n].data=f.series[n].data;return t}function j(e){if(e.dataZoom&&e.dataZoom.show||e.toolbox&&e.toolbox.show&&e.toolbox.feature&&e.toolbox.feature.dataZoom)for(var t=0,n=c.length;t<n;t++)if(c[t].type==i.COMPONENT_TYPE_DATAZOOM){c[t].syncBackupData(e,f);return}var r=e.series,s;for(var t=0,n=r.length;t<n;t++){s=r[t].data;for(var o=0,u=s.length;o<u;o++)f.series[t].data[o]=s[o]}}function F(t){if(t){var n=e("./util/ecData"),r=n.get(t,"seriesIndex"),i=n.get(t,"dataIndex");return i=s.component.dataZoom?s.component.dataZoom.getRealDataIndex(r,i):i,{seriesIndex:r,dataIndex:i,data:n.get(t,"data"),name:n.get(t,"name"),value:n.get(t,"value")}}return}function I(n){U(),u.clear();var r=e("./chart"),i=e("./component"),a;if(n.title){var f=new i.get("title");a=new f(h,u,n),c.push(a),s.component.title=a}var l;if(n.tooltip){var p=i.get("tooltip");l=new p(h,u,n,t),c.push(l),s.component.tooltip=l}var g;if(n.legend){var y=new i.get("legend");g=new y(h,u,n,d),c.push(g),s.component.legend=g}var b;if(n.dataRange){var w=new i.get("dataRange");b=new w(h,u,n),c.push(b),s.component.dataRange=b}var E,S,x,T;if(n.grid||n.xAxis||n.yAxis){var N=i.get("grid");E=new N(h,u,n),c.push(E),s.component.grid=E;var C=i.get("dataZoom");S=new C(h,u,n,{legend:g,grid:E}),c.push(S),s.component.dataZoom=S;var k=i.get("axis");x=new k(h,u,n,{legend:g,grid:E},"xAxis"),c.push(x),s.component.xAxis=x,T=new k(h,u,n,{legend:g,grid:E},"yAxis"),c.push(T),s.component.yAxis=T}var L;if(n.polar){var A=i.get("polar");L=new A(h,u,n,{legend:g}),c.push(L),s.component.polar=L}l&&l.setComponent({grid:E,xAxis:x,yAxis:T,polar:L});var O,M,_,D={};for(var P=0,H=n.series.length;P<H;P++){M=n.series[P].type;if(!M)continue;D[M]||(D[M]=!0,O=r.get(M),O&&(_=new O(h,u,n,{tooltip:l,legend:g,dataRange:b,grid:E,xAxis:x,yAxis:T,polar:L}),c.push(_),s.chart[M]=_))}v.render(n),m.render(n,{dataZoom:S});if(n.animation&&!n.renderAsImage){var B=c.length;while(B--)_=c[B],_&&_.animation&&_.shapeList&&_.shapeList.length<n.animationThreshold&&_.animation()}u.render();var j="IMG"+o,F=document.getElementById(j);n.renderAsImage&&!G_vmlCanvasManager?(F?F.src=K(n.renderAsImage):(F=Q(n.renderAsImage),F.id=j,F.style.position="absolute",F.style.left=0,F.style.top=0,t.firstChild.appendChild(F)),Y(),u.un(),U(),u.clear()):F&&F.parentNode.removeChild(F),F=null}function q(){var t=e("zrender/tool/util");l.legend&&l.legend.selected?d=l.legend.selected:d={},f=t.clone(l),a=t.clone(l),v.clear(),m.reset(a),I(a)}function R(t){t=t||{};var n=t.option;if(!g&&t.option){var r=e("zrender/tool/util");f.toolbox&&f.toolbox.show&&f.toolbox.feature.magicType&&f.toolbox.feature.magicType.length>0?n=B():n=B(v.getOption()),r.merge(n,t.option,{overwrite:!0,recursive:!0}),r.merge(f,t.option,{overwrite:!0,recursive:!0}),r.merge(l,t.option,{overwrite:!0,recursive:!0}),v.refresh(n),m.refresh(n)}for(var i=0,s=c.length;i<s;i++)c[i].refresh&&c[i].refresh(n);u.refresh()}function U(){var e=c.length;while(e--)c[e]&&c[e].dispose&&c[e].dispose();c=[],s.chart={island:v},s.component={toolbox:m}}function z(t,n){var r=e("zrender/tool/util");n?a=r.clone(t):r.merge(a,r.clone(t),{overwrite:!0,recursive:!0});if(!a.series||a.series.length===0)return;typeof a.calculable=="undefined"&&(a.calculable=i.calculable),typeof a.nameConnector=="undefined"&&(a.nameConnector=i.nameConnector),typeof a.valueConnector=="undefined"&&(a.valueConnector=i.valueConnector),typeof a.animation=="undefined"&&(a.animation=i.animation),typeof a.animationThreshold=="undefined"&&(a.animationThreshold=i.animationThreshold),typeof a.animationDuration=="undefined"&&(a.animationDuration=i.animationDuration),typeof a.animationEasing=="undefined"&&(a.animationEasing=i.animationEasing),typeof a.addDataAnimation=="undefined"&&(a.addDataAnimation=i.addDataAnimation);var o=e("zrender/tool/color");return a.color&&a.color.length>0?u.getColor=function(e){return o.getColor(e,a.color)}:u.getColor=function(e){return o.getColor(e,i.color)},u.getCalculableColor=function(){return a.calculableColor||i.calculableColor},f=r.clone(a),l=r.clone(a),a.legend&&a.legend.selected?d=a.legend.selected:d={},v.clear(),m.reset(a),I(a),s}function W(){var t=e("zrender/tool/util");return f.toolbox&&f.toolbox.show&&f.toolbox.feature.magicType&&f.toolbox.feature.magicType.length>0?t.clone(B()):t.clone(B(v.getOption()))}function X(e,t){return t?(a.series=e,s.setOption(a,t)):s.setOption({series:e}),s}function V(){return W().series}function $(t,n,r,o,u){var a=e("zrender/tool/util"),p=t instanceof Array?t:[[t,n,r,o,u]],g,y,b;f.toolbox&&f.toolbox.show&&f.toolbox.feature.magicType&&f.toolbox.feature.magicType.length>0?b=B():b=B(v.getOption());for(var w=0,E=p.length;w<E;w++){t=p[w][0],n=p[w][1],r=p[w][2],o=p[w][3],u=p[w][4];if(l.series[t]){r?(l.series[t].data.unshift(n),f.series[t].data.unshift(n),o||(l.series[t].data.pop(),n=f.series[t].data.pop())):(l.series[t].data.push(n),f.series[t].data.push(n),o||(l.series[t].data.shift(),n=f.series[t].data.shift()));if(typeof u!="undefined"&&l.series[t].type==i.CHART_TYPE_PIE&&f.legend&&f.legend.data)b.legend.data=f.legend.data,r?(l.legend.data.unshift(u),f.legend.data.unshift(u)):(l.legend.data.push(u),f.legend.data.push(u)),o||(y=a.indexOf(f.legend.data,n.name),y!=-1&&(l.legend.data.splice(y,1),f.legend.data.splice(y,1))),d[u]=!0;else if(typeof u!="undefined"&&typeof l.xAxis!="undefined"&&typeof l.yAxis!="undefined"){g=l.series[t].xAxisIndex||0;if(typeof l.xAxis[g].type=="undefined"||l.xAxis[g].type=="category")r?(l.xAxis[g].data.unshift(u),f.xAxis[g].data.unshift(u),o||(l.xAxis[g].data.pop(),f.xAxis[g].data.pop())):(l.xAxis[g].data.push(u),f.xAxis[g].data.push(u),o||(l.xAxis[g].data.shift(),f.xAxis[g].data.shift()));g=l.series[t].yAxisIndex||0,l.yAxis[g].type=="category"&&(r?(l.yAxis[g].data.unshift(u),f.yAxis[g].data.unshift(u),o||(l.yAxis[g].data.pop(),f.yAxis[g].data.pop())):(l.yAxis[g].data.push(u),f.yAxis[g].data.push(u),o||(l.yAxis[g].data.shift(),f.yAxis[g].data.shift())))}}}b.legend&&(b.legend.selected=d);for(var w=0,E=c.length;w<E;w++)b.addDataAnimation&&c[w].addDataAnimation&&c[w].addDataAnimation(p),c[w].type==i.COMPONENT_TYPE_DATAZOOM&&(c[w].silence(!0),c[w].init(b),c[w].silence(!1));return v.refresh(b),m.refresh(b),setTimeout(function(){h.dispatch(i.EVENT.REFRESH,"",{option:b})},b.addDataAnimation?500:0),s}function J(){return u}function K(e){if(G_vmlCanvasManager)return"";if(c.length===0){var t="IMG"+o,n=document.getElementById(t);if(n)return n.src}return e=e||"png",e!="png"&&e!="jpeg"&&(e="png"),u.toDataURL("image/"+e)}function Q(e){var t=document.createElement("img");return t.src=K(e),t.title=l.title&&l.title.text||"ECharts",t}function G(e,t){return h.bind(e,t),s}function Y(e,t){return h.unbind(e,t),s}function Z(t){m.hideDataView();var n=e("zrender/tool/util");t=t||{},t.textStyle=t.textStyle||{};var r=n.merge(n.clone(t.textStyle),i.textStyle,{overwrite:!1});return t.textStyle.textFont=r.fontStyle+" "+r.fontWeight+" "+r.fontSize+"px "+r.fontFamily,t.textStyle.text=t.text||i.loadingText,typeof t.x!="undefined"&&(t.textStyle.x=t.x),typeof t.y!="undefined"&&(t.textStyle.y=t.y),u.showLoading(t),s}function et(){return u.hideLoading(),s}function tt(){u.resize();if(a.renderAsImage&&!G_vmlCanvasManager)return I(a),s;for(var e=0,t=c.length;e<t;e++)c[e].resize&&c[e].resize();return v.resize(),m.resize(),u.refresh(),h.dispatch(i.EVENT.RESIZE),s}function nt(){return u.clear(),s}function rt(){v.dispose(),m.dispose(),U(),h.unbind(),u.dispose(),s=null;return}var i=e("./config"),s=this,o="__ECharts__"+new Date-0,u,a,f,l,c,h,p={dragIn:!1,dragOut:!1,needRefresh:!1},d,v,m,g;y(),s.setOption=z,s.setSeries=X,s.addData=$,s.getOption=W,s.getSeries=V,s.getZrender=J,s.getDataURL=K,s.getImage=Q,s.on=G,s.un=Y,s.showLoading=Z,s.hideLoading=et,s.resize=tt,s.refresh=R,s.restore=q,s.clear=nt,s.dispose=rt}var t={},n=t;return t.version="1.3.7",t.dependencies={zrender:"1.0.9"},t.init=function(t){t=t instanceof Array?t[0]:t;if(G_vmlCanvasManager){var n=e("./config");n.textStyle.fontFamily=n.textStyle.fontFamily2}return new r(t)},t}),r("echarts",["echarts/echarts"],function(e){return e}),r("echarts/util/shape/symbol",["require","zrender/tool/color","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function t(){this.type="symbol"}return t.prototype={_buildSinglePoint:function(e,t){switch(t[3]){case"circle":case"emptyCircle":e.arc(t[0],t[1],t[2],0,Math.PI*2,!0);break;case"rectangle":case"emptyRectangle":e.rect(t[0]-t[2],t[1]-t[2],t[2]*2,t[2]*2);break;case"triangle":case"emptyTriangle":itemShape={shape:"polygon",style:{pointList:[[x,y-symbolSize],[x+symbolSize,y+symbolSize],[x-symbolSize,y+symbolSize]],brushType:symbolType=="triangle"?"fill":"stroke"}};break;case"diamond":case"emptyDiamond":itemShape={shape:"polygon",style:{pointList:[[x,y-symbolSize],[x+symbolSize,y],[x,y+symbolSize],[x-symbolSize,y]],brushType:symbolType=="diamond"?"fill":"stroke"}};break;default:itemShape={shape:"circle",style:{x:x,y:y,r:symbolSize,brushType:"fill"}}}},buildPath:function(t,n){var r=n.pointList,i=this.getRect(n),s=window.devicePixelRatio||1;i={x:Math.floor(i.x),y:Math.floor(i.y),width:Math.floor(i.width),height:Math.floor(i.height)};var o=t.getImageData(i.x*s,i.y*s,i.width*s,i.height*s),u=o.data,a,f=e("zrender/tool/color"),l=f.toArray(n.color),c=l[0],h=l[1],p=l[2],d=i.width;for(var v=1,m=r.length;v<m;v++)a=((r[v][0]-i.x)*s+(r[v][1]-i.y)*d*s*s)*4,u[a]=c,u[a+1]=h,u[a+2]=p,u[a+3]=255;t.putImageData(o,i.x*s,i.y*s);return},getRect:function(t){var n=e("zrender/shape");return n.get("polygon").getRect(t)},isCover:function(){return!1}},e("zrender/shape/base").derive(t),e("zrender/shape").define("symbol",new t),t}),r("echarts/chart/scatter",["require","../component/base","./calculableBase","../config","zrender/tool/color","../util/shape/symbol","../chart"],function(e){function t(t,n,r,i){function v(){f.selectedMap={};var e=i.legend,t=[],r,s,o,c;for(var v=0,g=l.length;v<g;v++){r=l[v],s=r.name;if(r.type==u.CHART_TYPE_SCATTER){l[v]=f.reformOption(l[v]),d[v]=f.query(r,"symbol")||p[v%p.length];if(e){f.selectedMap[s]=e.isSelected(s),h[v]=a.alpha(e.getColor(s),.5),o=e.getItemShape(s);if(o){o.shape="icon";var c=d[v];o.style.brushType=c.match("empty")?"stroke":"both",c=c.replace("empty","").toLowerCase(),c.match("star")&&(o.style.n=c.replace("star","")-0||5,c="star"),c.match("image")&&(o.style.image=c.replace(new RegExp("^image:\\/\\/"),""),o.style.x+=Math.round((o.style.width-o.style.height)/2),o.style.width=o.style.height,c="image"),o.style.iconType=c,e.setItemShape(s,o)}}else f.selectedMap[s]=!0,h[v]=n.getColor(v);f.selectedMap[s]&&t.push(v)}}if(t.length===0)return;m(t);for(var v=0,g=f.shapeList.length;v<g;v++)f.shapeList[v].id=n.newShapeId(f.type),n.addShape(f.shapeList[v])}function m(e){var t,n,r,s,o,u,a={},c,h;for(var p=0,d=e.length;p<d;p++){t=e[p],n=l[t];if(n.data.length===0)continue;o=i.xAxis.getAxis(n.xAxisIndex||0),u=i.yAxis.getAxis(n.yAxisIndex||0),a[t]=[];for(var v=0,m=n.data.length;v<m;v++){r=n.data[v],s=typeof r!="undefined"?typeof r.value!="undefined"?r.value:r:"-";if(s=="-"||s.length<2)continue;c=o.getCoord(s[0]),h=u.getCoord(s[1]),a[t].push([c,h,v,r.name||""])}f.buildMark(n,t,i)}g(a)}function g(e){var t,n,r,i;for(var s in e){t=l[s],n=e[s];if(t.large&&t.data.length>t.largeThreshold){f.shapeList.push(b(n,f.query(t,"itemStyle.normal.color")||h[s]));continue}for(var o=0,u=n.length;o<u;o++)r=n[o],i=y(s,r[2],r[3],r[0],r[1]),i&&f.shapeList.push(i)}}function y(e,t,n,r,s){var o=l[e],u=o.data[t],a=i.dataRange,p;if(a){p=isNaN(u[2])?h[e]:a.getColor(u[2]);if(!p)return null}else p=h[e];var v=f.getSymbolShape(o,e,u,t,n,r,s,d[e],p,"rgba(0,0,0,0)","vertical");return v.zlevel=c,v._mark=!1,v._main=!0,v}function b(e,t){return{shape:"symbol",zlevel:c,_main:!0,hoverable:!1,style:{pointList:e,color:t,strokeColor:t}}}function w(e,t,n){var r=i.xAxis.getAxis(e.xAxisIndex),s=i.yAxis.getAxis(e.yAxisIndex);return[typeof n.xAxis!="string"&&r.getCoordByIndex?r.getCoordByIndex(n.xAxis||0):r.getCoord(n.xAxis||0),typeof n.yAxis!="string"&&s.getCoordByIndex?s.getCoordByIndex(n.yAxis||0):s.getCoord(n.yAxis||0)]}function E(e,t){i=t,S(e)}function S(e){e&&(r=e,l=r.series),f.clear(),v()}function x(e,t){i.dataRange&&(S(),t.needRefresh=!0);return}function T(){var e=f.query(r,"animationDuration"),t=f.query(r,"animationEasing"),i,s,o;for(var u=0,a=f.shapeList.length;u<a;u++)if(f.shapeList[u]._main){if(f.shapeList[u].shape=="symbol")continue;o=l[f.shapeList[u]._seriesIndex],i=f.shapeList[u]._x||0,s=f.shapeList[u]._y||0,n.modShape(f.shapeList[u].id,{scale:[0,0,i,s]},!0),n.animate(f.shapeList[u].id,"").when(f.query(o,"animationDuration")||e,{scale:[1,1,i,s]}).start(f.query(o,"animationEasing")||t)}f.animationMark(e,t)}var s=e("../component/base");s.call(this,n);var o=e("./calculableBase");o.call(this,n,r);var u=e("../config"),a=e("zrender/tool/color"),f=this;f.type=u.CHART_TYPE_SCATTER;var l,c=f.getZlevelBase(),h={},p=["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],d={};f.getMarkCoord=w,f.animation=T,f.init=E,f.refresh=S,f.ondataRange=x,E(r,i)}return e("../util/shape/symbol"),e("../chart").define("scatter",t),t}),r("echarts/util/shape/candle",["require","zrender/tool/matrix","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="candle"}var t=e("zrender/tool/matrix");return n.prototype={_numberOrder:function(e,t){return t-e},buildPath:function(e,t){t.y.sort(this._numberOrder),e.moveTo(t.x,t.y[3]),e.lineTo(t.x,t.y[2]),e.moveTo(t.x-t.width/2,t.y[2]),e.rect(t.x-t.width/2,t.y[2],t.width,t.y[1]-t.y[2]),e.moveTo(t.x,t.y[1]),e.lineTo(t.x,t.y[0]);return},getRect:function(e){var t;return e.brushType=="stroke"||e.brushType=="fill"?t=e.lineWidth||1:t=0,{x:Math.round(e.x-e.width/2-t/2),y:Math.round(e.y[3]-t/2),width:e.width+t,height:e.y[0]-e.y[3]+t}},isCover:function(e,n,r){if(e.__needTransform&&e._transform){var i=[];t.invert(i,e._transform);var s=[n,r];t.mulVector(s,i,[n,r,1]),n==s[0]&&r==s[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),n=s[0],r=s[1]}var o;return e.style.__rect?o=e.style.__rect:(o=this.getRect(e.style),o=[o.x,o.x+o.width,o.y,o.y+o.height],e.style.__rect=o),n>=o[0]&&n<=o[1]&&r>=o[2]&&r<=o[3]?!0:!1}},e("zrender/shape/base").derive(n),e("zrender/shape").define("candle",new n),n}),r("echarts/chart/k",["require","../component/base","./calculableBase","../config","../util/ecData","../util/shape/candle","../chart"],function(e){function t(t,n,r,i){function h(){f.selectedMap={};var e={top:[],bottom:[]},t;for(var r=0,s=l.length;r<s;r++)l[r].type==u.CHART_TYPE_K&&(l[r]=f.reformOption(l[r]),t=i.xAxis.getAxis(l[r].xAxisIndex),t.type==u.COMPONENT_TYPE_AXIS_CATEGORY&&e[t.getPosition()].push(r));for(var o in e)e[o].length>0&&p(o,e[o]);for(var r=0,s=f.shapeList.length;r<s;r++)f.shapeList[r].id=n.newShapeId(f.type),n.addShape(f.shapeList[r])}function p(e,t){var n=d(t),r=n.locationMap,s=n.maxDataLength;if(s===0||r.length===0)return;v(s,r);for(var o=0,u=t.length;o<u;o++)f.buildMark(l[t[o]],t[o],i)}function d(e){var t,n,r=i.legend,s=[],o=0;for(var u=0,a=e.length;u<a;u++)t=l[e[u]],n=t.name,r?f.selectedMap[n]=r.isSelected(n):f.selectedMap[n]=!0,f.selectedMap[n]&&s.push(e[u]),o=Math.max(o,t.data.length);return{locationMap:s,maxDataLength:o}}function v(e,t){var n,r,s,o,u,a,f={},c,h,p,d;for(var v=0,g=t.length;v<g;v++){n=t[v],r=l[n],s=r.xAxisIndex||0,o=i.xAxis.getAxis(s),c=r.barWidth||Math.floor(o.getGap()/2),d=r.barMaxWidth,d&&d<c&&(c=d),u=r.yAxisIndex||0,a=i.yAxis.getAxis(u),f[n]=[];for(var y=0,b=e;y<b;y++){if(typeof o.getNameByIndex(y)=="undefined")break;h=r.data[y],p=typeof h!="undefined"?typeof h.value!="undefined"?h.value:h:"-";if(p=="-"||p.length!=4)continue;f[n].push([o.getCoordByIndex(y),c,a.getCoord(p[0]),a.getCoord(p[1]),a.getCoord(p[2]),a.getCoord(p[3]),y,o.getNameByIndex(y)])}}m(f)}function m(e){var t,n,r,i,s,o,a,c,h,p,d,v,m,y,b,w;for(var E=0,S=l.length;E<S;E++){d=l[E],y=e[E];if(d.type==u.CHART_TYPE_K&&typeof y!="undefined"){v=d,t=f.query(v,"itemStyle.normal.lineStyle.width"),n=f.query(v,"itemStyle.normal.lineStyle.color"),r=f.query(v,"itemStyle.normal.lineStyle.color0"),i=f.query(v,"itemStyle.normal.color"),s=f.query(v,"itemStyle.normal.color0"),o=f.query(v,"itemStyle.emphasis.lineStyle.width"),a=f.query(v,"itemStyle.emphasis.lineStyle.color"),c=f.query(v,"itemStyle.emphasis.lineStyle.color0"),h=f.query(v,"itemStyle.emphasis.color"),p=f.query(v,"itemStyle.emphasis.color0");for(var x=0,T=y.length;x<T;x++)b=y[x],m=d.data[b[6]],v=m,w=b[3]<b[2],f.shapeList.push(g(E,b[6],b[7],b[0],b[1],b[2],b[3],b[4],b[5],w?f.query(v,"itemStyle.normal.color")||i:f.query(v,"itemStyle.normal.color0")||s,f.query(v,"itemStyle.normal.lineStyle.width")||t,w?f.query(v,"itemStyle.normal.lineStyle.color")||n:f.query(v,"itemStyle.normal.lineStyle.color0")||r,w?f.query(v,"itemStyle.emphasis.color")||h||i:f.query(v,"itemStyle.emphasis.color0")||p||s,f.query(v,"itemStyle.emphasis.lineStyle.width")||o||t,w?f.query(v,"itemStyle.emphasis.lineStyle.color")||a||n:f.query(v,"itemStyle.emphasis.lineStyle.color0")||c||r))}}}function g(e,t,n,r,i,s,o,u,f,h,p,d,v,m,g){var y={shape:"candle",zlevel:c,clickable:!0,style:{x:r,y:[s,o,u,f],width:i,color:h,strokeColor:d,lineWidth:p,brushType:"both"},highlightStyle:{color:v,strokeColor:g,lineWidth:m},_seriesIndex:e};return a.pack(y,l[e],e,l[e].data[t],t,n),y}function y(e,t,n){var r=i.xAxis.getAxis(e.xAxisIndex),s=i.yAxis.getAxis(e.yAxisIndex);return[typeof n.xAxis!="string"&&r.getCoordByIndex?r.getCoordByIndex(n.xAxis||0):r.getCoord(n.xAxis||0),typeof n.yAxis!="string"&&s.getCoordByIndex?s.getCoordByIndex(n.yAxis||0):s.getCoord(n.yAxis||0)]}function b(e,t){i=t,w(e)}function w(e){e&&(r=e,l=r.series),f.clear(),h()}function E(e){var t={};for(var r=0,s=e.length;r<s;r++)t[e[r][0]]=e[r];var o,u,c,h,p,d;for(var r=0,s=f.shapeList.length;r<s;r++){p=f.shapeList[r]._seriesIndex;if(t[p]&&!t[p][3]&&f.shapeList[r].shape=="candle"){d=a.get(f.shapeList[r],"dataIndex"),h=l[p];if(t[p][2]&&d==h.data.length-1){n.delShape(f.shapeList[r].id);continue}if(!t[p][2]&&d===0){n.delShape(f.shapeList[r].id);continue}u=i.xAxis.getAxis(h.xAxisIndex||0).getGap(),o=t[p][2]?u:-u,c=0,n.animate(f.shapeList[r].id,"").when(500,{position:[o,c]}).start()}}}function S(){var e=f.query(r,"animationDuration"),t=f.query(r,"animationEasing"),i,s,o;for(var u=0,a=f.shapeList.length;u<a;u++)f.shapeList[u].shape=="candle"&&(o=l[f.shapeList[u]._seriesIndex],i=f.shapeList[u].style.x,s=f.shapeList[u].style.y[0],n.modShape(f.shapeList[u].id,{scale:[1,0,i,s]},!0),n.animate(f.shapeList[u].id,"").when(f.query(o,"animationDuration")||e,{scale:[1,1,i,s]}).start(f.query(o,"animationEasing")||t));f.animationMark(e,t)}var s=e("../component/base");s.call(this,n);var o=e("./calculableBase");o.call(this,n,r);var u=e("../config"),a=e("../util/ecData"),f=this;f.type=u.CHART_TYPE_K;var l,c=f.getZlevelBase();f.getMarkCoord=y,f.animation=S,f.init=b,f.refresh=w,f.addDataAnimation=E,b(r,i)}return e("../util/shape/candle"),e("../chart").define("k",t),t}),r("echarts/chart/radar",["require","../component/base","./calculableBase","../config","../util/ecData","zrender/tool/color","../util/accMath","../chart"],function(e){function t(t,n,r,i){function y(){var e=i.legend;l.selectedMap={},v=[],g=0;var t;for(var s=0,o=c.length;s<o;s++)c[s].type==u.CHART_TYPE_RADAR&&(h=l.reformOption(c[s]),t=h.name||"",l.selectedMap[t]=e?e.isSelected(t):!0,l.selectedMap[t]&&(d=[h,r],l.deepQuery(d,"calculable")&&x(s),b(s),l.buildMark(c[s],s,i)));for(var s=0,o=l.shapeList.length;s<o;s++)l.shapeList[s].id=n.newShapeId(l.type),n.addShape(l.shapeList[s])}function b(e){var t=i.legend,r,s=h.data,o,u,a,f=l.deepQuery(d,"calculable");for(var c=0;c<s.length;c++){u=s[c].name||"",l.selectedMap[u]=t?t.isSelected(u):!0;if(!l.selectedMap[u])continue;t?(o=t.getColor(u),r=t.getItemShape(u),r&&(r.style.brushType=l.deepQuery([s[c],h],"itemStyle.normal.areaStyle")?"both":"stroke",t.setItemShape(u,r))):o=n.getColor(c),a=w(h.polarIndex,s[c]),E(a,o,c,e),S(a,o,s[c],e,c,f),g++}}function w(e,t){var n=[],r,s=i.polar;for(var o=0,u=t.value.length;o<u;o++)r=s.getVector(e,o,t.value[o]),r&&n.push(r);return n}function E(e,t,n,r){var i;for(var s=0,o=e.length;s<o;s++)i=l.getSymbolShape(c[r],r,c[r].data[n],n,"",e[s][0],e[s][1],m[g%m.length],t,"#fff","vertical"),i.zlevel=p+1,l.shapeList.push(i)}function S(e,t,n,r,s,o){var u=[n,h],d=l.deepQuery(u,"itemStyle.normal.color"),v=l.deepQuery(u,"itemStyle.normal.lineStyle.width"),m=l.deepQuery(u,"itemStyle.normal.lineStyle.type"),g=l.deepQuery(u,"itemStyle.normal.areaStyle.color"),y=l.deepQuery(u,"itemStyle.normal.areaStyle"),b={shape:"polygon",zlevel:p,style:{pointList:e,brushType:y?"both":"stroke",color:g||d||f.alpha(t,.5),strokeColor:d||t,lineWidth:v,lineType:m},highlightStyle:{brushType:l.deepQuery(u,"itemStyle.emphasis.areaStyle")||y?"both":"stroke",color:l.deepQuery(u,"itemStyle.emphasis.areaStyle.color")||g||d||f.alpha(t,.5),strokeColor:l.deepQuery(u,"itemStyle.emphasis.color")||d||t,lineWidth:l.deepQuery(u,"itemStyle.emphasis.lineStyle.width")||v,lineType:l.deepQuery(u,"itemStyle.emphasis.lineStyle.type")||m}};a.pack(b,c[r],r,n,s,n.name,i.polar.getIndicator(c[r].polarIndex)),o&&(b.draggable=!0,l.setCalculable(b)),l.shapeList.push(b)}function x(e){var t=l.deepQuery(d,"polarIndex");if(!v[t]){var n=i.polar.getDropBox(t);n.zlevel=p,l.setCalculable(n),a.pack(n,c,e,undefined,-1),l.shapeList.push(n),v[t]=!0}}function T(e,t){if(!l.isDragend||!e.target)return;var n=e.target,r=a.get(n,"seriesIndex"),s=a.get(n,"dataIndex");i.legend&&i.legend.del(c[r].data[s].name),c[r].data.splice(s,1),t.dragOut=!0,t.needRefresh=!0,l.isDragend=!1;return}function N(t,n){if(!l.isDrop||!t.target)return;var s=t.target,o=t.dragged,u=a.get(s,"seriesIndex"),f=a.get(s,"dataIndex"),h,p=i.legend,d;if(f==-1)h={value:a.get(o,"value"),name:a.get(o,"name")},c[u].data.push(h),p&&p.add(h.name,o.style.color||o.style.strokeColor);else{var v=e("../util/accMath");h=c[u].data[f],p&&p.del(h.name),h.name+=r.nameConnector+a.get(o,"name"),d=a.get(o,"value");for(var m=0;m<d.length;m++)h.value[m]=v.accAdd(h.value[m],d[m]);p&&p.add(h.name,o.style.color||o.style.strokeColor)}n.dragIn=n.dragIn||!0,l.isDrop=!1;return}function C(e,t){i=t,k(e)}function k(e){e&&(r=e,c=r.series),l.clear(),y()}function L(){var e=l.query(r,"animationDuration"),t=l.query(r,"animationEasing"),s,o,u,f,h,p=i.polar,d,v,m,g;for(var y=0,b=l.shapeList.length;y<b;y++)l.shapeList[y].shape=="polygon"&&(v=l.shapeList[y],o=a.get(v,"seriesIndex"),s=a.get(v,"dataIndex"),f=c[o],u=f.data[s],h=l.deepQuery([u,f,r],"polarIndex"),d=p.getCenter(h),m=d[0],g=d[1],n.modShape(l.shapeList[y].id,{scale:[.1,.1,m,g]},!0),n.animate(v.id,"").when((l.query(f,"animationDuration")||e)+s*100,{scale:[1,1,m,g]}).start(l.query(f,"animationEasing")||t));l.animationMark(e,t)}var s=e("../component/base");s.call(this,n);var o=e("./calculableBase");o.call(this,n,r);var u=e("../config"),a=e("../util/ecData"),f=e("zrender/tool/color"),l=this;l.type=u.CHART_TYPE_RADAR;var c,h,p=l.getZlevelBase(),d,v,m=["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],g;l.animation=L,l.init=C,l.refresh=k,l.ondrop=N,l.ondragend=T,C(r,i)}return e("../chart").define("radar",t),t}),r("echarts/util/shape/chord",["require","zrender/tool/util","zrender/shape/base","zrender/shape"],function(e){function n(){this.type="chord"}var t=e("zrender/tool/util"),r=t.getContext();return n.prototype={buildPath:function(e,t){var n=Math.PI*2,r=t.center[0],i=t.center[1],s=t.r,o=t.source0/180*Math.PI,u=t.source1/180*Math.PI,a=t.target0/180*Math.PI,f=t.target1/180*Math.PI,l=r+Math.cos(n-o)*s,c=i-Math.sin(n-o)*s,h=r+Math.cos(n-u)*s,p=i-Math.sin(n-u)*s,d=r+Math.cos(n-a)*s,v=i-Math.sin(n-a)*s,m=r+Math.cos(n-f)*s,g=i-Math.sin(n-f)*s;e.moveTo(l,c),e.arc(r,i,t.r,o,u,!1),e.bezierCurveTo((r-h)*.7+h,(i-p)*.7+p,(r-d)*.7+d,(i-v)*.7+v,d,v);if(t.source0===t.target0&&t.source1===t.target1)return;e.arc(r,i,t.r,a,f,!1),e.bezierCurveTo((r-m)*.7+m,(i-g)*.7+g,(r-l)*.7+l,(i-c)*.7+c,l,c)},getRect:function(){return{x:0,y:0,width:0,height:0}},isCover:function(e,t,i){if(!r.isPointInPath)return!1;if(e.__needTransform&&e._transform){var s=[];matrix.invert(s,e._transform);var o=[t,i];matrix.mulVector(o,s,[t,i,1]),t==o[0]&&i==o[1]&&(Math.abs(e.rotation[0])>1e-4||Math.abs(e.position[0])>1e-4||Math.abs(e.position[1])>1e-4||Math.abs(e.scale[0]-1)>1e-4||Math.abs(e.scale[1]-1)>1e-4?e.__needTransform=!0:e.__needTransform=!1),t=o[0],i=o[1]}return r.beginPath(),n.prototype.buildPath.call(null,r,e.style),r.closePath(),r.isPointInPath(t,i)}},e("zrender/shape/base").derive(n),e("zrender/shape").define("chord",new n),n}),r("echarts/util/kwargs",[],function(){function e(e,t){var n=new RegExp("(\\/\\*[\\w\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\'][^\\n\\r]*$)|(<![\\-\\-\\s\\w\\>\\/]*>)","gim"),r=new RegExp("\\s+","gim"),i=new RegExp("function.*?\\((.*?)\\)","i"),s=e.toString().replace(n,"").replace(r,"").match(i)[1].split(",");return t!==Object(t)&&(t={}),function(){var n=Array.prototype.slice.call(arguments),r=n[n.length-1];r&&r.constructor===Object?n.pop():r={};for(var i=0;i<s.length;i++){var o=s[i];o in r?n[i]=r[o]:o in t&&n[i]===undefined&&(n[i]=t[o])}return e.apply(this,n)}}return e}),r("echarts/util/ndarray",["require","./kwargs"],function(e){function d(e){if(typeof e=="undefined")return"number";switch(Object.prototype.toString.call(e)){case"[object Int32Array]":return"int32";case"[object Int16Array]":return"int16";case"[object Int8Array]":return"int8";case"[object Uint32Array]":return"uint32";case"[object Uint16Array]":return"uint16";case"[object Uint8Array]":return"uint8";case"[object Uint8ClampedArray]":return"uint8c";case"[object Float32Array]":return"float32";case"[object Float64Array]":return"float64";default:return"number"}}function m(e,t){if(e.indexOf(":")>=0){var n=e.split(/\s*:\s*/),r=parseInt(n[2]||1,10),i,s;if(r===0)throw new Error("Slice step cannot be zero");return r>0?(i=parseInt(n[0]||0,10),s=parseInt(n[1]||t,10)):(i=parseInt(n[0]||t-1,10),s=parseInt(n[1]||-1,10)),i<0&&(i=t+i),s<0&&n[1]&&(s=t+s),r>0?(i=Math.max(Math.min(t,i),0),s=Math.max(Math.min(t,s),0)):(i=Math.max(Math.min(t-1,i),-1),s=Math.max(Math.min(t-1,s),-1)),[i,s,r]}var i=parseInt(e,10);i<0&&(i=t+i);if(i<0||i>t)throw new Error(N(e));return i=Math.max(Math.min(t-1,i),0),[i,i+1,1]}function g(e){var t=e[0];for(var n=1;n<e.length;n++)t*=e[n];return t}function y(e){var t=1,n=e[0];while(n instanceof Array)n=n[0],t++;return t}function b(e){var t=[e.length],n=e[0];while(n instanceof Array)t.push(n.length),n=n[0];return t}function w(e,t){if(t==e.length-1)return 1;var n=e[t+1];for(var r=t+2;r<e.length;r++)n*=e[r];return n}function E(e){var t=[],n=1,r=g(e);for(var i=0;i<e.length;i++)n*=e[i],t.push(r/n);return t}function S(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function x(e,t){return"Shape ("+e.toString()+") ("+t.toString()+") could not be broadcast together"}function T(e){return"Axis "+e+" out of bounds"}function N(e){return"Index "+e+" out of bounds"}var t=e("./kwargs"),n=Array.prototype.slice;this.Int32Array=window.Int32Array||Array,this.Int16Array=window.Int16Array||Array,this.Int8Array=window.Int8Array||Array,this.Uint32Array=window.Uint32Array||Array,this.Uint16Array=window.Uint16Array||Array,this.Uint8Array=window.Uint8Array||Array,this.Float32Array=window.Float32Array||Array,this.Float64Array=window.Float64Array||Array;var r={int32:this.Int32Array,int16:this.Int16Array,int8:this.Int8Array,uint32:this.Uint32Array,uint16:this.Uint16Array,uint8:this.Uint8Array,uint8c:this.Uint8ClampedArray,float32:this.Float32Array,float64:this.Float64Array,number:Array},i={int32:4,int16:2,int8:1,uint32:4,uint16:2,uint8:1,uint8c:1,float32:4,float64:8,number:1},s=0,o=1,u=2,a=3,f=4,l=5,c=6,h=7,p=8,v=function(e){var t=arguments[arguments.length-1];typeof t=="string"?this._dtype=t:this._dtype=d(e);if(e&&typeof e!="string"){if(e instanceof v)return e._dtype=this._dtype,e;typeof e.length!="undefined"?this.initFromArray(e):typeof e=="number"&&this.initFromShape.apply(this,arguments)}else this._array=new r[this._dtype],this._shape=[0],this._size=0};return v.prototype={initFromArray:function(e){function i(e,r,s){var o=s.length;for(var u=0;u<o;u++)e<t-1?i(e+1,r,s[u]):r[n++]=s[u]}var t=y(e),n=0,s=b(e),o=g(s);return this._array=new r[this._dtype](o),i(0,this._array,e),this._shape=s,this._size=o,this},initFromShape:function(e){typeof e=="number"&&(e=Array.prototype.slice.call(arguments));if(e){var t=g(e);if(this._dtype==="number"){this._array=[];var n=this._array;for(var i=0;i<t;i++)n[i]=0}else this._array=new r[this._dtype](t)}return this._shape=e,this._size=g(e),this},fill:function(e){var t=this._array;for(var n=0;n<t.length;n++)t[n]=e;return this},shape:function(){return this._shape.slice()},size:function(){return this._size},dtype:function(){return this._dtype},dimension:function(){return this._shape.length},strides:function(){var e=E(this._shape),t=i[this._dtype];for(var n=0;n<e.length;n++)e[n]*=t;return e},reshape:function(e){typeof e=="number"&&(e=Array.prototype.slice.call(arguments));if(!this._isShapeValid(e))throw new Error("Total size of new array must be unchanged");return this._shape=e,this},_isShapeValid:function(e){return g(e)===this._size},resize:function(e){typeof e=="number"&&(e=Array.prototype.slice.call(arguments));var t=g(e);if(t<this._size)this._dtype==="number"&&(this._array.length=t);else if(this._dtype==="number")for(var n=this._array.length;n<t;n++)this._array[n]=0;else{var i=new r[this._dtype](t),s=this._array;for(var n=0;n<s.length;n++)i[n]=s[n];this._array=i}return this._shape=e,this._size=t,this},transpose:t(function(e,t){var n=[];for(var r=0;r<this._shape.length;r++)n.push(r);typeof e=="undefined"&&(e=n.slice());for(var r=0;r<e.length;r++)if(e[r]>=this._shape.length)throw new Error(T(e[r]));if(e.length<=1)return this;var i=n.slice();for(var r=0;r<Math.floor(e.length/2);r++)for(var s=e.length-1;s>=Math.ceil(e.length/2);s--)i[e[r]]=e[s],i[e[s]]=e[r];return this._transposelike(i,t)}),swapaxes:t(function(e,t,n){return this.transpose([e,t],n)}),rollaxis:t(function(e,t,n){if(e>=this._shape.length)throw new Error(T(e));var r=[];for(var i=0;i<this._shape.length;i++)r.push(i);return r.splice(e,1),r.splice(t,0,e),this._transposelike(r,n)},{start:0}),_transposelike:function(e,t){function p(e,t,r){var u=i[e],a=s[e],f=c[e];if(e<o-1)for(var l=0;l<u;l++)p(e+1,t+a*l,r+f*l);else for(var l=0;l<u;l++)h[r+l]=n[t+a*l]}var n=this._array,i=this._shape.slice(),s=E(this._shape),o=i.length,u=[],a=[];for(var f=0;f<e.length;f++){var l=e[f];a[f]=i[l],u[f]=s[l]}s=u,i=a,this._shape=i;var c=E(this._shape);t||(t=new v,t._shape=this._shape.slice(),t._dtype=this._dtype,t._size=this._size);var h=new r[this._dtype](this._size);return t._array=h,p(0,0,0),t},repeat:t(function(e,t,n){var r;typeof t=="undefined"?(r=[this._size],t=0):r=this._shape.slice();var i=r.slice();r[t]*=e;if(!n)n=new v(this._dtype),n.initFromShape(r);else if(!S(r,n._shape))throw new Error(x(r,n._shape));var s=n._array,o=w(i,t),u=i[t],a=this._array,f=o*u;for(var l=0;l<this._size;l+=f)for(var c=0;c<o;c++){var h=l+c,p=l*e+c;for(var d=0;d<u;d++){for(var m=0;m<e;m++)s[p]=a[h],p+=o;h+=o}}return n}),choose:function(){console.warn("TODO")},take:function(){console.warn("TODO")},tile:function(){console.warn("TODO")},_withPreprocess1:function(e,t,n,r){var i=this._array;if(!this._size)return;if(typeof e!="undefined"){e<0&&(e=this._shape.length+e);if(e>=this._shape.length||e<0)throw new Error(T(e));var s=this._shape.slice();s.splice(e,1);if(t&&!S(s,t._shape))throw new Error(x(s,t._shape));t||(t=new v(this._dtype),t.initFromShape(s));var o=t._array,u=w(this._shape,e),a=this._shape[e],f=u*a;return n.call(this,o,i,f,a,u),t}return r.call(this,i)},_withPreprocess2:function(e,t,n,r){var i=this._array;if(!this._size)return;if(t&&!S(this._shape,t._shape))throw new Error(x(this._shape,t._shape));t||(t=new v(this._dtype),t.initFromShape(this._shape));var s=t._array;if(typeof e!="undefined"){e<0&&(e=this._shape.length+e);if(e>=this._shape.length||e<0)throw new Error(T(e));if(e>=this._shape.length)throw new Error(T(e));var o=w(this._shape,e),u=this._shape[e],a=o*u;n.call(this,s,i,a,u,o)}else t.reshape([this._size]),r.call(this,s,i);return t},max:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=u+o,f=t[a];for(var l=0;l<r;l++){var c=t[a];c>f&&(f=c),a+=i}e[s++]=f}}function t(e){var t=e[0];for(var n=1;n<this._size;n++)e[n]>t&&(t=e[n]);return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),min:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=u+o,f=t[a];for(var l=0;l<r;l++){var c=t[a];c<f&&(f=c),a+=i}e[s++]=f}}function t(e){var t=e[0];for(var n=1;n<this._size;n++)e[n]<t&&(t=e[n]);return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),argmax:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o,l=t[f];for(var c=0;c<r;c++){var h=t[f];h>l&&(l=h,a=c),f+=i}e[s++]=a}}function t(e){var t=e[0],n=0;for(var r=1;r<this._size;r++)e[r]>t&&(n=r,t=e[r]);return n}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),argmin:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o,l=t[f];for(var c=0;c<r;c++){var h=t[f];h<l&&(l=h,a=c),f+=i}e[s++]=a}}function t(e){var t=e[0],n=0;for(var r=1;r<this._size;r++)e[r]<t&&(n=r,t=e[r]);return n}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),sum:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o;for(var l=0;l<r;l++)a+=t[f],f+=i;e[s++]=a}}function t(e){var t=0;for(var n=0;n<this._size;n++)t+=e[n];return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),prod:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=1,f=u+o;for(var l=0;l<r;l++)a*=t[f],f+=i;e[s++]=a}}function t(e){var t=1;for(var n=0;n<this._size;n++)t*=e[n];return t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),mean:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o;for(var l=0;l<r;l++)a+=t[f],f+=i;var c=a/r;e[s++]=c}}function t(e){var t=0,n=e.length;for(var r=0;r<n;r++)t+=e[r];var i=t/n;return i}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),"var":t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o;for(var l=0;l<r;l++)a+=t[f],f+=i;var c=a/r,h=0;f=u+o;for(var l=0;l<r;l++){var p=t[f]-c;h+=p*p,f+=i}e[s++]=h/r}}function t(e){var t=0,n=e.length;for(var r=0;r<n;r++)t+=e[r];var i=t/n,s=0;for(var r=0;r<n;r++){var o=e[r]-i;s+=o*o}return s/n}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),std:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=0,f=u+o;for(var l=0;l<r;l++)a+=t[f],f+=i;var c=a/r,h=0;f=u+o;for(var l=0;l<r;l++){var p=t[f]-c;h+=p*p,f+=i}e[s++]=Math.sqrt(h/r)}}function t(e){var t=0,n=e.length;for(var r=0;r<n;r++)t+=e[r];var i=t/n,s=0;for(var r=0;r<n;r++){var o=e[r]-i;s+=o*o}return Math.sqrt(s/n)}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),ptp:t(function(){function e(e,t,n,r,i){var s=0;for(var o=0;o<this._size;o+=n)for(var u=0;u<i;u++){var a=o+u,f=t[a],l=t[a];for(var c=0;c<r;c++){var h=t[a];h<f&&(f=h),h>l&&(l=h),a+=i}e[s++]=l-f}}function t(e){var t=e[0],n=e[0];for(var r=1;r<this._size;r++)e[r]<t&&(t=e[r]),e[r]>n&&(n=e[r]);return n-t}return function(n,r){return this._withPreprocess1(n,r,e,t)}}()),sort:t(function(e,t){e<0&&(e=this._shape.length+e);var n;t==="ascending"?n=function(e,t){return e-t}:t==="descending"&&(n=function(e,t){return t-e});var r=this._array,i=w(this._shape,e),s=this._shape[e],o=i*s,u=new Array(s);for(var a=0;a<this._size;a+=o)for(var f=0;f<i;f++){var l=a+f;for(var c=0;c<s;c++)u[c]=r[l],l+=i;u.sort(n);var l=a+f;for(var c=0;c<s;c++)r[l]=u[c],l+=i}return this},{axis:-1,order:"ascending"}),argsort:t(function(e,t,n){e<0&&(e=this._shape.length+e);if(!this._size)return;if(n&&!S(this._shape,n._shape))throw new Error(x(this._shape,n._shape));n||(n=new v(this._dtype),n.initFromShape(this._shape));var r=n._array,i;t==="ascending"?i=function(e,t){return f[e]-f[t]}:t==="descending"&&(i=function(e,t){return f[t]-f[e]});var s=this._array,o=w(this._shape,e),u=this._shape[e],a=o*u,f=new Array(u),l=new Array(u);for(var c=0;c<this._size;c+=a)for(var h=0;h<o;h++){var p=c+h;for(var d=0;d<u;d++)f[d]=s[p],l[d]=d,p+=o;l.sort(i);var p=c+h;for(var d=0;d<u;d++)r[p]=l[d],p+=o}return n},{axis:-1,order:"ascending"}),cumsum:t(function(){function e(e,t,n,r,i){for(var s=0;s<this._size;s+=n)for(var o=0;o<i;o++){var u=s+o,a=u;e[u]=t[u];for(var f=1;f<r;f++)a=u,u+=i,e[u]=e[a]+t[u]}}function t(e,t){e[0]=t[0];for(var n=1;n<e.length;n++)e[n]=e[n-1]+t[n]}return function(n,r){return this._withPreprocess2(n,r,e,t)}}()),cumprod:t(function(){function e(e,t,n,r,i){for(var s=0;s<this._size;s+=n)for(var o=0;o<i;o++){var u=s+o,a=u;e[u]=t[u];for(var f=1;f<r;f++)a=u,u+=i,e[u]=e[a]*t[u]}}function t(e,t){e[0]=t[0];for(var n=1;n<e.length;n++)e[n]=e[n-1]*t[n]}return function(n,r){return this._withPreprocess2(n,r,e,t)}}()),dot:function(){console.warn("TODO")},map:function(e,t){var n=this._array,r=this._array,i=n[0],s=n[0],o=this._size;for(var u=1;u<o;u++){var a=n[u];a<i&&(i=a),a>s&&(s=a)}var f=s-i,l=t-e;for(var u=0;u<o;u++)if(f===0)r[u]=e;else{var a=n[u],c=(a-i)/f;r[u]=l*c+e}return this},add:function(e,t){return this.binaryOperation(this,e,s,t)},sub:function(e,t){return this.binaryOperation(this,e,o,t)},mul:function(e,t){return this.binaryOperation(this,e,u,t)},div:function(e,t){return this.binaryOperation(this,e,a,t)},mod:function(e,t){return this.binaryOperation(this,e,f,t)},and:function(e,t){return this.binaryOperation(this,e,l,t)},or:function(e,t){return this.binaryOperation(this,e,c,t)},xor:function(e,t){return this.binaryOperation(this,e,h,t)},equal:function(e){return this.binaryOperation(this,e,p,out)},binaryOperation:function(e,t,n,r){var i=[],d=typeof e=="number",m=typeof t=="number";if(d)i=t._shape.slice();else if(m)i=e._shape.slice();else{var g=e._shape.length-1,y=t._shape.length-1,b=e,E=t;while(g>=0&&y>=0){if(e._shape[g]==1)i.unshift(t._shape[y]),b=e.repeat(t._shape[y],g);else if(t._shape[y]==1)i.unshift(e._shape[g]),E=t.repeat(e._shape[g],y);else{if(t._shape[y]!=e._shape[g])throw new Error(x(e._shape,t._shape));i.unshift(e._shape[g])}g--,y--}for(var T=g;T>=0;T--)i.unshift(e._shape[T]);for(var T=y;T>=0;T--)i.unshift(t._shape[T]);e=b,t=E}if(!r)r=new v(this._dtype),r.initFromShape(i);else if(!S(i,r._shape))throw new Error(x(i,r._shape));var N=r._array,C,k,L,A;d?(C=t._shape.length-1,k=!1,L=e,A=t._array):m?(C=e._shape.length-1,k=!0,A=t,L=e._array):(C=Math.abs(e._shape.length-t._shape.length),k=e._shape.length>=t._shape.length,L=e._array,A=t._array);var O=w(i,C),M=i[C],_=O*M,D=r._size/_,P,H,B,j=0;if(k)if(m)for(var F=0;F<D;F++)for(var T=0;T<_;T++){P=L[j],H=A;switch(n){case s:B=P+H;break;case o:B=P-H;break;case u:B=P*H;break;case a:B=P/H;break;case f:B=P%H;break;case l:B=P&H;break;case c:B=P|H;break;case h:B=P^H;break;case p:B=P==H;break;default:throw new Error("Unkown operation "+n)}N[j]=B,j++}else for(var F=0;F<D;F++)for(var T=0;T<_;T++){P=L[j],H=A[T];switch(n){case s:B=P+H;break;case o:B=P-H;break;case u:B=P*H;break;case a:B=P/H;break;case f:B=P%H;break;case l:B=P&H;break;case c:B=P|H;break;case h:B=P^H;break;case p:B=P==H;break;default:throw new Error("Unkown operation "+n)}N[j]=B,j++}else if(d)for(var F=0;F<D;F++)for(var T=0;T<_;T++){P=L,H=A[j];switch(n){case s:B=P+H;break;case o:B=P-H;break;case u:B=P*H;break;case a:B=P/H;break;case f:B=P%H;break;case l:B=P&H;break;case c:B=P|H;break;case h:B=P^H;break;case p:B=P==H;break;default:throw new Error("Unkown operation "+n)}N[j]=B,j++}else for(var F=0;F<D;F++)for(var T=0;T<_;T++){P=L[j],H=A[T];switch(n){case s:B=P+H;break;case o:B=P-H;break;case u:B=P*H;break;case a:B=P/H;break;case f:B=P%H;break;case l:B=P&H;break;case c:B=P|H;break;case h:B=P^H;break;case p:B=P==H;break;default:throw new Error("Unkown operation "+n)}N[j]=B,j++}return r},neg:function(){var e=this._array;for(var t=0;t<this._size;t++)e[t]=-e[t];return this},sin:function(){return this._mathAdapter(Math.sin)},cos:function(){return this._mathAdapter(Math.cos)},tan:function(){return this._mathAdapter(Math.tan)},abs:function(){return this._mathAdapter(Math.abs)},log:function(){return this._mathAdapter(Math.log)},sqrt:function(){return this._mathAdapter(Math.sqrt)},ceil:function(){return this._mathAdapter(Math.ceil)},floor:function(){return this._mathAdapter(Math.floor)},pow:function(e){var t=this._array;for(var n=0;n<this._size;n++)t[n]=Math.pow(t[n],e);return this},_mathAdapter:function(e){var t=this._array;for(var n=0;n<this._size;n++)t[n]=e(t[n]);return this},round:function(e){e=Math.floor(e||0);var t=Math.pow(10,e),n=this._array;if(e===0)for(var r=0;r<this._size;r++)n[r]=Math.round(n[r]);else for(var r=0;r<this._size;r++)n[r]=Math.round(n[r]*t)/t;return this},clip:function(e,t){var n=this._array;for(var r=0;r<this._size;r++)n[r]=Math.max(Math.min(n[r],t),e);return this},get:function(e,t){function l(e,t){var r=i[e],s=n[e];if(e<o-1)if(r[2]>0)for(var c=r[0];c<r[1];c+=r[2])l(e+1,t+s*c);else for(var c=r[0];c>r[1];c+=r[2])l(e+1,t+s*c);else if(r[2]>0)for(var c=r[0];c<r[1];c+=r[2])for(var h=0;h<s;h++)u[f++]=a[c*s+h+t];else for(var c=r[0];c>r[1];c+=r[2])for(var h=0;h<s;h++)u[f++]=a[c*s+h+t]}typeof e=="number"&&(e=e.toString());var n=E(this._shape),r=this._parseRanges(e),i=r[0],s=r[1];if(i.length>this._shape.length)throw new Error("Too many indices");var o=i.length,u;s.length?(t=new v(this._dtype),t.initFromShape(s),u=t._array):u=[];var a=this._array,f=0;return l(0,0),s.length?t:u[0]},set:function(e,t){typeof e=="number"&&(e=e.toString());var n=E(this._shape),r=this._parseRanges(e),i=r[0],s=r[1];if(i.length>this._shape.length)throw new Error("Too many indices");var o=typeof t=="number",u=i.length,a=this._array;if(o)var f=t;else{if(!S(s,t.shape()))throw new Error(x(s,t.shape()));var f=t._array}var l=0,c=function(e,t){var r=i[e],s=n[e];if(e<u-1)if(r[2]>0)for(var h=r[0];h<r[1];h+=r[2])c(e+1,t+s*h);else for(var h=r[0];h>r[1];h+=r[2])c(e+1,t+s*h);else if(r[2]>0)for(var h=r[0];h<r[1];h+=r[2])for(var p=0;p<s;p++)o?a[h*s+p+t]=f:a[h*s+p+t]=f[l++];else for(var h=r[0];h>r[1];h+=r[2])for(var p=0;p<s;p++)o?a[h*s+p+t]=f:a[h*s+p+t]=f[l++]};return c(0,0),this},insert:t(function(e,t,n){var i=this._array,s=!1;typeof e=="number"&&(e=[e],s=!0),typeof t=="number"?t=new v([t]):t instanceof Array&&(t=new v(t)),typeof n=="undefined"&&(this._shape=[this._size],n=0);var o=e[0],u=this._shape[n];for(var a=0;a<e.length;a++){e[a]<0&&(e[a]=u+e[a]);if(e[a]>u)throw new Error(N(e[a]));if(e[a]<o)throw new Error("Index must be in ascending order");o=e[a]}var f=this._shape.slice();s?f.splice(n,1):f[n]=e.length;var l=t._shape,c=l.length-1,h=f.length-1,p=t;while(c>=0&&h>=0){if(l[c]===1)p=t.repeat(f[h],c);else if(l[c]!==f[h])throw new Error(x(l,f));c--,h--}t=p;var d=w(this._shape,n),u=this._shape[n],m=u*d,y=this._size/m,b=e.length,E=new Uint32Array(y*b),S=0;for(var T=0;T<this._size;T+=m)for(var a=0;a<b;a++){var C=e[a];E[S++]=T+C*d}var k=this._shape.slice();k[n]+=e.length;var L=g(k);if(this._array.length<L)var i=new r[this._dtype](L);else var i=this._array;var A=this._array,O=t._array,M=E.length-1,_=this._size,D=E[M],P=L-1,H=t._size-1;while(M>=0){for(var a=_-1;a>=D;a--)i[P--]=A[a];_=D,D=E[--M];for(var a=0;a<d;a++)H<0&&(H=t._size-1),i[P--]=O[H--]}for(var a=_-1;a>=0;a--)i[P--]=A[a];return this._array=i,this._shape=k,this._size=L,this}),append:function(){console.warn("TODO")},"delete":t(function(e,t){var n=this._array;typeof e=="number"&&(e=[e]);var r=this._size;typeof t=="undefined"&&(this._shape=[r],t=0);var i=w(this._shape,t),s=this._shape[t],o=i*s,u=0;for(var a=0;a<r;a+=o){var f=0,l=e[0],c=0;while(c<e.length){l<0&&(l+=s);if(l>s)throw new Error(N(l));if(l<f)throw new Error("Index must be in ascending order");for(var h=f;h<l;h++)for(var p=0;p<i;p++)n[u++]=n[h*i+p+a];f=l+1,l=e[++c]}for(var h=f;h<s;h++)for(var p=0;p<i;p++)n[u++]=n[h*i+p+a]}return this._shape[t]-=e.length,this._size=g(this._shape),this}),_parseRanges:function(e){var t=e.split(/\s*,\s*/),n=[],r=[],i=0;for(var s=0;s<t.length;s++)if(t[s]==="..."){var o=this._shape.length-(t.length-s);while(i<=o)n.push([0,this._shape[i],1]),r.push(this._shape[i]),i++}else{var u=m(t[s],this._shape[i]);n.push(u);if(t[s].indexOf(":")>=0){var a=Math.floor((u[1]-u[0])/u[2]);a=a<0?0:a,r.push(a)}i++}for(;i<this._shape.length;i++)r.push(this._shape[i]);return[n,r]},toArray:function(){function i(s,o){var u=n[s];for(var a=0;a<u;a++)s<r-1?i(s+1,o[a]=[]):o[a]=e[t++]}var e=this._array,t=0,n=this._shape,r=n.length,s=[];return i(0,s),s},copy:function(){var e=new v;return e._array=n.call(this._array),e._shape=this._shape.slice(),e._dtype=this._dtype,e._size=this._size,e},constructor:v},v.range=t(function(e,t,i,s){var o=n.call(arguments),u=o[o.length-1];if(typeof u=="string"){var s=u;o.pop()}o.length===1?(t=o[0],i=1,e=0):o.length==2&&(i=1),s=s||"number";var a=new r[s](Math.ceil((t-e)/i)),f=0;for(var l=e;l<t;l+=i)a[f++]=l;var c=new v;return c._array=a,c._shape=[a.length],c._dtype=s,c._size=a.length,c}),v.zeros=t(function(e,t){var n=new v(t);return n.initFromShape(e),n}),v}),r("echarts/chart/chord",["require","../util/shape/chord","../component/base","./calculableBase","../config","../util/ecData","zrender/tool/util","zrender/tool/vector","../util/ndarray","../chart"],function(e){function n(n,r,i,s){function F(){o.selectedMap={},w=[],b=null;var e=[],n=0;for(var i=0,u=g.length;i<u;i++)if(g[i].type===o.type){b||(b=g[i],o.reformOption(b));var a=m(g[i].name);o.selectedMap[g[i].name]=a;if(!a)continue;w.push(g[i]),o.buildMark(g[i],i,s),e.push(g[i].matrix),n++}if(!b)return;if(!w.length)return;var f=r.getWidth(),l=r.getHeight(),c=Math.min(f,l);E=b.data,S=b.startAngle,S%=360,S<0&&(S+=360),x=b.clockWise,T=o.parsePercent(b.radius[0],c/2),N=o.parsePercent(b.radius[1],c/2),C=b.padding,k=b.sort,L=b.sortSub,O=b.showScale,M=b.showScaleText,A=[o.parsePercent(b.center[0],f),o.parsePercent(b.center[1],l)];var h=b.itemStyle.normal.chordStyle.lineStyle.width-b.itemStyle.normal.lineStyle.width;_=h/t/T/Math.PI*180,D=new p(e),D=D._transposelike([1,2,0]);var d=I(D,E);D=d[0],E=d[1];var v=D.shape();if(v[0]!==v[1]||v[0]!==E.length)throw new Error("Data not valid");if(v[0]===0||v[2]===0)return;D.reshape(v[0],v[1]*v[2]);var y=D.sum(1),B=y.mul(1/y.sum()),j=v[0],F=v[1]*v[2],W=B.mul(360-C*j),X=D.div(D.sum(1).reshape(j,1));X=X.mul(W.sub(_*2).reshape(j,1));switch(k){case"ascending":case"descending":var V=W.argsort(0,k);W.sort(0,k),y.sort(0,k);break;default:var V=p.range(v[0])}switch(L){case"ascending":case"descending":var $=X.argsort(1,L);X.sort(1,L);break;default:var $=p.range(F).reshape(1,F).repeat(j,0)}var J=V.toArray(),K=W.toArray(),Q=$.toArray(),G=X.toArray(),Y=y.toArray(),Z=[],et=(new p(j,F)).toArray(),tt=[],nt=0,rt=0;for(var i=0;i<j;i++){var it=J[i];tt[it]=Y[i],rt=nt+K[i],Z[it]=[nt,rt];var st=nt+_,ot=st;for(var ut=0;ut<F;ut++){ot=st+G[it][ut];var at=Q[it][ut];et[it][at]=[st,ot],st=ot}nt=rt+C}H=(new p(j,j,n)).toArray(),P=[],q(Z,tt),et=(new p(et)).reshape(j,j,n,2).toArray(),R(et,D.reshape(v).toArray());var d=z(tt);O&&U(d[0],d[1],Z,(new p(d[0])).sum()/(360-C*j))}function I(e,t){var n=[],r=[];for(var i=0;i<t.length;i++){var s=t[i].name;o.selectedMap[s]=m(s),o.selectedMap[s]?r.push(t[i]):n.push(i)}n.length&&(e=e["delete"](n,0),e=e["delete"](n,1));if(!e.size())return[e,r];n=[];var u=[],a=e.shape();e.reshape(a[0],a[1]*a[2]);var f=e.sum(1).toArray();e.reshape(a);for(var i=0;i<r.length;i++)f[i]===0?n.push(i):u.push(r[i]);return n.length&&(e=e["delete"](n,0),e=e["delete"](n,1)),[e,u]}function q(e,t){function f(e){return function(){s&&clearTimeout(s),s=setTimeout(function(){for(var t=0;t<n;t++){P[t].style.opacity=t===e?1:.1,r.modShape(P[t].id,P[t]);for(var s=0;s<n;s++)for(var o=0;o<i;o++){var u=H[t][s][o];u&&(u.style.opacity=t===e||s===e?.5:.03,r.modShape(u.id,u))}}r.refresh()},50)}}function c(){return function(){s&&clearTimeout(s),s=setTimeout(function(){for(var e=0;e<n;e++){P[e].style.opacity=1,r.modShape(P[e].id,P[e]);for(var t=0;t<n;t++)for(var s=0;s<i;s++){var o=H[e][t][s];o&&(o.style.opacity=.5,r.modShape(o.id,o))}}r.refresh()},50)}}var n=E.length,i=w.length,s,u=o.query(b,"itemStyle.normal.label.show"),a=o.query(b,"itemStyle.normal.label.color");for(var p=0;p<n;p++){var d=E[p],m=e[p],g=(x?360-m[1]:m[0])+S,C=(x?360-m[0]:m[1])+S,k={id:r.newShapeId(o.type),shape:"sector",zlevel:y,style:{x:A[0],y:A[1],r0:T,r:N,startAngle:g,endAngle:C,brushType:"fill",opacity:1,color:v(d.name)},highlightStyle:{brushType:"fill"}};k.style.lineWidth=o.deepQuery([d,b],"itemStyle.normal.lineStyle.width"),k.highlightStyle.lineWidth=o.deepQuery([d,b],"itemStyle.emphasis.lineStyle.width"),k.style.strokeColor=o.deepQuery([d,b],"itemStyle.normal.lineStyle.color"),k.highlightStyle.strokeColor=o.deepQuery([d,b],"itemStyle.emphasis.lineStyle.color"),k.style.lineWidth>0&&(k.style.brushType="both"),k.highlightStyle.lineWidth>0&&(k.highlightStyle.brushType="both"),l.pack(k,w[0],0,t[p],0,d.name);if(u){var L=[g+C]/2;L%=360;var O=L<=90||L>=270;L=L*Math.PI/180;var _=[Math.cos(L),-Math.sin(L)],D=M?45:20,B=h.scale([],_,N+D);h.add(B,B,A);var j={shape:"text",id:r.newShapeId(o.type),zlevel:y-1,hoverable:!1,style:{x:B[0],y:B[1],text:d.name,textAlign:O?"left":"right",color:a}};j.style.textColor=o.deepQuery([d,b],"itemStyle.normal.label.textStyle.color")||"#fff",j.style.textFont=o.getFont(o.deepQuery([d,b],"itemStyle.normal.label.textStyle")),r.addShape(j),o.shapeList.push(j)}k.onmouseover=f(p),k.onmouseout=c(),o.shapeList.push(k),P.push(k),r.addShape(k)}}function R(e,t){var n=e.length;if(!n)return;var i=e[0][0].length,s=b.itemStyle.normal.chordStyle.lineStyle,u=b.itemStyle.emphasis.chordStyle.lineStyle;for(var a=0;a<n;a++)for(var f=0;f<n;f++)for(var c=0;c<i;c++){if(H[f][a][c])continue;var h=e[a][f][c][0],p=e[f][a][c][0],d=e[a][f][c][1],m=e[f][a][c][1];if(h-m===0||p-m===0){H[a][f][c]=null;continue}var g;i===1?d-h<=m-p?g=v(E[a].name):g=v(E[f].name):g=v(w[c].name);var N=x?h:360-d,C=x?d:360-h,k=x?p:360-m,L=x?m:360-p,O={id:r.newShapeId(o.type),shape:"chord",zlevel:y,style:{center:A,r:T,source0:N-S,source1:C-S,target0:k-S,target1:L-S,brushType:"both",opacity:.5,color:g,lineWidth:s.width,strokeColor:s.color},highlightStyle:{brushType:"both",lineWidth:u.width,strokeColor:u.color}};l.pack(O,w[c],c,t[a][f][c],0,E[a].name,E[f].name,t[f][a][c]),H[a][f][c]=O,o.shapeList.push(O),r.addShape(O)}}function U(e,t,n,i){for(var s=0;s<n.length;s++){var u=n[s][0],a=n[s][1],f=u;while(f<a){var l=((x?360-f:f)+S)/180*Math.PI,c=[Math.cos(l),-Math.sin(l)],d=h.scale([],c,N+1);h.add(d,d,A);var v=h.scale([],c,N+B);h.add(v,v,A);var m={shape:"line",id:r.newShapeId(o.type),zlevel:y-1,hoverable:!1,style:{xStart:d[0],yStart:d[1],xEnd:v[0],yEnd:v[1],lineCap:"round",brushType:"stroke",strokeColor:"#666"}};o.shapeList.push(m),r.addShape(m),f+=j}if(!M)continue;var g=u,b=i*5*j,w=p.range(0,e[s],b).toArray();while(g<a){var l=x?360-g:g;l=(l+S)%360;var E=l<=90||l>=270,T={shape:"text",id:r.newShapeId(o.type),zlevel:y-1,hoverable:!1,style:{x:E?N+B+4:-N-B-4,y:0,text:Math.round(w.shift()*10)/10+t,textAlign:E?"left":"right"},position:A.slice(),rotation:E?[l/180*Math.PI,0,0]:[(l+180)/180*Math.PI,0,0]};o.shapeList.push(T),r.addShape(T),g+=j*5}}}function z(e){var t=[],n=(new p(e)).max(),r,i;n>1e4?(r="k",i=.001):n>1e7?(r="m",i=1e-6):n>1e10?(r="b",i=1e-9):(r="",i=1);for(var s=0;s<e.length;s++)t[s]=e[s]*i;return[t,r]}function W(e,t){s=t,X(e)}function X(e){e&&(i=e,g=i.series),o.clear(),d=s.legend;if(d)v=d.getColor,m=d.isSelected;else{var t={},n={},u=0;v=function(e){if(n[e])return n[e];t[e]===undefined&&(t[e]=u++);for(var i=0;i<w.length;i++)if(w[i].name===e){n[e]=o.query(w[i],"itemStyle.normal.color");break}if(!n[e]){var s=E.length;for(var i=0;i<s;i++)if(E[i].name===e){n[e]=o.query(E[i],"itemStyle.normal.color");break}}return n[e]||(n[e]=r.getColor(t[e])),n[e]},m=function(){return!0}}F()}function V(e){var t=c.merge;e=t(e||{},f.chord,{overwrite:!1,recursive:!0}),e.itemStyle.normal.label.textStyle=t(e.itemStyle.normal.label.textStyle||{},f.textStyle,{overwrite:!1,recursive:!0})}var o=this,u=e("../component/base");u.call(this,r);var a=e("./calculableBase");a.call(this,r,i);var f=e("../config"),l=e("../util/ecData"),c=e("zrender/tool/util"),h=e("zrender/tool/vector"),p=e("../util/ndarray"),d,v,m,g;this.type=f.CHART_TYPE_CHORD;var y=o.getZlevelBase(),b,w=[],E,S,x,T,N,C,k,L,A,O,M,_=0,D,P=[],H=[],B=4,j=4;o.init=W,o.refresh=X,o.reformOption=V,W(i,s)}e("../util/shape/chord");var t=window.devicePixelRatio||1;return e("../chart").define("chord",n),n}),r("echarts/chart/force",["require","../component/base","./calculableBase","../config","../util/ecData","zrender/config","zrender/tool/event","zrender/tool/util","zrender/tool/vector","../util/ndarray","../chart"],function(e){function r(r,o,u,a){function Y(){y=a.legend,I=1,$=o.getWidth(),J=o.getHeight(),K=[$/2,J/2];var e;for(var t=0,n=w.length;t<n;t++){var r=w[t];if(r.type===c.CHART_TYPE_FORCE){w[t]=b.reformOption(w[t]),e=w[t].name||"",b.selectedMap[e]=y?y.isSelected(e):!0;if(!b.selectedMap[e])continue;b.buildMark(w[t],t,a),E=r;var i=b.query(r,"minRadius"),s=b.query(r,"maxRadius");X=b.query(r,"attractiveness"),R=b.query(r,"density"),U=b.query(r,"initSize"),W=b.query(r,"centripetal"),z=b.query(r,"coolDown"),T=b.query(r,"categories");for(var u=0,f=T.length;u<f;u++)T[u].name&&(y?b.selectedMap[u]=y.isSelected(T[u].name):b.selectedMap[u]=!0);k=b.query(r,"itemStyle.normal.linkStyle"),L=b.query(r,"itemStyle.emphasis.linkStyle"),N=b.query(r,"itemStyle.normal.nodeStyle"),C=b.query(r,"itemStyle.emphasis.nodeStyle"),A=b.query(r,"nodes"),O=v.clone(b.query(r,"links")),Z(A,O),B=[],j=[],F=[],D=[],P=[],F=[],S=[],x=[];var l=$*J;q=.5/X*Math.sqrt(l/M.length),tt(M,_),et(M,i,s)}}}function Z(e,t){var n=[],r=0;M=s(e,function(e,t){if(!e)return;if(e.ignore)return;if(b.selectedMap[e.category])return n[t]=r++,!0;n[t]=-1});var i,o,u;_=s(t,function(e,t){return i=e.source,o=e.target,u=!0,n[i]>=0?e.source=n[i]:u=!1,n[o]>=0?e.target=n[o]:u=!1,e.rawIndex=t,u})}function et(e,t,r){var s=[],u=e.length;for(var a=0;a<u;a++){var f=e[a];f.value!==undefined?s.push(f.value):s.push(1)}var l=new g(s);s=l.map(t,r).toArray();var c=l.max();c!==0&&(D=l.mul(1/c,l).toArray());for(var a=0;a<u;a++){var f=e[a],p,d,w=s[a],x;f.initial!==undefined?x=f.initial:n[f.name]!==undefined?x=n[f.name]:x=i($/2,J/2,U);var p=x[0],d=x[1];B[a]=m.create(p,d),j[a]=m.create(p,d),H[a]=m.create(0,0),F[a]=w*w*R*.035;var k={id:o.newShapeId(b.type),shape:"circle",style:{r:w,x:0,y:0},clickable:!0,highlightStyle:{},position:[p,d],__forceIndex:a},L;b.query(E,"itemStyle.normal.label.show")&&(k.style.text=f.name,k.style.textPosition="inside",L=b.query(E,"itemStyle.normal.label.textStyle")||{},k.style.textColor=L.color||"#fff",k.style.textAlign=L.align||"center",k.style.textBaseline=L.baseline||"middle",k.style.textFont=b.getFont(L)),b.query(E,"itemStyle.emphasis.label.show")&&(k.highlightStyle.text=f.name,k.highlightStyle.textPosition="inside",L=b.query(E,"itemStyle.emphasis.label.textStyle")||{},k.highlightStyle.textColor=L.color||"#fff",k.highlightStyle.textAlign=L.align||"center",k.highlightStyle.textBaseline=L.baseline||"middle",k.highlightStyle.textFont=b.getFont(L)),v.merge(k.style,N),v.merge(k.highlightStyle,C);if(typeof f.category!="undefined"){var O=T[f.category];if(O){y&&(k.style.color=y.getColor(O.name));var M=O.itemStyle;M&&(M.normal&&v.merge(k.style,M.normal,{overwrite:!0}),M.emphasis&&v.merge(k.highlightStyle,M.emphasis,{overwrite:!0}))}}if(typeof f.itemStyle!="undefined"){var M=f.itemStyle;M.normal&&v.merge(k.style,M.normal,{overwrite:!0}),M.normal&&v.merge(k.highlightStyle,M.emphasis,{overwrite:!0})}b.setCalculable(k),k.ondragstart=b.shapeHandler.ondragstart,k.draggable=!0,S.push(k),b.shapeList.push(k);var _="";if(typeof f.category!="undefined"){var O=T[f.category];_=O&&O.name||""}h.pack(k,{name:_},0,f,v.indexOf(A,f),f.name||"",f.value),o.addShape(k)}}function tt(e,t){var n=t.length;for(var r=0;r<n;r++){var i=t[r];i.weight!==undefined?P.push(i.weight):P.push(1);var s={id:o.newShapeId(b.type),shape:"line",style:{xStart:0,yStart:0,xEnd:0,yEnd:0,lineWidth:1},clickable:!0,highlightStyle:{}};v.merge(s.style,k),v.merge(s.highlightStyle,L),typeof i.itemStyle!="undefined"&&(i.itemStyle.normal&&v.merge(s.style,i.itemStyle.normal,{overwrite:!0}),i.itemStyle.emphasis&&v.merge(s.highlightStyle,i.itemStyle.emphasis,{overwrite:!0})),x.push(s),b.shapeList.push(s);var u=M[i.source],a=M[i.target],i=O[i.rawIndex];h.pack(s,E,0,{source:i.source,target:i.target,weight:i.weight||0},i.rawIndex,u.name+" - "+a.name,i.weight||0,!0),o.addShape(s)}var f=new g(P),l=f.max();l!==0&&(P=f.mul(1/l,f).toArray())}function nt(){for(var e=0,t=_.length;e<t;e++){var n=_[e],r=x[e],i=S[n.source],s=S[n.target];r.style.xStart=i.position[0],r.style.yStart=i.position[1],r.style.xEnd=s.position[0],r.style.yEnd=s.position[1]}}function rt(e){var t=B.length,r=[],i=q*q;for(var s=0;s<t;s++)H[s][0]=0,H[s][1]=0;for(var s=0;s<t;s++)for(var o=s+1;o<t;o++){var u=D[s],a=D[o],f=B[s],l=B[o];m.sub(r,l,f);var c=m.length(r);if(c>500)continue;c<5&&(c=5),m.scale(r,r,1/c);var h=1*(u+a)*i/c;m.scaleAndAdd(H[s],H[s],r,-h),m.scaleAndAdd(H[o],H[o],r,h)}for(var s=0,p=_.length;s<p;s++){var d=_[s],v=P[s],g=d.source,y=d.target,f=B[g],l=B[y];m.sub(r,l,f);var b=m.lengthSquare(r);if(b===0)continue;var h=v*b/q/Math.sqrt(b);m.scaleAndAdd(H[g],H[g],r,h),m.scaleAndAdd(H[y],H[y],r,-h)}for(var s=0,p=M.length;s<p;s++){var w=B[s];m.sub(r,K,w);var b=m.lengthSquare(r),h=b*W/(100*Math.sqrt(b));m.scaleAndAdd(H[s],H[s],r,h)}var E=[];for(var s=0,p=B.length;s<p;s++){var x=M[s].name;if(M[s].fixed){m.set(B[s],Q,G),m.set(j[s],Q,G),m.set(S[s].position,Q,G),M[s].initial!==undefined&&m.set(M[s].initial,Q,G),n[x]!==undefined&&m.set(n[x],Q,G);continue}var w=B[s],T=j[s];m.sub(E,w,T),T[0]=w[0],T[1]=w[1],m.scaleAndAdd(E,E,H[s],e/F[s]),m.scale(E,E,I),E[0]=Math.max(Math.min(E[0],100),-100),E[1]=Math.max(Math.min(E[1],100),-100),m.add(w,w,E),m.copy(S[s].position,w),x?(n[x]===undefined&&(n[x]=m.create()),m.copy(n[x],w)):(M[s].initial===undefined&&(M[s].initial=m.create()),m.copy(M[s].initial,w))}}function it(){if(I<.01)return;rt(V),nt();var e={};for(var t=0;t<S.length;t++){var n=S[t];e.position=n.position,o.modShape(n.id,e,!0)}e={};for(var t=0;t<x.length;t++){var n=x[t];e.style=n.style,o.modShape(n.id,e,!0)}o.refresh(),I*=z}function ot(e,n){function r(){st&&(it(),t(r))}u=e,a=n,w=u.series,b.clear(),Y(),st=!0,t(r)}function ut(e){e&&(u=e,w=u.series),b.clear(),Y(),I=1}function at(){st=!1}function ft(){}function lt(e){if(!b.isDragstart||!e.target)return;var t=e.target,n=t.__forceIndex,r=M[n];r.fixed=!0,b.isDragstart=!1,o.on(p.EVENT.MOUSEMOVE,ht)}function ct(e,t){if(!b.isDragend||!e.target)return;var n=e.target,r=n.__forceIndex,i=M[r];i.fixed=!1,t.dragIn=!0,t.needRefresh=!1,b.isDragend=!1,o.un(p.EVENT.MOUSEMOVE,ht)}function ht(e){I=.8,Q=d.getX(e.event),G=d.getY(e.event)}var f=e("../component/base");f.call(this,o);var l=e("./calculableBase");l.call(this,o,u);var c=e("../config"),h=e("../util/ecData"),p=e("zrender/config"),d=e("zrender/tool/event"),v=e("zrender/tool/util"),m=e("zrender/tool/vector"),g=e("../util/ndarray"),y,b=this;b.type=c.CHART_TYPE_FORCE;var w,E,S=[],x=[],T=[],N,C,k,L,A,O,M=[],_=[],D=[],P=[],H=[],B=[],j=[],F=[],I,q,R,U,z,W,X,V=1/60,$,J,K=[],Q,G,st;b.shapeHandler.ondragstart=function(){b.isDragstart=!0},b.init=ot,b.refresh=ut,b.ondragstart=lt,b.ondragend=ct,b.dispose=at,b.onclick=ft,ot(u,a)}function i(e,t,n){return[(Math.random()-.5)*n+e,(Math.random()-.5)*n+t]}function s(e,t){var n=e.length,r=[];for(var i=0;i<n;i++)t(e[i],i)&&r.push(e[i]);return r}var t=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){setTimeout(e,16)},n={};return e("../chart").define("force",r),r}),r("echarts/util/shape/halfSmoothPolygon",["require","zrender/shape","zrender/shape/base","zrender/shape"],function(e){function t(){this.type="halfSmoothPolygon"}return t.prototype={buildPath:function(t,n){var r=n.pointList;if(r.length<2)return;if(n.smooth){var i=this.smoothBezier(r.slice(0,-2),n.smooth);t.moveTo(r[0][0],r[0][1]);var s,o,u,a=r.length;for(var f=0;f<a-3;f++)s=i[f*2],o=i[f*2+1],u=r[f+1],t.bezierCurveTo(s[0],s[1],o[0],o[1],u[0],u[1]);t.lineTo(r[a-2][0],r[a-2][1]),t.lineTo(r[a-1][0],r[a-1][1]),t.lineTo(r[0][0],r[0][1])}else e("zrender/shape").get("polygon").buildPath(t,n);return}},e("zrender/shape/base").derive(t),e("zrender/shape").define("halfSmoothPolygon",new t),t}),r("echarts/chart/line",["require","../component/base","./calculableBase","../config","zrender/tool/color","zrender/shape","zrender/shape","../util/shape/halfSmoothPolygon","../chart"],function(e){function t(t,r,i,s){function g(){p={},l.selectedMap={};var e={top:[],bottom:[],left:[],right:[]},t,n,i,o;for(var u=0,f=c.length;u<f;u++)c[u].type==l.type&&(c[u]=l.reformOption(c[u]),t=c[u].xAxisIndex,n=c[u].yAxisIndex,i=s.xAxis.getAxis(t),o=s.yAxis.getAxis(n),i.type==a.COMPONENT_TYPE_AXIS_CATEGORY?e[i.getPosition()].push(u):o.type==a.COMPONENT_TYPE_AXIS_CATEGORY&&e[o.getPosition()].push(u));for(var h in e)e[h].length>0&&y(h,e[h]);for(var u=0,f=l.shapeList.length;u<f;u++)l.shapeList[u].id=r.newShapeId(l.type),r.addShape(l.shapeList[u])}function y(e,t){var n=b(t),r=n.locationMap,i=n.maxDataLength;if(i===0||r.length===0)return;switch(e){case"bottom":case"top":w(i,r);break;case"left":case"right":E(i,r)}for(var o=0,u=t.length;o<u;o++)l.buildMark(c[t[o]],t[o],s)}function b(e){var t,n=0,i={},o="__kener__stack__",u,a,f=s.legend,h=[],p=0,g;for(var y=0,b=e.length;y<b;y++)t=c[e[y]],a=t.name,m[e[y]]=m[e[y]]||l.query(t,"symbol")||v[y%v.length],f?(l.selectedMap[a]=f.isSelected(a),d[e[y]]=f.getColor(a),g=f.getItemShape(a),g&&(g.shape="icon",g.style.iconType="legendLineIcon",g.style.symbol=m[e[y]],f.setItemShape(a,g))):(l.selectedMap[a]=!0,d[e[y]]=r.getColor(e[y])),l.selectedMap[a]&&(u=t.stack||o+e[y],typeof i[u]=="undefined"?(i[u]=n,h[n]=[e[y]],n++):h[i[u]].push(e[y])),p=Math.max(p,t.data.length);return{locationMap:h,maxDataLength:p}}function w(e,t){var n=t[0][0],r=c[n],o=r.xAxisIndex,u=s.xAxis.getAxis(o),a,f,h,d,v,m,g,y,b={},w,E;for(var x=0,N=e;x<N;x++){if(typeof u.getNameByIndex(x)=="undefined")break;h=u.getCoordByIndex(x);for(var C=0,k=t.length;C<k;C++){a=c[t[C][0]].yAxisIndex||0,f=s.yAxis.getAxis(a),m=v=y=g=f.getCoord(0);for(var L=0,A=t[C].length;L<A;L++){n=t[C][L],r=c[n],w=r.data[x],E=typeof w!="undefined"?typeof w.value!="undefined"?w.value:w:"-",b[n]=b[n]||[];if(E=="-"){b[n].length>0&&(p[n]=p[n]||[],p[n].push(b[n]),b[n]=[]);continue}d=f.getCoord(E),E>=0?(v-=m-d,d=v):E<0&&(g+=d-y,d=g),b[n].push([h,d,x,u.getNameByIndex(x),h,m])}}v=s.grid.getY();var O;for(var C=0,k=t.length;C<k;C++)for(var L=0,A=t[C].length;L<A;L++){n=t[C][L],r=c[n],w=r.data[x],E=typeof w!="undefined"?typeof w.value!="undefined"?w.value:w:"-";if(E!="-")continue;l.deepQuery([w,r,i],"calculable")&&(O=l.deepQuery([w,r],"symbolSize"),v+=O*2+5,d=v,l.shapeList.push(T(n,x,u.getNameByIndex(x),h,d,"horizontal")))}}for(var M in b)b[M].length>0&&(p[M]=p[M]||[],p[M].push(b[M]),b[M]=[]);S(p,u,"horizontal")}function E(e,t){var n=t[0][0],r=c[n],o=r.yAxisIndex,u=s.yAxis.getAxis(o),a,f,h,d,v,m,g,y,b={},w,E;for(var x=0,N=e;x<N;x++){if(typeof u.getNameByIndex(x)=="undefined")break;d=u.getCoordByIndex(x);for(var C=0,k=t.length;C<k;C++){a=c[t[C][0]].xAxisIndex||0,f=s.xAxis.getAxis(a),m=v=y=g=f.getCoord(0);for(var L=0,A=t[C].length;L<A;L++){n=t[C][L],r=c[n],w=r.data[x],E=typeof w!="undefined"?typeof w.value!="undefined"?w.value:w:"-",b[n]=b[n]||[];if(E=="-"){b[n].length>0&&(p[n]=p[n]||[],p[n].push(b[n]),b[n]=[]);continue}h=f.getCoord(E),E>=0?(v+=h-m,h=v):E<0&&(g-=y-h,h=g),b[n].push([h,d,x,u.getNameByIndex(x),m,d])}}v=s.grid.getXend();var O;for(var C=0,k=t.length;C<k;C++)for(var L=0,A=t[C].length;L<A;L++){n=t[C][L],r=c[n],w=r.data[x],E=typeof w!="undefined"?typeof w.value!="undefined"?w.value:w:"-";if(E!="-")continue;l.deepQuery([w,r,i],"calculable")&&(O=l.deepQuery([w,r],"symbolSize"),v-=O*2+5,h=v,l.shapeList.push(T(n,x,u.getNameByIndex(x),h,d,"vertical")))}}for(var M in b)b[M].length>0&&(p[M]=p[M]||[],p[M].push(b[M]),b[M]=[]);S(p,u,"vertical")}function S(e,t,n){var r,s,o,u,a,p,v,m,g,y,b;for(var w=c.length-1;w>=0;w--){m=c[w],y=e[w];if(m.type==l.type&&typeof y!="undefined"){r=d[w],s=l.query(m,"itemStyle.normal.lineStyle.width"),o=l.query(m,"itemStyle.normal.lineStyle.type"),u=l.query(m,"itemStyle.normal.lineStyle.color"),a=l.query(m,"itemStyle.normal.color"),p=typeof l.query(m,"itemStyle.normal.areaStyle")!="undefined",v=l.query(m,"itemStyle.normal.areaStyle.color");for(var E=0,S=y.length;E<S;E++){b=y[E];for(var T=0,C=b.length;T<C;T++)g=m.data[b[T][2]],(l.deepQuery([g,m],"showAllSymbol")||t.isMainAxis(b[T][2])&&l.deepQuery([g,m],"symbol")!="none"||l.deepQuery([g,m,i],"calculable"))&&l.shapeList.push(N(w,b[T][2],b[T][3],b[T][0],b[T][1],n));l.shapeList.push({shape:"brokenLine",zlevel:h,style:{pointList:b,strokeColor:u||a||r,lineWidth:s,lineType:o,smooth:x(m.smooth),shadowColor:l.query(m,"itemStyle.normal.lineStyle.shadowColor"),shadowBlur:l.query(m,"itemStyle.normal.lineStyle.shadowBlur"),shadowOffsetX:l.query(m,"itemStyle.normal.lineStyle.shadowOffsetX"),shadowOffsetY:l.query(m,"itemStyle.normal.lineStyle.shadowOffsetY")},hoverable:!1,_main:!0,_seriesIndex:w,_orient:n}),p&&l.shapeList.push({shape:"halfSmoothPolygon",zlevel:h,style:{pointList:b.concat([[b[b.length-1][4],b[b.length-1][5]-2],[b[0][4],b[0][5]-2]]),brushType:"fill",smooth:x(m.smooth),color:v?v:f.alpha(r,.5)},hoverable:!1,_main:!0,_seriesIndex:w,_orient:n})}}}}function x(e){return e?.3:0}function T(e,t,n,r,i,s){var o=c[e].calculableHolderColor||a.calculableHolderColor,u=N(e,t,n,r,i,s);return u.style.color=o,u.style.strokeColor=o,u.rotation=[0,0],u.hoverable=!1,u.draggable=!1,u.style.text=undefined,u}function N(e,t,n,r,s,o){var u=c[e],a=u.data[t],f=l.getSymbolShape(u,e,a,t,n,r,s,m[e],d[e],"#fff",o=="vertical"?"horizontal":"vertical");return f.zlevel=h+1,l.deepQuery([a,u,i],"calculable")&&(l.setCalculable(f),f.draggable=!0),f}function C(e,t,n){var r=s.xAxis.getAxis(e.xAxisIndex),i=s.yAxis.getAxis(e.yAxisIndex);return[typeof n.xAxis!="string"&&r.getCoordByIndex?r.getCoordByIndex(n.xAxis||0):r.getCoord(n.xAxis||0),typeof n.yAxis!="string"&&i.getCoordByIndex?i.getCoordByIndex(n.yAxis||0):i.getCoord(n.yAxis||0)]}function k(e,t){s=t,L(e)}function L(e){e&&(i=e,c=i.series),l.clear(),g()}function A(e,t){var n=e.seriesIndex,r=e.dataIndex,i,s,o=n.length;while(o--){i=p[n[o]];if(i)for(var u=0,a=i.length;u<a;u++){s=i[u];for(var f=0,l=s.length;f<l;f++)r==s[f][2]&&t.push(N(n[o],s[f][2],s[f][3],s[f][0],s[f][1],"horizontal"))}}}function O(e){var t={};for(var n=0,i=e.length;n<i;n++)t[e[n][0]]=e[n];var s,o,u,a,f,h,p;for(var n=l.shapeList.length-1;n>=0;n--){f=l.shapeList[n]._seriesIndex;if(t[f]&&!t[f][3]){if(l.shapeList[n]._main){h=l.shapeList[n].style.pointList,o=Math.abs(h[0][0]-h[1][0]),a=Math.abs(h[0][1]-h[1][1]),p=l.shapeList[n]._orient=="horizontal";if(t[f][2]){if(l.shapeList[n].shape=="polygon"){var d=h.length;l.shapeList[n].style.pointList[d-3]=h[d-2],p?l.shapeList[n].style.pointList[d-3][0]=h[d-4][0]:l.shapeList[n].style.pointList[d-3][1]=h[d-4][1],l.shapeList[n].style.pointList[d-2]=h[d-1]}l.shapeList[n].style.pointList.pop(),p?(s=o,u=0):(s=0,u=-a)}else{l.shapeList[n].style.pointList.shift();if(l.shapeList[n].shape=="polygon"){var v=l.shapeList[n].style.pointList.pop();p?v[0]=h[0][0]:v[1]=h[0][1],l.shapeList[n].style.pointList.push(v)}p?(s=-o,u=0):(s=0,u=a)}r.modShape(l.shapeList[n].id,{style:{pointList:l.shapeList[n].style.pointList}},!0)}else{if(t[f][2]&&l.shapeList[n]._dataIndex==c[f].data.length-1){r.delShape(l.shapeList[n].id);continue}if(!t[f][2]&&l.shapeList[n]._dataIndex===0){r.delShape(l.shapeList[n].id);continue}}r.animate(l.shapeList[n].id,"").when(500,{position:[s,u]}).start()}}}function M(){var e=l.query(i,"animationDuration"),t=l.query(i,"animationEasing"),n,s,o,u=0;for(var a=0,f=l.shapeList.length;a<f;a++)l.shapeList[a]._main&&(o=c[l.shapeList[a]._seriesIndex],u+=1,n=l.shapeList[a].style.pointList[0][0],s=l.shapeList[a].style.pointList[0][1],l.shapeList[a]._orient=="horizontal"?r.modShape(l.shapeList[a].id,{scale:[0,1,n,s]},!0):r.modShape(l.shapeList[a].id,{scale:[1,0,n,s]},!0),r.animate(l.shapeList[a].id,"").when((l.query(o,"animationDuration")||e)+u*100,{scale:[1,1,n,s]}).start(l.query(o,"animationEasing")||t));l.animationMark(e,t)}var o=e("../component/base");o.call(this,r);var u=e("./calculableBase");u.call(this,r,i);var a=e("../config"),f=e("zrender/tool/color"),l=this;l.type=a.CHART_TYPE_LINE;var c,h=l.getZlevelBase(),p={},d={},v=["circle","rectangle","triangle","diamond","emptyCircle","emptyRectangle","emptyTriangle","emptyDiamond"],m={};e("zrender/shape").get("icon").define("legendLineIcon",n),l.getMarkCoord=C,l.animation=M,l.init=k,l.refresh=L,l.ontooltipHover=A,l.addDataAnimation=O,k(i,s)}function n(t,n){var r=n.x,i=n.y,s=n.width,o=n.height,u=o/2;t.moveTo(r,i+u),t.lineTo(r+s,i+u),n.symbol.match("empty")&&(t.fillStyle="#fff"),n.brushType="both";var a=n.symbol.replace("empty","").toLowerCase();if(a.match("star"))u=a.replace("star","")-0||5,i-=1,a="star";else if(a=="rectangle"||a=="arrow")r+=(s-o)/2,s=o;var f="";a.match("image")&&(f=a.replace(new RegExp("^image:\\/\\/"),""),a="image",r+=Math.round((s-o)/2),s=o),a=e("zrender/shape").get("icon").get(a),a&&a(t,{x:r+3,y:i+3,width:s-6,height:o-6,n:u,image:f})}return e("../util/shape/halfSmoothPolygon"),e("../chart").define("line",t),t}),r("echarts/chart/bar",["require","../component/base","./calculableBase","../config","../util/ecData","zrender/tool/color","../chart"],function(e){function t(t,n,r,i){function d(){l.selectedMap={};var e={top:[],bottom:[],left:[],right:[]},t,r,s,o;for(var a=0,f=c.length;a<f;a++)c[a].type==u.CHART_TYPE_BAR&&(c[a]=l.reformOption(c[a]),t=c[a].xAxisIndex,r=c[a].yAxisIndex,s=i.xAxis.getAxis(t),o=i.yAxis.getAxis(r),s.type==u.COMPONENT_TYPE_AXIS_CATEGORY?e[s.getPosition()].push(a):o.type==u.COMPONENT_TYPE_AXIS_CATEGORY&&e[o.getPosition()].push(a));for(var h in e)e[h].length>0&&v(h,e[h]);for(var a=0,f=l.shapeList.length;a<f;a++)l.shapeList[a].id=n.newShapeId(l.type),n.addShape(l.shapeList[a])}function v(e,t){var n=m(t),r=n.locationMap,i=n.maxDataLength;if(i===0||r.length===0)return;switch(e){case"bottom":case"top":g(i,r,t);break;case"left":case"right":y(i,r,t)}}function m(e){var t,r=0,s={},o="__kener__stack__",u,a,f=i.legend,h=[],d=0,v;for(var m=0,g=e.length;m<g;m++)t=c[e[m]],a=t.name,f?(l.selectedMap[a]=f.isSelected(a),p[e[m]]=f.getColor(a),v=f.getItemShape(a),v&&(v.style.strokeColor=t.itemStyle.normal.borderColor,v.style.brushType="both",f.setItemShape(a,v))):(l.selectedMap[a]=!0,p[e[m]]=n.getColor(e[m])),l.selectedMap[a]&&(u=t.stack||o+e[m],typeof s[u]=="undefined"?(s[u]=r,h[r]=[e[m]],r++):h[s[u]].push(e[m])),d=Math.max(d,t.data.length);return{locationMap:h,maxDataLength:d}}function g(e,t,n){var s=t[0][0],o=c[s],a=o.xAxisIndex,f=i.xAxis.getAxis(a),h,p,d=b(f,t),v=d.gap,m=d.barGap,g=d.barWidthMap,y=d.barWidth,S=d.barMinHeightMap,x,T={},N,C,k,L,A,O,M,_,D;for(var P=0,H=e;P<H;P++){if(typeof f.getNameByIndex(P)=="undefined")break;N=f.getCoordByIndex(P)-v/2;for(var B=0,j=t.length;B<j;B++){h=c[t[B][0]].yAxisIndex||0,p=i.yAxis.getAxis(h),L=k=p.getCoord(0)-1,O=A=k+2;for(var F=0,I=t[B].length;F<I;F++){s=t[B][F],o=c[s],_=o.data[P],D=typeof _!="undefined"?typeof _.value!="undefined"?_.value:_:"-";if(D=="-")continue;C=p.getCoord(D),D>0?(x=L-C,I==1&&S[s]>x&&(x=S[s]),k-=x,C=k):D<0?(x=C-O,I==1&&S[s]>x&&(x=S[s]),C=A,A+=x):(x=L-C,k-=x,C=k),M=w(s,P,f.getNameByIndex(P),N,C,g[s]||y,x,"vertical"),T[s]=T[s]||{},T[s][P]=N+(g[s]||y)/2,l.shapeList.push(M)}for(var F=0,I=t[B].length;F<I;F++){s=t[B][F],o=c[s],_=o.data[P],D=typeof _!="undefined"?typeof _.value!="undefined"?_.value:_:"-";if(D!="-")continue;l.deepQuery([_,o,r],"calculable")&&(k-=u.island.r,C=k,M=w(s,P,f.getNameByIndex(P),N+1,C,(g[s]||y)-2,u.island.r,"vertical"),M.hoverable=!1,M.draggable=!1,M.style.brushType="stroke",M.style.strokeColor=o.calculableHolderColor||u.calculableHolderColor,l.shapeList.push(M))}N+=(g[s]||y)+m}}E(n,T,!0)}function y(e,t,n){var s=t[0][0],o=c[s],a=o.yAxisIndex,f=i.yAxis.getAxis(a),h,p,d=b(f,t),v=d.gap,m=d.barGap,g=d.barWidthMap,y=d.barWidth,S=d.barMinHeightMap,x,T={},N,C,k,L,A,O,M,_,D;for(var P=0,H=e;P<H;P++){if(typeof f.getNameByIndex(P)=="undefined")break;C=f.getCoordByIndex(P)+v/2;for(var B=0,j=t.length;B<j;B++){h=c[t[B][0]].xAxisIndex||0,p=i.xAxis.getAxis(h),L=k=p.getCoord(0)+1,O=A=k-2;for(var F=0,I=t[B].length;F<I;F++){s=t[B][F],o=c[s],_=o.data[P],D=typeof _!="undefined"?typeof _.value!="undefined"?_.value:_:"-";if(D=="-")continue;N=p.getCoord(D),D>0?(x=N-L,I==1&&S[s]>x&&(x=S[s]),N=k,k+=x):D<0?(x=O-N,I==1&&S[s]>x&&(x=S[s]),A-=x,N=A):(x=N-L,N=k,k+=x),M=w(s,P,f.getNameByIndex(P),N,C-(g[s]||y),x,g[s]||y,"horizontal"),T[s]=T[s]||{},T[s][P]=C-(g[s]||y)/2,l.shapeList.push(M)}for(var F=0,I=t[B].length;F<I;F++){s=t[B][F],o=c[s],_=o.data[P],D=typeof _!="undefined"?typeof _.value!="undefined"?_.value:_:"-";if(D!="-")continue;l.deepQuery([_,o,r],"calculable")&&(N=k,k+=u.island.r,M=w(s,P,f.getNameByIndex(P),N,C+1-(g[s]||y),u.island.r,(g[s]||y)-2,"horizontal"),M.hoverable=!1,M.draggable=!1,M.style.brushType="stroke",M.style.strokeColor=o.calculableHolderColor||u.calculableHolderColor,l.shapeList.push(M))}C-=(g[s]||y)+m}}E(n,T,!1)}function b(e,t,n){var r={},i={},s,o=0,u=0,a,f,h,p;for(var d=0,v=t.length;d<v;d++){h=!1;for(var m=0,g=t[d].length;m<g;m++)seriesIndex=t[d][m],p=c[seriesIndex],n||(h?r[seriesIndex]=s:(s=l.query(p,"barWidth"),typeof s!="undefined"&&(r[seriesIndex]=s,u+=s,o++,h=!0))),i[seriesIndex]=l.query(p,"barMinHeight"),a=typeof a!="undefined"?a:l.query(p,"barGap"),f=typeof f!="undefined"?f:l.query(p,"barCategoryGap")}var y,w;if(t.length!=o)if(!n){y=typeof f=="string"&&f.match(/%$/)?Math.floor(e.getGap()*(100-parseFloat(f))/100):e.getGap()-f,typeof a=="string"&&a.match(/%$/)?(a=parseFloat(a)/100,w=Math.floor((y-u)/((t.length-1)*a+t.length-o)),a=Math.floor(w*a)):(a=parseFloat(a),w=Math.floor((y-u-a*(t.length-1))/(t.length-o)));if(w<0)return b(e,t,!0)}else y=e.getGap(),a=0,w=Math.floor(y/t.length),w<0&&(w=1);else{y=o>1?typeof f=="string"&&f.match(/%$/)?Math.floor(e.getGap()*(100-parseFloat(f))/100):e.getGap()-f:u,w=0,a=o>1?Math.floor((y-u)/(o-1)):0;if(a<0)return b(e,t,!0)}return{barWidthMap:r,barMinHeightMap:i,gap:y,barWidth:w,barGap:a}}function w(e,t,n,i,s,o,u,d){var v,m=c[e],g=m.data[t],y=p[e],b=[g,m],w=l.deepQuery(b,"itemStyle.normal.color")||y,E=l.deepQuery(b,"itemStyle.emphasis.color"),S=l.deepMerge(b,"itemStyle.normal"),x=S.borderWidth,T=l.deepMerge(b,"itemStyle.emphasis");return v={shape:"rectangle",zlevel:h,clickable:!0,style:{x:i,y:s,width:o,height:u,brushType:"both",color:w,radius:S.borderRadius,lineWidth:x,strokeColor:S.borderColor},highlightStyle:{color:E||(typeof w=="string"?f.lift(w,-0.2):w),radius:T.borderRadius,lineWidth:T.borderWidth,strokeColor:T.borderColor},_orient:d},v.style.height>x&&v.style.width>x?(v.style.y+=x/2,v.style.height-=x,v.style.x+=x/2,v.style.width-=x):v.style.brushType="fill",v.highlightStyle.textColor=v.highlightStyle.color,v=l.addLabel(v,m,g,n,d),l.deepQuery([g,m,r],"calculable")&&(l.setCalculable(v),v.draggable=!0),a.pack(v,c[e],e,c[e].data[t],t,n),v}function E(e,t,n){for(var r=0,s=e.length;r<s;r++)l.buildMark(c[e[r]],e[r],i,{isHorizontal:n,xMarkMap:t})}function S(e,t,n,r){var s=i.xAxis.getAxis(e.xAxisIndex),o=i.yAxis.getAxis(e.yAxisIndex),u,a;return r.isHorizontal?(u=typeof n.xAxis=="string"&&s.getIndexByName?s.getIndexByName(n.xAxis):n.xAxis||0,a=[r.xMarkMap[t][u],o.getCoord(n.yAxis||0)]):(u=typeof n.xAxis=="string"&&s.getIndexByName?s.getIndexByName(n.xAxis):n.xAxis||0,a=[s.getCoord(n.xAxis||0),r.xMarkMap[t][u]]),a}function x(e,t){i=t,T(e)}function T(e){e&&(r=e,c=r.series),l.clear(),d()}function N(e){var t={};for(var r=0,s=e.length;r<s;r++)t[e[r][0]]=e[r];var o,u,f,h,p,d,v;for(var r=l.shapeList.length-1;r>=0;r--){d=a.get(l.shapeList[r],"seriesIndex");if(t[d]&&!t[d][3]&&l.shapeList[r].shape=="rectangle"){v=a.get(l.shapeList[r],"dataIndex"),p=c[d];if(t[d][2]&&v==p.data.length-1){n.delShape(l.shapeList[r].id);continue}if(!t[d][2]&&v===0){n.delShape(l.shapeList[r].id);continue}l.shapeList[r]._orient=="horizontal"?(h=i.yAxis.getAxis(p.yAxisIndex||0).getGap(),f=t[d][2]?-h:h,o=0):(u=i.xAxis.getAxis(p.xAxisIndex||0).getGap(),o=t[d][2]?u:-u,f=0),n.animate(l.shapeList[r].id,"").when(500,{position:[o,f]}).start()}}}function C(){var e,t,i,s,o,u,f,c,h;for(var p=0,d=l.shapeList.length;p<d;p++)l.shapeList[p].shape=="rectangle"&&(f=a.get(l.shapeList[p],"series"),c=a.get(l.shapeList[p],"dataIndex"),h=a.get(l.shapeList[p],"value"),e=l.deepQuery([f,r],"animationDuration"),t=l.deepQuery([f,r],"animationEasing"),l.shapeList[p]._orient=="horizontal"?(i=l.shapeList[p].style.width,o=l.shapeList[p].style.x,h<0?(n.modShape(l.shapeList[p].id,{style:{x:o+i,width:0}},!0),n.animate(l.shapeList[p].id,"style").when(e+c*100,{x:o,width:i}).start(t)):(n.modShape(l.shapeList[p].id,{style:{width:0}},!0),n.animate(l.shapeList[p].id,"style").when(e+c*100,{width:i}).start(t))):(s=l.shapeList[p].style.height,u=l.shapeList[p].style.y,h<0?(n.modShape(l.shapeList[p].id,{style:{height:0}},!0),n.animate(l.shapeList[p].id,"style").when(e+c*100,{height:s}).start(t)):(n.modShape(l.shapeList[p].id,{style:{y:u+s,height:0}},!0),n.animate(l.shapeList[p].id,"style").when(e+c*100,{y:u,height:s}).start(t))));l.animationMark(e,t)}var s=e("../component/base");s.call(this,n);var o=e("./calculableBase");o.call(this,n,r);var u=e("../config"),a=e("../util/ecData"),f=e("zrender/tool/color"),l=this;l.type=u.CHART_TYPE_BAR;var c,h=l.getZlevelBase(),p={};l.getMarkCoord=S,l.animation=C,l.init=x,l.refresh=T,l.addDataAnimation=N,x(r,i)}return e("../chart").define("bar",t),t}),r("echarts/chart/pie",["require","../component/base","./calculableBase","../config","../util/ecData","zrender/tool/math","zrender/tool/util","zrender/tool/color","../util/accMath","../chart"],function(e){function t(t,n,r,i){function g(){var e=i.legend;h.selectedMap={},m={};var t,s,o;v=!1;var f;for(var l=0,c=p.length;l<c;l++)if(p[l].type==u.CHART_TYPE_PIE){p[l]=h.reformOption(p[l]),f=p[l].name||"",h.selectedMap[f]=e?e.isSelected(f):!0;if(!h.selectedMap[f])continue;t=h.parseCenter(p[l].center),s=h.parseRadius(p[l].radius),v=v||p[l].selectedMode,m[l]=[],h.deepQuery([p[l],r],"calculable")&&(o={shape:s[0]<=10?"circle":"ring",zlevel:d,hoverable:!1,style:{x:t[0],y:t[1],r0:s[0]<=10?0:s[0]-10,r:s[1]+10,brushType:"stroke",lineWidth:1,strokeColor:p[l].calculableHolderColor||u.calculableHolderColor}},a.pack(o,p[l],l,undefined,-1),h.setCalculable(o),h.shapeList.push(o)),y(l),h.buildMark(p[l],l,i)}for(var l=0,c=h.shapeList.length;l<c;l++)h.shapeList[l].id=n.newShapeId(h.type),n.addShape(h.shapeList[l])}function y(e){var t=p[e],r=t.data,s=i.legend,o,u=0,a=0,f=Number.NEGATIVE_INFINITY;for(var l=0,c=r.length;l<c;l++)o=r[l].name,s?h.selectedMap[o]=s.isSelected(o):h.selectedMap[o]=!0,h.selectedMap[o]&&(u++,a+=+r[l].value,f=Math.max(f,+r[l].value));var d,v=t.clockWise,m=t.startAngle.toFixed(2)-0,g,y=t.minAngle||.01,w=360-y*u,E,S=t.roseType,x,T,N;for(var l=0,c=r.length;l<c;l++){o=r[l].name;if(!h.selectedMap[o])continue;s?E=s.getColor(o):E=n.getColor(l),d=r[l].value/a,S!="area"?g=v?m-d*w-y:d*w+m+y:g=v?m-w/c-y:w/c+m+y,g=g.toFixed(2)-0,d=(d*100).toFixed(2),x=h.parseRadius(t.radius),T=+x[0],N=+x[1],S=="radius"?N=r[l].value/f*(N-T)*.8+(N-T)*.2+T:S=="area"&&(N=Math.sqrt(r[l].value/f)*(N-T)+T);if(v){var C;C=m,m=g,g=C}b(e,l,d,r[l].selected,T,N,m,g,E),v||(m=g)}}function b(e,t,n,r,i,s,o,u,f){var l=w(e,t,n,r,i,s,o,u,f);a.pack(l,p[e],e,p[e].data[t],t,p[e].data[t].name,n),h.shapeList.push(l);var c=E(e,t,n,o,u,f,!1);c&&(c._dataIndex=t,h.shapeList.push(c));var d=x(e,t,i,s,o,u,f,!1);d&&(d._dataIndex=t,h.shapeList.push(d))}function w(e,t,n,i,s,o,u,a,l){var g=p[e],y=g.data[t],b=[y,g],w=h.parseCenter(g.center),E=h.deepQuery(b,"itemStyle.normal.color")||l,S=h.deepQuery(b,"itemStyle.emphasis.color"),x={shape:"sector",zlevel:d,clickable:!0,style:{x:w[0],y:w[1],r0:s,r:o,startAngle:u,endAngle:a,brushType:"both",color:E,strokeColor:"#fff",lineWidth:1},highlightStyle:{color:S||(typeof E=="string"?c.lift(E,-0.2):E),strokeColor:"rgba(0,0,0,0)"},_seriesIndex:e,_dataIndex:t};if(i){var C=((x.style.startAngle+x.style.endAngle)/2).toFixed(2)-0;x.style._hasSelected=!0,x.style._x=x.style.x,x.style._y=x.style.y;var k=h.query(g,"selectedOffset");x.style.x+=f.cos(C,!0)*k,x.style.y-=f.sin(C,!0)*k,m[e][t]=!0}else m[e][t]=!1;v&&(x.onclick=h.shapeHandler.onclick),h.deepQuery([y,g,r],"calculable")&&(h.setCalculable(x),x.draggable=!0);if(T(g,y,!0)||N(g,y,!0))x.onmouseover=h.shapeHandler.onmouserover;return x}function E(e,t,n,r,i,s,o){var u=p[e],a=u.data[t];if(!T(u,a,o))return;var c=o?"emphasis":"normal",v=l.merge(l.clone(a.itemStyle)||{},u.itemStyle,{overwrite:!1,recursive:!0}),m=v[c].label,g=m.textStyle||{},y=h.parseCenter(u.center),b=y[0],w=y[1],E,x,N=((i+r)/2+360)%360,C=h.parseRadius(u.radius),k,L="middle";m.position=="center"?(C=C[1],E=b,x=w,k="center"):m.position=="inner"?(C=(C[0]+C[1])/2,E=Math.round(b+C*f.cos(N,!0)),x=Math.round(w-C*f.sin(N,!0)),s="#fff",k="center"):(C=C[1]- -v[c].labelLine.length- -g.fontSize,E=b+C*f.cos(N,!0),x=w-C*f.sin(N,!0),k=N>=90&&N<=270?"right":"left");if(m.position!="center"&&t>0&&n<30){var A=u.data[t-1],O=A.value*n/a.value;O<4&&(C=A.__labelRadius+(n<4?20:-20),E=b+C*f.cos(N,!0),x=w-C*f.sin(N,!0))}return m.position!="center"&&m.position!="inner"&&(E+=k=="left"?20:-20),a.__labelRadius=C,a.__labelX=E-(k=="left"?5:-5),a.__labelY=x,{shape:"text",zlevel:d+1,hoverable:!1,style:{x:E,y:x,color:g.color||s,text:S(e,t,n,c),textAlign:g.align||k,textBaseline:g.baseline||L,textFont:h.getFont(g)},highlightStyle:{brushType:"fill"},_seriesIndex:e,_dataIndex:t}}function S(e,t,n,r){var i=p[e],s=i.data[t],o=h.deepQuery([s,i],"itemStyle."+r+".label.formatter");if(!o)return s.name;if(typeof o=="function")return o(i.name,s.name,s.value,n);if(typeof o=="string")return o=o.replace("{a}","{a0}").replace("{b}","{b0}").replace("{c}","{c0}").replace("{d}","{d0}"),o=o.replace("{a0}",i.name).replace("{b0}",s.name).replace("{c0}",s.value).replace("{d0}",n),o}function x(e,t,n,r,i,s,o,u){var a=p[e],c=a.data[t];if(N(a,c,u)){var v=u?"emphasis":"normal",m=l.merge(l.clone(c.itemStyle)||{},a.itemStyle,{overwrite:!1,recursive:!0}),g=m[v].labelLine,y=g.lineStyle||{},b=h.parseCenter(a.center),w=b[0],E=b[1],S=r,x=c.__labelRadius?c.__labelRadius:h.parseRadius(a.radius)[1]- -g.length,T=(s+i)/2%360,C=f.cos(T,!0),k=f.sin(T,!0);return{shape:"brokenLine",zlevel:d+1,hoverable:!1,style:{pointList:[[w+S*C,E-S*k],[w+x*C,E-x*k],[c.__labelX,c.__labelY]],strokeColor:y.color||o,lineType:y.type,lineWidth:y.width},_seriesIndex:e,_dataIndex:t}}return}function T(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".label.show")}function N(e,t,n){return h.deepQuery([t,e],"itemStyle."+(n?"emphasis":"normal")+".labelLine.show")}function C(e){var t=l.merge;return e=t(e||{},u.pie,{overwrite:!1,recursive:!0}),e.itemStyle.normal.label.textStyle=t(e.itemStyle.normal.label.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),e.itemStyle.emphasis.label.textStyle=t(e.itemStyle.emphasis.label.textStyle||{},u.textStyle,{overwrite:!1,recursive:!0}),e}function k(e,t){i=t,L(e)}function L(e){e&&(r=e,p=r.series),h.clear(),g()}function A(e){var t={};for(var r=0,i=e.length;r<i;r++)t[e[r][0]]=e[r];var s={},o={},a={},f=l.clone(h.shapeList);h.shapeList=[];var c,d,v,m={};for(var r=0,i=e.length;r<i;r++)c=e[r][0],d=e[r][2],v=e[r][3],p[c]&&p[c].type==u.CHART_TYPE_PIE&&(d?(v||(s[c+"_"+p[c].data.length]="delete"),m[c]=1):v?m[c]=0:(s[c+"_-1"]="delete",m[c]=-1),y(c));var g,b;for(var r=0,i=h.shapeList.length;r<i;r++){c=h.shapeList[r]._seriesIndex,g=h.shapeList[r]._dataIndex,b=c+"_"+g;switch(h.shapeList[r].shape){case"sector":s[b]=h.shapeList[r];break;case"text":o[b]=h.shapeList[r];break;case"line":a[b]=h.shapeList[r]}}h.shapeList=[];var w;for(var r=0,i=f.length;r<i;r++){c=f[r]._seriesIndex;if(t[c]){g=f[r]._dataIndex+m[c],b=c+"_"+g,w=s[b];if(!w)continue;if(f[r].shape=="sector")w!="delete"?n.animate(f[r].id,"style").when(400,{startAngle:w.style.startAngle,endAngle:w.style.endAngle}).start():n.animate(f[r].id,"style").when(400,m[c]<0?{endAngle:f[r].style.startAngle}:{startAngle:f[r].style.endAngle}).start();else if(f[r].shape=="text"||f[r].shape=="line")if(w=="delete")n.delShape(f[r].id);else switch(f[r].shape){case"text":w=o[b],n.animate(f[r].id,"style").when(400,{x:w.style.x,y:w.style.y}).start();break;case"line":w=a[b],n.animate(f[r].id,"style").when(400,{xStart:w.style.xStart,yStart:w.style.yStart,xEnd:w.style.xEnd,yEnd:w.style.yEnd}).start()}}}h.shapeList=f}function O(){var e=h.query(r,"animationDuration"),t=h.query(r,"animationEasing"),i,s,o,u,f,l;for(var c=0,p=h.shapeList.length;c<p;c++)h.shapeList[c].shape=="sector"||h.shapeList[c].shape=="circle"||h.shapeList[c].shape=="ring"?(i=h.shapeList[c].style.x,s=h.shapeList[c].style.y,o=h.shapeList[c].style.r0,u=h.shapeList[c].style.r,n.modShape(h.shapeList[c].id,{rotation:[Math.PI*2,i,s],style:{r0:0,r:0}},!0),f=a.get(h.shapeList[c],"series"),l=a.get(h.shapeList[c],"dataIndex"),n.animate(h.shapeList[c].id,"style").when((h.query(f,"animationDuration")||e)+l*10,{r0:o,r:u}).start("QuinticOut"),n.animate(h.shapeList[c].id,"").when((h.query(f,"animationDuration")||e)+l*100,{rotation:[0,i,s]}).start(h.query(f,"animationEasing")||t)):h.shapeList[c]._mark||(l=h.shapeList[c]._dataIndex,n.modShape(h.shapeList[c].id,{scale:[0,0,i,s]},!0),n.animate(h.shapeList[c].id,"").when(e+l*100,{scale:[1,1,i,s]}).start("QuinticOut"));h.animationMark(e,t)}function M(e){if(!h.isClick||!e.target)return;var r,i=e.target,s=i.style,o=a.get(i,"seriesIndex"),l=a.get(i,"dataIndex");for(var c=0,d=h.shapeList.length;c<d;c++)if(h.shapeList[c].id==i.id){o=a.get(i,"seriesIndex"),l=a.get(i,"dataIndex");if(!s._hasSelected){var g=((s.startAngle+s.endAngle)/2).toFixed(2)-0;i.style._hasSelected=!0,m[o][l]=!0,i.style._x=i.style.x,i.style._y=i.style.y,r=h.query(p[o],"selectedOffset"),i.style.x+=f.cos(g,!0)*r,i.style.y-=f.sin(g,!0)*r}else i.style.x=i.style._x,i.style.y=i.style._y,i.style._hasSelected=!1,m[o][l]=!1;n.modShape(i.id,i)}else h.shapeList[c].style._hasSelected&&v=="single"&&(o=a.get(h.shapeList[c],"seriesIndex"),l=a.get(h.shapeList[c],"dataIndex"),h.shapeList[c].style.x=h.shapeList[c].style._x,h.shapeList[c].style.y=h.shapeList[c].style._y,h.shapeList[c].style._hasSelected=!1,m[o][l]=!1,n.modShape(h.shapeList[c].id,h.shapeList[c]));t.dispatch(u.EVENT.PIE_SELECTED,e.event,{selected:m}),n.refresh()}function _(t,n){if(!h.isDrop||!t.target)return;var s=t.target,o=t.dragged,u=a.get(s,"seriesIndex"),f=a.get(s,"dataIndex"),l,c=i.legend;if(f==-1)l={value:a.get(o,"value"),name:a.get(o,"name")},l.value<0&&(l.value=0),p[u].data.push(l),c&&c.add(l.name,o.style.color||o.style.strokeColor);else{var d=e("../util/accMath");l=p[u].data[f],c&&c.del(l.name),l.name+=r.nameConnector+a.get(o,"name"),l.value=d.accAdd(l.value,a.get(o,"value")),c&&c.add(l.name,o.style.color||o.style.strokeColor)}n.dragIn=n.dragIn||!0,h.isDrop=!1;return}function D(e,t){if(!h.isDragend||!e.target)return;var n=e.target,r=a.get(n,"seriesIndex"),s=a.get(n,"dataIndex");i.legend&&i.legend.del(p[r].data[s].name),p[r].data.splice(s,1),t.dragOut=!0,t.needRefresh=!0,h.isDragend=!1;return}var s=e("../component/base");s.call(this,n);var o=e("./calculableBase");o.call(this,n,r);var u=e("../config"),a=e("../util/ecData"),f=e("zrender/tool/math"),l=e("zrender/tool/util"),c=e("zrender/tool/color"),h=this;h.type=u.CHART_TYPE_PIE;var p,d=h.getZlevelBase(),v,m={};h.shapeHandler.onmouserover=function(e){var t=e.target,r=a.get(t,"seriesIndex"),i=a.get(t,"dataIndex"),s=a.get(t,"special"),o=t.style.startAngle,u=t.style.endAngle,f=t.highlightStyle.color,l=E(r,i,s,o,u,f,!0);l&&n.addHoverShape(l);var c=x(r,i,t.style.r0,t.style.r,o,u,f,!0);c&&n.addHoverShape(c)},h.reformOption=C,h.animation=O,h.init=k,h.refresh=L,h.addDataAnimation=A,h.onclick=M,h.ondrop=_,h.ondragend=D,k(r,i)}return e("../chart").define("pie",t),t}),r("_chart",["require","echarts/chart/scatter","echarts/chart/k","echarts/chart/radar","echarts/chart/chord","echarts/chart/force","echarts/chart/line","echarts/chart/bar","echarts/chart/pie"],function(e){e("echarts/chart/scatter"),e("echarts/chart/k"),e("echarts/chart/radar"),e("echarts/chart/chord"),e("echarts/chart/force"),e("echarts/chart/line"),e("echarts/chart/bar"),e("echarts/chart/pie")});var i=n("zrender");i.tool={color:n("zrender/tool/color"),math:n("zrender/tool/math"),util:n("zrender/tool/util"),vector:n("zrender/tool/vector"),area:n("zrender/tool/area"),event:n("zrender/tool/event")},i.animation={Animation:n("zrender/animation/animation"),Cip:n("zrender/animation/clip"),easing:n("zrender/animation/easing")};var s=n("echarts");s.config=n("echarts/config"),s.util={};var o=n("_chart");e.echarts=s,e.zrender=i})(window);