import{i as W,r as Da,m as F,c as U,e as w,a as le,b as st,d as Y,f as fe,g as po,h as O,j as ce,k as $p,l as N,n as Z,o as Bn,p as ze,P as xe,q as Sl,s as ae,t as Kp,Z as Nr,C as Wa,E as Hc,S as or,R as Uc,u as cs,v as Vn,w as pe,L as Jt,B as Yc,A as vs,x as qp,y as re,z as lt,D as jp,F as Qp,G as Jp,H as Xc,I as go,T as Zc,J as hs,K as er,M as eg,N as Ue,O as tg,Q as ye,U as rg,V as $c,W as Aa,X as be,Y as ng,_ as we,$ as zn,a0 as q,a1 as K,a2 as St,a3 as ag,a4 as Oe,a5 as J,a6 as Be,a7 as de,a8 as oe,a9 as Ma,aa as ig,ab as mt,ac as mo,ad as Kc,ae as og,af as sg,ag as lg,ah as Fn,ai as xl,aj as pi,ak as ug,al as yo,am as _o,an as fg,ao as ds,ap as bl,aq as gi,ar as cg,as as vg,at as qc,au as ln,av as Mr,aw as jc,ax as hg,ay as dg,az as pg,aA as So,aB as wl,aC as gg,aD as mg,aE as yg,aF as _g,aG as Sg,aH as Cl,aI as Tl,aJ as xg,aK as bg,aL as wg,aM as Cg,aN as Tg,aO as Dg,aP as Ag,aQ as Mg,aR as Ig,aS as Lg}from"./zrender@5.6.1-B_T0sHVE.js";import{_ as B}from"./tslib@2.3.0-BDyQ-Jie.js";var Pg=1e-4,Qc=20;function Rg(r){return r.replace(/^\s+|\s+$/g,"")}function Et(r,t,e,n){var a=t[0],i=t[1],o=e[0],s=e[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function te(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 W(r)?Rg(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Se(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),Qc),r=(+r).toFixed(t),e?r:+r}function kg(r){return r.sort(function(t,e){return t-e}),r}function pt(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 Eg(r)}function Eg(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,a=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function Jc(r,t){var e=Math.log,n=Math.LN10,a=Math.floor(e(r[1]-r[0])/n),i=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function Og(r,t){var e=Da(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),a=F(r,function(v){return(isNaN(v)?0:v)/e*n*100}),i=n*100,o=F(a,function(v){return Math.floor(v)}),s=Da(o,function(v,d){return v+d},0),l=F(a,function(v,d){return v-o[d]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return F(o,function(v){return v/n})}function Ng(r,t){var e=Math.max(pt(r),pt(t)),n=r+t;return e>Qc?n:Se(n,e)}function ev(r){var t=Math.PI*2;return(r%t+t)%t}function Ia(r){return r>-1e-4&&r=10&&t++,t}function tv(r,t){var e=ps(r),n=Math.pow(10,e),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Vt(r){var t=parseFloat(r);return t==r&&(t!==0||!W(r)||r.indexOf("x")<=0)?t:NaN}function rv(r){return!isNaN(Vt(r))}function nv(){return Math.round(Math.random()*9)}function av(r,t){return t===0?r:av(t,r%t)}function Dl(r,t){return r==null?t:t==null?r:r*t/av(r,t)}function Q(r){throw new Error(r)}function Al(r,t,e){return(t-r)*e+r}var iv="series\0",ov="\0_ec_\0";function ge(r){return r instanceof Array?r:r==null?[]:[r]}function xo(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,a=e.length;n=0||i&&le(i,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var lm=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],um=wn(lm),fm=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return um(this,t,e)},r}(),$=ue(),cm=function(r,t,e,n){if(n){var a=$(n);a.dataIndex=e,a.dataType=t,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=$(i);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},Il=1,Ll={},vv=ue(),_s=ue(),Ss=0,Ua=1,Ya=2,Ye=["emphasis","blur","select"],La=["normal","emphasis","blur","select"],vm=10,hm=9,jt="highlight",ma="downplay",pn="select",ya="unselect",gn="toggleSelect";function fr(r){return r!=null&&r!=="none"}function Xa(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function hv(r){Xa(r,"emphasis",Ya)}function dv(r){r.hoverState===Ya&&Xa(r,"normal",Ss)}function xs(r){Xa(r,"blur",Ua)}function pv(r){r.hoverState===Ua&&Xa(r,"normal",Ss)}function dm(r){r.selected=!0}function pm(r){r.selected=!1}function Pl(r,t,e){t(r,e)}function xt(r,t,e){Pl(r,t,e),r.isGroup&&r.traverse(function(n){Pl(n,t,e)})}function Rl(r,t){switch(t){case"emphasis":r.hoverState=Ya;break;case"normal":r.hoverState=Ss;break;case"blur":r.hoverState=Ua;break;case"select":r.selected=!0}}function gm(r,t,e,n){for(var a=r.style,i={},o=0;o=0,i=!1;if(r instanceof xe){var o=vv(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(fr(s)||fr(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=N({},n),u=N({},u),u.fill=s):!fr(u.fill)&&fr(s)?(i=!0,n=N({},n),u=N({},u),u.fill=Sl(s)):!fr(u.stroke)&&fr(l)&&(i||(n=N({},n),u=N({},u)),u.stroke=Sl(l)),n.style=u}}if(n&&n.z2==null){i||(n=N({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??vm)}return n}function ym(r,t,e){if(e&&e.z2==null){e=N({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??hm)}return e}function _m(r,t,e){var n=le(r.currentStates,t)>=0,a=r.style.opacity,i=n?null:gm(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=N({},e),o=N({opacity:n?a:i.opacity*.1},o),e.style=o),e}function mi(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return mm(this,r,t,e);if(r==="blur")return _m(this,r,e);if(r==="select")return ym(this,r,e)}return e}function Sm(r){r.stateProxy=mi;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=mi),e&&(e.stateProxy=mi)}function kl(r,t){!_v(r,t)&&!r.__highByOuter&&xt(r,hv)}function El(r,t){!_v(r,t)&&!r.__highByOuter&&xt(r,dv)}function Ir(r,t){r.__highByOuter|=1<<(t||0),xt(r,hv)}function Lr(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&xt(r,dv)}function xm(r){xt(r,xs)}function gv(r){xt(r,pv)}function mv(r){xt(r,dm)}function yv(r){xt(r,pm)}function _v(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Sv(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(a,i){var o=_s(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){pv(u)}),s&&e.push(i)),o.isBlured=!1}),w(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function bo(r,t,e,n){var a=n.getModel();e=e||"coordinateSystem";function i(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Co(r,t,e){xv(r,!0),xt(r,Sm),Mm(r,t,e)}function Am(r){xv(r,!1)}function rr(r,t,e,n){n?Am(r):Co(r,t,e)}function Mm(r,t,e){var n=$(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var Nl=["emphasis","blur","select"],Im={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Cn(r,t,e,n){e=e||"itemStyle";for(var a=0;a0){var c=f.duration,h=f.delay,v=f.easing,d={duration:c,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function _e(r,t,e,n,a,i){ws("update",r,t,e,n,a,i)}function Te(r,t,e,n,a,i){ws("enter",r,t,e,n,a,i)}function br(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 zl(r){return!r.isGroup}function zm(r){return r.shape!=null}function Av(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){zl(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return zm(o)&&(s.shape=N({},o.shape)),s}var i=n(r);t.traverse(function(o){if(zl(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),_e(o,l,e,$(o).dataIndex)}}})}function Mv(r,t){return F(r,function(e){var n=e[0];n=Ra(n,t.x),n=ka(n,t.x+t.width);var a=e[1];return a=Ra(a,t.y),a=ka(a,t.y+t.height),[n,a]})}function Fm(r,t){var e=Ra(r.x,t.x),n=ka(r.x+r.width,t.x+t.width),a=Ra(r.y,t.y),i=ka(r.y+r.height,t.y+t.height);if(n>=e&&i>=a)return{x:e,y:a,width:n-e,height:i-a}}function Ka(r,t,e){var n=N({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),re(a,e),new Nr(n)):Cs(r.replace("path://",""),n,e,"center")}function Gm(r,t,e,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=yi(v,d,f,c)/h;return!(g<0||g>1)}function yi(r,t,e,n){return r*n-e*t}function Wm(r){return r<=1e-6&&r>=-1e-6}function Hn(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,a=W(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&w(ze(l),function(f){lt(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=$(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:re({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function Fl(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Un(r,t){if(r)if(O(r))for(var e=0;e=0&&s.push(l)}),s}}function Ms(r,t){return q(q({},r,!0),t,!0)}const ry={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:". "}}}},ny={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 Ea="ZH",Is="EN",wr=Is,Sa={},Ls={},Ev=ce.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||wr).toUpperCase();return r.indexOf(Ea)>-1?Ea:wr}():wr;function Ov(r,t){r=r.toUpperCase(),Ls[r]=new ve(t),Sa[r]=t}function ay(r){if(W(r)){var t=Sa[r.toUpperCase()]||{};return r===Ea||r===Is?K(t):q(K(t),K(Sa[wr]),!1)}else return q(K(r),K(Sa[wr]),!1)}function iy(r){return Ls[r]}function oy(){return Ls[wr]}Ov(Is,ry);Ov(Ea,ny);var Ps=1e3,Rs=Ps*60,mn=Rs*60,He=mn*24,Xl=He*365,un={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}"},qn="{yyyy}-{MM}-{dd}",Zl={year:"{yyyy}",month:"{yyyy}-{MM}",day:qn,hour:qn+" "+un.hour,minute:qn+" "+un.minute,second:qn+" "+un.second,millisecond:un.none},xi=["year","month","day","hour","minute","second","millisecond"],Nv=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Tt(r,t){return r+="","0000".substr(0,t-r.length)+r}function Cr(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 sy(r){return r===Cr(r)}function ly(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ja(r,t,e,n){var a=yt(r),i=a[ks(e)](),o=a[Tr(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[Qa(e)](),u=a["get"+(e?"UTC":"")+"Day"](),f=a[An(e)](),c=(f-1)%12+1,h=a[Ja(e)](),v=a[ei(e)](),d=a[ti(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof ve?n:iy(n||Ev)||oy(),y=m.getModel("time"),_=y.get("month"),S=y.get("monthAbbr"),b=y.get("dayOfWeek"),x=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Tt(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Tt(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Tt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Tt(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Tt(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Tt(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Tt(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Tt(d,3)).replace(/{S}/g,d+"")}function uy(r,t,e,n,a){var i=null;if(W(e))i=e;else if(Z(e))i=e(r.value,t,{level:r.level});else{var o=N({},un);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 c=r.level==null?0:r.level>=0?r.level:i.length+r.level;c=Math.min(c,i.length-1),i=i[c]}}return ja(new Date(r.value),i,a,n)}function Bv(r,t){var e=yt(r),n=e[Tr(t)]()+1,a=e[Qa(t)](),i=e[An(t)](),o=e[Ja(t)](),s=e[ei(t)](),l=e[ti(t)](),u=l===0,f=u&&s===0,c=f&&o===0,h=c&&i===0,v=h&&a===1,d=v&&n===1;return d?"year":v?"month":h?"day":c?"hour":f?"minute":u?"second":"millisecond"}function $l(r,t,e){var n=fe(r)?yt(r):r;switch(t=t||Bv(r,e),t){case"year":return n[ks(e)]();case"half-year":return n[Tr(e)]()>=6?1:0;case"quarter":return Math.floor((n[Tr(e)]()+1)/4);case"month":return n[Tr(e)]();case"day":return n[Qa(e)]();case"half-day":return n[An(e)]()/24;case"hour":return n[An(e)]();case"minute":return n[Ja(e)]();case"second":return n[ei(e)]();case"millisecond":return n[ti(e)]()}}function ks(r){return r?"getUTCFullYear":"getFullYear"}function Tr(r){return r?"getUTCMonth":"getMonth"}function Qa(r){return r?"getUTCDate":"getDate"}function An(r){return r?"getUTCHours":"getHours"}function Ja(r){return r?"getUTCMinutes":"getMinutes"}function ei(r){return r?"getUTCSeconds":"getSeconds"}function ti(r){return r?"getUTCMilliseconds":"getMilliseconds"}function fy(r){return r?"setUTCFullYear":"setFullYear"}function Vv(r){return r?"setUTCMonth":"setMonth"}function zv(r){return r?"setUTCDate":"setDate"}function Fv(r){return r?"setUTCHours":"setHours"}function Gv(r){return r?"setUTCMinutes":"setMinutes"}function Wv(r){return r?"setUTCSeconds":"setSeconds"}function Hv(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Uv(r){if(!rv(r))return W(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Yv(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var ri=ag;function Io(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&zn(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?yt(r):r;if(isNaN(+l)){if(s)return"-"}else return ja(l,n,e)}if(t==="ordinal")return po(r)?a(r):fe(r)&&i(r)?r+"":"-";var u=Vt(r);return i(u)?Uv(u):po(r)?a(r):typeof r=="boolean"?r+"":"-"}var Kl=["a","b","c","d","e","f","g"],bi=function(r,t){return"{"+r+(t??"")+"}"};function Xv(r,t,e){O(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function nr(r,t){return t=t||"transparent",W(r)?r:Y(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function ql(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var xa=w,vy=["left","right","top","bottom","width","height"],jn=[["width","left","right"],["height","top","bottom"]];function Es(r,t,e,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),h=c&&c.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(h?-h.x+f.x:0);v=i+p,v>n||l.newline?(i=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);d=o+g,d>a||l.newline?(i+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+e:o=d+e)})}var Dr=Es;J(Es,"vertical");J(Es,"horizontal");function Ft(r,t,e){e=ri(e||0);var n=t.width,a=t.height,i=te(r.left,n),o=te(r.top,a),s=te(r.right,n),l=te(r.bottom,a),u=te(r.width,n),f=te(r.height,a),c=e[2]+e[0],h=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(f)&&(f=a-l-c-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-f-c),r.left||r.right){case"center":i=n/2-u/2-e[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-e[0];break;case"bottom":o=a-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(f)&&(f=a-c-o-(l||0));var d=new Ue(i+e[3],o+e[0],u,f);return d.margin=e,d}function hy(r,t,e,n,a,i){i=i||r,i.x=r.x,i.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=Ft(re({width:o.width,height:o.height},t),e,n),u=l.x-o.x,f=l.y-o.y;return i.x+=u,i.y+=f,i===r&&r.markRedraw(),!0}function Mn(r){var t=r.layoutMode||r.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function Pr(r,t,e){var n=e&&e.ignoreSize;!O(n)&&(n=[n,n]);var a=o(jn[0],0),i=o(jn[1],1);u(jn[0],r,a),u(jn[1],r,i);function o(f,c){var h={},v=0,d={},p=0,g=2;if(xa(f,function(_){d[_]=r[_]}),xa(f,function(_){s(t,_)&&(h[_]=d[_]=t[_]),l(h,_)&&v++,l(d,_)&&p++}),n[c])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return h;for(var m=0;m=0;l--)s=q(s,a[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var a=e+"Index",i=e+"Id";return Wn(this.ecModel,e,{index:this.get(a,!0),id:this.get(i,!0)},n)},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);cv(ee,ve);Ha(ee);ey(ee);ty(ee,gy);function gy(r){var t=[];return w(ee.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=F(t,function(e){return rt(e).main}),r!=="dataset"&&le(t,"dataset")<=0&&t.unshift("dataset"),t}var Zv="";typeof navigator<"u"&&(Zv=navigator.platform||"");var cr="rgba(0, 0, 0, 0.2)";const my={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:cr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:cr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:cr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:cr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:cr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:cr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Zv.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 $v=U(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Xe="original",ke="arrayRows",Ze="objectRows",ut="keyedColumns",Nt="typedArray",Kv="unknown",ot="column",Fr="row",Ce={Must:1,Might:2,Not:3},qv=ue();function yy(r){qv(r).datasetMap=U()}function jv(r,t,e){var n={},a=Os(t);if(!a||!r)return n;var i=[],o=[],s=t.ecModel,l=qv(s).datasetMap,u=a.uid+"_"+e.seriesLayoutBy,f,c;r=r.slice(),w(r,function(p,g){var m=Y(p)?p:r[g]={name:p};m.type==="ordinal"&&f==null&&(f=g,c=d(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});w(r,function(p,g){var m=p.name,y=d(p);if(f==null){var _=h.valueWayDim;v(n[m],_,y),v(o,_,y),h.valueWayDim+=y}else if(f===g)v(n[m],0,y),v(i,0,y);else{var _=h.categoryWayDim;v(n[m],_,y),v(o,_,y),h.categoryWayDim+=y}});function v(p,g,m){for(var y=0;yt)return r[n];return r[e-1]}function eh(r,t,e,n,a,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?e:Cy(n,o);if(f=f||e,!(!f||!f.length)){var c=f[l];return a&&(u[a]=c),s.paletteIdx=(l+1)%f.length,c}}function Ty(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Qn,Zr,Jl,eu="\0_ec_inner",Dy=1,Bs=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,a,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,n,a){var i=nu(n);this._optionManager.setOption(e,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,n){return this._resetOption(e,nu(n))},t.prototype._resetOption=function(e,n){var a=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?Jl(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&w(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=U(),u=n&&n.replaceMergeMainTypeMap;yy(this),w(e,function(c,h){c!=null&&(ee.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?K(c):q(a[h],c,!0))}),u&&u.each(function(c,h){ee.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),ee.topologicalTravel(s,ee.getAllClassMainTypes(),f,this);function f(c){var h=by(this,c,ge(e[c])),v=i.get(c),d=v?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=Fg(v,h,d);$g(p,c,ee),a[c]=null,i.set(c,null),o.set(c,0);var g=[],m=[],y=0,_;w(p,function(S,b){var x=S.existing,C=S.newOption;if(!C)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=c==="series",D=ee.getClass(c,S.keyInfo.subType,!T);if(!D)return;if(c==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=S.keyInfo.name,x.mergeOption(C,this),x.optionUpdated(C,!1);else{var A=N({componentIndex:b},S.keyInfo);x=new D(C,this,this,A),N(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(C,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),a[c]=g,i.set(c,m),o.set(c,y),c==="series"&&Qn(this)}this._seriesIndices||Qn(this)},t.prototype.getOption=function(){var e=K(this.option);return w(e,function(n,a){if(ee.hasClass(a)){for(var i=ge(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!bn(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[a]=i}}),delete e[eu],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,n){var a=this._componentsMap.get(e);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function Oy(r,t){return r.join(",")===t.join(",")}var $e=w,In=Y,au=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ci(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=au.length;e=0;g--){var m=r[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=Ng(h,y),p=y;break}}}return n[0]=h,n[1]=p,n})})}var ai=function(){function r(t){this.data=t.data||(t.sourceFormat===ut?{}:[]),this.sourceFormat=t.sourceFormat||Kv,this.seriesLayoutBy=t.seriesLayoutBy||ot,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;np&&(p=_)}v[0]=d,v[1]=p}},a=function(){return this._data?this._data.length/this._dimSize:0};cu=(t={},t[ke+"_"+ot]={pure:!0,appendData:i},t[ke+"_"+Fr]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ze]={pure:!0,appendData:i},t[ut]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[Xe]={appendData:i},t[Nt]={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;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Rr(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function pu(r){var t,e;return Y(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function yn(r){return new Jy(r)}var Jy=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,n=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||v1&&n>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},t0=function(){function r(t,e){if(!fe(e)){var n="";Q(n)}this._opFn=vh[t],this._rvalFloat=Vt(e)}return r.prototype.evaluate=function(t){return fe(t)?this._opFn(t,this._rvalFloat):this._opFn(Vt(t),this._rvalFloat)},r}(),hh=function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=fe(t)?t:Vt(t),a=fe(e)?e:Vt(e),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=W(t),l=W(e);s&&(n=l?t:0),l&&(a=s?e:0)}return na?-this._resultLT:0},r}(),r0=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Vt(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=Vt(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function n0(r,t){return r==="eq"||r==="ne"?new r0(r==="eq",t):lt(vh,r)?new t0(r,t):null}var a0=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ba(t,e)},r}();function i0(r,t){var e=new a0,n=r.data,a=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==ot&&Q(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";lt(l,m)&&Q(_),l[m]=y}});else for(var f=0;f65535?h0:d0}function hr(){return[1/0,-1/0]}function p0(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function yu(r,t,e,n,a){var i=gh[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(y){return y.property}),f=0;fm[1]&&(m[1]=g)}}!a.persistent&&a.clean&&a.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,n=e[t];if(n!=null&&nt)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var a=this._chunks,i=a[t],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i=c&&y<=h||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],S=t[a[1]][0],b=t[a[1]][1],m=0;m=c&&y<=h||isNaN(y))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var m=0;m=c&&y<=h||isNaN(y))&&(l[u++]=C)}else for(var m=0;mt[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(m))}return um[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,c,h,v=new(vr(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=c,h=S)}M>0&&Ms&&(p=s-f);for(var g=0;gd&&(d=y,v=f+g)}var _=this.getRawIndex(c),S=this.getRawIndex(v);cf-d&&(l=f-d,s.length=l);for(var p=0;pc[1]&&(c[1]=m),h[v++]=y}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();il&&(l=c)}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 n=[],a=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,n,a,i){return ba(e[i],this._dimensions[i])}Ai={arrayRows:t,objectRows:function(e,n,a,i){return ba(e[n],this._dimensions[i])},keyedColumns:t,original:function(e,n,a,i){var o=e&&(e.value==null?e:e.value);return ba(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,n,a,i){return e[i]}}}(),r}(),mh=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(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(),n=!!e.length,a,i;if(Jn(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Be(s)?Nt:Xe,i=[];var c=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=ae(c.seriesLayoutBy,h.seriesLayoutBy)||null,d=ae(c.sourceHeader,h.sourceHeader),p=ae(c.dimensions,h.dimensions),g=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;a=g?[Po(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);a=y.sourceList,i=y.upstreamSignList}else{var _=m.get("source",!0);a=[Po(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&Su(i)}var o,s=[],l=[];return w(t,function(u){u.prepareSource();var f=u.getSource(a||0),c="";a!=null&&!f&&Su(c),s.push(f),l.push(u._getVersionSign())}),n?o=c0(n,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[Yy(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 w(r.blocks,function(a){var i=xh(a);i>=t&&(t=i+ +(n&&(!i||ko(a)&&!a.noHeader)))}),t}return 0}function _0(r,t,e,n){var a=t.noHeader,i=x0(xh(t)),o=[],s=t.blocks||[];st(!s||O(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(lt(u,l)){var f=new hh(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(p,g){var m=t.valueFormatter,y=Sh(p)(m?N(N({},r),{valueFormatter:m}):r,p,g>0?i.html:0,n);y!=null&&o.push(y)});var c=r.renderMode==="richText"?o.join(i.richText):Eo(n,o.join(""),a?e:i.html);if(a)return c;var h=Io(t.header,"ordinal",r.useUTC),v=_h(n,r.renderMode).nameStyle,d=yh(n);return r.renderMode==="richText"?bh(r,h,v)+i.richText+c:Eo(n,'
'+Oe(h)+"
"+c,e)}function S0(r,t,e,n){var a=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=O(S)?S:[S],F(S,function(b,x){return Io(b,O(v)?v[x]:v,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),h=i?"":Io(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!i,g=!s&&i,m=_h(n,a),y=m.nameStyle,_=m.valueStyle;return a==="richText"?(s?"":c)+(i?"":bh(r,h,y))+(o?"":C0(r,d,p,g,_)):Eo(n,(s?"":c)+(i?"":b0(h,!s,y))+(o?"":w0(d,p,g,_)),e)}}function xu(r,t,e,n,a,i){if(r){var o=Sh(r),s={useUTC:a,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function x0(r){return{html:m0[r],richText:y0[r]}}function Eo(r,t,e){var n='
',a="margin: "+e+"px 0 0",i=yh(r);return'
'+t+n+"
"}function b0(r,t,e){var n=t?"margin-left:2px":"";return''+Oe(r)+""}function w0(r,t,e,n){var a=e?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return r=O(r)?r:[r],''+F(r,function(o){return Oe(o)}).join("  ")+""}function bh(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function C0(r,t,e,n,a){var i=[a],o=n?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(O(t)?t.join(" "):t,i)}function T0(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return nr(n)}function wh(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Mi=function(){function r(){this.richTextStyles={},this._nextStyleNameId=nv()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var a=n==="richText"?this._generateStyleName():null,i=cy({color:e,type:t,renderMode:n,markerId:a});return W(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};O(e)?w(e,function(i){return N(n,i)}):N(n,e);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},r}();function D0(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=O(s),u=T0(t,e),f,c,h,v;if(o>1||l&&!o){var d=A0(s,t,e,i,u);f=d.inlineValues,c=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=f=Rr(a,e,i[0]),c=p.type}else v=f=l?s[0]:s;var g=gs(t),m=g&&t.name||"",y=a.getName(e),_=n?m:y;return Ln("section",{header:m,noHeader:n||!g,sortParam:v,blocks:[Ln("nameValue",{markerType:"item",markerColor:u,name:_,noName:!zn(_),value:f,valueType:c,dataIndex:e})].concat(h||[])})}function A0(r,t,e,n,a){var i=t.getData(),o=Da(r,function(c,h,v){var d=i.getDimensionInfo(v);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?w(n,function(c){f(Rr(i,e,c),c)}):w(r,f);function f(c,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Ln("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Dt=ue();function ea(r,t){return r.getName(t)||r.getId(t)}var wa="__universalTransitionEnabled",Ve=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,a){this.seriesIndex=this.componentIndex,this.dataTask=yn({count:I0,reset:L0}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var i=Dt(this).sourceManager=new mh(this);i.prepareSource();var o=this.getInitialData(e,a);wu(o,this),this.dataTask.context.data=o,Dt(this).dataBeforeProcessed=o,bu(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=Mn(this),i=a?ni(e):{},o=this.subType;ee.hasClass(o)&&(o+="Series"),q(e,n.getTheme().get(this.subType)),q(e,this.getDefaultOption()),xo(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&Pr(e,i,a)},t.prototype.mergeOption=function(e,n){e=q(this.option,e,!0),this.fillDataTextStyle(e.data);var a=Mn(this);a&&Pr(this.option,e,a);var i=Dt(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,n);wu(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Dt(this).dataBeforeProcessed=o,bu(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Be(e))for(var n=["show"],a=0;athis.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,a){var i=this.ecModel,o=Ns.prototype.getColorFromPalette.call(this,e,n,a);return o||(o=i.getColorFromPalette(e,n,a)),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,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(e,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[ea(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[wa])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Y(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ee.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}(ee);St(Ve,Qy);St(Ve,Ns);cv(Ve,ee);function bu(r){var t=r.name;gs(r)||(r.name=M0(r)||t)}function M0(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return w(e,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function I0(r){return r.model.getRawData().count()}function L0(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),P0}function P0(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function wu(r,t){w(ig(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,J(R0,t))})}function R0(r,t){var e=Oo(r);return e&&e.setOutputEnd((t||this).count()),t}function Oo(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Ne=function(){function r(){this.group=new ye,this.uid=Yn("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){},r.prototype.updateLayout=function(t,e,n,a){},r.prototype.updateVisual=function(t,e,n,a){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();ys(Ne);Ha(Ne);function Xn(){var r=ue();return function(t){var e=r(t),n=t.pipelineContext,a=!!e.large,i=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var Ch=ue(),k0=Xn(),Re=function(){function r(){this.group=new ye,this.uid=Yn("viewChart"),this.renderTask=yn({plan:E0,reset:O0}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.highlight=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&Tu(i,a,"emphasis")},r.prototype.downplay=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&Tu(i,a,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateLayout=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateVisual=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.eachRendered=function(t){Un(this.group,t)},r.markUpdateMethod=function(t,e){Ch(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Cu(r,t,e){r&&To(r)&&(t==="emphasis"?Ir:Lr)(r,e)}function Tu(r,t,e){var n=tr(r,t),a=t&&t.highlightKey!=null?Lm(t.highlightKey):null;n!=null?w(ge(n),function(i){Cu(r.getItemGraphicEl(i),e,a)}):r.eachItemGraphicEl(function(i){Cu(i,e,a)})}ys(Re);Ha(Re);function E0(r){return k0(r.model)}function O0(r){var t=r.model,e=r.ecModel,n=r.api,a=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=a&&Ch(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,a),N0[l]}var N0={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Oa="\0__throttleOriginMethod",Du="\0__throttleRate",Au="\0__throttleType";function Ws(r,t,e){var n,a=0,i=0,o=null,s,l,u,f;t=t||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d=0?c():o=setTimeout(c,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){f=v},h}function Th(r,t,e,n){var a=r[t];if(a){var i=a[Oa]||a,o=a[Au],s=a[Du];if(s!==e||o!==n){if(e==null)return r[t]=i;a=r[t]=Ws(i,e,n==="debounce"),a[Oa]=i,a[Au]=n,a[Du]=e}return a}}function No(r,t){var e=r[t];e&&e[Oa]&&(e.clear&&e.clear(),r[t]=e[Oa])}var Mu=ue(),Iu={itemStyle:wn(kv,!0),lineStyle:wn(Rv,!0)},B0={lineStyle:"stroke",itemStyle:"fill"};function Dh(r,t){var e=r.visualStyleMapper||Iu[t];return e||(console.warn("Unknown style type '"+t+"'."),Iu.itemStyle)}function Ah(r,t){var e=r.visualDrawType||B0[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var V0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=Dh(r,n),o=i(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=Ah(r,n),u=o[l],f=Z(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Z(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Z(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=N({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},Kr=new ve,z0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=Dh(r,n),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Kr.option=l[n];var u=a(Kr),f=o.ensureUniqueItemVisual(s,"style");N(f,u),Kr.option.decal&&(o.setItemVisual(s,"decal",Kr.option.decal),Kr.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},F0={performRawSeries:!0,overallReset:function(r){var t=U();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),Mu(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),a={},i=e.getData(),o=Mu(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=Ah(e,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var h=i.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=e.getColorFromPalette(v,o,d)}})}})}},ta=Math.PI;function G0(r,t){t=t||{},re(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 ye,n=new pe({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var a=new we({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 pe({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new vs({shape:{startAngle:-ta/2,endAngle:-ta/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:ta*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ta*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.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),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Mh=function(){function r(t,e,n,a){this._stageTaskMap=U(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!e&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.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 n=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=U();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;w(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";st(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,e,n),a.overallReset&&this._createOverallStageTask(a,i,e,n)},this)},r.prototype.prepareView=function(t,e,n,a){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=a,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,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,a){a=a||{};var i=!1,o=this;w(t,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else c&&c.each(function(g,m){s(a,g)&&g.dirty();var y=o.getPerformArgs(g,a.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(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(n){e=n.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,n,a){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=U(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(c){var h=c.uid,v=s.set(h,o&&o.get(h)||yn({plan:X0,reset:Z0,count:K0}));v.context={model:c,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,n,a){var i=this,o=e.overallTask=e.overallTask||yn({reset:W0});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=U(),u=t.seriesType,f=t.getTargetSeries,c=!0,h=!1,v="";st(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,a).each(d):(c=!1,w(n.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(h=!0,yn({reset:H0,onDirty:Y0})));m.context={model:p,overallProgress:c},m.agent=o,m.__block=c,i._pipe(p,m)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return Z(t)&&(t={overallReset:t,seriesType:q0(t)}),t.uid=Yn("stageHandler"),e&&(t.visualType=e),t},r}();function W0(r){r.overallReset(r.ecModel,r.api,r.payload)}function H0(r){return r.overallProgress&&U0}function U0(){this.agent.dirty(),this.getDownstream().dirty()}function Y0(){this.agent&&this.agent.dirty()}function X0(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Z0(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=ge(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?F(t,function(e,n){return Ih(n)}):$0}var $0=Ih(0);function Ih(r){return function(t,e){var n=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var i=t.start;i0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:a}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,i));function f(c,h,v,d){return c[v]==null||h[d||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Bo=["symbol","symbolSize","symbolRotate","symbolOffset"],ku=Bo.concat(["symbolKeepAspect"]),J0={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 n={},a={},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,n,a){if(!this[De]){if(this._disposed){this.id;return}var i,o,s;if(Y(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[De]=!0,!this._model||n){var l=new Py(this._api),u=this._theme,f=this._model=new Bs;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Go);var c={seriesTransition:s,optionChanged:!0};if(a)this[Ee]={silent:i,updateParams:c},this[De]=!1,this.getZr().wakeUp();else{try{pr(this),At.update.call(this,null,c)}catch(h){throw this[Ee]=null,this[De]=!1,h}this._ssr||this._zr.flush(),this[Ee]=null,this[De]=!1,qr.call(this,i),jr.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||ce.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(ce.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return w(n,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,a=this._model,i=[],o=this;w(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return w(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Hu[a]){var l=s,u=s,f=-s,c=-s,h=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();w(Sn,function(_,S){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(K(e)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),c=o(x.bottom,c),h.push({dom:b,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,c*=v;var d=f-l,p=c-u,g=Kc.createCanvas(),m=xl(g,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:p}),n){var y="";return w(h,function(_){var S=_.left-l,b=_.top-u;y+=''+_.dom+""}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new pe({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),w(h,function(_){var S=new Nr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(S)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return ki(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return ki(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var a=this._model,i,o=dn(a,e);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(n,u))}},this)},this),!!i},t.prototype.getVisual=function(e,n){var a=this._model,i=dn(a,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?t_(s,l,n):r_(s,n)},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;w(k_,function(n){var a=function(i){var o=e.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&cn(s,function(d){var p=$(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=N({},p.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),v=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=i,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},e.trigger(n,l)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)}),w(_n,function(n,a){e._messageCenter.on(a,function(i){this.trigger(a,i)},e)}),w(["selectchanged"],function(n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),a_(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&&lv(this.getDom(),Xs,"");var n=this,a=n._api,i=n._model;w(n._componentsViews,function(o){o.dispose(i,a)}),w(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Sn[n.id]},t.prototype.resize=function(e){if(!this[De]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=e&&e.silent;this[Ee]&&(i==null&&(i=this[Ee].silent),a=!0,this[Ee]=null),this[De]=!0;try{a&&pr(this),At.update.call(this,{type:"resize",animation:N({duration:0},e&&e.animation)})}catch(o){throw this[De]=!1,o}this[De]=!1,qr.call(this,i),jr.call(this,i)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(Y(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!Wo[e]){var a=Wo[e](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},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 n=N({},e);return n.type=_n[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(Y(n)||(n={silent:!!n}),!!Ba[e.type]&&this._model){if(this[De]){this._pendingActions.push(e);return}var a=n.silent;Oi.call(this,e,a);var i=n.flush;i?this._zr.flush():i!==!1&&ce.browser.weChat&&this._throttledZrFlush(),qr.call(this,a),jr.call(this,a)}},t.prototype.updateLabelLayout=function(){qe.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){pr=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Ri(c,!0),Ri(c,!1),h.plan()},Ri=function(c,h){for(var v=c._model,d=c._scheduler,p=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,_=0;_h.get("hoverLayerThreshold")&&!ce.node&&!ce.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=c._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var v=c.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(c,h){if(!c.preventAutoZ){var v=c.get("z")||0,d=c.get("zlevel")||0;h.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(c,h,v,d){var p=c.getTextContent(),g=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),_=0;_0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(br(m))return;if(m instanceof xe&&Pm(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),S=m.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}m.__dirty&&a(m)}})}Gu=function(c){return new(function(h){B(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){Ir(d,p),Fe(c)},v.prototype.leaveEmphasis=function(d,p){Lr(d,p),Fe(c)},v.prototype.enterBlur=function(d){xm(d),Fe(c)},v.prototype.leaveBlur=function(d){gv(d),Fe(c)},v.prototype.enterSelect=function(d){mv(d),Fe(c)},v.prototype.leaveSelect=function(d){yv(d),Fe(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},v}(th))(c)},Yh=function(c){function h(v,d){for(var p=0;p=0)){Uu.push(e);var i=Mh.wrapStageHandler(e,a);i.__prio=t,i.__raw=e,r.push(i)}}function jh(r,t){Wo[r]=t}function F_(r,t,e){var n=y_("registerMap");n&&n(r,t,e)}var G_=f0;sr(Us,V0);sr(oi,z0);sr(oi,F0);sr(Us,J0);sr(oi,e_);sr(zh,g_);Kh(nh);qh(x_,Hy);jh("default",G0);ft({type:jt,event:jt,update:jt},mt);ft({type:ma,event:ma,update:ma},mt);ft({type:pn,event:pn,update:pn},mt);ft({type:ya,event:ya,update:ya},mt);ft({type:gn,event:gn,update:gn},mt);$h("light",j0);$h("dark",Rh);function Qr(r){return r==null?0:r.length||1}function Yu(r){return r}var Rn=function(){function r(t,e,n,a,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Yu,this._newKeyGetter=a||Yu,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},a=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,a,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(c===1&&h===1)this._update&&this._update(f,u),a[l]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(c>1)for(var v=0;v1)for(var s=0;s30}var Jr=Y,Mt=F,Z_=typeof Int32Array>"u"?Array:Int32Array,$_="e\0\0",Xu=-1,K_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],q_=["_approximateExtent"],Zu,ia,en,tn,Vi,rn,zi,nd=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 n,a=!1;Jh(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=e)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Xe;if(l&&!a.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[e];return i==null&&(i=this.getVisual(e),O(i)?i=i.slice():Jr(i)&&(i=N({},i)),a[e]=i),i},r.prototype.setItemVisual=function(t,e,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,Jr(e)?N(a,e):a[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Jr(t)?N(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,n){this._itemLayouts[t]=n?N(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;cm(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){w(this._graphicEls,function(n,a){n&&t&&t.call(e,n,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Mt(this.dimensions,this._getDimInfo,this),this.hostModel)),Vi(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];Z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return e.apply(this,[a].concat(ug(arguments)))})},r.internalField=function(){Zu=function(t){var e=t._invertedIndicesMap;w(e,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=e[a]=new Z_(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[e]=l}}}(),r}();function ad(r,t){zs(r)||(r=ah(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],a=U(),i=[],o=Q_(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&rd(o),l=n===r.dimensionsDefine,u=l?td(r):ed(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var c=U(f),h=new ph(o),v=0;v0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function Q_(r,t,e,n){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return w(t,function(i){var o;Y(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function J_(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var eS=function(){function r(t){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=t}return r}();function tS(r){var t=r.get("coordinateSystem"),e=new eS(t),n=rS[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var rS={cartesian2d:function(r,t,e,n){var a=r.getReferringComponents("xAxis",Pe).models[0],i=r.getReferringComponents("yAxis",Pe).models[0];t.coordSysDims=["x","y"],e.set("x",a),e.set("y",i),gr(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),gr(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var a=r.getReferringComponents("singleAxis",Pe).models[0];t.coordSysDims=["single"],e.set("single",a),gr(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var a=r.getReferringComponents("polar",Pe).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),gr(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),gr(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();w(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];e.set(f,u),gr(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function gr(r){return r.get("type")==="category"}function nS(r,t,e){e=e||{};var n=e.byIndex,a=e.stackedCoordDimension,i,o,s;aS(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,c,h;if(w(i,function(y,_){W(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;w(i,function(y){y.coordDim===v&&p++});var g={name:c,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),m.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(i.push(g),i.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function aS(r){return!Jh(r.schema)}function kr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function iS(r,t){return kr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function oS(r,t){var e=r.get("coordinateSystem"),n=Vs.get(e),a;return t&&t.coordSysDims&&(a=F(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=Ho(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function sS(r,t,e){var n,a;return e&&w(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function si(r,t,e){e=e||{};var n=t.getSourceManager(),a,i=!1;a=n.getSource(),i=a.sourceFormat===Xe;var o=tS(t),s=oS(t,o),l=e.useEncodeDefaulter,u=Z(l)?l:l?J(jv,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=ad(a,f),h=sS(c.dimensions,e.createInvertedIndices,o),v=i?null:n.getSharedDataStore(c),d=nS(t,{schema:c,store:v}),p=new nd(c,t);p.setCalculationInfo(d);var g=h!=null&&lS(a)?function(m,y,_,S){return S===h?_:this.defaultDimValueGetter(m,y,_,S)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,g),p}function lS(r){if(r.sourceFormat===Xe){var t=uS(r.data||[]);return!O(Gn(t))}}function uS(r){for(var t=0;te[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 n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[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}();Ha(ct);var fS=0,Uo=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++fS}return r.createByAxisModel=function(t){var e=t.option,n=e.data,a=n&&F(n,cS);return new r({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!W(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=U(this.categories))},r}();function cS(r){return Y(r)&&r.value!=null?r.value:r+""}function Yo(r){return r.type==="interval"||r.type==="log"}function vS(r,t,e,n){var a={},i=r[1]-r[0],o=a.interval=tv(i/t);e!=null&&on&&(o=a.interval=n);var s=a.intervalPrecision=id(o),l=a.niceTickExtent=[Se(Math.ceil(r[0]/o)*o,s),Se(Math.floor(r[1]/o)*o,s)];return hS(l,r),a}function Fi(r){var t=Math.pow(10,ps(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Se(e*t)}function id(r){return pt(r)+2}function $u(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function hS(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),$u(r,0,t),$u(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function li(r,t){return r>=t[0]&&r<=t[1]}function ui(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function fi(r,t){return r*(t[1]-t[0])+t[0]}var Ks=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Uo({})),O(a)&&(a=new Uo({categories:F(a,function(i){return Y(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:W(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),li(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),ui(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(fi(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,a=n[0];a<=n[1];)e.push({value:a}),a++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.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}(ct);ct.registerClass(Ks);var Zt=Se,Gr=function(r){B(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 li(e,this._extent)},t.prototype.normalize=function(e){return ui(e,this._extent)},t.prototype.scale=function(e){return fi(e,this._extent)},t.prototype.setExtent=function(e,n){var a=this._extent;isNaN(e)||(a[0]=parseFloat(e)),isNaN(n)||(a[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=id(e)},t.prototype.getTicks=function(e){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return a[1]>f&&(e?s.push({value:Zt(f+n,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;oi[0]&&v0&&(i=i===null?s:Math.min(i,s))}e[n]=i}}return e}function ud(r){var t=gS(r),e=[];return w(r,function(n){var a=n.coordinateSystem,i=a.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],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=u?f/h*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=te(n.get("barWidth"),s),p=te(n.get("barMaxWidth"),s),g=te(n.get("barMinWidth")||(hd(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:qs(i),stackId:sd(n)})}),mS(e)}function mS(r){var t={};w(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return w(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=ze(i).length;s=Math.max(35-l*4,15)+"%"}var u=te(s,o),f=te(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,v=(c-u)/(h+(h-1)*f);v=Math.max(v,0),w(i,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var S=m.width;y&&(S=Math.min(S,y)),_&&(S=Math.max(S,_)),m.width=S,c-=S+f*S,h--}else{var S=v;y&&yS&&(S=_),S!==v&&(m.width=S,c-=S+f*S,h--)}}),v=(c-u)/(h+(h-1)*f),v=Math.max(v,0);var d=0,p;w(i,function(m,y){m.width||(m.width=v),p=m,d+=m.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;w(i,function(m,y){e[a][y]=e[a][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+f)})}),e}function yS(r,t,e){if(r&&t){var n=r[qs(t)];return n}}function fd(r,t){var e=ld(r,t),n=ud(e);w(e,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=sd(a),u=n[qs(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function cd(r){return{seriesType:r,plan:Xn(),reset:function(t){if(vd(t)){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),c=kr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=_S(a,i),d=hd(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&nt(b*3),C=d&&l&&nt(b*3),T=d&&nt(b),D=n.master.getRect(),A=h?D.width:D.height,M,L=S.getStore(),I=0;(M=_.next())!=null;){var P=L.get(c?g:o,M),R=L.get(s,M),V=v,H=void 0;c&&(H=+P-L.get(o,M));var E=void 0,k=void 0,z=void 0,G=void 0;if(h){var X=n.dataToPoint([P,R]);if(c){var j=n.dataToPoint([H,R]);V=j[0]}E=V,k=X[1]+y,z=X[0]-V,G=m,Math.abs(z)0?e:1:e))}var SS=function(r,t,e,n){for(;e>>1;r[a][1]a&&(this._approxInterval=a);var s=oa.length,l=Math.min(SS(oa,this._approxInterval,0,s),s-1);this._interval=oa[l][1],this._minLevelUnit=oa[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return fe(e)?e:+yt(e)},t.prototype.contain=function(e){return li(this.parse(e),this._extent)},t.prototype.normalize=function(e){return ui(this.parse(e),this._extent)},t.prototype.scale=function(e){return fi(e,this._extent)},t.type="time",t}(Gr),oa=[["second",Ps],["minute",Rs],["hour",mn],["quarter-day",mn*6],["half-day",mn*12],["day",He*1.2],["half-week",He*3.5],["week",He*7],["month",He*31],["quarter",He*95],["half-year",Xl/2],["year",Xl]];function xS(r,t,e,n){var a=yt(t),i=yt(e),o=function(d){return $l(a,d,n)===$l(i,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},v=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return v()}}function bS(r,t){return r/=He,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function wS(r){var t=30*He;return r/=t,r>6?6:r>3?3:r>2?2:1}function CS(r){return r/=mn,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Ku(r,t){return r/=t?Rs:Ps,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function TS(r){return tv(r)}function DS(r,t,e){var n=new Date(r);switch(Cr(t)){case"year":case"month":n[Vv(e)](0);case"day":n[zv(e)](1);case"hour":n[Fv(e)](0);case"minute":n[Gv(e)](0);case"second":n[Wv(e)](0),n[Hv(e)](0)}return n.getTime()}function AS(r,t,e,n){var a=1e4,i=Nv,o=0;function s(A,M,L,I,P,R,V){for(var H=new Date(M),E=M,k=H[I]();E1&&R===0&&L.unshift({value:L[0].value-E})}}for(var R=0;R=n[0]&&y<=n[1]&&c++)}var _=(n[1]-n[0])/t;if(c>_*1.5&&h>_/1.5||(u.push(g),c>_||r===i[v]))break}f=[]}}}for(var S=de(F(u,function(A){return de(A,function(M){return M.value>=n[0]&&M.value<=n[1]&&!M.notAdd})}),function(A){return A.length>0}),b=[],x=S.length-1,v=0;v0;)i*=10;var s=[Se(LS(n[0]/i)*i),Se(IS(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){xn.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=Ke(e)/Ke(this.base),li(e,this._extent)},t.prototype.normalize=function(e){return e=Ke(e)/Ke(this.base),ui(e,this._extent)},t.prototype.scale=function(e){return e=fi(e,this._extent),sa(this.base,e)},t.type="log",t}(ct),pd=js.prototype;pd.getMinorTicks=xn.getMinorTicks;pd.getLabel=xn.getLabel;function la(r,t){return MS(r,pt(t))}ct.registerClass(js);var PS=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[kS[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=RS[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),RS={min:"_determinedMin",max:"_determinedMax"},kS={min:"_dataMin",max:"_dataMax"};function gd(r,t,e){var n=r.rawExtentInfo;return n||(n=new PS(r,t,e),r.rawExtentInfo=n,n)}function ua(r,t){return t==null?null:_o(t)?NaN:r.parse(t)}function md(r,t){var e=r.type,n=gd(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&e==="time"){var s=ld("bar",o),l=!1;if(w(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=ud(s),f=ES(a,i,t,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function ES(r,t,e,n){var a=e.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=yS(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;w(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;w(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,c=1-(s+l)/i,h=f/c-f;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function ju(r,t){var e=t,n=md(r,e),a=n.extent,i=e.get("splitNumber");r instanceof js&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function OS(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Ks({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new dd({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ct.getClass(t)||Gr)}}function NS(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function Wr(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(t):W(t)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i??"");return o}}(t):Z(t)?function(n){return function(a,i){return e!=null&&(i=a.value-e),n(Qs(r,a),i,a.level!=null?{level:a.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function Qs(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function BS(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,a,i=e.getExtent();e instanceof Ks?a=e.count():(n=e.getTicks(),a=n.length);var o=r.getLabelModel(),s=Wr(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;fr[1]&&(r[1]=a[1])})}var FS=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),Qu=[],GS={registerPreprocessor:Kh,registerProcessor:qh,registerPostInit:N_,registerPostUpdate:B_,registerUpdateLifecycle:Zs,registerAction:ft,registerCoordinateSystem:V_,registerLayout:z_,registerVisual:sr,registerTransform:G_,registerLoading:jh,registerMap:F_,registerImpl:m_,PRIORITY:L_,ComponentModel:ee,ComponentView:Ne,SeriesModel:Ve,ChartView:Re,registerComponentModel:function(r){ee.registerClass(r)},registerComponentView:function(r){Ne.registerClass(r)},registerSeriesModel:function(r){Ve.registerClass(r)},registerChartView:function(r){Re.registerClass(r)},registerSubTypeDefaulter:function(r,t){ee.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){fg(r,t)}};function _t(r){if(O(r)){w(r,function(t){_t(t)});return}le(Qu,r)>=0||(Qu.push(r),Z(r)&&(r={install:r}),r.install(GS))}var kn=ue();function Sd(r,t){var e=F(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function WS(r){var t=r.getLabelModel().get("customValues");if(t){var e=Wr(r),n=r.scale.getExtent(),a=Sd(r,t),i=de(a,function(o){return o>=n[0]&&o<=n[1]});return{labels:F(i,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?US(r):XS(r)}function HS(r,t){var e=r.getTickModel().get("customValues");if(e){var n=r.scale.getExtent(),a=Sd(r,e);return{ticks:de(a,function(i){return i>=n[0]&&i<=n[1]})}}return r.type==="category"?YS(r,t):{ticks:F(r.scale.getTicks(),function(i){return i.value})}}function US(r){var t=r.getLabelModel(),e=xd(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function xd(r,t){var e=bd(r,"labels"),n=Js(t),a=wd(e,n);if(a)return a;var i,o;return Z(n)?i=Dd(r,n):(o=n==="auto"?ZS(r):n,i=Td(r,o)),Cd(e,n,{labels:i,labelCategoryInterval:o})}function YS(r,t){var e=bd(r,"ticks"),n=Js(t),a=wd(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),Z(n))i=Dd(r,n,!0);else if(n==="auto"){var s=xd(r,r.getLabelModel());o=s.labelCategoryInterval,i=F(s.labels,function(l){return l.tickValue})}else o=n,i=Td(r,o,!0);return Cd(e,n,{ticks:i,tickCategoryInterval:o})}function XS(r){var t=r.scale.getTicks(),e=Wr(r);return{labels:F(t,function(n,a){return{level:n.level,formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function bd(r,t){return kn(r)[t]||(kn(r)[t]=[])}function wd(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),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),h=0,v=0;l<=i[1];l+=s){var d=0,p=0,g=ds(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,h=Math.max(h,d,7),v=Math.max(v,p,7)}var m=h/f,y=v/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),S=kn(r.model),b=r.getExtent(),x=S.lastAutoInterval,C=S.lastTickCount;return x!=null&&C!=null&&Math.abs(x-_)<=1&&Math.abs(C-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function KS(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 Td(r,t,e){var n=Wr(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=yd(r),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);v&&d-l!==i[1]&&p(i[1]);function p(g){var m={value:g};s.push(e?g:{formattedLabel:n(m),rawLabel:a.getLabel(m),tickValue:g})}return s}function Dd(r,t,e){var n=r.scale,a=Wr(r),i=[];return w(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var Ju=[0,1],qS=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Jc(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(n=n.slice(),ef(n,a.count())),Et(t,Ju,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),ef(n,a.count()));var i=Et(t,n,Ju,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(),n=HS(this,e),a=n.ticks,i=F(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return jS(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 n=this.scale.getMinorTicks(e),a=F(n,function(i){return F(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return WS(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(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return $S(this)},r}();function ef(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function jS(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],o=t[1]={coord:i[1],tickValue:t[0].tickValue};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;w(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s,tickValue:f[1]+1},t.push(o)}var c=i[0]>i[1];h(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&h(i[0],t[0].coord)&&t.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&h(o.coord,i[1])&&t.push({coord:i[1]});function h(v,d){return v=Se(v),d=Se(d),c?v>d:va&&(a+=nn);var v=Math.atan2(s,o);if(v<0&&(v+=nn),v>=n&&v<=a||v+nn>=n&&v+nn<=a)return l[0]=f,l[1]=c,u-e;var d=e*Math.cos(n)+r,p=e*Math.sin(n)+t,g=e*Math.cos(a)+r,m=e*Math.sin(a)+t,y=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=d,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function za(r,t,e,n,a,i,o,s){var l=a-r,u=i-t,f=e-r,c=n-t,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var v=l*f+u*c,d=v/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*f,g=o[1]=t+d*c;return Math.sqrt((p-a)*(p-a)+(g-i)*(g-i))}function Ad(r,t,e,n,a,i,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var je=[];function tx(r,t,e){var n=Ad(t.x,t.y,t.width,t.height,r.x,r.y,je);return e.set(je[0],je[1]),n}function rx(r,t,e){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=t.data,c=r.x,h=r.y,v=0;v0){t=t/180*Math.PI,Je.fromArray(r[0]),ie.fromArray(r[1]),he.fromArray(r[2]),be.sub(at,Je,ie),be.sub(tt,he,ie);var e=at.len(),n=tt.len();if(!(e<.001||n<.001)){at.scale(1/e),tt.scale(1/n);var a=at.dot(tt),i=Math.cos(t);if(i1&&be.copy(Le,he),Le.toArray(r[1])}}}}function nx(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Je.fromArray(r[0]),ie.fromArray(r[1]),he.fromArray(r[2]),be.sub(at,ie,Je),be.sub(tt,he,ie);var n=at.len(),a=tt.len();if(!(n<.001||a<.001)){at.scale(1/n),tt.scale(1/a);var i=at.dot(t),o=Math.cos(e);if(i=l)be.copy(Le,he);else{Le.scaleAndAdd(tt,s/Math.tan(Math.PI/2-f));var c=he.x!==ie.x?(Le.x-ie.x)/(he.x-ie.x):(Le.y-ie.y)/(he.y-ie.y);if(isNaN(c))return;c<0?be.copy(Le,ie):c>1&&be.copy(Le,he)}Le.toArray(r[1])}}}}function Gi(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function ax(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var a=bl(n[0],n[1]),i=bl(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=gi([],n[1],n[0],o/a),l=gi([],n[1],n[2],o/i),u=gi([],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],n[2][0],n[2][1])}else for(var f=1;f0){_(D*T,0,o);var A=D+x;A<0&&S(-A*T,1)}else S(-x*T,1)}}function _(x,C,T){x!==0&&(u=!0);for(var D=C;D0)for(var A=0;A0;A--){var P=T[A-1]*I;_(-P,A,o)}}}function b(x){var C=x<0?-1:1;x=Math.abs(x);for(var T=Math.ceil(x/(o-1)),D=0;D0?_(T,0,D+1):_(-T,o-D-1,o),x-=T,x<=0)return}return u}function ix(r,t,e,n){return Rd(r,"x","width",t,e)}function kd(r,t,e,n){return Rd(r,"y","height",t,e)}function Ed(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new Ue(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var a=0;a=0&&n.attr(i.oldLayoutSelect),le(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),_e(n,u,e,l)}else if(n.attr(u),!zr(n).valueAnimation){var c=ae(n.style.opacity,1);n.style.opacity=0,Te(n,{style:{opacity:c}},e,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};fa(v,u,ca),fa(v,n.states.select,ca)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};fa(d,u,ca),fa(d,n.states.emphasis,ca)}Xm(n,l,f,e,e)}if(a&&!a.ignore&&!a.invisible){var i=lx(a),o=i.oldLayout,p={points:a.shape.points};o?(a.attr({shape:o}),_e(a,{shape:p},e)):(a.setShape(p),a.style.strokePercent=0,Te(a,{style:{strokePercent:1}},e)),i.oldLayout=p}},r}(),Hi=ue();function q1(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=Hi(e).labelManager;a||(a=Hi(e).labelManager=new ux),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=Hi(e).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}var fx=function(r){B(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}(ee),Xo=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Pe).models[0]},t.type="cartesian2dAxis",t}(ee);St(Xo,FS);var Od={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)"]}}},cx=q({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Od),el=q({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}}},Od),vx=q({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},el),hx=re({logBase:10},el);const dx={category:cx,value:el,time:vx,log:hx};var px={value:1,category:1,time:1,log:1};function nf(r,t,e,n){w(px,function(a,i){var o=q(q({},dx[i],!0),n,!0),s=function(l){B(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var h=Mn(this),v=h?ni(f):{},d=c.getTheme();q(f,d.get(i+"Axis")),q(f,this.getDefaultOption()),f.type=af(f),h&&Pr(f,v,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Uo.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.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",af)}function af(r){return r.type||(r.data?"category":"value")}var gx=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 F(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),de(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}(),Zo=["x","y"];function of(r){return r.type==="interval"||r.type==="time"}var mx=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Zo,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!of(e)||!of(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-a[0]*f,v=o[1]-i[0]*c,d=this._transform=[f,0,0,c,h,v];this._invTransform=hs([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.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,n){var a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new Ue(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return er(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var a=[];if(this._invTransform)return er(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-e,o=Math.min(a[0],a[1])-e,s=Math.max(n[0],n[1])-i+e,l=Math.max(a[0],a[1])-o+e;return new Ue(i,o,s,l)},t}(gx),yx=function(r){B(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(qS);function $o(r,t,e){e=e||{};var n=r.coordinateSystem,a=t.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[c[2]-v,c[3]+v]:[c[0]-v,c[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[h.onZero]=Math.max(Math.min(p,d[1]),d[0])}i.position=[u==="y"?d[h[l]]:c[0],u==="x"?d[h[l]]:c[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?d[h[s]]-d[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Mr(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-m:m,i.z2=1,i}function sf(r){return r.get("coordinateSystem")==="cartesian2d"}function lf(r){var t={xAxisModel:null,yAxisModel:null};return w(t,function(e,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Pe).models[0];t[n]=i}),t}var Ui=Math.log;function _x(r,t,e){var n=Gr.prototype,a=n.getTicks.call(e),i=n.getTicks.call(e,!0),o=a.length-1,s=n.getInterval.call(e),l=md(r,t),u=l.extent,f=l.fixMin,c=l.fixMax;if(r.type==="log"){var h=Ui(r.base);u=[Ui(u[0])/h,Ui(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var v=n.getExtent.call(r);f&&(u[0]=v[0]),c&&(u[1]=v[1]);var d=n.getInterval.call(r),p=u[0],g=u[1];if(f&&c)d=(g-p)/o;else if(f)for(g=u[0]+d*o;gu[0]&&isFinite(p)&&isFinite(u[0]);)d=Fi(d),p=u[1]-d*o;else{var m=r.getTicks().length-1;m>o&&(d=Fi(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Se(g-y),p<0&&u[0]>=0?(p=0,g=Se(y)):g>0&&u[1]<=0&&(g=0,p=-Se(y))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+d*_,g+d*S),n.setInterval.call(r,d),(_||S)&&n.setNiceExtent.call(r,p+d,g-d)}var Sx=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Zo,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=ze(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var h=+l[c],v=o[h],d=v.model,p=v.scale;Yo(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(ju(p,d),Yo(p)&&(s=v))}f.length&&(s||(s=f.pop(),ju(s.scale,s.model)),w(f,function(g){_x(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};w(n.x,function(o){uf(n,"y",o,i)}),w(n.y,function(o){uf(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=t.getBoxLayoutParams(),i=!n&&t.get("containLabel"),o=Ft(a,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=BS(u);if(f){var c=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,u.position==="top"?o.y+=f.height+h:u.position==="left"&&(o.x+=f.width+h)}}}),l()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(c[h],c[1-h]),xx(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0?"top":"bottom",i="center"):Ia(a-Ot)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,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}(),cf={axisLine:function(r,t,e,n){var a=t.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(er(s,s,o),er(l,l,o));var f=N({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Jt({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Dn(c.shape,c.style.lineWidth),c.anid="line",e.add(c);var h=t.get(["axisLine","symbol"]);if(h!=null){var v=t.get(["axisLine","symbolSize"]);W(h)&&(h=[h,h]),(W(v)||fe(v))&&(v=[v,v]);var d=Hs(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];w([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var _=Gt(h[y],-p/2,-g/2,p,g,f.stroke,!0),S=m.r+m.offset,b=u?l:s;_.attr({rotation:m.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var a=Cx(e,n,t,r),i=Dx(e,n,t,r);if(wx(t,i,a),Tx(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Pd(F(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Ed(o)}},axisName:function(r,t,e,n){var a=Mr(r.axisName,t.get("name"));if(a){var i=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,hf(i)?r.labelOffset+o*l:0],h,v=t.get("nameRotate");v!=null&&(v=v*Ot/180);var d;hf(i)?h=Bt.innerTextLayout(r.rotation,v??r.rotation,o):(h=bx(r.rotation,i,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=Mr(r.nameTruncateMaxWidth,g.maxWidth,d),_=new we({x:c[0],y:c[1],rotation:h.rotation,silent:Bt.isLabelSilent(t),style:zt(s,{text:a,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Hn({el:_,componentModel:t,itemName:a}),_.__fullText=a,_.anid="name",t.get("triggerEvent")){var S=Bt.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,$(_).eventData=S}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function bx(r,t,e,n){var a=ev(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Ia(a-Ot/2)?(o=l?"bottom":"top",i="center"):Ia(a-Ot*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aOt/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function wx(r,t,e){if(!yd(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=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],f=e[1],c=e[e.length-1],h=e[e.length-2];n===!1?(Ge(i),Ge(u)):vf(i,o)&&(n?(Ge(o),Ge(f)):(Ge(i),Ge(u))),a===!1?(Ge(s),Ge(c)):vf(l,s)&&(a?(Ge(l),Ge(h)):(Ge(s),Ge(c)))}}function Ge(r){r&&(r.ignore=!0)}function vf(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var a=Xc([]);return jc(a,a,-r.rotation),e.applyTransform(go([],a,r.getLocalTransform())),n.applyTransform(go([],a,t.getLocalTransform())),e.intersect(n)}}function hf(r){return r==="middle"||r==="center"}function Nd(r,t,e,n,a){for(var i=[],o=[],s=[],l=0;l=0||r===t}function Rx(r){var t=tl(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=Ko(e);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),os)return!0;if(o){var l=tl(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,a,i){},r.prototype.createPointerEl=function(t,e,n,a){var i=e.pointer;if(i){var o=qt(t).pointerEl=new As[i.type](gf(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,a){if(e.label){var i=qt(t).labelEl=new we(gf(e.label));t.add(i),yf(i,a)}},r.prototype.updatePointerEl=function(t,e,n){var a=qt(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),n(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,a){var i=qt(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),yf(i,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Ka(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){hg(u.event)},onmousedown:Zi(this._onHandleDragMove,this,0,0),drift:Zi(this._onHandleDragMove,this),ondragend:Zi(this._onHandleDragEnd,this)}),n.add(a)),_f(a,e,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");O(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Th(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){mf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$i(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform($i(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr($i(a)),qt(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.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(),n=this._group,a=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),No(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r}();function mf(r,t,e,n){Gd(qt(e).lastProp,n)||(qt(e).lastProp=n,t?_e(e,n,r):(e.stopAnimation(),e.attr(n)))}function Gd(r,t){if(Y(r)&&Y(t)){var e=!0;return w(t,function(n,a){e=e&&Gd(r[a],n)}),!!e}else return r===t}function yf(r,t){r[t.get(["label","show"])?"show":"hide"]()}function $i(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function _f(r,t,e){var n=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=e)})}function Wx(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function Hx(r,t,e,n,a){var i=e.get("value"),o=Wd(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=ri(s.get("padding")||0),u=s.getFont(),f=ds(o,u),c=a.position,h=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=a.align;d==="right"&&(c[0]-=h),d==="center"&&(c[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(c[1]-=v),p==="middle"&&(c[1]-=v/2),Ux(c,h,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:zt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Ux(r,t,e,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+t,a)-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 Wd(r,t,e,n,a){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Qs(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};w(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),W(o)?i=o.replace("{value}",i):Z(o)&&(i=o(s))}return i}function Hd(r,t,e){var n=pg();return jc(n,n,e.rotation),dg(n,n,e.position),Ds([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function Yx(r,t,e,n,a,i){var o=Bt.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),Hx(t,n,a,i,{position:Hd(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Xx(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function Zx(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var $x=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=Sf(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=Wx(i),v=Kx[u](s,c,f);v.style=h,e.graphicKey=v.type,e.pointer=v}var d=$o(l.model,a);Yx(n,e,d,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=$o(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Hd(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sf(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[e.x,e.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var h=(u[1]+u[0])/2,v=[h,h];v[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(Gx);function Sf(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var Kx={line:function(r,t,e){var n=Xx([t,e[0]],[t,e[1]],xf(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:Zx([t-n/2,e[0]],[n,a],xf(r))}}};function xf(r){return r.dim==="x"?0:1}var qx=function(r){B(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}(ee),gt=ue(),jx=w;function Ud(r,t,e){if(!ce.node){var n=t.getZr();gt(n).records||(gt(n).records={}),Qx(n,t);var a=gt(n).records[r]||(gt(n).records[r]={});a.handler=e}}function Qx(r,t){if(gt(r).initialized)return;gt(r).initialized=!0,e("click",J(bf,"click")),e("mousemove",J(bf,"mousemove")),e("globalout",eb);function e(n,a){r.on(n,function(i){var o=tb(t);jx(gt(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Jx(o.pendings,t)})}}function Jx(r,t){var e=r.showTip.length,n=r.hideTip.length,a;e?a=r.showTip[e-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function eb(r,t,e){r.handler("leave",null,e)}function bf(r,t,e,n){t.handler(r,e,n)}function tb(r){var t={showTip:[],hideTip:[]},e=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function jo(r,t){if(!ce.node){var e=t.getZr(),n=(gt(e).records||{})[r];n&&(gt(e).records[r]=null)}}var rb=function(r){B(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,n,a){var i=n.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Ud("axisPointer",a,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,n){jo("axisPointer",n)},t.prototype.dispose=function(e,n){jo("axisPointer",n)},t.type="axisPointer",t}(Ne);function Yd(r,t){var e=[],n=r.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=tr(i,r);if(o==null||o<0||O(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,h=u.dim,v=c==="x"||c==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(F(l.dimensions,function(m){return i.mapDimension(m)}),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 wf=ue();function nb(r,t,e){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||oe(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ta(a)&&(a=Yd({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Ta(a),u=i.axesInfo,f=s.axesInfo,c=n==="leave"||Ta(a),h={},v={},d={list:[],map:{}},p={showPointer:J(ib,v),showTooltip:J(ob,d)};w(s.coordSysMap,function(m,y){var _=l||m.containPoint(a);w(s.coordSysAxesInfo[y],function(S,b){var x=S.axis,C=fb(u,S);if(!c&&_&&(!u||C)){var T=C&&C.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&Cf(S,T,p,!1,h)}})});var g={};return w(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&w(_.axesInfo,function(S,b){var x=v[b];if(S!==m&&x){var C=x.value;_.mapper&&(C=m.axis.scale.parse(_.mapper(C,Tf(S),Tf(m)))),g[m.key]=C}})}),w(g,function(m,y){Cf(f[y],m,p,!0,h)}),sb(v,f,h),lb(d,a,r,o),ub(f,o,e),h}}function Cf(r,t,e,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=ab(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&N(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function ab(r,t){var e=t.axis,n=e.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return w(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);h=v.dataIndices,c=v.nestestValue}else{if(h=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!h.length)return;c=l.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,a=c,i.length=0),w(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function ib(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function ob(r,t,e,n){var a=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=En(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function sb(r,t,e){var n=e.axesInfo=[];w(t,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function lb(r,t,e,n){if(Ta(t)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function ub(r,t,e){var n=e.getZr(),a="axisPointerLastHighlights",i=wf(n)[a]||{},o=wf(n)[a]={};w(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&w(c.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];w(i,function(u,f){!o[f]&&l.push(u)}),w(o,function(u,f){!i[f]&&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 fb(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Tf(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function Ta(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Xd(r){Bd.registerAxisPointerClass("CartesianAxisPointer",$x),r.registerComponentModel(qx),r.registerComponentView(rb),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=Ax(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},nb)}function j1(r){_t(Fd),_t(Xd)}var Df="\0_ec_interaction_mutex";function cb(r,t,e){var n=Zd(r);n[t]=e}function vb(r,t,e){var n=Zd(r),a=n[t];a===e&&(n[t]=null)}function Zd(r){return r[Df]||(r[Df]={})}ft({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},mt);var hb={axisPointer:1,tooltip:1,brush:1};function db(r,t,e){var n=t.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==e&&!hb.hasOwnProperty(n.mainType)&&a&&a.model!==e}function $d(r,t,e,n,a,i){r=r||0;var o=e[1]-e[0];if(a!=null&&(a=mr(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=mr(s,[0,o]),a=i=mr(s,[a,i]),n=0}t[0]=mr(t[0],e),t[1]=mr(t[1],e);var l=Ki(t,n);t[n]+=r;var u=a||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=mr(t[n],f);var c;return c=Ki(t,n),a!=null&&(c.sign!==l.sign||c.spani&&(t[1-n]=t[n]+c.sign*i),t}function Ki(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 mr(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var ar=!0,On=Math.min,Er=Math.max,pb=Math.pow,gb=1e4,mb=6,yb=6,Af="globalPan",_b={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Sb={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Mf={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},xb=0,bb=function(r){B(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new ye,n._uid="brushController_"+xb++,w(Ib,function(a,i){this._handlers[i]=oe(a,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||cb(n,Af,this._uid),w(this._handlers,function(a,i){n.on(i,a)}),this._brushType=e.brushType,this._brushOption=q(K(Mf),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;vb(e,Af,this._uid),w(this._handlers,function(n,a){e.off(a,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};w(e,function(a){n[a.panelId]=K(a)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=F(e,function(h){return q(K(Mf),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Rn(a,e,u,l).add(f).update(f).remove(c).execute(),this;function l(h,v){return(h.id!=null?h.id:n+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function f(h,v){var d=e[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):qd(o,Kd(o,d));rl(o,p)}}function c(h){a[h]!==s&&o.group.remove(a[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),Qo(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Fn);function Kd(r,t){var e=ci[t.brushType].createCover(r,t);return e.__brushOption=t,Qd(e,t),r.group.add(e),e}function qd(r,t){var e=nl(t);return e.endCreating&&(e.endCreating(r,t),Qd(t,t.__brushOption)),t}function jd(r,t){var e=t.__brushOption;nl(t).updateCoverShape(r,t,e.range,e)}function Qd(r,t){var e=t.z;e==null&&(e=gb),r.traverse(function(n){n.z=e,n.z2=e})}function rl(r,t){nl(t).updateCommon(r,t),jd(r,t)}function nl(r){return ci[r.__brushOption.brushType]}function al(r,t,e){var n=r._panels;if(!n)return ar;var a,i=r._transform;return w(n,function(o){o.isTargetByCursor(t,e,i)&&(a=o)}),a}function Jd(r,t){var e=r._panels;if(!e)return ar;var n=t.__brushOption.panelId;return n!=null?e[n]:ar}function Qo(r){var t=r._covers,e=t.length;return w(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function ir(r,t){var e=F(r._covers,function(n){var a=n.__brushOption,i=K(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function wb(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],a=e[0]-n[0],i=e[1]-n[1],o=pb(a*a+i*i,.5);return o>mb}function ep(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function tp(r,t,e,n){var a=new ye;return a.add(new pe({name:"main",style:il(e),silent:!0,draggable:!0,cursor:"move",drift:J(If,r,t,a,["n","s","w","e"]),ondragend:J(ir,t,{isEnd:!0})})),w(n,function(i){a.add(new pe({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:J(If,r,t,a,i),ondragend:J(ir,t,{isEnd:!0})}))}),a}function rp(r,t,e,n){var a=n.brushStyle.lineWidth||0,i=Er(a,yb),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,f=e[0][1],c=e[1][1],h=f-i+a/2,v=c-i+a/2,d=f-o,p=c-s,g=d+a,m=p+a;dt(r,t,"main",o,s,d,p),n.transformable&&(dt(r,t,"w",l,u,i,m),dt(r,t,"e",h,u,i,m),dt(r,t,"n",l,u,g,i),dt(r,t,"s",l,v,g,i),dt(r,t,"nw",l,u,i,i),dt(r,t,"ne",h,u,i,i),dt(r,t,"sw",l,v,i,i),dt(r,t,"se",h,v,i,i))}function Jo(r,t){var e=t.__brushOption,n=e.transformable,a=t.childAt(0);a.useStyle(il(e)),a.attr({silent:!n,cursor:n?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?es(r,i[0]):Tb(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Sb[s]+"-resize":null})})}function dt(r,t,e,n,a,i,o){var s=t.childOfName(e);s&&s.setShape(Ab(ol(r,t,[[n,a],[n+i,a+o]])))}function il(r){return re({strokeNoScale:!0},r.brushStyle)}function np(r,t,e,n){var a=[On(r,e),On(t,n)],i=[Er(r,e),Er(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function Cb(r){return Ts(r.group)}function es(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Dv(e[t],Cb(r));return n[a]}function Tb(r,t){var e=[es(r,t[0]),es(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function If(r,t,e,n,a,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=ap(t,a,i);w(n,function(u){var f=_b[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(np(s[0][0],s[1][0],s[0][1],s[1][1])),rl(t,e),ir(t,{isEnd:!1})}function Db(r,t,e,n){var a=t.__brushOption.range,i=ap(r,e,n);w(a,function(o){o[0]+=i[0],o[1]+=i[1]}),rl(r,t),ir(r,{isEnd:!1})}function ap(r,t,e){var n=r.group,a=n.transformCoordToLocal(t,e),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function ol(r,t,e){var n=Jd(r,t);return n&&n!==ar?n.clipPath(e,r._transform):K(e)}function Ab(r){var t=On(r[0][0],r[1][0]),e=On(r[0][1],r[1][1]),n=Er(r[0][0],r[1][0]),a=Er(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:a-e}}function Mb(r,t,e){if(!(!r._brushType||Lb(r,t.offsetX,t.offsetY))){var n=r._zr,a=r._covers,i=al(r,t,e);if(!r._dragging)for(var o=0;on.getWidth()||e<0||e>n.getHeight()}var ci={lineX:Rf(0),lineY:Rf(1),rect:{createCover:function(r,t){function e(n){return n}return tp({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=ep(r);return np(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){rp(r,t,e,n)},updateCommon:Jo,contain:rs},polygon:{createCover:function(r,t){var e=new ye;return e.add(new Vn({name:"main",style:il(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new cs({name:"main",draggable:!0,drift:J(Db,r,t),ondragend:J(ir,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:ol(r,t,e)})},updateCommon:Jo,contain:rs}};function Rf(r){return{createCover:function(t,e){return tp({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=ep(t),n=On(e[0][r],e[1][r]),a=Er(e[0][r],e[1][r]);return[n,a]},updateCoverShape:function(t,e,n,a){var i,o=Jd(t,e);if(o!==ar&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),rp(t,e,l,a)},updateCommon:Jo,contain:rs}}function Pb(r){return r=sl(r),function(t){return Mv(t,r)}}function Rb(r,t){return r=sl(r),function(e){var n=t??e,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function kb(r,t,e){var n=sl(r);return function(a,i){return n.contain(i[0],i[1])&&!db(a,t,e)}}function sl(r){return Ue.create(r)}var kf=["x","y","radius","angle","single"],Eb=["cartesian2d","polar","singleAxis"];function Ob(r){var t=r.get("coordinateSystem");return le(Eb,t)>=0}function xr(r){return r+"Axis"}function Nb(r,t){var e=U(),n=[],a=U();r.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(h,v){var d=e.get(h);d&&d[v]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,h){(e.get(c)||e.set(c,[]))[h]=!0})}return n}var qi=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}(),Bb=function(r){B(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,n,a){var i=Ef(e);this.settledOption=i,this.mergeDefaultAndTheme(e,a),this._doInit(i)},t.prototype.mergeOption=function(e){var n=Ef(e);q(this.option,e,!0),q(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=U(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return w(kf,function(a){var i=this.getReferringComponents(xr(a),jg);if(i.specified){n=!0;var o=new qi;w(i.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var h=new qi;if(h.add(c.componentIndex),e.set(f,h),i=!1,f==="x"||f==="y"){var v=c.getReferringComponents("grid",Pe).models[0];v&&w(u,function(d){c.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Pe).models[0]&&h.add(d.componentIndex)})}}}i&&w(kf,function(u){if(i){var f=a.findComponents({mainType:xr(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var c=new qi;c.add(f[0].componentIndex),e.set(u,c),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,a=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,a){e==null&&(e=this.ecModel.getComponent(xr(n),a))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(a,i){w(a.indexList,function(o){e.call(n,i,o)})})},t.prototype.getAxisProxy=function(e,n){var a=this.getAxisModel(e,n);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[n])return this.ecModel.getComponent(xr(e),n)},t.prototype.setRawRange=function(e){var n=this.option,a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(n[i[0]]=a[i[0]]=e[i[0]],n[i[1]]=a[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;w(["start","startValue","end","endValue"],function(a){n[a]=e[a]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(d=!0),b&&(p=!0)}return g&&d&&p})}else Sr(f,function(v){if(i==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});Sr(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;Sr(["min","max"],function(a){var i=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Et(n[0]+o,n,[0,100],!0):i!=null&&(o=Et(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var a=Jc(n,[0,500]);a=Math.min(a,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),e[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function Wb(r,t,e){var n=[1/0,-1/0];Sr(e,function(o){zS(n,o.getData(),t)});var a=r.getAxisModel(),i=gd(a.axis.scale,a,n).calculate();return[i.min,i.max]}var Hb={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(xr(o),s);a(o,s,l,i)})})}t(function(a,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Gb(a,i,s,r),e.push(o.__dzAxisProxy))});var n=U();return w(e,function(a){w(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).reset(e)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function Ub(r){r.registerAction("dataZoom",function(t,e){var n=Nb(e,t);w(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Nf=!1;function Yb(r){Nf||(Nf=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Hb),Ub(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Xb(r){r.registerComponentModel(Vb),r.registerComponentView(Fb),Yb(r)}var Qe=function(){function r(){}return r}(),op={};function an(r,t){op[r]=t}function sp(r){return op[r]}var Zb=function(r){B(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;w(this.option.feature,function(n,a){var i=sp(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),q(n,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}(ee);function $b(r,t,e){var n=t.getBoxLayoutParams(),a=t.get("padding"),i={width:e.getWidth(),height:e.getHeight()},o=Ft(n,i,a);Dr(t.get("orient"),r,t.get("itemGap"),o.width,o.height),hy(r,n,i,a)}function lp(r,t){var e=ri(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new pe({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:n,silent:!0,z2:-1}),r}var Kb=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,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")||{},f=this._features||(this._features={}),c=[];w(u,function(d,p){c.push(p)}),new Rn(this._featureNames||[],c).add(h).update(h).remove(J(h,null)).execute(),this._featureNames=c;function h(d,p){var g=c[d],m=c[p],y=u[g],_=new ve(y,e,e.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(y.title=i.newTitle),g&&!m){if(qb(g))S={onclick:_.option.onclick,featureName:g};else{var b=sp(g);if(!b)return;S=new b}f[g]=S}else if(S=f[m],!S)return;S.uid=Yn("toolbox-feature"),S.model=_,S.ecModel=n,S.api=a;var x=S instanceof Qe;if(!g&&m){x&&S.dispose&&S.dispose(n,a);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(n,a);return}v(_,S,g),_.setIconStatus=function(C,T){var D=this.option,A=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[C]=T,A[C]&&(T==="emphasis"?Ir:Lr)(A[C])},S instanceof Qe&&S.render&&S.render(_,n,a,i)}function v(d,p,g){var m=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),_=p instanceof Qe&&p.getIcons?p.getIcons():d.get("icon"),S=d.get("title")||{},b,x;W(_)?(b={},b[g]=_):b=_,W(S)?(x={},x[g]=S):x=S;var C=d.iconPaths={};w(b,function(T,D){var A=Ka(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(m.getItemStyle());var M=A.ensureState("emphasis");M.style=y.getItemStyle();var L=new we({style:{text:x[D],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:Pv({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});A.setTextContent(L),Hn({el:A,componentModel:e,itemName:D,formatterParamsExtra:{title:x[D]}}),A.__title=x[D],A.on("mouseover",function(){var I=y.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:y.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),A.setTextConfig({position:y.get("textPosition")||P}),L.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",D])!=="emphasis"&&a.leaveEmphasis(this),L.hide()}),(d.get(["iconStatus",D])==="emphasis"?Ir:Lr)(A),o.add(A),A.on("click",oe(p.onclick,p,n,a,D)),C[D]=A})}$b(o,e,a),o.add(lp(o.getBoundingRect(),e)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=d.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!Z(_)&&p){var S=_.style||(_.style={}),b=ds(p,we.makeFont(S)),x=d.x+o.x,C=d.y+o.y+s,T=!1;C+b.height>a.getHeight()&&(m.position="top",T=!0);var D=T?-5-b.height:s+10;x+b.width/2>a.getWidth()?(m.position=["100%",D],S.align="right"):x-b.width/2<0&&(m.position=[0,D],S.align="left")}})},t.prototype.updateView=function(e,n,a,i){w(this._features,function(o){o instanceof Qe&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.remove=function(e,n){w(this._features,function(a){a instanceof Qe&&a.remove&&a.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){w(this._features,function(a){a instanceof Qe&&a.dispose&&a.dispose(e,n)})},t.type="toolbox",t}(Ne);function qb(r){return r.indexOf("my")===0}var jb=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var a=this.model,i=a.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=ce.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];v&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,m=new Uint8Array(g);g--;)m[g]=d.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=a.get("lang"),C='',T=window.open();T.document.write(C),T.document.title=i}},t.getDefaultOption=function(e){var n={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 n},t}(Qe),Bf="__ec_magicType_stack__",Qb=[["line","bar"],["stack"]],Jb=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),a={};return w(e.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},t.getDefaultOption=function(e){var n={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 n},t.prototype.onclick=function(e,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(Vf[a]){var s={series:[]},l=function(c){var h=c.subType,v=c.id,d=Vf[a](h,v,c,i);d&&(re(d,c.option),s.series.push(d));var p=c.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=c.getReferringComponents(y,Pe).models[0],S=_.componentIndex;s[y]=s[y]||[];for(var b=0;b<=S;b++)s[y][S]=s[y][S]||{};s[y][S].boundaryGap=a==="bar"}}};w(Qb,function(c){le(c,a)>=0&&w(c,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=q({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Qe),Vf={line:function(r,t,e,n){if(r==="bar")return q({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return q({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var a=e.get("stack")===Bf;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),q({id:t,stack:a?"":Bf},n.get(["option","stack"])||{},!0)}};ft({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var vi=new Array(60).join("-"),Or=" ";function ew(r){var t={},e=[],n=[];return r.eachRawSeries(function(a){var i=a.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:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function tw(r){var t=[];return w(r,function(e,n){var a=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(F(e.series,function(v){return v.name})),l=[a.model.getCategories()];w(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Or)],f=0;f=0)return!0}var ns=new RegExp("["+Or+"]+","g");function iw(r){for(var t=r.split(/\n+/g),e=Ga(t.shift()).split(ns),n=[],a=F(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function cw(r){var t=ll(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return up(e,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function vw(r){fp(r).snapshots=null}function hw(r){return ll(r).length}function ll(r){var t=fp(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var dw=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){vw(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={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 n},t}(Qe);ft({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var pw=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],cp=function(){function r(t,e,n){var a=this;this._targetInfoList=[];var i=zf(e,t);w(gw,function(o,s){(!n||!n.include||le(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=ji[n.brushType](0,i,a);n.__rangeOffset={offset:Hf[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){w(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&w(i.coordSyses,function(o){var s=ji[a.brushType](1,o,a.range,!0);n(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){w(t,function(n){var a=this.findTargetInfo(n,e);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=ji[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?Hf[n.brushType](i.values,o.offset,mw(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return F(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:Pb(a),isTargetByCursor:kb(a,t,n.coordSysModel),getLinearBrushOtherExtent:Rb(a)}})},r.prototype.controlSeries=function(t,e,n){var a=this.findTargetInfo(t,n);return a===!0||a&&le(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,a=zf(e,t),i=0;ir[1]&&r.reverse(),r}function zf(r,t){return dn(r,t,{includeMainTypes:pw})}var gw={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=U(),o={},s={};!e&&!n&&!a||(w(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),w(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),w(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];w(u.getCartesians(),function(c,h){(le(e,c.getAxis("x").model)>=0||le(n,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Gf.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){w(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Gf.geo})})}},Ff=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Gf={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Ts(r)),t}},ji={lineX:J(Wf,0),lineY:J(Wf,1),rect:function(r,t,e,n){var a=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),i=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[as([a[0],i[0]]),as([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=F(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function Wf(r,t,e,n){var a=e.getAxis(["x","y"][r]),i=as(F([0,1],function(s){return t?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var Hf={lineX:J(Uf,0),lineY:J(Uf,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 F(r,function(n,a){return[n[0]-e[0]*t[a][0],n[1]-e[1]*t[a][1]]})}};function Uf(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function mw(r,t){var e=Yf(r),n=Yf(t),a=[e[0]/n[0],e[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Yf(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var is=w,yw=Zg("toolbox-dataZoom_"),_w=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){this._brushController||(this._brushController=new bb(a.getZr()),this._brushController.on("brush",oe(this._onBrush,this)).mount()),bw(e,n,this,i,a),xw(e,n)},t.prototype.onclick=function(e,n,a){Sw[a].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new cp(ul(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,f,c){if(c.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[h],c,f)}}),fw(i,a),this._dispatchZoomAction(a);function s(u,f,c){var h=f.getAxis(u),v=h.model,d=l(u,v,i),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=$d(0,c.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(a[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var h;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,f.componentIndex);d&&(h=v)}),h}},t.prototype._dispatchZoomAction=function(e){var n=[];is(e,function(a,i){n.push(K(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={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 n},t}(Qe),Sw={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(cw(this.ecModel))}};function ul(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 xw(r,t){r.setIconStatus("back",hw(t)>1?"emphasis":"normal")}function bw(r,t,e,n,a){var i=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new cp(ul(r),t,{include:["grid"]}),s=o.makePanelOpts(a,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)}xy("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),a=[],i=ul(n),o=dn(r,i);is(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),is(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:yw+u+c};h[f]=c,a.push(h)}return a});function Q1(r){r.registerComponentModel(Zb),r.registerComponentView(Kb),an("saveAsImage",jb),an("magicType",Jb),an("dataView",lw),an("dataZoom",_w),an("restore",dw),_t(Xb)}var ww=function(r){B(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}(ee);function vp(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function hp(r){if(ce.domSupported){for(var t=document.documentElement.style,e=0,n=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 f=u*Math.PI/180,c=o+a,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-c)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=t+" solid "+a+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'
'}function Lw(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,a="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,a+=ce.transformSupported?","+fl+n:",left"+n+",top"+n),Dw+":"+a}function Xf(r,t,e){var n=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!ce.transformSupported)return e?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=ce.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return e?"top:0;left:0;"+fl+":"+o+";":[["top",0],["left",0],[dp,o]]}function Pw(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var a=ae(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+a+"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),w(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function Rw(r,t,e){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),c=wh(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),t&&a&&n.push(Lw(a,e)),i&&n.push("background-color:"+i),w(["width","color","radius"],function(v){var d="border-"+v,p=Yv(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(Pw(f)),c!=null&&n.push("padding:"+ri(c).join("px ")+"px"),n.join(";")+";"}function Zf(r,t,e,n,a){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&mg(r,o,e,n,a)}else{r[0]=n,r[1]=a;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 kw=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,ce.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),i=e.appendTo,o=i&&(W(i)?document.querySelector(i):So(i)?i:Z(i)&&i(t.getDom()));Zf(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();gg(f,l,!0),u.dispatch("mousemove",l)}},n.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(),n=Tw(e,"position"),a=e.style;a.position!=="absolute"&&n!=="absolute"&&(a.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 n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=Aw+Rw(t,!this._firstShow,this._longHide)+Xf(i[0],i[1],!0)+("border-color:"+nr(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(W(i)&&n.get("trigger")==="item"&&!vp(n)&&(s=Iw(n,a,i)),W(t))o.innerHTML=t+s;else if(t){o.innerHTML="",O(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,a=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(){!a.isDisposed()&&o.manuallyShowTip(e,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,a,i){if(!(i.from===this.uid||ce.node||!a.getDom())){var o=qf(i,a);this._ticket="";var s=i.dataByCoordSys,l=Fw(i,n,a);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 f=Ow;f.x=i.x,f.y=i.y,f.update(),$(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},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,n,a,i))return;var c=Yd(i,n),h=c.point[0],v=c.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,a,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(qf(i,a))},t.prototype._manuallyAxisShowTip=function(e,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=on([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,n){var a=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(a){var s=$(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;cn(a,function(f){if($(f).dataIndex!=null)return l=f,!0;if($(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var a=e.get("showDelay");n=oe(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(e,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=on([n.tooltipOption],i),l=this._renderMode,u=[],f=Ln("section",{blocks:[],noHeader:!0}),c=[],h=new Mi;w(e,function(y){w(y.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=Wd(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),C=Ln("section",{header:x,noHeader:!zn(x),sortBlocks:!0,blocks:[]});f.blocks.push(C),w(_.seriesDataIndices,function(T){var D=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,M=D.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Qs(S.axis,{value:b}),M.axisValueLabel=x,M.marker=h.makeTooltipMarker("item",nr(M.color),l);var L=pu(D.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=on([D],i).get("valueFormatter");C.blocks.push(P?N({valueFormatter:P},I):I)}L.text&&c.push(L.text),u.push(M)}})}})}),f.blocks.reverse(),c.reverse();var v=n.position,d=s.get("order"),p=xu(f,h,l,d,a.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?` `:"
",m=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,n,a){var i=this._ecModel,o=$(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,d=e.positionDefault,p=on([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,c),y=new Mi;m.marker=y.makeTooltipMarker("item",nr(m.color),v);var _=pu(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,C=x?xu(b?N({valueFormatter:b},x):x,y,v,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,C,m,T,e.offsetX,e.offsetY,e.position,e.target,y)}),a({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,a){var i=this._renderMode==="html",o=$(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(W(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=K(l),l.content=Oe(l.content));var c=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:l.content});var v=e.positionDefault,d=on(c,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",m=new Mi;this._showOrMove(d,function(){var y=K(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,g,e.offsetX,e.offsetY,e.position,n,m)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,a,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],a,e.get("trigger"),e.get("borderColor")),p=d.color;if(h)if(W(h)){var g=e.ecModel.get("useUTC"),m=O(a)?a[0]:a,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=h,y&&(v=ja(m.axisValue,v,g)),v=Xv(v,a,!0)}else if(Z(h)){var _=oe(function(S,b){S===this._ticket&&(c.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,c,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;c.setContent(v,f,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,a,u)}},t.prototype._getNearestPoint=function(e,n,a,i){if(a==="axis"||O(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!O(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,a,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var c=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Z(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),O(n))a=te(n[0],u),i=te(n[1],f);else if(Y(n)){var p=n;p.width=c[0],p.height=c[1];var g=Ft(p,{width:u,height:f});a=g.x,i=g.y,h=null,v=null}else if(W(n)&&l){var m=zw(n,d,c,e.get("borderWidth"));a=m[0],i=m[1]}else{var m=Bw(a,i,o,u,f,h?null:20,v?null:20);a=m[0],i=m[1]}if(h&&(a-=jf(h)?c[0]/2:h==="right"?c[0]:0),v&&(i-=jf(v)?c[1]/2:v==="bottom"?c[1]:0),vp(e)){var m=Vw(a,i,o,u,f);a=m[0],i=m[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===e.length;return o&&w(a,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&w(u,function(h,v){var d=c[v]||{},p=h.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===g.length,o&&w(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),i&&w(h.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],S=i[y];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){ce.node||!n.getDom()||(No(this,"_updatePosition"),this._tooltipContent.dispose(),jo("itemTooltip",n))},t.type="tooltip",t}(Ne);function on(r,t,e){var n=t.ecModel,a;e?(a=new ve(e,n,n),a=new ve(t.option,a,n)):a=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ve&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(a=new ve(o,a,n)))}return a}function qf(r,t){return r.dispatchAction||oe(t.dispatchAction,t)}function Bw(r,t,e,n,a,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function Vw(r,t,e,n,a){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function zw(r,t,e,n){var a=e[0],i=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-a/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+f+o;break;case"left":s=t.x-a-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function jf(r){return r==="center"||r==="middle"}function Fw(r,t,e){var n=ms(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Wn(t,a,n.get(a),{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 f=$(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function J1(r){_t(Xd),r.registerComponentModel(ww),r.registerComponentView(Nw),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},mt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},mt)}var Gw=function(r){B(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}(ee),Ww=function(r){B(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,n,a){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=ae(e.get("textBaseline"),e.get("textVerticalAlign")),f=new we({style:zt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=e.get("subtext"),v=new we({style:zt(s,{text:h,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){ql(d,"_"+e.get("target"))}),p&&v.on("click",function(){ql(p,"_"+e.get("subtarget"))}),$(f).eventData=$(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(v);var m=i.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Ft(y,{width:a.getWidth(),height:a.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 S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),m=i.getBoundingRect();var b=_.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var C=new pe({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(C)}},t.type="title",t}(Ne);function eT(r){r.registerComponentModel(Gw),r.registerComponentView(Ww)}function hi(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Rr(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(t[i])}return n.join(" ")}var cl=function(r){B(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o){this.removeAll();var s=Gt(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=Hw,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(){Ir(this.childAt(0))},t.prototype.downplay=function(){Lr(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,c)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(v):_e(h,v,s,n),$a(h)}if(this._updateCommon(e,n,l,a,i),u){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Te(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,f,c,h,v,d,p,g,m;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,h=i.focus,v=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,m=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var y=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Vr(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Hs(e.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var x=e.getItemVisual(n,"style"),C=x.fill;if(s instanceof Nr){var T=s.style;s.useStyle(N({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(N({},x)):s.useStyle(x),s.style.decal=null,s.setColor(C,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(n,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;Br(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:C,defaultOpacity:x.opacity});function L(R){return M?e.getName(R):hi(e,R)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),rr(this,h,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=$(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Tn(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Tn(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return h_(e.getItemVisual(n,"symbolSize"))},t}(ye);function Hw(r,t){this.parent.drift(r,t)}function Qi(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Qf(r){return r!=null&&!Y(r)&&(r={isIgnore:r}),r||{}}function Jf(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:Vr(t),cursorStyle:t.get("cursor")}}var mp=function(){function r(t){this.group=new ye,this._SymbolCtor=t||cl}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Qf(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Jf(t),u={disableAnimation:s},f=e.getSymbolPoint||function(c){return t.getItemLayout(c)};i||n.removeAll(),t.diff(i).add(function(c){var h=f(c);if(Qi(t,h,c,e)){var v=new o(t,c,l,u);v.setPosition(h),t.setItemGraphicEl(c,v),n.add(v)}}).update(function(c,h){var v=i.getItemGraphicEl(h),d=f(c);if(!Qi(t,d,c,e)){n.remove(v);return}var p=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(t,c,l,u),v.setPosition(d);else{v.updateData(t,c,l,u);var m={x:d[0],y:d[1]};s?v.attr(m):_e(v,m,a)}n.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Jf(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Qf(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=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}(ee),yr=J,ss=w,va=ye,yp=function(r){B(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 va),this.group.add(this._selectorGroup=new va),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,a){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,n,a,l,s,u);var f=e.getBoxLayoutParams(),c={width:a.getWidth(),height:a.getHeight()},h=e.get("padding"),v=Ft(f,c,h),d=this.layoutInner(e,o,v,i,l,u),p=Ft(re({width:d.width,height:d.height},f),c,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=lp(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,a,i,o,s,l){var u=this.getContentGroup(),f=U(),c=n.get("selectedMode"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),ss(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var g=new va;g.newline=!0,u.add(g);return}var m=a.getSeriesByName(p)[0];if(!f.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},S=y.getVisual("legendIcon"),b=y.getVisual("style"),x=this._createItem(m,p,d,v,n,e,_,b,S,c,i);x.on("click",yr(ec,p,null,i,h)).on("mouseover",yr(ls,m.name,null,i,h)).on("mouseout",yr(us,m.name,null,i,h)),a.ssr&&x.eachChild(function(C){var T=$(C);T.seriesIndex=m.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else a.eachRawSeries(function(C){if(!f.get(p)&&C.legendVisualProvider){var T=C.legendVisualProvider;if(!T.containName(p))return;var D=T.indexOfName(p),A=T.getItemVisual(D,"style"),M=T.getItemVisual(D,"legendIcon"),L=yg(A.fill);L&&L[3]===0&&(L[3]=.2,A=N(N({},A),{fill:_g(L,"rgba")}));var I=this._createItem(C,p,d,v,n,e,{},A,M,c,i);I.on("click",yr(ec,null,p,i,h)).on("mouseover",yr(ls,null,p,i,h)).on("mouseout",yr(us,null,p,i,h)),a.ssr&&I.eachChild(function(P){var R=$(P);R.seriesIndex=C.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},t.prototype._createSelector=function(e,n,a,i,o){var s=this.getSelectorGroup();ss(e,function(u){var f=u.type,c=new we({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(c);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Br(c,{normal:h,emphasis:v},{defaultText:u.title}),Co(c)})},t.prototype._createItem=function(e,n,a,i,o,s,l,u,f,c,h){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=Yw(f,i,l,u,v,g,h),b=new va,x=i.getModel("textStyle");if(Z(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:m,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var C=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;b.add(Xw({itemWidth:d,itemHeight:p,icon:f,iconRotate:C,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),M=n;W(A)&&A?M=A.replace("{name}",n??""):Z(A)&&(M=A(n));var L=g?x.getTextColor():i.get("inactiveColor");b.add(new we({style:zt(x,{text:M,x:T,y:p/2,fill:L,align:D,verticalAlign:"middle"},{inheritColor:L})}));var I=new pe({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Hn({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(R){R.silent=!0}),I.silent=!c,this.getContentGroup().add(b),Co(b),b.__legendDataIndex=a,b},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Dr(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Dr("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:c[p]+=h[g]+d,v[1-p]+=f[m]/2-h[m]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+d+h[g],_[m]=Math.max(f[m],h[m]),_[y]=Math.min(0,h[y]+v[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ne);function Yw(r,t,e,n,a,i,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),ss(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:zo(c,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:e).opacity),s(u,n);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function Xw(r){var t=r.icon||"roundRect",e=Gt(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 ec(r,t,e,n){us(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),ls(r,t,e,n)}function _p(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,a=t.length;na[o],g=[-v.x,-v.y];n||(g[i]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=ae(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?y[i]+=a[o]-d[o]:m[i]+=d[o]+_}y[1-i]+=v[s]/2-d[s]/2,f.setPosition(g),c.setPosition(m),h.setPosition(y);var b={x:0,y:0};if(b[o]=p?a[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+y[1-i]),c.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new pe({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(e);return C.pageIndex!=null&&_e(f,{x:C.contentPosition[0],y:C.contentPosition[1]},p?e:null),this._updatePageInfoView(e,C),b},t.prototype._pageGo=function(e,n,a){var i=this._getPageInfo(n)[e];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var a=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",W(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Ji[o],l=eo[o],u=this._findTargetItemIndex(n),f=a.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=h;++g)_=S(f[g]),(!_&&y.e>m.s+i||_&&!b(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(y,_.s))&&m.i=C&&x.s<=C+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(n=s)}),n??i},t.type="legend.scroll",t}(yp);function jw(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function Qw(r){_t(Sp),r.registerComponentModel(Kw),r.registerComponentView(qw),jw(r)}function tT(r){_t(Sp),_t(Qw)}var Jw={label:{enabled:!0},decal:{show:!1}},ac=ue(),eC={};function tC(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var n=K(Jw);q(n.label,r.getLocaleModel().get("aria"),!1),q(e.option,n,!1),a(),i();function a(){var u=e.getModel("decal"),f=u.get("show");if(f){var c=U();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=c.get(h.type);v||(v={},c.set(h.type,v)),ac(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(Z(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var y=Ql(h.ecModel,h.name,eC,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,y))}else{var d=h.getRawData(),p={},g=ac(h).scope;v.each(function(b){var x=v.getRawIndex(b);p[x]=b});var m=d.count();d.each(function(b){var x=p[b],C=d.getName(b)||b+"",T=Ql(h.ecModel,C,g,m),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(D,T))})}function S(b,x){var C=b?N(N({},x),b):x;return C.dirty=!0,C}})}}function i(){var u=t.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=e.getModel("label");if(c.option=re(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var h=r.getSeriesCount(),v=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var m=s();if(m){var y=c.get(["general","withTitle"]);g=o(y,{title:m})}else g=c.get(["general","withoutTitle"]);var _=[],S=h>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(S,{seriesCount:h}),r.eachSeries(function(T,D){if(D1?c.get(["series","multiple",L]):c.get(["series","single",L]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>v){var P=c.get(["data","partialData"]);A+=o(P,{displayCnt:v})}else A+=c.get(["data","allData"]);for(var R=c.get(["data","separator","middle"]),V=c.get(["data","separator","end"]),H=c.get(["data","excludeDimensionId"]),E=[],k=0;k":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},nC=function(){function r(t){var e=this._condVal=W(t)?new RegExp(t):Sg(t)?t:null;if(e==null){var n="";Q(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return W(e)?this._condVal.test(t):fe(e)?this._condVal.test(t+""):!1},r}(),aC=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),iC=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},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}(Ve);function bp(r,t,e){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=yC(a,e),o=n.dim,s=a.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=F(r.dimensions,function(d){return t.mapDimension(d)}),h=!1,v=t.getCalculationInfo("stackResultDimension");return kr(t,c[0])&&(h=!0,c[0]=v),kr(t,c[1])&&(h=!0,c[1]=v),{dataDimsForPoint:c,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function yC(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:fe(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function wp(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function _C(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function SC(r,t,e,n,a,i,o,s){for(var l=_C(r,t),u=[],f=[],c=[],h=[],v=[],d=[],p=[],g=bp(a,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_=a||p<0)break;if(Qt(m,y)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var _=m-u,S=y-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=t[b*2],C=t[b*2+1];x===m&&C===y&&g=n||Qt(x,C))v=m,d=y;else{A=x-u,M=C-f;var P=m-u,R=x-m,V=y-f,H=C-y,E=void 0,k=void 0;if(s==="x"){E=Math.abs(P),k=Math.abs(R);var z=A>0?1:-1;v=m-z*E*o,d=y,L=m+z*k*o,I=y}else if(s==="y"){E=Math.abs(V),k=Math.abs(H);var G=M>0?1:-1;v=m,d=y-G*E*o,L=m,I=y+G*k*o}else E=Math.sqrt(P*P+V*V),k=Math.sqrt(R*R+H*H),D=k/(k+E),v=m-A*o*(1-D),d=y-M*o*(1-D),L=m+A*o*D,I=y+M*o*D,L=It(L,Lt(x,m)),I=It(I,Lt(C,y)),L=Lt(L,It(x,m)),I=Lt(I,It(C,y)),A=L-m,M=I-y,v=m-A*E/k,d=y-M*E/k,v=It(v,Lt(u,m)),d=It(d,Lt(f,y)),v=Lt(v,It(u,m)),d=Lt(d,It(f,y)),A=m-v,M=y-d,L=m+A*k/E,I=y+M*k/E}r.bezierCurveTo(c,h,v,d,m,y),c=L,h=I}else r.lineTo(m,y)}u=m,f=y,p+=i}return g}var Cp=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),xC=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Cp},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Qt(a[o*2-2],a[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=i[c++],d=i[c++],p=i[c++],g=i[c++],m=i[c++],y=i[c++];var b=u?Cl(s,v,p,m,e,f):Cl(l,d,g,y,e,f);if(b>0)for(var x=0;x=0){var S=u?Tl(l,d,g,y,C):Tl(s,v,p,m,C);return u?[e,S]:[S,e]}}s=m,l=y;break}}},t}(xe),bC=function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Cp),wC=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new bC},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Qt(a[s*2-2],a[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function DC(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=t.getAxis(a),u=F(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=TC(u,a==="x"?e.getWidth():e.getHeight()),v=h.length;if(!v&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,p=h[0].coord-d,g=h[v-1].coord+d,m=g-p;if(m<.001)return"transparent";w(h,function(_){_.offset=(_.coord-p)/m}),h.push({offset:v?h[v-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:c[0]||"transparent"});var y=new $c(0,0,0,0,h,!0);return y[a]=p,y[a+"2"]=g,y}}}function AC(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(a&&MC(i,t))){var o=t.mapDimension(i.dim),s={};return w(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function MC(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function IC(r,t){return isNaN(r)||isNaN(t)}function LC(r){for(var t=r.length/2;t>0&&IC(r[t*2-2],r[t*2-1]);t--);return t-1}function cc(r,t){return[r[t*2],r[t*2+1]]}function PC(r,t,e){for(var n=r.length/2,a=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 Ap(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var k=d.getState("emphasis").style;k.lineWidth=+d.style.lineWidth+1}$(d).seriesIndex=e.seriesIndex,rr(d,V,H,E);var z=fc(e.get("smooth")),G=e.get("smoothMonotone");if(d.setShape({smooth:z,smoothMonotone:G,connectNulls:C}),p){var X=s.getCalculationInfo("stackedOnSeries"),j=0;p.useStyle(re(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),X&&(j=fc(X.get("smooth"))),p.setShape({smooth:z,stackedOnSmooth:j,smoothMonotone:G,connectNulls:C}),Cn(p,e,"areaStyle"),$(p).seriesIndex=e.seriesIndex,rr(p,V,H,E)}var ne=this._changePolyState;s.eachItemGraphicEl(function(se){se&&(se.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){$(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=tr(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 f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=e.get("zlevel")||0,v=e.get("z")||0;u=new cl(o,s),u.x=f,u.y=c,u.setZ(h,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Re.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=tr(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 Re.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;Rl(this._polyline,e),n&&Rl(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new xC({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new wC({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");Z(f)&&(f=f(null));var c=u.get("animationDelay")||0,h=Z(c)?c(null):c;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(a)if(o){var S=a,b=n.pointToCoord(g);i?(m=S.startAngle,y=S.endAngle,_=-b[1]/180*Math.PI):(m=S.r0,y=S.r,_=b[0])}else{var x=a;i?(m=x.x,y=x.x+x.width,_=v.x):(m=x.y+x.height,y=x.y,_=v.y)}var C=y===m?0:(_-m)/(y-m);l&&(C=1-C);var T=Z(c)?c(d):f*C+h,D=p.getSymbolPath(),A=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(Ap(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 we({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=LC(l);f>=0&&(Br(s,Vr(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(c,h,v){return v!=null?gp(o,v):hi(o,c)},enableTextSetter:!0},RC(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,S=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?p:0)*(y?-1:1),x=(m?0:-p)*(y?-1:1),C=m?"x":"y",T=PC(c,S,C),D=T.range,A=D[1]-D[0],M=void 0;if(A>=1){if(A>1&&!v){var L=cc(c,D[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(M=h.getRawValue(D[0]))}else{var L=f.getPointOn(S,C);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=h.getRawValue(D[0]),P=h.getRawValue(D[1]);o&&(M=uv(a,d,I,P,T.t))}i.lastFrameIndex=D[0]}else{var R=e===1||i.lastFrameIndex>0?D[0]:0,L=cc(c,R);o&&(M=h.getRawValue(R)),u.attr({x:L[0]+b,y:L[1]+x})}if(o){var V=zr(u);typeof V.setLabelText=="function"&&V.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,c=e.hostModel,h=SC(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,d=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(d=Pt(h.stackedOnCurrent,h.current,a,o,l),v=Pt(h.current,null,a,o,l),g=Pt(h.stackedOnNext,h.next,a,o,l),p=Pt(h.next,null,a,o,l)),uc(v,p)>3e3||f&&uc(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=v;var m={shape:{points:p}};h.current!==v&&(m.shape.__points=h.next),u.stopAnimation(),_e(u,m,c),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),_e(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=h.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&y.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var C=u.shape.__points,T=0;Tt&&(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),f=l.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/v));var d=void 0;W(i)?d=EC[i]:Z(i)&&(d=i),d&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,d,OC))}}}}}function iT(r){r.registerChartView(kC),r.registerSeriesModel(mC),r.registerLayout(pl("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Mp("line"))}var Nn=function(r){B(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,n){return si(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)w(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var d=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),g=o[v],m=n[v]==="x1"||n[v]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,S=1,b=0;bg){_=(x+y)/2;break}b===1&&(S=C-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/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}(Ve);Ve.registerClass(Nn);var NC=function(r){B(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 si(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"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ms(Nn.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}(Nn),BC=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}(),vc=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new BC},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,h=n.clockwise,v=Math.PI*2,d=h?c-fMath.PI/2&&fs)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){Pa(i,e,$(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Re),hc={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=ro(t.x,r.x),s=no(t.x+t.width,a),l=ro(t.y,r.y),u=no(t.y+t.height,i),f=sa?s:o,t.y=c&&l>i?u:l,t.width=f?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=no(t.r,r.r),i=ro(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},dc={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new pe({shape:N({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,c=a?"height":"width";f[c]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?vc:or,f=new u({shape:n,z2:1});f.name="item";var c=Ip(a);if(f.calculateTextPosition=VC(c,{isRoundCap:u===vc}),i){var h=f.shape,v=a?"r":"endAngle",d={};h[v]=a?n.r0:n.startAngle,d[v]=n[v],(s?_e:Te)(f,{shape:d},i)}return f}};function WC(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function pc(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?_e:Te)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?_e:Te)(e,{shape:u},f,a)}function gc(r,t){for(var e=0;e0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function YC(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Ip(r){return function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}}(r)}function yc(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=vn(n.getModel("itemStyle"),f,!0);N(f,c),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",d=Vr(n);Br(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:hi(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,zC(r,g==="outside"?v:g,Ip(o),n.get(["label","rotate"]))}Ym(p,d,i.getRawValue(e),function(y){return gp(t,y)});var m=n.getModel(["emphasis"]);rr(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Cn(r,n),YC(a)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function XC(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var ZC=function(){function r(){}return r}(),_c=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new ZC},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function $C(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function Lp(r,t,e){if(vl(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function KC(r,t,e){var n=r.type==="polar"?or:pe;return new n({shape:Lp(t,e,r),silent:!0,z2:0})}function oT(r){r.registerChartView(GC),r.registerSeriesModel(NC),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,J(fd,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cd("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Mp("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var bc=Math.PI*2,ga=Math.PI/180;function Pp(r,t){return Ft(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Rp(r,t){var e=Pp(r,t),n=r.get("center"),a=r.get("radius");O(a)||(a=[0,a]);var i=te(e.width,t.getWidth()),o=te(e.height,t.getHeight()),s=Math.min(i,o),l=te(a[0],s/2),u=te(a[1],s/2),f,c,h=r.coordinateSystem;if(h){var v=h.dataToPoint(n);f=v[0]||0,c=v[1]||0}else O(n)||(n=[n,n]),f=te(n[0],i)+e.x,c=te(n[1],o)+e.y;return{cx:f,cy:c,r0:l,r:u}}function qC(r,t,e){t.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=Pp(n,e),s=Rp(n,e),l=s.cx,u=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*ga,v=n.get("endAngle"),d=n.get("padAngle")*ga;v=v==="auto"?h-bc:-v*ga;var p=n.get("minAngle")*ga,g=p+d,m=0;a.each(i,function(H){!isNaN(H)&&m++});var y=a.getSum(i),_=Math.PI/(y||m)*2,S=n.get("clockwise"),b=n.get("roseType"),x=n.get("stillShowZeroSum"),C=a.getDataExtent(i);C[0]=0;var T=S?1:-1,D=[h,v],A=T*d/2;bg(D,!S),h=D[0],v=D[1];var M=kp(n);M.startAngle=h,M.endAngle=v,M.clockwise=S;var L=Math.abs(v-h),I=L,P=0,R=h;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(H,E){var k;if(isNaN(H)){a.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:c,r:b?NaN:f});return}b!=="area"?k=y===0&&x?_:H*_:k=L/m,kk?(G=R+T*k/2,X=G):(G=R+A,X=z-A),a.setItemLayout(E,{angle:k,startAngle:G,endAngle:X,clockwise:S,cx:l,cy:u,r0:c,r:b?Et(H,C,[c,f]):f}),R=z}),Ie?m:g,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*a,C=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var p=n.getBoundingRect();i.width=p.width;var g=(n.style.margin||0)+2.1;i.height=p.height+g,i.y-=(i.height-c)/2}}}function ao(r){return r.position==="center"}function e1(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*QC,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,h=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var C in x.states)if(x.states[C].ignore===!1)return!0;return!1}t.each(function(x){var C=t.getItemGraphicEl(x),T=C.shape,D=C.getTextContent(),A=C.getTextGuideLine(),M=t.getItemModel(x),L=M.getModel("label"),I=L.get("position")||M.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),V=te(L.get("edgeDistance"),u),H=L.get("bleedMargin"),E=M.getModel("labelLine"),k=E.get("length");k=te(k,u);var z=E.get("length2");if(z=te(z,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":X>0?"left":"right"}var Ct=Math.PI,vt=0,Yr=L.get("rotate");if(fe(Yr))vt=Yr*(Ct/180);else if(I==="center")vt=0;else if(Yr==="radial"||Yr===!0){var Xp=X<0?-G+Ct:-G;vt=Xp}else if(Yr==="tangential"&&I!=="outside"&&I!=="outer"){var ur=Math.atan2(X,j);ur<0&&(ur=Ct*2+ur);var Zp=j>0;Zp&&(ur=Ct+ur),vt=ur-Ct}if(i=!!vt,D.x=ne,D.y=se,D.rotation=vt,D.setStyle({verticalAlign:"middle"}),wt){D.setStyle({align:lr});var di=D.states.select;di&&(di.x+=D.x,di.y+=D.y)}else{var Xr=D.getBoundingRect().clone();Xr.applyTransform(D.getComputedTransform());var _l=(D.style.margin||0)+2.1;Xr.y-=_l/2,Xr.height+=_l,e.push({label:D,labelLine:A,position:I,len:k,len2:z,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new be(X,j),linePoints:bt,textAlign:lr,labelDistance:P,labelAlignTo:R,edgeDistance:V,bleedMargin:H,rect:Xr,unconstrainedWidth:Xr.width,labelStyleWidth:D.style.width})}C.setTextConfig({inside:wt})}}),!i&&r.get("avoidLabelOverlap")&&JC(e,n,a,l,u,h,f,c);for(var p=0;p0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},t.type="pie",t}(Re);function Op(r,t,e){t=O(t)&&{coordDimensions:t}||N({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=ad(n,t).dimensions,i=new nd(a,r);return i.initData(n,e),i}var n1=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 n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r}(),a1=ue(),i1=function(r){B(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 n1(oe(this.getData,this),oe(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Op(this,{coordDimensions:["value"],encodeDefaulter:J(_y,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=a1(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=Og(o,n.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){xo(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.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}(Ve);function o1(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(fe(o)&&!isNaN(o)&&o<0)})}}}function sT(r){r.registerChartView(r1),r.registerSeriesModel(i1),n_("pie",r.registerAction),r.registerLayout(J(qC,"pie")),r.registerProcessor(jC("pie")),r.registerProcessor(o1("pie"))}var s1=function(r){B(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,n){return si(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,n,a){return a.point(n.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}(Ve),Np=4,l1=function(){function r(){}return r}(),u1=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new l1},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,c=i[f]-s/2,h=i[f+1]-l/2;if(e>=c&&n>=h&&e<=c+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,h=0;h=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),c1=function(r){B(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,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,a){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=pl("").reset(e,n,a);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 n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new f1:new mp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Re);function lT(r){_t(Fd),r.registerSeriesModel(s1),r.registerChartView(c1),r.registerLayout(pl("scatter"))}var v1=function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],h=u[1-f],v=[a,i],d=v[f].get("type"),p=v[1-f].get("type"),g=t.data;if(g&&l){var m=[];w(g,function(S,b){var x;O(S)?(x=S.slice(),S.unshift(b)):O(S.value)?(x=N({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,m.push(x)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:c,type:Ho(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ho(p),dimsDef:y.slice()}];return Op(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:J(jv,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),h1=["itemStyle","borderColor"],d1=["itemStyle","borderColor0"],p1=["itemStyle","borderColorDoji"],g1=["itemStyle","color"],m1=["itemStyle","color0"];function gl(r,t){return t.get(r>0?g1:m1)}function ml(r,t){return t.get(r===0?p1:r>0?h1:d1)}var y1={seriesType:"candlestick",plan:Xn(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=gl(s,o),l.stroke=ml(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");N(u,l)}}}}}},_1=["color","borderColor"],S1=function(r){B(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,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,a){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){Un(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&Cc(u,c))return;var h=io(c,f,!0);Te(h,{shape:{points:c.ends}},e,f),oo(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}}).update(function(f,c){var h=a.getItemGraphicEl(c);if(!n.hasValue(f)){i.remove(h);return}var v=n.getItemLayout(f);if(s&&Cc(u,v)){i.remove(h);return}h?(_e(h,{shape:{points:v.ends}},e,f),$a(h)):h=io(v),oo(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}).remove(function(f){var c=a.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),Tc(e,this.group);var n=e.get("clip",!0)?dl(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=a.getItemLayout(o),l=io(s);oo(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){Tc(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Re),x1=function(){function r(){}return r}(),b1=function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new x1},t.prototype.buildPath=function(e,n){var a=n.points;this.__simpleBox?(e.moveTo(a[4][0],a[4][1]),e.lineTo(a[6][0],a[6][1])):(e.moveTo(a[0][0],a[0][1]),e.lineTo(a[1][0],a[1][1]),e.lineTo(a[2][0],a[2][1]),e.lineTo(a[3][0],a[3][1]),e.closePath(),e.moveTo(a[4][0],a[4][1]),e.lineTo(a[5][0],a[5][1]),e.moveTo(a[6][0],a[6][1]),e.lineTo(a[7][0],a[7][1]))},t}(xe);function io(r,t,e){var n=r.ends;return new b1({shape:{points:e?w1(n,r):n},z2:100})}function Cc(r,t){for(var e=!0,n=0;nb?M[i]:A[i],ends:P,brushRect:k(x,C,_)})}function H(G,X){var j=[];return j[a]=X,j[i]=G,isNaN(X)||isNaN(G)?[NaN,NaN]:t.dataToPoint(j)}function E(G,X,j){var ne=X.slice(),se=X.slice();ne[a]=_a(ne[a]+n/2,1,!1),se[a]=_a(se[a]-n/2,1,!0),j?G.push(ne,se):G.push(se,ne)}function k(G,X,j){var ne=H(G,j),se=H(X,j);return ne[a]-=n/2,se[a]-=n/2,{x:ne[0],y:ne[1],width:n,height:se[1]-ne[1]}}function z(G){return G[a]=_a(G[a],1),G}}function d(p,g){for(var m=nt(p.count*4),y=0,_,S=[],b=[],x,C=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=C.get(s,x),A=C.get(u,x),M=C.get(f,x),L=C.get(c,x),I=C.get(h,x);if(isNaN(D)||isNaN(L)||isNaN(I)){m[y++]=NaN,y+=3;continue}m[y++]=Dc(C,x,A,M,f,T),S[a]=D,S[i]=L,_=t.dataToPoint(S,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,S[i]=I,_=t.dataToPoint(S,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function Dc(r,t,e,n,a,i){var o;return e>n?o=-1:e0?r.get(a,t-1)<=n?1:-1:1,o}function A1(r,t){var e=r.getBaseAxis(),n,a=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=te(ae(r.get("barMaxWidth"),a),a),o=te(ae(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?te(s,a):Math.max(Math.min(a/2,i),o)}function uT(r){r.registerChartView(S1),r.registerSeriesModel(Bp),r.registerPreprocessor(T1),r.registerVisual(y1),r.registerLayout(D1)}var M1=["itemStyle","borderWidth"],Ac=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],uo=new Wa,I1=function(r){B(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,n,a){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:Ac[+f],categoryDim:Ac[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=Ic(o,d),g=Mc(o,d,p,h),m=Lc(o,h,g);o.setItemGraphicEl(d,m),i.add(m),Rc(m,h,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var m=Ic(o,d),y=Mc(o,d,m,h),_=Hp(o,y);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?N1(g,h,y):g=Lc(o,h,y,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=y,i.add(g),Rc(g,h,y)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&Pc(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=e.get("clip",!0)?dl(e.coordinateSystem,!1,e):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,n){var a=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){Pc(i,$(o).dataIndex,e,o)}):a.removeAll()},t.type="pictorialBar",t}(Re);function Mc(r,t,e,n){var a=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,f=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};L1(e,i,a,n,h),P1(r,t,a,i,o,h.boundingLength,h.pxSign,f,n,h),R1(e,h.symbolScale,u,n,h);var v=h.symbolSize,d=Hs(e.get("symbolOffset"),v);return k1(e,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function L1(r,t,e,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(O(o)){var c=[fo(s,o[0])-l,fo(s,o[1])-l];c[1]=0?1:-1:f>0?1:-1}function fo(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function P1(r,t,e,n,a,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,h=Math.abs(e[c.wh]),v=r.getItemVisual(t,"symbolSize"),d;O(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[c.index]=te(d[c.index],h),d[f.index]=te(d[f.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function R1(r,t,e,n,a){var i=r.get(M1)||0;i&&(uo.attr({scaleX:t[0],scaleY:t[1],rotation:e}),uo.updateTransform(),i/=uo.getLineScale(),i*=t[n.valueDim.index]),a.valueLineWidth=i||0}function k1(r,t,e,n,a,i,o,s,l,u,f,c){var h=f.categoryDim,v=f.valueDim,d=c.pxSign,p=Math.max(t[v.index]+s,0),g=p;if(n){var m=Math.abs(l),y=Mr(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var S=te(y,t[v.index]),b=Math.max(p+S*2,0),x=_?0:S*2,C=rv(n),T=C?n:kc((m+x)/b),D=m-T*p;S=D/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!C&&n!=="fixed"&&(T=u?kc((Math.abs(u)+x)/b):0),g=T*b-x,c.repeatTimes=T,c.symbolMargin=S}var A=d*(g/2),M=c.pathPosition=[];M[h.index]=e[h.wh]/2,M[v.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var L=c.bundlePosition=[];L[h.index]=e[h.xy],L[v.index]=e[v.xy];var I=c.barRectShape=N({},e);I[v.wh]=d*Math.max(Math.abs(e[v.wh]),Math.abs(M[v.index]+A)),I[h.wh]=e[h.wh];var P=c.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=f.ecSize[h.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function Vp(r){var t=r.symbolPatternSize,e=Gt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function zp(r,t,e,n){var a=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(yl(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:m<0)&&(y=u-1-p),g[l.index]=c*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Fp(r,t,e,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Ar(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,n):(i=r.__pictorialMainPath=Vp(e),a.add(i),Ar(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,n))}function Gp(r,t,e){var n=N({},t.barRectShape),a=r.__pictorialBarRect;a?Ar(a,null,{shape:n},t,e):(a=r.__pictorialBarRect=new pe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function Wp(r,t,e,n){if(e.symbolClip){var a=r.__pictorialClipPath,i=N({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(a)_e(a,{shape:i},s,l);else{i[o.wh]=0,a=new pe({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=e.clipShape[o.wh],As[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function Ic(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=E1,e.isAnimationEnabled=O1,e}function E1(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function O1(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Lc(r,t,e,n){var a=new ye,i=new ye;return a.add(i),a.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?zp(a,t,e):Fp(a,t,e),Gp(a,e,n),Wp(a,t,e,n),a.__pictorialShapeStr=Hp(r,e),a.__pictorialSymbolMeta=e,a}function N1(r,t,e){var n=e.animationModel,a=e.dataIndex,i=r.__pictorialBundle;_e(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},n,a),e.symbolRepeat?zp(r,t,e,!0):Fp(r,t,e,!0),Gp(r,e,!0),Wp(r,t,e,!0)}function Pc(r,t,e,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];yl(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),w(i,function(o){Tn(o,{scaleX:0,scaleY:0},e,t,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(t,null)}function Hp(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function yl(r,t,e){w(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&t.call(e,n)})}function Ar(r,t,e,n,a,i){t&&r.attr(t),n.symbolClip&&!a?e&&r.attr(e):e&&As[a?"updateProps":"initProps"](r,e,n.animationModel,n.dataIndex,i)}function Rc(r,t,e){var n=e.dataIndex,a=e.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");yl(r,function(p){if(p instanceof Nr){var g=p.style;p.useStyle(N({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var m=p.ensureState("emphasis");m.style=o,h&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Br(d,Vr(a),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:hi(t.seriesModel.getData(),n),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),rr(r,f,c,i.get("disabled"))}function kc(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var B1=function(r){B(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=Ms(Nn.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}(Nn);function fT(r){r.registerChartView(I1),r.registerSeriesModel(B1),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,J(fd,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cd("pictorialBar"))}function Ec(r){return O(r[0])}function Oc(r,t){for(var e=[],n=r.length,a=0;a=0;a--)if(!e[a].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[a].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var V1={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;Ec(r)&&(u=r,f=t),Ec(t)&&(u=t,f=r);function c(m,y,_,S,b){var x=m.many,C=m.one;if(x.length===1&&!b){var T=y?x[0]:C,D=y?C:x[0];if(Cg(T))c({many:[T],one:D},!0,_,S,!0);else{var A=s?re({delay:s(_,S)},l):l;Tg(T,D,A),i(T,D,T,D,A)}}else for(var M=re({dividePath:V1[e],individualDelay:s&&function(H,E,k,z){return s(H+_,S)}},l),L=y?Dg(x,C,M):Ag(C,x,M),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,V=0;Vt.length,v=u?Oc(f,u):Oc(h?t:r,[h?r:t]),d=0,p=0;pUp))for(var i=n.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof xe&&!T.animators.length&&T.animateFrom({style:{opacity:0}},C)})})}function Fc(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function Gc(r){return O(r)?r.sort().join(","):r}function kt(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function Y1(r,t){var e=U(),n=U(),a=U();return w(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=Fc(i),f=Gc(u);n.set(f,{dataGroupId:s,data:l}),O(u)&&w(u,function(c){a.set(c,{key:f,dataGroupId:s,data:l})})}),w(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=Fc(i),u=Gc(l),f=n.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:kt(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:kt(s),data:s}]});else if(O(l)){var c=[];w(l,function(d){var p=n.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:kt(p.data),data:p.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:kt(s)}]})}else{var h=a.get(l);if(h){var v=e.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:kt(h.data)}],newSeries:[]},e.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:kt(s)})}}}}),e}function Wc(r,t){for(var e=0;e=0&&a.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:kt(t.oldData[s]),groupIdDim:o.dimension})}),w(ge(r.to),function(o){var s=Wc(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:kt(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&Yp(a,i,n)}function cT(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){w(ge(n.seriesTransition),function(a){w(ge(a.to),function(i){for(var o=n.updatedSeries,s=0;s