"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[759],{2265:function(e,t,n){n.r(t),n.d(t,{Axis:function(){return Gg},ChartView:function(){return du},ComponentModel:function(){return Ir},ComponentView:function(){return nl},List:function(){return up},Model:function(){return $n},PRIORITY:function(){return sh},SeriesModel:function(){return Qs},color:function(){return qe},connect:function(){return nd},dataTool:function(){return Td},dependencies:function(){return Wc},disConnect:function(){return id},disconnect:function(){return rd},dispose:function(){return od},env:function(){return p.Z},extendChartView:function(){return Ug},extendComponentModel:function(){return Fg},extendComponentView:function(){return Hg},extendSeriesModel:function(){return Wg},format:function(){return l},getCoordinateSystemDimensions:function(){return yd},getInstanceByDom:function(){return ad},getInstanceById:function(){return sd},getMap:function(){return Md},graphic:function(){return s},helper:function(){return r},init:function(){return td},innerDrawElementOnCanvas:function(){return Tc.RV},matrix:function(){return ol},number:function(){return o},parseGeoJSON:function(){return xg},parseGeoJson:function(){return xg},registerAction:function(){return fd},registerCoordinateSystem:function(){return gd},registerLayout:function(){return md},registerLoading:function(){return bd},registerLocale:function(){return fi},registerMap:function(){return wd},registerPostInit:function(){return hd},registerPostUpdate:function(){return dd},registerPreprocessor:function(){return ud},registerProcessor:function(){return cd},registerTheme:function(){return ld},registerTransform:function(){return Id},registerUpdateLifecycle:function(){return pd},registerVisual:function(){return vd},setCanvasCreator:function(){return Sd},setPlatformAPI:function(){return Ac.g2},throttle:function(){return yu},time:function(){return a},use:function(){return Cd},util:function(){return u},vector:function(){return al},version:function(){return Hc},zrUtil:function(){return d},zrender:function(){return h}});var i={};n.r(i),n.d(i,{Arc:function(){return vl.Z},BezierCurve:function(){return ml.Z},BoundingRect:function(){return ri.Z},Circle:function(){return ul.Z},CompoundPath:function(){return xl.Z},Ellipse:function(){return cl.Z},Group:function(){return el.Z},Image:function(){return ll.ZP},IncrementalDisplayable:function(){return Ml.Z},Line:function(){return yl.Z},LinearGradient:function(){return _l.Z},OrientedBoundingRect:function(){return Sl.Z},Path:function(){return Ke.ZP},Point:function(){return wl.Z},Polygon:function(){return pl.Z},Polyline:function(){return fl.Z},RadialGradient:function(){return bl.Z},Rect:function(){return gl.Z},Ring:function(){return dl.Z},Sector:function(){return hl.C},Text:function(){return Ue.ZP},applyTransform:function(){return Hl},clipPointsByRect:function(){return jl},clipRectByRect:function(){return ql},createIcon:function(){return Kl},extendPath:function(){return Pl},extendShape:function(){return Cl},getShapeClass:function(){return Ol},getTransform:function(){return Fl},groupTransition:function(){return Xl},initProps:function(){return yn},isElementRemoved:function(){return mn},lineLineIntersect:function(){return $l},linePolygonIntersect:function(){return Jl},makeImage:function(){return Rl},makePath:function(){return Nl},mergePath:function(){return Vl},registerShape:function(){return kl},removeElement:function(){return vn},removeElementWithFadeOut:function(){return _n},resizePath:function(){return zl},setTooltipConfig:function(){return tu},subPixelOptimize:function(){return Gl},subPixelOptimizeLine:function(){return Bl},subPixelOptimizeRect:function(){return Zl},transformDirection:function(){return Wl},traverseElements:function(){return iu},updateProps:function(){return gn}});var r={};n.r(r),n.d(r,{createDimensions:function(){return cp},createList:function(){return tg},createScale:function(){return ig},createSymbol:function(){return wc},createTextStyle:function(){return og},dataStack:function(){return ng},enableHoverEmphasis:function(){return Jt},getECData:function(){return Xe},getLayoutRect:function(){return gr},mixinAxisModelCommonMethods:function(){return rg}});var o={};n.r(o),n.d(o,{MAX_SAFE_INTEGER:function(){return C},asc:function(){return S},getPercentWithPrecision:function(){return T},getPixelPrecision:function(){return I},getPrecision:function(){return w},getPrecisionSafe:function(){return M},isNumeric:function(){return Z},isRadianAroundZero:function(){return P},linearMap:function(){return x},nice:function(){return E},numericToNumber:function(){return B},parseDate:function(){return O},quantile:function(){return V},quantity:function(){return N},quantityExponent:function(){return R},reformIntervals:function(){return z},remRadian:function(){return L},round:function(){return b}});var a={};n.r(a),n.d(a,{format:function(){return ki},parse:function(){return O}});var s={};n.r(s),n.d(s,{Arc:function(){return vl.Z},BezierCurve:function(){return ml.Z},BoundingRect:function(){return ri.Z},Circle:function(){return ul.Z},CompoundPath:function(){return xl.Z},Ellipse:function(){return cl.Z},Group:function(){return el.Z},Image:function(){return ll.ZP},IncrementalDisplayable:function(){return Ml.Z},Line:function(){return yl.Z},LinearGradient:function(){return _l.Z},Polygon:function(){return pl.Z},Polyline:function(){return fl.Z},RadialGradient:function(){return bl.Z},Rect:function(){return gl.Z},Ring:function(){return dl.Z},Sector:function(){return hl.C},Text:function(){return Ue.ZP},clipPointsByRect:function(){return jl},clipRectByRect:function(){return ql},createIcon:function(){return Kl},extendPath:function(){return Pl},extendShape:function(){return Cl},getShapeClass:function(){return Ol},getTransform:function(){return Fl},initProps:function(){return yn},makeImage:function(){return Rl},makePath:function(){return Nl},mergePath:function(){return Vl},registerShape:function(){return kl},resizePath:function(){return zl},updateProps:function(){return gn}});var l={};n.r(l),n.d(l,{addCommas:function(){return Ki},capitalFirst:function(){return ar},encodeHTML:function(){return oi.F1},formatTime:function(){return or},formatTpl:function(){return nr},getTextRect:function(){return bg},getTooltipMarker:function(){return rr},normalizeCssArray:function(){return $i},toCamelCase:function(){return Ji},truncateText:function(){return _g.aF}});var u={};n.r(u),n.d(u,{bind:function(){return d.bind},clone:function(){return d.clone},curry:function(){return d.curry},defaults:function(){return d.defaults},each:function(){return d.each},extend:function(){return d.extend},filter:function(){return d.filter},indexOf:function(){return d.indexOf},inherits:function(){return d.inherits},isArray:function(){return d.isArray},isFunction:function(){return d.isFunction},isObject:function(){return d.isObject},isString:function(){return d.isString},map:function(){return d.map},merge:function(){return d.merge},reduce:function(){return d.reduce}});var c=n(2012),h=n(8466),d=n(2993),p=n(8244),f=n(2787),g=n(2690),y=1e-4,m=20;function v(e){return e.replace(/^\s+|\s+$/g,"")}function x(e,t,n,i){var r=t[0],o=t[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(e<=r)return a;if(e>=o)return s}else{if(e>=r)return a;if(e<=o)return s}else{if(e===r)return a;if(e===o)return s}return(e-r)/l*u+a}function _(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return d.isString(e)?v(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function b(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),m),e=(+e).toFixed(t),n?e:+e}function S(e){return e.sort((function(e,t){return e-t})),e}function w(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return M(e)}function M(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),i=n>0?+t.slice(n+1):0,r=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function I(e,t){var n=Math.log,i=Math.LN10,r=Math.floor(n(e[1]-e[0])/i),o=Math.round(n(Math.abs(t[1]-t[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function T(e,t,n){if(!e[t])return 0;var i=A(e,n);return i[t]||0}function A(e,t){var n=d.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];var i=Math.pow(10,t),r=d.map(e,(function(e){return(isNaN(e)?0:e)/n*i*100})),o=100*i,a=d.map(r,(function(e){return Math.floor(e)})),s=d.reduce(a,(function(e,t){return e+t}),0),l=d.map(r,(function(e,t){return e-a[t]}));while(su&&(u=l[h],c=h);++a[c],l[c]=0,++s}return d.map(a,(function(e){return e/i}))}function D(e,t){var n=Math.max(w(e),w(t)),i=e+t;return n>m?i:b(i,n)}var C=9007199254740991;function L(e){var t=2*Math.PI;return(e%t+t)%t}function P(e){return e>-y&&e=10&&t++,t}function E(e,t){var n,i=R(e),r=Math.pow(10,i),o=e/r;return n=t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10,e=n*r,i>=-20?+e.toFixed(i<0?-i:0):e}function V(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],o=n-i;return o?r+o*(e[i]-r):r}function z(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i=0||r&&d.indexOf(r,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Fe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],He=Ge(Fe),We=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return He(this,e,t)},e}(),Ue=n(4904),Ye=n(2813),Xe=ge(),je=function(e,t,n,i){if(i){var r=Xe(i);r.dataIndex=n,r.dataType=t,r.seriesIndex=e,"group"===i.type&&i.traverse((function(i){var r=Xe(i);r.seriesIndex=e,r.dataIndex=n,r.dataType=t}))}},qe=n(9791),Ke=n(9862),Je=1,$e={},Qe=ge(),et=ge(),tt=0,nt=1,it=2,rt=["emphasis","blur","select"],ot=["normal","emphasis","blur","select"],at=10,st=9,lt="highlight",ut="downplay",ct="select",ht="unselect",dt="toggleSelect";function pt(e){return null!=e&&"none"!==e}var ft=new Ye.ZP(100);function gt(e){if((0,d.isString)(e)){var t=ft.get(e);return t||(t=qe.lift(e,-.1),ft.put(e,t)),t}if((0,d.isGradientObject)(e)){var n=(0,d.extend)({},e);return n.colorStops=(0,d.map)(e.colorStops,(function(e){return{offset:e.offset,color:qe.lift(e.color,-.1)}})),n}return e}function yt(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function mt(e){yt(e,"emphasis",it)}function vt(e){e.hoverState===it&&yt(e,"normal",tt)}function xt(e){yt(e,"blur",nt)}function _t(e){e.hoverState===nt&&yt(e,"normal",tt)}function bt(e){e.selected=!0}function St(e){e.selected=!1}function wt(e,t,n){t(e,n)}function Mt(e,t,n){wt(e,t,n),e.isGroup&&e.traverse((function(e){wt(e,t,n)}))}function It(e,t){switch(t){case"emphasis":e.hoverState=it;break;case"normal":e.hoverState=tt;break;case"blur":e.hoverState=nt;break;case"select":e.selected=!0}}function Tt(e,t,n,i){for(var r=e.style,o={},a=0;a=0,o=!1;if(e instanceof Ke.ZP){var a=Qe(e),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(pt(s)||pt(l)){i=i||{};var u=i.style||{};"inherit"===u.fill?(o=!0,i=(0,d.extend)({},i),u=(0,d.extend)({},u),u.fill=s):!pt(u.fill)&&pt(s)?(o=!0,i=(0,d.extend)({},i),u=(0,d.extend)({},u),u.fill=gt(s)):!pt(u.stroke)&&pt(l)&&(o||(i=(0,d.extend)({},i),u=(0,d.extend)({},u)),u.stroke=gt(l)),i.style=u}}if(i&&null==i.z2){o||(i=(0,d.extend)({},i));var c=e.z2EmphasisLift;i.z2=e.z2+(null!=c?c:at)}return i}function Dt(e,t,n){if(n&&null==n.z2){n=(0,d.extend)({},n);var i=e.z2SelectLift;n.z2=e.z2+(null!=i?i:st)}return n}function Ct(e,t,n){var i=(0,d.indexOf)(e.currentStates,t)>=0,r=e.style.opacity,o=i?null:Tt(e,["opacity"],t,{opacity:1});n=n||{};var a=n.style||{};return null==a.opacity&&(n=(0,d.extend)({},n),a=(0,d.extend)({opacity:i?r:.1*o.opacity},a),n.style=a),n}function Lt(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return At(this,e,t,n);if("blur"===e)return Ct(this,e,n);if("select"===e)return Dt(this,e,n)}return n}function Pt(e){e.stateProxy=Lt;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Lt),n&&(n.stateProxy=Lt)}function kt(e,t){!Zt(e,t)&&!e.__highByOuter&&Mt(e,mt)}function Ot(e,t){!Zt(e,t)&&!e.__highByOuter&&Mt(e,vt)}function Nt(e,t){e.__highByOuter|=1<<(t||0),Mt(e,mt)}function Rt(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mt(e,vt)}function Et(e){Mt(e,xt)}function Vt(e){Mt(e,_t)}function zt(e){Mt(e,bt)}function Bt(e){Mt(e,St)}function Zt(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Gt(e){var t=e.getModel(),n=[],i=[];t.eachComponent((function(t,r){var o=et(r),a="series"===t,s=a?e.getViewOfSeriesModel(r):e.getViewOfComponentModel(r);!a&&i.push(s),o.isBlured&&(s.group.traverse((function(e){_t(e)})),a&&n.push(r)),o.isBlured=!1})),(0,d.each)(i,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Ft(e,t,n,i){var r=i.getModel();function o(e,t){for(var n=0;n0){var o={dataIndex:r,seriesIndex:e.seriesIndex};null!=i&&(o.dataType=i),t.push(o)}}))})),t}function Jt(e,t,n){on(e,!0),Mt(e,Pt),en(e,t,n)}function $t(e){on(e,!1)}function Qt(e,t,n,i){i?$t(e):Jt(e,t,n)}function en(e,t,n){var i=Xe(e);null!=t?(i.focus=t,i.blurScope=n):i.focus&&(i.focus=null)}var tn=["emphasis","blur","select"],nn={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function rn(e,t,n,i){n=n||"itemStyle";for(var r=0;r0){var h=c.duration,p=c.delay,f=c.easing,g={duration:h,delay:p||0,easing:f,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,g):t.animateTo(n,g)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function gn(e,t,n,i,r,o){fn("update",e,t,n,i,r,o)}function yn(e,t,n,i,r,o){fn("enter",e,t,n,i,r,o)}function mn(e){if(!e.__zr)return!0;for(var t=0;t=0&&n.push(e)})),n}e.topologicalTravel=function(e,t,i,r){if(e.length){var o=n(t),a=o.graph,s=o.noEntryList,l={};d.each(e,(function(e){l[e]=!0}));while(s.length){var u=s.pop(),c=a[u],h=!!l[u];h&&(i.call(r,u,c.originalDeps.slice()),delete l[u]),d.each(c.successor,h?f:p)}d.each(l,(function(){var e="";throw new Error(e)}))}function p(e){a[e].entryCount--,0===a[e].entryCount&&s.push(e)}function f(e){l[e]=!0,p(e)}}}function ii(e,t){return d.merge(d.merge({},e,!0),t,!0)}var ri=n(9325),oi=n(5371),ai={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"}},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:". "}}}},si={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:"旭日图"}},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:""}}}},li="ZH",ui="EN",ci=ui,hi={},di={},pi=p.Z.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return e.indexOf(li)>-1?li:ci}():ci;function fi(e,t){e=e.toUpperCase(),di[e]=new $n(t),hi[e]=t}function gi(e){if((0,d.isString)(e)){var t=hi[e.toUpperCase()]||{};return e===li||e===ui?(0,d.clone)(t):(0,d.merge)((0,d.clone)(t),(0,d.clone)(hi[ci]),!1)}return(0,d.merge)((0,d.clone)(e),(0,d.clone)(hi[ci]),!1)}function yi(e){return di[e]}function mi(){return di[ci]}fi(ui,ai),fi(li,si);var vi=1e3,xi=60*vi,_i=60*xi,bi=24*_i,Si=365*bi,wi={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}"},Mi="{yyyy}-{MM}-{dd}",Ii={year:"{yyyy}",month:"{yyyy}-{MM}",day:Mi,hour:Mi+" "+wi.hour,minute:Mi+" "+wi.minute,second:Mi+" "+wi.second,millisecond:wi.none},Ti=["year","month","day","hour","minute","second","millisecond"],Ai=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Di(e,t){return e+="","0000".substr(0,t-e.length)+e}function Ci(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Li(e){return e===Ci(e)}function Pi(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ki(e,t,n,i){var r=O(e),o=r[Ei(n)](),a=r[Vi(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[zi(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[Bi(n)](),h=(c-1)%12+1,d=r[Zi(n)](),p=r[Gi(n)](),f=r[Fi(n)](),g=i instanceof $n?i:yi(i||pi)||mi(),y=g.getModel("time"),m=y.get("month"),v=y.get("monthAbbr"),x=y.get("dayOfWeek"),_=y.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Di(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Di(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Di(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Di(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Di(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,Di(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Di(f,3)).replace(/{S}/g,f+"")}function Oi(e,t,n,i,r){var o=null;if(d.isString(n))o=n;else if(d.isFunction(n))o=n(e.value,t,{level:e.level});else{var a=d.extend({},wi);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(d.isArray(o)){var h=null==e.level?0:e.level>=0?e.level:o.length+e.level;h=Math.min(h,o.length-1),o=o[h]}}return ki(new Date(e.value),o,r,i)}function Ni(e,t){var n=O(e),i=n[Vi(t)]()+1,r=n[zi(t)](),o=n[Bi(t)](),a=n[Zi(t)](),s=n[Gi(t)](),l=n[Fi(t)](),u=0===l,c=u&&0===s,h=c&&0===a,d=h&&0===o,p=d&&1===r,f=p&&1===i;return f?"year":p?"month":d?"day":h?"hour":c?"minute":u?"second":"millisecond"}function Ri(e,t,n){var i=d.isNumber(e)?O(e):e;switch(t=t||Ni(e,n),t){case"year":return i[Ei(n)]();case"half-year":return i[Vi(n)]()>=6?1:0;case"quarter":return Math.floor((i[Vi(n)]()+1)/4);case"month":return i[Vi(n)]();case"day":return i[zi(n)]();case"half-day":return i[Bi(n)]()/24;case"hour":return i[Bi(n)]();case"minute":return i[Zi(n)]();case"second":return i[Gi(n)]();case"millisecond":return i[Fi(n)]()}}function Ei(e){return e?"getUTCFullYear":"getFullYear"}function Vi(e){return e?"getUTCMonth":"getMonth"}function zi(e){return e?"getUTCDate":"getDate"}function Bi(e){return e?"getUTCHours":"getHours"}function Zi(e){return e?"getUTCMinutes":"getMinutes"}function Gi(e){return e?"getUTCSeconds":"getSeconds"}function Fi(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Hi(e){return e?"setUTCFullYear":"setFullYear"}function Wi(e){return e?"setUTCMonth":"setMonth"}function Ui(e){return e?"setUTCDate":"setDate"}function Yi(e){return e?"setUTCHours":"setHours"}function Xi(e){return e?"setUTCMinutes":"setMinutes"}function ji(e){return e?"setUTCSeconds":"setSeconds"}function qi(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Ki(e){if(!Z(e))return d.isString(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Ji(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var $i=d.normalizeCssArray;function Qi(e,t,n){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function r(e){return e&&d.trim(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var a="time"===t,s=e instanceof Date;if(a||s){var l=a?O(e):e;if(!isNaN(+l))return ki(l,i,n);if(s)return"-"}if("ordinal"===t)return d.isStringSafe(e)?r(e):d.isNumber(e)&&o(e)?e+"":"-";var u=B(e);return o(u)?Ki(u):d.isStringSafe(e)?r(e):"boolean"===typeof e?e+"":"-"}var er=["a","b","c","d","e","f","g"],tr=function(e,t){return"{"+e+(null==t?"":t)+"}"};function nr(e,t,n){d.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o':'';var a=n.markerId||"markerX";return{renderMode:o,content:"{"+a+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function or(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=O(t),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),c=i[r+"Seconds"](),h=i[r+"Milliseconds"]();return e=e.replace("MM",Di(a,2)).replace("M",a).replace("yyyy",o).replace("yy",Di(o%100+"",2)).replace("dd",Di(s,2)).replace("d",s).replace("hh",Di(l,2)).replace("h",l).replace("mm",Di(u,2)).replace("m",u).replace("ss",Di(c,2)).replace("s",c).replace("SSS",Di(h,3)),e}function ar(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e}function sr(e,t){return t=t||"transparent",d.isString(e)?e:d.isObject(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function lr(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var ur=d.each,cr=["left","right","top","bottom","width","height"],hr=[["width","left","right"],["height","top","bottom"]];function dr(e,t,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=d.width+(f?-f.x+d.x:0);c=o+g,c>i||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var y=d.height+(f?-f.y+d.y:0);h=a+y,h>r||l.newline?(o+=s+n,a=0,h=y,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=h+n)}))}var pr=dr;d.curry(dr,"vertical"),d.curry(dr,"horizontal");function fr(e,t,n){var i=t.width,r=t.height,o=_(e.left,i),a=_(e.top,r),s=_(e.right,i),l=_(e.bottom,r);return(isNaN(o)||isNaN(parseFloat(e.left)))&&(o=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=i),(isNaN(a)||isNaN(parseFloat(e.top)))&&(a=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=r),n=$i(n||0),{width:Math.max(s-o-n[1]-n[3],0),height:Math.max(l-a-n[0]-n[2],0)}}function gr(e,t,n){n=$i(n||0);var i=t.width,r=t.height,o=_(e.left,i),a=_(e.top,r),s=_(e.right,i),l=_(e.bottom,r),u=_(e.width,i),c=_(e.height,r),h=n[2]+n[0],d=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(c)&&(c=r-l-h-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-c-h),e.left||e.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d;break}switch(e.top||e.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-h;break}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var f=new ri.Z(o+n[3],a+n[0],u,c);return f.margin=n,f}function yr(e,t,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if(o=o||e,o.x=e.x,o.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new ri.Z(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();a=a.clone(),a.applyTransform(c)}var h=gr(d.defaults({width:a.width,height:a.height},t),n,i),p=s?h.x-a.x:0,f=l?h.y-a.y:0;return"raw"===u?(o.x=p,o.y=f):(o.x+=p,o.y+=f),o===e&&e.markRedraw(),!0}function mr(e,t){return null!=e[hr[t][0]]||null!=e[hr[t][1]]&&null!=e[hr[t][2]]}function vr(e){var t=e.layoutMode||e.constructor.layoutMode;return d.isObject(t)?t:t?{type:t}:null}function xr(e,t,n){var i=n&&n.ignoreSize;!d.isArray(i)&&(i=[i,i]);var r=a(hr[0],0),o=a(hr[1],1);function a(n,r){var o={},a=0,u={},c=0,h=2;if(ur(n,(function(t){u[t]=e[t]})),ur(n,(function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++})),i[r])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(c!==h&&a){if(a>=h)return o;for(var d=0;d=0;a--)o=d.merge(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",i=e+"Id";return be(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},t)},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}($n);function Mr(e){var t=[];return d.each(wr.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=d.map(t,(function(e){return Le(e).main})),"dataset"!==e&&d.indexOf(t,"dataset")<=0&&t.unshift("dataset"),t}Re(wr,$n),Ze(wr),ti(wr),ni(wr,Mr);var Ir=wr,Tr="";"undefined"!==typeof navigator&&(Tr=navigator.platform||"");var Ar="rgba(0, 0, 0, 0.2)",Dr={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Ar,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ar,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ar,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ar,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ar,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ar,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Tr.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},Cr=(0,d.createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Lr="original",Pr="arrayRows",kr="objectRows",Or="keyedColumns",Nr="typedArray",Rr="unknown",Er="column",Vr="row",zr={Must:1,Might:2,Not:3},Br=ge();function Zr(e){Br(e).datasetMap=(0,d.createHashMap)()}function Gr(e,t,n){var i={},r=Hr(t);if(!r||!e)return i;var o,a,s=[],l=[],u=t.ecModel,c=Br(u).datasetMap,h=r.uid+"_"+n.seriesLayoutBy;e=e.slice(),(0,d.each)(e,(function(t,n){var r=(0,d.isObject)(t)?t:e[n]={name:t};"ordinal"===r.type&&null==o&&(o=n,a=g(r)),i[r.name]=[]}));var p=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function f(e,t,n){for(var i=0;it)return e[i];return e[n-1]}function ro(e,t,n,i,r,o,a){o=o||e;var s=t(o),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=null!=a&&i?io(i,a):n;if(c=c||n,c&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}function oo(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var ao="\0_ec_inner",so=1;var lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.init=function(e,t,n,i,r,o){i=i||{},this.option=null,this._theme=new $n(i),this._locale=new $n(r),this._optionManager=o},t.prototype.setOption=function(e,t,n){var i=fo(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,fo(t))},t.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var r=i.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(r,t)):$r(this,r),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this);a.length&&(0,d.each)(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=(0,d.createHashMap)(),s=t&&t.replaceMergeMainTypeMap;function l(t){var o=qr(this,t,X(e[t])),a=i.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=$(a,o,l);he(u,t,Ir),n[t]=null,i.set(t,null),r.set(t,0);var c,h=[],p=[],f=0;(0,d.each)(u,(function(e,n){var i=e.existing,r=e.newOption;if(r){var o="series"===t,a=Ir.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(c)return void 0;c=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=(0,d.extend)({componentIndex:n},e.keyInfo);i=new a(r,this,this,s),(0,d.extend)(i,s),e.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),p.push(i),f++):(h.push(void 0),p.push(void 0))}),this),n[t]=h,i.set(t,p),r.set(t,f),"series"===t&&Kr(this)}Zr(this),(0,d.each)(e,(function(e,t){null!=e&&(Ir.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?(0,d.clone)(e):(0,d.merge)(n[t],e,!0))})),s&&s.each((function(e,t){Ir.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),Ir.topologicalTravel(o,Ir.getAllClassMainTypes(),l,this),this._seriesIndices||Kr(this)},t.prototype.getOption=function(){var e=(0,d.clone)(this.option);return(0,d.each)(e,(function(t,n){if(Ir.hasClass(n)){for(var i=X(t),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!ue(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,e[n]=i}})),delete e[ao],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,t){var n=this._componentsMap.get(e);if(n){var i=n[t||0];if(i)return i;if(null==t)for(var r=0;r=t:"max"===n?e<=t:e===t}function Ao(e,t){return e.join(",")===t.join(",")}var Do=wo,Co=d.each,Lo=d.isObject,Po=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ko(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=Po.length;n=0;g--){var y=e[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,h)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if("all"===l||"positive"===l&&m>0||"negative"===l&&m<0||"samesign"===l&&p>=0&&m>0||"samesign"===l&&p<=0&&m<0){p=D(p,m),f=m;break}}}return i[0]=p,i[1]=f,i}))}))}var ta,na,ia,ra,oa,aa=function(){function e(e){this.data=e.data||(e.sourceFormat===Or?{}:[]),this.sourceFormat=e.sourceFormat||Rr,this.seriesLayoutBy=e.seriesLayoutBy||Er,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(e){for(var t=0;t=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}))}},e.prototype.getRawValue=function(e,t){return Da(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Pa(e){var t,n;return d.isObject(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function ka(e){return new Oa(e)}var Oa=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return t=e?null:ot},gte:function(e,t){return e>=t}},Ga=function(){function e(e,t){if(!(0,d.isNumber)(t)){var n="";0,Ea(n)}this._opFn=Za[e],this._rvalFloat=B(t)}return e.prototype.evaluate=function(e){return(0,d.isNumber)(e)?this._opFn(e,this._rvalFloat):this._opFn(B(e),this._rvalFloat)},e}(),Fa=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=(0,d.isNumber)(e)?e:B(e),i=(0,d.isNumber)(t)?t:B(t),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=(0,d.isString)(e),s=(0,d.isString)(t);a&&(n=s?e:0),s&&(i=a?t:0)}return ni?-this._resultLT:0},e}(),Ha=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=B(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=B(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function Wa(e,t){return"eq"===e||"ne"===e?new Ha("eq"===e,t):(0,d.hasOwn)(Za,e)?new Ga(e,t):null}var Ua=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Va(e,t)},e}();function Ya(e,t){var n=new Ua,i=e.data,r=n.sourceFormat=e.sourceFormat,o=e.startIndex,a="";e.seriesLayoutBy!==Er&&Ea(a);var s=[],l={},u=e.dimensionsDefine;if(u)(0,d.each)(u,(function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};if(s.push(i),null!=n){var r="";(0,d.hasOwn)(l,n)&&Ea(r),l[n]=i}}));else for(var c=0;c65535?rs:os}function cs(){return[1/0,-1/0]}function hs(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ds(e,t,n,i,r){var o=ls[n||"float"];if(r){var a=e[t],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=(0,d.map)(o,(function(e){return e.property})),u=0;um[1]&&(m[1]=y)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return o;r=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks,r=i[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var a=1/0,s=-1,l=0,u=0,c=this.count();u=0&&s<0)&&(a=p,s=d,l=0),d===s&&(o[l++]=u))}return o.length=l,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var r=0;r=c&&v<=h||isNaN(v))&&(s[l++]=g),g++}f=!0}else if(2===r){y=p[i[0]];var x=p[i[1]],_=e[i[1]][0],b=e[i[1]][1];for(m=0;m=c&&v<=h||isNaN(v))&&(S>=_&&S<=b||isNaN(S))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===r)for(m=0;m=c&&v<=h||isNaN(v))&&(s[l++]=w)}else for(m=0;me[T][1])&&(M=!1)}M&&(s[l++]=t.getRawIndex(m))}return ly[1]&&(y[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,i,r,o=this.clone([e],!0),a=o._chunks,s=a[e],l=this.count(),u=0,c=Math.floor(1/t),h=this.getRawIndex(0),d=new(us(this._rawCount))(Math.min(2*(Math.ceil(l/c)+2),l));d[u++]=h;for(var p=1;pn&&(n=i,r=x))}T>0&&Tu-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=y),h[d++]=m}return r._count=d,r._indices=h,r._updateGetRawIdx(),r},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,r=0,o=this.count();rs&&(s=c)}return i=[a,s],this._extent[e]=i,i},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,r=0;r=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,i){return Va(e[i],this._dimensions[i])}ns={arrayRows:e,objectRows:function(e,t,n,i){return Va(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return Va(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),fs=ps,gs=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(ms(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),l=u.getSource(),a=l.data,s=l.sourceFormat,t=[u._getVersionSign()]}else a=o.get("data",!0),s=(0,d.isTypedArray)(a)?Nr:Lr,t=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},p=(0,d.retrieve2)(c.seriesLayoutBy,h.seriesLayoutBy)||null,f=(0,d.retrieve2)(c.sourceHeader,h.sourceHeader),g=(0,d.retrieve2)(c.dimensions,h.dimensions),y=p!==h.seriesLayoutBy||!!f!==!!h.sourceHeader||g;e=y?[la(a,{seriesLayoutBy:p,sourceHeader:f,dimensions:g},s)]:[]}else{var m=n;if(r){var v=this._applyTransform(i);e=v.sourceList,t=v.upstreamSignList}else{var x=m.get("source",!0);e=[la(x,this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==e.length&&vs(o)}var a=[],s=[];return(0,d.each)(e,(function(e){e.prepareSource();var t=e.getSource(r||0),n="";null==r||t||vs(n),a.push(t),s.push(e._getVersionSign())})),i?t=Qa(i,a,{datasetIndex:n.componentIndex}):null!=r&&(t=[ca(a[0])]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return(0,d.each)(e.blocks,(function(e){var n=Ts(e);n>=t&&(t=n+ +(i&&(!n||Ms(e)&&!e.noHeader)))})),t}return 0}function As(e,t,n,i){var r=t.noHeader,o=Ls(Ts(t)),a=[],s=t.blocks||[];(0,d.assert)(!s||(0,d.isArray)(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if((0,d.hasOwn)(u,l)){var c=new Fa(u[l],null);s.sort((function(e,t){return c.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===l&&s.reverse()}(0,d.each)(s,(function(n,r){var s=t.valueFormatter,l=Is(n)(s?(0,d.extend)((0,d.extend)({},e),{valueFormatter:s}):e,n,r>0?o.html:0,i);null!=l&&a.push(l)}));var h="richText"===e.renderMode?a.join(o.richText):Ps(a.join(""),r?n:o.html);if(r)return h;var p=Qi(t.header,"ordinal",e.useUTC),f=_s(i,e.renderMode).nameStyle;return"richText"===e.renderMode?Ns(e,p,f)+o.richText+h:Ps('
'+(0,oi.F1)(p)+"
"+h,n)}function Ds(e,t,n,i){var r=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return e=(0,d.isArray)(e)?e:[e],(0,d.map)(e,(function(e,t){return Qi(e,(0,d.isArray)(f)?f[t]:f,u)}))};if(!o||!a){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),p=o?"":Qi(l,"ordinal",u),f=t.valueType,g=a?[]:c(t.value),y=!s||!o,m=!s&&o,v=_s(i,r),x=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":h)+(o?"":Ns(e,p,x))+(a?"":Rs(e,g,y,m,_)):Ps((s?"":h)+(o?"":ks(p,!s,x))+(a?"":Os(g,y,m,_)),n)}}function Cs(e,t,n,i,r,o){if(e){var a=Is(e),s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter};return a(s,e,0,o)}}function Ls(e){return{html:bs[e],richText:Ss[e]}}function Ps(e,t){var n='
',i="margin: "+t+"px 0 0";return'
'+e+n+"
"}function ks(e,t,n){var i=t?"margin-left:2px":"";return''+(0,oi.F1)(e)+""}function Os(e,t,n,i){var r=n?"10px":"20px",o=t?"float:right;margin-left:"+r:"";return e=(0,d.isArray)(e)?e:[e],''+(0,d.map)(e,(function(e){return(0,oi.F1)(e)})).join("  ")+""}function Ns(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Rs(e,t,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle((0,d.isArray)(t)?t.join(" "):t,o)}function Es(e,t){var n=e.getData().getItemVisual(t,"style"),i=n[e.visualDrawType];return sr(i)}function Vs(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var zs=function(){function e(){this.richTextStyles={},this._nextStyleNameId=G()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var i="richText"===n?this._generateStyleName():null,r=rr({color:t,type:e,renderMode:n,markerId:i});return(0,d.isString)(r)?r:(this.richTextStyles[i]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};(0,d.isArray)(t)?(0,d.each)(t,(function(e){return(0,d.extend)(n,e)})):(0,d.extend)(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}();function Bs(e){var t,n,i,r,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),p=(0,d.isArray)(h),f=Es(o,a);if(c>1||p&&!c){var g=Zs(h,o,a,u,f);t=g.inlineValues,n=g.inlineValueTypes,i=g.blocks,r=g.inlineValues[0]}else if(c){var y=l.getDimensionInfo(u[0]);r=t=Da(l,a,u[0]),n=y.type}else r=t=p?h[0]:h;var m=le(o),v=m&&o.name||"",x=l.getName(a),_=s?v:x;return ws("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[ws("nameValue",{markerType:"item",markerColor:f,name:_,noName:!(0,d.trim)(_),value:t,valueType:n})].concat(i||[])})}function Zs(e,t,n,i,r){var o=t.getData(),a=(0,d.reduce)(e,(function(e,t,n){var i=o.getDimensionInfo(n);return e||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(ws("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?(0,d.each)(i,(function(e){c(Da(o,n,e),e)})):(0,d.each)(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}var Gs=ge();function Fs(e,t){return e.getName(t)||e.getId(t)}var Hs="__universalTransitionEnabled",Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return(0,c.ZT)(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=ka({count:Xs,reset:js}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=Gs(this).sourceManager=new gs(this);i.prepareSource();var r=this.getInitialData(e,n);Ks(r,this),this.dataTask.context.data=r,Gs(this).dataBeforeProcessed=r,Us(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=vr(this),i=n?_r(e):{},r=this.subType;Ir.hasClass(r)&&(r+="Series"),d.merge(e,t.getTheme().get(this.subType)),d.merge(e,this.getDefaultOption()),j(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&xr(e,i,n)},t.prototype.mergeOption=function(e,t){e=d.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=vr(this);n&&xr(this.option,e,n);var i=Gs(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(e,t);Ks(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Gs(this).dataBeforeProcessed=r,Us(this),this._initSelectedMapFromData(r)},t.prototype.fillDataTextStyle=function(e){if(e&&!d.isTypedArray(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,r=to.prototype.getColorFromPalette.call(this,e,t,n);return r||(r=i.getColorFromPalette(e,t,n)),r},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,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(t);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[Fs(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Hs])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,i,r=this.option,o=r.selectedMode,a=t.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){d.isObject(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Ir.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}(Ir);function Us(e){var t=e.name;le(e)||(e.name=Ys(e)||t)}function Ys(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),i=[];return d.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}function Xs(e){return e.model.getRawData().count()}function js(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),qs}function qs(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Ks(e,t){d.each(d.concatArray(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,d.curry(Js,t))}))}function Js(e,t){var n=$s(e);return n&&n.setOutputEnd((t||this).count()),t}function $s(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(e.uid))}return i}}d.mixin(Ws,La),d.mixin(Ws,to),Re(Ws,Ir);var Qs=Ws,el=n(1053),tl=function(){function e(){this.group=new el.Z,this.uid=ei("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){},e.prototype.updateLayout=function(e,t,n,i){},e.prototype.updateVisual=function(e,t,n,i){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Oe(tl),Ze(tl);var nl=tl;function il(){var e=ge();return function(t){var n=e(t),i=t.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}var rl=n(91),ol=n(7728),al=n(6276),sl=n(6196),ll=n(606),ul=n(1418),cl=n(3279),hl=n(8653),dl=n(1396),pl=n(8656),fl=n(2053),gl=n(9002),yl=n(1314),ml=n(7576),vl=n(5778),xl=n(8842),_l=n(5667),bl=n(2514),Sl=n(8594),wl=n(4337),Ml=n(2533),Il=n(5653),Tl=Math.max,Al=Math.min,Dl={};function Cl(e){return Ke.ZP.extend(e)}var Ll=rl.Pc;function Pl(e,t){return Ll(e,t)}function kl(e,t){Dl[e]=t}function Ol(e){if(Dl.hasOwnProperty(e))return Dl[e]}function Nl(e,t,n,i){var r=rl.iR(e,t);return n&&("center"===i&&(n=El(n,r.getBoundingRect())),zl(r,n)),r}function Rl(e,t,n){var i=new ll.ZP({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var r={width:e.width,height:e.height};i.setStyle(El(t,r))}}});return i}function El(e,t){var n,i=t.width/t.height,r=e.height*i;r<=e.width?n=e.height:(r=e.width,n=r/i);var o=e.x+e.width/2,a=e.y+e.height/2;return{x:o-r/2,y:a-n/2,width:r,height:n}}var Vl=rl.AA;function zl(e,t){if(e.applyTransform){var n=e.getBoundingRect(),i=n.calculateTransform(t);e.applyTransform(i)}}function Bl(e,t){return Il._3(e,e,{lineWidth:t}),e}function Zl(e){return Il.Pw(e.shape,e.shape,e.style),e}var Gl=Il.vu;function Fl(e,t){var n=ol.identity([]);while(e&&e!==t)ol.mul(n,e.getLocalTransform(),n),e=e.parent;return n}function Hl(e,t,n){return t&&!(0,d.isArrayLike)(t)&&(t=sl.ZP.getLocalTransform(t)),n&&(t=ol.invert([],t)),al.applyTransform([],e,t)}function Wl(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),r=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-i:"right"===e?i:0,"top"===e?-r:"bottom"===e?r:0];return o=Hl(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Ul(e){return!e.isGroup}function Yl(e){return null!=e.shape}function Xl(e,t,n){if(e&&t){var i=r(e);t.traverse((function(e){if(Ul(e)&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),gn(e,r,n,Xe(e).dataIndex)}}}))}function r(e){var t={};return e.traverse((function(e){Ul(e)&&e.anid&&(t[e.anid]=e)})),t}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return Yl(e)&&(t.shape=(0,d.extend)({},e.shape)),t}}function jl(e,t){return(0,d.map)(e,(function(e){var n=e[0];n=Tl(n,t.x),n=Al(n,t.x+t.width);var i=e[1];return i=Tl(i,t.y),i=Al(i,t.y+t.height),[n,i]}))}function ql(e,t){var n=Tl(e.x,t.x),i=Al(e.x+e.width,t.x+t.width),r=Tl(e.y,t.y),o=Al(e.y+e.height,t.y+t.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Kl(e,t,n){var i=(0,d.extend)({rectHover:!0},t),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(r.image=e.slice(8),(0,d.defaults)(r,n),new ll.ZP(i)):Nl(e.replace("path://",""),i,n,"center")}function Jl(e,t,n,i,r){for(var o=0,a=r[r.length-1];o1)return!1;var y=Ql(p,f,c,h)/d;return!(y<0||y>1)}function Ql(e,t,n,i){return e*i-n*t}function eu(e){return e<=1e-6&&e>=-1e-6}function tu(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,r=(0,d.isString)(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&(0,d.each)((0,d.keys)(l),(function(e){(0,d.hasOwn)(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=Xe(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:(0,d.defaults)({content:i,formatterParams:s},r)}}function nu(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function iu(e,t){if(e)if((0,d.isArray)(e))for(var n=0;n=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}function mu(e,t,n,i){var r=e[t];if(r){var o=r[pu]||r,a=r[gu],s=r[fu];if(s!==n||a!==i){if(null==n||!i)return e[t]=o;r=e[t]=yu(o,n,"debounce"===i),r[pu]=o,r[gu]=i,r[fu]=n}return r}}function vu(e,t){var n=e[t];n&&n[pu]&&(n.clear&&n.clear(),e[t]=n[pu])}var xu=ge(),_u={itemStyle:Ge(jn,!0),lineStyle:Ge(Un,!0)},bu={lineStyle:"stroke",itemStyle:"fill"};function Su(e,t){var n=e.visualStyleMapper||_u[t];return n||(console.warn("Unknown style type '"+t+"'."),_u.itemStyle)}function wu(e,t){var n=e.visualDrawType||bu[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var Mu={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=e.getModel(i),o=Su(e,i),a=o(r),s=r.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=wu(e,i),u=a[l],c=(0,d.isFunction)(u)?u:null,h="auto"===a.fill||"auto"===a.stroke;if(!a[l]||c||h){var p=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[l]||(a[l]=p,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||(0,d.isFunction)(a.fill)?p:a.fill,a.stroke="auto"===a.stroke||(0,d.isFunction)(a.stroke)?p:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var i=e.getDataParams(n),r=(0,d.extend)({},a);r[l]=c(i),t.setItemVisual(n,"style",r)}}}},Iu=new $n,Tu={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=Su(e,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){Iu.option=n[i];var a=r(Iu),s=e.ensureUniqueItemVisual(t,"style");(0,d.extend)(s,a),Iu.option.decal&&(e.setItemVisual(t,"decal",Iu.option.decal),Iu.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},Au={performRawSeries:!0,overallReset:function(e){var t=(0,d.createHashMap)();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,r=t.get(i);r||(r={},t.set(i,r)),xu(e).scope=r}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),i={},r=t.getData(),o=xu(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=wu(t,a);r.each((function(e){var t=r.getRawIndex(e);i[t]=e})),n.each((function(e){var a=i[e],l=r.getItemVisual(a,"colorFromPalette");if(l){var u=r.ensureUniqueItemVisual(a,"style"),c=n.getName(e)||e+"",h=n.count();u[s]=t.getColorFromPalette(c,o,h)}}))}}))}},Du=Math.PI;function Cu(e,t){t=t||{},d.defaults(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 n=new el.Z,i=new gl.Z({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var r,o=new Ue.ZP({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new gl.Z({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&(r=new vl.Z({shape:{startAngle:-Du/2,endAngle:-Du/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),r.animateShape(!0).when(1e3,{endAngle:3*Du/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Du/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Lu=function(){function e(e,t,n,i){this._stageTaskMap=(0,d.createHashMap)(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,r=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=r?n.step:null,a=i&&i.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData(),r=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,a=e.get("large")&&r>=e.get("largeThreshold"),s="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=(0,d.createHashMap)();e.eachSeries((function(e){var i=e.getProgressive(),r=e.uid;n.set(r,{id:r,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;(0,d.each)(this._allHandlers,(function(i){var r=e.get(i.uid)||e.set(i.uid,{}),o="";(0,d.assert)(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,t,n),i.overallReset&&this._createOverallStageTask(i,r,t,n)}),this)},e.prototype.prepareView=function(e,t,n,i){var r=e.renderTask,o=r.context;o.model=t,o.ecModel=n,o.api=i,r.__block=!e.incrementalPrepareRender,this._pipe(t,r)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,i){i=i||{};var r=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}(0,d.each)(e,(function(e,s){if(!i.visualType||i.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){a(i,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each((function(e){e.perform(p)})),c.perform(p)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,i){var r=this,o=t.seriesTaskMap,a=t.seriesTaskMap=(0,d.createHashMap)(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||ka({plan:Ru,reset:Eu,count:Bu}));l.context={model:t,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:r},r._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},e.prototype._createOverallStageTask=function(e,t,n,i){var r=this,o=t.overallTask=t.overallTask||ka({reset:Pu});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=(0,d.createHashMap)(),l=e.seriesType,u=e.getTargetSeries,c=!0,h=!1,p="";function f(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(h=!0,ka({reset:ku,onDirty:Nu})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,r._pipe(e,n)}(0,d.assert)(!e.createOnAllSeries,p),l?n.eachRawSeriesByType(l,f):u?u(n,i).each(f):(c=!1,(0,d.each)(n.getSeries(),f)),h&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},e.wrapStageHandler=function(e,t){return(0,d.isFunction)(e)&&(e={overallReset:e,seriesType:Zu(e)}),e.uid=ei("stageHandler"),t&&(e.visualType=t),e},e}();function Pu(e){e.overallReset(e.ecModel,e.api,e.payload)}function ku(e){return e.overallProgress&&Ou}function Ou(){this.agent.dirty(),this.getDownstream().dirty()}function Nu(){this.agent&&this.agent.dirty()}function Ru(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Eu(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=X(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?(0,d.map)(t,(function(e,t){return zu(t)})):Vu}var Vu=zu(0);function zu(e){return function(t,n){var i=n.data,r=n.resetDefines[e];if(r&&r.dataEach)for(var o=t.start;o0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(r)&&(n[r]=e,s=!0),s||(i[r]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,i,r));function u(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),tc=["symbol","symbolSize","symbolRotate","symbolOffset"],nc=tc.concat(["symbolKeepAspect"]),ic={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a0&&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,t,n){if(!this[lh])if(this._disposed)Fh(this.id);else{var i,r,o;if((0,d.isObject)(t)&&(n=t.lazyUpdate,i=t.silent,r=t.replaceMerge,o=t.transition,t=t.notMerge),this[lh]=!0,!this._model||t){var a=new Do(this._api),s=this._theme,l=this._model=new go;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:r},Yh);var u={seriesTransition:o,optionChanged:!0};if(n)this[uh]={silent:i,updateParams:u},this[lh]=!1,this.getZr().wakeUp();else{try{xh(this),Sh.update.call(this,null,u)}catch(c){throw this[uh]=null,this[lh]=!1,c}this._ssr||this._zr.flush(),this[uh]=null,this[lh]=!1,Th.call(this,i),Ah.call(this,i)}}},t.prototype.setTheme=function(){Ra("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},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||p.Z.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(p.Z.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return(0,d.each)(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){e=e||{};var t=e.excludeComponents,n=this._model,i=[],r=this;(0,d.each)(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=r._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return(0,d.each)(i,(function(e){e.group.ignore=!1})),o}Fh(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Jh[n]){var a=o,s=o,l=-o,u=-o,c=[],p=e&&e.pixelRatio||this.getDevicePixelRatio();(0,d.each)(Kh,(function(o,h){if(o.group===n){var p=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas((0,d.clone)(e)),f=o.getDom().getBoundingClientRect();a=i(f.left,a),s=i(f.top,s),l=r(f.right,l),u=r(f.bottom,u),c.push({dom:p,left:f.left,top:f.top})}})),a*=p,s*=p,l*=p,u*=p;var f=l-a,g=u-s,y=Ac.qW.createCanvas(),m=h.init(y,{renderer:t?"svg":"canvas"});if(m.resize({width:f,height:g}),t){var v="";return(0,d.each)(c,(function(e){var t=e.left-a,n=e.top-s;v+=''+e.dom+""})),m.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new gl.Z({shape:{x:0,y:0,width:f,height:g},style:{fill:e.connectedBackgroundColor}})),(0,d.each)(c,(function(e){var t=new ll.ZP({style:{x:e.left*p-a,y:e.top*p-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),y.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}Fh(this.id)},t.prototype.convertToPixel=function(e,t){return wh(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return wh(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){if(!this._disposed){var n,i=this._model,r=me(i,e);return(0,d.each)(r,(function(e,i){i.indexOf("Models")>=0&&(0,d.each)(e,(function(e){var r=e.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(t);else if("seriesModels"===i){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}else 0}),this)}),this),!!n}Fh(this.id)},t.prototype.getVisual=function(e,t){var n=this._model,i=me(n,e,{defaultMainType:"series"}),r=i.seriesModel;var o=r.getData(),a=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?o.indexOfRawIndex(i.dataIndex):null;return null!=a?oc(o,a,t):ac(o,t)},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;(0,d.each)(Gh,(function(t){var n=function(n){var i,r=e.getModel(),o=n.target,a="globalout"===t;if(a?i={}:o&&hc(o,(function(e){var t=Xe(e);if(t&&null!=t.dataIndex){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return i=n&&n.getDataParams(t.dataIndex,t.dataType)||{},!0}if(t.eventData)return i=(0,d.extend)({},t.eventData),!0}),!0),i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&e["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,i.event=n,i.type=t,e._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:c},e.trigger(t,i)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)})),(0,d.each)(Wh,(function(t,n){e._messageCenter.on(n,(function(e){this.trigger(n,e)}),e)})),(0,d.each)(["selectchanged"],(function(t){e._messageCenter.on(t,(function(e){this.trigger(t,e)}),e)})),cc(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?Fh(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)Fh(this.id);else{this._disposed=!0;var e=this.getDom();e&&Se(this.getDom(),ed,"");var t=this,n=t._api,i=t._model;(0,d.each)(t._componentsViews,(function(e){e.dispose(i,n)})),(0,d.each)(t._chartsViews,(function(e){e.dispose(i,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Kh[t.id]}},t.prototype.resize=function(e){if(!this[lh])if(this._disposed)Fh(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[uh]&&(null==i&&(i=this[uh].silent),n=!0,this[uh]=null),this[lh]=!0;try{n&&xh(this),Sh.update.call(this,{type:"resize",animation:(0,d.extend)({duration:0},e&&e.animation)})}catch(r){throw this[lh]=!1,r}this[lh]=!1,Th.call(this,i),Ah.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed)Fh(this.id);else if((0,d.isObject)(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),qh[e]){var n=qh[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){this._disposed?Fh(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=(0,d.extend)({},e);return t.type=Wh[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)Fh(this.id);else if((0,d.isObject)(t)||(t={silent:!!t}),Hh[e.type]&&this._model)if(this[lh])this._pendingActions.push(e);else{var n=t.silent;Ih.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&p.Z.browser.weChat&&this._throttledZrFlush(),Th.call(this,n),Ah.call(this,n)}},t.prototype.updateLabelLayout=function(){Bc.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)Fh(this.id);else{var t=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(t);0,i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){var t=[],n=[],i=!1;if(e.eachComponent((function(e,r){var o=r.get("zlevel")||0,a=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:r.componentIndex,type:e,key:s})})),i){var r,o,a=t.concat(n);(0,f.Z)(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),(0,d.each)(a,(function(t){var n=e.getComponent(t.type,t.idx),i=t.zlevel,a=t.key;null!=r&&(i=Math.max(r,i)),a?(i===r&&a!==o&&i++,o=a):o&&(i===r&&i++,o=""),r=i,n.setZLevel(i)}))}}function n(e){for(var t=[],n=e.currentStates,i=0;it.get("hoverLayerThreshold")&&!p.Z.node&&!p.Z.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}function r(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}function o(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered((function(e){return a(e,n,i,-1/0),!0}))}}function a(e,t,n,i){var r=e.getTextContent(),o=e.getTextGuideLine(),s=e.isGroup;if(s)for(var l=e.childrenRef(),u=0;u0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;t.eachRendered((function(e){if(e.states&&e.states.emphasis){if(mn(e))return;if(e instanceof Ke.ZP&&hn(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&n(e)}}))}xh=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),_h(e,!0),_h(e,!1),t.plan()},_h=function(e,t){for(var n=e._model,i=e._scheduler,r=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l=0)){xd.push(n);var o=Uu.wrapStageHandler(n,r);o.__prio=t,o.__raw=n,e.push(o)}}function bd(e,t){qh[e]=t}function Sd(e){(0,Ac.g2)({createCanvas:e})}function wd(e,t,n){var i=Fc("registerMap");i&&i(e,t,n)}function Md(e){var t=Fc("getMap");return t&&t(e)}var Id=$a;vd(Qc,Mu),vd(nh,Tu),vd(nh,Au),vd(Qc,ic),vd(nh,rc),vd(ah,Vc),ud($o),cd(Xc,Qo),bd("default",Cu),fd({type:lt,event:lt,update:lt},d.noop),fd({type:ut,event:ut,update:ut},d.noop),fd({type:ct,event:ct,update:ct},d.noop),fd({type:ht,event:ht,update:ht},d.noop),fd({type:dt,event:dt,update:dt},d.noop),ld("light",Xu),ld("dark",Qu);var Td={},Ad=[],Dd={registerPreprocessor:ud,registerProcessor:cd,registerPostInit:hd,registerPostUpdate:dd,registerUpdateLifecycle:pd,registerAction:fd,registerCoordinateSystem:gd,registerLayout:md,registerVisual:vd,registerTransform:Id,registerLoading:bd,registerMap:wd,registerImpl:Gc,PRIORITY:sh,ComponentModel:Ir,ComponentView:nl,SeriesModel:Qs,ChartView:du,registerComponentModel:function(e){Ir.registerClass(e)},registerComponentView:function(e){nl.registerClass(e)},registerSeriesModel:function(e){Qs.registerClass(e)},registerChartView:function(e){du.registerClass(e)},registerSubTypeDefaulter:function(e,t){Ir.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){(0,h.registerPainter)(e,t)}};function Cd(e){(0,d.isArray)(e)?(0,d.each)(e,(function(e){Cd(e)})):(0,d.indexOf)(Ad,e)>=0||(Ad.push(e),(0,d.isFunction)(e)&&(e={install:e}),e.install(Dd))}function Ld(e){return null==e?0:e.length||1}function Pd(e){return e}var kd=function(){function e(e,t,n,i,r,o){this._old=e,this._new=t,this._oldKeyGetter=n||Pd,this._newKeyGetter=i||Pd,this.context=r,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),r=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},r=[],o=[];this._initIndexMap(e,n,r,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var a=0;a1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),i[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var d=0;d1)for(var a=0;a30}var jd,qd,Kd,Jd,$d,Qd,ep,tp=d.isObject,np=d.map,ip="undefined"===typeof Int32Array?Array:Int32Array,rp="e\0\0",op=-1,ap=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],sp=["_approximateExtent"],lp=function(){function e(e,t){var n;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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;Wd(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList,a=i.getSource().sourceFormat,s=a===Lr;if(s&&!i.pure)for(var l=[],u=e;u0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var r=i[t];return null==r&&(r=this.getVisual(t),d.isArray(r)?r=r.slice():tp(r)&&(r=d.extend({},r)),i[t]=r),r},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,tp(t)?d.extend(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){tp(e)?d.extend(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?d.extend(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;je(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){d.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:np(this.dimensions,this._getDimInfo,this),this.hostModel)),$d(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];d.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(d.slice(arguments)))})},e.internalField=function(){jd=function(e){var t=e._invertedIndicesMap;d.each(t,(function(n,i){var r=e._dimInfos[i],o=r.ordinalMeta,a=e._store;if(o){n=t[i]=new ip(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[t]=s}}}(),e}(),up=lp;function cp(e,t){return hp(e,t).dimensions}function hp(e,t){sa(e)||(e=ua(e)),t=t||{};var n=t.coordDimensions||[],i=t.dimensionsDefine||e.dimensionsDefine||[],r=(0,d.createHashMap)(),o=[],a=pp(e,n,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Xd(a),l=i===e.dimensionsDefine,u=l?Yd(e):Ud(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var h=(0,d.createHashMap)(c),p=new as(a),f=0;f0&&(i.name=r+(o-1)),o++,t.set(r,o)}}function pp(e,t,n,i){var r=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,i||0);return(0,d.each)(t,(function(e){var t;(0,d.isObject)(e)&&(t=e.dimsDef)&&(r=Math.max(r,t.length))})),r}function fp(e,t,n){if(n||t.hasKey(e)){var i=0;while(t.hasKey(e+i))i++;e+=i}return t.set(e,!0),e}var gp=function(){function e(e){this.coordSysDims=[],this.axisMap=(0,d.createHashMap)(),this.categoryAxisMap=(0,d.createHashMap)(),this.coordSysName=e}return e}();function yp(e){var t=e.get("coordinateSystem"),n=new gp(t),i=mp[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}var mp={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis",xe).models[0],o=e.getReferringComponents("yAxis",xe).models[0];t.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),vp(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),vp(o)&&(i.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis",xe).models[0];t.coordSysDims=["single"],n.set("single",r),vp(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar",xe).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),vp(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),vp(a)&&(i.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var r=e.ecModel,o=r.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();(0,d.each)(o.parallelAxisIndex,(function(e,o){var s=r.getComponent("parallelAxis",e),l=a[o];n.set(l,s),vp(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))}))}};function vp(e){return"category"===e.get("type")}function xp(e,t,n){n=n||{};var i,r,o,a=n.byIndex,s=n.stackedCoordDimension;_p(t)?i=t:(r=t.schema,i=r.dimensions,o=t.store);var l,u,c,h,p=!(!e||!e.get("stack"));if((0,d.each)(i,(function(e,t){(0,d.isString)(e)&&(i[t]=e={name:e}),p&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,h="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var f=u.coordDim,g=u.type,y=0;(0,d.each)(i,(function(e){e.coordDim===f&&y++}));var m={name:c,coordDim:f,coordDimIndex:y,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:h,coordDim:h,coordDimIndex:y+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(m.storeDimIndex=o.ensureCalculationDimension(h,g),v.storeDimIndex=o.ensureCalculationDimension(c,g)),r.appendCalculationDimension(m),r.appendCalculationDimension(v)):(i.push(m),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function _p(e){return!Wd(e.schema)}function bp(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function Sp(e,t){return bp(e,t)?e.getCalculationInfo("stackResultDimension"):t}function wp(e,t){var n,i=e.get("coordinateSystem"),r=bo.get(i);return t&&t.coordSysDims&&(n=d.map(t.coordSysDims,(function(e){var n={name:e},i=t.axisMap.get(e);if(i){var r=i.get("type");n.type=Vd(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}function Mp(e,t,n){var i,r;return n&&d.each(e,(function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(r=!0)})),r||null==i||(e[i].otherDims.itemName=0),i}function Ip(e,t,n){n=n||{};var i,r=t.getSourceManager(),o=!1;e?(o=!0,i=ua(e)):(i=r.getSource(),o=i.sourceFormat===Lr);var a=yp(t),s=wp(t,a),l=n.useEncodeDefaulter,u=d.isFunction(l)?l:l?d.curry(Gr,s,t):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},h=hp(i,c),p=Mp(h.dimensions,n.createInvertedIndices,a),f=o?null:r.getSharedDataStore(h),g=xp(t,{schema:h,store:f}),y=new up(h,t);y.setCalculationInfo(g);var m=null!=p&&Tp(i)?function(e,t,n,i){return i===p?n:this.defaultDimValueGetter(e,t,n,i)}:null;return y.hasItemOption=!1,y.initData(o?i:f,null,m),y}function Tp(e){if(e.sourceFormat===Lr){var t=Ap(e.data||[]);return!d.isArray(K(t))}}function Ap(e){var t=0;while(tt[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Ze(Cp);var Lp=Cp,Pp=0,kp=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Pp}return e.createByAxisModel=function(t){var n=t.option,i=n.data,r=i&&(0,d.map)(i,Op);return new e({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!(0,d.isString)(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),null==t&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=(0,d.createHashMap)(this.categories))},e}();function Op(e){return(0,d.isObject)(e)&&null!=e.value?e.value:e+""}var Np=kp;function Rp(e){return"interval"===e.type||"log"===e.type}function Ep(e,t,n,i){var r={},o=e[1]-e[0],a=r.interval=E(o/t,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=zp(a),l=r.niceTickExtent=[b(Math.ceil(e[0]/a)*a,s),b(Math.floor(e[1]/a)*a,s)];return Zp(l,e),r}function Vp(e){var t=Math.pow(10,R(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,b(n*t)}function zp(e){return w(e)+2}function Bp(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Zp(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Bp(e,0,t),Bp(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function Gp(e,t){return e>=t[0]&&e<=t[1]}function Fp(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Hp(e,t){return e*(t[1]-t[0])+t[0]}var Wp=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Np({})),(0,d.isArray)(i)&&(i=new Np({categories:(0,d.map)(i,(function(e){return(0,d.isObject)(e)?e.value:e}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return(0,c.ZT)(t,e),t.prototype.parse=function(e){return null==e?NaN:(0,d.isString)(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Gp(e,this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Fp(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Hp(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){var e=[],t=this._extent,n=t[0];while(n<=t[1])e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);r=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(Lp);Lp.registerClass(Wp);var Up=Wp,Yp=b,Xp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return(0,c.ZT)(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Gp(e,this._extent)},t.prototype.normalize=function(e){return Fp(e,this._extent)},t.prototype.scale=function(e){return Hp(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=zp(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!t)return o;var a=1e4;n[0]a)return[]}var l=o.length?o[o.length-1].value:i[1];return n[1]>l&&(e?o.push({value:Yp(l+t,r)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}function of(e){var t=rf(e),n=[];return(0,d.each)(e,(function(e){var i,r=e.coordinateSystem,o=r.getBaseAxis(),a=o.getExtent();if("category"===o.type)i=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=t[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),h=Math.abs(c[1]-c[0]);i=l?u/h*l:u}else{var d=e.getData();i=Math.abs(a[1]-a[0])/d.count()}var p=_(e.get("barWidth"),i),f=_(e.get("barMaxWidth"),i),g=_(e.get("barMinWidth")||(hf(e)?.5:1),i),y=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:f,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:ef(o),stackId:Qp(e)})})),af(n)}function af(e){var t={};(0,d.each)(e,(function(e,n){var i=e.axisKey,r=e.bandWidth,o=t[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[i]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var h=e.barGap;null!=h&&(o.gap=h);var d=e.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return(0,d.each)(t,(function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=e.categoryGap;if(null==o){var a=(0,d.keys)(i).length;o=Math.max(35-4*a,15)+"%"}var s=_(o,r),l=_(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),(0,d.each)(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,u-=i+l*i,c--}else{var i=h;t&&ti&&(i=n),i!==h&&(e.width=i,u-=i+l*i,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var p,f=0;(0,d.each)(i,(function(e,t){e.width||(e.width=h),p=e,f+=e.width*(1+l)})),p&&(f-=p.width*l);var g=-f/2;(0,d.each)(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:g,width:e.width},g+=e.width*(1+l)}))})),n}function sf(e,t,n){if(e&&t){var i=e[ef(t)];return null!=i&&null!=n?i[Qp(n)]:i}}function lf(e,t){var n=nf(e,t),i=of(n);(0,d.each)(n,(function(e){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=Qp(e),a=i[ef(r)][o],s=a.offset,l=a.width;t.setLayout({bandWidth:a.bandWidth,offset:s,size:l})}))}function uf(e){return{seriesType:e,plan:il(),reset:function(e){if(cf(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(r.dim)),a=t.getDimensionIndex(t.mapDimension(i.dim)),s=e.get("showBackground",!0),l=t.mapDimension(r.dim),u=t.getCalculationInfo("stackResultDimension"),c=bp(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),h=r.isHorizontal(),d=df(i,r),p=hf(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(e,t){var i,r=e.count,l=p&&Jp(3*r),u=p&&s&&Jp(3*r),v=p&&Jp(r),x=n.master.getRect(),_=h?x.width:x.height,b=t.getStore(),S=0;while(null!=(i=e.next())){var w=b.get(c?g:o,i),M=b.get(a,i),I=d,T=void 0;c&&(T=+w-b.get(o,i));var A=void 0,D=void 0,C=void 0,L=void 0;if(h){var P=n.dataToPoint([w,M]);if(c){var k=n.dataToPoint([T,M]);I=k[0]}A=I,D=P[1]+m,C=P[0]-I,L=y,Math.abs(C)>>1;e[r][1]n&&(this._approxInterval=n);var o=gf.length,a=Math.min(pf(gf,this._approxInterval,0,o),o-1);this._interval=gf[a][1],this._minLevelUnit=gf[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return(0,d.isNumber)(e)?e:+O(e)},t.prototype.contain=function(e){return Gp(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Fp(this.parse(e),this._extent)},t.prototype.scale=function(e){return Hp(e,this._extent)},t.type="time",t}(jp),gf=[["second",vi],["minute",xi],["hour",_i],["quarter-day",6*_i],["half-day",12*_i],["day",1.2*bi],["half-week",3.5*bi],["week",7*bi],["month",31*bi],["quarter",95*bi],["half-year",Si/2],["year",Si]];function yf(e,t,n,i){var r=O(t),o=O(n),a=function(e){return Ri(r,e,i)===Ri(o,e,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},h=function(){return c()&&a("minute")},d=function(){return h()&&a("second")},p=function(){return d()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return d();case"millisecond":return p()}}function mf(e,t){return e/=bi,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function vf(e){var t=30*bi;return e/=t,e>6?6:e>3?3:e>2?2:1}function xf(e){return e/=_i,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function _f(e,t){return e/=t?xi:vi,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function bf(e){return E(e,!0)}function Sf(e,t,n){var i=new Date(e);switch(Ci(t)){case"year":case"month":i[Wi(n)](0);case"day":i[Ui(n)](1);case"hour":i[Yi(n)](0);case"minute":i[Xi(n)](0);case"second":i[ji(n)](0),i[qi(n)](0)}return i.getTime()}function wf(e,t,n,i){var r=1e4,o=Ai,a=0;function s(e,t,n,r,o,a,s){var l=new Date(t),u=t,c=l[r]();while(u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=i[0]&&x<=i[1]&&h++)}var _=(i[1]-i[0])/t;if(h>1.5*_&&p>_/1.5)break;if(u.push(m),h>_||e===o[f])break}c=[]}}}var b=(0,d.filter)((0,d.map)(u,(function(e){return(0,d.filter)(e,(function(e){return e.value>=i[0]&&e.value<=i[1]&&!e.notAdd}))})),(function(e){return e.length>0})),S=[],w=b.length-1;for(f=0;f0)i*=10;var o=[b(Cf(t[0]/i)*i),b(Df(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){Tf.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=Pf(e)/Pf(this.base),Gp(e,this._extent)},t.prototype.normalize=function(e){return e=Pf(e)/Pf(this.base),Fp(e,this._extent)},t.prototype.scale=function(e){return e=Hp(e,this._extent),Lf(this.base,e)},t.type="log",t}(Lp),Of=kf.prototype;function Nf(e,t){return Af(e,w(t))}Of.getMinorTicks=Tf.getMinorTicks,Of.getLabel=Tf.getLabel,Lp.registerClass(kf);var Rf=kf,Ef=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,p=this._determinedMax;return null!=h&&(a=h,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[zf[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=Vf[e];this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),Vf={min:"_determinedMin",max:"_determinedMax"},zf={min:"_dataMin",max:"_dataMax"};function Bf(e,t,n){var i=e.rawExtentInfo;return i||(i=new Ef(e,t,n),e.rawExtentInfo=i,i)}function Zf(e,t){return null==t?null:(0,d.eqNaN)(t)?NaN:e.parse(t)}function Gf(e,t){var n=e.type,i=Bf(e,t,e.getExtent()).calculate();e.setBlank(i.isBlank);var r=i.min,o=i.max,a=t.ecModel;if(a&&"time"===n){var s=nf("bar",a),l=!1;if(d.each(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=of(s),c=Ff(r,o,t,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Ff(e,t,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=sf(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;d.each(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;d.each(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=1-(s+l)/o,p=c/h-c;return t+=p*(l/u),e-=p*(s/u),{min:e,max:t}}function Hf(e,t){var n=t,i=Gf(e,n),r=i.extent,o=n.get("splitNumber");e instanceof Rf&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(r[0],r[1]),e.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function Wf(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new Up({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Mf({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Lp.getClass(t)||jp)}}function Uf(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)}function Yf(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,i){return e.scale.getFormattedLabel(n,i,t)}}(t):d.isString(t)?function(t){return function(n){var i=e.scale.getLabel(n),r=t.replace("{value}",null!=i?i:"");return r}}(t):d.isFunction(t)?function(t){return function(i,r){return null!=n&&(r=i.value-n),t(Xf(e,i),r,null!=i.level?{level:i.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function Xf(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function jf(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();n instanceof Up?r=n.count():(i=n.getTicks(),r=i.length);var a,s=e.getLabelModel(),l=Yf(e),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;ce[1]&&(e[1]=i[1])}))}var eg=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},e.prototype.getCoordSysModel=function(){},e}();function tg(e){return Dp(null,e)}var ng={isDimensionStacked:bp,enableDataStack:xp,getStackedDimension:Sp};function ig(e,t){var n=t;t instanceof $n||(n=new $n(t));var i=Wf(n);return i.setExtent(e[0],e[1]),Hf(i,n),i}function rg(e){d.mixin(e,eg)}function og(e,t){return t=t||{},Dn(e,null,null,"normal"!==t.state)}var ag=n(5553),sg=[];function lg(e,t){for(var n=0;nn&&(e=r,n=a)}if(e)return cg(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],i=[-1/0,-1/0],r=this.geometries;return(0,d.each)(r,(function(t){"polygon"===t.type?ug(t.exterior,n,i,e):(0,d.each)(t.points,(function(t){ug(t,n,i,e)}))})),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),t=new ri.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,r=n.length;i>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,i.push([s/n,l/n])}return i}function xg(e,t){return e=yg(e),d.map(d.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new dg(o[0],o.slice(1)));break;case"MultiPolygon":d.each(i.coordinates,(function(e){e[0]&&r.push(new dg(e[0],e.slice(1)))}));break;case"LineString":r.push(new pg([i.coordinates]));break;case"MultiLineString":r.push(new pg(i.coordinates))}var a=new fg(n[t||"name"],r,n.cp);return a.properties=n,a}))}var _g=n(5574);function bg(e,t,n,i,r,o,a,s){var l=new Ue.ZP({style:{text:e,font:t,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}});return l.getBoundingRect()}var Sg=ge();function wg(e){return"category"===e.type?Ig(e):Dg(e)}function Mg(e,t){return"category"===e.type?Ag(e,t):{ticks:d.map(e.scale.getTicks(),(function(e){return e.value}))}}function Ig(e){var t=e.getLabelModel(),n=Tg(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function Tg(e,t){var n,i,r=Cg(e,"labels"),o=Kf(t),a=Lg(r,o);return a||(d.isFunction(o)?n=Eg(e,o):(i="auto"===o?kg(e):o,n=Rg(e,i)),Pg(r,o,{labels:n,labelCategoryInterval:i}))}function Ag(e,t){var n,i,r=Cg(e,"ticks"),o=Kf(t),a=Lg(r,o);if(a)return a;if(t.get("show")&&!e.scale.isBlank()||(n=[]),d.isFunction(o))n=Eg(e,o,!0);else if("auto"===o){var s=Tg(e,e.getLabelModel());i=s.labelCategoryInterval,n=d.map(s.labels,(function(e){return e.tickValue}))}else i=o,n=Rg(e,i,!0);return Pg(r,o,{ticks:n,tickCategoryInterval:i})}function Dg(e){var t=e.scale.getTicks(),n=Yf(e);return{labels:d.map(t,(function(t,i){return{level:t.level,formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}function Cg(e,t){return Sg(e)[t]||(Sg(e)[t]=[])}function Lg(e,t){for(var n=0;n40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,p=0;l<=o[1];l+=s){var f=0,g=0,y=pc.lP(n({value:l}),t.font,"center","top");f=1.3*y.width,g=1.3*y.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var m=d/c,v=p/h;isNaN(m)&&(m=1/0),isNaN(v)&&(v=1/0);var x=Math.max(0,Math.floor(Math.min(m,v))),_=Sg(e.model),b=e.getExtent(),S=_.lastAutoInterval,w=_.lastTickCount;return null!=S&&null!=w&&Math.abs(S-x)<=1&&Math.abs(w-a)<=1&&S>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=S:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}function Ng(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Rg(e,t,n){var i=Yf(e),r=e.scale,o=r.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=r.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Jf(e),d=a.get("showMinLabel")||h,p=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:i(t),rawLabel:r.getLabel(t),tickValue:e})}return p&&f-l!==o[1]&&g(o[1]),s}function Eg(e,t,n){var i=e.scale,r=Yf(e),o=[];return d.each(i.getTicks(),(function(e){var a=i.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:r(e),rawLabel:a,tickValue:s})})),o}var Vg=[0,1],zg=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return I(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&(n=n.slice(),Bg(n,i.count())),x(e,Vg,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&(n=n.slice(),Bg(n,i.count()));var r=x(e,n,Vg,t);return this.scale.scale(r)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=Mg(this,t),i=n.ticks,r=(0,d.map)(i,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this),o=t.get("alignWithLabel");return Zg(this,r,o,e.clamp),r},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),i=(0,d.map)(n,(function(e){return(0,d.map)(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this);return i},e.prototype.getViewLabels=function(){return wg(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return Og(this)},e}();function Bg(e,t){var n=e[1]-e[0],i=t,r=n/i/2;e[0]+=r,e[1]-=r}function Zg(e,t,n,i){var r=t.length;if(e.onBand&&!n&&r){var o,a,s=e.getExtent();if(1===r)t[0].coord=s[0],o=t[1]={coord:s[0]};else{var l=t[r-1].tickValue-t[0].tickValue,u=(t[r-1].coord-t[0].coord)/l;(0,d.each)(t,(function(e){e.coord-=u/2}));var c=e.scale.getExtent();a=1+c[1]-t[r-1].tickValue,o={coord:t[r-1].coord+u*a},t.push(o)}var h=s[0]>s[1];p(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift()),i&&p(s[0],t[0].coord)&&t.unshift({coord:s[0]}),p(s[1],o.coord)&&(i?o.coord=s[1]:t.pop()),i&&p(o.coord,s[1])&&t.push({coord:s[1]})}function p(e,t){return e=b(e),t=b(t),h?e>t:er&&(r+=qg);var p=Math.atan2(s,a);if(p<0&&(p+=qg),p>=i&&p<=r||p+qg>=i&&p+qg<=r)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(i)+e,g=n*Math.sin(i)+t,y=n*Math.cos(r)+e,m=n*Math.sin(r)+t,v=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(m-s)*(m-s);return v0){t=t/180*Math.PI,oy.fromArray(e[0]),ay.fromArray(e[1]),sy.fromArray(e[2]),wl.Z.sub(ly,oy,ay),wl.Z.sub(uy,sy,ay);var n=ly.len(),i=uy.len();if(!(n<.001||i<.001)){ly.scale(1/n),uy.scale(1/i);var r=ly.dot(uy),o=Math.cos(t);if(o1&&wl.Z.copy(dy,sy),dy.toArray(e[1])}}}}function fy(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,oy.fromArray(e[0]),ay.fromArray(e[1]),sy.fromArray(e[2]),wl.Z.sub(ly,ay,oy),wl.Z.sub(uy,sy,ay);var i=ly.len(),r=uy.len();if(!(i<.001||r<.001)){ly.scale(1/i),uy.scale(1/r);var o=ly.dot(t),a=Math.cos(n);if(o=l)wl.Z.copy(dy,sy);else{dy.scaleAndAdd(uy,s/Math.tan(Math.PI/2-c));var h=sy.x!==ay.x?(dy.x-ay.x)/(sy.x-ay.x):(dy.y-ay.y)/(sy.y-ay.y);if(isNaN(h))return;h<0?wl.Z.copy(dy,ay):h>1&&wl.Z.copy(dy,sy)}dy.toArray(e[1])}}}}function gy(e,t,n,i){var r="normal"===n,o=r?e:e.ensureState(n);o.ignore=t;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?e.useStyle(s):o.style=s}function yy(e,t){var n=t.smooth,i=t.points;if(i)if(e.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=al.dist(i[0],i[1]),o=al.dist(i[1],i[2]);if(!r||!o)return e.lineTo(i[1][0],i[1][1]),void e.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=al.lerp([],i[1],i[0],a/r),l=al.lerp([],i[1],i[2],a/o),u=al.lerp([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&S(-h/a,0,a);var y,m,v=e[0],x=e[a-1];return _(),y<0&&w(-y,.8),m<0&&w(m,.8),_(),b(y,m,1),b(m,y,-1),_(),y<0&&M(-y),m<0&&M(m),u}function _(){y=v.rect[t]-i,m=r-x.rect[t]-x.rect[n]}function b(e,t,n){if(e<0){var i=Math.min(t,-e);if(i>0){S(i*n,0,a);var r=i+e;r<0&&w(-r*n,1)}else w(-e*n,1)}}function S(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){d=o[l-1]*h;S(-d,l,a)}}}function M(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),i=0;i0?S(n,0,i+1):S(-n,a-i-1,a),e-=n,e<=0)return}}function by(e,t,n,i){return _y(e,"x","width",t,n,i)}function Sy(e,t,n,i){return _y(e,"y","height",t,n,i)}function wy(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new ri.Z(0,0,0,0);function i(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var r=0;r=0&&n.attr(r.oldLayoutSelect),(0,d.indexOf)(c,"emphasis")>=0&&n.attr(r.oldLayoutEmphasis)),gn(n,l,t,s)}else if(n.attr(l),!Vn(n).valueAnimation){var h=(0,d.retrieve2)(n.style.opacity,1);n.style.opacity=0,yn(n,{style:{opacity:h}},t,s)}if(r.oldLayout=l,n.states.select){var p=r.oldLayoutSelect={};Ly(p,l,Py),Ly(p,n.states.select,Py)}if(n.states.emphasis){var f=r.oldLayoutEmphasis={};Ly(f,l,Py),Ly(f,n.states.emphasis,Py)}Bn(n,s,u,t,t)}if(i&&!i.ignore&&!i.invisible){r=Cy(i),o=r.oldLayout;var g={points:i.shape.points};o?(i.attr({shape:o}),gn(i,{shape:g},t)):(i.setShape(g),i.style.strokePercent=0,yn(i,{style:{strokePercent:1}},t)),r.oldLayout=g}},e}(),Oy=ky,Ny=ge();function Ry(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){var i=Ny(t).labelManager;i||(i=Ny(t).labelManager=new Oy),i.clearLabels()})),e.registerUpdateLifecycle("series:layoutlabels",(function(e,t,n){var i=Ny(t).labelManager;n.updatedSeries.forEach((function(e){i.addLabelsOfSeries(t.getViewOfSeriesModel(e))})),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()}))}Cd(Ry);var Ey=n(1433);function Vy(e){e.registerPainter("canvas",Ey.Z)}var zy=n(3072);function By(e){e.registerPainter("svg",zy.Z)}var Zy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e){return Dp(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new el.Z,n=wc("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*e.itemHeight,s=wc(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?r:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},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}(Qs),Gy=Zy;function Fy(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Da(e,t,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(t[o])}return i.join(" ")}var Wy=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.updateData(t,n,i,r),o}return(0,c.ZT)(t,e),t.prototype._createSymbol=function(e,t,n,i,r){this.removeAll();var o=wc(e,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=Uy,this._symbolType=e,this.add(o)},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(){Nt(this.childAt(0))},t.prototype.downplay=function(){Rt(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,i,r){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):gn(h,d,a,n),bn(h)}if(this._updateCommon(e,n,s,i,r),l){h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,yn(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,i,r){var o,a,s,l,u,c,h,p,f,g=this.childAt(0),y=e.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,h=i.labelStatesModels,p=i.hoverScale,f=i.cursorStyle,c=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),h=An(m),p=v.getShallow("scale"),f=m.getShallow("cursor")}var x=e.getItemVisual(t,"symbolRotate");g.attr("rotation",(x||0)*Math.PI/180||0);var _=Ic(e.getItemVisual(t,"symbolOffset"),n);_&&(g.x=_[0],g.y=_[1]),f&&g.attr("cursor",f);var b=e.getItemVisual(t,"style"),S=b.fill;if(g instanceof ll.ZP){var w=g.style;g.useStyle((0,d.extend)({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},b))}else g.__isEmptyBrush?g.useStyle((0,d.extend)({},b)):g.useStyle(b),g.style.decal=null,g.setColor(S,r&&r.symbolInnerColor),g.style.strokeNoScale=!0;var M=e.getItemVisual(t,"liftZ"),I=this._z2;null!=M?null==I&&(this._z2=g.z2,g.z2+=M):null!=I&&(g.z2=I,this._z2=null);var T=r&&r.useNameLabel;function A(t){return T?e.getName(t):Fy(e,t)}Tn(g,h,{labelFetcher:y,labelDataIndex:t,defaultText:A,inheritColor:S,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=g.ensureState("emphasis");D.style=o,g.ensureState("select").style=s,g.ensureState("blur").style=a;var C=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;D.scaleX=this._sizeX*C,D.scaleY=this._sizeY*C,this.setSymbolScale(1),Qt(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var i=this.childAt(0),r=Xe(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&vn(a,{style:{opacity:0}},t,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();vn(i,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:r,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Mc(e.getItemVisual(t,"symbolSize"))},t}(el.Z);function Uy(e,t){this.parent.drift(e,t)}var Yy=Wy;function Xy(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function jy(e){return null==e||(0,d.isObject)(e)||(e={isIgnore:e}),e||{}}function qy(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:An(t),cursorStyle:t.get("cursor")}}var Ky=function(){function e(e){this.group=new el.Z,this._SymbolCtor=e||Yy}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=jy(t);var n=this.group,i=e.hostModel,r=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=qy(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};r||n.removeAll(),e.diff(r).add((function(i){var r=u(i);if(Xy(e,r,i,t)){var a=new o(e,i,s,l);a.setPosition(r),e.setItemGraphicEl(i,a),n.add(a)}})).update((function(c,h){var d=r.getItemGraphicEl(h),p=u(c);if(Xy(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),d=new o(e,c,s,l),d.setPosition(p);else{d.updateData(e,c,s,l);var y={x:p[0],y:p[1]};a?d.attr(y):gn(d,y,i)}n.add(d),e.setItemGraphicEl(c,d)}else n.remove(d)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),i)})).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var i=e._getSymbolPoint(n);t.setPosition(i),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=qy(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=jy(n);for(var r=e.start;r0?n=i[0]:i[1]<0&&(n=i[1]),n}function em(e,t,n,i){var r=NaN;e.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,i),a[1-o]=r,t.dataToPoint(a)}function tm(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}function nm(e,t,n,i,r,o,a,s){for(var l=tm(e,t),u=[],c=[],h=[],d=[],p=[],f=[],g=[],y=$y(r,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],x=0;x=r||g<0)break;if(om(m,v)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](m,v),h=m,d=v;else{var x=m-u,_=v-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){var b=g+o,S=t[2*b],w=t[2*b+1];while(S===m&&w===v&&y=i||om(S,w))p=m,f=v;else{T=S-u,A=w-c;var L=m-u,P=S-m,k=v-c,O=w-v,N=void 0,R=void 0;if("x"===s){N=Math.abs(L),R=Math.abs(P);var E=T>0?1:-1;p=m-E*N*a,f=v,D=m+E*R*a,C=v}else if("y"===s){N=Math.abs(k),R=Math.abs(O);var V=A>0?1:-1;p=m,f=v-V*N*a,D=m,C=v+V*R*a}else N=Math.sqrt(L*L+k*k),R=Math.sqrt(P*P+O*O),I=R/(R+N),p=m-T*a*(1-I),f=v-A*a*(1-I),D=m+T*a*I,C=v+A*a*I,D=im(D,rm(S,m)),C=im(C,rm(w,v)),D=rm(D,im(S,m)),C=rm(C,im(w,v)),T=D-m,A=C-v,p=m-T*N/R,f=v-A*N/R,p=im(p,rm(u,m)),f=im(f,rm(c,v)),p=rm(p,im(u,m)),f=rm(f,im(c,v)),T=m-p,A=v-f,D=m+T*R/N,C=v+A*R/N}e.bezierCurveTo(h,d,p,f,m,v),h=D,d=C}else e.lineTo(m,v)}u=m,c=v,g+=o}return y}var sm=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),lm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return(0,c.ZT)(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new sm},t.prototype.buildPath=function(e,t){var n=t.points,i=0,r=n.length/2;if(t.connectNulls){for(;r>0;r--)if(!om(n[2*r-2],n[2*r-1]))break;for(;i=0){var v=s?(d-i)*m+i:(h-n)*m+n;return s?[e,v]:[v,e]}n=h,i=d;break;case a.C:h=o[u++],d=o[u++],p=o[u++],f=o[u++],g=o[u++],y=o[u++];var x=s?(0,jg.kD)(n,h,p,g,e,l):(0,jg.kD)(i,d,f,y,e,l);if(x>0)for(var _=0;_=0){v=s?(0,jg.af)(i,d,f,y,b):(0,jg.af)(n,h,p,g,b);return s?[e,v]:[v,e]}}n=g,i=y;break}}},t}(Ke.ZP),um=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t}(sm),cm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new um},t.prototype.buildPath=function(e,t){var n=t.points,i=t.stackedOnPoints,r=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0;o--)if(!om(n[2*o-2],n[2*o-1]))break;for(;rt){i?r.push(a(i,l,t)):n&&r.push(a(n,l,0),a(n,l,t));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}function Sm(e,t,n){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count()&&"cartesian2d"===t.type){for(var r,o,a=i.length-1;a>=0;a--){var s=e.getDimensionInfo(i[a].dimension);if(r=s&&s.coordDim,"x"===r||"y"===r){o=i[a];break}}if(o){var l=t.getAxis(r),u=d.map(o.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,h=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var p=bm(u,"x"===r?n.getWidth():n.getHeight()),f=p.length;if(!f&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var g=10,y=p[0].coord-g,m=p[f-1].coord+g,v=m-y;if(v<.001)return"transparent";d.each(p,(function(e){e.offset=(e.coord-y)/v})),p.push({offset:f?p[f-1].offset:.5,color:h[1]||"transparent"}),p.unshift({offset:f?p[0].offset:.5,color:h[0]||"transparent"});var x=new _l.Z(0,0,0,0,p,!0);return x[r]=y,x[r+"2"]=m,x}}}function wm(e,t,n){var i=e.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!Mm(o,t))){var a=t.mapDimension(o.dim),s={};return d.each(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function Mm(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var r=t.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}function Im(e,t){return isNaN(e)||isNaN(t)}function Tm(e){for(var t=e.length/2;t>0;t--)if(!Im(e[2*t-2],e[2*t-1]))break;return t-1}function Am(e,t){return[e[2*t],e[2*t+1]]}function Dm(e,t,n){for(var i,r,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||i>=t&&r<=t){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(t-i)/(r-i)}}function Cm(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"])){var R=f.getState("emphasis").style;R.lineWidth=+f.style.lineWidth+1}Xe(f).seriesIndex=e.seriesIndex,Qt(f,k,O,N);var E=vm(e.get("smooth")),V=e.get("smoothMonotone");if(f.setShape({smooth:E,smoothMonotone:V,connectNulls:w}),g){var z=a.getCalculationInfo("stackedOnSeries"),B=0;g.useStyle(d.defaults(l.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),z&&(B=vm(z.get("smooth"))),g.setShape({smooth:E,stackedOnSmooth:B,smoothMonotone:V,connectNulls:w}),rn(g,e,"areaStyle"),Xe(g).seriesIndex=e.seriesIndex,Qt(g,k,O,N)}var Z=function(e){i._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=Z)})),this._polyline.onHoverStateChange=Z,this._data=a,this._coordSys=r,this._stackedOnPoints=b,this._points=u,this._step=A,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,f),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,t){Xe(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,i){var r=e.getData(),o=fe(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,h=e.get("z")||0;s=new Yy(r,o),s.x=l,s.y=u,s.setZ(c,h);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=h,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else du.prototype.highlight.call(this,e,t,n,i)},t.prototype.downplay=function(e,t,n,i){var r=e.getData(),o=fe(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else du.prototype.downplay.call(this,e,t,n,i)},t.prototype._changePolyState=function(e){var t=this._polygon;It(this._polyline,e),t&&It(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new lm({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new cm({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var i,r,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(i=o.isHorizontal(),r=!1):"polar"===t.type&&(i="angle"===o.dim,r=!0);var s=e.hostModel,l=s.get("animationDuration");d.isFunction(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=d.isFunction(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var h=[e.x,e.y],p=void 0,f=void 0,g=void 0;if(n)if(r){var y=n,m=t.pointToCoord(h);i?(p=y.startAngle,f=y.endAngle,g=-m[1]/180*Math.PI):(p=y.r0,f=y.r,g=m[0])}else{var v=n;i?(p=v.x,f=v.x+v.width,g=e.x):(p=v.y+v.height,f=v.y,g=e.y)}var x=f===p?0:(g-p)/(f-p);a&&(x=1-x);var _=d.isFunction(u)?u(o):l*x+c,b=s.getSymbolPath(),S=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),S&&S.animateFrom({style:{opacity:0}},{duration:300,delay:_}),b.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var i=e.getModel("endLabel");if(Cm(e)){var r=e.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new Ue.ZP({z2:200}),s.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=Tm(a);l>=0&&(Tn(o,An(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?Hy(r,n):Fy(r,e)},enableTextSetter:!0},Pm(i,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,m=t.shape,v=y?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(y?-1:1),_=(g?0:-p)*(y?-1:1),b=g?"x":"y",S=Dm(u,v,b),w=S.range,M=w[1]-w[0],I=void 0;if(M>=1){if(M>1&&!h){var T=Am(u,w[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=c.getRawValue(w[0]))}else{T=l.getPointOn(v,b);T&&s.attr({x:T[0]+x,y:T[1]+_});var A=c.getRawValue(w[0]),D=c.getRawValue(w[1]);r&&(I=Te(n,d,A,D,S.t))}i.lastFrameIndex=w[0]}else{var C=1===e||i.lastFrameIndex>0?w[0]:0;T=Am(u,C);r&&(I=c.getRawValue(C)),s.attr({x:T[0]+x,y:T[1]+_})}r&&Vn(s).setLabelText(I)}},t.prototype._doUpdateAnimation=function(e,t,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=nm(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,o),h=c.current,d=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(r&&(h=_m(c.current,n,r,a),d=_m(c.stackedOnCurrent,n,r,a),p=_m(c.next,n,r,a),f=_m(c.stackedOnNext,n,r,a)),mm(h,p)>3e3||l&&mm(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),gn(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),gn(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],m=c.status,v=0;vt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),p=Math.round(a/h);if(isFinite(p)&&p>1){"lttb"===r&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var f=void 0;(0,d.isString)(r)?f=Rm[r]:(0,d.isFunction)(r)&&(f=r),f&&e.setData(i.downSample(i.mapDimension(l.dim),1/p,f,Em))}}}}}function zm(e){e.registerChartView(Om),e.registerSeriesModel(Gy),e.registerLayout(Nm("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Vm("line"))}var Bm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){return Dp(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.dataToPoint(i.clampData(e));if(n)(0,d.each)(i.getAxes(),(function(n,o){if("category"===n.type){var a=n.getTicksCoords(),s=i.clampData(e)[o];!t||"x1"!==t[o]&&"y1"!==t[o]||(s+=1),s>a.length-1&&(s=a.length-1),s<0&&(s=0),a[s]&&(r[o]=n.toGlobalCoord(a[s].coord))}}));else{var o=this.getData(),a=o.getLayout("offset"),s=o.getLayout("size"),l=i.getBaseAxis().isHorizontal()?0:1;r[l]+=a+s/2}return r}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}(Qs);Qs.registerClass(Bm);var Zm=Bm,Gm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(){return Dp(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ii(Zm.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}(Zm),Fm=Gm,Hm=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return e}(),Wm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new Hm},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,r=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-r),s=r+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=2*Math.PI,d=c?u-lMath.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}function jm(e,t,n){return t*Math.sin(e)*(n?-1:1)}function qm(e,t,n){return t*Math.cos(e)*(n?1:-1)}var Km=Math.max,Jm=Math.min;function $m(e,t){var n=e.getArea&&e.getArea();if(fm(e,"cartesian2d")){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var r=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}var Qm=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var r=e.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){iu(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,i){var r,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,h=nv(e,l);h&&this._enableRealtimeSort(h,a,n);var d=e.get("clip",!0)||h,p=$m(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),m=y.get("borderRadius")||0,v=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function S(e){var t=lv[l.type](a,e),n=xv(l,r,t);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",m),v[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),i=lv[l.type](a,t,n);if(g&&S(t),a.hasValue(t)&&sv[l.type](i)){var s=!1;d&&(s=ev[l.type](p,i));var y=tv[l.type](e,a,t,i,r,c,u.model,!1,f);h&&(y.forceLabelAnimation=!0),hv(y,a,t,n,i,e,r,"polar"===l.type),_?y.attr({shape:i}):h?iv(h,c,y,i,t,r,!1,!1):yn(y,{shape:i},e,t),a.setItemGraphicEl(t,y),o.add(y),y.ignore=s}})).update((function(t,n){var i=a.getItemModel(t),w=lv[l.type](a,t,i);if(g){var M=void 0;0===x.length?M=S(n):(M=x[n],M.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",m),v[t]=M);var I=lv[l.type](a,t),T=vv(r,I,l);gn(M,{shape:T},c,t)}var A=s.getItemGraphicEl(n);if(a.hasValue(t)&&sv[l.type](w)){var D=!1;if(d&&(D=ev[l.type](p,w),D&&o.remove(A)),A?bn(A):A=tv[l.type](e,a,t,w,r,c,u.model,!!A,f),h&&(A.forceLabelAnimation=!0),b){var C=A.getTextContent();if(C){var L=Vn(C);null!=L.prevValue&&(L.prevValue=L.value)}}else hv(A,a,t,i,w,e,r,"polar"===l.type);_?A.attr({shape:w}):h?iv(h,c,A,w,t,r,!0,b):gn(A,{shape:w},e,t,null),a.setItemGraphicEl(t,A),A.ignore=D,o.add(A)}else o.remove(A)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&_n(n,e,t)})).execute();var w=this._backgroundGroup||(this._backgroundGroup=new el.Z);w.removeAll();for(var M=0;Mo)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(e.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,i){if(this._isOrderChangedWithinSameData(e,t,n)){var r=this._dataSort(e,n,t);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},t.prototype._dispatchInitSort=function(e,t,n){var i=t.baseAxis,r=this._dataSort(e,i,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){_n(t,e,Xe(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(du),ev={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var r=e.x+e.width,o=e.y+e.height,a=Km(t.x,e.x),s=Jm(t.x+t.width,r),l=Km(t.y,e.y),u=Jm(t.y+t.height,o),c=sr?s:a,t.y=h&&l>o?u:l,t.width=c?0:s-a,t.height=h?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}var r=Jm(t.r,e.r),o=Km(t.r0,e.r0);t.r=r,t.r0=o;var a=r-o<0;if(n<0){i=t.r;t.r=t.r0,t.r0=i}return a}},tv={cartesian2d:function(e,t,n,i,r,o,a,s,l){var u=new gl.Z({shape:(0,d.extend)({},i),z2:1});if(u.__dataIndex=n,u.name="item",o){var c=u.shape,h=r?"height":"width";c[h]=0}return u},polar:function(e,t,n,i,r,o,a,s,l){var u=!r&&l?Um:hl.C,c=new u({shape:i,z2:1});c.name="item";var h=cv(r);if(c.calculateTextPosition=Ym(h,{isRoundCap:u===Um}),o){var d=c.shape,p=r?"r":"endAngle",f={};d[p]=r?0:i.startAngle,f[p]=i[p],(s?gn:yn)(c,{shape:f},o)}return c}};function nv(e,t){var n=e.get("realtimeSort",!0),i=t.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===t.type)return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function iv(e,t,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?gn:yn)(n,{shape:l},t,r,null);var c=t?e.baseAxis.model:null;(a?gn:yn)(n,{shape:u},c,r)}function rv(e,t){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function uv(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function cv(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function hv(e,t,n,i,r,o,a,s){var l=t.getItemVisual(n,"style");s||e.setShape("r",i.get(["itemStyle","borderRadius"])||0),e.useStyle(l);var u=i.getShallow("cursor");u&&e.attr("cursor",u);var c=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",h=An(i);Tn(e,h,{labelFetcher:o,labelDataIndex:n,defaultText:Fy(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var p=e.getTextContent();if(s&&p){var f=i.get(["label","position"]);e.textConfig.inside="middle"===f||null,Xm(e,"outside"===f?c:f,cv(a),i.get(["label","rotate"]))}zn(p,h,o.getRawValue(n),(function(e){return Hy(t,e)}));var g=i.getModel(["emphasis"]);Qt(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),rn(e,i),uv(r)&&(e.style.fill="none",e.style.stroke="none",(0,d.each)(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}function dv(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=e.get(["itemStyle","borderWidth"])||0,r=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,r,o)}var pv=function(){function e(){}return e}(),fv=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new pv},t.prototype.buildPath=function(e,t){for(var n=t.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=0?n:null}),30,!1);function mv(e,t,n){for(var i=e.baseDimIdx,r=1-i,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,h=o.length/3;c=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}function vv(e,t,n){if(fm(n,"cartesian2d")){var i=t,r=n.getArea();return{x:e?i.x:r.x,y:e?r.y:i.y,width:e?i.width:r.width,height:e?r.height:i.height}}r=n.getArea();var o=t;return{cx:r.cx,cy:r.cy,r0:e?r.r0:o.r0,r:e?r.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}function xv(e,t,n){var i="polar"===e.type?hl.C:gl.Z;return new i({shape:vv(t,n,e),silent:!0,z2:0})}var _v=Qm;function bv(e){e.registerChartView(_v),e.registerSeriesModel(Fm),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,d.curry(lf,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,uf("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Vm("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))}var Sv=2*Math.PI,wv=Math.PI/180;function Mv(e,t){return gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Iv(e,t){var n=Mv(e,t),i=e.get("center"),r=e.get("radius");d.isArray(r)||(r=[0,r]);var o,a,s=_(n.width,t.getWidth()),l=_(n.height,t.getHeight()),u=Math.min(s,l),c=_(r[0],u/2),h=_(r[1],u/2),p=e.coordinateSystem;if(p){var f=p.dataToPoint(i);o=f[0]||0,a=f[1]||0}else d.isArray(i)||(i=[i,i]),o=_(i[0],s)+n.x,a=_(i[1],l)+n.y;return{cx:o,cy:a,r0:c,r:h}}function Tv(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),r=Mv(e,n),o=Iv(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*wv,h=e.get("minAngle")*wv,d=0;t.each(i,(function(e){!isNaN(e)&&d++}));var p=t.getSum(i),f=Math.PI/(p||d)*2,g=e.get("clockwise"),y=e.get("roseType"),m=e.get("stillShowZeroSum"),v=t.getDataExtent(i);v[0]=0;var _=Sv,b=0,S=c,w=g?1:-1;if(t.setLayout({viewRect:r,r:l}),t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:y?NaN:l});else{i="area"!==y?0===p&&m?f:e*f:Sv/d,in?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-t-l.len2*r,d=i+l.len,f=Math.abs(h)e.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-h)/2}}}function kv(e){return"center"===e.position}function Ov(e){var t,n,i=e.getData(),r=[],o=!1,a=(e.get("minShowLabelAngle")||0)*Dv,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,h=s.y,p=s.height;function f(e){e.ignore=!0}function g(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}i.each((function(e){var s=i.getItemGraphicEl(e),h=s.shape,p=s.getTextContent(),y=s.getTextGuideLine(),m=i.getItemModel(e),v=m.getModel("label"),x=v.get("position")||m.get(["emphasis","label","position"]),b=v.get("distanceToLabelLine"),S=v.get("alignTo"),w=_(v.get("edgeDistance"),u),M=v.get("bleedMargin"),I=m.getModel("labelLine"),T=I.get("length");T=_(T,u);var A=I.get("length2");if(A=_(A,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":O>0?"left":"right"}var F=Math.PI,H=0,W=v.get("rotate");if((0,d.isNumber)(W))H=W*(F/180);else if("center"===x)H=0;else if("radial"===W||!0===W){var U=O<0?-k+F:-k;H=U}else if("tangential"===W&&"outside"!==x&&"outer"!==x){var Y=Math.atan2(O,N);Y<0&&(Y=2*F+Y);var X=N>0;X&&(Y=F+Y),H=Y-F}if(o=!!H,p.x=D,p.y=C,p.rotation=H,p.setStyle({verticalAlign:"middle"}),R){p.setStyle({align:P});var j=p.states.select;j&&(j.x+=p.x,j.y+=p.y)}else{var q=p.getBoundingRect().clone();q.applyTransform(p.getComputedTransform());var K=(p.style.margin||0)+2.1;q.y-=K/2,q.height+=K,r.push({label:p,labelLine:y,position:x,len:T,len2:A,minTurnAngle:I.get("minTurnAngle"),maxSurfaceAngle:I.get("maxSurfaceAngle"),surfaceNormal:new wl.Z(O,N),linePoints:L,textAlign:P,labelDistance:b,labelAlignTo:S,edgeDistance:w,bleedMargin:M,rect:q,unconstrainedWidth:q.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:R})}})),!o&&e.get("avoidLabelOverlap")&&Lv(r,t,n,l,u,p,c,h);for(var y=0;y0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=i.r0}},t.type="pie",t}(du),Vv=Ev;function zv(e,t,n){t=(0,d.isArray)(t)&&{coordDimensions:t}||(0,d.extend)({encodeDefine:e.getEncode()},t);var i=e.getSource(),r=hp(i,t).dimensions,o=new up(r,e);return o.initData(i,n),o}var Bv=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},e.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},e.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},e}(),Zv=Bv,Gv=ge(),Fv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Zv(d.bind(this.getData,this),d.bind(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return zv(this,{coordDimensions:["value"],encodeDefaulter:d.curry(Fr,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),i=Gv(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(e){o.push(e)})),r=i.seats=A(o,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=r[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){j(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,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}(Qs),Hv=Fv;function Wv(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf((function(e){var t=n.mapDimension("value"),i=n.get(t,e);return!((0,d.isNumber)(i)&&!isNaN(i)&&i<0)}))}}}function Uv(e){e.registerChartView(Vv),e.registerSeriesModel(Hv),lc("pie",e.registerAction),e.registerLayout((0,d.curry)(Tv,"pie")),e.registerProcessor(Av("pie")),e.registerProcessor(Wv("pie"))}var Yv=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){return Dp(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.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}(Qs),Xv=Yv,jv=4,qv=function(){function e(){}return e}(),Kv=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new qv},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,i=t.points,r=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&r[0]=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(e>=u&&t>=c&&e<=u+o&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();if(e=n[0],t=n[1],i.contain(e,t)){var r=this.hoverDataIdx=this.findDataIndex(e,t);return r>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,i=t.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),$v=Jv,Qv=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this._updateSymbolDraw(i,e);r.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData(),r=this._updateSymbolDraw(i,e);r.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=Nm("").reset(e,t,n);r.progress&&r.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){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,i=t.pipelineContext,r=i.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new $v:new Jy,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(du),ex=Qv,tx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),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}(Ir),nx=tx,ix=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",xe).models[0]},t.type="cartesian2dAxis",t}(Ir);d.mixin(ix,eg);var rx={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},ox=d.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},rx),ax=d.merge({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}}},rx),sx=d.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ax),lx=d.defaults({logBase:10},ax),ux={category:ox,value:ax,time:sx,log:lx},cx={value:1,category:1,time:1,log:1};function hx(e,t,n,i){(0,d.each)(cx,(function(r,o){var a=(0,d.merge)((0,d.merge)({},ux[o],!0),i,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return(0,c.ZT)(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=vr(this),i=n?_r(e):{},r=t.getTheme();(0,d.merge)(e,r.get(o+"Axis")),(0,d.merge)(e,this.getDefaultOption()),e.type=dx(e),n&&xr(e,i,n)},n.prototype.optionUpdated=function(){var e=this.option;"category"===e.type&&(this.__ordinalMeta=Np.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",dx)}function dx(e){return e.type||(e.data?"category":"value")}var px=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return d.map(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),d.filter(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),fx=px,gx=["x","y"];function yx(e){return"interval"===e.type||"time"===e.type}var mx=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=gx,t}return(0,c.ZT)(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(yx(e)&&yx(t)){var n=e.getExtent(),i=t.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,h=r[1]-i[0]*u,d=this._transform=[l,0,0,u,c,h];this._invTransform=(0,ol.invert)([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),i=this.dataToPoint(t),r=this.getArea(),o=new ri.Z(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var i=e[0],r=e[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return(0,al.applyTransform)(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,t)),n[1]=a.toGlobalCoord(a.dataToCoord(r,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(e[0]),s=i.parse(e[1]);return t=t||[],t[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return(0,al.applyTransform)(n,e,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),t),n[1]=r.coordToData(r.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),r=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-i;return new ri.Z(n,i,r,o)},t}(fx),vx=mx,xx=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return(0,c.ZT)(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Gg),_x=xx;function bx(e,t,n){n=n||{};var i=e.coordinateSystem,r=t.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,g="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(a){var y=a.toGlobalCoord(a.dataToCoord(0));g[p.onZero]=Math.max(Math.min(y,g[1]),g[0])}o.position=["y"===u?g[p[l]]:h[0],"x"===u?g[p[l]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1);var m={top:-1,bottom:1,left:-1,right:1};o.labelDirection=o.tickDirection=o.nameDirection=m[s],o.labelOffset=a?g[p[s]]-g[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),d.retrieve(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var v=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-v:v,o.z2=1,o}function Sx(e){return"cartesian2d"===e.get("coordinateSystem")}function wx(e){var t={xAxisModel:null,yAxisModel:null};return d.each(t,(function(n,i){var r=i.replace(/Model$/,""),o=e.getReferringComponents(r,xe).models[0];t[i]=o})),t}var Mx=Math.log;function Ix(e,t,n){var i=jp.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=Gf(e,t),u=l.extent,c=l.fixMin,h=l.fixMax;if("log"===e.type){var d=Mx(e.base);u=[Mx(u[0])/d,Mx(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var p=i.getExtent.call(e);c&&(u[0]=p[0]),h&&(u[1]=p[1]);var f=i.getInterval.call(e),g=u[0],y=u[1];if(c&&h)f=(y-g)/a;else if(c){y=u[0]+f*a;while(yu[0]&&isFinite(g)&&isFinite(u[0]))f=Vp(f),g=u[1]-f*a}else{var m=e.getTicks().length-1;m>a&&(f=Vp(f));var v=f*a;y=Math.ceil(u[1]/f)*f,g=b(y-v),g<0&&u[0]>=0?(g=0,y=b(v)):y>0&&u[1]<=0&&(y=0,g=-b(v))}var x=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(e,g+f*x,y+f*_),i.setInterval.call(e,f),(x||_)&&i.setNiceExtent.call(e,g+f,y-f)}var Tx=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=gx,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=(0,d.keys)(e),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=+n[o],s=e[a],l=s.model,u=s.scale;Rp(u)&&l.get("alignTicks")&&null==l.get("interval")?r.push(s):(Hf(u,l),Rp(u)&&(t=s))}r.length&&(t||(t=r.pop(),Hf(t.scale,t.model)),(0,d.each)(r,(function(e){Ix(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),i(n.x),i(n.y);var r={};(0,d.each)(n.x,(function(e){Dx(n,"y",e,r)})),(0,d.each)(n.y,(function(e){Dx(n,"x",e,r)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),r=!n&&e.get("containLabel"),o=gr(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){(0,d.each)(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),Lx(e,t?o.x:o.y)}))}s(),r&&((0,d.each)(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=jf(e);if(t){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+i,"top"===e.position?o.y+=t.height+i:"left"===e.position&&(o.x+=t.width+i)}}})),s()),(0,d.each)(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}(0,d.isObject)(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,r=this._coordsList;i0?"top":"bottom",i="center"):P(o-kx)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),Nx={axisLine:function(e,t,n,i){var r=t.get(["axisLine","show"]);if("auto"===r&&e.handleAutoShown&&(r=e.handleAutoShown("axisLine")),r){var o=t.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&((0,al.applyTransform)(s,s,a),(0,al.applyTransform)(l,l,a));var c=(0,d.extend)({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new yl.Z({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Bl(h.shape,h.style.lineWidth),h.anid="line",n.add(h);var p=t.get(["axisLine","symbol"]);if(null!=p){var f=t.get(["axisLine","symbolSize"]);(0,d.isString)(p)&&(p=[p,p]),((0,d.isString)(f)||(0,d.isNumber)(f))&&(f=[f,f]);var g=Ic(t.get(["axisLine","symbolOffset"])||0,f),y=f[0],m=f[1];(0,d.each)([{rotate:e.rotation+Math.PI/2,offset:g[0],r:0},{rotate:e.rotation-Math.PI/2,offset:g[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,i){if("none"!==p[i]&&null!=p[i]){var r=wc(p[i],-y/2,-m/2,y,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;r.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(e,t,n,i){var r=Gx(n,i,t,e),o=Hx(n,i,t,e);if(Ex(t,o,r),Fx(n,i,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var a=xy((0,d.map)(o,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})));wy(a)}},axisName:function(e,t,n,i){var r=(0,d.retrieve)(e.axisName,t.get("name"));if(r){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,h=t.axis.getExtent(),p=h[0]>h[1]?-1:1,f=["start"===s?h[0]-p*c:"end"===s?h[1]+p*c:(h[0]+h[1])/2,Bx(s)?e.labelOffset+l*c:0],g=t.get("nameRotate");null!=g&&(g=g*kx/180),Bx(s)?o=Ox.innerTextLayout(e.rotation,null!=g?g:e.rotation,l):(o=Rx(e.rotation,s,g||0,h),a=e.axisNameAvailableWidth,null!=a&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var y=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,x=(0,d.retrieve)(e.nameTruncateMaxWidth,m.maxWidth,a),_=new Ue.ZP({x:f[0],y:f[1],rotation:o.rotation,silent:Ox.isLabelSilent(t),style:Dn(u,{text:r,font:y,overflow:"truncate",width:x,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(tu({el:_,componentModel:t,itemName:r}),_.__fullText=r,_.anid="name",t.get("triggerEvent")){var b=Ox.makeAxisEventDataBase(t);b.targetType="axisName",b.name=r,Xe(_).eventData=b}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function Rx(e,t,n,i){var r,o,a=L(n-e),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;return P(a-kx/2)?(o=l?"bottom":"top",r="center"):P(a-1.5*kx)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*kx&&a>kx/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Ex(e,t,n){if(!Jf(e.axis)){var i=e.get(["axisLabel","showMinLabel"]),r=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(Vx(o),Vx(u)):zx(o,a)&&(i?(Vx(a),Vx(c)):(Vx(o),Vx(u))),!1===r?(Vx(s),Vx(h)):zx(l,s)&&(r?(Vx(l),Vx(d)):(Vx(s),Vx(h)))}}function Vx(e){e&&(e.ignore=!0)}function zx(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var r=ol.identity([]);return ol.rotate(r,r,-e.rotation),n.applyTransform(ol.mul([],r,e.getLocalTransform())),i.applyTransform(ol.mul([],r,t.getLocalTransform())),n.intersect(i)}}function Bx(e){return"middle"===e||"center"===e}function Zx(e,t,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||e===t}function Jx(e){var t=$x(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=e_(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!h.min?h.min=0:null!=h.min&&h.min<0&&!h.max&&(h.max=0);var p=a;null!=h.color&&(p=d.defaults({color:h.color},a));var f=d.merge(d.clone(h),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:h.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:c},!1);if(d.isString(l)){var g=f.name;f.name=l.replace("{value}",null!=g?g:"")}else d.isFunction(l)&&(f.name=l(f.name,f));var y=new $n(f,null,this.ecModel);return d.mixin(y,eg.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y}),this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:d.merge({lineStyle:{color:"#bbb"}},T_.axisLine),axisLabel:A_(T_.axisLabel,!1),axisTick:A_(T_.axisTick,!1),splitLine:A_(T_.splitLine,!0),splitArea:A_(T_.splitArea,!0),indicator:[]},t}(Ir),C_=D_,L_=["axisLine","axisTickLabel","axisName"],P_=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=this.group;i.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes(),i=d.map(n,(function(e){var n=e.model.get("showName")?e.name:"",i=new Wx(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i}));d.each(i,(function(e){d.each(L_,e.add,e),this.group.add(e.getGroup())}),this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),r=e.getModel("splitLine"),o=e.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),c=a.get("color"),h=s.get("color"),p=d.isArray(c)?c:[c],f=d.isArray(h)?h:[h],g=[],y=[];if("circle"===i)for(var m=n[0].getTicksCoords(),v=t.cx,x=t.cy,_=0;_3?1.4:r>1?1.2:1.1,l=i>0?s:1/s;Y_(this,"zoom","zoomOnMouseWheel",e,{scale:l,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(i),c=(i>0?1:-1)*(u>3?.4:u>1?.15:.05);Y_(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!H_(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;Y_(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(g.Z);function Y_(e,t,n,i,r){e.pointerChecker&&e.pointerChecker(i,r.originX,r.originY)&&(B_.sT(i.event),X_(e,t,n,i,r))}function X_(e,t,n,i,r){r.isAvailableBehavior=(0,d.bind)(j_,null,n,i),e.trigger(t,r)}function j_(e,t,n){var i=n[e];return!e||i&&(!(0,d.isString)(i)||t.event[i+"Key"])}var q_=U_;function K_(e,t,n){var i=e.target;i.x+=t,i.y+=n,i.dirty()}function J_(e,t,n,i){var r=e.target,o=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var $_={axisPointer:1,tooltip:1,brush:1};function Q_(e,t,n){var i=t.getComponentByElement(e.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!$_.hasOwnProperty(i.mainType)&&r&&r.model!==n}var eb=n(137),tb=n(7906),nb=(0,d.createHashMap)(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),ib=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=(0,d.createHashMap)(),this._freedGraphics=[],this._mapName=e,this._parsedXML=(0,tb.s)(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=ob(e.named),n=t.regions,i=t.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n;try{t=e&&(0,eb.hS)(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,(0,d.assert)(null!=n)}catch(y){throw new Error("Invalid svg format\n"+y.message)}var i=new el.Z;i.add(n),i.isGeoSVGGraphicRoot=!0;var r=t.width,o=t.height,a=t.viewBoxRect,s=this._boundingRect;if(!s){var l=void 0,u=void 0,c=void 0,h=void 0;if(null!=r?(l=0,c=r):a&&(l=a.x,c=a.width),null!=o?(u=0,h=o):a&&(u=a.y,h=a.height),null==l||null==u){var p=n.getBoundingRect();null==l&&(l=p.x,c=p.width),null==u&&(u=p.y,h=p.height)}s=this._boundingRect=new ri.Z(l,u,c,h)}if(a){var f=(0,eb.sd)(a,s);n.scaleX=n.scaleY=f.scale,n.x=f.x,n.y=f.y}i.setClipPath(new gl.Z({shape:s.plain()}));var g=[];return(0,d.each)(t.named,(function(e){null!=nb.get(e.svgNodeTagLower)&&(g.push(e),rb(e.el))})),{root:i,boundingRect:s,named:g}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();function rb(e){e.silent=!1,e.isGroup&&e.traverse((function(e){e.silent=!1}))}function ob(e){var t=[],n=(0,d.createHashMap)();return(0,d.each)(e,(function(e){if(null==e.namedFrom){var i=new gg(e.name,e.el);t.push(i),n.set(e.name,i)}})),{regions:t,regionsMap:n}}for(var ab=[126,25],sb="南海诸岛",lb=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],ub=0;ub0,g={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:f,isGeo:o,transformInfoRaw:h};"geoJSON"===s.resourceType?this._buildGeoJSON(g):"geoSVG"===s.resourceType&&this._buildSVG(g),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,i)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=d.createHashMap(),n=d.createHashMap(),i=this._regionsGroup,r=e.transformInfoRaw,o=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*r.scaleX+r.x,e[1]*r.scaleY+r.y]}function c(e){for(var t=[],n=!l&&s&&s.project,i=0;i=0)&&(d=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Tn(t,An(i),{labelFetcher:d,labelDataIndex:h,defaultText:n},p);var f=t.getTextContent();if(f&&(Ab(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Ob(e,t,n,i,r,o){e.data?e.data.setItemGraphicEl(o,t):Xe(t).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function Nb(e,t,n,i,r){e.data||tu({el:t,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function Rb(e,t,n,i,r){t.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Qt(t,a,o.get("blurScope"),o.get("disabled")),e.isGeo&&sn(t,r,n),a}function Eb(e,t,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),d.each(e,(function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(Qs),Gb=Zb;function Fb(e,t){var n={};return d.each(e,(function(e){e.each(e.mapDimension("value"),(function(t,i){var r="ec-"+e.getName(i);n[r]=n[r]||[],isNaN(t)||n[r].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(i,r){for(var o,a="ec-"+e[0].getName(r),s=0,l=1/0,u=-1/0,c=n[a].length,h=0;h1?(p.width=d,p.height=d/x):(p.height=d,p.width=d*x),p.y=h[1]-p.height/2,p.x=h[0]-p.width/2;else{var S=e.getBoxLayoutParams();S.aspect=x,p=gr(S,{width:m,height:v})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}function tS(e,t){d.each(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}var nS=function(){function e(){this.dimensions=Kb}return e.prototype.create=function(e,t){var n=[];function i(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",(function(e,r){var o=e.get("map"),a=new Qb(o+r,o,d.extend({nameMap:e.get("nameMap")},i(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=eS,a.resize(e,t)})),e.eachSeries((function(e){var t=e.get("coordinateSystem");if("geo"===t){var i=e.get("geoIndex")||0;e.coordinateSystem=n[i]}}));var r={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}})),d.each(r,(function(e,r){var o=d.map(e,(function(e){return e.get("nameMap")})),a=new Qb(r,r,d.extend({nameMap:d.mergeAll(o)},i(e[0])));a.zoomLimit=d.retrieve.apply(null,d.map(e,(function(e){return e.get("scaleLimit")}))),n.push(a),a.resize=eS,a.resize(e[0],t),d.each(e,(function(e){e.coordinateSystem=a,tS(a,e)}))})),n},e.prototype.getFilledRegions=function(e,t,n,i){for(var r=(e||[]).slice(),o=d.createHashMap(),a=0;a=0;a--){var s=i[a];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},r.push(s)}}function gS(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,r=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){_S(e);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(e.hierNode.prelim=r.hierNode.prelim+t(e,r),e.hierNode.modifier=e.hierNode.prelim-o):e.hierNode.prelim=o}else r&&(e.hierNode.prelim=r.hierNode.prelim+t(e,r));e.parentNode.hierNode.defaultAncestor=bS(e,r,e.parentNode.hierNode.defaultAncestor||i[0],t)}function yS(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function mS(e){return arguments.length?e:TS}function vS(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function xS(e,t){return gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function _S(e){var t=e.children,n=t.length,i=0,r=0;while(--n>=0){var o=t[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}function bS(e,t,n,i){if(t){var r=e,o=e,a=o.parentNode.children[0],s=t,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,h=s.hierNode.modifier;while(s=SS(s),o=wS(o),s&&o){r=SS(r),a=wS(a),r.hierNode.ancestor=e;var d=s.hierNode.prelim+h-o.hierNode.prelim-u+i(s,o);d>0&&(IS(MS(s,e,n),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!SS(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),o&&!wS(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=e)}return n}function SS(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function wS(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function MS(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function IS(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function TS(e,t){return e.parentNode===t.parentNode?1:2}var AS=n(5696),DS=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),CS=function(e){function t(t){return e.call(this,t)||this}return(0,c.ZT)(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new DS},t.prototype.buildPath=function(e,t){var n=t.childPoints,i=n.length,r=t.parentPoint,o=n[0],a=n[i-1];if(1===i)return e.moveTo(r[0],r[1]),void e.lineTo(o[0],o[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=_(t.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(a[u]-r[u])*c,e.moveTo(r[0],r[1]),e.lineTo(h[0],h[1]),e.moveTo(o[0],o[1]),h[l]=o[l],e.lineTo(h[0],h[1]),h[l]=a[l],e.lineTo(h[0],h[1]),e.lineTo(a[0],a[1]);for(var d=1;dx.x,S||(b-=Math.PI));var M=S?"left":"right",I=s.getModel("label"),T=I.get("rotate"),A=T*(Math.PI/180),D=m.getTextContent();D&&(m.setTextConfig({position:I.get("position")||M,rotation:null==T?-b:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var C=s.get(["emphasis","focus"]),L="relative"===C?d.concatArray(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===C?a.getAncestorsIndices():"descendant"===C?a.getDescendantIndices():null;L&&(Xe(n).focus=L),OS(r,a,c,n,g,f,y,i),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var i=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);i&&i.hoverState===nt||It(n.__edge,t)}})}function OS(e,t,n,i,r,o,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),h=e.getOrient(),p=e.get(["lineStyle","curveness"]),f=e.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),y=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(y||(y=i.__edge=new ml.Z({shape:VS(c,h,p,r,r)})),gn(y,{shape:VS(c,h,p,o,a)},e));else if("polyline"===u)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var m=t.children,v=[],x=0;xt&&(t=i.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var i=n.getData().tree.root,r=e.targetNode;if(d.isString(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=e.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function tw(e){var t=[];while(e)e=e.parentNode,e&&t.push(e);return t.reverse()}function nw(e,t){var n=tw(e);return d.indexOf(n,t)>=0}function iw(e,t){var n=[];while(e){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}var rw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new $n(n,this,this.ecModel),r=QS.createTree(t,this,o);function o(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=i),e}))}var a=0;r.eachNode("preorder",(function(e){e.depth>a&&(a=e.depth)}));var s=e.expandAndCollapse,l=s&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=l})),r.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(e),a=o.getValue(),s=o.name;while(o&&o!==r)s=o.parentNode.name+"."+s,o=o.parentNode;return ws("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=iw(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Qs),ow=rw;function aw(e,t,n){var i,r=[e],o=[];while(i=r.pop())if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s=0;o--)i.push(r[o])}}function lw(e,t){e.eachSeriesByType("tree",(function(e){uw(e,t)}))}function uw(e,t){var n=xS(e,t);e.layoutInfo=n;var i=e.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=mS((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(r=n.width,o=n.height,a=mS());var s=e.getData().tree.root,l=s.children[0];if(l){fS(s),aw(l,gS,a),s.hierNode.modifier=-l.hierNode.prelim,sw(l,yS);var u=l,c=l,h=l;sw(l,(function(e){var t=e.getLayout().x;tc.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:a(u,c)/2,p=d-u.getLayout().x,f=0,g=0,y=0,m=0;if("radial"===i)f=r/(c.getLayout().x+d+p),g=o/(h.depth-1||1),sw(l,(function(e){y=(e.getLayout().x+p)*f,m=(e.depth-1)*g;var t=vS(y,m);e.setLayout({x:t.x,y:t.y,rawX:y,rawY:m},!0)}));else{var v=e.getOrient();"RL"===v||"LR"===v?(g=o/(c.getLayout().x+d+p),f=r/(h.depth-1||1),sw(l,(function(e){m=(e.getLayout().x+p)*g,y="LR"===v?(e.depth-1)*f:r-(e.depth-1)*f,e.setLayout({x:y,y:m},!0)}))):"TB"!==v&&"BT"!==v||(f=r/(c.getLayout().x+d+p),g=o/(h.depth-1||1),sw(l,(function(e){y=(e.getLayout().x+p)*f,m="TB"===v?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:y,y:m},!0)})))}}}function cw(e){e.eachSeriesByType("tree",(function(e){var t=e.getData(),n=t.tree;n.eachNode((function(e){var n=e.getModel(),i=n.getModel("itemStyle").getItemStyle(),r=t.ensureUniqueItemVisual(e.dataIndex,"style");(0,d.extend)(r,i)}))}))}function hw(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,i=t.getData().tree,r=i.getNodeByDataIndex(n);r.isExpand=!r.isExpand}))})),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=t.coordinateSystem,r=lS(i,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))}function dw(e){e.registerChartView(zS),e.registerSeriesModel(ow),e.registerLayout(lw),e.registerVisual(cw),hw(e)}var pw=["treemapZoomToNode","treemapRender","treemapMove"];function fw(e){for(var t=0;t1)n=n.parentNode;var r=no(e.ecModel,n.name||n.dataIndex+"",i);t.setVisual("decal",r)}))}var yw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};mw(n);var i=e.levels||[],r=this.designatedVisualItemStyle={},o=new $n({itemStyle:r},this,t);i=e.levels=vw(i,t);var a=d.map(i||[],(function(e){return new $n(e,o,t)}),this),s=QS.createTree(n,this,l);function l(e){e.wrapMethod("getItemModel",(function(e,t){var n=s.getNodeByDataIndex(t),i=n?a[n.depth]:null;return e.parentModel=i||o,e}))}return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.getRawValue(e),o=i.getName(e);return ws("nameValue",{name:o,value:r})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=iw(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},d.extend(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=d.createHashMap(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){gw(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Qs);function mw(e){var t=0;d.each(e.children,(function(e){mw(e);var n=e.value;d.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;d.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),d.isArray(e.value)?e.value[0]=n:e.value=n}function vw(e,t){var n=X(t.get("color")),i=X(t.get(["aria","decal","decals"]));if(n){var r,o;e=e||[],d.each(e,(function(e){var t=new $n(e),n=t.get("color"),i=t.get("decal");(t.get(["itemStyle","color"])||n&&"none"!==n)&&(r=!0),(t.get(["itemStyle","decal"])||i&&"none"!==i)&&(o=!0)}));var a=e[0]||(e[0]={});return r||(a.color=n.slice()),!o&&i&&(a.decal=i.slice()),e}}var xw=yw,_w=8,bw=8,Sw=5,ww=function(){function e(e){this.group=new el.Z,e.add(this.group)}return e.prototype.render=function(e,t,n,i){var r=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(e,c,a,s,l,u,i),yr(o,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var r=se(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+2*_w,t.emptyItemWidth);t.totalWidth+=a+bw,t.renderList.push({node:i,text:r,width:a})}},e.prototype._renderContent=function(e,t,n,i,r,o,a){for(var s=0,l=t.emptyItemWidth,u=e.get(["breadcrumb","height"]),c=fr(t.pos,t.box),h=t.totalWidth,p=t.renderList,f=i.getModel("itemStyle").getItemStyle(),g=p.length-1;g>=0;g--){var y=p[g],m=y.node,v=y.width,x=y.text;h>c.width&&(h-=v-l,v=l,x=null);var _=new pl.Z({shape:{points:Mw(s,0,v,u,g===p.length-1,0===g)},style:(0,d.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ue.ZP({style:Dn(r,{text:x})}),textConfig:{position:"inside"},z2:1e4*at,onclick:(0,d.curry)(a,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=Dn(o,{text:x}),_.ensureState("emphasis").style=f,Qt(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),Iw(_,e,m),s+=v+bw}},e.prototype.remove=function(){this.group.removeAll()},e}();function Mw(e,t,n,i,r,o){var a=[[r?e:e-Sw,t],[e+n,t],[e+n,t+i],[r?e:e-Sw,t+i]];return!o&&a.splice(2,0,[e+n+Sw,t+i/2]),!r&&a.push([e,t+i/2]),a}function Iw(e,t,n){Xe(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&iw(n,t)}}var Tw=ww,Aw=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,i,r){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:r}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,r=this._storage.length;iPw||Math.abs(e.dy)>Pw)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new ri.Z(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo;t-=a.x,n-=a.y;var s=ol.create();ol.translate(s,s,[-t,-n]),ol.scale(s,s,[e.scale,e.scale]),ol.translate(s,s,[t,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var i=t.findTarget(e.offsetX,e.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)t._rootToNode(i);else if("zoomToNode"===n)t._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&lr(a,s)}}}}}),this)},t.prototype._renderBreadcrumb=function(e,t,n){var i=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Tw(this.group))).render(e,t,n.node,(function(t){"animating"!==i._state&&(nw(e.getViewRoot(),t)?i._rootToNode({node:t}):i._zoomToNode({node:t}))}))},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Gw(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(e,t),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},t.type="treemap",t}(du);function Gw(){return{nodeGroup:[],background:[],content:[]}}function Fw(e,t,n,i,r,o,a,s,l,u){if(a){var c=a.getLayout(),h=e.getData(),p=a.getModel();if(h.setItemGraphicEl(a.dataIndex,null),c&&c.isInView){var f=c.width,g=c.height,y=c.borderWidth,m=c.invisible,v=a.getRawIndex(),x=s&&s.getRawIndex(),_=a.viewChildren,b=c.upperHeight,S=_&&_.length,w=p.getModel("itemStyle"),M=p.getModel(["emphasis","itemStyle"]),I=p.getModel(["blur","itemStyle"]),T=p.getModel(["select","itemStyle"]),A=w.get("borderRadius")||0,D=G("nodeGroup",Cw);if(D){if(l.add(D),D.x=c.x||0,D.y=c.y||0,D.markRedraw(),Bw(D).nodeWidth=f,Bw(D).nodeHeight=g,c.isAboveViewRoot)return D;var C=G("background",Lw,u,Rw);C&&E(D,C,S&&c.upperLabelHeight);var L=p.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),O=L.get("disabled"),N="ancestor"===P?a.getAncestorsIndices():"descendant"===P?a.getDescendantIndices():P;if(S)an(D)&&on(D,!1),C&&(on(C,!O),h.setItemGraphicEl(a.dataIndex,C),en(C,N,k));else{var R=G("content",Lw,u,Ew);R&&V(D,R),C.disableMorphing=!0,C&&an(C)&&on(C,!1),on(D,!O),h.setItemGraphicEl(a.dataIndex,D),en(D,N,k)}return D}}}function E(t,n,i){var r=Xe(n);if(r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:f,height:g,r:A}),m)z(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=zw(w);l.fill=s;var u=Vw(M);u.fill=M.get("borderColor");var c=Vw(I);c.fill=I.get("borderColor");var h=Vw(T);if(h.fill=T.get("borderColor"),i){var d=f-2*y;B(n,s,o.opacity,{x:y,y:0,width:d,height:b})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=h,Pt(n)}t.add(n)}function V(t,n){var i=Xe(n);i.dataIndex=a.dataIndex,i.seriesIndex=e.seriesIndex;var r=Math.max(f-2*y,0),o=Math.max(g-2*y,0);if(n.culling=!0,n.setShape({x:y,y:y,width:r,height:o,r:A}),m)z(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=zw(w);u.fill=l,u.decal=s.decal;var c=Vw(M),h=Vw(I),d=Vw(T);B(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=h,n.ensureState("select").style=d,Pt(n)}t.add(n)}function z(e){!e.invisible&&o.push(e)}function B(t,n,i,r){var o=p.getModel(r?Ow:kw),s=se(p.get("name"),null),l=o.getShallow("show");Tn(t,An(p,r?Ow:kw),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var h=u.style,f=(0,d.normalizeCssArray)(h.padding||0);r&&(t.setTextConfig({layoutRect:r}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((r?r.width:t.shape.width)-f[1]-f[3],0),n=Math.max((r?r.height:t.shape.height)-f[0]-f[2],0);h.width===e&&h.height===n||u.setStyle({width:e,height:n})},h.truncateMinChar=2,h.lineOverflow="truncate",Z(h,r,c);var g=u.getState("emphasis");Z(g?g.style:null,r,c)}}function Z(t,n,i){var r=t?t.text:null;if(!n&&i.isLeafRoot&&null!=r){var o=e.get("drillDownIcon",!0);t.text=o?o+" "+r:r}}function G(e,i,o,a){var s=null!=x&&n[e][x],l=r[e];return s?(n[e][x]=null,F(l,s)):m||(s=new i,s instanceof Sb.ZP&&(s.z2=Hw(o,a)),H(l,s)),t[e][v]=s}function F(e,t){var n=e[v]={};t instanceof Cw?(n.oldX=t.x,n.oldY=t.y):n.oldShape=(0,d.extend)({},t.shape)}function H(e,t){var n=e[v]={},o=a.parentNode,s=t instanceof el.Z;if(o&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=r.background[o.getRawIndex()];!i&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}function Hw(e,t){return e*Nw+t}var Ww=Zw,Uw=d.each,Yw=d.isObject,Xw=-1,jw=function(){function e(t){var n=t.mappingMethod,i=t.type,r=this.option=d.clone(t);this.type=i,this.mappingMethod=n,this._normalizeData=aM[n];var o=e.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(Jw(r),qw(r)):"category"===n?r.categories?Kw(r):Jw(r,!0):(d.assert("linear"!==n||r.dataExtent),Jw(r))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return d.bind(this._normalizeData,this)},e.listVisualTypes=function(){return d.keys(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){d.isObject(e)?d.each(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,i){var r,o=d.isArray(t)?[]:d.isObject(t)?{}:(r=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(i,e,t);r?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,i={};return t&&Uw(e.visualHandlers,(function(e,r){t.hasOwnProperty(r)&&(i[r]=t[r],n=!0)})),n?i:null},e.prepareVisualTypes=function(e){if(d.isArray(e))e=e.slice();else{if(!Yw(e))return[];var t=[];Uw(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var i,r=1/0,o=0,a=t.length;o=0;o--)null==i[o]&&(delete n[t[o]],t.pop())}function Jw(e,t){var n=e.visual,i=[];d.isObject(n)?Uw(n,(function(e){i.push(e)})):null!=n&&i.push(n);var r={color:1,symbol:1};t||1!==i.length||r.hasOwnProperty(e.type)||(i[1]=i[0]),oM(e,i)}function $w(e){return{applyVisual:function(t,n,i){var r=this.mapValueToVisual(t);i("color",e(n("color"),r))},_normalizedToVisual:iM([0,1])}}function Qw(e){var t=this.option.visual;return t[Math.round(x(e,[0,1],[0,t.length-1],!0))]||{}}function eM(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function tM(e){var t=this.option.visual;return t[this.option.loop&&e!==Xw?e%t.length:e]}function nM(){return this.option.visual[0]}function iM(e){return{linear:function(t){return x(t,e,this.option.visual,!0)},category:tM,piecewise:function(t,n){var i=rM.call(this,n);return null==i&&(i=x(t,e,this.option.visual,!0)),i},fixed:nM}}function rM(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=jw.findPieceIndex(e,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function oM(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=d.map(t,(function(e){var t=qe.parse(e);return t||[0,0,0,1]}))),t}var aM={linear:function(e){return x(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=jw.findPieceIndex(e,t,!0);if(null!=n)return x(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?Xw:t},fixed:d.noop};function sM(e,t,n){return e?t<=n:t=n.length||e===n[e.depth]){var o=xM(r,u,e,t,g,i);dM(e,o,n,i)}}))}else s=fM(u),c.fill=s}}function pM(e,t,n){var i=(0,d.extend)({},t),r=n.designatedVisualItemStyle;return(0,d.each)(["color","colorAlpha","colorSaturation"],(function(n){r[n]=t[n];var o=e.get(n);r[n]=null,null!=o&&(i[n]=o)})),i}function fM(e){var t=yM(e,"color");if(t){var n=yM(e,"colorAlpha"),i=yM(e,"colorSaturation");return i&&(t=(0,qe.modifyHSL)(t,null,null,i)),n&&(t=(0,qe.modifyAlpha)(t,n)),t}}function gM(e,t){return null!=t?(0,qe.modifyHSL)(t,null,null,e):null}function yM(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function mM(e,t,n,i,r,o){if(o&&o.length){var a=vM(t,"color")||null!=r.color&&"none"!==r.color&&(vM(t,"colorAlpha")||vM(t,"colorSaturation"));if(a){var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:a.name,dataExtent:u,visual:a.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new lM(h);return cM(d).drColorMappingBy=c,d}}}function vM(e,t){var n=e.get(t);return(0,d.isArray)(n)&&n.length?{name:t,range:n}:null}function xM(e,t,n,i,r,o){var a=(0,d.extend)({},t);if(r){var s=r.type,l="color"===s&&cM(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}var _M=Math.max,bM=Math.min,SM=d.retrieve,wM=d.each,MM=["itemStyle","borderWidth"],IM=["itemStyle","gapWidth"],TM=["upperLabel","show"],AM=["upperLabel","height"],DM={seriesType:"treemap",reset:function(e,t,n,i){var r=n.getWidth(),o=n.getHeight(),a=e.option,s=gr(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=_(SM(s.width,l[0]),r),c=_(SM(s.height,l[1]),o),h=i&&i.type,p=["treemapZoomToNode","treemapRootToNode"],f=ew(i,p,e),g="treemapRender"===h||"treemapMove"===h?i.rootRect:null,y=e.getViewRoot(),m=tw(y);if("treemapMove"!==h){var v="treemapZoomToNode"===h?EM(e,f,y,u,c):g?[g.width,g.height]:[u,c],x=a.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var b={squareRatio:a.squareRatio,sort:x,leafDepth:a.leafDepth};y.hostTree.clearLayouts();var S={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};y.setLayout(S),CM(y,b,!1,0),S=y.getLayout(),wM(m,(function(e,t){var n=(m[t+1]||y).getValue();e.setLayout(d.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},S))}))}var w=e.getData().tree.root;w.setLayout(VM(s,g,f),!0),e.setLayoutInfo(s),zM(w,new ri.Z(-s.x,-s.y,r,o),m,y,0)}};function CM(e,t,n,i){var r,o;if(!e.isRemoved()){var a=e.getLayout();r=a.width,o=a.height;var s=e.getModel(),l=s.get(MM),u=s.get(IM)/2,c=BM(s),h=Math.max(l,c),d=l-u,p=h-u;e.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),r=_M(r-2*d,0),o=_M(o-d-p,0);var f=r*o,g=LM(e,s,f,t,n,i);if(g.length){var y={x:d,y:p,width:r,height:o},m=bM(r,o),v=1/0,x=[];x.area=0;for(var _=0,b=g.length;_=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ta[1]&&(a[1]=t)}))):a=[NaN,NaN],{sum:i,dataExtent:a}}function NM(e,t,n){for(var i=0,r=1/0,o=0,a=void 0,s=e.length;oi&&(i=a));var l=e.area*e.area,u=t*t*n;return l?_M(u*i/l,l/(u*r)):1/0}function RM(e,t,n,i,r){var o=t===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=t?e.area/t:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=e.length;hC&&(u=C),a=o}ui&&(i=t);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(m[1],m[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],h=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+S,h=m[0]<0?"right":"left",i.originX=-f*_,i.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+S,h="center",i.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+S,h=m[0]>=0?"right":"left",i.originX=f*_,i.originY=-S;break}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||h})}}}function w(e,t){var n=e.__specifiedRotation;if(null==n){var i=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else e.attr("rotation",n)}},t}(el.Z),LI=CI,PI=function(){function e(e){this.group=new el.Z,this._LineCtor=e||LI}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=e,r||i.removeAll();var o=OI(e);e.diff(r).add((function(n){t._doAdd(e,n,o)})).update((function(n,i){t._doUpdate(r,e,i,n,o)})).remove((function(e){i.remove(r.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=OI(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||kI(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=e.start;i0}function OI(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:An(t)}}function NI(e){return isNaN(e[0])||isNaN(e[1])}function RI(e){return e&&!NI(e[0])&&!NI(e[1])}var EI=PI,VI=[],zI=[],BI=[],ZI=jg.Zm,GI=al.distSquare,FI=Math.abs;function HI(e,t,n){for(var i,r=e[0],o=e[1],a=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){VI[0]=ZI(r[0],o[0],a[0],c),VI[1]=ZI(r[1],o[1],a[1],c);var h=FI(GI(VI,t)-l);h=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function WI(e,t){var n=[],i=jg.Lx,r=[[],[],[]],o=[[],[]],a=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[al.clone(l[0]),al.clone(l[1])],l[2]&&l.__original.push(al.clone(l[2])));var h=l.__original;if(null!=l[2]){if(al.copy(r[0],h[0]),al.copy(r[1],h[2]),al.copy(r[2],h[1]),u&&"none"!==u){var d=aI(e.node1),p=HI(r,h[0],d*t);i(r[0][0],r[1][0],r[2][0],p,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],p,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){d=aI(e.node2),p=HI(r,h[1],d*t);i(r[0][0],r[1][0],r[2][0],p,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],p,n),r[1][1]=n[1],r[2][1]=n[2]}al.copy(l[0],r[0]),al.copy(l[1],r[2]),al.copy(l[2],r[1])}else{if(al.copy(o[0],h[0]),al.copy(o[1],h[1]),al.sub(a,o[1],o[0]),al.normalize(a,a),u&&"none"!==u){d=aI(e.node1);al.scaleAndAdd(o[0],o[0],a,d*t)}if(c&&"none"!==c){d=aI(e.node2);al.scaleAndAdd(o[1],o[1],a,-d*t)}al.copy(l[0],o[0]),al.copy(l[1],o[1])}}))}function UI(e){return"view"===e.type}var YI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t){var n=new Jy,i=new EI,r=this.group;this._controller=new q_(t.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},t.prototype.render=function(e,t,n){var i=this,r=e.coordinateSystem;this._model=e;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(UI(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):gn(s,l,e)}WI(e.getGraph(),oI(e));var u=e.getData();o.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=e.get("layout");u.graph.eachNode((function(t){var n=t.dataIndex,r=t.getGraphicEl(),o=t.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",(function(o){switch(p){case"force":h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),t.setLayout({fixed:!0},!0),uI(e,"symbolSize",t,[o.offsetX,o.offsetY]),i.updateLayout(e);break;case"none":default:u.setItemLayout(n,[r.x,r.y]),iI(e.getGraph(),e),i.updateLayout(e);break}})).on("dragend",(function(){h&&h.setUnfixed(n)})),r.setDraggable(a,!!o.get("cursor"));var s=o.get(["emphasis","focus"]);"adjacency"===s&&(Xe(r).focus=t.getAdjacentDataIndices())}})),u.graph.eachEdge((function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(Xe(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(e){hI(e,f,g,y)})),this._firstRender=!1},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;(function i(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())}))})()},t.prototype._updateController=function(e,t,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker((function(t,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!Q_(t,n,e)})),UI(e.coordinateSystem)?(r.enable(e.get("roam")),o.zoomLimit=e.get("scaleLimit"),o.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(t){K_(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){J_(o,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),i._updateNodeAndLinkScale(),WI(e.getGraph(),oI(e)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):r.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=oI(e);t.eachItemGraphicEl((function(e,t){e&&e.setSymbolScale(n)}))},t.prototype.updateLayout=function(e){WI(e.getGraph(),oI(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(du),XI=YI;function jI(e){return"_EC_"+e}var qI=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[jI(e)]){var i=new KI(e,t);return i.hostGraph=this,this.nodes.push(i),n[jI(e)]=i,i}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[jI(e)]},e.prototype.addEdge=function(e,t,n){var i=this._nodesMap,r=this._edgesMap;if(d.isNumber(e)&&(e=this.nodes[e]),d.isNumber(t)&&(t=this.nodes[t]),e instanceof KI||(e=i[jI(e)]),t instanceof KI||(t=i[jI(t)]),e&&t){var o=e.id+"-"+t.id,a=new JI(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),r[o]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof KI&&(e=e.id),t instanceof KI&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,r=0;r=0&&e.call(t,n[r],r)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&e.call(t,n[r],r)},e.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof KI||(t=this._nodesMap[jI(t)]),t){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}d.mixin(KI,$I("hostGraph","data")),d.mixin(JI,$I("hostGraph","edgeData"));var QI=qI;function eT(e,t,n,i,r){for(var o=new QI(i),a=0;a "+p)),u++)}var f,g=n.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)f=Dp(e,n);else{var y=bo.get(g),m=y&&y.dimensions||[];d.indexOf(m,"value")<0&&m.concat(["value"]);var v=hp(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;f=new up(v,n),f.initData(e)}var x=new up(["value"],n);return x.initData(l,s),r&&r(f,x),qS({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var tT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return(0,c.ZT)(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Zv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),j(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],r=this;if(i&&n){QM(this);var o=eT(i,n,this,!0,a);return d.each(o.edges,(function(e){eI(e.node1,e.node2,this,e.dataIndex)}),this),o.data}function a(e,t){e.wrapMethod("getItemModel",(function(e){var t=r._categoriesModels,n=e.getShallow("category"),i=t[n];return i&&(i.parentModel=e.parentModel,e.parentModel=i),e}));var n=$n.prototype.getModel;function i(e,t){var i=n.call(this,e,t);return i.resolveParentPath=o,i}function o(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=o,e.getModel=i,e}))}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(e,n),o=i.graph.getEdgeByIndex(e),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),ws("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}var u=Bs({series:this,dataIndex:e,multipleSeries:t});return u},t.prototype._updateCategoriesData=function(){var e=d.map(this.option.categories||[],(function(e){return null!=e.value?e:d.extend({value:0},e)})),t=new up(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Qs),nT=tT,iT={type:"graphRoam",event:"graphRoam",update:"none"};function rT(e){e.registerChartView(XI),e.registerSeriesModel(nT),e.registerProcessor(GM),e.registerVisual(FM),e.registerVisual(WM),e.registerLayout(rI),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,dI),e.registerLayout(gI),e.registerCoordinateSystem("graphView",{dimensions:jb.dimensions,create:mI}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},d.noop),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},d.noop),e.registerAction(iT,(function(e,t,n){t.eachComponent({mainType:"series",query:e},(function(t){var i=t.coordinateSystem,r=lS(i,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))}var oT=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),aT=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new oT},t.prototype.buildPath=function(e,t){var n=Math.cos,i=Math.sin,r=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=r/3?1:2),l=t.y-i(a)*o*(o>=r/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+i(a)*o),e.lineTo(t.x+n(t.angle)*r,t.y+i(t.angle)*r),e.lineTo(t.x-n(a)*o,t.y-i(a)*o),e.lineTo(s,l)},t}(Ke.ZP),sT=aT;function lT(e,t){var n=e.get("center"),i=t.getWidth(),r=t.getHeight(),o=Math.min(i,r),a=_(n[0],t.getWidth()),s=_(n[1],t.getHeight()),l=_(e.get("radius"),o/2);return{cx:a,cy:s,r:l}}function uT(e,t){var n=null==e?"":e+"";return t&&((0,d.isString)(t)?n=t.replace("{value}",n):(0,d.isFunction)(t)&&(n=t(e))),n}var cT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),r=lT(e,n);this._renderMain(e,t,n,i,r),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,i,r){var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap"),h=c?Um:hl.C,p=u.get("show"),f=u.getModel("lineStyle"),g=f.get("width"),y=[s,l];(0,Yg.L)(y,!a),s=y[0],l=y[1];for(var m=l-s,v=s,x=[],_=0;p&&_=e&&(0===t?0:i[t-1][0])Math.PI/2&&(G+=Math.PI)):"tangential"===Z?G=-A-Math.PI/2:(0,d.isNumber)(Z)&&(G=Z*Math.PI/180),0===G?h.add(new Ue.ZP({style:Dn(S,{text:E,x:z,y:B,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new Ue.ZP({style:Dn(S,{text:E,x:z,y:B,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:z,originY:B,rotation:G}))}if(x.get("show")&&O!==w){N=x.get("distance");N=N?N+l:l;for(var F=0;F<=M;F++){u=Math.cos(A),c=Math.sin(A);var H=new yl.Z({shape:{x1:u*(g-N)+p,y1:c*(g-N)+f,x2:u*(g-T-N)+p,y2:c*(g-T-N)+f},silent:!0,style:P});"auto"===P.stroke&&H.setStyle({stroke:i((O+F/M)/w)}),h.add(H),A+=C}A-=C}else A+=D}},t.prototype._renderPointer=function(e,t,n,i,r,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,p=[],f=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),v=m.mapDimension("value"),b=+e.get("min"),S=+e.get("max"),w=[b,S],M=[o,a];function I(t,n){var i,o=m.getItemModel(t),a=o.getModel("pointer"),s=_(a.get("width"),r.r),l=_(a.get("length"),r.r),u=e.get(["pointer","icon"]),c=a.get("offsetCenter"),h=_(c[0],r.r),d=_(c[1],r.r),p=a.get("keepAspect");return i=u?wc(u,h-s/2,d-l,s,l,null,p):new sT({shape:{angle:-Math.PI/2,width:s,r:l,x:h,y:d}}),i.rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function T(e,t){var n=g.get("roundCap"),i=n?Um:hl.C,a=g.get("overlap"),u=a?g.get("width"):l/m.count(),c=a?r.r-u:r.r-(e+1)*u,h=a?r.r:r.r-e*u,d=new i({shape:{startAngle:o,endAngle:t,cx:r.cx,cy:r.cy,clockwise:s,r0:c,r:h}});return a&&(d.z2=S-m.get(v,e)%S),d}(y||f)&&(m.diff(c).add((function(t){var n=m.get(v,t);if(f){var i=I(t,o);yn(i,{rotation:-((isNaN(+n)?M[0]:x(n,w,M,!0))+Math.PI/2)},e),u.add(i),m.setItemGraphicEl(t,i)}if(y){var r=T(t,o),a=g.get("clip");yn(r,{shape:{endAngle:x(n,w,M,a)}},e),u.add(r),je(e.seriesIndex,m.dataType,t,r),p[t]=r}})).update((function(t,n){var i=m.get(v,t);if(f){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=I(t,a);s.rotation=a,gn(s,{rotation:-((isNaN(+i)?M[0]:x(i,w,M,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(y){var l=h[n],d=l?l.shape.endAngle:o,_=T(t,d),b=g.get("clip");gn(_,{shape:{endAngle:x(i,w,M,b)}},e),u.add(_),je(e.seriesIndex,m.dataType,t,_),p[t]=_}})).execute(),m.each((function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(f){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof ll.ZP){var c=s.style;s.useStyle((0,d.extend)({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(x(m.get(v,e),w,[0,1],!0))),s.z2EmphasisLift=0,rn(s,t),Qt(s,r,o,a)}if(y){var h=p[e];h.useStyle(m.getItemVisual(e,"style")),h.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,rn(h,t),Qt(h,r,o,a)}})),this._progressEls=p)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor"),i=n.get("show");if(i){var r=n.get("size"),o=n.get("icon"),a=n.get("offsetCenter"),s=n.get("keepAspect"),l=wc(o,t.cx-r/2+_(a[0],t.r),t.cy-r/2+_(a[1],t.r),r,r,null,s);l.z2=n.get("showAbove")?1:0,l.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(l)}},t.prototype._renderTitleAndDetail=function(e,t,n,i,r){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new el.Z,h=[],d=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){h[e]=new Ue.ZP({silent:!0}),d[e]=new Ue.ZP({silent:!0})})).update((function(e,t){h[e]=o._titleEls[t],d[e]=o._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new el.Z,y=i(x(o,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),b=r.cx+_(v[0],r.r),S=r.cy+_(v[1],r.r),w=h[t];w.attr({z2:f?0:2,style:Dn(m,{x:b,y:S,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(w)}var M=n.getModel("detail");if(M.get("show")){var I=M.get("offsetCenter"),T=r.cx+_(I[0],r.r),A=r.cy+_(I[1],r.r),D=_(M.get("width"),r.r),C=_(M.get("height"),r.r),L=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:y,P=(w=d[t],M.get("formatter"));w.attr({z2:f?0:2,style:Dn(M,{x:T,y:A,text:uT(o,P),width:isNaN(D)?null:D,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:L})}),zn(w,{normal:M},o,(function(e){return uT(e,P)})),p&&Bn(w,t,a,e,{getFormattedLabel:function(e,t,n,i,r,a){return uT(a?a.interpolatedValue:o,P)}}),g.add(w)}c.add(g)})),this.group.add(c),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(du),hT=cT,dT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){return zv(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Qs),pT=dT;function fT(e){e.registerChartView(hT),e.registerSeriesModel(pT)}var gT=["itemStyle","opacity"],yT=function(e){function t(t,n){var i=e.call(this)||this,r=i,o=new fl.Z,a=new Ue.ZP;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return(0,c.ZT)(t,e),t.prototype.updateData=function(e,t,n){var i=this,r=e.hostModel,o=e.getItemModel(t),a=e.getItemLayout(t),s=o.getModel("emphasis"),l=o.get(gT);l=null==l?1:l,n||bn(i),i.useStyle(e.getItemVisual(t,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,yn(i,{style:{opacity:l}},r,t)):gn(i,{style:{opacity:l},shape:{points:a.points}},r,t),rn(i,o),this._updateLabel(e,t),Qt(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t),l=s.label,u=e.getItemVisual(t,"style"),c=u.fill;Tn(r,An(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:u.opacity,defaultText:e.getName(t)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}}),n.setTextConfig({local:!0,inside:!!l.inside,insideStroke:c,outsideFill:c});var h=l.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new wl.Z(h[0][0],h[0][1]):null},gn(r,{style:{x:l.x,y:l.y}},o,t),r.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),my(n,vy(a),{stroke:c})},t}(pl.Z),mT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this._data,o=this.group;i.diff(r).add((function(e){var t=new yT(i,e);i.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=r.getItemGraphicEl(t);n.updateData(i,e),o.add(n),i.setItemGraphicEl(e,n)})).remove((function(t){var n=r.getItemGraphicEl(t);_n(n,e,t)})).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(du),vT=mT,xT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Zv(d.bind(this.getData,this),d.bind(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return zv(this,{coordDimensions:["value"],encodeDefaulter:d.curry(Fr,this)})},t.prototype._defaultLabelLine=function(e){j(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),i=e.prototype.getDataParams.call(this,t),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Qs),_T=xT;function bT(e,t){return gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ST(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),r=[],o="ascending"===t,a=0,s=e.count();aUT)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&jT(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function jT(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var qT=YT,KT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&d.merge(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){d.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=d.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);d.each(n,(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(Ir),JT=KT,$T=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return(0,c.ZT)(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(Gg),QT=$T;function eA(e,t,n,i,r,o){e=e||0;var a=n[1]-n[0];if(null!=r&&(r=nA(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=nA(s,[0,a]),r=o=nA(s,[r,o]),i=0}t[0]=nA(t[0],n),t[1]=nA(t[1],n);var l=tA(t,i);t[i]+=e;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,t[i]=nA(t[i],h),u=tA(t,i),null!=r&&(u.sign!==l.sign||u.spano&&(t[1-i]=t[i]+u.sign*o),t}function tA(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function nA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var iA=d.each,rA=Math.min,oA=Math.max,aA=Math.floor,sA=Math.ceil,lA=b,uA=Math.PI,cA=function(){function e(e,t,n){this.type="parallel",this._axesMap=d.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var i=e.dimensions,r=e.parallelAxisIndex;iA(i,(function(e,n){var i=r[n],o=t.getComponent("parallelAxis",i),a=this._axesMap.set(e,new QT(e,Wf(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,r=t.pixelDimIndex,o=e[1-r],a=e[r];return o>=n&&o<=n+t.axisLength&&a>=i&&a<=i+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();iA(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),Hf(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=hA(t.get("axisExpandWidth"),l),h=hA(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,p=t.get("axisExpandWindow");if(p)e=hA(p[1]-p[0],l),p[1]=p[0]+e;else{e=hA(c*(h-1),l);var f=t.get("axisExpandCenter")||aA(u/2);p=[c*f-e/2],p[1]=p[0]+e}var g=(s-e)/(u-h);g<3&&(g=0);var y=[aA(lA(p[0]/c,1))+1,sA(lA(p[1]/c,1))-1],m=g/c*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:p,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),iA(n,(function(t,n){var o=(i.axisExpandable?pA:dA)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:uA/2,vertical:0},l=[a[r].x+e.x,a[r].y+e.y],u=s[r],c=ol.create();ol.rotate(c,c,u),ol.translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];d.each(o,(function(t){a.push(e.mapDimension(t)),s.push(r.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-c[0])?(l="jump",a=s-r*(1-c[2])):(a=s-r*c[1])>=0&&(a=s-r*(1-c[1]))<=0&&(a=0),a*=t.axisExpandWidth/u,a?eA(a,i,o,"all"):l="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[oA(0,p-d/2)],i[1]=rA(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},e}();function hA(e,t){return rA(oA(e,t[0]),t[1])}function dA(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function pA(e,t){var n,i,r=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e=0;n--)S(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,r=t.length;iIA}function WA(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function UA(e,t,n,i){var r=new el.Z;return r.add(new gl.Z({name:"main",style:qA(n),silent:!0,draggable:!0,cursor:"move",drift:(0,d.curry)(eD,e,t,r,["n","s","w","e"]),ondragend:(0,d.curry)(FA,t,{isEnd:!0})})),(0,d.each)(i,(function(n){r.add(new gl.Z({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,d.curry)(eD,e,t,r,n),ondragend:(0,d.curry)(FA,t,{isEnd:!0})}))})),r}function YA(e,t,n,i){var r=i.brushStyle.lineWidth||0,o=SA(r,TA),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],h=n[1][1],d=c-o+r/2,p=h-o+r/2,f=c-a,g=h-s,y=f+r,m=g+r;jA(e,t,"main",a,s,f,g),i.transformable&&(jA(e,t,"w",l,u,o,m),jA(e,t,"e",d,u,o,m),jA(e,t,"n",l,u,y,o),jA(e,t,"s",l,p,y,o),jA(e,t,"nw",l,u,o,o),jA(e,t,"ne",d,u,o,o),jA(e,t,"sw",l,p,o,o),jA(e,t,"se",d,p,o,o))}function XA(e,t){var n=t.__brushOption,i=n.transformable,r=t.childAt(0);r.useStyle(qA(n)),r.attr({silent:!i,cursor:i?"move":"default"}),(0,d.each)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var r=t.childOfName(n.join("")),o=1===n.length?$A(e,n[0]):QA(e,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?CA[o]+"-resize":null})}))}function jA(e,t,n,i,r,o,a){var s=t.childOfName(n);s&&s.setShape(rD(iD(e,t,[[i,r],[i+o,r+a]])))}function qA(e){return(0,d.defaults)({strokeNoScale:!0},e.brushStyle)}function KA(e,t,n,i){var r=[bA(e,n),bA(t,i)],o=[SA(e,n),SA(t,i)];return[[r[0],o[0]],[r[1],o[1]]]}function JA(e){return Fl(e.group)}function $A(e,t){var n={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=Wl(n[t],JA(e));return i[r]}function QA(e,t){var n=[$A(e,t[0]),$A(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}function eD(e,t,n,i,r,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=nD(t,r,o);(0,d.each)(i,(function(e){var t=DA[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(KA(s[0][0],s[1][0],s[0][1],s[1][1])),VA(t,n),FA(t,{isEnd:!1})}function tD(e,t,n,i){var r=t.__brushOption.range,o=nD(e,n,i);(0,d.each)(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),VA(e,t),FA(e,{isEnd:!1})}function nD(e,t,n){var i=e.group,r=i.transformCoordToLocal(t,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function iD(e,t,n){var i=ZA(e,t);return i&&i!==_A?i.clipPath(n,e._transform):(0,d.clone)(n)}function rD(e){var t=bA(e[0][0],e[1][0]),n=bA(e[0][1],e[1][1]),i=SA(e[0][0],e[1][0]),r=SA(e[0][1],e[1][1]);return{x:t,y:n,width:i-t,height:r-n}}function oD(e,t,n){if(e._brushType&&!dD(e,t.offsetX,t.offsetY)){var i=e._zr,r=e._covers,o=BA(e,t,n);if(!e._dragging)for(var a=0;ai.getWidth()||n<0||n>i.getHeight()}var pD={lineX:fD(0),lineY:fD(1),rect:{createCover:function(e,t){function n(e){return e}return UA({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=WA(e);return KA(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){YA(e,t,n,i)},updateCommon:XA,contain:sD},polygon:{createCover:function(e,t){var n=new el.Z;return n.add(new fl.Z({name:"main",style:qA(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new pl.Z({name:"main",draggable:!0,drift:(0,d.curry)(tD,e,t),ondragend:(0,d.curry)(FA,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:iD(e,t,n)})},updateCommon:XA,contain:sD}};function fD(e){return{createCover:function(t,n){return UA({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=WA(t),i=bA(n[0][e],n[1][e]),r=SA(n[0][e],n[1][e]);return[i,r]},updateCoverShape:function(t,n,i,r){var o,a=ZA(t,n);if(a!==_A&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,o];e&&l.reverse(),YA(t,n,l,r)},updateCommon:XA,contain:sD}}var gD=kA;function yD(e){return e=xD(e),function(t){return jl(t,e)}}function mD(e,t){return e=xD(e),function(n){var i=null!=t?t:n,r=i?e.width:e.height,o=i?e.x:e.y;return[o,o+(r||0)]}}function vD(e,t,n){var i=xD(e);return function(e,r){return i.contain(r[0],r[1])&&!Q_(e,t,n)}}function xD(e){return ri.Z.create(e)}var _D=["axisLine","axisTickLabel","axisName"],bD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new gD(n.getZr())).on("brush",d.bind(this._onBrush,this))},t.prototype.render=function(e,t,n,i){if(!SD(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new el.Z,this.group.add(this._axisGroup),e.get("show")){var o=MD(e,t),a=o.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=a.getAxisLayout(u),h=d.extend({strokeContainThreshold:l},c),p=new Wx(e,h);d.each(_D,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(h,s,e,o,l,n),Xl(r,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,i,r,o){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=ri.Z.create({x:a[0],y:-r/2,width:s,height:r});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:yD(u),isTargetByCursor:vD(u,o,i),getLinearBrushOtherExtent:mD(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(wD(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,i=n.axis,r=d.map(t,(function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]}));(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:r})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(nl);function SD(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}function wD(e){var t=e.axis;return d.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}function MD(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var ID=bD,TD={type:"axisAreaSelect",event:"axisAreaSelected"};function AD(e){e.registerAction(TD,(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),e.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))}var DD={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function CD(e){e.registerComponentView(qT),e.registerComponentModel(JT),e.registerCoordinateSystem("parallel",mA),e.registerPreprocessor(FT),e.registerComponentModel(xA),e.registerComponentView(ID),hx(e,"parallel",xA,DD),AD(e)}function LD(e){Cd(CD),e.registerChartView(NT),e.registerSeriesModel(zT),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,GT)}var PD=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),kD=function(e){function t(t){return e.call(this,t)||this}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new PD},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Nt(this)},t.prototype.downplay=function(){Rt(this)},t}(Ke.ZP),OD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=this,r=e.getGraph(),o=this.group,a=e.layoutInfo,s=a.width,l=a.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,o.removeAll(),o.x=a.x,o.y=a.y,r.eachEdge((function(t){var n=new kD,i=Xe(n);i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var r,a,u,p,f,g,y,m,v=t.getModel(),x=v.getModel("lineStyle"),_=x.get("curveness"),b=t.node1.getLayout(),S=t.node1.getModel(),w=S.get("localX"),M=S.get("localY"),I=t.node2.getLayout(),T=t.node2.getModel(),A=T.get("localX"),D=T.get("localY"),C=t.getLayout();switch(n.shape.extent=Math.max(1,C.dy),n.shape.orient=h,"vertical"===h?(r=(null!=w?w*s:b.x)+C.sy,a=(null!=M?M*l:b.y)+b.dy,u=(null!=A?A*s:I.x)+C.ty,p=null!=D?D*l:I.y,f=r,g=a*(1-_)+p*_,y=u,m=a*_+p*(1-_)):(r=(null!=w?w*s:b.x)+b.dx,a=(null!=M?M*l:b.y)+C.sy,u=null!=A?A*s:I.x,p=(null!=D?D*l:I.y)+C.ty,f=r*(1-_)+u*_,g=a,y=r*_+u*(1-_),m=p),n.setShape({x1:r,y1:a,x2:u,y2:p,cpx1:f,cpy1:g,cpx2:y,cpy2:m}),n.useStyle(x.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color"),n.style.decal=t.node1.getVisual("style").decal;break;case"target":n.style.fill=t.node2.getVisual("color"),n.style.decal=t.node2.getVisual("style").decal;break;case"gradient":var L=t.node1.getVisual("color"),P=t.node2.getVisual("color");(0,d.isString)(L)&&(0,d.isString)(P)&&(n.style.fill=new _l.Z(0,0,+("horizontal"===h),+("vertical"===h),[{color:L,offset:0},{color:P,offset:1}]))}Tn(n,An(v,"edgeLabel"),{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:""+v.get("value")}),n.setTextConfig({position:"inside"});var k=v.getModel("emphasis");rn(n,v,"lineStyle",(function(e){return e.getItemStyle()})),o.add(n),c.setItemGraphicEl(t.dataIndex,n);var O=k.get("focus");Qt(n,"adjacency"===O?t.getAdjacentDataIndices():O,k.get("blurScope"),k.get("disabled")),Xe(n).dataType="edge"})),r.eachNode((function(t){var n=t.getLayout(),i=t.getModel(),r=i.get("localX"),a=i.get("localY"),c=i.getModel("emphasis"),h=new gl.Z({shape:{x:null!=r?r*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle(),z2:10});Tn(h,An(i),{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id}),h.disableLabelAnimation=!0,h.setStyle("fill",t.getVisual("color")),h.setStyle("decal",t.getVisual("style").decal),rn(h,i),o.add(h),u.setItemGraphicEl(t.dataIndex,h),Xe(h).dataType="node";var d=c.get("focus");Qt(h,"adjacency"===d?t.getAdjacentDataIndices():d,c.get("blurScope"),c.get("disabled"))})),u.eachItemGraphicEl((function(t,r){var o=u.getItemModel(r);o.get("draggable")&&(t.drift=function(t,o){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=o,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(r),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")})),!this._data&&e.isAnimationEnabled()&&o.setClipPath(ND(o.getBoundingRect(),e,(function(){o.removeClipPath()}))),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(du);function ND(e,t,n){var i=new gl.Z({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return yn(i,{shape:{width:e.width+20}},t,n),i}var RD=OD,ED=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links,i=e.data||e.nodes,r=e.levels;this.levelModels=[];for(var o=this.levelModels,a=0;a=0&&(o[r[a].depth]=new $n(r[a],this,t));if(i&&n){var s=eT(i,n,this,!0,l);return s.data}function l(e,t){e.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,i=n.getData().getItemLayout(t);if(i){var r=i.depth,o=n.levelModels[r];o&&(e.parentModel=o)}return e})),t.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,i=n.getGraph().getEdgeByIndex(t),r=i.node1.getLayout();if(r){var o=r.depth,a=n.levelModels[o];a&&(e.parentModel=a)}return e}))}},t.prototype.setNodePosition=function(e,t){var n=this.option.data||this.option.nodes,i=n[e];i.localX=t[0],i.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function i(e){return isNaN(e)||null==e}if("edge"===n){var r=this.getDataParams(e,n),o=r.data,a=r.value,s=o.source+" -- "+o.target;return ws("nameValue",{name:s,value:a,noValue:i(a)})}var l=this.getGraph().getNodeByIndex(e),u=l.getLayout().value,c=this.getDataParams(e,n).data.name;return ws("nameValue",{name:null!=c?c+"":null,value:u,noValue:i(u)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var i=e.prototype.getDataParams.call(this,t,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(t),o=r.getLayout().value;i.value=o}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(Qs),VD=ED;function zD(e,t){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),r=BD(e,t);e.layoutInfo=r;var o=r.width,a=r.height,s=e.getGraph(),l=s.nodes,u=s.edges;GD(l);var c=d.filter(l,(function(e){return 0===e.getLayout().value})),h=0!==c.length?0:e.get("layoutIterations"),p=e.get("orient"),f=e.get("nodeAlign");ZD(l,u,n,i,o,a,h,p,f)}))}function BD(e,t){return gr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ZD(e,t,n,i,r,o,a,s,l){FD(e,t,n,r,o,s,l),XD(e,t,o,r,i,a,s),aC(e,s)}function GD(e){d.each(e,(function(e){var t=rC(e.outEdges,iC),n=rC(e.inEdges,iC),i=e.getValue()||0,r=Math.max(t,n,i);e.setLayout({value:r},!0)}))}function FD(e,t,n,i,r,o,a){for(var s=[],l=[],u=[],c=[],h=0,d=0;d=0;m&&y.depth>p&&(p=y.depth),g.setLayout({depth:m?y.depth:h},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var v=0;vh-1?p:h-1;a&&"left"!==a&&WD(e,a,o,w);var M="vertical"===o?(r-n)/w:(i-n)/w;YD(e,M,o)}function HD(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function WD(e,t,n,i){if("right"===t){var r=[],o=e,a=0;while(o.length){for(var s=0;s0;o--)l*=.99,JD(s,l,a),KD(s,r,n,i,a),oC(s,l,a),KD(s,r,n,i,a)}function jD(e,t){var n=[],i="vertical"===t?"y":"x",r=Ie(e,(function(e){return e.getLayout()[i]}));return r.keys.sort((function(e,t){return e-t})),d.each(r.keys,(function(e){n.push(r.buckets.get(e))})),n}function qD(e,t,n,i,r,o){var a=1/0;d.each(e,(function(e){var t=e.length,s=0;d.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===o?(i-(t-1)*r)/s:(n-(t-1)*r)/s;l0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[h]+t;var p="vertical"===r?i:n;if(l=u-t-p,l>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=c-2;d>=0;--d)s=e[d],l=s.getLayout()[o]+s.getLayout()[h]+t-u,l>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function JD(e,t,n){d.each(e.slice().reverse(),(function(e){d.each(e,(function(e){if(e.outEdges.length){var i=rC(e.outEdges,$D,n)/rC(e.outEdges,iC);if(isNaN(i)){var r=e.outEdges.length;i=r?rC(e.outEdges,QD,n)/r:0}if("vertical"===n){var o=e.getLayout().x+(i-nC(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(i-nC(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function $D(e,t){return nC(e.node2,t)*e.getValue()}function QD(e,t){return nC(e.node2,t)}function eC(e,t){return nC(e.node1,t)*e.getValue()}function tC(e,t){return nC(e.node1,t)}function nC(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function iC(e){return e.getValue()}function rC(e,t,n){var i=0,r=e.length,o=-1;while(++oo&&(o=t)})),d.each(n,(function(t){var n=new lM({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:e.get("color")}),i=n.mapValueToVisual(t.getLayout().value),a=t.getModel().get(["itemStyle","color"]);null!=a?(t.setVisual("color",a),t.setVisual("style",{fill:a})):(t.setVisual("color",i),t.setVisual("style",{fill:i}))}))}i.length&&d.each(i,(function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)}))}))}function lC(e){e.registerChartView(RD),e.registerSeriesModel(VD),e.registerLayout(zD),e.registerVisual(sC),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))}var uC=function(){function e(){}return e.prototype.getInitialData=function(e,t){var n,i,r=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(e.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(e.layout="vertical",n=o.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],p=[r,o],f=p[u].get("type"),g=p[1-u].get("type"),y=e.data;if(y&&i){var m=[];d.each(y,(function(e,t){var n;d.isArray(e)?(n=e.slice(),e.unshift(t)):d.isArray(e.value)?(n=d.extend({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,x=[{name:c,type:Vd(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Vd(g),dimsDef:v.slice()}];return zv(this,{coordDimensions:x,dimensionsCount:v.length+1,encodeDefaulter:d.curry(Gr,x,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),cC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return(0,c.ZT)(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(Qs);(0,d.mixin)(cC,uC,!0);var hC=cC,dC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===e.get("layout")?1:0;i.diff(o).add((function(e){if(i.hasValue(e)){var t=i.getItemLayout(e),n=gC(t,i,e,a,!0);i.setItemGraphicEl(e,n),r.add(n)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?(bn(n),yC(s,n,i,e)):n=gC(s,i,e,a),r.add(n),i.setItemGraphicEl(e,n)}else r.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=i},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},t.type="boxplot",t}(du),pC=function(){function e(){}return e}(),fC=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new pC},t.prototype.buildPath=function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();iy){var b=[v,_];i.push(b)}}}return{boxData:n,outliers:i}}var IC={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Pr){var n="";0,Ea(n)}var i=MC(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function TC(e){e.registerSeriesModel(hC),e.registerChartView(vC),e.registerLayout(_C),e.registerTransform(IC)}var AC=["color","borderColor"],DC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){iu(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,i=this.group,r=t.getLayout("isSimpleBox"),o=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(o&&kC(s,a))return;var l=PC(a,n,!0);yn(l,{shape:{points:a.ends}},e,n),OC(l,t,n,r),i.add(l),t.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);o&&kC(s,c)?i.remove(u):(u?(gn(u,{shape:{points:c.ends}},e,a),bn(u)):u=PC(c,a),OC(u,t,a,r),i.add(u),t.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),VC(e,this.group);var t=e.get("clip",!0)?pm(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){var n,i=t.getData(),r=i.getLayout("isSimpleBox");while(null!=(n=e.next())){var o=i.getItemLayout(n),a=PC(o,n);OC(a,i,n,r),a.incremental=!0,this.group.add(a),this._progressiveEls.push(a)}},t.prototype._incrementalRenderLarge=function(e,t){VC(t,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}(du),CC=function(){function e(){}return e}(),LC=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return(0,c.ZT)(t,e),t.prototype.getDefaultShape=function(){return new CC},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Ke.ZP);function PC(e,t,n){var i=e.ends;return new LC({shape:{points:n?NC(i,e):i},z2:100})}function kC(e,t){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",e>0?"color":"color0"]);0===e&&(r=n.get(["itemStyle","borderColorDoji"]));var o=n.getModel("itemStyle").getItemStyle(AC);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var BC=DC,ZC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return(0,c.ZT)(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Qs);(0,d.mixin)(ZC,uC,!0);var GC=ZC;function FC(e){e&&d.isArray(e.series)&&d.each(e.series,(function(e){d.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))}var HC=["itemStyle","borderColor"],WC=["itemStyle","borderColor0"],UC=["itemStyle","borderColorDoji"],YC=["itemStyle","color"],XC=["itemStyle","color0"],jC={seriesType:"candlestick",plan:il(),performRawSeries:!0,reset:function(e,t){function n(e,t){return t.get(e>0?YC:XC)}function i(e,t){return t.get(0===e?UC:e>0?HC:WC)}if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(e,t){var r;while(null!=(r=e.next())){var o=t.getItemModel(r),a=t.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill;var l=t.ensureUniqueItemVisual(r,"style");(0,d.extend)(l,s)}}}}}},qC=jC,KC={seriesType:"candlestick",plan:il(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=$C(e,n),r=0,o=1,a=["x","y"],s=n.getDimensionIndex(n.mapDimension(a[r])),l=(0,d.map)(n.mapDimensionsAll(a[o]),n.getDimensionIndex,n),u=l[0],c=l[1],h=l[2],p=l[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(s<0||l.length<4))return{progress:e.pipelineContext.large?g:f};function f(e,n){var a,l=n.getStore();while(null!=(a=e.next())){var d=l.get(s,a),f=l.get(u,a),g=l.get(c,a),y=l.get(h,a),m=l.get(p,a),v=Math.min(f,g),x=Math.max(f,g),_=A(v,d),b=A(x,d),S=A(y,d),w=A(m,d),M=[];D(M,b,0),D(M,_,1),M.push(L(w),L(b),L(S),L(_));var I=n.getItemModel(a),T=!!I.get(["itemStyle","borderColorDoji"]);n.setItemLayout(a,{sign:JC(l,a,f,g,c,T),initBaseline:f>g?b[o]:_[o],ends:M,brushRect:C(y,m,d)})}function A(e,n){var i=[];return i[r]=n,i[o]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function D(e,t,n){var o=t.slice(),a=t.slice();o[r]=Gl(o[r]+i/2,1,!1),a[r]=Gl(a[r]-i/2,1,!0),n?e.push(o,a):e.push(a,o)}function C(e,t,n){var a=A(e,n),s=A(t,n);return a[r]-=i/2,s[r]-=i/2,{x:a[0],y:a[1],width:o?i:s[0]-a[0],height:o?s[1]-a[1]:i}}function L(e){return e[r]=Gl(e[r],1),e}}function g(n,i){var a,l,d=Jp(4*n.count),f=0,g=[],y=[],m=i.getStore(),v=!!e.get(["itemStyle","borderColorDoji"]);while(null!=(l=n.next())){var x=m.get(s,l),_=m.get(u,l),b=m.get(c,l),S=m.get(h,l),w=m.get(p,l);isNaN(x)||isNaN(S)||isNaN(w)?(d[f++]=NaN,f+=3):(d[f++]=JC(m,l,_,b,c,v),g[r]=x,g[o]=S,a=t.dataToPoint(g,null,y),d[f++]=a?a[0]:NaN,d[f++]=a?a[1]:NaN,g[o]=w,a=t.dataToPoint(g,null,y),d[f++]=a?a[1]:NaN)}i.setLayout("largePoints",d)}}};function JC(e,t,n,i,r,o){var a;return a=n>i?-1:n0?e.get(r,t-1)<=i?1:-1:1,a}function $C(e,t){var n,i=e.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),o=_((0,d.retrieve2)(e.get("barMaxWidth"),r),r),a=_((0,d.retrieve2)(e.get("barMinWidth"),1),r),s=e.get("barWidth");return null!=s?_(s,r):Math.max(Math.min(r/2,o),a)}var QC=KC;function eL(e){e.registerChartView(BC),e.registerSeriesModel(GC),e.registerPreprocessor(FC),e.registerVisual(qC),e.registerLayout(QC)}function tL(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}var nL=function(e){function t(t,n){var i=e.call(this)||this,r=new Yy(t,n),o=new el.Z;return i.add(r),i.add(o),i.updateData(t,n),i}return(0,c.ZT)(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=e.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=d.isFunction(u)?u(n):u,i.__t>0&&(c=-o*i.__t),this._animateSymbol(i,o,c,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,i,r){if(t>0){e.__t=0;var o=this,a=e.animate("",i).when(r?2*t:t,{__t:r?2:1}).delay(n).during((function(){o._updateSymbolPosition(e)}));i||a.done((function(){o.remove(e)})),a.start()}},t.prototype._getLineLength=function(e){return al.dist(e.__p1,e.__cp1)+al.dist(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,r=e.__t<1?e.__t:2-e.__t,o=[e.x,e.y],a=o.slice(),s=jg.Zm,l=jg.AZ;o[0]=s(t[0],i[0],n[0],r),o[1]=s(t[1],i[1],n[1],r);var u=e.__t<1?l(t[0],i[0],n[0],r):l(n[0],i[0],t[0],1-r),c=e.__t<1?l(t[1],i[1],n[1],r):l(n[1],i[1],t[1],1-r);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT=0;o--)if(i[o]<=t)break;o=Math.min(o,r-2)}else{for(o=a;ot)break;o=Math.min(o-1,r-2)}var l=(t-i[o])/(i[o+1]-i[o]),u=n[o],c=n[o+1];e.x=u[0]*(1-l)+l*c[0],e.y=u[1]*(1-l)+l*c[1];var h=e.__t<1?c[0]-u[0]:u[0]-c[0],d=e.__t<1?c[1]-u[1]:u[1]-c[1];e.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(cL),fL=pL,gL=n(683),yL=n(5891),mL=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),vL=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,c.ZT)(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new mL},t.prototype.buildPath=function(e,t){var n,i=t.segs,r=t.curveness;if(t.polyline)for(n=this._off;n0){e.moveTo(i[n++],i[n++]);for(var a=1;a0){var h=(s+u)/2-(l-c)*r,d=(l+c)/2-(u-s)*r;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],h=1;h0){var f=(u+d)/2-(c-p)*r,g=(c+p)/2-(d-u)*r;if(yL.m(u,c,f,g,d,p,o,e,t))return a}else if(gL.m(u,c,d,p,o,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();if(e=n[0],t=n[1],i.contain(e,t)){var r=this.hoverDataIdx=this.findDataIndex(e,t);return r>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.segs,i=1/0,r=1/0,o=-1/0,a=-1/0,s=0;s0&&(o.dataIndex=n+e.__startIndex)}))},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),_L=xL,bL={seriesType:"lines",plan:il(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,c=r.start;c0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=e.get("clip",!0)&&pm(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData(),r=this._updateLineDraw(i,e);r.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var i=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=SL.reset(e,t,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,i=this._showEffect(t),r=!!t.get("polyline"),o=t.pipelineContext,a=o.large;return n&&i===this._hasEffet&&r===this._isPolyline&&a===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=a?new _L:new EI(r?i?fL:dL:i?cL:LI),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr(),n="svg"===t.painter.getType();n||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(du),ML=wL,IL="undefined"===typeof Uint32Array?Array:Uint32Array,TL="undefined"===typeof Float64Array?Array:Float64Array;function AL(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=(0,d.map)(t,(function(e){var t=[e[0].coord,e[1].coord],n={coords:t};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),(0,d.mergeAll)([n,e[0],e[1]])})))}var DL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return(0,c.ZT)(t,e),t.prototype.init=function(t){t.data=t.data||[],AL(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(AL(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=(0,d.concatArray)(this._flatCoords,t.flatCoords),this._flatCoordsOffset=(0,d.concatArray)(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],r=0;r ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Qs),CL=DL;function LL(e){return e instanceof Array||(e=[e,e]),e}var PL={seriesType:"lines",reset:function(e){var t=LL(e.get("symbol")),n=LL(e.get("symbolSize")),i=e.getData();function r(e,t){var n=e.getItemModel(t),i=LL(n.getShallow("symbol",!0)),r=LL(n.getShallow("symbolSize",!0));i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),r[0]&&e.setItemVisual(t,"fromSymbolSize",r[0]),r[1]&&e.setItemVisual(t,"toSymbolSize",r[1])}return i.setVisual("fromSymbol",t&&t[0]),i.setVisual("toSymbol",t&&t[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?r:null}}},kL=PL;function OL(e){e.registerChartView(ML),e.registerSeriesModel(CL),e.registerLayout(SL),e.registerVisual(kL)}var NL=256,RL=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Ac.qW.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var p=0;p0){var A=o(v)?s:l;v>0&&(v=v*I+w),_[b++]=A[T],_[b++]=A[T+1],_[b++]=A[T+2],_[b++]=A[T+3]*v*256}else b+=4}return h.putImageData(x,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Ac.qW.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},e}(),EL=RL;function VL(e,t,n){var i=e[1]-e[0];t=d.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}));var r=t.length,o=0;return function(e){var i;for(i=o;i=0;i--){a=t[i].interval;if(a[0]<=e&&e<=a[1]){o=i;break}}return i>=0&&i=t[0]&&e<=t[1]}}function BL(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var ZL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):BL(r)&&this._renderOnGeo(r,e,i,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,i){var r=t.coordinateSystem;r&&(BL(r)?this.render(t,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){iu(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,i,r){var o,a,s,l,u=e.coordinateSystem,c=fm(u,"cartesian2d");if(c){var h=u.getAxis("x"),d=u.getAxis("y");0,o=h.getBandWidth()+.5,a=d.getBandWidth()+.5,s=h.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),y=e.getModel(["blur","itemStyle"]).getItemStyle(),m=e.getModel(["select","itemStyle"]).getItemStyle(),v=e.get(["itemStyle","borderRadius"]),x=An(e),_=e.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Cl[1])continue;var L=u.dataToPoint([D,C]);T=new gl.Z({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:A})}else{if(isNaN(f.get(M[1],I)))continue;T=new gl.Z({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:A})}if(f.hasItemOption){var P=f.getItemModel(I),k=P.getModel("emphasis");g=k.getModel("itemStyle").getItemStyle(),y=P.getModel(["blur","itemStyle"]).getItemStyle(),m=P.getModel(["select","itemStyle"]).getItemStyle(),v=P.get(["itemStyle","borderRadius"]),b=k.get("focus"),S=k.get("blurScope"),w=k.get("disabled"),x=An(P)}T.shape.r=v;var O=e.getRawValue(I),N="-";O&&null!=O[2]&&(N=O[2]+""),Tn(T,x,{labelFetcher:e,labelDataIndex:I,defaultOpacity:A.opacity,defaultText:N}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=y,T.ensureState("select").style=m,Qt(T,b,S,w),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,t,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new EL;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),p=Math.min(l.height+l.y,i.getHeight()),f=d-c,g=p-h,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(y,(function(t,n,i){var r=e.dataToPoint([t,n]);return r[0]-=c,r[1]-=h,r.push(i),r})),v=n.getExtent(),x="visualMap.continuous"===n.type?zL(v,n.option.range):VL(v,n.getPieceList(),n.option.selected);s.update(m,f,g,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new ll.ZP({style:{width:f,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(du),GL=ZL,FL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){return Dp(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=bo.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(Qs),HL=FL;function WL(e){e.registerChartView(GL),e.registerSeriesModel(HL)}var UL=["itemStyle","borderWidth"],YL=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],XL=new ul.Z,jL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=this.group,r=e.getData(),o=this._data,a=e.coordinateSystem,s=a.getBaseAxis(),l=s.isHorizontal(),u=a.master.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:YL[+l],categoryDim:YL[1-+l]};return r.diff(o).add((function(e){if(r.hasValue(e)){var t=aP(r,e),n=qL(r,e,t,c),o=uP(r,c,n);r.setItemGraphicEl(e,o),i.add(o),gP(o,c,n)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var a=aP(r,e),s=qL(r,e,a,c),l=dP(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(e,null),n=null),n?cP(n,c,s):n=uP(r,c,s,!0),r.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),gP(n,c,s)}else i.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&hP(o,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=r,this.group},t.prototype.remove=function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){hP(i,Xe(t).dataIndex,e,t)})):n.removeAll()},t.type="pictorialBar",t}(du);function qL(e,t,n,i){var r=e.getItemLayout(t),o=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=n.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=n.get("symbolPatternSize")||2,h=n.isAnimationEnabled(),d={dataIndex:t,layout:r,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?n:null,hoverScale:h&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};KL(n,o,r,i,d),$L(e,t,r,o,a,d.boundingLength,d.pxSign,c,i,d),QL(n,d.symbolScale,u,i,d);var p=d.symbolSize,f=Ic(n.get("symbolOffset"),p);return eP(n,p,r,o,a,f,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function KL(e,t,n,i,r){var o,a=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(d.isArray(s)){var h=[JL(l,s[0])-u,JL(l,s[1])-u];h[1]0?1:-1}function JL(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function $L(e,t,n,i,r,o,a,s,l,u){var c,h=l.valueDim,p=l.categoryDim,f=Math.abs(n[p.wh]),g=e.getItemVisual(t,"symbolSize");c=d.isArray(g)?g.slice():null==g?["100%","100%"]:[g,g],c[p.index]=_(c[p.index],f),c[h.index]=_(c[h.index],i?f:Math.abs(o)),u.symbolSize=c;var y=u.symbolScale=[c[0]/s,c[1]/s];y[h.index]*=(l.isHorizontal?-1:1)*a}function QL(e,t,n,i,r){var o=e.get(UL)||0;o&&(XL.attr({scaleX:t[0],scaleY:t[1],rotation:n}),XL.updateTransform(),o/=XL.getLineScale(),o*=t[i.valueDim.index]),r.valueLineWidth=o||0}function eP(e,t,n,i,r,o,a,s,l,u,c,h){var p=c.categoryDim,f=c.valueDim,g=h.pxSign,y=Math.max(t[f.index]+s,0),m=y;if(i){var v=Math.abs(l),x=d.retrieve(e.get("symbolMargin"),"15%")+"",b=!1;x.lastIndexOf("!")===x.length-1&&(b=!0,x=x.slice(0,x.length-1));var S=_(x,t[f.index]),w=Math.max(y+2*S,0),M=b?0:2*S,I=Z(i),T=I?i:yP((v+M)/w),A=v-T*y;S=A/2/(b?T:Math.max(T-1,1)),w=y+2*S,M=b?0:2*S,I||"fixed"===i||(T=u?yP((Math.abs(u)+M)/w):0),m=T*w-M,h.repeatTimes=T,h.symbolMargin=S}var D=g*(m/2),C=h.pathPosition=[];C[p.index]=n[p.wh]/2,C[f.index]="start"===a?D:"end"===a?l-D:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var L=h.bundlePosition=[];L[p.index]=n[p.xy],L[f.index]=n[f.xy];var P=h.barRectShape=d.extend({},n);P[f.wh]=g*Math.max(Math.abs(n[f.wh]),Math.abs(C[f.index]+D)),P[p.wh]=n[p.wh];var k=h.clipShape={};k[p.xy]=-n[p.xy],k[p.wh]=c.ecSize[p.wh],k[f.xy]=0,k[f.wh]=n[f.wh]}function tP(e){var t=e.symbolPatternSize,n=wc(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function nP(e,t,n,i){var r=e.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,h=o[t.valueDim.index]+a+2*n.symbolMargin;for(pP(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c0:i<0)&&(r=u-1-e),t[l.index]=h*(r-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function iP(e,t,n,i){var r=e.__pictorialBundle,o=e.__pictorialMainPath;o?fP(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=e.__pictorialMainPath=tP(n),r.add(o),fP(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function rP(e,t,n){var i=d.extend({},t.barRectShape),r=e.__pictorialBarRect;r?fP(r,null,{shape:i},t,n):(r=e.__pictorialBarRect=new gl.Z({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),r.disableMorphing=!0,e.add(r))}function oP(e,t,n,r){if(n.symbolClip){var o=e.__pictorialClipPath,a=d.extend({},n.clipShape),s=t.valueDim,l=n.animationModel,u=n.dataIndex;if(o)gn(o,{shape:a},l,u);else{a[s.wh]=0,o=new gl.Z({shape:a}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var c={};c[s.wh]=n.clipShape[s.wh],i[r?"updateProps":"initProps"](o,{shape:c},l,u)}}}function aP(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=sP,n.isAnimationEnabled=lP,n}function sP(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function lP(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function uP(e,t,n,i){var r=new el.Z,o=new el.Z;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?nP(r,t,n):iP(r,t,n),rP(r,n,i),oP(r,t,n,i),r.__pictorialShapeStr=dP(e,n),r.__pictorialSymbolMeta=n,r}function cP(e,t,n){var i=n.animationModel,r=n.dataIndex,o=e.__pictorialBundle;gn(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?nP(e,t,n,!0):iP(e,t,n,!0),rP(e,n,!0),oP(e,t,n,!0)}function hP(e,t,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];pP(i,(function(e){o.push(e)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),d.each(o,(function(e){vn(e,{scaleX:0,scaleY:0},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function dP(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function pP(e,t,n){d.each(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function fP(e,t,n,r,o,a){t&&e.attr(t),r.symbolClip&&!o?n&&e.attr(n):n&&i[o?"updateProps":"initProps"](e,n,r.animationModel,r.dataIndex,a)}function gP(e,t,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),p=o.get("scale");pP(e,(function(e){if(e instanceof ll.ZP){var t=e.style;e.useStyle(d.extend({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var i=e.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*e.scaleX,i.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,u&&(e.cursor=u),e.z2=n.z2}));var f=t.valueDim.posDesc[+(n.boundingLength>0)],g=e.__pictorialBarRect;Tn(g,An(r),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Fy(t.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),Qt(e,c,h,o.get("disabled"))}function yP(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var mP=jL,vP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ii(Zm.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%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Zm),xP=vP;function _P(e){e.registerChartView(mP),e.registerSeriesModel(xP),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,(0,d.curry)(lf,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,uf("pictorialBar"))}var bP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this,o=this.group,a=e.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}o.x=0,o.y=l.y+u[0];var h=new Od(this._layersSeries||[],a,c,c),p=[];function f(t,n,s){var l=r._layers;if("remove"!==t){for(var u,c,h=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=h)}return{y0:r,max:o}}function LP(e){e.registerChartView(wP),e.registerSeriesModel(TP),e.registerLayout(AP),e.registerProcessor(Av("themeRiver"))}var PP=2,kP=4,OP=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.z2=PP,o.textConfig={inside:!0},Xe(o).seriesIndex=n.seriesIndex;var a=new Ue.ZP({z2:kP,silent:t.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,t,n,i,r),o}return(0,c.ZT)(t,e),t.prototype.updateData=function(e,t,n,i,r){this.node=t,t.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var o=this;Xe(o).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=d.extend({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var h=t.getVisual("decal");h&&(c.decal=Pc(h,r));var p=Nv(a.getModel("itemStyle"),u,!0);d.extend(u,p),d.each(rt,(function(e){var t=o.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var i=Nv(n,u);i&&(t.shape=i)})),e?(o.setShape(u),o.shape.r=l.r0,gn(o,{shape:{r:l.r}},n,t.dataIndex)):(gn(o,{shape:u},n),bn(o)),o.useStyle(c),this._updateLabel(n);var f=a.getShallow("cursor");f&&o.attr("cursor",f),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=s.get("focus"),y="ancestor"===g?t.getAncestorsIndices():"descendant"===g?t.getDescendantIndices():g;Qt(this,y,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),i=n.getModel("label"),r=this.node.getLayout(),o=r.endAngle-r.startAngle,a=(r.startAngle+r.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),h=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,f=i.get("show")&&!(null!=p&&Math.abs(o)Math.PI/2?"right":"left"):M&&"center"!==M?"left"===M?(x=r.r0+w,a>Math.PI/2&&(M="right")):"right"===M&&(x=r.r-w,a>Math.PI/2&&(M="left")):(x=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,M="center"),y.style.align=M,y.style.verticalAlign=g(p,"verticalAlign")||"middle",y.x=x*s+r.cx,y.y=x*l+r.cy;var I=g(p,"rotate"),T=0;"radial"===I?(T=-a,T<-Math.PI/2&&(T+=Math.PI)):"tangential"===I?(T=Math.PI/2-a,T>Math.PI/2?T-=Math.PI:T<-Math.PI/2&&(T+=Math.PI)):d.isNumber(I)&&(T=I*Math.PI/180),y.rotation=T})),c.dirtyStyle()},t}(hl.C),NP=OP,RP="sunburstRootToNode",EP="sunburstHighlight",VP="sunburstUnhighlight";function zP(e){e.registerAction({type:RP,update:"updateView"},(function(e,t){function n(t,n){var i=ew(e,[RP],t);if(i){var r=t.getViewRoot();r&&(e.direction=nw(r,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}t.eachComponent({mainType:"series",subType:"sunburst",query:e},n)})),e.registerAction({type:EP,update:"none"},(function(e,t,n){function i(t){var n=ew(e,[EP],t);n&&(e.dataIndex=n.node.dataIndex)}e=(0,d.extend)({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i),n.dispatchAction((0,d.extend)(e,{type:"highlight"}))})),e.registerAction({type:VP,update:"updateView"},(function(e,t,n){e=(0,d.extend)({},e),n.dispatchAction((0,d.extend)(e,{type:"downplay"}))}))}var BP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n,i){var r=this;this.seriesModel=e,this.api=n,this.ecModel=t;var o=e.getData(),a=o.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];function p(e,t){function n(e){return e.getId()}function i(n,i){var r=null==n?null:e[n],o=null==i?null:t[i];f(r,o)}0===e.length&&0===t.length||new Od(t,e,n,n).add(i).update(i).remove(d.curry(i,null)).execute()}function f(i,r){if(u||!i||i.getValue()||(i=null),i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,e,t,n),o.setItemGraphicEl(i.dataIndex,r.piece)):g(r);else if(i){var s=new NP(i,e,t,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}function g(e){e&&e.piece&&(l.remove(e.piece),e.piece=null)}function y(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,e,t,n):(r.virtualPiece=new NP(i,e,t,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(e){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}p(c,h),y(a,s),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode((function(i){if(!n&&i.piece&&i.piece===t.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)e._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a){var s=o.get("target",!0)||"_blank";lr(a,s)}}n=!0}}))}))},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:RP,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData(),i=n.getItemLayout(0);if(i){var r=e[0]-i.cx,o=e[1]-i.cy,a=Math.sqrt(r*r+o*o);return a<=i.r&&a>=i.r0}},t.type="sunburst",t}(du),ZP=BP,GP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return(0,c.ZT)(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};FP(n);var i=this._levelModels=d.map(e.levels||[],(function(e){return new $n(e,this,t)}),this),r=QS.createTree(n,this,o);function o(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t),o=i[n.depth];return o&&(e.parentModel=o),e}))}return r.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=iw(i,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){gw(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(Qs);function FP(e){var t=0;d.each(e.children,(function(e){FP(e);var n=e.value;d.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;d.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),d.isArray(e.value)?e.value[0]=n:e.value=n}var HP=GP,WP=Math.PI/180;function UP(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");d.isArray(i)||(i=[0,i]),d.isArray(t)||(t=[t,t]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=_(t[0],r),l=_(t[1],o),u=_(i[0],a/2),c=_(i[1],a/2),h=-e.get("startAngle")*WP,p=e.get("minAngle")*WP,f=e.getData().tree.root,g=e.getViewRoot(),y=g.depth,m=e.get("sort");null!=m&&YP(g,m);var v=0;d.each(g.children,(function(e){!isNaN(e.getValue())&&v++}));var x=g.getValue(),b=Math.PI/(x||v)*2,S=g.depth>0,w=g.height-(S?-1:1),M=(c-u)/(w||1),I=e.get("clockwise"),T=e.get("stillShowZeroSum"),A=I?1:-1,D=function(t,n){if(t){var i=n;if(t!==f){var r=t.getValue(),o=0===x&&T?b:r*b;o1)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",t);return e.depth>1&&(0,d.isString)(o)&&(o=(0,qe.lift)(o,(e.depth-1)/(i-1)*.5)),o}e.eachSeriesByType("sunburst",(function(e){var t=e.getData(),i=t.tree;i.eachNode((function(r){var o=r.getModel(),a=o.getModel("itemStyle").getItemStyle();a.fill||(a.fill=n(r,e,i.root.height));var s=t.ensureUniqueItemVisual(r.dataIndex,"style");(0,d.extend)(s,a)}))}))}function qP(e){e.registerChartView(ZP),e.registerSeriesModel(HP),e.registerLayout((0,d.curry)(UP,"sunburst")),e.registerProcessor((0,d.curry)(Av,"sunburst")),e.registerVisual(jP),zP(e)}var KP={color:"fill",borderColor:"stroke"},JP={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$P=ge(),QP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return Dp(null,this)},t.prototype.getDataParams=function(t,n,i){var r=e.prototype.getDataParams.call(this,t,n);return i&&(r.info=$P(i).info),r},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(Qs),ek=QP;function tk(e,t){return t=t||[0,0],d.map(["x","y"],(function(n,i){var r=this.getAxis(n),o=t[i],a=e[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function nk(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:d.bind(tk,e)}}}function ik(e,t){return t=t||[0,0],d.map([0,1],(function(n){var i=t[n],r=e[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function rk(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:d.bind(ik,e)}}}function ok(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,r=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function ak(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:(0,d.bind)(ok,e)}}}function sk(e,t){return t=t||[0,0],d.map(["Radius","Angle"],(function(n,i){var r="get"+n+"Axis",o=this[r](),a=t[i],s=e[i]/2,l="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-s)-o.dataToCoord(a+s));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}function lk(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=t.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=e.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:d.bind(sk,e)}}}function uk(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}function ck(e,t,n,i){return e&&(e.legacy||!1!==e.legacy&&!n&&!i&&"tspan"!==t&&("text"===t||(0,d.hasOwn)(e,"text")))}function hk(e,t,n){var i,r,o,a=e;if("text"===t)o=a;else{o={},(0,d.hasOwn)(a,"text")&&(o.text=a.text),(0,d.hasOwn)(a,"rich")&&(o.rich=a.rich),(0,d.hasOwn)(a,"textFill")&&(o.fill=a.textFill),(0,d.hasOwn)(a,"textStroke")&&(o.stroke=a.textStroke),(0,d.hasOwn)(a,"fontFamily")&&(o.fontFamily=a.fontFamily),(0,d.hasOwn)(a,"fontSize")&&(o.fontSize=a.fontSize),(0,d.hasOwn)(a,"fontStyle")&&(o.fontStyle=a.fontStyle),(0,d.hasOwn)(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=(0,d.hasOwn)(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),(0,d.hasOwn)(a,"textPosition")&&(i.position=a.textPosition),(0,d.hasOwn)(a,"textOffset")&&(i.offset=a.textOffset),(0,d.hasOwn)(a,"textRotation")&&(i.rotation=a.textRotation),(0,d.hasOwn)(a,"textDistance")&&(i.distance=a.textDistance)}return dk(o,e),(0,d.each)(o.rich,(function(e){dk(e,e)})),{textConfig:i,textContent:r}}function dk(e,t){t&&(t.font=t.textFont||t.font,(0,d.hasOwn)(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),(0,d.hasOwn)(t,"textAlign")&&(e.align=t.textAlign),(0,d.hasOwn)(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),(0,d.hasOwn)(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),(0,d.hasOwn)(t,"textWidth")&&(e.width=t.textWidth),(0,d.hasOwn)(t,"textHeight")&&(e.height=t.textHeight),(0,d.hasOwn)(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),(0,d.hasOwn)(t,"textPadding")&&(e.padding=t.textPadding),(0,d.hasOwn)(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),(0,d.hasOwn)(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),(0,d.hasOwn)(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),(0,d.hasOwn)(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),(0,d.hasOwn)(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),(0,d.hasOwn)(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),(0,d.hasOwn)(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function pk(e,t,n){var i=e;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=e.fill||"#000";fk(i,t);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=e.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=t.text,i.rich=t.rich,(0,d.each)(t.rich,(function(e){fk(e,e)})),i}function fk(e,t){t&&((0,d.hasOwn)(t,"fill")&&(e.textFill=t.fill),(0,d.hasOwn)(t,"stroke")&&(e.textStroke=t.fill),(0,d.hasOwn)(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),(0,d.hasOwn)(t,"font")&&(e.font=t.font),(0,d.hasOwn)(t,"fontStyle")&&(e.fontStyle=t.fontStyle),(0,d.hasOwn)(t,"fontWeight")&&(e.fontWeight=t.fontWeight),(0,d.hasOwn)(t,"fontSize")&&(e.fontSize=t.fontSize),(0,d.hasOwn)(t,"fontFamily")&&(e.fontFamily=t.fontFamily),(0,d.hasOwn)(t,"align")&&(e.textAlign=t.align),(0,d.hasOwn)(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),(0,d.hasOwn)(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),(0,d.hasOwn)(t,"width")&&(e.textWidth=t.width),(0,d.hasOwn)(t,"height")&&(e.textHeight=t.height),(0,d.hasOwn)(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),(0,d.hasOwn)(t,"padding")&&(e.textPadding=t.padding),(0,d.hasOwn)(t,"borderColor")&&(e.textBorderColor=t.borderColor),(0,d.hasOwn)(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),(0,d.hasOwn)(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),(0,d.hasOwn)(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),(0,d.hasOwn)(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),(0,d.hasOwn)(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),(0,d.hasOwn)(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),(0,d.hasOwn)(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),(0,d.hasOwn)(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),(0,d.hasOwn)(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),(0,d.hasOwn)(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var gk=n(8344),yk={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},mk=(0,d.keys)(yk),vk=((0,d.reduce)(sl.dN,(function(e,t){return e[t]=1,e}),{}),sl.dN.join(", "),["","style","shape","extra"]),xk=ge();function _k(e,t,n,i,r){var o=e+"Animation",a=pn(e,i,r)||{},s=xk(t).userDuring;return a.duration>0&&(a.during=s?(0,d.bind)(Lk,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),(0,d.extend)(a,n[o]),a}function bk(e,t,n,i){i=i||{};var r=i.dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=xk(e),u=t.style;l.userDuring=t.during;var c={},h={};if(Nk(e,t,h),kk("shape",t,h),kk("extra",t,h),!o&&s&&(Ok(e,t,c),Pk("shape",e,t,c),Pk("extra",e,t,c),Rk(e,t,u,c)),h.style=u,Ik(e,h,a),Ak(e,t),s)if(o){var p={};(0,d.each)(vk,(function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(p[e]=p[e]||{}),(0,d.extend)(e?p[e]:p,n.enterFrom))}));var f=_k("enter",e,t,n,r);f.duration>0&&e.animateFrom(p,f)}else Tk(e,t,r||0,n,c);Sk(e,t),u?e.dirty():e.markRedraw()}function Sk(e,t){for(var n=xk(e).leaveToProps,i=0;i0&&e.animateFrom(r,o)}}function Ak(e,t){(0,d.hasOwn)(t,"silent")&&(e.silent=t.silent),(0,d.hasOwn)(t,"ignore")&&(e.ignore=t.ignore),e instanceof Sb.ZP&&(0,d.hasOwn)(t,"invisible")&&(e.invisible=t.invisible),e instanceof Ke.ZP&&(0,d.hasOwn)(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var Dk={},Ck={setTransform:function(e,t){return Dk.el[e]=t,this},getTransform:function(e){return Dk.el[e]},setShape:function(e,t){var n=Dk.el,i=n.shape||(n.shape={});return i[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=Dk.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=Dk.el,i=n.style;return i&&(i[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=Dk.el.style;if(t)return t[e]},setExtra:function(e,t){var n=Dk.el.extra||(Dk.el.extra={});return n[e]=t,this},getExtra:function(e){var t=Dk.el.extra;if(t)return t[e]}};function Lk(){var e=this,t=e.el;if(t){var n=xk(t).userDuring,i=e.userDuring;n===i?(Dk.el=t,i(Ck)):e.el=e.userDuring=null}}function Pk(e,t,n,i){var r=n[e];if(r){var o,a=t[e];if(a){var s=n.transition,l=r.transition;if(l)if(!o&&(o=i[e]={}),Mk(l))(0,d.extend)(o,a);else for(var u=X(l),c=0;c=0){!o&&(o=i[e]={});var f=(0,d.keys)(a);for(c=0;c=0)){var p=e.getAnimationStyleProps(),f=p?p.style:null;if(f){!r&&(r=i.style={});var g=(0,d.keys)(n);for(u=0;u=0?t.getStore().get(r,n):void 0}var o=t.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o}function w(n,i){null==i&&(i=s);var r=t.getItemVisual(i,"style"),o=r&&r.fill,a=r&&r.opacity,l=x(i,Fk).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var u={inheritColor:(0,d.isString)(o)?o:"#000"},c=_(i,Fk),h=Dn(c,null,u,!1,!0);h.text=c.getShallow("show")?(0,d.retrieve2)(e.getFormattedLabel(i,Fk),Fy(t,i)):null;var p=Cn(c,u,!1);return T(n,l),l=pk(l,h,p),n&&I(l,n),l.legacy=!0,l}function M(n,i){null==i&&(i=s);var r=x(i,Gk).getItemStyle(),o=_(i,Gk),a=Dn(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,d.retrieve3)(e.getFormattedLabel(i,Gk),e.getFormattedLabel(i,Fk),Fy(t,i)):null;var l=Cn(o,null,!0);return T(n,r),r=pk(r,a,l),n&&I(r,n),r.legacy=!0,r}function I(e,t){for(var n in t)(0,d.hasOwn)(t,n)&&(e[n]=t[n])}function T(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function A(e,n){if(null==n&&(n=s),(0,d.hasOwn)(KP,e)){var i=t.getItemVisual(n,"style");return i?i[KP[e]]:null}if((0,d.hasOwn)(JP,e))return t.getItemVisual(n,e)}function D(e){if("cartesian2d"===o.type){var t=o.getBaseAxis();return tf((0,d.defaults)({axis:t},e))}}function C(){return n.getCurrentSeriesIndices()}function L(e){return En(e,n)}}function uO(e){var t={};return(0,d.each)(e.dimensions,(function(n){var i=e.getDimensionInfo(n);if(!i.isExtraCoord){var r=i.coordDim,o=t[r]=t[r]||[];o[i.coordDimIndex]=e.getDimensionIndex(n)}})),t}function cO(e,t,n,i,r,o,a){if(i){var s=hO(e,t,n,i,r,o);return s&&a.setItemGraphicEl(n,s),s&&Qt(s,i.focus,i.blurScope,i.emphasisDisabled),s}o.remove(t)}function hO(e,t,n,i,r,o){var a=-1,s=t;t&&dO(t,i,r)&&(a=(0,d.indexOf)(o.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=iO(i),s&&eO(s,u)),!1===i.morph?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Kk.normal.cfg=Kk.normal.conOpt=Kk.emphasis.cfg=Kk.emphasis.conOpt=Kk.blur.cfg=Kk.blur.conOpt=Kk.select.cfg=Kk.select.conOpt=null,Kk.isLegacy=!1,fO(u,n,i,r,l,Kk),pO(u,n,i,r,l),rO(e,u,n,i,Kk,r,l),(0,d.hasOwn)(i,"info")&&($P(u).info=i.info);for(var c=0;c=0?o.replaceAt(u,a):o.add(u),u}function dO(e,t,n){var i=$P(e),r=t.type,o=t.shape,a=t.style;return n.isUniversalTransitionEnabled()||null!=r&&r!==i.customGraphicType||"path"===r&&IO(o)&&MO(o)!==i.customPathData||"image"===r&&(0,d.hasOwn)(a,"image")&&a.image!==i.customImagePath}function pO(e,t,n,i,r){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&dO(a,o,i)&&(a=null),a||(a=iO(o),e.setClipPath(a)),rO(null,a,t,o,null,i,r)}}function fO(e,t,n,i,r,o){if(!e.isGroup){gO(n,null,o),gO(n,Gk,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=iO(a),e.setTextContent(c)),rO(null,c,t,a,null,i,r);for(var h=a&&a.style,d=0;d=c;p--){var f=t.childAt(p);xO(t,f,r)}}}function xO(e,t,n){t&&wk(t,$P(e).option,n)}function _O(e){new Od(e.oldChildren,e.newChildren,bO,bO,e).add(SO).update(SO).remove(wO).execute()}function bO(e,t){var n=e&&e.name;return null!=n?n:qk+t}function SO(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null,r=null!=t?n.oldChildren[t]:null;hO(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function wO(e){var t=this.context,n=t.oldChildren[e];n&&wk(n,$P(n).option,t.seriesModel)}function MO(e){return e&&(e.pathData||e.d)}function IO(e){return e&&((0,d.hasOwn)(e,"pathData")||(0,d.hasOwn)(e,"d"))}function TO(e){e.registerChartView(nO),e.registerSeriesModel(ek)}var AO=ge(),DO=d.clone,CO=d.bind,LO=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,i){var r=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var h=d.curry(PO,t,c);this.updatePointerEl(a,l,h),this.updateLabelEl(a,l,h,t)}else a=this._group=new el.Z,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);RO(a,t,!0),this._renderHandle(r)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,r="category"===i.type,o=t.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=$x(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,r){},e.prototype.createPointerEl=function(e,t,n,r){var o=t.pointer;if(o){var a=AO(e).pointerEl=new i[o.type](DO(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var r=AO(e).labelEl=new Ue.ZP(DO(t.label));e.add(r),OO(r,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=AO(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var r=AO(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{x:t.label.x,y:t.label.y}),OO(r,i))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(t=!0,r=this._handle=Kl(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){B_.sT(e.event)},onmousedown:CO(this._onHandleDragMove,this,0,0),drift:CO(this._onHandleDragMove,this),ondragend:CO(this._onHandleDragEnd,this)}),i.add(r)),RO(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");d.isArray(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,mu(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){PO(this._axisPointerModel,!t&&this._moveAnimation,this._handle,NO(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(NO(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(NO(i)),AO(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),vu(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function PO(e,t,n,i){kO(AO(n).lastProp,i)||(AO(n).lastProp=i,t?gn(n,i,e):(n.stopAnimation(),n.attr(i)))}function kO(e,t){if(d.isObject(e)&&d.isObject(t)){var n=!0;return d.each(t,(function(t,i){n=n&&kO(e[i],t)})),!!n}return e===t}function OO(e,t){e[t.get(["label","show"])?"show":"hide"]()}function NO(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function RO(e,t,n){var i=t.get("z"),r=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r),e.silent=n)}))}var EO=LO;function VO(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle(),t.fill=null):"shadow"===n&&(t=i.getAreaStyle(),t.stroke=null),t}function zO(e,t,n,i,r){var o=n.get("value"),a=ZO(o,t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),s=n.getModel("label"),l=$i(s.get("padding")||0),u=s.getFont(),c=pc.lP(a,u),h=r.position,d=c.width+l[1]+l[3],p=c.height+l[0]+l[2],f=r.align;"right"===f&&(h[0]-=d),"center"===f&&(h[0]-=d/2);var g=r.verticalAlign;"bottom"===g&&(h[1]-=p),"middle"===g&&(h[1]-=p/2),BO(h,d,p,i);var y=s.get("backgroundColor");y&&"auto"!==y||(y=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Dn(s,{text:a,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function BO(e,t,n,i){var r=i.getWidth(),o=i.getHeight();e[0]=Math.min(e[0]+t,r)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function ZO(e,t,n,i,r){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:r.precision}),a=r.formatter;if(a){var s={value:Xf(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};d.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)})),d.isString(a)?o=a.replace("{value}",o):d.isFunction(a)&&(o=a(s))}return o}function GO(e,t,n){var i=ol.create();return ol.rotate(i,i,n.rotation),ol.translate(i,i,n.position),Hl([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function FO(e,t,n,i,r,o){var a=Wx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),zO(t,i,r,o,{position:GO(i.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function HO(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function WO(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function UO(e,t,n,i,r,o){return{cx:e,cy:t,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var YO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=XO(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=VO(i),h=jO[s](o,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=bx(a.model,n);FO(t,e,d,n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=bx(t.axis.grid.model,t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=GO(t.axis,e,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=XO(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:h,tooltipOption:d[l]}},t}(EO);function XO(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var jO={line:function(e,t,n){var i=HO([t,n[0]],[t,n[1]],qO(e));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:WO([t-i/2,n[0]],[i,r],qO(e))}}};function qO(e){return"x"===e.dim?0:1}var KO=YO,JO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!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}(Ir),$O=JO,QO=ge(),eN=d.each;function tN(e,t,n){if(!p.Z.node){var i=t.getZr();QO(i).records||(QO(i).records={}),nN(i,t);var r=QO(i).records[e]||(QO(i).records[e]={});r.handler=n}}function nN(e,t){function n(n,i){e.on(n,(function(n){var r=aN(t);eN(QO(e).records,(function(e){e&&i(e,n,r.dispatchAction)})),iN(r.pendings,t)}))}QO(e).initialized||(QO(e).initialized=!0,n("click",d.curry(oN,"click")),n("mousemove",d.curry(oN,"mousemove")),n("globalout",rN))}function iN(e,t){var n,i=e.showTip.length,r=e.hideTip.length;i?n=e.showTip[i-1]:r&&(n=e.hideTip[r-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function rN(e,t,n){e.handler("leave",null,n)}function oN(e,t,n,i){t.handler(e,n,i)}function aN(e){var t={showTip:[],hideTip:[]},n=function(i){var r=t[i.type];r?r.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}function sN(e,t){if(!p.Z.node){var n=t.getZr(),i=(QO(n).records||{})[e];i&&(QO(n).records[e]=null)}}var lN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";tN("axisPointer",n,(function(e,t,n){"none"!==r&&("leave"===e||r.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){sN("axisPointer",t)},t.prototype.dispose=function(e,t){sN("axisPointer",t)},t.type="axisPointer",t}(nl),uN=lN;function cN(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=fe(o,e);if(null==a||a<0||d.isArray(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,p=u.dim,f="x"===h||"radius"===h?1:0,g=o.mapDimension(p),y=[];y[f]=o.get(g,a),y[1-f]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(y)||[]}else i=l.dataToPoint(o.getValues(d.map(l.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),i=[m.x+m.width/2,m.y+m.height/2]}return{point:i,el:s}}var hN=ge();function dN(e,t,n){var i=e.currTrigger,r=[e.x,e.y],o=e,a=e.dispatchAction||(0,d.bind)(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){SN(r)&&(r=cN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=SN(r),u=o.axesInfo,c=s.axesInfo,h="leave"===i||SN(r),p={},f={},g={list:[],map:{}},y={showPointer:(0,d.curry)(gN,f),showTooltip:(0,d.curry)(yN,g)};(0,d.each)(s.coordSysMap,(function(e,t){var n=l||e.containPoint(r);(0,d.each)(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,o=_N(u,e);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&pN(e,a,y,!1,p)}}))}));var m={};return(0,d.each)(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&(0,d.each)(n.axesInfo,(function(t,i){var r=f[i];if(t!==e&&r){var o=r.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,bN(t),bN(e)))),m[e.key]=o}}))})),(0,d.each)(m,(function(e,t){pN(c[t],e,y,!0,p)})),mN(f,c,p),vN(g,r,e,a),xN(c,a,n),p}}function pN(e,t,n,i,r){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=fN(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&(0,d.extend)(r,s[0]),!i&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function fN(e,t){var n=t.axis,i=n.dim,r=e,o=[],a=Number.MAX_VALUE,s=-1;return(0,d.each)(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimensionsAll(i);if(t.getAxisTooltipData){var p=t.getAxisTooltipData(h,e,n);c=p.dataIndices,u=p.nestestValue}else{if(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null),!c.length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=e-u,g=Math.abs(f);g<=a&&((g=0&&s<0)&&(a=g,s=f,r=u,o.length=0),(0,d.each)(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:r}}function gN(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function yN(e,t,n,i){var r=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=t_(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function mN(e,t,n){var i=n.axesInfo=[];(0,d.each)(t,(function(t,n){var r=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})}))}function vN(e,t,n,i){if(!SN(t)&&e.list.length){var r=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:e.list})}else i({type:"hideTip"})}function xN(e,t,n){var i=n.getZr(),r="axisPointerLastHighlights",o=hN(i)[r]||{},a=hN(i)[r]={};(0,d.each)(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&(0,d.each)(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];(0,d.each)(o,(function(e,t){!a[t]&&l.push(e)})),(0,d.each)(a,(function(e,t){!o[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function _N(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function bN(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function SN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function wN(e){r_.registerAxisPointerClass("CartesianAxisPointer",KO),e.registerComponentModel($O),e.registerComponentView(uN),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!(0,d.isArray)(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Ux(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},dN)}function MN(e){Cd(y_),Cd(wN)}var IN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o),l=s.getExtent(),u=o.dataToCoord(t),c=i.get("type");if(c&&"none"!==c){var h=VO(i),d=AN[c](o,a,u,l);d.style=h,e.graphicKey=d.type,e.pointer=d}var p=i.get(["label","margin"]),f=TN(t,n,i,a,p);zO(e,n,i,r,f)},t}(EO);function TN(e,t,n,i,r){var o=t.axis,a=o.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===o.dim){var d=ol.create();ol.rotate(d,d,s),ol.translate(d,d,[i.cx,i.cy]),l=Hl([a,-r],d);var p=t.getModel("axisLabel").get("rotate")||0,f=Wx.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+r,a]);var y=i.cx,m=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/g<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}var AN={line:function(e,t,n,i){return"angle"===e.dim?{type:"Line",shape:HO(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:UO(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:UO(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}},DN=IN,CN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.findAxisModel=function(e){var t,n=this.ecModel;return n.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Ir),LN=CN,PN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",xe).models[0]},t.type="polarAxis",t}(Ir);d.mixin(PN,eg);var kN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="angleAxis",t}(PN),ON=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="radiusAxis",t}(PN),NN=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return(0,c.ZT)(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(Gg);NN.prototype.dataToRadius=Gg.prototype.dataToCoord,NN.prototype.radiusToData=Gg.prototype.coordToData;var RN=NN,EN=ge(),VN=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return(0,c.ZT)(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=e.dataToCoord(o+1)-e.dataToCoord(o),s=Math.abs(a),l=pc.lP(null==o?"":o+"",t.getFont(),"center","top"),u=Math.max(l.height,7),c=u/s;isNaN(c)&&(c=1/0);var h=Math.max(0,Math.floor(c)),d=EN(e.model),p=d.lastAutoInterval,f=d.lastTickCount;return null!=p&&null!=f&&Math.abs(p-h)<=1&&Math.abs(f-r)<=1&&p>h?h=p:(d.lastTickCount=r,d.lastAutoInterval=h),h},t}(Gg);VN.prototype.dataToAngle=Gg.prototype.dataToCoord,VN.prototype.angleToData=Gg.prototype.coordToData;var zN=VN,BN=["radius","angle"],ZN=function(){function e(e){this.dimensions=BN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RN,this._angleAxis=new zN,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;var l=Math.atan2(-n,t)/Math.PI*180,u=la)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*t+this.cx,r=-Math.sin(n)*t+this.cy;return[i,r]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},e.prototype.convertToPixel=function(e,t,n){var i=GN(t);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var i=GN(t);return i===this?this.pointToData(n):null},e}();function GN(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var FN=ZN;function HN(e,t,n){var i=t.get("center"),r=n.getWidth(),o=n.getHeight();e.cx=_(i[0],r),e.cy=_(i[1],o);var a=e.getRadiusAxis(),s=Math.min(r,o)/2,l=t.get("radius");null==l?l=[0,"100%"]:d.isArray(l)||(l=[0,l]);var u=[_(l[0],s),_(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}function WN(e,t){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();d.each($f(t,"radius"),(function(e){r.scale.unionExtentFromData(t,e)})),d.each($f(t,"angle"),(function(e){i.scale.unionExtentFromData(t,e)}))}})),Hf(i.scale,i.model),Hf(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function UN(e){return"angleAxis"===e.mainType}function YN(e,t){if(e.type=t.get("type"),e.scale=Wf(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),UN(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var XN={dimensions:BN,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var r=new FN(i+"");r.update=WN;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");YN(o,s),YN(a,l),HN(r,e,t),n.push(r),e.coordinateSystem=r,r.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",xe).models[0];0,e.coordinateSystem=t.coordinateSystem}})),n}},jN=XN,qN=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function KN(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),r=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function JN(e){var t=e.getRadiusAxis();return t.inverse?0:1}function $N(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var QN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=d.map(n.getViewLabels(),(function(e){e=d.clone(e);var t=n.scale,i="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(i),e}));$N(s),$N(o),d.each(qN,(function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||eR[t](this.group,e,i,o,a,r,s)}),this)}},t.type="angleAxis",t}(r_),eR={axisLine:function(e,t,n,i,r,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=JN(n),u=l?0:1;a=0===o[u]?new ul.Z({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new dl.Z({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0}),a.style.fill=null,e.add(a)},axisTick:function(e,t,n,i,r,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[JN(n)],u=d.map(i,(function(e){return new yl.Z({shape:KN(n,[l,l+s],e.coord)})}));e.add(Vl(u,{style:d.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,i,r,o){if(r.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[JN(n)],c=[],h=0;hg?"left":"right",v=Math.abs(f[1]-y)/p<.3?"middle":f[1]>y?"top":"bottom";if(s&&s[h]){var x=s[h];d.isObject(x)&&x.textStyle&&(a=new $n(x.textStyle,l,l.ecModel))}var _=new Ue.ZP({silent:Wx.isLabelSilent(t),style:Dn(a,{x:f[0],y:f[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(e.add(_),c){var b=Wx.makeAxisEventDataBase(t);b.targetType="axisLabel",b.value=i.rawLabel,Xe(_).eventData=b}}),this)},splitLine:function(e,t,n,i,r,o){var a=t.getModel("splitLine"),s=a.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h=0?"p":"n",T=_;v&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var A=void 0,D=void 0,C=void 0,L=void 0;if("radius"===h.dim){var P=h.dataToCoord(w)-_,k=o.dataToCoord(M);Math.abs(P)=L})}}}))}function hR(e){var t={};d.each(e,(function(e,n){var i=e.getData(),r=e.coordinateSystem,o=r.getBaseAxis(),a=uR(r,o),s=o.getExtent(),l="category"===o.type?o.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var h=lR(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=_(e.get("barWidth"),l),p=_(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),p&&(c[h].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)}));var n={};return d.each(t,(function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=_(e.categoryGap,r),a=_(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),d.each(i,(function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[r]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},e.prototype.convertToPixel=function(e,t,n){var i=CR(t);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var i=CR(t);return i===this?this.pointToData(n):null},e}();function CR(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var LR=DR;function PR(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,r){var o=new LR(i,e,t);o.name="single_"+r,o.resize(i,t),i.coordinateSystem=o,n.push(o)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",xe).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),n}var kR={create:PR,dimensions:AR},OR=kR,NR=["x","y"],RR=["width","height"],ER=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.coordinateSystem,s=BR(a,1-zR(o)),l=a.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=VO(i),h=VR[u](o,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=mR(n);FO(t,e,d,n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=mR(t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=GO(t.axis,e,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var r=n.axis,o=r.coordinateSystem,a=zR(r),s=BR(o,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=BR(o,1-a),c=(u[1]+u[0])/2,h=[c,c];return h[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},t}(EO),VR={line:function(e,t,n){var i=HO([t,n[0]],[t,n[1]],zR(e));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(e,t,n){var i=e.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:WO([t-i/2,n[0]],[i,r],zR(e))}}};function zR(e){return e.isHorizontal()?0:1}function BR(e,t){var n=e.getRect();return[n[NR[t]],n[NR[t]]+n[RR[t]]]}var ZR=ER,GR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="single",t}(nl);function FR(e){Cd(wN),r_.registerAxisPointerClass("SingleAxisPointer",ZR),e.registerComponentView(GR),e.registerComponentView(SR),e.registerComponentModel(MR),hx(e,"single",MR,MR.defaultOption),e.registerCoordinateSystem("single",OR)}var HR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(t,n,i){var r=_r(t);e.prototype.init.apply(this,arguments),WR(t,r)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),WR(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Ir);function WR(e,t){var n,i=e.cellSize;n=d.isArray(i)?i:e.cellSize=[i,i],1===n.length&&(n[1]=n[0]);var r=d.map([0,1],(function(e){return mr(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));xr(e,t,{type:"box",ignoreSize:r})}var UR=HR,YR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i=this.group;i.removeAll();var r=e.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,o,i),this._renderLines(e,o,a,i),this._renderYearText(e,o,a,i),this._renderMonthText(e,s,a,i),this._renderWeekText(e,s,o,a,i)},t.prototype._renderDayRect=function(e,t,n){for(var i=e.coordinateSystem,r=e.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new gl.Z({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},t.prototype._renderLines=function(e,t,n,i){var r=this,o=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=o.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=o.getDateInfo(h)}function d(t){r._firstDayOfMonth.push(o.getDateInfo(t)),r._firstDayPoints.push(o.dataToRect([t],!1).tl);var l=r._getLinePointsOfOneWeek(e,t,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},t.prototype._getEdgesPoints=function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-t/2,i[1][r]=i[1][r]+t/2,i},t.prototype._drawSplitline=function(e,t,n){var i=new fl.Z({z2:20,shape:{points:e},style:t});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var i=e.coordinateSystem,r=i.getDateInfo(t),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},t.prototype._formatterLabel=function(e,t){return(0,d.isString)(e)&&e?ir(e,t):(0,d.isFunction)(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,i,r){var o=t[0],a=t[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,i){var r=e.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var p=r.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(p,f),y=new Ue.ZP({z2:30,style:Dn(r,{text:g})});y.attr(this._yearTextPositionControl(y,h[a],n,a,o)),i.add(y)}},t.prototype._monthTextPositionControl=function(e,t,n,i,r){var o="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=r,t&&(o="center"),"start"===i&&(a="bottom")):(s+=r,t&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,i){var r=e.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!(0,d.isString)(o)||(o&&(t=yi(o)||t),o=t.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,h="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,f=0;f=i.start.time&&n.timea.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var i=Math.floor(n[1].time/jR)-Math.floor(n[0].time/jR)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a){var l=r.getTime()-n[1].time>0?1:-1;while((s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0)i-=l,r.setDate(s-l)}var u=Math.floor((i+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&ti.lweek)return null;var r=7*(e-1)-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},e.create=function(t,n){var i=[];return t.eachComponent("calendar",(function(r){var o=new e(r,t,n);i.push(o),r.coordinateSystem=o})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},e.dimensions=["time","value"],e}();function KR(e){var t=e.calendarModel,n=e.seriesModel,i=t?t.coordinateSystem:n?n.coordinateSystem:null;return i}var JR=qR;function $R(e){e.registerComponentModel(UR),e.registerComponentView(XR),e.registerCoordinateSystem("calendar",JR)}function QR(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function eE(e,t){var n;return d.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}function tE(e,t,n){var i=d.extend({},n),r=e[t],o=n.$action||"merge";"merge"===o?r?(d.merge(r,i,!0),xr(r,i,{ignoreSize:!0}),br(n,r),rE(n,r),rE(n,r,"shape"),rE(n,r,"style"),rE(n,r,"extra"),n.clipPath=r.clipPath):e[t]=i:"replace"===o?e[t]=i:"remove"===o&&r&&(e[t]=null)}var nE=["transition","enterFrom","leaveTo"],iE=nE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function rE(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var i=n?nE:iE,r=0;r=0;l--){u=n[l],c=se(u.id,null),h=null!=c?r.get(c):null;if(h){p=h.parent,y=lE(p);var m=p===i?{width:o,height:a}:{width:y.width,height:y.height},v={},x=yr(h,u,m,null,{hv:u.hv,boundingMode:u.bounding},v);if(!lE(h).isNew&&x){for(var b=u.transition,S={},w=0;w=0)?S[M]=I:h[M]=I}gn(h,S,e,0)}else h.attr(v)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each((function(n){dE(n,lE(n).option,t,e._lastGraphicModel)})),this._elMap=d.createHashMap()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(nl);function cE(e){var t=d.hasOwn(sE,e)?sE[e]:Ol(e);var n=new t({});return lE(n).type=e,n}function hE(e,t,n,i){var r=cE(n);return t.add(r),i.set(e,r),lE(r).id=e,lE(r).isNew=!0,r}function dE(e,t,n,i){var r=e&&e.parent;r&&("group"===e.type&&e.traverse((function(e){dE(e,t,n,i)})),wk(e,t,i),n.removeKey(lE(e).id))}function pE(e,t,n,i){e.isGroup||d.each([["cursor",Sb.ZP.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];d.hasOwn(t,i)?e[i]=d.retrieve2(t[i],n[1]):null==e[i]&&(e[i]=n[1])})),d.each(d.keys(t),(function(n){if(0===n.indexOf("on")){var i=t[n];e[n]=d.isFunction(i)?i:null}})),d.hasOwn(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}function fE(e){return e=d.extend({},e),d.each(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(cr),(function(t){delete e[t]})),e}function gE(e,t,n){var i=Xe(e).eventData;e.silent||e.ignore||i||(i=Xe(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),i&&(i.info=n.info)}function yE(e){e.registerComponentModel(aE),e.registerComponentView(uE),e.registerPreprocessor((function(e){var t=e.graphic;(0,d.isArray)(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}))}var mE=["x","y","radius","angle","single"],vE=["cartesian2d","polar","singleAxis"];function xE(e){var t=e.get("coordinateSystem");return(0,d.indexOf)(vE,t)>=0}function _E(e){return e+"Axis"}function bE(e,t){var n,i=(0,d.createHashMap)(),r=[],o=(0,d.createHashMap)();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&l(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),r.push(e),u(e)}function l(e){var t=!1;return e.eachTargetAxis((function(e,n){var r=i.get(e);r&&r[n]&&(t=!0)})),t}function u(e){e.eachTargetAxis((function(e,t){(i.get(e)||i.set(e,[]))[t]=!0}))}return r}function SE(e){var t=e.ecModel,n={infoList:[],infoMap:(0,d.createHashMap)()};return e.eachTargetAxis((function(e,i){var r=t.getComponent(_E(e),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var wE=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),ME=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t,n){var i=IE(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=IE(e);(0,d.merge)(this.option,e,!0),(0,d.merge)(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;(0,d.each)([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=(0,d.createHashMap)(),n=this._fillSpecifiedTargetAxis(t);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return(0,d.each)(mE,(function(n){var i=this.getReferringComponents(_E(n),_e);if(i.specified){t=!0;var r=new wE;(0,d.each)(i.models,(function(e){r.add(e.componentIndex)})),e.set(n,r)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,i=!0;if(i){var r="vertical"===t?"y":"x",o=n.findComponents({mainType:r+"Axis"});a(o,r)}if(i){o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(o,"single")}function a(t,n){var r=t[0];if(r){var o=new wE;if(o.add(r.componentIndex),e.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",xe).models[0];a&&(0,d.each)(t,(function(e){r.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",xe).models[0]&&o.add(e.componentIndex)}))}}}i&&(0,d.each)(mE,(function(t){if(i){var r=n.findComponents({mainType:_E(t),filter:function(e){return"category"===e.get("type",!0)}});if(r[0]){var o=new wE;o.add(r[0].componentIndex),e.set(t,o),i=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");(0,d.each)([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=e[i[0]],a=null!=e[i[1]];o&&!a?t[r]="percent":!o&&a?t[r]="value":n?t[r]=n[r]:o&&(t[r]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(_E(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,i){(0,d.each)(n.indexList,(function(n){e.call(t,i,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(_E(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;(0,d.each)([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;(0,d.each)(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(c&&!h&&!d)return!0;c&&(r=!0),h&&(t=!0),d&&(n=!0)}return r&&t&&n}))}else OE(i,(function(n){if("empty"===r)e.setData(t=t.map(n,(function(e){return a(e)?e:NaN})));else{var i={};i[n]=o,t.selectRange(i)}}));OE(i,(function(e){t.setApproximateExtent(o,e)}))}}))}function a(e){return e>=o[0]&&e<=o[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;OE(["min","max"],(function(i){var r=t.get(i+"Span"),o=t.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=x(n[0]+o,n,[0,100],!0):null!=r&&(o=x(r,[0,100],n,!0)-n[0]),e[i+"Span"]=r,e[i+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=I(n,[0,500]);i=Math.min(i,20);var r=e.axis.scale.rawExtentInfo;0!==t[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==t[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},e}();function EE(e,t,n){var i=[1/0,-1/0];OE(n,(function(e){Qf(i,e.getData(),t)}));var r=e.getAxisModel(),o=Bf(r.axis.scale,r,i).calculate();return[o.min,o.max]}var VE=RE,zE={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=e.getComponent(_E(i),r);t(i,r,o,n)}))}))}t((function(e,t,n,i){n.__dzAxisProxy=null}));var n=[];t((function(t,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new VE(t,i,o,e),n.push(r.__dzAxisProxy))}));var i=(0,d.createHashMap)();return(0,d.each)(n,(function(e){(0,d.each)(e.getTargetSeriesModels(),(function(e){i.set(e.uid,e)}))})),i},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,i){e.getAxisProxy(n,i).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}},BE=zE;function ZE(e){e.registerAction("dataZoom",(function(e,t){var n=bE(t,e);(0,d.each)(n,(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}var GE=!1;function FE(e){GE||(GE=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,BE),ZE(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function HE(e){e.registerComponentModel(DE),e.registerComponentView(kE),FE(e)}var WE=function(){function e(){}return e}(),UE={};function YE(e,t){UE[e]=t}function XE(e){return UE[e]}var jE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;d.each(this.option.feature,(function(e,n){var i=XE(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),d.merge(e,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}(Ir),qE=jE;function KE(e,t,n){var i=t.getBoxLayoutParams(),r=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=gr(i,o,r);pr(t.get("orient"),e,t.get("itemGap"),a.width,a.height),yr(e,i,o,r)}function JE(e,t){var n=$i(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new gl.Z({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),e}var $E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n,i){var r=this.group;if(r.removeAll(),e.get("show")){var o=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];d.each(s,(function(e,t){u.push(t)})),new Od(this._featureNames||[],u).add(c).update(c).remove(d.curry(c,null)).execute(),this._featureNames=u,KE(r,e,n),r.add(JE(r.getBoundingRect(),e)),a||r.eachChild((function(e){var t=e.__title,i=e.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!d.isFunction(l)&&t){var u=l.style||(l.style={}),c=pc.lP(t,Ue.ZP.makeFont(u)),h=e.x+r.x,p=e.y+r.y+o,f=!1;p+c.height>n.getHeight()&&(a.position="top",f=!0);var g=f?-5-c.height:o+10;h+c.width/2>n.getWidth()?(a.position=["100%",g],u.align="right"):h-c.width/2<0&&(a.position=[0,g],u.align="left")}}))}function c(r,o){var a,c=u[r],d=u[o],p=s[c],f=new $n(p,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===c&&(p.title=i.newTitle),c&&!d){if(QE(c))a={onclick:f.option.onclick,featureName:c};else{var g=XE(c);if(!g)return;a=new g}l[c]=a}else if(a=l[d],!a)return;a.uid=ei("toolbox-feature"),a.model=f,a.ecModel=t,a.api=n;var y=a instanceof WE;c||!d?!f.get("show")||y&&a.unusable?y&&a.remove&&a.remove(t,n):(h(f,a,c),f.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&("emphasis"===t?Nt:Rt)(i[e])},a instanceof WE&&a.render&&a.render(f,t,n,i)):y&&a.dispose&&a.dispose(t,n)}function h(i,s,l){var u,c,h=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),f=s instanceof WE&&s.getIcons?s.getIcons():i.get("icon"),g=i.get("title")||{};d.isString(f)?(u={},u[l]=f):u=f,d.isString(g)?(c={},c[l]=g):c=g;var y=i.iconPaths={};d.each(u,(function(l,u){var f=Kl(l,{},{x:-o/2,y:-o/2,width:o,height:o});f.setStyle(h.getItemStyle());var g=f.ensureState("emphasis");g.style=p.getItemStyle();var m=new Ue.ZP({style:{text:c[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null},ignore:!0});f.setTextContent(m),tu({el:f,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),f.__title=c[u],f.on("mouseover",(function(){var t=p.getItemStyle(),i=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";m.setStyle({fill:p.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),f.setTextConfig({position:p.get("textPosition")||i}),m.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),m.hide()})),("emphasis"===i.get(["iconStatus",u])?Nt:Rt)(f),r.add(f),f.on("click",d.bind(s.onclick,s,t,n,u)),y[u]=f}))}},t.prototype.updateView=function(e,t,n,i){d.each(this._features,(function(e){e instanceof WE&&e.updateView&&e.updateView(e.model,t,n,i)}))},t.prototype.remove=function(e,t){d.each(this._features,(function(n){n instanceof WE&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){d.each(this._features,(function(n){n instanceof WE&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(nl);function QE(e){return 0===e.indexOf("my")}var eV=$E,tV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",r="svg"===t.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=p.Z.browser;if((0,d.isFunction)(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),h=c[0].indexOf("base64")>-1,f=r?decodeURIComponent(c[1]):c[1];h&&(f=window.atob(f));var g=i+"."+o;if(window.navigator.msSaveOrOpenBlob){var y=f.length,m=new Uint8Array(y);while(y--)m[y]=f.charCodeAt(y);var v=new Blob([m]);window.navigator.msSaveOrOpenBlob(v,g)}else{var x=document.createElement("iframe");document.body.appendChild(x);var _=x.contentWindow,b=_.document;b.open("image/svg+xml","replace"),b.write(f),b.close(),_.focus(),b.execCommand("SaveAs",!0,g),document.body.removeChild(x)}}else{var S=n.get("lang"),w='',M=window.open();M.document.write(w),M.document.title=i}},t.getDefaultOption=function(e){var t={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 t},t}(WE),nV=tV,iV="__ec_magicType_stack__",rV=[["line","bar"],["stack"]],oV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return d.each(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){var t={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 t},t.prototype.onclick=function(e,t,n){var i=this.model,r=i.get(["seriesIndex",n]);if(aV[n]){var o,a={series:[]},s=function(e){var t=e.subType,r=e.id,o=aV[n](t,r,e,i);o&&(d.defaults(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim,c=u+"Axis",h=e.getReferringComponents(c,xe).models[0],p=h.componentIndex;a[c]=a[c]||[];for(var f=0;f<=p;f++)a[c][p]=a[c][p]||{};a[c][p].boundaryGap="bar"===n}}};d.each(rV,(function(e){d.indexOf(e,n)>=0&&d.each(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},s);var l=n;"stack"===n&&(o=d.merge({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(l="tiled")),t.dispatchAction({type:"changeMagicType",currentType:l,newOption:a,newTitle:o,featureName:"magicType"})}},t}(WE),aV={line:function(e,t,n,i){if("bar"===e)return d.merge({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(e,t,n,i){if("line"===e)return d.merge({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(e,t,n,i){var r=n.get("stack")===iV;if("line"===e||"bar"===e)return i.setIconStatus("stack",r?"normal":"emphasis"),d.merge({id:t,stack:r?"":iV},i.get(["option","stack"])||{},!0)}};fd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var sV=oV,lV=new Array(60).join("-"),uV="\t";function cV(e){var t={},n=[],i=[];return e.eachRawSeries((function(e){var r=e.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(e);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;t[a]||(t[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[a].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:i}}function hV(e){var t=[];return d.each(e,(function(e,n){var i=e.categoryAxis,r=e.valueAxis,o=r.dim,a=[" "].concat(d.map(e.series,(function(e){return e.name}))),s=[i.model.getCategories()];d.each(e.series,(function(e){var t=e.getRawData();s.push(e.getRawData().mapArray(t.mapDimension(o),(function(e){return e})))}));for(var l=[a.join(uV)],u=0;u=0)return!0}var yV=new RegExp("["+uV+"]+","g");function mV(e){for(var t=e.split(/\n+/g),n=fV(t.shift()).split(yV),i=[],r=d.map(n,(function(e){return{name:e,data:[]}})),o=0;o=0;r--){var o=n[r];if(o[i])break}if(r<0){var a=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(a){var s=a.getPercentRange();n[0][i]={dataZoomId:i,start:s[0],end:s[1]}}}})),n.push(t)}function TV(e){var t=CV(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return wV(n,(function(e,n){for(var r=t.length-1;r>=0;r--)if(e=t[r][n],e){i[n]=e;break}})),i}function AV(e){MV(e).snapshots=null}function DV(e){return CV(e).length}function CV(e){var t=MV(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var LV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.onclick=function(e,t){AV(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var t={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 t},t}(WE);fd({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));var PV=LV,kV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],OV=function(){function e(e,t,n){var i=this;this._targetInfoList=[];var r=RV(t,e);(0,d.each)(EV,(function(e,t){(!n||!n.include||(0,d.indexOf)(n.include,t)>=0)&&e(r,i._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=BV[e.brushType](0,n,t);e.__rangeOffset={offset:GV[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){(0,d.each)(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&(0,d.each)(i.coordSyses,(function(i){var r=BV[e.brushType](1,i,e.range,!0);n(e,r.values,i,t)}))}),this)},e.prototype.setInputRanges=function(e,t){(0,d.each)(e,(function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var i=BV[e.brushType](0,n.coordSys,e.coordRange),r=e.__rangeOffset;e.range=r?GV[e.brushType](i.values,r.offset,HV(i.xyMinMax,r.xyMinMax)):i.values}}),this)},e.prototype.makePanelOpts=function(e,t){return(0,d.map)(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:yD(i),isTargetByCursor:vD(i,e,n.coordSysModel),getLinearBrushOtherExtent:mD(i)}}))},e.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&(0,d.indexOf)(i.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=RV(t,e),r=0;re[1]&&e.reverse(),e}function RV(e,t){return me(e,t,{includeMainTypes:kV})}var EV={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,r=e.gridModels,o=(0,d.createHashMap)(),a={},s={};(n||i||r)&&((0,d.each)(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),(0,d.each)(i,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),(0,d.each)(r,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var r=e.coordinateSystem,o=[];(0,d.each)(r.getCartesians(),(function(e,t){((0,d.indexOf)(n,e.getAxis("x").model)>=0||(0,d.indexOf)(i,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:zV.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){(0,d.each)(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:zV.geo})}))}},VV=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,r=e.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],zV={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Fl(e)),t}},BV={lineX:(0,d.curry)(ZV,0),lineY:(0,d.curry)(ZV,1),rect:function(e,t,n,i){var r=e?t.pointToData([n[0][0],n[1][0]],i):t.dataToPoint([n[0][0],n[1][0]],i),o=e?t.pointToData([n[0][1],n[1][1]],i):t.dataToPoint([n[0][1],n[1][1]],i),a=[NV([r[0],o[0]]),NV([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,i){var r=[[1/0,-1/0],[1/0,-1/0]],o=(0,d.map)(n,(function(n){var o=e?t.pointToData(n,i):t.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o}));return{values:o,xyMinMax:r}}};function ZV(e,t,n,i){var r=n.getAxis(["x","y"][e]),o=NV((0,d.map)([0,1],(function(e){return t?r.coordToData(r.toLocalCoord(i[e]),!0):r.toGlobalCoord(r.dataToCoord(i[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var GV={lineX:(0,d.curry)(FV,0),lineY:(0,d.curry)(FV,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return(0,d.map)(e,(function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]}))}};function FV(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function HV(e,t){var n=WV(e),i=WV(t),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function WV(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var UV=OV,YV=d.each,XV=ce("toolbox-dataZoom_"),jV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n,i){this._brushController||(this._brushController=new gD(n.getZr()),this._brushController.on("brush",d.bind(this._onBrush,this)).mount()),$V(e,t,this,i,n),JV(e,t)},t.prototype.onclick=function(e,t,n){qV[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},i=this.ecModel;this._brushController.updateCovers([]);var r=new UV(KV(this.model),i,{include:["grid"]});r.matchOutputRanges(t,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[i],n,t)}})),IV(i,n),this._dispatchZoomAction(n)}function o(e,t,r){var o=t.getAxis(e),s=o.model,l=a(e,s,i),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(r=eA(0,r.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(n[l.id]={dataZoomId:l.id,startValue:r[0],endValue:r[1]})}function a(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){var r=n.getAxisModel(e,t.componentIndex);r&&(i=n)})),i}},t.prototype._dispatchZoomAction=function(e){var t=[];YV(e,(function(e,n){t.push(d.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){var t={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 t},t}(WE),qV={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(TV(this.ecModel))}};function KV(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}function JV(e,t){e.setIconStatus("back",DV(t)>1?"emphasis":"normal")}function $V(e,t,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new UV(KV(e),t,{include:["grid"]}),s=a.makePanelOpts(r,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}jr("dataZoom",(function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var i=t.getModel(n),r=[],o=KV(i),a=me(e,o);return YV(a.xAxisModels,(function(e){return s(e,"xAxis","xAxisIndex")})),YV(a.yAxisModels,(function(e){return s(e,"yAxis","yAxisIndex")})),r}function s(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:XV+t+o};a[n]=o,r.push(a)}}));var QV=jV;function ez(e){e.registerComponentModel(qE),e.registerComponentView(eV),YE("saveAsImage",nV),YE("magicType",sV),YE("dataView",SV),YE("dataZoom",QV),YE("restore",PV),Cd(HE)}var tz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),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}(Ir),nz=tz;function iz(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function rz(e){if(p.Z.domSupported)for(var t=document.documentElement.style,n=0,i=e.length;n-1?(l+="top:50%",u+="translateY(-50%) rotate("+(o="left"===a?-225:-45)+"deg)"):(l+="left:50%",u+="translateX(-50%) rotate("+(o="top"===a?225:45)+"deg)");var c=o*Math.PI/180,h=s+r,p=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),f=Math.round(100*((p-Math.SQRT2*r)/2+Math.SQRT2*r-(p-h)/2))/100;l+=";"+a+":-"+f+"px";var g=t+" solid "+r+"px;",y=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",l+";"+u+";","border-bottom:"+g,"border-right:"+g,"background-color:"+i+";"];return'
'}function fz(e,t){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+e/2+"s "+n,r="opacity"+i+",visibility"+i;return t||(i=" "+e+"s "+n,r+=p.Z.transformSupported?","+cz+i:",left"+i+",top"+i),uz+":"+r}function gz(e,t,n){var i=e.toFixed(0)+"px",r=t.toFixed(0)+"px";if(!p.Z.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=p.Z.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+cz+":"+a+";":[["top",0],["left",0],[oz,a]]}function yz(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();i&&t.push("color:"+i),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var r=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return r&&o&&t.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),(0,d.each)(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}function mz(e,t,n){var i=[],r=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),h=Vs(e,"html"),p=l+"px "+u+"px "+a+"px "+s;return i.push("box-shadow:"+p),t&&r&&i.push(fz(r,n)),o&&i.push("background-color:"+o),(0,d.each)(["width","color","radius"],(function(t){var n="border-"+t,r=Ji(n),o=e.get(r);null!=o&&i.push(n+":"+o+("color"===t?"":"px"))})),i.push(yz(c)),null!=h&&i.push("padding:"+$i(h).join("px ")+"px"),i.join(";")+";"}function vz(e,t,n,i,r){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&(0,oi.YB)(e,a,document.body,i,r)}else{e[0]=i,e[1]=r;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var xz=function(){function e(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,p.Z.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;vz(this._styleCoord,r,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=r.handler,n=r.painter.getViewportRoot();(0,B_.OD)(n,e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){var t=this._container,n=lz(t,"position"),i=t.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative");var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,r=this._styleCoord;n.innerHTML?i.cssText=hz+mz(e,!this._firstShow,this._longHide)+gz(r[0],r[1],!0)+"border-color:"+sr(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,i,r){var o=this.el;if(null!=e){var a="";if((0,d.isString)(r)&&"item"===n.get("trigger")&&!iz(n)&&(a=pz(n,i,r)),(0,d.isString)(e))o.innerHTML=e+a;else if(e){o.innerHTML="",(0,d.isArray)(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,i=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(e,t,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,i){if(i.from!==this.uid&&!p.Z.node&&n.getDom()){var r=Cz(i,n);this._ticket="";var o=i.dataByCoordSys,a=Nz(i,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=Tz;l.x=i.x,l.y=i.y,l.update(),Xe(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var u=cN(i,t),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},t.prototype.manuallyHideTip=function(e,t,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(Cz(i,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,i){var r=i.seriesIndex,o=i.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=t.getSeriesByIndex(r);if(s){var l=s.getData(),u=Dz([l.getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel);if("axis"===u.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}}},t.prototype._tryShow=function(e,t){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,a;this._lastDataByCoordSys=null,hc(n,(function(e){return null!=Xe(e).dataIndex?(o=e,!0):null!=Xe(e).tooltipConfig?(a=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=(0,d.bind)(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,i=this._tooltipModel,r=[t.offsetX,t.offsetY],o=Dz([t.tooltipOption],i),a=this._renderMode,s=[],l=ws("section",{blocks:[],noHeader:!0}),u=[],c=new zs;(0,d.each)(e,(function(e){(0,d.each)(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value;if(t&&null!=r){var o=ZO(r,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),h=ws("section",{header:o,noHeader:!(0,d.trim)(o),sortBlocks:!0,blocks:[]});l.blocks.push(h),(0,d.each)(e.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,g=p.getDataParams(f);if(!(g.dataIndex<0)){g.axisDim=e.axisDim,g.axisIndex=e.axisIndex,g.axisType=e.axisType,g.axisId=e.axisId,g.axisValue=Xf(t.axis,{value:r}),g.axisValueLabel=o,g.marker=c.makeTooltipMarker("item",sr(g.color),a);var y=Pa(p.formatTooltip(f,!0,null)),m=y.frag;if(m){var v=Dz([p],i).get("valueFormatter");h.blocks.push(v?(0,d.extend)({valueFormatter:v},m):m)}y.text&&u.push(y.text),s.push(g)}}))}}))})),l.blocks.reverse(),u.reverse();var h=t.position,p=o.get("order"),f=Cs(l,c,a,p,n.get("useUTC"),o.get("textStyle"));f&&u.unshift(f);var g="richText"===a?"\n\n":"
",y=u.join(g);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,h,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,y,s,Math.random()+"",r[0],r[1],h,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,r=Xe(t),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),h=this._renderMode,p=e.positionDefault,f=Dz([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=f.get("trigger");if(null==g||"item"===g){var y=s.getDataParams(l,u),m=new zs;y.marker=m.makeTooltipMarker("item",sr(y.color),h);var v=Pa(s.formatTooltip(l,!1,u)),x=f.get("order"),_=f.get("valueFormatter"),b=v.frag,S=b?Cs(_?(0,d.extend)({valueFormatter:_},b):b,m,h,x,i.get("useUTC"),f.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(f,(function(){this._showTooltipContent(f,S,y,w,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var i=Xe(t),r=i.tooltipConfig,o=r.option||{};if((0,d.isString)(o)){var a=o;o={content:a,formatter:a}}var s=[o],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=e.positionDefault,c=Dz(s,this._tooltipModel,u?{position:u}:null),h=c.get("content"),p=Math.random()+"",f=new zs;this._showOrMove(c,(function(){var n=(0,d.clone)(c.get("formatterParams")||{});this._showTooltipContent(c,h,n,p,e.offsetX,e.offsetY,e.position,t,f)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,i,r,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var h=t,p=this._getNearestPoint([r,o],n,e.get("trigger"),e.get("borderColor")),f=p.color;if(c)if((0,d.isString)(c)){var g=e.ecModel.get("useUTC"),y=(0,d.isArray)(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=c,m&&(h=ki(y.axisValue,h,g)),h=nr(h,n,!0)}else if((0,d.isFunction)(c)){var v=(0,d.bind)((function(t,i){t===this._ticket&&(u.setContent(i,l,e,f,a),this._updatePosition(e,a,r,o,u,n,s))}),this);this._ticket=i,h=c(n,i,v)}else h=c;u.setContent(h,l,e,f,a),u.show(e,f),this._updatePosition(e,a,r,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,i){return"axis"===n||(0,d.isArray)(t)?{color:i||("html"===this._renderMode?"#fff":"none")}:(0,d.isArray)(t)?void 0:{color:i||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=r.getSize(),c=e.get("align"),h=e.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),(0,d.isFunction)(t)&&(t=t([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),(0,d.isArray)(t))n=_(t[0],s),i=_(t[1],l);else if((0,d.isObject)(t)){var f=t;f.width=u[0],f.height=u[1];var g=gr(f,{width:s,height:l});n=g.x,i=g.y,c=null,h=null}else if((0,d.isString)(t)&&a){var y=kz(t,p,u,e.get("borderWidth"));n=y[0],i=y[1]}else{y=Lz(n,i,r,s,l,c?null:20,h?null:20);n=y[0],i=y[1]}if(c&&(n-=Oz(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=Oz(h)?u[1]/2:"bottom"===h?u[1]:0),iz(e)){y=Pz(n,i,r,s,l);n=y[0],i=y[1]}r.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===e.length;return r&&(0,d.each)(n,(function(n,o){var a=n.dataByAxis||[],s=e[o]||{},l=s.dataByAxis||[];r=r&&a.length===l.length,r&&(0,d.each)(a,(function(e,n){var o=l[n]||{},a=e.seriesDataIndices||[],s=o.seriesDataIndices||[];r=r&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===s.length,r&&(0,d.each)(a,(function(e,t){var n=s[t];r=r&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),i&&(0,d.each)(e.seriesDataIndices,(function(e){var n=e.seriesIndex,o=t[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!r},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!p.Z.node&&t.getDom()&&(vu(this,"_updatePosition"),this._tooltipContent.dispose(),sN("itemTooltip",t))},t.type="tooltip",t}(nl);function Dz(e,t,n){var i,r=t.ecModel;n?(i=new $n(n,r,r),i=new $n(t.option,i,r)):i=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof $n&&(a=a.get("tooltip",!0)),(0,d.isString)(a)&&(a={formatter:a}),a&&(i=new $n(a,i,r)))}return i}function Cz(e,t){return e.dispatchAction||(0,d.bind)(t.dispatchAction,t)}function Lz(e,t,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];return null!=o&&(e+l+o+2>i?e-=l+o:e+=o),null!=a&&(t+u+a>r?t-=u+a:t+=a),[e,t]}function Pz(e,t,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,i)-a,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function kz(e,t,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-r/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-r/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-r/2,l=t.y+c+a;break;case"left":s=t.x-r-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}function Oz(e){return"center"===e||"middle"===e}function Nz(e,t,n){var i=ve(e).queryOptionMap,r=i.keys()[0];if(r&&"series"!==r){var o=be(t,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(a){var s,l=n.getViewOfComponentModel(a);return l.group.traverse((function(t){var n=Xe(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s?{componentMainType:r,componentIndex:a.componentIndex,el:s}:void 0}}}var Rz=Az;function Ez(e){Cd(wN),e.registerComponentModel(nz),e.registerComponentView(Rz),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},d.noop),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},d.noop)}var Vz=["rect","polygon","keep","clear"];function zz(e,t){var n=X(e?e.brush:[]);if(n.length){var i=[];d.each(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var r=e&&e.toolbox;d.isArray(r)&&(r=r[0]),r||(r={feature:{}},e.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),Bz(s),t&&!s.length&&s.push.apply(s,Vz)}}function Bz(e){var t={};d.each(e,(function(e){t[e]=1})),e.length=0,d.each(t,(function(t,n){e.push(n)}))}var Zz=d.each;function Gz(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function Fz(e,t,n){var i={};return Zz(t,(function(t){var o=i[t]=r();Zz(e[t],(function(e,i){if(lM.isValidType(i)){var r={type:i,visual:e};n&&n(r,t),o[i]=new lM(r),"opacity"===i&&(r=d.clone(r),r.type="colorAlpha",o.__hidden.__alphaForOpacity=new lM(r))}}))})),i;function r(){var e=function(){};e.prototype.__hidden=e.prototype;var t=new e;return t}}function Hz(e,t,n){var i;d.each(n,(function(e){t.hasOwnProperty(e)&&Gz(t[e])&&(i=!0)})),i&&d.each(n,(function(n){t.hasOwnProperty(n)&&Gz(t[n])?e[n]=d.clone(t[n]):delete e[n]}))}function Wz(e,t,n,i,r,o){var a,s={};function l(e){return oc(n,a,e)}function u(e,t){sc(n,a,e,t)}function c(e,c){a=null==o?e:c;var h=n.getRawDataItem(a);if(!h||!1!==h.visualMap)for(var d=i.call(r,e),p=t[d],f=s[d],g=0,y=f.length;gt[0][1]&&(t[0][1]=o[0]),o[1]t[1][1]&&(t[1][1]=o[1])}return t&&aB(t)}};function aB(e){return new ri.Z(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var sB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new gD(t.getZr())).on("brush",d.bind(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,i){this.model=e,this._updateController(e,t,n,i)},t.prototype.updateTransform=function(e,t,n,i){Qz(t),this._updateController(e,t,n,i)},t.prototype.updateVisual=function(e,t,n,i){this.updateTransform(e,t,n,i)},t.prototype.updateView=function(e,t,n,i){this._updateController(e,t,n,i)},t.prototype._updateController=function(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:d.clone(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:d.clone(n),$from:t})},t.type="brush",t}(nl),lB=sB,uB="#ddd",cB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return(0,c.ZT)(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&Hz(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:uB},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=d.map(e,(function(e){return hB(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=hB(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(Ir);function hB(e,t){return d.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new $n(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var dB=cB,pB=["rect","polygon","lineX","lineY","keep","clear"],fB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){var i,r,o;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,r=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=i,this._brushMode=r,d.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===r:"clear"===t?o:t===i)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return d.each(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var i=this._brushType,r=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},t.getDefaultOption=function(e){var t={show:!0,type:pB.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return t},t}(WE),gB=fB;function yB(e){e.registerComponentView(lB),e.registerComponentModel(dB),e.registerPreprocessor(zz),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,eB),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},d.noop),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},d.noop),YE("brush",gB)}var mB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,c.ZT)(t,e),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}(Ir),vB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,r=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=d.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Ue.ZP({style:Dn(r,{text:e.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new Ue.ZP({style:Dn(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),f=e.get("sublink"),g=e.get("triggerEvent",!0);l.silent=!p&&!g,h.silent=!f&&!g,p&&l.on("click",(function(){lr(p,"_"+e.get("target"))})),f&&h.on("click",(function(){lr(f,"_"+e.get("subtarget"))})),Xe(l).eventData=Xe(h).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var v=gr(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||(a=e.get("left")||e.get("right"),"middle"===a&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||(s=e.get("top")||e.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var x={align:a,verticalAlign:s};l.setStyle(x),h.setStyle(x),y=i.getBoundingRect();var _=v.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var S=new gl.Z({shape:{x:y.x-_[3],y:y.y-_[0],width:y.width+_[1]+_[3],height:y.height+_[0]+_[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(S)}},t.type="title",t}(nl);function xB(e){e.registerComponentModel(mB),e.registerComponentView(vB)}var _B=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],i=t.axisType,r=this._names=[];"category"===i?(e=[],(0,d.each)(n,(function(t,n){var i,o=se(K(t),"");(0,d.isObject)(t)?(i=(0,d.clone)(t),i.value=n):i=n,e.push(i),r.push(o)}))):e=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number",a=this._data=new up([{name:"value",type:o}],this);a.initData(e,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(Ir),bB=_B,SB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="timeline.slider",t.defaultOption=ii(bB.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(bB);(0,d.mixin)(SB,La.prototype);var wB=SB,MB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="timeline",t}(nl),IB=MB,TB=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this;return o.type=r||"value",o}return(0,c.ZT)(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(Gg),AB=TB,DB=Math.PI,CB=ge(),LB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,e);e.formatTooltip=function(e){var t=a.scale.getLabel({value:e});return ws("nameValue",{noName:!0,value:t})},(0,d.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](i,r,a,e)}),this),this._renderAxisLabel(i,o,a,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,i=e.get(["label","position"]),r=e.get("orient"),o=kB(e,t);n=null==i||"auto"===i?"horizontal"===r?o.y+o.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:DB/2},p="vertical"===r?o.height:o.width,f=e.getModel("controlStyle"),g=f.get("show",!0),y=g?f.get("itemSize"):0,m=g?f.get("itemGap"):0,v=y+m,x=e.get(["label","rotate"])||0;x=x*DB/180;var _=f.get("position",!0),b=g&&f.get("showPlayBtn",!0),S=g&&f.get("showPrevBtn",!0),w=g&&f.get("showNextBtn",!0),M=0,I=p;"left"===_||"bottom"===_?(b&&(a=[0,0],M+=v),S&&(s=[M,0],M+=v),w&&(l=[I-y,0],I-=v)):(b&&(a=[I-y,0],I-=v),S&&(s=[0,0],M+=v),w&&(l=[I-y,0],I-=v));var T=[M,I];return e.get("inverse")&&T.reverse(),{viewRect:o,mainLength:p,orient:r,rotation:h[r],labelRotation:x,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[r],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[r],playPosition:a,prevBtnPosition:s,nextBtnPosition:l,axisExtent:T,controlSize:y,controlGap:m}},t.prototype._position=function(e,t){var n=this._mainGroup,i=this._labelGroup,r=e.viewRect;if("vertical"===e.orient){var o=ol.create(),a=r.x,s=r.y+r.height;ol.translate(o,o,[-a,-s]),ol.rotate(o,o,-DB/2),ol.translate(o,o,[a,s]),r=r.clone(),r.applyTransform(o)}var l=m(r),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=[n.x,n.y],p=[i.x,i.y];p[0]=h[0]=l[0][0];var f=e.labelPosOpt;if(null==f||(0,d.isString)(f)){var g="+"===f?0:1;v(h,u,l,1,g),v(p,c,l,1,1-g)}else{g=f>=0?0:1;v(h,u,l,1,g),p[1]=h[1]+f}function y(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,r){e[i]+=n[i][r]-t[i][r]}n.setPosition(h),i.setPosition(p),n.rotation=i.rotation=e.rotation,y(n),y(i)},t.prototype._createAxis=function(e,t){var n=t.getData(),i=t.get("axisType"),r=PB(t,i);r.getTicks=function(){return n.mapArray(["value"],(function(e){return{value:e}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new AB("value",r,e.axisExtent,i);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new el.Z;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new yl.Z({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:(0,d.extend)({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new yl.Z({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:(0,d.defaults)({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],(0,d.each)(a,(function(e){var a=n.dataToCoord(e.value),s=o.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),h={x:a,y:0,onclick:(0,d.bind)(r._changeTimeline,r,e.value)},p=NB(s,l,t,h);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=c.getItemStyle(),Jt(p);var f=Xe(p);s.get("tooltip")?(f.dataIndex=e.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(p)}))},t.prototype._renderAxisLabel=function(e,t,n,i){var r=this,o=n.getLabelModel();if(o.get("show")){var a=i.getData(),s=n.getViewLabels();this._tickLabels=[],(0,d.each)(s,(function(i){var o=i.tickValue,s=a.getItemModel(o),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),h=n.dataToCoord(i.tickValue),p=new Ue.ZP({x:h,y:0,rotation:e.labelRotation-e.rotation,onclick:(0,d.bind)(r._changeTimeline,r,o),silent:!1,style:Dn(l,{text:i.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});p.ensureState("emphasis").style=Dn(u),p.ensureState("progress").style=Dn(c),t.add(p),Jt(p),CB(p).dataIndex=o,r._tickLabels.push(p)}))}},t.prototype._renderControl=function(e,t,n,i){var r=e.controlSize,o=e.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(e,n,l,u){if(e){var c=(0,pc.GM)((0,d.retrieve2)(i.get(["controlStyle",n+"BtnSize"]),r),r),h=[0,-c/2,c,c],p=OB(i,n+"Icon",h,{x:e[0],y:e[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});p.ensureState("emphasis").style=s,t.add(p),Jt(p)}}c(e.nextBtnPosition,"next",(0,d.bind)(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",(0,d.bind)(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",(0,d.bind)(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=(0,d.bind)(s._handlePointerDrag,s),e.ondragend=(0,d.bind)(s._handlePointerDragend,s),RB(e,s._progressLine,o,n,i,!0)},onUpdate:function(e){RB(e,s._progressLine,o,n,i)}};this._currentPointer=NB(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],i=this._axis,r=S(i.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(d)),[a,h]}var QB={min:(0,d.curry)($B,"min"),max:(0,d.curry)($B,"max"),average:(0,d.curry)($B,"average"),median:(0,d.curry)($B,"median")};function eZ(e,t){if(t){var n=e.getData(),i=e.coordinateSystem,r=i.dimensions;if(!JB(t)&&!(0,d.isArray)(t.coord)&&i){var o=tZ(t,n,i,e);if(t=(0,d.clone)(t),t.type&&QB[t.type]&&o.baseAxis&&o.valueAxis){var a=(0,d.indexOf)(r,o.baseAxis.dim),s=(0,d.indexOf)(r,o.valueAxis.dim),l=QB[t.type](n,o.baseDataDim,o.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null==t.coord)t.coord=[];else for(var u=t.coord,c=0;c<2;c++)QB[u[c]]&&(u[c]=aZ(n,n.mapDimension(r[c]),u[c]));return t}}function tZ(e,t,n,i){var r={};return null!=e.valueIndex||null!=e.valueDim?(r.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,r.valueAxis=n.getAxis(nZ(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim),r.valueDataDim=t.mapDimension(r.valueAxis.dim)),r}function nZ(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function iZ(e,t){return!(e&&e.containData&&t.coord&&!KB(t))||e.containData(t.coord)}function rZ(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!KB(t)&&!KB(n))||e.containZone(t.coord,n.coord)}function oZ(e,t){return e?function(e,n,i,r){var o=r<2?e.coord&&e.coord[r]:e.value;return Va(o,t[r])}:function(e,n,i,r){return Va(e.value,t[r])}}function aZ(e,t,n){if("average"===n){var i=0,r=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,r++)})),i/r}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var sZ=ge(),lZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.init=function(){this.markerGroupMap=(0,d.createHashMap)()},t.prototype.render=function(e,t,n){var i=this,r=this.markerGroupMap;r.each((function(e){sZ(e).keep=!1})),t.eachSeries((function(e){var r=XB.getMarkerModelFromSeries(e,i.type);r&&i.renderSeries(e,r,t,n)})),r.each((function(e){!sZ(e).keep&&i.group.remove(e.group)}))},t.prototype.markKeep=function(e){sZ(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;(0,d.each)(e,(function(e){var i=XB.getMarkerModelFromSeries(e,n.type);if(i){var r=i.getData();r.eachItemGraphicEl((function(e){e&&(t?Et(e):Vt(e))}))}}))},t.type="marker",t}(nl),uZ=lZ;function cZ(e,t,n){var i=t.coordinateSystem;e.each((function(r){var o,a=e.getItemModel(r),s=_(a.get("x"),n.getWidth()),l=_(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,r));else if(i){var u=e.get(i.dimensions[0],r),c=e.get(i.dimensions[1],r);o=i.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(r,o)}))}var hZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=XB.getMarkerModelFromSeries(e,"markPoint");t&&(cZ(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Jy),u=dZ(r,e,t);t.setData(u),cZ(t.getData(),e,i),u.each((function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if((0,d.isFunction)(i)||(0,d.isFunction)(r)||(0,d.isFunction)(o)||(0,d.isFunction)(s)){var c=t.getRawValue(e),h=t.getDataParams(e);(0,d.isFunction)(i)&&(i=i(c,h)),(0,d.isFunction)(r)&&(r=r(c,h)),(0,d.isFunction)(o)&&(o=o(c,h)),(0,d.isFunction)(s)&&(s=s(c,h))}var p=n.getModel("itemStyle").getItemStyle(),f=ac(a,"color");p.fill||(p.fill=f),u.setItemVisual(e,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){Xe(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(uZ);function dZ(e,t,n){var i;i=e?(0,d.map)(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return(0,d.extend)((0,d.extend)({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new up(i,n),o=(0,d.map)(n.get("data"),(0,d.curry)(eZ,t));e&&(o=(0,d.filter)(o,(0,d.curry)(iZ,e)));var a=oZ(!!e,i);return r.initData(o,null,a),r}var pZ=hZ;function fZ(e){e.registerComponentModel(qB),e.registerComponentView(pZ),e.registerPreprocessor((function(e){HB(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})}))}var gZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(XB),yZ=gZ,mZ=ge(),vZ=function(e,t,n,i){var r,o=e.getData();if((0,d.isArray)(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=t.getAxis(null!=i.yAxis?"y":"x"),l=(0,d.retrieve)(i.yAxis,i.xAxis);else{var u=tZ(i,o,t,e);s=u.valueAxis;var c=Sp(o,u.valueDataDim);l=aZ(o,c,a)}var h="x"===s.dim?0:1,p=1-h,f=(0,d.clone)(i),g={coord:[]};f.type=null,f.coord=[],f.coord[p]=-1/0,g.coord[p]=1/0;var y=n.get("precision");y>=0&&(0,d.isNumber)(l)&&(l=+l.toFixed(Math.min(y,20))),f.coord[h]=g.coord[h]=l,r=[f,g,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var m=[eZ(e,r[0]),eZ(e,r[1]),(0,d.extend)({},r[2])];return m[2].type=m[2].type||null,(0,d.merge)(m[2],m[0]),(0,d.merge)(m[2],m[1]),m};function xZ(e){return!isNaN(e)&&!isFinite(e)}function _Z(e,t,n,i){var r=1-e,o=i.dimensions[e];return xZ(t[r])&&xZ(n[r])&&t[e]===n[e]&&i.getAxis(o).containData(t[e])}function bZ(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(_Z(1,n,i,e)||_Z(0,n,i,e)))return!0}return iZ(e,t[0])&&iZ(e,t[1])}function SZ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=_(s.get("x"),r.getWidth()),u=_(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);o=a.dataToPoint([h,d])}if(fm(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;xZ(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):xZ(e.get(c[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var wZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=XB.getMarkerModelFromSeries(e,"markLine");if(t){var i=t.getData(),r=mZ(t).from,o=mZ(t).to;r.each((function(t){SZ(r,t,!0,e,n),SZ(o,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[r.getItemLayout(e),o.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new EI);this.group.add(l.group);var u=MZ(r,e,t),c=u.from,h=u.to,p=u.line;mZ(t).from=c,mZ(t).to=h,t.setData(p);var f=t.get("symbol"),g=t.get("symbolSize"),y=t.get("symbolRotate"),m=t.get("symbolOffset");function v(t,n,r){var o=t.getItemModel(n);SZ(t,n,r,e,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=ac(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,d.retrieve2)(o.get("symbolOffset",!0),m[r?0:1]),symbolRotate:(0,d.retrieve2)(o.get("symbolRotate",!0),y[r?0:1]),symbolSize:(0,d.retrieve2)(o.get("symbolSize"),g[r?0:1]),symbol:(0,d.retrieve2)(o.get("symbol",!0),f[r?0:1]),style:s})}(0,d.isArray)(f)||(f=[f,f]),(0,d.isArray)(g)||(g=[g,g]),(0,d.isArray)(y)||(y=[y,y]),(0,d.isArray)(m)||(m=[m,m]),u.from.each((function(e){v(c,e,!0),v(h,e,!1)})),p.each((function(e){var t=p.getItemModel(e).getModel("lineStyle").getLineStyle();p.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),p.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:h.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(e,"symbolOffset"),toSymbolRotate:h.getItemVisual(e,"symbolRotate"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol"),style:t})})),l.updateData(p),u.line.eachItemGraphicEl((function(e){Xe(e).dataModel=t,e.traverse((function(e){Xe(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(uZ);function MZ(e,t,n){var i;i=e?(0,d.map)(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return(0,d.extend)((0,d.extend)({},n),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new up(i,n),o=new up(i,n),a=new up([],n),s=(0,d.map)(n.get("data"),(0,d.curry)(vZ,t,e,n));e&&(s=(0,d.filter)(s,(0,d.curry)(bZ,e)));var l=oZ(!!e,i);return r.initData((0,d.map)(s,(function(e){return e[0]})),null,l),o.initData((0,d.map)(s,(function(e){return e[1]})),null,l),a.initData((0,d.map)(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}var IZ=wZ;function TZ(e){e.registerComponentModel(yZ),e.registerComponentView(IZ),e.registerPreprocessor((function(e){HB(e.series,"markLine")&&(e.markLine=e.markLine||{})}))}var AZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(XB),DZ=AZ,CZ=ge(),LZ=function(e,t,n,i){var r=i[0],o=i[1];if(r&&o){var a=eZ(e,r),s=eZ(e,o),l=a.coord,u=s.coord;l[0]=(0,d.retrieve)(l[0],-1/0),l[1]=(0,d.retrieve)(l[1],-1/0),u[0]=(0,d.retrieve)(u[0],1/0),u[1]=(0,d.retrieve)(u[1],1/0);var c=(0,d.mergeAll)([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function PZ(e){return!isNaN(e)&&!isFinite(e)}function kZ(e,t,n,i){var r=1-e;return PZ(t[r])&&PZ(n[r])}function OZ(e,t){var n=t.coord[0],i=t.coord[1],r={coord:n,x:t.x0,y:t.y0},o={coord:i,x:t.x1,y:t.y1};return fm(e,"cartesian2d")?!(!n||!i||!kZ(1,n,i,e)&&!kZ(0,n,i,e))||rZ(e,r,o):iZ(e,r)||iZ(e,o)}function NZ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=_(s.get(n[0]),r.getWidth()),u=_(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),d=a.clampData(c),p=a.clampData(h),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?h[0]:c[0]:f[0]=d[0]>p[0]?c[0]:h[0],"y0"===n[1]?f[1]=d[1]>p[1]?h[1]:c[1]:f[1]=d[1]>p[1]?c[1]:h[1],o=i.getMarkerPosition(f,n,!0)}else{var g=e.get(n[0],t),y=e.get(n[1],t),m=[g,y];a.clampData&&a.clampData(m,m),o=a.dataToPoint(m,!0)}if(fm(a,"cartesian2d")){var v=a.getAxis("x"),x=a.getAxis("y");g=e.get(n[0],t),y=e.get(n[1],t);PZ(g)?o[0]=v.toGlobalCoord(v.getExtent()["x0"===n[0]?0:1]):PZ(y)&&(o[1]=x.toGlobalCoord(x.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var RZ=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],EZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=XB.getMarkerModelFromSeries(e,"markArea");if(t){var i=t.getData();i.each((function(t){var r=(0,d.map)(RZ,(function(r){return NZ(i,t,r,e,n)}));i.setItemLayout(t,r);var o=i.getItemGraphicEl(t);o.setShape("points",r)}))}}),this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new el.Z});this.group.add(l.group),this.markKeep(l);var u=VZ(r,e,t);t.setData(u),u.each((function(t){var n=(0,d.map)(RZ,(function(n){return NZ(u,t,n,e,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],p=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];S(h),S(p);var f=!(l[0]>h[1]||l[1]p[1]||c[1]=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{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}(Ir),FZ=GZ,HZ=d.curry,WZ=d.each,UZ=el.Z,YZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return(0,c.ZT)(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new UZ),this.group.add(this._selectorGroup=new UZ),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var r=e.get("align"),o=e.get("orient");r&&"auto"!==r||(r="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=gr(l,u,c),p=this.layoutInner(e,r,h,i,a,s),f=gr(d.defaults({width:p.width,height:p.height},l),u,c);this.group.x=f.x-p.x,this.group.y=f.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=JE(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,i,r,o,a){var s=this.getContentGroup(),l=d.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),WZ(t.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var h=new UZ;return h.newline=!0,void s.add(h)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var f=p.getData(),g=f.getVisual("legendLineStyle")||{},y=f.getVisual("legendIcon"),m=f.getVisual("style"),v=this._createItem(p,a,o,r,t,e,g,m,y,u,i);v.on("click",HZ(qZ,a,null,i,c)).on("mouseover",HZ(JZ,p.name,null,i,c)).on("mouseout",HZ($Z,p.name,null,i,c)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var h=s.indexOfName(a),p=s.getItemVisual(h,"style"),f=s.getItemVisual(h,"legendIcon"),g=(0,qe.parse)(p.fill);g&&0===g[3]&&(g[3]=.2,p=d.extend(d.extend({},p),{fill:(0,qe.stringify)(g,"rgba")}));var y=this._createItem(n,a,o,r,t,e,{},p,f,u,i);y.on("click",HZ(qZ,null,a,i,c)).on("mouseover",HZ(JZ,null,a,i,c)).on("mouseout",HZ($Z,null,a,i,c)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,t,i,o,a)},t.prototype._createSelector=function(e,t,n,i,r){var o=this.getSelectorGroup();WZ(e,(function(e){var i=e.type,r=new Ue.ZP({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r);var a=t.getModel("selectorLabel"),s=t.getModel(["emphasis","selectorLabel"]);Tn(r,{normal:a,emphasis:s},{defaultText:e.title}),Jt(r)}))},t.prototype._createItem=function(e,t,n,i,r,o,a,s,l,u,c){var h=e.visualDrawType,p=r.get("itemWidth"),f=r.get("itemHeight"),g=r.isSelected(t),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),v=i.get("icon");l=v||l||"roundRect";var x=XZ(l,i,a,s,h,g,c),_=new UZ,b=i.getModel("textStyle");if(!d.isFunction(e.getLegendIcon)||v&&"inherit"!==v){var S="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===y?e.getData().getVisual("symbolRotate"):y:0;_.add(jZ({itemWidth:p,itemHeight:f,icon:l,iconRotate:S,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}))}else _.add(e.getLegendIcon({itemWidth:p,itemHeight:f,icon:l,iconRotate:y,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:m}));var w="left"===o?p+5:-5,M=o,I=r.get("formatter"),T=t;d.isString(I)&&I?T=I.replace("{name}",null!=t?t:""):d.isFunction(I)&&(T=I(t));var A=i.get("inactiveColor");_.add(new Ue.ZP({style:Dn(b,{text:T,x:w,y:f/2,fill:g?b.getTextColor():A,align:M,verticalAlign:"middle"})}));var D=new gl.Z({shape:_.getBoundingRect(),invisible:!0}),C=i.getModel("tooltip");return C.get("show")&&tu({el:D,componentModel:r,itemName:t,itemTooltipOption:C.option}),_.add(D),_.eachChild((function(e){e.silent=!0})),D.silent=!u,this.getContentGroup().add(_),Jt(_),_.__legendDataIndex=n,_},t.prototype.layoutInner=function(e,t,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();pr(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){pr("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",y=0===p?"y":"x";"end"===o?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=l[f]+d+c[f],m[g]=Math.max(l[g],c[g]),m[y]=Math.min(0,c[y]+h[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(nl);function XZ(e,t,n,i,r,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),WZ(e,(function(n,i){"inherit"===e[i]&&(e[i]=t[i])}))}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",h=l.getShallow("decal");u.decal=h&&"inherit"!==h?Pc(h,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]),"inherit"===u.stroke&&(u.stroke=i[c]),"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity),s(u,i);var d=t.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}function jZ(e){var t=e.icon||"roundRect",n=wc(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function qZ(e,t,n,i){$Z(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),JZ(e,t,n,i)}function KZ(e){var t,n=e.getZr().storage.getDisplayList(),i=0,r=n.length;while(in[r],g=[-h.x,-h.y];t||(g[i]=l[s]);var y=[0,0],m=[-p.x,-p.y],v=d.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(f){var x=e.get("pageButtonPosition",!0);"end"===x?m[i]+=n[r]-p[r]:y[i]+=p[r]+v}m[1-i]+=h[o]/2-p[o]/2,l.setPosition(g),u.setPosition(y),c.setPosition(m);var _={x:0,y:0};if(_[r]=f?n[r]:h[r],_[o]=Math.max(h[o],p[o]),_[a]=Math.min(0,p[a]+m[1-i]),u.__rectSize=n[r],f){var b={x:0,y:0};b[r]=Math.max(n[r]-p[r]-v,0),b[o]=_[o],u.setClipPath(new gl.Z({shape:b})),u.__rectSize=b[r]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var S=this._getPageInfo(e);return null!=S.pageIndex&&gn(l,{x:S.contentPosition[0],y:S.contentPosition[1]},f?e:null),this._updatePageInfoView(e,S),_},t.prototype._pageGo=function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;d.each(["pagePrev","pageNext"],(function(i){var r=i+"DataIndex",o=null!=t[r],a=n.childOfName(i);a&&(a.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")}));var i=n.childOfName("pageText"),r=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;i&&r&&i.setStyle("text",d.isString(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=e.getOrient().index,o=lG[r],a=uG[r],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=v(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,y=p,m=null;f<=c;++f)m=v(l[f]),(!m&&y.e>g.s+i||m&&!x(m,g.s))&&(g=y.i>g.i?y:m,g&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount)),y=m;for(f=s-1,g=p,y=p,m=null;f>=-1;--f)m=v(l[f]),m&&x(y,m.s)||!(g.i=t&&e.s<=t+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n,i=this.getContentGroup();return i.eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===e&&(t=r)})),null!=t?t:n},t.type="legend.scroll",t}(QZ),hG=cG;function dG(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}function pG(e){Cd(iG),e.registerComponentModel(aG),e.registerComponentView(hG),dG(e)}function fG(e){Cd(iG),Cd(pG)}var gG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="dataZoom.inside",t.defaultOption=ii(TE.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(TE),yG=gG,mG=ge();function vG(e,t,n){mG(e).coordSysRecordMap.each((function(e){var i=e.dataZoomInfoMap.get(t.uid);i&&(i.getRange=n)}))}function xG(e,t){for(var n=mG(e).coordSysRecordMap,i=n.keys(),r=0;ri[n+t]&&(t=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}function IG(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=mG(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=(0,d.createHashMap)());i.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){var n=SE(e);(0,d.each)(n.infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,bG(t,n.model)),a=o.dataZoomInfoMap||(o.dataZoomInfoMap=(0,d.createHashMap)());a.set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),i.each((function(e){var t,n=e.controller,r=e.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(t=r.get(o))}if(t){var a=MG(r);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),mu(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else _G(i,e)}))}))}var TG=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return(0,c.ZT)(t,e),t.prototype.render=function(t,n,i){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),vG(i,t,{pan:(0,d.bind)(AG.pan,this),zoom:(0,d.bind)(AG.zoom,this),scrollMove:(0,d.bind)(AG.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){xG(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(LE),AG={zoom:function(e,t,n,i){var r=this.range,o=r.slice(),a=e.axisModels[0];if(a){var s=CG[t](null,[i.originX,i.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return eA(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:DG((function(e,t,n,i,r,o){var a=CG[i]([o.oldX,o.oldY],[o.newX,o.newY],t,r,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:DG((function(e,t,n,i,r,o){var a=CG[i]([0,0],[o.scrollDelta,o.scrollDelta],t,r,n);return a.signal*(e[1]-e[0])*o.scrollDelta}))};function DG(e){return function(t,n,i,r){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s){var l=e(a,s,t,n,i,r);return eA(l,a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}var CG={grid:function(e,t,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},LG=TG;function PG(e){FE(e),e.registerComponentModel(yG),e.registerComponentView(LG),IG(e)}var kG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=ii(TE.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(TE),OG=kG,NG=gl.Z,RG=7,EG=1,VG=30,zG=7,BG="horizontal",ZG="vertical",GG=5,FG=["line","bar","candlestick","scatter"],HG={easing:"cubicOut",duration:100,delay:0},WG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=(0,d.bind)(this._onBrush,this),this._onBrushEnd=(0,d.bind)(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,r){if(e.prototype.render.apply(this,arguments),mu(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vu(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new el.Z;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),i=n?zG:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},a=this._orient===BG?{right:o.width-r.x-r.width,top:o.height-VG-RG-i,width:r.width,height:VG}:{right:RG,top:r.y,width:VG,height:r.height},s=_r(e.option);(0,d.each)(["right","top","width","height"],(function(e){"ph"===s[e]&&(s[e]=a[e])}));var l=gr(s,o);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===ZG&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==BG||r?n===BG&&r?{scaleY:a?1:-1,scaleX:-1}:n!==ZG||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new NG({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var r=new NG({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:(0,d.bind)(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],i=e.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=r.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var h,d=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],y=p[1]/(r.count()-1),m=0,v=Math.round(r.count()/t[0]);r.each([a],(function(e,t){if(v>0&&t%v)m+=y;else{var n=null==e||isNaN(e)||""===e,i=n?0:x(e,u,d,!0);n&&!h&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([m,0]),g.push([m,0])),f.push([m,i]),g.push([m,i]),m+=y,h=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var _=this.dataZoomModel,b=0;b<3;b++){var S=w(1===b);this._displayables.sliderGroup.add(S),this._displayables.dataShadowSegs.push(S)}}}function w(e){var t=_.getModel(e?"selectedDataBackground":"dataBackground"),n=new el.Z,i=new pl.Z({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new fl.Z({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(r,o){var a=e.getAxisProxy(r,o).getTargetSeriesModels();(0,d.each)(a,(function(e){if(!n&&!(!0!==t&&(0,d.indexOf)(FG,e.get("type"))<0)){var a,s=i.getComponent(_E(r),o).axis,l=UG(r),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],i=t.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new NG({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new NG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:EG,fill:"rgba(0,0,0,0)"}})),(0,d.each)([0,1],(function(t){var o=a.get("handleIcon");!_c[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=wc(o,-1,0,2,2,null,!0);s.attr({cursor:YG(this._orient),draggable:!0,drift:(0,d.bind)(this._onDragMove,this,t),ondragend:(0,d.bind)(this._onDragEnd,this),onmouseover:(0,d.bind)(this._showDataInfo,this,!0),onmouseout:(0,d.bind)(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=_(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Jt(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[t]=s);var h=a.getModel("textStyle");e.add(i[t]=new Ue.ZP({silent:!0,invisible:!0,style:Dn(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))}),this);var h=c;if(u){var p=_(a.get("moveHandleSize"),o[1]),f=t.moveHandle=new gl.Z({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),g=.8*p,y=t.moveHandleIcon=wc(a.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=o[1]+p/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(p,10));h=t.moveZone=new gl.Z({invisible:!0,shape:{y:o[1]-m,height:p+m}}),h.on("mouseover",(function(){s.enterEmphasis(f)})).on("mouseout",(function(){s.leaveEmphasis(f)})),r.add(f),r.add(y),r.add(h)}h.attr({draggable:!0,cursor:YG(this._orient),drift:(0,d.bind)(this._onDragMove,this,"all"),ondragstart:(0,d.bind)(this._showDataInfo,this,!0),ondragend:(0,d.bind)(this._onDragEnd,this),onmouseover:(0,d.bind)(this._showDataInfo,this,!0),onmouseout:(0,d.bind)(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[x(e[0],[0,100],t,!0),x(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];eA(t,i,r,n.get("zoomLock")?"all":e,null!=o.minSpan?x(o.minSpan,a,r,!0):null,null!=o.maxSpan?x(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=S([x(i[0],r,a,!0),x(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,i=S(n.slice()),r=this._size;(0,d.each)([0,1],(function(e){var i=t.handles[e],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:r[1]/2-o/2})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new wl.Z(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=S([x(n.x,r,o,!0),x(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(B_.sT(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new NG({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?HG:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=SE(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),r=this.api.getHeight();e={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return e},t.type="dataZoom.slider",t}(LE);function UG(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function YG(e){return"vertical"===e?"ns-resize":"ew-resize"}var XG=WG;function jG(e){e.registerComponentModel(OG),e.registerComponentView(XG),FE(e)}function qG(e){Cd(PG),Cd(jG)}var KG={get:function(e,t,n){var i=d.clone((JG[e]||{})[t]);return n&&d.isArray(i)?i[i.length-1]:i}},JG={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},$G=KG,QG=lM.mapVisual,eF=lM.eachVisual,tF=d.isArray,nF=d.each,iF=S,rF=x,oF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,c.ZT)(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&Hz(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=d.bind(e,this),this.controllerVisuals=Fz(this.option.controller,t,e),this.targetVisuals=Fz(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=X(e),t},t.prototype.eachTargetSeries=function(e,t){d.each(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(t,i)}),this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},t.prototype.formatValueText=function(e,t,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],d.isArray(e)&&(e=e.slice(),i=!0);var l=t?e:i?[u(e[0]),u(e[1])]:u(e);return d.isString(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):d.isFunction(s)?i?s(e[0],e[1]):s(e):i?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=iF([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=e.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),r=t.controller||(t.controller={});d.merge(i,n),d.merge(r,n);var o=this.isCategory();function a(n){tF(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}function s(e,t,n){var i=e[t],r=e[n];i&&!r&&(r=e[n]={},nF(i,(function(e,t){if(lM.isValidType(t)){var n=$G.get(t,"inactive",o);null!=n&&(r[t]=n,"color"!==t||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}function l(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol(),a=r||"roundRect";nF(this.stateList,(function(r){var s=this.itemSize,l=e[r];l||(l=e[r]={color:o?i:[i]}),null==l.symbol&&(l.symbol=t&&d.clone(t)||(o?a:[a])),null==l.symbolSize&&(l.symbolSize=n&&d.clone(n)||(o?s[0]:[s[0],s[0]])),l.symbol=QG(l.symbol,(function(e){return"none"===e?a:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;eF(u,(function(e){e>c&&(c=e)})),l.symbolSize=QG(u,(function(e){return rF(e,[0,c],[0,s[0]],!0)}))}}),this)}a.call(this,i),a.call(this,r),s.call(this,i,"inRange","outOfRange"),l.call(this,r)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(Ir),aF=oF,sF=[20,140],lF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=sF[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=sF[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):d.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),d.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=S((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},t.prototype.getVisualMeta=function(e){var t=uF(this,"outOfRange",this.getExtent()),n=uF(this,"inRange",this.option.range.slice()),i=[];function r(t,n){i.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,l=t.length;ae[1])break;i.push({color:this.getControllerVisual(a,"color",t),offset:o/n})}return i.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),i},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new el.Z("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();mF([0,1],(function(l){var u=r[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=yF(e[l],[0,a[1]],s,!0),h=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=h/a[0],u.x=a[0]-h/2;var d=Hl(n.handleLabelPoints[l],Fl(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c={convertOpacityToAlpha:!0},h=this.getControllerVisual(e,"color",c),d=this.getControllerVisual(e,"symbolSize"),p=yF(e,o,s,!0),f=a[0]-d/2,g={x:u.x,y:u.y};u.y=p,u.x=f;var y=Hl(l.indicatorLabelPoint,Fl(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),x=this._orient,_="horizontal"===x;m.setStyle({text:(n||"")+r.formatValueText(t),verticalAlign:_?v:"middle",align:_?"center":v});var b={x:f,y:p,style:{fill:h}},S={style:{x:y[0],y:y[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=g.x,u.y=g.y,u.animateTo(b,w),m.animateTo(S,w)}else u.attr(b),m.attr(S);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var I=0;Ir[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,h=[];(t||IF(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=pe(c,h);this._dispatchHighDown("downplay",gF(d[0],n)),this._dispatchHighDown("highlight",gF(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(hc(e.target,(function(e){var n=Xe(e);if(null!=n.dataIndex)return t=n,!0}),!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var r=n.getData(t.dataType),o=r.getStore().get(i.getDataDimensionIndex(r),t.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(r.dimension=o,i.push(r))}})),e.getData().setVisual("visualMeta",i)}}];function PF(e,t,n,i){for(var r=t.targetVisuals[i],o=lM.prepareVisualTypes(r),a={color:ac(e.getData(),"color")},s=0,l=o.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(DF,CF),(0,d.each)(LF,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(OF))}function VF(e){e.registerComponentModel(cF),e.registerComponentView(AF),EF(e)}var zF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return(0,c.ZT)(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],BF[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var r=this.option.categories;this.resetVisual((function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=d.clone(r)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=d.map(this._pieceList,(function(e){return e=d.clone(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},i=lM.listVisualTypes(),r=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}d.each(t.pieces,(function(e){d.each(i,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),d.each(n,(function(e,n){var i=!1;d.each(this.stateList,(function(e){i=i||o(t,e,n)||o(t.target,e,n)}),this),!i&&d.each(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=$G.get(n,"inRange"===e?"active":"inactive",r)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,i=this._pieceList,r=(t?n:e).selected||{};if(n.selected=r,d.each(i,(function(e,t){var n=this.getSelectedMapKey(e);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;d.each(i,(function(e,t){var n=this.getSelectedMapKey(e);r[n]&&(o?r[n]=!1:o=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=d.clone(e)},t.prototype.getValueState=function(e){var t=lM.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(t,i){var o=lM.findPieceIndex(t,n);o===e&&r.push(i)}),this),t.push({seriesId:i.id,dataIndex:r})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),o=r[r.length-1].interval[1],o!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return d.each(r,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=e(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:t.push({value:r[0],color:s},{value:r[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=ii(aF.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(aF),BF={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;var o=(i[1]-i[0])/r;while(+o.toFixed(n)!==o&&n<5)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function ZF(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var GF=zF,FF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,c.ZT)(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=d.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),d.each(l.viewPieceList,(function(i){var l=i.piece,u=new el.Z;u.onclick=d.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var p=this.visualMapModel.getValueState(h);u.add(new Ue.ZP({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,a),pr(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(e){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:e,batch:gF(i.findTargetDataIndices(t),i)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return fF(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,i,r){if(t){var o=new el.Z,a=this.visualMapModel.textStyleModel;o.add(new Ue.ZP({style:Dn(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=d.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),i=e.get("orient"),r=e.get("inverse");return("horizontal"===i?r:!r)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(wc(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,i=n.selectedMode;if(i){var r=d.clone(n.selected),o=t.getSelectedMapKey(e);"single"===i||!0===i?(r[o]=!0,d.each(r,(function(e,t){r[t]=t===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},t.type="visualMap.piecewise",t}(dF),HF=FF;function WF(e){e.registerComponentModel(GF),e.registerComponentView(HF),EF(e)}function UF(e){Cd(VF),Cd(WF)}var YF={label:{enabled:!0},decal:{show:!1}},XF=ge(),jF={};function qF(e,t){var n=e.getModel("aria");if(n.get("enabled")){var i=d.clone(YF);d.merge(i.label,e.getLocaleModel().get("aria"),!1),d.merge(n.option,i,!1),r(),o()}function r(){var t=n.getModel("decal"),i=t.get("show");if(i){var r=d.createHashMap();e.eachSeries((function(e){if(!e.isColorBySeries()){var t=r.get(e.type);t||(t={},r.set(e.type,t)),XF(e).scope=t}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(d.isFunction(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var i=no(t.ecModel,t.name,jF,e.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=t.getRawData(),a={},s=XF(t).scope;n.each((function(e){var t=n.getRawIndex(e);a[t]=e}));var l=o.count();o.each((function(e){var i=a[e],r=o.getName(e)||e+"",c=no(t.ecModel,r,s,l),h=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(h,c))}))}}function u(e,t){var n=e?d.extend(d.extend({},t),e):t;return n.dirty=!0,n}}))}}function o(){var i=e.getLocaleModel().get("aria"),r=n.getModel("label");if(r.option=d.defaults(r.option,i),r.get("enabled")){var o=t.getZr().dom;if(r.get("description"))o.setAttribute("aria-label",r.get("description"));else{var u,c=e.getSeriesCount(),h=r.get(["data","maxCount"])||10,p=r.get(["series","maxCount"])||10,f=Math.min(c,p);if(!(c<1)){var g=s();if(g){var y=r.get(["general","withTitle"]);u=a(y,{title:g})}else u=r.get(["general","withoutTitle"]);var m=[],v=c>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]);u+=a(v,{seriesCount:c}),e.eachSeries((function(e,t){if(t1?r.get(["series","multiple",o]):r.get(["series","single",o]),n=a(n,{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:l(e.subType)});var s=e.getData();if(s.count()>h){var u=r.get(["data","partialData"]);n+=a(u,{displayCnt:h})}else n+=r.get(["data","allData"]);for(var d=r.get(["data","separator","middle"]),p=r.get(["data","separator","end"]),g=[],y=0;y":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},QF=function(){function e(e){var t=this._condVal=(0,d.isString)(e)?new RegExp(e):(0,d.isRegExp)(e)?e:null;if(null==t){var n="";0,Ea(n)}}return e.prototype.evaluate=function(e){var t=typeof e;return(0,d.isString)(t)?this._condVal.test(e):!!(0,d.isNumber)(t)&&this._condVal.test(e+"")},e}(),eH=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),tH=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var bH={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);xH(e)&&(s=e,l=t),xH(t)&&(s=t,l=e);for(var h=s?s===e:e.length>t.length,p=s?_H(l,s):_H(h?t:e,[h?e:t]),f=0,g=0;gMH))for(var i=n.getIndices(),r=TH(n),o=0;o0&&r.group.traverse((function(e){e instanceof Ke.ZP&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)}))}))}function NH(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function RH(e){return(0,d.isArray)(e)?e.sort().join(","):e}function EH(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function VH(e,t){var n=(0,d.createHashMap)(),i=(0,d.createHashMap)(),r=(0,d.createHashMap)();return(0,d.each)(e.oldSeries,(function(t,n){var o=e.oldDataGroupIds[n],a=e.oldData[n],s=NH(t),l=RH(s);i.set(l,{dataGroupId:o,data:a}),(0,d.isArray)(s)&&(0,d.each)(s,(function(e){r.set(e,{key:l,dataGroupId:o,data:a})}))})),(0,d.each)(t.updatedSeries,(function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),o=e.getData(),a=NH(e),s=RH(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:EH(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:EH(o),data:o}]});else if((0,d.isArray)(a)){0;var u=[];(0,d.each)(a,(function(e){var t=i.get(e);t.data&&u.push({dataGroupId:t.dataGroupId,divide:EH(t.data),data:t.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:t,data:o,divide:EH(o)}]})}else{var c=r.get(a);if(c){var h=n.get(c.key);h||(h={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:EH(c.data)}],newSeries:[]},n.set(c.key,h)),h.newSeries.push({dataGroupId:t,data:o,divide:EH(o)})}}}})),n}function zH(e,t){for(var n=0;n=0&&r.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:EH(t.oldData[n]),dim:e.dimension})})),(0,d.each)(X(e.to),(function(e){var i=zH(n.updatedSeries,e);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:t.oldDataGroupIds[i],data:r,divide:EH(r),dim:e.dimension})}})),r.length>0&&o.length>0&&OH(r,o,i)}function ZH(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){(0,d.each)(X(n.seriesTransition),(function(e){(0,d.each)(X(e.to),(function(e){for(var t=n.updatedSeries,i=0;i