/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},m="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);r&&(e.edge=!0,e.version=r[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},h=Object.prototype.toString,i=Array.prototype,o=i.forEach,u=i.filter,r=i.slice,c=i.map,d=i.reduce,a={};function b(t){if(null==t||"object"!=typeof t)return t;var e=t,n=h.call(t);if("[object Array]"===n){if(!q(t)){e=[];for(var i=0,r=t.length;i>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",i[l]+":0",r[h]+":0",i[1-l]+":auto",r[1-h]+":auto",""].join("!important;"),t.appendChild(o),n.push(o)}return n}(t,o),o);if(s)return s(xt,i,r),n.zrX=xt[0],void(n.zrY=xt[1])}n.zrX=n.zrY=0}function St(t){return t||window.event}function Mt(t,e,n){if(null!=(e=St(e)).zrX)return e;var i=e.type;if(i&&0<=i.indexOf("touch")){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&wt(t,r,e,n)}else wt(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&yt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function It(){this._track=[]}var Tt=mt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Ct(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}It.prototype={constructor:It,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},a=0,o=i.length;ai.getWidth()||n<0||n>i.getHeight()}Pt.prototype={constructor:Pt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(k(Ot,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=Nt(this,e,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,a=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:At}}(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;0<=a;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Et(i[a],t,e))&&(r.topTarget||(r.topTarget=i[a]),o!==kt)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new It);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},k(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(o){Pt.prototype[o]=function(t){var e,n,i=t.zrX,r=t.zrY,a=Nt(this,i,r);if("mouseup"===o&&a||(n=(e=this.findHover(i,r)).target),"mousedown"===o)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===o)this._upEl=n;else if("click"===o){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),pe(t,e),e):void ue(e,0,0,0,1):7===r.length?0<=(i=parseInt(r.substr(1),16))&&i<=16777215?(ue(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),pe(t,e),e):void ue(e,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void ue(e,0,0,0,1);h=le(l.pop());case"rgb":return 3!==l.length?void ue(e,0,0,0,1):(ue(e,se(l[0]),se(l[1]),se(l[2]),h),pe(t,e),e);case"hsla":return 4!==l.length?void ue(e,0,0,0,1):(l[3]=le(l[3]),ve(l,e),pe(t,e),e);case"hsl":return 3!==l.length?void ue(e,0,0,0,1):(ve(l,e),pe(t,e),e);default:return}}ue(e,0,0,0,1)}}function ve(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=le(t[1]),r=le(t[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return ue(e=e||[],ae(255*he(o,a,n+1/3)),ae(255*he(o,a,n)),ae(255*he(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function me(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}var ye=Array.prototype.slice;function _e(t,e){return t[e]}function xe(t,e,n){t[e]=n}function we(t,e,n){return(e-t)*n+t}function be(t,e,n){return.5e);n++);n=Math.min(n-1,h-2)}k=e;var i=g[(D=n)+1]-g[n];if(0!=i)if(S=(e-g[n])/i,l)if(I=v[n],M=v[0===n?n:n-1],T=v[h-2=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new qe(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},qe.create=function(t){return new qe(t.x,t.y,t.width,t.height)};var je=function(t){for(var e in t=t||{},Fe.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};je.prototype={constructor:je,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n>>1])<0?l=a:s=1+a;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);a(t,e[n+u])<0?l=u:o=u+1}return l}function en(p,g){var o,s,v=$e,l=0,m=[];function e(t){var e=o[t],n=s[t],i=o[t+1],r=s[t+1];s[t]=n+r,t===l-3&&(o[t+1]=o[t+2],s[t+1]=s[t+2]),l--;var a=tn(p[i],p,e,n,0,g);e+=a,0!==(n-=a)&&0!==(r=Je(p[e+n-1],p,i,r,r-1,g))&&(n<=r?function(t,e,n,i){var r=0;for(r=0;rs[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(r);do{if((a=Ke(t,n,i,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Wn(t,r,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};k.textWidth=On(k.text,w);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))k.percentWidth=S,h.push(k),S=0;else{if(M){S=k.textWidth;var I=_.textBackgroundColor,T=I&&I.image;T&&Tn(T=Sn(T))&&(S=Math.max(S,T.width*b/T.height))}var C=x?x[1]+x[3]:0;S+=C;var D=null!=d?d-m:null;null!=D&&Di[0]){for(o=0;ot);o++);a=n[i[o]]}if(i.splice(o+1,0,t),!(n[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Be("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i=a.length&&a.push({option:t})}}),a}function rr(t){var e=t.name;return!(!e||!e.indexOf(Qi))}function ar(t){return $i(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function or(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?A(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?A(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function sr(){var e="__\0ec_inner_"+lr+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var lr=0;function hr(s,l,h){if(C(l)){var t={};t[l+"Index"]=0,l=t}var e=h&&h.defaultMainType;!e||ur(l,e+"Index")||ur(l,e+"Id")||ur(l,e+"Name")||(l[e+"Index"]=0);var u={};return Zi(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var n=e.match(/^(\w+)(Index|Id|Name)$/)||[],i=n[1],r=(n[2]||"").toLowerCase();if(!(!i||!r||null==t||"index"===r&&"none"===t||h&&h.includeMainTypes&&v(h.includeMainTypes,i)<0)){var a={mainType:i};"index"===r&&"all"===t||(a[r]=t);var o=s.queryComponents(a);u[i+"Models"]=o,u[i+"Model"]=o[0]}}else u[e]=t}),u}function ur(t,e){return t&&t.hasOwnProperty(e)}function cr(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}var dr=".",fr="___EC__COMPONENT__CONTAINER___";function pr(t){var e={main:"",sub:""};return t&&(t=t.split(dr),e.main=t[0]||"",e.sub=t[1]||""),e}function gr(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return S(e.prototype,t),e.extend=this.extend,e.superCall=yr,e.superApply=_r,y(e,this),e.superClass=n,e}}var vr=0;function mr(t){var e=["__\0is_clz",vr++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function yr(t,e){var n=W(arguments,2);return this.superClass.prototype[e].apply(t,n)}function _r(t,e,n){return this.superClass.prototype[e].apply(t,n)}function xr(n,t){t=t||{};var r={};if(n.registerClass=function(t,e){if(e)if(function(t){G(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=pr(e)).sub){if(e.sub!==fr){(function(t){var e=r[t.main];e&&e[fr]||((e=r[t.main]={})[fr]=!0);return e})(e)[e.sub]=t}}else r[e.main]=t;return t},n.getClass=function(t,e,n){var i=r[t];if(i&&i[fr]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=pr(t);var n=[],e=r[t.main];return e&&e[fr]?k(e,function(t,e){e!==fr&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=pr(t),!!r[t.main]},n.getAllClassMainTypes=function(){var n=[];return k(r,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=pr(t);var e=r[t.main];return e&&e[fr]},n.parseClassType=pr,t.registerWhenExtend){var i=n.extend;i&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}return n}function wr(s){for(var t=0;tthis._ux||pa(e-this._yi)>this._uy||this._len<5;return this.addData(ra.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,a){return this.addData(ra.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(ra.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,a){return this.addData(ra.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=ca(r)*n+t,this._yi=da(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ra.R,t,e,n,i),this},closePath:function(){this.addData(ra.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;nl||pa(o-r)>h||c===u-1)&&(t.lineTo(a,o),i=a,r=o);break;case ra.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case ra.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case ra.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],w=v=Da[i=0]+t&&o<=Da[1]+t?u:0}if(a){l=i;i=wa(r),r=wa(l)}else i=wa(i),r=wa(r);rMath.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Oa(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;uMath.abs(a[1])?0=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]}function Vs(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Ws(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Hs(t){var e=t.toString(),n=e.indexOf("e");if(0"'])/g,Qs={"&":"&","<":"<",">":">",'"':""","'":"'"};function Js(t){return null==t?"":(t+"").replace(Ks,function(t,e){return Qs[e]})}function tl(t,e){return"{"+t+(null==e?"":e)+"}"}var el=["a","b","c","d","e","f","g"];function nl(t,e){var n=(t=C(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return n?"html"===r?"subItem"===i?'':'':{renderMode:r,content:"{marker"+a+"|} ",style:{color:n}}:""}function il(t,e){return"0000".substr(0,e-(t+="").length)+t}function rl(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Us(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),h=i["get"+r+"Minutes"](),u=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",il(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",il(s,2)).replace("d",s).replace("hh",il(l,2)).replace("h",l).replace("mm",il(h,2)).replace("m",h).replace("ss",il(u,2)).replace("s",u).replace("SSS",il(c,3))}var al=Rn,ol=k,sl=["left","right","top","bottom","width","height"],ll=[["width","left","right"],["height","top","bottom"]];function hl(u,c,d,f,p){var g=0,v=0;null==f&&(f=1/0),null==p&&(p=1/0);var m=0;c.eachChild(function(t,e){var n,i,r=t.position,a=t.getBoundingRect(),o=c.childAt(e+1),s=o&&o.getBoundingRect();if("horizontal"===u){var l=a.width+(s?-s.x+a.x:0);m=f<(n=g+l)||t.newline?(g=0,n=l,v+=m+d,a.height):Math.max(m,a.height)}else{var h=a.height+(s?-s.y+a.y:0);m=p<(i=v+h)||t.newline?(g+=m+d,v=0,i=h,a.width):Math.max(m,a.width)}t.newline||(r[0]=g,r[1]=v,"horizontal"===u?g=n+d:v=i+d)})}I(hl,"vertical"),I(hl,"horizontal");function ul(t,e,n){n=$s(n||0);var i=e.width,r=e.height,a=Vs(t.left,i),o=Vs(t.top,r),s=Vs(t.right,i),l=Vs(t.bottom,r),h=Vs(t.width,i),u=Vs(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(h)&&(h=i-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}(s,n):o;if((l=l||o)&&l.length){var h=l[r];return t&&(a[t]=h),i.colorIdx=(r+1)%l.length,h}}},Sl="original",Ml="arrayRows",Il="objectRows",Tl="keyedColumns",Cl="unknown",Dl="typedArray",kl="column",Al="row";function Ll(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Tl?{}:[]),this.sourceFormat=t.sourceFormat||Cl,this.seriesLayoutBy=t.seriesLayoutBy||kl,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Z(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Ll.seriesDataToSource=function(t){return new Ll({data:t,sourceFormat:N(t)?Dl:Sl,fromDataset:!1})},mr(Ll);var Pl={Must:1,Might:2,Not:3},Ol=sr();function El(t){var e=t.option,n=e.data,i=N(n)?Dl:Sl,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=Fl(t);if(l){var h=l.option;n=h.source,i=Ol(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,n,i,r){if(!t)return{dimensionsDefine:Nl(r)};var a,o;if(e===Ml)"auto"===i||null==i?Bl(function(t){null!=t&&"-"!==t&&(C(t)?null==o&&(o=1):o=0)},n,t,10):o=i?1:0,r||1!==o||(r=[],Bl(function(t,e){r[e]=null!=t?t:""},n,t)),a=r?r.length:n===Al?t.length:t[0]?t[0].length:null;else if(e===Il)r=r||function(t){var e,n=0;for(;n":"\n",f="richText"===c,p={},g=0;function n(t){return{renderMode:c,content:Js(Zs(t)),style:p}}var v=this.getData(),a=v.mapDimension("defaultedTooltip",!0),i=a.length,o=this.getRawValue(r),s=L(o),m=v.getItemVisual(r,"color");O(m)&&m.colorStops&&(m=(m.colorStops[0]||{}).color),m=m||"transparent";var l=(1":"",i=n+h.join(n||", ");return{renderMode:c,content:i,style:p}}(o):n(i?kh(v,r,a[0]):s?o[0]:o)).content,h=d.seriesIndex+"at"+g,y=nl({color:m,type:"item",renderMode:c,markerId:h});p[h]=m,++g;var _=v.getName(r),x=this.name;rr(this)||(x=""),x=x?Js(x)+(u?": ":e):"";var w="string"==typeof y?y:y.content;return{html:u?w+x+l:x+w+(_?Js(_)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(m.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=bl.getColorFromPalette.call(this,t,e,n);return r=r||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function jh(t){var e=t.name;rr(t)||(t.name=function(t){var n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[];return k(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")}(t)||e)}function Zh(t){return t.model.getRawData().count()}function $h(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Kh}function Kh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Qh(e,n){k(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,I(Jh,n))})}function Jh(t){var e=tu(t);e&&e.setOutputEnd(this.count())}function tu(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}_(qh,Ph),_(qh,bl);var eu=function(){this.group=new je,this.uid=zs("viewComponent")};eu.prototype={constructor:eu,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var nu=eu.prototype;nu.updateView=nu.updateLayout=nu.updateVisual=function(t,e,n,i){},gr(eu),xr(eu,{registerWhenExtend:!0});function iu(){var s=sr();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,r=e.progressiveRender,a=e.large=n.large,o=e.progressiveRender=n.progressiveRender;return!!(i^a||r^o)&&"reset"}}var ru=sr(),au=iu();function ou(){this.group=new je,this.uid=zs("viewChart"),this.renderTask=Oh({plan:uu,reset:cu}),this.renderTask.context={view:this}}var su=ou.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){hu(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){hu(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function lu(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!hs(t)))for(var i=0,r=t.childCount();ic?n+=p(g("data.partialData"),{displayCnt:c}):n+=g("data.allData");for(var o=[],s=0;sn.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},_u.getPipeline=function(t){return this._pipelineMap.get(t)},_u.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},_u.restorePipelines=function(t){var i=this,r=i._pipelineMap=Z();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Lu(i,t,t.dataTask)})},_u.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;k(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,r,t,a,o){var s=t.seriesTaskMap||(t.seriesTaskMap=Z()),e=r.seriesType,n=r.getTargetSeries;r.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):n&&n(a,o).each(l);function l(t){var e=t.uid,n=s.get(e)||s.set(e,Oh({plan:Tu,reset:Cu,count:Au}));n.context={model:t,ecModel:a,api:o,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:i},Lu(i,t,n)}var h=i._pipelineMap;s.each(function(t,e){h.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,r),t.overallReset&&function(i,t,e,n,r){var a=e.overallTask=e.overallTask||Oh({reset:bu});a.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var o=a.agentStubMap=a.agentStubMap||Z(),s=t.seriesType,l=t.getTargetSeries,h=!0,u=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(h=!1,k(n.getSeries(),c));function c(t){var e=t.uid,n=o.get(e);n||(n=o.set(e,Oh({reset:Su,onDirty:Iu})),a.dirty()),n.context={model:t,overallProgress:h,modifyOutputEnd:u},n.agent=a,n.__block=h,Lu(i,t,n)}var d=i._pipelineMap;o.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))})}(this,t,e,i,r)},this)},_u.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,Lu(this,e,r)},_u.performDataProcessorTasks=function(t,e){xu(this,this._dataProcessorHandlers,t,e,{block:!0})},_u.performVisualTasks=function(t,e,n){xu(this,this._visualHandlers,t,e,n)},_u.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},_u.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var wu=_u.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function bu(t){t.overallReset(t.ecModel,t.api,t.payload)}function Su(t,e){return t.overallProgress&&Mu}function Mu(){this.agent.dirty(),this.getDownstream().dirty()}function Iu(){this.agent&&this.agent.dirty()}function Tu(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Cu(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ji(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!m.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=n._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(i,t),vu(i._zr.dom,t)}function Ac(e,n){oc(Rc,function(t){t(e,n)})}mc.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[cc]=!0,n&&xc(this),_c.update.call(this),this[cc]=!1,Mc.call(this,i),Ic.call(this,i)}}},mc.showLoading=function(t,e){if(!this._disposed&&(lc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Wc[t])){var n=Wc[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},mc.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},mc.makeActionFromEvent=function(t){var e=S({},t);return e.type=Nc[t.type],e},mc.dispatchAction=function(t,e){this._disposed||(lc(e)||(e={silent:!!e}),Ec[t.type]&&this._model&&(this[cc]?this._pendingActions.push(t):(Sc.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&m.browser.weChat&&this._throttledZrFlush(),Mc.call(this,e.silent),Ic.call(this,e.silent))))},mc.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},mc.on=pc("on",!1),mc.off=pc("off",!1),mc.one=pc("one",!1);var Lc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Pc(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Oc(){this.eventInfo}mc._initEvents=function(){oc(Lc,function(h){function t(t){var e,n=this.getModel(),i=t.target;if("globalout"===h)e={};else if(i&&null!=i.dataIndex){var r=i.dataModel||n.getSeriesByIndex(i.seriesIndex);e=r&&r.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(e=S({},i.eventData));if(e){var a=e.componentType,o=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",o=e.seriesIndex);var s=a&&null!=o&&n.getComponent(a,o),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=h,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:e,model:s,view:l},this.trigger(h,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(h,t,this)},this),oc(Nc,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},mc.isDisposed=function(){return this._disposed},mc.clear=function(){this._disposed||this.setOption({series:[]},!0)},mc.dispose=function(){if(!this._disposed){this._disposed=!0,cr(this.getDom(),Uc,"");var e=this._api,n=this._model;oc(this._componentsViews,function(t){t.dispose(n,e)}),oc(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Hc[this.id]}},_(vc,ft),Oc.prototype={constructor:Oc,normalizeQuery:function(t){var s={},l={},h={};if(C(t)){var e=hc(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var u=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};k(t,function(t,e){for(var n=!1,i=0;i_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Td(this)},Md._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var I=h[m];if(v&&null==I)if(null!=v.name)h[m]=I=v.name;else if(null!=n){var T=o[n],C=a[T][y];if(C){I=C[_];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var k=null==v?null:v.id;null==k&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return a;r=a-1}}return-1},Md.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(v))}return ow[1]&&(w[1]=x)}}}return r},Md.downSample=function(t,e,n,i){for(var r=Pd(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(_d(this))(h),f=0,p=0;pc[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=kd,r},Md.getItemModel=function(t){var e=this.hostModel;return new Os(this.getRawDataItem(t),e,e&&e.ecModel)},Md.diff=function(e){var n=this;return new ld(e?e.getIndices():[],this.getIndices(),function(t){return Ad(e,t)},function(t){return Ad(n,t)})},Md.getVisual=function(t){var e=this._visual;return e&&e[t]},Md.setVisual=function(t,e){if(fd(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Md.setLayout=function(t,e){if(fd(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Md.getLayout=function(t){return this._layout[t]},Md.getItemLayout=function(t){return this._itemLayouts[t]},Md.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?S(this._itemLayouts[t]||{},e):e},Md.clearItemLayouts=function(){this._itemLayouts.length=0},Md.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},Md.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,fd(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},Md.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Nd(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Bd(t,e,n){Ll.isInstance(e)||(e=Ll.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Z(),a=Z(),l=[],o=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return k(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),s=0;si[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var Df=za.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:no(za.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,a=Cf(n,e.smoothConstraint);if(e.connectNulls){for(;0i)return!1;return!0}(a,e))){var o=e.mapDimension(a.dim),s={};return k(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function Bf(t,e,n){if("cartesian2d"!==t.type)return Lf(t,e,n);var i=t.getBaseAxis().isHorizontal(),r=Af(t,e,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}ou.extend({type:"line",init:function(){var t=new je,e=new cf;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,a=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),h="polar"===i.type,u=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),v=!s.isEmpty(),m=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();ru[c-1].coord&&(u.reverse(),d.reverse());var f=u[0].coord-10,p=u[c-1].coord+10,g=p-f;if(g<.001)return"transparent";k(u,function(t){t.offset=(t.coord-f)/g}),u.push({offset:c?u[c-1].offset:.5,color:d[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:d[0]||"transparent"});var v=new To(0,0,0,0,u,!0);return v[i]=f,v[i+"2"]=p,v}}}(a,i)||a.getVisual("color");d.useStyle(D(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Of(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),C=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(C=Of(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),a=or(r,i);if(!(a instanceof Array)&&null!=a&&0<=a){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new tf(r,a)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else ou.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=or(r,i);if(null!=a&&0<=a){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ou.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Df({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new kf({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=function(t,e,n,i,r,a,o,s){for(var l=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],v=vf(r,e,o),m=vf(a,t,s),y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=e[0]&&t<=e[1]},Ff.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ff.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ff.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ff.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Ff.prototype.getExtent=function(){return this._extent.slice()},Ff.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Ff.prototype.isBlank=function(){return this._isBlank},Ff.prototype.setBlank=function(t){this._isBlank=t},Ff.prototype.getLabel=null,gr(Ff),xr(Ff,{registerWhenExtend:!0}),Vf.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&A(n,Gf);return new Vf({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Wf=Vf.prototype;function Hf(t){return t._map||(t._map=Z(t.categories))}function Gf(t){return O(t)&&null!=t.value?t.value:t+""}Wf.getOrdinal=function(t){return Hf(this).get(t)},Wf.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=Hf(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Xf=Ff.prototype,Yf=Ff.extend({type:"ordinal",init:function(t,e){t&&!L(t)||(t=new Vf({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Xf.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Xf.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Xf.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:$,niceExtent:$});Yf.create=function(){return new Yf};var Uf=Ws;function qf(t){return Hs(t)+2}function jf(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Zf(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),jf(t,0,e),jf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var $f=Ws,Kf=Ff.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Kf.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=qf(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!e)return a;n[0]s&&(t?a.push(s+e):a.push(n[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&u>>1;t[r][1]s[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(i?a.coord=s[1]:e.pop());i&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Ws(t),e=Ws(e),c?ee[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},y(Up,Gp);var qp={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},jp={};jp.categoryAxis=f({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},qp),jp.valueAxis=f({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},qp),jp.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},jp.valueAxis),jp.logAxis=D({scale:!0,logBase:10},jp.valueAxis);function Zp(a,t,o,e){k($p,function(r){t.extend({type:a+"Axis."+r,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?dl(t):{};f(t,e.getTheme().get(r+"Axis")),f(t,this.getDefaultOption()),t.type=o(a,t),n&&cl(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Vf.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:function(t,e){for(var n=t[0],i=1,r=t.length;ih[1]?-1:1,c=["start"===a?h[0]-u*l:"end"===a?h[1]+u*l:(h[0]+h[1])/2,mg(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*ug/180),mg(a)?i=fg(t.rotation,null!=d?d:t.rotation,o):(i=function(t,e,n,i){var r,a,o=Gs(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;r=Xs(o-ug/2)?(a=l?"bottom":"top","center"):Xs(o-1.5*ug)?(a=l?"top":"bottom","center"):(a="middle",o<1.5*ug&&ug/2l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),ou&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){tr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function Kg(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){Qg(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function Qg(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=n?i:0,s=[Math.cos(a)*o,Math.sin(a)*o];r?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Jg(t,e){je.call(this);var n=new ao({z2:2}),i=new uo,r=new eo;this.add(n),this.add(i),this.add(r),this.updateData(t,e,!0)}_($g,jg);var tv=Jg.prototype;tv.updateData=function(t,e,n){var i=this.childAt(0),r=this.childAt(1),a=this.childAt(2),o=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),h=S({},l);h.label=null;var u=o.getShallow("animationTypeUpdate");n?(i.setShape(h),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,ws(i,{shape:{r:l.r}},o,e)):(i.shape.endAngle=l.startAngle,xs(i,{shape:{endAngle:l.endAngle}},o,e))):"expansion"===u?i.setShape(h):xs(i,{shape:h},o,e);var c=t.getItemVisual(e,"color");i.useStyle(D({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),Qg(this,t.getItemLayout(e),o.isSelected(null,e),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===u;this._updateLabel(t,e,f),this.highDownOnUpdate=s.get("hoverAnimation")&&o.isAnimationEnabled()?function(t,e){"emphasis"===e?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut")):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut"))}:null,ss(this)},tv._updateLabel=function(t,e,n){var i=this.childAt(1),r=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))r.ignore=r.normalIgnore=r.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var h={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},u={x:s.x,y:s.y};n?(xs(i,{shape:h},a,e),xs(r,{style:u},a,e)):(i.attr({shape:h}),r.attr({style:u})),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");cs(r.style,r.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!c.get("show"),r.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},y(Jg,je);ou.extend({type:"pie",init:function(){var t=new je;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var r=t.getData(),a=this._data,o=this.group,s=e.get("animation"),l=!a,h=t.get("animationType"),u=t.get("animationTypeUpdate"),c=I(Kg,this.uid,t,s,n),d=t.get("selectedMode");if(r.diff(a).add(function(t){var e=new Jg(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),r.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);l||"transition"===u||n.eachChild(function(t){t.stopAnimation(!0)}),n.updateData(r,t),n.off("click"),d&&n.on("click",c),o.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);o.remove(e)}).execute(),s&&0=n.r0}}});var ev=Math.PI/180;function nv(r,t,e,n,i,a,o,s,l,h){function u(t,e,n){for(var i=t;il+o);i++)if(r[i].y+=n,tr[i].y+r[i].height)return void c(i,n/2);c(e-1,n/2)}function c(t,e){for(var n=t;0<=n&&!(r[n].y-er[n-1].y+r[n-1].height));n--);}function d(t,e,n,i,r,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?m.push(r[y]):v.push(r[y]);d(v,!1,t,e,n,i),d(m,!0,t,e,n,i)}function iv(t){return"center"===t.position}function rv(A,L,P,t,O,e){var E,N,B=A.getData(),z=[],R=!1,F=(A.get("minShowLabelAngle")||0)*ev;B.each(function(t){var e=B.getItemLayout(t),n=B.getItemModel(t),i=n.getModel("label"),r=i.get("position")||n.get("emphasis.label.position"),a=i.get("distanceToLabelLine"),o=i.get("alignTo"),s=Vs(i.get("margin"),P),l=i.get("bleedMargin"),h=i.getFont(),u=n.getModel("labelLine"),c=u.get("length");c=Vs(c,P);var d=u.get("length2");if(d=Vs(d,P),!(e.angle