!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).zrender={})}(this,function(t){"use strict";var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},c=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(c.wxa=!0,c.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?c.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(c.node=!0,c.svgSupported=!0):function(t,e){var r=e.browser,i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(r.firefox=!0,r.version=i[1]);n&&(r.ie=!0,r.version=n[1]);o&&(r.edge=!0,r.version=o[1],r.newEdge=18<+o[1].split(".")[0]);a&&(r.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&11<=+r.version),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&9<=+r.version}(navigator.userAgent,c);var h=12,v="sans-serif",E=h+"px "+v;var l,u,p=function(t){var e={};if("undefined"==typeof JSON)return e;for(var r=0;r>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[h]+":0",n[l]+":0",i[1-h]+":auto",n[1-l]+":auto",""].join("!important;"),t.appendChild(a),r.push(a)}return r}(e,o),o,n);if(a)return a(t,r,i),1}}function qt(t){return"CANVAS"===t.nodeName.toUpperCase()}var jt=/([&<>"'])/g,Yt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ut=[],Gt=c.browser.firefox&&+c.browser.version.split(".")[0]<39;function Zt(t,e,r,i){return r=r||{},i?Kt(t,e,r):Gt&&null!=e.layerX&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):null!=e.offsetX?(r.zrX=e.offsetX,r.zrY=e.offsetY):Kt(t,e,r),r}function Kt(t,e,r){if(c.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(qt(t)){var o=t.getBoundingClientRect();return r.zrX=i-o.left,void(r.zrY=n-o.top)}if(Xt(Ut,t,i,n))return r.zrX=Ut[0],void(r.zrY=Ut[1])}r.zrX=r.zrY=0}function Qt(t){return t||window.event}function $t(t,e,r){if(null!=(e=Qt(e)).zrX)return e;var i,n,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&Zt(t,i,e,r):(Zt(t,e,e,r),n=function(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,i=t.deltaY;return null!=r&&null!=i?3*(0!==i?Math.abs(i):Math.abs(r))*(0=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},ke.prototype.clone=function(){return new ke(this.x,this.y,this.width,this.height)},ke.prototype.copy=function(t){ke.copy(this,t)},ke.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},ke.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},ke.prototype.isZero=function(){return 0===this.width||0===this.height},ke.create=function(t){return new ke(t.x,t.y,t.width,t.height)},ke.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},ke.applyTransform=function(t,e,r){if(r){if(r[1]<1e-5&&-1e-5i.getWidth()||r<0||r>i.getHeight()}O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){Oe.prototype[a]=function(t){var e,r,i=t.zrX,n=t.zrY,o=Be(this,i,n);if("mouseup"===a&&o||(r=(e=this.findHover(i,n)).target),"mousedown"===a)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===a)this._upEl=r;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?h=o:s=1+o;var l=i-s;switch(l){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[r+u])<0?h=u:a=u+1}return h}function je(d,y){var a,s,v=He,h=0,g=[];function e(t){var e=a[t],r=s[t],i=a[t+1],n=s[t+1];s[t]=r+n,t===h-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),h--;var o=qe(d[i],d,e,r,0,y);e+=o,0!=(r-=o)&&0!==(n=Xe(d[e+r-1],d,i,n,n-1,y))&&(r<=n?function(t,e,r,i){var n=0;for(n=0;ns[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(n);do{(o=Ee(t,r,i,e))=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,5===o?parseInt(i.slice(4),16)/15:1),Wr(t,e),e):void Br(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(i.slice(1,7),16))&&n<=16777215?(Br(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(i.slice(7),16)/255:1),Wr(t,e),e):void Br(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var h=i.substr(0,a),l=i.substr(a+1,s-(a+1)).split(","),u=1;switch(h){case"rgba":if(4!==l.length)return 3===l.length?Br(e,+l[0],+l[1],+l[2],1):Br(e,0,0,0,1);u=Or(l.pop());case"rgb":return 3<=l.length?(Br(e,Ir(l[0]),Ir(l[1]),Ir(l[2]),3===l.length?u:Or(l[3])),Wr(t,e),e):void Br(e,0,0,0,1);case"hsla":return 4!==l.length?void Br(e,0,0,0,1):(l[3]=Or(l[3]),qr(l,e),Wr(t,e),e);case"hsl":return 3!==l.length?void Br(e,0,0,0,1):(qr(l,e),Wr(t,e),e);default:return}}Br(e,0,0,0,1)}}function qr(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=Or(t[1]),n=Or(t[2]),o=n<=.5?n*(i+1):n+i-n*i,a=2*n-o;return Br(e=e||[],Dr(255*Rr(a,o,r+1/3)),Dr(255*Rr(a,o,r)),Dr(255*Rr(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function jr(t,e){var r=Xr(t);if(r){for(var i=0;i<3;i++)r[i]=e<0?r[i]*(1-e)|0:(255-r[i])*e+r[i]|0,255e);x++);x=m(x-1,y-2)}i=d[x+1],r=d[x]}r&&i&&(this._lastFr=x,this._lastFrP=e,n=i.percent-r.percent,o=0==n?1:m((e-r.percent)/n,1),i.easingFunc&&(o=i.easingFunc(o)),a=c?this._additiveValue:g?Ti:t[v],!ki(f)&&!g||a||(a=this._additiveValue=[]),this.discrete?t[v]=o<1?r.rawValue:i.rawValue:ki(f)?(1===f?_i:function(t,e,r,i){for(var n=e.length,o=n&&e[0].length,a=0;athis._sleepAfterStill&&this.animation.stop())},qn.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},qn.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},qn.prototype.refreshHover=function(){this._needsRefreshHover=!0},qn.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},qn.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},qn.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},qn.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},qn.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},qn.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},qn.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},qn.prototype.on=function(t,e,r){return this._disposed||this.handler.on(t,e,r),this},qn.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},qn.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},qn.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;ethis._ux||n>this._uy;return this.addData(vo.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=i*i+n*n)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},Ro.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._drawPendingPt(),this.addData(vo.C,t,e,r,i,n,o),this._ctx&&this._ctx.bezierCurveTo(t,e,r,i,n,o),this._xi=n,this._yi=o,this},Ro.prototype.quadraticCurveTo=function(t,e,r,i){return this._drawPendingPt(),this.addData(vo.Q,t,e,r,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,r,i),this._xi=r,this._yi=i,this},Ro.prototype.arc=function(t,e,r,i,n,o){this._drawPendingPt(),Do[0]=i,Do[1]=n,function(t,e){var r=zo(t[0]);r<0&&(r+=Ao);var i=r-t[0],n=t[1];n+=i,!e&&Ao<=n-r?n=r+Ao:e&&Ao<=r-n?n=r-Ao:!e&&nl.length&&(this._expandData(),l=this.data);for(var u=0;ur||Po(v)>i||c===e-1)&&(d=Math.sqrt(A*A+v*v),n=y,o=m);break;case vo.C:var g=t[c++],_=t[c++],y=t[c++],m=t[c++],x=t[c++],w=t[c++],d=function(t,e,r,i,n,o,a,s,h){for(var l=t,u=e,c=0,p=1/h,f=1;f<=h;f++){var d=f*p,y=pr(t,r,n,a,d),v=pr(e,i,o,s,d),g=y-l,_=v-u;c+=Math.sqrt(g*g+_*_),l=y,u=v}return c}(n,o,g,_,y,m,x,w,10),n=x,o=w;break;case vo.Q:d=function(t,e,r,i,n,o,a){for(var s=t,h=e,l=0,u=1/a,c=1;c<=a;c++){var p=c*u,f=gr(t,r,n,p),d=gr(e,i,o,p),y=f-s,v=d-h;l+=Math.sqrt(y*y+v*v),s=f,h=d}return l}(n,o,g=t[c++],_=t[c++],y=t[c++],m=t[c++],10),n=y,o=m;break;case vo.A:var b=t[c++],S=t[c++],k=t[c++],T=t[c++],C=t[c++],P=t[c++],M=P+C;c+=1,f&&(a=To(C)*k+b,s=Co(C)*T+S),d=ko(k,T)*So(Ao,Math.abs(P)),n=To(M)*k+b,o=Co(M)*T+S;break;case vo.R:a=n=t[c++],s=o=t[c++],d=2*t[c++]+2*t[c++];break;case vo.Z:var A=a-n,v=s-o;d=Math.sqrt(A*A+v*v),n=a,o=s}0<=d&&(l+=h[u++]=d)}return this._pathLen=l},Ro.prototype.rebuildPath=function(t,e){var r,i,n,o,a,s,h,l,u,c,p=this.data,f=this._ux,d=this._uy,y=this._len,v=e<1,g=0,_=0,m=0;if(!v||(this._pathSegLen||this._calculateLength(),h=this._pathSegLen,l=e*this._pathLen))t:for(var x=0;x=Vo[i=0]+t&&a<=Vo[1]+t?c:0}nMath.PI/2&&d<1.5*Math.PI&&(c=-c),p+=c))}return p}(g,_,x,w,w+b,S,C,n);u=Math.cos(w+b)*m+g,c=Math.sin(w+b)*x+_;break;case qo.R:p=u=s[d++],f=c=s[d++];if(k=p+s[d++],T=f+s[d++],r){if(Fo(p,f,k,f,e,i,n)||Fo(k,f,k,T,e,i,n)||Fo(k,T,p,T,e,i,n)||Fo(p,T,p,f,e,i,n))return!0}else l+=Xo(k,f,k,T,i,n),l+=Xo(p,T,p,f,i,n);break;case qo.Z:if(r){if(Fo(u,c,p,f,e,i,n))return!0}else l+=Xo(u,c,p,f,i,n);u=p,c=f}}return r||(o=c,a=f,Math.abs(o-a)Math.abs(l),c=sh([h,l],u?0:1,e),p=(u?s:l)/c.length,f=0;f=e.maxIterations){t+=e.ellipsis;break}var a=0===o?function(t,e,r,i){for(var n=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),y=!0),i.accumWidth=l):(u=Zh(e,d,i.width,i.breakAll,i.accumWidth),i.accumWidth=u.accumWidth+h,a=u.linesWidths,o=u.lines)):o=e.split("\n");for(var v=0;vi.len()&&(l=p}}for(var o,a=this.__startIndex;an[0]){for(h=0;ht);h++);s=i[n[h]]}n.splice(h+1,0,t),(i[t]=e).virtual||(s?(r=s.dom).nextSibling?a.insertBefore(e.dom,r.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},Uu.prototype.eachLayer=function(t,e){for(var r=this._zlevelList,i=0;i"}(n,o)+("style"!==n?null==(r=a)?"":(r+"").replace(jt,function(t,e){return Yt[e]}):a||"")+(i?""+s+L(i,t).join(s)+s:"")+""}(t)}function dc(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yc(t,e,r,i){return pc("svg","root",{width:t,height:e,xmlns:ac,"xmlns:xlink":sc,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},r)}var vc=0;function gc(){return vc++}var _c={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},mc="transform-origin";var xc={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function wc(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function bc(t){return N(t)?_c[t]?"cubic-bezier("+_c[t]+")":br(t)?t:"":""}function Sc(A,L,D,z){var t=A.animators,e=t.length,r=[];if(A instanceof Lh){if(i=function(t,e,c){var p,f,r=t.shape.paths,d={};if(O(r,function(t){var e=dc(c.zrId);e.animation=!0,Sc(t,{},e,!0);var r=e.cssAnims,i=e.cssNodes,n=F(r),o=n.length;if(o){var a=r[f=n[o-1]];for(var s in a){var h=a[s];d[s]=d[s]||{d:""},d[s].d+=h.d||""}for(var l in i){var u=i[l].animation;0<=u.indexOf(f)&&(p=u)}}}),p){e.d=!1;var i=wc(d,c);return p.replace(f,i)}}(A,L,D))r.push(i);else if(!e)return}else if(!e)return;for(var i,n,o={},a=0;a"].join(p):"")&&(l=pc("style","stl",{},[],h),o.push(l))),yc(r,i,o,t.useViewBox)},sp.prototype.renderToString=function(t){return t=t||{},fc(this.renderToVNode({animation:Z(t.cssAnimation,!0),emphasis:Z(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Z(t.useViewBox,!0)}),{newline:!0})},sp.prototype.setBackgroundColor=function(t){this._backgroundColor=t},sp.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},sp.prototype._paintList=function(t,e,r){for(var i,n,o,a,s,h,l,u,c,p=t.length,f=[],d=0,y=0,v=0;v