import{_ as E}from"./tslib-BDyQ-Jie.js";import{i as u0,e as B,a as $,b,c as at,d as ie,f as H,r as ua,m as V,g as O,h as Y,j as F,k as de,l as Fs,n as ye,o as En,p as De,P as Ie,q as rc,s as se,Z as Gt,t as c0,u as f0,v as h0,w as q,x as Q,T as aa,y as kn,z as nt,A as zl,B as Ri,C as v0,D as p0,E as d0,F as Vr,G as Cp,S as Ft,R as to,H as cr,I as Tt,J as le,L as Ke,K as Mp,M as Gl,N as me,O as Dp,Q as re,U as g0,V as Fl,W as Ei,X as Te,Y as y0,_ as oe,$ as On,a0 as J,a1 as Z,a2 as je,a3 as qe,a4 as G,a5 as m0,a6 as ae,a7 as _0,a8 as We,a9 as x0,aa as Hs,ab as Ip,ac,ad as nc,ae as S0,af as ca,ag as b0,ah as ic,ai as Po,aj as w0,ak as A0,al as ja,am as T0,an as he,ao as Ws,ap as bt,aq as C0,ar as M0,as as Lp,at as D0,au as _a,av as oc,aw as Ro,ax as I0,ay as Us,az as ro,aA as or,aB as Nn,aC as L0,aD as sc,aE as sr,aF as lc,aG as Pp,aH as Rp,aI as P0,aJ as R0,aK as E0,aL as hn,aM as k0,aN as Bn,aO as O0,aP as N0,aQ as xi,aR as Eo,aS as Ep,aT as B0,aU as ko,aV as vn,aW as pn,aX as V0,aY as Ys,aZ as uc,a_ as z0,a$ as G0,b0 as F0,b1 as H0,b2 as W0,b3 as U0,b4 as Y0,b5 as Z0}from"./zrender-CTTuYiLF.js";var X0=".",vr="___EC__COMPONENT__CONTAINER___",kp="___EC__EXTENDED_CLASS___";function xt(r){var t={main:"",sub:""};if(r){var e=r.split(X0);t.main=e[0]||"",t.sub=e[1]||""}return t}function $0(r){at(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function K0(r){return!!(r&&r[kp])}function Hl(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return q0(a)?n=(function(i){E(o,i);function o(){return i.apply(this,arguments)||this}return o})(a):(n=function(){(e.$constructor||a).apply(this,arguments)},u0(n,this)),B(n.prototype,e),n[kp]=!0,n.extend=this.extend,n.superCall=Q0,n.superApply=e_,n.superClass=a,n}}function q0(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Op(r,t){r.extend=t.extend}var j0=Math.round(Math.random()*10);function J0(r){var t=["__\0is_clz",j0++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function Q0(r,t){for(var e=[],a=2;a=0||i&&ie(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var t_=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],r_=fa(t_),a_=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return r_(this,t,e)},r})(),cc=1e-4,Np=20;function n_(r){return r.replace(/^\s+|\s+$/g,"")}function pe(r,t,e,a){var n=t[0],i=t[1],o=e[0],s=e[1],l=i-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(a)if(l>0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}function X(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return H(r)?n_(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function we(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Np),r=(+r).toFixed(t),e?r:+r}function Et(r){return r.sort(function(t,e){return t-e}),r}function kt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return i_(r)}function i_(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function Bp(r,t){var e=Math.log,a=Math.LN10,n=Math.floor(e(r[1]-r[0])/a),i=Math.round(e(Math.abs(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function o_(r,t){var e=ua(r,function(h,p){return h+(isNaN(p)?0:p)},0);if(e===0)return[];for(var a=Math.pow(10,t),n=V(r,function(h){return(isNaN(h)?0:h)/e*a*100}),i=a*100,o=V(n,function(h){return Math.floor(h)}),s=ua(o,function(h,p){return h+p},0),l=V(n,function(h,p){return h-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return V(o,function(h){return h/a})}function s_(r,t){var e=Math.max(kt(r),kt(t)),a=r+t;return e>Np?a:we(a,e)}function Vp(r){var t=Math.PI*2;return(r%t+t)%t}function ki(r){return r>-cc&&r=10&&t++,t}function zp(r,t){var e=Wl(r),a=Math.pow(10,e),n=r/a,i;return n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10,r=i*a,e>=-20?+r.toFixed(e<0?-e:0):r}function fc(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a=0,i=!1;if(r instanceof Ie){var o=Kp(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Ur(s)||Ur(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=B({},a),u=B({},u),u.fill=s):!Ur(u.fill)&&Ur(s)?(i=!0,a=B({},a),u=B({},u),u.fill=rc(s)):!Ur(u.stroke)&&Ur(l)&&(i||(a=B({},a),u=B({},u)),u.stroke=rc(l)),a.style=u}}if(a&&a.z2==null){i||(a=B({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c??qp)}return a}function P_(r,t,e){if(e&&e.z2==null){e=B({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??C_)}return e}function R_(r,t,e){var a=ie(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:I_(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:a?n:i.opacity*.1},o),e.style=o),e}function Oo(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return L_(this,r,t,e);if(r==="blur")return R_(this,r,e);if(r==="select")return P_(this,r,e)}return e}function Kl(r){r.stateProxy=Oo;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Oo),e&&(e.stateProxy=Oo)}function mc(r,t){!ad(r,t)&&!r.__highByOuter&&Ht(r,jp)}function _c(r,t){!ad(r,t)&&!r.__highByOuter&&Ht(r,Jp)}function ha(r,t){r.__highByOuter|=1<<(t||0),Ht(r,jp)}function va(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Ht(r,Jp)}function E_(r){Ht(r,$l)}function ed(r){Ht(r,Qp)}function td(r){Ht(r,M_)}function rd(r){Ht(r,D_)}function ad(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function nd(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=Zl(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){Qp(u)}),s&&e.push(i)),o.isBlured=!1}),b(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Xs(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Dr(r,t,e){jl(r,!0),Ht(r,Kl),G_(r,t,e)}function z_(r){jl(r,!1)}function lr(r,t,e,a){a?z_(r):Dr(r,t,e)}function G_(r,t,e){var a=j(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var Sc=["emphasis","blur","select"],F_={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function pa(r,t,e,a){e=e||"itemStyle";for(var n=0;n0){var f=c.duration,v=c.delay,h=c.easing,p={duration:f,delay:v||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function ge(r,t,e,a,n,i){Jl("update",r,t,e,a,n,i)}function Le(r,t,e,a,n,i){Jl("enter",r,t,e,a,n,i)}function na(r){if(!r.__zr)return!0;for(var t=0;tMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Ac(r){return!r.isGroup}function j_(r){return r.shape!=null}function lo(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){Ac(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return j_(o)&&(s.shape=B({},o.shape)),s}var i=a(r);t.traverse(function(o){if(Ac(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),ge(o,l,e,j(o).dataIndex)}}})}function cd(r,t){return V(r,function(e){var a=e[0];a=zi(a,t.x),a=Gi(a,t.x+t.width);var n=e[1];return n=zi(n,t.y),n=Gi(n,t.y+t.height),[a,n]})}function J_(r,t){var e=zi(r.x,t.x),a=Gi(r.x+r.width,t.x+t.width),n=zi(r.y,t.y),i=Gi(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function zn(r,t,e){var a=B({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),q(n,e),new Gt(a)):Ql(r.replace("path://",""),a,e,"center")}function Q_(r,t,e,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=No(h,p,c,f)/v;return!(g<0||g>1)}function No(r,t,e,a){return r*a-e*t}function ex(r){return r<=1e-6&&r>=-1e-6}function zr(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=H(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&b(De(l),function(c){Q(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=j(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:q({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Tc(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function uo(r,t){if(r)if(O(r))for(var e=0;e1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(f===1&&v>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(f===1&&v===1)this._update&&this._update(c,u),n[l]=null;else if(f>1&&v>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;sd&&(d=_)}h[0]=p,h[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};kc=(t={},t[Ze+"_"+Bt]={pure:!0,appendData:i},t[Ze+"_"+Aa]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[gt]={pure:!0,appendData:i},t[Ct]={pure:!0,appendData:function(o){var s=this._data;b(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[ot]={appendData:i},t[ir]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;sn?-this._resultLT:0},r})(),ho="undefined",Tx=typeof Uint32Array===ho?Array:Uint32Array,Cx=typeof Uint16Array===ho?Array:Uint16Array,Id=typeof Int32Array===ho?Array:Int32Array,Vc=typeof Float64Array===ho?Array:Float64Array,Ld={float:Vc,int:Id,ordinal:Array,number:Array,time:Vc},Fo;function Yr(r){return r>65535?Tx:Cx}function Zr(){return[1/0,-1/0]}function Mx(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function zc(r,t,e,a,n){var i=Ld[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=V(o,function(m){return m.property}),c=0;cy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&at)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,a){var n=this._chunks,i=n[t],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=p,l=h,u=0),h===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i=f&&m<=v||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=h[n[0]],_=h[n[1]],x=t[n[1]][0],w=t[n[1]][1],y=0;y=f&&m<=v||isNaN(m))&&(S>=x&&S<=w||isNaN(S))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=f&&m<=v||isNaN(m))&&(l[u++]=A)}else for(var y=0;yt[M][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,v,h=new(Yr(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;pc&&(c=f,v=x)}D>0&&Ds&&(d=s-c);for(var g=0;gp&&(p=m,h=c+g)}var _=this.getRawIndex(f),x=this.getRawIndex(h);fc-p&&(l=c-p,s.length=l);for(var d=0;df[1]&&(f[1]=y),v[h++]=m}return i._count=h,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();il&&(l=f)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,a,n,i){return Ai(e[i],this._dimensions[i])}Fo={arrayRows:t,objectRows:function(e,a,n,i){return Ai(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return Ai(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}})(),r})(),Dx=ne(),Ix={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Pd=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=kd(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return se(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Ad(this.source),a=!Od(t),n="",i=[],o=0,s=0;o30}var Ea=Y,$t=V,Lx=typeof Int32Array>"u"?Array:Int32Array,Px="e\0\0",Gc=-1,Rx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Ex=["_approximateExtent"],Fc,Zn,ka,Oa,Ho,Na,Wo,au=(function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;Rd(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=e)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===ot;if(l&&!n.pure)for(var u=[],c=t;c0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),O(i)?i=i.slice():Ea(i)&&(i=B({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,Ea(e)?B(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Ea(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;T_(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){b(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:$t(this.dimensions,this._getDimInfo,this),this.hostModel)),Ho(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];$(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(m0(arguments)))})},r.internalField=(function(){Fc=function(t){var e=t._invertedIndicesMap;b(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new Lx(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[e]=l}}})(),r})();function Nd(r,t){tu(r)||(r=bd(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=F(),i=[],o=Ox(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Od(o),l=a===r.dimensionsDefine,u=l?kd(r):Ed(a),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=F(c),v=new Id(o),h=0;h0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function Ox(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return b(t,function(i){var o;Y(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function Nx(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var Uo={},nu=(function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var a=[];b(Uo,function(n,i){var o=n.create(t,e);a=a.concat(o||[])}),this._coordinateSystems=a},r.prototype.update=function(t,e){b(this._coordinateSystems,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Uo[t]=e},r.get=function(t){return Uo[t]},r})(),Bx=(function(){function r(t){this.coordSysDims=[],this.axisMap=F(),this.categoryAxisMap=F(),this.coordSysName=t}return r})();function Vx(r){var t=r.get("coordinateSystem"),e=new Bx(t),a=zx[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var zx={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",Me).models[0],i=r.getReferringComponents("yAxis",Me).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),Xr(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),Xr(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",Me).models[0];t.coordSysDims=["single"],e.set("single",n),Xr(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",Me).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Xr(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),Xr(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();b(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];e.set(c,u),Xr(u)&&(a.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Xr(r){return r.get("type")==="category"}function Gx(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;Fx(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,v;if(b(i,function(m,_){H(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(c=m))}),c&&!a&&!u&&(a=!0),c){f="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,p=c.type,d=0;b(i,function(m){m.coordDim===h&&d++});var g={name:f,coordDim:h,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:f}}function Fx(r){return!Rd(r.schema)}function kr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Hx(r,t){return kr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function Wx(r,t){var e=r.get("coordinateSystem"),a=nu.get(e),n;return t&&t.coordSysDims&&(n=V(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=bx(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function Ux(r,t,e){var a,n;return e&&b(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function vo(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;n=a.getSource(),i=n.sourceFormat===ot;var o=Vx(t),s=Wx(t,o),l=e.useEncodeDefaulter,u=$(l)?l:l?ae(hx,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Nd(n,c),v=Ux(f.dimensions,e.createInvertedIndices,o),h=i?null:a.getSharedDataStore(f),p=Gx(t,{schema:f,store:h}),d=new au(f,t);d.setCalculationInfo(p);var g=v!=null&&Yx(n)?function(y,m,_,x){return x===v?_:this.defaultDimValueGetter(y,m,_,x)}:null;return d.hasItemOption=!1,d.initData(i?n:h,null,g),d}function Yx(r){if(r.sourceFormat===ot){var t=Zx(r.data||[]);return!O(xa(t))}}function Zx(r){for(var t=0;t=0&&s.push(l)}),s}}function fr(r,t){return J(J({},r,!0),t,!0)}const qx={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},jx={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Fi="ZH",iu="EN",ia=iu,Ti={},ou={},Bd=ye.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ia).toUpperCase();return r.indexOf(Fi)>-1?Fi:ia})():ia;function Vd(r,t){r=r.toUpperCase(),ou[r]=new ve(t),Ti[r]=t}function Jx(r){if(H(r)){var t=Ti[r.toUpperCase()]||{};return r===Fi||r===iu?Z(t):J(Z(t),Z(Ti[ia]),!1)}else return J(Z(r),Z(Ti[ia]),!1)}function tl(r){return ou[r]}function Qx(){return ou[ia]}Vd(iu,qx);Vd(Fi,jx);var su=1e3,lu=su*60,sn=lu*60,rt=sn*24,Hc=rt*365,Ja={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Xn="{yyyy}-{MM}-{dd}",Wc={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xn,hour:Xn+" "+Ja.hour,minute:Xn+" "+Ja.minute,second:Xn+" "+Ja.second,millisecond:Ja.none},Yo=["year","month","day","hour","minute","second","millisecond"],zd=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Kt(r,t){return r+="","0000".substr(0,t-r.length)+r}function oa(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function eS(r){return r===oa(r)}function tS(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function po(r,t,e,a){var n=wt(r),i=n[uu(e)](),o=n[sa(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[go(e)](),u=n["get"+(e?"UTC":"")+"Day"](),c=n[xn(e)](),f=(c-1)%12+1,v=n[yo(e)](),h=n[mo(e)](),p=n[_o(e)](),d=c>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof ve?a:tl(a||Bd)||Qx(),m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),w=m.get("dayOfWeek"),S=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Kt(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Kt(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Kt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Kt(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Kt(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Kt(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Kt(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Kt(p,3)).replace(/{S}/g,p+"")}function rS(r,t,e,a,n){var i=null;if(H(e))i=e;else if($(e))i=e(r.value,t,{level:r.level});else{var o=B({},Ja);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(O(i)){var f=r.level==null?0:r.level>=0?r.level:i.length+r.level;f=Math.min(f,i.length-1),i=i[f]}}return po(new Date(r.value),i,n,a)}function Gd(r,t){var e=wt(r),a=e[sa(t)]()+1,n=e[go(t)](),i=e[xn(t)](),o=e[yo(t)](),s=e[mo(t)](),l=e[_o(t)](),u=l===0,c=u&&s===0,f=c&&o===0,v=f&&i===0,h=v&&n===1,p=h&&a===1;return p?"year":h?"month":v?"day":f?"hour":c?"minute":u?"second":"millisecond"}function Uc(r,t,e){var a=de(r)?wt(r):r;switch(t=t||Gd(r,e),t){case"year":return a[uu(e)]();case"half-year":return a[sa(e)]()>=6?1:0;case"quarter":return Math.floor((a[sa(e)]()+1)/4);case"month":return a[sa(e)]();case"day":return a[go(e)]();case"half-day":return a[xn(e)]()/24;case"hour":return a[xn(e)]();case"minute":return a[yo(e)]();case"second":return a[mo(e)]();case"millisecond":return a[_o(e)]()}}function uu(r){return r?"getUTCFullYear":"getFullYear"}function sa(r){return r?"getUTCMonth":"getMonth"}function go(r){return r?"getUTCDate":"getDate"}function xn(r){return r?"getUTCHours":"getHours"}function yo(r){return r?"getUTCMinutes":"getMinutes"}function mo(r){return r?"getUTCSeconds":"getSeconds"}function _o(r){return r?"getUTCMilliseconds":"getMilliseconds"}function aS(r){return r?"setUTCFullYear":"setFullYear"}function Fd(r){return r?"setUTCMonth":"setMonth"}function Hd(r){return r?"setUTCDate":"setDate"}function Wd(r){return r?"setUTCHours":"setHours"}function Ud(r){return r?"setUTCMinutes":"setMinutes"}function Yd(r){return r?"setUTCSeconds":"setSeconds"}function Zd(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Xd(r){if(!Gp(r))return H(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function $d(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Gn=_0;function rl(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&On(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?wt(r):r;if(isNaN(+l)){if(s)return"-"}else return po(l,a,e)}if(t==="ordinal")return Fs(r)?n(r):de(r)&&i(r)?r+"":"-";var u=Oi(r);return i(u)?Xd(u):Fs(r)?n(r):typeof r=="boolean"?r+"":"-"}var Yc=["a","b","c","d","e","f","g"],Zo=function(r,t){return"{"+r+(t??"")+"}"};function Kd(r,t,e){O(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function Or(r,t){return t=t||"transparent",H(r)?r:Y(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Zc(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Ci=b,qd=["left","right","top","bottom","width","height"],Tr=[["width","left","right"],["height","top","bottom"]];function cu(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),v=f&&f.getBoundingRect(),h,p;if(r==="horizontal"){var d=c.width+(v?-v.x+c.x:0);h=i+d,h>a||l.newline?(i=0,h=d,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(v?-v.y+c.y:0);p=o+g,p>n||l.newline?(i+=s+e,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+e:o=p+e)})}var Lr=cu;ae(cu,"vertical");ae(cu,"horizontal");function Xe(r,t,e){e=Gn(e||0);var a=t.width,n=t.height,i=X(r.left,a),o=X(r.top,n),s=X(r.right,a),l=X(r.bottom,n),u=X(r.width,a),c=X(r.height,n),f=e[2]+e[0],v=e[1]+e[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(c)&&(c=n-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>a/n?u=a*.8:c=n*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-c-f),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-e[0];break;case"bottom":o=n-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(c)&&(c=n-f-o-(l||0));var p=new me(i+e[3],o+e[0],u,c);return p.margin=e,p}function fu(r,t,e,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new me(0,0,+t.width||0,+t.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=Xe(q({width:u.width,height:u.height},t),e,a),v=o?f.x-u.x:0,h=s?f.y-u.y:0;return l==="raw"?(i.x=v,i.y=h):(i.x+=v,i.y+=h),i===r&&r.markRedraw(),!0}function oS(r,t){return r[Tr[t][0]]!=null||r[Tr[t][1]]!=null&&r[Tr[t][2]]!=null}function Sn(r){var t=r.layoutMode||r.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function ur(r,t,e){var a=e&&e.ignoreSize;!O(a)&&(a=[a,a]);var n=o(Tr[0],0),i=o(Tr[1],1);u(Tr[0],r,n),u(Tr[1],r,i);function o(c,f){var v={},h=0,p={},d=0,g=2;if(Ci(c,function(_){p[_]=r[_]}),Ci(c,function(_){s(t,_)&&(v[_]=p[_]=t[_]),l(v,_)&&h++,l(p,_)&&d++}),a[f])return l(t,c[1])?p[c[2]]=null:l(t,c[2])&&(p[c[1]]=null),p;if(d===g||!h)return p;if(h>=g)return v;for(var y=0;y=0;l--)s=J(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return Vn(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(ve);Op(te,ve);ao(te);$x(te);Kx(te,lS);function lS(r){var t=[];return b(te.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=V(t,function(e){return xt(e).main}),r!=="dataset"&&ie(t,"dataset")<=0&&t.unshift("dataset"),t}var Xc=ne(),uS=ne(),hu=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,a){var n=fe(this.get("color",!0)),i=this.get("colorLayer",!0);return Jd(this,Xc,n,i,t,e,a)},r.prototype.clearColorPalette=function(){fS(this,Xc)},r})();function $c(r,t,e,a){var n=fe(r.get(["aria","decal","decals"]));return Jd(r,uS,n,null,t,e,a)}function cS(r,t){for(var e=r.length,a=0;at)return r[a];return r[e-1]}function Jd(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!a?e:cS(a,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return n&&(u[n]=f),s.paletteIdx=(l+1)%c.length,f}}function fS(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var hS=/\{@(.+?)\}/g,Qd=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var a=this.getData(e),n=this.getRawValue(t,e),i=a.getRawIndex(t),o=a.getName(t),s=a.getRawDataItem(t),l=a.getItemVisual(t,"style"),u=l&&l[a.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,v=f==="series",h=a.userOutput&&a.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:o,dataIndex:i,data:s,dataType:e,value:n,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,a,n,i,o){e=e||"normal";var s=this.getData(a),l=this.getDataParams(t,a);if(o&&(l.value=o.interpolatedValue),n!=null&&O(l.value)&&(l.value=l.value[n]),!i){var u=s.getItemModel(t);i=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if($(i))return l.status=e,l.dimensionIndex=n,i(l);if(H(i)){var c=Kd(i,l);return c.replace(hS,function(f,v){var h=v.length,p=v;p.charAt(0)==="["&&p.charAt(h-1)==="]"&&(p=+p.slice(1,h-1));var d=da(s,t,p);if(o&&O(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(t,e){return da(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r})();function Kc(r){var t,e;return Y(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function ln(r){return new vS(r)}var vS=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(m){return!(m>=1)&&(m=1),m}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(f||h1&&a>0?s:o}};return i;function o(){return t=r?null:l9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if($n(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=qe(s)?ir:ot,i=[];var f=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=se(f.seriesLayoutBy,v.seriesLayoutBy)||null,p=se(f.sourceHeader,v.sourceHeader),d=se(f.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;n=g?[Qs(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:d},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Qs(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&jc(i)}var o,s=[],l=[];return b(t,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&jc(f),s.push(c),l.push(u._getVersionSign())}),a?o=SS(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[px(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return b(r.blocks,function(n){var i=ng(n);i>=t&&(t=i+ +(a&&(!i||al(n)&&!n.noHeader)))}),t}return 0}function MS(r,t,e,a){var n=t.noHeader,i=IS(ng(t)),o=[],s=t.blocks||[];at(!s||O(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Q(u,l)){var c=new Ax(u[l],null);s.sort(function(d,g){return c.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}b(s,function(d,g){var y=t.valueFormatter,m=ag(d)(y?B(B({},r),{valueFormatter:y}):r,d,g>0?i.html:0,a);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(i.richText):nl(a,o.join(""),n?e:i.html);if(n)return f;var v=rl(t.header,"ordinal",r.useUTC),h=rg(a,r.renderMode).nameStyle,p=tg(a);return r.renderMode==="richText"?ig(r,v,h)+i.richText+f:nl(a,'
'+We(v)+"
"+f,e)}function DS(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(x){return x=O(x)?x:[x],V(x,function(w,S){return rl(w,O(h)?h[S]:h,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),v=i?"":rl(l,"ordinal",u),h=t.valueType,p=o?[]:c(t.value,t.dataIndex),d=!s||!i,g=!s&&i,y=rg(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":f)+(i?"":ig(r,v,m))+(o?"":RS(r,p,d,g,_)):nl(a,(s?"":f)+(i?"":LS(v,!s,m))+(o?"":PS(p,d,g,_)),e)}}function Jc(r,t,e,a,n,i){if(r){var o=ag(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function IS(r){return{html:TS[r],richText:CS[r]}}function nl(r,t,e){var a='
',n="margin: "+e+"px 0 0",i=tg(r);return'
'+t+a+"
"}function LS(r,t,e){var a=t?"margin-left:2px":"";return''+We(r)+""}function PS(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=O(r)?r:[r],''+V(r,function(o){return We(o)}).join("  ")+""}function ig(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function RS(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(O(t)?t.join(" "):t,i)}function og(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return Or(a)}function sg(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Xo=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=Fp()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=iS({color:e,type:t,renderMode:a,markerId:n});return H(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};O(e)?b(e,function(i){return B(a,i)}):B(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r})();function ES(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=O(s),u=og(t,e),c,f,v,h;if(o>1||l&&!o){var p=kS(s,t,e,i,u);c=p.inlineValues,f=p.inlineValueTypes,v=p.blocks,h=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);h=c=da(n,e,i[0]),f=d.type}else h=c=l?s[0]:s;var g=Ul(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return At("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[At("nameValue",{markerType:"item",markerColor:u,name:_,noName:!On(_),value:c,valueType:f,dataIndex:e})].concat(v||[])})}function kS(r,t,e,a,n){var i=t.getData(),o=ua(r,function(f,v,h){var p=i.getDimensionInfo(h);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?b(a,function(f){c(da(i,e,f),f)}):b(r,c);function c(f,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(At("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var qt=ne();function Kn(r,t){return r.getName(t)||r.getId(t)}var Mi="__universalTransitionEnabled",$e=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=ln({count:NS,reset:BS}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=qt(this).sourceManager=new wS(this);i.prepareSource();var o=this.getInitialData(e,n);ef(o,this),this.dataTask.context.data=o,qt(this).dataBeforeProcessed=o,Qc(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=Sn(this),i=n?Ca(e):{},o=this.subType;te.hasClass(o)&&(o+="Series"),J(e,a.getTheme().get(this.subType)),J(e,this.getDefaultOption()),Ni(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&ur(e,i,n)},t.prototype.mergeOption=function(e,a){e=J(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Sn(this);n&&ur(this.option,e,n);var i=qt(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);ef(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,qt(this).dataBeforeProcessed=o,Qc(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!qe(e))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=hu.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[Kn(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Mi])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Y(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(e,a)}},t.registerClass=function(e){return te.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(te);je($e,Qd);je($e,hu);Op($e,te);function Qc(r){var t=r.name;Ul(r)||(r.name=OS(r)||t)}function OS(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return b(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function NS(r){return r.model.getRawData().count()}function BS(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),VS}function VS(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function ef(r,t){b(x0(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,ae(zS,t))})}function zS(r,t){var e=il(r);return e&&e.setOutputEnd((t||this).count()),t}function il(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var GS=Ie.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,n=t.width/2,i=t.height/2;r.moveTo(e,a-i),r.lineTo(e+n,a+i),r.lineTo(e-n,a+i),r.closePath()}}),FS=Ie.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,a=t.cy,n=t.width/2,i=t.height/2;r.moveTo(e,a-i),r.lineTo(e+n,a),r.lineTo(e,a+i),r.lineTo(e-n,a),r.closePath()}}),HS=Ie.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,a=t.y,n=t.width/5*3,i=Math.max(n,t.height),o=n/2,s=o*o/(i-o),l=a-i+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),v=Math.cos(u),h=o*.6,p=o*.7;r.moveTo(e-c,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+c-f*h,l+s+v*h,e,a-p,e,a),r.bezierCurveTo(e,a-p,e-c+f*h,l+s+v*h,e-c,l+s),r.closePath()}}),WS=Ie.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,a=t.width,n=t.x,i=t.y,o=a/3*2;r.moveTo(n,i),r.lineTo(n+o,i+e),r.lineTo(n,i+e/4*3),r.lineTo(n-o,i+e),r.lineTo(n,i),r.closePath()}}),US={line:Ke,rect:le,roundRect:le,square:le,circle:Vr,diamond:FS,pin:HS,arrow:WS,triangle:GS},YS={line:function(r,t,e,a,n){n.x1=r,n.y1=t+a/2,n.x2=r+e,n.y2=t+a/2},rect:function(r,t,e,a,n){n.x=r,n.y=t,n.width=e,n.height=a},roundRect:function(r,t,e,a,n){n.x=r,n.y=t,n.width=e,n.height=a,n.r=Math.min(e,a)/4},square:function(r,t,e,a,n){var i=Math.min(e,a);n.x=r,n.y=t,n.width=i,n.height=i},circle:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.r=Math.min(e,a)/2},diamond:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.width=e,n.height=a},pin:function(r,t,e,a,n){n.x=r+e/2,n.y=t+a/2,n.width=e,n.height=a},arrow:function(r,t,e,a,n){n.x=r+e/2,n.y=t+a/2,n.width=e,n.height=a},triangle:function(r,t,e,a,n){n.cx=r+e/2,n.cy=t+a/2,n.width=e,n.height=a}},Hi={};b(US,function(r,t){Hi[t]=new r});var ZS=Ie.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var a=Hs(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(a.y=e.y+e.height*.4),a},buildPath:function(r,t,e){var a=t.symbolType;if(a!=="none"){var n=Hi[a];n||(a="rect",n=Hi[a]),YS[a](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function XS(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function Ve(r,t,e,a,n,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=sd(r.slice(8),new me(t,e,a,n),o?"center":"cover"):r.indexOf("path://")===0?l=Ql(r.slice(7),{},new me(t,e,a,n),o?"center":"cover"):l=new ZS({shape:{symbolType:r,x:t,y:e,width:a,height:n}}),l.__isEmptyBrush=s,l.setColor=XS,i&&l.setColor(i),l}function pu(r){return O(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function xo(r,t){if(r!=null)return O(r)||(r=[r,r]),[X(r[0],t[0])||0,X(se(r[1],r[0]),t[1])||0]}var $S=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return vo(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var a=new re,n=Ve("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);a.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=e.itemHeight*.8,u=Ve(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);a.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t})($e);function So(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=da(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(t[i])}return a.join(" ")}var du=(function(r){E(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o){this.removeAll();var s=Ve(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=KS,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ha(this.childAt(0))},t.prototype.downplay=function(){va(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var f=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,f)}else{var v=this.childAt(0);v.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};c?v.attr(h):ge(v,h,s,a),yn(v)}if(this._updateCommon(e,a,l,n,i),u){var v=this.childAt(0);if(!c){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Le(v,h,s,a)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,c,f,v,h,p,d,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,v=i.focus,h=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=m.getModel(["select","itemStyle"]).getItemStyle(),c=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),d=Ut(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var x=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var w=xo(e.getItemVisual(a,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var S=e.getItemVisual(a,"style"),A=S.fill;if(s instanceof Gt){var C=s.style;s.useStyle(B({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},S))}else s.__isEmptyBrush?s.useStyle(B({},S)):s.useStyle(S),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var T=e.getItemVisual(a,"liftZ"),M=this._z2;T!=null?M==null&&(this._z2=s.z2,s.z2+=T):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;Wt(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:A,defaultOpacity:S.opacity});function L(P){return D?e.getName(P):So(e,P)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var R=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*R,I.scaleY=this._sizeY*R,this.setSymbolScale(1),lr(this,v,h,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=j(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&gn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();gn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return pu(e.getItemVisual(a,"symbolSize"))},t})(re);function KS(r,t){this.parent.drift(r,t)}function $o(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function tf(r){return r!=null&&!Y(r)&&(r={isIgnore:r}),r||{}}function rf(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Ut(t),cursorStyle:t.get("cursor")}}var ug=(function(){function r(t){this.group=new re,this._SymbolCtor=t||du}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=tf(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=rf(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};i||a.removeAll(),t.diff(i).add(function(f){var v=c(f);if($o(t,v,f,e)){var h=new o(t,f,l,u);h.setPosition(v),t.setItemGraphicEl(f,h),a.add(h)}}).update(function(f,v){var h=i.getItemGraphicEl(v),p=c(f);if(!$o(t,p,f,e)){a.remove(h);return}var d=t.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==d)a.remove(h),h=new o(t,f,l,u),h.setPosition(p);else{h.updateData(t,f,l,u);var y={x:p[0],y:p[1]};s?h.attr(y):ge(h,y,n)}a.add(h),t.setItemGraphicEl(f,h)}).remove(function(f){var v=i.getItemGraphicEl(f);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,n){var i=t._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=rf(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=tf(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=a[0]:a[1]<0&&(e=a[1]),e}function fg(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}var hg=typeof Float32Array<"u",jS=hg?Float32Array:Array;function Ot(r){return O(r)?hg?new Float32Array(r):r:new jS(r)}function JS(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function QS(r,t,e,a,n,i,o,s){for(var l=JS(r,t),u=[],c=[],f=[],v=[],h=[],p=[],d=[],g=cg(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||d<0)break;if(Pr(y,m)){if(l){d+=i;continue}break}if(d===e)r[i>0?"moveTo":"lineTo"](y,m),f=y,v=m;else{var _=y-u,x=m-c;if(_*_+x*x<.5){d+=i;continue}if(o>0){for(var w=d+i,S=t[w*2],A=t[w*2+1];S===y&&A===m&&g=a||Pr(S,A))h=y,p=m;else{M=S-u,D=A-c;var R=y-u,P=S-y,z=m-c,U=A-m,k=void 0,N=void 0;if(s==="x"){k=Math.abs(R),N=Math.abs(P);var W=M>0?1:-1;h=y-W*k*o,p=m,L=y+W*N*o,I=m}else if(s==="y"){k=Math.abs(z),N=Math.abs(U);var K=D>0?1:-1;h=y,p=m-K*k*o,L=y,I=m+K*N*o}else k=Math.sqrt(R*R+z*z),N=Math.sqrt(P*P+U*U),T=N/(N+k),h=y-M*o*(1-T),p=m-D*o*(1-T),L=y+M*o*T,I=m+D*o*T,L=jt(L,Jt(S,y)),I=jt(I,Jt(A,m)),L=Jt(L,jt(S,y)),I=Jt(I,jt(A,m)),M=L-y,D=I-m,h=y-M*k/N,p=m-D*k/N,h=jt(h,Jt(u,y)),p=jt(p,Jt(c,m)),h=Jt(h,jt(u,y)),p=Jt(p,jt(c,m)),M=y-h,D=m-p,L=y+M*N/k,I=m+D*N/k}r.bezierCurveTo(f,v,h,p,y,m),f=L,v=I}else r.lineTo(y,m)}u=y,c=m,d+=i}return g}var vg=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),e1=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new vg},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Pr(n[o*2-2],n[o*2-1]);o--);for(;i=0){var x=u?(p-l)*_+l:(h-s)*_+s;return u?[e,x]:[x,e]}s=h,l=p;break;case o.C:h=i[f++],p=i[f++],d=i[f++],g=i[f++],y=i[f++],m=i[f++];var w=u?ac(s,h,d,y,e,c):ac(l,p,g,m,e,c);if(w>0)for(var S=0;S=0){var x=u?nc(l,p,g,m,A):nc(s,h,d,y,A);return u?[e,x]:[x,e]}}s=y,l=m;break}}},t})(Ie),t1=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(vg),r1=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new t1},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Pr(n[s*2-2],n[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function u1(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=t.getAxis(n),u=V(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var v=l1(u,n==="x"?e.getWidth():e.getHeight()),h=v.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[h-1].coord+p,y=g-d;if(y<.001)return"transparent";b(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:h?v[h-1].offset:.5,color:f[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:f[0]||"transparent"});var m=new Fl(0,0,0,0,v,!0);return m[n]=d,m[n+"2"]=g,m}}}function c1(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&f1(i,t))){var o=t.mapDimension(i.dim),s={};return b(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function f1(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function h1(r,t){return isNaN(r)||isNaN(t)}function v1(r){for(var t=r.length/2;t>0&&h1(r[t*2-2],r[t*2-1]);t--);return t-1}function cf(r,t){return[r[t*2],r[t*2+1]]}function p1(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function mg(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var N=p.getState("emphasis").style;N.lineWidth=+p.style.lineWidth+1}j(p).seriesIndex=e.seriesIndex,lr(p,z,U,k);var W=uf(e.get("smooth")),K=e.get("smoothMonotone");if(p.setShape({smooth:W,smoothMonotone:K,connectNulls:A}),d){var ee=s.getCalculationInfo("stackedOnSeries"),ce=0;d.useStyle(q(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),ee&&(ce=uf(ee.get("smooth"))),d.setShape({smooth:W,stackedOnSmooth:ce,smoothMonotone:K,connectNulls:A}),pa(d,e,"areaStyle"),j(d).seriesIndex=e.seriesIndex,lr(d,z,U,k)}var Se=this._changePolyState;s.eachItemGraphicEl(function(Ae){Ae&&(Ae.onHoverStateChange=Se)}),this._polyline.onHoverStateChange=Se,this._data=s,this._coordSys=i,this._stackedOnPoints=w,this._points=c,this._step=M,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,p),d&&this.packEventData(e,d))},t.prototype.packEventData=function(e,a){j(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=Er(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var v=e.get("zlevel")||0,h=e.get("z")||0;u=new du(o,s),u.x=c,u.y=f,u.setZ(v,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ne.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=Er(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ne.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;Zs(this._polyline,e),a&&Zs(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new e1({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new r1({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,c=u.get("animationDuration");$(c)&&(c=c(null));var f=u.get("animationDelay")||0,v=$(f)?f(null):f;e.eachItemGraphicEl(function(h,p){var d=h;if(d){var g=[h.x,h.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var x=n,w=a.pointToCoord(g);i?(y=x.startAngle,m=x.endAngle,_=-w[1]/180*Math.PI):(y=x.r0,m=x.r,_=w[0])}else{var S=n;i?(y=S.x,m=S.x+S.width,_=h.x):(y=S.y+S.height,m=S.y,_=h.y)}var A=m===y?0:(_-y)/(m-y);l&&(A=1-A);var C=$(f)?f(p):c*A+v,T=d.getSymbolPath(),M=T.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:C}),T.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(mg(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new oe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=v1(l);c>=0&&(Wt(s,Ut(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(f,v,h){return h!=null?lg(o,h):So(o,f)},enableTextSetter:!0},d1(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=n.getLayout("points"),v=n.hostModel,h=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,x=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?d:0)*(m?-1:1),S=(y?0:-d)*(m?-1:1),A=y?"x":"y",C=p1(f,x,A),T=C.range,M=T[1]-T[0],D=void 0;if(M>=1){if(M>1&&!h){var L=cf(f,T[0]);u.attr({x:L[0]+w,y:L[1]+S}),o&&(D=v.getRawValue(T[0]))}else{var L=c.getPointOn(x,A);L&&u.attr({x:L[0]+w,y:L[1]+S});var I=v.getRawValue(T[0]),R=v.getRawValue(T[1]);o&&(D=$p(n,p,I,R,C.t))}i.lastFrameIndex=T[0]}else{var P=e===1||i.lastFrameIndex>0?T[0]:0,L=cf(f,P);o&&(D=v.getRawValue(P)),u.attr({x:L[0]+w,y:L[1]+S})}if(o){var z=wa(u);typeof z.setLabelText=="function"&&z.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,v=QS(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),h=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(p=Qt(v.stackedOnCurrent,v.current,n,o,l),h=Qt(v.current,null,n,o,l),g=Qt(v.stackedOnNext,v.next,n,o,l),d=Qt(v.next,null,n,o,l)),lf(h,d)>3e3||c&&lf(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),c&&(c.stopAnimation(),c.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var y={shape:{points:d}};v.current!==h&&(y.shape.__points=v.next),u.stopAnimation(),ge(u,y,f),c&&(c.setShape({points:h,stackedOnPoints:p}),c.stopAnimation(),ge(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],_=v.status,x=0;x<_.length;x++){var w=_[x].cmd;if(w==="="){var S=e.getItemGraphicEl(_[x].idx1);S&&m.push({el:S,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var A=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=a.getDevicePixelRatio(),v=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/v);if(isFinite(h)&&h>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/h)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/h));var p=void 0;H(i)?p=y1[i]:$(i)&&(p=i),p&&t.setData(n.downSample(n.mapDimension(u.dim),1/h,p,m1))}}}}}function gL(r){r.registerChartView(g1),r.registerSeriesModel($S),r.registerLayout(mu("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_g("line"))}var _1="__ec_stack_";function xg(r){return r.get("stack")||_1+r.seriesIndex}function _u(r){return r.dim+r.index}function Sg(r,t){var e=[];return t.eachSeriesByType(r,function(a){Tg(a)&&e.push(a)}),e}function x1(r){var t={};b(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),v=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),p=f.getStore(),d=0,g=p.count();d0&&(i=i===null?s:Math.min(i,s))}e[a]=i}}return e}function bg(r){var t=x1(r),e=[];return b(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),v=Math.abs(f[1]-f[0]);s=u?c/v*u:c}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=X(a.get("barWidth"),s),d=X(a.get("barMaxWidth"),s),g=X(a.get("barMinWidth")||(Cg(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:_u(i),stackId:xg(a)})}),S1(e)}function S1(r){var t={};b(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var v=a.barMinWidth;v&&(l[u].minWidth=v);var h=a.barGap;h!=null&&(s.gap=h);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return b(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=De(i).length;s=Math.max(35-l*4,15)+"%"}var u=X(s,o),c=X(a.gap,1),f=a.remainedWidth,v=a.autoWidthCount,h=(f-u)/(v+(v-1)*c);h=Math.max(h,0),b(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var x=y.width;m&&(x=Math.min(x,m)),_&&(x=Math.max(x,_)),y.width=x,f-=x+c*x,v--}else{var x=h;m&&mx&&(x=_),x!==h&&(y.width=x,f-=x+c*x,v--)}}),h=(f-u)/(v+(v-1)*c),h=Math.max(h,0);var p=0,d;b(i,function(y,m){y.width||(y.width=h),d=y,p+=y.width*(1+c)}),d&&(p-=d.width*c);var g=-p/2;b(i,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),e}function b1(r,t,e){if(r&&t){var a=r[_u(t)];return a}}function wg(r,t){var e=Sg(r,t),a=bg(e);b(e,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=xg(n),u=a[_u(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Ag(r){return{seriesType:r,plan:gu(),reset:function(t){if(Tg(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),c=e.getCalculationInfo("stackResultDimension"),f=kr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),h=w1(n,i),p=Cg(t),d=t.get("barMinHeight")||0,g=c&&e.getDimensionIndex(c),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var w=_.count,S=p&&Ot(w*3),A=p&&l&&Ot(w*3),C=p&&Ot(w),T=a.master.getRect(),M=v?T.width:T.height,D,L=x.getStore(),I=0;(D=_.next())!=null;){var R=L.get(f?g:o,D),P=L.get(s,D),z=h,U=void 0;f&&(U=+R-L.get(o,D));var k=void 0,N=void 0,W=void 0,K=void 0;if(v){var ee=a.dataToPoint([R,P]);if(f){var ce=a.dataToPoint([U,P]);z=ce[0]}k=z,N=ee[1]+m,W=ee[0]-z,K=y,Math.abs(W)0?e:1:e))}var bn=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return vo(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(n)b(i.getAxes(),function(v,h){if(v.type==="category"&&a!=null){var p=v.getTicksCoords(),d=v.getTickModel().get("alignWithLabel"),g=o[h],y=a[h]==="x1"||a[h]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[h]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,x=1,w=0;wg){_=(S+m)/2;break}w===1&&(x=A-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[h]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t})($e);$e.registerClass(bn);var A1=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return vo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=fr(bn.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t})(bn),Wi="\0__throttleOriginMethod",ff="\0__throttleRate",hf="\0__throttleType";function xu(r,t,e){var a,n=0,i=0,o=null,s,l,u,c;t=t||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var h=[],p=0;p=0?f():o=setTimeout(f,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){c=h},v}function Fn(r,t,e,a){var n=r[t];if(n){var i=n[Wi]||n,o=n[hf],s=n[ff];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=xu(i,e,a==="debounce"),n[Wi]=i,n[hf]=a,n[ff]=e}return n}}function wn(r,t){var e=r[t];e&&e[Wi]&&(e.clear&&e.clear(),r[t]=e[Wi])}var T1=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),vf=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new T1},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,c=a.startAngle,f=a.endAngle,v=a.clockwise,h=Math.PI*2,p=v?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Vi(i,e,j(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Ne),pf={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=qo(t.x,r.x),s=jo(t.x+t.width,n),l=qo(t.y,r.y),u=jo(t.y+t.height,i),c=sn?s:o,t.y=f&&l>i?u:l,t.width=c?0:s-o,t.height=f?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=jo(t.r,r.r),i=qo(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},df={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new le({shape:B({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var c=u.shape,f=n?"height":"width";c[f]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?vf:Ft,c=new u({shape:a,z2:1});c.name="item";var f=Mg(n);if(c.calculateTextPosition=C1(f,{isRoundCap:u===vf}),i){var v=c.shape,h=n?"r":"endAngle",p={};v[h]=n?a.r0:a.startAngle,p[h]=a[h],(s?ge:Le)(c,{shape:p},i)}return c}};function L1(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function gf(r,t,e,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?ge:Le)(e,{shape:l},t,n,null);var c=t?r.baseAxis.model:null;(o?ge:Le)(e,{shape:u},c,n)}function yf(r,t){for(var e=0;e0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function E1(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Mg(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function _f(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=Qa(a.getModel("itemStyle"),c,!0);B(c,f),r.setShape(c)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var h=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=Ut(a);Wt(r,p,{labelFetcher:i,labelDataIndex:e,defaultText:So(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,M1(r,g==="outside"?h:g,Mg(o),a.get(["label","rotate"]))}ax(d,p,i.getRawValue(e),function(m){return lg(t,m)});var y=a.getModel(["emphasis"]);lr(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),pa(r,a),E1(n)&&(r.style.fill="none",r.style.stroke="none",b(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function k1(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var O1=(function(){function r(){}return r})(),xf=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new O1},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?e:null},30,!1);function N1(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function Dg(r,t,e){if(yu(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function B1(r,t,e){var a=r.type==="polar"?Ft:le;return new a({shape:Dg(t,e,r),silent:!0,z2:0})}function yL(r){r.registerChartView(I1),r.registerSeriesModel(A1),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ae(wg,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ag("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,_g("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}function Ig(r,t){function e(a,n){var i=[];return a.eachComponent({mainType:"series",subType:r,query:n},function(o){i.push(o.seriesIndex)}),i}b([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(a){t(a[0],function(n,i,o){n=B({},n),o.dispatchAction(B(n,{type:a[1],seriesIndex:e(i,n)}))})})}function $r(r,t,e,a,n){var i=r+t;e.isSilent(i)||a.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,c=0;cN?(K=P+C*N/2,ee=K):(K=P+M,ee=W-M),n.setItemLayout(k,{angle:N,startAngle:K,endAngle:ee,clockwise:x,cx:l,cy:u,r0:f,r:w?pe(U,A,[f,c]):c}),P=W}),In&&(n+=Ba);var h=Math.atan2(s,o);if(h<0&&(h+=Ba),h>=a&&h<=n||h+Ba>=a&&h+Ba<=n)return l[0]=c,l[1]=f,u-e;var p=e*Math.cos(a)+r,d=e*Math.sin(a)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Ui(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,c=e-r,f=a-t,v=Math.sqrt(c*c+f*f);c/=v,f/=v;var h=l*c+u*f,p=h/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*c,g=o[1]=t+p*f;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function kg(r,t,e,a,n,i,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(n,r),s),c=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-n)*(u-n)+(c-i)*(c-i))}var ct=[];function W1(r,t,e){var a=kg(t.x,t.y,t.width,t.height,r.x,r.y,ct);return e.set(ct[0],ct[1]),a}function U1(r,t,e){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,c=t.data,f=r.x,v=r.y,h=0;h0){t=t/180*Math.PI,vt.fromArray(r[0]),ue.fromArray(r[1]),_e.fromArray(r[2]),Te.sub(St,vt,ue),Te.sub(_t,_e,ue);var e=St.len(),a=_t.len();if(!(e<.001||a<.001)){St.scale(1/e),_t.scale(1/a);var n=St.dot(_t),i=Math.cos(t);if(i1&&Te.copy(Fe,_e),Fe.toArray(r[1])}}}}function Y1(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,vt.fromArray(r[0]),ue.fromArray(r[1]),_e.fromArray(r[2]),Te.sub(St,ue,vt),Te.sub(_t,_e,ue);var a=St.len(),n=_t.len();if(!(a<.001||n<.001)){St.scale(1/a),_t.scale(1/n);var i=St.dot(t),o=Math.cos(e);if(i=l)Te.copy(Fe,_e);else{Fe.scaleAndAdd(_t,s/Math.tan(Math.PI/2-c));var f=_e.x!==ue.x?(Fe.x-ue.x)/(_e.x-ue.x):(Fe.y-ue.y)/(_e.y-ue.y);if(isNaN(f))return;f<0?Te.copy(Fe,ue):f>1&&Te.copy(Fe,_e)}Fe.toArray(r[1])}}}}function Jo(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function Z1(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=ic(a[0],a[1]),i=ic(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,s=Po([],a[1],a[0],o/n),l=Po([],a[1],a[2],o/i),u=Po([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var c=1;c0){_(T*C,0,o);var M=T+S;M<0&&x(-M*C,1)}else x(-S*C,1)}}function _(S,A,C){S!==0&&(u=!0);for(var T=A;T0)for(var M=0;M0;M--){var R=C[M-1]*I;_(-R,M,o)}}}function w(S){var A=S<0?-1:1;S=Math.abs(S);for(var C=Math.ceil(S/(o-1)),T=0;T0?_(C,0,T+1):_(-C,o-T-1,o),S-=C,S<=0)return}return u}function X1(r,t,e,a){return zg(r,"x","width",t,e)}function Gg(r,t,e,a){return zg(r,"y","height",t,e)}function Fg(r){var t=[];r.sort(function(d,g){return g.priority-d.priority});var e=new me(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;ne?y:g,w=Math.abs(_.label.y-e);if(w>=x.maxY){var S=_.label.x-t-_.len2*n,A=a+_.len,C=Math.abs(S)r.unconstrainedWidth?null:h:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-f)/2}}}function Qo(r){return r.position==="center"}function q1(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*$1,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,v=s.height;function h(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var A in S.states)if(S.states[A].ignore===!1)return!0;return!1}t.each(function(S){var A=t.getItemGraphicEl(S),C=A.shape,T=A.getTextContent(),M=A.getTextGuideLine(),D=t.getItemModel(S),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),R=L.get("distanceToLabelLine"),P=L.get("alignTo"),z=X(L.get("edgeDistance"),u),U=L.get("bleedMargin"),k=D.getModel("labelLine"),N=k.get("length");N=X(N,u);var W=k.get("length2");if(W=X(W,u),Math.abs(C.endAngle-C.startAngle)0?"right":"left":ee>0?"left":"right"}var Xt=Math.PI,Lt=0,La=L.get("rotate");if(de(La))Lt=La*(Xt/180);else if(I==="center")Lt=0;else if(La==="radial"||La===!0){var s0=ee<0?-K+Xt:-K;Lt=s0}else if(La==="tangential"&&I!=="outside"&&I!=="outer"){var Wr=Math.atan2(ee,ce);Wr<0&&(Wr=Xt*2+Wr);var l0=ce>0;l0&&(Wr=Xt+Wr),Lt=Wr-Xt}if(i=!!Lt,T.x=Se,T.y=Ae,T.rotation=Lt,T.setStyle({verticalAlign:"middle"}),Zt){T.setStyle({align:Hr});var Lo=T.states.select;Lo&&(Lo.x+=T.x,Lo.y+=T.y)}else{var Pa=T.getBoundingRect().clone();Pa.applyTransform(T.getComputedTransform());var tc=(T.style.margin||0)+2.1;Pa.y-=tc/2,Pa.height+=tc,e.push({label:T,labelLine:M,position:I,len:N,len2:W,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new Te(ee,ce),linePoints:Yt,textAlign:Hr,labelDistance:R,labelAlignTo:P,edgeDistance:z,bleedMargin:U,rect:Pa,unconstrainedWidth:Pa.width,labelStyleWidth:T.style.width})}A.setTextConfig({inside:Zt})}}),!i&&r.get("avoidLabelOverlap")&&K1(e,a,n,l,u,v,c,f);for(var d=0;d0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=i.r0}},t.type="pie",t})(Ne);function Su(r,t,e){t=O(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=Nd(a,t).dimensions,i=new au(n,r);return i.initData(a,e),i}var Wg=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),Q1=ne(),eb=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Wg(G(this.getData,this),G(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Su(this,{coordDimensions:["value"],encodeDefaulter:ae(_d,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=Q1(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=o_(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Ni(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t})($e);function tb(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(de(o)&&!isNaN(o)&&o<0)})}}}function mL(r){r.registerChartView(J1),r.registerSeriesModel(eb),Ig("pie",r.registerAction),r.registerLayout(ae(z1,"pie")),r.registerProcessor(Eg("pie")),r.registerProcessor(tb("pie"))}var Ug="";typeof navigator<"u"&&(Ug=navigator.platform||"");var Kr="rgba(0, 0, 0, 0.2)";const rb={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Kr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Kr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Kr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Kr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Kr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Kr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Ug.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var sl=F();function ab(r,t){at(sl.get(r)==null&&t),sl.set(r,t)}function nb(r,t,e){var a=sl.get(t);if(!a)return e;var n=a(r);return n?e.concat(n):e}var ei,Va,Cf,Mf="\0_ec_inner",ib=1,bu=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new ve(i),this._locale=new ve(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=Lf(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,Lf(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?Cf(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&b(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=F(),u=a&&a.replaceMergeMainTypeMap;fx(this),b(e,function(f,v){f!=null&&(te.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?Z(f):J(n[v],f,!0))}),u&&u.each(function(f,v){te.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),te.topologicalTravel(s,te.getAllClassMainTypes(),c,this);function c(f){var v=nb(this,f,fe(e[f])),h=i.get(f),p=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",d=Yp(h,v,p);m_(d,f,te),n[f]=null,i.set(f,null),o.set(f,0);var g=[],y=[],m=0,_;b(d,function(x,w){var S=x.existing,A=x.newOption;if(!A)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var C=f==="series",T=te.getClass(f,x.keyInfo.subType,!C);if(!T)return;if(f==="tooltip"){if(_)return;_=!0}if(S&&S.constructor===T)S.name=x.keyInfo.name,S.mergeOption(A,this),S.optionUpdated(A,!1);else{var M=B({componentIndex:w},x.keyInfo);S=new T(A,this,this,M),B(S,M),x.brandNew&&(S.__requireNewView=!0),S.init(A,this,this),S.optionUpdated(null,!0)}}S?(g.push(S.option),y.push(S),m++):(g.push(void 0),y.push(void 0))},this),n[f]=g,i.set(f,y),o.set(f,m),f==="series"&&ei(this)}this._seriesIndices||ei(this)},t.prototype.getOption=function(){var e=Z(this.option);return b(e,function(a,n){if(te.hasClass(n)){for(var i=fe(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!dn(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[Mf],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function pb(r,t){return r.join(",")===t.join(",")}var st=b,An=Y,Pf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function es(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=Pf.length;e=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,h)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=s_(v,m),d=m;break}}}return a[0]=v,a[1]=d,a})})}var xe=(function(){function r(){this.group=new re,this.uid=Ta("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();Hl(xe);ao(xe);var Nf=ne(),Bf={itemStyle:fa(dd,!0),lineStyle:fa(pd,!0)},Ab={lineStyle:"stroke",itemStyle:"fill"};function $g(r,t){var e=r.visualStyleMapper||Bf[t];return e||(console.warn("Unknown style type '"+t+"'."),Bf.itemStyle)}function Kg(r,t){var e=r.visualDrawType||Ab[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var Tb={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=$g(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=Kg(r,a),u=o[l],c=$(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var v=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=v,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?v:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var d=r.getDataParams(p),g=B({},o);g[l]=c(d),h.setItemVisual(p,"style",g)}}}},Ga=new ve,Cb={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=$g(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Ga.option=l[a];var u=n(Ga),c=o.ensureUniqueItemVisual(s,"style");B(c,u),Ga.option.decal&&(o.setItemVisual(s,"decal",Ga.option.decal),Ga.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Mb={performRawSeries:!0,overallReset:function(r){var t=F();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),Nf(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),n={},i=e.getData(),o=Nf(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=Kg(e,s);i.each(function(u){var c=i.getRawIndex(u);n[c]=u}),a.each(function(u){var c=n[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var v=i.ensureUniqueItemVisual(c,"style"),h=a.getName(u)||u+"",p=a.count();v[l]=e.getColorFromPalette(h,o,p)}})}})}},ti=Math.PI;function Db(r,t){t=t||{},q(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new re,a=new le({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new oe({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new le({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Gl({shape:{startAngle:-ti/2,endAngle:-ti/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:ti*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ti*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var qg=(function(){function r(t,e,a,n){this._stageTaskMap=F(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&i>=a.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=F();t.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;b(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";at(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;b(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,v=c.overallTask;if(v){var h,p=v.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,a);var d=o.getPerformArgs(v,n.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(i=!0)}else f&&f.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.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)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=F(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,n).each(c);function c(f){var v=f.uid,h=s.set(v,o&&o.get(v)||ln({plan:Eb,reset:kb,count:Nb}));h.context={model:f,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(f,h)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||ln({reset:Ib});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=F(),u=t.seriesType,c=t.getTargetSeries,f=!0,v=!1,h="";at(!t.createOnAllSeries,h),u?a.eachRawSeriesByType(u,p):c?c(a,n).each(p):(f=!1,b(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,ln({reset:Lb,onDirty:Rb})));y.context={model:d,overallProgress:f},y.agent=o,y.__block=f,i._pipe(d,y)}v&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return $(t)&&(t={overallReset:t,seriesType:Bb(t)}),t.uid=Ta("stageHandler"),e&&(t.visualType=e),t},r})();function Ib(r){r.overallReset(r.ecModel,r.api,r.payload)}function Lb(r){return r.overallProgress&&Pb}function Pb(){this.agent.dirty(),this.getDownstream().dirty()}function Rb(){this.agent&&this.agent.dirty()}function Eb(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function kb(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=fe(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?V(t,function(e,a){return jg(a)}):Ob}var Ob=jg(0);function jg(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i0&&h===u.length-v.length){var p=u.slice(0,h);p!=="data"&&(e.mainType=p,e[v.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function c(f,v,h,p){return f[h]==null||v[p||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),ll=["symbol","symbolSize","symbolRotate","symbolOffset"],Ff=ll.concat(["symbolKeepAspect"]),Gb={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,a,n){if(!this[Re]){if(this._disposed){this.id;return}var i,o,s;if(Y(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[Re]=!0,!this._model||a){var l=new cb(this._api),u=this._theme,c=this._model=new bu;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},cl);var f={seriesTransition:s,optionChanged:!0};if(n)this[He]={silent:i,updateParams:f},this[Re]=!1,this.getZr().wakeUp();else{try{qr(this),er.update.call(this,null,f)}catch(v){throw this[He]=null,this[Re]=!1,v}this._ssr||this._zr.flush(),this[He]=null,this[Re]=!1,Fa.call(this,i),Ha.call(this,i)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ye.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(ye.svgSupported){var e=this._zr,a=e.storage.getDisplayList();return b(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;b(a,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return b(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(jf[n]){var l=s,u=s,c=-s,f=-s,v=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();b(cn,function(_,x){if(_.group===n){var w=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Z(e)),S=_.getDom().getBoundingClientRect();l=i(S.left,l),u=i(S.top,u),c=o(S.right,c),f=o(S.bottom,f),v.push({dom:w,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,f*=h;var p=c-l,d=f-u,g=Lp.createCanvas(),y=oc(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return b(v,function(_){var x=_.left-l,w=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new le({shape:{x:0,y:0,width:p,height:d},style:{fill:e.connectedBackgroundColor}})),b(v,function(_){var x=new Gt({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});y.add(x)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a){return os(this,"convertToPixel",e,a)},t.prototype.convertFromPixel=function(e,a){return os(this,"convertFromPixel",e,a)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=an(n,e);return b(o,function(s,l){l.indexOf("Models")>=0&&b(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(a);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=an(n,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?ty(s,l,a):ry(s,a)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;b(lw,function(a){var n=function(i){var o=e.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&Cr(s,function(p){var d=j(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=B({},d.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var v=c&&f!=null&&o.getComponent(c,f),h=v&&e[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=i,l.type=a,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:h},e.trigger(a,l)}};n.zrEventfulCallAtLast=!0,e._zr.on(a,n,e)}),b(un,function(a,n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),b(["selectchanged"],function(a){e._messageCenter.on(a,function(n){this.trigger(a,n)},e)}),V1(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&Xp(this.getDom(),Tu,"");var a=this,n=a._api,i=a._model;b(a._componentsViews,function(o){o.dispose(i,n)}),b(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete cn[a.id]},t.prototype.resize=function(e){if(!this[Re]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[He]&&(i==null&&(i=this[He].silent),n=!0,this[He]=null),this[Re]=!0;try{n&&qr(this),er.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Re]=!1,o}this[Re]=!1,Fa.call(this,i),Ha.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(Y(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!fl[e]){var n=fl[e](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=B({},e);return a.type=un[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(Y(a)||(a={silent:!!a}),!!$i[e.type]&&this._model){if(this[Re]){this._pendingActions.push(e);return}var n=a.silent;ls.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&ye.browser.weChat&&this._throttledZrFlush(),Fa.call(this,n),Ha.call(this,n)}},t.prototype.updateLabelLayout=function(){ut.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){qr=function(f){var v=f._scheduler;v.restorePipelines(f._model),v.prepareStageTasks(),is(f,!0),is(f,!1),v.plan()},is=function(f,v){for(var h=f._model,p=f._scheduler,d=v?f._componentsViews:f._chartsViews,g=v?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_v.get("hoverLayerThreshold")&&!ye.node&&!ye.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(f,v){var h=f.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function s(f,v){if(!f.preventAutoZ){var h=f.get("z")||0,p=f.get("zlevel")||0;v.eachRendered(function(d){return l(d,h,p,-1/0),!0})}}function l(f,v,h,p){var d=f.getTextContent(),g=f.getTextGuideLine(),y=f.isGroup;if(y)for(var m=f.childrenRef(),_=0;_0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(na(y))return;if(y instanceof Ie&&U_(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),x=y.getTextGuideLine();_&&(_.stateTransition=g),x&&(x.stateTransition=g)}y.__dirty&&n(y)}})}Kf=function(f){return new((function(v){E(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return f._model.getComponent(d.mainType,d.index);p=p.parent}},h.prototype.enterEmphasis=function(p,d){ha(p,d),Je(f)},h.prototype.leaveEmphasis=function(p,d){va(p,d),Je(f)},h.prototype.enterBlur=function(p){E_(p),Je(f)},h.prototype.leaveBlur=function(p){ed(p),Je(f)},h.prototype.enterSelect=function(p){td(p),Je(f)},h.prototype.leaveSelect=function(p){rd(p),Je(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},h})(Yg))(f)},dy=function(f){function v(h,p){for(var d=0;d=0)){Jf.push(e);var i=qg.wrapStageHandler(e,n);i.__prio=t,i.__raw=e,r.push(i)}}function Sy(r,t){fl[r]=t}function dw(r,t,e){var a=Xb("registerMap");a&&a(r,t,e)}var gw=xS;Gr(wu,Tb);Gr(bo,Cb);Gr(bo,Mb);Gr(wu,Gb);Gr(bo,Fb);Gr(uy,Yb);_y(Xg);xy(qb,bb);Sy("default",Db);Mt({type:Mr,event:Mr,update:Mr},bt);Mt({type:Si,event:Si,update:Si},bt);Mt({type:nn,event:nn,update:nn},bt);Mt({type:bi,event:bi,update:bi},bt);Mt({type:on,event:on,update:on},bt);my("light",Vb);my("dark",ey);var Qf=[],yw={registerPreprocessor:_y,registerProcessor:xy,registerPostInit:fw,registerPostUpdate:hw,registerUpdateLifecycle:Cu,registerAction:Mt,registerCoordinateSystem:vw,registerLayout:pw,registerVisual:Gr,registerTransform:gw,registerLoading:Sy,registerMap:dw,registerImpl:Zb,PRIORITY:iw,ComponentModel:te,ComponentView:xe,SeriesModel:$e,ChartView:Ne,registerComponentModel:function(r){te.registerClass(r)},registerComponentView:function(r){xe.registerClass(r)},registerSeriesModel:function(r){$e.registerClass(r)},registerChartView:function(r){Ne.registerClass(r)},registerSubTypeDefaulter:function(r,t){te.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){I0(r,t)}};function ze(r){if(O(r)){b(r,function(t){ze(t)});return}ie(Qf,r)>=0||(Qf.push(r),$(r)&&(r={install:r}),r.install(yw))}var mw=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return vo(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t})($e),by=4,_w=(function(){function r(){}return r})(),xw=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new _w},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var c=u*2,f=i[c]-s/2,v=i[c+1]-l/2;if(e>=f&&a>=v&&e<=f+s&&a<=v+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,v=0;v=0&&(u.dataIndex=f+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),bw=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=mu("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new Sw:new ug,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Ne),ww=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t})(te),wo=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),hl=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Me).models[0]},t.type="cartesian2dAxis",t})(te);je(hl,wo);var wy={show:!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:"#6E7079",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,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Aw=J({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},wy),Du=J({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},wy),Tw=J({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Du),Cw=q({logBase:10},Du);const Ay={category:Aw,value:Du,time:Tw,log:Cw};var Mw=0,vl=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Mw}return r.createByAxisModel=function(t){var e=t.option,a=e.data,n=a&&V(a,Dw);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!H(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=F(this.categories))},r})();function Dw(r){return Y(r)&&r.value!=null?r.value:r+""}var Iw={value:1,category:1,time:1,log:1};function Cn(r,t,e,a){b(Iw,function(n,i){var o=J(J({},Ay[i],!0),a,!0),s=(function(l){E(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var v=Sn(this),h=v?Ca(c):{},p=f.getTheme();J(c,p.get(i+"Axis")),J(c,this.getDefaultOption()),c.type=eh(c),v&&ur(c,h,v)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=vl.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",eh)}function eh(r){return r.type||(r.data?"category":"value")}var Dt=(function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();ao(Dt);function pl(r){return r.type==="interval"||r.type==="log"}function Lw(r,t,e,a){var n={},i=r[1]-r[0],o=n.interval=zp(i/t);e!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=Ty(o),l=n.niceTickExtent=[we(Math.ceil(r[0]/o)*o,s),we(Math.floor(r[1]/o)*o,s)];return Pw(l,r),n}function cs(r){var t=Math.pow(10,Wl(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,we(e*t)}function Ty(r){return kt(r)+2}function th(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function Pw(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),th(r,0,t),th(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Ao(r,t){return r>=t[0]&&r<=t[1]}function To(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Co(r,t){return r*(t[1]-t[0])+t[0]}var Mo=(function(r){E(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new vl({})),O(n)&&(n=new vl({categories:V(n,function(i){return Y(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:H(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Ao(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),To(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Co(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],a=this._extent,n=a[0];n<=a[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(Dt);Dt.registerClass(Mo);var mr=we,Vt=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Ao(e,this._extent)},t.prototype.normalize=function(e){return To(e,this._extent)},t.prototype.scale=function(e){return Co(e,this._extent)},t.prototype.setExtent=function(e,a){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(a)||(n[1]=parseFloat(a))},t.prototype.unionExtent=function(e){var a=this._extent;e[0]a[1]&&(a[1]=e[1]),this.setExtent(a[0],a[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ty(e)},t.prototype.getTicks=function(e){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var c=s.length?s[s.length-1].value:i[1];return n[1]>c&&(e?s.push({value:mr(c+a,o)}):s.push({value:n[1]})),s},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&h>>1;r[n][1]n&&(this._approxInterval=n);var s=ii.length,l=Math.min(Rw(ii,this._approxInterval,0,s),s-1);this._interval=ii[l][1],this._minLevelUnit=ii[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return de(e)?e:+wt(e)},t.prototype.contain=function(e){return Ao(this.parse(e),this._extent)},t.prototype.normalize=function(e){return To(this.parse(e),this._extent)},t.prototype.scale=function(e){return Co(e,this._extent)},t.type="time",t})(Vt),ii=[["second",su],["minute",lu],["hour",sn],["quarter-day",sn*6],["half-day",sn*12],["day",rt*1.2],["half-week",rt*3.5],["week",rt*7],["month",rt*31],["quarter",rt*95],["half-year",Hc/2],["year",Hc]];function Ew(r,t,e,a){var n=wt(t),i=wt(e),o=function(p){return Uc(n,p,a)===Uc(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},v=function(){return f()&&o("second")},h=function(){return v()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return v();case"millisecond":return h()}}function kw(r,t){return r/=rt,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Ow(r){var t=30*rt;return r/=t,r>6?6:r>3?3:r>2?2:1}function Nw(r){return r/=sn,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function rh(r,t){return r/=t?lu:su,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Bw(r){return zp(r)}function Vw(r,t,e){var a=new Date(r);switch(oa(t)){case"year":case"month":a[Fd(e)](0);case"day":a[Hd(e)](1);case"hour":a[Wd(e)](0);case"minute":a[Ud(e)](0);case"second":a[Yd(e)](0),a[Zd(e)](0)}return a.getTime()}function zw(r,t,e,a){var n=1e4,i=zd,o=0;function s(M,D,L,I,R,P,z){for(var U=new Date(D),k=D,N=U[I]();k1&&P===0&&L.unshift({value:L[0].value-k})}}for(var P=0;P=a[0]&&m<=a[1]&&f++)}var _=(a[1]-a[0])/t;if(f>_*1.5&&v>_/1.5||(u.push(g),f>_||r===i[h]))break}c=[]}}}for(var x=he(V(u,function(M){return he(M,function(D){return D.value>=a[0]&&D.value<=a[1]&&!D.notAdd})}),function(M){return M.length>0}),w=[],S=x.length-1,h=0;h0;)i*=10;var s=[we(Hw(a[0]/i)*i),we(Fw(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){fn.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=lt(e)/lt(this.base),Ao(e,this._extent)},t.prototype.normalize=function(e){return e=lt(e)/lt(this.base),To(e,this._extent)},t.prototype.scale=function(e){return e=Co(e,this._extent),oi(this.base,e)},t.type="log",t})(Dt),Cy=Lu.prototype;Cy.getMinorTicks=fn.getMinorTicks;Cy.getLabel=fn.getLabel;function si(r,t){return Gw(r,kt(t))}Dt.registerClass(Lu);var Ww=(function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(t,e){this[Yw[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=Uw[t];this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),Uw={min:"_determinedMin",max:"_determinedMax"},Yw={min:"_dataMin",max:"_dataMax"};function My(r,t,e){var a=r.rawExtentInfo;return a||(a=new Ww(r,t,e),r.rawExtentInfo=a,a)}function li(r,t){return t==null?null:Us(t)?NaN:r.parse(t)}function Dy(r,t){var e=r.type,a=My(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&e==="time"){var s=Sg("bar",o),l=!1;if(b(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=bg(s),c=Zw(n,i,t,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function Zw(r,t,e,a){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=b1(a,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;b(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;b(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-r,f=1-(s+l)/i,v=c/f-c;return t+=v*(l/u),r-=v*(s/u),{min:r,max:t}}function Mn(r,t){var e=t,a=Dy(r,e),n=a.extent,i=e.get("splitNumber");r instanceof Lu&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Pu(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Mo({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Iu({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Dt.getClass(t)||Vt)}}function Xw(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function Ma(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?(function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}})(t):H(t)?(function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i??"");return o}})(t):$(t)?(function(a){return function(n,i){return e!=null&&(i=n.value-e),a(Ru(r,n),i,n.level!=null?{level:n.level}:null)}})(t):function(a){return r.scale.getLabel(a)}}function Ru(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function $w(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var a,n,i=e.getExtent();e instanceof Mo?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=Ma(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;cr[1]&&(r[1]=n[1])})}var jw=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return V(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),he(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),dl=["x","y"];function nh(r){return r.type==="interval"||r.type==="time"}var Jw=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=dl,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!nh(e)||!nh(a))){var n=e.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,v=o[0]-n[0]*c,h=o[1]-i[0]*f,p=this._transform=[c,0,0,f,v,h];this._invTransform=kn([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new me(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return nt(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},t.prototype.pointToData=function(e,a){var n=[];if(this._invTransform)return nt(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new me(i,o,s,l)},t})(jw),Dn=ne();function Ly(r,t){var e=V(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function Qw(r){var t=r.getLabelModel().get("customValues");if(t){var e=Ma(r),a=r.scale.getExtent(),n=Ly(r,t),i=he(n,function(o){return o>=a[0]&&o<=a[1]});return{labels:V(i,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?tA(r):aA(r)}function eA(r,t){var e=r.getTickModel().get("customValues");if(e){var a=r.scale.getExtent(),n=Ly(r,e);return{ticks:he(n,function(i){return i>=a[0]&&i<=a[1]})}}return r.type==="category"?rA(r,t):{ticks:V(r.scale.getTicks(),function(i){return i.value})}}function tA(r){var t=r.getLabelModel(),e=Py(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function Py(r,t){var e=Ry(r,"labels"),a=Eu(t),n=Ey(e,a);if(n)return n;var i,o;return $(a)?i=Ny(r,a):(o=a==="auto"?nA(r):a,i=Oy(r,o)),ky(e,a,{labels:i,labelCategoryInterval:o})}function rA(r,t){var e=Ry(r,"ticks"),a=Eu(t),n=Ey(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),$(a))i=Ny(r,a,!0);else if(a==="auto"){var s=Py(r,r.getLabelModel());o=s.labelCategoryInterval,i=V(s.labels,function(l){return l.tickValue})}else o=a,i=Oy(r,o,!0);return ky(e,a,{ticks:i,tickCategoryInterval:o})}function aA(r){var t=r.scale.getTicks(),e=Ma(r);return{labels:V(t,function(a,n){return{level:a.level,formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function Ry(r,t){return Dn(r)[t]||(Dn(r)[t]=[])}function Ey(r,t){for(var e=0;e40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(a)),f=Math.abs(u*Math.sin(a)),v=0,h=0;l<=i[1];l+=s){var p=0,d=0,g=ro(e({value:l}),t.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),h=Math.max(h,d,7)}var y=v/c,m=h/f;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),x=Dn(r.model),w=r.getExtent(),S=x.lastAutoInterval,A=x.lastTickCount;return S!=null&&A!=null&&Math.abs(S-_)<=1&&Math.abs(A-o)<=1&&S>_&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=w[0],x.axisExtent1=w[1]),_}function oA(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Oy(r,t,e){var a=Ma(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Iy(r),v=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;v&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);h&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(e?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function Ny(r,t,e){var a=r.scale,n=Ma(r),i=[];return b(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var ih=[0,1],It=(function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Bp(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&n.type==="ordinal"&&(a=a.slice(),oh(a,n.count())),pe(t,ih,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),oh(a,n.count()));var i=pe(t,a,ih,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=eA(this,e),n=a.ticks,i=V(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return sA(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=V(a,function(i){return V(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return Qw(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return iA(this)},r})();function oh(r,t){var e=r[1]-r[0],a=t,n=e/a/2;r[0]+=n,r[1]-=n}function sA(r,t,e,a){var n=t.length;if(!r.onBand||e||!n)return;var i=r.getExtent(),o,s;if(n===1)t[0].coord=i[0],o=t[1]={coord:i[1],tickValue:t[0].tickValue};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;b(t,function(h){h.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:c[1]+1},t.push(o)}var f=i[0]>i[1];v(t[0].coord,i[0])&&(a?t[0].coord=i[0]:t.shift()),a&&v(i[0],t[0].coord)&&t.unshift({coord:i[0]}),v(i[1],o.coord)&&(a?o.coord=i[1]:t.pop()),a&&v(o.coord,i[1])&&t.push({coord:i[1]});function v(h,p){return h=we(h),p=we(p),f?h>p:ha[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(It);function gl(r,t,e){e=e||{};var a=r.coordinateSystem,n=t.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,c=a.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],v={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,p=u==="x"?[f[2]-h,f[3]+h]:[f[0]-h,f[1]+h];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[v[l]]:f[0],u==="x"?p[v[l]]:f[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[v[s]]-p[v.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),or(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function sh(r){return r.get("coordinateSystem")==="cartesian2d"}function lh(r){var t={xAxisModel:null,yAxisModel:null};return b(t,function(e,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,Me).models[0];t[a]=i}),t}var fs=Math.log;function By(r,t,e){var a=Vt.prototype,n=a.getTicks.call(e),i=a.getTicks.call(e,!0),o=n.length-1,s=a.getInterval.call(e),l=Dy(r,t),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var v=fs(r.base);u=[fs(u[0])/v,fs(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=a.getExtent.call(r);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(c&&f)p=(g-d)/o;else if(c)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=cs(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=cs(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=we(g-m),d<0&&u[0]>=0?(d=0,g=we(m)):g>0&&u[1]<=0&&(g=0,d=-we(m))}var _=(n[0].value-i[0].value)/s,x=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*_,g+p*x),a.setInterval.call(r,p),(_||x)&&a.setNiceExtent.call(r,d+p,g-p)}var uA=(function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dl,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=De(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var v=+l[f],h=o[v],p=h.model,d=h.scale;pl(d)&&p.get("alignTicks")&&p.get("interval")==null?c.push(h):(Mn(d,p),pl(d)&&(s=h))}c.length&&(s||(s=c.pop(),Mn(s.scale,s.model)),b(c,function(g){By(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};b(a.x,function(o){uh(a,"y",o,i)}),b(a.y,function(o){uh(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=t.getBoxLayoutParams(),i=!a&&t.get("containLabel"),o=Xe(n,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(b(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=$w(u);if(c){var f=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+v,u.position==="top"?o.y+=c.height+v:u.position==="left"&&(o.x+=c.width+v)}}}),l()),b(this._coordsList,function(u){u.calcAffineTransform()});function l(){b(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(f[v],f[1-v]),cA(u,c?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):ki(n-ar)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),fh={axisLine:function(r,t,e,a){var n=t.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=t.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(nt(s,s,o),nt(l,l,o));var c=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new Ke({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});mn(f.shape,f.style.lineWidth),f.anid="line",e.add(f);var v=t.get(["axisLine","symbol"]);if(v!=null){var h=t.get(["axisLine","symbolSize"]);H(v)&&(v=[v,v]),(H(h)||de(h))&&(h=[h,h]);var p=xo(t.get(["axisLine","symbolOffset"])||0,h),d=h[0],g=h[1];b([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(v[m]!=="none"&&v[m]!=null){var _=Ve(v[m],-d/2,-g/2,d,g,c.stroke,!0),x=y.r+y.offset,w=u?l:s;_.attr({rotation:y.rotate,x:w[0]+x*Math.cos(r.rotation),y:w[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,a){var n=vA(e,a,t,r),i=dA(e,a,t,r);if(hA(t,i,n),pA(e,a,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Vg(V(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Fg(o)}},axisName:function(r,t,e,a){var n=or(r.axisName,t.get("name"));if(n){var i=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,vh(i)?r.labelOffset+o*l:0],v,h=t.get("nameRotate");h!=null&&(h=h*ar/180);var p;vh(i)?v=Ye.innerTextLayout(r.rotation,h??r.rotation,o):(v=fA(r.rotation,i,h||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=t.get("nameTruncate",!0)||{},y=g.ellipsis,m=or(r.nameTruncateMaxWidth,g.maxWidth,p),_=new oe({x:f[0],y:f[1],rotation:v.rotation,silent:Ye.isLabelSilent(t),style:Ce(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(zr({el:_,componentModel:t,itemName:n}),_.__fullText=n,_.anid="name",t.get("triggerEvent")){var x=Ye.makeAxisEventDataBase(t);x.targetType="axisName",x.name=n,j(_).eventData=x}a.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function fA(r,t,e,a){var n=Vp(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return ki(n-ar/2)?(o=l?"bottom":"top",i="center"):ki(n-ar*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nar/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function hA(r,t,e){if(!Iy(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var i=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],c=e[1],f=e[e.length-1],v=e[e.length-2];a===!1?(Qe(i),Qe(u)):hh(i,o)&&(a?(Qe(o),Qe(c)):(Qe(i),Qe(u))),n===!1?(Qe(s),Qe(f)):hh(l,s)&&(n?(Qe(l),Qe(v)):(Qe(s),Qe(f)))}}function Qe(r){r&&(r.ignore=!0)}function hh(r,t){var e=r&&r.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(!(!e||!a)){var n=zl([]);return Nn(n,n,-r.rotation),e.applyTransform(Ri([],n,r.getLocalTransform())),a.applyTransform(Ri([],n,t.getLocalTransform())),e.intersect(a)}}function vh(r){return r==="middle"||r==="center"}function Vy(r,t,e,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===t}function SA(r){var t=ku(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=yl(e);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=q({color:p.color},l));var g=J(Z(p),{boundaryGap:e,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:d,triggerEvent:v},!1);if(H(c)){var y=g.name;g.name=c.replace("{value}",y??"")}else $(c)&&(g.name=c(g.name,g));var m=new ve(g,null,this.ecModel);return je(m,wo.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:J({lineStyle:{color:"#bbb"}},Wa.axisLine),axisLabel:ui(Wa.axisLabel,!1),axisTick:ui(Wa.axisTick,!1),splitLine:ui(Wa.splitLine,!0),splitArea:ui(Wa.splitArea,!0),indicator:[]},t})(te),OA=["axisLine","axisTickLabel","axisName"],NA=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes(),i=V(n,function(o){var s=o.model.get("showName")?o.name:"",l=new Ye(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});b(i,function(o){b(OA,o.add,o),this.group.add(o.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),v=l.get("color"),h=u.get("color"),p=O(v)?v:[v],d=O(h)?h:[h],g=[],y=[];function m(P,z,U){var k=U%z.length;return P[k]=P[k]||[],k}if(i==="circle")for(var _=n[0].getTicksCoords(),x=a.cx,w=a.cy,S=0;S<_.length;S++){if(c){var A=m(g,p,S);g[A].push(new Vr({shape:{cx:x,cy:w,r:_[S].coord}}))}if(f&&S<_.length-1){var A=m(y,d,S);y[A].push(new to({shape:{cx:x,cy:w,r0:_[S].coord,r:_[S+1].coord}}))}}else for(var C,T=V(n,function(P,z){var U=P.getTicksCoords();return C=C==null?U.length-1:Math.min(U.length-1,C),V(U,function(k){return a.coordToPoint(k.coord,z)})}),M=[],S=0;S<=C;S++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;ps(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var f=Math.abs(i),v=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);ps(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!_h(this._zr,"globalPan")){var a=e.pinchScale>1?1.1:1/1.1;ps(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t})(_a);function ps(r,t,e,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(sr(a.event),Wy(r,t,e,a,n))}function Wy(r,t,e,a,n){n.isAvailableBehavior=G(Di,null,e,a),r.trigger(t,n)}function Di(r,t,e){var a=e[r];return!r||a&&(!H(a)||t.event[a+"Key"])}function HA(r,t,e){var a=r.target;a.x+=t,a.y+=e,a.dirty()}function WA(r,t,e,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=t,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(e-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var UA={axisPointer:1,tooltip:1,brush:1};function Uy(r,t,e){var a=t.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==e&&!UA.hasOwnProperty(a.mainType)&&n&&n.model!==e}var YA=[];function ds(r,t){for(var e=0;en&&(a=o,n=l)}if(a)return ZA(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return b(o,function(s){s.type==="polygon"?xh(s.exterior,n,i,e):b(s.points,function(l){xh(l,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new me(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(e[0],e[1]))return!1;e:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/e,l/e])}return a}function QA(r,t){return r=JA(r),V(he(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,n=e.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Sh(o[0],o.slice(1)));break;case"MultiPolygon":b(n.coordinates,function(l){l[0]&&i.push(new Sh(l[0],l.slice(1)))});break;case"LineString":i.push(new bh([n.coordinates]));break;case"MultiLineString":i.push(new bh(n.coordinates))}var s=new Zy(a[t||"name"],i,a.cp);return s.properties=a,s})}var _l=[126,25],wh="南海诸岛",xr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var _r=0;_r0,g={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,a),this._updateMapSelectHandler(t,u,a,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=F(),a=F(),n=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(h,p){return p&&(h=p(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function f(h){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Wt(t,Ut(a),{labelFetcher:v,labelDataIndex:f,defaultText:e},h);var p=t.getTextContent();if(p&&($y(p).ignore=p.ignore,t.textConfig&&o)){var d=t.getBoundingRect().clone();t.textConfig.layoutRect=d,t.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Mh(r,t,e,a,n,i){r.data?r.data.setItemGraphicEl(i,t):j(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:a&&a.option||{}}}function Dh(r,t,e,a,n){r.data||zr({el:t,componentModel:n,itemName:e,itemTooltipOption:a.get("tooltip")})}function Ih(r,t,e,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return lr(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&H_(t,n,e),o}function Lh(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),b(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t})($e);function pT(r,t){var e={};return b(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=e[i].length,c=0;c1?(x.width=_,x.height=_/g):(x.height=_,x.width=_*g),x.y=m[1]-x.height/2,x.x=m[0]-x.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,x=Xe(w,{width:p,height:d})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),t),this.setZoom(r.get("zoom"))}function mT(r,t){b(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var _T=(function(){function r(){this.dimensions=jy}return r.prototype.create=function(t,e){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new xl(l+s,l,B({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=kh,u.resize(o,e)}),t.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),b(i,function(o,s){var l=V(o,function(c){return c.get("nameMap")}),u=new xl(s,s,B({nameMap:N0(l)},n(o[0])));u.zoomLimit=or.apply(null,V(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=kh,u.resize(o[0],e),b(o,function(c){c.coordinateSystem=u,mT(u,c)})}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=F(),s=0;s=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function ys(r,t){var e=r.visual,a=[];Y(e)?Ln(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),Qy(r,a)}function fi(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:Sl([0,1])}}function Nh(r){var t=this.option.visual;return t[Math.round(pe(r,[0,1],[0,t.length-1],!0))]||{}}function Ya(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function tn(r){var t=this.option.visual;return t[this.option.loop&&r!==ji?r%t.length:r]}function Sr(){return this.option.visual[0]}function Sl(r){return{linear:function(t){return pe(t,r,this.option.visual,!0)},category:tn,piecewise:function(t,e){var a=bl.call(this,e);return a==null&&(a=pe(t,r,this.option.visual,!0)),a},fixed:Sr}}function bl(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=Be.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function Qy(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=V(t,function(e){var a=Ep(e);return a||[0,0,0,1]})),t}var DT={linear:function(r){return pe(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Be.findPieceIndex(r,t,!0);if(e!=null)return pe(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??ji},fixed:bt};function hi(r,t,e){return r?t<=e:tRT)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!ms(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function ms(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var OT=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&J(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){b(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=he(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);b(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(te),NT=(function(r){E(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(It);function Fr(r,t,e,a,n,i){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Jr(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=Jr(s,[0,o]),n=i=Jr(s,[n,i]),a=0}t[0]=Jr(t[0],e),t[1]=Jr(t[1],e);var l=_s(t,a);t[a]+=r;var u=n||0,c=e.slice();l.sign<0?c[0]+=u:c[1]-=u,t[a]=Jr(t[a],c);var f;return f=_s(t,a),n!=null&&(f.sign!==l.sign||f.spani&&(t[1-a]=t[a]+f.sign*i),t}function _s(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Jr(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var xs=b,em=Math.min,tm=Math.max,Bh=Math.floor,BT=Math.ceil,Vh=we,VT=Math.PI,zT=(function(){function r(t,e,a){this.type="parallel",this._axesMap=F(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;xs(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(o,new NT(o,Pu(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();xs(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Mn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){this._rect=Xe(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,c=vi(t.get("axisExpandWidth"),l),f=vi(t.get("axisExpandCount")||0,[0,u]),v=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=t.get("axisExpandWindow"),p;if(h)p=vi(h[1]-h[0],l),h[1]=h[0]+p;else{p=vi(c*(f-1),l);var d=t.get("axisExpandCenter")||Bh(u/2);h=[c*d-p/2],h[1]=h[0]+p}var g=(s-p)/(u-f);g<3&&(g=0);var y=[Bh(Vh(h[0]/c,1))+1,BT(Vh(h[1]/c,1))-1],m=g/c*h[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:v,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),xs(a,function(o,s){var l=(n.axisExpandable?FT:GT)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:VT/2,vertical:0},f=[u[i].x+t.x,u[i].y+t.y],v=c[i],h=Bn();Nn(h,h,v),vn(h,h,f),this._axesLayout[o]={position:f,rotation:v,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];b(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=a;ci*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=e.axisExpandWidth/c,l?Fr(l,n,o,"all"):u="none";else{var h=n[1]-n[0],p=o[1]*s/h;n=[tm(0,p-h/2)],n[1]=em(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},r})();function vi(r,t){return em(tm(r,t[0]),t[1])}function GT(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function FT(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,c;return r=0;n--)Et(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;iZT}function lm(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function um(r,t,e,a){var n=new re;return n.add(new le({name:"main",style:Gu(e),silent:!0,draggable:!0,cursor:"move",drift:ae(Fh,r,t,n,["n","s","w","e"]),ondragend:ae(Br,t,{isEnd:!0})})),b(a,function(i){n.add(new le({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ae(Fh,r,t,n,i),ondragend:ae(Br,t,{isEnd:!0})}))}),n}function cm(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=ga(n,XT),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,c=e[0][1],f=e[1][1],v=c-i+n/2,h=f-i+n/2,p=c-o,d=f-s,g=p+n,y=d+n;Rt(r,t,"main",o,s,p,d),a.transformable&&(Rt(r,t,"w",l,u,i,y),Rt(r,t,"e",v,u,i,y),Rt(r,t,"n",l,u,g,i),Rt(r,t,"s",l,h,g,i),Rt(r,t,"nw",l,u,i,i),Rt(r,t,"ne",v,u,i,i),Rt(r,t,"sw",l,h,i,i),Rt(r,t,"se",v,h,i,i))}function Tl(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(Gu(e)),n.attr({silent:!a,cursor:a?"move":"default"}),b([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?Cl(r,i[0]):QT(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?KT[s]+"-resize":null})})}function Rt(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(tC(Fu(r,t,[[a,n],[a+i,n+o]])))}function Gu(r){return q({strokeNoScale:!0},r.brushStyle)}function fm(r,t,e,a){var n=[Pn(r,e),Pn(t,a)],i=[ga(r,e),ga(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function JT(r){return Ir(r.group)}function Cl(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=so(e[t],JT(r));return a[n]}function QT(r,t){var e=[Cl(r,t[0]),Cl(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Fh(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=hm(t,n,i);b(a,function(u){var c=$T[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(fm(s[0][0],s[1][0],s[0][1],s[1][1])),Bu(t,e),Br(t,{isEnd:!1})}function eC(r,t,e,a){var n=t.__brushOption.range,i=hm(r,e,a);b(n,function(o){o[0]+=i[0],o[1]+=i[1]}),Bu(r,t),Br(r,{isEnd:!1})}function hm(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Fu(r,t,e){var a=sm(r,t);return a&&a!==Nr?a.clipPath(e,r._transform):Z(e)}function tC(r){var t=Pn(r[0][0],r[1][0]),e=Pn(r[0][1],r[1][1]),a=ga(r[0][0],r[1][0]),n=ga(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function rC(r,t,e){if(!(!r._brushType||nC(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=zu(r,t,e);if(!r._dragging)for(var o=0;oa.getWidth()||e<0||e>a.getHeight()}var Do={lineX:Uh(0),lineY:Uh(1),rect:{createCover:function(r,t){function e(a){return a}return um({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=lm(r);return fm(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){cm(r,t,e,a)},updateCommon:Tl,contain:Dl},polygon:{createCover:function(r,t){var e=new re;return e.add(new Tt({name:"main",style:Gu(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new cr({name:"main",draggable:!0,drift:ae(eC,r,t),ondragend:ae(Br,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:Fu(r,t,e)})},updateCommon:Tl,contain:Dl}};function Uh(r){return{createCover:function(t,e){return um({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=lm(t),a=Pn(e[0][r],e[1][r]),n=ga(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=sm(t,e);if(o!==Nr&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),cm(t,e,l,n)},updateCommon:Tl,contain:Dl}}function pm(r){return r=Hu(r),function(t){return cd(t,r)}}function dm(r,t){return r=Hu(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function gm(r,t,e){var a=Hu(r);return function(n,i){return a.contain(i[0],i[1])&&!Uy(n,t,e)}}function Hu(r){return me.create(r)}var iC=["axisLine","axisTickLabel","axisName"],oC=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new rm(a.getZr())).on("brush",G(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!sC(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new re,this.group.add(this._axisGroup),!!e.get("show")){var s=uC(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),c=u.width,f=e.axis.dim,v=l.getAxisLayout(f),h=B({strokeContainThreshold:c},v),p=new Ye(e,h);b(iC,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(h,u,e,s,c,n),lo(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=me.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:pm(f),isTargetByCursor:gm(f,s,i),getLinearBrushOtherExtent:dm(f,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(lC(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=V(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(xe);function sC(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function lC(r){var t=r.axis;return V(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function uC(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var cC={type:"axisAreaSelect",event:"axisAreaSelected"};function fC(r){r.registerAction(cC,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var hC={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function wL(r){r.registerComponentView(ET),r.registerComponentModel(OT),r.registerCoordinateSystem("parallel",WT),r.registerPreprocessor(IT),r.registerComponentModel(wl),r.registerComponentView(oC),Cn(r,"parallel",wl,hC),fC(r)}var vC=["itemStyle","borderWidth"],Yh=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Ss=new Vr,pC=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:Yh[+c],categoryDim:Yh[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=Xh(o,p),g=Zh(o,p,d,v),y=$h(o,v,g);o.setItemGraphicEl(p,y),i.add(y),qh(y,v,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=Xh(o,p),m=Zh(o,p,y,v),_=bm(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?SC(g,v,m):g=$h(o,v,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),qh(g,v,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&Kh(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var h=e.get("clip",!0)?yg(e.coordinateSystem,!1,e):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){Kh(i,j(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t})(Ne);function Zh(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=e.get("symbolPatternSize")||2,f=e.isAnimationEnabled(),v={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?e:null,hoverScale:f&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};dC(e,i,n,a,v),gC(r,t,n,i,o,v.boundingLength,v.pxSign,c,a,v),yC(e,v.symbolScale,u,a,v);var h=v.symbolSize,p=xo(e.get("symbolOffset"),h);return mC(e,h,n,i,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function dC(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),c;if(O(o)){var f=[bs(s,o[0])-l,bs(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function bs(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function gC(r,t,e,a,n,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,v=Math.abs(e[f.wh]),h=r.getItemVisual(t,"symbolSize"),p;O(h)?p=h.slice():h==null?p=["100%","100%"]:p=[h,h],p[f.index]=X(p[f.index],v),p[c.index]=X(p[c.index],a?v:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[c.index]*=(l.isHorizontal?-1:1)*o}function yC(r,t,e,a,n){var i=r.get(vC)||0;i&&(Ss.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Ss.updateTransform(),i/=Ss.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function mC(r,t,e,a,n,i,o,s,l,u,c,f){var v=c.categoryDim,h=c.valueDim,p=f.pxSign,d=Math.max(t[h.index]+s,0),g=d;if(a){var y=Math.abs(l),m=or(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=X(m,t[h.index]),w=Math.max(d+x*2,0),S=_?0:x*2,A=Gp(a),C=A?a:jh((y+S)/w),T=y-C*d;x=T/2/(_?C:Math.max(C-1,1)),w=d+x*2,S=_?0:x*2,!A&&a!=="fixed"&&(C=u?jh((Math.abs(u)+S)/w):0),g=C*w-S,f.repeatTimes=C,f.symbolMargin=x}var M=p*(g/2),D=f.pathPosition=[];D[v.index]=e[v.wh]/2,D[h.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var L=f.bundlePosition=[];L[v.index]=e[v.xy],L[h.index]=e[h.xy];var I=f.barRectShape=B({},e);I[h.wh]=p*Math.max(Math.abs(e[h.wh]),Math.abs(D[h.index]+M)),I[v.wh]=e[v.wh];var R=f.clipShape={};R[v.xy]=-e[v.xy],R[v.wh]=c.ecSize[v.wh],R[h.xy]=0,R[h.wh]=e[h.wh]}function ym(r){var t=r.symbolPatternSize,e=Ve(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function mm(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,f=i[t.valueDim.index]+o+e.symbolMargin*2;for(Wu(r,function(d){d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,c0:y<0)&&(m=u-1-d),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function _m(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?la(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=ym(e),n.add(i),la(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function xm(r,t,e){var a=B({},t.barRectShape),n=r.__pictorialBarRect;n?la(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new le({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function Sm(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=B({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)ge(n,{shape:i},s,l);else{i[o.wh]=0,n=new le({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],ba[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Xh(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=_C,e.isAnimationEnabled=xC,e}function _C(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function xC(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $h(r,t,e,a){var n=new re,i=new re;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?mm(n,t,e):_m(n,t,e),xm(n,e,a),Sm(n,t,e,a),n.__pictorialShapeStr=bm(r,e),n.__pictorialSymbolMeta=e,n}function SC(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;ge(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?mm(r,t,e,!0):_m(r,t,e,!0),xm(r,e,!0),Sm(r,t,e,!0)}function Kh(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Wu(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),b(i,function(o){gn(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function bm(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Wu(r,t,e){b(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function la(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&ba[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function qh(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),c=i.get("focus"),f=i.get("blurScope"),v=i.get("scale");Wu(r,function(d){if(d instanceof Gt){var g=d.style;d.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else d.useStyle(e.style);var y=d.ensureState("emphasis");y.style=o,v&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=e.z2});var h=t.valueDim.posDesc[+(e.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Wt(p,Ut(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:So(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:h}),lr(r,c,f,i.get("disabled"))}function jh(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var bC=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=fr(bn.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t})(bn);function AL(r){r.registerChartView(pC),r.registerSeriesModel(bC),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ae(wg,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ag("pictorialBar"))}function wC(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||Q(r,"text")))}function AC(r,t,e){var a=r,n,i,o;if(t==="text")o=a;else{o={},Q(a,"text")&&(o.text=a.text),Q(a,"rich")&&(o.rich=a.rich),Q(a,"textFill")&&(o.fill=a.textFill),Q(a,"textStroke")&&(o.stroke=a.textStroke),Q(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Q(a,"fontSize")&&(o.fontSize=a.fontSize),Q(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Q(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Q(a,"textPosition");n.position=s?a.textPosition:"inside",Q(a,"textPosition")&&(n.position=a.textPosition),Q(a,"textOffset")&&(n.offset=a.textOffset),Q(a,"textRotation")&&(n.rotation=a.textRotation),Q(a,"textDistance")&&(n.distance=a.textDistance)}return Jh(o,r),b(o.rich,function(l){Jh(l,l)}),{textConfig:n,textContent:i}}function Jh(r,t){t&&(t.font=t.textFont||t.font,Q(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),Q(t,"textAlign")&&(r.align=t.textAlign),Q(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),Q(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),Q(t,"textWidth")&&(r.width=t.textWidth),Q(t,"textHeight")&&(r.height=t.textHeight),Q(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),Q(t,"textPadding")&&(r.padding=t.textPadding),Q(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),Q(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),Q(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),Q(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),Q(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),Q(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),Q(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}var wm={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Qh=De(wm);ua(pn,function(r,t){return r[t]=1,r},{});pn.join(", ");var Ji=["","style","shape","extra"],ya=ne();function Uu(r,t,e,a,n){var i=r+"Animation",o=Sa(r,a,n)||{},s=ya(t).userDuring;return o.duration>0&&(o.during=s?G(LC,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),B(o,e[i]),o}function ws(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=ya(r),u=t.style;l.userDuring=t.during;var c={},f={};if(RC(r,t,f),tv("shape",t,f),tv("extra",t,f),!i&&s&&(PC(r,t,c),ev("shape",r,t,c),ev("extra",r,t,c),EC(r,t,u,c)),f.style=u,CC(r,f,o),DC(r,t),s)if(i){var v={};b(Ji,function(p){var d=p?t[p]:t;d&&d.enterFrom&&(p&&(v[p]=v[p]||{}),B(p?v[p]:v,d.enterFrom))});var h=Uu("enter",r,t,e,n);h.duration>0&&r.animateFrom(v,h)}else MC(r,t,n||0,e,c);Am(r,t),u?r.dirty():r.markRedraw()}function Am(r,t){for(var e=ya(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function DC(r,t){Q(t,"silent")&&(r.silent=t.silent),Q(t,"ignore")&&(r.ignore=t.ignore),r instanceof hn&&Q(t,"invisible")&&(r.invisible=t.invisible),r instanceof Ie&&Q(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var yt={},IC={setTransform:function(r,t){return yt.el[r]=t,this},getTransform:function(r){return yt.el[r]},setShape:function(r,t){var e=yt.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=yt.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=yt.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=yt.el.style;if(t)return t[r]},setExtra:function(r,t){var e=yt.el.extra||(yt.el.extra={});return e[r]=t,this},getExtra:function(r){var t=yt.el.extra;if(t)return t[r]}};function LC(){var r=this,t=r.el;if(t){var e=ya(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}yt.el=t,a(IC)}}function ev(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),Rr(l))B(o,i);else for(var u=fe(l),c=0;c=0){!o&&(o=a[r]={});for(var h=De(i),c=0;c=0)){var v=r.getAnimationStyleProps(),h=v?v.style:null;if(h){!i&&(i=a.style={});for(var p=De(e),u=0;us)return!0;if(o){var l=ku(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=wr(t).pointerEl=new ba[i.type](rv(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=wr(t).labelEl=new oe(rv(e.label));t.add(i),nv(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=wr(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=wr(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),nv(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=zn(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){sr(u.event)},onmousedown:As(this._onHandleDragMove,this,0,0),drift:As(this._onHandleDragMove,this),ondragend:As(this._onHandleDragEnd,this)}),a.add(n)),iv(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");O(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Fn(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){av(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Ts(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Ts(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Ts(n)),wr(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),wn(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r})();function av(r,t,e,a){Mm(wr(e).lastProp,a)||(wr(e).lastProp=a,t?ge(e,a,r):(e.stopAnimation(),e.attr(a)))}function Mm(r,t){if(Y(r)&&Y(t)){var e=!0;return b(t,function(a,n){e=e&&Mm(r[n],a)}),!!e}else return r===t}function nv(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Ts(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function iv(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}function Dm(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function Im(r,t,e,a,n){var i=e.get("value"),o=Lm(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Gn(s.get("padding")||0),u=s.getFont(),c=ro(o,u),f=n.position,v=c.width+l[1]+l[3],h=c.height+l[0]+l[2],p=n.align;p==="right"&&(f[0]-=v),p==="center"&&(f[0]-=v/2);var d=n.verticalAlign;d==="bottom"&&(f[1]-=h),d==="middle"&&(f[1]-=h/2),BC(f,v,h,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:Ce(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function BC(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Lm(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Ru(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};b(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),H(o)?i=o.replace("{value}",i):$(o)&&(i=o(s))}return i}function Pm(r,t,e){var a=Bn();return Nn(a,a,e.rotation),vn(a,a,e.position),pt([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function VC(r,t,e,a,n,i){var o=Ye.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),Im(t,a,n,i,{position:Pm(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Rm(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function zC(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function ov(r,t,e,a,n,i){return{cx:r,cy:t,r0:e,r:a,startAngle:n,endAngle:i,clockwise:!0}}var GC=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),c=sv(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=Dm(i),h=FC[u](s,f,c);h.style=v,e.graphicKey=h.type,e.pointer=h}var p=gl(l.model,n);VC(a,e,p,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=gl(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Pm(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=sv(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=a[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var v=(u[1]+u[0])/2,h=[v,v];h[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:h,tooltipOption:p[c]}},t})(Cm);function sv(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var FC={line:function(r,t,e){var a=Rm([t,e[0]],[t,e[1]],lv(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:zC([t-a/2,e[0]],[a,n],lv(r))}}};function lv(r){return r.dim==="x"?0:1}var HC=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t})(te),Nt=ne(),WC=b;function Em(r,t,e){if(!ye.node){var a=t.getZr();Nt(a).records||(Nt(a).records={}),UC(a,t);var n=Nt(a).records[r]||(Nt(a).records[r]={});n.handler=e}}function UC(r,t){if(Nt(r).initialized)return;Nt(r).initialized=!0,e("click",ae(uv,"click")),e("mousemove",ae(uv,"mousemove")),e("globalout",ZC);function e(a,n){r.on(a,function(i){var o=XC(t);WC(Nt(r).records,function(s){s&&n(s,i,o.dispatchAction)}),YC(o.pendings,t)})}}function YC(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function ZC(r,t,e){r.handler("leave",null,e)}function uv(r,t,e,a){t.handler(r,e,a)}function XC(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function Ll(r,t){if(!ye.node){var e=t.getZr(),a=(Nt(e).records||{})[r];a&&(Nt(e).records[r]=null)}}var $C=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Em("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,a){Ll("axisPointer",a)},t.prototype.dispose=function(e,a){Ll("axisPointer",a)},t.type="axisPointer",t})(xe);function km(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Er(i,r);if(o==null||o<0||O(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,v=u.dim,h=f==="x"||f==="radius"?1:0,p=i.mapDimension(v),d=[];d[h]=i.get(p,o),d[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(d)||[]}else e=l.dataToPoint(i.getValues(V(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var cv=ne();function KC(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||G(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ii(n)&&(n=km({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Ii(n),u=i.axesInfo,c=s.axesInfo,f=a==="leave"||Ii(n),v={},h={},p={list:[],map:{}},d={showPointer:ae(jC,h),showTooltip:ae(JC,p)};b(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);b(s.coordSysAxesInfo[m],function(x,w){var S=x.axis,A=rM(u,x);if(!f&&_&&(!u||A)){var C=A&&A.value;C==null&&!l&&(C=S.pointToData(n)),C!=null&&fv(x,C,d,!1,v)}})});var g={};return b(c,function(y,m){var _=y.linkGroup;_&&!h[m]&&b(_.axesInfo,function(x,w){var S=h[w];if(x!==y&&S){var A=S.value;_.mapper&&(A=y.axis.scale.parse(_.mapper(A,hv(x),hv(y)))),g[y.key]=A}})}),b(g,function(y,m){fv(c[m],y,d,!0,v)}),QC(h,c,v),eM(p,n,r,o),tM(c,o,e),v}}function fv(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=qC(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function qC(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return b(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),f,v;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,e);v=h.dataIndices,f=h.nestestValue}else{if(v=l.getData().indicesOfNearest(c[0],r,e.type==="category"?.5:null),!v.length)return;f=l.getData().get(c[0],v[0])}if(!(f==null||!isFinite(f))){var p=r-f,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=f,i.length=0),b(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function jC(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function JC(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=In(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function QC(r,t,e){var a=e.axesInfo=[];b(t,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function eM(r,t,e,a){if(Ii(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function tM(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=cv(a)[n]||{},o=cv(a)[n]={};b(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&b(f.seriesDataIndices,function(v){var h=v.seriesIndex+" | "+v.dataIndex;o[h]=v})});var s=[],l=[];b(i,function(u,c){!o[c]&&l.push(u)}),b(o,function(u,c){!i[c]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function rM(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function hv(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function Ii(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Yu(r){Hn.registerAxisPointerClass("CartesianAxisPointer",GC),r.registerComponentModel(HC),r.registerComponentView($C),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=gA(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},KC)}function TL(r){ze(Fy),ze(Yu)}var aM=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var h=Dm(i),p=iM[v](s,l,f,c);p.style=h,e.graphicKey=p.type,e.pointer=p}var d=i.get(["label","margin"]),g=nM(a,n,i,l,d);Im(e,n,i,o,g)},t})(Cm);function nM(r,t,e,a,n){var i=t.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var v=Bn();Nn(v,v,s),vn(v,v,[a.cx,a.cy]),u=pt([o,-n],v);var h=t.getModel("axisLabel").get("rotate")||0,p=Ye.innerTextLayout(s,h*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;c=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var iM={line:function(r,t,e,a){return r.dim==="angle"?{type:"Line",shape:Rm(t.coordToPoint([a[0],e]),t.coordToPoint([a[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:ov(t.cx,t.cy,a[0],a[1],(-e-n/2)*i,(-e+n/2)*i)}:{type:"Sector",shape:ov(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}},oM=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,n=this.ecModel;return n.eachComponent(e,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t})(te),Zu=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Me).models[0]},t.type="polarAxis",t})(te);je(Zu,wo);var sM=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t})(Zu),lM=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t})(Zu),Xu=(function(r){E(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t})(It);Xu.prototype.dataToRadius=It.prototype.dataToCoord;Xu.prototype.radiusToData=It.prototype.coordToData;var uM=ne(),$u=(function(r){E(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=ro(s==null?"":s+"",a.getFont(),"center","top"),f=Math.max(c.height,7),v=f/u;isNaN(v)&&(v=1/0);var h=Math.max(0,Math.floor(v)),p=uM(e.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-h)<=1&&Math.abs(g-o)<=1&&d>h?h=d:(p.lastTickCount=o,p.lastAutoInterval=h),h},t})(It);$u.prototype.dataToAngle=It.prototype.dataToCoord;$u.prototype.angleToData=It.prototype.coordToData;var Om=["radius","angle"],cM=(function(){function r(t){this.dimensions=Om,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Xu,this._angleAxis=new $u,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===t&&e.push(a),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},r.prototype.pointToData=function(t,e){var a=this.pointToCoord(t);return[this._radiusAxis.radiusToData(a[0],e),this._angleAxis.angleToData(a[1],e)]},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(t){var e=t[0],a=t[1]/180*Math.PI,n=Math.cos(a)*e+this.cx,i=-Math.sin(a)*e+this.cy;return[n,i]},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,v=this.r,h=this.r0;return v!==h&&f-o<=v*v&&f+o>=h*h}}},r.prototype.convertToPixel=function(t,e,a){var n=vv(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=vv(e);return n===this?this.pointToData(a):null},r})();function vv(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function fM(r,t,e){var a=t.get("center"),n=e.getWidth(),i=e.getHeight();r.cx=X(a[0],n),r.cy=X(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=t.get("radius");l==null?l=[0,"100%"]:O(l)||(l=[0,l]);var u=[X(l[0],s),X(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function hM(r,t){var e=this,a=e.getAngleAxis(),n=e.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();b(qi(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),b(qi(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),Mn(a.scale,a.model),Mn(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function vM(r){return r.mainType==="angleAxis"}function pv(r,t){var e;if(r.type=t.get("type"),r.scale=Pu(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),vM(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,n)}t.axis=r,r.model=t}var pM={dimensions:Om,create:function(r,t){var e=[];return r.eachComponent("polar",function(a,n){var i=new cM(n+"");i.update=hM;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");pv(o,l),pv(s,u),fM(i,a,t),e.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",Me).models[0];a.coordinateSystem=n.coordinateSystem}}),e}},dM=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function pi(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function di(r){var t=r.getRadiusAxis();return t.inverse?0:1}function dv(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var gM=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=V(n.getViewLabels(),function(c){c=Z(c);var f=n.scale,v=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(v),c});dv(u),dv(s),b(dM,function(c){e.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&yM[c](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t})(Hn),yM={axisLine:function(r,t,e,a,n,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=di(e),f=c?0:1,v,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?v=new ba[h]({shape:{cx:e.cx,cy:e.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new to({shape:{cx:e.cx,cy:e.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,t,e,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[di(e)],u=V(a,function(c){return new Ke({shape:pi(e,[l,l+s],c.coord)})});r.add(ht(u,{style:q(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[di(e)],c=[],f=0;fy?"left":"right",x=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var w=s[p];Y(w)&&w.textStyle&&(h=new ve(w.textStyle,l,l.ecModel))}var S=new oe({silent:Ye.isLabelSilent(t),style:Ce(h,{x:g[0],y:g[1],fill:h.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:x})});if(r.add(S),c){var A=Ye.makeAxisEventDataBase(t);A.targetType="axisLabel",A.value=f.rawLabel,j(S).eventData=A}},this)},splitLine:function(r,t,e,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",P=T;w&&(a[c][I]||(a[c][I]={p:T,n:T}),P=a[c][I][R]);var z=void 0,U=void 0,k=void 0,N=void 0;if(p.dim==="radius"){var W=p.dataToCoord(L)-T,K=l.dataToCoord(I);Math.abs(W)=N})}}})}function AM(r){var t={};b(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=Bm(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=f.stacks;t[l]=f;var h=Nm(a);v[h]||f.autoWidthCount++,v[h]=v[h]||{width:0,maxWidth:0};var p=X(a.get("barWidth"),c),d=X(a.get("barMaxWidth"),c),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!v[h].width&&(p=Math.min(f.remainedWidth,p),v[h].width=p,f.remainedWidth-=p),d&&(v[h].maxWidth=d),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var e={};return b(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=X(a.categoryGap,o),l=X(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),b(i,function(d,g){var y=d.maxWidth;y&&y+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new oe({z2:30,style:Ce(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,h[l],n,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,a,n,i,o){var s="left",l="top",u=e[0],c=e[1];return n==="horizontal"?(c=c+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,n,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||H(s))&&(s&&(a=tl(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",d=o.get("silent"),g=0;g=n.start.time&&a.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var n=Math.floor(e[1].time/Cs)-Math.floor(e[0].time/Cs)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)n-=u,i.setDate(l-u);var c=Math.floor((n+e[0].day+6)/7),f=a?-c+1:c-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:c,nthWeek:f,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var n=this._getRangeInfo(a);if(t>n.weeks||t===0&&en.lweek)return null;var i=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(n){var i=new r(n);a.push(i),n.coordinateSystem=i}),t.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r})();function yv(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}function ML(r){r.registerComponentModel(DM),r.registerComponentView(IM),r.registerCoordinateSystem("calendar",LM)}function PM(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function mv(r,t){var e;return b(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function RM(r,t,e){var a=B({},e),n=r[t],i=e.$action||"merge";i==="merge"?n?(J(n,a,!0),ur(n,a,{ignoreSize:!0}),jd(e,n),gi(e,n),gi(e,n,"shape"),gi(e,n,"style"),gi(e,n,"extra"),e.clipPath=n.clipPath):r[t]=a:i==="replace"?r[t]=a:i==="remove"&&n&&(r[t]=null)}var Vm=["transition","enterFrom","leaveTo"],EM=Vm.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function gi(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?Vm:EM,n=0;n=0;c--){var f=n[c],v=Oe(f.id,null),h=v!=null?o.get(v):null;if(h){var p=h.parent,y=tt(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},x=fu(h,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!tt(h).isNew&&x){for(var w=f.transition,S={},A=0;A=0)?S[C]=T:h[C]=T}ge(h,S,e,0)}else h.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(n){Li(n,tt(n).option,a,e._lastGraphicModel)}),this._elMap=F()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t})(xe);function Pl(r){var t=Q(_v,r)?_v[r]:od(r),e=new t({});return tt(e).type=r,e}function xv(r,t,e,a){var n=Pl(e);return t.add(n),a.set(r,n),tt(n).id=r,tt(n).isNew=!0,n}function Li(r,t,e,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){Li(i,t,e,a)}),TC(r,t,a),e.removeKey(tt(r).id))}function Sv(r,t,e,a){r.isGroup||b([["cursor",hn.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(n){var i=n[0];Q(t,i)?r[i]=se(t[i],n[1]):r[i]==null&&(r[i]=n[1])}),b(De(t),function(n){if(n.indexOf("on")===0){var i=t[n];r[n]=$(i)?i:null}}),Q(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function BM(r){return r=B({},r),b(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(qd),function(t){delete r[t]}),r}function VM(r,t,e){var a=j(r).eventData;!r.silent&&!r.ignore&&!a&&(a=j(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function DL(r){r.registerComponentModel(OM),r.registerComponentView(NM),r.registerPreprocessor(function(t){var e=t.graphic;O(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var bv=["x","y","radius","angle","single"],zM=["cartesian2d","polar","singleAxis"];function GM(r){var t=r.get("coordinateSystem");return ie(zM,t)>=0}function nr(r){return r+"Axis"}function FM(r,t){var e=F(),a=[],n=F();r.eachComponent({mainType:"dataZoom",query:t},function(c){n.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!n.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){n.set(c.uid,!0),a.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(v,h){var p=e.get(v);p&&p[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,v){(e.get(f)||e.set(f,[]))[v]=!0})}return a}function zm(r){var t=r.ecModel,e={infoList:[],infoMap:F()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(nr(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var Ms=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),Rn=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=wv(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=wv(e);J(this.option,e,!0),J(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=F(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return b(bv,function(n){var i=this.getReferringComponents(nr(n),b_);if(i.specified){a=!0;var o=new Ms;b(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var f=u[0];if(f){var v=new Ms;if(v.add(f.componentIndex),e.set(c,v),i=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",Me).models[0];h&&b(u,function(p){f.componentIndex!==p.componentIndex&&h===p.getReferringComponents("grid",Me).models[0]&&v.add(p.componentIndex)})}}}i&&b(bv,function(u){if(i){var c=n.findComponents({mainType:nr(u),filter:function(v){return v.get("type",!0)==="category"}});if(c[0]){var f=new Ms;f.add(c[0].componentIndex),e.set(u,f),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");b([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(nr(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){b(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){var n=this.getAxisModel(e,a);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(nr(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;b([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;b(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!x&&!w)return!0;_&&(g=!0),x&&(p=!0),w&&(d=!0)}return g&&p&&d})}else ra(c,function(h){if(i==="empty")l.setData(u=u.map(h,function(d){return s(d)?d:NaN}));else{var p={};p[h]=o,u.selectRange(p)}});ra(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;ra(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=pe(a[0]+o,a,[0,100],!0):i!=null&&(o=pe(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var n=Bp(a,[0,500]);n=Math.min(n,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),e[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r})();function YM(r,t,e){var a=[1/0,-1/0];ra(e,function(o){qw(a,o.getData(),t)});var n=r.getAxisModel(),i=My(n.axis.scale,n,a).calculate();return[i.min,i.max]}var ZM={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(nr(o),s);n(o,s,l,i)})})}t(function(n,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new UM(n,i,s,r),e.push(o.__dzAxisProxy))});var a=F();return b(e,function(n){b(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).reset(e)}),e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function XM(r){r.registerAction("dataZoom",function(t,e){var a=FM(e,t);b(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Tv=!1;function qu(r){Tv||(Tv=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,ZM),XM(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function $M(r){r.registerComponentModel(HM),r.registerComponentView(WM),qu(r)}var ft=(function(){function r(){}return r})(),Gm={};function Za(r,t){Gm[r]=t}function Fm(r){return Gm[r]}var KM=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;b(this.option.feature,function(a,n){var i=Fm(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),J(a,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t})(te);function qM(r,t,e){var a=t.getBoxLayoutParams(),n=t.get("padding"),i={width:e.getWidth(),height:e.getHeight()},o=Xe(a,i,n);Lr(t.get("orient"),r,t.get("itemGap"),o.width,o.height),fu(r,a,i,n)}function Hm(r,t){var e=Gn(t.get("padding")),a=t.getItemStyle(["color","opacity"]);return a.fill=t.get("backgroundColor"),r=new le({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var jM=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),f=[];b(u,function(p,d){f.push(d)}),new _n(this._featureNames||[],f).add(v).update(v).remove(ae(v,null)).execute(),this._featureNames=f;function v(p,d){var g=f[p],y=f[d],m=u[g],_=new ve(m,e,e.ecModel),x;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(JM(g))x={onclick:_.option.onclick,featureName:g};else{var w=Fm(g);if(!w)return;x=new w}c[g]=x}else if(x=c[y],!x)return;x.uid=Ta("toolbox-feature"),x.model=_,x.ecModel=a,x.api=n;var S=x instanceof ft;if(!g&&y){S&&x.dispose&&x.dispose(a,n);return}if(!_.get("show")||S&&x.unusable){S&&x.remove&&x.remove(a,n);return}h(_,x,g),_.setIconStatus=function(A,C){var T=this.option,M=this.iconPaths;T.iconStatus=T.iconStatus||{},T.iconStatus[A]=C,M[A]&&(C==="emphasis"?ha:va)(M[A])},x instanceof ft&&x.render&&x.render(_,a,n,i)}function h(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof ft&&d.getIcons?d.getIcons():p.get("icon"),x=p.get("title")||{},w,S;H(_)?(w={},w[g]=_):w=_,H(x)?(S={},S[g]=x):S=x;var A=p.iconPaths={};b(w,function(C,T){var M=zn(C,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var D=M.ensureState("emphasis");D.style=m.getItemStyle();var L=new oe({style:{text:S[T],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:vd({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},a)},ignore:!0});M.setTextContent(L),zr({el:M,componentModel:e,itemName:T,formatterParamsExtra:{title:S[T]}}),M.__title=S[T],M.on("mouseover",function(){var I=m.getItemStyle(),R=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||R}),L.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",T])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(p.get(["iconStatus",T])==="emphasis"?ha:va)(M),o.add(M),M.on("click",G(d.onclick,d,a,n,T)),A[T]=M})}qM(o,e,n),o.add(Hm(o.getBoundingRect(),e)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!$(_)&&d){var x=_.style||(_.style={}),w=ro(d,oe.makeFont(x)),S=p.x+o.x,A=p.y+o.y+s,C=!1;A+w.height>n.getHeight()&&(y.position="top",C=!0);var T=C?-5-w.height:s+10;S+w.width/2>n.getWidth()?(y.position=["100%",T],x.align="right"):S-w.width/2<0&&(y.position=[0,T],x.align="left")}})},t.prototype.updateView=function(e,a,n,i){b(this._features,function(o){o instanceof ft&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.remove=function(e,a){b(this._features,function(n){n instanceof ft&&n.remove&&n.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){b(this._features,function(n){n instanceof ft&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t})(xe);function JM(r){return r.indexOf("my")===0}var QM=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=ye.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),h=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];h&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,w=x.document;w.open("image/svg+xml","replace"),w.write(p),w.close(),x.focus(),w.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var S=n.get("lang"),A='',C=window.open();C.document.write(A),C.document.title=i}},t.getDefaultOption=function(e){var a={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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t})(ft),Cv="__ec_magicType_stack__",eD=[["line","bar"],["stack"]],tD=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return b(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){var a={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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(Mv[n]){var s={series:[]},l=function(f){var v=f.subType,h=f.id,p=Mv[n](v,h,f,i);p&&(q(p,f.option),s.series.push(p));var d=f.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,Me).models[0],x=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=x;w++)s[m][x]=s[m][x]||{};s[m][x].boundaryGap=n==="bar"}}};b(eD,function(f){ie(f,n)>=0&&b(f,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=J({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t})(ft),Mv={line:function(r,t,e,a){if(r==="bar")return J({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return J({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===Cv;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),J({id:t,stack:n?"":Cv},a.get(["option","stack"])||{},!0)}};Mt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Io=new Array(60).join("-"),ma=" ";function rD(r){var t={},e=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function aD(r){var t=[];return b(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(V(e.series,function(h){return h.name})),l=[n.model.getCategories()];b(e.series,function(h){var p=h.getRawData();l.push(h.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(ma)],c=0;c=0)return!0}var Rl=new RegExp("["+ma+"]+","g");function sD(r){for(var t=r.split(/\n+/g),e=Qi(t.shift()).split(Rl),a=[],n=V(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function vD(r){var t=ju(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return Wm(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function pD(r){Um(r).snapshots=null}function dD(r){return ju(r).length}function ju(r){var t=Um(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var gD=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){pD(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t})(ft);Mt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var yD=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Ym=(function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=Dv(e,t);b(mD,function(o,s){(!a||!a.include||ie(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Ds[a.brushType](0,i,n);a.__rangeOffset={offset:Rv[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){b(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&b(i.coordSyses,function(o){var s=Ds[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){b(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Ds[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?Rv[a.brushType](i.values,o.offset,_D(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return V(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:pm(n),isTargetByCursor:gm(n,t,a.coordSysModel),getLinearBrushOtherExtent:dm(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&ie(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=Dv(e,t),i=0;ir[1]&&r.reverse(),r}function Dv(r,t){return an(r,t,{includeMainTypes:yD})}var mD={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=F(),o={},s={};!e&&!a&&!n||(b(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),b(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),b(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];b(u.getCartesians(),function(f,v){(ie(e,f.getAxis("x").model)>=0||ie(a,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Lv.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){b(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:Lv.geo})})}},Iv=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Lv={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Ir(r)),t}},Ds={lineX:ae(Pv,0),lineY:ae(Pv,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[El([n[0],i[0]]),El([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=V(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function Pv(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=El(V([0,1],function(s){return t?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var Rv={lineX:ae(Ev,0),lineY:ae(Ev,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return V(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function Ev(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function _D(r,t){var e=kv(r),a=kv(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function kv(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var kl=b,xD=y_("toolbox-dataZoom_"),SD=(function(r){E(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new rm(n.getZr()),this._brushController.on("brush",G(this._onBrush,this)).mount()),AD(e,a,this,i,n),wD(e,a)},t.prototype.onclick=function(e,a,n){bD[n].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new Ym(Ju(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,c,f){if(f.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[v],f,c)}}),hD(i,n),this._dispatchZoomAction(n);function s(u,c,f){var v=c.getAxis(u),h=v.model,p=l(u,h,i),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(f=Fr(0,f.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var v;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var p=h.getAxisModel(u,c.componentIndex);p&&(v=h)}),v}},t.prototype._dispatchZoomAction=function(e){var a=[];kl(e,function(n,i){a.push(Z(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},t})(ft),bD={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(vD(this.ecModel))}};function Ju(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function wD(r,t){r.setIconStatus("back",dD(t)>1?"emphasis":"normal")}function AD(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new Ym(Ju(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}ab("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=Ju(a),o=an(r,i);kl(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),kl(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:xD+u+f};v[c]=f,n.push(v)}return n});function IL(r){r.registerComponentModel(KM),r.registerComponentView(jM),Za("saveAsImage",QM),Za("magicType",tD),Za("dataView",cD),Za("dataZoom",SD),Za("restore",gD),ze($M)}var TD=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t})(te);function Zm(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function Xm(r){if(ye.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+n,v=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-f)/2)*100)/100;s+=";"+i+":-"+h+"px";var p=t+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function RD(r,t){var e="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+e,n="opacity"+a+",visibility"+a;return t||(a=" "+r+"s "+e,n+=ye.transformSupported?","+Qu+a:",left"+a+",top"+a),DD+":"+n}function Ov(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!ye.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=ye.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+Qu+":"+o+";":[["top",0],["left",0],[$m,o]]}function ED(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=se(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),b(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function kD(r,t,e){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=sg(r,"html"),v=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+v),t&&n&&a.push(RD(n,e)),i&&a.push("background-color:"+i),b(["width","color","radius"],function(h){var p="border-"+h,d=$d(p),g=r.get(d);g!=null&&a.push(p+":"+g+(h==="color"?"":"px"))}),a.push(ED(c)),f!=null&&a.push("padding:"+Gn(f).join("px ")+"px"),a.join(";")+";"}function Nv(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&G0(r,o,e,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var OD=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ye.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(H(i)?document.querySelector(i):Ys(i)?i:$(i)&&i(t.getDom()));Nv(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,c=n.painter.getViewportRoot();z0(c,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),a=MD(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=ID+kD(t,!this._firstShow,this._longHide)+Ov(i[0],i[1],!0)+("border-color:"+Or(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(H(i)&&a.get("trigger")==="item"&&!Zm(a)&&(s=PD(a,n,i)),H(t))o.innerHTML=t+s;else if(t){o.innerHTML="",O(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||ye.node||!n.getDom())){var o=zv(i,n);this._ticket="";var s=i.dataByCoordSys,l=HD(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=BD;c.x=i.x,c.y=i.y,c.update(),j(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,n,i))return;var f=km(i,a),v=f.point[0],h=f.point[1];v!=null&&h!=null&&this._tryShow({offsetX:v,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(zv(i,n))},t.prototype._manuallyAxisShowTip=function(e,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var c=u.getData(),f=Xa([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=j(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Cr(n,function(c){if(j(c).dataIndex!=null)return l=c,!0;if(j(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=G(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=Xa([a.tooltipOption],i),l=this._renderMode,u=[],c=At("section",{blocks:[],noHeader:!0}),f=[],v=new Xo;b(e,function(m){b(m.dataByAxis,function(_){var x=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!x||w==null)){var S=Lm(w,x.axis,n,_.seriesDataIndices,_.valueLabelOpt),A=At("section",{header:S,noHeader:!On(S),sortBlocks:!0,blocks:[]});c.blocks.push(A),b(_.seriesDataIndices,function(C){var T=n.getSeriesByIndex(C.seriesIndex),M=C.dataIndexInside,D=T.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Ru(x.axis,{value:w}),D.axisValueLabel=S,D.marker=v.makeTooltipMarker("item",Or(D.color),l);var L=Kc(T.formatTooltip(M,!0,null)),I=L.frag;if(I){var R=Xa([T],i).get("valueFormatter");A.blocks.push(R?B({valueFormatter:R},I):I)}L.text&&f.push(L.text),u.push(D)}})}})}),c.blocks.reverse(),f.reverse();var h=a.position,p=s.get("order"),d=Jc(c,v,l,p,n.get("useUTC"),s.get("textStyle"));d&&f.unshift(d);var g=l==="richText"?` `:"
",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,v)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=j(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,v=u.getData(f),h=this._renderMode,p=e.positionDefault,d=Xa([v.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,f),m=new Xo;y.marker=m.makeTooltipMarker("item",Or(y.color),h);var _=Kc(u.formatTooltip(c,!1,f)),x=d.get("order"),w=d.get("valueFormatter"),S=_.frag,A=S?Jc(w?B({valueFormatter:w},S):S,m,h,x,i.get("useUTC"),d.get("textStyle")):_.text,C="item_"+u.name+"_"+c;this._showOrMove(d,function(){this._showTooltipContent(d,A,y,C,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:c,dataIndex:v.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=j(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(H(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=Z(l),l.content=We(l.content));var f=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&f.push(v),f.push({formatter:l.content});var h=e.positionDefault,p=Xa(f,this._tooltipModel,h?{position:h}:null),d=p.get("content"),g=Math.random()+"",y=new Xo;this._showOrMove(p,function(){var m=Z(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var v=e.get("formatter");l=l||e.get("position");var h=a,p=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),d=p.color;if(v)if(H(v)){var g=e.ecModel.get("useUTC"),y=O(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=po(y.axisValue,h,g)),h=Kd(h,n,!0)}else if($(v)){var _=G(function(x,w){x===this._ticket&&(f.setContent(w,c,e,d,l),this._updatePosition(e,l,o,s,f,n,u))},this);this._ticket=i,h=v(n,i,_)}else h=v;f.setContent(h,c,e,d,l),f.show(e,d),this._updatePosition(e,l,o,s,f,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i){if(n==="axis"||O(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!O(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||e.get("position");var f=o.getSize(),v=e.get("align"),h=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),$(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),O(a))n=X(a[0],u),i=X(a[1],c);else if(Y(a)){var d=a;d.width=f[0],d.height=f[1];var g=Xe(d,{width:u,height:c});n=g.x,i=g.y,v=null,h=null}else if(H(a)&&l){var y=FD(a,p,f,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=zD(n,i,o,u,c,v?null:20,h?null:20);n=y[0],i=y[1]}if(v&&(n-=Gv(v)?f[0]/2:v==="right"?f[0]:0),h&&(i-=Gv(h)?f[1]/2:h==="bottom"?f[1]:0),Zm(e)){var y=GD(n,i,o,u,c);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&b(n,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&b(u,function(v,h){var p=f[h]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&b(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&b(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],x=i[m];_&&x&&x.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){ye.node||!a.getDom()||(wn(this,"_updatePosition"),this._tooltipContent.dispose(),Ll("itemTooltip",a))},t.type="tooltip",t})(xe);function Xa(r,t,e){var a=t.ecModel,n;e?(n=new ve(e,a,a),n=new ve(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ve&&(o=o.get("tooltip",!0)),H(o)&&(o={formatter:o}),o&&(n=new ve(o,n,a)))}return n}function zv(r,t){return r.dispatchAction||G(t.dispatchAction,t)}function zD(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function GD(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function FD(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+c+o;break;case"left":s=t.x-n-o,l=t.y+c/2-i/2;break;case"right":s=t.x+u+o,l=t.y+c/2-i/2}return[s,l]}function Gv(r){return r==="center"||r==="middle"}function HD(r,t,e){var a=Yl(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Vn(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=j(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function LL(r){ze(Yu),r.registerComponentModel(TD),r.registerComponentView(VD),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},bt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},bt)}var Fv=b;function Hv(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function Wv(r,t,e){var a={};return Fv(t,function(i){var o=a[i]=n();Fv(r[i],function(s,l){if(Be.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new Be(u),l==="opacity"&&(u=Z(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Be(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function WD(r,t,e){var a;b(e,function(n){t.hasOwnProperty(n)&&Hv(t[n])&&(a=!0)}),a&&b(e,function(n){t.hasOwnProperty(n)&&Hv(t[n])?r[n]=Z(t[n]):delete r[n]})}function UD(r,t,e,a){var n={};return b(r,function(i){var o=Be.prepareVisualTypes(t[i]);n[i]=o}),{progress:function(o,s){var l;a!=null&&(l=s.getDimensionIndex(a));function u(w){return ty(s,f,w)}function c(w,S){Hb(s,f,w,S)}for(var f,v=s.getStore();(f=o.next())!=null;){var h=s.getRawDataItem(f);if(!(h&&h.visualMap===!1))for(var p=a!=null?v.get(l,f):f,d=e(p),g=t[d],y=n[d],m=0,_=y.length;m<_;m++){var x=y[m];g[x]&&g[x].applyVisual(p,u,c)}}}}}var YD=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={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:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t})(te),ZD=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=se(e.get("textBaseline"),e.get("textVerticalAlign")),c=new oe({style:Ce(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),v=e.get("subtext"),h=new oe({style:Ce(s,{text:v,fill:s.getTextColor(),y:f.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),d=e.get("sublink"),g=e.get("triggerEvent",!0);c.silent=!p&&!g,h.silent=!d&&!g,p&&c.on("click",function(){Zc(p,"_"+e.get("target"))}),d&&h.on("click",function(){Zc(d,"_"+e.get("subtarget"))}),j(c).eventData=j(h).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(c),v&&i.add(h);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Xe(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),h.setStyle(x),y=i.getBoundingRect();var w=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var A=new le({shape:{x:y.x-w[3],y:y.y-w[0],width:y.width+w[1]+w[3],height:y.height+w[0]+w[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});i.add(A)}},t.type="title",t})(xe);function PL(r){r.registerComponentModel(YD),r.registerComponentView(ZD)}var Uv=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,a=e.data||[],n=e.axisType,i=this._names=[],o;n==="category"?(o=[],b(a,function(u,c){var f=Oe(xa(u),""),v;Y(u)?(v=Z(u),v.value=c):v=c,o.push(v),i.push(f)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new au([{name:"value",type:s}],this);l.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t})(te),qm=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=fr(Uv.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t})(Uv);je(qm,Qd.prototype);var XD=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t})(xe),$D=(function(r){E(t,r);function t(e,a,n,i){var o=r.call(this,e,a,n)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(It),Is=Math.PI,Yv=ne(),KD=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,n){if(this.model=e,this.api=n,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return At("nameValue",{noName:!0,value:c})},b(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,a){var n=e.get(["label","position"]),i=e.get("orient"),o=jD(e,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Is/2},f=i==="vertical"?o.height:o.width,v=e.getModel("controlStyle"),h=v.get("show",!0),p=h?v.get("itemSize"):0,d=h?v.get("itemGap"):0,g=p+d,y=e.get(["label","rotate"])||0;y=y*Is/180;var m,_,x,w=v.get("position",!0),S=h&&v.get("showPlayBtn",!0),A=h&&v.get("showPrevBtn",!0),C=h&&v.get("showNextBtn",!0),T=0,M=f;w==="left"||w==="bottom"?(S&&(m=[0,0],T+=g),A&&(_=[T,0],T+=g),C&&(x=[M-p,0],M-=g)):(S&&(m=[M-p,0],M-=g),A&&(_=[0,0],T+=g),C&&(x=[M-p,0],M-=g));var D=[T,M];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:x,axisExtent:D,controlSize:p,controlGap:d}},t.prototype._position=function(e,a){var n=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Bn(),l=o.x,u=o.y+o.height;vn(s,s,[-l,-u]),Nn(s,s,-Is/2),vn(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),f=m(n.getBoundingRect()),v=m(i.getBoundingRect()),h=[n.x,n.y],p=[i.x,i.y];p[0]=h[0]=c[0][0];var d=e.labelPosOpt;if(d==null||H(d)){var g=d==="+"?0:1;_(h,f,c,1,g),_(p,v,c,1,1-g)}else{var g=d>=0?0:1;_(h,f,c,1,g),p[1]=h[1]+d}n.setPosition(h),i.setPosition(p),n.rotation=i.rotation=e.rotation,y(n),y(i);function y(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function m(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,w,S,A,C){x[A]+=S[A][C]-w[A][C]}},t.prototype._createAxis=function(e,a){var n=a.getData(),i=a.get("axisType"),o=qD(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new $D("value",o,e.axisExtent,i);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new re;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new Ke({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new Ke({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:q({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],b(l,function(u){var c=n.dataToCoord(u.value),f=s.getItemModel(u.value),v=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),d={x:c,y:0,onclick:G(o._changeTimeline,o,u.value)},g=Zv(f,v,a,d);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),Dr(g);var y=j(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],b(u,function(c){var f=c.tickValue,v=l.getItemModel(f),h=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),y=new oe({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:G(o._changeTimeline,o,f),silent:!1,style:Ce(h,{text:c.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Ce(p),y.ensureState("progress").style=Ce(d),a.add(y),Dr(y),Yv(y).dataIndex=f,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,a,n,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);v(e.nextBtnPosition,"next",G(this._changeTimeline,this,f?"-":"+")),v(e.prevBtnPosition,"prev",G(this._changeTimeline,this,f?"+":"-")),v(e.playPosition,c?"stop":"play",G(this._handlePlayClick,this,!c),!0);function v(h,p,d,g){if(h){var y=ca(se(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=JD(i,p+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,a.add(_),Dr(_)}}},t.prototype._renderCurrentPointer=function(e,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=G(u._handlePointerDrag,u),f.ondragend=G(u._handlePointerDragend,u),Xv(f,u._progressLine,s,n,i,!0)},onUpdate:function(f){Xv(f,u._progressLine,s,n,i)}};this._currentPointer=Zv(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,a){var n=this._toAxisCoord(e)[0],i=this._axis,o=Et(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t})(te),Qr=ae,Nl=b,yi=re,jm=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new yi),this.group.add(this._selectorGroup=new yi),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var c=e.getBoxLayoutParams(),f={width:n.getWidth(),height:n.getHeight()},v=e.get("padding"),h=Xe(c,f,v),p=this.layoutInner(e,o,h,i,l,u),d=Xe(q({width:p.width,height:p.height},c),f,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Hm(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),c=F(),f=a.get("selectedMode"),v=[];n.eachRawSeries(function(h){!h.get("legendHoverLink")&&v.push(h.id)}),Nl(a.getData(),function(h,p){var d=h.get("name");if(!this.newlineDisabled&&(d===""||d===` `)){var g=new yi;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!c.get(d))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),w=m.getVisual("style"),S=this._createItem(y,d,p,h,a,e,_,w,x,f,i);S.on("click",Qr(Kv,d,null,i,v)).on("mouseover",Qr(Bl,y.name,null,i,v)).on("mouseout",Qr(Vl,y.name,null,i,v)),n.ssr&&S.eachChild(function(A){var C=j(A);C.seriesIndex=y.seriesIndex,C.dataIndex=p,C.ssrType="legend"}),c.set(d,!0)}else n.eachRawSeries(function(A){if(!c.get(d)&&A.legendVisualProvider){var C=A.legendVisualProvider;if(!C.containName(d))return;var T=C.indexOfName(d),M=C.getItemVisual(T,"style"),D=C.getItemVisual(T,"legendIcon"),L=Ep(M.fill);L&&L[3]===0&&(L[3]=.2,M=B(B({},M),{fill:xi(L,"rgba")}));var I=this._createItem(A,d,p,h,a,e,{},M,D,f,i);I.on("click",Qr(Kv,null,d,i,v)).on("mouseover",Qr(Bl,null,d,i,v)).on("mouseout",Qr(Vl,null,d,i,v)),n.ssr&&I.eachChild(function(R){var P=j(R);P.seriesIndex=A.seriesIndex,P.dataIndex=p,P.ssrType="legend"}),c.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();Nl(e,function(u){var c=u.type,f=new oe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(f);var v=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);Wt(f,{normal:v,emphasis:h},{defaultText:u.title}),Dr(f)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,c,f,v){var h=e.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var x=aI(c,i,l,u,h,g,v),w=new yi,S=i.getModel("textStyle");if($(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:p,itemHeight:d,icon:c,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));else{var A=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(nI({itemWidth:p,itemHeight:d,icon:c,iconRotate:A,itemStyle:x.itemStyle,symbolKeepAspect:m}))}var C=s==="left"?p+5:-5,T=s,M=o.get("formatter"),D=a;H(M)&&M?D=M.replace("{name}",a??""):$(M)&&(D=M(a));var L=g?S.getTextColor():i.get("inactiveColor");w.add(new oe({style:Ce(S,{text:D,x:C,y:d/2,fill:L,align:T,verticalAlign:"middle"},{inheritColor:L})}));var I=new le({shape:w.getBoundingRect(),style:{fill:"transparent"}}),R=i.getModel("tooltip");return R.get("show")&&zr({el:I,componentModel:o,itemName:a,itemTooltipOption:R.option}),w.add(I),w.eachChild(function(P){P.silent=!0}),I.silent=!f,this.getContentGroup().add(w),Dr(w),w.__legendDataIndex=n,w},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Lr(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Lr("horizontal",u,e.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],p=e.get("selectorButtonGap",!0),d=e.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?h[d]+=c[g]+p:f[d]+=v[g]+p,h[1-d]+=c[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+p+v[g],_[y]=Math.max(c[y],v[y]),_[m]=Math.min(0,v[m]+h[1-d]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(xe);function aI(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Nl(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?a.decal:Xi(f,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var v=t.getModel("lineStyle"),h=v.getLineStyle();if(s(h,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!i){var p=t.get("inactiveBorderWidth"),d=u[c];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=v.get("inactiveColor"),h.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function nI(r){var t=r.icon||"roundRect",e=Ve(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function Kv(r,t,e,a){Vl(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Bl(r,t,e,a)}function Jm(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;an[o],g=[-h.x,-h.y];a||(g[i]=c[u]);var y=[0,0],m=[-p.x,-p.y],_=se(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(d){var x=e.get("pageButtonPosition",!0);x==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=h[s]/2-p[s]/2,c.setPosition(g),f.setPosition(y),v.setPosition(m);var w={x:0,y:0};if(w[o]=d?n[o]:h[o],w[s]=Math.max(h[s],p[s]),w[l]=Math.min(0,p[l]+m[1-i]),f.__rectSize=n[o],d){var S={x:0,y:0};S[o]=Math.max(n[o]-p[o]-_,0),S[s]=w[s],f.setClipPath(new le({shape:S})),f.__rectSize=S[o]}else v.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(e);return A.pageIndex!=null&&ge(c,{x:A.contentPosition[0],y:A.contentPosition[1]},d?e:null),this._updatePageInfoView(e,A),w},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;b(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",v=a[f]!=null,h=n.childOfName(c);h&&(h.setStyle("fill",v?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),h.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",H(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Ls[o],l=Ps[o],u=this._findTargetItemIndex(a),c=n.children(),f=c[u],v=c.length,h=v?1:0,p={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var d=x(f);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=x(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=x(c[g]),(!_||!w(m,_.s))&&y.i=A&&S.s<=A+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(jm);function uI(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function cI(r){ze(Qm),r.registerComponentModel(sI),r.registerComponentView(lI),uI(r)}function EL(r){ze(Qm),ze(cI)}var fI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=fr(Rn.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Rn),ec=ne();function hI(r,t,e){ec(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function vI(r,t){for(var e=ec(r).coordSysRecordMap,a=e.keys(),n=0;na[e+t]&&(t=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function mI(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=ec(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=F());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=zm(i);b(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,pI(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=F());c.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){e0(n,i);return}var c=yI(l);o.enable(c.controlType,c.opt),o.setPointerChecker(i.containsPoint),Fn(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var _I=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),hI(n,e,{pan:G(Rs.pan,this),zoom:G(Rs.zoom,this),scrollMove:G(Rs.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vI(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(Ku),Rs={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Es[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Fr(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:Qv(function(r,t,e,a,n,i){var o=Es[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Qv(function(r,t,e,a,n,i){var o=Es[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function Qv(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(Fr(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Es={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function xI(r){qu(r),r.registerComponentModel(fI),r.registerComponentView(_I),mI(r)}var SI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=fr(Rn.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t})(Rn),Ka=le,ep=7,bI=1,ks=30,wI=7,qa="horizontal",tp="vertical",AI=5,TI=["line","bar","candlestick","scatter"],CI={easing:"cubicOut",duration:100,delay:0},MI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=G(this._onBrush,this),this._onBrushEnd=G(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),Fn(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){wn(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new re;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?wI:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===qa?{right:s.width-o.x-o.width,top:s.height-ks-ep-i,width:o.width,height:ks}:{right:ep,top:o.y,width:ks,height:o.height},u=Ca(e.option);b(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=Xe(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===tp&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===qa&&!o?{scaleY:l?1:-1,scaleX:1}:n===qa&&o?{scaleY:l?1:-1,scaleX:-1}:n===tp&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new Ka({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Ka({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:G(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var f=o.getDataExtent(l),v=(f[1]-f[0])*.3;f=[f[0]-v,f[1]+v];var h=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/a[0]),x;o.each([l],function(T,M){if(_>0&&M%_){m+=y;return}var D=T==null||isNaN(T)||T==="",L=D?0:pe(T,f,h,!0);D&&!x&&M?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&x&&(d.push([m,0]),g.push([m,0])),d.push([m,L]),g.push([m,L]),m+=y,x=D}),u=this._shadowPolygonPts=d,c=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var w=this.dataZoomModel;function S(T){var M=w.getModel(T?"selectedDataBackground":"dataBackground"),D=new re,L=new cr({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Tt({shape:{points:c},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(I),D}for(var A=0;A<3;A++){var C=S(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();b(l,function(u){if(!n&&!(a!==!0&&ie(TI,u.get("type"))<0)){var c=i.getComponent(nr(o),s).axis,f=DI(o),v,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(v=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),n={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:v}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),v=a.filler=new Ka({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new Ka({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:bI,fill:"rgba(0,0,0,0)"}})),b([0,1],function(_){var x=l.get("handleIcon");!Hi[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var w=Ve(x,-1,0,2,2,null,!0);w.attr({cursor:rp(this._orient),draggable:!0,drift:G(this._onDragMove,this,_),ondragend:G(this._onDragEnd,this),onmouseover:G(this._showDataInfo,this,!0),onmouseout:G(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),A=l.get("handleSize");this._handleHeight=X(A,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Dr(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(n[_]=w);var T=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;e.add(i[_]=new oe({silent:!0,invisible:!D,style:Ce(T,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:T.getTextColor(),font:T.getFont()}),z2:10}))},this);var h=v;if(f){var p=X(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new le({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=Ve(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));h=a.moveZone=new le({invisible:!0,shape:{y:s[1]-m,height:p+m}}),h.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:rp(this._orient),drift:G(this._onDragMove,this,"all"),ondragstart:G(this._showDataInfo,this,!0),ondragend:G(this._onDragEnd,this),onmouseover:G(this._showDataInfo,this,!0),onmouseout:G(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[pe(e[0],[0,100],a,!0),pe(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Fr(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?pe(s.minSpan,l,o,!0):null,s.maxSpan!=null?pe(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Et([pe(i[0],o,l,!0),pe(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=Et(n.slice()),o=this._size;b([0,1],function(h){var p=a.handles[h],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[h]+(h?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],c=0;ca[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new Te(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Et([pe(n.x,o,s,!0),pe(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(sr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Ka({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?CI:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=zm(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(Ku);function DI(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function rp(r){return r==="vertical"?"ns-resize":"ew-resize"}function II(r){r.registerComponentModel(SI),r.registerComponentView(MI),qu(r)}function kL(r){ze(xI),ze(II)}var t0={get:function(r,t,e){var a=Z((LI[r]||{})[t]);return e&&O(a)?a[a.length-1]:a}},LI={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},ap=Be.mapVisual,PI=Be.eachVisual,RI=O,np=b,EI=Et,kI=pe,eo=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&WD(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=G(e,this),this.controllerVisuals=Wv(this.option.controller,a,e),this.targetVisuals=Wv(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,a=[];return e==null||e==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=fe(e),a},t.prototype.eachTargetSeries=function(e,a){b(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],O(e)&&(e=e.slice(),u=!0);var c=a?e:u?[f(e[0]),f(e[1])]:f(e);if(H(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if($(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+c[1]:e[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=EI([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});J(i,n),J(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){RI(a.color)&&!f.inRange&&(f.inRange={color:a.color.slice().reverse()}),f.inRange=f.inRange||{color:e.get("gradientColor")}}function u(f,v,h){var p=f[v],d=f[h];p&&!d&&(d=f[h]={},np(p,function(g,y){if(Be.isValidType(y)){var m=t0.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function c(f){var v=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";np(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&Z(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=h&&Z(h)||(s?m[0]:[m[0],m[0]])),_.symbol=ap(_.symbol,function(S){return S==="none"?g:S});var x=_.symbolSize;if(x!=null){var w=-1/0;PI(x,function(S){S>w&&(w=S)}),_.symbolSize=ap(x,function(S){return kI(S,[0,w],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t})(te),ip=[20,140],OI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=ip[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=ip[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):O(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),b(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=Et((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=op(this,"outOfRange",this.getExtent()),n=op(this,"inRange",this.option.range.slice()),i=[];function o(h,p){i.push({value:h,color:e(h,p)})}for(var s=0,l=0,u=n.length,c=a.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new re(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);NI([0,1],function(f){var v=o[f];v.setStyle("fill",a.handlesColor[f]),v.y=e[f];var h=mt(e[f],[0,l[1]],u,!0),p=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=p/l[0],v.x=l[0]-p/2;var d=pt(n.handleLabelPoints[f],Ir(v,this.group));if(this._orient==="horizontal"){var g=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[f].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var v={convertOpacityToAlpha:!0},h=this.getControllerVisual(e,"color",v),p=this.getControllerVisual(e,"symbolSize"),d=mt(e,s,u,!0),g=l[0]-p/2,y={x:f.x,y:f.y};f.y=d,f.x=g;var m=pt(c.indicatorLabelPoint,Ir(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:S?x:"middle",align:S?"center":x});var A={x:g,y:d,style:{fill:h}},C={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var T={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(A,T),_.animateTo(C,T)}else f.attr(A),_.attr(C);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(f[1]=1/0),a&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var v=this._hoverLinkDataIndices,h=[];(a||cp(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var p=x_(v,h);this._dispatchHighDown("downplay",Pi(p[0],n)),this._dispatchHighDown("highlight",Pi(p[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(Cr(e.target,function(l){var u=j(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function UI(r,t,e,a){for(var n=t.targetVisuals[a],i=Be.prepareVisualTypes(n),o={color:ry(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(FI,HI),b(WI,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(YI))}function ZI(r){r.registerComponentModel(OI),r.registerComponentView(zI),n0(r)}var XI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],$I[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=Z(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=V(this._pieceList,function(l){return l=Z(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=Be.listVisualTypes(),i=this.isCategory();b(e.pieces,function(s){b(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),b(a,function(s,l){var u=!1;b(this.stateList,function(c){u=u||o(e,c,l)||o(e.target,c,l)},this),!u&&b(this.stateList,function(c){(e[c]||(e[c]={}))[l]=t0.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,b(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;b(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=Z(e)},t.prototype.getValueState=function(e){var a=Be.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Be.findPieceIndex(l,n);c===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,f){var v=i.getRepresentValue({interval:c});f||(f=i.getValueState(v));var h=e(v,f);c[0]===-1/0?n[0]=h:c[1]===1/0?n[1]=h:a.push({value:c[0],color:h},{value:c[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return b(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=fr(eo.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(eo),$I={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function pp(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var KI=(function(r){E(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,c=this._getViewData(),f=c.endsText,v=or(a.get("showLabel",!0),!f),h=!a.get("selectedMode");f&&this._renderEndsText(e,f[0],u,v,l),b(c.viewPieceList,function(p){var d=p.piece,g=new re;g.onclick=G(this._onItemClick,this,d),this._enableHoverLink(g,p.indexInModelPieceList);var y=a.getRepresentValue(d);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]],h),v){var m=this.visualMapModel.getValueState(y);g.add(new oe({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:d.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1},silent:h}))}e.add(g)},this),f&&this._renderEndsText(e,f[1],u,v,l),Lr(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:Pi(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return a0(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new re,l=this.visualMapModel.textStyleModel;s.add(new oe({style:Ce(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=V(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=Ve(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=Z(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,b(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(r0);function qI(r){r.registerComponentModel(XI),r.registerComponentView(KI),n0(r)}function OL(r){ze(ZI),ze(qI)}var jI={label:{enabled:!0},decal:{show:!1}},dp=ne(),JI={};function QI(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=Z(jI);J(a.label,r.getLocaleModel().get("aria"),!1),J(e.option,a,!1),n(),i();function n(){var u=e.getModel("decal"),c=u.get("show");if(c){var f=F();r.eachSeries(function(v){if(!v.isColorBySeries()){var h=f.get(v.type);h||(h={},f.set(v.type,h)),dp(v).scope=h}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if($(v.enableAriaDecal)){v.enableAriaDecal();return}var h=v.getData();if(v.isColorBySeries()){var m=$c(v.ecModel,v.name,JI,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",x(_,m))}else{var p=v.getRawData(),d={},g=dp(v).scope;h.each(function(w){var S=h.getRawIndex(w);d[S]=w});var y=p.count();p.each(function(w){var S=d[w],A=p.getName(w)||w+"",C=$c(v.ecModel,A,g,y),T=h.getItemVisual(S,"decal");h.setItemVisual(S,"decal",x(T,C))})}function x(w,S){var A=w?B(B({},S),w):S;return A.dirty=!0,A}})}}function i(){var u=t.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=e.getModel("label");if(f.option=q(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var v=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],x=v>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(x,{seriesCount:v}),r.eachSeries(function(C,T){if(T1?f.get(["series","multiple",L]):f.get(["series","single",L]),M=o(M,{seriesId:C.seriesIndex,seriesName:C.get("name"),seriesType:l(C.subType)});var I=C.getData();if(I.count()>h){var R=f.get(["data","partialData"]);M+=o(R,{displayCnt:h})}else M+=f.get(["data","allData"]);for(var P=f.get(["data","separator","middle"]),z=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),k=[],N=0;N=0&&a.attr(i.oldLayoutSelect),ie(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),ge(a,u,e,l)}else if(a.attr(u),!wa(a).valueAnimation){var f=se(a.style.opacity,1);a.style.opacity=0,Le(a,{style:{opacity:f}},e,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};mi(h,u,_i),mi(h,a.states.select,_i)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};mi(p,u,_i),mi(p,a.states.emphasis,_i)}nx(a,l,c,e,e)}if(n&&!n.ignore&&!n.invisible){var i=aL(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),ge(n,{shape:d},e)):(n.setShape(d),n.style.strokePercent=0,Le(n,{style:{strokePercent:1}},e)),i.oldLayout=d}},r})(),Bs=ne();function BL(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var n=Bs(e).labelManager;n||(n=Bs(e).labelManager=new nL),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var n=Bs(e).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}function yp(r){return O(r[0])}function mp(r,t){for(var e=[],a=r.length,n=0;n=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[n].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var iL={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;yp(r)&&(u=r,c=t),yp(t)&&(u=t,c=r);function f(y,m,_,x,w){var S=y.many,A=y.one;if(S.length===1&&!w){var C=m?S[0]:A,T=m?A:S[0];if(F0(C))f({many:[C],one:T},!0,_,x,!0);else{var M=s?q({delay:s(_,x)},l):l;H0(C,T,M),i(C,T,C,T,M)}}else for(var D=q({dividePath:iL[e],individualDelay:s&&function(U,k,N,W){return s(U+_,x)}},l),L=m?W0(S,A,D):U0(A,S,D),I=L.fromIndividuals,R=L.toIndividuals,P=I.length,z=0;zt.length,h=u?mp(c,u):mp(v?t:r,[v?r:t]),p=0,d=0;di0))for(var i=a.getIndices(),o=0;o0&&S.group.traverse(function(C){C instanceof Ie&&!C.animators.length&&C.animateFrom({style:{opacity:0}},A)})})}function wp(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function Ap(r){return O(r)?r.sort().join(","):r}function rr(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function hL(r,t){var e=F(),a=F(),n=F();return b(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=wp(i),c=Ap(u);a.set(c,{dataGroupId:s,data:l}),O(u)&&b(u,function(f){n.set(f,{key:c,dataGroupId:s,data:l})})}),b(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=wp(i),u=Ap(l),c=a.get(u);if(c)e.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:rr(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:rr(s),data:s}]});else if(O(l)){var f=[];b(l,function(p){var d=a.get(p);d.data&&f.push({dataGroupId:d.dataGroupId,divide:rr(d.data),data:d.data})}),f.length&&e.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:rr(s)}]})}else{var v=n.get(l);if(v){var h=e.get(v.key);h||(h={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:rr(v.data)}],newSeries:[]},e.set(v.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:rr(s)})}}}}),e}function Tp(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:rr(t.oldData[s]),groupIdDim:o.dimension})}),b(fe(r.to),function(o){var s=Tp(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:rr(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&o0(n,i,a)}function VL(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){b(fe(a.seriesTransition),function(n){b(fe(n.to),function(i){for(var o=a.updatedSeries,s=0;s