@8btc/wujie-ppt 0.0.14-beta → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PPTCanvas.d.ts +2 -17
- package/dist/types/edit.d.ts +6 -6
- package/dist/types/slides.d.ts +43 -27
- package/dist/wujie-ppt.es.js +158 -149
- package/dist/wujie-ppt.umd.js +3 -3
- package/package.json +1 -1
- package/dist/hooks/useExport.util.d.ts +0 -0
package/dist/wujie-ppt.umd.js
CHANGED
|
@@ -34,10 +34,10 @@ echarts.use([`+n+"]);"),Fu[n]=!0)}})}var B0=function(e){fe(t,e);function t(){ret
|
|
|
34
34
|
import { `+P+` } from 'echarts/charts';
|
|
35
35
|
echarts.use([`+P+"]);":"Unknown series "+E))}return}if(f==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(b||(kt("Currently only one tooltip component is allowed."),b=!0));return}_=!0}if(T&&T.constructor===C)T.name=w.keyInfo.name,T.mergeOption(L,this),T.optionUpdated(L,!1);else{var D=se({componentIndex:x},w.keyInfo);T=new C(L,this,this,D),se(T,D),w.brandNew&&(T.__requireNewView=!0),T.init(L,this,this),T.optionUpdated(null,!0)}}T?(g.push(T.option),m.push(T),y++):(g.push(void 0),m.push(void 0))},this),i[f]=g,a.set(f,m),o.set(f,y),f==="series"&&zu(this)}this._seriesIndices||zu(this)},t.prototype.getOption=function(){var r=Be(this.option);return V(r,function(n,i){if(Ye.hasClass(i)){for(var a=zt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Da(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[I0],r},t.prototype.setTheme=function(r){this._theme=new mt(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],V(zt(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=L2("id",a,s):o!=null?l=L2("name",o,s):l=vt(s,function(u){return!!u}),E2(l,r)},t.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):vt(this._componentsMap.get(i),function(u){return!!u});return l(E2(o,r));function s(u){var c=i+"Index",f=i+"Id",d=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[d]!=null)?{mainType:i,index:u[c],id:u[f],name:u[d]}:null}function l(u){return r.filter?vt(u,r.filter):u}},t.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(Le(r)){var o=n,s=r;a.each(function(f,d){for(var h=0;f&&h<f.length;h++){var p=f[h];p&&s.call(o,d,p,p.componentIndex)}})}else for(var l=we(r)?a.get(r):xe(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=Zr(r,null);return vt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},t.prototype.getSeriesByType=function(r){return vt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return vt(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){ss(this),V(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},t.prototype.eachRawSeries=function(r,n){V(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(r,n,i){ss(this),V(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(r,n,i){return V(this.getSeriesByType(r),n,i)},t.prototype.isSeriesFiltered=function(r){return ss(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){ss(this);var i=[];V(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ne(i)},t.prototype.restoreData=function(r){zu(this);var n=this._componentsMap,i=[];n.each(function(a,o){Ye.hasClass(o)&&i.push(o)}),Ye.topologicalTravel(i,Ye.getAllClassMainTypes(),function(a){V(n.get(a),function(o){o&&(a!=="series"||!bT(o,r))&&o.restoreData()})})},t.internalField=function(){zu=function(r){var n=r._seriesIndices=[];V(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ne(n)},ss=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},x2=function(r,n){r.option={},r.option[I0]=T2,r._componentsMap=Ne({series:[]}),r._componentsCount=Ne();var i=n.aria;xe(i)&&i.enabled==null&&(i.enabled=!0),ST(n,r._theme.option),je(n,sT,!1),r._mergeOption(n,null)}}(),t}(mt);function bT(e,t){if(t){var r=t.seriesIndex,n=t.seriesId,i=t.seriesName;return r!=null&&e.componentIndex!==r||n!=null&&e.id!==n||i!=null&&e.name!==i}}function ST(e,t){var r=e.color&&!e.colorLayer;V(t,function(n,i){i==="colorLayer"&&r||i==="color"&&e.color||Ye.hasClass(i)||(typeof n=="object"?e[i]=e[i]?je(e[i],n,!1):Be(n):e[i]==null&&(e[i]=n))})}function L2(e,t,r){if(me(t)){var n=Ne();return V(t,function(a){if(a!=null){var o=Zr(a,null);o!=null&&n.set(a,!0)}}),vt(r,function(a){return a&&n.get(a[e])})}else{var i=Zr(t,null);return vt(r,function(a){return a&&i!=null&&a[e]===i})}}function E2(e,t){return t.hasOwnProperty("subType")?vt(e,function(r){return r&&r.subType===t.subType}):e}function M2(e){var t=Ne();return e&&V(zt(e.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&be(Ye.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),t.set(r,!0)}),{replaceMergeMainTypeMap:t}}Cr(B0,O0);var wT=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],C2=function(){function e(t){V(wT,function(r){this[r]=ot(t[r],t)},this)}return e}(),xT=/^(min|max)?(.+)$/,TT=function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(V(zt(t.series),function(o){o&&o.data&&Vt(o.data)&&yf(o.data)}),V(zt(t.dataset),function(o){o&&o.source&&Vt(o.source)&&yf(o.source)})),t=Be(t);var i=this._optionBackup,a=LT(t,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},e.prototype.mountOption=function(t){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Be(t?r.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var r,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(r=Be(n[i.getCurrentIndex()]))}return r},e.prototype.getMediaOption=function(t){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)ET(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!CT(o,this._currentMediaIndices)&&(s=ve(o,function(c){return Be(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},e}();function LT(e,t,r){var n=[],i,a,o=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(e.options=e.media=null),a=e),c&&(me(u)?V(u,function(h){process.env.NODE_ENV!=="production"&&h&&!h.option&&xe(h.query)&&xe(h.query.option)&&Ue("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),h&&h.option&&(h.query?n.push(h):i||(i=h))}):process.env.NODE_ENV!=="production"&&Ue("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),d(a),V(l,function(h){return d(h)}),V(n,function(h){return d(h.option)});function d(h){V(t,function(p){p(h,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function ET(e,t,r){var n={width:t,height:r,aspectratio:t/r},i=!0;return V(e,function(a,o){var s=o.match(xT);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();MT(n[u],a,l)||(i=!1)}}),i}function MT(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function CT(e,t){return e.join(",")===t.join(",")}var Sr=V,ls=xe,D2=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function $0(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=D2.length;r<n;r++){var i=D2[r],a=t.normal,o=t.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&>("itemStyle.normal."+i,i),e[i]=e[i]||{},e[i].normal?je(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&>("itemStyle.emphasis."+i,"emphasis."+i),e[i]=e[i]||{},e[i].emphasis?je(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function It(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,i=e[t].emphasis;n&&(process.env.NODE_ENV!=="production"&&dn("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),r?(e[t].normal=e[t].emphasis=null,Re(e[t],n)):e[t]=n),i&&(process.env.NODE_ENV!=="production"&&dn(t+".emphasis has been changed to emphasis."+t+" since 4.0"),e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function us(e){It(e,"itemStyle"),It(e,"lineStyle"),It(e,"areaStyle"),It(e,"label"),It(e,"labelLine"),It(e,"upperLabel"),It(e,"edgeLabel")}function ct(e,t){var r=ls(e)&&e[t],n=ls(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&dn("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var i=0,a=gg.length;i<a;i++){var o=gg[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function wr(e){e&&(us(e),ct(e,"label"),e.emphasis&&ct(e.emphasis,"label"))}function DT(e){if(ls(e)){$0(e),us(e),ct(e,"label"),ct(e,"upperLabel"),ct(e,"edgeLabel"),e.emphasis&&(ct(e.emphasis,"label"),ct(e.emphasis,"upperLabel"),ct(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&($0(t),wr(t));var r=e.markLine;r&&($0(r),wr(r));var n=e.markArea;n&&wr(n);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!Vt(a))for(var o=0;o<a.length;o++)wr(a[o]);V(e.categories,function(u){us(u)})}if(i&&!Vt(i))for(var o=0;o<i.length;o++)wr(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)wr(s[o]);if(r=e.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)me(l[o])?(wr(l[o][0]),wr(l[o][1])):wr(l[o]);e.type==="gauge"?(ct(e,"axisLabel"),ct(e,"title"),ct(e,"detail")):e.type==="treemap"?(It(e.breadcrumb,"itemStyle"),V(e.levels,function(u){us(u)})):e.type==="tree"&&us(e.leaves)}}function yn(e){return me(e)?e:e?[e]:[]}function A2(e){return(me(e)?e[0]:e)||{}}function AT(e,t){Sr(yn(e.series),function(n){ls(n)&&DT(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Sr(r,function(n){Sr(yn(e[n]),function(i){i&&(ct(i,"axisLabel"),ct(i.axisPointer,"label"))})}),Sr(yn(e.parallel),function(n){var i=n&&n.parallelAxisDefault;ct(i,"axisLabel"),ct(i&&i.axisPointer,"label")}),Sr(yn(e.calendar),function(n){It(n,"itemStyle"),ct(n,"dayLabel"),ct(n,"monthLabel"),ct(n,"yearLabel")}),Sr(yn(e.radar),function(n){ct(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&dn("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&dn("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Sr(n.indicator,function(i){i.text&>("text","name","radar.indicator")})}),Sr(yn(e.geo),function(n){ls(n)&&(wr(n),Sr(yn(n.regions),function(i){wr(i)}))}),Sr(yn(e.timeline),function(n){wr(n),It(n,"label"),It(n,"itemStyle"),It(n,"controlStyle",!0);var i=n.data;me(i)&&V(i,function(a){xe(a)&&(It(a,"label"),It(a,"itemStyle"))})}),Sr(yn(e.toolbox),function(n){It(n,"iconStyle"),Sr(n.feature,function(i){It(i,"iconStyle")})}),ct(A2(e.axisPointer),"label"),ct(A2(e.tooltip).axisPointer,"label")}function kT(e,t){for(var r=t.split(","),n=e,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function PT(e,t,r,n){for(var i=t.split(","),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function k2(e){e&&V(NT,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var NT=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],OT=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],R0=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function cs(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<R0.length;r++){var n=R0[r][1],i=R0[r][0];t[n]!=null&&(t[i]=t[n],process.env.NODE_ENV!=="production"&>(n,i))}}function P2(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(process.env.NODE_ENV!=="production"&>("label.margin","label.edgeDistance","pie"),e.edgeDistance=e.margin)}function N2(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,process.env.NODE_ENV!=="production"&>("downplay","blur","sunburst"))}function IT(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&>("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),e.emphasis.focus="adjacency"))}function O2(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&O2(e[r].children,t)}function I2(e,t){AT(e,t),e.series=zt(e.series),V(e.series,function(r){if(xe(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&>("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&>("clockWise","clockwise")),P2(r.label);var i=r.data;if(i&&!Vt(i))for(var a=0;a<i.length;a++)P2(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&>("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=kT(r,"pointer.color");o!=null&&PT(r,"itemStyle.color",o)}else if(n==="bar"){cs(r),cs(r.backgroundStyle),cs(r.emphasis);var i=r.data;if(i&&!Vt(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(cs(i[a]),cs(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&>("highlightPolicy","emphasis.focus","sunburst"))),N2(r),O2(r.data,N2)}else n==="graph"||n==="sankey"?IT(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&>("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&dn("`mapLocation` is not used anymore."),Re(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&>("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),k2(r)}}),e.dataRange&&(e.visualMap=e.dataRange),V(OT,function(r){var n=e[r];n&&(me(n)||(n=[n]),V(n,function(i){k2(i)}))})}function BT(e){var t=Ne();e.eachSeries(function(r){var n=r.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),V(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),$T(r)}})}function $T(e){V(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var d=o.get(t.stackedDimension,f);if(isNaN(d))return i;var h,p;s?p=o.getRawIndex(f):h=o.get(t.stackedByDimension,f);for(var v=NaN,g=r-1;g>=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,h)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&d>=0&&y>0||l==="samesign"&&d<=0&&y<0){d=Bb(d,y),v=y;break}}}return n[0]=d,n[1]=v,n})})}var Hu=function(){function e(t){this.data=t.data||(t.sourceFormat===Ir?{}:[]),this.sourceFormat=t.sourceFormat||y2,this.seriesLayoutBy=t.seriesLayoutBy||rn,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&b2(this,n)===Et.Must&&(i.type="ordinal")}}return e}();function V0(e){return e instanceof Hu}function z0(e,t,r){r=r||$2(e);var n=t.seriesLayoutBy,i=VT(e,r,n,t.sourceHeader,t.dimensions),a=new Hu({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Be(t)});return a}function B2(e){return new Hu({data:e,sourceFormat:Vt(e)?mn:ar})}function RT(e){return new Hu({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Be(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function $2(e){var t=y2;if(Vt(e))t=mn;else if(me(e)){e.length===0&&(t=Ot);for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i!=null){if(me(i)||Vt(i)){t=Ot;break}else if(xe(i)){t=br;break}}}}else if(xe(e)){for(var a in e)if(Gr(e,a)&&Xt(e[a])){t=Ir;break}}return t}function VT(e,t,r,n,i){var a,o;if(!e)return{dimensionsDefine:R2(i),startIndex:o,dimensionsDetectedCount:a};if(t===Ot){var s=e;n==="auto"||n==null?V2(function(u){u!=null&&u!=="-"&&(we(u)?o==null&&(o=1):o=0)},r,s,10):o=Ke(n)?n:n?1:0,!i&&o===1&&(i=[],V2(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===Hi?s.length:s[0]?s[0].length:null}else if(t===br)i||(i=zT(e));else if(t===Ir)i||(i=[],V(e,function(u,c){i.push(c)}));else if(t===ar){var l=$o(e[0]);a=me(l)&&l.length||1}else t===mn&&process.env.NODE_ENV!=="production"&&be(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:R2(i),dimensionsDetectedCount:a}}function zT(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return Ve(r)}function R2(e){if(e){var t=Ne();return ve(e,function(r,n){r=xe(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function V2(e,t,r,n){if(t===Hi)for(var i=0;i<r.length&&i<n;i++)e(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)e(a[i],i)}function z2(e){var t=e.sourceFormat;return t===br||t===Ir}var Gi,Wi,Xi,Ui,F2,H2,G2=function(){function e(t,r){var n=V0(t)?t:B2(t);this._source=n;var i=this._data=n.data,a=n.sourceFormat,o=n.seriesLayoutBy;if(a===mn){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}if(process.env.NODE_ENV!=="production"){var s=FT[Wu(a,o)];s&&s(i,n.dimensionsDefine)}H2(this,i,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,r){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var t;H2=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,d=l.dimensionsDefine,h=F2[Wu(u,c)];if(process.env.NODE_ENV!=="production"&&be(h,"Invalide sourceFormat: "+u),se(o,h),u===mn)o.getItem=r,o.count=i,o.fillStorage=n;else{var p=X2(u,c);o.getItem=ot(p,null,s,f,d);var v=Y2(u,c);o.count=ot(v,null,s,f,d)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,d=0;d<f;d++){for(var h=u[d],p=h[0]==null?1/0:h[0],v=h[1]==null?-1/0:h[1],g=s-o,m=l[d],y=0;y<g;y++){var _=c[y*f+d];m[o+y]=_,_<p&&(p=_),_>v&&(v=_)}h[0]=p,h[1]=v}},i=function(){return this._data?this._data.length/this._dimSize:0};F2=(t={},t[Ot+"_"+rn]={pure:!0,appendData:a},t[Ot+"_"+Hi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[br]={pure:!0,appendData:a},t[Ir]={pure:!0,appendData:function(o){var s=this._data;V(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[ar]={appendData:a},t[mn]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&be(Vt(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),e}(),Gu=function(e){me(e)||Ue("series.data or dataset.source must be an array.")},FT=(Gi={},Gi[Ot+"_"+rn]=Gu,Gi[Ot+"_"+Hi]=Gu,Gi[br]=Gu,Gi[Ir]=function(e,t){for(var r=0;r<t.length;r++){var n=t[r].name;n==null&&Ue("dimension name must not be null/undefined.")}},Gi[ar]=Gu,Gi),W2=function(e,t,r,n){return e[n]},HT=(Wi={},Wi[Ot+"_"+rn]=function(e,t,r,n){return e[n+t]},Wi[Ot+"_"+Hi]=function(e,t,r,n,i){n+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Wi[br]=W2,Wi[Ir]=function(e,t,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?e[s]:null;a[o]=l?l[n]:null}return a},Wi[ar]=W2,Wi);function X2(e,t){var r=HT[Wu(e,t)];return process.env.NODE_ENV!=="production"&&be(r,'Do not support get item on "'+e+'", "'+t+'".'),r}var U2=function(e,t,r){return e.length},GT=(Xi={},Xi[Ot+"_"+rn]=function(e,t,r){return Math.max(0,e.length-t)},Xi[Ot+"_"+Hi]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},Xi[br]=U2,Xi[Ir]=function(e,t,r){var n=r[0].name,i=n!=null?e[n]:null;return i?i.length:0},Xi[ar]=U2,Xi);function Y2(e,t){var r=GT[Wu(e,t)];return process.env.NODE_ENV!=="production"&&be(r,'Do not support count on "'+e+'", "'+t+'".'),r}var F0=function(e,t,r){return e[t]},WT=(Ui={},Ui[Ot]=F0,Ui[br]=function(e,t,r){return e[r]},Ui[Ir]=F0,Ui[ar]=function(e,t,r){var n=$o(e);return n instanceof Array?n[t]:n},Ui[mn]=F0,Ui);function q2(e){var t=WT[e];return process.env.NODE_ENV!=="production"&&be(t,'Do not support get value on "'+e+'".'),t}function Wu(e,t){return e===Ot?e+"_"+t:e}function Ua(e,t,r){if(e){var n=e.getRawDataItem(t);if(n!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=e.getDimensionIndex(r),s=i.getDimensionProperty(o);return q2(a)(n,o,s)}else{var l=n;return a===ar&&(l=$o(n)),l}}}}var XT=/\{@(.+?)\}/g,UT=function(){function e(){}return e.prototype.getDataParams=function(t,r){var n=this.getData(r),i=this.getRawValue(t,r),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,d=f==="series",h=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&me(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Le(a))return l.status=r,l.dimensionIndex=i,a(l);if(we(a)){var c=Yx(a,l);return c.replace(XT,function(f,d){var h=d.length,p=d;p.charAt(0)==="["&&p.charAt(h-1)==="]"&&(p=+p.slice(1,h-1),process.env.NODE_ENV!=="production"&&isNaN(p)&&Ue("Invalide label formatter: @"+d+", only support @[0], @[1], @[2], ..."));var v=Ua(s,t,p);if(o&&me(o.interpolatedValue)){var g=s.getDimensionIndex(p);g>=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},e.prototype.getRawValue=function(t,r){return Ua(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function fs(e){return new YT(e)}var YT=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var d=t&&t.step;if(r?(process.env.NODE_ENV!=="production"&&be(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&be(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var h=this._dueIndex,p=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!n&&(f||h<p)){var v=this._progress;if(me(v))for(var g=0;g<v.length;g++)this._doProgress(v[g],h,p,l,u);else this._doProgress(v,h,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;process.env.NODE_ENV!=="production"&&be(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,r,n,i,a){Z2.reset(r,n,i,a),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:Z2.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!t&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),me(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){process.env.NODE_ENV!=="production"&&be(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e}(),Z2=function(){var e,t,r,n,i,a={reset:function(l,u,c,f){t=l,e=u,r=c,n=f,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var l=t%i*r+Math.ceil(t/i),u=t>=e?null:l<n?l:t;return t++,u}}();function Xu(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!Ke(e)&&e!=null&&e!=="-"&&(e=+Bo(e)),e==null||e===""?NaN:Number(e))}Ne({number:function(e){return parseFloat(e)},time:function(e){return+Bo(e)},trim:function(e){return we(e)?kn(e):e}});var qT=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Xu(t,r)},e}();function ZT(e,t){var r=new qT,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==rn&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),nr(o));var s=[],l={},u=e.dimensionsDefine;if(u)V(u,function(v,g){var m=v.name,y={index:g,name:m,displayName:v.displayName};if(s.push(y),m!=null){var _="";Gr(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),nr(_)),l[m]=y}});else for(var c=0;c<e.dimensionsDetectedCount;c++)s.push({index:c});var f=X2(i,rn);t.__isBuiltIn&&(r.getRawDataItem=function(v){return f(n,a,s,v)},r.getRawData=ot(jT,null,e)),r.cloneRawData=ot(QT,null,e);var d=Y2(i,rn);r.count=ot(d,null,n,a,s);var h=q2(i);r.retrieveValue=function(v,g){var m=f(n,a,s,v);return p(m,g)};var p=r.retrieveValueFromItem=function(v,g){if(v!=null){var m=s[g];if(m)return h(v,g,m.name)}};return r.getDimensionInfo=ot(KT,null,s,l),r.cloneAllDimensionInfo=ot(JT,null,s),r}function jT(e){var t=e.sourceFormat;if(!H0(t)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+t),nr(r)}return e.data}function QT(e){var t=e.sourceFormat,r=e.data;if(!H0(t)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+t),nr(n)}if(t===Ot){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(t===br){for(var i=[],a=0,o=r.length;a<o;a++)i.push(se({},r[a]));return i}}function KT(e,t,r){if(r!=null){if(Ke(r)||!isNaN(r)&&!Gr(t,r))return e[r];if(Gr(t,r))return t[r]}}function JT(e){return Be(e)}var j2=Ne();function eL(e){e=Be(e);var t=e.type,r="";t||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),nr(r));var n=t.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),nr(r));var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),e.__isBuiltIn=i,j2.set(t,e)}function tL(e,t,r){var n=zt(e),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),nr(a));for(var o=0,s=i;o<s;o++){var l=n[o];t=rL(l,t,r,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function rL(e,t,r,n){var i="";t.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),nr(i)),xe(e)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof e+"."),nr(i));var a=e.type,o=j2.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),nr(i));var s=ve(t,function(c){return ZT(c,o)}),l=zt(o.transform({upstream:s[0],upstreamList:s,config:Be(e.config)}));if(process.env.NODE_ENV!=="production"&&e.print){var u=ve(l,function(c){var f=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+f+" ===","- transform result data:",yh(c.data),"- transform result dimensions:",yh(c.dimensions)].join(`
|
|
36
36
|
`)}).join(`
|
|
37
|
-
`);dg(u)}return ve(l,function(c,f){var d="";xe(c)||(process.env.NODE_ENV!=="production"&&(d="A transform should not return some empty results."),nr(d)),c.data||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be not be null or undefined"),nr(d));var h=$2(c.data);H0(h)||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be array rows or object rows."),nr(d));var p,v=t[0];if(v&&f===0&&!c.dimensions){var g=v.startIndex;g&&(c.data=v.data.slice(0,g).concat(c.data)),p={seriesLayoutBy:rn,sourceHeader:g,dimensions:v.metaRawOption.dimensions}}else p={seriesLayoutBy:rn,sourceHeader:0,dimensions:c.dimensions};return z0(c.data,p,null)})}function H0(e){return e===Ot||e===br}var Uu="undefined",nL=typeof Uint32Array===Uu?Array:Uint32Array,iL=typeof Uint16Array===Uu?Array:Uint16Array,Q2=typeof Int32Array===Uu?Array:Int32Array,K2=typeof Float64Array===Uu?Array:Float64Array,J2={float:K2,int:Q2,ordinal:Array,number:Array,time:K2},G0;function Ya(e){return e>65535?nL:iL}function qa(){return[1/0,-1/0]}function aL(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ey(e,t,r,n,i){var a=J2[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(n)}var W0=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ne()}return e.prototype.initData=function(t,r,n){process.env.NODE_ENV!=="production"&&be(Le(t.getItem)&&Le(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=G0[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=z2(i);this._dimensions=ve(r,function(s){return process.env.NODE_ENV!=="production"&&o&&be(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(t,a),this._chunks[a]=new J2[r||"float"](this._rawCount),this._rawExtent[a]=qa(),a},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=qa());for(var l=a[t],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var r=this._dimensions[t],n=r.ordinalMeta;return n},e.prototype.getDimensionProperty=function(t){var r=this._dimensions[t];return r&&r.property},e.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&be(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(t);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,r||0),u=0;u<a;u++){var c=i[u];ey(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,p=0;p<a;p++){var c=i[p],v=G0.arrayRows.call(this,t[h]||f,c.property,h,p);n[p][d]=v;var g=o[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=ve(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=qa()),ey(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var d=[],h=t;h<r;h++){d=i.getItem(h,d);for(var p=0;p<s;p++){var v=a[p],g=this._dimValueGetter(d,u[p],h,p);v[h]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(r)]:NaN},e.prototype.getValues=function(t,r){var n=[],i=[];if(r==null){r=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},e.prototype.getByRawIndex=function(t,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[t];return n?n[r]:NaN},e.prototype.getSum=function(t){var r=this._chunks[t],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<t)i=o+1;else if(r[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=r[a]}else t=new n(r.buffer,0,i)}else{var n=Ya(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Ya(n._rawCount),o=new a(i),s=[],l=t.length,u=0,c=t[0],f=n._chunks,d=0;d<i;d++){var h=void 0,p=n.getRawIndex(d);if(l===0)h=r(d);else if(l===1){var v=f[c][p];h=r(v,d)}else{for(var g=0;g<l;g++)s[g]=f[t[g]][p];s[g]=d,h=r.apply(null,s)}h&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=Ve(t),a=i.length;if(!a)return this;var o=r.count(),s=Ya(r._rawCount),l=new s(o),u=0,c=i[0],f=t[c][0],d=t[c][1],h=r._chunks,p=!1;if(!r._indices){var v=0;if(a===1){for(var g=h[i[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=d||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],b=t[i[1]][0],w=t[i[1]][1],m=0;m<n;m++){var y=g[m],x=_[m];(y>=f&&y<=d||isNaN(y))&&(x>=b&&x<=w||isNaN(x))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var T=r.getRawIndex(m),y=h[i[0]][T];(y>=f&&y<=d||isNaN(y))&&(l[u++]=T)}else for(var m=0;m<o;m++){for(var L=!0,T=r.getRawIndex(m),M=0;M<a;M++){var C=i[M],y=h[C][T];(y<t[C][0]||y>t[C][1])&&(L=!1)}L&&(l[u++]=r.getRawIndex(m))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},e.prototype.map=function(t,r){var n=this.clone(t);return this._updateDims(n,t,r),n},e.prototype.modify=function(t,r){this._updateDims(this,t,r)},e.prototype._updateDims=function(t,r,n){for(var i=t._chunks,a=[],o=r.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<r.length;c++)u[r[c]]=qa();for(var f=0;f<s;f++){for(var d=t.getRawIndex(f),h=0;h<o;h++)l[h]=i[r[h]][d];l[o]=f;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var v=r[c],g=p[c],m=u[v],y=i[v];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(Ya(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),g=Math.min(p+l*2,o),m=(g+v)/2,y=0,_=v;_<g;_++){var b=this.getRawIndex(_),w=a[b];isNaN(w)||(y+=w)}y/=g-v;var x=p,T=Math.min(p+l,o),L=p-1,M=a[u];c=-1,d=x;for(var C=-1,E=0,_=x;_<T;_++){var b=this.getRawIndex(_),w=a[b];if(isNaN(w)){E++,C<0&&(C=b);continue}f=Math.abs((L-m)*(w-M)-(L-_)*(y-M)),f>c&&(c=f,d=b)}E>0&&E<T-x&&(h[s++]=Math.min(C,d),d=Math.max(C,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/r),o=i[t],s=this.count(),l=new(Ya(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,d=o[this.getRawIndex(f)],h=c,p=o[this.getRawIndex(h)],v=a;c+a>s&&(v=s-c);for(var g=0;g<v;g++){var m=this.getRawIndex(c+g),y=o[m];y<d&&(d=y,f=c+g),y>p&&(p=y,h=c+g)}var _=this.getRawIndex(f),b=this.getRawIndex(h);f<h?(l[u++]=_,l[u++]=b):(l[u++]=b,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[t],c=this.count(),f=a._rawExtent[t]=qa(),d=new(Ya(this._rawCount))(Math.ceil(c/l)),h=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);s[v]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[t[0]][s],a);break;case 2:r(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,r.apply(null,u)}}},e.prototype.getDataExtent=function(t){var r=this._chunks[t],n=qa();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},e.prototype.clone=function(t,r){var n=new e,i=this._chunks,a=t&&An(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?aL(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Be(this._extent),t._rawExtent=Be(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,r=void 0;if(t===Array){var n=this._indices.length;r=new t(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new t(this._indices);return r}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Xu(r[a],this._dimensions[a])}G0={arrayRows:t,objectRows:function(r,n,i,a){return Xu(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Xu(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),oL=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,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 t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(hs(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Vt(s)?mn:ar,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=ye(f.seriesLayoutBy,d.seriesLayoutBy)||null,p=ye(f.sourceHeader,d.sourceHeader),v=ye(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||v;i=g?[z0(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:v},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[z0(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&be(i&&a),this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&be(i!=null||n!=null),i!=null){var a="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),ty(a))}var o,s=[],l=[];return V(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+i),ty(f)),s.push(c),l.push(u._getVersionSign())}),n?o=tL(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[RT(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r<t.length;r++){var n=t[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var r=this._sourceList[t];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return r},e.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&be(hs(this._sourceHost),"Can only call getDataStore on series source manager.");var r=t.makeStoreSchema();return this._innerGetDataStore(r.dimensions,t.source,r.hash)},e.prototype._innerGetDataStore=function(t,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];hs(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new W0,s.initData(new G2(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(hs(t)){var r=N0(t);return r?[r.getSourceManager()]:[]}else return ve(fT(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(hs(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},e}();function hs(e){return e.mainType==="series"}function ty(e){throw new Error(e)}function ds(e,t){return t.type=e,t}function ry(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return E0(n)}function sL(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=me(s),u=ry(t,r),c,f,d,h;if(o>1||l&&!o){var p=lL(s,t,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,d=p.blocks,h=p.inlineValues[0]}else if(o){var v=i.getDimensionInfo(a[0]);h=c=Ua(i,r,a[0]),f=v.type}else h=c=l?s[0]:s;var g=bh(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return ds("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[ds("nameValue",{markerType:"item",markerColor:u,name:_,noName:!kn(_),value:c,valueType:f,dataIndex:r})].concat(d||[])})}function lL(e,t,r,n,i){var a=t.getData(),o=An(e,function(f,d,h){var p=a.getDimensionInfo(h);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?V(n,function(f){c(Ua(a,r,f),f)}):V(e,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(ds("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Yn=ut();function Yu(e,t){return e.getName(t)||e.getId(t)}var uL="__universalTransitionEnabled",or=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=fs({count:fL,reset:hL}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Yn(this).sourceManager=new oL(this);a.prepareSource();var o=this.getInitialData(r,i);iy(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&be(o,"getInitialData returned invalid data."),Yn(this).dataBeforeProcessed=o,ny(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=as(this),a=i?os(r):{},o=this.subType;Ye.hasClass(o)&&(o+="Series"),je(r,n.getTheme().get(this.subType)),je(r,this.getDefaultOption()),_h(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Un(r,a,i)},t.prototype.mergeOption=function(r,n){r=je(this.option,r,!0),this.fillDataTextStyle(r.data);var i=as(this);i&&Un(this.option,r,i);var a=Yn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);iy(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Yn(this).dataBeforeProcessed=o,ny(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Vt(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&_h(r[i],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=X0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Yn(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=X0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Yn(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ne(r)},t.prototype.getSourceManager=function(){return Yn(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Yn(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(p,v){var g=l.dataToCoord(p),m=u-g,y=Math.abs(m);y<=a&&((y<f||y===f&&m>=0&&d<0)&&(f=y,d=m,h=0),m===d&&(c[h++]=v))}),c.length=h,c},t.prototype.formatTooltip=function(r,n,i){return sL({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(We.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=O0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Yu(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ve(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Yu(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[uL])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){xe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Yu(r,f);u[d]=!0,this._selectedDataIndicesMap[d]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=Yu(r,h);o.selectedMap=(i={},i[d]=!0,i),this._selectedDataIndicesMap=(a={},a[d]=r.getRawIndex(h),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Ye.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Ye);Cr(or,UT),Cr(or,O0),xg(or,Ye);function ny(e){var t=e.name;bh(e)||(e.name=cL(e)||t)}function cL(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return V(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function fL(e){return e.model.getRawData().count()}function hL(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dL}function dL(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function iy(e,t){V(n9(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Jt(pL,t))})}function pL(e,t){var r=X0(e);return r&&r.setOutputEnd((t||this).count()),t}function X0(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var _n=function(){function e(){this.group=new ht,this.uid=Du("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();wh(_n),Ql(_n);function U0(){var e=ut();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var ay=ut(),vL=U0(),Zt=function(){function e(){this.group=new ht,this.uid=Du("viewChart"),this.renderTask=fs({plan:gL,reset:mL}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Ue("Unknown dataType "+i.dataType);return}sy(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Ue("Unknown dataType "+i.dataType);return}sy(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){Lu(this.group,t)},e.markUpdateMethod=function(t,r){ay(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function oy(e,t,r){e&&Ba(e)&&(t==="emphasis"?hu:du)(e,r)}function sy(e,t,r){var n=Aa(e,t),i=t&&t.highlightKey!=null?_w(t.highlightKey):null;n!=null?V(zt(n),function(a){oy(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){oy(a,r,i)})}wh(Zt,["dispose"]),Ql(Zt);function gL(e){return vL(e.model)}function mL(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&ay(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),yL[l]}var yL={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function ly(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var d=function(){for(var h=[],p=0;p<arguments.length;p++)h[p]=arguments[p];n=new Date().getTime(),l=this,u=h;var v=c||t,g=c||r;c=null,s=n-(g?i:a)-v,clearTimeout(o),g?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}var uy=ut(),cy={itemStyle:Vo(Jm,!0),lineStyle:Vo(Km,!0)},_L={lineStyle:"stroke",itemStyle:"fill"};function fy(e,t){var r=e.visualStyleMapper||cy[t];return r||(console.warn("Unknown style type '"+t+"'."),cy.itemStyle)}function hy(e,t){var r=e.visualDrawType||_L[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var bL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=fy(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=hy(e,n),u=o[l],c=Le(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Le(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Le(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var v=e.getDataParams(p),g=se({},o);g[l]=c(v),h.setItemVisual(p,"style",g)}}}},ps=new mt,SL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=fy(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ps.option=l[n];var u=i(ps),c=o.ensureUniqueItemVisual(s,"style");se(c,u),ps.option.decal&&(o.setItemVisual(s,"decal",ps.option.decal),ps.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},wL={performRawSeries:!0,overallReset:function(e){var t=Ne();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),uy(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=uy(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=hy(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",p=n.count();d[l]=r.getColorFromPalette(h,o,p)}})}})}},qu=Math.PI;function xL(e,t){t=t||{},Re(t,{text:"loading",textColor:Ae.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Ae.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new ht,n=new dt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new ir({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 dt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new yu({shape:{startAngle:-qu/2,endAngle:-qu/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:qu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:qu*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var dy=function(){function e(t,r,n,i){this._stageTaskMap=Ne(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ne();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;V(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),be(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;V(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,p=d.agentStubMap;p.each(function(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var v=o.getPerformArgs(d,i.block);p.each(function(g){g.perform(v)}),d.perform(v)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ne(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||fs({plan:CL,reset:DL,count:kL}));h.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||fs({reset:TL});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ne(),u=t.seriesType,c=t.getTargetSeries,f=!0,d=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),be(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,V(n.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(d=!0,fs({reset:LL,onDirty:ML})));m.context={model:v,overallProgress:f},m.agent=o,m.__block=f,a._pipe(v,m)}d&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Le(t)&&(t={overallReset:t,seriesType:PL(t)}),t.uid=Du("stageHandler"),r&&(t.visualType=r),t},e}();function TL(e){e.overallReset(e.ecModel,e.api,e.payload)}function LL(e){return e.overallProgress&&EL}function EL(){this.agent.dirty(),this.getDownstream().dirty()}function ML(){this.agent&&this.agent.dirty()}function CL(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function DL(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=zt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?ve(t,function(r,n){return py(n)}):AL}var AL=py(0);function py(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function kL(e){return e.data.count()}function PL(e){Zu=null;try{e(vs,vy)}catch{}return Zu}var vs={},vy={},Zu;gy(vs,B0),gy(vy,C2),vs.eachSeriesByType=vs.eachRawSeriesByType=function(e){Zu=e},vs.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Zu=e.subType)};function gy(e,t){for(var r in t.prototype)e[r]=er}var he=Ae.darkColor,NL=he.background,gs=function(){return{axisLine:{lineStyle:{color:he.axisLine}},splitLine:{lineStyle:{color:he.axisSplitLine}},splitArea:{areaStyle:{color:[he.backgroundTint,he.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:he.axisMinorSplitLine}},axisLabel:{color:he.axisLabel},axisName:{}}},my={label:{color:he.secondary},itemStyle:{borderColor:he.borderTint},dividerLineStyle:{color:he.border}},yy={darkMode:!0,color:he.theme,backgroundColor:NL,axisPointer:{lineStyle:{color:he.border},crossStyle:{color:he.borderShade},label:{color:he.tertiary}},legend:{textStyle:{color:he.secondary},pageTextStyle:{color:he.tertiary}},textStyle:{color:he.secondary},title:{textStyle:{color:he.primary},subtextStyle:{color:he.quaternary}},toolbox:{iconStyle:{borderColor:he.accent50}},tooltip:{backgroundColor:he.neutral20,defaultBorderColor:he.border,textStyle:{color:he.tertiary}},dataZoom:{borderColor:he.accent10,textStyle:{color:he.tertiary},brushStyle:{color:he.backgroundTint},handleStyle:{color:he.neutral00,borderColor:he.accent20},moveHandleStyle:{color:he.accent40},emphasis:{handleStyle:{borderColor:he.accent50}},dataBackground:{lineStyle:{color:he.accent30},areaStyle:{color:he.accent20}},selectedDataBackground:{lineStyle:{color:he.accent50},areaStyle:{color:he.accent30}}},visualMap:{textStyle:{color:he.secondary},handleStyle:{borderColor:he.neutral30}},timeline:{lineStyle:{color:he.accent10},label:{color:he.tertiary},controlStyle:{color:he.accent30,borderColor:he.accent30}},calendar:{itemStyle:{color:he.neutral00,borderColor:he.neutral20},dayLabel:{color:he.tertiary},monthLabel:{color:he.secondary},yearLabel:{color:he.secondary}},matrix:{x:my,y:my,backgroundColor:{borderColor:he.axisLine},body:{itemStyle:{borderColor:he.borderTint}}},timeAxis:gs(),logAxis:gs(),valueAxis:gs(),categoryAxis:gs(),line:{symbol:"circle"},graph:{color:he.theme},gauge:{title:{color:he.secondary},axisLine:{lineStyle:{color:[[1,he.neutral05]]}},axisLabel:{color:he.axisLabel},detail:{color:he.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:he.background}},radar:function(){var e=gs();return e.axisName={color:he.axisLabel},e.axisLine.lineStyle.color=he.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:he.neutral20,textStyle:{color:he.secondary}},emphasis:{itemStyle:{color:he.neutral30}}}},sunburst:{itemStyle:{borderColor:he.background}},map:{itemStyle:{borderColor:he.border,areaColor:he.neutral10},label:{color:he.tertiary},emphasis:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}},select:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}}},geo:{itemStyle:{borderColor:he.border,areaColor:he.neutral10},emphasis:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}},select:{label:{color:he.primary},itemStyle:{color:he.highlight}}}};yy.categoryAxis.splitLine.show=!1;var OL=function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(we(t)){var a=jr(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};V(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var d=o[f],h=u.lastIndexOf(d);if(h>0&&h===u.length-d.length){var p=u.slice(0,h);p!=="data"&&(r.mainType=p,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,d,h,p){return f[h]==null||d[p||h]===f[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Y0=["symbol","symbolSize","symbolRotate","symbolOffset"],_y=Y0.concat(["symbolKeepAspect"]),IL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<Y0.length;o++){var s=Y0[o],l=e.get(s);Le(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(se({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=Ve(i);function c(f,d){for(var h=e.getRawValue(d),p=e.getDataParams(d),v=0;v<u.length;v++){var g=u[v];f.setItemVisual(d,g,i[g](h,p))}}return{dataEach:a?c:null}}},BL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<_y.length;s++){var l=_y[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function $L(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function RL(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function VL(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}V([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=se({},i),process.env.NODE_ENV!=="production"&>(i.type,n[1]),o.dispatchAction(se(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Za(e,t,r,n,i){var a=e+t;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&dn("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=Aa(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:me(d)?f.getName(d[0]):f.getName(d),selected:we(l)?l:se({},l)})}}))}function zL(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Za("map","selectchanged",t,i,n),Za("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Za("map","selected",t,i,n),Za("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Za("map","unselected",t,i,n),Za("pie","unselected",t,i,n))})}function ju(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var FL=Math.round(Math.random()*9),HL=typeof Object.defineProperty=="function",GL=function(){function e(){this._id="__ec_inner_"+FL++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return HL?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e}(),WL=Fe.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),XL=Fe.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),UL=Fe.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),d=Math.cos(u),h=o*.6,p=o*.7;e.moveTo(r-c,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+c-f*h,l+s+d*h,r,n-p,r,n),e.bezierCurveTo(r,n-p,r-c+f*h,l+s+d*h,r-c,l+s),e.closePath()}}),YL=Fe.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),qL={line:Gn,rect:dt,roundRect:dt,square:dt,circle:Xo,diamond:XL,pin:UL,arrow:YL,triangle:WL},ZL={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},q0={};V(qL,function(e,t){q0[t]=new e});var jL=Fe.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=Wl(e,t,r),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var i=q0[n];i||(n="rect",i=q0[n]),ZL[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function QL(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||Ae.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function qn(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=Om(e.slice(8),new Oe(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=o0(e.slice(7),{},new Oe(t,r,n,i),o?"center":"cover"):l=new jL({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=QL,a&&l.setColor(a),l}function by(e){return me(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Sy(e,t){if(e!=null)return me(e)||(e=[e,e]),[tt(e[0],t[0])||0,tt(ye(e[1],e[0]),t[1])||0]}function Yi(e){return isFinite(e)}function KL(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Yi(n)?n:0,i=Yi(i)?i:1,a=Yi(a)?a:0,o=Yi(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function JL(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=Yi(o)?o:.5,s=Yi(s)?s:.5,l=l>=0&&Yi(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function wy(e,t,r){for(var n=t.type==="radial"?JL(e,t,r):KL(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function eE(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function Qu(e){return parseInt(e,10)}function xy(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Qu(s[n])||Qu(e.style[n]))-(Qu(s[a])||0)-(Qu(s[o])||0)|0}function tE(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Ke(e)?[e]:me(e)?e:null}function Z0(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&tE(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=ve(r,function(a){return a/i}),n/=i)}return[r,n]}var rE=new zn(!0);function Ku(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function Ty(e){return typeof e=="string"&&e!=="none"}function Ju(e){var t=e.fill;return t!=null&&t!=="none"}function Ly(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Ey(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function My(e,t,r){var n=Th(t.image,t.__image,r);if(Kl(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Sl),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function nE(e,t,r,n){var i,a=Ku(r),o=Ju(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||rE,f=t.__dirty;if(!n){var d=r.fill,h=r.stroke,p=o&&!!d.colorStops,v=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,b=void 0,w=void 0,x=void 0;(p||v)&&(x=t.getBoundingRect()),p&&(y=f?wy(e,d,x):t.__canvasFillGradient,t.__canvasFillGradient=y),v&&(_=f?wy(e,h,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(b=f||!t.__canvasFillPattern?My(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=b),m&&(w=f||!t.__canvasStrokePattern?My(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),p?e.fillStyle=y:g&&(b?e.fillStyle=b:o=!1),v?e.strokeStyle=_:m&&(w?e.strokeStyle=w:a=!1)}var T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold);var L,M;e.setLineDash&&r.lineDash&&(i=Z0(t),L=i[0],M=i[1]);var C=!0;(u||f&Sa)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),C=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),C&&c.rebuildPath(e,l?s:1),L&&(e.setLineDash(L),e.lineDashOffset=M),n||(r.strokeFirst?(a&&Ey(e,r),o&&Ly(e,r)):(o&&Ly(e,r),a&&Ey(e,r))),L&&e.setLineDash([])}function iE(e,t,r){var n=t.__image=Th(r.image,t.__image,t,t.onload);if(!(!n||!Kl(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;e.drawImage(n,u,c,f,d,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function aE(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||ln,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=Z0(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Ku(r)&&e.strokeText(i,r.x,r.y),Ju(r)&&e.fillText(i,r.x,r.y)):(Ju(r)&&e.fillText(i,r.x,r.y),Ku(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var Cy=["shadowBlur","shadowOffsetX","shadowOffsetY"],Dy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ay(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){jt(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ei.opacity:o}(n||t.blend!==r.blend)&&(a||(jt(e,i),a=!0),e.globalCompositeOperation=t.blend||Ei.blend);for(var s=0;s<Cy.length;s++){var l=Cy[s];(n||t[l]!==r[l])&&(a||(jt(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(jt(e,i),a=!0),e.shadowColor=t.shadowColor||Ei.shadowColor),a}function ky(e,t,r,n,i){var a=ms(t,i.inHover),o=n?null:r&&ms(r,i.inHover)||{};if(a===o)return!1;var s=Ay(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(jt(e,i),s=!0),Ty(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(jt(e,i),s=!0),Ty(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(jt(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(jt(e,i),s=!0),e.lineWidth=u)}for(var c=0;c<Dy.length;c++){var f=Dy[c],d=f[0];(n||a[d]!==o[d])&&(s||(jt(e,i),s=!0),e[d]=a[d]||f[1])}return s}function oE(e,t,r,n,i){return Ay(e,ms(t,i.inHover),r&&ms(r,i.inHover),n,i)}function Py(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function sE(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),Py(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function lE(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Ny=1,Oy=2,Iy=3,By=4;function uE(e){var t=Ju(e),r=Ku(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function jt(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function ms(e,t){return t&&e.__hoverStyle||e.style}function cE(e,t){j0(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function j0(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Wr,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||eE(a,o))&&(o&&o.length&&(jt(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(jt(e,r),e.save(),sE(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=t instanceof Fe&&t.autoBatch&&uE(t.style);s||lE(i,u.transform)?(jt(e,r),Py(e,t)):c||jt(e,r);var f=ms(t,r.inHover);t instanceof Fe?(r.lastDrawType!==Ny&&(l=!0,r.lastDrawType=Ny),ky(e,t,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&e.beginPath(),nE(e,t,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):t instanceof Go?(r.lastDrawType!==Iy&&(l=!0,r.lastDrawType=Iy),ky(e,t,u,l,r),aE(e,t,f)):t instanceof Pr?(r.lastDrawType!==Oy&&(l=!0,r.lastDrawType=Oy),oE(e,t,u,l,r),iE(e,t,f)):t.getTemporalDisplayables&&(r.lastDrawType!==By&&(l=!0,r.lastDrawType=By),fE(e,t,r)),c&&n&&jt(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function fE(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),j0(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),j0(e,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Q0=new GL,$y=new xa(100),Ry=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function K0(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&Q0.delete(e);var a=Q0.get(e);if(a)return a;var o=Re(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,Q0.set(e,s),e.dirty=!1,s;function l(u){for(var c=[r],f=!0,d=0;d<Ry.length;++d){var h=o[Ry[d]];if(h!=null&&!me(h)&&!we(h)&&!Ke(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var p;if(f){p=c.join(",")+(i?"-svg":"");var v=$y.get(p);v&&(i?u.svgElement=v:u.image=v)}var g=zy(o.dashArrayX),m=hE(o.dashArrayY),y=Vy(o.symbol),_=dE(g),b=Fy(m),w=!i&&Dn.createCanvas(),x=i&&{tag:"g",attrs:{},key:"dcl",children:[]},T=M(),L;w&&(w.width=T.width*r,w.height=T.height*r,L=w.getContext("2d")),C(),f&&$y.put(p,w||x),u.image=w,u.svgElement=x,u.svgWidth=T.width,u.svgHeight=T.height;function M(){for(var E=1,P=0,D=_.length;P<D;++P)E=fg(E,_[P]);for(var k=1,P=0,D=y.length;P<D;++P)k=fg(k,y[P].length);E*=k;var N=b*_.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(O){console.warn("Calculated decal size is greater than "+O+" due to decal option settings so "+O+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+O+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),N>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(N,o.maxTileHeight))}}function C(){L&&(L.clearRect(0,0,w.width,w.height),o.backgroundColor&&(L.fillStyle=o.backgroundColor,L.fillRect(0,0,w.width,w.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var D=-b,k=0,N=0,I=0;D<T.height;){if(k%2===0){for(var O=N/2%y.length,z=0,$=0,R=0;z<T.width*2;){for(var B=0,P=0;P<g[I].length;++P)B+=g[I][P];if(B<=0)break;if($%2===0){var H=(1-o.symbolSize)*.5,F=z+g[I][$]*H,A=D+m[k]*H,G=g[I][$]*o.symbolSize,Z=m[k]*o.symbolSize,Q=R/2%y[O].length;q(F,A,G,Z,y[O][Q])}z+=g[I][$],++R,++$,$===g[I].length&&($=0)}++I,I===g.length&&(I=0)}D+=m[k],++N,++k,k===m.length&&(k=0)}function q(W,j,Y,re,te){var ne=i?1:r,ge=qn(te,W*ne,j*ne,Y*ne,re*ne,o.color,o.symbolKeepAspect);if(i){var Se=n.painter.renderOneToVNode(ge);Se&&x.children.push(Se)}else cE(L,ge)}}}}function Vy(e){if(!e||e.length===0)return[["rect"]];if(we(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!we(e[r])){t=!1;break}if(t)return Vy([e]);for(var n=[],r=0;r<e.length;++r)we(e[r])?n.push([e[r]]):n.push(e[r]);return n}function zy(e){if(!e||e.length===0)return[[0,0]];if(Ke(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!Ke(e[n])){r=!1;break}if(r)return zy([e]);for(var i=[],n=0;n<e.length;++n)if(Ke(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=ve(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function hE(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(Ke(e)){var t=Math.ceil(e);return[t,t]}var r=ve(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function dE(e){return ve(e,function(t){return Fy(t)})}function Fy(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function pE(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=K0(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=K0(i,t)}}})}var Br=new cn,ec={};function vE(e,t){process.env.NODE_ENV!=="production"&&ec[e]&&Ue("Already has an implementation of "+e+"."),ec[e]=t}function gE(e){return process.env.NODE_ENV!=="production"&&(ec[e]||Ue("Implementation of "+e+" doesn't exists.")),ec[e]}var mE=1,yE=800,_E=900,bE=1e3,SE=2e3,wE=5e3,Hy=1e3,xE=1100,J0=2e3,Gy=3e3,TE=4e3,tc=4500,LE=4600,EE=5e3,ME=6e3,Wy=7e3,CE={PROCESSOR:{FILTER:bE,SERIES_FILTER:yE,STATISTIC:wE},VISUAL:{LAYOUT:Hy,PROGRESSIVE_LAYOUT:xE,GLOBAL:J0,CHART:Gy,POST_CHART_LAYOUT:LE,COMPONENT:TE,BRUSH:EE,CHART_ITEM:tc,ARIA:ME,DECAL:Wy}},pt="__flagInMainProcess",rc="__mainProcessVersion",St="__pendingUpdate",ed="__needsUpdateStatus",Xy=/^[a-zA-Z0-9_]+$/,td="__connectUpdateStatus",Uy=0,DE=1,AE=2;function Yy(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){Qt(this.id);return}return Zy(this,e,t)}}function qy(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Zy(this,e,t)}}function Zy(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),cn.prototype[t].apply(e,r)}var jy=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(cn),Qy=jy.prototype;Qy.on=qy("on"),Qy.off=qy("off");var qi,rd,nc,bn,ic,nd,id,ja,Qa,Ky,Jy,ad,e5,ac,t5,r5,xr,n5,Ka,i5=function(e){fe(t,e);function t(r,n,i){var a=e.call(this,new OL)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;if(a[rc]=1,process.env.NODE_ENV!=="production"){var u=We.hasGlobalWindow?window:global;u&&(o=ye(u.__ECHARTS__DEFAULT__RENDERER__,o),s=ye(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=ye(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&kb(function(h){var p=rt(h),v=p.dataIndex;if(v!=null){var g=Ne();return g.set("series_index",p.seriesIndex),g.set("data_index",v),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var c=a._zr=ig(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:ye(i.useDirtyRect,l),useCoarsePointer:ye(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=ly(ot(c.flush,c),17),a._updateTheme(n),a._locale=Nx(i.locale||t2),a._coordSysMgr=new C0;var f=a._api=t5(a);function d(h,p){return h.__prio-p.__prio}return wl(lc,d),wl(ld,d),a._scheduler=new dy(a,f,ld,lc),a._messageCenter=new jy,a._initEvents(),a.resize=ot(a.resize,a),c.animation.on("frame",a._onframe,a),Ky(c,a),Jy(c,a),yf(a),a}return t.prototype._onframe=function(){if(!this._disposed){n5(this);var r=this._scheduler;if(this[St]){var n=this[St].silent;this[pt]=!0,Ka(this);try{qi(this),bn.update.call(this,null,this[St].updateParams)}catch(l){throw this[pt]=!1,this[St]=null,l}this._zr.flush(),this[pt]=!1,this[St]=null,ja.call(this,n),Qa.call(this,n)}else if(r.unfinished){var i=mE,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),nd(this,a),r.performVisualTasks(a),ac(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.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(r,n,i){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`setOption` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}var a,o,s;if(xe(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[pt]=!0,Ka(this),!this._model||n){var l=new TT(this._api),u=this._theme,c=this._model=new B0;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},ud);var f={seriesTransition:s,optionChanged:!0};if(i)this[St]={silent:a,updateParams:f},this[pt]=!1,this.getZr().wakeUp();else{try{qi(this),bn.update.call(this,null,f)}catch(d){throw this[St]=null,this[pt]=!1,d}this._ssr||this._zr.flush(),this[St]=null,this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype.setTheme=function(r,n){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`setTheme` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[St]&&(a==null&&(a=this[St].silent),o=this[St].updateParams,this[St]=null),this[pt]=!0,Ka(this);try{this._updateTheme(r),i.setTheme(this._theme),qi(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[pt]=!1,s}this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype._updateTheme=function(r){we(r)&&(r=a5[r]),r&&(r=Be(r),r&&I2(r,!0),this._theme=r)},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||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&>("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return V(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){Qt(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;V(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return V(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){Qt(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(o5[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();V(ys,function(_,b){if(_.group===i){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Be(r)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),c=o(x.right,c),f=o(x.bottom,f),d.push({dom:w,left:x.left,top:x.top})}}),l*=h,u*=h,c*=h,f*=h;var p=c-l,v=f-u,g=Dn.createCanvas(),m=ig(g,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:v}),n){var y="";return V(d,function(_){var b=_.left-l,w=_.top-u;y+='<g transform="translate('+b+","+w+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new dt({shape:{x:0,y:0,width:p,height:v},style:{fill:r.connectedBackgroundColor}})),V(d,function(_){var b=new Pr({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return ic(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return ic(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return ic(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){Qt(this.id);return}var i=this._model,a,o=Sh(i,r);return V(o,function(s,l){l.indexOf("Models")>=0&&V(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?a=a||f.containPoint(n,u):process.env.NODE_ENV!=="production"&&kt(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&kt(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Sh(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||kt("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?$L(s,l,n):RL(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;V(kE,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&ju(l,function(v){var g=rt(v);if(g&&g.dataIndex!=null){var m=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=m&&m.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=se({},g.eventData),!0},!0),u){var f=u.componentType,d=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=u.seriesIndex);var h=f&&d!=null&&s.getComponent(f,d),p=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(h&&p)&&kt("model or view can not be found by params"),u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;V(sd,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),zL(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){Qt(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){Qt(this.id);return}this._disposed=!0;var r=this.getDom();r&&Sg(this.getDom(),fd,"");var n=this,i=n._api,a=n._model;V(n._componentsViews,function(o){o.dispose(a,i)}),V(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete ys[n.id]},t.prototype.resize=function(r){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`resize` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[St]&&(a==null&&(a=this[St].silent),i=!0,this[St]=null),this[pt]=!0,Ka(this);try{i&&qi(this),bn.update.call(this,{type:"resize",animation:se({duration:0},r&&r.animation)})}catch(o){throw this[pt]=!1,o}this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype.showLoading=function(r,n){if(this._disposed){Qt(this.id);return}if(xe(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!cd[r]){process.env.NODE_ENV!=="production"&&kt("Loading effects "+r+" not exists.");return}var i=cd[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){Qt(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=se({},r);return n.type=sc[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){Qt(this.id);return}if(xe(n)||(n={silent:!!n}),!!oc[r.type]&&this._model){if(this[pt]){this._pendingActions.push(r);return}var i=n.silent;id.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&We.browser.weChat&&this._throttledZrFlush(),ja.call(this,i),Qa.call(this,i)}},t.prototype.updateLabelLayout=function(){Br.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){Qt(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&be(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){qi=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),rd(f,!0),rd(f,!1),d.plan()},rd=function(f,d){for(var h=f._model,p=f._scheduler,v=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<v.length;_++)v[_].__alive=!1;d?h.eachComponent(function(x,T){x!=="series"&&b(T)}):h.eachSeries(b);function b(x){var T=x.__requireNewView;x.__requireNewView=!1;var L="_ec_"+x.id+"_"+x.type,M=!T&&g[L];if(!M){var C=jr(x.type),E=d?_n.getClass(C.main,C.sub):Zt.getClass(C.sub);process.env.NODE_ENV!=="production"&&be(E,C.sub+" does not exist."),M=new E,M.init(h,y),g[L]=M,v.push(M),m.add(M.group)}x.__viewId=M.__id=L,M.__alive=!0,M.__model=x,M.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!d&&p.prepareView(M,x,h,y)}for(var _=0;_<v.length;){var w=v[_];w.__alive?_++:(!d&&w.renderTask.dispose(),m.remove(w.group),w.dispose(h,y),v.splice(_,1),g[w.__id]===w&&delete g[w.__id],w.__id=w.group.__ecComponentInfo=null)}},nc=function(f,d,h,p,v){var g=f._model;if(g.setUpdatePayload(h),!p){V([].concat(f._componentsViews).concat(f._chartsViews),w);return}var m={};m[p+"Id"]=h[p+"Id"],m[p+"Index"]=h[p+"Index"],m[p+"Name"]=h[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=h.excludeSeriesId,b;_!=null&&(b=Ne(),V(zt(_),function(x){var T=Zr(x,null);T!=null&&b.set(T,!0)})),g&&g.eachComponent(y,function(x){var T=b&&b.get(x.id)!=null;if(!T)if(mm(h))if(x instanceof or)h.type===Ii&&!h.notBlur&&!x.get(["emphasis","disabled"])&&fw(x,h,f._api);else{var L=Zh(x.mainType,x.componentIndex,h.name,f._api),M=L.focusSelf,C=L.dispatchers;h.type===Ii&&M&&!h.notBlur&&qh(x.mainType,x.componentIndex,f._api),C&&V(C,function(E){h.type===Ii?hu(E):du(E)})}else Qh(h)&&x instanceof or&&(pw(x,h,f._api),pm(x),xr(f))},f),g&&g.eachComponent(y,function(x){var T=b&&b.get(x.id)!=null;T||w(f[p==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},f);function w(x){x&&x.__alive&&x[d]&&x[d](x.__model,g,f._api,h)}},bn={prepareAndUpdate:function(f){qi(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(h){h.setUpdatePayload(f),m.restoreData(h,f),m.performSeriesTasks(h),g.create(h,p),m.performDataProcessorTasks(h,f),nd(this,h),g.update(h,p),n(h),m.performVisualTasks(h,f);var y=h.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var _=h.get("darkMode");_!=null&&_!=="auto"&&v.setDarkMode(_),ad(this,h,p,f,d),Br.trigger("afterupdate",h,p)}},updateTransform:function(f){var d=this,h=this._model,p=this._api;if(h){h.setUpdatePayload(f);var v=[];h.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,h,p,f);b&&b.update&&v.push(_)}else v.push(_)}});var g=Ne();h.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,p,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),ac(this,h,p,f,{},g),Br.trigger("afterupdate",h,p)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),Zt.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),ad(this,d,this._api,f,{}),Br.trigger("afterupdate",d,this._api))},updateVisual:function(f){var d=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(p){p.getData().clearAllVisual()}),Zt.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(p,v){if(p!=="series"){var g=d.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,h,d._api,f)}}),h.eachSeries(function(p){var v=d._chartsMap[p.__viewId];v.updateVisual(p,h,d._api,f)}),Br.trigger("afterupdate",h,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function r(f,d,h,p,v){if(f._disposed){Qt(f.id);return}for(var g=f._model,m=f._coordSysMgr.getCoordinateSystems(),y,_=Sh(g,h),b=0;b<m.length;b++){var w=m[b];if(w[d]&&(y=w[d](g,_,p,v))!=null)return y}process.env.NODE_ENV!=="production"&&kt("No coordinate system that supports "+d+" found by the given finder.")}ic=r,nd=function(f,d){var h=f._chartsMap,p=f._scheduler;d.eachSeries(function(v){p.updateStreamModes(v,h[v.__viewId])})},id=function(f,d){var h=this,p=this.getModel(),v=f.type,g=f.escapeConnect,m=oc[v],y=(m.update||"update").split(":"),_=y.pop(),b=y[0]!=null&&jr(y[0]);this[pt]=!0,Ka(this);var w=[f],x=!1;f.batch&&(x=!0,w=ve(f.batch,function(I){return I=Re(se({},I),f),I.batch=null,I}));var T=[],L,M=[],C=m.nonRefinedEventType,E=Qh(f),P=mm(f);if(P&&dm(this._api),V(w,function(I){var O=m.action(I,p,h._api);if(m.refineEvent?M.push(O):L=O,L=L||se({},I),L.type=C,T.push(L),P){var z=bg(f),$=z.queryOptionMap,R=z.mainTypeSpecified,B=R?$.keys()[0]:"series";nc(h,_,I,B),xr(h)}else E?(nc(h,_,I,"series"),xr(h)):b&&nc(h,_,I,b.main,b.sub)}),_!=="none"&&!P&&!E&&!b)try{this[St]?(qi(this),bn.update.call(this,f),this[St]=null):bn[_].call(this,f)}catch(I){throw this[pt]=!1,I}if(x?L={type:C,escapeConnect:g,batch:T}:L=T[0],this[pt]=!1,!d){var D=void 0;if(m.refineEvent){var k=m.refineEvent(M,f,p,this._api).eventContent;be(xe(k)),D=Re({type:m.refinedEventType},k),D.fromAction=f.type,D.fromActionPayload=f,D.escapeConnect=!0}var N=this._messageCenter;N.trigger(L.type,L),D&&N.trigger(D.type,D)}},ja=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();id.call(this,h,f)}},Qa=function(f){!f&&this.trigger("updated")},Ky=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[St]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},Jy=function(f,d){f.on("mouseover",function(h){var p=h.target,v=ju(p,Ba);v&&(hw(v,h,d._api),xr(d))}).on("mouseout",function(h){var p=h.target,v=ju(p,Ba);v&&(dw(v,h,d._api),xr(d))}).on("click",function(h){var p=h.target,v=ju(p,function(y){return rt(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=rt(v);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function i(f){var d=[],h=[],p=!1;if(f.eachComponent(function(y,_){var b=_.get("zlevel")||0,w=_.get("z")||0,x=_.getZLevelKey();p=p||!!x,(y==="series"?h:d).push({zlevel:b,z:w,idx:_.componentIndex,type:y,key:x})}),p){var v=d.concat(h),g,m;wl(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),V(v,function(y){var _=f.getComponent(y.type,y.idx),b=y.zlevel,w=y.key;g!=null&&(b=Math.max(g,b)),w?(b===g&&w!==m&&b++,m=w):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}ad=function(f,d,h,p,v){i(d),e5(f,d,h,p,v),V(f._chartsViews,function(g){g.__alive=!1}),ac(f,d,h,p,v),V(f._chartsViews,function(g){g.__alive||g.remove(d,h)})},e5=function(f,d,h,p,v,g){V(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,h,p),l(y,m),c(y,m)})},ac=function(f,d,h,p,v,g){var m=f._scheduler;v=se(v||{},{updatedSeries:d.getSeries()}),Br.trigger("series:beforeupdate",d,h,v);var y=!1;d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var w=b.renderTask;m.updatePayload(w,p),u(_,b),g&&g.get(_.uid)&&w.dirty(),w.perform(m.getPerformArgs(w))&&(y=!0),b.group.silent=!!_.get("silent"),s(_,b),pm(_)}),m.unfinished=y||m.unfinished,Br.trigger("series:layoutlabels",d,h,v),Br.trigger("series:transition",d,h,v),d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];l(_,b),c(_,b)}),o(f,d),Br.trigger("series:afterupdate",d,h,v)},xr=function(f){f[ed]=!0,f.getZr().wakeUp()},Ka=function(f){f[rc]=(f[rc]+1)%1e3},n5=function(f){f[ed]&&(f.getZr().storage.traverse(function(d){Zo(d)||a(d)}),f[ed]=!1)};function a(f){for(var d=[],h=f.currentStates,p=0;p<h.length;p++){var v=h[p];v==="emphasis"||v==="blur"||v==="select"||d.push(v)}f.selected&&f.states.select&&d.push("select"),f.hoverState===ou&&f.states.emphasis?d.push("emphasis"):f.hoverState===au&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,p=h.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>d.get("hoverLayerThreshold")&&!We.node&&!We.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function l(f,d){if(!f.preventAutoZ){var h=Gm(f);d.eachRendered(function(p){return Wm(p,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!Zo(h)){var p=h.getTextContent(),v=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,d){var h=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),v=h.get("duration"),g=v>0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Zo(m))return;if(m instanceof Fe&&bw(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&a(m)}})}t5=function(f){return new(function(d){fe(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);p=p.parent}},h.prototype.enterEmphasis=function(p,v){hu(p,v),xr(f)},h.prototype.leaveEmphasis=function(p,v){du(p,v),xr(f)},h.prototype.enterBlur=function(p){cw(p),xr(f)},h.prototype.leaveBlur=function(p){um(p),xr(f)},h.prototype.enterSelect=function(p){cm(p),xr(f)},h.prototype.leaveSelect=function(p){fm(p),xr(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},h.prototype.getMainProcessVersion=function(){return f[rc]},h}(C2))(f)},r5=function(f){function d(h,p){for(var v=0;v<h.length;v++){var g=h[v];g[td]=p}}V(sc,function(h,p){f._messageCenter.on(p,function(v){if(o5[f.group]&&f[td]!==Uy){if(v&&v.escapeConnect)return;var g=f.makeActionFromEvent(v),m=[];V(ys,function(y){y!==f&&y.group===f.group&&m.push(y)}),d(m,Uy),V(m,function(y){y[td]!==DE&&y.dispatchAction(g)}),d(m,AE)}})})}}(),t}(cn),od=i5.prototype;od.on=Yy("on"),od.off=Yy("off"),od.one=function(e,t,r){var n=this;dn("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var kE=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Qt(e){process.env.NODE_ENV!=="production"&&kt("Instance "+e+" has been disposed")}var oc={},sc={},sd={},ld=[],ud=[],lc=[],a5={},cd={},ys={},o5={},PE=+new Date-0,fd="_echarts_instance_";function NE(e,t,r){var n=!(r&&r.ssr);if(n){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Initialize failed: invalid dom.");var i=OE(e);if(i)return process.env.NODE_ENV!=="production"&&kt("There is a chart instance already initialized on the dom."),i;process.env.NODE_ENV!=="production"&&_l(e)&&e.nodeName.toUpperCase()!=="CANVAS"&&(!e.clientWidth&&(!r||r.width==null)||!e.clientHeight&&(!r||r.height==null))&&kt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var a=new i5(e,t,r);return a.id="ec_"+PE++,ys[a.id]=a,n&&Sg(e,fd,a.id),r5(a),Br.trigger("afterinit",a),a}function OE(e){return ys[tS(e,fd)]}function s5(e,t){a5[e]=t}function l5(e){Qe(ud,e)<0&&ud.push(e)}function u5(e,t){dd(ld,e,t,SE)}function IE(e){hd("afterinit",e)}function BE(e){hd("afterupdate",e)}function hd(e,t){Br.on(e,t)}function Ja(e,t,r){var n,i,a,o,s;Le(t)&&(r=t,t=""),xe(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;oc[n]||(be(Xy.test(n)&&Xy.test(i)),a&&be(i!==n),oc[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},sd[i]=1,a&&s&&(sd[u]=1),process.env.NODE_ENV!=="production"&&sc[u]&&Ue(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),sc[u]=n)}function $E(e,t){C0.register(e,t)}function RE(e,t){dd(lc,e,t,Hy,"layout")}function Zi(e,t){dd(lc,e,t,Gy,"visual")}var c5=[];function dd(e,t,r,n,i){if((Le(t)||xe(t))&&(r=t,t=n),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");V(e,function(o){be(o.__raw!==r)})}if(!(Qe(c5,r)>=0)){c5.push(r);var a=dy.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function f5(e,t){cd[e]=t}function VE(e,t,r){var n=gE("registerMap");n&&n(e,t,r)}var zE=eL;Zi(J0,bL),Zi(tc,SL),Zi(tc,wL),Zi(J0,IL),Zi(tc,BL),Zi(Wy,pE),l5(I2),u5(_E,BT),f5("default",xL),Ja({type:Ii,event:Ii,update:Ii},er),Ja({type:lu,event:lu,update:lu},er),Ja({type:uu,event:Wh,update:uu,action:er,refineEvent:pd,publishNonRefinedEvent:!0}),Ja({type:Gh,event:Wh,update:Gh,action:er,refineEvent:pd,publishNonRefinedEvent:!0}),Ja({type:cu,event:Wh,update:cu,action:er,refineEvent:pd,publishNonRefinedEvent:!0});function pd(e,t,r,n){return{eventContent:{selected:vw(r),isFromClick:t.isFromClick||!1}}}s5("default",{}),s5("dark",yy);function _s(e){return e==null?0:e.length||1}function h5(e){return e}var FE=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||h5,this._newKeyGetter=i||h5,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=_s(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=_s(u),d=_s(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=_s(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=_s(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e}(),HE=function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function GE(e,t){var r={},n=r.encode={},i=Ne(),a=[],o=[],s={};V(e.dimensions,function(d){var h=e.getDimensionInfo(d),p=h.coordDim;if(p){process.env.NODE_ENV!=="production"&&be(P0.get(p)==null);var v=h.coordDimIndex;vd(n,p)[v]=d,h.isExtraCoord||(i.set(p,1),XE(h.type)&&(a[0]=d),vd(s,p)[v]=e.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}P0.each(function(g,m){var y=vd(n,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};i.each(function(d,h){var p=n[h];u[h]=p[0],l=l.concat(p)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=ve(l,function(d){return e.getDimensionInfo(d).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new HE(s,t),r}function vd(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function WE(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function XE(e){return!(e==="ordinal"||e==="time")}var uc=function(){function e(t){this.otherDims={},t!=null&&se(this,t)}return e}(),UE=ut(),YE={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},d5=function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=g5(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return ye(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=z2(this.source),n=!m5(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=r?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=YE[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,p=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:a,hash:p}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function p5(e){return e instanceof d5}function v5(e){for(var t=Ne(),r=0;r<(e||[]).length;r++){var n=e[r],i=xe(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function g5(e){var t=UE(e);return t.dimNameMap||(t.dimNameMap=v5(e.dimensionsDefine))}function m5(e){return e>30}var bs=xe,Zn=ve,qE=typeof Int32Array>"u"?Array:Int32Array,ZE="e\0\0",y5=-1,jE=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],QE=["_approximateExtent"],_5,cc,Ss,eo,gd,ws,md,b5=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;p5(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=we(f)?new uc({name:f}):f instanceof uc?f:new uc(f),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),a[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var v=c;Ke(d.storeDimIndex)&&(v=d.storeDimIndex),p.itemName===0&&(this._nameDimIdx=v),p.itemId===0&&(this._idDimIdx=v),process.env.NODE_ENV!=="production"&&be(i||d.storeDimIndex>=0),i&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ne();V(o,function(m){g.set(a[m].storeDimIndex,m)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(Ke(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var i=this,a;if(t instanceof W0&&(a=t),!a){var o=this.dimensions,s=V0(t)||Xt(t)?new G2(t,o.length):t;a=new W0;var l=Zn(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=GE(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&md(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==mn&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===ar;if(l&&!i.pure)for(var u=[],c=t;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&Wb(f)&&(this.hasItemOption=!0),f){var d=f.name;a[c]==null&&d!=null&&(a[c]=Zr(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=Zr(h,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<r;c++)md(this,c);_5(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){bs(t)?se(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=Ss(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return cc(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,i=this._store;return me(t)?i.getValues(Zn(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[r];return i==null||isNaN(i)?y5:i},e.prototype.each=function(t,r,n){Le(t)&&(n=r,r=t,t=[]);var i=n||this,a=Zn(eo(t),this._getStoreDimIndex,this);this._store.each(a,i?ot(r,i):r)},e.prototype.filterSelf=function(t,r,n){Le(t)&&(n=r,r=t,t=[]);var i=n||this,a=Zn(eo(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ot(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=Ve(t);return V(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){Le(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=Zn(eo(t),this._getStoreDimIndex,this),s=ws(this);return s._store=this._store.map(o,a?ot(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&V(eo(t),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Zn(eo(t),this._getStoreDimIndex,this);this._store.modify(s,o?ot(r,o):r)},e.prototype.downSample=function(t,r,n,i){var a=ws(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=ws(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=ws(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new mt(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new FE(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return cc(t,n)},function(n){return cc(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},bs(t)?se(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),me(a)?a=a.slice():bs(a)&&(a=se({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,bs(r)?se(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){bs(t)?se(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?se(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;ew(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){V(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Zn(this.dimensions,this._getDimInfo,this),this.hostModel)),gd(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Le(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(gf(arguments)))})},e.internalField=function(){_5=function(t){var r=t._invertedIndicesMap;V(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new qE(o.categories.length);for(var l=0;l<n.length;l++)n[l]=y5;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Ss=function(t,r,n){return Zr(t._getCategory(r,n),null)},cc=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=Ss(t,t._idDimIdx,r)),n==null&&(n=ZE+r),n},eo=function(t){return me(t)||(t=t!=null?[t]:[]),t},ws=function(t){var r=new e(t._schema?t._schema:Zn(t.dimensions,t._getDimInfo,t),t.hostModel);return gd(r,t),r},gd=function(t,r){V(jE.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,V(QE,function(n){t[n]=Be(r[n])}),t._calculationInfo=se({},r._calculationInfo)},md=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=Ss(t,a,r)),l==null&&o!=null&&(i[r]=l=Ss(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function S5(e,t){V0(e)||(e=B2(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ne(),a=[],o=JE(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&m5(o),l=n===e.dimensionsDefine,u=l?g5(e):v5(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=Ne(c),d=new Q2(o),h=0;h<d.length;h++)d[h]=-1;function p(M){var C=d[M];if(C<0){var E=n[M],P=xe(E)?E:{name:E},D=new uc,k=P.name;k!=null&&u.get(k)!=null&&(D.name=D.displayName=k),P.type!=null&&(D.type=P.type),P.displayName!=null&&(D.displayName=P.displayName);var N=a.length;return d[M]=N,D.storeDimIndex=M,a.push(D),D}return a[C]}if(!s)for(var h=0;h<o;h++)p(h);f.each(function(M,C){var E=zt(M).slice();if(E.length===1&&!we(E[0])&&E[0]<0){f.set(C,!1);return}var P=f.set(C,[]);V(E,function(D,k){var N=we(D)?u.get(D):D;N!=null&&N<o&&(P[k]=N,g(p(N),C,k))})});var v=0;V(r,function(M){var C,E,P,D;if(we(M))C=M,D={};else{D=M,C=D.name;var k=D.ordinalMeta;D.ordinalMeta=null,D=se({},D),D.ordinalMeta=k,E=D.dimsDef,P=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var N=f.get(C);if(N!==!1){if(N=zt(N),!N.length)for(var I=0;I<(E&&E.length||1);I++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&N.push(v++)}V(N,function(O,z){var $=p(O);if(l&&D.type!=null&&($.type=D.type),g(Re($,D),C,z),$.name==null&&E){var R=E[z];!xe(R)&&(R={name:R}),$.name=$.displayName=R.name,$.defaultTooltip=R.defaultTooltip}P&&Re($.otherDims,P)})}});function g(M,C,E){P0.get(C)!=null?M.otherDims[C]=E:(M.coordDim=C,M.coordDimIndex=E,i.set(C,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function w(M){M.name==null&&(M.name=M.coordDim)}if(s)V(a,function(M){w(M)}),a.sort(function(M,C){return M.storeDimIndex-C.storeDimIndex});else for(var x=0;x<o;x++){var T=p(x),L=T.coordDim;L==null&&(T.coordDim=eM(b,i,_),T.coordDimIndex=0,(!m||y<=0)&&(T.isExtraCoord=!0),y--),w(T),T.type==null&&(b2(e,x)===Et.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return KE(a),new d5({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function KE(e){for(var t=Ne(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function JE(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return V(t,function(a){var o;xe(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function eM(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var tM=function(){function e(t){this.coordSysDims=[],this.axisMap=Ne(),this.categoryAxisMap=Ne(),this.coordSysName=t}return e}();function rM(e){var t=e.get("coordinateSystem"),r=new tM(t),n=nM[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var nM={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",pr).models[0],a=e.getReferringComponents("yAxis",pr).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+pa(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+pa(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),to(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),to(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",pr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],r.set("single",i),to(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",pr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),to(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),to(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();V(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),to(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",pr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("matrix coordinate system should be specified.");t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function to(e){return e.get("type")==="category"}function iM(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;aM(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,d;if(V(a,function(y,_){we(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,p=c.type,v=0;V(a,function(y){y.coordDim===h&&v++});var g={name:f,coordDim:h,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function aM(e){return!p5(e.schema)}function ro(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function oM(e,t){return ro(e,t)?e.getCalculationInfo("stackResultDimension"):t}function sM(e,t){var r=e.get("coordinateSystem"),n=C0.get(r),i;return t&&t.coordSysDims&&(i=ve(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=WE(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function lM(e,t,r){var n,i;return r&&V(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function fc(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===ar;var o=rM(t),s=sM(t,o),l=r.useEncodeDefaulter,u=Le(l)?l:l?Jt(uT,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=S5(i,c),d=lM(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),p=iM(t,{schema:f,store:h}),v=new b5(f,t);v.setCalculationInfo(p);var g=d!=null&&uM(i)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return v.hasItemOption=!1,v.initData(a?i:h,null,g),v}function uM(e){if(e.sourceFormat===ar){var t=cM(e.data||[]);return!me($o(t))}}function cM(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function fM(e){var t=Math.pow(10,ql(Math.abs(e))),r=Math.abs(e/t);return r===0||r===1||r===2||r===3||r===5}function yd(e){return e.type==="interval"||e.type==="log"}function hM(e,t,r,n,i){var a={},o=a.interval=lg(t/r);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=xs(o),l=a.niceTickExtent=[Lt(Math.ceil(e[0]/o)*o,s),Lt(Math.floor(e[1]/o)*o,s)];return dM(l,e),a}function _d(e){var t=Math.pow(10,ql(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Lt(r*t)}function xs(e){return hn(e)+2}function w5(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function dM(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),w5(e,0,t),w5(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function bd(e,t){return e>=t[0]&&e<=t[1]}var pM=function(){function e(){this.normalize=x5,this.scale=T5}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=ot(t.normalize,t),this.scale=ot(t.scale,t)):(this.normalize=x5,this.scale=T5)},e}();function x5(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function T5(e,t){return e*(t[1]-t[0])+t[0]}function Sd(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var jn=function(){function e(t){this._calculator=new pM,this._setting=t||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]<r[0]?t[0]:r[0],t[1]>r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();Ql(jn);var vM=0,wd=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++vM,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&ve(n,gM);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!we(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ne(this.categories))},e}();function gM(e){return xe(e)&&e.value!=null?e.value:e+""}var L5=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new wd({})),me(i)&&(i=new wd({categories:ve(i,function(a){return xe(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:we(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return bd(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},t.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(jn);jn.registerClass(L5);var Qn=Lt,Kn=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return bd(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=xs(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Pu(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:Qn(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(p,v){return Math.round((v-p)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=Qn(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Qn(f+d*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:a[1];return i[1]>h&&(r.expandToNicedExtent?l.push({value:Qn(h+n,o)}):l.push({value:i[1]})),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,d=f/r,h=xs(d);u<r-1;){var p=Qn(l.value+(u+1)*d,h);p>a[0]&&p<a[1]&&c.push(p),u++}var v=Pu();v&&v.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(c)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=hn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Qn(r.value,i,!0);return Ux(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=hM(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=Qn(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=Qn(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t}(jn);jn.registerClass(Kn);var E5=typeof Float32Array<"u",mM=E5?Float32Array:Array;function Sn(e){return me(e)?E5?new Float32Array(e):e:new mM(e)}var yM="__ec_stack_";function xd(e){return e.get("stack")||yM+e.seriesIndex}function Td(e){return e.dim+e.index}function M5(e,t){var r=[];return t.eachSeriesByType(e,function(n){D5(n)&&r.push(n)}),r}function _M(e){var t={};V(e,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),d=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),p=f.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(h,v);t[d]?t[d].push(m):t[d]=[m]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function C5(e){var t=_M(e),r=[];return V(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=tt(n.get("barWidth"),s),v=tt(n.get("barMaxWidth"),s),g=tt(n.get("barMinWidth")||(A5(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:Td(a),stackId:xd(n)})}),bM(r)}function bM(e){var t={};V(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var d=n.barMinWidth;d&&(l[u].minWidth=d);var h=n.barGap;h!=null&&(s.gap=h);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return V(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ve(a).length;s=Math.max(35-l*4,15)+"%"}var u=tt(s,o),c=tt(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),V(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,d--}else{var b=h;y&&y<b&&(b=Math.min(y,f)),_&&_>b&&(b=_),b!==h&&(m.width=b,f-=b+c*b,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var p=0,v;V(a,function(m,y){m.width||(m.width=h),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;V(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function SM(e,t,r){if(e&&t){var n=e[Td(t)];return n!=null&&r!=null?n[xd(r)]:n}}function wM(e,t){var r=M5(e,t),n=C5(r);V(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=xd(i),u=n[Td(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function xM(e){return{seriesType:e,plan:U0(),reset:function(t){if(D5(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=ro(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=TM(i,a),p=A5(t),v=t.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,b){for(var w=_.count,x=p&&Sn(w*3),T=p&&l&&Sn(w*3),L=p&&Sn(w),M=n.master.getRect(),C=d?M.width:M.height,E,P=b.getStore(),D=0;(E=_.next())!=null;){var k=P.get(f?g:o,E),N=P.get(s,E),I=h,O=void 0;f&&(O=+k-P.get(o,E));var z=void 0,$=void 0,R=void 0,B=void 0;if(d){var H=n.dataToPoint([k,N]);if(f){var F=n.dataToPoint([O,N]);I=F[0]}z=I,$=H[1]+y,R=H[0]-I,B=m,Math.abs(R)<v&&(R=(R<0?-1:1)*v)}else{var H=n.dataToPoint([N,k]);if(f){var F=n.dataToPoint([N,O]);I=F[1]}z=H[0]+y,$=I,R=m,B=H[1]-I,Math.abs(B)<v&&(B=(B<=0?-1:1)*v)}p?(x[D]=z,x[D+1]=$,x[D+2]=d?R:B,T&&(T[D]=d?M.x:z,T[D+1]=d?$:M.y,T[D+2]=C),L[E]=E):b.setItemLayout(E,{x:z,y:$,width:R,height:B}),D+=3}p&&b.setLayout({largePoints:x,largeDataIndices:L,largeBackgroundPoints:T,valueAxisHorizontal:d})}}}}}}function D5(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function A5(e){return e.pipelineContext&&e.pipelineContext.large}function TM(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var LM=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},k5=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return a2(r.value,i2[Gx(rs(this._minLevelUnit))]||i2.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return Wx(r,n,i,o,a)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=Iu(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=NM(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=Iu(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=zi.length-1,f=0;return V(a,function(d){c=Math.min(c,Qe(zi,d.time.upperTimeUnit)),f=Math.max(f,d.time.level)}),a},t.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=_r,n[1]+=_r),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-_r}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=hc.length,s=Math.min(LM(hc,this._approxInterval,0,o),o-1);this._interval=hc[s][1],this._intervalPrecision=xs(this._interval),this._minLevelUnit=hc[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return Ke(r)?r:+Bo(r)},t.prototype.contain=function(r){return bd(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(Kn),hc=[["second",g0],["minute",m0],["hour",ts],["quarter-day",ts*6],["half-day",ts*12],["day",_r*1.2],["half-week",_r*3.5],["week",_r*7],["month",_r*31],["quarter",_r*95],["half-year",n2/2],["year",n2]];function EM(e,t,r,n){return y0(new Date(t),e,n).getTime()===y0(new Date(r),e,n).getTime()}function MM(e,t){return e/=_r,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function CM(e){var t=30*_r;return e/=t,e>6?6:e>3?3:e>2?2:1}function DM(e){return e/=ts,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function P5(e,t){return e/=t?m0:g0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function AM(e){return lg(e)}function kM(e,t,r){var n=Math.max(0,Qe(zi,t)-1);return y0(new Date(e),zi[n],r).getTime()}function PM(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function NM(e,t,r,n,i,a){var o=1e4,s=Vx,l=0;function u(D,k,N,I,O,z,$){for(var R=PM(O,D),B=k,H=new Date(B);B<N&&B<=n[1];){if($.push({value:B}),l++>o){process.env.NODE_ENV!=="production"&&kt("Exceed safe limit in time scale.");break}if(H[O](H[I]()+D),B=H.getTime(),a){var F=a.calcNiceTickMultiple(B,R);F>0&&(H[O](H[I]()+F*D),B=H.getTime())}}$.push({value:B,notAdd:!0})}function c(D,k,N){var I=[],O=!k.length;if(!EM(rs(D),n[0],n[1],r)){O&&(k=[{value:kM(n[0],D,r)},{value:n[1]}]);for(var z=0;z<k.length-1;z++){var $=k[z].value,R=k[z+1].value;if($!==R){var B=void 0,H=void 0,F=void 0,A=!1;switch(D){case"year":B=Math.max(1,Math.round(t/_r/365)),H=o2(r),F=Xx(r);break;case"half-year":case"quarter":case"month":B=CM(t),H=_0(r),F=s2(r);break;case"week":case"half-week":case"day":B=MM(t),H=b0(r),F=l2(r),A=!0;break;case"half-day":case"quarter-day":case"hour":B=DM(t),H=S0(r),F=u2(r);break;case"minute":B=P5(t,!0),H=w0(r),F=c2(r);break;case"second":B=P5(t,!1),H=x0(r),F=f2(r);break;case"millisecond":B=AM(t),H=T0(r),F=h2(r);break}R>=n[0]&&$<=n[1]&&u(B,$,R,H,F,A,I),D==="year"&&N.length>1&&z===0&&N.unshift({value:N[0].value-B})}}for(var z=0;z<I.length;z++)N.push(I[z])}}for(var f=[],d=[],h=0,p=0,v=0;v<s.length;++v){var g=rs(s[v]);if(Hx(s[v])){c(s[v],f[f.length-1]||[],d);var m=s[v+1]?rs(s[v+1]):null;if(g!==m){if(d.length){p=h,d.sort(function(D,k){return D.value-k.value});for(var y=[],_=0;_<d.length;++_){var b=d[_].value;(_===0||d[_-1].value!==b)&&(y.push(d[_]),b>=n[0]&&b<=n[1]&&h++)}var w=i/t;if(h>w*1.5&&p>w/1.5||(f.push(y),h>w||e===s[v]))break}d=[]}}}for(var x=vt(ve(f,function(D){return vt(D,function(k){return k.value>=n[0]&&k.value<=n[1]&&!k.notAdd})}),function(D){return D.length>0}),T=[],L=x.length-1,v=0;v<x.length;++v)for(var M=x[v],C=0;C<M.length;++C){var E=Iu(M[C].value,r);T.push({value:M[C].value,time:{level:L-v,upperTimeUnit:E,lowerTimeUnit:E}})}T.sort(function(D,k){return D.value-k.value});for(var P=[],v=0;v<T.length;++v)(v===0||T[v].value!==T[v-1].value)&&P.push(T[v]);return P}jn.registerClass(k5);var Ld=Lt,OM=Math.floor,IM=Math.ceil,dc=Math.pow,pc=Math.log,N5=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Kn,r}return t.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,r),o=this.base;return this._originalScale._innerGetBreaks(),ve(a,function(s){var l=s.value,u=null,c=dc(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var f;return u!=null&&(c=Ed(c,u)),{value:c,break:f}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=Sd(this.base,[r,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var r=this.base,n=e.prototype.getExtent.call(this);n[0]=dc(r,n[0]),n[1]=dc(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=Ed(n[0],i[0])),this._fixMax&&(n[1]=Ed(n[1],i[1])),n},t.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=Sd(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=Rb(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ld(IM(n[0]/a)*a),Ld(OM(n[1]/a)*a)];this._interval=a,this._intervalPrecision=xs(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=pc(r)/pc(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=pc(r)/pc(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),dc(this.base,r)},t.prototype.setBreaksFromOption=function(r){},t.type="log",t}(Kn);function Ed(e,t){return Ld(e,hn(t))}jn.registerClass(N5);var BM=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;Le(o)?this._modelMinNum=vc(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=vc(t,o));var s=this._modelMaxRaw=r.get("max",!0);if(Le(s)?this._modelMaxNum=vc(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=vc(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=me(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[$n(u[0],1),$n(u[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=da(s)||da(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){process.env.NODE_ENV!=="production"&&be(!this.frozen),this[RM[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=$M[t];process.env.NODE_ENV!=="production"&&be(!this.frozen&&this[n]==null),this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),$M={min:"_determinedMin",max:"_determinedMax"},RM={min:"_dataMin",max:"_dataMax"};function VM(e,t,r){var n=e.rawExtentInfo;return n||(n=new BM(e,t,r),e.rawExtentInfo=n,n)}function vc(e,t){return t==null?null:da(t)?NaN:e.parse(t)}function O5(e,t){var r=e.type,n=VM(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=M5("bar",o),l=!1;if(V(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=C5(s),c=zM(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function zM(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=SM(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;V(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;V(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,d=c/f-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}function I5(e,t){var r=t,n=O5(e,r),i=n.extent,a=r.get("splitNumber");e instanceof N5&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(R5(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function FM(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new L5({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new k5({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(jn.getClass(t)||Kn)}}function HM(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Ts(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=zx(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(we(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Le(t)){if(e.type==="category")return function(i,a){return t(B5(e,i),i.value-e.scale.getExtent()[0],null)};var n=Pu();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(B5(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function B5(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function Md(e){var t=e.get("interval");return t??"auto"}function $5(e){return e.type==="category"&&Md(e.getLabelModel())===0}function GM(e,t){var r={};return V(e.mapDimensionsAll(t),function(n){r[oM(e,n)]=!0}),Ve(r)}function no(e){return e==="middle"||e==="center"}function Ls(e){return e.getShallow("show")}function R5(e){var t=e.get("breaks",!0);if(t!=null){process.env.NODE_ENV!=="production"&&Ue('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var V5=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}(),z5=[],WM={registerPreprocessor:l5,registerProcessor:u5,registerPostInit:IE,registerPostUpdate:BE,registerUpdateLifecycle:hd,registerAction:Ja,registerCoordinateSystem:$E,registerLayout:RE,registerVisual:Zi,registerTransform:zE,registerLoading:f5,registerMap:VE,registerImpl:vE,PRIORITY:CE,ComponentModel:Ye,ComponentView:_n,SeriesModel:or,ChartView:Zt,registerComponentModel:function(e){Ye.registerClass(e)},registerComponentView:function(e){_n.registerClass(e)},registerSeriesModel:function(e){or.registerClass(e)},registerChartView:function(e){Zt.registerClass(e)},registerCustomSeries:function(e,t){},registerSubTypeDefaulter:function(e,t){Ye.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Db(e,t)}};function ji(e){if(me(e)){V(e,function(t){ji(t)});return}Qe(z5,e)>=0||(z5.push(e),Le(e)&&(e={install:e}),e.install(WM))}var XM=ut(),Es=ut(),$r={estimate:1,determine:2};function gc(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function F5(e,t){var r=ve(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function UM(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Ts(e),i=e.scale.getExtent(),a=F5(e,r),o=vt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:ve(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?qM(e,t):jM(e)}function YM(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=F5(e,n);return{ticks:vt(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?ZM(e,t):{ticks:ve(e.scale.getTicks(r),function(o){return o.value})}}function qM(e,t){var r=e.getLabelModel(),n=H5(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function H5(e,t,r){var n=KM(e),i=Md(t),a=r.kind===$r.estimate;if(!a){var o=W5(n,i);if(o)return o}var s,l;Le(i)?s=Y5(e,i):(l=i==="auto"?JM(e,r):i,s=U5(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return Cd(n,i,u),!0}):Cd(n,i,u),u}function ZM(e,t){var r=QM(e),n=Md(t),i=W5(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Le(n))a=Y5(e,n,!0);else if(n==="auto"){var s=H5(e,e.getLabelModel(),gc($r.determine));o=s.labelCategoryInterval,a=ve(s.labels,function(l){return l.tickValue})}else o=n,a=U5(e,o,!0);return Cd(r,n,{ticks:a,tickCategoryInterval:o})}function jM(e){var t=e.scale.getTicks(),r=Ts(e);return{labels:ve(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var QM=G5("axisTick"),KM=G5("axisLabel");function G5(e){return function(r){return Es(r)[e]||(Es(r)[e]={list:[]})}}function W5(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function Cd(e,t,r){return e.list.push({key:t,value:r}),r}function JM(e,t){if(t.kind===$r.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Es(e).autoInterval=r,!0}),r}var n=Es(e).autoInterval;return n??(Es(e).autoInterval=e.calculateCategoryInterval(t))}function eC(e,t){var r=t.kind,n=rC(e),i=Ts(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],d=e.dataToCoord(f+1)-e.dataToCoord(f),h=Math.abs(d*Math.cos(a)),p=Math.abs(d*Math.sin(a)),v=0,g=0;f<=s[1];f+=u){var m=0,y=0,_=_b(i({value:f}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,v=Math.max(v,m,7),g=Math.max(g,y,7)}var b=v/h,w=g/p;isNaN(b)&&(b=1/0),isNaN(w)&&(w=1/0);var x=Math.max(0,Math.floor(Math.min(b,w)));if(r===$r.estimate)return t.out.noPxChangeTryDetermine.push(ot(tC,null,e,x,l)),x;var T=X5(e,x,l);return T??x}function tC(e,t,r){return X5(e,t,r)==null}function X5(e,t,r){var n=XM(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function rC(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 U5(e,t,r){var n=Ts(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=$5(e),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);h&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g,time:void 0,break:void 0})}return s}function Y5(e,t,r){var n=e.scale,i=Ts(e),a=[];return V(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var q5=[0,1],Z5=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return Ob(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),j5(n,i.count())),vh(t,q5,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),j5(n,i.count()));var a=vh(t,n,q5,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=YM(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=ve(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return nC(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ve(n,function(a){return ve(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||gc($r.determine),UM(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||gc($r.determine),eC(this,t)},e}();function j5(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function nC(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;V(t,function(h){h.coord-=u/2,h.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=a[0]>a[1];d(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&d(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),d(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&d(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function d(h,p){return h=Lt(h),p=Lt(p),f?h>p:h<p}}function Q5(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,p=h/d;p*=d;var v=o[0]=e+p*c,g=o[1]=t+p*f;return Math.sqrt((v-i)*(v-i)+(g-a)*(g-a))}var Jn=new Ce,lt=new Ce,Mt=new Ce,ei=new Ce,nn=new Ce,mc=[],Ht=new Ce;function iC(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Jn.fromArray(e[0]),lt.fromArray(e[1]),Mt.fromArray(e[2]),Ce.sub(ei,Jn,lt),Ce.sub(nn,Mt,lt);var r=ei.len(),n=nn.len();if(!(r<.001||n<.001)){ei.scale(1/r),nn.scale(1/n);var i=ei.dot(nn),a=Math.cos(t);if(a<i){var o=Q5(lt.x,lt.y,Mt.x,Mt.y,Jn.x,Jn.y,mc);Ht.fromArray(mc),Ht.scaleAndAdd(nn,o/Math.tan(Math.PI-t));var s=Mt.x!==lt.x?(Ht.x-lt.x)/(Mt.x-lt.x):(Ht.y-lt.y)/(Mt.y-lt.y);if(isNaN(s))return;s<0?Ce.copy(Ht,lt):s>1&&Ce.copy(Ht,Mt),Ht.toArray(e[1])}}}}function aC(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Jn.fromArray(e[0]),lt.fromArray(e[1]),Mt.fromArray(e[2]),Ce.sub(ei,lt,Jn),Ce.sub(nn,Mt,lt);var n=ei.len(),i=nn.len();if(!(n<.001||i<.001)){ei.scale(1/n),nn.scale(1/i);var a=ei.dot(t),o=Math.cos(r);if(a<o){var s=Q5(lt.x,lt.y,Mt.x,Mt.y,Jn.x,Jn.y,mc);Ht.fromArray(mc);var l=Math.PI/2,u=Math.acos(nn.dot(t)),c=l+u-r;if(c>=l)Ce.copy(Ht,Mt);else{Ht.scaleAndAdd(nn,s/Math.tan(Math.PI/2-c));var f=Mt.x!==lt.x?(Ht.x-lt.x)/(Mt.x-lt.x):(Ht.y-lt.y)/(Mt.y-lt.y);if(isNaN(f))return;f<0?Ce.copy(Ht,lt):f>1&&Ce.copy(Ht,Mt)}Ht.toArray(e[1])}}}}function Dd(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function oC(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Sf(n[0],n[1]),a=Sf(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=wf([],n[1],n[0],o/i),l=wf([],n[1],n[2],o/a),u=wf([],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],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)e.lineTo(n[c][0],n[c][1])}function sC(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<su.length;l++){var u=su[l],c=t[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:ye(i.states[u]&&i.states[u].ignore,s);if(h||!ye(d,o)){var p=f?n:n&&n.states[u];p&&(p.ignore=!0),n&&Dd(n,!0,u,c);continue}n||(n=new $i,e.setTextGuideLine(n),!f&&(s||!o)&&Dd(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),Dd(n,!1,u,c)}}if(n){Re(n.style,r),n.style.fill=null;var v=a.get("showAbove"),g=e.textGuideLineConfig=e.textGuideLineConfig||{};g.showAbove=v||!1,n.buildPath=oC}}function lC(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<yr.length;n++){var i=yr[n];r[i]=e.getModel([i,t])}return r}var K5=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],uC=1,yc=2,J5=uC|yc;function _c(e,t,r){r=r||J5,t?e.dirty|=r:e.dirty&=~r}function e4(e,t){return t=t||J5,e.dirty==null||!!(e.dirty&t)}function ti(e){if(e)return e4(e)&&t4(e,e.label,e),e}function t4(e,t,r){var n=t.getComputedTransform();e.transform=f0(e.transform,n);var i=e.localRect=Jo(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=Ha.textMargin);for(var f=0;f<4;f++)Ad[f]=c===Ha.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Ha.textMargin&&xu(i,Ad,!1,!1);var d=e.rect=Jo(e.rect,i);return n&&d.applyTransform(n),c===Ha.minMargin&&xu(d,Ad,!1,!1),e.axisAligned=c0(n),(e.label=e.label||{}).ignore=t.ignore,_c(e,!1),_c(e,!0,yc),e}var Ad=[0,0,0,0];function cC(e,t,r){return e.transform=f0(e.transform,r),e.localRect=Jo(e.localRect,t),e.rect=Jo(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=c0(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function fC(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function r4(e,t){for(var r=0;r<K5.length;r++){var n=K5[r];e[n]==null&&(e[n]=t[n])}return ti(e)}function n4(e){var t=e.obb;return(!t||e4(e,yc))&&(e.obb=t=t||new Pm,t.fromBoundingRect(e.localRect,e.transform),_c(e,!1,yc)),t}function hC(e,t,r,n,i){var a=e.length,o=Wn[t],s=Va[t];if(a<2)return!1;e.sort(function(M,C){return M.rect[o]-C.rect[o]});for(var l=0,u,c=!1,f=0,d=0;d<a;d++){var h=e[d],p=h.rect;u=p[o]-l,u<0&&(p[o]-=u,h.label[o]-=u,c=!0);var v=Math.max(-u,0);f+=v,l=p[o]+p[s]}f>0&&i&&x(-f/a,0,a);var g=e[0],m=e[a-1],y,_;b(),y<0&&T(-y,.8),_<0&&T(_,.8),b(),w(y,_,1),w(_,y,-1),b(),y<0&&L(-y),_<0&&L(_);function b(){y=g.rect[o]-r,_=n-m.rect[o]-m.rect[s]}function w(M,C,E){if(M<0){var P=Math.min(C,-M);if(P>0){x(P*E,0,a);var D=P+M;D<0&&T(-D*E,1)}else T(-M*E,1)}}function x(M,C,E){M!==0&&(c=!0);for(var P=C;P<E;P++){var D=e[P],k=D.rect;k[o]+=M,D.label[o]+=M}}function T(M,C){for(var E=[],P=0,D=1;D<a;D++){var k=e[D-1].rect,N=Math.max(e[D].rect[o]-k[o]-k[s],0);E.push(N),P+=N}if(P){var I=Math.min(Math.abs(M)/P,C);if(M>0)for(var D=0;D<a-1;D++){var O=E[D]*I;x(O,0,D+1)}else for(var D=a-1;D>0;D--){var O=E[D-1]*I;x(-O,D,a)}}}function L(M){var C=M<0?-1:1;M=Math.abs(M);for(var E=Math.ceil(M/(a-1)),P=0;P<a-1;P++)if(C>0?x(E,0,P+1):x(-E,a-P-1,a),M-=E,M<=0)return}return c}function dC(e){var t=[];e.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=ti(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(kd(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function kd(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:n4(e).intersect(n4(t),r,n)}var pC=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new ht,i=qn("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=qn(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Ae.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(or);function Pd(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Ua(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Ua(e,t,r[o]));return a.join(" ")}}function i4(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!me(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var Nd=function(e){fe(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=qn(r,-1,-1,2,2,null,s);l.attr({z2:ye(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=vC,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){hu(this.childAt(0))},t.prototype.downplay=function(){du(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var d=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,d)}else{var h=this.childAt(0);h.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(p):Nt(h,p,s,n),Qo(h)}if(this._updateCommon(r,n,l,i,a),c){var h=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,d,h,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,d=a.focus,h=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),v=Fa(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var w=Sy(r.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var x=r.getItemVisual(n,"style"),T=x.fill;if(s instanceof Pr){var L=s.style;s.useStyle(se({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},x))}else s.__isEmptyBrush?s.useStyle(se({},x)):s.useStyle(x),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=r.getItemVisual(n,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var E=o&&o.useNameLabel;za(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:T,defaultOpacity:x.opacity});function P(N){return E?r.getName(N):Pd(r,N)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var D=s.ensureState("emphasis");D.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var k=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;D.scaleX=this._sizeX*k,D.scaleY=this._sizeY*k,this.setSymbolScale(1),Oa(this,d,h,p)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=rt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&wu(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();wu(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return by(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(ht);function vC(e,t){this.parent.drift(e,t)}function Od(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function a4(e){return e!=null&&!xe(e)&&(e={isIgnore:e}),e||{}}function o4(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fa(t),cursorStyle:t.get("cursor")}}var s4=function(){function e(t){this.group=new ht,this._SymbolCtor=t||Nd}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=a4(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=o4(t),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var d=c(f);if(Od(t,d,f,r)){var h=new o(t,f,l,u);h.setPosition(d),t.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=a.getItemGraphicEl(d),p=c(f);if(!Od(t,p,f,r)){n.remove(h);return}var v=t.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==v)n.remove(h),h=new o(t,f,l,u),h.setPosition(p);else{h.updateData(t,f,l,u);var m={x:p[0],y:p[1]};s?h.attr(m):Nt(h,m,i)}n.add(h),t.setItemGraphicEl(f,h)}).remove(function(f){var d=a.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=o4(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=a4(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(Od(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Lu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function l4(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=gC(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=ve(e.dimensions,function(p){return t.mapDimension(p)}),d=!1,h=t.getCalculationInfo("stackResultDimension");return ro(t,f[0])&&(d=!0,f[0]=h),ro(t,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function gC(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:Ke(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function u4(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function mC(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function yC(e,t,r,n,i,a,o,s){for(var l=mC(e,t),u=[],c=[],f=[],d=[],h=[],p=[],v=[],g=l4(i,t,o),m=e.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],w=!0,x=void 0,T=void 0;switch(b.cmd){case"=":x=b.idx*2,T=b.idx1*2;var L=m[x],M=m[x+1],C=y[T],E=y[T+1];(isNaN(L)||isNaN(M))&&(L=C,M=E),u.push(L,M),c.push(C,E),f.push(r[x],r[x+1]),d.push(n[T],n[T+1]),v.push(t.getRawIndex(b.idx1));break;case"+":var P=b.idx,D=g.dataDimsForPoint,k=i.dataToPoint([t.get(D[0],P),t.get(D[1],P)]);T=P*2,u.push(k[0],k[1]),c.push(y[T],y[T+1]);var N=u4(g,i,t,P);f.push(N[0],N[1]),d.push(n[T],n[T+1]),v.push(t.getRawIndex(P));break;case"-":w=!1}w&&(h.push(b),p.push(p.length))}p.sort(function(G,Z){return v[G]-v[Z]});for(var I=u.length,O=Sn(I),z=Sn(I),$=Sn(I),R=Sn(I),B=[],_=0;_<p.length;_++){var H=p[_],F=_*2,A=H*2;O[F]=u[A],O[F+1]=u[A+1],z[F]=c[A],z[F+1]=c[A+1],$[F]=f[A],$[F+1]=f[A+1],R[F]=d[A],R[F+1]=d[A+1],B[_]=h[H]}return{current:O,next:z,stackedOnCurrent:$,stackedOnNext:R,status:B}}var ri=Math.min,ni=Math.max;function Qi(e,t){return isNaN(e)||isNaN(t)}function Id(e,t,r,n,i,a,o,s,l){for(var u,c,f,d,h,p,v=r,g=0;g<n;g++){var m=t[v*2],y=t[v*2+1];if(v>=i||v<0)break;if(Qi(m,y)){if(l){v+=a;continue}break}if(v===r)e[a>0?"moveTo":"lineTo"](m,y),f=m,d=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){v+=a;continue}if(o>0){for(var w=v+a,x=t[w*2],T=t[w*2+1];x===m&&T===y&&g<n;)g++,w+=a,v+=a,x=t[w*2],T=t[w*2+1],m=t[v*2],y=t[v*2+1],_=m-u,b=y-c;var L=g+1;if(l)for(;Qi(x,T)&&L<n;)L++,w+=a,x=t[w*2],T=t[w*2+1];var M=.5,C=0,E=0,P=void 0,D=void 0;if(L>=n||Qi(x,T))h=m,p=y;else{C=x-u,E=T-c;var k=m-u,N=x-m,I=y-c,O=T-y,z=void 0,$=void 0;if(s==="x"){z=Math.abs(k),$=Math.abs(N);var R=C>0?1:-1;h=m-R*z*o,p=y,P=m+R*$*o,D=y}else if(s==="y"){z=Math.abs(I),$=Math.abs(O);var B=E>0?1:-1;h=m,p=y-B*z*o,P=m,D=y+B*$*o}else z=Math.sqrt(k*k+I*I),$=Math.sqrt(N*N+O*O),M=$/($+z),h=m-C*o*(1-M),p=y-E*o*(1-M),P=m+C*o*M,D=y+E*o*M,P=ri(P,ni(x,m)),D=ri(D,ni(T,y)),P=ni(P,ri(x,m)),D=ni(D,ri(T,y)),C=P-m,E=D-y,h=m-C*z/$,p=y-E*z/$,h=ri(h,ni(u,m)),p=ri(p,ni(c,y)),h=ni(h,ri(u,m)),p=ni(p,ri(c,y)),C=m-h,E=y-p,P=m+C*$/z,D=y+E*$/z}e.bezierCurveTo(f,d,h,p,m,y),f=P,d=D}else e.lineTo(m,y)}u=m,c=y,v+=a}return g}var c4=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),_C=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:Ae.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c4},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Qi(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Qi(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Id(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=zn.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var d=a[f++],h=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case o.M:s=a[f++],l=a[f++];break;case o.L:if(h=a[f++],p=a[f++],_=u?(r-s)/(h-s):(r-l)/(p-l),_<=1&&_>=0){var b=u?(p-l)*_+l:(h-s)*_+s;return u?[r,b]:[b,r]}s=h,l=p;break;case o.C:h=a[f++],p=a[f++],v=a[f++],g=a[f++],m=a[f++],y=a[f++];var w=u?El(s,h,v,m,r,c):El(l,p,g,y,r,c);if(w>0)for(var x=0;x<w;x++){var T=c[x];if(T<=1&&T>=0){var b=u?Tt(l,p,g,y,T):Tt(s,h,v,m,T);return u?[r,b]:[b,r]}}s=m,l=y;break}}},t}(Fe),bC=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(c4),SC=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new bC},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Qi(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Qi(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Id(r,i,o,s,s,1,n.smooth,l,n.connectNulls);Id(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(Fe);function f4(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new dt({shape:{x:o,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),h=d.isHorizontal(),p=d.inverse;h?(p&&(f.shape.x+=l),f.shape.width=0):(p||(f.shape.y+=u),f.shape.height=0);var v=Le(i)?function(g){i(g,f)}:null;qt(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,v)}return f}function h4(e,t,r){var n=e.getArea(),i=Lt(n.r0,1),a=Lt(n.r,1),o=new Hn({shape:{cx:Lt(e.cx,1),cy:Lt(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function wC(e,t,r,n,i){if(e){if(e.type==="polar")return h4(e,t,r);if(e.type==="cartesian2d")return f4(e,t,r,n,i)}else return null;return null}function Bd(e,t){return e.type===t}function d4(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function p4(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function v4(e,t){var r=p4(e),n=r[0],i=r[1],a=p4(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function g4(e){return Ke(e)?e:e?.5:0}function xC(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=Sn(n*2),a=0;a<n;a++){var o=u4(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function ii(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(i){for(l=0;l<e.length;l+=2){var h=t||e;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(e[l],e[l+1])}e=d}for(l=0;l<e.length-2;l+=2)switch(f[0]=e[l+2],f[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+f[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function TC(e,t){var r=[],n=e.length,i,a;function o(c,f,d){var h=c.coord,p=(d-h)/(f.coord-h),v=Z9(p,[c.color,f.color]);return{coord:d,color:v}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function LC(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=ve(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=TC(u,i==="x"?r.getWidth():r.getHeight()),h=d.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,v=d[0].coord-p,g=d[h-1].coord+p,m=g-v;if(m<.001)return"transparent";V(d,function(_){_.offset=(_.coord-v)/m}),d.push({offset:h?d[h-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:f[0]||"transparent"});var y=new km(0,0,0,0,d,!0);return y[i]=v,y[i+"2"]=g,y}}function EC(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&MC(a,t))){var o=t.mapDimension(a.dim),s={};return V(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function MC(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Nd.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function CC(e,t){return isNaN(e)||isNaN(t)}function DC(e){for(var t=e.length/2;t>0&&CC(e[t*2-2],e[t*2-1]);t--);return t-1}function m4(e,t){return[e[t*2],e[t*2+1]]}function AC(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function y4(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<yr.length;t++)if(e.get([yr[t],"endLabel","show"]))return!0;return!1}function $d(e,t,r,n){if(Bd(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=y4(n)?function(h,p){e._endLabelOnDuring(h,p,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=f4(t,r,n,function(){var h=e._endLabel;h&&r&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,d=Math.max(f.width,f.height);u?(f.y-=d,f.height+=d*2):(f.x-=d,f.width+=d*2)}return l&&l(1,c),c}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),h4(t,r,n)}function kC(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var PC=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new ht,n=new s4;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ot(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",d=this._coordSys,h=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),b=l4(a,s,_),w=y&&xC(a,s,b),x=r.get("showSymbol"),T=r.get("connectNulls"),L=x&&!f&&EC(r,s,a),M=this._data;M&&M.eachItemGraphicEl(function(G,Z){G.__temp&&(o.remove(G),M.setItemGraphicEl(Z,null))}),x||h.remove(),o.add(g);var C=f?!1:r.get("step"),E;a&&a.getArea&&r.get("clip",!0)&&(E=a.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var P=LC(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&d.type===a.type&&C===this._step))x&&h.updateData(s,{isIgnore:L,clipShape:E,disableAnimation:!0,getSymbolPoint:function(G){return[c[G*2],c[G*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,E),C&&(w&&(w=ii(w,c,a,C,T)),c=ii(c,null,a,C,T)),p=this._newPolyline(c),y?v=this._newPolygon(c,w):v&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,E0(P)),g.setClipPath($d(this,a,!0,r));else{y&&!v?v=this._newPolygon(c,w):v&&!y&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,E0(P));var D=g.getClipPath();if(D){var k=$d(this,a,!1,r);qt(D,{shape:k.shape},r)}else g.setClipPath($d(this,a,!0,r));x&&h.updateData(s,{isIgnore:L,clipShape:E,disableAnimation:!0,getSymbolPoint:function(G){return[c[G*2],c[G*2+1]]}}),(!d4(this._stackedOnPoints,w)||!d4(this._points,c))&&(m?this._doUpdateAnimation(s,w,a,i,C,_,T):(C&&(w&&(w=ii(w,c,a,C,T)),c=ii(c,null,a,C,T)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:w})))}var N=r.getModel("emphasis"),I=N.get("focus"),O=N.get("blurScope"),z=N.get("disabled");if(p.useStyle(Re(l.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),Ia(p,r,"lineStyle"),p.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var $=p.getState("emphasis").style;$.lineWidth=+p.style.lineWidth+1}rt(p).seriesIndex=r.seriesIndex,Oa(p,I,O,z);var R=g4(r.get("smooth")),B=r.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:B,connectNulls:T}),v){var H=s.getCalculationInfo("stackedOnSeries"),F=0;v.useStyle(Re(u.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(F=g4(H.get("smooth"))),v.setShape({smooth:R,stackedOnSmooth:F,smoothMonotone:B,connectNulls:T}),Ia(v,r,"areaStyle"),rt(v).seriesIndex=r.seriesIndex,Oa(v,I,O,z)}var A=this._changePolyState;s.eachItemGraphicEl(function(G){G&&(G.onHoverStateChange=A)}),this._polyline.onHoverStateChange=A,this._data=s,this._coordSys=a,this._stackedOnPoints=w,this._points=c,this._step=C,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,p),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){rt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Aa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var d=r.get("zlevel")||0,h=r.get("z")||0;u=new Nd(o,s),u.x=c,u.y=f,u.setZ(d,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=d,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Zt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Aa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Zt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;om(this._polyline,r),n&&om(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new _C({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new SC({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Le(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Le(f)?f(null):f;r.eachItemGraphicEl(function(h,p){var v=h;if(v){var g=[h.x,h.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var b=i,w=n.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-w[1]/180*Math.PI):(m=b.r0,y=b.r,_=w[0])}else{var x=i;a?(m=x.x,y=x.x+x.width,_=h.x):(m=x.y+x.height,y=x.y,_=h.y)}var T=y===m?0:(_-m)/(y-m);l&&(T=1-T);var L=Le(f)?f(p):c*T+d,M=v.getSymbolPath(),C=M.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:L}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:L}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(y4(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ir({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=DC(l);c>=0&&(za(s,Fa(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?i4(o,h):Pd(o,f)},enableTextSetter:!0},kC(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),d=i.hostModel,h=d.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,w=(m?v:0)*(y?-1:1),x=(m?0:-v)*(y?-1:1),T=m?"x":"y",L=AC(f,b,T),M=L.range,C=M[1]-M[0],E=void 0;if(C>=1){if(C>1&&!h){var P=m4(f,M[0]);u.attr({x:P[0]+w,y:P[1]+x}),o&&(E=d.getRawValue(M[0]))}else{var P=c.getPointOn(b,T);P&&u.attr({x:P[0]+w,y:P[1]+x});var D=d.getRawValue(M[0]),k=d.getRawValue(M[1]);o&&(E=rS(i,p,D,k,L.t))}a.lastFrameIndex=M[0]}else{var N=r===1||a.lastFrameIndex>0?M[0]:0,P=m4(f,N);o&&(E=d.getRawValue(N)),u.attr({x:P[0]+w,y:P[1]+x})}if(o){var I=Cu(u);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,d=yC(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=d.current,p=d.stackedOnCurrent,v=d.next,g=d.stackedOnNext;if(o&&(p=ii(d.stackedOnCurrent,d.current,i,o,l),h=ii(d.current,null,i,o,l),g=ii(d.stackedOnNext,d.next,i,o,l),v=ii(d.next,null,i,o,l)),v4(h,v)>3e3||c&&v4(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=h;var m={shape:{points:v}};d.current!==h&&(m.shape.__points=d.next),u.stopAnimation(),Nt(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:p}),c.stopAnimation(),Nt(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,b=0;b<_.length;b++){var w=_[b].cmd;if(w==="="){var x=r.getItemGraphicEl(_[b].idx1);x&&y.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var T=u.shape.__points,L=0;L<y.length;L++){var M=y[L].el,C=y[L].ptIdx*2;M.x=T[C],M.y=T[C+1],M.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(Zt);function Rd(e,t){return{seriesType:e,plan:U0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=ve(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");ro(n,s[0])&&(s[0]=u),ro(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),d=n.getDimensionIndex(s[1]);return l&&{progress:function(h,p){for(var v=h.end-h.start,g=o&&Sn(v*l),m=[],y=[],_=h.start,b=0;_<h.end;_++){var w=void 0;if(l===1){var x=c.get(f,_);w=i.dataToPoint(x,null,y)}else m[0]=c.get(f,_),m[1]=c.get(d,_),w=i.dataToPoint(m,null,y);o?(g[b++]=w[0],g[b++]=w[1]):p.setItemLayout(_,w.slice())}o&&p.setLayout("points",g)}}}}}}var NC={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},OC=function(e){return Math.round(e.length/2)};function _4(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var p=void 0;we(a)?p=NC[a]:Le(a)&&(p=a),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,p,OC))}}}}}function IC(e){e.registerChartView(PC),e.registerSeriesModel(pC),e.registerLayout(Rd("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,_4("line"))}var Vd=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)V(a.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var p=d.getTicksCoords(),v=d.getTickModel().get("alignWithLabel"),g=o[h],m=n[h]==="x1"||n[h]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[h]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,b=1,w=0;w<p.length;w++){var x=p[w].coord,T=w===p.length-1?p[w-1].tickValue+b:p[w].tickValue;if(T===g){_=x;break}else if(T<g)y=x;else if(y!=null&&T>g){_=(x+y)/2;break}w===1&&(b=T-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[h]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(or);or.registerClass(Vd);var BC=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return fc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=e2(Vd.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:Ae.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Vd),$C=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),b4=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new $C},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,d=n.clockwise,h=Math.PI*2,p=d?f-c<h:c-f<h;p||(c=f-(d?h:-h));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);p?(r.moveTo(v*o+i,g*o+a),r.arc(v*u+i,g*u+a,l,-Math.PI+c,c,!d)):r.moveTo(v*s+i,g*s+a),r.arc(i,a,s,c,f,!d),r.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&r.arc(i,a,o,f,c,d)},t}(Fe);function RC(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Wl(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,p=(d+h)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=r?Math.abs(d-h)/2:0,_=Math.cos,b=Math.sin,w=c+d*_(v),x=f+d*b(v),T="left",L="top";switch(s){case"startArc":w=c+(h-l)*_(m),x=f+(h-l)*b(m),T="center",L="top";break;case"insideStartArc":w=c+(h+l)*_(m),x=f+(h+l)*b(m),T="center",L="bottom";break;case"startAngle":w=c+p*_(v)+bc(v,l+y,!1),x=f+p*b(v)+Sc(v,l+y,!1),T="right",L="middle";break;case"insideStartAngle":w=c+p*_(v)+bc(v,-l+y,!1),x=f+p*b(v)+Sc(v,-l+y,!1),T="left",L="middle";break;case"middle":w=c+p*_(m),x=f+p*b(m),T="center",L="middle";break;case"endArc":w=c+(d+l)*_(m),x=f+(d+l)*b(m),T="center",L="bottom";break;case"insideEndArc":w=c+(d-l)*_(m),x=f+(d-l)*b(m),T="center",L="top";break;case"endAngle":w=c+p*_(g)+bc(g,l+y,!0),x=f+p*b(g)+Sc(g,l+y,!0),T="left",L="middle";break;case"insideEndAngle":w=c+p*_(g)+bc(g,-l+y,!0),x=f+p*b(g)+Sc(g,-l+y,!0),T="right",L="middle";break;default:return Wl(n,i,a)}return n=n||{},n.x=w,n.y=x,n.align=T,n.verticalAlign=L,n}}function VC(e,t,r,n){if(Ke(n)){e.setTextConfig({rotation:n});return}else if(me(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function bc(e,t,r){return t*Math.sin(e)*(r?-1:1)}function Sc(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Ms(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;me(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:ve(n,function(a){return $n(a,i)})}}var zd=Math.max,Fd=Math.min;function zC(e,t){var r=e.getArea&&e.getArea();if(Bd(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var FC=function(e){fe(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&kt("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Lu(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=r.isAnimationEnabled()?r:null,h=HC(r,u);h&&this._enableRealtimeSort(h,s,i);var p=r.get("clip",!0)||h,v=zC(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],w=this._backgroundEls,x=a&&a.isInitSort,T=a&&a.type==="changeAxisOrder";function L(E){var P=wc[u.type](s,E);if(!P)return null;var D=ZC(u,f,P);return D.useStyle(y.getItemStyle()),u.type==="cartesian2d"?D.setShape("r",_):D.setShape("cornerRadius",_),b[E]=D,D}s.diff(l).add(function(E){var P=s.getItemModel(E),D=wc[u.type](s,E,P);if(D&&(m&&L(E),!(!s.hasValue(E)||!L4[u.type](D)))){var k=!1;p&&(k=S4[u.type](v,D));var N=w4[u.type](r,s,E,D,f,d,c.model,!1,g);h&&(N.forceLabelAnimation=!0),M4(N,s,E,P,D,r,f,u.type==="polar"),x?N.attr({shape:D}):h?x4(h,d,N,D,E,f,!1,!1):qt(N,{shape:D},r,E),s.setItemGraphicEl(E,N),o.add(N),N.ignore=k}}).update(function(E,P){var D=s.getItemModel(E),k=wc[u.type](s,E,D);if(k){if(m){var N=void 0;w.length===0?N=L(P):(N=w[P],N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",_):N.setShape("cornerRadius",_),b[E]=N);var I=wc[u.type](s,E),O=k4(f,I,u);Nt(N,{shape:O},d,E)}var z=l.getItemGraphicEl(P);if(!s.hasValue(E)||!L4[u.type](k)){o.remove(z);return}var $=!1;p&&($=S4[u.type](v,k),$&&o.remove(z));var R=z&&(z.type==="sector"&&g||z.type==="sausage"&&!g);if(R&&(z&&jo(z,r,P),z=null),z?Qo(z):z=w4[u.type](r,s,E,k,f,d,c.model,!0,g),h&&(z.forceLabelAnimation=!0),T){var B=z.getTextContent();if(B){var H=Cu(B);H.prevValue!=null&&(H.prevValue=H.value)}}else M4(z,s,E,D,k,r,f,u.type==="polar");x?z.attr({shape:k}):h?x4(h,d,z,k,E,f,!0,T):Nt(z,{shape:k},r,E,null),s.setItemGraphicEl(E,z),z.ignore=$,o.add(z)}}).remove(function(E){var P=l.getItemGraphicEl(E);P&&jo(P,r,E)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new ht);M.removeAll();for(var C=0;C<b.length;++C)M.add(b[C]);o.add(M),this._backgroundEls=b,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),D4(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),D4(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&wC(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ve(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){jo(a,r,rt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Zt),S4={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=zd(t.x,e.x),s=Fd(t.x+t.width,i),l=zd(t.y,e.y),u=Fd(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>i?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=Fd(t.r,e.r),a=zd(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},w4={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new dt({shape:se({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?b4:Hn,c=new u({shape:n,z2:1});c.name="item";var f=E4(i);if(c.calculateTextPosition=RC(f,{isRoundCap:u===b4}),a){var d=c.shape,h=i?"r":"endAngle",p={};d[h]=i?n.r0:n.startAngle,p[h]=n[h],(s?Nt:qt)(c,{shape:p},a)}return c}};function HC(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&kt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&kt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function x4(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Nt:qt)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?Nt:qt)(r,{shape:u},c,i)}function T4(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var GC=["x","y","width","height"],WC=["cx","cy","r","startAngle","endAngle"],L4={cartesian2d:function(e){return!T4(e,GC)},polar:function(e){return!T4(e,WC)}},wc={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?UC(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function XC(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function E4(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function M4(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,f=Ms(n.getModel("itemStyle"),c,!0);se(c,f),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var d=n.getShallow("cursor");d&&e.attr("cursor",d);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Fa(n);za(e,p,{labelFetcher:a,labelDataIndex:r,defaultText:Pd(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var v=e.getTextContent();if(s&&v){var g=n.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,VC(e,g==="outside"?h:g,E4(o),n.get(["label","rotate"]))}bx(v,p,a.getRawValue(r),function(y){return i4(t,y)});var m=n.getModel(["emphasis"]);Oa(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ia(e,n),XC(i)&&(e.style.fill="none",e.style.stroke="none",V(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function UC(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var YC=function(){function e(){}return e}(),C4=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new YC},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(Fe);function D4(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new C4({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var f=new C4({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,rt(f).seriesIndex=e.seriesIndex,e.get("silent")||(f.on("mousedown",A4),f.on("mousemove",A4)),r&&r.push(f)}var A4=ly(function(e){var t=this,r=qC(t,e.offsetX,e.offsetY);rt(t).dataIndex=r>=0?r:null},30,!1);function qC(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[i]=a[d+2],s[n]=a[d+n],s[i]=a[d+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function k4(e,t,r){if(Bd(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function ZC(e,t,r){var n=e.type==="polar"?Hn:dt;return new n({shape:k4(t,r,e),silent:!0,z2:0})}function jC(e){e.registerChartView(FC),e.registerSeriesModel(BC),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Jt(wM,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,xM("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,_4("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var P4=Math.PI*2,xc=Math.PI/180;function QC(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=rT(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*xc,h=n.get("endAngle"),p=n.get("padAngle")*xc;h=h==="auto"?d-P4:-h*xc;var v=n.get("minAngle")*xc,g=v+p,m=0;i.each(a,function(O){!isNaN(O)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,b=n.get("clockwise"),w=n.get("roseType"),x=n.get("stillShowZeroSum"),T=i.getDataExtent(a);T[0]=0;var L=b?1:-1,M=[d,h],C=L*p/2;$g(M,!b),d=M[0],h=M[1];var E=N4(n);E.startAngle=d,E.endAngle=h,E.clockwise=b,E.cx=s,E.cy=l,E.r=u,E.r0=c;var P=Math.abs(h-d),D=P,k=0,N=d;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(O,z){var $;if(isNaN(O)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:w?NaN:u});return}w!=="area"?$=y===0&&x?_:O*_:$=P/m,$<g?($=g,D-=g):k+=O;var R=N+L*$,B=0,H=0;p>$?(B=N+L*$/2,H=B):(B=N+C,H=R-C),i.setItemLayout(z,{angle:$,startAngle:B,endAngle:H,clockwise:b,cx:s,cy:l,r0:c,r:w?vh(O,T,[c,u]):u}),N=R}),D<P4&&m)if(D<=.001){var I=P/m;i.each(a,function(O,z){if(!isNaN(O)){var $=i.getItemLayout(z);$.angle=I;var R=0,B=0;I<p?(R=d+L*(z+1/2)*I,B=R):(R=d+L*z*I+C,B=d+L*(z+1)*I-C),$.startAngle=R,$.endAngle=B}})}else _=D/k,N=d,i.each(a,function(O,z){if(!isNaN(O)){var $=i.getItemLayout(z),R=$.angle===g?g:O*_,B=0,H=0;R<p?(B=N+L*R/2,H=B):(B=N+C,H=N+L*R-C),$.startAngle=B,$.endAngle=H,N+=L*R}})})}var N4=ut();function O4(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var KC=Math.PI/180;function I4(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],b=Math.abs(_.label.y-r),w=n+_.len,x=w*w,T=Math.sqrt(Math.abs((1-b*b/m)*x)),L=t+(T+_.len2)*i,M=L-_.label.x,C=_.targetTextWidth-M*i;B4(_,C,!0),_.label.x=L}}function f(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],b=_.label.y>r?m:g,w=Math.abs(_.label.y-r);if(w>=b.maxY){var x=_.label.x-t-_.len2*i,T=n+_.len,L=Math.abs(x)<T?Math.sqrt(w*w/(1-x*x/T/T)):T;b.rB=L,b.maxY=w}b.list.push(_)}c(g),c(m)}for(var d=e.length,h=0;h<d;h++)if(e[h].position==="outer"&&e[h].labelAlignTo==="labelLine"){var p=e[h].label.x-u;e[h].linePoints[1][0]+=p,e[h].label.x=u}hC(e,1,l,l+o)&&f(e)}function JC(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<e.length;d++){var h=e[d].label;Hd(e[d])||(h.x<t?(c=Math.min(c,h.x),l.push(e[d])):(f=Math.max(f,h.x),u.push(e[d])))}for(var d=0;d<e.length;d++){var p=e[d];if(!Hd(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var h=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?h.x<t?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?h.x<t?g=c-o-p.bleedMargin:g=o+i-f-p.bleedMargin:h.x<t?g=h.x-o-p.bleedMargin:g=o+i-h.x-p.bleedMargin,p.targetTextWidth=g,B4(p,g,!1)}}I4(u,t,r,n,1,i,a,o,s,f),I4(l,t,r,n,-1,i,a,o,s,c);for(var d=0;d<e.length;d++){var p=e[d];if(!Hd(p)&&p.linePoints){var h=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=h.style.padding,_=y?y[1]+y[3]:0,b=h.style.backgroundColor?0:_,w=p.rect.width+b,x=v[1][0]-v[2][0];m?h.x<t?v[2][0]=o+p.edgeDistance+w+p.labelDistance:v[2][0]=o+i-p.edgeDistance-w-p.labelDistance:(h.x<t?v[2][0]=h.x+p.labelDistance:v[2][0]=h.x-p.labelDistance,v[1][0]=v[2][0]+x),v[1][1]=v[2][1]=h.y}}}function B4(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=t-l,h=t<c?d:r?d>e.unconstrainedWidth?null:d:null;n.setStyle("width",h)}$4(a,n)}}}function $4(e,t){R4.rect=e,t4(R4,t,eD)}var eD={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},R4={};function Hd(e){return e.position==="center"}function tD(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*KC,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var T in x.states)if(x.states[T].ignore===!1)return!0;return!1}t.each(function(x){var T=t.getItemGraphicEl(x),L=T.shape,M=T.getTextContent(),C=T.getTextGuideLine(),E=t.getItemModel(x),P=E.getModel("label"),D=P.get("position")||E.get(["emphasis","label","position"]),k=P.get("distanceToLabelLine"),N=P.get("alignTo"),I=tt(P.get("edgeDistance"),u),O=P.get("bleedMargin");O==null&&(O=Math.min(u,d)>200?10:2);var z=E.getModel("labelLine"),$=z.get("length");$=tt($,u);var R=z.get("length2");if(R=tt(R,u),Math.abs(L.endAngle-L.startAngle)<o){V(M.states,h),M.ignore=!0,C&&(V(C.states,h),C.ignore=!0);return}if(p(M)){var B=(L.startAngle+L.endAngle)/2,H=Math.cos(B),F=Math.sin(B),A,G,Z,Q;n=L.cx,i=L.cy;var q=D==="inside"||D==="inner";if(D==="center")A=L.cx,G=L.cy,Q="center";else{var W=(q?(L.r+L.r0)/2*H:L.r*H)+n,j=(q?(L.r+L.r0)/2*F:L.r*F)+i;if(A=W+H*3,G=j+F*3,!q){var Y=W+H*($+l-L.r),re=j+F*($+l-L.r),te=Y+(H<0?-1:1)*R,ne=re;N==="edge"?A=H<0?c+I:c+u-I:A=te+(H<0?-k:k),G=ne,Z=[[W,j],[Y,re],[te,ne]]}Q=q?"center":N==="edge"?H>0?"right":"left":H>0?"left":"right"}var ge=Math.PI,Se=0,ie=P.get("rotate");if(Ke(ie))Se=ie*(ge/180);else if(D==="center")Se=0;else if(ie==="radial"||ie===!0){var Ee=H<0?-B+ge:-B;Se=Ee}else if(ie==="tangential"&&D!=="outside"&&D!=="outer"){var K=Math.atan2(H,F);K<0&&(K=ge*2+K);var le=F>0;le&&(K=ge+K),Se=K-ge}if(a=!!Se,M.x=A,M.y=G,M.rotation=Se,M.setStyle({verticalAlign:"middle"}),q){M.setStyle({align:Q});var X=M.states.select;X&&(X.x+=M.x,X.y+=M.y)}else{var U=new Oe(0,0,0,0);$4(U,M),r.push({label:M,labelLine:C,position:D,len:$,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Ce(H,F),linePoints:Z,textAlign:Q,labelDistance:k,labelAlignTo:N,edgeDistance:I,bleedMargin:O,rect:U,unconstrainedWidth:U.width,labelStyleWidth:M.style.width})}T.setTextConfig({inside:q})}}),!a&&e.get("avoidLabelOverlap")&&JC(r,n,i,l,u,d,c,f);for(var v=0;v<r.length;v++){var g=r[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(V(m.states,h),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var w=g.linePoints;_||!w?(V(y.states,h),y.ignore=!0):(iC(w,g.minTurnAngle),aC(w,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new Ce(w[0][0],w[0][1])})}}}var rD=function(e){fe(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new ir;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=se(Ms(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):d==="scale"?(o.shape.r=c.r0,qt(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Nt(o,{shape:{endAngle:c.endAngle}},s,n))}else Qo(o),Nt(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Ia(o,l);var h=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(h)*p,g=Math.sin(h)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=se({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Ms(u.getModel("itemStyle"),c)),se(o.ensureState("select"),{x:v,y:g,shape:Ms(l.getModel(["select","itemStyle"]),c)}),se(o.ensureState("blur"),{shape:Ms(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&se(y.ensureState("select"),{x:v,y:g}),se(_.ensureState("select"),{x:v,y:g}),Oa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;za(a,Fa(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new $i,this.setTextGuideLine(h)),sC(this,lC(o),{stroke:u,opacity:un(s.get(["lineStyle","opacity"]),c,1)})}},t}(Hn),nD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var d=N4(r),h=new Hn({shape:Be(d)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(p){var v=new rD(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);jo(v,r,p)}).execute(),tD(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(Zt);function V4(e,t,r){t=me(t)&&{coordDimensions:t}||se({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=S5(n,t).dimensions,a=new b5(i,e);return a.initData(n,r),a}var z4=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),iD=ut(),F4=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new z4(ot(this.getData,this),ot(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return V4(this,{coordDimensions:["value"],encodeDefaulter:Jt(cT,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=iD(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Ib(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){_h(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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}(or);Zx({fullType:F4.type,getCoord2:function(e){return e.getShallow("center")}});function aD(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Ke(o)&&!isNaN(o)&&o<0)})}}}function oD(e){e.registerChartView(nD),e.registerSeriesModel(F4),VL("pie",e.registerAction),e.registerLayout(Jt(QC,"pie")),e.registerProcessor(O4("pie")),e.registerProcessor(aD("pie"))}var sD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],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:Ae.color.primary}},universalTransition:{divideShape:"clone"}},t}(or),H4=4,lD=function(){function e(){}return e}(),uD=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new lD},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<H4,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var d=i[f++],h=i[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-a[0]/2,s.y=h-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,d=a[c+1]-l/2;if(r>=f&&n>=d&&r<=f+s&&n<=d+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<i.length;){var h=i[d++],p=i[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(p,u),f=Math.max(p,f)}r=this._rect=new Oe(l-o/2,u-s/2,c-l+o,f-u+s)}return r},t}(Fe),cD=function(){function e(){this.group=new ht}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new uD({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=qn(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<H4;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=rt(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(u.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),fD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Rd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new cD:new s4,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Zt),G4={left:0,right:0,top:0,bottom:0},Tc=["25%","25%"],hD=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=os(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Un(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Un(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:G4,outerBoundsContain:"all",outerBoundsClampWidth:Tc[0],outerBoundsClampHeight:Tc[1],backgroundColor:Ae.color.transparent,borderWidth:1,borderColor:Ae.color.neutral30},t}(Ye),Gd=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",pr).models[0]},t.type="cartesian2dAxis",t}(Ye);Cr(Gd,V5);var W4={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:Ae.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:Ae.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Ae.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Ae.color.backgroundTint,Ae.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Ae.color.neutral00,borderColor:Ae.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},dD=je({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},W4),Wd=je({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Ae.color.axisMinorSplitLine,width:1}}},W4),pD=je({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Wd),vD=Re({logBase:10},Wd);const X4={category:dD,value:Wd,time:pD,log:vD};var gD={value:1,category:1,time:1,log:1},mD=null;function U4(){return mD}function Y4(e,t,r,n){V(gD,function(i,a){var o=je(je({},X4[a],!0),n,!0),s=function(l){fe(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=as(this),h=d?os(c):{},p=f.getTheme();je(c,p.get(a+"Axis")),je(c,this.getDefaultOption()),c.type=q4(c),d&&Un(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=wd.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=U4();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",q4)}function q4(e){return e.type||(e.data?"category":"value")}var yD=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return ve(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),vt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),Xd=["x","y"];function Z4(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var _D=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=Xd,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Z4(r)||!Z4(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,p=this._transform=[c,0,0,f,d,h];this._invTransform=So([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return fr(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return fr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Oe(a,o,s,l)},t}(yD),bD=function(e){fe(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(Z5),SD="expandAxisBreak",ai=Math.PI,wD=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],xD=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Cs=ut(),j4=ut(),Q4=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function TD(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=Yd(e.axisName)&&no(e.nameLocation);V(n,function(p){var v=ti(p);if(!(!v||v.label.ignore)){o.push(v);var g=a.transGroup;l&&(g.transform?So(Ds,g.transform):Cf(Ds),v.transform&&bo(Ds,Ds,v.transform),Oe.copy(Lc,v.localRect),Lc.applyTransform(Ds),s?s.union(Lc):Oe.copy(s=new Oe(0,0,0,0),Lc))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,v){return Math.abs(p.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=i.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new Oe(d,0,h,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Ds=Pn(),Lc=new Oe(0,0,0,0),K4=function(e,t,r,n,i,a){if(no(e.nameLocation)){var o=a.stOccupiedRect;o&&J4(cC({},o,a.transGroup.transform),n,i)}else e_(a.labelInfoList,a.dirVec,n,i)};function J4(e,t,r){var n=new Ce;kd(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&fC(t,n)}function e_(e,t,r,n){for(var i=Ce.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||J4(s,r,n)}}var Ki=function(){function e(t,r,n,i){this.group=new ht,this._axisModel=t,this._api=r,this._local={},this._shared=i||new Q4(K4),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;be(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=ye(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=ye(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:ye(t.nameDirection,1),tickDirection:ye(t.tickDirection,1),labelDirection:ye(t.labelDirection,1),labelOffset:ye(t.labelOffset,0),silent:ye(t.silent,!0),axisName:i,nameLocation:un(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:Yd(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(be(o.position!=null),be(o.rotation!=null)),this._cfg=o;var s=new ht({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Ce(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),V(LD,function(i){t[i]&&ED[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=sg(r-t),a,o;return Yl(i)?(o=n>0?"top":"bottom",a="center"):Yl(i-ai)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ai?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),LD=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],ED={axisLine:function(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;be(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,f=[u[0],0],d=[u[1],0],h=f[0]>d[0];c&&(fr(f,f,c),fr(d,d,c));var p=se({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())U4().buildAxisBreakLine(n,i,a,v);else{var g=new Gn(se({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]}},v));Ko(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);we(m)&&(m=[m,m]),(we(y)||Ke(y))&&(y=[y,y]);var _=Sy(n.get(["axisLine","symbolOffset"])||0,y),b=y[0],w=y[1];V([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1]))}],function(x,T){if(m[T]!=="none"&&m[T]!=null){var L=qn(m[T],-b/2,-w/2,b,w,p.stroke,!0),M=x.r+x.offset,C=h?d:f;L.attr({rotation:x.rotate,x:C[0]+M*Math.cos(e.rotation),y:C[1]-M*Math.sin(e.rotation),silent:!0,z2:11}),i.add(L)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;be(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=n_(t,i,s);u&&t_(e,t,r,n,i,a,o,$r.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=n_(t,i,s);u&&t_(e,t,r,n,i,a,o,$r.determine);var c=AD(e,i,a,n);DD(e,t.labelLayoutList,c),kD(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;be(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=e.axisName;if(Yd(c)){var f=e.nameLocation,d=e.nameDirection,h=n.getModel("nameTextStyle"),p=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Ce(0,0),y=new Ce(0,0);f==="start"?(m.x=v[0]-g*p,y.x=-g):f==="end"?(m.x=v[1]+g*p,y.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+d*p,y.y=d);var _=Pn();y.transform(u1(_,_,e.rotation));var b=n.get("nameRotate");b!=null&&(b=b*ai/180);var w,x;no(f)?w=Ki.innerTextLayout(e.rotation,b??e.rotation,d):(w=MD(e.rotation,f,b||0,v),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(w.rotation)),!isFinite(x)&&(x=null)));var T=h.getFont(),L=n.get("nameTruncate",!0)||{},M=L.ellipsis,C=pa(e.raw.nameTruncateMaxWidth,L.maxWidth,x),E=s.nameMarginLevel||0,P=new ir({x:m.x,y:m.y,rotation:w.rotation,silent:Ki.isLabelSilent(n),style:es(h,{text:c,font:T,overflow:"truncate",width:C,ellipsis:M,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||w.textAlign,verticalAlign:h.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(Tu({el:P,componentModel:n,itemName:c}),P.__fullText=c,P.anid="name",n.get("triggerEvent")){var D=Ki.makeAxisEventDataBase(n);D.targetType="axisName",D.name=c,rt(P).eventData=D}a.add(P),P.updateTransform(),t.nameEl=P;var k=l.nameLayout=ti({label:P,priority:P.z2,defaultAttr:{ignore:P.ignore},marginDefault:no(f)?wD[E]:xD[E]});if(l.nameLocation=f,i.add(P),P.decomposeTransform(),e.shouldNameMoveOverlap&&k){var N=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&be(N.labelInfoList),r.resolveAxisNameOverlap(e,r,n,k,y,N)}}}};function t_(e,t,r,n,i,a,o,s){i_(t)||PD(e,t,i,s,n,o);var l=t.labelLayoutList;ND(e,n,l,a),e.rotation;var u=e.optionHideOverlap;CD(n,l,u),u&&dC(vt(l,function(c){return c&&!c.label.ignore})),TD(e,r,n,l)}function MD(e,t,r,n){var i=sg(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Yl(i-ai/2)?(o=l?"bottom":"top",a="center"):Yl(i-ai*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<ai*1.5&&i>ai/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function CD(e,t,r){if($5(e.axis))return;function n(s,l,u){var c=ti(t[l]),f=ti(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){As(c.label);return}if(f.suggestIgnore){As(f.label);return}var d=.1;if(!r){var h=[0,0,0,0];c=r4({marginForce:h},c),f=r4({marginForce:h},f)}kd(c,f,null,{touchThreshold:d})&&As(s?f.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function DD(e,t,r){e.showMinorTicks||V(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=j4(a),s=Cs(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){As(a);return}}})}function As(e){e&&(e.ignore=!0)}function r_(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(fr(o,o,t),fr(s,s,t));var c=new Gn({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ko(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var f=j4(c);f.onBand=!!e[l].onBand,f.tickValue=e[l].tickValue}return a}function AD(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=r_(u,r.transform,l,Re(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function kD(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Re(l.getLineStyle(),Re(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=r_(s[f],r.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)t.add(d[h])}}function n_(e,t,r){if(i_(e)){var n=e.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&be(e.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),Ud(e,null,null,null))}return!0}function PD(e,t,r,n,i,a){var o=i.axis,s=pa(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new ht;r.add(l);var u=gc(n);if(!s||o.scale.isBlank()){Ud(t,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),d=(pa(e.raw.labelRotate,c.get("rotate"))||0)*ai/180,h=Ki.innerTextLayout(e.rotation,d,e.labelDirection),p=i.getCategories&&i.getCategories(!0),v=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;V(f,function(b,w){var x,T=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(b.tickValue):b.tickValue,L=b.formattedLabel,M=b.rawLabel,C=c;if(p&&p[T]){var E=p[T];xe(E)&&E.textStyle&&(C=new mt(E.textStyle,c,i.ecModel))}var P=C.getTextColor()||i.get(["axisLine","lineStyle","color"]),D=C.getShallow("align",!0)||h.textAlign,k=ye(C.getShallow("alignMinLabel",!0),D),N=ye(C.getShallow("alignMaxLabel",!0),D),I=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||h.textVerticalAlign,O=ye(C.getShallow("verticalAlignMinLabel",!0),I),z=ye(C.getShallow("verticalAlignMaxLabel",!0),I),$=10+(((x=b.time)===null||x===void 0?void 0:x.level)||0);m=Math.min(m,$),y=Math.max(y,$);var R=new ir({x:0,y:0,rotation:0,silent:Ki.isLabelSilent(i),z2:$,style:es(C,{text:L,align:w===0?k:w===f.length-1?N:D,verticalAlign:w===0?O:w===f.length-1?z:I,fill:Le(P)?P(o.type==="category"?M:o.type==="value"?T+"":T,w):P})});R.anid="label_"+T;var B=Cs(R);if(B.break=b.break,B.tickValue=T,B.layoutRotation=h.rotation,Tu({el:R,componentModel:i,itemName:L,formatterParamsExtra:{isTruncated:function(){return R.isTruncated},value:M,tickIndex:w}}),g){var H=Ki.makeAxisEventDataBase(i);H.targetType="axisLabel",H.value=M,H.tickIndex=w,b.break&&(H.break={start:b.break.parsedBreak.vmin,end:b.break.parsedBreak.vmax}),o.type==="category"&&(H.dataIndex=T),rt(R).eventData=H,b.break&&ID(i,a,R,b.break)}v.push(R),l.add(R)});var _=ve(v,function(b){return{label:b,priority:Cs(b).break?b.z2+(y-m+1):b.z2,defaultAttr:{ignore:b.ignore}}});Ud(t,_,l,u)}function i_(e){return!!e.labelLayoutList}function Ud(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function ND(e,t,r,n){var i=t.get(["axisLabel","margin"]);V(r,function(a,o){var s=ti(a);if(s){var l=s.label,u=Cs(l);s.suggestIgnore=l.ignore,l.ignore=!1,Hl(wn,OD),wn.x=t.axis.dataToCoord(u.tickValue),wn.y=e.labelOffset+e.labelDirection*i,wn.rotation=u.layoutRotation,n.add(wn),wn.updateTransform(),n.remove(wn),wn.decomposeTransform(),Hl(l,wn),l.markRedraw(),_c(s,!0),ti(s)}})}var wn=new dt,OD=new dt;function Yd(e){return!!e}function ID(e,t,r,n){r.on("click",function(i){var a={type:SD,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function mI(e,t,r){}const a_=Ki;function o_(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,d=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var h=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}i.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?d[c[o]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),pa(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-v:v,i.z2=1,i}function BD(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function s_(e){var t={xAxisModel:null,yAxisModel:null};return V(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,pr).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+un(e.get(i+"Index"),e.get(i+"Id"),0)+'" not found');t[n]=a}),t}function $D(e,t,r,n,i,a){for(var o=o_(e,r),s=!1,l=!1,u=0;u<t.length;u++)yd(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new a_(r,n,o,i)}function RD(e,t,r){var n=o_(t,r);if(process.env.NODE_ENV!=="production"){var i=e.__getRawCfg();V(Ve(n),function(a){a!=="position"&&a!=="labelOffset"&&be(n[a]===i[a])})}e.updateCfg(n)}function l_(e,t,r){var n,i=Kn.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=O5(e,t),c=u.extent,f=u.fixMin,d=u.fixMax;e.type==="log"&&(c=Sd(e.base,c,!0)),e.setBreaksFromOption(R5(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:d});var h=i.getExtent.call(e);f&&(c[0]=h[0]),d&&(c[1]=h[1]);var p=i.getInterval.call(e),v=c[0],g=c[1];if(f&&d)p=(g-v)/s;else if(f)for(g=c[0]+p*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)p=_d(p),g=c[0]+p*s;else if(d)for(v=c[1]-p*s;v>c[0]&&isFinite(v)&&isFinite(c[0]);)p=_d(p),v=c[1]-p*s;else{var m=e.getTicks().length-1;m>s&&(p=_d(p));var y=p*s;g=Math.ceil(c[1]/p)*p,v=Lt(g-y),v<0&&c[0]>=0?(v=0,g=Lt(y)):g>0&&c[1]<=0&&(g=0,v=-Lt(y))}var _=(a[0].value-o[0].value)/l,b=(a[s].value-o[s].value)/l;if(i.setExtent.call(e,v+p*_,g+p*b),i.setInterval.call(e,p),(_||b)&&i.setNiceExtent.call(e,v+p,g-p),process.env.NODE_ENV!=="production"){var w=i.getTicks.call(e);w[1]&&(!fM(p)||mh(w[1].value)>mh(p))&&kt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+(" and alignTicks: true. ("+((n=t.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+t.componentIndex+")"),!0)}}var u_=[[3,1],[0,2]],VD=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Xd,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Ve(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],p=h.model,v=h.scale;yd(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(h):(I5(v,p),yd(v)&&(s=h))}c.length&&(s||(s=c.pop(),I5(s.scale,s.model)),V(c,function(g){l_(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};V(n.x,function(o){c_(n,"y",o,a)}),V(n.y,function(o){c_(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=Vu(t,r),a=this._rect=Wa(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(Zd(o,a),!n){var u=FD(a,s,o,l,r),c=void 0;if(l)d_?(d_(this._axesList,a),Zd(o,a)):(process.env.NODE_ENV!=="production"&&dg("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=p_(a.clone(),"axisLabel",null,a,o,u,i));else{var f=HD(t,a,i),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;d&&(c=p_(d,h,p,a,o,u,i))}v_(a,o,$r.determine,null,c,i)}V(this._coordsList,function(v){v.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}xe(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",pr).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",pr).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,Qe(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,V(s.x,function(c,f){V(s.y,function(d,h){var p="x"+f+"y"+h,v=new _D(p);v.master=i,v.model=t,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(d)})});function u(c){return function(f,d){if(qd(f,t)){var h=f.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=o.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=o.left?"right":"left"),o[h]=!0;var p=new bD(c,FM(f),[0,0],f.get("type"),h),v=p.type==="category";p.onBand=v&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.grid=a,p.index=d,a._axesList.push(p),s[c][d]=p,l[c]++}}}},e.prototype._updateScale=function(t,r){V(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(BD(i)){var a=s_(i),o=a.xAxisModel,s=a.yAxisModel;if(!qd(o,r)||!qd(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){V(GM(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return V(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);Qe(r,a)<0&&r.push(a),Qe(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){Kx({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=s_(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+un(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=Xd,e}();function qd(e,t){return e.getCoordSysModel()===t}function c_(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)f_(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&f_(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function f_(e){return e&&e.type!=="category"&&e.type!=="time"&&HM(e)}function zD(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function Zd(e,t){V(e.x,function(r){return h_(r,t.x,t.width)}),V(e.y,function(r){return h_(r,t.y,t.height)})}function h_(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),zD(e,t)}var d_;function p_(e,t,r,n,i,a,o){process.env.NODE_ENV!=="production"&&be(t==="all"||t==="axisLabel"),v_(n,i,$r.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Qv(s,function(d){return d>0})==null;return xu(n,s,!0,!0,r),Zd(i,n),l;function u(d){V(i[Wn[d]],function(h){if(Ls(h.model)){var p=a.ensureRecord(h.model),v=p.labelInfoList;if(v)for(var g=0;g<v.length;g++){var m=v[g],y=h.scale.normalize(Cs(m.label).tickValue);y=d===1?1-y:y,c(m.rect,d,y),c(m.rect,1-d,NaN)}var _=p.nameLayout;if(_){var y=no(p.nameLocation)?.5:NaN;c(_.rect,d,y),c(_.rect,1-d,NaN)}}})}function c(d,h,p){var v=e[Wn[h]]-d[Wn[h]],g=d[Va[h]]+d[Wn[h]]-(e[Va[h]]+e[Wn[h]]);v=f(v,1-p),g=f(g,p);var m=u_[h][0],y=u_[h][1];s[m]=rr(s[m],v),s[y]=rr(s[y],g)}function f(d,h){return d>0&&!da(h)&&h>1e-4&&(d/=h),d}}function FD(e,t,r,n,i){var a=new Q4(GD);return V(r,function(o){return V(o,function(s){if(Ls(s.model)){var l=!n;s.axisBuilder=$D(e,t,s.model,i,a,l)}})}),a}function v_(e,t,r,n,i,a){var o=r===$r.determine;V(t,function(u){return V(u,function(c){Ls(c.model)&&(RD(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Wn[1-u]]=e[Va[u]]<=a.refContainer[Va[u]]*.5?0:1-u===1?2:1}V(t,function(u,c){return V(u,function(f){Ls(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function HD(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():i==null||i==="auto"?n=Wa(e.get("outerBounds",!0)||G4,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&Ue("Invalid grid["+e.componentIndex+"].outerBoundsMode.");var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":Qe(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&Ue("Invalid grid["+e.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[gh(ye(e.get("outerBoundsClampWidth",!0),Tc[0]),t.width),gh(ye(e.get("outerBoundsClampHeight",!0),Tc[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var GD=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";K4(e,t,r,n,i,a),no(e.nameLocation)||V(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&e_(s.labelInfoList,s.dirVec,n,i)})};function WD(e){var t=g_(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=UD(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function g_(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[YD(e)]}function XD(e){var t=g_(e);return t&&t.axisPointerModel}function UD(e){return!!e.get(["handle","show"])}function YD(e){return e.type+"||"+e.id}var jd={},qD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&WD(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=XD(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&jd[r])throw new Error("axisPointer "+r+" exists");jd[r]=n},t.getAxisPointerClass=function(r){return r&&jd[r]},t.type="axis",t}(_n),Qd=ut();function ZD(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=Qd(e).splitAreaColors,d=Ne(),h=0;if(f)for(var p=0;p<u.length;p++){var v=f.get(u[p].tickValue);if(v!=null){h=(v+(c-1)*p)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=me(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,b=void 0,w=void 0,x=void 0;i.isHorizontal()?(_=g,b=l.y,w=y-_,x=l.height,g=_+w):(_=l.x,b=g,w=l.width,x=y-b,g=b+x);var T=u[p-1].tickValue;T!=null&&d.set(T,h),t.add(new dt({anid:T!=null?"area_"+T:null,shape:{x:_,y:b,width:w,height:x},style:Re({fill:s[h]},m),autoBatch:!0,silent:!0})),h=(h+1)%c}Qd(e).splitAreaColors=d}}}function jD(e){Qd(e).splitAreaColors=null}var QD=["splitArea","splitLine","minorSplitLine","breakArea"],m_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ht,this.group.add(this._axisGroup),!!Ls(r)){this._axisGroup.add(r.axis.axisBuilder.group),V(QD,function(l){r.get([l,"show"])&&KD[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Vm(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){jD(this)},t.type="cartesianAxis",t}(qD),KD={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=me(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=a.isHorizontal(),h=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=s.getLineStyle(),y=0;y<p.length;y++){var _=a.toGlobalCoord(p[y].coord);if(!(y===0&&!u||y===p.length-1&&!c)){var b=p[y].tickValue;d?(v[0]=_,v[1]=f.y,g[0]=_,g[1]=f.y+f.height):(v[0]=f.x,v[1]=_,g[0]=f.x+f.width,g[1]=_);var w=h++%l.length,x=new Gn({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},style:Re({stroke:l[w]},m),silent:!0});Ko(x.shape,m.lineWidth),t.add(x)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),p=0;p<c.length;p++)for(var v=0;v<c[p].length;v++){var g=a.toGlobalCoord(c[p][v].coord);u?(f[0]=g,f[1]=l.y,d[0]=g,d[1]=l.y+l.height):(f[0]=l.x,f[1]=g,d[0]=l.x+l.width,d[1]=g);var m=new Gn({anid:"minor_line_"+c[p][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});Ko(m.shape,h.lineWidth),t.add(m)}},splitArea:function(e,t,r,n,i){ZD(e,t,r,n)},breakArea:function(e,t,r,n,i){r.axis.scale}},y_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(m_),JD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=y_.type,r}return t.type="yAxis",t}(m_),eA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new dt({shape:r.coordinateSystem.getRect(),style:Re({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(_n),__={offset:0};function tA(e){e.registerComponentView(eA),e.registerComponentModel(hD),e.registerCoordinateSystem("cartesian2d",VD),Y4(e,"x",Gd,__),Y4(e,"y",Gd,__),e.registerComponentView(y_),e.registerComponentView(JD),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function rA(e){ji(tA),e.registerSeriesModel(sD),e.registerChartView(fD),e.registerLayout(Rd("scatter"))}function nA(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();V(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=b_(c)?c:S_(i)})}),r.each(function(o){var s=Qv(n[o],function(l){return b_(l)})||S_(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function b_(e){return!isNaN(e[0])&&!isNaN(e[1])}function S_(e){return[e.cx,e.cy]}function iA(e){var t=e.polar;if(t){me(t)||(t=[t]);var r=[];V(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],me(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}V(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var aA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(d,h){var p=d.getItemVisual(h,"symbol")||"circle";if(p!=="none"){var v=by(d.getItemVisual(h,"symbolSize")),g=qn(p,-1,-1,2,2),m=d.getItemVisual(h,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,h,p,v,g,m){p.removeAll();for(var y=0;y<h.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),vx[m?"initProps":"updateProps"](_,{x:h[y][0],y:h[y][1]},r,g)):_.setPosition(h[y]),p.add(_))}}function f(d){return ve(d,function(h){return[a.cx,a.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var p=new qo,v=new $i,g={shape:{points:h}};p.shape.points=f(h),v.shape.points=f(h),qt(p,g,r,d),qt(v,g,r,d);var m=new ht,y=new ht;m.add(v),m.add(p),m.add(y),c(v.shape.points,h,y,s,d,!0),s.setItemGraphicEl(d,m)}}).update(function(d,h){var p=l.getItemGraphicEl(h),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(d)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,d,!1),Qo(g),Qo(v),Nt(v,y,r),Nt(g,y,r),s.setItemGraphicEl(d,p))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var p=s.getItemModel(h),v=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=s.getItemVisual(h,"style"),_=y.fill;o.add(d),v.useStyle(Re(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ia(v,p,"lineStyle"),Ia(g,p,"areaStyle");var b=p.getModel("areaStyle"),w=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=w,V(["emphasis","select","blur"],function(T){var L=p.getModel([T,"areaStyle"]),M=L.isEmpty()&&L.parentModel.isEmpty();g.ensureState(T).ignore=M&&w;var C=p.getModel([T,"lineStyle"]).getLineStyle();v.ensureState(T).style=C;var E=L.getAreaStyle();g.ensureState(T).style=E;var P=p.getModel([T,"itemStyle"]).getItemStyle();m.eachChild(function(D){D.ensureState(T).style=Be(P)})}),g.useStyle(Re(p.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var x=p.getModel("emphasis");m.eachChild(function(T){if(T instanceof Pr){var L=T.style;T.useStyle(se({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},y))}else T.useStyle(y),T.setColor(_),T.style.strokeNoScale=!0;var M=s.getStore().get(s.getDimensionIndex(T.__dimIdx),h);(M==null||isNaN(M))&&(M=""),za(T,Fa(p),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:T.__dimIdx,defaultText:M,inheritColor:_,defaultOpacity:y.opacity})}),Oa(d,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(Zt),oA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new z4(ot(this.getData,this),ot(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return V4(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=ry(this,r);return ds("section",{header:u,sortBlocks:!0,blocks:ve(s,function(f){var d=a.get(a.mapDimension(f.dim),r);return ds("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(ve(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(or),ks=X4.value;function Ec(e,t){return Re({show:t},e)}var sA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),d=this.get("triggerEvent"),h=ve(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=Re({color:p.color},l));var g=je(Be(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:d},!1);if(we(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else Le(c)&&(g.name=c(g.name,g));var y=new mt(g,null,this.ecModel);return Cr(y,V5.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:"50%",startAngle:90,axisName:{show:!0,color:Ae.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:je({lineStyle:{color:Ae.color.neutral20}},ks.axisLine),axisLabel:Ec(ks.axisLabel,!1),axisTick:Ec(ks.axisTick,!1),splitLine:Ec(ks.splitLine,!0),splitArea:Ec(ks.splitArea,!0),indicator:[]},t}(Ye),lA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=ve(a,function(s){var l=s.model.get("showName")?s.name:"",u=new a_(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});V(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),d=l.get("color"),h=u.get("color"),p=me(d)?d:[d],v=me(h)?h:[h],g=[],m=[];function y(N,I,O){var z=O%I.length;return N[z]=N[z]||[],z}if(a==="circle")for(var _=i[0].getTicksCoords(),b=n.cx,w=n.cy,x=0;x<_.length;x++){if(c){var T=y(g,p,x);g[T].push(new Xo({shape:{cx:b,cy:w,r:_[x].coord}}))}if(f&&x<_.length-1){var T=y(m,v,x);m[T].push(new mu({shape:{cx:b,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var L,M=ve(i,function(N,I){var O=N.getTicksCoords();return L=L==null?O.length-1:Math.min(O.length-1,L),ve(O,function(z){return n.coordToPoint(z.coord,I)})}),C=[],x=0;x<=L;x++){for(var E=[],P=0;P<i.length;P++)E.push(M[P][x]);if(E[0]?E.push(E[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+x),c){var T=y(g,p,x);g[T].push(new $i({shape:{points:E}}))}if(f&&C){var T=y(m,v,x-1);m[T].push(new qo({shape:{points:E.concat(C)}}))}C=E.slice().reverse()}var D=l.getLineStyle(),k=u.getAreaStyle();V(m,function(N,I){this.group.add(s0(N,{style:Re({stroke:"none",fill:v[I%v.length]},k),silent:!0}))},this),V(g,function(N,I){this.group.add(s0(N,{style:Re({fill:"none",stroke:p[I%p.length]},D),silent:!0}))},this)},t.type="radar",t}(_n),uA=function(e){fe(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(Z5),cA=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=ve(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new uA(o,new Kn);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=Vu(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=tt(i[0],n.width)+n.x,this.cy=tt(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(we(o)||Ke(o))&&(o=[0,o]),this.r0=tt(o[0],a),this.r=tt(o[1],a),V(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;V(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();V(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Kn;o.setExtent(0,a),o.setInterval(1),V(n,function(s,l){l_(s.scale,s.model,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function fA(e){e.registerCoordinateSystem("radar",cA),e.registerComponentModel(sA),e.registerComponentView(lA),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function hA(e){ji(fA),e.registerChartView(aA),e.registerSeriesModel(oA),e.registerLayout(nA),e.registerProcessor(O4("radar")),e.registerPreprocessor(iA)}function dA(e,t){var r=d2(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new dt({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var pA=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Kd=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),me(n)&&V(n,function(a,o){we(a)&&(a={type:a}),n[o]=je(a,pA(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&bh(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ne(),s=ve(a,function(l){return(we(l)||Ke(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new mt(l,this,this.ecModel))},this);this._data=vt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;V(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;V(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;V(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Qe(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:Ae.size.m,align:"auto",backgroundColor:Ae.color.transparent,borderColor:Ae.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Ae.color.disabled,inactiveBorderColor:Ae.color.disabled,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:Ae.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Ae.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Ae.color.tertiary,borderWidth:1,borderColor:Ae.color.border},emphasis:{selectorLabel:{show:!0,color:Ae.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Ye),io=Jt,Jd=V,Mc=ht,w_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Mc),this.group.add(this._selectorGroup=new Mc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=Vu(r,i).refContainer,f=r.getBoxLayoutParams(),d=r.get("padding"),h=Wa(f,c,d),p=this.layoutInner(r,o,h,a,l,u),v=Wa(Re({width:p.width,height:p.height},f),c,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=dA(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ne(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&h.push(p.id)}),Jd(n.getData(),function(p,v){var g=this,m=p.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
37
|
+
`);dg(u)}return ve(l,function(c,f){var d="";xe(c)||(process.env.NODE_ENV!=="production"&&(d="A transform should not return some empty results."),nr(d)),c.data||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be not be null or undefined"),nr(d));var h=$2(c.data);H0(h)||(process.env.NODE_ENV!=="production"&&(d="Transform result data should be array rows or object rows."),nr(d));var p,v=t[0];if(v&&f===0&&!c.dimensions){var g=v.startIndex;g&&(c.data=v.data.slice(0,g).concat(c.data)),p={seriesLayoutBy:rn,sourceHeader:g,dimensions:v.metaRawOption.dimensions}}else p={seriesLayoutBy:rn,sourceHeader:0,dimensions:c.dimensions};return z0(c.data,p,null)})}function H0(e){return e===Ot||e===br}var Uu="undefined",nL=typeof Uint32Array===Uu?Array:Uint32Array,iL=typeof Uint16Array===Uu?Array:Uint16Array,Q2=typeof Int32Array===Uu?Array:Int32Array,K2=typeof Float64Array===Uu?Array:Float64Array,J2={float:K2,int:Q2,ordinal:Array,number:Array,time:K2},G0;function Ya(e){return e>65535?nL:iL}function qa(){return[1/0,-1/0]}function aL(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function ey(e,t,r,n,i){var a=J2[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(n)}var W0=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ne()}return e.prototype.initData=function(t,r,n){process.env.NODE_ENV!=="production"&&be(Le(t.getItem)&&Le(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=G0[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=z2(i);this._dimensions=ve(r,function(s){return process.env.NODE_ENV!=="production"&&o&&be(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(t,a),this._chunks[a]=new J2[r||"float"](this._rawCount),this._rawExtent[a]=qa(),a},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=qa());for(var l=a[t],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var r=this._dimensions[t],n=r.ordinalMeta;return n},e.prototype.getDimensionProperty=function(t){var r=this._dimensions[t];return r&&r.property},e.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&be(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(t);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,r||0),u=0;u<a;u++){var c=i[u];ey(n,u,c.type,l,!0)}for(var f=[],d=s;d<l;d++)for(var h=d-s,p=0;p<a;p++){var c=i[p],v=G0.arrayRows.call(this,t[h]||f,c.property,h,p);n[p][d]=v;var g=o[p];v<g[0]&&(g[0]=v),v>g[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=ve(o,function(y){return y.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=qa()),ey(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var d=[],h=t;h<r;h++){d=i.getItem(h,d);for(var p=0;p<s;p++){var v=a[p],g=this._dimValueGetter(d,u[p],h,p);v[h]=g;var m=l[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(r)]:NaN},e.prototype.getValues=function(t,r){var n=[],i=[];if(r==null){r=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},e.prototype.getByRawIndex=function(t,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[t];return n?n[r]:NaN},e.prototype.getSum=function(t){var r=this._chunks[t],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<t)i=o+1;else if(r[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=r[a]}else t=new n(r.buffer,0,i)}else{var n=Ya(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Ya(n._rawCount),o=new a(i),s=[],l=t.length,u=0,c=t[0],f=n._chunks,d=0;d<i;d++){var h=void 0,p=n.getRawIndex(d);if(l===0)h=r(d);else if(l===1){var v=f[c][p];h=r(v,d)}else{for(var g=0;g<l;g++)s[g]=f[t[g]][p];s[g]=d,h=r.apply(null,s)}h&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=Ve(t),a=i.length;if(!a)return this;var o=r.count(),s=Ya(r._rawCount),l=new s(o),u=0,c=i[0],f=t[c][0],d=t[c][1],h=r._chunks,p=!1;if(!r._indices){var v=0;if(a===1){for(var g=h[i[0]],m=0;m<n;m++){var y=g[m];(y>=f&&y<=d||isNaN(y))&&(l[u++]=v),v++}p=!0}else if(a===2){for(var g=h[i[0]],_=h[i[1]],b=t[i[1]][0],w=t[i[1]][1],m=0;m<n;m++){var y=g[m],x=_[m];(y>=f&&y<=d||isNaN(y))&&(x>=b&&x<=w||isNaN(x))&&(l[u++]=v),v++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var T=r.getRawIndex(m),y=h[i[0]][T];(y>=f&&y<=d||isNaN(y))&&(l[u++]=T)}else for(var m=0;m<o;m++){for(var L=!0,T=r.getRawIndex(m),M=0;M<a;M++){var C=i[M],y=h[C][T];(y<t[C][0]||y>t[C][1])&&(L=!1)}L&&(l[u++]=r.getRawIndex(m))}return u<o&&(r._indices=l),r._count=u,r._extent=[],r._updateGetRawIdx(),r},e.prototype.map=function(t,r){var n=this.clone(t);return this._updateDims(n,t,r),n},e.prototype.modify=function(t,r){this._updateDims(this,t,r)},e.prototype._updateDims=function(t,r,n){for(var i=t._chunks,a=[],o=r.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<r.length;c++)u[r[c]]=qa();for(var f=0;f<s;f++){for(var d=t.getRawIndex(f),h=0;h<o;h++)l[h]=i[r[h]][d];l[o]=f;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var v=r[c],g=p[c],m=u[v],y=i[v];y&&(y[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,d,h=new(Ya(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;p<o-1;p+=l){for(var v=Math.min(p+l,o-1),g=Math.min(p+l*2,o),m=(g+v)/2,y=0,_=v;_<g;_++){var b=this.getRawIndex(_),w=a[b];isNaN(w)||(y+=w)}y/=g-v;var x=p,T=Math.min(p+l,o),L=p-1,M=a[u];c=-1,d=x;for(var C=-1,E=0,_=x;_<T;_++){var b=this.getRawIndex(_),w=a[b];if(isNaN(w)){E++,C<0&&(C=b);continue}f=Math.abs((L-m)*(w-M)-(L-_)*(y-M)),f>c&&(c=f,d=b)}E>0&&E<T-x&&(h[s++]=Math.min(C,d),d=Math.max(C,d)),h[s++]=d,u=d}return h[s++]=this.getRawIndex(o-1),n._count=s,n._indices=h,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/r),o=i[t],s=this.count(),l=new(Ya(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,d=o[this.getRawIndex(f)],h=c,p=o[this.getRawIndex(h)],v=a;c+a>s&&(v=s-c);for(var g=0;g<v;g++){var m=this.getRawIndex(c+g),y=o[m];y<d&&(d=y,f=c+g),y>p&&(p=y,h=c+g)}var _=this.getRawIndex(f),b=this.getRawIndex(h);f<h?(l[u++]=_,l[u++]=b):(l[u++]=b,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[t],c=this.count(),f=a._rawExtent[t]=qa(),d=new(Ya(this._rawCount))(Math.ceil(c/l)),h=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var v=0;v<l;v++){var g=this.getRawIndex(p+v);s[v]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,c-1));u[y]=m,m<f[0]&&(f[0]=m),m>f[1]&&(f[1]=m),d[h++]=y}return a._count=h,a._indices=d,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[t[0]][s],a);break;case 2:r(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,r.apply(null,u)}}},e.prototype.getDataExtent=function(t){var r=this._chunks[t],n=qa();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},e.prototype.clone=function(t,r){var n=new e,i=this._chunks,a=t&&An(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?aL(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=Be(this._extent),t._rawExtent=Be(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,r=void 0;if(t===Array){var n=this._indices.length;r=new t(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new t(this._indices);return r}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(r,n,i,a){return Xu(r[a],this._dimensions[a])}G0={arrayRows:t,objectRows:function(r,n,i,a){return Xu(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Xu(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),oL=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,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 t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(hs(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Vt(s)?mn:ar,a=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=ye(f.seriesLayoutBy,d.seriesLayoutBy)||null,p=ye(f.sourceHeader,d.sourceHeader),v=ye(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||v;i=g?[z0(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:v},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[z0(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&be(i&&a),this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&be(i!=null||n!=null),i!=null){var a="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),ty(a))}var o,s=[],l=[];return V(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&(process.env.NODE_ENV!=="production"&&(f="Can not retrieve result by `fromTransformResult`: "+i),ty(f)),s.push(c),l.push(u._getVersionSign())}),n?o=tL(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[RT(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r<t.length;r++){var n=t[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var r=this._sourceList[t];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return r},e.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&be(hs(this._sourceHost),"Can only call getDataStore on series source manager.");var r=t.makeStoreSchema();return this._innerGetDataStore(r.dimensions,t.source,r.hash)},e.prototype._innerGetDataStore=function(t,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];hs(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new W0,s.initData(new G2(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(hs(t)){var r=N0(t);return r?[r.getSourceManager()]:[]}else return ve(fT(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(hs(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},e}();function hs(e){return e.mainType==="series"}function ty(e){throw new Error(e)}function ds(e,t){return t.type=e,t}function ry(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return E0(n)}function sL(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=me(s),u=ry(t,r),c,f,d,h;if(o>1||l&&!o){var p=lL(s,t,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,d=p.blocks,h=p.inlineValues[0]}else if(o){var v=i.getDimensionInfo(a[0]);h=c=Ua(i,r,a[0]),f=v.type}else h=c=l?s[0]:s;var g=bh(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return ds("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[ds("nameValue",{markerType:"item",markerColor:u,name:_,noName:!kn(_),value:c,valueType:f,dataIndex:r})].concat(d||[])})}function lL(e,t,r,n,i){var a=t.getData(),o=An(e,function(f,d,h){var p=a.getDimensionInfo(h);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?V(n,function(f){c(Ua(a,r,f),f)}):V(e,c);function c(f,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(ds("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Yn=ut();function Yu(e,t){return e.getName(t)||e.getId(t)}var uL="__universalTransitionEnabled",or=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=fs({count:fL,reset:hL}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Yn(this).sourceManager=new oL(this);a.prepareSource();var o=this.getInitialData(r,i);iy(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&be(o,"getInitialData returned invalid data."),Yn(this).dataBeforeProcessed=o,ny(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=as(this),a=i?os(r):{},o=this.subType;Ye.hasClass(o)&&(o+="Series"),je(r,n.getTheme().get(this.subType)),je(r,this.getDefaultOption()),_h(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Un(r,a,i)},t.prototype.mergeOption=function(r,n){r=je(this.option,r,!0),this.fillDataTextStyle(r.data);var i=as(this);i&&Un(this.option,r,i);var a=Yn(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);iy(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Yn(this).dataBeforeProcessed=o,ny(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Vt(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&_h(r[i],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=X0(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Yn(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=X0(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Yn(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ne(r)},t.prototype.getSourceManager=function(){return Yn(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Yn(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,d=-1,h=0;return o.each(n,function(p,v){var g=l.dataToCoord(p),m=u-g,y=Math.abs(m);y<=a&&((y<f||y===f&&m>=0&&d<0)&&(f=y,d=m,h=0),m===d&&(c[h++]=v))}),c.length=h,c},t.prototype.formatTooltip=function(r,n,i){return sL({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(We.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=O0.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Yu(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Ve(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Yu(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[uL])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){xe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],d=Yu(r,f);u[d]=!0,this._selectedDataIndicesMap[d]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var h=n[l-1],d=Yu(r,h);o.selectedMap=(i={},i[d]=!0,i),this._selectedDataIndicesMap=(a={},a[d]=r.getRawIndex(h),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Ye.registerClass(r)},t.protoInitialize=function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),t}(Ye);Cr(or,UT),Cr(or,O0),xg(or,Ye);function ny(e){var t=e.name;bh(e)||(e.name=cL(e)||t)}function cL(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return V(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function fL(e){return e.model.getRawData().count()}function hL(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),dL}function dL(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function iy(e,t){V(n9(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Jt(pL,t))})}function pL(e,t){var r=X0(e);return r&&r.setOutputEnd((t||this).count()),t}function X0(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var _n=function(){function e(){this.group=new ht,this.uid=Du("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();wh(_n),Ql(_n);function U0(){var e=ut();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var ay=ut(),vL=U0(),Zt=function(){function e(){this.group=new ht,this.uid=Du("viewChart"),this.renderTask=fs({plan:gL,reset:mL}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Ue("Unknown dataType "+i.dataType);return}sy(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Ue("Unknown dataType "+i.dataType);return}sy(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){Lu(this.group,t)},e.markUpdateMethod=function(t,r){ay(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function oy(e,t,r){e&&Ba(e)&&(t==="emphasis"?hu:du)(e,r)}function sy(e,t,r){var n=Aa(e,t),i=t&&t.highlightKey!=null?_w(t.highlightKey):null;n!=null?V(zt(n),function(a){oy(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){oy(a,r,i)})}wh(Zt,["dispose"]),Ql(Zt);function gL(e){return vL(e.model)}function mL(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&ay(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),yL[l]}var yL={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};function ly(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var d=function(){for(var h=[],p=0;p<arguments.length;p++)h[p]=arguments[p];n=new Date().getTime(),l=this,u=h;var v=c||t,g=c||r;c=null,s=n-(g?i:a)-v,clearTimeout(o),g?o=setTimeout(f,v):s>=0?f():o=setTimeout(f,-s),i=n};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}var uy=ut(),cy={itemStyle:Vo(Jm,!0),lineStyle:Vo(Km,!0)},_L={lineStyle:"stroke",itemStyle:"fill"};function fy(e,t){var r=e.visualStyleMapper||cy[t];return r||(console.warn("Unknown style type '"+t+"'."),cy.itemStyle)}function hy(e,t){var r=e.visualDrawType||_L[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var bL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=fy(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=hy(e,n),u=o[l],c=Le(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Le(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Le(o.stroke)?d:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var v=e.getDataParams(p),g=se({},o);g[l]=c(v),h.setItemVisual(p,"style",g)}}}},ps=new mt,SL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=fy(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ps.option=l[n];var u=i(ps),c=o.ensureUniqueItemVisual(s,"style");se(c,u),ps.option.decal&&(o.setItemVisual(s,"decal",ps.option.decal),ps.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},wL={performRawSeries:!0,overallReset:function(e){var t=Ne();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),uy(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=uy(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=hy(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var d=a.ensureUniqueItemVisual(c,"style"),h=n.getName(u)||u+"",p=n.count();d[l]=r.getColorFromPalette(h,o,p)}})}})}},qu=Math.PI;function xL(e,t){t=t||{},Re(t,{text:"loading",textColor:Ae.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Ae.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new ht,n=new dt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new ir({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 dt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new yu({shape:{startAngle:-qu/2,endAngle:-qu/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:qu*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:qu*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var dy=function(){function e(t,r,n,i){this._stageTaskMap=Ne(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=Ne();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;V(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),be(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,i){i=i||{};var a=!1,o=this;V(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,p=d.agentStubMap;p.each(function(g){s(i,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,n);var v=o.getPerformArgs(d,i.block);p.each(function(g){g.perform(v)}),d.perform(v)&&(a=!0)}else f&&f.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&r.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ne(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||fs({plan:CL,reset:DL,count:kL}));h.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,h)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||fs({reset:TL});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ne(),u=t.seriesType,c=t.getTargetSeries,f=!0,d=!1,h="";process.env.NODE_ENV!=="production"&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),be(!t.createOnAllSeries,h),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,V(n.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(d=!0,fs({reset:LL,onDirty:ML})));m.context={model:v,overallProgress:f},m.agent=o,m.__block=f,a._pipe(v,m)}d&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Le(t)&&(t={overallReset:t,seriesType:PL(t)}),t.uid=Du("stageHandler"),r&&(t.visualType=r),t},e}();function TL(e){e.overallReset(e.ecModel,e.api,e.payload)}function LL(e){return e.overallProgress&&EL}function EL(){this.agent.dirty(),this.getDownstream().dirty()}function ML(){this.agent&&this.agent.dirty()}function CL(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function DL(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=zt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?ve(t,function(r,n){return py(n)}):AL}var AL=py(0);function py(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function kL(e){return e.data.count()}function PL(e){Zu=null;try{e(vs,vy)}catch{}return Zu}var vs={},vy={},Zu;gy(vs,B0),gy(vy,C2),vs.eachSeriesByType=vs.eachRawSeriesByType=function(e){Zu=e},vs.eachComponent=function(e){e.mainType==="series"&&e.subType&&(Zu=e.subType)};function gy(e,t){for(var r in t.prototype)e[r]=er}var he=Ae.darkColor,NL=he.background,gs=function(){return{axisLine:{lineStyle:{color:he.axisLine}},splitLine:{lineStyle:{color:he.axisSplitLine}},splitArea:{areaStyle:{color:[he.backgroundTint,he.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:he.axisMinorSplitLine}},axisLabel:{color:he.axisLabel},axisName:{}}},my={label:{color:he.secondary},itemStyle:{borderColor:he.borderTint},dividerLineStyle:{color:he.border}},yy={darkMode:!0,color:he.theme,backgroundColor:NL,axisPointer:{lineStyle:{color:he.border},crossStyle:{color:he.borderShade},label:{color:he.tertiary}},legend:{textStyle:{color:he.secondary},pageTextStyle:{color:he.tertiary}},textStyle:{color:he.secondary},title:{textStyle:{color:he.primary},subtextStyle:{color:he.quaternary}},toolbox:{iconStyle:{borderColor:he.accent50}},tooltip:{backgroundColor:he.neutral20,defaultBorderColor:he.border,textStyle:{color:he.tertiary}},dataZoom:{borderColor:he.accent10,textStyle:{color:he.tertiary},brushStyle:{color:he.backgroundTint},handleStyle:{color:he.neutral00,borderColor:he.accent20},moveHandleStyle:{color:he.accent40},emphasis:{handleStyle:{borderColor:he.accent50}},dataBackground:{lineStyle:{color:he.accent30},areaStyle:{color:he.accent20}},selectedDataBackground:{lineStyle:{color:he.accent50},areaStyle:{color:he.accent30}}},visualMap:{textStyle:{color:he.secondary},handleStyle:{borderColor:he.neutral30}},timeline:{lineStyle:{color:he.accent10},label:{color:he.tertiary},controlStyle:{color:he.accent30,borderColor:he.accent30}},calendar:{itemStyle:{color:he.neutral00,borderColor:he.neutral20},dayLabel:{color:he.tertiary},monthLabel:{color:he.secondary},yearLabel:{color:he.secondary}},matrix:{x:my,y:my,backgroundColor:{borderColor:he.axisLine},body:{itemStyle:{borderColor:he.borderTint}}},timeAxis:gs(),logAxis:gs(),valueAxis:gs(),categoryAxis:gs(),line:{symbol:"circle"},graph:{color:he.theme},gauge:{title:{color:he.secondary},axisLine:{lineStyle:{color:[[1,he.neutral05]]}},axisLabel:{color:he.axisLabel},detail:{color:he.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:he.background}},radar:function(){var e=gs();return e.axisName={color:he.axisLabel},e.axisLine.lineStyle.color=he.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:he.neutral20,textStyle:{color:he.secondary}},emphasis:{itemStyle:{color:he.neutral30}}}},sunburst:{itemStyle:{borderColor:he.background}},map:{itemStyle:{borderColor:he.border,areaColor:he.neutral10},label:{color:he.tertiary},emphasis:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}},select:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}}},geo:{itemStyle:{borderColor:he.border,areaColor:he.neutral10},emphasis:{label:{color:he.primary},itemStyle:{areaColor:he.highlight}},select:{label:{color:he.primary},itemStyle:{color:he.highlight}}}};yy.categoryAxis.splitLine.show=!1;var OL=function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(we(t)){var a=jr(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};V(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var d=o[f],h=u.lastIndexOf(d);if(h>0&&h===u.length-d.length){var p=u.slice(0,h);p!=="data"&&(r.mainType=p,r[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,d,h,p){return f[h]==null||d[p||h]===f[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Y0=["symbol","symbolSize","symbolRotate","symbolOffset"],_y=Y0.concat(["symbolKeepAspect"]),IL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<Y0.length;o++){var s=Y0[o],l=e.get(s);Le(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(se({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=Ve(i);function c(f,d){for(var h=e.getRawValue(d),p=e.getDataParams(d),v=0;v<u.length;v++){var g=u[v];f.setItemVisual(d,g,i[g](h,p))}}return{dataEach:a?c:null}}},BL={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<_y.length;s++){var l=_y[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function $L(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function RL(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function VL(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}V([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=se({},i),process.env.NODE_ENV!=="production"&>(i.type,n[1]),o.dispatchAction(se(i,{type:n[1],seriesIndex:r(a,i)}))})})}function Za(e,t,r,n,i){var a=e+t;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&dn("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),d=Aa(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:me(d)?f.getName(d[0]):f.getName(d),selected:we(l)?l:se({},l)})}}))}function zL(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(Za("map","selectchanged",t,i,n),Za("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Za("map","selected",t,i,n),Za("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Za("map","unselected",t,i,n),Za("pie","unselected",t,i,n))})}function ju(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var FL=Math.round(Math.random()*9),HL=typeof Object.defineProperty=="function",GL=function(){function e(){this._id="__ec_inner_"+FL++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return HL?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e}(),WL=Fe.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),XL=Fe.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),UL=Fe.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),d=Math.cos(u),h=o*.6,p=o*.7;e.moveTo(r-c,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+c-f*h,l+s+d*h,r,n-p,r,n),e.bezierCurveTo(r,n-p,r-c+f*h,l+s+d*h,r-c,l+s),e.closePath()}}),YL=Fe.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),qL={line:Gn,rect:dt,roundRect:dt,square:dt,circle:Xo,diamond:XL,pin:UL,arrow:YL,triangle:WL},ZL={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},q0={};V(qL,function(e,t){q0[t]=new e});var jL=Fe.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=Wl(e,t,r),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var i=q0[n];i||(n="rect",i=q0[n]),ZL[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function QL(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||Ae.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function qn(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=Om(e.slice(8),new Oe(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=o0(e.slice(7),{},new Oe(t,r,n,i),o?"center":"cover"):l=new jL({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=QL,a&&l.setColor(a),l}function by(e){return me(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Sy(e,t){if(e!=null)return me(e)||(e=[e,e]),[tt(e[0],t[0])||0,tt(ye(e[1],e[0]),t[1])||0]}function Yi(e){return isFinite(e)}function KL(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Yi(n)?n:0,i=Yi(i)?i:1,a=Yi(a)?a:0,o=Yi(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function JL(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=Yi(o)?o:.5,s=Yi(s)?s:.5,l=l>=0&&Yi(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function wy(e,t,r){for(var n=t.type==="radial"?JL(e,t,r):KL(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function eE(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function Qu(e){return parseInt(e,10)}function xy(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Qu(s[n])||Qu(e.style[n]))-(Qu(s[a])||0)-(Qu(s[o])||0)|0}function tE(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Ke(e)?[e]:me(e)?e:null}function Z0(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&tE(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=ve(r,function(a){return a/i}),n/=i)}return[r,n]}var rE=new zn(!0);function Ku(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function Ty(e){return typeof e=="string"&&e!=="none"}function Ju(e){var t=e.fill;return t!=null&&t!=="none"}function Ly(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function Ey(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function My(e,t,r){var n=Th(t.image,t.__image,r);if(Kl(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Sl),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function nE(e,t,r,n){var i,a=Ku(r),o=Ju(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||rE,f=t.__dirty;if(!n){var d=r.fill,h=r.stroke,p=o&&!!d.colorStops,v=a&&!!h.colorStops,g=o&&!!d.image,m=a&&!!h.image,y=void 0,_=void 0,b=void 0,w=void 0,x=void 0;(p||v)&&(x=t.getBoundingRect()),p&&(y=f?wy(e,d,x):t.__canvasFillGradient,t.__canvasFillGradient=y),v&&(_=f?wy(e,h,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(b=f||!t.__canvasFillPattern?My(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=b),m&&(w=f||!t.__canvasStrokePattern?My(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),p?e.fillStyle=y:g&&(b?e.fillStyle=b:o=!1),v?e.strokeStyle=_:m&&(w?e.strokeStyle=w:a=!1)}var T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold);var L,M;e.setLineDash&&r.lineDash&&(i=Z0(t),L=i[0],M=i[1]);var C=!0;(u||f&Sa)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),C=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),C&&c.rebuildPath(e,l?s:1),L&&(e.setLineDash(L),e.lineDashOffset=M),n||(r.strokeFirst?(a&&Ey(e,r),o&&Ly(e,r)):(o&&Ly(e,r),a&&Ey(e,r))),L&&e.setLineDash([])}function iE(e,t,r){var n=t.__image=Th(r.image,t.__image,t,t.onload);if(!(!n||!Kl(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,d=s-c;e.drawImage(n,u,c,f,d,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function aE(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||ln,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=Z0(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(Ku(r)&&e.strokeText(i,r.x,r.y),Ju(r)&&e.fillText(i,r.x,r.y)):(Ju(r)&&e.fillText(i,r.x,r.y),Ku(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var Cy=["shadowBlur","shadowOffsetX","shadowOffsetY"],Dy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ay(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){jt(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ei.opacity:o}(n||t.blend!==r.blend)&&(a||(jt(e,i),a=!0),e.globalCompositeOperation=t.blend||Ei.blend);for(var s=0;s<Cy.length;s++){var l=Cy[s];(n||t[l]!==r[l])&&(a||(jt(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(jt(e,i),a=!0),e.shadowColor=t.shadowColor||Ei.shadowColor),a}function ky(e,t,r,n,i){var a=ms(t,i.inHover),o=n?null:r&&ms(r,i.inHover)||{};if(a===o)return!1;var s=Ay(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(jt(e,i),s=!0),Ty(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(jt(e,i),s=!0),Ty(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(jt(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(jt(e,i),s=!0),e.lineWidth=u)}for(var c=0;c<Dy.length;c++){var f=Dy[c],d=f[0];(n||a[d]!==o[d])&&(s||(jt(e,i),s=!0),e[d]=a[d]||f[1])}return s}function oE(e,t,r,n,i){return Ay(e,ms(t,i.inHover),r&&ms(r,i.inHover),n,i)}function Py(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function sE(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),Py(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function lE(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var Ny=1,Oy=2,Iy=3,By=4;function uE(e){var t=Ju(e),r=Ku(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function jt(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function ms(e,t){return t&&e.__hoverStyle||e.style}function cE(e,t){j0(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function j0(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Wr,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||eE(a,o))&&(o&&o.length&&(jt(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(jt(e,r),e.save(),sE(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=t instanceof Fe&&t.autoBatch&&uE(t.style);s||lE(i,u.transform)?(jt(e,r),Py(e,t)):c||jt(e,r);var f=ms(t,r.inHover);t instanceof Fe?(r.lastDrawType!==Ny&&(l=!0,r.lastDrawType=Ny),ky(e,t,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&e.beginPath(),nE(e,t,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):t instanceof Go?(r.lastDrawType!==Iy&&(l=!0,r.lastDrawType=Iy),ky(e,t,u,l,r),aE(e,t,f)):t instanceof Pr?(r.lastDrawType!==Oy&&(l=!0,r.lastDrawType=Oy),oE(e,t,u,l,r),iE(e,t,f)):t.getTemporalDisplayables&&(r.lastDrawType!==By&&(l=!0,r.lastDrawType=By),fE(e,t,r)),c&&n&&jt(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function fE(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),j0(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),j0(e,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var Q0=new GL,$y=new xa(100),Ry=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function K0(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&Q0.delete(e);var a=Q0.get(e);if(a)return a;var o=Re(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,Q0.set(e,s),e.dirty=!1,s;function l(u){for(var c=[r],f=!0,d=0;d<Ry.length;++d){var h=o[Ry[d]];if(h!=null&&!me(h)&&!we(h)&&!Ke(h)&&typeof h!="boolean"){f=!1;break}c.push(h)}var p;if(f){p=c.join(",")+(i?"-svg":"");var v=$y.get(p);v&&(i?u.svgElement=v:u.image=v)}var g=zy(o.dashArrayX),m=hE(o.dashArrayY),y=Vy(o.symbol),_=dE(g),b=Fy(m),w=!i&&Dn.createCanvas(),x=i&&{tag:"g",attrs:{},key:"dcl",children:[]},T=M(),L;w&&(w.width=T.width*r,w.height=T.height*r,L=w.getContext("2d")),C(),f&&$y.put(p,w||x),u.image=w,u.svgElement=x,u.svgWidth=T.width,u.svgHeight=T.height;function M(){for(var E=1,P=0,D=_.length;P<D;++P)E=fg(E,_[P]);for(var k=1,P=0,D=y.length;P<D;++P)k=fg(k,y[P].length);E*=k;var N=b*_.length*y.length;if(process.env.NODE_ENV!=="production"){var I=function(O){console.warn("Calculated decal size is greater than "+O+" due to decal option settings so "+O+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+O+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&I("maxTileWidth"),N>o.maxTileHeight&&I("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(N,o.maxTileHeight))}}function C(){L&&(L.clearRect(0,0,w.width,w.height),o.backgroundColor&&(L.fillStyle=o.backgroundColor,L.fillRect(0,0,w.width,w.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var D=-b,k=0,N=0,I=0;D<T.height;){if(k%2===0){for(var O=N/2%y.length,z=0,$=0,R=0;z<T.width*2;){for(var B=0,P=0;P<g[I].length;++P)B+=g[I][P];if(B<=0)break;if($%2===0){var H=(1-o.symbolSize)*.5,F=z+g[I][$]*H,A=D+m[k]*H,G=g[I][$]*o.symbolSize,Z=m[k]*o.symbolSize,Q=R/2%y[O].length;q(F,A,G,Z,y[O][Q])}z+=g[I][$],++R,++$,$===g[I].length&&($=0)}++I,I===g.length&&(I=0)}D+=m[k],++N,++k,k===m.length&&(k=0)}function q(W,j,Y,re,te){var ne=i?1:r,ge=qn(te,W*ne,j*ne,Y*ne,re*ne,o.color,o.symbolKeepAspect);if(i){var Se=n.painter.renderOneToVNode(ge);Se&&x.children.push(Se)}else cE(L,ge)}}}}function Vy(e){if(!e||e.length===0)return[["rect"]];if(we(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!we(e[r])){t=!1;break}if(t)return Vy([e]);for(var n=[],r=0;r<e.length;++r)we(e[r])?n.push([e[r]]):n.push(e[r]);return n}function zy(e){if(!e||e.length===0)return[[0,0]];if(Ke(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!Ke(e[n])){r=!1;break}if(r)return zy([e]);for(var i=[],n=0;n<e.length;++n)if(Ke(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=ve(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function hE(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(Ke(e)){var t=Math.ceil(e);return[t,t]}var r=ve(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function dE(e){return ve(e,function(t){return Fy(t)})}function Fy(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function pE(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=K0(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=K0(i,t)}}})}var Br=new cn,ec={};function vE(e,t){process.env.NODE_ENV!=="production"&&ec[e]&&Ue("Already has an implementation of "+e+"."),ec[e]=t}function gE(e){return process.env.NODE_ENV!=="production"&&(ec[e]||Ue("Implementation of "+e+" doesn't exists.")),ec[e]}var mE=1,yE=800,_E=900,bE=1e3,SE=2e3,wE=5e3,Hy=1e3,xE=1100,J0=2e3,Gy=3e3,TE=4e3,tc=4500,LE=4600,EE=5e3,ME=6e3,Wy=7e3,CE={PROCESSOR:{FILTER:bE,SERIES_FILTER:yE,STATISTIC:wE},VISUAL:{LAYOUT:Hy,PROGRESSIVE_LAYOUT:xE,GLOBAL:J0,CHART:Gy,POST_CHART_LAYOUT:LE,COMPONENT:TE,BRUSH:EE,CHART_ITEM:tc,ARIA:ME,DECAL:Wy}},pt="__flagInMainProcess",rc="__mainProcessVersion",St="__pendingUpdate",ed="__needsUpdateStatus",Xy=/^[a-zA-Z0-9_]+$/,td="__connectUpdateStatus",Uy=0,DE=1,AE=2;function Yy(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){Qt(this.id);return}return Zy(this,e,t)}}function qy(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Zy(this,e,t)}}function Zy(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),cn.prototype[t].apply(e,r)}var jy=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(cn),Qy=jy.prototype;Qy.on=qy("on"),Qy.off=qy("off");var qi,rd,nc,bn,ic,nd,id,ja,Qa,Ky,Jy,ad,e5,ac,t5,r5,xr,n5,Ka,i5=function(e){fe(t,e);function t(r,n,i){var a=e.call(this,new OL)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;if(a[rc]=1,process.env.NODE_ENV!=="production"){var u=We.hasGlobalWindow?window:global;u&&(o=ye(u.__ECHARTS__DEFAULT__RENDERER__,o),s=ye(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=ye(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr&&kb(function(h){var p=rt(h),v=p.dataIndex;if(v!=null){var g=Ne();return g.set("series_index",p.seriesIndex),g.set("data_index",v),p.ssrType&&g.set("ssr_type",p.ssrType),g}});var c=a._zr=ig(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:ye(i.useDirtyRect,l),useCoarsePointer:ye(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=ly(ot(c.flush,c),17),a._updateTheme(n),a._locale=Nx(i.locale||t2),a._coordSysMgr=new C0;var f=a._api=t5(a);function d(h,p){return h.__prio-p.__prio}return wl(lc,d),wl(ld,d),a._scheduler=new dy(a,f,ld,lc),a._messageCenter=new jy,a._initEvents(),a.resize=ot(a.resize,a),c.animation.on("frame",a._onframe,a),Ky(c,a),Jy(c,a),yf(a),a}return t.prototype._onframe=function(){if(!this._disposed){n5(this);var r=this._scheduler;if(this[St]){var n=this[St].silent;this[pt]=!0,Ka(this);try{qi(this),bn.update.call(this,null,this[St].updateParams)}catch(l){throw this[pt]=!1,this[St]=null,l}this._zr.flush(),this[pt]=!1,this[St]=null,ja.call(this,n),Qa.call(this,n)}else if(r.unfinished){var i=mE,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),nd(this,a),r.performVisualTasks(a),ac(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.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(r,n,i){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`setOption` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}var a,o,s;if(xe(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[pt]=!0,Ka(this),!this._model||n){var l=new TT(this._api),u=this._theme,c=this._model=new B0;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},ud);var f={seriesTransition:s,optionChanged:!0};if(i)this[St]={silent:a,updateParams:f},this[pt]=!1,this.getZr().wakeUp();else{try{qi(this),bn.update.call(this,null,f)}catch(d){throw this[St]=null,this[pt]=!1,d}this._ssr||this._zr.flush(),this[St]=null,this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype.setTheme=function(r,n){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`setTheme` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[St]&&(a==null&&(a=this[St].silent),o=this[St].updateParams,this[St]=null),this[pt]=!0,Ka(this);try{this._updateTheme(r),i.setTheme(this._theme),qi(this),bn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[pt]=!1,s}this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype._updateTheme=function(r){we(r)&&(r=a5[r]),r&&(r=Be(r),r&&I2(r,!0),this._theme=r)},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||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&>("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return V(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){Qt(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;V(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return V(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){Qt(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(o5[i]){var l=s,u=s,c=-s,f=-s,d=[],h=r&&r.pixelRatio||this.getDevicePixelRatio();V(ys,function(_,b){if(_.group===i){var w=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Be(r)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),c=o(x.right,c),f=o(x.bottom,f),d.push({dom:w,left:x.left,top:x.top})}}),l*=h,u*=h,c*=h,f*=h;var p=c-l,v=f-u,g=Dn.createCanvas(),m=ig(g,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:v}),n){var y="";return V(d,function(_){var b=_.left-l,w=_.top-u;y+='<g transform="translate('+b+","+w+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new dt({shape:{x:0,y:0,width:p,height:v},style:{fill:r.connectedBackgroundColor}})),V(d,function(_){var b=new Pr({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});m.add(b)}),m.refreshImmediately(),g.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return ic(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return ic(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return ic(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){Qt(this.id);return}var i=this._model,a,o=Sh(i,r);return V(o,function(s,l){l.indexOf("Models")>=0&&V(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint?a=a||f.containPoint(n,u):process.env.NODE_ENV!=="production"&&kt(l+": "+(f?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&kt(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=Sh(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||kt("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?$L(s,l,n):RL(s,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;V(kE,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&ju(l,function(v){var g=rt(v);if(g&&g.dataIndex!=null){var m=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=m&&m.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=se({},g.eventData),!0},!0),u){var f=u.componentType,d=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",d=u.seriesIndex);var h=f&&d!=null&&s.getComponent(f,d),p=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!c&&!(h&&p)&&kt("model or view can not be found by params"),u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;V(sd,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),zL(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){Qt(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){Qt(this.id);return}this._disposed=!0;var r=this.getDom();r&&Sg(this.getDom(),fd,"");var n=this,i=n._api,a=n._model;V(n._componentsViews,function(o){o.dispose(a,i)}),V(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete ys[n.id]},t.prototype.resize=function(r){if(this[pt]){process.env.NODE_ENV!=="production"&&Ue("`resize` should not be called during main process.");return}if(this._disposed){Qt(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[St]&&(a==null&&(a=this[St].silent),i=!0,this[St]=null),this[pt]=!0,Ka(this);try{i&&qi(this),bn.update.call(this,{type:"resize",animation:se({duration:0},r&&r.animation)})}catch(o){throw this[pt]=!1,o}this[pt]=!1,ja.call(this,a),Qa.call(this,a)}},t.prototype.showLoading=function(r,n){if(this._disposed){Qt(this.id);return}if(xe(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!cd[r]){process.env.NODE_ENV!=="production"&&kt("Loading effects "+r+" not exists.");return}var i=cd[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){Qt(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=se({},r);return n.type=sc[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){Qt(this.id);return}if(xe(n)||(n={silent:!!n}),!!oc[r.type]&&this._model){if(this[pt]){this._pendingActions.push(r);return}var i=n.silent;id.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&We.browser.weChat&&this._throttledZrFlush(),ja.call(this,i),Qa.call(this,i)}},t.prototype.updateLabelLayout=function(){Br.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){Qt(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&be(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){qi=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),rd(f,!0),rd(f,!1),d.plan()},rd=function(f,d){for(var h=f._model,p=f._scheduler,v=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,_=0;_<v.length;_++)v[_].__alive=!1;d?h.eachComponent(function(x,T){x!=="series"&&b(T)}):h.eachSeries(b);function b(x){var T=x.__requireNewView;x.__requireNewView=!1;var L="_ec_"+x.id+"_"+x.type,M=!T&&g[L];if(!M){var C=jr(x.type),E=d?_n.getClass(C.main,C.sub):Zt.getClass(C.sub);process.env.NODE_ENV!=="production"&&be(E,C.sub+" does not exist."),M=new E,M.init(h,y),g[L]=M,v.push(M),m.add(M.group)}x.__viewId=M.__id=L,M.__alive=!0,M.__model=x,M.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!d&&p.prepareView(M,x,h,y)}for(var _=0;_<v.length;){var w=v[_];w.__alive?_++:(!d&&w.renderTask.dispose(),m.remove(w.group),w.dispose(h,y),v.splice(_,1),g[w.__id]===w&&delete g[w.__id],w.__id=w.group.__ecComponentInfo=null)}},nc=function(f,d,h,p,v){var g=f._model;if(g.setUpdatePayload(h),!p){V([].concat(f._componentsViews).concat(f._chartsViews),w);return}var m={};m[p+"Id"]=h[p+"Id"],m[p+"Index"]=h[p+"Index"],m[p+"Name"]=h[p+"Name"];var y={mainType:p,query:m};v&&(y.subType=v);var _=h.excludeSeriesId,b;_!=null&&(b=Ne(),V(zt(_),function(x){var T=Zr(x,null);T!=null&&b.set(T,!0)})),g&&g.eachComponent(y,function(x){var T=b&&b.get(x.id)!=null;if(!T)if(mm(h))if(x instanceof or)h.type===Ii&&!h.notBlur&&!x.get(["emphasis","disabled"])&&fw(x,h,f._api);else{var L=Zh(x.mainType,x.componentIndex,h.name,f._api),M=L.focusSelf,C=L.dispatchers;h.type===Ii&&M&&!h.notBlur&&qh(x.mainType,x.componentIndex,f._api),C&&V(C,function(E){h.type===Ii?hu(E):du(E)})}else Qh(h)&&x instanceof or&&(pw(x,h,f._api),pm(x),xr(f))},f),g&&g.eachComponent(y,function(x){var T=b&&b.get(x.id)!=null;T||w(f[p==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},f);function w(x){x&&x.__alive&&x[d]&&x[d](x.__model,g,f._api,h)}},bn={prepareAndUpdate:function(f){qi(this),bn.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,d){var h=this._model,p=this._api,v=this._zr,g=this._coordSysMgr,m=this._scheduler;if(h){h.setUpdatePayload(f),m.restoreData(h,f),m.performSeriesTasks(h),g.create(h,p),m.performDataProcessorTasks(h,f),nd(this,h),g.update(h,p),n(h),m.performVisualTasks(h,f);var y=h.get("backgroundColor")||"transparent";v.setBackgroundColor(y);var _=h.get("darkMode");_!=null&&_!=="auto"&&v.setDarkMode(_),ad(this,h,p,f,d),Br.trigger("afterupdate",h,p)}},updateTransform:function(f){var d=this,h=this._model,p=this._api;if(h){h.setUpdatePayload(f);var v=[];h.eachComponent(function(m,y){if(m!=="series"){var _=d.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var b=_.updateTransform(y,h,p,f);b&&b.update&&v.push(_)}else v.push(_)}});var g=Ne();h.eachSeries(function(m){var y=d._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,h,p,f);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0,dirtyMap:g}),ac(this,h,p,f,{},g),Br.trigger("afterupdate",h,p)}},updateView:function(f){var d=this._model;d&&(d.setUpdatePayload(f),Zt.markUpdateMethod(f,"updateView"),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0}),ad(this,d,this._api,f,{}),Br.trigger("afterupdate",d,this._api))},updateVisual:function(f){var d=this,h=this._model;h&&(h.setUpdatePayload(f),h.eachSeries(function(p){p.getData().clearAllVisual()}),Zt.markUpdateMethod(f,"updateVisual"),n(h),this._scheduler.performVisualTasks(h,f,{visualType:"visual",setDirty:!0}),h.eachComponent(function(p,v){if(p!=="series"){var g=d.getViewOfComponentModel(v);g&&g.__alive&&g.updateVisual(v,h,d._api,f)}}),h.eachSeries(function(p){var v=d._chartsMap[p.__viewId];v.updateVisual(p,h,d._api,f)}),Br.trigger("afterupdate",h,this._api))},updateLayout:function(f){bn.update.call(this,f)}};function r(f,d,h,p,v){if(f._disposed){Qt(f.id);return}for(var g=f._model,m=f._coordSysMgr.getCoordinateSystems(),y,_=Sh(g,h),b=0;b<m.length;b++){var w=m[b];if(w[d]&&(y=w[d](g,_,p,v))!=null)return y}process.env.NODE_ENV!=="production"&&kt("No coordinate system that supports "+d+" found by the given finder.")}ic=r,nd=function(f,d){var h=f._chartsMap,p=f._scheduler;d.eachSeries(function(v){p.updateStreamModes(v,h[v.__viewId])})},id=function(f,d){var h=this,p=this.getModel(),v=f.type,g=f.escapeConnect,m=oc[v],y=(m.update||"update").split(":"),_=y.pop(),b=y[0]!=null&&jr(y[0]);this[pt]=!0,Ka(this);var w=[f],x=!1;f.batch&&(x=!0,w=ve(f.batch,function(I){return I=Re(se({},I),f),I.batch=null,I}));var T=[],L,M=[],C=m.nonRefinedEventType,E=Qh(f),P=mm(f);if(P&&dm(this._api),V(w,function(I){var O=m.action(I,p,h._api);if(m.refineEvent?M.push(O):L=O,L=L||se({},I),L.type=C,T.push(L),P){var z=bg(f),$=z.queryOptionMap,R=z.mainTypeSpecified,B=R?$.keys()[0]:"series";nc(h,_,I,B),xr(h)}else E?(nc(h,_,I,"series"),xr(h)):b&&nc(h,_,I,b.main,b.sub)}),_!=="none"&&!P&&!E&&!b)try{this[St]?(qi(this),bn.update.call(this,f),this[St]=null):bn[_].call(this,f)}catch(I){throw this[pt]=!1,I}if(x?L={type:C,escapeConnect:g,batch:T}:L=T[0],this[pt]=!1,!d){var D=void 0;if(m.refineEvent){var k=m.refineEvent(M,f,p,this._api).eventContent;be(xe(k)),D=Re({type:m.refinedEventType},k),D.fromAction=f.type,D.fromActionPayload=f,D.escapeConnect=!0}var N=this._messageCenter;N.trigger(L.type,L),D&&N.trigger(D.type,D)}},ja=function(f){for(var d=this._pendingActions;d.length;){var h=d.shift();id.call(this,h,f)}},Qa=function(f){!f&&this.trigger("updated")},Ky=function(f,d){f.on("rendered",function(h){d.trigger("rendered",h),f.animation.isFinished()&&!d[St]&&!d._scheduler.unfinished&&!d._pendingActions.length&&d.trigger("finished")})},Jy=function(f,d){f.on("mouseover",function(h){var p=h.target,v=ju(p,Ba);v&&(hw(v,h,d._api),xr(d))}).on("mouseout",function(h){var p=h.target,v=ju(p,Ba);v&&(dw(v,h,d._api),xr(d))}).on("click",function(h){var p=h.target,v=ju(p,function(y){return rt(y).dataIndex!=null},!0);if(v){var g=v.selected?"unselect":"select",m=rt(v);d._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(d){d.clearColorPalette()})}function i(f){var d=[],h=[],p=!1;if(f.eachComponent(function(y,_){var b=_.get("zlevel")||0,w=_.get("z")||0,x=_.getZLevelKey();p=p||!!x,(y==="series"?h:d).push({zlevel:b,z:w,idx:_.componentIndex,type:y,key:x})}),p){var v=d.concat(h),g,m;wl(v,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),V(v,function(y){var _=f.getComponent(y.type,y.idx),b=y.zlevel,w=y.key;g!=null&&(b=Math.max(g,b)),w?(b===g&&w!==m&&b++,m=w):m&&(b===g&&b++,m=""),g=b,_.setZLevel(b)})}}ad=function(f,d,h,p,v){i(d),e5(f,d,h,p,v),V(f._chartsViews,function(g){g.__alive=!1}),ac(f,d,h,p,v),V(f._chartsViews,function(g){g.__alive||g.remove(d,h)})},e5=function(f,d,h,p,v,g){V(g||f._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,d,h,p),l(y,m),c(y,m)})},ac=function(f,d,h,p,v,g){var m=f._scheduler;v=se(v||{},{updatedSeries:d.getSeries()}),Br.trigger("series:beforeupdate",d,h,v);var y=!1;d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];b.__alive=!0;var w=b.renderTask;m.updatePayload(w,p),u(_,b),g&&g.get(_.uid)&&w.dirty(),w.perform(m.getPerformArgs(w))&&(y=!0),b.group.silent=!!_.get("silent"),s(_,b),pm(_)}),m.unfinished=y||m.unfinished,Br.trigger("series:layoutlabels",d,h,v),Br.trigger("series:transition",d,h,v),d.eachSeries(function(_){var b=f._chartsMap[_.__viewId];l(_,b),c(_,b)}),o(f,d),Br.trigger("series:afterupdate",d,h,v)},xr=function(f){f[ed]=!0,f.getZr().wakeUp()},Ka=function(f){f[rc]=(f[rc]+1)%1e3},n5=function(f){f[ed]&&(f.getZr().storage.traverse(function(d){Zo(d)||a(d)}),f[ed]=!1)};function a(f){for(var d=[],h=f.currentStates,p=0;p<h.length;p++){var v=h[p];v==="emphasis"||v==="blur"||v==="select"||d.push(v)}f.selected&&f.states.select&&d.push("select"),f.hoverState===ou&&f.states.emphasis?d.push("emphasis"):f.hoverState===au&&f.states.blur&&d.push("blur"),f.useStates(d)}function o(f,d){var h=f._zr,p=h.storage,v=0;p.traverse(function(g){g.isGroup||v++}),v>d.get("hoverLayerThreshold")&&!We.node&&!We.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function s(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function l(f,d){if(!f.preventAutoZ){var h=Gm(f);d.eachRendered(function(p){return Wm(p,h.z,h.zlevel),!0})}}function u(f,d){d.eachRendered(function(h){if(!Zo(h)){var p=h.getTextContent(),v=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,d){var h=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),v=h.get("duration"),g=v>0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Zo(m))return;if(m instanceof Fe&&bw(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=g;var _=m.getTextContent(),b=m.getTextGuideLine();_&&(_.stateTransition=g),b&&(b.stateTransition=g)}m.__dirty&&a(m)}})}t5=function(f){return new(function(d){fe(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);p=p.parent}},h.prototype.enterEmphasis=function(p,v){hu(p,v),xr(f)},h.prototype.leaveEmphasis=function(p,v){du(p,v),xr(f)},h.prototype.enterBlur=function(p){cw(p),xr(f)},h.prototype.leaveBlur=function(p){um(p),xr(f)},h.prototype.enterSelect=function(p){cm(p),xr(f)},h.prototype.leaveSelect=function(p){fm(p),xr(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},h.prototype.getMainProcessVersion=function(){return f[rc]},h}(C2))(f)},r5=function(f){function d(h,p){for(var v=0;v<h.length;v++){var g=h[v];g[td]=p}}V(sc,function(h,p){f._messageCenter.on(p,function(v){if(o5[f.group]&&f[td]!==Uy){if(v&&v.escapeConnect)return;var g=f.makeActionFromEvent(v),m=[];V(ys,function(y){y!==f&&y.group===f.group&&m.push(y)}),d(m,Uy),V(m,function(y){y[td]!==DE&&y.dispatchAction(g)}),d(m,AE)}})})}}(),t}(cn),od=i5.prototype;od.on=Yy("on"),od.off=Yy("off"),od.one=function(e,t,r){var n=this;dn("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var kE=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Qt(e){process.env.NODE_ENV!=="production"&&kt("Instance "+e+" has been disposed")}var oc={},sc={},sd={},ld=[],ud=[],lc=[],a5={},cd={},ys={},o5={},PE=+new Date-0,fd="_echarts_instance_";function NE(e,t,r){var n=!(r&&r.ssr);if(n){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Initialize failed: invalid dom.");var i=OE(e);if(i)return process.env.NODE_ENV!=="production"&&kt("There is a chart instance already initialized on the dom."),i;process.env.NODE_ENV!=="production"&&_l(e)&&e.nodeName.toUpperCase()!=="CANVAS"&&(!e.clientWidth&&(!r||r.width==null)||!e.clientHeight&&(!r||r.height==null))&&kt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var a=new i5(e,t,r);return a.id="ec_"+PE++,ys[a.id]=a,n&&Sg(e,fd,a.id),r5(a),Br.trigger("afterinit",a),a}function OE(e){return ys[tS(e,fd)]}function s5(e,t){a5[e]=t}function l5(e){Qe(ud,e)<0&&ud.push(e)}function u5(e,t){dd(ld,e,t,SE)}function IE(e){hd("afterinit",e)}function BE(e){hd("afterupdate",e)}function hd(e,t){Br.on(e,t)}function Ja(e,t,r){var n,i,a,o,s;Le(t)&&(r=t,t=""),xe(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;oc[n]||(be(Xy.test(n)&&Xy.test(i)),a&&be(i!==n),oc[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},sd[i]=1,a&&s&&(sd[u]=1),process.env.NODE_ENV!=="production"&&sc[u]&&Ue(u+' must not be shared; use "refineEvent" if you intend to share an event name.'),sc[u]=n)}function $E(e,t){C0.register(e,t)}function RE(e,t){dd(lc,e,t,Hy,"layout")}function Zi(e,t){dd(lc,e,t,Gy,"visual")}var c5=[];function dd(e,t,r,n,i){if((Le(t)||xe(t))&&(r=t,t=n),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");V(e,function(o){be(o.__raw!==r)})}if(!(Qe(c5,r)>=0)){c5.push(r);var a=dy.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function f5(e,t){cd[e]=t}function VE(e,t,r){var n=gE("registerMap");n&&n(e,t,r)}var zE=eL;Zi(J0,bL),Zi(tc,SL),Zi(tc,wL),Zi(J0,IL),Zi(tc,BL),Zi(Wy,pE),l5(I2),u5(_E,BT),f5("default",xL),Ja({type:Ii,event:Ii,update:Ii},er),Ja({type:lu,event:lu,update:lu},er),Ja({type:uu,event:Wh,update:uu,action:er,refineEvent:pd,publishNonRefinedEvent:!0}),Ja({type:Gh,event:Wh,update:Gh,action:er,refineEvent:pd,publishNonRefinedEvent:!0}),Ja({type:cu,event:Wh,update:cu,action:er,refineEvent:pd,publishNonRefinedEvent:!0});function pd(e,t,r,n){return{eventContent:{selected:vw(r),isFromClick:t.isFromClick||!1}}}s5("default",{}),s5("dark",yy);function _s(e){return e==null?0:e.length||1}function h5(e){return e}var FE=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||h5,this._newKeyGetter=i||h5,this.context=a,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=_s(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=_s(u),d=_s(c);if(f>1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var h=0;h<f;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=_s(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=_s(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e}(),HE=function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function GE(e,t){var r={},n=r.encode={},i=Ne(),a=[],o=[],s={};V(e.dimensions,function(d){var h=e.getDimensionInfo(d),p=h.coordDim;if(p){process.env.NODE_ENV!=="production"&&be(P0.get(p)==null);var v=h.coordDimIndex;vd(n,p)[v]=d,h.isExtraCoord||(i.set(p,1),XE(h.type)&&(a[0]=d),vd(s,p)[v]=e.getDimensionIndex(h.name)),h.defaultTooltip&&o.push(d)}P0.each(function(g,m){var y=vd(n,m),_=h.otherDims[m];_!=null&&_!==!1&&(y[_]=h.name)})});var l=[],u={};i.each(function(d,h){var p=n[h];u[h]=p[0],l=l.concat(p)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=ve(l,function(d){return e.getDimensionInfo(d).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new HE(s,t),r}function vd(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function WE(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function XE(e){return!(e==="ordinal"||e==="time")}var uc=function(){function e(t){this.otherDims={},t!=null&&se(this,t)}return e}(),UE=ut(),YE={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},d5=function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=g5(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return ye(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=z2(this.source),n=!m5(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var d=this.getSourceDimension(o);d&&(l=r?d.name:null,u=d.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=YE[u]||"f",c&&(i+=c.uid),i+="$"}var h=this.source,p=[h.seriesLayoutBy,h.startIndex,i].join("$$");return{dimensions:a,hash:p}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function p5(e){return e instanceof d5}function v5(e){for(var t=Ne(),r=0;r<(e||[]).length;r++){var n=e[r],i=xe(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function g5(e){var t=UE(e);return t.dimNameMap||(t.dimNameMap=v5(e.dimensionsDefine))}function m5(e){return e>30}var bs=xe,Zn=ve,qE=typeof Int32Array>"u"?Array:Int32Array,ZE="e\0\0",y5=-1,jE=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],QE=["_approximateExtent"],_5,cc,Ss,eo,gd,ws,md,b5=function(){function e(t,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;p5(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],d=we(f)?new uc({name:f}):f instanceof uc?f:new uc(f),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),a[h]=d,u[h]!=null&&(l=!0),d.createInvertedIndices&&(s[h]=[]);var v=c;Ke(d.storeDimIndex)&&(v=d.storeDimIndex),p.itemName===0&&(this._nameDimIdx=v),p.itemId===0&&(this._idDimIdx=v),process.env.NODE_ENV!=="production"&&be(i||d.storeDimIndex>=0),i&&(d.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ne();V(o,function(m){g.set(a[m].storeDimIndex,m)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(Ke(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var i=this,a;if(t instanceof W0&&(a=t),!a){var o=this.dimensions,s=V0(t)||Xt(t)?new G2(t,o.length):t;a=new W0;var l=Zn(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=GE(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&md(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==mn&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===ar;if(l&&!i.pure)for(var u=[],c=t;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&Wb(f)&&(this.hasItemOption=!0),f){var d=f.name;a[c]==null&&d!=null&&(a[c]=Zr(d,null));var h=f.id;o[c]==null&&h!=null&&(o[c]=Zr(h,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<r;c++)md(this,c);_5(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){bs(t)?se(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=Ss(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return cc(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,i=this._store;return me(t)?i.getValues(Zn(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[r];return i==null||isNaN(i)?y5:i},e.prototype.each=function(t,r,n){Le(t)&&(n=r,r=t,t=[]);var i=n||this,a=Zn(eo(t),this._getStoreDimIndex,this);this._store.each(a,i?ot(r,i):r)},e.prototype.filterSelf=function(t,r,n){Le(t)&&(n=r,r=t,t=[]);var i=n||this,a=Zn(eo(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ot(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=Ve(t);return V(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){Le(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=Zn(eo(t),this._getStoreDimIndex,this),s=ws(this);return s._store=this._store.map(o,a?ot(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&V(eo(t),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Zn(eo(t),this._getStoreDimIndex,this);this._store.modify(s,o?ot(r,o):r)},e.prototype.downSample=function(t,r,n,i){var a=ws(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=ws(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=ws(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new mt(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new FE(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return cc(t,n)},function(n){return cc(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},bs(t)?se(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),me(a)?a=a.slice():bs(a)&&(a=se({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,bs(r)?se(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){bs(t)?se(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?se(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;ew(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){V(this._graphicEls,function(n,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Zn(this.dimensions,this._getDimInfo,this),this.hostModel)),gd(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Le(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(gf(arguments)))})},e.internalField=function(){_5=function(t){var r=t._invertedIndicesMap;V(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new qE(o.categories.length);for(var l=0;l<n.length;l++)n[l]=y5;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Ss=function(t,r,n){return Zr(t._getCategory(r,n),null)},cc=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=Ss(t,t._idDimIdx,r)),n==null&&(n=ZE+r),n},eo=function(t){return me(t)||(t=t!=null?[t]:[]),t},ws=function(t){var r=new e(t._schema?t._schema:Zn(t.dimensions,t._getDimInfo,t),t.hostModel);return gd(r,t),r},gd=function(t,r){V(jE.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,V(QE,function(n){t[n]=Be(r[n])}),t._calculationInfo=se({},r._calculationInfo)},md=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=Ss(t,a,r)),l==null&&o!=null&&(i[r]=l=Ss(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function S5(e,t){V0(e)||(e=B2(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=Ne(),a=[],o=JE(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&m5(o),l=n===e.dimensionsDefine,u=l?g5(e):v5(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=Ne(c),d=new Q2(o),h=0;h<d.length;h++)d[h]=-1;function p(M){var C=d[M];if(C<0){var E=n[M],P=xe(E)?E:{name:E},D=new uc,k=P.name;k!=null&&u.get(k)!=null&&(D.name=D.displayName=k),P.type!=null&&(D.type=P.type),P.displayName!=null&&(D.displayName=P.displayName);var N=a.length;return d[M]=N,D.storeDimIndex=M,a.push(D),D}return a[C]}if(!s)for(var h=0;h<o;h++)p(h);f.each(function(M,C){var E=zt(M).slice();if(E.length===1&&!we(E[0])&&E[0]<0){f.set(C,!1);return}var P=f.set(C,[]);V(E,function(D,k){var N=we(D)?u.get(D):D;N!=null&&N<o&&(P[k]=N,g(p(N),C,k))})});var v=0;V(r,function(M){var C,E,P,D;if(we(M))C=M,D={};else{D=M,C=D.name;var k=D.ordinalMeta;D.ordinalMeta=null,D=se({},D),D.ordinalMeta=k,E=D.dimsDef,P=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var N=f.get(C);if(N!==!1){if(N=zt(N),!N.length)for(var I=0;I<(E&&E.length||1);I++){for(;v<o&&p(v).coordDim!=null;)v++;v<o&&N.push(v++)}V(N,function(O,z){var $=p(O);if(l&&D.type!=null&&($.type=D.type),g(Re($,D),C,z),$.name==null&&E){var R=E[z];!xe(R)&&(R={name:R}),$.name=$.displayName=R.name,$.defaultTooltip=R.defaultTooltip}P&&Re($.otherDims,P)})}});function g(M,C,E){P0.get(C)!=null?M.otherDims[C]=E:(M.coordDim=C,M.coordDimIndex=E,i.set(C,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var b=m||"value";function w(M){M.name==null&&(M.name=M.coordDim)}if(s)V(a,function(M){w(M)}),a.sort(function(M,C){return M.storeDimIndex-C.storeDimIndex});else for(var x=0;x<o;x++){var T=p(x),L=T.coordDim;L==null&&(T.coordDim=eM(b,i,_),T.coordDimIndex=0,(!m||y<=0)&&(T.isExtraCoord=!0),y--),w(T),T.type==null&&(b2(e,x)===Et.Must||T.isExtraCoord&&(T.otherDims.itemName!=null||T.otherDims.seriesName!=null))&&(T.type="ordinal")}return KE(a),new d5({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function KE(e){for(var t=Ne(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function JE(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return V(t,function(a){var o;xe(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function eM(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var tM=function(){function e(t){this.coordSysDims=[],this.axisMap=Ne(),this.categoryAxisMap=Ne(),this.coordSysName=t}return e}();function rM(e){var t=e.get("coordinateSystem"),r=new tM(t),n=nM[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var nM={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",pr).models[0],a=e.getReferringComponents("yAxis",pr).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+pa(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+pa(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),to(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),to(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",pr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],r.set("single",i),to(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",pr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),to(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),to(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();V(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),to(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",pr).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("matrix coordinate system should be specified.");t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function to(e){return e.get("type")==="category"}function iM(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;aM(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,d;if(V(a,function(y,_){we(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,p=c.type,v=0;V(a,function(y){y.coordDim===h&&v++});var g={name:f,coordDim:h,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:d,coordDim:d,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:d,stackResultDimension:f}}function aM(e){return!p5(e.schema)}function ro(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function oM(e,t){return ro(e,t)?e.getCalculationInfo("stackResultDimension"):t}function sM(e,t){var r=e.get("coordinateSystem"),n=C0.get(r),i;return t&&t.coordSysDims&&(i=ve(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=WE(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function lM(e,t,r){var n,i;return r&&V(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function fc(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===ar;var o=rM(t),s=sM(t,o),l=r.useEncodeDefaulter,u=Le(l)?l:l?Jt(uT,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=S5(i,c),d=lM(f.dimensions,r.createInvertedIndices,o),h=a?null:n.getSharedDataStore(f),p=iM(t,{schema:f,store:h}),v=new b5(f,t);v.setCalculationInfo(p);var g=d!=null&&uM(i)?function(m,y,_,b){return b===d?_:this.defaultDimValueGetter(m,y,_,b)}:null;return v.hasItemOption=!1,v.initData(a?i:h,null,g),v}function uM(e){if(e.sourceFormat===ar){var t=cM(e.data||[]);return!me($o(t))}}function cM(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function fM(e){var t=Math.pow(10,ql(Math.abs(e))),r=Math.abs(e/t);return r===0||r===1||r===2||r===3||r===5}function yd(e){return e.type==="interval"||e.type==="log"}function hM(e,t,r,n,i){var a={},o=a.interval=lg(t/r);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=xs(o),l=a.niceTickExtent=[Lt(Math.ceil(e[0]/o)*o,s),Lt(Math.floor(e[1]/o)*o,s)];return dM(l,e),a}function _d(e){var t=Math.pow(10,ql(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Lt(r*t)}function xs(e){return hn(e)+2}function w5(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function dM(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),w5(e,0,t),w5(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function bd(e,t){return e>=t[0]&&e<=t[1]}var pM=function(){function e(){this.normalize=x5,this.scale=T5}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=ot(t.normalize,t),this.scale=ot(t.scale,t)):(this.normalize=x5,this.scale=T5)},e}();function x5(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function T5(e,t){return e*(t[1]-t[0])+t[0]}function Sd(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var jn=function(){function e(t){this._calculator=new pM,this._setting=t||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]<r[0]?t[0]:r[0],t[1]>r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();Ql(jn);var vM=0,wd=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++vM,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&ve(n,gM);return new e({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!we(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Ne(this.categories))},e}();function gM(e){return xe(e)&&e.value!=null?e.value:e+""}var L5=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new wd({})),me(i)&&(i=new wd({categories:ve(i,function(a){return xe(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:we(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return bd(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},t.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(jn);jn.registerClass(L5);var Qn=Lt,Kn=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return bd(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=xs(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Pu(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:Qn(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(p,v){return Math.round((v-p)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=Qn(f+n,o),this._brkCtx){var d=this._brkCtx.calcNiceTickMultiple(f,c);d>=0&&(f=Qn(f+d*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:a[1];return i[1]>h&&(r.expandToNicedExtent?l.push({value:Qn(h+n,o)}):l.push({value:i[1]})),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,d=f/r,h=xs(d);u<r-1;){var p=Qn(l.value+(u+1)*d,h);p>a[0]&&p<a[1]&&c.push(p),u++}var v=Pu();v&&v.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(c)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=hn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Qn(r.value,i,!0);return Ux(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=hM(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=Qn(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=Qn(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t}(jn);jn.registerClass(Kn);var E5=typeof Float32Array<"u",mM=E5?Float32Array:Array;function Sn(e){return me(e)?E5?new Float32Array(e):e:new mM(e)}var yM="__ec_stack_";function xd(e){return e.get("stack")||yM+e.seriesIndex}function Td(e){return e.dim+e.index}function M5(e,t){var r=[];return t.eachSeriesByType(e,function(n){D5(n)&&r.push(n)}),r}function _M(e){var t={};V(e,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),d=c.dim+"_"+c.index,h=f.getDimensionIndex(f.mapDimension(c.dim)),p=f.getStore(),v=0,g=p.count();v<g;++v){var m=p.get(h,v);t[d]?t[d].push(m):t[d]=[m]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function C5(e){var t=_M(e),r=[];return V(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=tt(n.get("barWidth"),s),v=tt(n.get("barMaxWidth"),s),g=tt(n.get("barMinWidth")||(A5(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap"),_=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:y,defaultBarGap:_,axisKey:Td(a),stackId:xd(n)})}),bM(r)}function bM(e){var t={};V(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var d=n.barMinWidth;d&&(l[u].minWidth=d);var h=n.barGap;h!=null&&(s.gap=h);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return V(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ve(a).length;s=Math.max(35-l*4,15)+"%"}var u=tt(s,o),c=tt(n.gap,1),f=n.remainedWidth,d=n.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),V(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var b=m.width;y&&(b=Math.min(b,y)),_&&(b=Math.max(b,_)),m.width=b,f-=b+c*b,d--}else{var b=h;y&&y<b&&(b=Math.min(y,f)),_&&_>b&&(b=_),b!==h&&(m.width=b,f-=b+c*b,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var p=0,v;V(a,function(m,y){m.width||(m.width=h),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;V(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),r}function SM(e,t,r){if(e&&t){var n=e[Td(t)];return n!=null&&r!=null?n[xd(r)]:n}}function wM(e,t){var r=M5(e,t),n=C5(r);V(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=xd(i),u=n[Td(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function xM(e){return{seriesType:e,plan:U0(),reset:function(t){if(D5(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=ro(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),d=a.isHorizontal(),h=TM(i,a),p=A5(t),v=t.get("barMinHeight")||0,g=c&&r.getDimensionIndex(c),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(_,b){for(var w=_.count,x=p&&Sn(w*3),T=p&&l&&Sn(w*3),L=p&&Sn(w),M=n.master.getRect(),C=d?M.width:M.height,E,P=b.getStore(),D=0;(E=_.next())!=null;){var k=P.get(f?g:o,E),N=P.get(s,E),I=h,O=void 0;f&&(O=+k-P.get(o,E));var z=void 0,$=void 0,R=void 0,B=void 0;if(d){var H=n.dataToPoint([k,N]);if(f){var F=n.dataToPoint([O,N]);I=F[0]}z=I,$=H[1]+y,R=H[0]-I,B=m,Math.abs(R)<v&&(R=(R<0?-1:1)*v)}else{var H=n.dataToPoint([N,k]);if(f){var F=n.dataToPoint([N,O]);I=F[1]}z=H[0]+y,$=I,R=m,B=H[1]-I,Math.abs(B)<v&&(B=(B<=0?-1:1)*v)}p?(x[D]=z,x[D+1]=$,x[D+2]=d?R:B,T&&(T[D]=d?M.x:z,T[D+1]=d?$:M.y,T[D+2]=C),L[E]=E):b.setItemLayout(E,{x:z,y:$,width:R,height:B}),D+=3}p&&b.setLayout({largePoints:x,largeDataIndices:L,largeBackgroundPoints:T,valueAxisHorizontal:d})}}}}}}function D5(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function A5(e){return e.pipelineContext&&e.pipelineContext.large}function TM(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var LM=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},k5=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return a2(r.value,i2[Gx(rs(this._minLevelUnit))]||i2.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return Wx(r,n,i,o,a)},t.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=Iu(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=NM(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=Iu(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=zi.length-1,f=0;return V(a,function(d){c=Math.min(c,Qe(zi,d.time.upperTimeUnit)),f=Math.max(f,d.time.level)}),a},t.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=_r,n[1]+=_r),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-_r}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=hc.length,s=Math.min(LM(hc,this._approxInterval,0,o),o-1);this._interval=hc[s][1],this._intervalPrecision=xs(this._interval),this._minLevelUnit=hc[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return Ke(r)?r:+Bo(r)},t.prototype.contain=function(r){return bd(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(Kn),hc=[["second",g0],["minute",m0],["hour",ts],["quarter-day",ts*6],["half-day",ts*12],["day",_r*1.2],["half-week",_r*3.5],["week",_r*7],["month",_r*31],["quarter",_r*95],["half-year",n2/2],["year",n2]];function EM(e,t,r,n){return y0(new Date(t),e,n).getTime()===y0(new Date(r),e,n).getTime()}function MM(e,t){return e/=_r,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function CM(e){var t=30*_r;return e/=t,e>6?6:e>3?3:e>2?2:1}function DM(e){return e/=ts,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function P5(e,t){return e/=t?m0:g0,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function AM(e){return lg(e)}function kM(e,t,r){var n=Math.max(0,Qe(zi,t)-1);return y0(new Date(e),zi[n],r).getTime()}function PM(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function NM(e,t,r,n,i,a){var o=1e4,s=Vx,l=0;function u(D,k,N,I,O,z,$){for(var R=PM(O,D),B=k,H=new Date(B);B<N&&B<=n[1];){if($.push({value:B}),l++>o){process.env.NODE_ENV!=="production"&&kt("Exceed safe limit in time scale.");break}if(H[O](H[I]()+D),B=H.getTime(),a){var F=a.calcNiceTickMultiple(B,R);F>0&&(H[O](H[I]()+F*D),B=H.getTime())}}$.push({value:B,notAdd:!0})}function c(D,k,N){var I=[],O=!k.length;if(!EM(rs(D),n[0],n[1],r)){O&&(k=[{value:kM(n[0],D,r)},{value:n[1]}]);for(var z=0;z<k.length-1;z++){var $=k[z].value,R=k[z+1].value;if($!==R){var B=void 0,H=void 0,F=void 0,A=!1;switch(D){case"year":B=Math.max(1,Math.round(t/_r/365)),H=o2(r),F=Xx(r);break;case"half-year":case"quarter":case"month":B=CM(t),H=_0(r),F=s2(r);break;case"week":case"half-week":case"day":B=MM(t),H=b0(r),F=l2(r),A=!0;break;case"half-day":case"quarter-day":case"hour":B=DM(t),H=S0(r),F=u2(r);break;case"minute":B=P5(t,!0),H=w0(r),F=c2(r);break;case"second":B=P5(t,!1),H=x0(r),F=f2(r);break;case"millisecond":B=AM(t),H=T0(r),F=h2(r);break}R>=n[0]&&$<=n[1]&&u(B,$,R,H,F,A,I),D==="year"&&N.length>1&&z===0&&N.unshift({value:N[0].value-B})}}for(var z=0;z<I.length;z++)N.push(I[z])}}for(var f=[],d=[],h=0,p=0,v=0;v<s.length;++v){var g=rs(s[v]);if(Hx(s[v])){c(s[v],f[f.length-1]||[],d);var m=s[v+1]?rs(s[v+1]):null;if(g!==m){if(d.length){p=h,d.sort(function(D,k){return D.value-k.value});for(var y=[],_=0;_<d.length;++_){var b=d[_].value;(_===0||d[_-1].value!==b)&&(y.push(d[_]),b>=n[0]&&b<=n[1]&&h++)}var w=i/t;if(h>w*1.5&&p>w/1.5||(f.push(y),h>w||e===s[v]))break}d=[]}}}for(var x=vt(ve(f,function(D){return vt(D,function(k){return k.value>=n[0]&&k.value<=n[1]&&!k.notAdd})}),function(D){return D.length>0}),T=[],L=x.length-1,v=0;v<x.length;++v)for(var M=x[v],C=0;C<M.length;++C){var E=Iu(M[C].value,r);T.push({value:M[C].value,time:{level:L-v,upperTimeUnit:E,lowerTimeUnit:E}})}T.sort(function(D,k){return D.value-k.value});for(var P=[],v=0;v<T.length;++v)(v===0||T[v].value!==T[v-1].value)&&P.push(T[v]);return P}jn.registerClass(k5);var Ld=Lt,OM=Math.floor,IM=Math.ceil,dc=Math.pow,pc=Math.log,N5=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Kn,r}return t.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,r),o=this.base;return this._originalScale._innerGetBreaks(),ve(a,function(s){var l=s.value,u=null,c=dc(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var f;return u!=null&&(c=Ed(c,u)),{value:c,break:f}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=Sd(this.base,[r,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var r=this.base,n=e.prototype.getExtent.call(this);n[0]=dc(r,n[0]),n[1]=dc(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=Ed(n[0],i[0])),this._fixMax&&(n[1]=Ed(n[1],i[1])),n},t.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=Sd(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=Rb(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Ld(IM(n[0]/a)*a),Ld(OM(n[1]/a)*a)];this._interval=a,this._intervalPrecision=xs(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=pc(r)/pc(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=pc(r)/pc(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),dc(this.base,r)},t.prototype.setBreaksFromOption=function(r){},t.type="log",t}(Kn);function Ed(e,t){return Ld(e,hn(t))}jn.registerClass(N5);var BM=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;Le(o)?this._modelMinNum=vc(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=vc(t,o));var s=this._modelMaxRaw=r.get("max",!0);if(Le(s)?this._modelMaxNum=vc(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=vc(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=me(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[$n(u[0],1),$n(u[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=da(s)||da(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){process.env.NODE_ENV!=="production"&&be(!this.frozen),this[RM[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=$M[t];process.env.NODE_ENV!=="production"&&be(!this.frozen&&this[n]==null),this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),$M={min:"_determinedMin",max:"_determinedMax"},RM={min:"_dataMin",max:"_dataMax"};function VM(e,t,r){var n=e.rawExtentInfo;return n||(n=new BM(e,t,r),e.rawExtentInfo=n,n)}function vc(e,t){return t==null?null:da(t)?NaN:e.parse(t)}function O5(e,t){var r=e.type,n=VM(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=M5("bar",o),l=!1;if(V(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=C5(s),c=zM(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function zM(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=SM(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;V(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;V(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,d=c/f-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}function I5(e,t){var r=t,n=O5(e,r),i=n.extent,a=r.get("splitNumber");e instanceof N5&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(R5(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function FM(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new L5({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new k5({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(jn.getClass(t)||Kn)}}function HM(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Ts(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=zx(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(we(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Le(t)){if(e.type==="category")return function(i,a){return t(B5(e,i),i.value-e.scale.getExtent()[0],null)};var n=Pu();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(B5(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function B5(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function Md(e){var t=e.get("interval");return t??"auto"}function $5(e){return e.type==="category"&&Md(e.getLabelModel())===0}function GM(e,t){var r={};return V(e.mapDimensionsAll(t),function(n){r[oM(e,n)]=!0}),Ve(r)}function no(e){return e==="middle"||e==="center"}function Ls(e){return e.getShallow("show")}function R5(e){var t=e.get("breaks",!0);if(t!=null){process.env.NODE_ENV!=="production"&&Ue('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}}var V5=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}(),z5=[],WM={registerPreprocessor:l5,registerProcessor:u5,registerPostInit:IE,registerPostUpdate:BE,registerUpdateLifecycle:hd,registerAction:Ja,registerCoordinateSystem:$E,registerLayout:RE,registerVisual:Zi,registerTransform:zE,registerLoading:f5,registerMap:VE,registerImpl:vE,PRIORITY:CE,ComponentModel:Ye,ComponentView:_n,SeriesModel:or,ChartView:Zt,registerComponentModel:function(e){Ye.registerClass(e)},registerComponentView:function(e){_n.registerClass(e)},registerSeriesModel:function(e){or.registerClass(e)},registerChartView:function(e){Zt.registerClass(e)},registerCustomSeries:function(e,t){},registerSubTypeDefaulter:function(e,t){Ye.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Db(e,t)}};function ji(e){if(me(e)){V(e,function(t){ji(t)});return}Qe(z5,e)>=0||(z5.push(e),Le(e)&&(e={install:e}),e.install(WM))}var XM=ut(),Es=ut(),$r={estimate:1,determine:2};function gc(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function F5(e,t){var r=ve(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function UM(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Ts(e),i=e.scale.getExtent(),a=F5(e,r),o=vt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:ve(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?qM(e,t):jM(e)}function YM(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=F5(e,n);return{ticks:vt(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?ZM(e,t):{ticks:ve(e.scale.getTicks(r),function(o){return o.value})}}function qM(e,t){var r=e.getLabelModel(),n=H5(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function H5(e,t,r){var n=KM(e),i=Md(t),a=r.kind===$r.estimate;if(!a){var o=W5(n,i);if(o)return o}var s,l;Le(i)?s=Y5(e,i):(l=i==="auto"?JM(e,r):i,s=U5(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return Cd(n,i,u),!0}):Cd(n,i,u),u}function ZM(e,t){var r=QM(e),n=Md(t),i=W5(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Le(n))a=Y5(e,n,!0);else if(n==="auto"){var s=H5(e,e.getLabelModel(),gc($r.determine));o=s.labelCategoryInterval,a=ve(s.labels,function(l){return l.tickValue})}else o=n,a=U5(e,o,!0);return Cd(r,n,{ticks:a,tickCategoryInterval:o})}function jM(e){var t=e.scale.getTicks(),r=Ts(e);return{labels:ve(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var QM=G5("axisTick"),KM=G5("axisLabel");function G5(e){return function(r){return Es(r)[e]||(Es(r)[e]={list:[]})}}function W5(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function Cd(e,t,r){return e.list.push({key:t,value:r}),r}function JM(e,t){if(t.kind===$r.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Es(e).autoInterval=r,!0}),r}var n=Es(e).autoInterval;return n??(Es(e).autoInterval=e.calculateCategoryInterval(t))}function eC(e,t){var r=t.kind,n=rC(e),i=Ts(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],d=e.dataToCoord(f+1)-e.dataToCoord(f),h=Math.abs(d*Math.cos(a)),p=Math.abs(d*Math.sin(a)),v=0,g=0;f<=s[1];f+=u){var m=0,y=0,_=_b(i({value:f}),n.font,"center","top");m=_.width*1.3,y=_.height*1.3,v=Math.max(v,m,7),g=Math.max(g,y,7)}var b=v/h,w=g/p;isNaN(b)&&(b=1/0),isNaN(w)&&(w=1/0);var x=Math.max(0,Math.floor(Math.min(b,w)));if(r===$r.estimate)return t.out.noPxChangeTryDetermine.push(ot(tC,null,e,x,l)),x;var T=X5(e,x,l);return T??x}function tC(e,t,r){return X5(e,t,r)==null}function X5(e,t,r){var n=XM(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function rC(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 U5(e,t,r){var n=Ts(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=$5(e),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==a[0]&&v(a[0]);for(var p=u;p<=a[1];p+=l)v(p);h&&p-l!==a[1]&&v(a[1]);function v(g){var m={value:g};s.push(r?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g,time:void 0,break:void 0})}return s}function Y5(e,t,r){var n=e.scale,i=Ts(e),a=[];return V(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var q5=[0,1],Z5=function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return Ob(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),j5(n,i.count())),vh(t,q5,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),j5(n,i.count()));var a=vh(t,n,q5,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=YM(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=ve(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return nC(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ve(n,function(a){return ve(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||gc($r.determine),UM(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||gc($r.determine),eC(this,t)},e}();function j5(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function nC(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;V(t,function(h){h.coord-=u/2,h.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=a[0]>a[1];d(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&d(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),d(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&d(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function d(h,p){return h=Lt(h),p=Lt(p),f?h>p:h<p}}function Q5(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,d=Math.sqrt(c*c+f*f);c/=d,f/=d;var h=l*c+u*f,p=h/d;p*=d;var v=o[0]=e+p*c,g=o[1]=t+p*f;return Math.sqrt((v-i)*(v-i)+(g-a)*(g-a))}var Jn=new Ce,lt=new Ce,Mt=new Ce,ei=new Ce,nn=new Ce,mc=[],Ht=new Ce;function iC(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Jn.fromArray(e[0]),lt.fromArray(e[1]),Mt.fromArray(e[2]),Ce.sub(ei,Jn,lt),Ce.sub(nn,Mt,lt);var r=ei.len(),n=nn.len();if(!(r<.001||n<.001)){ei.scale(1/r),nn.scale(1/n);var i=ei.dot(nn),a=Math.cos(t);if(a<i){var o=Q5(lt.x,lt.y,Mt.x,Mt.y,Jn.x,Jn.y,mc);Ht.fromArray(mc),Ht.scaleAndAdd(nn,o/Math.tan(Math.PI-t));var s=Mt.x!==lt.x?(Ht.x-lt.x)/(Mt.x-lt.x):(Ht.y-lt.y)/(Mt.y-lt.y);if(isNaN(s))return;s<0?Ce.copy(Ht,lt):s>1&&Ce.copy(Ht,Mt),Ht.toArray(e[1])}}}}function aC(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Jn.fromArray(e[0]),lt.fromArray(e[1]),Mt.fromArray(e[2]),Ce.sub(ei,lt,Jn),Ce.sub(nn,Mt,lt);var n=ei.len(),i=nn.len();if(!(n<.001||i<.001)){ei.scale(1/n),nn.scale(1/i);var a=ei.dot(t),o=Math.cos(r);if(a<o){var s=Q5(lt.x,lt.y,Mt.x,Mt.y,Jn.x,Jn.y,mc);Ht.fromArray(mc);var l=Math.PI/2,u=Math.acos(nn.dot(t)),c=l+u-r;if(c>=l)Ce.copy(Ht,Mt);else{Ht.scaleAndAdd(nn,s/Math.tan(Math.PI/2-c));var f=Mt.x!==lt.x?(Ht.x-lt.x)/(Mt.x-lt.x):(Ht.y-lt.y)/(Mt.y-lt.y);if(isNaN(f))return;f<0?Ce.copy(Ht,lt):f>1&&Ce.copy(Ht,Mt)}Ht.toArray(e[1])}}}}function Dd(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function oC(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Sf(n[0],n[1]),a=Sf(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=wf([],n[1],n[0],o/i),l=wf([],n[1],n[2],o/a),u=wf([],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],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)e.lineTo(n[c][0],n[c][1])}function sC(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<su.length;l++){var u=su[l],c=t[u],f=u==="normal";if(c){var d=c.get("show"),h=f?s:ye(i.states[u]&&i.states[u].ignore,s);if(h||!ye(d,o)){var p=f?n:n&&n.states[u];p&&(p.ignore=!0),n&&Dd(n,!0,u,c);continue}n||(n=new $i,e.setTextGuideLine(n),!f&&(s||!o)&&Dd(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),Dd(n,!1,u,c)}}if(n){Re(n.style,r),n.style.fill=null;var v=a.get("showAbove"),g=e.textGuideLineConfig=e.textGuideLineConfig||{};g.showAbove=v||!1,n.buildPath=oC}}function lC(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<yr.length;n++){var i=yr[n];r[i]=e.getModel([i,t])}return r}var K5=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],uC=1,yc=2,J5=uC|yc;function _c(e,t,r){r=r||J5,t?e.dirty|=r:e.dirty&=~r}function e4(e,t){return t=t||J5,e.dirty==null||!!(e.dirty&t)}function ti(e){if(e)return e4(e)&&t4(e,e.label,e),e}function t4(e,t,r){var n=t.getComputedTransform();e.transform=f0(e.transform,n);var i=e.localRect=Jo(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=Ha.textMargin);for(var f=0;f<4;f++)Ad[f]=c===Ha.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Ha.textMargin&&xu(i,Ad,!1,!1);var d=e.rect=Jo(e.rect,i);return n&&d.applyTransform(n),c===Ha.minMargin&&xu(d,Ad,!1,!1),e.axisAligned=c0(n),(e.label=e.label||{}).ignore=t.ignore,_c(e,!1),_c(e,!0,yc),e}var Ad=[0,0,0,0];function cC(e,t,r){return e.transform=f0(e.transform,r),e.localRect=Jo(e.localRect,t),e.rect=Jo(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=c0(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function fC(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function r4(e,t){for(var r=0;r<K5.length;r++){var n=K5[r];e[n]==null&&(e[n]=t[n])}return ti(e)}function n4(e){var t=e.obb;return(!t||e4(e,yc))&&(e.obb=t=t||new Pm,t.fromBoundingRect(e.localRect,e.transform),_c(e,!1,yc)),t}function hC(e,t,r,n,i){var a=e.length,o=Wn[t],s=Va[t];if(a<2)return!1;e.sort(function(M,C){return M.rect[o]-C.rect[o]});for(var l=0,u,c=!1,f=0,d=0;d<a;d++){var h=e[d],p=h.rect;u=p[o]-l,u<0&&(p[o]-=u,h.label[o]-=u,c=!0);var v=Math.max(-u,0);f+=v,l=p[o]+p[s]}f>0&&i&&x(-f/a,0,a);var g=e[0],m=e[a-1],y,_;b(),y<0&&T(-y,.8),_<0&&T(_,.8),b(),w(y,_,1),w(_,y,-1),b(),y<0&&L(-y),_<0&&L(_);function b(){y=g.rect[o]-r,_=n-m.rect[o]-m.rect[s]}function w(M,C,E){if(M<0){var P=Math.min(C,-M);if(P>0){x(P*E,0,a);var D=P+M;D<0&&T(-D*E,1)}else T(-M*E,1)}}function x(M,C,E){M!==0&&(c=!0);for(var P=C;P<E;P++){var D=e[P],k=D.rect;k[o]+=M,D.label[o]+=M}}function T(M,C){for(var E=[],P=0,D=1;D<a;D++){var k=e[D-1].rect,N=Math.max(e[D].rect[o]-k[o]-k[s],0);E.push(N),P+=N}if(P){var I=Math.min(Math.abs(M)/P,C);if(M>0)for(var D=0;D<a-1;D++){var O=E[D]*I;x(O,0,D+1)}else for(var D=a-1;D>0;D--){var O=E[D-1]*I;x(-O,D,a)}}}function L(M){var C=M<0?-1:1;M=Math.abs(M);for(var E=Math.ceil(M/(a-1)),P=0;P<a-1;P++)if(C>0?x(E,0,P+1):x(-E,a-P-1,a),M-=E,M<=0)return}return c}function dC(e){var t=[];e.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=ti(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(kd(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function kd(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:n4(e).intersect(n4(t),r,n)}var pC=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new ht,i=qn("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=qn(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Ae.color.neutral00,u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(or);function Pd(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Ua(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Ua(e,t,r[o]));return a.join(" ")}}function i4(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!me(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var Nd=function(e){fe(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=qn(r,-1,-1,2,2,null,s);l.attr({z2:ye(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=vC,this._symbolType=r,this.add(l)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){hu(this.childAt(0))},t.prototype.downplay=function(){du(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var d=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,d)}else{var h=this.childAt(0);h.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(p):Nt(h,p,s,n),Qo(h)}if(this._updateCommon(r,n,l,i,a),c){var h=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,qt(h,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,d,h,p,v,g,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,d=a.focus,h=a.blurScope,v=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),d=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),v=Fa(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var w=Sy(r.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var x=r.getItemVisual(n,"style"),T=x.fill;if(s instanceof Pr){var L=s.style;s.useStyle(se({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},x))}else s.__isEmptyBrush?s.useStyle(se({},x)):s.useStyle(x),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=r.getItemVisual(n,"liftZ"),C=this._z2;M!=null?C==null&&(this._z2=s.z2,s.z2+=M):C!=null&&(s.z2=C,this._z2=null);var E=o&&o.useNameLabel;za(s,v,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:T,defaultOpacity:x.opacity});function P(N){return E?r.getName(N):Pd(r,N)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var D=s.ensureState("emphasis");D.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var k=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;D.scaleX=this._sizeX*k,D.scaleY=this._sizeY*k,this.setSymbolScale(1),Oa(this,d,h,p)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=rt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&wu(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();wu(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return by(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(ht);function vC(e,t){this.parent.drift(e,t)}function Od(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function a4(e){return e!=null&&!xe(e)&&(e={isIgnore:e}),e||{}}function o4(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Fa(t),cursorStyle:t.get("cursor")}}var s4=function(){function e(t){this.group=new ht,this._SymbolCtor=t||Nd}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=a4(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=o4(t),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var d=c(f);if(Od(t,d,f,r)){var h=new o(t,f,l,u);h.setPosition(d),t.setItemGraphicEl(f,h),n.add(h)}}).update(function(f,d){var h=a.getItemGraphicEl(d),p=c(f);if(!Od(t,p,f,r)){n.remove(h);return}var v=t.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==v)n.remove(h),h=new o(t,f,l,u),h.setPosition(p);else{h.updateData(t,f,l,u);var m={x:p[0],y:p[1]};s?h.attr(m):Nt(h,m,i)}n.add(h),t.setItemGraphicEl(f,h)}).remove(function(f){var d=a.getItemGraphicEl(f);d&&d.fadeOut(function(){n.remove(d)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=o4(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=a4(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(Od(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Lu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function l4(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=gC(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=ve(e.dimensions,function(p){return t.mapDimension(p)}),d=!1,h=t.getCalculationInfo("stackResultDimension");return ro(t,f[0])&&(d=!0,f[0]=h),ro(t,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function gC(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:Ke(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function u4(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function mC(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function yC(e,t,r,n,i,a,o,s){for(var l=mC(e,t),u=[],c=[],f=[],d=[],h=[],p=[],v=[],g=l4(i,t,o),m=e.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var b=l[_],w=!0,x=void 0,T=void 0;switch(b.cmd){case"=":x=b.idx*2,T=b.idx1*2;var L=m[x],M=m[x+1],C=y[T],E=y[T+1];(isNaN(L)||isNaN(M))&&(L=C,M=E),u.push(L,M),c.push(C,E),f.push(r[x],r[x+1]),d.push(n[T],n[T+1]),v.push(t.getRawIndex(b.idx1));break;case"+":var P=b.idx,D=g.dataDimsForPoint,k=i.dataToPoint([t.get(D[0],P),t.get(D[1],P)]);T=P*2,u.push(k[0],k[1]),c.push(y[T],y[T+1]);var N=u4(g,i,t,P);f.push(N[0],N[1]),d.push(n[T],n[T+1]),v.push(t.getRawIndex(P));break;case"-":w=!1}w&&(h.push(b),p.push(p.length))}p.sort(function(G,Z){return v[G]-v[Z]});for(var I=u.length,O=Sn(I),z=Sn(I),$=Sn(I),R=Sn(I),B=[],_=0;_<p.length;_++){var H=p[_],F=_*2,A=H*2;O[F]=u[A],O[F+1]=u[A+1],z[F]=c[A],z[F+1]=c[A+1],$[F]=f[A],$[F+1]=f[A+1],R[F]=d[A],R[F+1]=d[A+1],B[_]=h[H]}return{current:O,next:z,stackedOnCurrent:$,stackedOnNext:R,status:B}}var ri=Math.min,ni=Math.max;function Qi(e,t){return isNaN(e)||isNaN(t)}function Id(e,t,r,n,i,a,o,s,l){for(var u,c,f,d,h,p,v=r,g=0;g<n;g++){var m=t[v*2],y=t[v*2+1];if(v>=i||v<0)break;if(Qi(m,y)){if(l){v+=a;continue}break}if(v===r)e[a>0?"moveTo":"lineTo"](m,y),f=m,d=y;else{var _=m-u,b=y-c;if(_*_+b*b<.5){v+=a;continue}if(o>0){for(var w=v+a,x=t[w*2],T=t[w*2+1];x===m&&T===y&&g<n;)g++,w+=a,v+=a,x=t[w*2],T=t[w*2+1],m=t[v*2],y=t[v*2+1],_=m-u,b=y-c;var L=g+1;if(l)for(;Qi(x,T)&&L<n;)L++,w+=a,x=t[w*2],T=t[w*2+1];var M=.5,C=0,E=0,P=void 0,D=void 0;if(L>=n||Qi(x,T))h=m,p=y;else{C=x-u,E=T-c;var k=m-u,N=x-m,I=y-c,O=T-y,z=void 0,$=void 0;if(s==="x"){z=Math.abs(k),$=Math.abs(N);var R=C>0?1:-1;h=m-R*z*o,p=y,P=m+R*$*o,D=y}else if(s==="y"){z=Math.abs(I),$=Math.abs(O);var B=E>0?1:-1;h=m,p=y-B*z*o,P=m,D=y+B*$*o}else z=Math.sqrt(k*k+I*I),$=Math.sqrt(N*N+O*O),M=$/($+z),h=m-C*o*(1-M),p=y-E*o*(1-M),P=m+C*o*M,D=y+E*o*M,P=ri(P,ni(x,m)),D=ri(D,ni(T,y)),P=ni(P,ri(x,m)),D=ni(D,ri(T,y)),C=P-m,E=D-y,h=m-C*z/$,p=y-E*z/$,h=ri(h,ni(u,m)),p=ri(p,ni(c,y)),h=ni(h,ri(u,m)),p=ni(p,ri(c,y)),C=m-h,E=y-p,P=m+C*$/z,D=y+E*$/z}e.bezierCurveTo(f,d,h,p,m,y),f=P,d=D}else e.lineTo(m,y)}u=m,c=y,v+=a}return g}var c4=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),_C=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:Ae.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c4},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Qi(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Qi(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=Id(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=zn.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var d=a[f++],h=void 0,p=void 0,v=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(d){case o.M:s=a[f++],l=a[f++];break;case o.L:if(h=a[f++],p=a[f++],_=u?(r-s)/(h-s):(r-l)/(p-l),_<=1&&_>=0){var b=u?(p-l)*_+l:(h-s)*_+s;return u?[r,b]:[b,r]}s=h,l=p;break;case o.C:h=a[f++],p=a[f++],v=a[f++],g=a[f++],m=a[f++],y=a[f++];var w=u?El(s,h,v,m,r,c):El(l,p,g,y,r,c);if(w>0)for(var x=0;x<w;x++){var T=c[x];if(T<=1&&T>=0){var b=u?Tt(l,p,g,y,T):Tt(s,h,v,m,T);return u?[r,b]:[b,r]}}s=m,l=y;break}}},t}(Fe),bC=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(c4),SC=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new bC},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Qi(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Qi(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=Id(r,i,o,s,s,1,n.smooth,l,n.connectNulls);Id(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(Fe);function f4(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new dt({shape:{x:o,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),h=d.isHorizontal(),p=d.inverse;h?(p&&(f.shape.x+=l),f.shape.width=0):(p||(f.shape.y+=u),f.shape.height=0);var v=Le(i)?function(g){i(g,f)}:null;qt(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,v)}return f}function h4(e,t,r){var n=e.getArea(),i=Lt(n.r0,1),a=Lt(n.r,1),o=new Hn({shape:{cx:Lt(e.cx,1),cy:Lt(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,qt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function wC(e,t,r,n,i){if(e){if(e.type==="polar")return h4(e,t,r);if(e.type==="cartesian2d")return f4(e,t,r,n,i)}else return null;return null}function Bd(e,t){return e.type===t}function d4(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function p4(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function v4(e,t){var r=p4(e),n=r[0],i=r[1],a=p4(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function g4(e){return Ke(e)?e:e?.5:0}function xC(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=Sn(n*2),a=0;a<n;a++){var o=u4(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function ii(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],d=[];if(i){for(l=0;l<e.length;l+=2){var h=t||e;!isNaN(h[l])&&!isNaN(h[l+1])&&d.push(e[l],e[l+1])}e=d}for(l=0;l<e.length-2;l+=2)switch(f[0]=e[l+2],f[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+f[o])/2,v=[];u[o]=v[o]=p,u[1-o]=c[1-o],v[1-o]=f[1-o],s.push(u[0],u[1]),s.push(v[0],v[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function TC(e,t){var r=[],n=e.length,i,a;function o(c,f,d){var h=c.coord,p=(d-h)/(f.coord-h),v=Z9(p,[c.color,f.color]);return{coord:d,color:v}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function LC(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=ve(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=TC(u,i==="x"?r.getWidth():r.getHeight()),h=d.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,v=d[0].coord-p,g=d[h-1].coord+p,m=g-v;if(m<.001)return"transparent";V(d,function(_){_.offset=(_.coord-v)/m}),d.push({offset:h?d[h-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:f[0]||"transparent"});var y=new km(0,0,0,0,d,!0);return y[i]=v,y[i+"2"]=g,y}}function EC(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&MC(a,t))){var o=t.mapDimension(a.dim),s={};return V(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function MC(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Nd.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function CC(e,t){return isNaN(e)||isNaN(t)}function DC(e){for(var t=e.length/2;t>0&&CC(e[t*2-2],e[t*2-1]);t--);return t-1}function m4(e,t){return[e[t*2],e[t*2+1]]}function AC(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function y4(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<yr.length;t++)if(e.get([yr[t],"endLabel","show"]))return!0;return!1}function $d(e,t,r,n){if(Bd(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=y4(n)?function(h,p){e._endLabelOnDuring(h,p,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=f4(t,r,n,function(){var h=e._endLabel;h&&r&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,d=Math.max(f.width,f.height);u?(f.y-=d,f.height+=d*2):(f.x-=d,f.width+=d*2)}return l&&l(1,c),c}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),h4(t,r,n)}function kC(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var PC=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new ht,n=new s4;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ot(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",d=this._coordSys,h=this._symbolDraw,p=this._polyline,v=this._polygon,g=this._lineGroup,m=!n.ssr&&r.get("animation"),y=!u.isEmpty(),_=u.get("origin"),b=l4(a,s,_),w=y&&xC(a,s,b),x=r.get("showSymbol"),T=r.get("connectNulls"),L=x&&!f&&EC(r,s,a),M=this._data;M&&M.eachItemGraphicEl(function(G,Z){G.__temp&&(o.remove(G),M.setItemGraphicEl(Z,null))}),x||h.remove(),o.add(g);var C=f?!1:r.get("step"),E;a&&a.getArea&&r.get("clip",!0)&&(E=a.getArea(),E.width!=null?(E.x-=.1,E.y-=.1,E.width+=.2,E.height+=.2):E.r0&&(E.r0-=.5,E.r+=.5)),this._clipShapeForSymbol=E;var P=LC(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&d.type===a.type&&C===this._step))x&&h.updateData(s,{isIgnore:L,clipShape:E,disableAnimation:!0,getSymbolPoint:function(G){return[c[G*2],c[G*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,E),C&&(w&&(w=ii(w,c,a,C,T)),c=ii(c,null,a,C,T)),p=this._newPolyline(c),y?v=this._newPolygon(c,w):v&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,E0(P)),g.setClipPath($d(this,a,!0,r));else{y&&!v?v=this._newPolygon(c,w):v&&!y&&(g.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,E0(P));var D=g.getClipPath();if(D){var k=$d(this,a,!1,r);qt(D,{shape:k.shape},r)}else g.setClipPath($d(this,a,!0,r));x&&h.updateData(s,{isIgnore:L,clipShape:E,disableAnimation:!0,getSymbolPoint:function(G){return[c[G*2],c[G*2+1]]}}),(!d4(this._stackedOnPoints,w)||!d4(this._points,c))&&(m?this._doUpdateAnimation(s,w,a,i,C,_,T):(C&&(w&&(w=ii(w,c,a,C,T)),c=ii(c,null,a,C,T)),p.setShape({points:c}),v&&v.setShape({points:c,stackedOnPoints:w})))}var N=r.getModel("emphasis"),I=N.get("focus"),O=N.get("blurScope"),z=N.get("disabled");if(p.useStyle(Re(l.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),Ia(p,r,"lineStyle"),p.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var $=p.getState("emphasis").style;$.lineWidth=+p.style.lineWidth+1}rt(p).seriesIndex=r.seriesIndex,Oa(p,I,O,z);var R=g4(r.get("smooth")),B=r.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:B,connectNulls:T}),v){var H=s.getCalculationInfo("stackedOnSeries"),F=0;v.useStyle(Re(u.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(F=g4(H.get("smooth"))),v.setShape({smooth:R,stackedOnSmooth:F,smoothMonotone:B,connectNulls:T}),Ia(v,r,"areaStyle"),rt(v).seriesIndex=r.seriesIndex,Oa(v,I,O,z)}var A=this._changePolyState;s.eachItemGraphicEl(function(G){G&&(G.onHoverStateChange=A)}),this._polyline.onHoverStateChange=A,this._data=s,this._coordSys=a,this._stackedOnPoints=w,this._points=c,this._step=C,this._valueOrigin=_,r.get("triggerLineEvent")&&(this.packEventData(r,p),v&&this.packEventData(r,v))},t.prototype.packEventData=function(r,n){rt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Aa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var d=r.get("zlevel")||0,h=r.get("z")||0;u=new Nd(o,s),u.x=c,u.y=f,u.setZ(d,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=d,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Zt.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Aa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Zt.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;om(this._polyline,r),n&&om(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new _C({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new SC({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Le(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Le(f)?f(null):f;r.eachItemGraphicEl(function(h,p){var v=h;if(v){var g=[h.x,h.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var b=i,w=n.pointToCoord(g);a?(m=b.startAngle,y=b.endAngle,_=-w[1]/180*Math.PI):(m=b.r0,y=b.r,_=w[0])}else{var x=i;a?(m=x.x,y=x.x+x.width,_=h.x):(m=x.y+x.height,y=x.y,_=h.y)}var T=y===m?0:(_-m)/(y-m);l&&(T=1-T);var L=Le(f)?f(p):c*T+d,M=v.getSymbolPath(),C=M.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:L}),C&&C.animateFrom({style:{opacity:0}},{duration:300,delay:L}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(y4(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new ir({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=DC(l);c>=0&&(za(s,Fa(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?i4(o,h):Pd(o,f)},enableTextSetter:!0},kC(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),d=i.hostModel,h=d.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,b=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,w=(m?v:0)*(y?-1:1),x=(m?0:-v)*(y?-1:1),T=m?"x":"y",L=AC(f,b,T),M=L.range,C=M[1]-M[0],E=void 0;if(C>=1){if(C>1&&!h){var P=m4(f,M[0]);u.attr({x:P[0]+w,y:P[1]+x}),o&&(E=d.getRawValue(M[0]))}else{var P=c.getPointOn(b,T);P&&u.attr({x:P[0]+w,y:P[1]+x});var D=d.getRawValue(M[0]),k=d.getRawValue(M[1]);o&&(E=rS(i,p,D,k,L.t))}a.lastFrameIndex=M[0]}else{var N=r===1||a.lastFrameIndex>0?M[0]:0,P=m4(f,N);o&&(E=d.getRawValue(N)),u.attr({x:P[0]+w,y:P[1]+x})}if(o){var I=Cu(u);typeof I.setLabelText=="function"&&I.setLabelText(E)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,d=yC(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),h=d.current,p=d.stackedOnCurrent,v=d.next,g=d.stackedOnNext;if(o&&(p=ii(d.stackedOnCurrent,d.current,i,o,l),h=ii(d.current,null,i,o,l),g=ii(d.stackedOnNext,d.next,i,o,l),v=ii(d.next,null,i,o,l)),v4(h,v)>3e3||c&&v4(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=h;var m={shape:{points:v}};d.current!==h&&(m.shape.__points=d.next),u.stopAnimation(),Nt(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:p}),c.stopAnimation(),Nt(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=d.status,b=0;b<_.length;b++){var w=_[b].cmd;if(w==="="){var x=r.getItemGraphicEl(_[b].idx1);x&&y.push({el:x,ptIdx:b})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var T=u.shape.__points,L=0;L<y.length;L++){var M=y[L].el,C=y[L].ptIdx*2;M.x=T[C],M.y=T[C+1],M.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(Zt);function Rd(e,t){return{seriesType:e,plan:U0(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=ve(i.dimensions,function(h){return n.mapDimension(h)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");ro(n,s[0])&&(s[0]=u),ro(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),d=n.getDimensionIndex(s[1]);return l&&{progress:function(h,p){for(var v=h.end-h.start,g=o&&Sn(v*l),m=[],y=[],_=h.start,b=0;_<h.end;_++){var w=void 0;if(l===1){var x=c.get(f,_);w=i.dataToPoint(x,null,y)}else m[0]=c.get(f,_),m[1]=c.get(d,_),w=i.dataToPoint(m,null,y);o?(g[b++]=w[0],g[b++]=w[1]):p.setItemLayout(_,w.slice())}o&&p.setLayout("points",g)}}}}}}var NC={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},OC=function(e){return Math.round(e.length/2)};function _4(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/h)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/h));var p=void 0;we(a)?p=NC[a]:Le(a)&&(p=a),p&&t.setData(i.downSample(i.mapDimension(u.dim),1/h,p,OC))}}}}}function IC(e){e.registerChartView(PC),e.registerSeriesModel(pC),e.registerLayout(Rd("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,_4("line"))}var Vd=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)V(a.getAxes(),function(d,h){if(d.type==="category"&&n!=null){var p=d.getTicksCoords(),v=d.getTickModel().get("alignWithLabel"),g=o[h],m=n[h]==="x1"||n[h]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[h]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,b=1,w=0;w<p.length;w++){var x=p[w].coord,T=w===p.length-1?p[w-1].tickValue+b:p[w].tickValue;if(T===g){_=x;break}else if(T<g)y=x;else if(y!=null&&T>g){_=(x+y)/2;break}w===1&&(b=T-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[h]=d.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(or);or.registerClass(Vd);var BC=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return fc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=e2(Vd.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:Ae.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Vd),$C=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),b4=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new $C},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,d=n.clockwise,h=Math.PI*2,p=d?f-c<h:c-f<h;p||(c=f-(d?h:-h));var v=Math.cos(c),g=Math.sin(c),m=Math.cos(f),y=Math.sin(f);p?(r.moveTo(v*o+i,g*o+a),r.arc(v*u+i,g*u+a,l,-Math.PI+c,c,!d)):r.moveTo(v*s+i,g*s+a),r.arc(i,a,s,c,f,!d),r.arc(m*u+i,y*u+a,l,f-Math.PI*2,f-Math.PI,!d),o!==0&&r.arc(i,a,o,f,c,d)},t}(Fe);function RC(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Wl(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,d=u.r,h=u.r0,p=(d+h)/2,v=u.startAngle,g=u.endAngle,m=(v+g)/2,y=r?Math.abs(d-h)/2:0,_=Math.cos,b=Math.sin,w=c+d*_(v),x=f+d*b(v),T="left",L="top";switch(s){case"startArc":w=c+(h-l)*_(m),x=f+(h-l)*b(m),T="center",L="top";break;case"insideStartArc":w=c+(h+l)*_(m),x=f+(h+l)*b(m),T="center",L="bottom";break;case"startAngle":w=c+p*_(v)+bc(v,l+y,!1),x=f+p*b(v)+Sc(v,l+y,!1),T="right",L="middle";break;case"insideStartAngle":w=c+p*_(v)+bc(v,-l+y,!1),x=f+p*b(v)+Sc(v,-l+y,!1),T="left",L="middle";break;case"middle":w=c+p*_(m),x=f+p*b(m),T="center",L="middle";break;case"endArc":w=c+(d+l)*_(m),x=f+(d+l)*b(m),T="center",L="bottom";break;case"insideEndArc":w=c+(d-l)*_(m),x=f+(d-l)*b(m),T="center",L="top";break;case"endAngle":w=c+p*_(g)+bc(g,l+y,!0),x=f+p*b(g)+Sc(g,l+y,!0),T="left",L="middle";break;case"insideEndAngle":w=c+p*_(g)+bc(g,-l+y,!0),x=f+p*b(g)+Sc(g,-l+y,!0),T="right",L="middle";break;default:return Wl(n,i,a)}return n=n||{},n.x=w,n.y=x,n.align=T,n.verticalAlign=L,n}}function VC(e,t,r,n){if(Ke(n)){e.setTextConfig({rotation:n});return}else if(me(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function bc(e,t,r){return t*Math.sin(e)*(r?-1:1)}function Sc(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Ms(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;me(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:ve(n,function(a){return $n(a,i)})}}var zd=Math.max,Fd=Math.min;function zC(e,t){var r=e.getArea&&e.getArea();if(Bd(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var FC=function(e){fe(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&kt("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Lu(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var d=r.isAnimationEnabled()?r:null,h=HC(r,u);h&&this._enableRealtimeSort(h,s,i);var p=r.get("clip",!0)||h,v=zC(u,s);o.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),_=y.get("borderRadius")||0,b=[],w=this._backgroundEls,x=a&&a.isInitSort,T=a&&a.type==="changeAxisOrder";function L(E){var P=wc[u.type](s,E);if(!P)return null;var D=ZC(u,f,P);return D.useStyle(y.getItemStyle()),u.type==="cartesian2d"?D.setShape("r",_):D.setShape("cornerRadius",_),b[E]=D,D}s.diff(l).add(function(E){var P=s.getItemModel(E),D=wc[u.type](s,E,P);if(D&&(m&&L(E),!(!s.hasValue(E)||!L4[u.type](D)))){var k=!1;p&&(k=S4[u.type](v,D));var N=w4[u.type](r,s,E,D,f,d,c.model,!1,g);h&&(N.forceLabelAnimation=!0),M4(N,s,E,P,D,r,f,u.type==="polar"),x?N.attr({shape:D}):h?x4(h,d,N,D,E,f,!1,!1):qt(N,{shape:D},r,E),s.setItemGraphicEl(E,N),o.add(N),N.ignore=k}}).update(function(E,P){var D=s.getItemModel(E),k=wc[u.type](s,E,D);if(k){if(m){var N=void 0;w.length===0?N=L(P):(N=w[P],N.useStyle(y.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",_):N.setShape("cornerRadius",_),b[E]=N);var I=wc[u.type](s,E),O=k4(f,I,u);Nt(N,{shape:O},d,E)}var z=l.getItemGraphicEl(P);if(!s.hasValue(E)||!L4[u.type](k)){o.remove(z);return}var $=!1;p&&($=S4[u.type](v,k),$&&o.remove(z));var R=z&&(z.type==="sector"&&g||z.type==="sausage"&&!g);if(R&&(z&&jo(z,r,P),z=null),z?Qo(z):z=w4[u.type](r,s,E,k,f,d,c.model,!0,g),h&&(z.forceLabelAnimation=!0),T){var B=z.getTextContent();if(B){var H=Cu(B);H.prevValue!=null&&(H.prevValue=H.value)}}else M4(z,s,E,D,k,r,f,u.type==="polar");x?z.attr({shape:k}):h?x4(h,d,z,k,E,f,!0,T):Nt(z,{shape:k},r,E,null),s.setItemGraphicEl(E,z),z.ignore=$,o.add(z)}}).remove(function(E){var P=l.getItemGraphicEl(E);P&&jo(P,r,E)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new ht);M.removeAll();for(var C=0;C<b.length;++C)M.add(b[C]);o.add(M),this._backgroundEls=b,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),D4(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),D4(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&wC(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ve(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){jo(a,r,rt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Zt),S4={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=zd(t.x,e.x),s=Fd(t.x+t.width,i),l=zd(t.y,e.y),u=Fd(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>i?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var i=Fd(t.r,e.r),a=zd(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},w4={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new dt({shape:se({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?b4:Hn,c=new u({shape:n,z2:1});c.name="item";var f=E4(i);if(c.calculateTextPosition=RC(f,{isRoundCap:u===b4}),a){var d=c.shape,h=i?"r":"endAngle",p={};d[h]=i?n.r0:n.startAngle,p[h]=n[h],(s?Nt:qt)(c,{shape:p},a)}return c}};function HC(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&kt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&kt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function x4(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Nt:qt)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?Nt:qt)(r,{shape:u},c,i)}function T4(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var GC=["x","y","width","height"],WC=["cx","cy","r","startAngle","endAngle"],L4={cartesian2d:function(e){return!T4(e,GC)},polar:function(e){return!T4(e,WC)}},wc={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?UC(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function XC(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function E4(e){return function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(e)}function M4(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,f=Ms(n.getModel("itemStyle"),c,!0);se(c,f),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var d=n.getShallow("cursor");d&&e.attr("cursor",d);var h=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Fa(n);za(e,p,{labelFetcher:a,labelDataIndex:r,defaultText:Pd(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var v=e.getTextContent();if(s&&v){var g=n.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,VC(e,g==="outside"?h:g,E4(o),n.get(["label","rotate"]))}bx(v,p,a.getRawValue(r),function(y){return i4(t,y)});var m=n.getModel(["emphasis"]);Oa(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Ia(e,n),XC(i)&&(e.style.fill="none",e.style.stroke="none",V(e.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function UC(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var YC=function(){function e(){}return e}(),C4=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new YC},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(Fe);function D4(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new C4({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var f=new C4({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,rt(f).seriesIndex=e.seriesIndex,e.get("silent")||(f.on("mousedown",A4),f.on("mousemove",A4)),r&&r.push(f)}var A4=ly(function(e){var t=this,r=qC(t,e.offsetX,e.offsetY);rt(t).dataIndex=r>=0?r:null},30,!1);function qC(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c<f;c++){var d=c*3;if(l[n]=u,l[i]=a[d+2],s[n]=a[d+n],s[i]=a[d+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function k4(e,t,r){if(Bd(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function ZC(e,t,r){var n=e.type==="polar"?Hn:dt;return new n({shape:k4(t,r,e),silent:!0,z2:0})}function jC(e){e.registerChartView(FC),e.registerSeriesModel(BC),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Jt(wM,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,xM("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,_4("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var P4=Math.PI*2,xc=Math.PI/180;function QC(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=rT(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,d=-n.get("startAngle")*xc,h=n.get("endAngle"),p=n.get("padAngle")*xc;h=h==="auto"?d-P4:-h*xc;var v=n.get("minAngle")*xc,g=v+p,m=0;i.each(a,function(O){!isNaN(O)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,b=n.get("clockwise"),w=n.get("roseType"),x=n.get("stillShowZeroSum"),T=i.getDataExtent(a);T[0]=0;var L=b?1:-1,M=[d,h],C=L*p/2;$g(M,!b),d=M[0],h=M[1];var E=N4(n);E.startAngle=d,E.endAngle=h,E.clockwise=b,E.cx=s,E.cy=l,E.r=u,E.r0=c;var P=Math.abs(h-d),D=P,k=0,N=d;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(O,z){var $;if(isNaN(O)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:w?NaN:u});return}w!=="area"?$=y===0&&x?_:O*_:$=P/m,$<g?($=g,D-=g):k+=O;var R=N+L*$,B=0,H=0;p>$?(B=N+L*$/2,H=B):(B=N+C,H=R-C),i.setItemLayout(z,{angle:$,startAngle:B,endAngle:H,clockwise:b,cx:s,cy:l,r0:c,r:w?vh(O,T,[c,u]):u}),N=R}),D<P4&&m)if(D<=.001){var I=P/m;i.each(a,function(O,z){if(!isNaN(O)){var $=i.getItemLayout(z);$.angle=I;var R=0,B=0;I<p?(R=d+L*(z+1/2)*I,B=R):(R=d+L*z*I+C,B=d+L*(z+1)*I-C),$.startAngle=R,$.endAngle=B}})}else _=D/k,N=d,i.each(a,function(O,z){if(!isNaN(O)){var $=i.getItemLayout(z),R=$.angle===g?g:O*_,B=0,H=0;R<p?(B=N+L*R/2,H=B):(B=N+C,H=N+L*R-C),$.startAngle=B,$.endAngle=H,N+=L*R}})})}var N4=ut();function O4(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var KC=Math.PI/180;function I4(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(v){for(var g=v.rB,m=g*g,y=0;y<v.list.length;y++){var _=v.list[y],b=Math.abs(_.label.y-r),w=n+_.len,x=w*w,T=Math.sqrt(Math.abs((1-b*b/m)*x)),L=t+(T+_.len2)*i,M=L-_.label.x,C=_.targetTextWidth-M*i;B4(_,C,!0),_.label.x=L}}function f(v){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<v.length;y++)if(v[y].labelAlignTo==="none"){var _=v[y],b=_.label.y>r?m:g,w=Math.abs(_.label.y-r);if(w>=b.maxY){var x=_.label.x-t-_.len2*i,T=n+_.len,L=Math.abs(x)<T?Math.sqrt(w*w/(1-x*x/T/T)):T;b.rB=L,b.maxY=w}b.list.push(_)}c(g),c(m)}for(var d=e.length,h=0;h<d;h++)if(e[h].position==="outer"&&e[h].labelAlignTo==="labelLine"){var p=e[h].label.x-u;e[h].linePoints[1][0]+=p,e[h].label.x=u}hC(e,1,l,l+o)&&f(e)}function JC(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d<e.length;d++){var h=e[d].label;Hd(e[d])||(h.x<t?(c=Math.min(c,h.x),l.push(e[d])):(f=Math.max(f,h.x),u.push(e[d])))}for(var d=0;d<e.length;d++){var p=e[d];if(!Hd(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var h=p.label,v=p.linePoints,g=void 0;p.labelAlignTo==="edge"?h.x<t?g=v[2][0]-p.labelDistance-o-p.edgeDistance:g=o+i-p.edgeDistance-v[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?h.x<t?g=c-o-p.bleedMargin:g=o+i-f-p.bleedMargin:h.x<t?g=h.x-o-p.bleedMargin:g=o+i-h.x-p.bleedMargin,p.targetTextWidth=g,B4(p,g,!1)}}I4(u,t,r,n,1,i,a,o,s,f),I4(l,t,r,n,-1,i,a,o,s,c);for(var d=0;d<e.length;d++){var p=e[d];if(!Hd(p)&&p.linePoints){var h=p.label,v=p.linePoints,m=p.labelAlignTo==="edge",y=h.style.padding,_=y?y[1]+y[3]:0,b=h.style.backgroundColor?0:_,w=p.rect.width+b,x=v[1][0]-v[2][0];m?h.x<t?v[2][0]=o+p.edgeDistance+w+p.labelDistance:v[2][0]=o+i-p.edgeDistance-w-p.labelDistance:(h.x<t?v[2][0]=h.x+p.labelDistance:v[2][0]=h.x-p.labelDistance,v[1][0]=v[2][0]+x),v[1][1]=v[2][1]=h.y}}}function B4(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=t-l,h=t<c?d:r?d>e.unconstrainedWidth?null:d:null;n.setStyle("width",h)}$4(a,n)}}}function $4(e,t){R4.rect=e,t4(R4,t,eD)}var eD={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},R4={};function Hd(e){return e.position==="center"}function tD(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*KC,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var T in x.states)if(x.states[T].ignore===!1)return!0;return!1}t.each(function(x){var T=t.getItemGraphicEl(x),L=T.shape,M=T.getTextContent(),C=T.getTextGuideLine(),E=t.getItemModel(x),P=E.getModel("label"),D=P.get("position")||E.get(["emphasis","label","position"]),k=P.get("distanceToLabelLine"),N=P.get("alignTo"),I=tt(P.get("edgeDistance"),u),O=P.get("bleedMargin");O==null&&(O=Math.min(u,d)>200?10:2);var z=E.getModel("labelLine"),$=z.get("length");$=tt($,u);var R=z.get("length2");if(R=tt(R,u),Math.abs(L.endAngle-L.startAngle)<o){V(M.states,h),M.ignore=!0,C&&(V(C.states,h),C.ignore=!0);return}if(p(M)){var B=(L.startAngle+L.endAngle)/2,H=Math.cos(B),F=Math.sin(B),A,G,Z,Q;n=L.cx,i=L.cy;var q=D==="inside"||D==="inner";if(D==="center")A=L.cx,G=L.cy,Q="center";else{var W=(q?(L.r+L.r0)/2*H:L.r*H)+n,j=(q?(L.r+L.r0)/2*F:L.r*F)+i;if(A=W+H*3,G=j+F*3,!q){var Y=W+H*($+l-L.r),re=j+F*($+l-L.r),te=Y+(H<0?-1:1)*R,ne=re;N==="edge"?A=H<0?c+I:c+u-I:A=te+(H<0?-k:k),G=ne,Z=[[W,j],[Y,re],[te,ne]]}Q=q?"center":N==="edge"?H>0?"right":"left":H>0?"left":"right"}var ge=Math.PI,Se=0,ie=P.get("rotate");if(Ke(ie))Se=ie*(ge/180);else if(D==="center")Se=0;else if(ie==="radial"||ie===!0){var Ee=H<0?-B+ge:-B;Se=Ee}else if(ie==="tangential"&&D!=="outside"&&D!=="outer"){var K=Math.atan2(H,F);K<0&&(K=ge*2+K);var le=F>0;le&&(K=ge+K),Se=K-ge}if(a=!!Se,M.x=A,M.y=G,M.rotation=Se,M.setStyle({verticalAlign:"middle"}),q){M.setStyle({align:Q});var X=M.states.select;X&&(X.x+=M.x,X.y+=M.y)}else{var U=new Oe(0,0,0,0);$4(U,M),r.push({label:M,labelLine:C,position:D,len:$,len2:R,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new Ce(H,F),linePoints:Z,textAlign:Q,labelDistance:k,labelAlignTo:N,edgeDistance:I,bleedMargin:O,rect:U,unconstrainedWidth:U.width,labelStyleWidth:M.style.width})}T.setTextConfig({inside:q})}}),!a&&e.get("avoidLabelOverlap")&&JC(r,n,i,l,u,d,c,f);for(var v=0;v<r.length;v++){var g=r[v],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(V(m.states,h),m.ignore=!0);var b=m.states.select;b&&(b.x+=m.x,b.y+=m.y)}if(y){var w=g.linePoints;_||!w?(V(y.states,h),y.ignore=!0):(iC(w,g.minTurnAngle),aC(w,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new Ce(w[0][0],w[0][1])})}}}var rD=function(e){fe(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new ir;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=se(Ms(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var d=s.getShallow("animationType");s.ecModel.ssr?(qt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):d==="scale"?(o.shape.r=c.r0,qt(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),qt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,Nt(o,{shape:{endAngle:c.endAngle}},s,n))}else Qo(o),Nt(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Ia(o,l);var h=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),v=Math.cos(h)*p,g=Math.sin(h)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=se({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Ms(u.getModel("itemStyle"),c)),se(o.ensureState("select"),{x:v,y:g,shape:Ms(l.getModel(["select","itemStyle"]),c)}),se(o.ensureState("blur"),{shape:Ms(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&se(y.ensureState("select"),{x:v,y:g}),se(_.ensureState("select"),{x:v,y:g}),Oa(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;za(a,Fa(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var d=o.get(["label","position"]);if(d!=="outside"&&d!=="outer")a.removeTextGuideLine();else{var h=this.getTextGuideLine();h||(h=new $i,this.setTextGuideLine(h)),sC(this,lC(o),{stroke:u,opacity:un(s.get(["lineStyle","opacity"]),c,1)})}},t}(Hn),nD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var d=N4(r),h=new Hn({shape:Be(d)});h.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(p){var v=new rD(o,p,u);o.setItemGraphicEl(p,v),l.add(v)}).update(function(p,v){var g=s.getItemGraphicEl(v);g.updateData(o,p,u),g.off("click"),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);jo(v,r,p)}).execute(),tD(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(Zt);function V4(e,t,r){t=me(t)&&{coordDimensions:t}||se({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=S5(n,t).dimensions,a=new b5(i,e);return a.initData(n,r),a}var z4=function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e}(),iD=ut(),F4=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new z4(ot(this.getData,this),ot(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return V4(this,{coordDimensions:["value"],encodeDefaulter:Jt(cT,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=iD(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Ib(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){_h(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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}(or);Zx({fullType:F4.type,getCoord2:function(e){return e.getShallow("center")}});function aD(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Ke(o)&&!isNaN(o)&&o<0)})}}}function oD(e){e.registerChartView(nD),e.registerSeriesModel(F4),VL("pie",e.registerAction),e.registerLayout(Jt(QC,"pie")),e.registerProcessor(O4("pie")),e.registerProcessor(aD("pie"))}var sD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return fc(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],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:Ae.color.primary}},universalTransition:{divideShape:"clone"}},t}(or),H4=4,lD=function(){function e(){}return e}(),uD=function(e){fe(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new lD},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<H4,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var d=i[f++],h=i[f++];isNaN(d)||isNaN(h)||c&&!c.contain(d,h)||(s.x=d-a[0]/2,s.y=h-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,d=a[c+1]-l/2;if(r>=f&&n>=d&&r<=f+s&&n<=d+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,d=0;d<i.length;){var h=i[d++],p=i[d++];l=Math.min(h,l),c=Math.max(h,c),u=Math.min(p,u),f=Math.max(p,f)}r=this._rect=new Oe(l-o/2,u-s/2,c-l+o,f-u+s)}return r},t}(Fe),cD=function(){function e(){this.group=new ht}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new uD({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=qn(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<H4;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=rt(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(u.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),fD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Rd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new cD:new s4,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Zt),G4={left:0,right:0,top:0,bottom:0},Tc=["25%","25%"],hD=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=os(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Un(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Un(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:G4,outerBoundsContain:"all",outerBoundsClampWidth:Tc[0],outerBoundsClampHeight:Tc[1],backgroundColor:Ae.color.transparent,borderWidth:1,borderColor:Ae.color.neutral30},t}(Ye),Gd=function(e){fe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",pr).models[0]},t.type="cartesian2dAxis",t}(Ye);Cr(Gd,V5);var W4={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:Ae.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:Ae.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Ae.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Ae.color.backgroundTint,Ae.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Ae.color.neutral00,borderColor:Ae.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},dD=je({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},W4),Wd=je({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Ae.color.axisMinorSplitLine,width:1}}},W4),pD=je({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Wd),vD=Re({logBase:10},Wd);const X4={category:dD,value:Wd,time:pD,log:vD};var gD={value:1,category:1,time:1,log:1},mD=null;function U4(){return mD}function Y4(e,t,r,n){V(gD,function(i,a){var o=je(je({},X4[a],!0),n,!0),s=function(l){fe(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=as(this),h=d?os(c):{},p=f.getTheme();je(c,p.get(a+"Axis")),je(c,this.getDefaultOption()),c.type=q4(c),d&&Un(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=wd.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=U4();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",q4)}function q4(e){return e.type||(e.data?"category":"value")}var yD=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return ve(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),vt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e}(),Xd=["x","y"];function Z4(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var _D=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=Xd,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Z4(r)||!Z4(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-i[0]*c,h=o[1]-a[0]*f,p=this._transform=[c,0,0,f,d,h];this._invTransform=So([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return fr(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return fr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Oe(a,o,s,l)},t}(yD),bD=function(e){fe(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t}(Z5),SD="expandAxisBreak",ai=Math.PI,wD=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],xD=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Cs=ut(),j4=ut(),Q4=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function TD(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=Yd(e.axisName)&&no(e.nameLocation);V(n,function(p){var v=ti(p);if(!(!v||v.label.ignore)){o.push(v);var g=a.transGroup;l&&(g.transform?So(Ds,g.transform):Cf(Ds),v.transform&&bo(Ds,Ds,v.transform),Oe.copy(Lc,v.localRect),Lc.applyTransform(Ds),s?s.union(Lc):Oe.copy(s=new Oe(0,0,0,0),Lc))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,v){return Math.abs(p.label[u]-c)-Math.abs(v.label[u]-c)}),l&&s){var f=i.getExtent(),d=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-d;s.union(new Oe(d,0,h,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Ds=Pn(),Lc=new Oe(0,0,0,0),K4=function(e,t,r,n,i,a){if(no(e.nameLocation)){var o=a.stOccupiedRect;o&&J4(cC({},o,a.transGroup.transform),n,i)}else e_(a.labelInfoList,a.dirVec,n,i)};function J4(e,t,r){var n=new Ce;kd(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&fC(t,n)}function e_(e,t,r,n){for(var i=Ce.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||J4(s,r,n)}}var Ki=function(){function e(t,r,n,i){this.group=new ht,this._axisModel=t,this._api=r,this._local={},this._shared=i||new Q4(K4),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){if(process.env.NODE_ENV!=="production"){var r=this._shared.ensureRecord(this._axisModel).ready;be(!r.axisLine&&!r.axisTickLabelDetermine),r.axisName=r.axisTickLabelEstimate=!1}var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},i=ye(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=ye(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:ye(t.nameDirection,1),tickDirection:ye(t.tickDirection,1),labelDirection:ye(t.labelDirection,1),labelOffset:ye(t.labelOffset,0),silent:ye(t.silent,!0),axisName:i,nameLocation:un(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:Yd(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(be(o.position!=null),be(o.rotation!=null)),this._cfg=o;var s=new ht({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Ce(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),V(LD,function(i){t[i]&&ED[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=sg(r-t),a,o;return Yl(i)?(o=n>0?"top":"bottom",a="center"):Yl(i-ai)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ai?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e}(),LD=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],ED={axisLine:function(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"){var s=r.ensureRecord(n).ready;be(!s.axisLine),s.axisLine=!0}var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var u=n.axis.getExtent(),c=a.transform,f=[u[0],0],d=[u[1],0],h=f[0]>d[0];c&&(fr(f,f,c),fr(d,d,c));var p=se({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())U4().buildAxisBreakLine(n,i,a,v);else{var g=new Gn(se({shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]}},v));Ko(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);we(m)&&(m=[m,m]),(we(y)||Ke(y))&&(y=[y,y]);var _=Sy(n.get(["axisLine","symbolOffset"])||0,y),b=y[0],w=y[1];V([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1]))}],function(x,T){if(m[T]!=="none"&&m[T]!=null){var L=qn(m[T],-b/2,-w/2,b,w,p.stroke,!0),M=x.r+x.offset,C=h?d:f;L.attr({rotation:x.rotate,x:C[0]+M*Math.cos(e.rotation),y:C[1]-M*Math.sin(e.rotation),silent:!0,z2:11}),i.add(L)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;be(!l.axisTickLabelDetermine),l.axisTickLabelEstimate=!0}var u=n_(t,i,s);u&&t_(e,t,r,n,i,a,o,$r.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){if(process.env.NODE_ENV!=="production"){var l=r.ensureRecord(n).ready;l.axisTickLabelDetermine=!0}var u=n_(t,i,s);u&&t_(e,t,r,n,i,a,o,$r.determine);var c=AD(e,i,a,n);DD(e,t.labelLayoutList,c),kD(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);if(process.env.NODE_ENV!=="production"){var u=l.ready;be(u.axisTickLabelEstimate||u.axisTickLabelDetermine),u.axisName=!0}t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var c=e.axisName;if(Yd(c)){var f=e.nameLocation,d=e.nameDirection,h=n.getModel("nameTextStyle"),p=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Ce(0,0),y=new Ce(0,0);f==="start"?(m.x=v[0]-g*p,y.x=-g):f==="end"?(m.x=v[1]+g*p,y.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+d*p,y.y=d);var _=Pn();y.transform(u1(_,_,e.rotation));var b=n.get("nameRotate");b!=null&&(b=b*ai/180);var w,x;no(f)?w=Ki.innerTextLayout(e.rotation,b??e.rotation,d):(w=MD(e.rotation,f,b||0,v),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(w.rotation)),!isFinite(x)&&(x=null)));var T=h.getFont(),L=n.get("nameTruncate",!0)||{},M=L.ellipsis,C=pa(e.raw.nameTruncateMaxWidth,L.maxWidth,x),E=s.nameMarginLevel||0,P=new ir({x:m.x,y:m.y,rotation:w.rotation,silent:Ki.isLabelSilent(n),style:es(h,{text:c,font:T,overflow:"truncate",width:C,ellipsis:M,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||w.textAlign,verticalAlign:h.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(Tu({el:P,componentModel:n,itemName:c}),P.__fullText=c,P.anid="name",n.get("triggerEvent")){var D=Ki.makeAxisEventDataBase(n);D.targetType="axisName",D.name=c,rt(P).eventData=D}a.add(P),P.updateTransform(),t.nameEl=P;var k=l.nameLayout=ti({label:P,priority:P.z2,defaultAttr:{ignore:P.ignore},marginDefault:no(f)?wD[E]:xD[E]});if(l.nameLocation=f,i.add(P),P.decomposeTransform(),e.shouldNameMoveOverlap&&k){var N=r.ensureRecord(n);process.env.NODE_ENV!=="production"&&be(N.labelInfoList),r.resolveAxisNameOverlap(e,r,n,k,y,N)}}}};function t_(e,t,r,n,i,a,o,s){i_(t)||PD(e,t,i,s,n,o);var l=t.labelLayoutList;ND(e,n,l,a),e.rotation;var u=e.optionHideOverlap;CD(n,l,u),u&&dC(vt(l,function(c){return c&&!c.label.ignore})),TD(e,r,n,l)}function MD(e,t,r,n){var i=sg(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Yl(i-ai/2)?(o=l?"bottom":"top",a="center"):Yl(i-ai*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<ai*1.5&&i>ai/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function CD(e,t,r){if($5(e.axis))return;function n(s,l,u){var c=ti(t[l]),f=ti(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){As(c.label);return}if(f.suggestIgnore){As(f.label);return}var d=.1;if(!r){var h=[0,0,0,0];c=r4({marginForce:h},c),f=r4({marginForce:h},f)}kd(c,f,null,{touchThreshold:d})&&As(s?f.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function DD(e,t,r){e.showMinorTicks||V(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=j4(a),s=Cs(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){As(a);return}}})}function As(e){e&&(e.ignore=!0)}function r_(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(fr(o,o,t),fr(s,s,t));var c=new Gn({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Ko(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var f=j4(c);f.onBand=!!e[l].onBand,f.tickValue=e[l].tickValue}return a}function AD(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=r_(u,r.transform,l,Re(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function kD(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Re(l.getLineStyle(),Re(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var d=r_(s[f],r.transform,u,c,"minorticks_"+f),h=0;h<d.length;h++)t.add(d[h])}}function n_(e,t,r){if(i_(e)){var n=e.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&be(e.labelGroup&&n);var i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),Ud(e,null,null,null))}return!0}function PD(e,t,r,n,i,a){var o=i.axis,s=pa(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new ht;r.add(l);var u=gc(n);if(!s||o.scale.isBlank()){Ud(t,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),d=(pa(e.raw.labelRotate,c.get("rotate"))||0)*ai/180,h=Ki.innerTextLayout(e.rotation,d,e.labelDirection),p=i.getCategories&&i.getCategories(!0),v=[],g=i.get("triggerEvent"),m=1/0,y=-1/0;V(f,function(b,w){var x,T=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(b.tickValue):b.tickValue,L=b.formattedLabel,M=b.rawLabel,C=c;if(p&&p[T]){var E=p[T];xe(E)&&E.textStyle&&(C=new mt(E.textStyle,c,i.ecModel))}var P=C.getTextColor()||i.get(["axisLine","lineStyle","color"]),D=C.getShallow("align",!0)||h.textAlign,k=ye(C.getShallow("alignMinLabel",!0),D),N=ye(C.getShallow("alignMaxLabel",!0),D),I=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||h.textVerticalAlign,O=ye(C.getShallow("verticalAlignMinLabel",!0),I),z=ye(C.getShallow("verticalAlignMaxLabel",!0),I),$=10+(((x=b.time)===null||x===void 0?void 0:x.level)||0);m=Math.min(m,$),y=Math.max(y,$);var R=new ir({x:0,y:0,rotation:0,silent:Ki.isLabelSilent(i),z2:$,style:es(C,{text:L,align:w===0?k:w===f.length-1?N:D,verticalAlign:w===0?O:w===f.length-1?z:I,fill:Le(P)?P(o.type==="category"?M:o.type==="value"?T+"":T,w):P})});R.anid="label_"+T;var B=Cs(R);if(B.break=b.break,B.tickValue=T,B.layoutRotation=h.rotation,Tu({el:R,componentModel:i,itemName:L,formatterParamsExtra:{isTruncated:function(){return R.isTruncated},value:M,tickIndex:w}}),g){var H=Ki.makeAxisEventDataBase(i);H.targetType="axisLabel",H.value=M,H.tickIndex=w,b.break&&(H.break={start:b.break.parsedBreak.vmin,end:b.break.parsedBreak.vmax}),o.type==="category"&&(H.dataIndex=T),rt(R).eventData=H,b.break&&ID(i,a,R,b.break)}v.push(R),l.add(R)});var _=ve(v,function(b){return{label:b,priority:Cs(b).break?b.z2+(y-m+1):b.z2,defaultAttr:{ignore:b.ignore}}});Ud(t,_,l,u)}function i_(e){return!!e.labelLayoutList}function Ud(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function ND(e,t,r,n){var i=t.get(["axisLabel","margin"]);V(r,function(a,o){var s=ti(a);if(s){var l=s.label,u=Cs(l);s.suggestIgnore=l.ignore,l.ignore=!1,Hl(wn,OD),wn.x=t.axis.dataToCoord(u.tickValue),wn.y=e.labelOffset+e.labelDirection*i,wn.rotation=u.layoutRotation,n.add(wn),wn.updateTransform(),n.remove(wn),wn.decomposeTransform(),Hl(l,wn),l.markRedraw(),_c(s,!0),ti(s)}})}var wn=new dt,OD=new dt;function Yd(e){return!!e}function ID(e,t,r,n){r.on("click",function(i){var a={type:SD,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function yI(e,t,r){}const a_=Ki;function o_(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,d=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var h=a.toGlobalCoord(a.dataToCoord(0));d[c.onZero]=Math.max(Math.min(h,d[1]),d[0])}i.position=[l==="y"?d[c[s]]:u[0],l==="x"?d[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=p[o],i.labelOffset=a?d[c[o]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),pa(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var v=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-v:v,i.z2=1,i}function BD(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function s_(e){var t={xAxisModel:null,yAxisModel:null};return V(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,pr).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+un(e.get(i+"Index"),e.get(i+"Id"),0)+'" not found');t[n]=a}),t}function $D(e,t,r,n,i,a){for(var o=o_(e,r),s=!1,l=!1,u=0;u<t.length;u++)yd(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new a_(r,n,o,i)}function RD(e,t,r){var n=o_(t,r);if(process.env.NODE_ENV!=="production"){var i=e.__getRawCfg();V(Ve(n),function(a){a!=="position"&&a!=="labelOffset"&&be(n[a]===i[a])})}e.updateCfg(n)}function l_(e,t,r){var n,i=Kn.prototype,a=i.getTicks.call(r),o=i.getTicks.call(r,{expandToNicedExtent:!0}),s=a.length-1,l=i.getInterval.call(r),u=O5(e,t),c=u.extent,f=u.fixMin,d=u.fixMax;e.type==="log"&&(c=Sd(e.base,c,!0)),e.setBreaksFromOption(R5(t)),e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:s,fixMin:f,fixMax:d});var h=i.getExtent.call(e);f&&(c[0]=h[0]),d&&(c[1]=h[1]);var p=i.getInterval.call(e),v=c[0],g=c[1];if(f&&d)p=(g-v)/s;else if(f)for(g=c[0]+p*s;g<c[1]&&isFinite(g)&&isFinite(c[1]);)p=_d(p),g=c[0]+p*s;else if(d)for(v=c[1]-p*s;v>c[0]&&isFinite(v)&&isFinite(c[0]);)p=_d(p),v=c[1]-p*s;else{var m=e.getTicks().length-1;m>s&&(p=_d(p));var y=p*s;g=Math.ceil(c[1]/p)*p,v=Lt(g-y),v<0&&c[0]>=0?(v=0,g=Lt(y)):g>0&&c[1]<=0&&(g=0,v=-Lt(y))}var _=(a[0].value-o[0].value)/l,b=(a[s].value-o[s].value)/l;if(i.setExtent.call(e,v+p*_,g+p*b),i.setInterval.call(e,p),(_||b)&&i.setNiceExtent.call(e,v+p,g-p),process.env.NODE_ENV!=="production"){var w=i.getTicks.call(e);w[1]&&(!fM(p)||mh(w[1].value)>mh(p))&&kt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+(" and alignTicks: true. ("+((n=t.axis)===null||n===void 0?void 0:n.dim)+"AxisIndex: "+t.componentIndex+")"),!0)}}var u_=[[3,1],[0,2]],VD=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Xd,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Ve(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],p=h.model,v=h.scale;yd(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(h):(I5(v,p),yd(v)&&(s=h))}c.length&&(s||(s=c.pop(),I5(s.scale,s.model)),V(c,function(g){l_(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};V(n.x,function(o){c_(n,"y",o,a)}),V(n.y,function(o){c_(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=Vu(t,r),a=this._rect=Wa(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(Zd(o,a),!n){var u=FD(a,s,o,l,r),c=void 0;if(l)d_?(d_(this._axesList,a),Zd(o,a)):(process.env.NODE_ENV!=="production"&&dg("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=p_(a.clone(),"axisLabel",null,a,o,u,i));else{var f=HD(t,a,i),d=f.outerBoundsRect,h=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;d&&(c=p_(d,h,p,a,o,u,i))}v_(a,o,$r.determine,null,c,i)}V(this._coordsList,function(v){v.calcAffineTransform()})},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}xe(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",pr).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",pr).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,Qe(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,V(s.x,function(c,f){V(s.y,function(d,h){var p="x"+f+"y"+h,v=new _D(p);v.master=i,v.model=t,i._coordsMap[p]=v,i._coordsList.push(v),v.addAxis(c),v.addAxis(d)})});function u(c){return function(f,d){if(qd(f,t)){var h=f.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=o.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=o.left?"right":"left"),o[h]=!0;var p=new bD(c,FM(f),[0,0],f.get("type"),h),v=p.type==="category";p.onBand=v&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.grid=a,p.index=d,a._axesList.push(p),s[c][d]=p,l[c]++}}}},e.prototype._updateScale=function(t,r){V(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(BD(i)){var a=s_(i),o=a.xAxisModel,s=a.yAxisModel;if(!qd(o,r)||!qd(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){V(GM(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return V(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);Qe(r,a)<0&&r.push(a),Qe(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){Kx({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=s_(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+un(s.get("gridIndex"),s.get("gridId"),0)+'" not found');if(s.getCoordSysModel()!==l.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=Xd,e}();function qd(e,t){return e.getCoordSysModel()===t}function c_(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)f_(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&f_(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function f_(e){return e&&e.type!=="category"&&e.type!=="time"&&HM(e)}function zD(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function Zd(e,t){V(e.x,function(r){return h_(r,t.x,t.width)}),V(e.y,function(r){return h_(r,t.y,t.height)})}function h_(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),zD(e,t)}var d_;function p_(e,t,r,n,i,a,o){process.env.NODE_ENV!=="production"&&be(t==="all"||t==="axisLabel"),v_(n,i,$r.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=Qv(s,function(d){return d>0})==null;return xu(n,s,!0,!0,r),Zd(i,n),l;function u(d){V(i[Wn[d]],function(h){if(Ls(h.model)){var p=a.ensureRecord(h.model),v=p.labelInfoList;if(v)for(var g=0;g<v.length;g++){var m=v[g],y=h.scale.normalize(Cs(m.label).tickValue);y=d===1?1-y:y,c(m.rect,d,y),c(m.rect,1-d,NaN)}var _=p.nameLayout;if(_){var y=no(p.nameLocation)?.5:NaN;c(_.rect,d,y),c(_.rect,1-d,NaN)}}})}function c(d,h,p){var v=e[Wn[h]]-d[Wn[h]],g=d[Va[h]]+d[Wn[h]]-(e[Va[h]]+e[Wn[h]]);v=f(v,1-p),g=f(g,p);var m=u_[h][0],y=u_[h][1];s[m]=rr(s[m],v),s[y]=rr(s[y],g)}function f(d,h){return d>0&&!da(h)&&h>1e-4&&(d/=h),d}}function FD(e,t,r,n,i){var a=new Q4(GD);return V(r,function(o){return V(o,function(s){if(Ls(s.model)){var l=!n;s.axisBuilder=$D(e,t,s.model,i,a,l)}})}),a}function v_(e,t,r,n,i,a){var o=r===$r.determine;V(t,function(u){return V(u,function(c){Ls(c.model)&&(RD(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Wn[1-u]]=e[Va[u]]<=a.refContainer[Va[u]]*.5?0:1-u===1?2:1}V(t,function(u,c){return V(u,function(f){Ls(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function HD(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():i==null||i==="auto"?n=Wa(e.get("outerBounds",!0)||G4,r.refContainer):i!=="none"&&process.env.NODE_ENV!=="production"&&Ue("Invalid grid["+e.componentIndex+"].outerBoundsMode.");var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"?o="all":Qe(["all","axisLabel"],a)<0?(process.env.NODE_ENV!=="production"&&Ue("Invalid grid["+e.componentIndex+"].outerBoundsContain."),o="all"):o=a;var s=[gh(ye(e.get("outerBoundsClampWidth",!0),Tc[0]),t.width),gh(ye(e.get("outerBoundsClampHeight",!0),Tc[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var GD=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";K4(e,t,r,n,i,a),no(e.nameLocation)||V(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&e_(s.labelInfoList,s.dirVec,n,i)})};function WD(e){var t=g_(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=UD(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function g_(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[YD(e)]}function XD(e){var t=g_(e);return t&&t.axisPointerModel}function UD(e){return!!e.get(["handle","show"])}function YD(e){return e.type+"||"+e.id}var jd={},qD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i,a){this.axisPointerClass&&WD(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=XD(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&jd[r])throw new Error("axisPointer "+r+" exists");jd[r]=n},t.getAxisPointerClass=function(r){return r&&jd[r]},t.type="axis",t}(_n),Qd=ut();function ZD(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=Qd(e).splitAreaColors,d=Ne(),h=0;if(f)for(var p=0;p<u.length;p++){var v=f.get(u[p].tickValue);if(v!=null){h=(v+(c-1)*p)%c;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=me(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,b=void 0,w=void 0,x=void 0;i.isHorizontal()?(_=g,b=l.y,w=y-_,x=l.height,g=_+w):(_=l.x,b=g,w=l.width,x=y-b,g=b+x);var T=u[p-1].tickValue;T!=null&&d.set(T,h),t.add(new dt({anid:T!=null?"area_"+T:null,shape:{x:_,y:b,width:w,height:x},style:Re({fill:s[h]},m),autoBatch:!0,silent:!0})),h=(h+1)%c}Qd(e).splitAreaColors=d}}}function jD(e){Qd(e).splitAreaColors=null}var QD=["splitArea","splitLine","minorSplitLine","breakArea"],m_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ht,this.group.add(this._axisGroup),!!Ls(r)){this._axisGroup.add(r.axis.axisBuilder.group),V(QD,function(l){r.get([l,"show"])&&KD[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||Vm(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){jD(this)},t.type="cartesianAxis",t}(qD),KD={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=me(l)?l:[l];for(var f=n.coordinateSystem.getRect(),d=a.isHorizontal(),h=0,p=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),v=[],g=[],m=s.getLineStyle(),y=0;y<p.length;y++){var _=a.toGlobalCoord(p[y].coord);if(!(y===0&&!u||y===p.length-1&&!c)){var b=p[y].tickValue;d?(v[0]=_,v[1]=f.y,g[0]=_,g[1]=f.y+f.height):(v[0]=f.x,v[1]=_,g[0]=f.x+f.width,g[1]=_);var w=h++%l.length,x=new Gn({anid:b!=null?"line_"+b:null,autoBatch:!0,shape:{x1:v[0],y1:v[1],x2:g[0],y2:g[1]},style:Re({stroke:l[w]},m),silent:!0});Ko(x.shape,m.lineWidth),t.add(x)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],d=[],h=s.getLineStyle(),p=0;p<c.length;p++)for(var v=0;v<c[p].length;v++){var g=a.toGlobalCoord(c[p][v].coord);u?(f[0]=g,f[1]=l.y,d[0]=g,d[1]=l.y+l.height):(f[0]=l.x,f[1]=g,d[0]=l.x+l.width,d[1]=g);var m=new Gn({anid:"minor_line_"+c[p][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:d[0],y2:d[1]},style:h,silent:!0});Ko(m.shape,h.lineWidth),t.add(m)}},splitArea:function(e,t,r,n,i){ZD(e,t,r,n)},breakArea:function(e,t,r,n,i){r.axis.scale}},y_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(m_),JD=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=y_.type,r}return t.type="yAxis",t}(m_),eA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new dt({shape:r.coordinateSystem.getRect(),style:Re({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(_n),__={offset:0};function tA(e){e.registerComponentView(eA),e.registerComponentModel(hD),e.registerCoordinateSystem("cartesian2d",VD),Y4(e,"x",Gd,__),Y4(e,"y",Gd,__),e.registerComponentView(y_),e.registerComponentView(JD),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function rA(e){ji(tA),e.registerSeriesModel(sD),e.registerChartView(fD),e.registerLayout(Rd("scatter"))}function nA(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();V(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=b_(c)?c:S_(i)})}),r.each(function(o){var s=Qv(n[o],function(l){return b_(l)})||S_(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function b_(e){return!isNaN(e[0])&&!isNaN(e[1])}function S_(e){return[e.cx,e.cy]}function iA(e){var t=e.polar;if(t){me(t)||(t=[t]);var r=[];V(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],me(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}V(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var aA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(d,h){var p=d.getItemVisual(h,"symbol")||"circle";if(p!=="none"){var v=by(d.getItemVisual(h,"symbolSize")),g=qn(p,-1,-1,2,2),m=d.getItemVisual(h,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:v[0]/2,scaleY:v[1]/2,rotation:m*Math.PI/180||0}),g}}function c(d,h,p,v,g,m){p.removeAll();for(var y=0;y<h.length-1;y++){var _=u(v,g);_&&(_.__dimIdx=y,d[y]?(_.setPosition(d[y]),vx[m?"initProps":"updateProps"](_,{x:h[y][0],y:h[y][1]},r,g)):_.setPosition(h[y]),p.add(_))}}function f(d){return ve(d,function(h){return[a.cx,a.cy]})}s.diff(l).add(function(d){var h=s.getItemLayout(d);if(h){var p=new qo,v=new $i,g={shape:{points:h}};p.shape.points=f(h),v.shape.points=f(h),qt(p,g,r,d),qt(v,g,r,d);var m=new ht,y=new ht;m.add(v),m.add(p),m.add(y),c(v.shape.points,h,y,s,d,!0),s.setItemGraphicEl(d,m)}}).update(function(d,h){var p=l.getItemGraphicEl(h),v=p.childAt(0),g=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(d)}};y.shape.points&&(c(v.shape.points,y.shape.points,m,s,d,!1),Qo(g),Qo(v),Nt(v,y,r),Nt(g,y,r),s.setItemGraphicEl(d,p))}).remove(function(d){o.remove(l.getItemGraphicEl(d))}).execute(),s.eachItemGraphicEl(function(d,h){var p=s.getItemModel(h),v=d.childAt(0),g=d.childAt(1),m=d.childAt(2),y=s.getItemVisual(h,"style"),_=y.fill;o.add(d),v.useStyle(Re(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Ia(v,p,"lineStyle"),Ia(g,p,"areaStyle");var b=p.getModel("areaStyle"),w=b.isEmpty()&&b.parentModel.isEmpty();g.ignore=w,V(["emphasis","select","blur"],function(T){var L=p.getModel([T,"areaStyle"]),M=L.isEmpty()&&L.parentModel.isEmpty();g.ensureState(T).ignore=M&&w;var C=p.getModel([T,"lineStyle"]).getLineStyle();v.ensureState(T).style=C;var E=L.getAreaStyle();g.ensureState(T).style=E;var P=p.getModel([T,"itemStyle"]).getItemStyle();m.eachChild(function(D){D.ensureState(T).style=Be(P)})}),g.useStyle(Re(p.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var x=p.getModel("emphasis");m.eachChild(function(T){if(T instanceof Pr){var L=T.style;T.useStyle(se({image:L.image,x:L.x,y:L.y,width:L.width,height:L.height},y))}else T.useStyle(y),T.setColor(_),T.style.strokeNoScale=!0;var M=s.getStore().get(s.getDimensionIndex(T.__dimIdx),h);(M==null||isNaN(M))&&(M=""),za(T,Fa(p),{labelFetcher:s.hostModel,labelDataIndex:h,labelDimIndex:T.__dimIdx,defaultText:M,inheritColor:_,defaultOpacity:y.opacity})}),Oa(d,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(Zt),oA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new z4(ot(this.getData,this),ot(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return V4(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=ry(this,r);return ds("section",{header:u,sortBlocks:!0,blocks:ve(s,function(f){var d=a.get(a.mapDimension(f.dim),r);return ds("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:d,sortParam:d})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(ve(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(or),ks=X4.value;function Ec(e,t){return Re({show:t},e)}var sA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),d=this.get("triggerEvent"),h=ve(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var v=l;p.color!=null&&(v=Re({color:p.color},l));var g=je(Be(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:v,triggerEvent:d},!1);if(we(c)){var m=g.name;g.name=c.replace("{value}",m??"")}else Le(c)&&(g.name=c(g.name,g));var y=new mt(g,null,this.ecModel);return Cr(y,V5.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:"50%",startAngle:90,axisName:{show:!0,color:Ae.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:je({lineStyle:{color:Ae.color.neutral20}},ks.axisLine),axisLabel:Ec(ks.axisLabel,!1),axisTick:Ec(ks.axisTick,!1),splitLine:Ec(ks.splitLine,!0),splitArea:Ec(ks.splitArea,!0),indicator:[]},t}(Ye),lA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=ve(a,function(s){var l=s.model.get("showName")?s.name:"",u=new a_(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});V(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),d=l.get("color"),h=u.get("color"),p=me(d)?d:[d],v=me(h)?h:[h],g=[],m=[];function y(N,I,O){var z=O%I.length;return N[z]=N[z]||[],z}if(a==="circle")for(var _=i[0].getTicksCoords(),b=n.cx,w=n.cy,x=0;x<_.length;x++){if(c){var T=y(g,p,x);g[T].push(new Xo({shape:{cx:b,cy:w,r:_[x].coord}}))}if(f&&x<_.length-1){var T=y(m,v,x);m[T].push(new mu({shape:{cx:b,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var L,M=ve(i,function(N,I){var O=N.getTicksCoords();return L=L==null?O.length-1:Math.min(O.length-1,L),ve(O,function(z){return n.coordToPoint(z.coord,I)})}),C=[],x=0;x<=L;x++){for(var E=[],P=0;P<i.length;P++)E.push(M[P][x]);if(E[0]?E.push(E[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+x),c){var T=y(g,p,x);g[T].push(new $i({shape:{points:E}}))}if(f&&C){var T=y(m,v,x-1);m[T].push(new qo({shape:{points:E.concat(C)}}))}C=E.slice().reverse()}var D=l.getLineStyle(),k=u.getAreaStyle();V(m,function(N,I){this.group.add(s0(N,{style:Re({stroke:"none",fill:v[I%v.length]},k),silent:!0}))},this),V(g,function(N,I){this.group.add(s0(N,{style:Re({fill:"none",stroke:p[I%p.length]},D),silent:!0}))},this)},t.type="radar",t}(_n),uA=function(e){fe(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(Z5),cA=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=ve(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new uA(o,new Kn);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=Vu(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=tt(i[0],n.width)+n.x,this.cy=tt(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(we(o)||Ke(o))&&(o=[0,o]),this.r0=tt(o[0],a),this.r=tt(o[1],a),V(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;V(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();V(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Kn;o.setExtent(0,a),o.setInterval(1),V(n,function(s,l){l_(s.scale,s.model,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function fA(e){e.registerCoordinateSystem("radar",cA),e.registerComponentModel(sA),e.registerComponentView(lA),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function hA(e){ji(fA),e.registerChartView(aA),e.registerSeriesModel(oA),e.registerLayout(nA),e.registerProcessor(O4("radar")),e.registerPreprocessor(iA)}function dA(e,t){var r=d2(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new dt({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var pA=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},Kd=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),me(n)&&V(n,function(a,o){we(a)&&(a={type:a}),n[o]=je(a,pA(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,d=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(d)),d.length?n=n.concat(d):c=!0}else c=!0;c&&bh(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ne(),s=ve(a,function(l){return(we(l)||Ke(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new mt(l,this,this.ecModel))},this);this._data=vt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;V(a,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;V(r,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;V(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&Qe(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:Ae.size.m,align:"auto",backgroundColor:Ae.color.transparent,borderColor:Ae.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Ae.color.disabled,inactiveBorderColor:Ae.color.disabled,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:Ae.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Ae.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Ae.color.tertiary,borderWidth:1,borderColor:Ae.color.border},emphasis:{selectorLabel:{show:!0,color:Ae.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Ye),io=Jt,Jd=V,Mc=ht,w_=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Mc),this.group.add(this._selectorGroup=new Mc),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=Vu(r,i).refContainer,f=r.getBoxLayoutParams(),d=r.get("padding"),h=Wa(f,c,d),p=this.layoutInner(r,o,h,a,l,u),v=Wa(Re({width:p.width,height:p.height},f),c,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=dA(p,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=Ne(),f=n.get("selectedMode"),d=n.get("triggerEvent"),h=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&h.push(p.id)}),Jd(n.getData(),function(p,v){var g=this,m=p.get("name");if(!this.newlineDisabled&&(m===""||m===`
|
|
38
38
|
`)){var y=new Mc;y.newline=!0,u.add(y);return}var _=i.getSeriesByName(m)[0];if(!c.get(m)){if(_){var b=_.getData(),w=b.getVisual("legendLineStyle")||{},x=b.getVisual("legendIcon"),T=b.getVisual("style"),L=this._createItem(_,m,v,p,n,r,w,T,x,f,a);L.on("click",io(x_,m,null,a,h)).on("mouseover",io(ep,_.name,null,a,h)).on("mouseout",io(tp,_.name,null,a,h)),i.ssr&&L.eachChild(function(M){var C=rt(M);C.seriesIndex=_.seriesIndex,C.dataIndex=v,C.ssrType="legend"}),d&&L.eachChild(function(M){g.packEventData(M,n,_,v,m)}),c.set(m,!0)}else i.eachRawSeries(function(M){var C=this;if(!c.get(m)&&M.legendVisualProvider){var E=M.legendVisualProvider;if(!E.containName(m))return;var P=E.indexOfName(m),D=E.getItemVisual(P,"style"),k=E.getItemVisual(P,"legendIcon"),N=Ar(D.fill);N&&N[3]===0&&(N[3]=.2,D=se(se({},D),{fill:Co(N,"rgba")}));var I=this._createItem(M,m,v,p,n,r,{},D,k,f,a);I.on("click",io(x_,null,m,a,h)).on("mouseover",io(ep,null,m,a,h)).on("mouseout",io(tp,null,m,a,h)),i.ssr&&I.eachChild(function(O){var z=rt(O);z.seriesIndex=M.seriesIndex,z.dataIndex=v,z.ssrType="legend"}),d&&I.eachChild(function(O){C.packEventData(O,n,M,v,m)}),c.set(m,!0)}},this);process.env.NODE_ENV!=="production"&&(c.get(m)||console.warn(m+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};rt(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();Jd(r,function(u){var c=u.type,f=new ir({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);za(f,{normal:d,emphasis:h},{defaultText:u.title}),jh(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,d){var h=r.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var b=vA(c,a,l,u,h,g,d),w=new Mc,x=a.getModel("textStyle");if(Le(r.getLegendIcon)&&(!_||_==="inherit"))w.add(r.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var T=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;w.add(gA({itemWidth:p,itemHeight:v,icon:c,iconRotate:T,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var L=s==="left"?p+5:-5,M=s,C=o.get("formatter"),E=n;we(C)&&C?E=C.replace("{name}",n??""):Le(C)&&(E=C(n));var P=g?x.getTextColor():a.get("inactiveColor");w.add(new ir({style:es(x,{text:E,x:L,y:v/2,fill:P,align:M,verticalAlign:"middle"},{inheritColor:P})}));var D=new dt({shape:w.getBoundingRect(),style:{fill:"transparent"}}),k=a.getModel("tooltip");return k.get("show")&&Tu({el:D,componentModel:o,itemName:n,itemTooltipOption:k.option}),w.add(D),w.eachChild(function(N){N.silent=!0}),D.silent=!f,this.getContentGroup().add(w),jh(w),w.__legendDataIndex=i,w},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ns(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){ns("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],p=r.get("selectorButtonGap",!0),v=r.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",y=v===0?"y":"x";s==="end"?h[v]+=c[g]+p:f[v]+=d[g]+p,h[1-v]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+p+d[g],_[m]=Math.max(c[m],d[m]),_[y]=Math.min(0,d[y]+h[1-v]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(_n);function vA(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Jd(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:K0(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function gA(e){var t=e.icon||"roundRect",r=qn(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=Ae.color.neutral00,r.style.lineWidth=2),r}function x_(e,t,r,n){tp(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),ep(e,t,r,n)}function T_(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function ep(e,t,r,n){T_(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function tp(e,t,r,n){T_(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function mA(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function Ps(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),L_(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){V(i,function(l,u){s[l?"select":"unSelect"](u)}),L_(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function L_(e,t){var r=t||{};return V(e.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
39
39
|
`||i==="")){var a=e.isSelected(i);Gr(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function yA(e){e.registerAction("legendToggleSelect","legendselectchanged",Jt(Ps,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Jt(Ps,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Jt(Ps,"inverseSelect")),e.registerAction("legendSelect","legendselected",Jt(Ps,"select")),e.registerAction("legendUnSelect","legendunselected",Jt(Ps,"unSelect"))}function E_(e){e.registerComponentModel(Kd),e.registerComponentView(w_),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,mA),e.registerSubTypeDefaulter("legend",function(){return"plain"}),yA(e)}var _A=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=os(r);e.prototype.init.call(this,r,n,i),M_(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),M_(this,this.option,r)},t.type="legend.scroll",t.defaultOption=e2(Kd.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:Ae.color.accent50,pageIconInactiveColor:Ae.color.accent10,pageIconSize:15,pageTextStyle:{color:Ae.color.tertiary},animationDurationUpdate:800}),t}(Kd);function M_(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Un(t,r,{type:"box",ignoreSize:!!i})}var C_=ht,rp=["width","height"],np=["x","y"],bA=function(e){fe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new C_),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new C_)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),d=me(f)?f:[f,f];p("pagePrev",0);var h=n.getModel("pageTextStyle");c.add(new ir({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(v,g){var m=v+"DataIndex",y=zm(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:ot(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=v,c.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=rp[u],f=np[u],d=rp[1-u],h=np[1-u];o&&ns("horizontal",l,r.get("selectorItemGap",!0));var p=r.get("selectorButtonGap",!0),v=l.getBoundingRect(),g=[-v.x,-v.y],m=Be(i);o&&(m[c]=i[c]-v[c]-p);var y=this._layoutContentAndController(r,a,m,u,c,d,h,f);if(o){if(s==="end")g[u]+=y[c]+p;else{var _=v[c]+p;g[u]-=_,y[f]-=_}y[c]+=v[c]+p,g[1-u]+=y[h]+y[d]/2-v[d]/2,y[d]=Math.max(y[d],v[d]),y[h]=Math.min(y[h],v[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,d=this._controllerGroup;ns(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),ns("horizontal",d,r.get("pageButtonItemGap",!0));var h=c.getBoundingRect(),p=d.getBoundingRect(),v=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=ye(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(v){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+_}y[1-a]+=h[s]/2-p[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(y);var w={x:0,y:0};if(w[o]=v?i[o]:h[o],w[s]=Math.max(h[s],p[s]),w[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],v){var x={x:0,y:0};x[o]=Math.max(i[o]-p[o]-_,0),x[s]=w[s],f.setClipPath(new dt({shape:x})),f.__rectSize=x[o]}else d.eachChild(function(L){L.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(r);return T.pageIndex!=null&&Nt(c,{x:T.contentPosition[0],y:T.contentPosition[1]},v?r:null),this._updatePageInfoView(r,T),w},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;V(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=n[f]!=null,h=i.childOfName(c);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",we(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=rp[o],l=np[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],d=c.length,h=d?1:0,p={contentPosition:[i.x,i.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=b(f);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,y=v,_=null;g<=d;++g)_=b(c[g]),(!_&&y.e>m.s+a||_&&!w(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var g=u-1,m=v,y=v,_=null;g>=-1;--g)_=b(c[g]),(!_||!w(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function b(x){if(x){var T=x.getBoundingRect(),L=T[l]+x[l];return{s:L,e:L+T[s],i:x.__legendDataIndex}}}function w(x,T){return x.e>=T&&x.s<=T+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(w_);function SA(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function wA(e){ji(E_),e.registerComponentModel(_A),e.registerComponentView(bA),SA(e)}function xA(e){ji(E_),ji(wA)}var ip=Math.sin,ap=Math.cos,D_=Math.PI,Ji=Math.PI*2,TA=180/D_,A_=function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),d=Bn(f-Ji)||(c?u>=Ji:-u>=Ji),h=u>0?u%Ji:u%Ji+Ji,p=!1;d?p=!0:Bn(f)?p=!1:p=h>=D_==!!c;var v=t+n*ap(o),g=r+i*ip(o);this._start&&this._add("M",v,g);var m=Math.round(a*TA);if(d){var y=1/this._p,_=(c?1:-1)*(Ji-y);this._add("A",n,i,m,1,+c,t+n*ap(o+_),r+i*ip(o+_)),y>.01&&this._add("A",n,i,m,0,+c,v,g)}else{var b=t+n*ap(s),w=r+i*ip(s);this._add("A",n,i,m,+p,+c,b,w)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h)){this._invalid=!0;return}c.push(Math.round(h*f)/f)}this._d.push(t+c.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),op="none",LA=Math.round;function EA(e){var t=e.fill;return t!=null&&t!==op}function MA(e){var t=e.stroke;return t!=null&&t!==op}var sp=["lineCap","miterLimit","lineJoin"],CA=ve(sp,function(e){return"stroke-"+e.toLowerCase()});function DA(e,t,r,n){var i=t.opacity==null?1:t.opacity;if(r instanceof Pr){e("opacity",i);return}if(EA(t)){var a=Do(t.fill);e("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;o<1&&e("fill-opacity",o)}else e("fill",op);if(MA(t)){var s=Do(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?r.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,f=t.strokeFirst;if(u!==1&&e("stroke-width",u),f&&e("paint-order",f?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var d=Z0(r),h=d[0],p=d[1];h&&(p=LA(p||0),e("stroke-dasharray",h.join(",")),(p||n)&&e("stroke-dashoffset",p))}for(var v=0;v<sp.length;v++){var g=sp[v];if(t[g]!==iu[g]){var m=t[g]||iu[g];m&&e(CA[v],m)}}}}var k_="http://www.w3.org/2000/svg",P_="http://www.w3.org/1999/xlink",AA="http://www.w3.org/2000/xmlns/",kA="http://www.w3.org/XML/1998/namespace",N_="ecmeta_";function O_(e){return document.createElementNS(k_,e)}function yt(e,t,r,n,i){return{tag:e,attrs:r||{},children:n,text:i,key:t}}function PA(e,t){var r=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+e+" "+r.join(" ")+">"}function NA(e){return"</"+e+">"}function lp(e,t){t=t||{};var r=t.newline?`
|
|
40
40
|
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return PA(o,s)+(o!=="style"?y9(l):l||"")+(a?""+r+ve(a,function(u){return n(u)}).join(r)+r:"")+NA(o)}return n(e)}function OA(e,t,r){r=r||{};var n=r.newline?`
|
|
41
41
|
`:"",i=" {"+n,a=n+"}",o=ve(Ve(e),function(l){return l+i+ve(Ve(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=ve(Ve(t),function(l){return"@keyframes "+l+i+ve(Ve(t[l]),function(u){return u+i+ve(Ve(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function up(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function I_(e,t,r,n){return yt("svg","root",{width:e,height:t,xmlns:k_,"xmlns:xlink":P_,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var IA=0;function B_(){return IA++}var $_={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},ea="transform-origin";function BA(e,t,r){var n=se({},e.shape);se(n,t),e.buildPath(r,n);var i=new A_;return i.reset(V1(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function $A(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[ea]=r+"px "+n+"px")}var RA={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function R_(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function VA(e,t,r){var n=e.shape.paths,i={},a,o;if(V(n,function(l){var u=up(r.zrId);u.animation=!0,Cc(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,d=Ve(c),h=d.length;if(h){o=d[h-1];var p=c[o];for(var v in p){var g=p[v];i[v]=i[v]||{d:""},i[v].d+=g.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){t.d=!1;var s=R_(i,r);return a.replace(o,s)}}function V_(e){return we(e)?$_[e]?"cubic-bezier("+$_[e]+")":Bf(e)?e:"":""}function Cc(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof Dm){var s=VA(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],d=V_(c.getClip().easing),h=c.getDelay();d?f.push(d):f.push("linear"),h&&f.push(h/1e3+"s"),c.getLoop()&&f.push("infinite");var p=f.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function v(y){var _=y[1],b=_.length,w={},x={},T={},L="animation-timing-function";function M(q,W,j){for(var Y=q.getTracks(),re=q.getMaxTime(),te=0;te<Y.length;te++){var ne=Y[te];if(ne.needsAnimate()){var ge=ne.keyframes,Se=ne.propName;if(j&&(Se=j(Se)),Se)for(var ie=0;ie<ge.length;ie++){var Ee=ge[ie],K=Math.round(Ee.time/re*100)+"%",le=V_(Ee.easing),U=Ee.rawValue;(we(U)||Ke(U))&&(W[K]=W[K]||{},W[K][Se]=Ee.rawValue,le&&(W[K][L]=le))}}}}for(var C=0;C<b;C++){var E=_[C],P=E.targetName;P?P==="shape"&&M(E,x):!n&&M(E,w)}for(var D in w){var k={};Hl(k,e),se(k,w[D]);var N=z1(k),I=w[D][L];T[D]=N?{transform:N}:{},$A(T[D],k),I&&(T[D][L]=I)}var O,z=!0;for(var D in x){T[D]=T[D]||{};var $=!O,I=x[D][L];$&&(O=new zn);var R=O.len();O.reset(),T[D].d=BA(e,x[D],O);var B=O.len();if(!$&&R!==B){z=!1;break}I&&(T[D][L]=I)}if(!z)for(var D in T)delete T[D].d;if(!n)for(var C=0;C<b;C++){var E=_[C],P=E.targetName;P==="style"&&M(E,T,function(Y){return RA[Y]})}for(var H=Ve(T),F=!0,A,C=1;C<H.length;C++){var G=H[C-1],Z=H[C];if(T[G][ea]!==T[Z][ea]){F=!1;break}A=T[G][ea]}if(F&&A){for(var D in T)T[D][ea]&&delete T[D][ea];t[ea]=A}if(vt(H,function(q){return Ve(T[q]).length>0}).length){var Q=R_(T,r);return Q+" "+y[0]+" both"}}for(var g in l){var s=v(l[g]);s&&o.push(s)}if(o.length){var m=r.zrId+"-cls-"+B_();r.cssNodes["."+m]={animation:o.join(",")},t.class=m}}function zA(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};z_(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=Gf(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),z_(n,t,r)}}function z_(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+B_(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var Ns=Math.round;function F_(e){return e&&we(e.src)}function H_(e){return e&&Le(e.toDataURL)}function cp(e,t,r,n){DA(function(i,a){var o=i==="fill"||i==="stroke";o&&R1(a)?q_(t,e,i,n):o&&Xf(a)?Z_(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),YA(r,e,n)}function fp(e,t){var r=Ab(t);r&&(r.each(function(n,i){n!=null&&(e[(N_+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[N_+"silent"]="true"))}function G_(e){return Bn(e[0]-1)&&Bn(e[1])&&Bn(e[2])&&Bn(e[3]-1)}function FA(e){return Bn(e[4])&&Bn(e[5])}function hp(e,t,r){if(t&&!(FA(t)&&G_(t))){var n=1e4;e.transform=G_(t)?"translate("+Ns(t[4]*n)/n+" "+Ns(t[5]*n)/n+")":j9(t)}}function W_(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(Ns(n[a][0]*r)/r),i.push(Ns(n[a][1]*r)/r);t.points=i.join(" ")}function X_(e){return!e.smooth}function HA(e){var t=ve(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=r[o[0]];s!=null&&(n[o[1]]=Ns(s*i)/i)}}}var GA={circle:[HA(["cx","cy","r"])],polyline:[W_,X_],polygon:[W_,X_]};function WA(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function U_(e,t){var r=e.style,n=e.shape,i=GA[e.type],a={},o=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&V1(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&WA(e))&&!(l<1)){s=e.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;f&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var h=d.getVersion(),p=e,v=p.__svgPathBuilder;(p.__svgPathVersion!==h||!v||l!==p.__svgPathStrokePercent)&&(v||(v=p.__svgPathBuilder=new A_),v.reset(u),d.rebuildPath(v,l),v.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),a.d=v.getStr()}return hp(a,e.transform),cp(a,r,e,t),fp(a,e),t.animation&&Cc(e,a,t),t.emphasis&&zA(e,a,t),yt(s,e.id+"",a)}function XA(e,t){var r=e.style,n=r.image;if(n&&!we(n)&&(F_(n)?n=n.src:H_(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),hp(l,e.transform),cp(l,r,e,t),fp(l,e),t.animation&&Cc(e,l,t),yt("image",e.id+"",l)}}function UA(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||ln,a=r.x||0,o=K9(r.y||0,No(i),r.textBaseline),s=Q9[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(Yg(r)){var u="",c=r.fontStyle,f=Xg(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||Uv,h=r.fontWeight;u+="font-size:"+f+";font-family:"+d+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),h&&h!=="normal"&&(u+="font-weight:"+h+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),hp(l,e.transform),cp(l,r,e,t),fp(l,e),t.animation&&Cc(e,l,t),yt("text",e.id+"",l,void 0,n)}}function Y_(e,t){if(e instanceof Fe)return U_(e,t);if(e instanceof Pr)return XA(e,t);if(e instanceof Go)return UA(e,t)}function YA(e,t,r){var n=e.style;if(J9(n)){var i=eb(e),a=r.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,d=n.shadowBlur,h=Do(n.shadowColor),p=h.opacity,v=h.color,g=d/2/l,m=d/2/u,y=g+" "+m;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=yt("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[yt("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:y,"flood-color":v,"flood-opacity":p})]),a[i]=o}t.filter=Ol(o)}}function q_(e,t,r,n){var i=e[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(B1(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if($1(i))a="radialGradient",o.cx=ye(i.x,.5),o.cy=ye(i.y,.5),o.r=ye(i.r,.5);else{process.env.NODE_ENV!=="production"&&ha("Illegal gradient type.");return}for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=Wf(s[u].offset)*100+"%",d=s[u].color,h=Do(d),p=h.color,v=h.opacity,g={offset:f};g["stop-color"]=p,v<1&&(g["stop-opacity"]=v),l.push(yt("stop",u+"",g))}var m=yt(a,"",o,l),y=lp(m),_=n.gradientCache,b=_[y];b||(b=n.zrId+"-g"+n.gradientIdx++,_[y]=b,o.id=b,n.defs[b]=yt(a,b,o,l)),t[r]=Ol(b)}function Z_(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(I1(i)){var d=i.imageWidth,h=i.imageHeight,p=void 0,v=i.image;if(we(v)?p=v:F_(v)?p=v.src:H_(v)&&(p=v.toDataURL()),typeof Image>"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";be(d,g),be(h,g)}else if(d==null||h==null){var m=function(C,E){if(C){var P=C.elm,D=d||E.width,k=h||E.height;C.tag==="pattern"&&(u?(k=1,D/=a.width):c&&(D=1,k/=a.height)),C.attrs.width=D,C.attrs.height=k,P&&(P.setAttribute("width",D),P.setAttribute("height",k))}},y=Th(p,null,e,function(C){l||m(x,C),m(f,C)});y&&y.width&&y.height&&(d=d||y.width,h=h||y.height)}f=yt("image","img",{href:p,width:d,height:h}),o.width=d,o.height=h}else i.svgElement&&(f=Be(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var _,b;l?_=b=1:u?(b=1,_=o.width/a.width):c?(_=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),b!=null&&!isNaN(b)&&(o.height=b);var w=z1(i);w&&(o.patternTransform=w);var x=yt("pattern","",o,[f]),T=lp(x),L=n.patternCache,M=L[T];M||(M=n.zrId+"-p"+n.patternIdx++,L[T]=M,o.id=M,x=n.defs[M]=yt("pattern",M,o,[f])),t[r]=Ol(M)}}function qA(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=yt("clipPath",a,o,[U_(e,r)])}t["clip-path"]=Ol(a)}function j_(e){return document.createTextNode(e)}function ta(e,t,r){e.insertBefore(t,r)}function Q_(e,t){e.removeChild(t)}function K_(e,t){e.appendChild(t)}function J_(e){return e.parentNode}function e3(e){return e.nextSibling}function dp(e,t){e.textContent=t}var t3=58,ZA=120,jA=yt("","");function pp(e){return e===void 0}function an(e){return e!==void 0}function QA(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(process.env.NODE_ENV!=="production"&&n[a]!=null&&console.error("Duplicate key "+a),n[a]=i)}return n}function Os(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Is(e){var t,r=e.children,n=e.tag;if(an(n)){var i=e.elm=O_(n);if(vp(jA,e),me(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&K_(i,Is(a))}else an(e.text)&&!xe(e.text)&&K_(i,j_(e.text))}else e.elm=j_(e.text);return e.elm}function r3(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&ta(e,Is(a),t)}}function Dc(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(an(i.tag)){var a=J_(i.elm);Q_(a,i.elm)}else Q_(e,i.elm)}}function vp(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==ZA?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(AA,r,o):r.charCodeAt(3)===t3?n.setAttributeNS(kA,r,o):r.charCodeAt(5)===t3?n.setAttributeNS(P_,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function KA(e,t,r){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=r.length-1,u=r[0],c=r[l],f,d,h,p;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=r[++i]:c==null?c=r[--l]:Os(o,u)?(ao(o,u),o=t[++n],u=r[++i]):Os(s,c)?(ao(s,c),s=t[--a],c=r[--l]):Os(o,c)?(ao(o,c),ta(e,o.elm,e3(s.elm)),o=t[++n],c=r[--l]):Os(s,u)?(ao(s,u),ta(e,s.elm,o.elm),s=t[--a],u=r[++i]):(pp(f)&&(f=QA(t,n,a)),d=f[u.key],pp(d)?ta(e,Is(u),o.elm):(h=t[d],h.tag!==u.tag?ta(e,Is(u),o.elm):(ao(h,u),t[d]=void 0,ta(e,h.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(p=r[l+1]==null?null:r[l+1].elm,r3(e,p,r,i,l)):Dc(e,t,n,a))}function ao(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(vp(e,t),pp(t.text)?an(n)&&an(i)?n!==i&&KA(r,n,i):an(i)?(an(e.text)&&dp(r,""),r3(r,null,i,0,i.length-1)):an(n)?Dc(r,n,0,n.length-1):an(e.text)&&dp(r,""):e.text!==t.text&&(an(n)&&Dc(r,n,0,n.length-1),dp(r,t.text)))}function JA(e,t){if(Os(e,t))ao(e,t);else{var r=e.elm,n=J_(r);Is(t),n!==null&&(ta(n,t.elm,e3(r)),Dc(n,[e],0,0))}return t}var ek=0,tk=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=n3("refreshHover"),this.configLayer=n3("configLayer"),this.storage=r,this._opts=n=se({},n),this.root=t,this._id="zr"+ek++,this._oldVNode=I_(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=O_("svg");vp(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",JA(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return Y_(t,up(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=up(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=rk(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=yt("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=ve(Ve(a.defs),function(d){return a.defs[d]});if(u.length&&o.push(yt("defs","defs",{},u)),t.animation){var c=OA(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=yt("style","stl",{},[],c);o.push(f)}}return I_(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},lp(this.renderToVNode({animation:ye(t.cssAnimation,!0),emphasis:ye(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ye(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=t[c];if(!f.invisible){var d=f.__clipPaths,h=d&&d.length||0,p=l&&l.length||0,v=void 0;for(v=Math.max(h-1,p-1);v>=0&&!(d&&l&&d[v]===l[v]);v--);for(var g=p-1;g>v;g--)o--,s=a[o-1];for(var m=v+1;m<h;m++){var y={};qA(d[m],y,r);var _=yt("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=d;var b=Y_(f,r);b&&(s?s.children:n).push(b)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=xy(i,0,n),r=xy(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var o=a.style;o.width=t+"px",o.height=r+"px"}if(Xf(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=rb(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function n3(e){return function(){process.env.NODE_ENV!=="production"&&ha('In SVG mode painter not support method "'+e+'"')}}function rk(e,t,r,n){var i;if(r&&r!=="none")if(i=yt("rect","bg",{width:e,height:t,x:"0",y:"0"}),R1(r))q_({fill:r},i.attrs,"fill",n);else if(Xf(r))Z_({style:{fill:r},dirty:er,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=Do(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function nk(e){e.registerPainter("svg",tk)}const ik=({type:e,data:t,themeColors:r,textColor:n,lineColor:i,lineSmooth:a,stack:o})=>{const s=n?{color:n}:{},l=n?{lineStyle:{color:n}}:void 0,u=n?{color:n}:void 0,c=i?{lineStyle:{color:i}}:{},f=t.series.length>1?{top:"bottom",textStyle:s}:void 0;if(e==="bar")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:t.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:t.series.map((d,h)=>{const p={data:d,name:t.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[2,2,0,0]}};return o&&(p.stack="A"),p})};if(e==="column")return{color:r,textStyle:s,legend:f,yAxis:{type:"category",data:t.labels,axisLine:l,axisLabel:u},xAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:t.series.map((d,h)=>{const p={data:d,name:t.legends[h],type:"bar",label:{show:!0},itemStyle:{borderRadius:[0,2,2,0]}};return o&&(p.stack="A"),p})};if(e==="line")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",data:t.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:t.series.map((d,h)=>{const p={data:d,name:t.legends[h],type:"line",smooth:a,label:{show:!0}};return o&&(p.stack="A"),p})};if(e==="pie")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:t.series[0].map((d,h)=>({value:d,name:t.labels[h]})),label:n?{color:n}:{},type:"pie",radius:"70%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(e==="ring")return{color:r,textStyle:s,legend:{top:"bottom",textStyle:s},series:[{data:t.series[0].map((d,h)=>({value:d,name:t.labels[h]})),label:n?{color:n}:{},type:"pie",radius:["40%","70%"],padAngle:1,avoidLabelOverlap:!1,itemStyle:{borderRadius:4},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}}}]};if(e==="area")return{color:r,textStyle:s,legend:f,xAxis:{type:"category",boundaryGap:!1,data:t.labels,axisLine:l,axisLabel:u},yAxis:{type:"value",axisLine:l,axisLabel:u,splitLine:c},series:t.series.map((d,h)=>{const p={data:d,name:t.legends[h],type:"line",areaStyle:{},label:{show:!0}};return o&&(p.stack="A"),p})};if(e==="radar")return{color:r,textStyle:s,legend:f,radar:{indicator:t.labels.map(d=>({name:d})),splitLine:c,axisLine:i?{lineStyle:{color:i}}:void 0},series:[{data:t.series.map((d,h)=>({value:d,name:t.legends[h]})),type:"radar"}]};if(e==="scatter"){const d=[];for(let h=0;h<t.series[0].length;h++){const p=t.series[0][h],v=t.series[1]?t.series[1][h]:p;d.push([p,v])}return{color:r,textStyle:s,xAxis:{axisLine:l,axisLabel:u,splitLine:c},yAxis:{axisLine:l,axisLabel:u,splitLine:c},series:[{symbolSize:12,data:d,type:"scatter"}]}}return null},ak={chart:"_chart_1g0qq_1"};ji([jC,IC,oD,rA,hA,xA,nk]);const i3=({width:e,height:t,type:r,data:n,themeColors:i,textColor:a,lineColor:o,options:s})=>{const l=S.useRef(null),u=S.useRef(null),c=S.useMemo(()=>{let d=[];if(i.length>=10)d=i;else if(i.length===1)d=Je(i[0]).analogous(10).map(h=>h.toRgbString());else{const h=i.length,p=Je(i[h-1]).analogous(11-h).map(v=>v.toRgbString());d=[...i.slice(0,h-1),...p]}return d},[i]),f=S.useCallback(()=>{if(!u.current)return;const d=ik({type:r,data:n,themeColors:c,textColor:a,lineColor:o,lineSmooth:(s==null?void 0:s.lineSmooth)||!1,stack:(s==null?void 0:s.stack)||!1});d&&u.current.setOption(d,!0)},[r,n,c,a,o,s]);return S.useEffect(()=>{if(!l.current)return;u.current=NE(l.current,null,{renderer:"svg"}),f();const d=()=>{var p;return(p=u.current)==null?void 0:p.resize()},h=new ResizeObserver(d);return h.observe(l.current),()=>{var p;h.disconnect(),(p=u.current)==null||p.dispose(),u.current=null}},[]),S.useEffect(()=>{f()},[f]),S.createElement("div",{className:ak.chart,ref:l})},gp={editableElementChart:"_editableElementChart_1i7hz_1",rotateWrapper:"_rotateWrapper_1i7hz_5",elementContent:"_elementContent_1i7hz_10"},ok=({elementInfo:e,selectElement:t,contextmenus:r})=>{const n=S.useRef(null),i=o=>{o.stopPropagation(),t==null||t(o.nativeEvent,e)},a=()=>{ca.emit(vi.OPEN_CHART_DATA_EDITOR)};return Hr(n,()=>(r==null?void 0:r())||[]),S.createElement("div",{className:gp.editableElementChart,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:gp.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{ref:n,className:gp.elementContent,style:{backgroundColor:e.fill},onMouseDown:i,onTouchStart:i,onDoubleClick:a},S.createElement(pl,{width:e.width,height:e.height,outline:e.outline}),S.createElement(i3,{width:e.width,height:e.height,type:e.chartType,data:e.data,themeColors:e.themeColors,textColor:e.textColor,lineColor:e.lineColor,options:e.options}))))},a3=e=>{if(!e)return{};const{bold:t,em:r,underline:n,strikethrough:i,color:a,backcolor:o,fontsize:s,fontname:l,align:u}=e;let c=`${n?"underline":""} ${i?"line-through":""}`;return c.trim()===""&&(c="none"),{fontWeight:t?"bold":"normal",fontStyle:r?"italic":"normal",textDecoration:c,color:a||"#000",backgroundColor:o||"",fontSize:s||"14px",fontFamily:l||"",textAlign:u||"left"}},o3=e=>e.replace(/\n/g,"</br>").replace(/ /g," "),s3=e=>({hideCells:S.useMemo(()=>{const r=[];for(let n=0;n<e.length;n++){const i=e[n];for(let a=0;a<i.length;a++){const o=i[a];if(o.colspan>1||o.rowspan>1)for(let s=n;s<n+o.rowspan;s++)for(let l=s===n?a+1:a;l<a+o.colspan;l++)r.push(`${s}_${l}`)}}return r},[e])}),l3=e=>({subThemeColor:S.useMemo(()=>e?_v(e.color):["",""],[e])}),sk={customTextarea:"_customTextarea_15hzl_1"},lk=({value:e,className:t,style:r,onUpdateValue:n,onInsertExcelData:i})=>{const a=S.useRef(null),o=S.useRef(!1);S.useEffect(()=>{o.current||!a.current||a.current.innerHTML!==e&&(a.current.innerHTML=e)},[e]);const s=()=>{if(!a.current)return;const f=a.current.innerHTML;n(f)},l=()=>{o.current=!0},u=f=>{if(f.preventDefault(),!f.clipboardData)return;const d=f.clipboardData.items[0];d&&d.kind==="string"&&(d.type==="text/plain"?d.getAsString(h=>{if(typeof mv(h)=="object")return;const v=Z7(h);if(v){i(v),a.current&&(a.current.innerHTML=v[0][0]);return}document.execCommand("insertText",!1,h)}):d.type==="text/html"&&d.getAsString(h=>{const p=j7(h);p&&(i(p),a.current&&(a.current.innerHTML=p[0][0]))}))},c=()=>{o.current=!1};return S.createElement("div",{className:Me(sk.customTextarea,t),style:r,ref:a,contentEditable:!0,onFocus:l,onBlur:c,onInput:s,onPaste:u,dangerouslySetInnerHTML:{__html:e}})},Bt={editableTable:"_editableTable_exzav_1",theme:"_theme_exzav_19",cell:"_cell_exzav_22",rowHeader:"_rowHeader_exzav_28",rowFooter:"_rowFooter_exzav_31",colHeader:"_colHeader_exzav_34",colFooter:"_colFooter_exzav_37",selected:"_selected_exzav_49",cellText:"_cellText_exzav_58",active:"_active_exzav_64",dragLine:"_dragLine_exzav_68"},uk=({data:e,width:t,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0,onChange:s,onChangeColWidths:l,onChangeSelectedCells:u,onMouseDown:c,contextmenus:f})=>{const{canvasScale:d,setSelectedTableCells:h}=_e(),[p,v]=S.useState(!1),[g,m]=S.useState([]),[y,_]=S.useState([]),[b,w]=S.useState([]);S.useEffect(()=>{w(n.map(U=>U*t))},[n,t]);const x=S.useMemo(()=>b.reduce((U,X)=>U+X,0),[b]),{hideCells:T}=s3(e),{subThemeColor:L}=l3(a),M=S.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":L[0],"--subThemeColor2":L[1]}:{},[a,L]);S.useEffect(()=>{o||(m([]),_([]))},[o]);const C=S.useMemo(()=>{const U=[];for(let X=1;X<b.length+1;X++){const ee=b.slice(0,X).reduce((J,ce)=>J+ce,0);U.push(ee)}return U},[b]),E=S.useMemo(()=>{if(!g.length)return[];const[U,X]=g;if(!y.length)return[`${U}_${X}`];const[ee,J]=y;if(U===ee&&X===J)return[`${U}_${X}`];const ce=[],de=Math.min(U,ee),pe=Math.min(X,J),qe=Math.max(U,ee),et=Math.max(X,J);for(let He=0;He<e.length;He++){const Ct=e[He];for(let Rt=0;Rt<Ct.length;Rt++)He>=de&&He<=qe&&Rt>=pe&&Rt<=et&&ce.push(`${He}_${Rt}`)}return ce},[g,y,e]);S.useEffect(()=>{u(E),h(E)},[E,u,h]);const P=S.useMemo(()=>E.length>1?null:E[0]||null,[E]),D=S.useCallback(()=>v(!1),[]);S.useEffect(()=>(document.addEventListener("mouseup",D),()=>{document.removeEventListener("mouseup",D)}),[D]);const k=(U,X,ee)=>{U.button===0&&(_([]),v(!0),m([X,ee]))},N=(U,X)=>{p&&_([U,X])},I=(U,X)=>T.includes(`${U}_${X}`),O=U=>{const X=JSON.parse(JSON.stringify(e)),ee=[];for(let J=0;J<X[0].length;J++)ee.push({colspan:1,rowspan:1,text:"",id:ze.nanoid(10)});X.splice(U,0,ee),s(X)},z=U=>{const X=e.map(J=>{const ce={colspan:1,rowspan:1,text:"",id:ze.nanoid(10)},de=[...J];return de.splice(U,0,ce),de}),ee=[...b];ee.splice(U,0,100),s(X),l(ee)},$=U=>{const X=JSON.parse(JSON.stringify(e)),ee=e[U],J=[];for(let ce=0;ce<ee.length;ce++)I(U,ce)&&J.push(ce);for(const ce of J)for(let de=U;de>=0;de--)if(!I(de,ce)){X[de][ce].rowspan=X[de][ce].rowspan-1;break}X.splice(U,1),s(X)},R=U=>{const X=JSON.parse(JSON.stringify(e)),ee=[];for(let de=0;de<e.length;de++)I(de,U)&&ee.push(de);for(const de of ee)for(let pe=U;pe>=0;pe--)if(!I(de,pe)){X[de][pe].colspan=X[de][pe].colspan-1;break}const J=X.map(de=>(de.splice(U,1),de)),ce=[...b];ce.splice(U,1),s(J),l(ce)},B=()=>{const[U,X]=g,[ee,J]=y,ce=Math.min(U,ee),de=Math.min(X,J),pe=Math.max(U,ee),qe=Math.max(X,J),et=JSON.parse(JSON.stringify(e));et[ce][de].rowspan=pe-ce+1,et[ce][de].colspan=qe-de+1,s(et),m([]),_([])},H=(U,X)=>{const ee=JSON.parse(JSON.stringify(e));ee[U][X].rowspan=1,ee[U][X].colspan=1,s(ee),m([]),_([])},F=U=>{const X=e.length-1;m([0,U]),_([X,U])},A=U=>{const X=e[U].length-1;m([U,0]),_([U,X])},G=()=>{const U=e.length-1,X=e[U].length-1;m([0,0]),_([U,X])},Z=()=>{const U=JSON.parse(JSON.stringify(e));for(let X=0;X<U.length;X++)for(let ee=0;ee<U[X].length;ee++)E.includes(`${X}_${ee}`)&&(U[X][ee].text="");s(U)},Q=()=>{requestAnimationFrame(()=>{const U=document.querySelector(`.${Bt.cellText}.${Bt.active}`);U&&U.focus()})},q=()=>{const U=(ce,de)=>e[ce]?e[ce][de]?I(ce,de)?U(ce,de+1):[ce,de]:U(ce+1,0):null;_([]);const X=g[0],ee=g[1]+1,J=U(X,ee);J?m(J):(O(X+1),m([X+1,0])),Q()},W=U=>{var ee;const X=window.getSelection();if(X&&X.rangeCount>0){const J=X.getRangeAt(0),ce=J.cloneRange();ce.selectNodeContents(U),ce.setEnd(J.startContainer,J.startOffset);const de=ce.toString().length;ce.setEnd(J.endContainer,J.endOffset);const pe=ce.toString().length,qe=((ee=U.textContent)==null?void 0:ee.length)||0;return{start:de,end:pe,len:qe}}return null},j=U=>{const X=+E[0].split("_")[0],ee=+E[0].split("_")[1],J=e.length,ce=e[0].length,de=pe=>{if(pe[0]<0||pe[1]<0||pe[0]>J-1||pe[1]>ce-1)return[0,0];const qe=`${pe[0]}_${pe[1]}`;return T.includes(qe)?U==="UP"?de([pe[0],pe[1]-1]):U==="DOWN"?de([pe[0],pe[1]-1]):U==="LEFT"?de([pe[0]-1,pe[1]]):U==="RIGHT"?de([pe[0]-1,pe[1]]):[0,0]:pe};if(U==="UP"){const pe=X-1;if(pe<0)return;_([]),m(de([pe,ee]))}else if(U==="DOWN"){const pe=X+1;if(pe>J-1)return;_([]),m(de([pe,ee]))}else if(U==="LEFT"){const pe=ee-1;if(pe<0)return;_([]),m(de([X,pe]))}else if(U==="RIGHT"){const pe=ee+1;if(pe>ce-1)return;_([]),m(de([X,pe]))}Q()},Y=()=>{const U=[];for(let X=0;X<e.length;X++){const ee=e[X],J=[];for(let ce=0;ce<ee.length;ce++)I(X,ce)||J.push(ee[ce]);J.length&&U.push(J)}return U},re=()=>{const U=Y(),X=U.length>1,ee=U[0].length>1;return{canDeleteRow:X,canDeleteCol:ee}},te=(U,X)=>{const ee=E.length>1,J=e[U][X],ce=ee,de=!ee&&(J.rowspan>1||J.colspan>1);return{canMerge:ce,canSplit:de}},ne=(U,X,ee)=>{U.preventDefault(),U.stopPropagation();const J=document.getElementById("global-contextmenu-container");J&&document.body.removeChild(J);const ce=document.createElement("div");ce.id="global-contextmenu-container",document.body.appendChild(ce);const de=tv.createRoot(ce),pe=()=>{setTimeout(()=>{de.unmount(),document.body.contains(ce)&&document.body.removeChild(ce),X.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",pe),window.removeEventListener("resize",pe)},0)};de.render(S.createElement(Pv,{axis:{x:U.clientX,y:U.clientY},el:X,menus:ee,removeContextmenu:pe})),X.classList.add("contextmenu-active"),document.body.addEventListener("scroll",pe),window.addEventListener("resize",pe)};S.useEffect(()=>{const U=X=>{if(!o||!E.length)return;const ee=X.key.toUpperCase();if(E.length<2){if(ee===ft.TAB)X.preventDefault(),q();else if(X.ctrlKey&&ee===ft.UP){X.preventDefault();const J=+E[0].split("_")[0];O(J)}else if(X.ctrlKey&&ee===ft.DOWN){X.preventDefault();const J=+E[0].split("_")[0];O(J+1)}else if(X.ctrlKey&&ee===ft.LEFT){X.preventDefault();const J=+E[0].split("_")[1];z(J)}else if(X.ctrlKey&&ee===ft.RIGHT){X.preventDefault();const J=+E[0].split("_")[1];z(J+1)}else if(ee===ft.UP){const J=W(X.target);J&&J.start===J.end&&J.start===0&&j("UP")}else if(ee===ft.DOWN){const J=W(X.target);J&&J.start===J.end&&J.start===J.len&&j("DOWN")}else if(ee===ft.LEFT){const J=W(X.target);J&&J.start===J.end&&J.start===0&&j("LEFT")}else if(ee===ft.RIGHT){const J=W(X.target);J&&J.start===J.end&&J.start===J.len&&j("RIGHT")}}else ee===ft.DELETE&&Z()};return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[o,E,e,s]);const ge=(U,X)=>{U.stopPropagation(),m([]),_([]);let ee=!0;const J=b[X],ce=U.pageX,de=50,pe=et=>{if(!ee)return;const He=(et.pageX-ce)/d,Ct=J+He<de?de:Math.round(J+He),Rt=[...b];Rt[X]=Ct,w(Rt)},qe=()=>{ee=!1,document.removeEventListener("mousemove",pe),document.removeEventListener("mouseup",qe),l(Se.current)};document.addEventListener("mousemove",pe),document.addEventListener("mouseup",qe)},Se=S.useRef(b);S.useEffect(()=>{Se.current=b},[b]);const ie=(U,X,ee)=>{const J=JSON.parse(JSON.stringify(e));J[X][ee].text=U,s(J)},Ee=S.useMemo(()=>Gt.debounce(ie,300,{trailing:!0}),[e,s]),K=(U,X,ee)=>{const J=U.length,ce=U[0].length;let de=0,pe=0;if(X+J>e.length&&(de=X+J-e.length),ee+ce>e[0].length&&(pe=ee+ce-e[0].length),de||pe){let qe=JSON.parse(JSON.stringify(e));const et={colspan:1,rowspan:1,text:""};if(de){const He=[];for(let Ct=0;Ct<de;Ct++){const Rt=[];for(let ue=0;ue<qe[0].length;ue++)Rt.push({...et,id:ze.nanoid(10)});He.push(Rt)}qe=[...qe,...He]}if(pe){qe=qe.map(Ct=>{const Rt=[];for(let ue=0;ue<pe;ue++){const lr={...et,id:ze.nanoid(10)};Rt.push(lr)}return[...Ct,...Rt]});const He=[...b,...new Array(pe).fill(100)];w(He),l(He)}s(qe)}requestAnimationFrame(()=>{const qe=JSON.parse(JSON.stringify(e));for(let et=0;et<J;et++)for(let He=0;He<ce;He++)qe[X+et]&&qe[X+et][ee+He]&&(qe[X+et][ee+He].text=U[et][He]);s(qe)})},le=(U,X,ee)=>{const J=U.currentTarget;E.includes(`${X}_${ee}`)||(m([X,ee]),_([]));const{canMerge:ce,canSplit:de}=te(X,ee),{canDeleteRow:pe,canDeleteCol:qe}=re(),et=[{text:"插入列",children:[{text:"到左侧",handler:()=>z(ee)},{text:"到右侧",handler:()=>z(ee+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>O(X)},{text:"到下方",handler:()=>O(X+1)}]},{text:"删除列",disable:!qe,handler:()=>R(ee)},{text:"删除行",disable:!pe,handler:()=>$(X)},{divider:!0},{text:"合并单元格",disable:!ce,handler:B},{text:"取消合并单元格",disable:!de,handler:()=>H(X,ee)},{divider:!0},{text:"选中当前列",handler:()=>F(ee)},{text:"选中当前行",handler:()=>A(X)},{text:"选中全部单元格",handler:G}],He=f?f(J)||[]:[],Ct=[...et,...He||[]];Ct.length&&ne(U,J,Ct)};return S.createElement("div",{className:Bt.editableTable,style:{width:x+"px"},onMouseDown:c},o&&S.createElement("div",{className:Bt.handler},C.map((U,X)=>S.createElement("div",{key:X,className:Bt.dragLine,style:{left:U+"px"},onMouseDown:ee=>ge(ee,X)}))),S.createElement("table",{className:Me({[Bt.theme]:a,[Bt.rowHeader]:a==null?void 0:a.rowHeader,[Bt.rowFooter]:a==null?void 0:a.rowFooter,[Bt.colHeader]:a==null?void 0:a.colHeader,[Bt.colFooter]:a==null?void 0:a.colFooter}),style:M},S.createElement("colgroup",null,b.map((U,X)=>S.createElement("col",{key:X,span:1,width:U}))),S.createElement("tbody",null,e.map((U,X)=>S.createElement("tr",{key:X,style:{height:r+"px"}},U.map((ee,J)=>{if(T.includes(`${X}_${J}`))return null;const ce=E.includes(`${X}_${J}`)&&E.length>1,de=P===`${X}_${J}`;return S.createElement("td",{key:ee.id,className:Me(Bt.cell,{[Bt.selected]:ce,[Bt.active]:de}),style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...a3(ee.style)},rowSpan:ee.rowspan,colSpan:ee.colspan,"data-cell-index":`${X}_${J}`,onMouseDown:pe=>k(pe,X,J),onMouseEnter:()=>N(X,J),onContextMenu:pe=>le(pe,X,J)},de?S.createElement(lk,{className:Me(Bt.cellText,{[Bt.active]:!0}),style:{minHeight:r-4+"px"},value:ee.text,onUpdateValue:pe=>Ee(pe,X,J),onInsertExcelData:pe=>K(pe,X,J)}):S.createElement("div",{className:Bt.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:o3(ee.text)}}))}))))))},Bs={editableElementTable:"_editableElementTable_gxw12_1",rotateWrapper:"_rotateWrapper_gxw12_5",elementContent:"_elementContent_gxw12_10",tableMask:"_tableMask_gxw12_17",maskTip:"_maskTip_gxw12_26"},ck=({elementInfo:e,selectElement:t,contextmenus:r})=>{const n=e,{canvasScale:i,handleElementId:a,isScaling:o,setDisableHotkeysState:s,setSelectedTableCells:l}=_e(),{updateElement:u}=ke(),{addHistorySnapshot:c}=wt(),f=S.useRef(null),d=S.useRef(null),[h,p]=S.useState(!1),v=S.useRef(-1),g=(x,T=!0)=>{x.stopPropagation(),t==null||t(x.nativeEvent,n,T)};S.useEffect(()=>{a!==n.id&&p(!1)},[a,n.id]),S.useEffect(()=>{s(h)},[h,s]);const m=()=>{p(!0)};S.useEffect(()=>{a===n.id&&(o&&p(!1),!o&&v.current!==-1&&(u({id:n.id,props:{height:v.current}}),v.current=-1))},[o,a,n.id,u]);const y=S.useCallback(x=>{const T=x[0].contentRect;if(!f.current)return;const L=T.height;n.height!==L&&(o?v.current=L:u({id:n.id,props:{height:L}}))},[n.height,n.id,o,u]);S.useEffect(()=>{const x=new ResizeObserver(y);return f.current&&x.observe(f.current),()=>{f.current&&x.unobserve(f.current),x.disconnect()}},[y]);const _=x=>{u({id:n.id,props:{data:x}}),c()},b=x=>{const T=x.reduce((M,C)=>M+C),L=x.map(M=>M/T);u({id:n.id,props:{width:T,colWidths:L}}),c()},w=x=>{setTimeout(()=>l(x),0)};return Hr(d,()=>(r==null?void 0:r())||[]),S.createElement("div",{className:Bs.editableElementTable,ref:f,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px"}},S.createElement("div",{className:Bs.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`}},S.createElement("div",{ref:d,className:Bs.elementContent},S.createElement(uk,{data:n.data,width:n.width,cellMinHeight:n.cellMinHeight,colWidths:n.colWidths,outline:n.outline,theme:n.theme,editable:h,onChange:_,onChangeColWidths:b,onChangeSelectedCells:w,onMouseDown:x=>x.stopPropagation()}),!h&&S.createElement("div",{className:Bs.tableMask,onDoubleClick:m,onMouseDown:g,onTouchStart:g},a===n.id&&S.createElement("div",{className:Bs.maskTip,style:{transform:`scale(${1/i})`}},"双击编辑")))))},mp={editableElementLatex:"_editableElementLatex_106e3_1",rotateWrapper:"_rotateWrapper_106e3_5",elementContent:"_elementContent_106e3_10"},fk=({elementInfo:e,selectElement:t,contextmenus:r})=>{const n=S.useRef(null),i=o=>{o.stopPropagation(),t==null||t(o.nativeEvent,e)},a=()=>{ca.emit(vi.OPEN_LATEX_EDITOR)};return Hr(n,()=>(r==null?void 0:r())||[]),S.createElement("div",{className:mp.editableElementLatex,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:mp.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{ref:n,className:mp.elementContent,onMouseDown:i,onTouchStart:i,onDoubleClick:a},S.createElement("svg",{overflow:"visible",width:e.width,height:e.height,stroke:e.color,strokeWidth:e.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("g",{transform:`scale(${e.width/e.viewBox[0]}, ${e.height/e.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},S.createElement("path",{d:e.path}))))))},hk=(e,t)=>{S.useEffect(()=>{if(!t.current)return;let r="normal";if(/m3u8(#|\?|$)/i.exec(e)?r="hls":/.flv(#|\?|$)/i.exec(e)&&(r="flv"),t.current&&r==="hls"&&(t.current.canPlayType("application/x-mpegURL")||t.current.canPlayType("application/vnd.apple.mpegURL"))&&(r="normal"),r==="hls"){const n=window.Hls;if(n&&n.isSupported()){const i=new n;return i.loadSource(e),i.attachMedia(t.current),()=>{i.destroy()}}}else if(r==="flv"){const n=window.flvjs;if(n&&n.isSupported()){const i=n.createPlayer({type:"flv",url:e});return i.attachMediaElement(t.current),i.load(),()=>{i.destroy()}}}},[e,t])},Te={videoPlayer:"_videoPlayer_17n95_1",hideController:"_hideController_17n95_8",controllerMask:"_controllerMask_17n95_11",controller:"_controller_17n95_11",videoWrap:"_videoWrap_17n95_20",bgCanvas:"_bgCanvas_17n95_27",video:"_video_17n95_1",loadError:"_loadError_17n95_43",barWrap:"_barWrap_17n95_79",bar:"_bar_17n95_79",played:"_played_17n95_87",thumb:"_thumb_17n95_87",barTime:"_barTime_17n95_90",barTimeHidden:"_barTimeHidden_17n95_107",loaded:"_loaded_17n95_117",icons:"_icons_17n95_150",time:"_time_17n95_157",icon:"_icon_17n95_150",playIcon:"_playIcon_17n95_174",iconContent:"_iconContent_17n95_177",loopIcon:"_loopIcon_17n95_182",speedIcon:"_speedIcon_17n95_188",speedMenu:"_speedMenu_17n95_192",speedMenuItem:"_speedMenuItem_17n95_201",volume:"_volume_17n95_212",volumeBarWrap:"_volumeBarWrap_17n95_219",volumeBar:"_volumeBar_17n95_219",volumeBarInner:"_volumeBarInner_17n95_222",volumeActive:"_volumeActive_17n95_225",loop:"_loop_17n95_182",iconsRight:"_iconsRight_17n95_272",speedMenuItemActive:"_speedMenuItemActive_17n95_275",iconActive:"_iconActive_17n95_279",bezel:"_bezel_17n95_283",bezelIcon:"_bezelIcon_17n95_294",bezelTransition:"_bezelTransition_17n95_311","bezel-hide":"_bezel-hide_17n95_1"},dk=({width:e,height:t,src:r,poster:n="",autoplay:i=!1,scale:a=1})=>{const o=S.useRef(null),s=S.useRef(null),l=S.useRef(null),u=S.useRef(null),[c,f]=S.useState(.5),[d,h]=S.useState(!0),[p,v]=S.useState(0),[g,m]=S.useState(0),[y,_]=S.useState(0),[b,w]=S.useState(!1),[x,T]=S.useState(!1),[L,M]=S.useState(1),[C,E]=S.useState(!1),[P,D]=S.useState(!1),[k,N]=S.useState("00:00"),[I,O]=S.useState("0"),[z,$]=S.useState(!1),[R,B]=S.useState(!1);hk(r,o);const H=(ue=0)=>{if(ue===0||isNaN(ue))return"00:00";const lr=ev=>ev<10?"0"+ev:""+ev,Dt=Math.floor(ue/3600),Tn=Math.floor((ue-Dt*3600)/60),b7=Math.floor(ue-Dt*3600-Tn*60);return(Dt>0?[Dt,Tn,b7]:[Tn,b7]).map(lr).join(":")},F=S.useMemo(()=>H(p),[p]),A=S.useMemo(()=>H(g),[g]),G=S.useMemo(()=>(g?p/g*100:0)+"%",[p,g]),Z=S.useMemo(()=>(g?y/g*100:0)+"%",[y,g]),Q=S.useMemo(()=>c*100+"%",[c]),q=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],W=S.useRef(null),j=S.useCallback(()=>{B(!1),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{o.current&&!o.current.paused&&B(!0)},3e3)},[]),Y=()=>{o.current&&(h(!1),o.current.play(),T(!0),j())},re=()=>{o.current&&(h(!0),o.current.pause(),T(!0),j())},te=()=>{d?Y():re()},ne=ue=>{o.current&&(ue=Math.max(ue,0),ue=Math.min(ue,g),o.current.currentTime=ue,v(ue))},ge=ue=>{o.current&&(ue=Math.max(ue,0),ue=Math.min(ue,1),o.current.volume=ue,f(ue),o.current.muted&&ue!==0&&(o.current.muted=!1))},Se=ue=>{o.current&&(o.current.playbackRate=ue),M(ue)},ie=()=>{o.current&&(o.current.muted?(o.current.muted=!1,ge(.5)):(o.current.muted=!0,ge(0)))},Ee=()=>{w(!b)},K=()=>{var ue;return m(((ue=o.current)==null?void 0:ue.duration)||0)},le=()=>{var ue;return v(((ue=o.current)==null?void 0:ue.currentTime)||0)},U=()=>{b?(ne(0),Y()):re()},X=()=>{o.current&&o.current.buffered.length&&_(o.current.buffered.end(o.current.buffered.length-1))},ee=()=>E(!0),J=ue=>ue.getBoundingClientRect().left,ce=S.useCallback(ue=>{if(!o.current||!s.current)return;let Dt=(("clientX"in ue?ue.clientX:ue.changedTouches[0].clientX)-J(s.current))/s.current.clientWidth;Dt=Math.max(Dt,0),Dt=Math.min(Dt,1);const Tn=Dt*g;o.current.currentTime=Tn,v(Tn)},[g]),de=S.useCallback(ue=>{ce(ue),document.removeEventListener("mousemove",ce),document.removeEventListener("touchmove",ce),document.removeEventListener("mouseup",de),document.removeEventListener("touchend",de)},[ce]),pe=()=>{document.addEventListener("mousemove",ce),document.addEventListener("touchmove",ce),document.addEventListener("mouseup",de),document.addEventListener("touchend",de)},qe=ue=>{if(g&&s.current){const lr=s.current.getBoundingClientRect().left,Dt=ue.clientX-lr;if(Dt<0||Dt>s.current.offsetWidth)return;const Tn=g*(Dt/s.current.offsetWidth);O(`${Dt-(Tn>=3600?25:20)}px`),N(H(Tn)),D(!0)}},et=S.useCallback(ue=>{if(!l.current)return;const Dt=(("clientX"in ue?ue.clientX:ue.changedTouches[0].clientX)-J(l.current))/45;ge(Dt)},[]),He=S.useCallback(()=>{document.removeEventListener("mousemove",et),document.removeEventListener("touchmove",et),document.removeEventListener("mouseup",He),document.removeEventListener("touchend",He)},[et]),Ct=()=>{document.addEventListener("mousemove",et),document.addEventListener("touchmove",et),document.addEventListener("mouseup",He),document.addEventListener("touchend",He)},Rt=ue=>{if(!l.current)return;const lr=(ue.clientX-J(l.current))/45;ge(lr)};return S.useEffect(()=>{if(!u.current||!o.current)return;const ue=u.current.getContext("2d");if(!ue)return;const lr=()=>{o.current.requestVideoFrameCallback(()=>{o.current&&u.current&&ue.drawImage(o.current,0,0,u.current.width,u.current.height)})};o.current.addEventListener("loadedmetadata",lr,{once:!0})},[]),S.createElement("div",{className:Me(Te.videoPlayer,{[Te.hideController]:R}),style:{width:e*a+"px",height:t*a+"px",transform:`scale(${1/a})`},onMouseMove:j,onClick:j},S.createElement("div",{className:Te.videoWrap,onClick:te},C&&S.createElement("div",{className:Te.loadError},"视频加载失败"),S.createElement("canvas",{ref:u,className:Te.bgCanvas}),S.createElement("video",{className:Te.video,ref:o,src:r,autoPlay:i,poster:n,playsInline:!0,crossOrigin:"anonymous",onDurationChange:K,onTimeUpdate:le,onEnded:U,onProgress:X,onPlay:()=>{j(),h(!1)},onPause:()=>j(),onError:ee}),S.createElement("div",{className:Te.bezel},S.createElement("span",{className:Me(Te.bezelIcon,{[Te.bezelTransition]:x}),onAnimationEnd:()=>T(!1)},d?S.createElement(At.Pause,null):S.createElement(At.PlayOne,null)))),S.createElement("div",{className:Te.controllerMask}),S.createElement("div",{className:Te.controller},S.createElement("div",{className:Te.icons},S.createElement("div",{className:Me(Te.icon,Te.playIcon),onClick:ue=>{ue.stopPropagation(),te()}},S.createElement("span",{className:Te.iconContent},d?S.createElement(At.PlayOne,null):S.createElement(At.Pause,null))),S.createElement("div",{className:Te.volume},S.createElement("div",{className:Me(Te.icon,Te.volumeIcon),onClick:ue=>{ue.stopPropagation(),ie()}},S.createElement("span",{className:Te.iconContent},c===0?S.createElement(At.VolumeMute,null):c===1?S.createElement(At.VolumeNotice,null):S.createElement(At.VolumeSmall,null))),S.createElement("div",{className:Te.volumeBarWrap,onMouseDown:ue=>{ue.stopPropagation(),Ct()},onTouchStart:ue=>{ue.stopPropagation(),Ct()},onClick:ue=>{ue.stopPropagation(),Rt(ue)}},S.createElement("div",{className:Te.volumeBar,ref:l},S.createElement("div",{className:Te.volumeBarInner,style:{width:Q}},S.createElement("span",{className:Te.thumb}))))),S.createElement("span",{className:Te.time},S.createElement("span",{className:Te.ptime},F)," /"," ",S.createElement("span",{className:Te.dtime},A))),S.createElement("div",{className:Me(Te.icons,Te.iconsRight)},S.createElement("div",{className:Te.speed},S.createElement("div",{className:Me(Te.icon,Te.speedIcon),onMouseLeave:()=>$(!1)},S.createElement("span",{className:Te.iconContent,onClick:ue=>{ue.stopPropagation(),$(!z)}},L===1?"倍速":L+"x"),z&&S.createElement("div",{className:Te.speedMenu},q.map(ue=>S.createElement("div",{key:ue.label,className:Me(Te.speedMenuItem,{[Te.speedMenuItemActive]:ue.value===L}),onClick:lr=>{lr.stopPropagation(),Se(ue.value),$(!1)}},ue.label))))),S.createElement("div",{className:Te.loop,onClick:ue=>{ue.stopPropagation(),Ee()}},S.createElement("div",{className:Me(Te.icon,Te.loopIcon,{[Te.iconActive]:b})},S.createElement("span",{className:Te.iconContent},"循环",b?"开":"关")))),S.createElement("div",{className:Te.barWrap,ref:s,onMouseDown:ue=>{ue.stopPropagation(),pe()},onTouchStart:ue=>{ue.stopPropagation(),pe()},onMouseMove:qe,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),onClick:ue=>ue.stopPropagation()},S.createElement("div",{className:Me(Te.barTime,{[Te.barTimeHidden]:!P}),style:{left:I}},k),S.createElement("div",{className:Te.bar},S.createElement("div",{className:Te.loaded,style:{width:Z}}),S.createElement("div",{className:Te.played,style:{width:G}},S.createElement("span",{className:Te.thumb}))))))},$s={editableElementVideo:"_editableElementVideo_92vvh_1",rotateWrapper:"_rotateWrapper_92vvh_5",elementContent:"_elementContent_92vvh_10",handlerBorder:"_handlerBorder_92vvh_16",t:"_t_92vvh_21",b:"_b_92vvh_28",l:"_l_92vvh_35",r:"_r_92vvh_5"},pk=({elementInfo:e,selectElement:t,contextmenus:r})=>{const n=e,{canvasScale:i}=_e(),a=S.useRef(null),o=(s,l=!0)=>{s.stopPropagation(),t==null||t(s.nativeEvent,n,l)};return Hr(a,()=>(r==null?void 0:r())||[]),S.createElement("div",{className:$s.editableElementVideo,style:{top:n.top+"px",left:n.left+"px",width:n.width+"px",height:n.height+"px"}},S.createElement("div",{className:$s.rotateWrapper,style:{transform:`rotate(${n.rotate}deg)`}},S.createElement("div",{className:$s.elementContent,ref:a,onMouseDown:s=>o(s,!1),onTouchStart:s=>o(s,!1)},S.createElement(dk,{width:n.width,height:n.height,src:n.src,poster:n.poster,scale:i}),["t","b","l","r"].map(s=>S.createElement("div",{key:s,className:`${$s.handlerBorder} ${$s[s]}`,onMouseDown:l=>o(l),onTouchStart:l=>o(l)})))))},it={audioPlayer:"_audioPlayer_1156v_1",controller:"_controller_1156v_11",barWrap:"_barWrap_1156v_21",bar:"_bar_1156v_21",played:"_played_1156v_29",thumb:"_thumb_1156v_29",barTime:"_barTime_1156v_32",barTimeHidden:"_barTimeHidden_1156v_49",loaded:"_loaded_1156v_59",icons:"_icons_1156v_92",icon:"_icon_1156v_92",playIcon:"_playIcon_1156v_109",iconContent:"_iconContent_1156v_112",iconActive:"_iconActive_1156v_120",volume:"_volume_1156v_123",volumeBarWrap:"_volumeBarWrap_1156v_130",volumeBar:"_volumeBar_1156v_130",volumeBarInner:"_volumeBarInner_1156v_133",volumeActive:"_volumeActive_1156v_136",time:"_time_1156v_179",ptime:"_ptime_1156v_193",dtime:"_dtime_1156v_196"},vk=S.forwardRef(({src:e,loop:t=!1,autoplay:r=!1,scale:n=1,className:i,style:a,onMouseDown:o},s)=>{const l=S.useRef(null),u=S.useRef(null),c=S.useRef(null),[f,d]=S.useState(.5),[h,p]=S.useState(!0),[v,g]=S.useState(0),[m,y]=S.useState(0),[_,b]=S.useState(0),[w,x]=S.useState(!1),[T,L]=S.useState("00:00"),[M,C]=S.useState("0"),E=(ie=0)=>{if(ie===0||isNaN(ie))return"00:00";const Ee=X=>X<10?"0"+X:""+X,K=Math.floor(ie/3600),le=Math.floor((ie-K*3600)/60),U=Math.floor(ie-K*3600-le*60);return(K>0?[K,le,U]:[le,U]).map(Ee).join(":")},P=S.useMemo(()=>E(v),[v]),D=S.useMemo(()=>E(m),[m]),k=S.useMemo(()=>(m?v/m*100:0)+"%",[v,m]),N=S.useMemo(()=>(m?_/m*100:0)+"%",[_,m]),I=S.useMemo(()=>f*100+"%",[f]),O=()=>{l.current&&(p(!1),l.current.play())},z=()=>{l.current&&(p(!0),l.current.pause())},$=()=>{h?O():z()};S.useImperativeHandle(s,()=>({toggle:$}));const R=ie=>{l.current&&(ie=Math.max(ie,0),ie=Math.min(ie,m),l.current.currentTime=ie,g(ie))},B=ie=>{l.current&&(ie=Math.max(ie,0),ie=Math.min(ie,1),l.current.volume=ie,d(ie),l.current.muted&&ie!==0&&(l.current.muted=!1))},H=()=>{l.current&&(l.current.muted?(l.current.muted=!1,B(.5)):(l.current.muted=!0,B(0)))},F=()=>{var ie;return y(((ie=l.current)==null?void 0:ie.duration)||0)},A=()=>{var ie;return g(((ie=l.current)==null?void 0:ie.currentTime)||0)},G=()=>{t?(R(0),O()):z()},Z=()=>{l.current&&l.current.buffered.length&&b(l.current.buffered.end(l.current.buffered.length-1))},Q=()=>console.error("音频加载失败"),q=ie=>ie.getBoundingClientRect().left,W=S.useCallback(ie=>{if(!l.current||!u.current)return;let K=(("clientX"in ie?ie.clientX:ie.changedTouches[0].clientX)-q(u.current))/u.current.clientWidth;K=Math.max(K,0),K=Math.min(K,1);const le=K*m;l.current.currentTime=le,g(le)},[m]),j=S.useCallback(ie=>{W(ie),document.removeEventListener("mousemove",W),document.removeEventListener("touchmove",W),document.removeEventListener("mouseup",j),document.removeEventListener("touchend",j)},[W]),Y=()=>{document.addEventListener("mousemove",W),document.addEventListener("touchmove",W),document.addEventListener("mouseup",j),document.addEventListener("touchend",j)},re=ie=>{if(m&&u.current){const Ee=u.current.getBoundingClientRect().left,K=ie.clientX-Ee;if(K<0||K>u.current.offsetWidth)return;const le=m*(K/u.current.offsetWidth);C(`${K-(le>=3600?25:20)}px`),L(E(le)),x(!0)}},te=S.useCallback(ie=>{if(!c.current)return;const K=(("clientX"in ie?ie.clientX:ie.changedTouches[0].clientX)-q(c.current))/45;B(K)},[]),ne=S.useCallback(()=>{document.removeEventListener("mousemove",te),document.removeEventListener("touchmove",te),document.removeEventListener("mouseup",ne),document.removeEventListener("touchend",ne)},[te]),ge=()=>{document.addEventListener("mousemove",te),document.addEventListener("touchmove",te),document.addEventListener("mouseup",ne),document.addEventListener("touchend",ne)},Se=ie=>{if(!c.current)return;const Ee=(ie.clientX-q(c.current))/45;B(Ee)};return S.createElement("div",{className:Me(it.audioPlayer,i),style:{transform:`scale(${1/n})`,...a},onMouseDown:o},S.createElement("audio",{className:it.audio,ref:l,src:e,autoPlay:r,onDurationChange:F,onTimeUpdate:A,onPlay:()=>p(!1),onEnded:G,onProgress:Z,onError:Q}),S.createElement("div",{className:it.controller},S.createElement("div",{className:it.icons},S.createElement("div",{className:Me(it.icon,it.playIcon),onClick:$},S.createElement("span",{className:it.iconContent},h?S.createElement(At.PlayOne,null):S.createElement(At.Pause,null))),S.createElement("div",{className:it.volume},S.createElement("div",{className:Me(it.icon,it.volumeIcon),onClick:H},S.createElement("span",{className:it.iconContent},f===0?S.createElement(At.VolumeMute,null):f===1?S.createElement(At.VolumeNotice,null):S.createElement(At.VolumeSmall,null))),S.createElement("div",{className:it.volumeBarWrap,onMouseDown:ge,onTouchStart:ge,onClick:Se},S.createElement("div",{className:it.volumeBar,ref:c},S.createElement("div",{className:it.volumeBarInner,style:{width:I}},S.createElement("span",{className:it.thumb})))))),S.createElement("span",{className:it.time},S.createElement("span",{className:it.ptime},P)," /"," ",S.createElement("span",{className:it.dtime},D)),S.createElement("div",{className:it.barWrap,ref:u,onMouseDown:Y,onTouchStart:Y,onMouseMove:re,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},S.createElement("div",{className:Me(it.barTime,{[it.barTimeHidden]:!w}),style:{left:M}},T),S.createElement("div",{className:it.bar},S.createElement("div",{className:it.loaded,style:{width:N}}),S.createElement("div",{className:it.played,style:{width:k}},S.createElement("span",{className:it.thumb}))))))}),Rs={editableElementAudio:"_editableElementAudio_nmvrn_1",rotateWrapper:"_rotateWrapper_nmvrn_5",elementContent:"_elementContent_nmvrn_10",audioIcon:"_audioIcon_nmvrn_18",audioPlayer:"_audioPlayer_nmvrn_22"},gk=({elementInfo:e,selectElement:t,contextmenus:r})=>{const{canvasScale:n,handleElementId:i}=_e(),{viewportRatio:a,viewportSize:o}=ke(),s=S.useRef(null),l=S.useMemo(()=>Math.min(e.width,e.height)+"px",[e.width,e.height]),u=S.useMemo(()=>{const f=o,d=o*a,h=280/n,p=50/n,v=e.width,g=e.height,m=e.left,y=e.top;let _=0,b=g;return m+h>=f&&(_=v-h),y+g+p>=d&&(b=-p),{left:_+"px",top:b+"px"}},[o,a,n,e.width,e.height,e.left,e.top]),c=f=>{f.stopPropagation(),t==null||t(f.nativeEvent,e)};return Hr(s,()=>(r==null?void 0:r())||[]),S.createElement("div",{className:Rs.editableElementAudio,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:Rs.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{ref:s,className:Rs.elementContent,onMouseDown:f=>c(f),onTouchStart:f=>c(f)},S.createElement(At.VolumeNotice,{className:Rs.audioIcon,style:{fontSize:l,color:e.color}}),i===e.id&&S.createElement(vk,{className:Rs.audioPlayer,style:{...u},src:e.src,loop:e.loop,scale:n,onMouseDown:f=>f.stopPropagation()}))))},mk=({elementInfo:e,elementIndex:t,isMultiSelect:r,selectElement:n})=>{const{orderElement:i}=R6(),{alignElementToCanvas:a}=V6(),{deleteElement:o}=Av(),{copyElement:s,pasteElement:l,cutElement:u}=z6(),c=S.useRef(null),f=S.useMemo(()=>({[Ge.IMAGE]:Z6,[Ge.TEXT]:B8,[Ge.SHAPE]:$8,[Ge.LINE]:R8,[Ge.CHART]:ok,[Ge.TABLE]:ck,[Ge.LATEX]:fk,[Ge.VIDEO]:pk,[Ge.AUDIO]:gk})[e.type]||null,[e.type]),d=()=>[{text:"剪切",subText:"Ctrl + X",handler:u},{text:"复制",subText:"Ctrl + C",handler:s},{text:"粘贴",subText:"Ctrl + V",handler:l},{divider:!0},{text:"水平居中",handler:()=>a(_t.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>a(_t.CENTER)},{text:"水平居中",handler:()=>a(_t.HORIZONTAL)},{text:"左对齐",handler:()=>a(_t.LEFT)},{text:"右对齐",handler:()=>a(_t.RIGHT)}]},{text:"垂直居中",handler:()=>a(_t.VERTICAL),children:[{text:"水平垂直居中",handler:()=>a(_t.CENTER)},{text:"垂直居中",handler:()=>a(_t.VERTICAL)},{text:"顶部对齐",handler:()=>a(_t.TOP)},{text:"底部对齐",handler:()=>a(_t.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:r&&!e.groupId,handler:()=>i(e,Mr.TOP),children:[{text:"置于顶层",handler:()=>i(e,Mr.TOP)},{text:"上移一层",handler:()=>i(e,Mr.UP)}]},{text:"置于底层",disable:r&&!e.groupId,handler:()=>i(e,Mr.BOTTOM),children:[{text:"置于底层",handler:()=>i(e,Mr.BOTTOM)},{text:"下移一层",handler:()=>i(e,Mr.DOWN)}]},{divider:!0},{text:"删除",subText:"Delete",handler:o}];return Hr(c,d),f?S.createElement("div",{ref:c,className:"editable-element",id:`editable-element-${e.id}`,style:{zIndex:t}},S.createElement(f,{elementInfo:e,selectElement:n,contextmenus:d})):null},yk=()=>{const{updateElement:e,removeElementProps:t}=ke(),{addHistorySnapshot:r}=wt();return{setLink:(a,o)=>{const s=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(o.type==="web"&&!s.test(o.target))return console.error("不是正确的网页链接地址"),!1;if(o.type==="slide"&&!o.target)return console.error("请先选择链接目标"),!1;const l={link:o};return e({id:a.id,props:l}),r(),!0},removeLink:a=>{t({id:a.id,propName:"link"}),r()}}},Vs={baseElementImage:"_baseElementImage_1yw1u_1",rotateWrapper:"_rotateWrapper_1yw1u_5",elementContent:"_elementContent_1yw1u_10",imageContent:"_imageContent_1yw1u_15",colorMask:"_colorMask_1yw1u_24"},_k=({elementInfo:e})=>{const{shadowStyle:t}=En(e.shadow),{flipStyle:r}=dl(e.flipH,e.flipV),{clipShape:n,imgPosition:i}=cf(e),{filter:a}=Iv(e.filters);return S.createElement("div",{className:Vs.baseElementImage,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:Vs.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:Vs.elementContent,style:{filter:t?`drop-shadow(${t})`:"",transform:r}},S.createElement(Bv,{elementInfo:e}),S.createElement("div",{className:Vs.imageContent,style:{clipPath:n.style}},S.createElement("img",{src:e.src,draggable:!1,style:{top:i.top,left:i.left,width:i.width,height:i.height,filter:a},alt:""}),e.colorMask&&S.createElement("div",{className:Vs.colorMask,style:{backgroundColor:e.colorMask}})))))},zs={baseElementText:"_baseElementText_emqg1_1",rotateWrapper:"_rotateWrapper_emqg1_5",elementContent:"_elementContent_emqg1_10",text:"_text_emqg1_16",thumbnail:"_thumbnail_emqg1_19"},bk=({elementInfo:e,target:t})=>{const{shadowStyle:r}=En(e.shadow);return S.createElement("div",{className:zs.baseElementText,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:zs.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:zs.elementContent,style:{width:e.vertical?"auto":e.width+"px",height:e.vertical?e.height+"px":"auto",backgroundColor:e.fill,opacity:e.opacity,textShadow:r,lineHeight:e.lineHeight,letterSpacing:(e.wordSpace||0)+"px",color:e.defaultColor,fontFamily:e.defaultFontName,writingMode:e.vertical?"vertical-rl":"horizontal-tb"}},S.createElement(pl,{width:e.width,height:e.height,outline:e.outline}),S.createElement("div",{className:Me(zs.text,"ProseMirror-static",{[zs.thumbnail]:t==="thumbnail"}),style:{"--paragraphSpace":`${e.paragraphSpace===void 0?5:e.paragraphSpace}px`},dangerouslySetInnerHTML:{__html:e.content}}))))},Fs={baseElementShape:"_baseElementShape_16w80_1",rotateWrapper:"_rotateWrapper_16w80_5",elementContent:"_elementContent_16w80_10",shapeText:"_shapeText_16w80_21",top:"_top_16w80_34",middle:"_middle_16w80_38",bottom:"_bottom_16w80_42"},Sk=({elementInfo:e})=>{const{theme:t}=ke(),{fill:r}=Gv(e,"base"),{outlineWidth:n,outlineColor:i,strokeDashArray:a}=ua(e.outline),{shadowStyle:o}=En(e.shadow),{flipStyle:s}=dl(e.flipH,e.flipV),l=S.useMemo(()=>{const u={content:"",align:"middle",defaultFontName:t.fontName,defaultColor:t.fontColor};return e.text?e.text:u},[e.text,t]);return S.createElement("div",{className:Fs.baseElementShape,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:Fs.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:Fs.elementContent,style:{opacity:e.opacity,filter:o?`drop-shadow(${o})`:"",transform:s,color:l.defaultColor,fontFamily:l.defaultFontName}},S.createElement("svg",{overflow:"visible",width:e.width,height:e.height},S.createElement("defs",null,e.pattern?S.createElement(Xv,{id:`base-pattern-${e.id}`,src:e.pattern}):e.gradient?S.createElement(Wv,{id:`base-gradient-${e.id}`,type:e.gradient.type,colors:e.gradient.colors,rotate:e.gradient.rotate}):null),S.createElement("g",{transform:`scale(${e.width/e.viewBox[0]}, ${e.height/e.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},S.createElement("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"butt",strokeMiterlimit:"8",d:e.path,fill:r,stroke:i,strokeWidth:n,strokeDasharray:a}))),S.createElement("div",{className:Me(Fs.shapeText,Fs[l.align])},S.createElement("div",{className:"ProseMirror-static",dangerouslySetInnerHTML:{__html:l.content}})))))},u3={baseElementLine:"_baseElementLine_135s9_1",elementContent:"_elementContent_135s9_5"},wk=({elementInfo:e})=>{const{shadowStyle:t}=En(e.shadow),r=S.useMemo(()=>{const l=Math.abs(e.start[0]-e.end[0]);return l<24?24:l},[e.start,e.end]),n=S.useMemo(()=>{const l=Math.abs(e.start[1]-e.end[1]);return l<24?24:l},[e.start,e.end]),i=S.useMemo(()=>{const l=e.width;return e.style==="dashed"?l<=8?`${l*5} ${l*2.5}`:`${l*5} ${l*1.5}`:e.style==="dotted"?l<=8?`${l*1.8} ${l*1.6}`:`${l*1.5} ${l*1.2}`:"0 0"},[e.width,e.style]),a=S.useMemo(()=>af(e),[e]),o=e.points[0],s=e.points[1];return S.createElement("div",{className:u3.baseElementLine,style:{top:e.top+"px",left:e.left+"px"}},S.createElement("div",{className:u3.elementContent,style:{filter:t?`drop-shadow(${t})`:""}},S.createElement("svg",{overflow:"visible",width:r,height:n},S.createElement("defs",null,o&&S.createElement(vl,{id:e.id,position:"start",type:o,color:e.color,baseSize:e.width}),s&&S.createElement(vl,{id:e.id,position:"end",type:s,color:e.color,baseSize:e.width})),S.createElement("path",{d:a,stroke:e.color,strokeWidth:e.width,strokeDasharray:i,fill:"none",markerStart:o?`url(#${e.id}-${o}-start)`:"",markerEnd:s?`url(#${e.id}-${s}-end)`:""}))))},yp={baseElementChart:"_baseElementChart_1cqxu_1",isThumbnail:"_isThumbnail_1cqxu_4",rotateWrapper:"_rotateWrapper_1cqxu_8",elementContent:"_elementContent_1cqxu_13"},xk=({elementInfo:e})=>S.createElement("div",{className:yp.baseElementChart,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:yp.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:yp.elementContent,style:{backgroundColor:e.fill}},S.createElement(pl,{width:e.width,height:e.height,outline:e.outline}),S.createElement(i3,{width:e.width,height:e.height,type:e.chartType,data:e.data,themeColors:e.themeColors,textColor:e.textColor,lineColor:e.lineColor,options:e.options})))),oi={staticTable:"_staticTable_hc5uz_1",theme:"_theme_hc5uz_19",cell:"_cell_hc5uz_22",rowHeader:"_rowHeader_hc5uz_28",rowFooter:"_rowFooter_hc5uz_31",colHeader:"_colHeader_hc5uz_34",colFooter:"_colFooter_hc5uz_37",cellText:"_cellText_hc5uz_47"},Tk=({data:e,width:t,cellMinHeight:r,colWidths:n,outline:i,theme:a,editable:o=!0})=>{const[s,l]=S.useState([]);S.useEffect(()=>{l(n.map(h=>h*t))},[n,t]);const u=S.useMemo(()=>s.reduce((h,p)=>h+p,0),[s]),{hideCells:c}=s3(e),{subThemeColor:f}=l3(a),d=S.useMemo(()=>a?{"--themeColor":a.color,"--subThemeColor1":f[0],"--subThemeColor2":f[1]}:{},[a,f]);return S.createElement("div",{className:oi.staticTable,style:{width:u+"px"}},S.createElement("table",{className:Me({[oi.theme]:a,[oi.rowHeader]:a==null?void 0:a.rowHeader,[oi.rowFooter]:a==null?void 0:a.rowFooter,[oi.colHeader]:a==null?void 0:a.colHeader,[oi.colFooter]:a==null?void 0:a.colFooter}),style:d},S.createElement("colgroup",null,s.map((h,p)=>S.createElement("col",{key:p,span:1,width:h}))),S.createElement("tbody",null,e.map((h,p)=>S.createElement("tr",{key:p,style:{height:r+"px"}},h.map((v,g)=>c.includes(`${p}_${g}`)?null:S.createElement("td",{key:v.id,className:oi.cell,style:{borderStyle:i.style,borderColor:i.color,borderWidth:i.width+"px",...a3(v.style)},rowSpan:v.rowspan,colSpan:v.colspan},S.createElement("div",{className:oi.cellText,style:{minHeight:r-4+"px"},dangerouslySetInnerHTML:{__html:o3(v.text)}}))))))))},_p={baseElementTable:"_baseElementTable_uo3vw_1",rotateWrapper:"_rotateWrapper_uo3vw_5",elementContent:"_elementContent_uo3vw_10"},Lk=({elementInfo:e})=>S.createElement("div",{className:_p.baseElementTable,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px"}},S.createElement("div",{className:_p.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:_p.elementContent},S.createElement(Tk,{data:e.data,width:e.width,cellMinHeight:e.cellMinHeight,colWidths:e.colWidths,outline:e.outline,theme:e.theme})))),bp={baseElementLatex:"_baseElementLatex_ybsi7_1",rotateWrapper:"_rotateWrapper_ybsi7_5",elementContent:"_elementContent_ybsi7_10"},Ek=({elementInfo:e})=>S.createElement("div",{className:bp.baseElementLatex,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:bp.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:bp.elementContent},S.createElement("svg",{overflow:"visible",width:e.width,height:e.height,stroke:e.color,strokeWidth:e.strokeWidth,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("g",{transform:`scale(${e.width/e.viewBox[0]}, ${e.height/e.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},S.createElement("path",{d:e.path})))))),Ac={baseElementVideo:"_baseElementVideo_vw6yo_1",rotateWrapper:"_rotateWrapper_vw6yo_5",elementContent:"_elementContent_vw6yo_10",icon:"_icon_vw6yo_22"},Mk=({elementInfo:e})=>S.createElement("div",{className:Ac.baseElementVideo,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:Ac.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:Ac.elementContent,style:{backgroundImage:e.poster?`url(${e.poster})`:""}},S.createElement("div",{className:Ac.icon},S.createElement(At.PlayOne,null))))),kc={baseElementAudio:"_baseElementAudio_1jxzq_1",rotateWrapper:"_rotateWrapper_1jxzq_5",elementContent:"_elementContent_1jxzq_10",audioIcon:"_audioIcon_1jxzq_18"},Ck=({elementInfo:e})=>{const t=S.useMemo(()=>Math.min(e.width,e.height)+"px",[e.width,e.height]);return S.createElement("div",{className:kc.baseElementAudio,style:{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"}},S.createElement("div",{className:kc.rotateWrapper,style:{transform:`rotate(${e.rotate}deg)`}},S.createElement("div",{className:kc.elementContent,style:{color:e.color}},S.createElement(At.VolumeNotice,{className:kc.audioIcon,style:{fontSize:t,color:e.color}}))))},Dk=({elementInfo:e,elementIndex:t})=>{const r=S.useMemo(()=>({[Ge.IMAGE]:_k,[Ge.TEXT]:bk,[Ge.SHAPE]:Sk,[Ge.LINE]:wk,[Ge.CHART]:xk,[Ge.TABLE]:Lk,[Ge.LATEX]:Ek,[Ge.VIDEO]:Mk,[Ge.AUDIO]:Ck})[e.type]||null,[e.type]);return S.createElement("div",{className:Me("thumbnail-element",`base-element-${e.id}`),style:{zIndex:t}},S.createElement(r,{elementInfo:e}))},Pc={"thumbnail-slide":"_thumbnail-slide_o3c1m_1",elements:"_elements_o3c1m_7",background:"_background_o3c1m_11",placeholder:"_placeholder_o3c1m_18"},c3=({slide:e,size:t,visible:r=!0,className:n})=>{const{viewportRatio:i,viewportSize:a}=ke(),{backgroundStyle:o}=Lv(e.background),s=S.useMemo(()=>t/a,[t,a]);return S.createElement("div",{className:Me(Pc["thumbnail-slide"],n),style:{width:t,height:t*i}},r?S.createElement("div",{className:Pc.elements,style:{width:a,height:a*i,transform:`scale(${s})`}},S.createElement("div",{className:Pc.background,style:o}),e.elements.map((l,u)=>S.createElement(Dk,{key:l.id,elementInfo:l,elementIndex:u+1}))):S.createElement("div",{className:Pc.placeholder},"加载中 ..."))},$t={linkDialogMask:"_linkDialogMask_1kfou_1",linkDialog:"_linkDialog_1kfou_1",tabs:"_tabs_1kfou_26",tab:"_tab_1kfou_26",active:"_active_1kfou_38",content:"_content_1kfou_44",input:"_input_1kfou_50",preview:"_preview_1kfou_60",thumbnail:"_thumbnail_1kfou_64",btns:"_btns_1kfou_75",btn:"_btn_1kfou_75",primary:"_primary_1kfou_91"},Ak=({onClose:e})=>{const{handleElementId:t,setDisableHotkeysState:r}=_e(),{slides:n,currentSlide:i}=ke(),[a,o]=S.useState("web"),[s,l]=S.useState(""),[u,c]=S.useState(""),{setLink:f}=yk(),d=S.useRef(null),h=S.useMemo(()=>n.map((g,m)=>({label:`幻灯片 ${m+1}`,value:g.id,disabled:(i==null?void 0:i.id)===g.id})),[n,i]),p=S.useMemo(()=>u&&n.find(g=>g.id===u)||null,[u,n]);S.useEffect(()=>{r(!0);const g=n.find(y=>y.id!==(i==null?void 0:i.id));g&&c(g.id);const m=(i==null?void 0:i.elements.find(y=>y.id===t))||null;return m!=null&&m.link&&(o(m.link.type),m.link.type==="web"?l(m.link.target):m.link.type==="slide"&&c(m.link.target)),a==="web"&&setTimeout(()=>{var y;return(y=d.current)==null?void 0:y.focus()},0),()=>{r(!1)}},[]);const v=()=>{const g={type:a,target:a==="web"?s:u},m=(i==null?void 0:i.elements.find(y=>y.id===t))||null;m&&(f(m,g)?e():l(""))};return S.createElement("div",{className:$t.linkDialogMask,onClick:e},S.createElement("div",{className:$t.linkDialog,onClick:g=>g.stopPropagation()},S.createElement("div",{className:$t.tabs},S.createElement("div",{className:Me($t.tab,{[$t.active]:a==="web"}),onClick:()=>o("web")},"网页链接"),S.createElement("div",{className:Me($t.tab,{[$t.active]:a==="slide"}),onClick:()=>o("slide")},"幻灯片页面")),S.createElement("div",{className:$t.content},a==="web"?S.createElement("input",{ref:d,className:$t.input,type:"text",value:s,onChange:g=>l(g.target.value),onKeyDown:g=>g.key==="Enter"&&v(),placeholder:"请输入网页链接地址"}):S.createElement(S.Fragment,null,S.createElement("select",{className:$t.input,value:u,onChange:g=>c(g.target.value)},h.map(g=>S.createElement("option",{key:g.value,value:g.value,disabled:g.disabled},g.label))),p&&S.createElement("div",{className:$t.preview},S.createElement("div",null,"预览:"),S.createElement(c3,{className:$t.thumbnail,slide:p,size:500})))),S.createElement("div",{className:$t.btns},S.createElement("button",{className:$t.btn,onClick:e},"取消"),S.createElement("button",{className:Me($t.btn,$t.primary),onClick:v},"确认"))))},Sp={canvas:"_canvas_r5284_1",dragMask:"_dragMask_r5284_9",viewportWrapper:"_viewportWrapper_r5284_18",viewport:"_viewport_r5284_18"},kk=({renderPageExtra:e})=>{const{canvasScale:t,activeElementIdList:r,handleElementId:n,activeGroupElementId:i,hiddenElementIdList:a,creatingElement:o,creatingCustomShape:s,setActiveElementIdList:l,setActiveGroupElementId:u,editorAreaFocus:c,textFormatPainter:f,setEditorareaFocus:d,setTextFormatPainter:h}=_e(),{currentSlide:p,slideIndex:v}=ke(),{spaceKeyState:g}=cr(),{createCustomShapeElement:m,createTextElement:y}=ho(),{updateSlideIndex:_}=r6(),b=S.useRef(null),w=S.useRef(null),[x,T]=S.useState(!1),L=(p==null?void 0:p.elements)||[],[M,C]=S.useState([]),E=K=>{const le=ke.getState().currentSlide;if(!le)return;const U=typeof K=="function"?K(le.elements):K;ke.getState().updateSlide({elements:U})},{dragElement:P}=c6(L,E,C),{scaleElement:D,scaleMultiElement:k}=v6(L,E,C),{rotateElement:N}=d6(L,E,w),{dragLineElement:I}=g6(L,E),{moveShapeKeypoint:O}=m6(L,E),{viewportStyles:z,dragViewport:$}=a6(b),{selectionState:R,mouseSelectionVisible:B,updateMouseSelection:H}=o6(L,w);l6(b);const{insertElementFromCreateSelection:F}=u6(w),{selectElement:A}=f6(L,P);n6(b,()=>{const K=_e.getState();K.editorAreaFocus&&K.setEditorareaFocus(!1)}),S.useEffect(()=>{u("")},[n,u]);const Z=(K,le,U=!0)=>{K.stopPropagation();const X=K.nativeEvent||K;A(X,le,U)},Q=K=>{r.length&&l([]),g?$(K.nativeEvent):H(K),c||d(!0),f&&h(null),i6()},q=K=>{if(r.length||o||s||!w.current)return;const{pageX:le,pageY:U}=K,{x:X,y:ee}=w.current.getBoundingClientRect(),J=(le-X)/t,ce=(U-ee)/t;y({left:J,top:ce,width:200/t,height:0})};S.useEffect(()=>{r.length&&l([])},[]),S.useEffect(()=>()=>{const{textFormatPainter:K}=_e.getState();K&&h(null)},[h]);const W=S.useRef(_);S.useEffect(()=>{W.current=_},[_]);const j=S.useRef(!1),Y=S.useRef(null),re=K=>{if(K.preventDefault(),K.ctrlKey)return;const le=K.deltaY>0?ft.DOWN:K.deltaY<0?ft.UP:null;le&&(j.current||(j.current=!0,W.current(le)),Y.current&&window.clearTimeout(Y.current),Y.current=window.setTimeout(()=>{j.current=!1,Y.current=null},50))};S.useEffect(()=>{const K=b.current;if(K)return K.addEventListener("wheel",re,{passive:!1}),()=>K.removeEventListener("wheel",re)},[]),S.useEffect(()=>()=>{Y.current&&(window.clearTimeout(Y.current),Y.current=null)},[]);const te=()=>T(!0),ne=(K,le)=>{N(K.nativeEvent,le)},ge=(K,le,U)=>{D(K.nativeEvent,le,U)},Se=(K,le,U)=>{I(K.nativeEvent,le,U)},ie=(K,le,U)=>{O(K.nativeEvent,le,U)},Ee=(K,le,U)=>{k(K.nativeEvent,le,U)};return S.createElement("div",{className:Sp.canvas,ref:b,onMouseDown:Q,onDoubleClick:q,onDragOver:K=>K.preventDefault()},x&&S.createElement(Ak,{onClose:()=>T(!1)}),o&&S.createElement(P6,{onCreated:F}),s&&S.createElement(O6,{onClose:()=>_e.getState().setCreatingCustomShapeState(!1),onCreated:m}),S.createElement("div",{className:Sp.viewportWrapper,style:{width:z.width*t,height:z.height*t,left:z.left,top:z.top}},S.createElement("div",{className:"operates"},M.map((K,le)=>S.createElement(k6,{key:le,type:K.type,axis:K.axis,length:K.length,canvasScale:t})),r.length>1&&S.createElement($6,{elementList:(p==null?void 0:p.elements)||[],scaleMultiElement:Ee}),p==null?void 0:p.elements.filter(K=>!a.includes(K.id)).map(K=>S.createElement(A6,{key:K.id,elementInfo:K,isSelected:r.includes(K.id),isActive:n===K.id,isActiveGroupElement:i===K.id,isMultiSelect:r.length>1,rotateElement:ne,scaleElement:ge,dragLineElement:Se,moveShapeKeypoint:ie,openLinkDialog:te})),S.createElement(S6,null)),S.createElement("div",{className:Sp.viewport,ref:w,style:{transform:`scale(${t})`}},B&&R&&S.createElement(I6,{top:R.top,left:R.left,width:R.width,height:R.height,quadrant:R.quadrant}),p==null?void 0:p.elements.filter(K=>!a.includes(K.id)).map((K,le)=>S.createElement(mk,{key:K.id,elementInfo:K,elementIndex:le+1,isMultiSelect:r.length>1,selectElement:Z,openLinkDialog:te}))),e==null?void 0:e({slideIndex:v,currentSlide:p})))},Pk={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},f3=e=>{const t=new av.SVGPathData(e),r=[];for(const n of t.commands){const i=Pk[n.type];if((n.type===2||n.type===16)&&r.push({x:n.x,y:n.y,relative:n.relative,type:i}),n.type===32)r.push({x:n.x,y:n.y,curve:{type:"cubic",x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},relative:n.relative,type:i});else if(n.type===128)r.push({x:n.x,y:n.y,curve:{type:"quadratic",x1:n.x1,y1:n.y1},relative:n.relative,type:i});else if(n.type===512){const a=r[r.length-1];if(!["M","L","Q","C"].includes(a.type))continue;const o=D7({px:a.x,py:a.y,cx:n.x,cy:n.y,rx:n.rX,ry:n.rY,xAxisRotation:n.xRot,largeArcFlag:n.lArcFlag,sweepFlag:n.sweepFlag});for(const s of o)r.push({x:s.x,y:s.y,curve:{type:"cubic",x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2},relative:!1,type:"C"})}else if(n.type===1)r.push({close:!0,type:i});else continue}return r},h3=e=>{try{const t=new av.SVGPathData(e),r=[],n=[];for(const i of t.commands){const a="x"in i?i.x:0,o="y"in i?i.y:0;r.push(a),n.push(o)}return{minX:Math.min(...r),minY:Math.min(...n),maxX:Math.max(...r),maxY:Math.max(...n)}}catch{return{minX:0,minY:0,maxX:0,maxY:0}}},wp=(e,t)=>e.replace(/font-size:\s*([\d.]+)pt/g,(r,n)=>`font-size: ${(parseFloat(n)*t).toFixed(1)}px`),Nk=(e,t)=>{const{start:r,end:n}=e,i=t*Math.PI/180,a=(r[0]+n[0])/2,o=(r[1]+n[1])/2,s=r[0]-a,l=r[1]-o,u=n[0]-a,c=n[1]-o,f=Math.cos(i),d=Math.sin(i),h=s*f-l*d,p=s*d+l*f,v=u*f-c*d,g=u*d+c*f,m=h+a,y=p+o,_=v+a,b=g+o,w=Math.min(r[0],n[0]),x=Math.min(r[1],n[1]),T=Math.min(m,_),L=Math.min(y,b),M=m-T,C=y-L,E=_-T,P=b-L,D=[M,C],k=[E,P],N=[T-w,L-x];return{start:D,end:k,offset:N}},Ok=(e,t)=>{let r=[0,0],n=[0,0];!e.isFlipV&&!e.isFlipH?(r=[0,0],n=[e.width,e.height]):e.isFlipV&&e.isFlipH?(r=[e.width,e.height],n=[0,0]):e.isFlipV&&!e.isFlipH?(r=[0,e.height],n=[e.width,0]):(r=[e.width,0],n=[0,e.height]);const i={type:"line",id:ze.nanoid(10),width:+((e.borderWidth||1)*t).toFixed(2),left:e.left,top:e.top,start:r,end:n,style:e.borderType||"solid",color:e.borderColor||"#000",points:["",/straightConnector/.test(e.shapType||"")?"arrow":""]};if(e.rotate){const{start:a,end:o,offset:s}=Nk(i,e.rotate);i.start=a,i.end=o,i.left=i.left+s[0],i.top=i.top+s[1]}if(/bentConnector/.test(e.shapType||"")&&(i.broken2=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2]),/curvedConnector/.test(e.shapType||"")){const a=[Math.abs(i.start[0]-i.end[0])/2,Math.abs(i.start[1]-i.end[1])/2];i.cubic=[a,a]}return i},Ik=e=>{var l;const t=[];for(const u of U7)t.push(...u.children);const r=96/72,i=e.size.width*r,a=e.size.height/e.size.width,o={themeColors:e.themeColors,fontColor:"#333",fontName:"微软雅黑",backgroundColor:"#fff"},s=[];for(const u of e.slides){let c;const f=u.fill;let d="solid",h="#fff";typeof f=="string"?h=f:f&&(d=f.type,h=f.value),d==="image"?c={type:"image",image:{src:h.picBase64,size:"cover"}}:d==="gradient"?c={type:"gradient",gradient:{type:h.path==="line"?"linear":"radial",colors:h.colors.map(g=>({...g,pos:parseInt(g.pos)})),rotate:h.rot+90}}:d==="pattern"?c={type:"solid",color:"#fff"}:c={type:"solid",color:h||"#fff"};const p={id:ze.nanoid(10),elements:[],background:c,remark:u.note||""},v=u.elements.sort((g,m)=>g.order-m.order);for(const g of v){const m=g.width||1,y=g.height||1,_={...g};if(_.width=_.width*r,_.height=_.height*r,_.left=_.left*r,_.top=_.top*r,_.type==="text"||_.type==="shape"&&_.shapType==="rect"&&_.content,_.type==="text"){const b={type:"text",id:ze.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,rotate:_.rotate||0,defaultFontName:o.fontName,defaultColor:o.fontColor,content:wp(_.content||"",r),lineHeight:1,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},fill:((l=_.fill)==null?void 0:l.type)==="color"?_.fill.value:"",vertical:_.isVertical};_.shadow&&(b.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),p.elements.push(b)}else if(_.type==="image"){const b={type:"image",id:ze.nanoid(10),src:_.src||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:_.rotate||0,flipH:_.isFlipH,flipV:_.isFlipV};_.borderWidth&&(b.outline={color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"});const w=["roundRect","ellipse","triangle","rhombus","pentagon","hexagon","heptagon","octagon","parallelogram","trapezoid"];_.rect?b.clip={shape:_.geom&&w.includes(_.geom)?_.geom:"rect",range:[[_.rect.l||0,_.rect.t||0],[100-(_.rect.r||0),100-(_.rect.b||0)]]}:_.geom&&w.includes(_.geom)&&(b.clip={shape:_.geom,range:[[0,0],[100,100]]}),p.elements.push(b)}else if(_.type==="math")p.elements.push({type:"image",id:ze.nanoid(10),src:_.picBase64||"",width:_.width,height:_.height,left:_.left,top:_.top,fixedRatio:!0,rotate:0});else if(_.type==="audio")p.elements.push({type:"audio",id:ze.nanoid(10),src:_.blob||"",width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,fixedRatio:!1,color:o.themeColors[0],loop:!1,autoplay:!1});else if(_.type==="video")p.elements.push({type:"video",id:ze.nanoid(10),src:_.blob||_.src,width:_.width,height:_.height,left:_.left,top:_.top,rotate:0,autoplay:!1});else if(_.type==="shape")if(_.shapType==="line"||/Connector/.test(_.shapType||"")){const b=Ok(_,r);p.elements.push(b)}else{const b=t.find(E=>E.pptxShapeType===_.shapType),w={mid:"middle",down:"bottom",up:"top"},x=_.fill,T=(x==null?void 0:x.type)==="gradient"?{type:x.value.path==="line"?"linear":"radial",colors:x.value.colors.map(E=>({...E,pos:parseInt(E.pos)})),rotate:x.value.rot}:void 0,L=(x==null?void 0:x.type)==="image"?x.value.picBase64:void 0,M=(x==null?void 0:x.type)==="color"?x.value:"",C={type:"shape",id:ze.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:M,gradient:T,pattern:L,fixedRatio:!1,rotate:_.rotate||0,outline:{color:_.borderColor,width:+(_.borderWidth*r).toFixed(2),style:_.borderType||"solid"},text:{content:wp(_.content||"",r),defaultFontName:o.fontName,defaultColor:o.fontColor,align:w[_.vAlign||"mid"]||"middle"},flipH:_.isFlipH,flipV:_.isFlipV};if(_.shadow&&(C.shadow={h:_.shadow.h*r,v:_.shadow.v*r,blur:_.shadow.blur*r,color:_.shadow.color}),b){if(C.path=b.path,C.viewBox=b.viewBox,b.pathFormula){C.pathFormula=b.pathFormula,C.viewBox=[_.width,_.height];const E=fo[b.pathFormula];"editable"in E&&E.editable?(C.path=E.formula(_.width,_.height,E.defaultValue),C.keypoints=E.defaultValue):C.path=E.formula(_.width,_.height)}}else if(_.path&&_.path.indexOf("NaN")===-1){const{maxX:E,maxY:P}=h3(_.path);C.path=_.path,E/P>m/y?C.viewBox=[E,E*y/m]:C.viewBox=[P*m/y,P]}if(_.shapType==="custom"){_.path.indexOf("NaN")!==-1?(C.width===0&&(C.width=.1),C.height===0&&(C.height=.1),C.path=_.path.replace(/NaN/g,"0")):(C.special=!0,C.path=_.path);const{maxX:E,maxY:P}=h3(C.path);E/P>m/y?C.viewBox=[E,E*y/m]:C.viewBox=[P*m/y,P]}C.path&&p.elements.push(C)}else if(_.type==="table"){const b=_.data.length,w=_.data[0].length,x={fontname:o.fontName,color:o.fontColor},T=[];for(let L=0;L<b;L++){const M=[];for(let C=0;C<w;C++){const E=_.data[L][C];let P=null;typeof document<"u"&&(P=document.createElement("div"),P.innerHTML=E.text);let D="left",k="14px";if(P){const N=P.querySelector("p");D=(N==null?void 0:N.style.textAlign)||"left";const I=P.querySelector("span");k=(I==null?void 0:I.style.fontSize)||"14px"}M.push({id:ze.nanoid(10),colspan:1,rowspan:1,text:wp(E.text,r),style:{...x,align:D,fontsize:k}})}T.push(M)}p.elements.push({type:"table",id:ze.nanoid(10),width:_.width,height:_.height,left:_.left,top:_.top,colWidths:new Array(w).fill(1/w),data:T,theme:{color:o.themeColors[0],rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},outline:{width:2,style:"solid",color:"#eeece1"},cellMinHeight:36,rotate:0})}}s.push(p)}return{slides:s,theme:{themeColors:o.themeColors,fontColor:o.fontColor,fontName:o.fontName,backgroundColor:o.backgroundColor},viewportRatio:a,viewportSize:i}},Bk=()=>{const e=ke(),{slides:t,theme:r}=ke(),{addHistorySnapshot:n}=wt(),i=f=>{var w,x,T,L,M,C,E,P,D;const d=Array.isArray(f)?f:[f],h=[],p=[],v=[],g=[];for(const k of d){if(k.background)if(k.background.type==="solid"&&k.background.color)h.push({area:1,value:k.background.color});else if(k.background.type==="gradient"&&k.background.gradient){const N=k.background.gradient.colors.length;h.push(...k.background.gradient.colors.map(I=>({area:1/N,value:I.color})))}else h.push({area:1,value:r.backgroundColor});for(const N of k.elements){const I=N.width;let O=0;if(N.type==="line"){const[$,R]=N.start,[B,H]=N.end;O=Math.sqrt(Math.pow(Math.abs($-B),2)+Math.pow(Math.abs(R-H),2))}else O=N.height;const z=I*O;if(N.type==="shape"||N.type==="text"){if(N.fill&&p.push({area:z,value:N.fill}),N.type==="shape"&&N.gradient){const G=N.gradient.colors.length;p.push(...N.gradient.colors.map(Z=>({area:1/G*z,value:Z.color})))}const $=(N.type==="shape"?(w=N.text)==null?void 0:w.content:N.content)||"";if(!$)continue;const R=$.replace(/<[^>]+>/g,"").replace(/\s*/g,""),B=$.match(/<[^>]+color: .+?<\/.+?>/g),H=$.match(/<[^>]+font-family: .+?<\/.+?>/g);let F=1,A=1;if(B)for(const G of B){const Z=G.match(/color: (.+?);/);if(!Z)continue;const Q=G.replace(/<[^>]+>/g,"").replace(/\s*/g,""),q=Z[1],W=Q.length/R.length;F=F-W,v.push({area:z*W,value:q})}if(H)for(const G of H){const Z=G.match(/font-family: (.+?);/);if(!Z)continue;const Q=G.replace(/<[^>]+>/g,"").replace(/\s*/g,""),q=Z[1],W=Q.length/R.length;A=A-W,g.push({area:z*W,value:q})}if(F){const Z=(N.type==="shape"?(x=N.text)==null?void 0:x.defaultColor:N.defaultColor)||r.fontColor;v.push({area:z*F,value:Z})}if(A){const Z=(N.type==="shape"?(T=N.text)==null?void 0:T.defaultFontName:N.defaultFontName)||r.fontName;g.push({area:z*A,value:Z})}}else if(N.type==="table"){const $=N.data.length*N.data[0].length;let R=0;for(const B of N.data)for(const H of B)if((L=H.style)!=null&&L.backcolor&&(R+=1,p.push({area:z/$,value:(M=H.style)==null?void 0:M.backcolor})),H.text){const F=H.text.length>=10?1:H.text.length/10;(C=H.style)!=null&&C.color&&v.push({area:z/$*F,value:(E=H.style)==null?void 0:E.color}),(P=H.style)!=null&&P.fontname&&v.push({area:z/$*F,value:(D=H.style)==null?void 0:D.fontname})}if(N.theme){const B=1-R/$;p.push({area:z*B,value:N.theme.color})}}else if(N.type==="chart"){N.fill&&p.push({area:z*.6,value:N.fill}),N.themeColors[0]&&p.push({area:z*.3,value:N.themeColors[0]});for(const $ of N.themeColors)Je($).getAlpha()!==0&&p.push({area:z/N.themeColors.length*.1,value:$})}else N.type==="line"?p.push({area:z,value:N.color}):N.type==="audio"?p.push({area:z,value:N.color}):N.type==="latex"&&v.push({area:z,value:N.color})}}const m={};for(const k of h){const N=Je(k.value).toRgbString();N!=="rgba(0, 0, 0, 0)"&&(m[N]?m[N]+=k.area:m[N]=k.area)}const y={};for(const k of p){const N=Je(k.value).toRgbString();N!=="rgba(0, 0, 0, 0)"&&(y[N]?y[N]+=k.area:y[N]=k.area)}const _={};for(const k of v){const N=Je(k.value).toRgbString();N!=="rgba(0, 0, 0, 0)"&&(_[N]?_[N]+=k.area:_[N]=k.area)}const b={};for(const k of g)b[k.value]?b[k.value]+=k.area:b[k.value]=k.area;return{backgroundColors:Object.keys(m).sort((k,N)=>m[N]-m[k]),themeColors:Object.keys(y).sort((k,N)=>y[N]-y[k]),fontColors:Object.keys(_).sort((k,N)=>_[N]-_[k]),fontNames:Object.keys(b).sort((k,N)=>b[N]-b[k])}},a=f=>{const d={},h=(v,g)=>{const m=Je(v).setAlpha(1).toRgbString();d[m]?d[m]=d[m]+g:d[m]=g};for(const v of f.elements){const g=v.width,m=v.type==="line"?Q7(v):v.height,y=g*m;if(v.type==="shape"&&Je(v.fill).getAlpha()!==0&&h(v.fill,y),v.type==="text"&&v.fill&&Je(v.fill).getAlpha()!==0&&h(v.fill,y),v.type==="image"&&v.colorMask&&Je(v.colorMask).getAlpha()!==0&&h(v.colorMask,y),v.type==="table"&&v.theme&&Je(v.theme.color).getAlpha()!==0&&h(v.theme.color,y),v.type==="chart"){for(const _ of v.themeColors)Je(_).getAlpha()!==0&&h(_,y/v.themeColors.length*.1);v.themeColors[0]&&Je(v.themeColors[0]).getAlpha()!==0&&h(v.themeColors[0],y*.3),v.fill&&Je(v.fill).getAlpha()!==0&&h(v.fill,y*.6)}v.type==="line"&&Je(v.color).getAlpha()!==0&&h(v.color,y),v.type==="audio"&&Je(v.color).getAlpha()!==0&&h(v.color,y)}return Object.keys(d).sort((v,g)=>d[g]-d[v])},o=(f,d)=>{const h=[...d],p=a(f),v={};if(p.length>h.length){const m=Je(h[0]).analogous(p.length-h.length+10).map(y=>y.toHexString()).slice(1);h.push(...m)}for(let g=0;g<p.length;g++)v[p[g]]=h[g];return v},s=(f,d)=>{const h=o(f,d.colors),p=v=>{const g=Je(v).getAlpha(),m=h[Je(v).setAlpha(1).toRgbString()];return m?Je(m).setAlpha(g).toRgbString():v};(!f.background||f.background.type!=="image")&&(f.background={type:"solid",color:d.background});for(const v of f.elements){if(v.type==="shape"&&(v.fill&&(v.fill=p(v.fill)),v.gradient&&delete v.gradient,v.text&&(v.text.defaultColor=d.fontColor,v.text.defaultFontName=d.fontname,v.text.content&&(v.text.content=v.text.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,"")))),v.type==="text"&&(v.fill&&(v.fill=p(v.fill)),v.defaultColor=d.fontColor,v.defaultFontName=d.fontname,v.content&&(v.content=v.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),v.type==="image"&&v.colorMask&&(v.colorMask=p(v.colorMask)),v.type==="table"){v.theme&&(v.theme.color=p(v.theme.color));for(const g of v.data)for(const m of g)m.style&&(m.style.color=d.fontColor,m.style.fontname=d.fontname)}v.type==="chart"&&(v.themeColors=[...d.colors],v.textColor=d.fontColor),v.type==="line"&&(v.color=p(v.color)),v.type==="audio"&&(v.color=p(v.color)),v.type==="latex"&&(v.color=d.fontColor),"outline"in v&&v.outline&&(d.outline&&(v.outline={...d.outline}),d.borderColor&&(v!=null&&v.outline)&&(v.outline.color=d.borderColor)),"shadow"in v&&v.shadow&&d.shadow&&(v.shadow=d.shadow)}};return{getSlidesThemeStyles:i,applyPresetTheme:(f,d=!1)=>{if(e.setTheme({backgroundColor:f.background,themeColors:f.colors,fontColor:f.fontColor,outline:{width:2,style:"solid",color:f.borderColor},fontName:f.fontname}),d){const h=JSON.parse(JSON.stringify(t));for(const p of h)s(p,f);e.setSlides(h),n()}},applyThemeToAllSlides:(f=!1)=>{const d=JSON.parse(JSON.stringify(t)),h={background:r.backgroundColor,fontColor:r.fontColor,borderColor:f?r.outline.color:void 0,fontname:r.fontName,colors:r.themeColors,outline:f?r.outline:void 0,shadow:f?r.shadow:void 0};for(const p of d)s(p,h);e.setSlides(d),n()},applyFontToAllSlides:f=>{const d=JSON.parse(JSON.stringify(t));for(const h of d)for(const p of h.elements)if(p.type==="shape"&&p.text&&(p.text.defaultFontName=f,p.text.content&&(p.text.content=p.text.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),p.type==="text"&&(p.defaultFontName=f,p.content&&(p.content=p.content.replace(/color: .+?;/g,"").replace(/font-family: .+?;/g,""))),p.type==="table")for(const v of p.data)for(const g of v)g.style&&(g.style.fontname=f);e.setSlides(d),n()}}},$k=["style","script","template"],Rk=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],Vk={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},zk=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ra=(e,t)=>{const r=t-e.position;Nc(e,r)},Nc=(e,t)=>{e.position=e.position+t},Fk=(e,t)=>{for(;;){const n=e.indexOf("<",t);if(n===-1)return n;const i=e.charAt(n+1);if(i==="/"||i==="!"||/[A-Za-z0-9]/.test(i))return n;t=n+1}return-1},d3=e=>{const{str:t}=e;let r=Fk(t,e.position);if(r===e.position)return;r===-1&&(r=t.length);const n=t.slice(e.position,r);ra(e,r),e.tokens.push({type:"text",content:n})},Hk=e=>{const{str:t}=e;Nc(e,4);let r=t.indexOf("-->",e.position),n=r+3;r===-1&&(r=n=t.length);const i=t.slice(e.position,r);ra(e,n),e.tokens.push({type:"comment",content:i})},Gk=e=>{const{str:t}=e,r=t.length;let n=e.position;for(;n<r;){const o=t.charAt(n);if(!(/\s/.test(o)||o==="/"||o===">"))break;n++}let i=n+1;for(;i<r;){const o=t.charAt(i);if(!!(/\s/.test(o)||o==="/"||o===">"))break;i++}ra(e,i);const a=t.slice(n,i);return e.tokens.push({type:"tag",content:a}),a},Wk=e=>{const{str:t,tokens:r}=e;let n=e.position,i=null,a=n;const o=[],s=t.length;for(;n<s;){const u=t.charAt(n);if(i){u===i&&(i=null),n++;continue}if(u==="/"||u===">"){n!==a&&o.push(t.slice(a,n));break}if(/\s/.test(u)){n!==a&&o.push(t.slice(a,n)),a=n+1,n++;continue}if(u==="'"||u==='"'){i=u,n++;continue}n++}ra(e,n);const l="attribute";for(let u=0;u<o.length;u++){const c=o[u];if(c.indexOf("=")===-1){const d=o[u+1];if(d&&Gt.startsWith(d,"=")){if(d.length>1){const p=c+d;r.push({type:l,content:p}),u+=1;continue}const h=o[u+2];if(u+=1,h){const p=c+"="+h;r.push({type:l,content:p}),u+=1;continue}}}if(Gt.endsWith(c,"=")){const d=o[u+1];if(d&&d.indexOf("=")===-1){const p=c+d;r.push({type:l,content:p}),u+=1;continue}const h=c.slice(0,-1);r.push({type:l,content:h});continue}r.push({type:l,content:c})}},Xk=(e,t)=>{const{str:r,tokens:n}=t,i=e.toLowerCase(),a=r.length;let o=t.position;for(;o<a;){const s=r.indexOf("</",o);if(s===-1){d3(t);break}const l={str:r,position:t.position,tokens:[]};ra(l,s);const u=p3(l);if(i!==u.toLowerCase()){o=l.position;continue}if(s!==t.position){const c=t.position;ra(t,s),n.push({type:"text",content:r.slice(c,s)})}n.push(...l.tokens),ra(t,l.position);break}},p3=e=>{const{str:t}=e,n=t.charAt(e.position+1)==="/";Nc(e,n?2:1),e.tokens.push({type:"tag-start",close:n});const i=Gk(e);Wk(e);const o=t.charAt(e.position)==="/";return Nc(e,o?2:1),e.tokens.push({type:"tag-end",close:o}),i},Uk=e=>{const t=e.str,r=t.length;for(;e.position<r;){const n=e.position;if(d3(e),e.position===n)if(Gt.startsWith(t,"!--",n+1))Hk(e);else{const a=p3(e),o=a.toLowerCase();$k.includes(o)&&Xk(a,e)}}},Yk=e=>{const t={str:e,position:0,tokens:[]};return Uk(t),t.tokens},qk=e=>{const t={tagName:null,children:[]};return g3({tokens:e,cursor:0,stack:[t]}),t.children},Zk=(e,t)=>{const r=Vk[e];if(r){let n=t.length-1;for(;n>=0;){const i=t[n].tagName;if(i===e)break;if(i&&r.includes(i))return!0;n--}}return!1},v3=(e,t)=>{e.splice(t)},g3=e=>{const{stack:t,tokens:r}=e;let{cursor:n}=e,i=t[t.length-1].children;const a=r.length;for(;n<a;){const o=r[n];if(o.type!=="tag-start"){i.push(o),n++;continue}const s=r[++n];n++;const l=s.content.toLowerCase();if(o.close){let g=t.length,m=!1;for(;--g>-1;)if(t[g].tagName===l){m=!0;break}for(;n<a&&r[n].type==="tag-end";)n++;if(m){v3(t,g);break}else continue}let c=Rk.includes(l);if(c&&(c=!Zk(l,t)),c){let g=t.length-1;for(;g>0;){if(l===t[g].tagName){v3(t,g);const m=g-1;i=t[m].children;break}g=g-1}}const f=[];let d;for(;n<a;){const g=r[n];if(g.type==="tag-end"){d=g;break}f.push(g.content),n++}if(!d)break;n++;const h=[],p={type:"element",tagName:s.content,attributes:f,children:h};if(i.push(p),!(d.close||zk.includes(l))){t.push({tagName:l,children:h});const g={tokens:r,cursor:n,stack:t};g3(g),n=g.cursor}}e.cursor=n},jk=(e,t)=>{const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},Qk=e=>{const t=e.charAt(0),r=e.length-1;return(t==='"'||t==="'")&&t===e.charAt(r)?e.slice(1,r):e},Kk=e=>e.map(t=>{const r=jk(t.trim(),"="),n=r[0],i=typeof r[1]=="string"?Qk(r[1]):null;return{key:n,value:i}}),m3=e=>e.map(t=>{if(t.type==="element"){const n=m3(t.children);return{type:"element",tagName:t.tagName.toLowerCase(),attributes:Kk(t.attributes),children:n}}return{type:t.type,content:t.content}}),Jk=e=>{const t=Yk(e),r=qk(t);return m3(r)},Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",eP="data:image/svg+xml;base64,",tP=e=>{e=e.replace(/\r\n/g,`
|
|
42
|
-
`);let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(n&63|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(n&63|128))}return t},rP=e=>{let t="",r,n,i,a,o,s,l,u=0;for(e=tP(e);u<e.length;)r=e.charCodeAt(u++),n=e.charCodeAt(u++),i=e.charCodeAt(u++),a=r>>2,o=(r&3)<<4|n>>4,s=(n&15)<<2|i>>6,l=i&63,isNaN(n)?s=l=64:isNaN(i)&&(l=64),t=t+Oc.charAt(a)+Oc.charAt(o)+Oc.charAt(s)+Oc.charAt(l);return t},
|
|
43
|
-
`))}if(H.elements){for(const A of H.elements)if(A.type==="text"){const G=s(A.content),Z={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fontSize:Ic/o,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10/o,paraSpaceBefore:5/o,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(A.rotate&&(Z.rotate=A.rotate),A.wordSpace&&(Z.charSpacing=A.wordSpace/o),A.lineHeight&&(Z.lineSpacingMultiple=A.lineHeight/1.25),A.fill){const Q=at(A.fill),q=A.opacity===void 0?1:A.opacity;Z.fill={color:Q.color,transparency:(1-Q.alpha*q)*100}}A.defaultColor&&(Z.color=at(A.defaultColor).color),A.defaultFontName&&(Z.fontFace=A.defaultFontName),A.shadow&&(Z.shadow=u(A.shadow)),(x=A.outline)!=null&&x.width&&(Z.line=f(A.outline)),A.opacity!==void 0&&(Z.transparency=(1-A.opacity)*100),A.paragraphSpace!==void 0&&(Z.paraSpaceBefore=A.paragraphSpace/o),A.vertical&&(Z.vert="eaVert"),F.addText(G,Z)}else if(A.type==="image"){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(xp(A.src)?G.data=A.src:G.path=A.src,A.flipH&&(G.flipH=A.flipH),A.flipV&&(G.flipV=A.flipV),A.rotate&&(G.rotate=A.rotate),A.link){const Z=d(A.link);Z&&(G.hyperlink=Z)}if((T=A.filters)!=null&&T.opacity&&(G.transparency=100-parseInt((L=A.filters)==null?void 0:L.opacity)),A.clip){A.clip.shape==="ellipse"&&(G.rounding=!0);const[Z,Q]=A.clip.range,[q,W]=Z,[j,Y]=Q,re=A.width/((j-q)/a),te=A.height/((Y-W)/a);G.w=re/a,G.h=te/a,G.sizing={type:"crop",x:q/a*re/a,y:W/a*te/a,w:(j-q)/a*re/a,h:(Y-W)/a*te/a}}F.addImage(G)}else if(A.type==="shape"){if(A.special){const G=document.querySelector(`.thumbnail-list .base-element-${A.id} svg`);if(G.clientWidth<1||G.clientHeight<1)continue;const Q={data:y3(G),x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(A.rotate&&(Q.rotate=A.rotate),A.flipH&&(Q.flipH=A.flipH),A.flipV&&(Q.flipV=A.flipV),A.link){const q=d(A.link);q&&(Q.hyperlink=q)}F.addImage(Q)}else{const G={x:A.width/A.viewBox[0],y:A.height/A.viewBox[1]},Z=l(f3(A.path),G);let Q=at(A.fill);if(A.gradient){const j=A.gradient.colors,Y=j[0].color,re=j[j.length-1].color,te=Je.mix(Y,re).toHexString();Q=at(te)}A.pattern&&(Q=at("#00000000"));const q=A.opacity===void 0?1:A.opacity,W={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fill:{color:Q.color,transparency:(1-Q.alpha*q)*100},points:Z};if(A.flipH&&(W.flipH=A.flipH),A.flipV&&(W.flipV=A.flipV),A.shadow&&(W.shadow=u(A.shadow)),(M=A.outline)!=null&&M.width&&(W.line=f(A.outline)),A.rotate&&(W.rotate=A.rotate),A.link){const j=d(A.link);j&&(W.hyperlink=j)}F.addShape("custGeom",W)}if(A.text){const G=s(A.text.content),Z={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fontSize:Ic/o,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/o,valign:A.text.align};A.rotate&&(Z.rotate=A.rotate),A.text.defaultColor&&(Z.color=at(A.text.defaultColor).color),A.text.defaultFontName&&(Z.fontFace=A.text.defaultFontName),F.addText(G,Z)}if(A.pattern){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(xp(A.pattern)?G.data=A.pattern:G.path=A.pattern,A.flipH&&(G.flipH=A.flipH),A.flipV&&(G.flipV=A.flipV),A.rotate&&(G.rotate=A.rotate),A.link){const Z=d(A.link);Z&&(G.hyperlink=Z)}F.addImage(G)}}else if(A.type==="line"){const G=af(A),Z=l(f3(G)),{minX:Q,maxX:q,minY:W,maxY:j}=oa(A),Y=at(A.color),re={x:A.left/a,y:A.top/a,w:(q-Q)/a,h:(j-W)/a,line:{color:Y.color,transparency:(1-Y.alpha)*100,width:A.width/o,dashType:c[A.style],beginArrowType:A.points[0]?"arrow":"none",endArrowType:A.points[1]?"arrow":"none"},points:Z};A.shadow&&(re.shadow=u(A.shadow)),F.addShape("custGeom",re)}else if(A.type==="chart"){const G=[];for(let Y=0;Y<A.data.series.length;Y++){const re=A.data.series[Y];G.push({name:`系列${Y+1}`,labels:A.data.labels,values:re})}let Z=[];if(A.themeColors.length===10)Z=A.themeColors.map(Y=>at(Y).color);else if(A.themeColors.length===1)Z=Je(A.themeColors[0]).analogous(10).map(Y=>at(Y.toHexString()).color);else{const Y=A.themeColors.length,re=Je(A.themeColors[Y-1]).analogous(11-Y).map(te=>te.toHexString());Z=[...A.themeColors.slice(0,Y-1),...re].map(te=>at(te).color)}const Q={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,chartColors:A.chartType==="pie"||A.chartType==="ring"?Z:Z.slice(0,A.data.series.length)},q=at(A.textColor||"#000000").color;Q.catAxisLabelColor=q,Q.valAxisLabelColor=q;const W=14/o;if(Q.catAxisLabelFontSize=W,Q.valAxisLabelFontSize=W,A.fill||A.outline){const Y={};A.fill&&(Y.fill={color:at(A.fill).color}),A.outline&&(Y.border={pt:A.outline.width/o,color:at(A.outline.color).color}),Q.plotArea=Y}(A.data.series.length>1&&A.chartType!=="scatter"||A.chartType==="pie"||A.chartType==="ring")&&(Q.showLegend=!0,Q.legendPos="b",Q.legendColor=q,Q.legendFontSize=W);let j=w.ChartType.bar;A.chartType==="bar"?(j=w.ChartType.bar,Q.barDir="col",(C=A.options)!=null&&C.stack&&(Q.barGrouping="stacked")):A.chartType==="column"?(j=w.ChartType.bar,Q.barDir="bar",(E=A.options)!=null&&E.stack&&(Q.barGrouping="stacked")):A.chartType==="line"?(j=w.ChartType.line,(P=A.options)!=null&&P.lineSmooth&&(Q.lineSmooth=!0)):A.chartType==="area"?j=w.ChartType.area:A.chartType==="radar"?j=w.ChartType.radar:A.chartType==="scatter"?(j=w.ChartType.scatter,Q.lineSize=0):A.chartType==="pie"?j=w.ChartType.pie:A.chartType==="ring"&&(j=w.ChartType.doughnut,Q.holeSize=60),F.addChart(j,G,Q)}else if(A.type==="table"){const G=[];for(let Y=0;Y<A.data.length;Y++){const re=A.data[Y];for(let te=0;te<re.length;te++){const ne=re[te];if(ne.colspan>1||ne.rowspan>1)for(let ge=Y;ge<Y+ne.rowspan;ge++)for(let Se=ge===Y?te+1:te;Se<te+ne.colspan;Se++)G.push(`${ge}_${Se}`)}}const Z=[],Q=A.theme;let q=null,W=[];Q&&(q=at(Q.color),W=_v(Q.color).map(Y=>at(Y)));for(let Y=0;Y<A.data.length;Y++){const re=A.data[Y],te=[];for(let ne=0;ne<re.length;ne++){const ge=re[ne],Se={colspan:ge.colspan,rowspan:ge.rowspan,bold:((D=ge.style)==null?void 0:D.bold)||!1,italic:((k=ge.style)==null?void 0:k.em)||!1,underline:{style:(N=ge.style)!=null&&N.underline?"sng":"none"},align:((I=ge.style)==null?void 0:I.align)||"left",valign:"middle",fontFace:((O=ge.style)==null?void 0:O.fontname)||"微软雅黑",fontSize:((z=ge.style)!=null&&z.fontsize?parseInt(($=ge.style)==null?void 0:$.fontsize):14)/o};if(Q&&q){let ie;Y%2===0?ie=W[1]:ie=W[0],(Q.rowHeader&&Y===0||Q.rowFooter&&Y===A.data.length-1||Q.colHeader&&ne===0||Q.colFooter&&ne===re.length-1)&&(ie=q),Se.fill={color:ie.color,transparency:(1-ie.alpha)*100}}if((R=ge.style)!=null&&R.backcolor){const ie=at(ge.style.backcolor);Se.fill={color:ie.color,transparency:(1-ie.alpha)*100}}(B=ge.style)!=null&&B.color&&(Se.color=at(ge.style.color).color),G.includes(`${Y}_${ne}`)||te.push({text:ge.text,options:Se})}te.length&&Z.push(te)}const j={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,colW:A.colWidths.map(Y=>A.width*Y/a)};A.theme&&(j.fill={color:"#ffffff"}),A.outline.width&&A.outline.color&&(j.border={type:A.outline.style==="solid"?"solid":"dash",pt:A.outline.width/o,color:at(A.outline.color).color}),F.addTable(Z,j)}else if(A.type==="latex"){const G=document.querySelector(`.thumbnail-list .base-element-${A.id} svg`),Q={data:y3(G),x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(A.link){const q=d(A.link);q&&(Q.hyperlink=q)}F.addImage(Q)}else if(!m&&(A.type==="video"||A.type==="audio")){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,path:A.src,type:A.type};A.type==="video"&&A.poster&&(G.cover=A.poster);const Z=A.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);Z&&Z[1]?G.extn=Z[1]:A.ext&&(G.extn=A.ext);const Q=["avi","mp4","m4v","mov","wmv"],q=["mp3","m4a","mp4","wav","wma"];G.extn&&[...Q,...q].includes(G.extn)&&F.addMedia(G)}}}setTimeout(()=>{if(y){w.writeFile({fileName:`${i}.pptx`}).then(b).catch(_);return}w.write({outputType:"blob"}).then(b).catch(_)},200)}}},aP=({initialSlidesData:e,onDataUpdate:t,renderPageExtra:r},n)=>{const{slides:i,theme:a,setSlides:o,setTheme:s,setViewportRatio:l,setViewportSize:u}=ke.getState(),{applyThemeToAllSlides:c,applyPresetTheme:f,applyFontToAllSlides:d}=Bk(),{exportPPTX:h}=iP();return S.useEffect(()=>{if(e){const{slides:p,theme:v,viewportRatio:g,viewportSize:m}=Ik(e);o(p),s(v),l(g),u(m)}},[]),S.useEffect(()=>{const p=ke.subscribe((v,g)=>{const m={slides:v.slides,title:v.title,theme:v.theme,viewportRatio:v.viewportRatio};(g.slides!==v.slides||g.theme!==v.theme)&&t(m)});return()=>p()},[t]),S.useImperativeHandle(n,()=>({applyThemeToAllSlides:c,applyPresetTheme:f,applyFontToAllSlides:d,exportPPTX:h})),S.createElement("div",{style:{width:"100%",height:"100%",position:"relative"}},S.createElement(kk,{renderPageExtra:r}))},oP=S.forwardRef(aP),si={thumbnails:"_thumbnails_1awpq_1",thumbnailList:"_thumbnailList_1awpq_6",thumbnailItem:"_thumbnailItem_1awpq_11",thumbnail:"_thumbnail_1awpq_1",active:"_active_1awpq_19",label:"_label_1awpq_25"};var Tp=Gs(),De=e=>Hs(e,Tp),Lp=Gs();De.write=e=>Hs(e,Lp);var Bc=Gs();De.onStart=e=>Hs(e,Bc);var Ep=Gs();De.onFrame=e=>Hs(e,Ep);var Mp=Gs();De.onFinish=e=>Hs(e,Mp);var oo=[];De.setTimeout=(e,t)=>{const r=De.now()+t,n=()=>{const a=oo.findIndex(o=>o.cancel==n);~a&&oo.splice(a,1),ui-=~a?1:0},i={time:r,handler:e,cancel:n};return oo.splice(_3(r),0,i),ui+=1,b3(),i};var _3=e=>~(~oo.findIndex(t=>t.time>e)||~oo.length);De.cancel=e=>{Bc.delete(e),Ep.delete(e),Mp.delete(e),Tp.delete(e),Lp.delete(e)},De.sync=e=>{Dp=!0,De.batchedUpdates(e),Dp=!1},De.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,De.onStart(r)}return n.handler=e,n.cancel=()=>{Bc.delete(r),t=null},n};var Cp=typeof window<"u"?window.requestAnimationFrame:()=>{};De.use=e=>Cp=e,De.now=typeof performance<"u"?()=>performance.now():Date.now,De.batchedUpdates=e=>e(),De.catch=console.error,De.frameLoop="always",De.advance=()=>{De.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):w3()};var li=-1,ui=0,Dp=!1;function Hs(e,t){Dp?(t.delete(e),e(0)):(t.add(e),b3())}function b3(){li<0&&(li=0,De.frameLoop!=="demand"&&Cp(S3))}function sP(){li=-1}function S3(){~li&&(Cp(S3),De.batchedUpdates(w3))}function w3(){const e=li;li=De.now();const t=_3(li);if(t&&(x3(oo.splice(0,t),r=>r.handler()),ui-=t),!ui){sP();return}Bc.flush(),Tp.flush(e?Math.min(64,li-e):16.667),Ep.flush(),Lp.flush(),Mp.flush()}function Gs(){let e=new Set,t=e;return{add(r){ui+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return ui-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,ui-=t.size,x3(t,n=>n(r)&&e.add(n)),ui+=e.size,t=e)}}}function x3(e,t){e.forEach(r=>{try{t(r)}catch(n){De.catch(n)}})}var lP=Object.defineProperty,uP=(e,t)=>{for(var r in t)lP(e,r,{get:t[r],enumerable:!0})},Rr={};uP(Rr,{assign:()=>fP,colors:()=>ci,createStringInterpolator:()=>Pp,skipAnimation:()=>L3,to:()=>T3,willAdvance:()=>Np});function Ap(){}var cP=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function xn(e,t){if(ae.arr(e)){if(!ae.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var $e=(e,t)=>e.forEach(t);function on(e,t,r){if(ae.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var sr=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function Ws(e,t){if(e.size){const r=Array.from(e);e.clear(),$e(r,t)}}var Xs=(e,...t)=>Ws(e,r=>r(...t)),kp=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Pp,T3,ci=null,L3=!1,Np=Ap,fP=e=>{e.to&&(T3=e.to),e.now&&(De.now=e.now),e.colors!==void 0&&(ci=e.colors),e.skipAnimation!=null&&(L3=e.skipAnimation),e.createStringInterpolator&&(Pp=e.createStringInterpolator),e.requestAnimationFrame&&De.use(e.requestAnimationFrame),e.batchedUpdates&&(De.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Np=e.willAdvance),e.frameLoop&&(De.frameLoop=e.frameLoop)},Us=new Set,Tr=[],Op=[],$c=0,Rc={get idle(){return!Us.size&&!Tr.length},start(e){$c>e.priority?(Us.add(e),De.onStart(hP)):(E3(e),De(Ip))},advance:Ip,sort(e){if($c)De.onFrame(()=>Rc.sort(e));else{const t=Tr.indexOf(e);~t&&(Tr.splice(t,1),M3(e))}},clear(){Tr=[],Us.clear()}};function hP(){Us.forEach(E3),Us.clear(),De(Ip)}function E3(e){Tr.includes(e)||M3(e)}function M3(e){Tr.splice(dP(Tr,t=>t.priority>e.priority),0,e)}function Ip(e){const t=Op;for(let r=0;r<Tr.length;r++){const n=Tr[r];$c=n.priority,n.idle||(Np(n),n.advance(e),n.idle||t.push(n))}return $c=0,Op=Tr,Op.length=0,Tr=t,Tr.length>0}function dP(e,t){const r=e.findIndex(t);return r<0?e.length:r}var pP=(e,t,r)=>Math.min(Math.max(r,e),t),vP={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Vr="[-+]?\\d*\\.?\\d+",Vc=Vr+"%";function zc(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gP=new RegExp("rgb"+zc(Vr,Vr,Vr)),mP=new RegExp("rgba"+zc(Vr,Vr,Vr,Vr)),yP=new RegExp("hsl"+zc(Vr,Vc,Vc)),_P=new RegExp("hsla"+zc(Vr,Vc,Vc,Vr)),bP=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,SP=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,wP=/^#([0-9a-fA-F]{6})$/,xP=/^#([0-9a-fA-F]{8})$/;function TP(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=wP.exec(e))?parseInt(t[1]+"ff",16)>>>0:ci&&ci[e]!==void 0?ci[e]:(t=gP.exec(e))?(so(t[1])<<24|so(t[2])<<16|so(t[3])<<8|255)>>>0:(t=mP.exec(e))?(so(t[1])<<24|so(t[2])<<16|so(t[3])<<8|A3(t[4]))>>>0:(t=bP.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=xP.exec(e))?parseInt(t[1],16)>>>0:(t=SP.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=yP.exec(e))?(C3(D3(t[1]),Fc(t[2]),Fc(t[3]))|255)>>>0:(t=_P.exec(e))?(C3(D3(t[1]),Fc(t[2]),Fc(t[3]))|A3(t[4]))>>>0:null}function Bp(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function C3(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,a=Bp(i,n,e+1/3),o=Bp(i,n,e),s=Bp(i,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function so(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function D3(e){return(parseFloat(e)%360+360)%360/360}function A3(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function k3(e){let t=TP(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${a})`}var Ys=(e,t,r)=>{if(ae.fun(e))return e;if(ae.arr(e))return Ys({range:e,output:t,extrapolate:r});if(ae.str(e.output[0]))return Pp(e);const n=e,i=n.output,a=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",l=n.easing||(u=>u);return u=>{const c=EP(u,a);return LP(u,a[c],a[c+1],i[c],i[c+1],l,o,s,n.map)}};function LP(e,t,r,n,i,a,o,s,l){let u=l?l(e):e;if(u<t){if(o==="identity")return u;o==="clamp"&&(u=t)}if(u>r){if(s==="identity")return u;s==="clamp"&&(u=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=a(u),n===-1/0?u=-u:i===1/0?u=u+n:u=u*(i-n)+n,u)}function EP(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var MP=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,i=t==="end"?Math.floor(n):Math.ceil(n);return pP(0,1,i/e)},Hc=1.70158,Gc=Hc*1.525,P3=Hc+1,N3=2*Math.PI/3,O3=2*Math.PI/4.5,Wc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,CP={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>P3*e*e*e-Hc*e*e,easeOutBack:e=>1+P3*Math.pow(e-1,3)+Hc*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Gc+1)*2*e-Gc)/2:(Math.pow(2*e-2,2)*((Gc+1)*(e*2-2)+Gc)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*N3),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*N3)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*O3))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*O3)/2+1,easeInBounce:e=>1-Wc(1-e),easeOutBounce:Wc,easeInOutBounce:e=>e<.5?(1-Wc(1-2*e))/2:(1+Wc(2*e-1))/2,steps:MP},qs=Symbol.for("FluidValue.get"),lo=Symbol.for("FluidValue.observers"),Lr=e=>!!(e&&e[qs]),Kt=e=>e&&e[qs]?e[qs]():e,I3=e=>e[lo]||null;function DP(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Zs(e,t){const r=e[lo];r&&r.forEach(n=>{DP(n,t)})}var B3=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");AP(this,e)}},AP=(e,t)=>$3(e,qs,t);function uo(e,t){if(e[qs]){let r=e[lo];r||$3(e,lo,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function js(e,t){const r=e[lo];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[lo]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var $3=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Xc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,kP=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,R3=new RegExp(`(${Xc.source})(%|[a-z]+)`,"i"),PP=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Uc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,V3=e=>{const[t,r]=NP(e);if(!t||kp())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&Uc.test(r))return V3(r);if(r)return r}return e},NP=e=>{const t=Uc.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},$p,OP=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,z3=e=>{$p||($p=ci?new RegExp(`(${Object.keys(ci).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Kt(a).replace(Uc,V3).replace(kP,k3).replace($p,k3)),r=t.map(a=>a.match(Xc).map(Number)),i=r[0].map((a,o)=>r.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Ys({...e,output:a}));return a=>{var l;const o=!R3.test(t[0])&&((l=t.find(u=>R3.test(u)))==null?void 0:l.replace(Xc,""));let s=0;return t[0].replace(Xc,()=>`${i[s++](a)}${o||""}`).replace(PP,OP)}},Rp="react-spring: ",F3=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Rp}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},IP=F3(console.warn);function BP(){IP(`${Rp}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var $P=F3(console.warn);function RP(){$P(`${Rp}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Yc(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!kp()&&Uc.test(e)||e in(ci||{}))}var Vp=kp()?S.useEffect:S.useLayoutEffect,VP=()=>{const e=S.useRef(!1);return Vp(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function H3(){const e=S.useState()[1],t=VP();return()=>{t.current&&e(Math.random())}}var G3=e=>S.useEffect(e,zP),zP=[];function W3(e){const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e}),t.current}var Qs=Symbol.for("Animated:node"),FP=e=>!!e&&e[Qs]===e,sn=e=>e&&e[Qs],zp=(e,t)=>cP(e,Qs,t),qc=e=>e&&e[Qs]&&e[Qs].getPayload(),X3=class{constructor(){zp(this,this)}getPayload(){return this.payload||[]}},Zc=class S7 extends X3{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new S7(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return ae.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},jc=class w7 extends Zc{constructor(t){super(0),this._string=null,this._toString=Ys({output:[t,t]})}static create(t){return new w7(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Ys({output:[this.getValue(),t]})),this._value=0,super.reset()}},Qc={dependencies:null},Kc=class extends X3{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return on(this.source,(r,n)=>{FP(r)?t[n]=r.getValue(e):Lr(r)?t[n]=Kt(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&$e(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return on(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Qc.dependencies&&Lr(e)&&Qc.dependencies.add(e);const t=qc(e);t&&$e(t,r=>this.add(r))}},HP=class x7 extends Kc{constructor(t){super(t)}static create(t){return new x7(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,i)=>n.setValue(t[i])).some(Boolean):(super.setValue(t.map(GP)),!0)}};function GP(e){return(Yc(e)?jc:Zc).create(e)}function Fp(e){const t=sn(e);return t?t.constructor:ae.arr(e)?HP:Yc(e)?jc:Zc}var U3=(e,t)=>{const r=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return S.forwardRef((n,i)=>{const a=S.useRef(null),o=r&&S.useCallback(p=>{a.current=UP(i,p)},[i]),[s,l]=XP(n,t),u=H3(),c=()=>{const p=a.current;if(r&&!p)return;(p?t.applyAnimatedValues(p,s.getValue(!0)):!1)===!1&&u()},f=new WP(c,l),d=S.useRef(void 0);Vp(()=>(d.current=f,$e(l,p=>uo(p,f)),()=>{d.current&&($e(d.current.deps,p=>js(p,d.current)),De.cancel(d.current.update))})),S.useEffect(c,[]),G3(()=>()=>{const p=d.current;$e(p.deps,v=>js(v,p))});const h=t.getComponentProps(s.getValue());return ov.createElement(e,{...h,ref:o})})},WP=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&De.write(this.update)}};function XP(e,t){const r=new Set;return Qc.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Kc(e),Qc.dependencies=null,[e,r]}function UP(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var Y3=Symbol.for("AnimatedComponent"),YP=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new Kc(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},a=o=>{const s=q3(o)||"Anonymous";return ae.str(o)?o=a[o]||(a[o]=U3(o,i)):o=o[Y3]||(o[Y3]=U3(o,i)),o.displayName=`Animated(${s})`,o};return on(e,(o,s)=>{ae.arr(e)&&(s=q3(o)),a[s]=a(o)}),{animated:a}},q3=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function na(e,...t){return ae.fun(e)?e(...t):e}var Ks=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):sr(e).includes(t))),Z3=(e,t)=>ae.obj(e)?t&&e[t]:e,j3=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,qP=e=>e,Hp=(e,t=qP)=>{let r=ZP;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const a=t(e[i],i);ae.und(a)||(n[i]=a)}return n},ZP=["config","onProps","onStart","onChange","onPause","onResume","onRest"],jP={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function QP(e){const t={};let r=0;if(on(e,(n,i)=>{jP[i]||(t[i]=n,r++)}),r)return t}function Q3(e){const t=QP(e);if(t){const r={to:t};return on(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function Js(e){return e=Kt(e),ae.arr(e)?e.map(Js):Yc(e)?Rr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function KP(e){for(const t in e)return!0;return!1}function Gp(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}function JP(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function eN(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var tN={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Wp={...tN.default,mass:1,damping:1,easing:CP.linear,clamp:!1},rN=class{constructor(){this.velocity=0,Object.assign(this,Wp)}};function nN(e,t,r){r&&(r={...r},K3(r,t),t={...r,...t}),K3(e,t),Object.assign(e,t);for(const o in Wp)e[o]==null&&(e[o]=Wp[o]);let{frequency:n,damping:i}=e;const{mass:a}=e;return ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*a,e.friction=4*Math.PI*i*a/n),e}function K3(e,t){if(!ae.und(t.decay))e.duration=void 0;else{const r=!ae.und(t.tension)||!ae.und(t.friction);(r||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var J3=[],iN=class{constructor(){this.changed=!1,this.values=J3,this.toValues=null,this.fromValues=J3,this.config=new rN,this.immediate=!1}};function e7(e,{key:t,props:r,defaultProps:n,state:i,actions:a}){return new Promise((o,s)=>{let l,u,c=Ks(r.cancel??(n==null?void 0:n.cancel),t);if(c)h();else{ae.und(r.pause)||(i.paused=Ks(r.pause,t));let p=n==null?void 0:n.pause;p!==!0&&(p=i.paused||Ks(p,t)),l=na(r.delay||0,t),p?(i.resumeQueue.add(d),a.pause()):(a.resume(),d())}function f(){i.resumeQueue.add(d),i.timeouts.delete(u),u.cancel(),l=u.time-De.now()}function d(){l>0&&!Rr.skipAnimation?(i.delayed=!0,u=De.setTimeout(h,l),i.pauseQueue.add(f),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(f),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{a.start({...r,callId:e,cancel:c},o)}catch(p){s(p)}}})}var Xp=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?co(e.get()):t.every(r=>r.noop)?t7(e.get()):zr(e.get(),t.every(r=>r.finished)),t7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zr=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),co=e=>({value:e,cancelled:!0,finished:!1});function r7(e,t,r,n){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:l}=r;return!a&&e===s&&!t.reset?l:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const u=Hp(t,(g,m)=>m==="onRest"?void 0:g);let c,f;const d=new Promise((g,m)=>(c=g,f=m)),h=g=>{const m=i<=(r.cancelId||0)&&co(n)||i!==r.asyncId&&zr(n,!1);if(m)throw g.result=m,f(g),g},p=(g,m)=>{const y=new n7,_=new i7;return(async()=>{if(Rr.skipAnimation)throw el(r),_.result=zr(n,!1),f(_),_;h(y);const b=ae.obj(g)?{...g}:{...m,to:g};b.parentId=i,on(u,(x,T)=>{ae.und(b[T])&&(b[T]=x)});const w=await n.start(b);return h(y),r.paused&&await new Promise(x=>{r.resumeQueue.add(x)}),w})()};let v;if(Rr.skipAnimation)return el(r),zr(n,!1);try{let g;ae.arr(e)?g=(async m=>{for(const y of m)await p(y)})(e):g=Promise.resolve(e(p,n.stop.bind(n))),await Promise.all([g.then(c),d]),v=zr(n.get(),!0,!1)}catch(g){if(g instanceof n7)v=g.result;else if(g instanceof i7)v=g.result;else throw g}finally{i==r.asyncId&&(r.asyncId=a,r.asyncTo=a?s:void 0,r.promise=a?l:void 0)}return ae.fun(o)&&De.batchedUpdates(()=>{o(v,n,n.item)}),v})()}function el(e,t){Ws(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var n7=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},i7=class extends Error{constructor(){super("SkipAnimationSignal")}},Up=e=>e instanceof Yp,aN=1,Yp=class extends B3{constructor(){super(...arguments),this.id=aN++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=sn(this);return e&&e.getValue()}to(...e){return Rr.to(this,e)}interpolate(...e){return BP(),Rr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Zs(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Rc.sort(this),Zs(this,{type:"priority",parent:this,priority:e})}},ia=Symbol.for("SpringPhase"),a7=1,qp=2,Zp=4,jp=e=>(e[ia]&a7)>0,fi=e=>(e[ia]&qp)>0,tl=e=>(e[ia]&Zp)>0,o7=(e,t)=>t?e[ia]|=qp|a7:e[ia]&=~qp,s7=(e,t)=>t?e[ia]|=Zp:e[ia]&=~Zp,oN=class extends Yp{constructor(e,t){if(super(),this.animation=new iN,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ae.und(e)||!ae.und(t)){const r=ae.obj(e)?{...e}:{...t,from:e};ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(fi(this)||this._state.asyncTo)||tl(this)}get goal(){return Kt(this.animation.to)}get velocity(){const e=sn(this);return e instanceof Zc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return jp(this)}get isAnimating(){return fi(this)}get isPaused(){return tl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:a}=n,o=qc(n.to);!o&&Lr(n.to)&&(i=sr(Kt(n.to))),n.values.forEach((u,c)=>{if(u.done)return;const f=u.constructor==jc?1:o?o[c].lastPosition:i[c];let d=n.immediate,h=f;if(!d){if(h=u.lastPosition,a.tension<=0){u.done=!0;return}let p=u.elapsedTime+=e;const v=n.fromValues[c],g=u.v0!=null?u.v0:u.v0=ae.arr(a.velocity)?a.velocity[c]:a.velocity;let m;const y=a.precision||(v==f?.005:Math.min(1,Math.abs(f-v)*.001));if(ae.und(a.duration))if(a.decay){const _=a.decay===!0?.998:a.decay,b=Math.exp(-(1-_)*p);h=v+g/(1-_)*(1-b),d=Math.abs(u.lastPosition-h)<=y,m=g*b}else{m=u.lastVelocity==null?g:u.lastVelocity;const _=a.restVelocity||y/10,b=a.clamp?0:a.bounce,w=!ae.und(b),x=v==f?u.v0>0:v<f;let T,L=!1;const M=1,C=Math.ceil(e/M);for(let E=0;E<C&&(T=Math.abs(m)>_,!(!T&&(d=Math.abs(f-h)<=y,d)));++E){w&&(L=h==f||h>f==x,L&&(m=-m*b,h=f));const P=-a.tension*1e-6*(h-f),D=-a.friction*.001*m,k=(P+D)/a.mass;m=m+k*M,h=h+m*M}}else{let _=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,u.durationProgress>0&&(u.elapsedTime=a.duration*u.durationProgress,p=u.elapsedTime+=e)),_=(a.progress||0)+p/this._memoizedDuration,_=_>1?1:_<0?0:_,u.durationProgress=_),h=v+a.easing(_)*(f-v),m=(h-u.lastPosition)/e,d=_==1}u.lastVelocity=m,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),d=!0)}o&&!o[c].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(h,a.round)&&(r=!0)});const s=sn(this),l=s.getValue();if(t){const u=Kt(n.to);(l!==u||r)&&!a.decay?(s.setValue(u),this._onChange(u)):r&&a.decay&&this._onChange(l),this._stop()}else r&&this._onChange(l)}set(e){return De.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(fi(this)){const{to:e,config:t}=this.animation;De.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return ae.und(e)?(r=this.queue||[],this.queue=[]):r=[ae.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Xp(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),el(this._state,e&&this._lastCallId),De.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=ae.obj(r)?r[t]:r,(r==null||Gp(r))&&(r=void 0),n=ae.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return jp(this)||(e.reverse&&([r,n]=[n,r]),n=Kt(n),ae.und(n)?sn(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,Hp(e,(o,s)=>/^on/.test(s)?Z3(o,r):o)),c7(this,e,"onProps"),il(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return e7(++this._lastCallId,{key:r,props:e,defaultProps:n,state:a,actions:{pause:()=>{tl(this)||(s7(this,!0),Xs(a.pauseQueue),il(this,"onPause",zr(this,rl(this,this.animation.to)),this))},resume:()=>{tl(this)&&(s7(this,!1),fi(this)&&this._resume(),Xs(a.resumeQueue),il(this,"onResume",zr(this,rl(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=l7(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(co(this));const n=!ae.und(e.to),i=!ae.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(co(this));const{key:a,defaultProps:o,animation:s}=this,{to:l,from:u}=s;let{to:c=l,from:f=u}=e;i&&!n&&(!t.default||ae.und(c))&&(c=f),t.reverse&&([c,f]=[f,c]);const d=!xn(f,u);d&&(s.from=f),f=Kt(f);const h=!xn(c,l);h&&this._focus(c);const p=Gp(t.to),{config:v}=s,{decay:g,velocity:m}=v;(n||i)&&(v.velocity=0),t.config&&!p&&nN(v,na(t.config,a),t.config!==o.config?na(o.config,a):void 0);let y=sn(this);if(!y||ae.und(c))return r(zr(this,!0));const _=ae.und(t.reset)?i&&!t.default:!ae.und(f)&&Ks(t.reset,a),b=_?f:this.get(),w=Js(c),x=ae.num(w)||ae.arr(w)||Yc(w),T=!p&&(!x||Ks(o.immediate||t.immediate,a));if(h){const E=Fp(c);if(E!==y.constructor)if(T)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${E.name}, as the "to" prop suggests`)}const L=y.constructor;let M=Lr(c),C=!1;if(!M){const E=_||!jp(this)&&d;(h||E)&&(C=xn(Js(b),w),M=!C),(!xn(s.immediate,T)&&!T||!xn(v.decay,g)||!xn(v.velocity,m))&&(M=!0)}if(C&&fi(this)&&(s.changed&&!_?M=!0:M||this._stop(l)),!p&&((M||Lr(l))&&(s.values=y.getPayload(),s.toValues=Lr(c)?null:L==jc?[1]:sr(w)),s.immediate!=T&&(s.immediate=T,!T&&!_&&this._set(l)),M)){const{onRest:E}=s;$e(lN,D=>c7(this,t,D));const P=zr(this,rl(this,l));Xs(this._pendingCalls,P),this._pendingCalls.add(r),s.changed&&De.batchedUpdates(()=>{var D;s.changed=!_,E==null||E(P,this),_?na(o.onRest,P):(D=s.onStart)==null||D.call(s,P,this)})}_&&this._set(b),p?r(r7(t.to,t,this._state,this)):M?this._start():fi(this)&&!h?this._pendingCalls.add(r):r(t7(b))}_focus(e){const t=this.animation;e!==t.to&&(I3(this)&&this._detach(),t.to=e,I3(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Lr(t)&&(uo(t,this),Up(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Lr(e)&&js(e,this)}_set(e,t=!0){const r=Kt(e);if(!ae.und(r)){const n=sn(this);if(!n||!xn(r,n.getValue())){const i=Fp(r);!n||n.constructor!=i?zp(this,i.create(r)):n.setValue(r),n&&De.batchedUpdates(()=>{this._onChange(r,t)})}}return sn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,il(this,"onStart",zr(this,rl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),na(this.animation.onChange,e,this)),na(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;sn(this).reset(Kt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),fi(this)||(o7(this,!0),tl(this)||this._resume())}_resume(){Rr.skipAnimation?this.finish():Rc.start(this)}_stop(e,t){if(fi(this)){o7(this,!1);const r=this.animation;$e(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Zs(this,{type:"idle",parent:this});const n=t?co(this.get()):zr(this.get(),rl(this,e??r.to));Xs(this._pendingCalls,n),r.changed&&(r.changed=!1,il(this,"onRest",n,this))}}};function rl(e,t){const r=Js(t),n=Js(e.get());return xn(n,r)}function l7(e,t=e.loop,r=e.to){const n=na(t);if(n){const i=n!==!0&&Q3(n),a=(i||e).reverse,o=!i||i.reset;return nl({...e,loop:t,default:!1,pause:void 0,to:!a||Gp(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function nl(e){const{to:t,from:r}=e=Q3(e),n=new Set;return ae.obj(t)&&u7(t,n),ae.obj(r)&&u7(r,n),e.keys=n.size?Array.from(n):null,e}function sN(e){const t=nl(e);return ae.und(t.default)&&(t.default=Hp(t)),t}function u7(e,t){on(e,(r,n)=>r!=null&&t.add(n))}var lN=["onStart","onRest","onChange","onPause","onResume"];function c7(e,t,r){e.animation[r]=t[r]!==j3(t,r)?Z3(t[r],e.key):void 0}function il(e,t,...r){var n,i,a,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(a=e.defaultProps)[t])==null||o.call(a,...r)}var uN=["onStart","onChange","onRest"],cN=1,fN=class{constructor(e,t){this.id=cN++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];ae.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(nl(e)),this}start(e){let{queue:t}=this;return e?t=sr(e).map(nl):this.queue=[],this._flush?this._flush(this,t):(g7(this,t),Qp(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;$e(sr(t),n=>r[n].stop(!!e))}else el(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(ae.und(e))this.start({pause:!0});else{const t=this.springs;$e(sr(e),r=>t[r].pause())}return this}resume(e){if(ae.und(e))this.start({pause:!1});else{const t=this.springs;$e(sr(e),r=>t[r].resume())}return this}each(e){on(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,Ws(e,([s,l])=>{l.value=this.get(),s(l,this,this._item)}));const a=!n&&this._started,o=i||a&&r.size?this.get():null;i&&t.size&&Ws(t,([s,l])=>{l.value=o,s(l,this,this._item)}),a&&(this._started=!1,Ws(r,([s,l])=>{l.value=o,s(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;De.onFrame(this._onFrame)}};function Qp(e,t){return Promise.all(t.map(r=>f7(e,r))).then(r=>Xp(e,r))}async function f7(e,t,r){const{keys:n,to:i,from:a,loop:o,onRest:s,onResolve:l}=t,u=ae.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const c=ae.arr(i)||ae.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):$e(uN,v=>{const g=t[v];if(ae.fun(g)){const m=e._events[v];t[v]=({finished:y,cancelled:_})=>{const b=m.get(g);b?(y||(b.finished=!1),_&&(b.cancelled=!0)):m.set(g,{value:null,finished:y||!1,cancelled:_||!1})},u&&(u[v]=t[v])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Xs(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const d=(n||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||j3(t,"cancel")===!0;(c||h&&f.asyncId)&&d.push(e7(++e._lastAsyncId,{props:t,state:f,actions:{pause:Ap,resume:Ap,start(v,g){h?(el(f,e._lastAsyncId),g(co(e))):(v.onRest=s,g(r7(c,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});const p=Xp(e,await Promise.all(d));if(o&&p.finished&&!(r&&p.noop)){const v=l7(t,o,i);if(v)return g7(e,[v]),f7(e,v,!0)}return l&&De.batchedUpdates(()=>l(p,e,e.item)),p}function h7(e,t){const r={...e.springs};return t&&$e(sr(t),n=>{ae.und(n.keys)&&(n=nl(n)),ae.obj(n.to)||(n={...n,to:void 0}),v7(r,n,i=>p7(i))}),d7(e,r),r}function d7(e,t){on(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,uo(r,e))})}function p7(e,t){const r=new oN;return r.key=e,t&&uo(r,t),r}function v7(e,t,r){t.keys&&$e(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function g7(e,t){$e(t,r=>{v7(e.springs,r,n=>p7(n,e))})}var hN=ov.createContext({pause:!1,immediate:!1}),dN=()=>{const e=[],t=function(n){RP();const i=[];return $e(e,(a,o)=>{if(ae.und(n))i.push(a.start());else{const s=r(n,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return $e(e,n=>n.pause(...arguments)),this},t.resume=function(){return $e(e,n=>n.resume(...arguments)),this},t.set=function(n){$e(e,(i,a)=>{const o=ae.fun(n)?n(a,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return $e(e,(a,o)=>{if(ae.und(n))i.push(a.start());else{const s=this._getProps(n,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return $e(e,n=>n.stop(...arguments)),this},t.update=function(n){return $e(e,(i,a)=>i.update(this._getProps(n,i,a))),this};const r=function(n,i,a){return ae.fun(n)?n(a,i):n};return t._getProps=r,t};function pN(e,t,r){const n=ae.fun(t)&&t;n&&!r&&(r=[]);const i=S.useMemo(()=>n||arguments.length==3?dN():void 0,[]),a=S.useRef(0),o=H3(),s=S.useMemo(()=>({ctrls:[],queue:[],flush(m,y){const _=h7(m,y);return a.current>0&&!s.queue.length&&!Object.keys(_).some(w=>!m.springs[w])?Qp(m,y):new Promise(w=>{d7(m,_),s.queue.push(()=>{w(Qp(m,y))}),o()})}}),[]),l=S.useRef([...s.ctrls]),u=S.useRef([]),c=W3(e)||0;S.useMemo(()=>{$e(l.current.slice(e,c),m=>{JP(m,i),m.stop(!0)}),l.current.length=e,f(c,e)},[e]),S.useMemo(()=>{f(0,Math.min(c,e))},r);function f(m,y){for(let _=m;_<y;_++){const b=l.current[_]||(l.current[_]=new fN(null,s.flush)),w=n?n(_,b):t[_];w&&(u.current[_]=sN(w))}}const d=l.current.map((m,y)=>h7(m,u.current[y])),h=S.useContext(hN),p=W3(h),v=h!==p&&KP(h);Vp(()=>{a.current++,s.ctrls=l.current;const{queue:m}=s;m.length&&(s.queue=[],$e(m,y=>y())),$e(l.current,(y,_)=>{i==null||i.add(y),v&&y.start({default:h});const b=u.current[_];b&&(eN(y,b.ref),y.ref?y.queue.push(b):y.start(b))})}),G3(()=>()=>{$e(s.ctrls,m=>m.stop(!0))});const g=d.map(m=>({...m}));return i?[g,i]:g}function vN(e,t){const r=ae.fun(e),[[n],i]=pN(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var gN=class extends Yp{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ys(...t);const r=this._get(),n=Fp(r);zp(this,n.create(r))}advance(e){const t=this._get(),r=this.get();xn(t,r)||(sn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&m7(this._active)&&Kp(this)}_get(){const e=ae.arr(this.source)?this.source.map(Kt):sr(Kt(this.source));return this.calc(...e)}_start(){this.idle&&!m7(this._active)&&(this.idle=!1,$e(qc(this),e=>{e.done=!1}),Rr.skipAnimation?(De.batchedUpdates(()=>this.advance()),Kp(this)):Rc.start(this))}_attach(){let e=1;$e(sr(this.source),t=>{Lr(t)&&uo(t,this),Up(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){$e(sr(this.source),e=>{Lr(e)&&js(e,this)}),this._active.clear(),Kp(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=sr(this.source).reduce((t,r)=>Math.max(t,(Up(r)?r.priority:0)+1),0))}};function mN(e){return e.idle!==!1}function m7(e){return!e.size||Array.from(e).every(mN)}function Kp(e){e.idle||(e.idle=!0,$e(qc(e),t=>{t.done=!0}),Zs(e,{type:"idle",parent:e}))}Rr.assign({createStringInterpolator:z3,to:(e,t)=>new gN(e,t)});var y7=/^--/;function yN(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!y7.test(e)&&!(al.hasOwnProperty(e)&&al[e])?t+"px":(""+t).trim()}var _7={};function _N(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:l,...u}=t,c=Object.values(u),f=Object.keys(u).map(d=>r||e.hasAttribute(d)?d:_7[d]||(_7[d]=d.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const d in i)if(i.hasOwnProperty(d)){const h=yN(d,i[d]);y7.test(d)?e.style.setProperty(d,h):e.style[d]=h}f.forEach((d,h)=>{e.setAttribute(d,c[h])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),l!==void 0&&e.setAttribute("viewBox",l)}var al={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bN=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),SN=["Webkit","Ms","Moz","O"];al=Object.keys(al).reduce((e,t)=>(SN.forEach(r=>e[bN(r,t)]=e[t]),e),al);var wN=/^(matrix|translate|scale|rotate|skew)/,xN=/^(translate)/,TN=/^(rotate|skew)/,Jp=(e,t)=>ae.num(e)&&e!==0?e+t:e,Jc=(e,t)=>ae.arr(e)?e.every(r=>Jc(r,t)):ae.num(e)?e===t:parseFloat(e)===t,LN=class extends Kc{constructor({x:e,y:t,z:r,...n}){const i=[],a=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),a.push(o=>[`translate3d(${o.map(s=>Jp(s,"px")).join(",")})`,Jc(o,0)])),on(n,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(l=>[l,l===""]);else if(wN.test(s)){if(delete n[s],ae.und(o))return;const l=xN.test(s)?"px":TN.test(s)?"deg":"";i.push(sr(o)),a.push(s==="rotate3d"?([u,c,f,d])=>[`rotate3d(${u},${c},${f},${Jp(d,l)})`,Jc(d,0)]:u=>[`${s}(${u.map(c=>Jp(c,l)).join(",")})`,Jc(u,s.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new EN(i,a)),super(n)}},EN=class extends B3{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return $e(this.inputs,(r,n)=>{const i=Kt(r[0]),[a,o]=this.transforms[n](ae.arr(i)?i:r.map(Kt));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&$e(this.inputs,t=>$e(t,r=>Lr(r)&&uo(r,this)))}observerRemoved(e){e==0&&$e(this.inputs,t=>$e(t,r=>Lr(r)&&js(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Zs(this,e)}},MN=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Rr.assign({batchedUpdates:k7.unstable_batchedUpdates,createStringInterpolator:z3,colors:vP});var CN=YP(MN,{applyAnimatedValues:_N,createAnimatedStyle:e=>new LN(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),DN=CN.animated;const AN=({slide:e,index:t,selected:r,active:n,onClick:i})=>{const a=S.useRef(null);return S.createElement("div",{ref:a,className:Me(si.thumbnailItem,{[si.active]:n,[si.selected]:r}),onClick:i},S.createElement("div",{className:si.thumbnail},S.createElement(c3,{slide:e,size:112})),S.createElement("div",{className:Me(si.label)},J7(t+1,2)))},kN=({className:e})=>{const{selectedSlidesIndex:t,updateSelectedSlidesIndex:r}=_e(),{slides:n,slideIndex:i,updateSlideIndex:a}=ke(),o=S.useMemo(()=>[...t,i],[t,i]),s=S.useRef(null),[{scrollTop:l},u]=vN(()=>({scrollTop:0,config:{tension:300,clamp:!0}})),c=()=>{const h=s.current;if(!h)return;const p=h.children.item(0);if(!p)return;const v=p.children.item(i);if(!v)return;const g=h.offsetHeight,y=h.scrollHeight-g;if(y<=0){u.start({scrollTop:0,from:{scrollTop:h.scrollTop}});return}const _=v.offsetTop,b=v.offsetHeight,w=Math.max(0,Math.min(_-(g-b)/2,y));u.start({scrollTop:w,from:{scrollTop:h.scrollTop}})},f=h=>{r([]),i!==h&&a(h)},d=h=>{r([]),f(h)};return S.useEffect(()=>{c()},[i,n.length]),S.createElement(DN.div,{className:Me(si.thumbnails,e),ref:s,scrollTop:l},S.createElement("div",{className:Me("thumbnail-list",si.thumbnailList)},n.map((h,p)=>S.createElement("div",{className:si.thumbnailContainer,key:h.id},S.createElement(AN,{slide:h,index:p,active:i===p,selected:o.includes(p),onClick:()=>d(p)})))))},PN=()=>S.createElement(kN,null);Ie.ElementTypes=Ge,Ie.PPTCanvas=oP,Ie.PPThumbnails=PN,Ie.ShapePathFormulasKeys=Pe,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});
|
|
42
|
+
`);let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(n&63|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(n&63|128))}return t},rP=e=>{let t="",r,n,i,a,o,s,l,u=0;for(e=tP(e);u<e.length;)r=e.charCodeAt(u++),n=e.charCodeAt(u++),i=e.charCodeAt(u++),a=r>>2,o=(r&3)<<4|n>>4,s=(n&15)<<2|i>>6,l=i&63,isNaN(n)?s=l=64:isNaN(i)&&(l=64),t=t+Oc.charAt(a)+Oc.charAt(o)+Oc.charAt(s)+Oc.charAt(l);return t},nP=e=>{if(typeof e!="string")return e;let t=e;const r=/fill\s*[=:]\s*["']?#([0-9a-fA-F]{8})["']?/g,n=/fill\s*[=:]\s*["']?rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*[0-9.]+\s*\)["']?/g;return t=t.replace(r,i=>i.includes(":")?"fill: transparent":'fill="transparent"'),t=t.replace(n,i=>i.includes(":")?"fill: transparent":'fill="transparent"'),t},y3=e=>{let r=new XMLSerializer().serializeToString(e);return r=nP(r),eP+rP(r)},at=e=>{if(!e)return{alpha:0,color:"#000000"};const t=Je(e),r=t.getAlpha(),n=r===0?"#ffffff":t.setAlpha(1).toHexString();return{alpha:r,color:n}},iP=e=>{const t=/^data:image\/svg\+xml;base64,/.test(e),r=/\.svg$/.test(e);return t||r},xp=e=>{const t=/^data:image\/[^;]+;base64,/;return e.match(t)!==null},Ic=16,aP=()=>{const{viewportRatio:e,viewportSize:t,theme:r,slides:n,title:i}=ke(),a=S.useMemo(()=>96*(t/960),[t]),o=S.useMemo(()=>96/72*(t/960),[t]),s=p=>{const v=Jk(p);let g=!1,m=0;const y=[],_=(b,w={})=>{for(const x of b){if("tagName"in x&&["div","li","p"].includes(x.tagName)&&y.length){const C=y[y.length-1];C.options||(C.options={}),C.options.breakLine=!0}const L={...w},M="attributes"in x?x.attributes.find(C=>C.key==="style"):null;if(M&&M.value){const C=M.value.split(";");for(const E of C){const P=E.match(/([^:]+):\s*(.+)/);if(P){const[D,k]=[P[1].trim(),P[2].trim()];D&&k&&(L[D]=k)}}}if("tagName"in x){if(x.tagName==="em"&&(L["font-style"]="italic"),x.tagName==="strong"&&(L["font-weight"]="bold"),x.tagName==="sup"&&(L["vertical-align"]="super"),x.tagName==="sub"&&(L["vertical-align"]="sub"),x.tagName==="a"){const C=x.attributes.find(E=>E.key==="href");L.href=(C==null?void 0:C.value)||""}if(x.tagName==="ul"&&(L["list-type"]="ul"),x.tagName==="ol"&&(L["list-type"]="ol"),x.tagName==="li"&&(g=!0),x.tagName==="p"&&"attributes"in x){const C=x.attributes.find(E=>E.key==="data-indent");C&&C.value&&(m=+C.value)}}if("tagName"in x&&x.tagName==="br")y.push({text:"",options:{breakLine:!0}});else if("content"in x){const C=x.content.replace(/ /g," ").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,""),E={};L["font-size"]&&(E.fontSize=parseInt(L["font-size"])/o),L.color&&(E.color=at(L.color).color),L["background-color"],L["text-decoration-line"]&&(L["text-decoration-line"].indexOf("underline")!==-1&&(E.underline={color:E.color||"#000000",style:"sng"}),L["text-decoration-line"].indexOf("line-through")!==-1&&(E.strike="sngStrike")),L["text-decoration"]&&(L["text-decoration"].indexOf("underline")!==-1&&(E.underline={color:E.color||"#000000",style:"sng"}),L["text-decoration"].indexOf("line-through")!==-1&&(E.strike="sngStrike")),L["vertical-align"]&&(L["vertical-align"]==="super"&&(E.superscript=!0),L["vertical-align"]==="sub"&&(E.subscript=!0)),L["text-align"]&&(E.align=L["text-align"]),L["font-weight"]&&(E.bold=L["font-weight"]==="bold"),L["font-style"]&&(E.italic=L["font-style"]==="italic"),L["font-family"]&&(E.fontFace=L["font-family"]),L.href&&(E.hyperlink={url:L.href}),g&&L["list-type"]==="ol"&&(E.bullet={type:"number",indent:(E.fontSize||Ic)*1.25},E.paraSpaceBefore=.1,g=!1),g&&L["list-type"]==="ul"&&(E.bullet={indent:(E.fontSize||Ic)*1.25},E.paraSpaceBefore=.1,g=!1),m&&(E.indentLevel=m,m=0),y.push({text:C,options:E})}else"children"in x&&_(x.children,L)}};return _(v),y},l=(p,v={x:1,y:1})=>p.map(g=>{if(g.close!==void 0)return{close:!0};if(g.type==="M")return{x:g.x/a*v.x,y:g.y/a*v.y,moveTo:!0};if(g.curve){if(g.curve.type==="cubic")return{x:g.x/a*v.x,y:g.y/a*v.y,curve:{type:"cubic",x1:g.curve.x1/a*v.x,y1:g.curve.y1/a*v.y,x2:g.curve.x2/a*v.x,y2:g.curve.y2/a*v.y}};if(g.curve.type==="quadratic")return{x:g.x/a*v.x,y:g.y/a*v.y,curve:{type:"quadratic",x1:g.curve.x1/a*v.x,y1:g.curve.y1/a*v.y}}}return{x:g.x/a*v.x,y:g.y/a*v.y}}),u=p=>{const v=at(p.color),{h:g,v:m}=p;let y=4,_=45;return g===0&&m===0?(y=4,_=45):g===0?m>0?(y=m,_=90):(y=-m,_=270):m===0?g>0?(y=g,_=1):(y=-g,_=180):g>0&&m>0?(y=Math.max(g,m),_=45):g>0&&m<0?(y=Math.max(g,-m),_=315):g<0&&m>0?(y=Math.max(-g,m),_=135):g<0&&m<0&&(y=Math.max(-g,-m),_=225),{type:"outer",color:v.color.replace("#",""),opacity:v.alpha,blur:p.blur/o,offset:y,angle:_}},c={solid:"solid",dashed:"dash",dotted:"sysDot"},f=p=>{const v=at((p==null?void 0:p.color)||"#000000");return{color:v.color,transparency:(1-v.alpha)*100,width:(p.width||1)/o,dashType:p.style?c[p.style]:"solid"}},d=p=>{const{type:v,target:g}=p;if(v==="web")return{url:g};if(v==="slide"){const m=n.findIndex(y=>y.id===g);if(m!==-1)return{slide:m+1}}return null};return{exportPPTX:({slides:p,theme:v,masterOverwrite:g=!0,ignoreMedia:m=!0,writeFile:y,onError:_,onSuccess:b})=>{var x,T,L,M,C,E,P,D,k,N,I,O,z,$,R,B;const w=new A7;if(e===.625?w.layout="LAYOUT_16x10":e===.75?w.layout="LAYOUT_4x3":e===.70710678?(w.defineLayout({name:"A3",width:10,height:7.0710678}),w.layout="A3"):e===1.41421356?(w.defineLayout({name:"A3_V",width:10,height:14.1421356}),w.layout="A3_V"):w.layout="LAYOUT_16x9",g){const{color:H,alpha:F}=at(v.backgroundColor);w.defineSlideMaster({title:"PPTIST_MASTER",background:{color:H,transparency:(1-F)*100}})}for(const H of p){const F=w.addSlide();if(H.background){const A=H.background;if(A.type==="image"&&A.image)iP(A.image.src)?F.addImage({data:A.image.src,x:0,y:0,w:t/a,h:t*e/a}):xp(A.image.src)?F.background={data:A.image.src}:F.background={path:A.image.src};else if(A.type==="solid"&&A.color){const G=at(A.color);F.background={color:G.color,transparency:(1-G.alpha)*100}}else if(A.type==="gradient"&&A.gradient){const G=A.gradient.colors,Z=G[0].color,Q=G[G.length-1].color,q=Je.mix(Z,Q).toHexString(),W=at(q);F.background={color:W.color,transparency:(1-W.alpha)*100}}}if(H.remark){const G=new DOMParser().parseFromString(H.remark,"text/html").body.querySelectorAll("p"),Z=[];for(const Q of G){const q=Q.textContent;Z.push(q||"")}F.addNotes(Z.join(`
|
|
43
|
+
`))}if(H.elements){for(const A of H.elements)if(A.type==="text"){const G=s(A.content),Z={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fontSize:Ic/o,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10/o,paraSpaceBefore:5/o,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(A.rotate&&(Z.rotate=A.rotate),A.wordSpace&&(Z.charSpacing=A.wordSpace/o),A.lineHeight&&(Z.lineSpacingMultiple=A.lineHeight/1.25),A.fill){const Q=at(A.fill),q=A.opacity===void 0?1:A.opacity;Z.fill={color:Q.color,transparency:(1-Q.alpha*q)*100}}A.defaultColor&&(Z.color=at(A.defaultColor).color),A.defaultFontName&&(Z.fontFace=A.defaultFontName),A.shadow&&(Z.shadow=u(A.shadow)),(x=A.outline)!=null&&x.width&&(Z.line=f(A.outline)),A.opacity!==void 0&&(Z.transparency=(1-A.opacity)*100),A.paragraphSpace!==void 0&&(Z.paraSpaceBefore=A.paragraphSpace/o),A.vertical&&(Z.vert="eaVert"),F.addText(G,Z)}else if(A.type==="image"){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(xp(A.src)?G.data=A.src:G.path=A.src,A.flipH&&(G.flipH=A.flipH),A.flipV&&(G.flipV=A.flipV),A.rotate&&(G.rotate=A.rotate),A.link){const Z=d(A.link);Z&&(G.hyperlink=Z)}if((T=A.filters)!=null&&T.opacity&&(G.transparency=100-parseInt((L=A.filters)==null?void 0:L.opacity)),A.clip){A.clip.shape==="ellipse"&&(G.rounding=!0);const[Z,Q]=A.clip.range,[q,W]=Z,[j,Y]=Q,re=A.width/((j-q)/a),te=A.height/((Y-W)/a);G.w=re/a,G.h=te/a,G.sizing={type:"crop",x:q/a*re/a,y:W/a*te/a,w:(j-q)/a*re/a,h:(Y-W)/a*te/a}}F.addImage(G)}else if(A.type==="shape"){if(A.special){const G=document.querySelector(`.thumbnail-list .base-element-${A.id} svg`);if(!G||G.clientWidth<1||G.clientHeight<1)continue;const Q={data:y3(G),x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(A.rotate&&(Q.rotate=A.rotate),A.flipH&&(Q.flipH=A.flipH),A.flipV&&(Q.flipV=A.flipV),A.link){const q=d(A.link);q&&(Q.hyperlink=q)}F.addImage(Q)}else{const G={x:A.width/A.viewBox[0],y:A.height/A.viewBox[1]},Z=l(f3(A.path),G);let Q=at(A.fill);if(A.gradient){const j=A.gradient.colors,Y=j[0].color,re=j[j.length-1].color,te=Je.mix(Y,re).toHexString();Q=at(te)}A.pattern&&(Q=at("#00000000"));const q=A.opacity===void 0?1:A.opacity,W={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fill:{color:Q.color,transparency:(1-Q.alpha*q)*100},points:Z};if(A.flipH&&(W.flipH=A.flipH),A.flipV&&(W.flipV=A.flipV),A.shadow&&(W.shadow=u(A.shadow)),(M=A.outline)!=null&&M.width&&(W.line=f(A.outline)),A.rotate&&(W.rotate=A.rotate),A.link){const j=d(A.link);j&&(W.hyperlink=j)}F.addShape("custGeom",W)}if(A.text){const G=s(A.text.content),Z={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,fontSize:Ic/o,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/o,valign:A.text.align};A.rotate&&(Z.rotate=A.rotate),A.text.defaultColor&&(Z.color=at(A.text.defaultColor).color),A.text.defaultFontName&&(Z.fontFace=A.text.defaultFontName),F.addText(G,Z)}if(A.pattern){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(xp(A.pattern)?G.data=A.pattern:G.path=A.pattern,A.flipH&&(G.flipH=A.flipH),A.flipV&&(G.flipV=A.flipV),A.rotate&&(G.rotate=A.rotate),A.link){const Z=d(A.link);Z&&(G.hyperlink=Z)}F.addImage(G)}}else if(A.type==="line"){const G=af(A),Z=l(f3(G)),{minX:Q,maxX:q,minY:W,maxY:j}=oa(A),Y=at(A.color),re={x:A.left/a,y:A.top/a,w:(q-Q)/a,h:(j-W)/a,line:{color:Y.color,transparency:(1-Y.alpha)*100,width:A.width/o,dashType:c[A.style],beginArrowType:A.points[0]?"arrow":"none",endArrowType:A.points[1]?"arrow":"none"},points:Z};A.shadow&&(re.shadow=u(A.shadow)),F.addShape("custGeom",re)}else if(A.type==="chart"){const G=[];for(let Y=0;Y<A.data.series.length;Y++){const re=A.data.series[Y];G.push({name:`系列${Y+1}`,labels:A.data.labels,values:re})}let Z=[];if(A.themeColors.length===10)Z=A.themeColors.map(Y=>at(Y).color);else if(A.themeColors.length===1)Z=Je(A.themeColors[0]).analogous(10).map(Y=>at(Y.toHexString()).color);else{const Y=A.themeColors.length,re=Je(A.themeColors[Y-1]).analogous(11-Y).map(te=>te.toHexString());Z=[...A.themeColors.slice(0,Y-1),...re].map(te=>at(te).color)}const Q={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,chartColors:A.chartType==="pie"||A.chartType==="ring"?Z:Z.slice(0,A.data.series.length)},q=at(A.textColor||"#000000").color;Q.catAxisLabelColor=q,Q.valAxisLabelColor=q;const W=14/o;if(Q.catAxisLabelFontSize=W,Q.valAxisLabelFontSize=W,A.fill||A.outline){const Y={};A.fill&&(Y.fill={color:at(A.fill).color}),A.outline&&(Y.border={pt:A.outline.width/o,color:at(A.outline.color).color}),Q.plotArea=Y}(A.data.series.length>1&&A.chartType!=="scatter"||A.chartType==="pie"||A.chartType==="ring")&&(Q.showLegend=!0,Q.legendPos="b",Q.legendColor=q,Q.legendFontSize=W);let j=w.ChartType.bar;A.chartType==="bar"?(j=w.ChartType.bar,Q.barDir="col",(C=A.options)!=null&&C.stack&&(Q.barGrouping="stacked")):A.chartType==="column"?(j=w.ChartType.bar,Q.barDir="bar",(E=A.options)!=null&&E.stack&&(Q.barGrouping="stacked")):A.chartType==="line"?(j=w.ChartType.line,(P=A.options)!=null&&P.lineSmooth&&(Q.lineSmooth=!0)):A.chartType==="area"?j=w.ChartType.area:A.chartType==="radar"?j=w.ChartType.radar:A.chartType==="scatter"?(j=w.ChartType.scatter,Q.lineSize=0):A.chartType==="pie"?j=w.ChartType.pie:A.chartType==="ring"&&(j=w.ChartType.doughnut,Q.holeSize=60),F.addChart(j,G,Q)}else if(A.type==="table"){const G=[];for(let Y=0;Y<A.data.length;Y++){const re=A.data[Y];for(let te=0;te<re.length;te++){const ne=re[te];if(ne.colspan>1||ne.rowspan>1)for(let ge=Y;ge<Y+ne.rowspan;ge++)for(let Se=ge===Y?te+1:te;Se<te+ne.colspan;Se++)G.push(`${ge}_${Se}`)}}const Z=[],Q=A.theme;let q=null,W=[];Q&&(q=at(Q.color),W=_v(Q.color).map(Y=>at(Y)));for(let Y=0;Y<A.data.length;Y++){const re=A.data[Y],te=[];for(let ne=0;ne<re.length;ne++){const ge=re[ne],Se={colspan:ge.colspan,rowspan:ge.rowspan,bold:((D=ge.style)==null?void 0:D.bold)||!1,italic:((k=ge.style)==null?void 0:k.em)||!1,underline:{style:(N=ge.style)!=null&&N.underline?"sng":"none"},align:((I=ge.style)==null?void 0:I.align)||"left",valign:"middle",fontFace:((O=ge.style)==null?void 0:O.fontname)||"微软雅黑",fontSize:((z=ge.style)!=null&&z.fontsize?parseInt(($=ge.style)==null?void 0:$.fontsize):14)/o};if(Q&&q){let ie;Y%2===0?ie=W[1]:ie=W[0],(Q.rowHeader&&Y===0||Q.rowFooter&&Y===A.data.length-1||Q.colHeader&&ne===0||Q.colFooter&&ne===re.length-1)&&(ie=q),Se.fill={color:ie.color,transparency:(1-ie.alpha)*100}}if((R=ge.style)!=null&&R.backcolor){const ie=at(ge.style.backcolor);Se.fill={color:ie.color,transparency:(1-ie.alpha)*100}}(B=ge.style)!=null&&B.color&&(Se.color=at(ge.style.color).color),G.includes(`${Y}_${ne}`)||te.push({text:ge.text,options:Se})}te.length&&Z.push(te)}const j={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,colW:A.colWidths.map(Y=>A.width*Y/a)};A.theme&&(j.fill={color:"#ffffff"}),A.outline.width&&A.outline.color&&(j.border={type:A.outline.style==="solid"?"solid":"dash",pt:A.outline.width/o,color:at(A.outline.color).color}),F.addTable(Z,j)}else if(A.type==="latex"){const G=document.querySelector(`.thumbnail-list .base-element-${A.id} svg`),Q={data:y3(G),x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a};if(A.link){const q=d(A.link);q&&(Q.hyperlink=q)}F.addImage(Q)}else if(!m&&(A.type==="video"||A.type==="audio")){const G={x:A.left/a,y:A.top/a,w:A.width/a,h:A.height/a,path:A.src,type:A.type};A.type==="video"&&A.poster&&(G.cover=A.poster);const Z=A.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);Z&&Z[1]?G.extn=Z[1]:A.ext&&(G.extn=A.ext);const Q=["avi","mp4","m4v","mov","wmv"],q=["mp3","m4a","mp4","wav","wma"];G.extn&&[...Q,...q].includes(G.extn)&&F.addMedia(G)}}}setTimeout(()=>{if(y){w.writeFile({fileName:`${i}.pptx`}).then(b).catch(_);return}w.write({outputType:"blob"}).then(b).catch(_)},200)}}},oP=({initialSlidesData:e,onDataUpdate:t,renderPageExtra:r},n)=>{const{slides:i,theme:a,setSlides:o,setTheme:s,setViewportRatio:l,setViewportSize:u}=ke.getState(),{applyThemeToAllSlides:c,applyPresetTheme:f,applyFontToAllSlides:d}=Bk(),{exportPPTX:h}=aP();return S.useEffect(()=>{if(e){const{slides:p,theme:v,viewportRatio:g,viewportSize:m}=Ik(e);o(p),s(v),l(g),u(m)}},[]),S.useEffect(()=>{const p=ke.subscribe((v,g)=>{const m={slides:v.slides,title:v.title,theme:v.theme,viewportRatio:v.viewportRatio};(g.slides!==v.slides||g.theme!==v.theme)&&t(m)});return()=>p()},[t]),S.useImperativeHandle(n,()=>({applyThemeToAllSlides:c,applyPresetTheme:f,applyFontToAllSlides:d,exportPPTX:h})),S.createElement("div",{style:{width:"100%",height:"100%",position:"relative"}},S.createElement(kk,{renderPageExtra:r}))},sP=S.forwardRef(oP),si={thumbnails:"_thumbnails_1awpq_1",thumbnailList:"_thumbnailList_1awpq_6",thumbnailItem:"_thumbnailItem_1awpq_11",thumbnail:"_thumbnail_1awpq_1",active:"_active_1awpq_19",label:"_label_1awpq_25"};var Tp=Gs(),De=e=>Hs(e,Tp),Lp=Gs();De.write=e=>Hs(e,Lp);var Bc=Gs();De.onStart=e=>Hs(e,Bc);var Ep=Gs();De.onFrame=e=>Hs(e,Ep);var Mp=Gs();De.onFinish=e=>Hs(e,Mp);var oo=[];De.setTimeout=(e,t)=>{const r=De.now()+t,n=()=>{const a=oo.findIndex(o=>o.cancel==n);~a&&oo.splice(a,1),ui-=~a?1:0},i={time:r,handler:e,cancel:n};return oo.splice(_3(r),0,i),ui+=1,b3(),i};var _3=e=>~(~oo.findIndex(t=>t.time>e)||~oo.length);De.cancel=e=>{Bc.delete(e),Ep.delete(e),Mp.delete(e),Tp.delete(e),Lp.delete(e)},De.sync=e=>{Dp=!0,De.batchedUpdates(e),Dp=!1},De.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...i){t=i,De.onStart(r)}return n.handler=e,n.cancel=()=>{Bc.delete(r),t=null},n};var Cp=typeof window<"u"?window.requestAnimationFrame:()=>{};De.use=e=>Cp=e,De.now=typeof performance<"u"?()=>performance.now():Date.now,De.batchedUpdates=e=>e(),De.catch=console.error,De.frameLoop="always",De.advance=()=>{De.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):w3()};var li=-1,ui=0,Dp=!1;function Hs(e,t){Dp?(t.delete(e),e(0)):(t.add(e),b3())}function b3(){li<0&&(li=0,De.frameLoop!=="demand"&&Cp(S3))}function lP(){li=-1}function S3(){~li&&(Cp(S3),De.batchedUpdates(w3))}function w3(){const e=li;li=De.now();const t=_3(li);if(t&&(x3(oo.splice(0,t),r=>r.handler()),ui-=t),!ui){lP();return}Bc.flush(),Tp.flush(e?Math.min(64,li-e):16.667),Ep.flush(),Lp.flush(),Mp.flush()}function Gs(){let e=new Set,t=e;return{add(r){ui+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return ui-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,ui-=t.size,x3(t,n=>n(r)&&e.add(n)),ui+=e.size,t=e)}}}function x3(e,t){e.forEach(r=>{try{t(r)}catch(n){De.catch(n)}})}var uP=Object.defineProperty,cP=(e,t)=>{for(var r in t)uP(e,r,{get:t[r],enumerable:!0})},Rr={};cP(Rr,{assign:()=>hP,colors:()=>ci,createStringInterpolator:()=>Pp,skipAnimation:()=>L3,to:()=>T3,willAdvance:()=>Np});function Ap(){}var fP=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function xn(e,t){if(ae.arr(e)){if(!ae.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var $e=(e,t)=>e.forEach(t);function on(e,t,r){if(ae.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var sr=e=>ae.und(e)?[]:ae.arr(e)?e:[e];function Ws(e,t){if(e.size){const r=Array.from(e);e.clear(),$e(r,t)}}var Xs=(e,...t)=>Ws(e,r=>r(...t)),kp=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Pp,T3,ci=null,L3=!1,Np=Ap,hP=e=>{e.to&&(T3=e.to),e.now&&(De.now=e.now),e.colors!==void 0&&(ci=e.colors),e.skipAnimation!=null&&(L3=e.skipAnimation),e.createStringInterpolator&&(Pp=e.createStringInterpolator),e.requestAnimationFrame&&De.use(e.requestAnimationFrame),e.batchedUpdates&&(De.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Np=e.willAdvance),e.frameLoop&&(De.frameLoop=e.frameLoop)},Us=new Set,Tr=[],Op=[],$c=0,Rc={get idle(){return!Us.size&&!Tr.length},start(e){$c>e.priority?(Us.add(e),De.onStart(dP)):(E3(e),De(Ip))},advance:Ip,sort(e){if($c)De.onFrame(()=>Rc.sort(e));else{const t=Tr.indexOf(e);~t&&(Tr.splice(t,1),M3(e))}},clear(){Tr=[],Us.clear()}};function dP(){Us.forEach(E3),Us.clear(),De(Ip)}function E3(e){Tr.includes(e)||M3(e)}function M3(e){Tr.splice(pP(Tr,t=>t.priority>e.priority),0,e)}function Ip(e){const t=Op;for(let r=0;r<Tr.length;r++){const n=Tr[r];$c=n.priority,n.idle||(Np(n),n.advance(e),n.idle||t.push(n))}return $c=0,Op=Tr,Op.length=0,Tr=t,Tr.length>0}function pP(e,t){const r=e.findIndex(t);return r<0?e.length:r}var vP=(e,t,r)=>Math.min(Math.max(r,e),t),gP={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Vr="[-+]?\\d*\\.?\\d+",Vc=Vr+"%";function zc(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var mP=new RegExp("rgb"+zc(Vr,Vr,Vr)),yP=new RegExp("rgba"+zc(Vr,Vr,Vr,Vr)),_P=new RegExp("hsl"+zc(Vr,Vc,Vc)),bP=new RegExp("hsla"+zc(Vr,Vc,Vc,Vr)),SP=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,wP=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,xP=/^#([0-9a-fA-F]{6})$/,TP=/^#([0-9a-fA-F]{8})$/;function LP(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=xP.exec(e))?parseInt(t[1]+"ff",16)>>>0:ci&&ci[e]!==void 0?ci[e]:(t=mP.exec(e))?(so(t[1])<<24|so(t[2])<<16|so(t[3])<<8|255)>>>0:(t=yP.exec(e))?(so(t[1])<<24|so(t[2])<<16|so(t[3])<<8|A3(t[4]))>>>0:(t=SP.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=TP.exec(e))?parseInt(t[1],16)>>>0:(t=wP.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_P.exec(e))?(C3(D3(t[1]),Fc(t[2]),Fc(t[3]))|255)>>>0:(t=bP.exec(e))?(C3(D3(t[1]),Fc(t[2]),Fc(t[3]))|A3(t[4]))>>>0:null}function Bp(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function C3(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,i=2*r-n,a=Bp(i,n,e+1/3),o=Bp(i,n,e),s=Bp(i,n,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function so(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function D3(e){return(parseFloat(e)%360+360)%360/360}function A3(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function k3(e){let t=LP(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${r}, ${n}, ${i}, ${a})`}var Ys=(e,t,r)=>{if(ae.fun(e))return e;if(ae.arr(e))return Ys({range:e,output:t,extrapolate:r});if(ae.str(e.output[0]))return Pp(e);const n=e,i=n.output,a=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",l=n.easing||(u=>u);return u=>{const c=MP(u,a);return EP(u,a[c],a[c+1],i[c],i[c+1],l,o,s,n.map)}};function EP(e,t,r,n,i,a,o,s,l){let u=l?l(e):e;if(u<t){if(o==="identity")return u;o==="clamp"&&(u=t)}if(u>r){if(s==="identity")return u;s==="clamp"&&(u=r)}return n===i?n:t===r?e<=t?n:i:(t===-1/0?u=-u:r===1/0?u=u-t:u=(u-t)/(r-t),u=a(u),n===-1/0?u=-u:i===1/0?u=u+n:u=u*(i-n)+n,u)}function MP(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var CP=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,i=t==="end"?Math.floor(n):Math.ceil(n);return vP(0,1,i/e)},Hc=1.70158,Gc=Hc*1.525,P3=Hc+1,N3=2*Math.PI/3,O3=2*Math.PI/4.5,Wc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,DP={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>P3*e*e*e-Hc*e*e,easeOutBack:e=>1+P3*Math.pow(e-1,3)+Hc*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Gc+1)*2*e-Gc)/2:(Math.pow(2*e-2,2)*((Gc+1)*(e*2-2)+Gc)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*N3),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*N3)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*O3))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*O3)/2+1,easeInBounce:e=>1-Wc(1-e),easeOutBounce:Wc,easeInOutBounce:e=>e<.5?(1-Wc(1-2*e))/2:(1+Wc(2*e-1))/2,steps:CP},qs=Symbol.for("FluidValue.get"),lo=Symbol.for("FluidValue.observers"),Lr=e=>!!(e&&e[qs]),Kt=e=>e&&e[qs]?e[qs]():e,I3=e=>e[lo]||null;function AP(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Zs(e,t){const r=e[lo];r&&r.forEach(n=>{AP(n,t)})}var B3=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");kP(this,e)}},kP=(e,t)=>$3(e,qs,t);function uo(e,t){if(e[qs]){let r=e[lo];r||$3(e,lo,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function js(e,t){const r=e[lo];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[lo]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var $3=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Xc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,PP=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,R3=new RegExp(`(${Xc.source})(%|[a-z]+)`,"i"),NP=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Uc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,V3=e=>{const[t,r]=OP(e);if(!t||kp())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(r);return i||e}else{if(r&&Uc.test(r))return V3(r);if(r)return r}return e},OP=e=>{const t=Uc.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},$p,IP=(e,t,r,n,i)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${i})`,z3=e=>{$p||($p=ci?new RegExp(`(${Object.keys(ci).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Kt(a).replace(Uc,V3).replace(PP,k3).replace($p,k3)),r=t.map(a=>a.match(Xc).map(Number)),i=r[0].map((a,o)=>r.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Ys({...e,output:a}));return a=>{var l;const o=!R3.test(t[0])&&((l=t.find(u=>R3.test(u)))==null?void 0:l.replace(Xc,""));let s=0;return t[0].replace(Xc,()=>`${i[s++](a)}${o||""}`).replace(NP,IP)}},Rp="react-spring: ",F3=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${Rp}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},BP=F3(console.warn);function $P(){BP(`${Rp}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var RP=F3(console.warn);function VP(){RP(`${Rp}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Yc(e){return ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!kp()&&Uc.test(e)||e in(ci||{}))}var Vp=kp()?S.useEffect:S.useLayoutEffect,zP=()=>{const e=S.useRef(!1);return Vp(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function H3(){const e=S.useState()[1],t=zP();return()=>{t.current&&e(Math.random())}}var G3=e=>S.useEffect(e,FP),FP=[];function W3(e){const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e}),t.current}var Qs=Symbol.for("Animated:node"),HP=e=>!!e&&e[Qs]===e,sn=e=>e&&e[Qs],zp=(e,t)=>fP(e,Qs,t),qc=e=>e&&e[Qs]&&e[Qs].getPayload(),X3=class{constructor(){zp(this,this)}getPayload(){return this.payload||[]}},Zc=class S7 extends X3{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,ae.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new S7(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,r){return ae.num(t)&&(this.lastPosition=t,r&&(t=Math.round(t/r)*r,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},jc=class w7 extends Zc{constructor(t){super(0),this._string=null,this._toString=Ys({output:[t,t]})}static create(t){return new w7(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(ae.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=Ys({output:[this.getValue(),t]})),this._value=0,super.reset()}},Qc={dependencies:null},Kc=class extends X3{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return on(this.source,(r,n)=>{HP(r)?t[n]=r.getValue(e):Lr(r)?t[n]=Kt(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&$e(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return on(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Qc.dependencies&&Lr(e)&&Qc.dependencies.add(e);const t=qc(e);t&&$e(t,r=>this.add(r))}},GP=class x7 extends Kc{constructor(t){super(t)}static create(t){return new x7(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const r=this.getPayload();return t.length==r.length?r.map((n,i)=>n.setValue(t[i])).some(Boolean):(super.setValue(t.map(WP)),!0)}};function WP(e){return(Yc(e)?jc:Zc).create(e)}function Fp(e){const t=sn(e);return t?t.constructor:ae.arr(e)?GP:Yc(e)?jc:Zc}var U3=(e,t)=>{const r=!ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return S.forwardRef((n,i)=>{const a=S.useRef(null),o=r&&S.useCallback(p=>{a.current=YP(i,p)},[i]),[s,l]=UP(n,t),u=H3(),c=()=>{const p=a.current;if(r&&!p)return;(p?t.applyAnimatedValues(p,s.getValue(!0)):!1)===!1&&u()},f=new XP(c,l),d=S.useRef(void 0);Vp(()=>(d.current=f,$e(l,p=>uo(p,f)),()=>{d.current&&($e(d.current.deps,p=>js(p,d.current)),De.cancel(d.current.update))})),S.useEffect(c,[]),G3(()=>()=>{const p=d.current;$e(p.deps,v=>js(v,p))});const h=t.getComponentProps(s.getValue());return ov.createElement(e,{...h,ref:o})})},XP=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&De.write(this.update)}};function UP(e,t){const r=new Set;return Qc.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Kc(e),Qc.dependencies=null,[e,r]}function YP(e,t){return e&&(ae.fun(e)?e(t):e.current=t),t}var Y3=Symbol.for("AnimatedComponent"),qP=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=i=>new Kc(i),getComponentProps:n=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},a=o=>{const s=q3(o)||"Anonymous";return ae.str(o)?o=a[o]||(a[o]=U3(o,i)):o=o[Y3]||(o[Y3]=U3(o,i)),o.displayName=`Animated(${s})`,o};return on(e,(o,s)=>{ae.arr(e)&&(s=q3(o)),a[s]=a(o)}),{animated:a}},q3=e=>ae.str(e)?e:e&&ae.str(e.displayName)?e.displayName:ae.fun(e)&&e.name||null;function na(e,...t){return ae.fun(e)?e(...t):e}var Ks=(e,t)=>e===!0||!!(t&&e&&(ae.fun(e)?e(t):sr(e).includes(t))),Z3=(e,t)=>ae.obj(e)?t&&e[t]:e,j3=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,ZP=e=>e,Hp=(e,t=ZP)=>{let r=jP;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const i of r){const a=t(e[i],i);ae.und(a)||(n[i]=a)}return n},jP=["config","onProps","onStart","onChange","onPause","onResume","onRest"],QP={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function KP(e){const t={};let r=0;if(on(e,(n,i)=>{QP[i]||(t[i]=n,r++)}),r)return t}function Q3(e){const t=KP(e);if(t){const r={to:t};return on(e,(n,i)=>i in t||(r[i]=n)),r}return{...e}}function Js(e){return e=Kt(e),ae.arr(e)?e.map(Js):Yc(e)?Rr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function JP(e){for(const t in e)return!0;return!1}function Gp(e){return ae.fun(e)||ae.arr(e)&&ae.obj(e[0])}function eN(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function tN(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var rN={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Wp={...rN.default,mass:1,damping:1,easing:DP.linear,clamp:!1},nN=class{constructor(){this.velocity=0,Object.assign(this,Wp)}};function iN(e,t,r){r&&(r={...r},K3(r,t),t={...r,...t}),K3(e,t),Object.assign(e,t);for(const o in Wp)e[o]==null&&(e[o]=Wp[o]);let{frequency:n,damping:i}=e;const{mass:a}=e;return ae.und(n)||(n<.01&&(n=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/n,2)*a,e.friction=4*Math.PI*i*a/n),e}function K3(e,t){if(!ae.und(t.decay))e.duration=void 0;else{const r=!ae.und(t.tension)||!ae.und(t.friction);(r||!ae.und(t.frequency)||!ae.und(t.damping)||!ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var J3=[],aN=class{constructor(){this.changed=!1,this.values=J3,this.toValues=null,this.fromValues=J3,this.config=new nN,this.immediate=!1}};function e7(e,{key:t,props:r,defaultProps:n,state:i,actions:a}){return new Promise((o,s)=>{let l,u,c=Ks(r.cancel??(n==null?void 0:n.cancel),t);if(c)h();else{ae.und(r.pause)||(i.paused=Ks(r.pause,t));let p=n==null?void 0:n.pause;p!==!0&&(p=i.paused||Ks(p,t)),l=na(r.delay||0,t),p?(i.resumeQueue.add(d),a.pause()):(a.resume(),d())}function f(){i.resumeQueue.add(d),i.timeouts.delete(u),u.cancel(),l=u.time-De.now()}function d(){l>0&&!Rr.skipAnimation?(i.delayed=!0,u=De.setTimeout(h,l),i.pauseQueue.add(f),i.timeouts.add(u)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(f),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{a.start({...r,callId:e,cancel:c},o)}catch(p){s(p)}}})}var Xp=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?co(e.get()):t.every(r=>r.noop)?t7(e.get()):zr(e.get(),t.every(r=>r.finished)),t7=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),zr=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),co=e=>({value:e,cancelled:!0,finished:!1});function r7(e,t,r,n){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:l}=r;return!a&&e===s&&!t.reset?l:r.promise=(async()=>{r.asyncId=i,r.asyncTo=e;const u=Hp(t,(g,m)=>m==="onRest"?void 0:g);let c,f;const d=new Promise((g,m)=>(c=g,f=m)),h=g=>{const m=i<=(r.cancelId||0)&&co(n)||i!==r.asyncId&&zr(n,!1);if(m)throw g.result=m,f(g),g},p=(g,m)=>{const y=new n7,_=new i7;return(async()=>{if(Rr.skipAnimation)throw el(r),_.result=zr(n,!1),f(_),_;h(y);const b=ae.obj(g)?{...g}:{...m,to:g};b.parentId=i,on(u,(x,T)=>{ae.und(b[T])&&(b[T]=x)});const w=await n.start(b);return h(y),r.paused&&await new Promise(x=>{r.resumeQueue.add(x)}),w})()};let v;if(Rr.skipAnimation)return el(r),zr(n,!1);try{let g;ae.arr(e)?g=(async m=>{for(const y of m)await p(y)})(e):g=Promise.resolve(e(p,n.stop.bind(n))),await Promise.all([g.then(c),d]),v=zr(n.get(),!0,!1)}catch(g){if(g instanceof n7)v=g.result;else if(g instanceof i7)v=g.result;else throw g}finally{i==r.asyncId&&(r.asyncId=a,r.asyncTo=a?s:void 0,r.promise=a?l:void 0)}return ae.fun(o)&&De.batchedUpdates(()=>{o(v,n,n.item)}),v})()}function el(e,t){Ws(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var n7=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},i7=class extends Error{constructor(){super("SkipAnimationSignal")}},Up=e=>e instanceof Yp,oN=1,Yp=class extends B3{constructor(){super(...arguments),this.id=oN++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=sn(this);return e&&e.getValue()}to(...e){return Rr.to(this,e)}interpolate(...e){return $P(),Rr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Zs(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Rc.sort(this),Zs(this,{type:"priority",parent:this,priority:e})}},ia=Symbol.for("SpringPhase"),a7=1,qp=2,Zp=4,jp=e=>(e[ia]&a7)>0,fi=e=>(e[ia]&qp)>0,tl=e=>(e[ia]&Zp)>0,o7=(e,t)=>t?e[ia]|=qp|a7:e[ia]&=~qp,s7=(e,t)=>t?e[ia]|=Zp:e[ia]&=~Zp,sN=class extends Yp{constructor(e,t){if(super(),this.animation=new aN,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ae.und(e)||!ae.und(t)){const r=ae.obj(e)?{...e}:{...t,from:e};ae.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(fi(this)||this._state.asyncTo)||tl(this)}get goal(){return Kt(this.animation.to)}get velocity(){const e=sn(this);return e instanceof Zc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return jp(this)}get isAnimating(){return fi(this)}get isPaused(){return tl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:i}=n;const{config:a}=n,o=qc(n.to);!o&&Lr(n.to)&&(i=sr(Kt(n.to))),n.values.forEach((u,c)=>{if(u.done)return;const f=u.constructor==jc?1:o?o[c].lastPosition:i[c];let d=n.immediate,h=f;if(!d){if(h=u.lastPosition,a.tension<=0){u.done=!0;return}let p=u.elapsedTime+=e;const v=n.fromValues[c],g=u.v0!=null?u.v0:u.v0=ae.arr(a.velocity)?a.velocity[c]:a.velocity;let m;const y=a.precision||(v==f?.005:Math.min(1,Math.abs(f-v)*.001));if(ae.und(a.duration))if(a.decay){const _=a.decay===!0?.998:a.decay,b=Math.exp(-(1-_)*p);h=v+g/(1-_)*(1-b),d=Math.abs(u.lastPosition-h)<=y,m=g*b}else{m=u.lastVelocity==null?g:u.lastVelocity;const _=a.restVelocity||y/10,b=a.clamp?0:a.bounce,w=!ae.und(b),x=v==f?u.v0>0:v<f;let T,L=!1;const M=1,C=Math.ceil(e/M);for(let E=0;E<C&&(T=Math.abs(m)>_,!(!T&&(d=Math.abs(f-h)<=y,d)));++E){w&&(L=h==f||h>f==x,L&&(m=-m*b,h=f));const P=-a.tension*1e-6*(h-f),D=-a.friction*.001*m,k=(P+D)/a.mass;m=m+k*M,h=h+m*M}}else{let _=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,u.durationProgress>0&&(u.elapsedTime=a.duration*u.durationProgress,p=u.elapsedTime+=e)),_=(a.progress||0)+p/this._memoizedDuration,_=_>1?1:_<0?0:_,u.durationProgress=_),h=v+a.easing(_)*(f-v),m=(h-u.lastPosition)/e,d=_==1}u.lastVelocity=m,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),d=!0)}o&&!o[c].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(h,a.round)&&(r=!0)});const s=sn(this),l=s.getValue();if(t){const u=Kt(n.to);(l!==u||r)&&!a.decay?(s.setValue(u),this._onChange(u)):r&&a.decay&&this._onChange(l),this._stop()}else r&&this._onChange(l)}set(e){return De.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(fi(this)){const{to:e,config:t}=this.animation;De.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return ae.und(e)?(r=this.queue||[],this.queue=[]):r=[ae.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>Xp(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),el(this._state,e&&this._lastCallId),De.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=ae.obj(r)?r[t]:r,(r==null||Gp(r))&&(r=void 0),n=ae.obj(n)?n[t]:n,n==null&&(n=void 0);const i={to:r,from:n};return jp(this)||(e.reverse&&([r,n]=[n,r]),n=Kt(n),ae.und(n)?sn(this)||this._set(r):this._set(n)),i}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,Hp(e,(o,s)=>/^on/.test(s)?Z3(o,r):o)),c7(this,e,"onProps"),il(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return e7(++this._lastCallId,{key:r,props:e,defaultProps:n,state:a,actions:{pause:()=>{tl(this)||(s7(this,!0),Xs(a.pauseQueue),il(this,"onPause",zr(this,rl(this,this.animation.to)),this))},resume:()=>{tl(this)&&(s7(this,!1),fi(this)&&this._resume(),Xs(a.resumeQueue),il(this,"onResume",zr(this,rl(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=l7(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(co(this));const n=!ae.und(e.to),i=!ae.und(e.from);if(n||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(co(this));const{key:a,defaultProps:o,animation:s}=this,{to:l,from:u}=s;let{to:c=l,from:f=u}=e;i&&!n&&(!t.default||ae.und(c))&&(c=f),t.reverse&&([c,f]=[f,c]);const d=!xn(f,u);d&&(s.from=f),f=Kt(f);const h=!xn(c,l);h&&this._focus(c);const p=Gp(t.to),{config:v}=s,{decay:g,velocity:m}=v;(n||i)&&(v.velocity=0),t.config&&!p&&iN(v,na(t.config,a),t.config!==o.config?na(o.config,a):void 0);let y=sn(this);if(!y||ae.und(c))return r(zr(this,!0));const _=ae.und(t.reset)?i&&!t.default:!ae.und(f)&&Ks(t.reset,a),b=_?f:this.get(),w=Js(c),x=ae.num(w)||ae.arr(w)||Yc(w),T=!p&&(!x||Ks(o.immediate||t.immediate,a));if(h){const E=Fp(c);if(E!==y.constructor)if(T)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${E.name}, as the "to" prop suggests`)}const L=y.constructor;let M=Lr(c),C=!1;if(!M){const E=_||!jp(this)&&d;(h||E)&&(C=xn(Js(b),w),M=!C),(!xn(s.immediate,T)&&!T||!xn(v.decay,g)||!xn(v.velocity,m))&&(M=!0)}if(C&&fi(this)&&(s.changed&&!_?M=!0:M||this._stop(l)),!p&&((M||Lr(l))&&(s.values=y.getPayload(),s.toValues=Lr(c)?null:L==jc?[1]:sr(w)),s.immediate!=T&&(s.immediate=T,!T&&!_&&this._set(l)),M)){const{onRest:E}=s;$e(uN,D=>c7(this,t,D));const P=zr(this,rl(this,l));Xs(this._pendingCalls,P),this._pendingCalls.add(r),s.changed&&De.batchedUpdates(()=>{var D;s.changed=!_,E==null||E(P,this),_?na(o.onRest,P):(D=s.onStart)==null||D.call(s,P,this)})}_&&this._set(b),p?r(r7(t.to,t,this._state,this)):M?this._start():fi(this)&&!h?this._pendingCalls.add(r):r(t7(b))}_focus(e){const t=this.animation;e!==t.to&&(I3(this)&&this._detach(),t.to=e,I3(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Lr(t)&&(uo(t,this),Up(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Lr(e)&&js(e,this)}_set(e,t=!0){const r=Kt(e);if(!ae.und(r)){const n=sn(this);if(!n||!xn(r,n.getValue())){const i=Fp(r);!n||n.constructor!=i?zp(this,i.create(r)):n.setValue(r),n&&De.batchedUpdates(()=>{this._onChange(r,t)})}}return sn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,il(this,"onStart",zr(this,rl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),na(this.animation.onChange,e,this)),na(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;sn(this).reset(Kt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),fi(this)||(o7(this,!0),tl(this)||this._resume())}_resume(){Rr.skipAnimation?this.finish():Rc.start(this)}_stop(e,t){if(fi(this)){o7(this,!1);const r=this.animation;$e(r.values,i=>{i.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),Zs(this,{type:"idle",parent:this});const n=t?co(this.get()):zr(this.get(),rl(this,e??r.to));Xs(this._pendingCalls,n),r.changed&&(r.changed=!1,il(this,"onRest",n,this))}}};function rl(e,t){const r=Js(t),n=Js(e.get());return xn(n,r)}function l7(e,t=e.loop,r=e.to){const n=na(t);if(n){const i=n!==!0&&Q3(n),a=(i||e).reverse,o=!i||i.reset;return nl({...e,loop:t,default:!1,pause:void 0,to:!a||Gp(r)?r:void 0,from:o?e.from:void 0,reset:o,...i})}}function nl(e){const{to:t,from:r}=e=Q3(e),n=new Set;return ae.obj(t)&&u7(t,n),ae.obj(r)&&u7(r,n),e.keys=n.size?Array.from(n):null,e}function lN(e){const t=nl(e);return ae.und(t.default)&&(t.default=Hp(t)),t}function u7(e,t){on(e,(r,n)=>r!=null&&t.add(n))}var uN=["onStart","onRest","onChange","onPause","onResume"];function c7(e,t,r){e.animation[r]=t[r]!==j3(t,r)?Z3(t[r],e.key):void 0}function il(e,t,...r){var n,i,a,o;(i=(n=e.animation)[t])==null||i.call(n,...r),(o=(a=e.defaultProps)[t])==null||o.call(a,...r)}var cN=["onStart","onChange","onRest"],fN=1,hN=class{constructor(e,t){this.id=fN++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];ae.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(nl(e)),this}start(e){let{queue:t}=this;return e?t=sr(e).map(nl):this.queue=[],this._flush?this._flush(this,t):(g7(this,t),Qp(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;$e(sr(t),n=>r[n].stop(!!e))}else el(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(ae.und(e))this.start({pause:!0});else{const t=this.springs;$e(sr(e),r=>t[r].pause())}return this}resume(e){if(ae.und(e))this.start({pause:!1});else{const t=this.springs;$e(sr(e),r=>t[r].resume())}return this}each(e){on(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,n=this._active.size>0,i=this._changed.size>0;(n&&!this._started||i&&!this._started)&&(this._started=!0,Ws(e,([s,l])=>{l.value=this.get(),s(l,this,this._item)}));const a=!n&&this._started,o=i||a&&r.size?this.get():null;i&&t.size&&Ws(t,([s,l])=>{l.value=o,s(l,this,this._item)}),a&&(this._started=!1,Ws(r,([s,l])=>{l.value=o,s(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;De.onFrame(this._onFrame)}};function Qp(e,t){return Promise.all(t.map(r=>f7(e,r))).then(r=>Xp(e,r))}async function f7(e,t,r){const{keys:n,to:i,from:a,loop:o,onRest:s,onResolve:l}=t,u=ae.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const c=ae.arr(i)||ae.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):$e(cN,v=>{const g=t[v];if(ae.fun(g)){const m=e._events[v];t[v]=({finished:y,cancelled:_})=>{const b=m.get(g);b?(y||(b.finished=!1),_&&(b.cancelled=!0)):m.set(g,{value:null,finished:y||!1,cancelled:_||!1})},u&&(u[v]=t[v])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Xs(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const d=(n||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),h=t.cancel===!0||j3(t,"cancel")===!0;(c||h&&f.asyncId)&&d.push(e7(++e._lastAsyncId,{props:t,state:f,actions:{pause:Ap,resume:Ap,start(v,g){h?(el(f,e._lastAsyncId),g(co(e))):(v.onRest=s,g(r7(c,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});const p=Xp(e,await Promise.all(d));if(o&&p.finished&&!(r&&p.noop)){const v=l7(t,o,i);if(v)return g7(e,[v]),f7(e,v,!0)}return l&&De.batchedUpdates(()=>l(p,e,e.item)),p}function h7(e,t){const r={...e.springs};return t&&$e(sr(t),n=>{ae.und(n.keys)&&(n=nl(n)),ae.obj(n.to)||(n={...n,to:void 0}),v7(r,n,i=>p7(i))}),d7(e,r),r}function d7(e,t){on(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,uo(r,e))})}function p7(e,t){const r=new sN;return r.key=e,t&&uo(r,t),r}function v7(e,t,r){t.keys&&$e(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function g7(e,t){$e(t,r=>{v7(e.springs,r,n=>p7(n,e))})}var dN=ov.createContext({pause:!1,immediate:!1}),pN=()=>{const e=[],t=function(n){VP();const i=[];return $e(e,(a,o)=>{if(ae.und(n))i.push(a.start());else{const s=r(n,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const i=e.indexOf(n);~i&&e.splice(i,1)},t.pause=function(){return $e(e,n=>n.pause(...arguments)),this},t.resume=function(){return $e(e,n=>n.resume(...arguments)),this},t.set=function(n){$e(e,(i,a)=>{const o=ae.fun(n)?n(a,i):n;o&&i.set(o)})},t.start=function(n){const i=[];return $e(e,(a,o)=>{if(ae.und(n))i.push(a.start());else{const s=this._getProps(n,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return $e(e,n=>n.stop(...arguments)),this},t.update=function(n){return $e(e,(i,a)=>i.update(this._getProps(n,i,a))),this};const r=function(n,i,a){return ae.fun(n)?n(a,i):n};return t._getProps=r,t};function vN(e,t,r){const n=ae.fun(t)&&t;n&&!r&&(r=[]);const i=S.useMemo(()=>n||arguments.length==3?pN():void 0,[]),a=S.useRef(0),o=H3(),s=S.useMemo(()=>({ctrls:[],queue:[],flush(m,y){const _=h7(m,y);return a.current>0&&!s.queue.length&&!Object.keys(_).some(w=>!m.springs[w])?Qp(m,y):new Promise(w=>{d7(m,_),s.queue.push(()=>{w(Qp(m,y))}),o()})}}),[]),l=S.useRef([...s.ctrls]),u=S.useRef([]),c=W3(e)||0;S.useMemo(()=>{$e(l.current.slice(e,c),m=>{eN(m,i),m.stop(!0)}),l.current.length=e,f(c,e)},[e]),S.useMemo(()=>{f(0,Math.min(c,e))},r);function f(m,y){for(let _=m;_<y;_++){const b=l.current[_]||(l.current[_]=new hN(null,s.flush)),w=n?n(_,b):t[_];w&&(u.current[_]=lN(w))}}const d=l.current.map((m,y)=>h7(m,u.current[y])),h=S.useContext(dN),p=W3(h),v=h!==p&&JP(h);Vp(()=>{a.current++,s.ctrls=l.current;const{queue:m}=s;m.length&&(s.queue=[],$e(m,y=>y())),$e(l.current,(y,_)=>{i==null||i.add(y),v&&y.start({default:h});const b=u.current[_];b&&(tN(y,b.ref),y.ref?y.queue.push(b):y.start(b))})}),G3(()=>()=>{$e(s.ctrls,m=>m.stop(!0))});const g=d.map(m=>({...m}));return i?[g,i]:g}function gN(e,t){const r=ae.fun(e),[[n],i]=vN(1,r?e:[e],r?[]:t);return r||arguments.length==2?[n,i]:n}var mN=class extends Yp{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ys(...t);const r=this._get(),n=Fp(r);zp(this,n.create(r))}advance(e){const t=this._get(),r=this.get();xn(t,r)||(sn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&m7(this._active)&&Kp(this)}_get(){const e=ae.arr(this.source)?this.source.map(Kt):sr(Kt(this.source));return this.calc(...e)}_start(){this.idle&&!m7(this._active)&&(this.idle=!1,$e(qc(this),e=>{e.done=!1}),Rr.skipAnimation?(De.batchedUpdates(()=>this.advance()),Kp(this)):Rc.start(this))}_attach(){let e=1;$e(sr(this.source),t=>{Lr(t)&&uo(t,this),Up(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){$e(sr(this.source),e=>{Lr(e)&&js(e,this)}),this._active.clear(),Kp(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=sr(this.source).reduce((t,r)=>Math.max(t,(Up(r)?r.priority:0)+1),0))}};function yN(e){return e.idle!==!1}function m7(e){return!e.size||Array.from(e).every(yN)}function Kp(e){e.idle||(e.idle=!0,$e(qc(e),t=>{t.done=!0}),Zs(e,{type:"idle",parent:e}))}Rr.assign({createStringInterpolator:z3,to:(e,t)=>new mN(e,t)});var y7=/^--/;function _N(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!y7.test(e)&&!(al.hasOwnProperty(e)&&al[e])?t+"px":(""+t).trim()}var _7={};function bN(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:n,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:l,...u}=t,c=Object.values(u),f=Object.keys(u).map(d=>r||e.hasAttribute(d)?d:_7[d]||(_7[d]=d.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const d in i)if(i.hasOwnProperty(d)){const h=_N(d,i[d]);y7.test(d)?e.style.setProperty(d,h):e.style[d]=h}f.forEach((d,h)=>{e.setAttribute(d,c[h])}),n!==void 0&&(e.className=n),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),l!==void 0&&e.setAttribute("viewBox",l)}var al={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},SN=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),wN=["Webkit","Ms","Moz","O"];al=Object.keys(al).reduce((e,t)=>(wN.forEach(r=>e[SN(r,t)]=e[t]),e),al);var xN=/^(matrix|translate|scale|rotate|skew)/,TN=/^(translate)/,LN=/^(rotate|skew)/,Jp=(e,t)=>ae.num(e)&&e!==0?e+t:e,Jc=(e,t)=>ae.arr(e)?e.every(r=>Jc(r,t)):ae.num(e)?e===t:parseFloat(e)===t,EN=class extends Kc{constructor({x:e,y:t,z:r,...n}){const i=[],a=[];(e||t||r)&&(i.push([e||0,t||0,r||0]),a.push(o=>[`translate3d(${o.map(s=>Jp(s,"px")).join(",")})`,Jc(o,0)])),on(n,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(l=>[l,l===""]);else if(xN.test(s)){if(delete n[s],ae.und(o))return;const l=TN.test(s)?"px":LN.test(s)?"deg":"";i.push(sr(o)),a.push(s==="rotate3d"?([u,c,f,d])=>[`rotate3d(${u},${c},${f},${Jp(d,l)})`,Jc(d,0)]:u=>[`${s}(${u.map(c=>Jp(c,l)).join(",")})`,Jc(u,s.startsWith("scale")?1:0)])}}),i.length&&(n.transform=new MN(i,a)),super(n)}},MN=class extends B3{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return $e(this.inputs,(r,n)=>{const i=Kt(r[0]),[a,o]=this.transforms[n](ae.arr(i)?i:r.map(Kt));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&$e(this.inputs,t=>$e(t,r=>Lr(r)&&uo(r,this)))}observerRemoved(e){e==0&&$e(this.inputs,t=>$e(t,r=>Lr(r)&&js(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Zs(this,e)}},CN=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Rr.assign({batchedUpdates:k7.unstable_batchedUpdates,createStringInterpolator:z3,colors:gP});var DN=qP(CN,{applyAnimatedValues:bN,createAnimatedStyle:e=>new EN(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),AN=DN.animated;const kN=({slide:e,index:t,selected:r,active:n,onClick:i})=>{const a=S.useRef(null);return S.createElement("div",{ref:a,className:Me(si.thumbnailItem,{[si.active]:n,[si.selected]:r}),onClick:i},S.createElement("div",{className:si.thumbnail},S.createElement(c3,{slide:e,size:112})),S.createElement("div",{className:Me(si.label)},J7(t+1,2)))},PN=({className:e})=>{const{selectedSlidesIndex:t,updateSelectedSlidesIndex:r}=_e(),{slides:n,slideIndex:i,updateSlideIndex:a}=ke(),o=S.useMemo(()=>[...t,i],[t,i]),s=S.useRef(null),[{scrollTop:l},u]=gN(()=>({scrollTop:0,config:{tension:300,clamp:!0}})),c=()=>{const h=s.current;if(!h)return;const p=h.children.item(0);if(!p)return;const v=p.children.item(i);if(!v)return;const g=h.offsetHeight,y=h.scrollHeight-g;if(y<=0){u.start({scrollTop:0,from:{scrollTop:h.scrollTop}});return}const _=v.offsetTop,b=v.offsetHeight,w=Math.max(0,Math.min(_-(g-b)/2,y));u.start({scrollTop:w,from:{scrollTop:h.scrollTop}})},f=h=>{r([]),i!==h&&a(h)},d=h=>{r([]),f(h)};return S.useEffect(()=>{c()},[i,n.length]),S.createElement(AN.div,{className:Me(si.thumbnails,e),ref:s,scrollTop:l},S.createElement("div",{className:Me("thumbnail-list",si.thumbnailList)},n.map((h,p)=>S.createElement("div",{className:si.thumbnailContainer,key:h.id},S.createElement(kN,{slide:h,index:p,active:i===p,selected:o.includes(p),onClick:()=>d(p)})))))},NN=()=>S.createElement(PN,null);Ie.ElementTypes=Ge,Ie.PPTCanvas=sP,Ie.PPThumbnails=NN,Ie.ShapePathFormulasKeys=Pe,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});
|