/* * 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++},v="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={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);r&&(e.edge=!0,e.version=r[1]);o&&(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},u=Object.prototype.toString,i=Array.prototype,a=i.forEach,h=i.filter,r=i.slice,c=i.map,d=i.reduce,o={};function f(t,e){"createCanvas"===t&&(g=null),o[t]=e}function b(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,r=t.length;n>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return i}(e,o),o,r);if(a)return a(t,i,n),!0}return!1}function Ot(t){return"CANVAS"===t.nodeName.toUpperCase()}var zt="undefined"!=typeof window&&!!window.addEventListener,Et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nt=[];function Rt(t,e,i,n){return i=i||{},n||!v.canvasSupported?Bt(t,e,i):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Bt(t,e,i),i}function Bt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,r=e.clientY;if(Ot(t)){var o=t.getBoundingClientRect();return i.zrX=n-o.left,void(i.zrY=r-o.top)}if(Lt(Nt,t,n,r))return i.zrX=Nt[0],void(i.zrY=Nt[1])}i.zrX=i.zrY=0}function Vt(t){return t||window.event}function Ft(t,e,i){if(null!=(e=Vt(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&Rt(t,r,e,i)}else Rt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Et.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Ht(t,e,i,n){zt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Wt=zt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Gt(t){return 2===t.which||3===t.which}function Zt(){this._track=[]}function Ut(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Zt.prototype={constructor:Zt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,a=n.length;on.getWidth()||i<0||i>n.getHeight()}$t.prototype={constructor:$t,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(D(Kt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Jt(this,e,i),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,o=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:jt}}(e,t,i);n&&(n[r]&&(o.cancelBubble=n[r].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},o=n.length-1;0<=o;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=Qt(n[o],t,e))&&(r.topTarget||(r.topTarget=n[o]),a!==Yt)){r.target=n[o];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Zt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){$t.prototype[a]=function(t){var e,i,n=t.zrX,r=t.zrY,o=Jt(this,n,r);if("mouseup"===a&&o||(i=(e=this.findHover(n,r)).target),"mousedown"===a)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===a)this._upEl=i;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ee(t,e),e):void Pe(e,0,0,0,1):7===r.length?0<=(n=parseInt(r.substr(1),16))&&n<=16777215?(Pe(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ee(t,e),e):void Pe(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Pe(e,0,0,0,1);u=Ae(l.pop());case"rgb":return 3!==l.length?void Pe(e,0,0,0,1):(Pe(e,Te(l[0]),Te(l[1]),Te(l[2]),u),Ee(t,e),e);case"hsla":return 4!==l.length?void Pe(e,0,0,0,1):(l[3]=Ae(l[3]),Re(l,e),Ee(t,e),e);case"hsl":return 3!==l.length?void Pe(e,0,0,0,1):(Re(l,e),Ee(t,e),e);default:return}}Pe(e,0,0,0,1)}}function Re(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ae(t[1]),r=Ae(t[2]),o=r<=.5?r*(n+1):r+n-r*n,a=2*r-o;return Pe(e=e||[],Ie(255*De(a,o,i+1/3)),Ie(255*De(a,o,i)),Ie(255*De(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Be(t,e){var i=Ne(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}D=e;var n=g[(A=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],C=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new bi(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}}},bi.create=function(t){return new bi(t.x,t.y,t.width,t.height)};var Si=function(t){for(var e in t=t||{},pi.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Si.prototype={constructor:Si,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i>>1])<0?l=o:s=1+o;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[i+h])<0?l=h:a=h+1}return l}function ki(p,g){var a,s,m=Ii,l=0,v=[];function e(t){var e=a[t],i=s[t],n=a[t+1],r=s[t+1];s[t]=i+r,t===l-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),l--;var o=Di(p[n],p,e,i,0,g);e+=o,0!==(i-=o)&&0!==(r=Ai(p[e+i-1],p,n,r,r-1,g))&&(i<=r?function(t,e,i,n){var r=0;for(r=0;rs[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(r);do{if((o=Ci(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===a?mn(t,r,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};D.textWidth=ln(D.text,w);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var I=_.textBackgroundColor,C=I&&I.image;C&&tn(C=Ki(C))&&(S=Math.max(S,C.width*b/C.height))}var T=x?x[1]+x[3]:0;S+=T;var A=null!=d?d-v:null;null!=A&&An[0]){for(a=0;at);a++);o=i[n[a]]}if(n.splice(a+1,0,t),!(i[t]=e).virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else ci("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n=o.length&&o.push({option:t})}}),o}function Rr(t){var a=Q();Ar(t,function(t,e){var i=t.exist;i&&a.set(i.id,t)}),Ar(t,function(t,e){var i=t.option;X(!i||null==i.id||!a.get(i.id)||a.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&a.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Ar(t,function(t,e){var i=t.exist,n=t.option,r=t.keyInfo;if(Dr(n)){if(r.name=null!=n.name?n.name+"":i?i.name:Pr+e,i)r.id=i.id;else if(null!=n.id)r.id=n.id+"";else for(var o=0;r.id="\0"+r.name+"\0"+o++,a.get(r.id););a.set(r.id,t)}})}function Br(t){var e=t.name;return!(!e||!e.indexOf(Pr))}function Vr(t){return Dr(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Fr(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Hr(){var e="__\0ec_inner_"+Wr+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Wr=0;function Gr(s,l,u){if(E(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Zr(l,e+"Index")||Zr(l,e+"Id")||Zr(l,e+"Name")||(l[e+"Index"]=0);var h={};return Ar(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],r=(i[2]||"").toLowerCase();if(!(!n||!r||null==t||"index"===r&&"none"===t||u&&u.includeMainTypes&&x(u.includeMainTypes,n)<0)){var o={mainType:n};"index"===r&&"all"===t||(o[r]=t);var a=s.queryComponents(o);h[n+"Models"]=a,h[n+"Model"]=a[0]}}else h[e]=t}),h}function Zr(t,e){return t&&t.hasOwnProperty(e)}function Ur(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Xr(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}var Yr=".",jr="___EC__COMPONENT__CONTAINER___";function qr(t){var e={main:"",sub:""};return t&&(t=t.split(Yr),e.main=t[0]||"",e.sub=t[1]||""),e}function $r(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return k(e.prototype,t),e.extend=this.extend,e.superCall=Jr,e.superApply=to,w(e,this),e.superClass=i,e}}var Kr=0;function Qr(t){var e=["__\0is_clz",Kr++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Jr(t,e){var i=Z(arguments,2);return this.superClass.prototype[e].apply(t,i)}function to(t,e,i){return this.superClass.prototype[e].apply(t,i)}function eo(i,t){t=t||{};var r={};if(i.registerClass=function(t,e){if(e)if(function(t){X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=qr(e)).sub){if(e.sub!==jr){(function(t){var e=r[t.main];e&&e[jr]||((e=r[t.main]={})[jr]=!0);return e})(e)[e.sub]=t}}else r[e.main]=t;return t},i.getClass=function(t,e,i){var n=r[t];if(n&&n[jr]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=qr(t);var i=[],e=r[t.main];return e&&e[jr]?D(e,function(t,e){e!==jr&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=qr(t),!!r[t.main]},i.getAllClassMainTypes=function(){var i=[];return D(r,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=qr(t);var e=r[t.main];return e&&e[jr]},i.parseClassType=qr,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function io(s){for(var t=0;tthis._ux||Ko(e-this._yi)>this._uy||this._len<5;return this.addData(Ho.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(Ho.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(Ho.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(Ho.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=jo(r)*i+t,this._yi=qo(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(Ho.R,t,e,i,n),this},closePath:function(){this.addData(Ho.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||Ko(a-r)>u||c===h-1)&&(t.lineTo(o,a),n=o,r=a);break;case Ho.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Ho.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case Ho.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],_=s[c++],x=s[c++],w=m=ca[n=0]+t&&a<=ca[1]+t?h:0}if(o){l=n;n=ra(r),r=ra(l)}else n=ra(n),r=ra(r);rMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function ma(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;hMath.abs(o[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]}function Cl(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 Tl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Al(t){return t.sort(function(t,e){return t-e}),t}function Dl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function kl(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function Ol(t){var e=2*Math.PI;return(t%e+e)%e}function zl(t){return-Ml"'])/g,Ul={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xl(t){return null==t?"":(t+"").replace(Zl,function(t,e){return Ul[e]})}function Yl(t,e){return"{"+t+(null==e?"":e)+"}"}var jl=["a","b","c","d","e","f","g"];function ql(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:r,content:"{marker"+o+"|} ",style:{color:i}}:""}function Kl(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ql(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Nl(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),a=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),h=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",Kl(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Kl(s,2)).replace("d",s).replace("hh",Kl(l,2)).replace("h",l).replace("mm",Kl(u,2)).replace("m",u).replace("ss",Kl(h,2)).replace("s",h).replace("SSS",Kl(c,3))}function Jl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var tu=fn;function eu(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}var iu=(Object.freeze||Object)({addCommas:Hl,toCamelCase:Wl,normalizeCssArray:Gl,encodeHTML:Xl,formatTpl:ql,formatTplSimple:function(i,t,n){return D(t,function(t,e){i=i.replace("{"+e+"}",n?Xl(t):t)}),i},getTooltipMarker:$l,formatTime:Ql,capitalFirst:Jl,truncateText:tu,getTextBoundingRect:function(t){return un(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,r,o,a,s){return un(t,e,i,n,r,s,o,a)},windowOpen:eu}),nu=D,ru=["left","right","top","bottom","width","height"],ou=[["width","left","right"],["height","top","bottom"]];function au(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,r=t.position,o=t.getBoundingRect(),a=c.childAt(e+1),s=a&&a.getBoundingRect();if("horizontal"===h){var l=o.width+(s?-s.x+o.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,o.height):Math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,o.width):Math.max(v,o.width)}t.newline||(r[0]=g,r[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var su=au;T(au,"vertical"),T(au,"horizontal");function lu(t,e,i){i=Gl(i||0);var n=e.width,r=e.height,o=Cl(t.left,n),a=Cl(t.top,r),s=Cl(t.right,n),l=Cl(t.bottom,r),u=Cl(t.width,n),h=Cl(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=f&&(isNaN(u)&&isNaN(h)&&(n/re)return t[n];return t[i-1]}(s,i):a;if((l=l||a)&&l.length){var u=l[r];return t&&(o[t]=u),n.colorIdx=(r+1)%l.length,u}}},Su="original",Mu="arrayRows",Iu="objectRows",Cu="keyedColumns",Tu="unknown",Au="typedArray",Du="column",ku="row";function Pu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Cu?{}:[]),this.sourceFormat=t.sourceFormat||Tu,this.seriesLayoutBy=t.seriesLayoutBy||Du,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Pu.seriesDataToSource=function(t){return new Pu({data:t,sourceFormat:B(t)?Au:Su,fromDataset:!1})},Qr(Pu);var Lu={Must:1,Might:2,Not:3},Ou=Hr();function zu(t){var e=t.option,i=e.data,n=B(i)?Au:Su,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=Vu(t);if(l){var u=l.option;i=u.source,n=Ou(l).sourceFormat,r=!0,o=o||u.seriesLayoutBy,null==a&&(a=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,r){if(!t)return{dimensionsDefine:Eu(r)};var o,a;if(e===Mu)"auto"===n||null==n?Nu(function(t){null!=t&&"-"!==t&&(E(t)?null==a&&(a=1):a=0)},i,t,10):a=n?1:0,r||1!==a||(r=[],Nu(function(t,e){r[e]=null!=t?t:""},i,t)),o=r?r.length:i===ku?t.length:t[0]?t[0].length:null;else if(e===Iu)r=r||function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:Xl(Hl(t)),style:p}}var m=this.getData(),o=m.mapDimension("defaultedTooltip",!0),n=o.length,a=this.getRawValue(r),s=O(a),v=m.getItemVisual(r,"color");N(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(a):i(n?Dh(m,r,o[0]):s?a[0]:a)).content,u=d.seriesIndex+"at"+g,y=$l({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var _=m.getName(r),x=this.name;Br(this)||(x=""),x=x?Xl(x)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+x+l:x+w+(_?Xl(_)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=bu.getColorFromPalette.call(this,t,e,i);return r=r||n.getColorFromPalette(t,e,i)},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;Br(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return D(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function qh(t){return t.model.getRawData().count()}function $h(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Kh}function Kh(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Qh(e,i){D(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(Jh,i))})}function Jh(t){var e=tc(t);e&&e.setOutputEnd(this.count())}function tc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}S(Yh,Lh),S(Yh,bu);var ec=function(){this.group=new Si,this.uid=Sl("viewComponent")};ec.prototype={constructor:ec,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var ic=ec.prototype;ic.updateView=ic.updateLayout=ic.updateVisual=function(t,e,i,n){},$r(ec),eo(ec,{registerWhenExtend:!0});function nc(){var s=Hr();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,r=e.progressiveRender,o=e.large=i&&i.large,a=e.progressiveRender=i&&i.progressiveRender;return!!(n^o||r^a)&&"reset"}}var rc=Hr(),oc=nc();function ac(){this.group=new Si,this.uid=Sl("viewChart"),this.renderTask=Oh({plan:hc,reset:cc}),this.renderTask.context={view:this}}var sc=ac.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){uc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){uc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function lc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Us(t)))for(var n=0,r=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var a=[],s=0;si.blockIndex?i.step:null,o=n&&n.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},Mc.getPipeline=function(t){return this._pipelineMap.get(t)},Mc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:a,large:o}},Mc.restorePipelines=function(t){var n=this,r=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;r.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Nc(n,t,t.dataTask)})},Mc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),r=this.api;D(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,r,t,o,a){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=r.seriesType,i=r.getTargetSeries;r.createOnAllSeries?o.eachRawSeries(l):e?o.eachRawSeriesByType(e,l):i&&i(o,a).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Oh({plan:Pc,reset:Lc,count:Ec}));i.context={model:t,ecModel:o,api:a,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:n},Nc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,r),t.overallReset&&function(n,t,e,i,r){var o=e.overallTask=e.overallTask||Oh({reset:Tc});o.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:n};var a=o.agentStubMap=o.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,r).each(c):(u=!1,D(i.getSeries(),c));function c(t){var e=t.uid,i=a.get(e);i||(i=a.set(e,Oh({reset:Ac,onDirty:kc})),o.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=o,i.__block=u,Nc(n,t,i)}var d=n._pipelineMap;a.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),a.removeKey(e))})}(this,t,e,n,r)},this)},Mc.prepareView=function(t,e,i,n){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=i,o.api=n,r.__block=!t.incrementalPrepareRender,Nc(this,e,r)},Mc.performDataProcessorTasks=function(t,e){Ic(this,this._dataProcessorHandlers,t,e,{block:!0})},Mc.performVisualTasks=function(t,e,i){Ic(this,this._visualHandlers,t,e,i)},Mc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Mc.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 Cc=Mc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Tc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ac(t,e){return t.overallProgress&&Dc}function Dc(){this.agent.dirty(),this.getDownstream().dirty()}function kc(){this.agent&&this.agent.dirty()}function Pc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Lc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Lr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),p.painter.getSvgRoot().innerHTML=g,r.connectedBackgroundColor&&p.painter.setBackgroundColor(r.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return r.connectedBackgroundColor&&p.add(new Ja({shape:{x:0,y:0,width:t,height:e},style:{fill:r.connectedBackgroundColor}})),cd(f,function(t){var e=new Yn({style:{x:t.left*i-u,y:t.top*i-h,image:t.dom}});p.add(e)}),p.refreshImmediately(),n.toDataURL("image/"+(r&&r.type||"png"))}return this.getDataURL(r)}},bd.convertToPixel=T(Sd,"convertToPixel"),bd.convertFromPixel=T(Sd,"convertFromPixel"),bd.containPixel=function(t,r){var o;if(!this._disposed)return D(t=Gr(this._model,t),function(t,n){0<=n.indexOf("Models")&&D(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)o|=!!e.containPoint(r);else if("seriesModels"===n){var i=this._chartsMap[t.__viewId];i&&i.containPoint&&(o|=i.containPoint(r,t))}},this)},this),!!o},bd.getVisual=function(t,e){var i=(t=Gr(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},bd.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},bd.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Md={prepareAndUpdate:function(t){Id(this),Md.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,i),o.performDataProcessorTasks(e,t),Td(this,e),r.update(e,i),Ld(e),o.performVisualTasks(e,t),Od(this,e,i,t);var a=e.get("backgroundColor")||"transparent";if(v.canvasSupported)n.setBackgroundColor(a);else{var s=Ne(a);a=Ue(s,"rgb"),0===s[3]&&(a="transparent")}Ed(e,i)}},updateTransform:function(r){var o=this._model,a=this,s=this._api;if(o){var l=[];o.eachComponent(function(t,e){var i=a.getViewOfComponentModel(e);if(i&&i.__alive)if(i.updateTransform){var n=i.updateTransform(e,o,s,r);n&&n.update&&l.push(i)}else l.push(i)});var n=Q();o.eachSeries(function(t){var e=a._chartsMap[t.__viewId];if(e.updateTransform){var i=e.updateTransform(t,o,s,r);i&&i.update&&n.set(t.uid,1)}else n.set(t.uid,1)}),Ld(o),this._scheduler.performVisualTasks(o,r,{setDirty:!0,dirtyMap:n}),zd(a,o,s,r,n),Ed(o,this._api)}},updateView:function(t){var e=this._model;e&&(ac.markUpdateMethod(t,"updateView"),Ld(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Od(this,this._model,this._api,t),Ed(e,this._api))},updateVisual:function(t){Md.update.call(this,t)},updateLayout:function(t){Md.update.call(this,t)}};function Id(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Pd(t,"component",e,i),Pd(t,"chart",e,i),i.plan()}function Cd(e,i,n,r,t){var o=e._model;if(r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};t&&(s.subType=t);var l=n.excludeSeriesId;null!=l&&(l=Q(Lr(l))),o&&o.eachComponent(s,function(t){l&&null!=l.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else cd(e._componentsViews.concat(e._chartsViews),u);function u(t){t&&t.__alive&&t[i]&&t[i](t.__model,o,e._api,n)}}function Td(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Ad(e,t){var i=e.type,n=e.escapeConnect,r=Vd[i],o=r.actionInfo,a=(o.update||"update").split(":"),s=a.pop();a=null!=a[0]&&pd(a[0]),this[md]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=P(e.batch,function(t){return(t=A(k({},t),e)).batch=null,t}));var h,c=[],d="highlight"===i||"downplay"===i;cd(l,function(t){(h=(h=r.action(t,this._model,this._api))||k({},t)).type=o.event||h.type,c.push(h),d?Cd(this,s,t,"series"):a&&Cd(this,s,t,a.main,a.sub)},this),"none"===s||d||a||(this[vd]?(Id(this),Md.update.call(this,e),this[vd]=!1):Md[s].call(this,e)),h=u?{type:o.event||i,escapeConnect:n,batch:c}:c[0],this[md]=!1,t||this._messageCenter.trigger(h.type,h)}function Dd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Ad.call(this,i,t)}}function kd(t){t||this.trigger("updated")}function Pd(t,e,r,o){for(var a="component"===e,s=a?t._componentsViews:t._chartsViews,l=a?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;it.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),wc(n._zr.dom,t)}function Ed(e,i){cd(Gd,function(t){t(e,i)})}bd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[md]=!0,i&&Id(this),Md.update.call(this),this[md]=!1,Dd.call(this,n),kd.call(this,n)}}},bd.showLoading=function(t,e){if(!this._disposed&&(fd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Xd[t])){var i=Xd[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},bd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},bd.makeActionFromEvent=function(t){var e=k({},t);return e.type=Fd[t.type],e},bd.dispatchAction=function(t,e){this._disposed||(fd(e)||(e={silent:!!e}),Vd[t.type]&&this._model&&(this[md]?this._pendingActions.push(t):(Ad.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Dd.call(this,e.silent),kd.call(this,e.silent))))},bd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},bd.on=_d("on",!1),bd.off=_d("off",!1),bd.one=_d("one",!1);var Nd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Rd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Bd(){this.eventInfo}bd._initEvents=function(){cd(Nd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var r=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=r&&r.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=k({},n.eventData));if(e){var o=e.componentType,a=e.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",a=e.seriesIndex);var s=o&&null!=a&&i.getComponent(o,a),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),cd(Fd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},bd.isDisposed=function(){return this._disposed},bd.clear=function(){this._disposed||this.setOption({series:[]},!0)},bd.dispose=function(){if(!this._disposed){this._disposed=!0,Ur(this.getDom(),Kd,"");var e=this._api,i=this._model;cd(this._componentsViews,function(t){t.dispose(i,e)}),cd(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete Yd[this.id]}},S(wd,It),Bd.prototype={constructor:Bd,normalizeQuery:function(t){var s={},l={},u={};if(E(t)){var e=pd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};D(t,function(t,e){for(var i=!1,n=0;n_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Of(this)},Pf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var C=a[i],T=o[C][y];if(T){I=T[_];var A=l[C].ordinalMeta;A&&A.categories.length&&(I=A.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&it))return o;r=o-1}}return-1},Pf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=1/0,o=-1,a=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(o[a++]=this.getRawIndex(m))}return aw[1]&&(w[1]=x)}}}return r},Pf.downSample=function(t,e,i,n){for(var r=Vf(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(Cf(this))(u),f=0,p=0;pc[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Nf,r},Pf.getItemModel=function(t){var e=this.hostModel;return new _l(this.getRawDataItem(t),e,e&&e.ecModel)},Pf.diff=function(e){var i=this;return new gf(e?e.getIndices():[],this.getIndices(),function(t){return Rf(e,t)},function(t){return Rf(i,t)})},Pf.getVisual=function(t){var e=this._visual;return e&&e[t]},Pf.setVisual=function(t,e){if(xf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Pf.setLayout=function(t,e){if(xf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Pf.getLayout=function(t){return this._layout[t]},Pf.getItemLayout=function(t){return this._itemLayouts[t]},Pf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?k(this._itemLayouts[t]||{},e):e},Pf.clearItemLayouts=function(){this._itemLayouts.length=0},Pf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Pf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,xf(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],r[o]=!0);else n[e]=i,r[e]=!0},Pf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Wf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Gf(t,e,i){Pu.isInstance(e)||(e=Pu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=Q(),o=Q(),l=[],a=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return D(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},Jf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Jf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Jf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Jf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Jf.prototype.getExtent=function(){return this._extent.slice()},Jf.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Jf.prototype.isBlank=function(){return this._isBlank},Jf.prototype.setBlank=function(t){this._isBlank=t},Jf.prototype.getLabel=null,$r(Jf),eo(Jf,{registerWhenExtend:!0}),tp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&P(i,np);return new tp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var ep=tp.prototype;function ip(t){return t._map||(t._map=Q(t.categories))}function np(t){return N(t)&&null!=t.value?t.value:t+""}ep.getOrdinal=function(t){return ip(this).get(t)},ep.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=ip(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var rp=Jf.prototype,op=Jf.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new tp({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),rp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return rp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(rp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){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:J,niceExtent:J});op.create=function(){return new op};var ap=Tl;function sp(t){return kl(t)+2}function lp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function up(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),lp(t,0,e),lp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var hp=Tl,cp=Jf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),cp.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=sp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;i[0]s&&(t?o.push(hp(s+e,r)):o.push(i[1])),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),r=1;rn[0]&&h>>1;t[r][1]>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,n.push([s/i,l/i])}return n}lg.prototype={constructor:lg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],o=[],a=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],o.coord)&&(n?o.coord=s[1]:e.pop());n&&d(o.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Tl(t),e=Tl(e),c?en[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var tm=xa.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Va(xa.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,o=Jg(i,e.smoothConstraint);if(e.connectNulls){for(;0n)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return D(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function um(t,e,i){if("cartesian2d"!==t.type)return nm(t,e,i);var n=t.getBaseAxis().isHorizontal(),r=im(t,e,i);if(!i.get("clip",!0)){var o=r.shape,a=Math.max(o.width,o.height);n?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)}return r}ac.extend({type:"line",init:function(){var t=new Si,e=new Rg;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=o.mapArray(o.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,o=e.count();rh[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";D(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new ls(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(o,n)||o.getVisual("color");d.useStyle(A(a.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=am(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var C=o.getCalculationInfo("stackedOnSeries"),T=0;f.useStyle(A(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),C&&(T=am(C.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=Fr(r,n);if(!(o instanceof Array)&&null!=o&&0<=o){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(a=new Tg(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else ac.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=Fr(r,n);if(null!=o&&0<=o){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else ac.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new tm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new em({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,r,o,a,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Wg(r,e,a),v=Wg(o,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[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},w(vm,xg);var ym={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)"]}}},_m={};_m.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ym),_m.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},ym),_m.timeAxis=A({scale:!0,min:"dataMin",max:"dataMax"},_m.valueAxis),_m.logAxis=A({scale:!0,logBase:10},_m.valueAxis);function xm(o,t,a,e){D(wm,function(r){t.extend({type:o+"Axis."+r,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?cu(t):{};m(t,e.getTheme().get(r+"Axis")),m(t,this.getDefaultOption()),t.type=a(o,t),i&&hu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=tp.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:p([{},_m[r+"Axis"],e],!0)})}),vu.registerSubTypeDefaulter(o+"Axis",T(a,o))}var wm=["value","category","time","log"],bm=vu.extend({type:"cartesian2dAxis",axis:null,init:function(){bm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){bm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){bm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Sm(t,e){return e.type||(e.data?"category":"value")}m(bm.prototype,Yp);var Mm={offset:0};function Im(t,e){return t.getCoordSysModel()===e}function Cm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}xm("x",bm,Sm,Mm),xm("y",bm,Sm,Mm),vu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Tm=Cm.prototype;function Am(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=i.model,s=a.get("axisLine.onZero"),l=a.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Dm(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&Dm(o[u])&&!n[h(o[u])]){r=o[u];break}r&&(n[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function Dm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,Hm(o)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*zm/180),Hm(o)?n=Rm(t.rotation,null!=d?d:t.rotation,a):(n=function(t,e,i,n){var r,o,a=Ol(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;r=zl(a-zm/2)?(o=l?"bottom":"top","center"):zl(a-1.5*zm)?(o=l?"top":"bottom","center"):(o="middle",a<1.5*zm&&zm/2l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=i.r0}}});var kv=Math.PI/180;function Pv(r,t,e,i,n,o,a,s,l,u){function h(t,e,i){for(var n=t;nl+a);n++)if(r[n].y+=i,tr[n].y+r[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(r[i].y-er[i-1].y+r[i-1].height));i--);}function d(t,e,i,n,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?v.push(r[y]):m.push(r[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function Lv(t){return"center"===t.position}function Ov(k,P,L,t,O,e){var z,E,N=k.getData(),R=[],B=!1,V=(k.get("minShowLabelAngle")||0)*kv;N.each(function(t){var e=N.getItemLayout(t),i=N.getItemModel(t),n=i.getModel("label"),r=n.get("position")||i.get("emphasis.label.position"),o=n.get("distanceToLabelLine"),a=n.get("alignTo"),s=Cl(n.get("margin"),L),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Cl(c,L);var d=h.get("length2");if(d=Cl(d,L),!(e.anglea)return!0;if(o){var s=Ym(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var o=ly(t).pointerEl=new dl[r.type](uy(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var r=ly(t).labelEl=new Ja(uy(e.label));t.add(r),fy(r,n)}},updatePointerEl:function(t,e,i){var n=ly(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=ly(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),fy(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=ul(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Wt(t.event)},onmousedown:hy(this._onHandleDragMove,this,0,0),drift:hy(this._onHandleDragMove,this),ondragend:hy(this._onHandleDragEnd,this)}),n.add(r)),gy(r,i,!1);r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");O(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),vc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){dy(this._axisPointerModel,!e&&this._moveAnimation,this._handle,py(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(py(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(py(n)),ly(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=cy);var _y=cy.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.grid,s=n.get("type"),l=xy(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}(n),c=wy[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}!function(t,e,i,n,r,o){var a=Om.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),my(e,n,r,o,{position:yy(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,tv(a.model,i),i,n,r)},getHandleTransform:function(t,e,i){var n=tv(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:yy(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,o=r.grid,a=r.getGlobalExtent(!0),s=xy(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function xy(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var wy={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}([e,i[0]],[e,i[1]],by(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}([e-n/2,i[0]],[n,r],by(t))}}};function by(t){return"x"===t.dim?0:1}$m.registerAxisPointerClass("CartesianAxisPointer",_y),nf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),rf(gd.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Um(t,e)}),of({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],r=t,o=t.dispatchAction||C(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){ty(a)&&(a=Xv({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=ty(a),u=r.axesInfo,h=s.axesInfo,c="leave"===n||ty(a),d={},f={},p={list:[],map:{}},g={showPointer:jv(Kv,f),showTooltip:jv(Qv,p)};Yv(s.coordSysMap,function(t,e){var o=l||t.containPoint(a);Yv(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&o&&(!u||n)){var r=n&&n.value;null!=r||l||(r=i.pointToData(a)),null!=r&&$v(t,r,g,!1,d)}})});var m={};return Yv(h,function(r,t){var o=r.linkGroup;o&&!f[t]&&Yv(o.axesInfo,function(t,e){var i=f[e];if(t!==r&&i){var n=i.value;o.mapper&&(n=r.axis.scale.parse(o.mapper(n,Jv(t),Jv(r)))),m[r.key]=n}})}),Yv(m,function(t,e){$v(h[e],t,g,!0,d)}),function(r,t,e){var o=e.axesInfo=[];Yv(t,function(t,e){var i=t.axisPointerModel.option,n=r[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(ty(e)||!t.list.length)return n({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,a,t,o),function(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",o=qv(n)[r]||{},a=qv(n)[r]={};Yv(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Yv(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];D(o,function(t,e){a[e]||l.push(t)}),D(a,function(t,e){o[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}}),hf({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var Sy=D,My=Wl,Iy=["","-webkit-","-moz-","-o-"];function Cy(r){var o=[],t=r.get("transitionDuration"),e=r.get("backgroundColor"),i=r.getModel("textStyle"),n=r.get("padding");return t&&o.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return P(Iy,function(t){return t+"transition:"+i}).join(";")}(t)),e&&(v.canvasSupported?o.push("background-Color:"+e):(o.push("background-Color:#"+Ve(e)),o.push("filter:alpha(opacity=70)"))),Sy(["width","color","radius"],function(t){var e="border-"+t,i=My(e),n=r.get(i);null!=n&&o.push(e+":"+n+("color"===t?"":"px"))}),o.push(function(i){var n=[],t=i.get("fontSize"),e=i.getTextColor();e&&n.push("color:"+e),n.push("font:"+i.getFont());var r=i.get("lineHeight");null==r&&(r=Math.round(3*t/2)),t&&n.push("line-height:"+r+"px");var o=i.get("textShadowColor"),a=i.get("textShadowBlur")||0,s=i.get("textShadowOffsetX")||0,l=i.get("textShadowOffsetY")||0;return a&&n.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),Sy(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";")}(i)),null!=n&&o.push("padding:"+Gl(n).join("px ")+"px"),o.join(";")+";"}function Ty(t,e,i,n,r){var o=e&&e.painter;if(i){var a=o&&o.getViewportRoot();a&&function(t,e,i,n,r){Lt(Pt,e,n,r,!0)&&Lt(t,i,Pt[0],Pt[1])}(t,a,document.body,n,r)}else{t[0]=n,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function Ay(t,e,i){if(v.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],Ty(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler;Ft(r.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function Dy(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function ky(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],Dy(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}Ay.prototype={constructor:Ay,_enterable:!0,update:function(t){var e=this._container,i=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==i.position&&(n.position="relative"),t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+Cy(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;Ty(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(C(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},ky.prototype={constructor:ky,_enterable:!0,update:function(t){t.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var t=this._styleCoord[2],e=this._styleCoord[3],i=t*this._zr.getWidth(),n=e*this._zr.getHeight();this.moveTo(i,n)},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,o="{marker",a=r.indexOf(o);0<=a;){var s=r.indexOf("|}"),l=r.substr(a+o.length,s-a-o.length);-1i[r],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=W(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[r]-c[r]:p[n]+=c[r]+m);g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?i[r]:h[r],v[o]=Math.max(h[o],c[o]),v[a]=Math.min(0,c[a]+g[1-n]),l.__rectSize=i[r],d){var y={x:0,y:0};y[r]=Math.max(i[r]-c[r]-m,0),y[o]=v[o],l.setClipPath(new Ja({shape:y})),l.__rectSize=y[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&il(s,{position:_.contentPosition},d&&t),this._updatePageInfoView(t,_),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,r){var o=this._controllerGroup;D(["pagePrev","pageNext"],function(t){var e=null!=r[t+"DataIndex"],i=o.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),i=r.pageIndex,a=null!=i?i+1:0,s=r.pageCount;t&&e&&t.setStyle("text",E(e)?e.replace("{current}",a).replace("{total}",s):e({current:a,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=t.getOrient().index,o=t_[r],a=e_[r],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==o&&null!=i&&(o=e),i===n&&(r=e)}),null!=r?r:o):0;var r,o}});of("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),hf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),cf({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=W(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ba({style:js({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ba({style:js({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){eu(d,"_"+t.get("target"))}),f&&c.on("click",function(){eu(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=lu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:a,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new Ja({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});n.add(w)}}});var n_=Hl,r_=Xl;function o_(t){Or(t,"label",["show"])}var a_=hf({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,e,r){var o=this.constructor,a=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType,!0),i=t[a];e&&e.data?(i?i._mergeOption(e,n,!0):(r&&o_(e),D(e.data,function(t){t instanceof Array?(o_(t[0]),o_(t[1])):o_(t)}),k(i=new o(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[a]=i):t[a]=null},this)},formatTooltip:function(t,e,i,n){var r=this.getData(),o=this.getRawValue(t),a=O(o)?P(o,n_).join(", "):n_(o),s=r.getName(t),l=r_(this.name);return null==o&&!s||(l+="html"===n?"
":"\n"),s&&(l+=r_(s),null!=o&&(l+=" : ")),null!=o&&(l+=r_(a)),l},getData:function(){return this._data},setData:function(t){this._data=t}});S(a_,Lh),a_.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var s_=x;function l_(t,e,i,n,r,o){var a=[],s=$f(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=g_(e,s,t),u=e.indicesOfNearest(s,l)[0];a[r]=e.get(i,u),a[o]=e.get(s,u);var h=e.get(n,u),c=Dl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(a[o]=+a[o].toFixed(c)),[a,h]}var u_=T,h_={min:u_(l_,"min"),max:u_(l_,"max"),average:u_(l_,"average")};function c_(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&n){var r=n.dimensions,o=d_(e,i,n,t);if((e=b(e)).type&&h_[e.type]&&o.baseAxis&&o.valueAxis){var a=s_(r,o.baseAxis.dim),s=s_(r,o.valueAxis.dim),l=h_[e.type](i,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)h_[u[h]]&&(u[h]=g_(i,i.mapDimension(r[h]),u[h]));e.coord=u}}return e}function d_(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;ro&&(e[1-n]=e[n]+c.sign*o),e}function Q_(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0n[1]&&(n[1]=e[1])})}),n[1]c[1];if(a&&!s&&!l)return!0;a&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):ex(h,function(t){if("empty"===r)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),ex(h,function(t){u.setApproximateExtent(c,t)}))})}}};var rx=D,ox=q_,ax=hf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=sx(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=sx(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),lx(this,t);var n=this.settledOption;rx([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var a=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var r=this.dependentModels[t.axis][e],o=r.__dzAxisProxy||(r.__dzAxisProxy=new tx(t.name,e,this,n));a[t.name+"_"+e]=o},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();ox(function(t){var e=t.axisIndex;i[e]=Lr(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;ox(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var o=!0,e=this.get("orient",!0),a=this.option,t=this.dependentModels;if(o){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(a[i+"AxisIndex"]=[0],o=!1):rx(t.singleAxis,function(t){o&&t.get("orient",!0)===e&&(a.singleAxisIndex=[t.componentIndex],o=!1)})}o&&ox(function(t){if(o){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,r=i.length;ne[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-r);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(px(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function _x(t){return"vertical"===t?"ns-resize":"ew-resize"}rf({getTargetSeries:function(t){var n=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){D(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},modifyOutputEnd:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),of("dataZoom",function(i,t){var n=$_(C(t.eachComponent,t,"dataZoom"),q_,function(t,e){return t.get(e.axisIndex)}),r=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){r.push.apply(r,n(t).nodes)}),D(r,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})}),ax.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var xx="\0_ec_interaction_mutex";function bx(t,e){return!!Sx(t)[e]}function Sx(t){return t[xx]||(t[xx]={})}function Mx(i){this.pointerChecker,this._zr=i,this._opt={};var t=C,n=t(Ix,this),r=t(Cx,this),o=t(Tx,this),a=t(Ax,this),s=t(Dx,this);It.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=A(b(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",r),i.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",a),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",r),i.off("mouseup",o),i.off("mousewheel",a),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Ix(t){if(!(Gt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Cx(t){if(this._dragging&&Lx("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!bx(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,o=e-n,a=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Wt(t.event),Px(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:n,oldY:r,newX:e,newY:i})}}function Tx(t){Gt(t)||(this._dragging=!1)}function Ax(t){var e=Lx("zoomOnMouseWheel",t,this._opt),i=Lx("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,r=Math.abs(n),o=t.offsetX,a=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3d.getHeight()&&(i.textPosition="top",o=!0);var a=o?-5-n.height:p+8;r+n.width/2>d.getWidth()?(i.textPosition=["100%",a],i.textAlign="right"):r-n.width/2<0&&(i.textPosition=[0,a],i.textAlign="left")}})}function t(t,e){var i,n=m[t],r=m[e],o=u[n],a=new _l(o,h,h.ecModel);if(l&&null!=l.newTitle&&l.featureName===n&&(o.title=l.newTitle),n&&!r){if(function(t){return 0===t.indexOf("my")}(n))i={model:a,onclick:a.option.onclick,featureName:n};else{var s=Xx(n);if(!s)return;i=new s(a,c,d)}g[n]=i}else{if(!(i=g[r]))return;i.model=a,i.ecModel=c,i.api=d}n||!r?a.get("show")&&!i.unusable?(function(r,o,t){var a=r.getModel("iconStyle"),s=r.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():r.get("icon"),l=r.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=r.iconPaths={};D(e,function(t,e){var i=ul(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(a.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",k({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),Gs(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(r.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",C(o.onclick,o,c,d,e)),u[e]=i})}(a,i,n),a.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(a,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){D(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){D(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){D(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var jx=xc.toolbox.saveAsImage;function qx(t){this.model=t}qx.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:jx.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:jx.lang.slice()},qx.prototype.unusable=!v.canvasSupported,qx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",o=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var a=atob(o.split(",")[1]),s=a.length,l=new Uint8Array(s);s--;)l[s]=a.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+r,d.target="_blank",d.href=o;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},Ux("saveAsImage",qx);var $x=xc.toolbox.magicType,Kx="__ec_magicType_stack__";function Qx(t){this.model=t}Qx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:b($x.title),option:{},seriesIndex:{}};var Jx=Qx.prototype;Jx.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return D(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var tw={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var r=i.get("stack")===Kx;if("line"===t||"bar"===t)return n.setIconStatus("stack",r?"normal":"emphasis"),m({id:e,stack:r?"":Kx},n.get("option.stack")||{},!0)}},ew=[["line","bar"],["stack"]];Jx.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(tw[h]){var i,d={series:[]};if(D(ew,function(t){0<=x(t,h)&&D(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=tw[h](e,i,t,c);n&&(A(n,t.option),d.series.push(n));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===h||"bar"===h)){var o=r.getAxesByScale("ordinal")[0];if(o){var a=o.dim+"Axis",s=u.queryComponents({mainType:a,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[a]=d[a]||[];for(var l=0;l<=s;l++)d[a][s]=d[a][s]||{};d[a][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===Kx?m({stack:$x.title.tiled},$x.title):b($x.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i,featureName:"magicType"})}},of({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Ux("magicType",Qx);var iw=xc.toolbox.dataView,nw=new Array(60).join("-"),rw="\t";function ow(t){var e=function(t){var r={},o=[],a=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;r[n]||(r[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},a.push({axisDim:i.dim,axisIndex:i.index})),r[n].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:r,other:o,meta:a}}(t);return{value:I([function(t){var h=[];return D(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,r=[" "].concat(P(t.series,function(t){return t.name})),o=[i.model.getCategories()];D(t.series,function(t){var e=t.getRawData();o.push(t.getRawData().mapArray(e.mapDimension(n),function(t){return t}))});for(var a=[r.join(rw)],s=0;sn.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,r=t._covers,o=Pw(t,e,i);if(!t._dragging)for(var a=0;at[1]&&t.reverse(),t}function cb(t,e){return Gr(t,e,{includeMainTypes:sb})}ub.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=gb[t.brushType](0,i,e);t.__rangeOffset={offset:vb[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},ub.matchOutputRanges=function(t,n,r){nb(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&D(t.coordSyses,function(t){var e=gb[i.brushType](1,t,i.range);r(i,e.values,t,n)})},this)},ub.setInputRanges=function(t,r){nb(t,function(t){var e=this.findTargetInfo(t,r);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=gb[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?vb[t.brushType](i.values,n.offset,function(t,e){var i=_b(t),n=_b(e),r=[i[0]/n[0],i[1]/n[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}(i.xyMinMax,n.xyMinMax)):i.values}},this)},ub.makePanelOpts=function(i,n){return P(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:function(i){return i=ib(i),function(t,e){return ll(t,i)}}(e),isTargetByCursor:eb(e,i,t.coordSysModel),getLinearBrushOtherExtent:function(r,o){return r=ib(r),function(t){var e=null!=o?o:t,i=e?r.width:r.height,n=e?r.x:r.y;return[n,n+(i||0)]}}(e)}})},ub.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=rb(n.coordSyses,e.coordinateSystem)},ub.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=cb(e,t),r=0;r')}}catch(t){Pb=function(t){return Eb.createElement("<"+t+' xmlns="'+Lb+'" class="zrvml">')}}var Rb,Bb=Jo.CMD,Vb=Math.round,Fb=Math.sqrt,Hb=Math.abs,Wb=Math.cos,Gb=Math.sin,Zb=Math.max;if(!v.canvasSupported){var Ub=",",Xb="progid:DXImageTransform.Microsoft",Yb=21600,jb=Yb/2,qb=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Yb+","+Yb,t.coordorigin="0,0"},$b=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Kb=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Qb=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Jb=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},tS=Hn,eS=function(t,e,i){var n=Ne(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=$b(n[0],n[1],n[2]),t.opacity=i*n[3])},iS=function(t,e,i,n){var r="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(r||!r&&i.lineWidth)?(t[r?"filled":"stroked"]="true",i[e]instanceof rs&&Qb(t,o),o=o||Nb(e),r?function(t,e,i){var n,r,o=e.fill;if(null!=o)if(o instanceof rs){var a,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){a="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&(yt(g,g,p),yt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial";g=[o.x*d,o.y*f],p=i.transform;var _=i.scale,x=d,w=f;l=[(g[0]-c.x)/x,(g[1]-c.y)/w],p&&yt(g,g,p),x/=_[0]*Yb,w/=_[1]*Yb;var b=Zb(x,w);u=0/b,h=2*o.r/b-u}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],C=[],T=0;T=c&&d<=i+1){for(var n=[],r=0;r=c&&d<=r+1)return US(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var a=o();if(a)return a}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,o=i.length,a=t.newPos,s=a-n,l=0;a+1\n\r<"))}},D(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){oM.prototype[t]=function(t){return function(){ci('In SVG mode painter not support method "'+t+'"')}}(t)}),Ir("svg",oM),t.version="4.9.0",t.dependencies={zrender:"4.3.2"},t.PRIORITY=gd,t.init=function(t,e,i){var n=tf(t);if(n)return n;var r=new wd(t,e,i);return r.id="ec_"+qd++,Yd[r.id]=r,Ur(t,Kd,r.id),function(n){var r="__connectUpdateStatus";function o(t,e){for(var i=0;i