t);n++);n=m(n-1,p-2)}a=l[n+1],i=l[n]}if(i&&a){this._lastFr=n,this._lastFrP=t;var h=a.percent-i.percent,g=0===h?1:m((t-i.percent)/h,1);a.easingFunc&&(g=a.easingFunc(g));var f=r?this._additiveValue:d?yp:e[c];if(!fp(s)&&!d||f||(f=this._additiveValue=[]),this.discrete)e[c]=g<1?i.rawValue:a.rawValue;else if(fp(s))1===s?lp(f,i[o],a[o],g):function(e,t,n,i){for(var a=t.length,r=a&&t[0].length,o=0;o0&&s.addKeyframe(0,mp(l),i),this._trackKeys.push(o)}s.addKeyframe(e,mp(t[o]),i)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n t);n++);n=m(n-1,p-2)}a=l[n+1],i=l[n]}if(i&&a){this._lastFr=n,this._lastFrP=t;var h=a.percent-i.percent,g=0===h?1:m((t-i.percent)/h,1);a.easingFunc&&(g=a.easingFunc(g));var f=r?this._additiveValue:d?Ip:e[c];if(!Tp(s)&&!d||f||(f=this._additiveValue=[]),this.discrete)e[c]=g<1?i.rawValue:a.rawValue;else if(Tp(s))1===s?yp(f,i[o],a[o],g):function(e,t,n,i){for(var a=t.length,r=a&&t[0].length,o=0;o0&&s.addKeyframe(0,Sp(l),i),this._trackKeys.push(o)}s.addKeyframe(e,Sp(t[o]),i)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n =0&&o<0)&&(r=d,o=c,s=0),c===o&&(a[s++]=l))}return a.length=s,a},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=p&&x<=c||isNaN(x))&&(o[s++]=m),m++}u=!0}else if(2===a){h=d[i[0]];var f=d[i[1]],y=e[i[1]][0],v=e[i[1]][1];for(g=0;g p[0]&&isFinite(g)&&isFinite(p[0]);)h=$_(h),g=p[1]-h*o;else{e.getTicks().length-1>o&&(h=$_(h));var y=h*o;(g=Dc((f=Math.ceil(p[1]/h)*h)-y))<0&&p[0]>=0?(g=0,f=Dc(y)):f>0&&p[1]<=0&&(f=0,g=-Dc(y))}var v=(a[0].value-r[0].value)/s,x=(a[o].value-r[o].value)/s;i.setExtent.call(e,g+h*v,f+h*x),i.setInterval.call(e,h),(v||x)&&i.setNiceExtent.call(e,g+h,f-h)}var ak=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=YE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=Dr(e),i=n.length;if(i){for(var a=[],r=i-1;r>=0;r--){var o=(l=e[+n[r]]).model,s=l.scale;H_(s)&&o.get("alignTicks")&&null==o.get("interval")&&null==o.getTicksGenerator()?a.push(l):(VT(s,o),H_(s)&&!s.isBlank()&&(t=l))}if(a.length){for(;!t&&a.length;){var l;VT((l=a.pop()).scale,l.model),l.scale.isBlank()||(t=l)}a.length&&t&&Mr(a,(function(e){ik(e.scale,e.model,t.scale)}))}}}this._updateScale(e,this.model),i(n.x),i(n.y);var a={};Mr(n.x,(function(e){ok(n,"y",e,a)})),Mr(n.y,(function(e){ok(n,"x",e,a)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),r=sv(i,{width:t.getWidth(),height:t.getHeight()});this._rect=r;var o=this._axesList;function s(){Mr(o,(function(e){var t=e.isHorizontal(),n=t?[0,r.width]:[0,r.height],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?r.x:r.y)}))}s(),a&&(Mr(o,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var i,a,r=n.getExtent();a=n instanceof J_?n.count():(i=n.getTicks()).length;var o,s=e.getLabelModel(),l=GT(e),p=1;a>40&&(p=Math.ceil(a/40));for(var c=0;c0&&i>0||n<0&&i<0)}(e)}var lk=Math.PI,pk=function(){function e(e,t){this.group=new bc,this.opt=t,this.axisModel=e,Sr(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new bc({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!ck[e]},e.prototype.add=function(e){ck[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var i,a,r=Vc(t-e);return qc(r)?(a=n>0?"top":"bottom",i="center"):qc(r-lk)?(a=n>0?"bottom":"top",i="center"):(a="middle",i=r>0&&r=0;r--){var o=e[r],s=void 0;if(o!==a&&!o.ignore&&(s=Vs(o,n,i))&&(!t.topTarget&&(t.topTarget=o),s!==Ds)){t.target=o;break}}}function Gs(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Br(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Ls.prototype[e]=function(t){var n,i,a=t.zrX,r=t.zrY,o=Gs(this,a,r);if("mouseup"===e&&o||(i=(n=this.findHover(a,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Ro(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));function zs(e,t,n,i){var a=t+1;if(a===n)return 1;if(i(e[a++],e[t])<0){for(;a0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var p=o;o=a-l,l=a-p}for(o++;os&&(l=s);var p=o;o=a-l,l=a-p}else{for(s=i-a;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o=0;l--)e[m+l]=e[u+l];return void(e[d]=o[c])}var h=a;for(;;){var g=0,f=0,y=!1;do{if(t(o[c],e[p])<0){if(e[d--]=e[p--],g++,f=0,0==--i){y=!0;break}}else if(e[d--]=o[c--],f++,g=0,1==--s){y=!0;break}}while((g|f)1;){var e=r-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;s(e)}},forceMergeRuns:function(){for(;r>1;){var e=r-2;e>0&&i[e-1]=32;)t|=1&e,e>>=1;return e+t}(a);do{if((r=zs(e,n,i,t))s&&(l=s),js(e,n,n+l,n+r,t),r=l}o.pushRun(n,r),o.mergeRuns(),a-=r,n+=r}while(0!==a);o.forceMergeRuns()}}}var Ks=!1;function Ys(){Ks||(Ks=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Xs(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Zs=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Xs}return e.prototype.traverse=function(e,t){for(var n=0;n0&&e.arc(p+W.cx,c+W.cy,U,sg(W.y0,W.x0),sg(W.y1,W.x1),!d),e.arc(p,c,i,sg(W.cy+W.y1,W.cx+W.x1),sg($.cy+$.y1,$.cx+$.x1),!d),H>0&&e.arc(p+$.cx,c+$.cy,H,sg($.y1,$.x1),sg($.y0,$.x0),!d))}else e.moveTo(p+P,c+O),e.arc(p,c,i,s,l,!d);else e.moveTo(p+P,c+O);if(a>ug&&F)if(T>ug){U=dg(h,T),W=mg(D,A,I,M,a,-(H=dg(g,T)),d),$=mg(P,O,E,k,a,-U,d);e.lineTo(p+W.cx+W.x0,c+W.cy+W.y0),Tg[1]&&(g[1]=h)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,r=this._dimensions,o=r.length,s=this._rawExtent,l=Er(r,(function(e){return e.property})),p=0;pc[1]&&(c[1]=f),d[u++]=y}return a._count=u,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,r=this.count();a